From nobody Sun Jun 25 04:07: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 4Qpcrp6ztMz4gLlL; Sun, 25 Jun 2023 04:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qpcrp6Bt7z3qHl; Sun, 25 Jun 2023 04:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687666074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPHAOYYsjx00R8v1FM+Xwq1z5ioToP12DeiZj8ryh/w=; b=lN56GLoY8Xo5VD626BXrYm6KgPbzoALKqFenk05iw7ayldL9DWTdSRSIgYK3Uvs+EKYplB Oip4p72btGkmYvSfazuYH/w7CkmtAfBp/sHlmQoGSAC5Kzc2scYUBjetjrLsfvLmQ/1voU yD0LbDUXVhQ5CWaLluHabycqya2alJdI4XQtLlBwZgtVZe4ZR8LGj68dWLpVHvyWd1RzHt vsTmxPNr34oERoQ5QSgpj9iMx/z9dwIptiaPar1+u1fRMcdxETfx9qK44UBSevjarlUKVP UdubjKKvLppaEwBQyO46cab7r6xWdqjnuH9ThmEn8l8UVFkSCNwxC/wzhQiaUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687666074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPHAOYYsjx00R8v1FM+Xwq1z5ioToP12DeiZj8ryh/w=; b=Bcv9apGX0I57zu0npfVX9mFcSYIEcxy5eEy3JBbIWg4jgrgM9g2zq5sGjhY/vLIVpUkTpM HLdgo5pD9ryg1TSKZMj9CXkgVOzpP9n4kYkdu27OPu5erSp/tgxmwBGIVPCS2bccy1pNQ0 YBuuBsqh83ca02yBuHJqchOnEECwPckFi/KssV+ym37VK46boORI/2O5LTmswsuf4/ld8N g9UaAnvX2bcFTewUlarMGffbKmvdGfhmQsNuhR1k+y5KgPDyXev1giPQGBXV/tnlTlUQgR yWR1k8vXNkQRraUTBRZOvyZ2k2v7KIkNFu9U1yqXz2XansvJ+nM4rD9tBubb4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687666074; a=rsa-sha256; cv=none; b=Nd9Jcuy/61QQzNQ8raINJLPuJIPF7Oddq3xVMUzNCm3lriywxDx6taYSYIPe9HYrvEM7Ue uH5i9pIgj7pk3wWD1rOckJxcRk9Ch6mUHwOoo6pZs69fO/jyCDhITmiTMzgaygQSIPYko4 g0gKSFIrQOZoYDB3Am+sRxlYif0oLpEYJtRPYrpaNipghfOnYMbgIpEKwFdKnOK9i/RcBk cMH6zNadGEHJA0BASHBHCI516Pm3WH75EwdVdTPp6zRh1h6/hoGRy8AQKe68P7EMI3xpnE ubW41wteGcDGrVGiJrHb29v6cGxThwy9rwk9+Qt89JIXrE/hZZ+CbiXc+TjWjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qpcrp51Jwz1CGX; Sun, 25 Jun 2023 04:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35P47s7I001337; Sun, 25 Jun 2023 04:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35P47skF001336; Sun, 25 Jun 2023 04:07:54 GMT (envelope-from git) Date: Sun, 25 Jun 2023 04:07:54 GMT Message-Id: <202306250407.35P47skF001336@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: 1b33afb7e88b - stable/13 - wpa: Enable receiving priority tagged (VID 0) frames List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1b33afb7e88b2e36db2083c488de41dbe097ef49 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=1b33afb7e88b2e36db2083c488de41dbe097ef49 commit 1b33afb7e88b2e36db2083c488de41dbe097ef49 Author: R. Christian McDonald AuthorDate: 2023-06-11 23:22:53 +0000 Commit: Cy Schubert CommitDate: 2023-06-25 04:07:33 +0000 wpa: Enable receiving priority tagged (VID 0) frames Certain internet service providers transmit vlan 0 priority tagged EAPOL frames from the ONT towards the residential gateway. VID 0 should be ignored, and the frame processed according to the priority set in the 802.1P bits and the encapsulated EtherType (i.e. EAPOL). The pcap filter utilized by l2_packet is inadquate for this use case. Here we modify the pcap filter to accept both unencapsulated and encapsulated (with VLAN 0) EAPOL EtherTypes. This preserves the original filter behavior while also matching on encapsulated EAPOL. Sponsored by: Rubicon Communications, LLC ("Netgate") Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D40442 (cherry picked from commit bb5d6d14d81b0789d2e73da03571603426afef56) --- contrib/wpa/src/l2_packet/l2_packet_freebsd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/wpa/src/l2_packet/l2_packet_freebsd.c b/contrib/wpa/src/l2_packet/l2_packet_freebsd.c index 7b96bd033c87..156a09a32a84 100644 --- a/contrib/wpa/src/l2_packet/l2_packet_freebsd.c +++ b/contrib/wpa/src/l2_packet/l2_packet_freebsd.c @@ -21,6 +21,7 @@ #include #endif /* __sun__ */ +#include #include #include #include @@ -99,6 +100,11 @@ static void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) } else { buf = (unsigned char *) (ethhdr + 1); len = hdr->caplen - sizeof(*ethhdr); + /* handle 8021Q encapsulated frames */ + if (ethhdr->h_proto == htons(ETH_P_8021Q)) { + buf += ETHER_VLAN_ENCAP_LEN; + len -= ETHER_VLAN_ENCAP_LEN; + } } l2->rx_callback(l2->rx_callback_ctx, ethhdr->h_source, buf, len); } @@ -127,10 +133,10 @@ static int l2_packet_init_libpcap(struct l2_packet_data *l2, os_snprintf(pcap_filter, sizeof(pcap_filter), "not ether src " MACSTR " and " "( ether dst " MACSTR " or ether dst " MACSTR " ) and " - "ether proto 0x%x", + "( ether proto 0x%x or ( vlan 0 and ether proto 0x%x ) )", MAC2STR(l2->own_addr), /* do not receive own packets */ MAC2STR(l2->own_addr), MAC2STR(pae_group_addr), - protocol); + protocol, protocol); if (pcap_compile(l2->pcap, &pcap_fp, pcap_filter, 1, pcap_netp) < 0) { fprintf(stderr, "pcap_compile: %s\n", pcap_geterr(l2->pcap)); return -1; From nobody Sun Jun 25 04:08: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 4QpcsK1CtDz4gMDC; Sun, 25 Jun 2023 04:08: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 4QpcsJ68TYz3qT8; Sun, 25 Jun 2023 04:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687666100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w1mX4P/vA5sx/PRimKzxzsYq7+wIaG5DOYOzyG41pdo=; b=Db+7xt+H8UeNQ9zCAROBUb1hET/P36W5qaXiP6iGANaTifuUIuaDUQITqc6bU6w+qkEhyy tZ8bdCSBNpQje1i8BnZRqTqbe3YyLA74/5fWBimzB1qn9Uzh36tmVjwf7JSrFxg6vwPIyY wbRLaRJVP/e3dj0Yatdt+4ZmLOxaiMnvIjupDhjbHLgbncGkojGpQf0i9X2gEkM2sMCvlD IxAyNqgC54bKiD1SKeZZv5hDR7YJoQKpPvqIR7oLQfxnR4Tw7f9ZoOMlr9cYBLzg6z8bWs XOusrXsTbORMQqVZ0cKQGsIKmrMQOa30AO2heFfFV0zISjIWKGx/2PKGpD52Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687666100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w1mX4P/vA5sx/PRimKzxzsYq7+wIaG5DOYOzyG41pdo=; b=VY+riWT4GNKL03mETeQ7VDdj/+Gz/8iw0AMxROxJvEEjygLN2nYkaDJxQJaHv199icxQLu u809l78EbTGfjmKXgt8K+QhnJa7X2vZAE+oEQM3+wGLOXQK2zEF79rMoqkIC+hrKVr7qHl zg4ZawtDj8m2tCwFnHNzwR79DC80Ouumxd0+rlVZgzXASCDXunoBYjEYmUjTckW0Bpbpu8 T9uj25JVCjcDsrxMgjKHBmuGOq7KgZo9xuI9E2LzhPxut73oosn62r9/+FOXTDkHdoHbrS hFsv5rf9zaPZWd9yDQ8W4v0vmrfxfOiAllDj6oGB5Zfwz47fSietmgGJRhznAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687666100; a=rsa-sha256; cv=none; b=UpJBL78+O0BfU4vwGMvGoFBTppVqmv78v+CWFO4I3emxjcqKdJNCyBK6eWqMNO+XDZ6l2E ENmC0uA0eF659lK0KTKok0gLC3ydph0rLhiDK+bR4ya2YTfZugP6LYwuf1JIIZX2ZDB7Cg ufrQNXmCNECD+W21BDsDoYuyTMzdP8k9xuynQb4W5Lok+cJNPDAL0pEqoku/0LHjZ9/7CW JZYFXzEVe5sMmN8VzQ49hF51VhbtPnRe9+fb306YcHG6sgjTpaokBWTVsyYvYFpitlCaYK tXgRxwXyDPFCOtlW4P233eWYv98t3e9b7PKJYyaXxhTeGKPfPRQ+Zkl/OTlaLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QpcsJ4xtvz1CGY; Sun, 25 Jun 2023 04:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35P48KrD001521; Sun, 25 Jun 2023 04:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35P48KH4001520; Sun, 25 Jun 2023 04:08:20 GMT (envelope-from git) Date: Sun, 25 Jun 2023 04:08:20 GMT Message-Id: <202306250408.35P48KH4001520@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: cc6d0b4bd2c9 - stable/12 - wpa: Enable receiving priority tagged (VID 0) frames List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: cc6d0b4bd2c9e0dfa1e78fae9ae3497f1d7b7481 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=cc6d0b4bd2c9e0dfa1e78fae9ae3497f1d7b7481 commit cc6d0b4bd2c9e0dfa1e78fae9ae3497f1d7b7481 Author: R. Christian McDonald AuthorDate: 2023-06-11 23:22:53 +0000 Commit: Cy Schubert CommitDate: 2023-06-25 04:08:04 +0000 wpa: Enable receiving priority tagged (VID 0) frames Certain internet service providers transmit vlan 0 priority tagged EAPOL frames from the ONT towards the residential gateway. VID 0 should be ignored, and the frame processed according to the priority set in the 802.1P bits and the encapsulated EtherType (i.e. EAPOL). The pcap filter utilized by l2_packet is inadquate for this use case. Here we modify the pcap filter to accept both unencapsulated and encapsulated (with VLAN 0) EAPOL EtherTypes. This preserves the original filter behavior while also matching on encapsulated EAPOL. Sponsored by: Rubicon Communications, LLC ("Netgate") Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D40442 (cherry picked from commit bb5d6d14d81b0789d2e73da03571603426afef56) --- contrib/wpa/src/l2_packet/l2_packet_freebsd.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/wpa/src/l2_packet/l2_packet_freebsd.c b/contrib/wpa/src/l2_packet/l2_packet_freebsd.c index 7b96bd033c87..156a09a32a84 100644 --- a/contrib/wpa/src/l2_packet/l2_packet_freebsd.c +++ b/contrib/wpa/src/l2_packet/l2_packet_freebsd.c @@ -21,6 +21,7 @@ #include #endif /* __sun__ */ +#include #include #include #include @@ -99,6 +100,11 @@ static void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx) } else { buf = (unsigned char *) (ethhdr + 1); len = hdr->caplen - sizeof(*ethhdr); + /* handle 8021Q encapsulated frames */ + if (ethhdr->h_proto == htons(ETH_P_8021Q)) { + buf += ETHER_VLAN_ENCAP_LEN; + len -= ETHER_VLAN_ENCAP_LEN; + } } l2->rx_callback(l2->rx_callback_ctx, ethhdr->h_source, buf, len); } @@ -127,10 +133,10 @@ static int l2_packet_init_libpcap(struct l2_packet_data *l2, os_snprintf(pcap_filter, sizeof(pcap_filter), "not ether src " MACSTR " and " "( ether dst " MACSTR " or ether dst " MACSTR " ) and " - "ether proto 0x%x", + "( ether proto 0x%x or ( vlan 0 and ether proto 0x%x ) )", MAC2STR(l2->own_addr), /* do not receive own packets */ MAC2STR(l2->own_addr), MAC2STR(pae_group_addr), - protocol); + protocol, protocol); if (pcap_compile(l2->pcap, &pcap_fp, pcap_filter, 1, pcap_netp) < 0) { fprintf(stderr, "pcap_compile: %s\n", pcap_geterr(l2->pcap)); return -1; From nobody Sun Jun 25 08:29: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 4Qpkfh2W1yz4hxsV for ; Sun, 25 Jun 2023 08:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qpkfh24mwz3FlK; Sun, 25 Jun 2023 08:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687681772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YzsHUbn5Yjp2rgg5xG4A7UHYm0w9w2XQX6Xub0HVLc=; b=CKJbKyJRatRMWUKKZdfqGXWC4iMSgJPToImqxBLOjKVfDsJSAZ+X6iWLZseMlbV54sHWdR jnQrfFVZetuBs5m73GzdtX8K7ZcT1fchJdpQ/pTGW+bkVgDaItjItq2qtp1K0YXCYgTz59 1FwsUdkFpTFuQmfddlkHals1zzTNbggCbKgMOUYCDQvbYLCB/Z0GO+I2OoAu09+swgC1v8 i0pH5wbrFsdU0dcQttxsiWCpsp/2eOf11XDbEzIrjtGistjveM34IImEL8usQC9x8NpA9P 8648rIZjjNe9x8p30T5z15+A1i0wpJVXfYw1WvpG0LtE2BRGDix8sEtPrA6I8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687681772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+YzsHUbn5Yjp2rgg5xG4A7UHYm0w9w2XQX6Xub0HVLc=; b=O3b9l8jivaF5AwU0suFmV4K/GUiWBm6vkup7Uof64NA/KShlIoTZ5MGtf9u4YAgoHxPQNy 916GGGAXkrROeaNmSp0E/+rsNiymQBsl1r9WAuIVWShtBSlCaihYlfO/6rtkhXl3hzTeN5 VSR2c5rDuAd1+0PNFikOwt2cFzI0g5b/Gn2YxUNEHad3F7fNn0tm3tT6ZTmg/hIfDSzvNk fALG/WNyxEWPQKA4fOmHmGr8+KYGxgOx2kf4xPwiIDEcz8qTXq8x3HY8UJ0S07osOLlUYm 4PtsqXr1NGkgxkuQLDbwTWUrWXE/tqzKAtWzftXgKLZZYtthaU+neerRq+abNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687681772; a=rsa-sha256; cv=none; b=gTJ8XYfNLOQBnoET8xl/0E4cxsCsC+y+ipkI3Aaz9909DbFnuM+68NzwrthJUIeM659XI8 8tv0yJT6BYevJHQ7jTLDdzBcCIprWuiOlVIbJvJXfNAIAUprENIl3DCRnOkc1iygEpGn85 jxmNlSDA+H8+/A82SeBE6hsbrYYJ7QIt9c90tYZhN+32KfK/hJplkhfzQPHgljnGdogk0e pl1CHY65CmAYPxlmjiyyNK7P6DdRzuJEtow4BtVU1xd4PXC4DhtdPWbRxCH7WSrbxjSe6Y 3NB1L24fQp6p+TozBTpCzIOP2h8eTileglnU5tm0gJqbjktq73jcfoxMOeTNng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qpkfh0XGDzLJR; Sun, 25 Jun 2023 08:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35P8TV30030410; Sun, 25 Jun 2023 08:29:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35P8TVVA030409; Sun, 25 Jun 2023 08:29:31 GMT (envelope-from git) Date: Sun, 25 Jun 2023 08:29:31 GMT Message-Id: <202306250829.35P8TVVA030409@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 10e36e17612b..8e8acabdcaeb - 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: 8e8acabdcaeb831c777f71361722f4235b698a8d X-Git-Oldrev: 10e36e17612ba9c634b140ae76847bb62b5be68f X-Git-Newrev: 8e8acabdcaeb831c777f71361722f4235b698a8d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=10e36e17612b..8e8acabdcaeb 8e8acabdcaeb Fix memory leak in zil_parse(). From nobody Sun Jun 25 09:40: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 4QpmDG5Rmtz4gyXb; Sun, 25 Jun 2023 09:40: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 4QpmDG5CWcz436c; Sun, 25 Jun 2023 09:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687686014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kaViuXEXWJJZ5MFI81xLuRR27WC3VngRTz56Sil1yZs=; b=xryfepsX54IVqc4tVshqyGQD/zvWnQlUuWQD31SraGGZmOzHxfoyaqvoMjGq4FYbS43hZr gMpHNGp2H/R99Q8KNEd8EJLvIsrPmEIgM0akdmXOqq6Dqzsn5JV2wBhP6i+CcT3+f1IalO /EMWJAKIdw2BmIUGcfv+C+whg75te3AagCDjuToXfvqrQ5Z5MfcIA11EKcATgpyrLHTy+E 3+yE9W8vUnJyDCb1lSL6MqpyGAKV1XXmgppY7ly+WUBfFZPSkvkzs8uoEQljdQB2EdUsAO qCfqOo84ULyGnAjLtaQSpwYeFVm3h37srq0/i0hfSXsFlPBSYdC1x4PxLYbEQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687686014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kaViuXEXWJJZ5MFI81xLuRR27WC3VngRTz56Sil1yZs=; b=kgdqZ0M9jR+TpEptLledCnSo2Mm9xNboS4qE561B2p6y5qzuhDOgVIQg4T9NWdMlQbewkv u5jX+aeKRuSPheNMGuqfutCgrpSHIy0xc0cAOdk0m0IqDMlf4hHFQmxqQzV3rFBYJMyFNn tPRq6Vf370gAoN9f44E1JfakZOGCrKn4kQgP5fNPgGof4n7A1LMNbLrJiKg86kJpxJigMX IZjTYw65F18olkRNYEDPVvVI630kQnRCJQIm+m3KQA4tnUhEtXbKCcHTlMJAVOhxOfYaEK dCcSr/adhz1mnmlzR41gFWJRZx8tGxjVR8cXnhN6Mr2W+jvowbe6ZiLsfK9hDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687686014; a=rsa-sha256; cv=none; b=I61jX42J3BJMxlC6tRnax31/lIDykAJmDV63aYloXx0h2tq/IE7VhNCfiDJOHSlhy+OV8K jzWVY3/99Xni3E8mf6m9ddpJrw1lXB7EMPIdZAUw6Hb7WdSq/k1J/lqXBXouMmjoa1VQ04 ST8U1jzUnbcLTE7TkXFOFgZ5kvY7e1/RF20YUR3kBmI8wHr81KbZo33jJuGNFL5pQ8J3wY 9StPsHEPUCr2Elc7zZuSTmXn5Fyhr3M8uxed/dN5s2Udg30yiBoV48oad9d0XcTztUgFq6 +A+KIrUoO7+3VSL+QIOSIDhayXO4Zt4tPKRBSveqO+RIsjMx9xIfRR4kigKOyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QpmDG49s5zNNn; Sun, 25 Jun 2023 09:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35P9eEQn052561; Sun, 25 Jun 2023 09:40:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35P9e7sm049209; Sun, 25 Jun 2023 09:40:07 GMT (envelope-from git) Date: Sun, 25 Jun 2023 09:40:07 GMT Message-Id: <202306250940.35P9e7sm049209@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: f190c36b5d45 - main - zfs: merge openzfs/zfs@8e8acabdc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f190c36b5d45cbfadc922a69d79628c43cdda22f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f190c36b5d45cbfadc922a69d79628c43cdda22f commit f190c36b5d45cbfadc922a69d79628c43cdda22f Merge: 229d643c4dd5 8e8acabdcaeb Author: Martin Matuska AuthorDate: 2023-06-25 08:31:19 +0000 Commit: Martin Matuska CommitDate: 2023-06-25 08:32:42 +0000 zfs: merge openzfs/zfs@8e8acabdc Notable upstream pull request merges: #14987 Fix memory leak in zil_parse() Obtained from: OpenZFS OpenZFS commit: 8e8acabdcaeb831c777f71361722f4235b698a8d sys/contrib/openzfs/module/zfs/zil.c | 8 ++++++-- sys/modules/zfs/zfs_config.h | 4 ++-- sys/modules/zfs/zfs_gitrev.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index caf1b68f8728,000000000000..eb096b584d97 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1090 -1,0 +1,1090 @@@ +/* + * $FreeBSD$ + */ + +/* 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() 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_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 */ + +/* 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 */ + +/* 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_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_*_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 + +/* 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 */ + +/* 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 */ + +/* 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 */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->read/write_iter() are available */ +/* #undef HAVE_VFS_RW_ITERATE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* yes */ +/* #undef HAVE_WAIT_ON_BIT_ACTION */ + +/* wait_queue_entry_t exists */ +/* #undef HAVE_WAIT_QUEUE_ENTRY_T */ + +/* wq_head->head and wq_entry->entry exist */ +/* #undef HAVE_WAIT_QUEUE_HEAD_ENTRY */ + +/* int (*writepage_t)() takes struct folio* */ +/* #undef HAVE_WRITEPAGE_T_FOLIO */ + +/* xattr_handler->get() wants dentry */ +/* #undef HAVE_XATTR_GET_DENTRY */ + +/* xattr_handler->get() wants both dentry and inode */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->get() wants xattr_handler */ +/* #undef HAVE_XATTR_GET_HANDLER */ + +/* xattr_handler has name */ +/* #undef HAVE_XATTR_HANDLER_NAME */ + +/* xattr_handler->list() wants dentry */ +/* #undef HAVE_XATTR_LIST_DENTRY */ + +/* xattr_handler->list() wants xattr_handler */ +/* #undef HAVE_XATTR_LIST_HANDLER */ + +/* xattr_handler->list() wants simple */ +/* #undef HAVE_XATTR_LIST_SIMPLE */ + +/* xattr_handler->set() wants dentry */ +/* #undef HAVE_XATTR_SET_DENTRY */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() wants xattr_handler */ +/* #undef HAVE_XATTR_SET_HANDLER */ + +/* xattr_handler->set() takes mnt_idmap */ +/* #undef HAVE_XATTR_SET_IDMAP */ + +/* xattr_handler->set() takes user_namespace */ +/* #undef HAVE_XATTR_SET_USERNS */ + +/* Define if host toolchain supports XSAVE */ +#define HAVE_XSAVE 1 + +/* Define if host toolchain supports XSAVEOPT */ +#define HAVE_XSAVEOPT 1 + +/* Define if host toolchain supports XSAVES */ +#define HAVE_XSAVES 1 + +/* ZERO_PAGE() is GPL-only */ +/* #undef HAVE_ZERO_PAGE_GPL_ONLY */ + *** 143 LINES SKIPPED *** From nobody Sun Jun 25 13:36: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 4QpsTL3RTtz4h61R; Sun, 25 Jun 2023 13:36: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 4QpsTL32Jpz3x5y; Sun, 25 Jun 2023 13:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687700214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLtvjBegKLWFQ+LMb9MAxFpDr/eA2VKcIHzcRt3F6yk=; b=aXK8OC0twS9eAsWlxmjtcANSdmv4puouIzL5EXgrxeX54zKo5iMuTQmv3iYWO6+6RzhuR7 0lzDpOF7oMiaPbeMVb4fGPzb7Cm62LMCuQSmBTQWTafvlEvpfOgHmSorz0MJ/EE5QMqnKX FjN1fWBi6+/zpjJIng0ca6xuzgoVfTGLhQjx63VPmM7hvrCa3i2AAmn5oeJa7JiCjsY++3 PpShv8iunofHnsMFakpbvwedf3lR5TdNqVxXB7yhcLO5yVS37yQj+qJFP3Lg3FWxoJLTr9 ocOfoX8Z+wYViJg5SNLY10MND4LoKZXAY3ca9YpgE8tOTZmPtXdh2zhO7yK75A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687700214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLtvjBegKLWFQ+LMb9MAxFpDr/eA2VKcIHzcRt3F6yk=; b=fEhteHsJ32+ZuhsJXUQdO2G6lV4SgdjKkdcbAhUD5wNDUHyvjPUnB01SYUBHN0yinvBIxv KUfl++PLhBWQufJJxfE9EY2c4byCeehVRP4f5jxsh0SwCrSY7QiiqgD+/Tqck/eTnzH8Op AqCUocf2wNElX+b4qqraas9qHdXA8PEwrDyE5rTg0XES3TTcP/DLd7qZEKfGEXicTDLv2Y qnSEAutlXMPavTNQZAkAXaJQRjEqydIc5ou8LvTsdUhExiXl33i1hoQqqyvhn7hHD1cIUR 44NbGjT+ezrjBSgDI+vpaS9jRQILOxnnu9NjkErg8jN8P8eOOFSK7ZXwtlY6oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687700214; a=rsa-sha256; cv=none; b=cT3Yl+lK8JNnzx5zYvtpuluh3QVUppy9OVXnUsTP/I0HqQEE7DUeEJkVk2d9ZodYKvXDqr L5eVTxI1ivy0eGDoLvLfWY2x005oQERMAV/pWfQoN4r1CfWvI9DqZ/QNnpqyPkAUGt4tHh Jf8ZTmnMXhenTLghUluwvcWk/Zu6/42yMDz8hMvERVt4yh2hWFyDOn2mN9QeXQmlY2uoVa a98Mh9V6DeUssxlOJlTQfh5gYRetwC9KwDTOKtzNpljyj83MtI0tPwWYRzekXCmZjkQNYH q7bZs2t8FK7HC0MvlLE+yPIPT6ogzH6fp3jCPsOGZgOYFo+YkpMPUWDAJnUWsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QpsTL27wpzVVc; Sun, 25 Jun 2023 13:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PDas0D042705; Sun, 25 Jun 2023 13:36:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PDasXZ042704; Sun, 25 Jun 2023 13:36:54 GMT (envelope-from git) Date: Sun, 25 Jun 2023 13:36:54 GMT Message-Id: <202306251336.35PDasXZ042704@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: 9cbc371c8af7 - main - libcrypto: build nistp* on all little-endian 64-bit targets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9cbc371c8af751c177f8242a306678da49b3adab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9cbc371c8af751c177f8242a306678da49b3adab commit 9cbc371c8af751c177f8242a306678da49b3adab Author: Ed Maste AuthorDate: 2023-06-24 17:52:08 +0000 Commit: Ed Maste CommitDate: 2023-06-25 13:33:55 +0000 libcrypto: build nistp* on all little-endian 64-bit targets libcrypto intends to provide these routines on little-endian 64-bit targets. This was previously done by including them in the ASM_aarch64 and ASM_amd64 blocks in the Makefile, but this excluded powerpc64le and riscv64. Reported by: ci.freebsd.org Reviewed by: jrtc27 Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40749 --- secure/lib/libcrypto/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/secure/lib/libcrypto/Makefile b/secure/lib/libcrypto/Makefile index a1f519431f63..28258e796984 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -215,11 +215,13 @@ SRCS+= ec_pmeth.c ec_print.c ecdh_kdf.c ecdh_ossl.c ecdsa_ossl.c ecdsa_sign.c SRCS+= ecdsa_vrf.c eck_prn.c ecp_mont.c ecp_nist.c SRCS+= ecp_oct.c ecp_smpl.c ecx_backend.c ecx_key.c ecx_meth.c eddsa.c SRCS+= f_generic.c f_impl32.c f_impl64.c scalar.c -.if defined(ASM_aarch64) +# see OPENSSL_NO_EC_NISTP_64_GCC_128 in configuration.h +.if ${MACHINE_ABI:Mlittle-endian} && ${MACHINE_ABI:Mlong64} SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c +.endif +.if defined(ASM_aarch64) SRCS+= ecp_nistz256-armv8.S ecp_nistz256.c .elif defined(ASM_amd64) -SRCS+= ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c SRCS+= ecp_nistz256-x86_64.S ecp_nistz256.c x25519-x86_64.S .elif defined(ASM_arm) SRCS+= ecp_nistz256-armv4.S ecp_nistz256.c From nobody Sun Jun 25 17:50: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 4Qpz6S6DNTz4hsZr; Sun, 25 Jun 2023 17:50: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 4Qpz6S5p8dz3LBB; Sun, 25 Jun 2023 17:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687715456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvAkmfdioVJadSvPwJltPkJFK7xm5QRTGp+MyWYkJIA=; b=s3u4bX6TW1KqsPd63NqyXp0shoLDn+G4D0hvQQK6375zb24ho44VyP+yNESdhkc/5siQWx /MwdZQpiDM84VeQGIrHTTlpXQ7hbdJXRIhHXECC0sC7rrpfkxf94AaFZANaGYNWOUXfB5G oXAH5LL2oHsBy9K1LpCFiyCltW4VYbhpNF7JV0NLiPR3ll8kNeyJUQpRlW9vlGwbiTxvt7 kdSHpIr9pNDwzq8VWrjS8hgz/fPkupH/QbEFoUnMQgrGbLxoYYmn2ukTrUIApG5VDiIPEE oLWhteg7EE6zRrRPt3ZGkspybn6P/2hA6QiF3OHj+4Tvb+9eKNLMBdjINYnjBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687715456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rvAkmfdioVJadSvPwJltPkJFK7xm5QRTGp+MyWYkJIA=; b=pnZxcQMkctQhWb7L9FBwLE7udALOfdrnfrHZFlReVJobD9FHiXGkvm3vCYK9VnrgNUAsfb QH5XcQfy2LzNugUNt+1mNdG0F+MTQr/85biudR7fQymITlCdGTMADk48XJtthD8MgZH5pu kTjmqeqI+Ela+QVx4plQgcrLYfr9yMdaIXu9psbpX8C/dUNYYcsVgr8Ku67o5rRh3Ba518 fwpSgiy64VUKTknsGshgyCN13YvEkr5pt3SqEXMtB67h99Gq6oP1PkE0sYEM8D/ht+hdQ9 USGdATMgYvfM6Lbk15WnE4PkBTsjbf6HAl9RdQtaUnhkvKyfrdzB9l4XCUCYGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687715456; a=rsa-sha256; cv=none; b=lmQJPfBZas6TrZM+ZkHKLDvk40/AO5AmpagFujqFPRJD8GEIlpWDS522yvx275XnQT5MwH 6ChMa1JyHnGGPfoR0kxbGkEfqopWJUBnpdpQwCYgXLLZ2Z4LCzw/V+EI6z+f+Xtf+nSNoH 2vXt6vm9+P2euPDuDTJ4vSzaP31FShqfL2tHsqeKR6ohkbnMXXog3Z8PuyOnEas84UBMqe FYQ3nlckcw+q5wEASfF5Gf4IG8qEA/gMW52Z52b3oAFRcLrqYef7t1ZLrrYuJU54A1xabs DmCIvUH4rG3Qa4ZbnVEsmjoka6fqAAsY81Ch4jG8nCsZwyvKY/YIKj9GqYv3xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qpz6S3SSczcWN; Sun, 25 Jun 2023 17:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PHou7K066378; Sun, 25 Jun 2023 17:50:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PHouZr066377; Sun, 25 Jun 2023 17:50:56 GMT (envelope-from git) Date: Sun, 25 Jun 2023 17:50:56 GMT Message-Id: <202306251750.35PHouZr066377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: a42d8fe001b9 - main - radix_trie: simplify trimkey 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a42d8fe001b912a5e4efdd4020d9bfadc07f6c7f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=a42d8fe001b912a5e4efdd4020d9bfadc07f6c7f commit a42d8fe001b912a5e4efdd4020d9bfadc07f6c7f Author: Doug Moore AuthorDate: 2023-06-25 17:49:15 +0000 Commit: Doug Moore CommitDate: 2023-06-25 17:49:15 +0000 radix_trie: simplify trimkey functions Replacing a branch and two shifts with a single masking operation saves 64 bytes the pair of functions lookup_le and lookup_ge on amd64. Refresh the associated comments. Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D40722 --- sys/kern/subr_pctrie.c | 11 ++--------- sys/vm/vm_radix.c | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index 043c31ad9501..44a00a9eef77 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -156,18 +156,11 @@ pctrie_slot(uint64_t index, uint16_t level) return ((index >> (level * PCTRIE_WIDTH)) & PCTRIE_MASK); } -/* Trims the key after the specified level. */ +/* Computes the key (index) with the low-order 'level' radix-digits zeroed. */ static __inline uint64_t pctrie_trimkey(uint64_t index, uint16_t level) { - uint64_t ret; - - ret = index; - if (level > 0) { - ret >>= level * PCTRIE_WIDTH; - ret <<= level * PCTRIE_WIDTH; - } - return (ret); + return (index & -PCTRIE_UNITLEVEL(level)); } /* diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index cc932a6cc80d..7d3408226be1 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -181,18 +181,11 @@ vm_radix_slot(vm_pindex_t index, uint16_t level) return ((index >> (level * VM_RADIX_WIDTH)) & VM_RADIX_MASK); } -/* Trims the key after the specified level. */ +/* Computes the key (index) with the low-order 'level' radix-digits zeroed. */ static __inline vm_pindex_t vm_radix_trimkey(vm_pindex_t index, uint16_t level) { - vm_pindex_t ret; - - ret = index; - if (level > 0) { - ret >>= level * VM_RADIX_WIDTH; - ret <<= level * VM_RADIX_WIDTH; - } - return (ret); + return (index & -VM_RADIX_UNITLEVEL(level)); } /* From nobody Sun Jun 25 18:28: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 4QpzxL2pqZz4hNDV; Sun, 25 Jun 2023 18:28: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 4QpzxL2Lmcz3tCt; Sun, 25 Jun 2023 18:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687717686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aSyDztsq6w35w9h4DzA/COMFp6HHlPtrGOOhi8a9d4E=; b=DkkxGfhPPi3dS7z+3OfxgV0QI0cUAPQBu7rWScyB6sMW+awMhLImnwtbpF2TY2reMdYL47 HYy/3a8E7glytHkfCKzQ46Uhmm5W8xhmxzJuiAnoTssUvp7U0A76FJVwUqCSJVxL+KLxZ3 WS3Eerse1z32JiOU6hF4SDbTcCW99614glyk9dzm00N/hjYr5a2fXneirjbsyYK6zBRz/0 iEE1gpw+WLP1Tyc89oTQxuWmyaCUyU808gmGoErk5IJeozTxSkHmxGntWKEZPyfZAsohKt R5rIqpHkPpfJnxVXyJoDP5aJ0oxOFgC4KFhY1XPinOOV72zFClHMOZJjHuDk8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687717686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aSyDztsq6w35w9h4DzA/COMFp6HHlPtrGOOhi8a9d4E=; b=MyQf+C8HbROHkSUsbEoIbc6LweWabs+vGwNh2fL7wWyMrLu6H1OyCNTuHeqgTQu7o50Ykh KrYOuH9+yJ8Vdv/hNZlwzCvnzjzfcTKJtvIy1VkcFwizIB/E+aVTsM774htjO8OAheMq6n +smI4ueVcCd4W4OpowCr9vskykXo68tlwb/rjLRJ5U1NhUw60UGTPqd5PSJwhkW49En35Z eUhlkYsy3NlafbZrFkHHESdqcHfrlkce8QpxWRB1lNYptVQdPJXqlhoC+UZvKRw8DuD1w2 kLi69/5KH0+TNqz4IEKQgAMV1yfCrhxyFcUv3zHvA6ls0I0poCOy1if8fkmKSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687717686; a=rsa-sha256; cv=none; b=k3lZIxNk5WpqSHqFlYVA7EQYF8Bj2jPpDxz44bFDYLjGVt5ziFjs2lDRMrkWRio6AEmZes 12Sc2VRDMu7dmBIakEbtomUxp/gINPTBqGv5otf55ihTaQjRg/pLBGvtfyrThEHmQVvRhI GxnqhbTL+nDxRdRfphL0aAIJ8hvhoIDhPvyVZuPiShNSidjGu8QLSSti6Pj3hEJV94Q75n k7qtOdxRbZw+4CJEK1l/PsT2s7O7rSyU5fn+e9RxCMPbPCnzVyIukcq2iEZlpd0oCCjxFa MmKuhMWjLR2FBXELOTWlK5MAc66Pl2MOewBC0AzZDwQS6PzzI7uZA9rSxBSx8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QpzxL1JzgzdFV; Sun, 25 Jun 2023 18:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PIS6HW025030; Sun, 25 Jun 2023 18:28:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PIS6Nx025029; Sun, 25 Jun 2023 18:28:06 GMT (envelope-from git) Date: Sun, 25 Jun 2023 18:28:06 GMT Message-Id: <202306251828.35PIS6Nx025029@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: 42ceab3ea1a9 - main - libc.a: implement _rtld_addr_phdr() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 42ceab3ea1a997db93b65404be0ee4b17b5382d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=42ceab3ea1a997db93b65404be0ee4b17b5382d7 commit 42ceab3ea1a997db93b65404be0ee4b17b5382d7 Author: Konstantin Belousov AuthorDate: 2023-06-24 10:59:56 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-25 18:27:25 +0000 libc.a: implement _rtld_addr_phdr() to make __cxa_thread_call_dtors() operational for statically linked binaries. Noted by: andrew Reviewed by: emaste, dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40748 --- lib/libc/gen/dlfcn.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index 4478b41cfe98..61984e2fe86c 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "namespace.h" #include #include "un-namespace.h" @@ -248,13 +249,48 @@ _rtld_atfork_post(int *locks __unused) { } +#ifndef IN_LIBDL +struct _rtld_addr_phdr_cb_data { + const void *addr; + struct dl_phdr_info *dli; +}; + +static int +_rtld_addr_phdr_cb(struct dl_phdr_info *dli, size_t sz, void *arg) +{ + struct _rtld_addr_phdr_cb_data *rd; + const Elf_Phdr *ph; + unsigned i; + + rd = arg; + for (i = 0; i < dli->dlpi_phnum; i++) { + ph = &dli->dlpi_phdr[i]; + if (ph->p_type == PT_LOAD && + dli->dlpi_addr + ph->p_vaddr <= (uintptr_t)rd->addr && + (uintptr_t)rd->addr < dli->dlpi_addr + ph->p_vaddr + + ph->p_memsz) { + memcpy(rd->dli, dli, sz); + return (1); + } + } + return (0); +} +#endif + #pragma weak _rtld_addr_phdr int _rtld_addr_phdr(const void *addr __unused, struct dl_phdr_info *phdr_info_a __unused) { +#ifndef IN_LIBDL + struct _rtld_addr_phdr_cb_data rd; + rd.addr = addr; + rd.dli = phdr_info_a; + return (dl_iterate_phdr(_rtld_addr_phdr_cb, &rd)); +#else return (0); +#endif } #pragma weak _rtld_get_stack_prot From nobody Sun Jun 25 18:40: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 4Qq0D72fPkz4hdXl; Sun, 25 Jun 2023 18:40: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 4Qq0D65Y2pz42Jj; Sun, 25 Jun 2023 18:40:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687718454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LLf6jNBqgcMSLGpOAl29S+nl/mMMomR/A0Vf+MyU6zo=; b=AVYSdwIlAoJnYSgTzUYLoPWC4Fl9IoI2sOS1AqQg1b2HthCS62ueC1uiJfID68cVOngdcC urppUh5KnLJGlmjYpN+Mx+Q6HTv+DzLauXibp5g7Y0LqY7zZVljXiYBnQg03zOZ5FAJ/UL NOmXmDAWef7D14kOP48Fg0uz5VmNlRB3YpKraml6Glg2qWzY/RkVCLQvUjRxW+G4p8sUlF /K++VEoSK49KmaJwt10pZSi0xqUM3+Hb95hr+CWGcO2xJ+N++XRl099u+6gZ7KnHvVbQYz 7SuWtuKIfkUJpC2iAZJZ93cKs1QXfnq4sp2Fi2WzKzXx6VTNyiVNtCiIMc2Xrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687718454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LLf6jNBqgcMSLGpOAl29S+nl/mMMomR/A0Vf+MyU6zo=; b=Epykar7rikksf5hwmTxRf8Goifubq+tg5xeW/xyaKWw1U5uSECT/z+7Eg3cVI4dlRA/1zY 3GphtugdcxW1l80VivpUTwxFNycRhhF0gLyO97O3tGw3Vh2Ie2nD7qD67IIJDQ77QLSouc EsMtmgCaUphAQqAbaV8c5yePJG9OWGczl9PCguFuYPbVZK7cv3EEWy1yJUA5aKs6pDNu85 PbrKXhwO99KslVZBnkqRJlx07YHWlR5fWohEqwsc8IfAyfF7HZa7/YdjQAW51erC8xi8SY uQk3VU1VznQdMFkXxJC8Rfbug4Xl47fQ2L3m8V4OO1EVcKOl6cYryPbpVlOyBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687718454; a=rsa-sha256; cv=none; b=mm8H1SBgqeaEf8vg9KI6rtZTdH6/7Qn002elUH1X93cCwox+5APDGwA8AOCVRMoNbzuvYf u0thrriXY078jhEmaggpWr6vj0PQifGKlIyz/VLshxg0Gl35TWv4WhP6PXnLYKxh3GAY1X g+FIPrDpzbkCsrnz8U3xHSHOMYP7S9vhJ2EF/MpcFvzvoUxC5sgb4OcYCBC4+SwHXZxfdl ewobcZcgkh9SnZrlisgxckAflIIPLcqFBZN1AQeNwLpZ4eZB5MaaYSKaOFF+NQzbha/WBC /0rige+AxPVUdwLK2eUR1WcluSmvWBj6RT1kOkw+5g3tKZ9DPLPdHnWvlgnW7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq0D64f5czf4L; Sun, 25 Jun 2023 18:40:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PIesLp051701; Sun, 25 Jun 2023 18:40:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PIesgh051700; Sun, 25 Jun 2023 18:40:54 GMT (envelope-from git) Date: Sun, 25 Jun 2023 18:40:54 GMT Message-Id: <202306251840.35PIesgh051700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 53380074a162 - stable/13 - ipmi: add Block Transfer interface 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: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53380074a162833e2fdca11908e702ea7b7541f2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=53380074a162833e2fdca11908e702ea7b7541f2 commit 53380074a162833e2fdca11908e702ea7b7541f2 Author: Andrey V. Elsukov AuthorDate: 2023-06-07 09:30:47 +0000 Commit: Andrey V. Elsukov CommitDate: 2023-06-25 18:34:28 +0000 ipmi: add Block Transfer interface support Reviewed by: ambrisko Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D40421 (cherry picked from commit 1f166509895dd90fcaaa08b557f9bc106e3f7e71) --- sys/conf/files.arm64 | 1 + sys/conf/files.x86 | 1 + sys/dev/ipmi/ipmi_acpi.c | 19 +-- sys/dev/ipmi/ipmi_bt.c | 296 +++++++++++++++++++++++++++++++++++++++++++++ sys/dev/ipmi/ipmi_isa.c | 19 +-- sys/dev/ipmi/ipmi_pci.c | 28 +++-- sys/dev/ipmi/ipmi_smbios.c | 1 + sys/dev/ipmi/ipmivars.h | 19 ++- sys/modules/ipmi/Makefile | 2 +- 9 files changed, 353 insertions(+), 33 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 6b96de28128d..df7bbe002f5c 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -259,6 +259,7 @@ dev/iicbus/twsi/twsi.c optional twsi fdt dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi +dev/ipmi/ipmi_bt.c optional ipmi dev/ipmi/ipmi_kcs.c optional ipmi dev/ipmi/ipmi_smic.c optional ipmi diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index 07ecb9fe1e01..bc7dbccaf16d 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -171,6 +171,7 @@ dev/iommu/iommu_gas.c optional acpi iommu pci dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi dev/ipmi/ipmi_isa.c optional ipmi isa +dev/ipmi/ipmi_bt.c optional ipmi dev/ipmi/ipmi_kcs.c optional ipmi dev/ipmi/ipmi_smic.c optional ipmi dev/ipmi/ipmi_smbus.c optional ipmi smbus diff --git a/sys/dev/ipmi/ipmi_acpi.c b/sys/dev/ipmi/ipmi_acpi.c index 7c34f49075af..9d92608e8f1d 100644 --- a/sys/dev/ipmi/ipmi_acpi.c +++ b/sys/dev/ipmi/ipmi_acpi.c @@ -95,16 +95,17 @@ ipmi_acpi_attach(device_t dev) switch (interface_type) { case KCS_MODE: - count = 2; + count = IPMI_IF_KCS_NRES; mode = "KCS"; break; case SMIC_MODE: - count = 3; + count = IPMI_IF_SMIC_NRES; mode = "SMIC"; break; case BT_MODE: - device_printf(dev, "BT interface not supported\n"); - return (ENXIO); + count = IPMI_IF_BT_NRES; + mode = "BT"; + break; case SSIF_MODE: if (ACPI_FAILURE(acpi_GetInteger(devh, "_ADR", &flags))) return (ENXIO); @@ -174,18 +175,20 @@ ipmi_acpi_attach(device_t dev) * We assume an alignment of 1 byte as currently the IPMI spec * doesn't provide any way to determine the alignment via ACPI. */ + error = ENXIO; switch (interface_type) { case KCS_MODE: error = ipmi_kcs_attach(sc); - if (error) - goto bad; break; case SMIC_MODE: error = ipmi_smic_attach(sc); - if (error) - goto bad; + break; + case BT_MODE: + error = ipmi_bt_attach(sc); break; } + if (error) + goto bad; error = ipmi_attach(dev); if (error) goto bad; diff --git a/sys/dev/ipmi/ipmi_bt.c b/sys/dev/ipmi/ipmi_bt.c new file mode 100644 index 000000000000..0f970d966731 --- /dev/null +++ b/sys/dev/ipmi/ipmi_bt.c @@ -0,0 +1,296 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Yandex LLC + * Copyright (c) 2023 Andrey V. Elsukov + * + * 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* + * BT interface + */ + +#define DMSG0(sc, fmt, ...) do { \ + device_printf((sc)->ipmi_dev, "BT: %s: " fmt "\n", \ + __func__, ## __VA_ARGS__); \ +} while (0) + +#define DMSGV(...) if (bootverbose) { \ + DMSG0(__VA_ARGS__); \ +} + +#ifdef IPMI_BT_DEBUG +#define DMSG(...) DMSG0(__VA_ARGS__) +#else +#define DMSG(...) +#endif + +#define BT_IO_BASE 0xe4 + +#define BT_CTRL_REG 0 +#define BT_C_CLR_WR_PTR (1L << 0) +#define BT_C_CLR_RD_PTR (1L << 1) +#define BT_C_H2B_ATN (1L << 2) +#define BT_C_B2H_ATN (1L << 3) +#define BT_C_SMS_ATN (1L << 4) +#define BT_C_OEM0 (1L << 5) +#define BT_C_H_BUSY (1L << 6) +#define BT_C_B_BUSY (1L << 7) + +#define BT_CTRL_BITS "\20\01CLR_WR_PTR\02CLR_RD_PTR\03H2B_ATN\04B2H_ATN"\ + "\05SMS_ATN\06OEM0\07H_BUSY\010B_BUSY" + +#define BT_DATA_REG 1 +#define BTMSG_REQLEN 3 +#define BTMSG_REPLEN 4 + +#define BT_INTMASK_REG 2 +#define BT_IM_B2H_IRQ_EN (1L << 0) +#define BT_IM_B2H_IRQ (1L << 1) +#define BT_IM_BMC_HWRST (1L << 7) + +static int bt_polled_request(struct ipmi_softc *, struct ipmi_request *); +static int bt_driver_request(struct ipmi_softc *, struct ipmi_request *, int); +static int bt_wait(struct ipmi_softc *, uint8_t, uint8_t); +static int bt_reset(struct ipmi_softc *); + +static void bt_loop(void *); +static int bt_startup(struct ipmi_softc *); + +#define BT_DELAY_MIN 1 +#define BT_DELAY_MAX 256 + +static int +bt_wait(struct ipmi_softc *sc, uint8_t mask, uint8_t wanted) +{ + volatile uint8_t value; + int delay = BT_DELAY_MIN; + int count = 20000; /* about 5 seconds */ + + while (count--) { + value = INB(sc, BT_CTRL_REG); + if ((value & mask) == wanted) + return (value); + /* + * The wait delay is increased exponentially to avoid putting + * significant load on I/O bus. + */ + DELAY(delay); + if (delay < BT_DELAY_MAX) + delay <<= 1; + } + DMSGV(sc, "failed: m=%b w=%b v=0x%02x\n", + mask, BT_CTRL_BITS, wanted, BT_CTRL_BITS, value); + return (-1); + +} + +static int +bt_reset(struct ipmi_softc *sc) +{ + uint8_t v; + + v = INB(sc, BT_CTRL_REG); + DMSG(sc, "ctrl: %b", v, BT_CTRL_BITS); + v &= BT_C_H_BUSY; /* clear H_BUSY iff it set */ + v |= BT_C_CLR_WR_PTR | BT_C_CLR_RD_PTR | BT_C_B2H_ATN | BT_C_H2B_ATN; + + bt_wait(sc, BT_C_B_BUSY, 0); + OUTB(sc, BT_CTRL_REG, v); + + v = BT_IM_B2H_IRQ | BT_IM_BMC_HWRST; + OUTB(sc, BT_INTMASK_REG, v); + + return (0); +} + +/* + * Send a request message and collect the reply. Returns 1 if we + * succeed. + */ +static int +bt_polled_request(struct ipmi_softc *sc, struct ipmi_request *req) +{ + uint8_t addr, cmd, seq, v; + int i; + + IPMI_IO_LOCK(sc); + + /* + * Send the request: + * + * Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5:N + * -------+-----------+--------+--------+--------- + * Length | NetFn/LUN | Seq | Cmd | Data + */ + + if (bt_wait(sc, BT_C_B_BUSY | BT_C_H2B_ATN, 0) < 0) { + DMSG(sc, "failed to start write transfer"); + goto fail; + } + DMSG(sc, "request: length=%d, addr=0x%02x, seq=%u, cmd=0x%02x", + (int)req->ir_requestlen, req->ir_addr, sc->ipmi_bt_seq, req->ir_command); + OUTB(sc, BT_CTRL_REG, BT_C_CLR_WR_PTR); + OUTB(sc, BT_DATA_REG, req->ir_requestlen + BTMSG_REQLEN); + OUTB(sc, BT_DATA_REG, req->ir_addr); + OUTB(sc, BT_DATA_REG, sc->ipmi_bt_seq); + OUTB(sc, BT_DATA_REG, req->ir_command); + for (i = 0; i < req->ir_requestlen; i++) + OUTB(sc, BT_DATA_REG, req->ir_request[i]); + OUTB(sc, BT_CTRL_REG, BT_C_H2B_ATN); + + if (bt_wait(sc, BT_C_B_BUSY | BT_C_H2B_ATN, 0) < 0) { + DMSG(sc, "failed to finish write transfer"); + goto fail; + } + + /* + * Read the reply: + * + * Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6:N + * -------+-----------+--------+--------+-----------------+--------- + * Length | NetFn/LUN | Seq | Cmd | Completion code | Data + */ + if (bt_wait(sc, BT_C_B2H_ATN, BT_C_B2H_ATN) < 0) { + DMSG(sc, "got no reply from BMC"); + goto fail; + } + OUTB(sc, BT_CTRL_REG, BT_C_H_BUSY); + OUTB(sc, BT_CTRL_REG, BT_C_B2H_ATN); + OUTB(sc, BT_CTRL_REG, BT_C_CLR_RD_PTR); + + i = INB(sc, BT_DATA_REG); + if (i < BTMSG_REPLEN) { + DMSG(sc, "wrong data length: %d", i); + goto fail; + } + req->ir_replylen = i - BTMSG_REPLEN; + DMSG(sc, "data length: %d, frame length: %d", req->ir_replylen, i); + + addr = INB(sc, BT_DATA_REG); + if (addr != IPMI_REPLY_ADDR(req->ir_addr)) { + DMSGV(sc, "address doesn't match: addr=0x%02x vs. 0x%02x", + req->ir_addr, addr); + } + + seq = INB(sc, BT_DATA_REG); + if (seq != sc->ipmi_bt_seq) { + DMSGV(sc, "seq number doesn't match: seq=0x%02x vs. 0x%02x", + sc->ipmi_bt_seq, seq); + } + + cmd = INB(sc, BT_DATA_REG); + if (cmd != req->ir_command) { + DMSGV(sc, "command doesn't match: cmd=0x%02x vs. 0x%02x", + req->ir_command, cmd); + } + + req->ir_compcode = INB(sc, BT_DATA_REG); + for (i = 0; i < req->ir_replylen; i++) { + v = INB(sc, BT_DATA_REG); + if (i < req->ir_replybuflen) + req->ir_reply[i] = v; + } + + OUTB(sc, BT_CTRL_REG, BT_C_H_BUSY); + IPMI_IO_UNLOCK(sc); + DMSG(sc, "reply: length=%d, addr=0x%02x, seq=%u, cmd=0x%02x, code=0x%02x", + (int)req->ir_replylen, addr, seq, req->ir_command, req->ir_compcode); + return (1); +fail: + bt_reset(sc); + IPMI_IO_UNLOCK(sc); + return (0); +} + +static void +bt_loop(void *arg) +{ + struct ipmi_softc *sc = arg; + struct ipmi_request *req; + + IPMI_LOCK(sc); + while ((req = ipmi_dequeue_request(sc)) != NULL) { + IPMI_UNLOCK(sc); + (void)bt_driver_request(sc, req, 0); + IPMI_LOCK(sc); + sc->ipmi_bt_seq++; + ipmi_complete_request(sc, req); + } + IPMI_UNLOCK(sc); + kproc_exit(0); +} + +static int +bt_startup(struct ipmi_softc *sc) +{ + + return (kproc_create(bt_loop, sc, &sc->ipmi_kthread, 0, 0, "%s: bt", + device_get_nameunit(sc->ipmi_dev))); +} + +static int +bt_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo __unused) +{ + int i, ok; + + ok = 0; + for (i = 0; i < 3 && !ok; i++) + ok = bt_polled_request(sc, req); + if (ok) + req->ir_error = 0; + else + req->ir_error = EIO; + return (req->ir_error); +} + +int +ipmi_bt_attach(struct ipmi_softc *sc) +{ + /* Setup function pointers. */ + sc->ipmi_startup = bt_startup; + sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; + sc->ipmi_driver_request = bt_driver_request; + sc->ipmi_driver_requests_polled = 1; + sc->ipmi_bt_seq = 1; + + return (bt_reset(sc)); +} diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c index de21b59692e1..9abe697c23fc 100644 --- a/sys/dev/ipmi/ipmi_isa.c +++ b/sys/dev/ipmi/ipmi_isa.c @@ -188,16 +188,17 @@ ipmi_isa_attach(device_t dev) switch (info.iface_type) { case KCS_MODE: - count = 2; + count = IPMI_IF_KCS_NRES; mode = "KCS"; break; case SMIC_MODE: - count = 3; + count = IPMI_IF_SMIC_NRES; mode = "SMIC"; break; case BT_MODE: - device_printf(dev, "BT mode is unsupported\n"); - return (ENXIO); + count = IPMI_IF_BT_NRES; + mode = "BT"; + break; default: return (ENXIO); } @@ -248,19 +249,21 @@ ipmi_isa_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); } + error = ENXIO; switch (info.iface_type) { case KCS_MODE: error = ipmi_kcs_attach(sc); - if (error) - goto bad; break; case SMIC_MODE: error = ipmi_smic_attach(sc); - if (error) - goto bad; + break; + case BT_MODE: + error = ipmi_bt_attach(sc); break; } + if (error) + goto bad; error = ipmi_attach(dev); if (error) goto bad; diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c index 13ac4f4b5ede..76b9832c8db1 100644 --- a/sys/dev/ipmi/ipmi_pci.c +++ b/sys/dev/ipmi/ipmi_pci.c @@ -112,8 +112,8 @@ ipmi_pci_attach(device_t dev) mode = "SMIC"; break; case BT_MODE: - device_printf(dev, "BT mode is unsupported\n"); - return (ENXIO); + mode = "BT"; + break; default: device_printf(dev, "No IPMI interface found\n"); return (ENXIO); @@ -143,18 +143,20 @@ ipmi_pci_attach(device_t dev) sc->ipmi_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->ipmi_irq_rid, RF_SHAREABLE | RF_ACTIVE); + error = ENXIO; switch (info.iface_type) { case KCS_MODE: error = ipmi_kcs_attach(sc); - if (error) - goto bad; break; case SMIC_MODE: error = ipmi_smic_attach(sc); - if (error) - goto bad; + break; + case BT_MODE: + error = ipmi_bt_attach(sc); break; } + if (error) + goto bad; error = ipmi_attach(dev); if (error) goto bad; @@ -215,8 +217,7 @@ ipmi2_pci_attach(device_t dev) break; case PCIP_SERIALBUS_IPMI_BT: iface = BT_MODE; - device_printf(dev, "BT interface unsupported\n"); - return (ENXIO); + break; default: device_printf(dev, "Unsupported interface: %d\n", pci_get_progif(dev)); @@ -242,6 +243,7 @@ ipmi2_pci_attach(device_t dev) sc->ipmi_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->ipmi_irq_rid, RF_SHAREABLE | RF_ACTIVE); + error = ENXIO; switch (iface) { case KCS_MODE: device_printf(dev, "using KSC interface\n"); @@ -252,7 +254,6 @@ ipmi2_pci_attach(device_t dev) */ if (!ipmi_kcs_probe_align(sc)) { device_printf(dev, "Unable to determine alignment\n"); - error = ENXIO; goto bad; } @@ -262,12 +263,15 @@ ipmi2_pci_attach(device_t dev) break; case SMIC_MODE: device_printf(dev, "using SMIC interface\n"); - error = ipmi_smic_attach(sc); - if (error) - goto bad; + break; + case BT_MODE: + device_printf(dev, "using BT interface\n"); + error = ipmi_bt_attach(sc); break; } + if (error) + goto bad; error = ipmi_attach(dev); if (error) goto bad; diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c index e26b6f2956ad..7917464d7d32 100644 --- a/sys/dev/ipmi/ipmi_smbios.c +++ b/sys/dev/ipmi/ipmi_smbios.c @@ -104,6 +104,7 @@ smbios_ipmi_info(struct smbios_structure_header *h, void *arg) switch (s->interface_type) { case KCS_MODE: case SMIC_MODE: + case BT_MODE: info->address = IPMI_BAR_ADDR(s->base_address) | IPMI_BAM_ADDR_LSB(s->base_address_modifier); info->io_mode = IPMI_BAR_MODE(s->base_address); diff --git a/sys/dev/ipmi/ipmivars.h b/sys/dev/ipmi/ipmivars.h index 8c6a716adb9c..73b1073e5e16 100644 --- a/sys/dev/ipmi/ipmivars.h +++ b/sys/dev/ipmi/ipmivars.h @@ -59,6 +59,10 @@ struct ipmi_request { uint8_t ir_ipmb_command; }; +#define IPMI_IF_KCS_NRES 2 +#define IPMI_IF_SMIC_NRES 3 +#define IPMI_IF_BT_NRES 3 + #define MAX_RES 3 #define KCS_DATA 0 #define KCS_CTL_STS 1 @@ -80,6 +84,10 @@ struct ipmi_device { u_char ipmi_lun; }; +struct ipmi_bt { + uint8_t seq; +}; + struct ipmi_kcs { }; @@ -94,6 +102,7 @@ struct ipmi_ssif { struct ipmi_softc { device_t ipmi_dev; union { + struct ipmi_bt bt; struct ipmi_kcs kcs; struct ipmi_smic smic; struct ipmi_ssif ssif; @@ -130,11 +139,12 @@ struct ipmi_softc { #define ipmi_ssif_smbus_address _iface.ssif.smbus_address #define ipmi_ssif_smbus _iface.ssif.smbus +#define ipmi_bt_seq _iface.bt.seq -#define KCS_MODE 0x01 -#define SMIC_MODE 0x02 -#define BT_MODE 0x03 -#define SSIF_MODE 0x04 +#define KCS_MODE 0x01 +#define SMIC_MODE 0x02 +#define BT_MODE 0x03 +#define SSIF_MODE 0x04 /* KCS status flags */ #define KCS_STATUS_OBF 0x01 /* Data Out ready from BMC */ @@ -250,6 +260,7 @@ const char *ipmi_pci_match(uint16_t, uint16_t); int ipmi_kcs_attach(struct ipmi_softc *); int ipmi_kcs_probe_align(struct ipmi_softc *); int ipmi_smic_attach(struct ipmi_softc *); +int ipmi_bt_attach(struct ipmi_softc *); int ipmi_ssif_attach(struct ipmi_softc *, device_t, int); extern devclass_t ipmi_devclass; diff --git a/sys/modules/ipmi/Makefile b/sys/modules/ipmi/Makefile index 733ac6f30222..3d0414fc3807 100644 --- a/sys/modules/ipmi/Makefile +++ b/sys/modules/ipmi/Makefile @@ -10,7 +10,7 @@ SRCS+= bus_if.h device_if.h .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "aarch64" -SRCS+= ipmi_kcs.c ipmi_smic.c +SRCS+= ipmi_kcs.c ipmi_smic.c ipmi_bt.c SRCS+= ipmi_acpi.c SRCS+= opt_acpi.h SRCS+= acpi_if.h From nobody Sun Jun 25 19:25: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 4Qq1C71dXYz4hJpd; Sun, 25 Jun 2023 19: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 4Qq1C64Qwnz4PS4; Sun, 25 Jun 2023 19: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=1687721106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TuaXRjf4v+0F7ZSV1Z7CrI00ZQYdDlsWKpiU2rBXuQY=; b=nsjs3CCwaVPVI5a115EXGa8/mFl3G+vNT9znR2ye3VXQsw9MEWN0+RgdXft+FD6lD+4MCR nd0L35q0q80zq9sWLGZhnuv3W8co8cqweJnF+isrN6/qAcu8KxFD+oeaVYUwBFbeuLPRgq zK2bivaSu8y7TFZ3sLEP2DTH0+JmYZ8YqSSquRu4INmobJaM46/LGnU1b1KJ/jpeBauyyN v+EjzHc7mJ8sSabeNSUcgva9HWlSyCfAGKXU2GyTOUEuUe3r260VmdfVvUt85LdyhGETDC AeY/+LaOZ4MZwahJo3UNeQij0aQxLEi7RE3Qio0Dc+zN19V5t2hbcTWSxkqd+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TuaXRjf4v+0F7ZSV1Z7CrI00ZQYdDlsWKpiU2rBXuQY=; b=U9zhDrZ0An5/qE9BOA1+CsDW4BKRC0L4p1RltSYDlsaRZ0FlixUhI5b9Y56kHvsO90aEz1 r9eVtJjuhhLmQKU4FX678hvk9DTXzYwJGS2zFj3lch9dWly/fnGi1FFXcT4peYfw2AkFxM 6905Dh3cF1sLRlLug+jkTH6MXRWBAfa9nkrkFEs8PAnaelWCxNluLxSISzqKAzF3BP7u59 Yi+AMMLFKDfa7k+K31DWsjvSJcf9/3UQFJZNxXT/n2gjcNrdDa/Ail8Xq7SZztWJFeBMrP 7lANwZo5tySGw/kpaqiPdNJWabqTUrBT6EFxN0rIlUHn4U64vTuNs9Tw0MJMhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721106; a=rsa-sha256; cv=none; b=IeIQHWn3DnD3sBgT/j2GWC40I4oToL+vBCQVj0slZPD4g9uZw5V0dHNvoQOtgWaix2rIqF 1pyaOizoFMX3pXdky1ha8jXIcc+/Ya+i5XZ2MnBu96ZKoIdsSqpBWJcOOQsSNfuWWPXEP7 3G1loJYAI2p6oR8YLg5UIClDVNPjslgnjEK7HlO1UgeQQ7Yfvk37rQWmJa3HcyXco5bwPX kgjiA200NM2kOwapcBNkgRvfXthmNdj5eG0CpjWDxvn2MlAV0hfqWwcA351UT0EEYNcGvi oEqFIeSPm7WgfELiX5qwhrbXK9AqS3cDfNGSFQ/4hr4I7JXrKekONY0rA4Wy9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1C63VCbzg01; Sun, 25 Jun 2023 19:25:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJP6CR024424; Sun, 25 Jun 2023 19:25:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJP61e024419; Sun, 25 Jun 2023 19:25:06 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:25:06 GMT Message-Id: <202306251925.35PJP61e024419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: a820d8fa71e8 - stable/13 - sctp: fix man page for socket option controlling delayed acks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: a820d8fa71e8f17a0bfc399b6716f42f077dfcce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=a820d8fa71e8f17a0bfc399b6716f42f077dfcce commit a820d8fa71e8f17a0bfc399b6716f42f077dfcce Author: Michael Tuexen AuthorDate: 2023-06-21 07:03:30 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:24:46 +0000 sctp: fix man page for socket option controlling delayed acks The SCTP_DELAYED_ACK_TIME socket option was replaced by the SCTP_DELAYED_SACK in the socket API specification in draft-ietf-tsvwg-sctpsocket-14. The code was updated in r170056, but the man page was not. PR: 272124 (cherry picked from commit 133b132bc1b612abe591c8f54680c3da8491e194) --- share/man/man4/sctp.4 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/share/man/man4/sctp.4 b/share/man/man4/sctp.4 index 2c47c5b5dcd3..daac5638ee46 100644 --- a/share/man/man4/sctp.4 +++ b/share/man/man4/sctp.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2020 +.Dd June 21, 2023 .Dt SCTP 4 .Os .Sh NAME @@ -299,12 +299,13 @@ This option lets the caller set it to a smaller value. Note that while the user can change this value, if the P-MTU is smaller than the value set by the user, then the P-MTU value will override any user setting. -.It Dv SCTP_DELAYED_ACK_TIME +.It Dv SCTP_DELAYED_SACK This option lets the user both set and get the -delayed ack time (in milliseconds) that +delayed ack time (in milliseconds) and the ack frequency that .Tn SCTP is using. -The default is 200 milliseconds. +The default delayed ack time is 200 milliseconds and the default +ack frequency is 2. .It Dv SCTP_PARTIAL_DELIVERY_POINT .Tn SCTP at times may need to start delivery of a From nobody Sun Jun 25 19:26: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 4Qq1DM4NHmz4hK24; Sun, 25 Jun 2023 19:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qq1DM1Hrwz4QNN; Sun, 25 Jun 2023 19:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O87euG63Rn7IIxiZjl3+g9DAnpc97V09JvmkTBSoQU0=; b=rHXRsN64lLaV2amQIpS4qcS2JMgFzsucooD4MwCDDcPuUWFueJwh0VCMkjYzfYWw42DZkX 8/Rfsu3w9BOk8o0fH1vB9HgEYtvFqNnKkbPYdt3EKjuXFp3NBO38fEFmctfc6PhMAiFQxq ne+lFzirwmZVCPbP8CKISKNuIDZZr7VNeLVjyoydJDx+JGqOW6YkLdFnuT+lACgU9ArCbR Ov57ORC1898aPPLIbvgPEVCu6DmSxbvHRoOzHfUp+ZbCc2Oj1vfbL5lho5TTWYVgzekXxb MS18xXVQFhnLNgIogkT/GOkf+14m67IPnmJZZ68t35Kbd7U/X2qNA9gzZUpsGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O87euG63Rn7IIxiZjl3+g9DAnpc97V09JvmkTBSoQU0=; b=FTJDzZ35fYO3/q5uQaT61vaGn+744bsL49K6KY2QJ5HGYFIZVg90daN3SGdl/mRXWjU9y2 u/xy7L+3BcWXp6JdthWbo/xEJpoGtsq5DaZagm/TPenGIF56qC+apdP5S6GRhxuBuLo3t7 WVugKTYvEvpponTHtMsT6eyDAJLRftaTAqHHwScIqtaCn7GywwTvmOkfyXt2mIeJxznDYC HuuEWIBtLml/txClLz4NUUSz/xkTFaxo6aHpr6QK5aApAW7wb7Z6sx1Qx7uROQElpd+iHf zDfha+Hqzj6RoIA4px0us6s3RnacRtyleUaUBxLjTWuia2FsltJHb5q6ZtJcrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721171; a=rsa-sha256; cv=none; b=HPCS5cZJP3FPof0p2ZBveuTbPlwTH2uBxamR7MEHl8jsx06AknuPQ16qPX5b5wm3+Jvyrq GNBQ5YA8F4i1c51YKX9MTU+RTjTIZDjTt0LOjBD1shBbhy8Iei5VknmIpLwdtal95MKDte OQcJ7SPlZl3tGXLr1Ik6P0LFPcaqkMV37LSsg7JKBnPJ5YkuOV/hv5r+vCuvJgDHS3Zdbn VoOPHPa8X/hCAxgh3VhrzgWvIXyiBHjIODL1frfwRR8tqLNC9DxB5m4trbxWP99wt3ozl5 Y/939xI/+VN3/ZGQCfvQx+oNjLYY7JmSCKq10rFnyvKvESGJEOPng0M0aGmpKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1DL6BFbzfSR; Sun, 25 Jun 2023 19:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJQANc024796; Sun, 25 Jun 2023 19:26:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJQAoi024795; Sun, 25 Jun 2023 19:26:10 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:26:10 GMT Message-Id: <202306251926.35PJQAoi024795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 081ecd9cf028 - stable/13 - tcp: fix TCP MD5 digest computation for TCP over UDP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 081ecd9cf0285a2f094be42792c7bea45bbc72ed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=081ecd9cf0285a2f094be42792c7bea45bbc72ed commit 081ecd9cf0285a2f094be42792c7bea45bbc72ed Author: Michael Tuexen AuthorDate: 2023-06-21 20:48:12 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:25:37 +0000 tcp: fix TCP MD5 digest computation for TCP over UDP Skip the UDP header for the computation. This is similar to skipping IPv6 extension headers. Reviewed by: cc, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40596 (cherry picked from commit 0fb0711dba76a32a2202d2f41d64aa1247b5e51d) --- sys/netipsec/xform_tcp.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/netipsec/xform_tcp.c b/sys/netipsec/xform_tcp.c index ce2552f0a205..e9513d5476d0 100644 --- a/sys/netipsec/xform_tcp.c +++ b/sys/netipsec/xform_tcp.c @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -136,15 +137,20 @@ ip_pseudo_compute(struct mbuf *m, MD5_CTX *ctx) { struct ippseudo ipp; struct ip *ip; + int hdr_len; ip = mtod(m, struct ip *); ipp.ippseudo_src.s_addr = ip->ip_src.s_addr; ipp.ippseudo_dst.s_addr = ip->ip_dst.s_addr; ipp.ippseudo_p = IPPROTO_TCP; ipp.ippseudo_pad = 0; - ipp.ippseudo_len = htons(m->m_pkthdr.len - (ip->ip_hl << 2)); + hdr_len = ip->ip_hl << 2; + if (ip->ip_p == IPPROTO_UDP) + /* TCP over UDP */ + hdr_len += sizeof(struct udphdr); + ipp.ippseudo_len = htons(m->m_pkthdr.len - hdr_len); MD5Update(ctx, (char *)&ipp, sizeof(ipp)); - return (ip->ip_hl << 2); + return (hdr_len); } #endif @@ -158,14 +164,20 @@ ip6_pseudo_compute(struct mbuf *m, MD5_CTX *ctx) uint32_t nxt; } ip6p __aligned(4); struct ip6_hdr *ip6; + int hdr_len; ip6 = mtod(m, struct ip6_hdr *); ip6p.src = ip6->ip6_src; ip6p.dst = ip6->ip6_dst; - ip6p.len = htonl(m->m_pkthdr.len - sizeof(*ip6)); /* XXX: ext headers */ + hdr_len = sizeof(struct ip6_hdr); + if (ip6->ip6_nxt == IPPROTO_UDP) + /* TCP over UDP */ + hdr_len += sizeof(struct udphdr); + /* XXX: ext headers */ + ip6p.len = htonl(m->m_pkthdr.len - hdr_len); ip6p.nxt = htonl(IPPROTO_TCP); MD5Update(ctx, (char *)&ip6p, sizeof(ip6p)); - return (sizeof(*ip6)); + return (hdr_len); } #endif From nobody Sun Jun 25 19:26: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 4Qq1FD2tfvz4hL9r; Sun, 25 Jun 2023 19:26: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 4Qq1FD1LSlz3C9h; Sun, 25 Jun 2023 19:26:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NGD8Ye4taEk6Ijvv3zFs4a//O1uCk13/Jo4ZyET+B+U=; b=C/vk+nwheixdXdUj+IVYRK/BNpCd8jcxitsq6E5ZLsGEpzqpUDtvs39tjYR0JvaNweFsCP /SxAk80r+ileoy9McZelmnoYT8Np63A7so7VlZJbIRBMNRNLkIZ7dbbv8grSeaQ7aG0Jzh GUjW+9CrlW3d0hyzjqt+L6HgsOctsQEKRM5mGJDibHucIudcDVciYtXxiXaa7T+aIb28c2 Fq7D6K8BlihM6V4EFZekmgcnj7k74cASSiKCgS77x55KeAzNhssSY5Aa65iJZ0D8Xfo3Rf +qYPDrFNIkSa8Mm8Zfy24Sa3SszsNBBMdSXWD21rXJqkqpNvDsE+KE7N1frxYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NGD8Ye4taEk6Ijvv3zFs4a//O1uCk13/Jo4ZyET+B+U=; b=QVN9xMw5T607m8W2hBDfIMQhQqdLgrT4em6Omnx2ldkuV4nNsKnIcZsF+VleCrF/sekto1 XyTKUa8GSEpTiZF3HhEI255jt0alADuBqCvYp5lwycJfBXTnzci3MioY48B7glt0piHfZ9 Js/KOgfYXJ3b4FGYICjThnM+9DV3J1czOTlVWiz9MgvqC6g7p2AGOZBizPTT17HHJxhQeo 0xzwyC9li6qXBM2O2BuNyU8FmdAC+A/cFvhYTEd5JIYDHOeKNwTovc4Ucflg57rcAW49rh S4Nih6MJCClOC2qoviLYCL/gscDhPMlqGpwh9WILw9KkVnjBAd47JzyibcjLQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721216; a=rsa-sha256; cv=none; b=KLer3+1DNAogDXZTCGMnz08k5P6tr3EgnUmJ2Gx9LVxf5aQ8TSRTJH4GnP1Ofl/v4FxRm0 d1S10mPICQA3Zkk+4nM9vb/YnGqJ7cYl6om6OvyojaSRIPQRRVp/tX9+ugF1AOTQ9Mfg30 zR6iSTjMcxYUpxnUCjZ95vTJFCJNlpfHoDA4LXpc0HNXdrKDfQA0rY52WdtMl8W37kPQWP 6irUbSur8eLq7vrRAvypWxx+8mRw5bfcgMPBsh3cUE3SdlNHClUd7X3yoawVWSjNsw2JTF +r52W/BQOWLyXl+oPoH0Eo297N0atD6BLr1lE0HgKy9kkuymn4rON2RoGrlwjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1FC6MqNzg7n; Sun, 25 Jun 2023 19:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJQtxD024983; Sun, 25 Jun 2023 19:26:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJQteT024982; Sun, 25 Jun 2023 19:26:55 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:26:55 GMT Message-Id: <202306251926.35PJQteT024982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: edff1d344c6b - stable/13 - tcp: fix TCP MD5 computation for the BBR and RACK stack List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: edff1d344c6bf8f3de2ba1e36b2807fd6d1e7ea8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=edff1d344c6bf8f3de2ba1e36b2807fd6d1e7ea8 commit edff1d344c6bf8f3de2ba1e36b2807fd6d1e7ea8 Author: Michael Tuexen AuthorDate: 2023-06-21 20:54:33 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:26:32 +0000 tcp: fix TCP MD5 computation for the BBR and RACK stack PR: 253096 Reviewed by: cc, rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40597 (cherry picked from commit 02b885b09d1e90574162a1442b9ede06cef2b13a) --- sys/netinet/tcp_stacks/bbr.c | 10 +++---- sys/netinet/tcp_stacks/rack.c | 66 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 61 insertions(+), 15 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 1b4abfb6f5c4..e0cf524c49ea 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -13501,6 +13501,11 @@ send: * the pointer in case of a stack switch. */ tp->snd_up = tp->snd_una; + /* + * Put TCP length in extended header, and then checksum extended + * header and data. + */ + m->m_pkthdr.len = hdrlen + len; /* in6_cksum() need this */ #if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) if (to.to_flags & TOF_SIGNATURE) { @@ -13520,11 +13525,6 @@ send: } #endif - /* - * Put TCP length in extended header, and then checksum extended - * header and data. - */ - m->m_pkthdr.len = hdrlen + len; /* in6_cksum() need this */ #ifdef INET6 if (isipv6) { /* diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index ead81528ace5..09a1b3ee6464 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -15265,6 +15265,11 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma to.to_tsecr = tp->ts_recent; to.to_flags = TOF_TS; } +#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) + /* TCP-MD5 (RFC2385). */ + if (tp->t_flags & TF_SIGNATURE) + to.to_flags |= TOF_SIGNATURE; +#endif optlen = tcp_addoptions(&to, opt); hdrlen += optlen; udp = rack->r_ctl.fsb.udp; @@ -15397,6 +15402,24 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma } m->m_pkthdr.rcvif = (struct ifnet *)0; m->m_pkthdr.len = hdrlen + len; /* in6_cksum() need this */ +#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) + if (to.to_flags & TOF_SIGNATURE) { + /* + * Calculate MD5 signature and put it into the place + * determined before. + * NOTE: since TCP options buffer doesn't point into + * mbuf's data, calculate offset and use it. + */ + if (!TCPMD5_ENABLED() || TCPMD5_OUTPUT(m, th, + (u_char *)(th + 1) + (to.to_signature - opt)) != 0) { + /* + * Do not send segment if the calculation of MD5 + * digest has failed. + */ + goto failed; + } + } +#endif #ifdef INET6 if (rack->r_is_v6) { if (tp->t_port) { @@ -15734,6 +15757,11 @@ rack_fast_output(struct tcpcb *tp, struct tcp_rack *rack, uint64_t ts_val, to.to_tsecr = tp->ts_recent; to.to_flags = TOF_TS; } +#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) + /* TCP-MD5 (RFC2385). */ + if (tp->t_flags & TF_SIGNATURE) + to.to_flags |= TOF_SIGNATURE; +#endif optlen = tcp_addoptions(&to, opt); hdrlen += optlen; udp = rack->r_ctl.fsb.udp; @@ -15880,6 +15908,24 @@ again: flags |= TH_ECE; } m->m_pkthdr.len = hdrlen + len; /* in6_cksum() need this */ +#if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) + if (to.to_flags & TOF_SIGNATURE) { + /* + * Calculate MD5 signature and put it into the place + * determined before. + * NOTE: since TCP options buffer doesn't point into + * mbuf's data, calculate offset and use it. + */ + if (!TCPMD5_ENABLED() || TCPMD5_OUTPUT(m, th, + (u_char *)(th + 1) + (to.to_signature - opt)) != 0) { + /* + * Do not send segment if the calculation of MD5 + * digest has failed. + */ + goto failed; + } + } +#endif #ifdef INET6 if (rack->r_is_v6) { if (tp->t_port) { @@ -17521,7 +17567,7 @@ send: /* TCP-MD5 (RFC2385). */ if (tp->t_flags & TF_SIGNATURE) to.to_flags |= TOF_SIGNATURE; -#endif /* TCP_SIGNATURE */ +#endif /* Processing the options. */ hdrlen += optlen = tcp_addoptions(&to, opt); @@ -18047,6 +18093,15 @@ send: if (udp) udp = (struct udphdr *)(cpto + ((uint8_t *)rack->r_ctl.fsb.udp - rack->r_ctl.fsb.tcp_ip_hdr)); } + if (optlen) { + bcopy(opt, th + 1, optlen); + th->th_off = (sizeof(struct tcphdr) + optlen) >> 2; + } + /* + * Put TCP length in extended header, and then checksum extended + * header and data. + */ + m->m_pkthdr.len = hdrlen + len; /* in6_cksum() need this */ #if defined(IPSEC_SUPPORT) || defined(TCP_SIGNATURE) if (to.to_flags & TOF_SIGNATURE) { /* @@ -18065,15 +18120,6 @@ send: } } #endif - if (optlen) { - bcopy(opt, th + 1, optlen); - th->th_off = (sizeof(struct tcphdr) + optlen) >> 2; - } - /* - * Put TCP length in extended header, and then checksum extended - * header and data. - */ - m->m_pkthdr.len = hdrlen + len; /* in6_cksum() need this */ #ifdef INET6 if (isipv6) { /* From nobody Sun Jun 25 19: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 4Qq1PY335lz4hSwR; Sun, 25 Jun 2023 19:34: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 4Qq1PY2c46z3GGm; Sun, 25 Jun 2023 19:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gmMuzWmBc+vXgbjLtrhV+oOpoT5Nom6pUtjPG9SGbk=; b=S50H1Aihr5xizUI+qIPQCQWP5xXLGoe7RF3GotwL6s3kf0Ns7ojq4+4arPFugEJscNFgxI lgQkjNRMNkMfWeWI8zLiq+C9JN/d2AmBzLfBw1oHnYHWL+MP0Ni71IJHyqyq8L2uCQ80mi o0aA5p7cMbQMGhacanAlPq8TNVvpSCUTeQxXCUoTy4+hk/4XmoVubQhNkZDOWpWdzajY+V aPX7ftZYuFErbNDZBnL8W/SN4eeoueQuFMYnB8gEpkFdXKWDi8vtwnGu0G9JnxEfesX/nl PhtHYgpAPoosJRPrSVztlqtavaQ09SfxgxqZVscmlM/rRtjqGtZPH+xWntX/EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2gmMuzWmBc+vXgbjLtrhV+oOpoT5Nom6pUtjPG9SGbk=; b=tyUNI+ORVrLkUUD7h3WOKgArpDewYkTWAqSn1miDwFQsB00XxYt58kfTSH3RDmowpkxmf2 vK7jSOFnSbCA63VyuM7F8frL6NNDnncPNXwiQQT53AAT3Li6NScsAprgcmukeIEbeTozx0 lRKIvlm81siMAYtpUJLsJqDkvmj7vLrK3oghZ2KjUEGVXWKozzNqDeHQKELrzleRDUAtoE T2+0u8zDajRPBkp/41V+yUZS8vWonAMJ928wIcILwoe6pyzrJXLeK07FSnm//qOcj8m4+4 WD25DLRFDNpR+5h45veyfNX4CLmyoDApLCAQqQmCPN66MNEewWzyL6qacjk5sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721649; a=rsa-sha256; cv=none; b=SJm6imWWJF/2N3SXj+oLN0vaqoyddc0L2k9HNFspZMiRTvnyY13vXMGTV2DbuF2xb9aykR mJHZWQZUU2O0FkF81lgyl39W9PdIoCSfkK0K6HvcvbJKPZkP5RD/F1O2Hspe6epYRYuYNi PYLMVyD44LzDahKKYC6WaxPjRI1GdJY3qPqXZcG+UiIJM2+E5tchZmdoKYQNoykCr0Ika3 5OWcy2s5gFuI3nOqYNZg3h8C9H16JPcuT0n3TbY0v3FVRmQJ6hmM3//osNaAC+GoMRVH7M /rChe1TmKDWR1AaNdKHLPFqrXdsFZoE8qJMZjamMxpNJM5/fmz9cBVBqdXysDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1PY1KD0zfT0; Sun, 25 Jun 2023 19:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJY8D6041289; Sun, 25 Jun 2023 19:34:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJY86S041288; Sun, 25 Jun 2023 19:34:08 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:34:08 GMT Message-Id: <202306251934.35PJY86S041288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 180136462aa9 - stable/13 - sctp: don't do RTT measurements with cookies List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 180136462aa9c941dcfffcf3abee8f452f1565c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=180136462aa9c941dcfffcf3abee8f452f1565c8 commit 180136462aa9c941dcfffcf3abee8f452f1565c8 Author: Michael Tuexen AuthorDate: 2023-03-16 09:45:13 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:33:35 +0000 sctp: don't do RTT measurements with cookies When receiving a cookie, the receiver does not know whether the peer retransmitted the COOKIE-ECHO chunk or not. Therefore, don't do an RTT measurement. It might be much too long. To overcome this limitation, one could do at least two things: 1. Bundle the INIT-ACK chunk with a HEARTBEAT chunk for doing the RTT measurement. But this is not allowed. 2. Add a flag to the COOKIE-ECHO chunk, which indicates that it is the initial transmission, and not a retransmission. But this requires an RFC. (cherry picked from commit c91ae48a25edd426efc49ade14fb675e07a0f5ed) --- sys/netinet/sctp_input.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 836f09f4887f..a0e0d683b5fe 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1351,7 +1351,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, struct sctp_queued_to_read *sq, *nsq; struct sctp_nets *net; struct mbuf *op_err; - struct timeval old; int init_offset, initack_offset, i; int retval; int spec_flag = 0; @@ -1499,16 +1498,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, } /* notify upper layer */ *notification = SCTP_NOTIFY_ASSOC_UP; - /* - * since we did not send a HB make sure we don't - * double things - */ - old.tv_sec = cookie->time_entered.tv_sec; - old.tv_usec = cookie->time_entered.tv_usec; net->hb_responded = 1; - sctp_calculate_rto(stcb, asoc, net, &old, - SCTP_RTT_FROM_NON_DATA); - if (stcb->asoc.sctp_autoclose_ticks && (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE))) { sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, @@ -2202,17 +2192,11 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); *netp = sctp_findnet(stcb, init_src); if (*netp != NULL) { - struct timeval old; - /* * Since we did not send a HB, make sure we don't double * things. */ (*netp)->hb_responded = 1; - /* Calculate the RTT. */ - old.tv_sec = cookie->time_entered.tv_sec; - old.tv_usec = cookie->time_entered.tv_usec; - sctp_calculate_rto(stcb, asoc, *netp, &old, SCTP_RTT_FROM_NON_DATA); } /* respond with a COOKIE-ACK */ sctp_send_cookie_ack(stcb); From nobody Sun Jun 25 19:34: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 4Qq1QS4qljz4hTKZ; Sun, 25 Jun 2023 19: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 4Qq1QS4Ht7z3Gnl; Sun, 25 Jun 2023 19: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=1687721696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kr48IH5nQ7/ur4Mp/CEj2c1jpOPtDE4mnLFhQPKObhM=; b=swE9GkGK9NVgZgUDjiG+ZfE/gvh7SO15VnkvgBbF6xmDBhvACDimlseEpjOG+4l5r3mwK2 p+A24XIQ0FE+iSDWM/XCb51Rlg5cgJKZjW32yjpOFmjbC83FbsqYlvfAhGNFcAyQ6TCkvE 8Jili0Ry4vklL/s/O0hFhZ5I+5WdlAAAVanT5fIlAY6rjbpFnQrTHUT1P8vwvXCUHMjhmx CJA6MitSRcZttvifX8tGhf5Bz1M0aQNE3UwVOlzM6wD4cuOsG2mESwYgVKbfEHnMgIMFNn 5zWLWsFllXDIwlRk8yZSRxlNYeD8c5dkyTDdoPmN+Dtb5h8HGKmmBMj6Bw7HSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kr48IH5nQ7/ur4Mp/CEj2c1jpOPtDE4mnLFhQPKObhM=; b=alemGQMJFPVBRyZEeQH9g/TR2d9wKcxHfUC/ktTSC9Y8fxMou9fiqIVMoa4Yjnul+VnlNL h5KqhULD0VJ59iHqOqLDEeaBNFgEJZp1PFdzw6aLkatAnndKIEpv48Tttn0MSSVO9s3koW v8AcnXszvzbUn3d+vGuqGSwKO+rGfJ+7GG+eAxmpSMqx/R44zBZVBnFJ1wjR9WtLSOBGDE CU+SGzVocmE9e3ToAtuWAT0gV39qUYdG4j/FUILw5jHY08IKoFtNspFfsm9ubsF0hLfi5y Ia9Z5EmBB8A7mDlOwaAVSNUUnKzEwTAtyrlwgTRpTqz+nVKIDEf/tRWfOW2CKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721696; a=rsa-sha256; cv=none; b=DIY/8LY4e5/1SZHQpEBBnEQ4rY9pmjH1sOKmPcDN0QT4HMu1xjbrIjBCPM8AkXMuJCAscm NOxNJsAfQWGrp0D9kSJTcSuvOgilaYviAchn/0PmtHtaGUKTHAAno8RYzTRSUUcX+311vn 31i2jTyi2NZSp4aOYEp9SbPS5WESuRL7XxZMJjv77V9RHjLIXkXRQIl0hL4c/1vO6qLy9+ lSZrCzAcdg14yEmk3unYA0OZ/uR44HdUrcFdi2hKdUv0h10lTWVk1pVBYPU2mJ8EEbxpWJ mhQfQ24q/aSNvQUlfMke4CdRT++xxnNU6UOCmnkGQF6YEpg4jDm7EGSyert9Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1QS3K2lzfv0; Sun, 25 Jun 2023 19:34:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJYuFr041502; Sun, 25 Jun 2023 19:34:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJYujm041501; Sun, 25 Jun 2023 19:34:56 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:34:56 GMT Message-Id: <202306251934.35PJYujm041501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 462dbcf3ce60 - stable/13 - sctp: enforce Kahn's rule during the handshake List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 462dbcf3ce60ecc3dedca61999e52372b8552810 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=462dbcf3ce60ecc3dedca61999e52372b8552810 commit 462dbcf3ce60ecc3dedca61999e52372b8552810 Author: Michael Tuexen AuthorDate: 2023-03-16 16:40:40 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:34:34 +0000 sctp: enforce Kahn's rule during the handshake Don't take RTT measurements on packets containing INIT or COOKIE-ECHO chunks, when they were retransmitted. (cherry picked from commit 8ed1e2c88012cfca9fc4131a2637452cc9106b81) --- sys/netinet/sctp_input.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index a0e0d683b5fe..9eeb8f3fbd23 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -508,8 +508,6 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset, SCTP_FROM_SCTP_INPUT, __LINE__); } - stcb->asoc.overall_error_count = 0; - net->error_count = 0; /* * Cancel the INIT timer, We do this first before queueing the @@ -521,8 +519,12 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset, asoc->primary_destination, SCTP_FROM_SCTP_INPUT + SCTP_LOC_3); /* calculate the RTO */ - sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, - SCTP_RTT_FROM_NON_DATA); + if (asoc->overall_error_count == 0) { + sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, + SCTP_RTT_FROM_NON_DATA); + } + stcb->asoc.overall_error_count = 0; + net->error_count = 0; retval = sctp_send_cookie_echo(m, offset, initack_limit, stcb, net); return (retval); } @@ -2756,7 +2758,6 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, SCTP_FROM_SCTP_INPUT, __LINE__); } - asoc->overall_error_count = 0; sctp_stop_all_cookie_timers(stcb); /* process according to association state */ if (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED) { @@ -2775,6 +2776,12 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, SCTP_RTT_FROM_NON_DATA); } + /* + * Since we did not send a HB make sure we don't double + * things. + */ + asoc->overall_error_count = 0; + net->hb_responded = 1; (void)SCTP_GETTIME_TIMEVAL(&asoc->time_entered); sctp_ulp_notify(SCTP_NOTIFY_ASSOC_UP, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || @@ -2784,11 +2791,6 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, soisconnected(stcb->sctp_socket); } } - /* - * since we did not send a HB make sure we don't double - * things - */ - net->hb_responded = 1; if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { /* From nobody Sun Jun 25 19:36: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 4Qq1SW0cJHz4hVWD; Sun, 25 Jun 2023 19:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qq1SW06PLz3HDq; Sun, 25 Jun 2023 19:36:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eYQXTrOGrtVtYLGAOz8CvD06rp8agzmq8kHAaVFx8ko=; b=I9J22WrtNL2tM5usEWZ/OrV4KSb7oMgmIFbfyFA+llI4aTg5YDIulKix3BOWSij8W4PKfK MOW5srsL3yppd6WkXiBYW5CtOTqHr+q3ufDTzbgrgHMjNCqm6Cnc0oOPNXcd2ps4qSxnWZ rzSqX8JdIouCN9XhF1fjGwIzPO02VWtE6xS2MfZQnH8tp8I6p+XjpiIEbUZxvb/vV6o9FU qaIVnH2atSmtgTv5hwoyIJYzQBmQ84d9rGWg9hxRRq3+W3mIlNa4zDi696W78YvlNgnQNi IG8wLOQCkaDtQRxKEQkzViJyjeZ87dC+bIZxEJRlpcjNgA6gnG8k/QTHxKuyYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eYQXTrOGrtVtYLGAOz8CvD06rp8agzmq8kHAaVFx8ko=; b=ayrnWTixVId0gNm2Xt6l3iVWaN4cylzioOy0XDO0PTgEOh4IydCJVqmWEl5Xe6hHSN5KYC qfYSwrK4+Dy+CwPAc/Iz38n7n3HPVMg9WMR8W0Z5JvwwpOLw8YSy7kmwy09LkCHZPge61S udqIDHaNe0pUO8FWwaECZ0QNsuKJoNvv+KcfEiSX6CyepUixoyENCpAUOeQvpqnHHAIL0X AXcGfpb1PQ3qNH60bdoD1PxSC9khZOog5dw3RF/bdXP5zKup66tnAURDA9W5IIDsqru102 YPmqtkioXKgnQ6+tp5ozISnTcc131lKWLKZlTm3+9SMd6wJHT6EOEeYq5xqX5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721803; a=rsa-sha256; cv=none; b=X4uy7pZFK6zL62u0r6FHTJvPpmPdY8c8CNIRmqw9L0wAjz4uDMr5tYcAzVoROPRVNYZobS x+B+RRbKxYRRHkLcs6CQGETVG/mKz16nvNQllnjWztRPt7N8OGlqTEErxuYEGb0J+6B0ES WigLA0ufsgarWOsTePj9VlSLmNez5TunbxhFRR5qx8vs+eOlXzMwfO++Y36RCRhRQifLVG h/h5xMbXmuq4xXl8GwX/S2NZo5EuIPx7diYJaAEQV9x3UxOg+TMEfDWj/NsmS3Wn79tZQG 9XEzZ9VRwvQX0rFYY/mpqUA9BZFAqEYH+FprG+Iz2YqdgHdRuoO+GgsP6Qje6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1SV5yHdzgJG; Sun, 25 Jun 2023 19:36:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJagBB041857; Sun, 25 Jun 2023 19:36:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJagpZ041856; Sun, 25 Jun 2023 19:36:42 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:36:42 GMT Message-Id: <202306251936.35PJagpZ041856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 17b65b4df95f - stable/13 - sctp: use constants from RFC 8260 to improve compliance List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 17b65b4df95f0d375002a63615aede5d6178fd7f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=17b65b4df95f0d375002a63615aede5d6178fd7f commit 17b65b4df95f0d375002a63615aede5d6178fd7f Author: Michael Tuexen AuthorDate: 2023-04-23 15:48:05 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:36:11 +0000 sctp: use constants from RFC 8260 to improve compliance Keep the old constants for backwards compatibility. (cherry picked from commit 66d6fd532282fda0cda0ca31d93ff09044f1386a) --- sys/netinet/sctp.h | 23 ++++++++++++++++------- sys/netinet/sctp_ss_functions.c | 10 +++++----- sys/netinet/sctp_usrreq.c | 18 +++++++++--------- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/sys/netinet/sctp.h b/sys/netinet/sctp.h index d67b33acd8ad..f942b1356dbb 100644 --- a/sys/netinet/sctp.h +++ b/sys/netinet/sctp.h @@ -191,8 +191,11 @@ struct sctp_paramhdr { /* JRS - Pluggable Congestion Control Socket option */ #define SCTP_PLUGGABLE_CC 0x00001202 /* RS - Pluggable Stream Scheduling Socket option */ -#define SCTP_PLUGGABLE_SS 0x00001203 -#define SCTP_SS_VALUE 0x00001204 +#define SCTP_STREAM_SCHEDULER 0x00001203 +#define SCTP_STREAM_SCHEDULER_VALUE 0x00001204 +/* The next two are for backwards compatibility. */ +#define SCTP_PLUGGABLE_SS SCTP_STREAM_SCHEDULER +#define SCTP_SS_VALUE SCTP_STREAM_SCHEDULER_VALUE #define SCTP_CC_OPTION 0x00001205 /* Options for CC * modules */ /* For I-DATA */ @@ -308,15 +311,21 @@ struct sctp_paramhdr { /* Default simple round-robin */ #define SCTP_SS_DEFAULT 0x00000000 /* Real round-robin */ -#define SCTP_SS_ROUND_ROBIN 0x00000001 +#define SCTP_SS_RR 0x00000001 /* Real round-robin per packet */ -#define SCTP_SS_ROUND_ROBIN_PACKET 0x00000002 +#define SCTP_SS_RR_PKT 0x00000002 /* Priority */ -#define SCTP_SS_PRIORITY 0x00000003 +#define SCTP_SS_PRIO 0x00000003 /* Fair Bandwidth */ -#define SCTP_SS_FAIR_BANDWITH 0x00000004 +#define SCTP_SS_FB 0x00000004 /* First-come, first-serve */ -#define SCTP_SS_FIRST_COME 0x00000005 +#define SCTP_SS_FCFS 0x00000005 +/* The next five are for backwards compatibility. */ +#define SCTP_SS_ROUND_ROBIN SCTP_SS_RR +#define SCTP_SS_ROUND_ROBIN_PACKET SCTP_SS_RR_PKT +#define SCTP_SS_PRIORITY SCTP_SS_PRIO +#define SCTP_SS_FAIR_BANDWITH SCTP_SS_FB +#define SCTP_SS_FIRST_COME SCTP_SS_FCFS /* fragment interleave constants * setting must be one of these or diff --git a/sys/netinet/sctp_ss_functions.c b/sys/netinet/sctp_ss_functions.c index 049c93767125..465a2bc7de5c 100644 --- a/sys/netinet/sctp_ss_functions.c +++ b/sys/netinet/sctp_ss_functions.c @@ -952,7 +952,7 @@ const struct sctp_ss_functions sctp_ss_functions[] = { .sctp_ss_set_value = sctp_ss_default_set_value, .sctp_ss_is_user_msgs_incomplete = sctp_ss_default_is_user_msgs_incomplete }, -/* SCTP_SS_ROUND_ROBIN */ +/* SCTP_SS_RR */ { .sctp_ss_init = sctp_ss_default_init, .sctp_ss_clear = sctp_ss_default_clear, @@ -967,7 +967,7 @@ const struct sctp_ss_functions sctp_ss_functions[] = { .sctp_ss_set_value = sctp_ss_default_set_value, .sctp_ss_is_user_msgs_incomplete = sctp_ss_default_is_user_msgs_incomplete }, -/* SCTP_SS_ROUND_ROBIN_PACKET */ +/* SCTP_SS_RR_PKT */ { .sctp_ss_init = sctp_ss_default_init, .sctp_ss_clear = sctp_ss_default_clear, @@ -982,7 +982,7 @@ const struct sctp_ss_functions sctp_ss_functions[] = { .sctp_ss_set_value = sctp_ss_default_set_value, .sctp_ss_is_user_msgs_incomplete = sctp_ss_default_is_user_msgs_incomplete }, -/* SCTP_SS_PRIORITY */ +/* SCTP_SS_PRIO */ { .sctp_ss_init = sctp_ss_default_init, .sctp_ss_clear = sctp_ss_prio_clear, @@ -997,7 +997,7 @@ const struct sctp_ss_functions sctp_ss_functions[] = { .sctp_ss_set_value = sctp_ss_prio_set_value, .sctp_ss_is_user_msgs_incomplete = sctp_ss_default_is_user_msgs_incomplete }, -/* SCTP_SS_FAIR_BANDWITH */ +/* SCTP_SS_FB */ { .sctp_ss_init = sctp_ss_default_init, .sctp_ss_clear = sctp_ss_fb_clear, @@ -1012,7 +1012,7 @@ const struct sctp_ss_functions sctp_ss_functions[] = { .sctp_ss_set_value = sctp_ss_default_set_value, .sctp_ss_is_user_msgs_incomplete = sctp_ss_default_is_user_msgs_incomplete }, -/* SCTP_SS_FIRST_COME */ +/* SCTP_SS_FCFS */ { .sctp_ss_init = sctp_ss_fcfs_init, .sctp_ss_clear = sctp_ss_fcfs_clear, diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 7a0b60a9e030..9e7b441ed497 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -1750,7 +1750,7 @@ flags_out: } break; } - case SCTP_PLUGGABLE_SS: + case SCTP_STREAM_SCHEDULER: { struct sctp_assoc_value *av; @@ -1777,7 +1777,7 @@ flags_out: } break; } - case SCTP_SS_VALUE: + case SCTP_STREAM_SCHEDULER_VALUE: { struct sctp_stream_value *av; @@ -4045,17 +4045,17 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize, } break; } - case SCTP_PLUGGABLE_SS: + case SCTP_STREAM_SCHEDULER: { struct sctp_assoc_value *av; SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, optsize); if ((av->assoc_value != SCTP_SS_DEFAULT) && - (av->assoc_value != SCTP_SS_ROUND_ROBIN) && - (av->assoc_value != SCTP_SS_ROUND_ROBIN_PACKET) && - (av->assoc_value != SCTP_SS_PRIORITY) && - (av->assoc_value != SCTP_SS_FAIR_BANDWITH) && - (av->assoc_value != SCTP_SS_FIRST_COME)) { + (av->assoc_value != SCTP_SS_RR) && + (av->assoc_value != SCTP_SS_RR_PKT) && + (av->assoc_value != SCTP_SS_PRIO) && + (av->assoc_value != SCTP_SS_FB) && + (av->assoc_value != SCTP_SS_FCFS)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; break; @@ -4094,7 +4094,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize, } break; } - case SCTP_SS_VALUE: + case SCTP_STREAM_SCHEDULER_VALUE: { struct sctp_stream_value *av; From nobody Sun Jun 25 19: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 4Qq1TN0hC3z4hWhJ; Sun, 25 Jun 2023 19: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 4Qq1TN0BCKz3Hm3; Sun, 25 Jun 2023 19: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=1687721848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VEQ7r5TpkRmkfFo/pVIOZQE2ENohmljf8yGYQUJmPWc=; b=scWQsXc19hbPNnpUM4BpeXDeDTJzYO8f1/nC5160LhsgvOtp1W1VZIDHxxoWq/BStUD5VB 5gI0Cni05fsMK84vryKlUEKBXenphO1kgwFVakoyZMadsMsIHZA6jNh4hqb6YWMYh5ApWK nNU2Qbk5dJImO+bHza0voxnsg+uPz5uzCh2wORRL7cwi5bYVDHVfFxubK+sKuF+yZn6JWw HeH3ec/AiOy7MYMGQbfRyQXg6sHb0+D7rE/0zPRGgbxE7wQiYEFjFXVDvuYdPjyA5WhriF TUkSmz92kEWHfPkM0mSRqYwdMAYX5FZGAqWV7ncUvY5oumcjJre5WPjwX68Lxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VEQ7r5TpkRmkfFo/pVIOZQE2ENohmljf8yGYQUJmPWc=; b=OBP+lhfRfXyqQugUXm/I1wRGhpajnaXJkOPPYu1bvZdLVBy1N+vXBfYIYSe8NlLfyaHT61 2o15bgrskDOxZmaCwnLmJR2T6c+QmoFCOjoib5pOfr1Sxq8PjSsMDdcjMqNDb3Xx3B8jjU H+vbftGxqVeGfCexnMCb4g/ZJnB2kZL8eV3/gt5oP7Z7IggZlRf4VabBFyNu2JJ+1FQIv9 d0ccl8PGvHp8mLeVQWBKS2vWbyLOm4Gv3VV2OO3zsqDqOUgCV2o8yO/ZzIRSutQOve7aFE YrEl33uNivxZ9J54rqR1pu/6BhEEluOL8k+s8YAHj1czmuJrNu2h58xqzAErbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721848; a=rsa-sha256; cv=none; b=UIj57Q0N+wH6vWHLoMgbRjMsrzAxkxDDm4eGvjaN7nMXbbimmmufvnOam2TQ0GjHDcupiD IUmN18xs+PkA4/fRq7fjvg4BEFyJSQU0vy59N+3/nnPMCRCPP/kaa+AVkDATjfRR1QDh+t Uvz/v7T7X9gQrsxC984lSCQ4p98l0zE98vipWymVGk+1RRcwEWagM63vK1ruLqwP58FJ1c ir/F5BeGNc+e4AI2Uznk4BVAwBA0d1J1vJk2tkD0pMfdqoeMChSZm+Ni6GE01Mz8LLwBXc q6Udq/Lts9T4W9aqzTuPhFYhd6mUyxkCbxcUoS4fWfwohmq2rckLTOVF3NUQkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1TM6JNMzg0c; Sun, 25 Jun 2023 19:37:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJbRP8042046; Sun, 25 Jun 2023 19:37:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJbRG8042045; Sun, 25 Jun 2023 19:37:27 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:37:27 GMT Message-Id: <202306251937.35PJbRG8042045@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 27de3c310c02 - stable/13 - sctp: improve handling of stale cookie error causes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 27de3c310c0211362015ab26ac66c806afcf1b39 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=27de3c310c0211362015ab26ac66c806afcf1b39 commit 27de3c310c0211362015ab26ac66c806afcf1b39 Author: Michael Tuexen AuthorDate: 2023-04-30 09:39:32 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:37:04 +0000 sctp: improve handling of stale cookie error causes * If a measure of staleness of 0 is reported, use the RTT instead. * Ensure that we always send a cookie preservative parameter by rounding up during the calculation. * If allowed, perform a round trip time measurement. * Clear the overall error counter, since the error cause also acts like an ACK. (cherry picked from commit 1f0e13449beef3a983d9ed2faf4734075e4120d1) --- sys/netinet/sctp_input.c | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 9eeb8f3fbd23..38d57194b02d 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1133,26 +1133,47 @@ sctp_handle_error(struct sctp_chunkhdr *ch, */ if ((cause_length >= sizeof(struct sctp_error_stale_cookie)) && (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { + struct timeval now; struct sctp_error_stale_cookie *stale_cookie; + uint64_t stale_time; - stale_cookie = (struct sctp_error_stale_cookie *)cause; - /* stable_time is in usec, convert to msec. */ - asoc->cookie_preserve_req = ntohl(stale_cookie->stale_time) / 1000; - /* Double it to be more robust on RTX. */ - asoc->cookie_preserve_req *= 2; asoc->stale_cookie_count++; - if (asoc->stale_cookie_count > - asoc->max_init_times) { + if (asoc->stale_cookie_count > asoc->max_init_times) { sctp_abort_notification(stcb, false, true, 0, NULL, SCTP_SO_NOT_LOCKED); - /* now free the asoc */ (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_12); return (-1); } - /* blast back to INIT state */ + stale_cookie = (struct sctp_error_stale_cookie *)cause; + stale_time = ntohl(stale_cookie->stale_time); + if (stale_time == 0) { + /* Use an RTT as an approximation. */ + (void)SCTP_GETTIME_TIMEVAL(&now); + timevalsub(&now, &asoc->time_entered); + stale_time = (uint64_t)1000000 * (uint64_t)now.tv_sec + (uint64_t)now.tv_usec; + if (stale_time == 0) { + stale_time = 1; + } + } + /* + * stale_time is in usec, convert it to + * msec. Round upwards, to ensure that it is + * non-zero. + */ + stale_time = (stale_time + 999) / 1000; + /* Double it, to be more robust on RTX. */ + stale_time = 2 * stale_time; + asoc->cookie_preserve_req = (uint32_t)stale_time; + if (asoc->overall_error_count == 0) { + sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, + SCTP_RTT_FROM_NON_DATA); + } + asoc->overall_error_count = 0; + /* Blast back to INIT state */ sctp_toss_old_cookies(stcb, &stcb->asoc); - SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); sctp_stop_all_cookie_timers(stcb); + SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); + (void)SCTP_GETTIME_TIMEVAL(&asoc->time_entered); sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); } break; From nobody Sun Jun 25 19:39: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 4Qq1WM0MPTz4hYDq; Sun, 25 Jun 2023 19:39: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 4Qq1WL72DKz3Jgh; Sun, 25 Jun 2023 19:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o3jiwNSfzWocEsotg711GsjElwYpcKxPGMD6CL4hUtw=; b=X7kg8c1+ispX4bUb5F2nkQ7nU95l0CSC+BqUienFwscgCu+bW9x9py0JbKcGVC68WFjdBs dHSa8RyDNVWrjVR0T+3gk7Q1JohiS1xPITrUTZzbB1vfgMPcdFZgl7IFaoFvJcA3dONsup biJ4YryW38mEIiJtbUT4Z74Hxh19ZufhwkOD0ZSqUmvywwvb0TJkmoIPqxEo2KegHDEL4+ qwigg+iIUo9koBaTelLHlrcPcHnYesONhsfHvrRDPbBeIBAG0dOVnzY8AaANRBMJAyotwh cRvZOU/+oPhqqqbzhvhG/08+fkjHIyk/UHY9UHJtmhtwnz1KyPZ+IQOPNsXz2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o3jiwNSfzWocEsotg711GsjElwYpcKxPGMD6CL4hUtw=; b=A+FC057VQrkgo/zYoa07KMmeKAFP6KBCVloAbBzDpoe+qvGMkUrvb74gFD+AveXXPvf2Bo 9jOjZUsWFMuukut5gHNK7XyJ/piKs8tW7RnlbIwC8Yx5+o2VHhMHILKh5VSguuTNUu+H2/ OtuXjDVilxSkj06EobIew2agkCSLKHe062//IlcRyj/YEhImnSlTYmsZlxHFunBQT/mSKp AzhdD4IE0wY0JVejQXSqdij3aXSMTtbYJi0y82ZsePZhQ+F9nEcEG54I8uQ4JscPs3lZlD ocDkIxEo62y7JabVM5uSvqqozjDY5aV/8ai3FQafc2Rntg/vRmkE1QFhhnvpvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721951; a=rsa-sha256; cv=none; b=qOFbGdLlN0gvJKPDlxi6eD1wi8/mye6mwdWO6eqd/UHV6OEVtPFj+ssGpFU8HycIntQZqG 9yyyzgbz9y7z2dA0okYct91gUpOuCgdxbtLGmgaLembfK5GyEM9DKUGfCX3xuF9Z2+L8Cr z3YgH0lPZgJhcQWkoMAHjzYu1XRz+7dlsgI0DgiZIZT6tXYslt1ysvm852O1MRM5ur/e3E dYP7h860vOD2zKWRLnrEhp9zLmwkBFaPS/B6hRVkoJ2K0lTc6uXDQ24pYozECtE9TtOlCz c8nFbhctyAQUdDPqNHf1Q/PudzU82Ac7w1LghAg/Hu112CYjGysUYGllxKaBLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1WL67sszfsC; Sun, 25 Jun 2023 19:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJdAXQ042375; Sun, 25 Jun 2023 19:39:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJdARW042374; Sun, 25 Jun 2023 19:39:10 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:39:10 GMT Message-Id: <202306251939.35PJdARW042374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 6b218e45a9ca - stable/13 - sctp: improve shutdown(..., SHUT_WR) handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6b218e45a9ca4759e9693ed7c3579567f522e7ba Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6b218e45a9ca4759e9693ed7c3579567f522e7ba commit 6b218e45a9ca4759e9693ed7c3579567f522e7ba Author: Michael Tuexen AuthorDate: 2023-05-03 15:30:50 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:37:50 +0000 sctp: improve shutdown(..., SHUT_WR) handling When shutdown(..., SHUT_WR) is called in the front states, send a SHUTDOWN chunk when a COOKIE ACK chunk is received and there is no outstanding data. (cherry picked from commit d9ae4adff2715cfab4a941037ec15aa07108efa1) --- sys/netinet/sctp_input.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 38d57194b02d..61c248b1efdb 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -2780,16 +2780,13 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, __LINE__); } sctp_stop_all_cookie_timers(stcb); + sctp_toss_old_cookies(stcb, asoc); /* process according to association state */ if (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED) { /* state change only needed when I am in right state */ SCTPDBG(SCTP_DEBUG_INPUT2, "moving to OPEN state\n"); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); sctp_start_net_timers(stcb); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } /* update RTO */ SCTP_STAT_INCR_COUNTER32(sctps_activeestab); SCTP_STAT_INCR_GAUGE32(sctps_currestab); @@ -2813,6 +2810,21 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, } } + if ((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) && + TAILQ_EMPTY(&asoc->send_queue) && + TAILQ_EMPTY(&asoc->sent_queue) && + (asoc->stream_queue_cnt == 0)) { + SCTP_STAT_DECR_GAUGE32(sctps_currestab); + SCTP_SET_STATE(stcb, SCTP_STATE_SHUTDOWN_SENT); + sctp_stop_timers_for_shutdown(stcb); + sctp_send_shutdown(stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, + stcb->sctp_ep, stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, + stcb->sctp_ep, stcb, NULL); + sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_LOCKED); + } + if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { /* * We don't need to do the asconf thing, nor hb or @@ -2848,8 +2860,6 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, } } closed_socket: - /* Toss the cookie if I can */ - sctp_toss_old_cookies(stcb, asoc); /* Restart the timer if we have pending data */ TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { if (chk->whoTo != NULL) { From nobody Sun Jun 25 19:39: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 4Qq1WN3bZ4z4hY5q; Sun, 25 Jun 2023 19:39: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 4Qq1WN2wqYz3Jgx; Sun, 25 Jun 2023 19:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KhuNNV+GQpmKiZ4a+Jttqeq0pq3raC928nsMW6PtL20=; b=W67puELYmP9nCdZDtFt6PoKSTrJvMKuygHDZYaIXQen/1qQP/sc0WxP6gtIKtW/2QH0UKB R8WQ7Q0yPKHSP5PwTAu7b4tUqwYGOTNcZHi14A1YRODjynMZmsB+34s1ppo/Xq/55hNC+g R+J49sk9vWYKVc3q9Vjp9iEvj6sF5kmdRHPOHaOWI3GckU/uK/LIDeziVo0G7mOmznGRBK mjY07GKiSS0ebVakCf/7PY0fLAtVqqagIyAt6qksgwt7s1JeRwooyxW05cfAZcflB8oYgP qJUmMc1EVqqU0vEseVgRvVqKoSasrRlv9TEkambU6WEg6ZANxgu3hO0HdT2OdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687721952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KhuNNV+GQpmKiZ4a+Jttqeq0pq3raC928nsMW6PtL20=; b=lO/l12zBO57X6kf+l2ru9OokJP+1OkTiAXlI/nwEZtWtibYrQJhBPyqUumF+nOitkZd8VZ +NwSYYlriQS/Uhpi1gfzPNRqGwx/fQTbCIDkobixgPJ0nfUsQq375yma1Nu47C02rLGgmC UrW+23V3y7O0AxKPU0XIWObr4y6G0vT0Uo4ZSsPHMUh6YluzVbvw4SmbVJZ0rHTn0FX8ZC HUo3vyPebFVkRAFuGUy0YxCuGXziu38YWSLJ/SwjCzxkkD0On3C9JM0T3ft4mQaQinMlZs tEF96Hq/btfmts3aKk3oc+s+F2rdyhPolqy/J5RL0ZeRyEjvtimypQE8x4yEVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687721952; a=rsa-sha256; cv=none; b=aow6CJEgJVqypWdYshJGtSDwId29QBQzLHhxCoaCeA1b4Z9PXfpXnYybf+/IxvZ60Q/Dc9 FIFYqOFExndXvLn+CfVSFQ0YaywAUZngs8r2AKuaPXhg7Tq4mwg+f4l6XiQbj9O678dsRp GmYqL4glYLobyaqc/8oQiume+/++Prteyy8I9eE/RkYO+ivub0AYrxdfbUfTmRhex7Aqmt XjNh0BVWkLGESeazSsjaTIUBt+Jt4VZqzQVm14fCsy1USxN/qPOx+MTlym6OrPUQvUCzrv uu7iPyFQrvctesF8M7Qb8AJVWk2sjOrUxsK4zFAZ4APC9qu7R+AbeyHYZ2oZhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1WN0K8xzg0f; Sun, 25 Jun 2023 19:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJdBmV042395; Sun, 25 Jun 2023 19:39:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJdBCg042394; Sun, 25 Jun 2023 19:39:11 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:39:11 GMT Message-Id: <202306251939.35PJdBCg042394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 046df9bdd678 - stable/13 - sctp: only start shutdown guard timer when sending SHUTDOWN chunk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 046df9bdd678d56589f9bd9c0659816f287fdd52 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=046df9bdd678d56589f9bd9c0659816f287fdd52 commit 046df9bdd678d56589f9bd9c0659816f287fdd52 Author: Michael Tuexen AuthorDate: 2023-05-03 18:28:46 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:38:31 +0000 sctp: only start shutdown guard timer when sending SHUTDOWN chunk The intention is to protect a malicious peer not following the shutdown procedures. (cherry picked from commit 04ede3675e44847c3e9e4a9bd44509cdf42ed60a) --- sys/netinet/sctp_input.c | 14 -------------- sys/netinet/sctp_output.c | 4 ---- sys/netinet/sctp_pcb.c | 1 - sys/netinet/sctp_usrreq.c | 6 +++--- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 61c248b1efdb..e3464e1d3eb5 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1501,10 +1501,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, SCTP_STAT_INCR_COUNTER32(sctps_collisionestab); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } SCTP_STAT_INCR_GAUGE32(sctps_currestab); sctp_stop_all_cookie_timers(stcb); if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || @@ -1718,10 +1714,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, SCTP_STAT_INCR_COUNTER32(sctps_collisionestab); } SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } sctp_stop_all_cookie_timers(stcb); sctp_toss_old_cookies(stcb, asoc); sctp_send_cookie_ack(stcb); @@ -1788,8 +1780,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, } if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); } else if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) { /* move to OPEN state, if not in SHUTDOWN_SENT */ @@ -2174,10 +2164,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, /* update current state */ SCTPDBG(SCTP_DEBUG_INPUT2, "moving to OPEN state\n"); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } sctp_stop_all_cookie_timers(stcb); SCTP_STAT_INCR_COUNTER32(sctps_passiveestab); SCTP_STAT_INCR_GAUGE32(sctps_currestab); diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 6ea139795be0..c0ab7833d25e 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -6734,8 +6734,6 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, atomic_subtract_int(&stcb->asoc.refcnt, 1); goto no_chunk_output; } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - NULL); } } } @@ -13504,8 +13502,6 @@ dataless_eof: error = ECONNABORTED; goto out; } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - NULL); sctp_feature_off(inp, SCTP_PCB_FLAGS_NODELAY); } } diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index e1a2b74d02f3..4a11305da5a4 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3460,7 +3460,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) } else { /* mark into shutdown pending */ SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); if ((*stcb->asoc.ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, &stcb->asoc)) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); } diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 9e7b441ed497..4e1f41ca0609 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -748,7 +748,7 @@ sctp_disconnect(struct socket *so) stcb->sctp_ep, stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); - sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_LOCKED); + sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); } } else { /* @@ -762,7 +762,6 @@ sctp_disconnect(struct socket *so) * and move to SHUTDOWN-PENDING */ SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); } @@ -945,6 +944,8 @@ sctp_shutdown(struct socket *so) sctp_send_shutdown(stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, netp); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, + stcb->sctp_ep, stcb, NULL); } else { /* * We still got (or just got) data to send, so set @@ -969,7 +970,6 @@ sctp_shutdown(struct socket *so) return (0); } } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); /* * XXX: Why do this in the case where we have still data * queued? From nobody Sun Jun 25 19: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 4Qq1bT32gzz4hbxb; Sun, 25 Jun 2023 19:42: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 4Qq1bS6CgWz3MH8; Sun, 25 Jun 2023 19: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=1687722164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTxrUmm1GrVWHJm1F4KeY5MpjJgtN+uoCuCSYld+QCo=; b=p8xKfkB/KUiOKG99qmTSDE338pNIvINuO9UVgoVayj1cGnqu309WFu76EyOz3OTXv+Q/g6 CM8/ApmBXz6Cw0E/mCtUBxShHT5W6FiQgw6q03fp9f9J6C7MNFWLqq65DXI1n5G/dOrW0i 24kZhMiMpXB0stelewPGOZY/xTTPueHhoWrIMK/Dl2r38sjWNl7YjfZm5aUz/K7BqxQLVb UZLfhVQY/ljQ7Y3ri60fHnm586g8zgmEoaWyt0VKFQiodmkk8dca378B26CwkJfOTP+77Q vtpT4xtWFwv7cRHSurS8r/3VwY3ccHP+WLvkVQ7upWOJdlE0x/Cl63YlpumItQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687722164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTxrUmm1GrVWHJm1F4KeY5MpjJgtN+uoCuCSYld+QCo=; b=nX0FKRmBKrpIaq01AXjcciy2zF6DOHek8GkkGmD4enwCFInVaZauWX6sLtPsf0nJby2y00 dIPwL9DoWXl3mHovMeXE3UTopAsPb2cnktXKICOfLcOhej2ZZDytfpNcHFT0rNvi1s9Zuw igxQUBDJUqFA6A6o4lR4CO2XQk4kNTtLR1p3nTed/j5ZUq/2PWkuA5hRxBwwNgNQOJ8NgL msZu/vP3BLK84yvyQJQcCOviZg2iGTtxIbIHJ21p7d7nlUVo8jHaPF4yo/lteiIOfvxWAJ 4lbkLJw2+dTig1eNzQH/xqxcqtDb36kJWjv2wbUCmh82d/X9AG4aSc/ORxB9GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687722164; a=rsa-sha256; cv=none; b=f0S0H6tp5xVBmEvoCHVMtgErllYnd8GGd5C+tHshagXbAKIJ70ik1m+LwmSLIHBlSav4Ds 9JfcDxCpe6+4iWnLATFgsa76zYH5kJbpPVkKeszjRSyMhP6GUjKGk+V4XYYKyDzv7Ul/hW OMxJ+Ka4B2Hg6vC/y/a/6NPwDGlp9CpdZTq5vYcn3EOcpUoZXnVt/mje+CwRGn4xE2MTjo d3gQ4RvCmEomQCpgKC+Rupo8zj5PLSn/oCvBLrCl91tNSWIKRcuJ7JQ0JWFE0nizlfQUij ERyl8L6kq0JDQUAOU6qmbLIFo98NaTw6G771FRpAAWmym3159MG7V1M3KlZagg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq1bS5HSFzg1K; Sun, 25 Jun 2023 19:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PJgier057700; Sun, 25 Jun 2023 19:42:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PJgiK1057699; Sun, 25 Jun 2023 19:42:44 GMT (envelope-from git) Date: Sun, 25 Jun 2023 19:42:44 GMT Message-Id: <202306251942.35PJgiK1057699@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 6dc94f4ba1a5 - stable/12 - libalias: improve handling of invalid SCTP 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6dc94f4ba1a5b0f17c3adda317eac31d3146eccf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6dc94f4ba1a5b0f17c3adda317eac31d3146eccf commit 6dc94f4ba1a5b0f17c3adda317eac31d3146eccf Author: Michael Tuexen AuthorDate: 2022-11-15 20:05:02 +0000 Commit: Michael Tuexen CommitDate: 2023-06-25 19:42:28 +0000 libalias: improve handling of invalid SCTP packets In case of a paritial chunk only pretend the result is OK if the packet is not the last fragment and there is a valid association. PR: 267476 (cherry picked from commit 9a714376212ec1685fdc4cf254f2136a07ae6d2c) --- sys/netinet/libalias/alias_sctp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/netinet/libalias/alias_sctp.c b/sys/netinet/libalias/alias_sctp.c index d6cedd72ddc1..e274b4c2e6d5 100644 --- a/sys/netinet/libalias/alias_sctp.c +++ b/sys/netinet/libalias/alias_sctp.c @@ -730,8 +730,11 @@ SctpAlias(struct libalias *la, struct ip *pip, int direction) case SN_PARSE_OK: break; case SN_PARSE_ERROR_CHHL: - /* Not an error if there is a chunk length parsing error and this is a fragmented packet */ - if (ntohs(pip->ip_off) & IP_MF) { + /* + * Not an error, if there is a chunk length parsing error, + * this is a fragmented packet, and we have a valid assoc. + */ + if ((assoc != NULL) && (ntohs(pip->ip_off) & IP_MF)) { rtnval = SN_PARSE_OK; break; } @@ -1043,6 +1046,8 @@ sctp_PktParser(struct libalias *la, int direction, struct ip *pip, * Also, I am only interested in the content of INIT and ADDIP chunks */ + sm->msg = SN_SCTP_OTHER;/* Initialise to largest value*/ + sm->chunk_length = 0; /* only care about length for key chunks */ // no mbuf stuff from Paolo yet so ... sm->ip_hdr = pip; /* remove ip header length from the bytes_left */ @@ -1090,8 +1095,6 @@ sctp_PktParser(struct libalias *la, int direction, struct ip *pip, chunk_count = 1; /* Real packet parsing occurs below */ - sm->msg = SN_SCTP_OTHER;/* Initialise to largest value*/ - sm->chunk_length = 0; /* only care about length for key chunks */ while (IS_SCTP_CONTROL(chunk_hdr)) { switch (chunk_hdr->chunk_type) { case SCTP_INITIATION: From nobody Sun Jun 25 20:09: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 4Qq2Bn6F8Rz4htF3; Sun, 25 Jun 2023 20:09: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 4Qq2Bn5lf8z3lJ0; Sun, 25 Jun 2023 20:09:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687723793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+ufmceVwtTwB5FO4ReyXkkJqh4jI5IkbvZ6fhe/+5CU=; b=LyX+1zNrh1rGvBUQXZdcKp7MWG8KINHAAlK8hoODf/jR7+iPoXsAB2V7QsKVJM909rKHEO wAvf966belGKbscslAuvz4nn3dN5lqrJYIXJ+5eSXisMTnTRHQ2I2HU1rdLXJwV5MSLgfW nhGfix0dCupk+KHw7R9wAwvBov6YRmlxwjlIfewmxfLo23mCxVEzXaCPgET3BXeRfIAH9a GIuehgz7A/nun0Ths5dxBUP3zsw1BkmuZ5Yf5/oaXGgG6gHdO9vrW1tBB+BVQRVg28/HLr GcafqkmffF+TfYcD/mmqUFI5w1NkpdUfx9qX1fpYiZW3imgmel1vji6ucr9H4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687723793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+ufmceVwtTwB5FO4ReyXkkJqh4jI5IkbvZ6fhe/+5CU=; b=J4vLBLdFpRyCBz34B2WyCMo9GiJp6RWZvDe+A9yxU8uUgZhajyq4u19+39kRUJkokKHWjd Q5gI2E8/axpRg7YXoXlfvxPa0FXfPbIlb2YQ+4pk5dpyWksjuDGnghAOFCU7paC2tB5taE hPT37n+c10rAgj4hNpWdDgE12vIgI425miaaAV39Ze6Iw48y2Nuq8zG0d+Ak+Vk4yB2M1q D4TJK6/Cp5AHGqyJxONedDodFK8KPWwo3aij6To8Hlxr2oTdFzhg9+Wl3IqTI4X/ZQ1ByK t7NMOHy9gy1gOEzUJw/EXAwrzrrCAZMl0L7tDp9esDWRpWnViXQXfgndvv+9Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687723793; a=rsa-sha256; cv=none; b=YAuHDyQwtZhSCN0ri3Xq/wyO6i0ld5E80IUipHcfrFca6NEpln3DxqMKapMhD44Oc0QDWL 97th8t5aNuJWUNYzY7sSaVbT4YiL10RmeNUG9H6s4ZMYDL9mDMq2vfO5kI5ShazLYlR9wx bP7PdCm3GXjMWFNhlVGQla6XDCxOejgGmTdxDQH9dZ8dOJXm6W1mjJblDU8oBT9/kmRqoZ 9t8TtDsFcdn8eaV/QSCY2MW7t6CI9l1E1XZckbO8RRNdz03AH37viRfeUBmzUAXvYMQB31 bHrfcJsFd5eKCCo7KNaG2y+u90sR8PSSbsU6m+3yk5oXL1Hwh4c8Nk5/Kn+0rA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq2Bn4rgfzgZv; Sun, 25 Jun 2023 20:09:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PK9r5d092980; Sun, 25 Jun 2023 20:09:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PK9rOP092979; Sun, 25 Jun 2023 20:09:53 GMT (envelope-from git) Date: Sun, 25 Jun 2023 20:09:53 GMT Message-Id: <202306252009.35PK9rOP092979@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: c079bcbc60e8 - main - ifconfig: consistently sort set/clear 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c079bcbc60e8d830e6d59bb96b43dca51a84167e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c079bcbc60e8d830e6d59bb96b43dca51a84167e commit c079bcbc60e8d830e6d59bb96b43dca51a84167e Author: Ed Maste AuthorDate: 2023-06-19 17:42:46 +0000 Commit: Ed Maste CommitDate: 2023-06-25 20:09:26 +0000 ifconfig: consistently sort set/clear commands Sponsored by: The FreeBSD Foundation --- sbin/ifconfig/ifvlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index adc3c4692f8b..7fb63b8142f4 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -291,8 +291,8 @@ static struct cmd vlan_cmds[] = { DEF_CMD("-vlanhwtag", IFCAP_VLAN_HWTAGGING, clearifcap), DEF_CMD("vlanhwfilter", IFCAP_VLAN_HWFILTER, setifcap), DEF_CMD("-vlanhwfilter", IFCAP_VLAN_HWFILTER, clearifcap), - DEF_CMD("-vlanhwtso", IFCAP_VLAN_HWTSO, clearifcap), DEF_CMD("vlanhwtso", IFCAP_VLAN_HWTSO, setifcap), + DEF_CMD("-vlanhwtso", IFCAP_VLAN_HWTSO, clearifcap), DEF_CMD("vlanhwcsum", IFCAP_VLAN_HWCSUM, setifcap), DEF_CMD("-vlanhwcsum", IFCAP_VLAN_HWCSUM, clearifcap), }; From nobody Sun Jun 25 23:49: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 4Qq73v18RYz4hh9Q; Sun, 25 Jun 2023 23:49: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 4Qq73t6h5zz3whZ; Sun, 25 Jun 2023 23:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687736954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgKMvYVPLME/vpnD4hSgTRzUiAEPB0y3gigeHxcxxQM=; b=bj6S2/e1TeuBzwBM341xt4y3PXFae2XULOyhcsYTVx5BpcdKFXQ0w9upIzrX0nF9En7Qjo EWXuvKqsPZX+g4LIPfcuySwYLO0L08+JxZuh97WtBBqls3XryXgqBvJzTrYXk6+GdRVVPO ctE9wgWBlTnbr0wlxMKfO6tz3k+eXr2USl13rgrv5ugmDlvSmlNRTOOG1QHK08FO7QIBPB fKx6yxa/1T880rytGyL9oP+A6vN56rdewySZuCUO0bzV8o7npNPz36RCrQUxEtlx31/52z SR9/WcIJSJeAiHgmpcWN/WXyxwN2gFnYYHk6v2rQBB5Y/Uj9BnKErtaLfkyUig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687736954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgKMvYVPLME/vpnD4hSgTRzUiAEPB0y3gigeHxcxxQM=; b=YYipbKH1bDEsOeNpnd6pSLe5qS3DL706+dioGr4MCP9H4rYF6MlbIVWkbvMts+0Xgb2tKy UyP7wWOOLl5kasmmtpLmn+Y+AnPrDGb8Q3rylc/OMGU7JHAK1xpKWXPNYYrP81CT2ZlSJp pbH+xIaLLYMn260rmlYgThdGvsl6gdSaP4MK1cCKNOFrB826i6j+eeTnnMYLKXBB+lcrfn 0w6P/nB9/XpTzGvF6eNSdVBqrCrY1x2ALM+dWmQiC23WKvlq+Y04bVAECaN3bEFHVNHQVN 8OtSE7c98YJzCF8SB0/UJLfuPOM2d1+6Qb91u+fPkMho0LqXxaFxrDcuZTXFCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687736954; a=rsa-sha256; cv=none; b=fkOtBkB5Y13YyJUstZND5nitB6Sf+/NyZOlBhm6FTp95LCosmvyGOQAFK7OD1lcPcWCgbe SmI71qmYqe4luflgklAlkgK/GVVw0dkZyBEk4hnO+3IkBxBMYWAGD/TkKIhITHYUcGvb/N cFmHtMyGAfdWzgqvJ6Vr0es+0P/Sq7ejjLdDpPURfJrmC3Xw1l//L/dvVYWXBYyRsi4BfG 248yfcPI+KFajrUItyqO+NtBdK+fX7BxWOmGzNgMJV2uh4IBhKE/v/WFX5bDsfuDpLV91I AOmQeuV67Pyq6btviovebYk0jhZ4ATBsM64p3JXXWUKErV1Qq3oz0c65gy/8MA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq73t5nN5znRx; Sun, 25 Jun 2023 23:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PNnE57056462; Sun, 25 Jun 2023 23:49:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PNnE1d056461; Sun, 25 Jun 2023 23:49:14 GMT (envelope-from git) Date: Sun, 25 Jun 2023 23:49:14 GMT Message-Id: <202306252349.35PNnE1d056461@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: ee0aa1ce12b3 - main - caroot: add new certs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ee0aa1ce12b3caea34477a31e9d2111a329e33b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ee0aa1ce12b3caea34477a31e9d2111a329e33b9 commit ee0aa1ce12b3caea34477a31e9d2111a329e33b9 Author: Kyle Evans AuthorDate: 2023-06-25 23:47:49 +0000 Commit: Kyle Evans CommitDate: 2023-06-25 23:49:07 +0000 caroot: add new certs Based on dates, these were likely just missed in the last update... add them now. - Twenty (20) new --- secure/caroot/trusted/BJCA_Global_Root_CA1.pem | 135 ++++++++++++++++++++ secure/caroot/trusted/BJCA_Global_Root_CA2.pem | 67 ++++++++++ secure/caroot/trusted/Certainly_Root_E1.pem | 66 ++++++++++ secure/caroot/trusted/Certainly_Root_R1.pem | 134 ++++++++++++++++++++ .../caroot/trusted/D-TRUST_BR_Root_CA_1_2020.pem | 79 ++++++++++++ .../caroot/trusted/D-TRUST_EV_Root_CA_1_2020.pem | 79 ++++++++++++ .../trusted/DigiCert_TLS_ECC_P384_Root_G5.pem | 67 ++++++++++ .../trusted/DigiCert_TLS_RSA4096_Root_G5.pem | 134 ++++++++++++++++++++ .../trusted/E-Tugra_Global_Root_CA_ECC_v3.pem | 73 +++++++++++ .../trusted/E-Tugra_Global_Root_CA_RSA_v3.pem | 140 +++++++++++++++++++++ .../caroot/trusted/HARICA_TLS_ECC_Root_CA_2021.pem | 68 ++++++++++ .../caroot/trusted/HARICA_TLS_RSA_Root_CA_2021.pem | 136 ++++++++++++++++++++ secure/caroot/trusted/HiPKI_Root_CA_-_G1.pem | 134 ++++++++++++++++++++ secure/caroot/trusted/ISRG_Root_X2.pem | 67 ++++++++++ .../trusted/Security_Communication_ECC_RootCA1.pem | 67 ++++++++++ .../trusted/Security_Communication_RootCA3.pem | 135 ++++++++++++++++++++ secure/caroot/trusted/Telia_Root_CA_v2.pem | 138 ++++++++++++++++++++ secure/caroot/trusted/TunTrust_Root_CA.pem | 139 ++++++++++++++++++++ secure/caroot/trusted/vTrus_ECC_Root_CA.pem | 67 ++++++++++ secure/caroot/trusted/vTrus_Root_CA.pem | 134 ++++++++++++++++++++ 20 files changed, 2059 insertions(+) diff --git a/secure/caroot/trusted/BJCA_Global_Root_CA1.pem b/secure/caroot/trusted/BJCA_Global_Root_CA1.pem new file mode 100644 index 000000000000..889f140decc8 --- /dev/null +++ b/secure/caroot/trusted/BJCA_Global_Root_CA1.pem @@ -0,0 +1,135 @@ +## +## BJCA Global Root CA1 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 55:6f:65:e3:b4:d9:90:6a:1b:09:d1:6c:3e:c0:6c:20 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = CN, O = BEIJING CERTIFICATE AUTHORITY, CN = BJCA Global Root CA1 + Validity + Not Before: Dec 19 03:16:17 2019 GMT + Not After : Dec 12 03:16:17 2044 GMT + Subject: C = CN, O = BEIJING CERTIFICATE AUTHORITY, CN = BJCA Global Root CA1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:f1:66:08:bd:d9:c5:15:61:cb:84:04:41:a5:69: + 37:77:1d:c1:b0:7b:fa:c3:77:48:90:13:72:64:d1: + b8:7c:90:35:9d:18:79:88:e3:97:01:3c:47:81:f2: + 0e:a2:98:0d:9e:3f:37:e0:19:b2:90:f2:46:1c:92: + b1:3a:61:ce:fa:b7:46:9e:03:86:d7:33:6e:ed:f7: + 45:8c:76:37:de:6e:96:91:f7:d7:7e:2b:87:17:d5: + 8b:35:ee:84:91:72:57:dc:60:c3:c3:b9:e7:c7:67: + 24:23:4f:63:0a:63:f6:66:7d:4b:55:a7:3f:78:64: + 49:69:12:97:e0:4c:0d:d3:09:a0:32:30:3a:fa:9f: + c0:f2:9c:c5:12:2a:2e:1c:b5:04:33:da:a4:38:11: + 6a:de:c6:18:f6:47:3a:22:41:87:22:fc:c4:89:28: + 54:d8:8c:a5:30:0a:f8:17:16:ca:ac:37:fd:79:a7: + 91:17:78:38:99:ad:58:ed:b2:de:cc:89:7d:03:9c: + b3:89:65:e7:e3:3b:b1:22:86:8f:06:6d:78:07:fd: + 91:12:7f:b0:6b:1c:89:0d:f9:b8:cb:74:5b:07:c2: + c8:f4:35:d1:64:63:7a:e9:6e:9a:28:d6:30:bd:e6: + 1b:dd:15:af:84:ea:9c:c7:ca:f5:0e:ea:f2:5d:29: + 87:8f:69:73:39:be:2e:24:6f:45:21:ac:c5:d4:69: + 25:06:83:ad:7a:48:85:13:2c:0d:06:b8:6c:79:56: + fc:a3:67:32:81:f5:57:a5:ca:57:42:69:e9:5c:24: + 61:ef:e2:30:18:4e:44:98:55:6f:7a:c2:93:d8:19: + b6:de:7c:47:8a:11:4e:49:47:db:28:94:02:0b:94: + 4a:2c:f9:12:d0:4f:e8:31:7e:6c:7a:bf:a6:3f:9b: + 39:3d:02:16:a3:18:b3:67:ac:5b:3f:2c:83:2b:67: + 39:81:5c:b9:7e:94:d5:64:dd:9e:8f:6e:ae:e8:7c: + 5b:b4:d7:6a:47:48:d7:7e:b3:d4:2d:8e:56:76:4e: + cf:69:f1:6e:44:6c:d4:24:ea:8d:24:a1:18:bf:bd: + 57:fe:a9:99:35:b5:db:10:77:b8:3d:48:ba:d6:c1: + e7:f1:23:3e:d7:df:85:9d:27:3c:d4:40:bd:0a:0c: + bd:f5:e7:8d:25:d6:81:74:87:46:d4:29:75:a2:42: + 6c:f7:73:89:e7:7d:bf:7a:4a:1f:d3:22:c9:15:55: + cf:df:6f:7c:55:d0:a4:8b:07:11:37:5f:83:a6:26: + 57:a6:01:5b:7e:fe:58:68:07:a9:e9:7a:d9:b9:e8: + ff:50:1f:ab:c2:b4:c0:ce:e8:ea:fd:0f:bd:8d:4d: + b8:bc:71 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + C5:EF:ED:CC:D8:8D:21:C6:48:E4:E3:D7:14:2E:A7:16:93:E5:98:01 + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: sha256WithRSAEncryption + 52:82:ac:21:34:1f:23:f2:a2:d8:f9:b8:af:37:36:20:89:d1: + 37:03:d6:69:9f:b8:61:10:ba:a2:31:98:59:47:e8:d1:0d:25: + 1e:15:41:0c:e0:2a:55:d5:57:52:cb:f8:e4:c7:69:a3:1d:4d: + 71:02:5e:5f:21:45:60:48:5c:09:8e:49:10:c1:04:dc:a9:62: + 6b:02:f0:43:c8:4e:9d:38:49:74:c9:32:70:54:6d:c1:47:fc: + 8e:b4:36:9e:d4:9c:bd:dd:20:d6:53:c9:18:a9:b5:56:b9:76: + 8b:95:67:66:ee:bd:98:fe:ae:ef:be:6e:fb:60:f6:fd:59:c6: + 2a:1b:3f:23:4a:94:24:30:27:c8:89:bc:eb:44:24:9a:cb:3d: + be:4f:d5:7a:ce:8e:17:cb:62:c1:d9:de:1e:0e:7a:ff:43:86: + 34:52:bc:61:3f:3c:5f:bb:d9:76:b4:53:bc:97:b3:fe:8a:4c: + 12:2e:2b:f3:d7:ce:e1:a2:ff:dd:7b:70:fb:3b:a1:4d:a4:63: + 02:fd:38:97:95:3f:05:70:a0:6b:df:62:81:43:8b:b4:59:0d: + 4a:8c:54:9c:c5:bb:81:9f:cd:7d:a5:ef:0b:25:1e:3a:20:db: + 1c:fc:1f:98:67:02:0a:d4:73:44:13:db:51:84:1a:55:03:56: + e0:00:7e:74:06:ff:38:c4:72:1d:d3:a8:3f:68:31:5d:d3:09: + c7:2e:8c:5b:63:e0:e8:dc:1e:d2:ec:61:1e:f2:de:e5:ef:f6: + 99:76:60:2d:1e:94:72:71:c6:0b:2a:32:c7:92:4e:d5:46:d7: + 1d:f9:a9:19:0a:c8:fa:95:ce:6d:23:98:aa:0b:38:ad:9a:56: + 0d:6f:8d:f1:31:00:88:c1:17:9c:cd:19:36:35:fe:55:53:a0: + e0:3c:33:5f:96:5e:e2:32:e9:df:33:bb:06:4a:a9:d8:84:73: + ce:77:d2:c6:ac:71:e1:5c:a3:1d:0c:bb:0a:df:5f:e2:a3:71: + d8:da:37:5a:a0:78:2b:f4:d4:7d:eb:76:ed:f2:61:70:a5:65: + 9a:d3:89:34:18:ab:fb:72:3e:d7:b4:3d:79:5c:d8:1f:a1:33: + 7b:d9:82:50:0c:93:17:aa:6c:dc:c2:82:bb:02:57:36:af:98: + 27:2a:39:50:e1:b0:89:f5:25:97:7e:47:68:10:b4:ec:73:ca: + b3:97:d1:24:dc:f6:62:a0:28:d3:b5:a3:b8:64:b7:88:62:42: + cf:9d:53:cd:99:be:64:68:8f:4f:1e:12:48:f7:d2:29:c3:98: + 28:ca:f2:32:0b:93:8c:29:4f:3c:60:32:cd:05:96:61:ec:f2: + af:fe:b3:70:2c:2e:a6:f2 +SHA1 Fingerprint=D5:EC:8D:7B:4C:BA:79:F4:E7:E8:CB:9D:6B:AE:77:83:10:03:21:6A +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIQVW9l47TZkGobCdFsPsBsIDANBgkqhkiG9w0BAQsFADBU +MQswCQYDVQQGEwJDTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRI +T1JJVFkxHTAbBgNVBAMMFEJKQ0EgR2xvYmFsIFJvb3QgQ0ExMB4XDTE5MTIxOTAz +MTYxN1oXDTQ0MTIxMjAzMTYxN1owVDELMAkGA1UEBhMCQ04xJjAkBgNVBAoMHUJF +SUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQDDBRCSkNBIEdsb2Jh +bCBSb290IENBMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPFmCL3Z +xRVhy4QEQaVpN3cdwbB7+sN3SJATcmTRuHyQNZ0YeYjjlwE8R4HyDqKYDZ4/N+AZ +spDyRhySsTphzvq3Rp4Dhtczbu33RYx2N95ulpH3134rhxfVizXuhJFyV9xgw8O5 +58dnJCNPYwpj9mZ9S1WnP3hkSWkSl+BMDdMJoDIwOvqfwPKcxRIqLhy1BDPapDgR +at7GGPZHOiJBhyL8xIkoVNiMpTAK+BcWyqw3/XmnkRd4OJmtWO2y3syJfQOcs4ll +5+M7sSKGjwZteAf9kRJ/sGsciQ35uMt0WwfCyPQ10WRjeulumijWML3mG90Vr4Tq +nMfK9Q7q8l0ph49pczm+LiRvRSGsxdRpJQaDrXpIhRMsDQa4bHlW/KNnMoH1V6XK +V0Jp6VwkYe/iMBhORJhVb3rCk9gZtt58R4oRTklH2yiUAguUSiz5EtBP6DF+bHq/ +pj+bOT0CFqMYs2esWz8sgytnOYFcuX6U1WTdno9uruh8W7TXakdI136z1C2OVnZO +z2nxbkRs1CTqjSShGL+9V/6pmTW12xB3uD1IutbB5/EjPtffhZ0nPNRAvQoMvfXn +jSXWgXSHRtQpdaJCbPdzied9v3pKH9MiyRVVz99vfFXQpIsHETdfg6YmV6YBW37+ +WGgHqel62bno/1Afq8K0wM7o6v0PvY1NuLxxAgMBAAGjQjBAMB0GA1UdDgQWBBTF +7+3M2I0hxkjk49cULqcWk+WYATAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE +AwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAUoKsITQfI/Ki2Pm4rzc2IInRNwPWaZ+4 +YRC6ojGYWUfo0Q0lHhVBDOAqVdVXUsv45Mdpox1NcQJeXyFFYEhcCY5JEMEE3Kli +awLwQ8hOnThJdMkycFRtwUf8jrQ2ntScvd0g1lPJGKm1Vrl2i5VnZu69mP6u775u ++2D2/VnGKhs/I0qUJDAnyIm860Qkmss9vk/Ves6OF8tiwdneHg56/0OGNFK8YT88 +X7vZdrRTvJez/opMEi4r89fO4aL/3Xtw+zuhTaRjAv04l5U/BXCga99igUOLtFkN +SoxUnMW7gZ/NfaXvCyUeOiDbHPwfmGcCCtRzRBPbUYQaVQNW4AB+dAb/OMRyHdOo +P2gxXdMJxy6MW2Pg6Nwe0uxhHvLe5e/2mXZgLR6UcnHGCyoyx5JO1UbXHfmpGQrI ++pXObSOYqgs4rZpWDW+N8TEAiMEXnM0ZNjX+VVOg4DwzX5Ze4jLp3zO7Bkqp2IRz +znfSxqxx4VyjHQy7Ct9f4qNx2No3WqB4K/TUfet27fJhcKVlmtOJNBir+3I+17Q9 +eVzYH6Eze9mCUAyTF6ps3MKCuwJXNq+YJyo5UOGwifUll35HaBC07HPKs5fRJNz2 +YqAo07WjuGS3iGJCz51TzZm+ZGiPTx4SSPfSKcOYKMryMguTjClPPGAyzQWWYezy +r/6zcCwupvI= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/BJCA_Global_Root_CA2.pem b/secure/caroot/trusted/BJCA_Global_Root_CA2.pem new file mode 100644 index 000000000000..da44a530a038 --- /dev/null +++ b/secure/caroot/trusted/BJCA_Global_Root_CA2.pem @@ -0,0 +1,67 @@ +## +## BJCA Global Root CA2 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 2c:17:08:7d:64:2a:c0:fe:85:18:59:06:cf:b4:4a:eb + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = CN, O = BEIJING CERTIFICATE AUTHORITY, CN = BJCA Global Root CA2 + Validity + Not Before: Dec 19 03:18:21 2019 GMT + Not After : Dec 12 03:18:21 2044 GMT + Subject: C = CN, O = BEIJING CERTIFICATE AUTHORITY, CN = BJCA Global Root CA2 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:9d:cb:80:91:8d:53:67:b5:b9:50:b1:03:f8:e5: + 49:1f:41:22:09:b0:51:52:58:d6:2b:34:8f:c5:12: + 46:14:c5:8b:2f:2c:84:ff:2c:6e:a8:d5:f1:09:e3: + 03:21:14:c4:43:3d:7c:c1:2c:c4:4b:6a:4a:cd:e9: + 87:e0:7d:f6:22:be:fa:4a:51:b8:30:8a:fd:e1:de: + 18:12:0a:f6:47:b7:e7:17:bf:27:8a:d4:41:4c:96: + 3c:60:96:c1:fd:15:1c + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Subject Key Identifier: + D2:4A:B1:51:7F:06:F0:D1:82:1F:4E:6E:5F:AB:83:FC:48:D4:B0:91 + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA384 + 30:65:02:30:1a:bc:5b:d7:fe:a9:d2:54:0e:4a:5d:d2:6d:b1: + 40:dc:f4:43:d5:d2:4a:99:19:12:56:80:f7:83:34:e1:35:4e: + 48:6d:04:0f:57:31:30:30:2d:b1:aa:9d:03:38:db:06:02:31: + 00:cb:cc:87:53:cb:7a:df:20:51:73:90:c0:a8:5b:61:d0:c5: + 50:39:fd:85:fe:c1:e3:78:f8:a6:d6:4b:bd:9b:87:8f:0f:e5: + d6:53:96:ab:3c:c8:40:da:61:f7:53:a3:f7 +SHA1 Fingerprint=F4:27:86:EB:6E:B8:6D:88:31:67:02:FB:BA:66:A4:53:00:AA:7A:A6 +-----BEGIN CERTIFICATE----- +MIICJTCCAaugAwIBAgIQLBcIfWQqwP6FGFkGz7RK6zAKBggqhkjOPQQDAzBUMQsw +CQYDVQQGEwJDTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJ +VFkxHTAbBgNVBAMMFEJKQ0EgR2xvYmFsIFJvb3QgQ0EyMB4XDTE5MTIxOTAzMTgy +MVoXDTQ0MTIxMjAzMTgyMVowVDELMAkGA1UEBhMCQ04xJjAkBgNVBAoMHUJFSUpJ +TkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQDDBRCSkNBIEdsb2JhbCBS +b290IENBMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABJ3LgJGNU2e1uVCxA/jlSR9B +IgmwUVJY1is0j8USRhTFiy8shP8sbqjV8QnjAyEUxEM9fMEsxEtqSs3ph+B99iK+ ++kpRuDCK/eHeGBIK9ke35xe/J4rUQUyWPGCWwf0VHKNCMEAwHQYDVR0OBBYEFNJK +sVF/BvDRgh9Obl+rg/xI1LCRMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD +AgEGMAoGCCqGSM49BAMDA2gAMGUCMBq8W9f+qdJUDkpd0m2xQNz0Q9XSSpkZElaA +94M04TVOSG0ED1cxMDAtsaqdAzjbBgIxAMvMh1PLet8gUXOQwKhbYdDFUDn9hf7B +43j4ptZLvZuHjw/l1lOWqzzIQNph91Oj9w== +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Certainly_Root_E1.pem b/secure/caroot/trusted/Certainly_Root_E1.pem new file mode 100644 index 000000000000..0750f7128ae6 --- /dev/null +++ b/secure/caroot/trusted/Certainly_Root_E1.pem @@ -0,0 +1,66 @@ +## +## Certainly Root E1 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 06:25:33:b1:47:03:33:27:5c:f9:8d:9a:b9:bf:cc:f8 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = US, O = Certainly, CN = Certainly Root E1 + Validity + Not Before: Apr 1 00:00:00 2021 GMT + Not After : Apr 1 00:00:00 2046 GMT + Subject: C = US, O = Certainly, CN = Certainly Root E1 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:de:6f:f8:7f:1c:df:ed:f9:47:87:86:b1:a4:c0: + 8a:f8:82:97:80:ea:8f:c8:4a:5e:2a:7d:88:68:a7: + 01:62:14:91:24:7a:5c:9e:a3:17:7d:8a:86:21:34: + 18:50:1b:10:de:d0:37:4b:26:c7:19:60:80:e9:34: + bd:60:19:36:40:d6:29:87:09:3c:91:7a:f6:bc:13: + 23:dd:59:4e:04:5e:cf:c8:02:1c:18:53:c1:31:d8: + da:20:e9:44:8d:e4:76 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + F3:28:18:CB:64:75:EE:29:2A:EB:ED:AE:23:58:38:85:EB:C8:22:07 + Signature Algorithm: ecdsa-with-SHA384 + 30:65:02:31:00:b1:8e:5a:20:c3:b2:19:62:4d:de:b0:4f:df: + 6e:d2:70:8a:f1:9f:7e:6a:8c:e6:ba:de:83:69:ca:69:b3:a9: + 05:b5:96:92:17:87:c2:d2:ea:d0:7b:ce:d8:41:5b:7c:ae:02: + 30:46:de:ea:cb:5d:9a:ec:32:c2:65:16:b0:4c:30:5c:30:f3: + da:4e:73:86:06:d8:ce:89:04:48:37:37:f8:dd:33:51:9d:70: + af:7b:55:d8:01:2e:7d:05:64:0e:86:b8:91 +SHA1 Fingerprint=F9:E1:6D:DC:01:89:CF:D5:82:45:63:3E:C5:37:7D:C2:EB:93:6F:2B +-----BEGIN CERTIFICATE----- +MIIB9zCCAX2gAwIBAgIQBiUzsUcDMydc+Y2aub/M+DAKBggqhkjOPQQDAzA9MQsw +CQYDVQQGEwJVUzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0YWlu +bHkgUm9vdCBFMTAeFw0yMTA0MDEwMDAwMDBaFw00NjA0MDEwMDAwMDBaMD0xCzAJ +BgNVBAYTAlVTMRIwEAYDVQQKEwlDZXJ0YWlubHkxGjAYBgNVBAMTEUNlcnRhaW5s +eSBSb290IEUxMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE3m/4fxzf7flHh4axpMCK ++IKXgOqPyEpeKn2IaKcBYhSRJHpcnqMXfYqGITQYUBsQ3tA3SybHGWCA6TS9YBk2 +QNYphwk8kXr2vBMj3VlOBF7PyAIcGFPBMdjaIOlEjeR2o0IwQDAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU8ygYy2R17ikq6+2uI1g4 +hevIIgcwCgYIKoZIzj0EAwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozm +ut6Dacpps6kFtZaSF4fC0urQe87YQVt8rgIwRt7qy12a7DLCZRawTDBcMPPaTnOG +BtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/Certainly_Root_R1.pem b/secure/caroot/trusted/Certainly_Root_R1.pem new file mode 100644 index 000000000000..a4e6f28e33a6 --- /dev/null +++ b/secure/caroot/trusted/Certainly_Root_R1.pem @@ -0,0 +1,134 @@ +## +## Certainly Root R1 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 8e:0f:f9:4b:90:71:68:65:33:54:f4:d4:44:39:b7:e0 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = US, O = Certainly, CN = Certainly Root R1 + Validity + Not Before: Apr 1 00:00:00 2021 GMT + Not After : Apr 1 00:00:00 2046 GMT + Subject: C = US, O = Certainly, CN = Certainly Root R1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:d0:36:d4:1f:ea:dd:ab:e4:d1:b6:e6:fb:22:c0: + dd:13:0d:6a:7b:22:13:1c:97:3c:68:63:66:32:9c: + 03:b5:8d:a4:81:83:da:78:30:11:cf:dc:b2:2b:be: + 92:bf:8e:e4:c4:13:be:a4:68:4c:da:02:68:16:74: + be:b2:dd:04:e4:6b:2a:dd:37:1f:60:2c:db:f5:f7: + a1:7c:95:b7:0c:70:86:2e:f1:3a:ef:52:f7:cc:d3: + 9b:f9:8b:be:0e:df:31:b7:9d:68:5c:92:a6:f5:e5: + f3:0a:34:b5:ff:7b:a2:e4:87:a1:c6:af:17:00:ef: + 03:91:ed:a9:1c:4e:71:3d:d2:8b:6c:89:f4:78:86: + e6:6a:49:a0:ce:b5:d2:b0:ab:9b:f6:f4:d4:2e:e3: + 72:f9:36:c6:eb:15:b7:25:8c:3a:fc:25:0d:b3:22: + 73:21:74:c8:4a:96:61:92:f5:2f:0b:18:a5:f4:ad: + e2:ee:41:bd:01:79:fa:96:8c:8d:17:02:30:b4:f9: + af:78:1a:8c:b4:36:10:10:07:05:70:d0:f4:31:90: + 8a:51:c5:86:26:79:b2:11:88:5e:c5:f0:0a:54:cd: + 49:a6:bf:02:9c:d2:44:a7:ed:e3:78:ef:46:5e:6d: + 71:d1:79:70:1c:46:5f:51:e9:c9:37:dc:5f:7e:69: + 7b:41:df:34:45:e0:3b:84:f4:a1:8a:0a:36:9e:37: + cc:62:52:e1:89:0d:28:f9:7a:23:b1:0d:3d:3d:9a: + fd:9d:81:ef:2c:90:c0:7b:44:4e:bb:49:e0:0e:4a: + 56:92:bc:cb:b5:dd:79:17:89:91:de:61:89:74:92: + a8:e3:32:85:be:4e:85:a4:4b:59:cb:2b:c5:78:8e: + 71:54:d0:02:37:99:8c:e5:49:ea:e0:54:72:a4:11: + 06:2f:0b:8c:c1:5b:be:b5:a1:b0:53:6e:9c:b8:60: + 91:1f:59:6b:f9:2d:f4:94:0a:97:b5:ec:c5:76:03: + 54:1b:65:52:ba:4c:92:56:51:35:a0:40:d8:29:db: + ae:52:76:3b:2d:30:40:9b:8a:d0:42:56:b4:b7:88: + 01:a4:87:3b:53:96:cd:a3:16:8f:f3:66:aa:17:b1: + c7:60:e0:c1:43:05:0c:ee:9b:5b:60:6f:06:5c:87: + 5b:27:f9:40:11:9e:9c:33:c1:b7:e5:35:57:05:7f: + 27:ce:17:20:8c:1c:fc:f1:fb:da:31:29:49:ed:f5: + 0b:84:a7:4f:c1:f6:4e:c2:28:9c:fa:ee:e0:af:07: + fb:33:11:7a:21:4f:0b:21:10:b6:40:3a:ab:22:3a: + 04:9c:8b:9b:84:86:72:9a:d2:a7:a5:c4:b4:75:91: + a9:2b:23 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + E0:AA:3F:25:8D:9F:44:5C:C1:3A:E8:2E:AE:77:4C:84:3E:67:0C:F4 + Signature Algorithm: sha256WithRSAEncryption + b9:57:af:b8:12:da:57:83:8f:68:0b:33:1d:03:53:55:f4:95: + 70:e4:2b:3d:b0:39:eb:fa:89:62:fd:f7:d6:18:04:2f:21:34: + dd:f1:68:f0:d5:96:5a:de:c2:80:a3:c1:8d:c6:6a:f7:59:77: + ae:15:64:cf:5b:79:05:77:66:ea:8c:d3:6b:0d:dd:f1:59:2c: + c1:33:a5:30:80:15:45:07:45:1a:31:22:b6:92:00:ab:99:4d: + 3a:8f:77:af:a9:22:ca:2f:63:ca:15:d6:c7:c6:f0:3d:6c:fc: + 1c:0d:98:10:61:9e:11:a2:22:d7:0a:f2:91:7a:6b:39:0e:2f: + 30:c3:36:49:9f:e0:e9:0f:02:44:50:37:94:55:7d:ea:9f:f6: + 3b:ba:94:a5:4c:e9:bc:3e:51:b4:e8:ca:92:36:54:6d:5c:25: + 28:da:dd:ad:14:fd:d3:ee:e2:22:05:eb:d0:f2:b7:68:12:d7: + 5a:8a:41:1a:c6:92:a5:5a:3b:63:45:4f:bf:e1:3a:77:22:2f: + 5c:bf:46:f9:5a:03:85:13:42:5f:ca:de:53:d7:62:b5:a6:35: + 04:c2:47:ff:99:fd:84:df:5c:ce:e9:5e:80:28:41:f2:7d:e7: + 1e:90:d8:4f:76:3e:82:3c:0d:fc:a5:03:fa:7b:1a:d9:45:1e: + 60:da:c4:8e:f9:fc:2b:c9:7b:95:c5:2a:ff:aa:89:df:82:31: + 0f:72:ff:0c:27:d7:0a:1e:56:00:50:1e:0c:90:c1:96:b5:d8: + 14:85:bb:a7:0d:16:c1:f8:07:24:1b:ba:85:a1:1a:05:09:80: + ba:95:63:c9:3a:ec:25:9f:7f:9d:ba:a4:47:15:9b:44:70:f1: + 6a:4b:d6:38:5e:43:f3:18:7e:50:6e:e9:5a:28:e6:65:e6:77: + 1b:3a:fd:1d:be:03:26:a3:db:d4:e1:bb:7e:96:27:2b:1d:ee: + a4:fb:da:25:54:13:03:de:39:c6:c3:1f:4d:90:ec:8f:1b:4a: + d2:1c:ed:85:95:38:50:79:46:d6:c1:90:50:31:a9:5c:9a:6e: + 1d:f5:33:56:8b:a7:99:d2:f2:c8:2c:33:93:92:30:c7:4e:8c: + 65:33:10:64:17:fd:24:17:96:d1:8d:c2:3a:6a:2b:eb:13:8b: + 44:f2:21:f3:4a:1a:b7:77:5f:d7:ed:88:a4:72:e5:39:1f:95: + 9d:be:67:c1:70:11:3d:bb:f4:f8:49:b7:e3:26:97:3a:9f:d2: + 5f:7c:fb:c0:99:7c:39:29:e0:7b:1d:bf:0d:a7:8f:d2:29:34: + 6e:24:15:cb:de:90:5e:bf:1a:c4:66:ea:c2:e6:ba:39:5f:8a: + 99:a9:41:59:07:b0:2c:af +SHA1 Fingerprint=A0:50:EE:0F:28:71:F4:27:B2:12:6D:6F:50:96:25:BA:CC:86:42:AF +-----BEGIN CERTIFICATE----- +MIIFRzCCAy+gAwIBAgIRAI4P+UuQcWhlM1T01EQ5t+AwDQYJKoZIhvcNAQELBQAw +PTELMAkGA1UEBhMCVVMxEjAQBgNVBAoTCUNlcnRhaW5seTEaMBgGA1UEAxMRQ2Vy +dGFpbmx5IFJvb3QgUjEwHhcNMjEwNDAxMDAwMDAwWhcNNDYwNDAxMDAwMDAwWjA9 +MQswCQYDVQQGEwJVUzESMBAGA1UEChMJQ2VydGFpbmx5MRowGAYDVQQDExFDZXJ0 +YWlubHkgUm9vdCBSMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANA2 +1B/q3avk0bbm+yLA3RMNansiExyXPGhjZjKcA7WNpIGD2ngwEc/csiu+kr+O5MQT +vqRoTNoCaBZ0vrLdBORrKt03H2As2/X3oXyVtwxwhi7xOu9S98zTm/mLvg7fMbed +aFySpvXl8wo0tf97ouSHocavFwDvA5HtqRxOcT3Si2yJ9HiG5mpJoM610rCrm/b0 +1C7jcvk2xusVtyWMOvwlDbMicyF0yEqWYZL1LwsYpfSt4u5BvQF5+paMjRcCMLT5 +r3gajLQ2EBAHBXDQ9DGQilHFhiZ5shGIXsXwClTNSaa/ApzSRKft43jvRl5tcdF5 +cBxGX1HpyTfcX35pe0HfNEXgO4T0oYoKNp43zGJS4YkNKPl6I7ENPT2a/Z2B7yyQ +wHtETrtJ4A5KVpK8y7XdeReJkd5hiXSSqOMyhb5OhaRLWcsrxXiOcVTQAjeZjOVJ +6uBUcqQRBi8LjMFbvrWhsFNunLhgkR9Za/kt9JQKl7XsxXYDVBtlUrpMklZRNaBA +2CnbrlJ2Oy0wQJuK0EJWtLeIAaSHO1OWzaMWj/Nmqhexx2DgwUMFDO6bW2BvBlyH +Wyf5QBGenDPBt+U1VwV/J84XIIwc/PH72jEpSe31C4SnT8H2TsIonPru4K8H+zMR +eiFPCyEQtkA6qyI6BJyLm4SGcprSp6XEtHWRqSsjAgMBAAGjQjBAMA4GA1UdDwEB +/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTgqj8ljZ9EXME66C6u +d0yEPmcM9DANBgkqhkiG9w0BAQsFAAOCAgEAuVevuBLaV4OPaAszHQNTVfSVcOQr +PbA56/qJYv331hgELyE03fFo8NWWWt7CgKPBjcZq91l3rhVkz1t5BXdm6ozTaw3d +8VkswTOlMIAVRQdFGjEitpIAq5lNOo93r6kiyi9jyhXWx8bwPWz8HA2YEGGeEaIi +1wrykXprOQ4vMMM2SZ/g6Q8CRFA3lFV96p/2O7qUpUzpvD5RtOjKkjZUbVwlKNrd +rRT90+7iIgXr0PK3aBLXWopBGsaSpVo7Y0VPv+E6dyIvXL9G+VoDhRNCX8reU9di +taY1BMJH/5n9hN9czulegChB8n3nHpDYT3Y+gjwN/KUD+nsa2UUeYNrEjvn8K8l7 +lcUq/6qJ34IxD3L/DCfXCh5WAFAeDJDBlrXYFIW7pw0WwfgHJBu6haEaBQmAupVj +yTrsJZ9/nbqkRxWbRHDxakvWOF5D8xh+UG7pWijmZeZ3Gzr9Hb4DJqPb1OG7fpYn +Kx3upPvaJVQTA945xsMfTZDsjxtK0hzthZU4UHlG1sGQUDGpXJpuHfUzVounmdLy +yCwzk5Iwx06MZTMQZBf9JBeW0Y3COmor6xOLRPIh80oat3df1+2IpHLlOR+Vnb5n +wXARPbv0+Em34yaXOp/SX3z7wJl8OSngex2/DaeP0ik0biQVy96QXr8axGbqwua6 +OV+KmalBWQewLK8= +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/D-TRUST_BR_Root_CA_1_2020.pem b/secure/caroot/trusted/D-TRUST_BR_Root_CA_1_2020.pem new file mode 100644 index 000000000000..758d61032898 --- /dev/null +++ b/secure/caroot/trusted/D-TRUST_BR_Root_CA_1_2020.pem @@ -0,0 +1,79 @@ +## +## D-TRUST BR Root CA 1 2020 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 7c:c9:8f:2b:84:d7:df:ea:0f:c9:65:9a:d3:4b:4d:96 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = DE, O = D-Trust GmbH, CN = D-TRUST BR Root CA 1 2020 + Validity + Not Before: Feb 11 09:45:00 2020 GMT + Not After : Feb 11 09:44:59 2035 GMT + Subject: C = DE, O = D-Trust GmbH, CN = D-TRUST BR Root CA 1 2020 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:c6:cb:c7:28:d1:fb:84:f5:9a:ef:42:14:20:e1: + 43:6b:6e:75:ad:fc:2b:03:84:d4:76:93:25:d7:59: + 3b:41:65:6b:1e:e6:34:2a:bb:74:f6:12:ce:e8:6d: + e7:ab:e4:3c:4e:3f:44:08:8b:cd:16:71:cb:bf:92: + 99:f4:a4:d7:3c:50:54:52:90:85:83:78:94:67:67: + a3:1c:09:19:3d:75:34:85:de:ed:60:7d:c7:0c:b4: + 41:52:b9:6e:e5:ee:42 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 73:91:10:AB:FF:55:B3:5A:7C:09:25:D5:B2:BA:08:A0:6B:AB:1F:6D + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 CRL Distribution Points: + + Full Name: + URI:http://crl.d-trust.net/crl/d-trust_br_root_ca_1_2020.crl + + Full Name: + URI:ldap://directory.d-trust.net/CN=D-TRUST%20BR%20Root%20CA%201%202020,O=D-Trust%20GmbH,C=DE?certificaterevocationlist + + Signature Algorithm: ecdsa-with-SHA384 + 30:66:02:31:00:94:90:2d:13:fa:e1:63:f8:61:63:e8:ad:85: + 78:54:91:9c:b8:93:38:3e:1a:41:da:40:16:53:42:08:ca:2f: + 8e:f1:3e:81:56:c0:aa:d8:ed:18:c4:b0:ae:f4:3e:fa:26:02: + 31:00:f3:28:e2:c6:db:2b:99:fb:b7:51:b8:24:a3:a4:94:7a: + 1a:3f:e6:36:e2:03:57:33:8a:30:cb:82:c7:d6:14:11:d5:75: + 63:5b:14:95:9c:1f:01:cf:d8:d5:72:a7:0f:3b +SHA1 Fingerprint=1F:5B:98:F0:E3:B5:F7:74:3C:ED:E6:B0:36:7D:32:CD:F4:09:41:67 +-----BEGIN CERTIFICATE----- +MIIC2zCCAmCgAwIBAgIQfMmPK4TX3+oPyWWa00tNljAKBggqhkjOPQQDAzBIMQsw +CQYDVQQGEwJERTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRS +VVNUIEJSIFJvb3QgQ0EgMSAyMDIwMB4XDTIwMDIxMTA5NDUwMFoXDTM1MDIxMTA5 +NDQ1OVowSDELMAkGA1UEBhMCREUxFTATBgNVBAoTDEQtVHJ1c3QgR21iSDEiMCAG +A1UEAxMZRC1UUlVTVCBCUiBSb290IENBIDEgMjAyMDB2MBAGByqGSM49AgEGBSuB +BAAiA2IABMbLxyjR+4T1mu9CFCDhQ2tuda38KwOE1HaTJddZO0Flax7mNCq7dPYS +zuht56vkPE4/RAiLzRZxy7+SmfSk1zxQVFKQhYN4lGdnoxwJGT11NIXe7WB9xwy0 +QVK5buXuQqOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFHOREKv/ +VbNafAkl1bK6CKBrqx9tMA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6g +PKA6hjhodHRwOi8vY3JsLmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X2JyX3Jvb3Rf +Y2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVjdG9yeS5kLXRydXN0Lm5l +dC9DTj1ELVRSVVNUJTIwQlIlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxPPUQtVHJ1 +c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjO +PQQDAwNpADBmAjEAlJAtE/rhY/hhY+ithXhUkZy4kzg+GkHaQBZTQgjKL47xPoFW +wKrY7RjEsK70PvomAjEA8yjixtsrmfu3Ubgko6SUeho/5jbiA1czijDLgsfWFBHV +dWNbFJWcHwHP2NVypw87 +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/D-TRUST_EV_Root_CA_1_2020.pem b/secure/caroot/trusted/D-TRUST_EV_Root_CA_1_2020.pem new file mode 100644 index 000000000000..76991855eaa1 --- /dev/null +++ b/secure/caroot/trusted/D-TRUST_EV_Root_CA_1_2020.pem @@ -0,0 +1,79 @@ +## +## D-TRUST EV Root CA 1 2020 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 5f:02:41:d7:7a:87:7c:4c:03:a3:ac:96:8d:fb:ff:d0 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = DE, O = D-Trust GmbH, CN = D-TRUST EV Root CA 1 2020 + Validity + Not Before: Feb 11 10:00:00 2020 GMT + Not After : Feb 11 09:59:59 2035 GMT + Subject: C = DE, O = D-Trust GmbH, CN = D-TRUST EV Root CA 1 2020 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:f1:0b:dd:86:43:20:19:df:97:85:e8:22:4a:9b: + cf:9d:98:bf:b4:05:26:c9:cb:e3:a6:d2:8f:c5:9e: + 78:7b:31:89:a9:89:ad:27:3c:65:10:82:fc:df:c3: + 9d:4e:f0:33:23:c4:d2:32:f5:1c:b0:df:33:17:5d: + c5:f0:b1:8a:f9:ef:b9:b7:14:ca:29:4a:c2:0f:a9: + 7f:75:65:49:2a:30:67:f4:64:f7:d6:1a:77:da:c3: + c2:97:61:42:7b:49:ad + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 7F:10:01:16:37:3A:A4:28:E4:50:F8:A4:F7:EC:6B:32:B6:FE:E9:8B + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 CRL Distribution Points: + + Full Name: + URI:http://crl.d-trust.net/crl/d-trust_ev_root_ca_1_2020.crl + + Full Name: + URI:ldap://directory.d-trust.net/CN=D-TRUST%20EV%20Root%20CA%201%202020,O=D-Trust%20GmbH,C=DE?certificaterevocationlist + + Signature Algorithm: ecdsa-with-SHA384 + 30:66:02:31:00:ca:3c:c6:2a:75:c2:5e:75:62:39:36:00:60: + 5a:8b:c1:93:99:cc:d9:db:41:3b:3b:87:99:17:3b:d5:cc:4f: + ca:22:f7:a0:80:cb:f9:b4:b1:1b:56:f5:72:d2:fc:19:d1:02: + 31:00:91:f7:30:93:3f:10:46:2b:71:a4:d0:3b:44:9b:c0:29: + 02:05:b2:41:77:51:f3:79:5a:9e:8e:14:a0:4e:42:d2:5b:81: + f3:34:6a:03:e7:22:38:50:5b:ed:19:4f:43:16 +SHA1 Fingerprint=61:DB:8C:21:59:69:03:90:D8:7C:9C:12:86:54:CF:9D:3D:F4:DD:07 +-----BEGIN CERTIFICATE----- +MIIC2zCCAmCgAwIBAgIQXwJB13qHfEwDo6yWjfv/0DAKBggqhkjOPQQDAzBIMQsw +CQYDVQQGEwJERTEVMBMGA1UEChMMRC1UcnVzdCBHbWJIMSIwIAYDVQQDExlELVRS +VVNUIEVWIFJvb3QgQ0EgMSAyMDIwMB4XDTIwMDIxMTEwMDAwMFoXDTM1MDIxMTA5 +NTk1OVowSDELMAkGA1UEBhMCREUxFTATBgNVBAoTDEQtVHJ1c3QgR21iSDEiMCAG +A1UEAxMZRC1UUlVTVCBFViBSb290IENBIDEgMjAyMDB2MBAGByqGSM49AgEGBSuB +BAAiA2IABPEL3YZDIBnfl4XoIkqbz52Yv7QFJsnL46bSj8WeeHsxiamJrSc8ZRCC +/N/DnU7wMyPE0jL1HLDfMxddxfCxivnvubcUyilKwg+pf3VlSSowZ/Rk99Yad9rD +wpdhQntJraOCAQ0wggEJMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFH8QARY3 +OqQo5FD4pPfsazK2/umLMA4GA1UdDwEB/wQEAwIBBjCBxgYDVR0fBIG+MIG7MD6g +PKA6hjhodHRwOi8vY3JsLmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X2V2X3Jvb3Rf +Y2FfMV8yMDIwLmNybDB5oHegdYZzbGRhcDovL2RpcmVjdG9yeS5kLXRydXN0Lm5l +dC9DTj1ELVRSVVNUJTIwRVYlMjBSb290JTIwQ0ElMjAxJTIwMjAyMCxPPUQtVHJ1 +c3QlMjBHbWJILEM9REU/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDAKBggqhkjO +PQQDAwNpADBmAjEAyjzGKnXCXnViOTYAYFqLwZOZzNnbQTs7h5kXO9XMT8oi96CA +y/m0sRtW9XLS/BnRAjEAkfcwkz8QRitxpNA7RJvAKQIFskF3UfN5Wp6OFKBOQtJb +gfM0agPnIjhQW+0ZT0MW +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/DigiCert_TLS_ECC_P384_Root_G5.pem b/secure/caroot/trusted/DigiCert_TLS_ECC_P384_Root_G5.pem new file mode 100644 index 000000000000..a6f2e6a0c771 --- /dev/null +++ b/secure/caroot/trusted/DigiCert_TLS_ECC_P384_Root_G5.pem @@ -0,0 +1,67 @@ +## +## DigiCert TLS ECC P384 Root G5 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 09:e0:93:65:ac:f7:d9:c8:b9:3e:1c:0b:04:2a:2e:f3 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = US, O = "DigiCert, Inc.", CN = DigiCert TLS ECC P384 Root G5 + Validity + Not Before: Jan 15 00:00:00 2021 GMT + Not After : Jan 14 23:59:59 2046 GMT + Subject: C = US, O = "DigiCert, Inc.", CN = DigiCert TLS ECC P384 Root G5 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:c1:44:a1:cf:11:97:50:9a:de:23:82:35:07:cd: + d0:cb:18:9d:d2:f1:7f:77:35:4f:3b:dd:94:72:52: + ed:c2:3b:f8:ec:fa:7b:6b:58:20:ec:99:ae:c9:fc: + 68:b3:75:b9:db:09:ec:c8:13:f5:4e:c6:0a:1d:66: + 30:4c:bb:1f:47:0a:3c:61:10:42:29:7c:a5:08:0e: + e0:22:e9:d3:35:68:ce:9b:63:9f:84:b5:99:4d:58: + a0:8e:f5:54:e7:95:c9 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Subject Key Identifier: + C1:51:45:50:59:AB:3E:E7:2C:5A:FA:20:22:12:07:80:88:7C:11:6A + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: ecdsa-with-SHA384 + 30:65:02:31:00:89:6a:8d:47:e7:ec:fc:6e:55:03:d9:67:6c: + 26:4e:83:c6:fd:c9:fb:2b:13:bc:b7:7a:8c:b4:65:d2:69:69: + 63:13:63:3b:26:50:2e:01:a1:79:06:91:9d:48:bf:c2:be:02: + 30:47:c3:15:7b:b1:a0:91:99:49:93:a8:3c:7c:e8:46:06:8b: + 2c:f2:31:00:94:9d:62:c8:89:bd:19:84:14:e9:a5:fb:01:b8: + 0d:76:43:8c:2e:53:cb:7c:df:0c:17:96:50 +SHA1 Fingerprint=17:F3:DE:5E:9F:0F:19:E9:8E:F6:1F:32:26:6E:20:C4:07:AE:30:EE +-----BEGIN CERTIFICATE----- +MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURp +Z2lDZXJ0IFRMUyBFQ0MgUDM4NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2 +MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJ +bmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQgUm9vdCBHNTB2MBAG +ByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1TzvdlHJS +7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp +0zVozptjn4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICIS +B4CIfBFqMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49 +BAMDA2gAMGUCMQCJao1H5+z8blUD2WdsJk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQ +LgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIxAJSdYsiJvRmEFOml+wG4 +DXZDjC5Ty3zfDBeWUA== +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/DigiCert_TLS_RSA4096_Root_G5.pem b/secure/caroot/trusted/DigiCert_TLS_RSA4096_Root_G5.pem new file mode 100644 index 000000000000..cb58c6a21418 --- /dev/null +++ b/secure/caroot/trusted/DigiCert_TLS_RSA4096_Root_G5.pem @@ -0,0 +1,134 @@ +## +## DigiCert TLS RSA4096 Root G5 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 08:f9:b4:78:a8:fa:7e:da:6a:33:37:89:de:7c:cf:8a + Signature Algorithm: sha384WithRSAEncryption + Issuer: C = US, O = "DigiCert, Inc.", CN = DigiCert TLS RSA4096 Root G5 + Validity + Not Before: Jan 15 00:00:00 2021 GMT + Not After : Jan 14 23:59:59 2046 GMT + Subject: C = US, O = "DigiCert, Inc.", CN = DigiCert TLS RSA4096 Root G5 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:b3:d0:f4:c9:79:11:9d:fd:fc:66:81:e7:cc:d5: + e4:bc:ec:81:3e:6a:35:8e:2e:b7:e7:de:af:f9:07: + 4d:cf:30:9d:ea:09:0b:99:bd:6c:57:da:18:4a:b8: + 78:ac:3a:39:a8:a6:48:ac:2e:72:e5:bd:eb:f1:1a: + cd:e7:a4:03:a9:3f:11:b4:d8:2f:89:16:fb:94:01: + 3d:bb:2f:f8:13:05:a1:78:1c:8e:28:e0:45:e0:83: + f4:59:1b:95:b3:ae:7e:03:45:e5:be:c2:42:fe:ee: + f2:3c:b6:85:13:98:32:9d:16:a8:29:c2:0b:1c:38: + dc:9f:31:77:5c:bf:27:a3:fc:27:ac:b7:2b:bd:74: + 9b:17:2d:f2:81:da:5d:b0:e1:23:17:3e:88:4a:12: + 23:d0:ea:cf:9d:de:03:17:b1:42:4a:a0:16:4c:a4: + 6d:93:e9:3f:3a:ee:3a:7c:9d:58:9d:f4:4e:8f:fc: + 3b:23:c8:6d:b8:e2:05:da:cc:eb:ec:c3:31:f4:d7: + a7:29:54:80:cf:44:5b:4c:6f:30:9e:f3:cc:dd:1f: + 94:43:9d:4d:7f:70:70:0d:d4:3a:d1:37:f0:6c:9d: + 9b:c0:14:93:58:ef:cd:41:38:75:bc:13:03:95:7c: + 7f:e3:5c:e9:d5:0d:d5:e2:7c:10:62:aa:6b:f0:3d: + 76:f3:3f:a3:e8:b0:c1:fd:ef:aa:57:4d:ac:86:a7: + 18:b4:29:c1:2c:0e:bf:64:be:29:8c:d8:02:2d:cd: + 5c:2f:f2:7f:ef:15:f4:0c:15:ac:0a:b0:f1:d3:0d: + 4f:6a:4d:77:97:01:a0:f1:66:b7:b7:ce:ef:ce:ec: + ec:a5:75:ca:ac:e3:e1:63:f7:b8:a1:04:c8:bc:7b: + 3f:5d:2d:16:22:56:ed:48:49:fe:a7:2f:79:30:25: + 9b:ba:6b:2d:3f:9d:3b:c4:17:e7:1d:2e:fb:f2:cf: + a6:fc:e3:14:2c:96:98:21:8c:b4:91:e9:19:60:83: + f2:30:2b:06:73:50:d5:98:3b:06:e9:c7:8a:0c:60: + 8c:28:f8:52:9b:6e:e1:f6:4d:bb:06:24:9b:d7:2b: + 26:3f:fd:2a:2f:71:f5:d6:24:be:7f:31:9e:0f:6d: + e8:8f:4f:4d:a3:3f:ff:35:ea:df:49:5e:41:8f:86: + f9:f1:77:79:4b:1b:b4:a3:5e:2f:fb:46:02:d0:66: + 13:5e:5e:85:4f:ce:d8:70:88:7b:ce:01:b5:96:97: + d7:cd:7d:fd:82:f8:c2:24:c1:ca:01:39:4f:8d:a2: + c1:14:40:1f:9c:66:d5:0c:09:46:d6:f2:d0:d1:48: + 76:56:3a:43:cb:b6:0a:11:39:ba:8c:13:6c:06:b5: + 9e:cf:eb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 51:33:1C:ED:36:40:AF:17:D3:25:CD:69:68:F2:AF:4E:23:3E:B3:41 + X509v3 Key Usage: critical + Digital Signature, Certificate Sign, CRL Sign + X509v3 Basic Constraints: critical + CA:TRUE + Signature Algorithm: sha384WithRSAEncryption + 60:a6:af:5b:5f:57:da:89:db:4b:50:a9:c4:23:35:21:ff:d0: + 61:30:84:91:b7:3f:10:cf:25:8e:c9:bf:46:34:d9:c1:21:26: + 1c:70:19:72:1e:a3:c9:87:fe:a9:43:64:96:3a:c8:53:04:0a: + b6:41:bb:c4:47:00:d9:9f:18:18:3b:b2:0e:f3:34:ea:24:f7: + dd:af:20:60:ae:92:28:5f:36:e7:5d:e4:de:c7:3c:db:50:39: + ad:bb:3d:28:4d:96:7c:76:c6:5b:f4:c1:db:14:a5:ab:19:62: + 07:18:40:5f:97:91:dc:9c:c7:ab:b5:51:0d:e6:69:53:55:cc: + 39:7d:da:c5:11:55:72:c5:3b:8b:89:f8:34:2d:a4:17:e5:17: + e6:99:7d:30:88:21:37:cd:30:17:3d:b8:f2:bc:a8:75:a0:43: + dc:3e:89:4b:90:ae:6d:03:e0:1c:a3:a0:96:09:bb:7d:a3:b7: + 2a:10:44:4b:46:07:34:63:ed:31:b9:04:ee:a3:9b:9a:ae:e6: + 31:78:f4:ea:24:61:3b:ab:58:64:ff:bb:87:27:62:25:81:df: + dc:a1:2f:f6:ed:a7:ff:7a:8f:51:2e:30:f8:a4:01:d2:85:39: + 5f:01:99:96:6f:5a:5b:70:19:46:fe:86:60:3e:ad:80:10:09: + dd:39:25:2f:58:7f:bb:d2:74:f0:f7:46:1f:46:39:4a:d8:53: + d0:f3:2e:3b:71:a5:d4:6f:fc:f3:67:e4:07:8f:dd:26:19:e1: + 8d:5b:fa:a3:93:11:9b:e9:c8:3a:c3:55:68:9a:92:e1:52:76: + 38:e8:e1:ba:bd:fb:4f:d5:ef:b3:e7:48:83:31:f0:82:21:e3: + b6:be:a7:ab:6f:ef:9f:df:4c:cf:01:b8:62:6a:23:3d:e7:09: + 4d:80:1b:7b:30:a4:c3:dd:07:7f:34:be:a4:26:b2:f6:41:e8: + 09:1d:e3:20:98:aa:37:4f:ff:f7:f1:e2:29:70:31:47:3f:74: + d0:14:16:fa:21:8a:02:d5:8a:09:94:77:2e:f2:59:28:8b:7c: + 50:92:0a:66:78:38:83:75:c4:b5:5a:a8:11:c6:e5:c1:9d:66: + 55:cf:53:c4:af:d7:75:85:a9:42:13:56:ec:21:77:81:93:5a: + 0c:ea:96:d9:49:ca:a1:08:f2:97:3b:6d:9b:04:18:24:44:8e: + 7c:01:f2:dc:25:d8:5e:86:9a:b1:39:db:f5:91:32:6a:d1:a6: + 70:8a:a2:f7:de:a4:45:85:26:a8:1e:8c:5d:29:5b:c8:4b:d8: + 9a:6a:03:5e:70:f2:85:4f:6c:4b:68:2f:ca:54:f6:8c:da:32: + fe:c3:6b:83:3f:38:c6:7e +SHA1 Fingerprint=A7:88:49:DC:5D:7C:75:8C:8C:DE:39:98:56:B3:AA:D0:B2:A5:71:35 +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCPm0eKj6ftpqMzeJ3nzPijANBgkqhkiG9w0BAQwFADBN +MQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJTAjBgNVBAMT +HERpZ2lDZXJ0IFRMUyBSU0E0MDk2IFJvb3QgRzUwHhcNMjEwMTE1MDAwMDAwWhcN +NDYwMTE0MjM1OTU5WjBNMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQs +IEluYy4xJTAjBgNVBAMTHERpZ2lDZXJ0IFRMUyBSU0E0MDk2IFJvb3QgRzUwggIi +MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCz0PTJeRGd/fxmgefM1eS87IE+ +ajWOLrfn3q/5B03PMJ3qCQuZvWxX2hhKuHisOjmopkisLnLlvevxGs3npAOpPxG0 +2C+JFvuUAT27L/gTBaF4HI4o4EXgg/RZG5Wzrn4DReW+wkL+7vI8toUTmDKdFqgp +wgscONyfMXdcvyej/Cestyu9dJsXLfKB2l2w4SMXPohKEiPQ6s+d3gMXsUJKoBZM +pG2T6T867jp8nVid9E6P/DsjyG244gXazOvswzH016cpVIDPRFtMbzCe88zdH5RD +nU1/cHAN1DrRN/BsnZvAFJNY781BOHW8EwOVfH/jXOnVDdXifBBiqmvwPXbzP6Po +sMH976pXTayGpxi0KcEsDr9kvimM2AItzVwv8n/vFfQMFawKsPHTDU9qTXeXAaDx +Zre3zu/O7Oyldcqs4+Fj97ihBMi8ez9dLRYiVu1ISf6nL3kwJZu6ay0/nTvEF+cd +Lvvyz6b84xQslpghjLSR6Rlgg/IwKwZzUNWYOwbpx4oMYIwo+FKbbuH2TbsGJJvX +KyY//SovcfXWJL5/MZ4PbeiPT02jP/816t9JXkGPhvnxd3lLG7SjXi/7RgLQZhNe +XoVPzthwiHvOAbWWl9fNff2C+MIkwcoBOU+NosEUQB+cZtUMCUbW8tDRSHZWOkPL +tgoRObqME2wGtZ7P6wIDAQABo0IwQDAdBgNVHQ4EFgQUUTMc7TZArxfTJc1paPKv +TiM+s0EwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcN +AQEMBQADggIBAGCmr1tfV9qJ20tQqcQjNSH/0GEwhJG3PxDPJY7Jv0Y02cEhJhxw +GXIeo8mH/qlDZJY6yFMECrZBu8RHANmfGBg7sg7zNOok992vIGCukihfNudd5N7H +PNtQOa27PShNlnx2xlv0wdsUpasZYgcYQF+Xkdycx6u1UQ3maVNVzDl92sURVXLF +O4uJ+DQtpBflF+aZfTCIITfNMBc9uPK8qHWgQ9w+iUuQrm0D4ByjoJYJu32jtyoQ +REtGBzRj7TG5BO6jm5qu5jF49OokYTurWGT/u4cnYiWB39yhL/btp/96j1EuMPik +AdKFOV8BmZZvWltwGUb+hmA+rYAQCd05JS9Yf7vSdPD3Rh9GOUrYU9DzLjtxpdRv +/PNn5AeP3SYZ4Y1b+qOTEZvpyDrDVWiakuFSdjjo4bq9+0/V77PnSIMx8IIh47a+ +p6tv75/fTM8BuGJqIz3nCU2AG3swpMPdB380vqQmsvZB6Akd4yCYqjdP//fx4ilw +MUc/dNAUFvohigLVigmUdy7yWSiLfFCSCmZ4OIN1xLVaqBHG5cGdZlXPU8Sv13WF +qUITVuwhd4GTWgzqltlJyqEI8pc7bZsEGCREjnwB8twl2F6GmrE52/WRMmrRpnCK +ovfepEWFJqgejF0pW8hL2JpqA15w8oVPbEtoL8pU9ozaMv7Da4M/OMZ+ +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/E-Tugra_Global_Root_CA_ECC_v3.pem b/secure/caroot/trusted/E-Tugra_Global_Root_CA_ECC_v3.pem new file mode 100644 index 000000000000..589b4f911531 --- /dev/null +++ b/secure/caroot/trusted/E-Tugra_Global_Root_CA_ECC_v3.pem @@ -0,0 +1,73 @@ +## +## E-Tugra Global Root CA ECC v3 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 26:46:19:77:31:e1:4f:6f:28:36:de:39:51:86:e6:d4:97:88:22:c1 + Signature Algorithm: ecdsa-with-SHA384 + Issuer: C = TR, L = Ankara, O = E-Tugra EBG A.S., OU = E-Tugra Trust Center, CN = E-Tugra Global Root CA ECC v3 + Validity + Not Before: Mar 18 09:46:58 2020 GMT + Not After : Mar 12 09:46:58 2045 GMT + Subject: C = TR, L = Ankara, O = E-Tugra EBG A.S., OU = E-Tugra Trust Center, CN = E-Tugra Global Root CA ECC v3 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (384 bit) + pub: + 04:8e:98:29:bf:c7:10:1e:27:db:ab:03:cc:28:2c: + d8:5e:48:19:10:29:cc:cb:59:81:cc:8c:b8:92:17: + 89:83:2a:92:f6:c3:a4:1d:4c:62:d5:9f:d6:a0:46: + dc:1c:bc:76:c1:e3:47:d0:5b:13:da:e7:a5:b3:66: + 48:e7:21:9a:4a:4f:86:0a:7d:6c:ea:4d:32:80:0a: + b2:7a:09:9b:69:4b:98:81:e2:2e:ec:02:70:96:1f: + fd:f5:46:ce:ca:dc:82 + ASN1 OID: secp384r1 + NIST CURVE: P-384 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Authority Key Identifier: + keyid:FF:82:31:72:3E:F9:C4:66:6C:AD:38:9E:D1:B0:51:88:A5:90:CC:F5 + + X509v3 Subject Key Identifier: + FF:82:31:72:3E:F9:C4:66:6C:AD:38:9E:D1:B0:51:88:A5:90:CC:F5 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA384 + 30:66:02:31:00:e6:05:58:69:61:e5:2d:ca:0d:cb:f1:19:08: + bd:d6:fd:51:92:1a:7e:63:54:04:90:91:9a:35:91:39:99:fa: + 07:a9:66:93:ba:c8:68:d4:8a:3f:fa:ed:6e:16:02:27:b7:02: + 31:00:dd:5a:17:2b:76:1d:65:42:96:a6:ac:5d:8a:79:56:d8: + 8a:1b:df:9a:de:5f:c7:50:8f:b1:5b:71:0c:26:df:6a:40:00: + ec:33:91:21:71:be:68:e4:23:a4:d9:ad:a1:37 +SHA1 Fingerprint=8A:2F:AF:57:53:B1:B0:E6:A1:04:EC:5B:6A:69:71:6D:F6:1C:E2:84 +-----BEGIN CERTIFICATE----- +MIICpTCCAiqgAwIBAgIUJkYZdzHhT28oNt45UYbm1JeIIsEwCgYIKoZIzj0EAwMw +gYAxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHEwZBbmthcmExGTAXBgNVBAoTEEUtVHVn +cmEgRUJHIEEuUy4xHTAbBgNVBAsTFEUtVHVncmEgVHJ1c3QgQ2VudGVyMSYwJAYD +VQQDEx1FLVR1Z3JhIEdsb2JhbCBSb290IENBIEVDQyB2MzAeFw0yMDAzMTgwOTQ2 +NThaFw00NTAzMTIwOTQ2NThaMIGAMQswCQYDVQQGEwJUUjEPMA0GA1UEBxMGQW5r +YXJhMRkwFwYDVQQKExBFLVR1Z3JhIEVCRyBBLlMuMR0wGwYDVQQLExRFLVR1Z3Jh +IFRydXN0IENlbnRlcjEmMCQGA1UEAxMdRS1UdWdyYSBHbG9iYWwgUm9vdCBDQSBF +Q0MgdjMwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASOmCm/xxAeJ9urA8woLNheSBkQ +KczLWYHMjLiSF4mDKpL2w6QdTGLVn9agRtwcvHbB40fQWxPa56WzZkjnIZpKT4YK +fWzqTTKACrJ6CZtpS5iB4i7sAnCWH/31Rs7K3IKjYzBhMA8GA1UdEwEB/wQFMAMB +Af8wHwYDVR0jBBgwFoAU/4Ixcj75xGZsrTie0bBRiKWQzPUwHQYDVR0OBBYEFP+C +MXI++cRmbK04ntGwUYilkMz1MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNp +ADBmAjEA5gVYaWHlLcoNy/EZCL3W/VGSGn5jVASQkZo1kTmZ+gepZpO6yGjUij/6 +7W4WAie3AjEA3VoXK3YdZUKWpqxdinlW2Iob35reX8dQj7FbcQwm32pAAOwzkSFx +vmjkI6TZraE3 +-----END CERTIFICATE----- diff --git a/secure/caroot/trusted/E-Tugra_Global_Root_CA_RSA_v3.pem b/secure/caroot/trusted/E-Tugra_Global_Root_CA_RSA_v3.pem new file mode 100644 index 000000000000..147ba810d1d6 --- /dev/null +++ b/secure/caroot/trusted/E-Tugra_Global_Root_CA_RSA_v3.pem @@ -0,0 +1,140 @@ +## +## E-Tugra Global Root CA RSA v3 +## +## This is a single X.509 certificate for a public Certificate +## Authority (CA). It was automatically extracted from Mozilla's +## root CA list (the file `certdata.txt' in security/nss). +## +## It contains a certificate trusted for server authentication. +## +## Extracted from nss +## with $FreeBSD$ +## +## @generated +## +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 0d:4d:c5:cd:16:22:95:96:08:7e:b8:0b:7f:15:06:34:fb:79:10:34 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C = TR, L = Ankara, O = E-Tugra EBG A.S., OU = E-Tugra Trust Center, CN = E-Tugra Global Root CA RSA v3 + Validity + Not Before: Mar 18 09:07:17 2020 GMT + Not After : Mar 12 09:07:17 2045 GMT + Subject: C = TR, L = Ankara, O = E-Tugra EBG A.S., OU = E-Tugra Trust Center, CN = E-Tugra Global Root CA RSA v3 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (4096 bit) + Modulus: + 00:a2:66:f0:89:b7:72:7b:ee:09:c9:63:d2:d3:43: + dd:5e:c3:a6:84:38:4a:f1:8d:81:bb:14:bd:47:e8: + 40:17:f3:3d:c3:78:45:72:a6:2e:90:de:9a:3a:d4: + 20:71:ca:bc:9f:1d:4b:97:0a:c7:31:ba:3e:d7:fe: + 25:a9:2a:8e:36:f4:d1:2f:c7:b7:a9:5d:33:dc:30: + 70:f8:40:6c:4b:b2:a6:31:61:d1:34:3c:3d:31:7a: + c7:af:c4:a7:a7:84:e1:97:a4:e8:4b:f6:17:7c:ee: + 3c:07:ed:e2:8a:57:dc:b6:fb:f8:43:25:50:ea:27: + 81:a8:86:bc:8f:52:4a:96:3a:60:1a:96:bb:fd:73: + f4:85:fd:83:fd:7f:84:6d:34:6c:7f:6a:b7:4b:01: + 03:bf:ad:69:b7:d7:32:d9:f5:57:6a:e9:86:82:3e: + a5:66:31:b3:16:3d:c2:f3:26:60:32:d3:52:1e:b0: + 6c:a4:37:3e:f4:f5:af:eb:e1:df:80:06:cf:2a:41: + e7:66:09:e1:4b:97:e7:77:bd:21:6d:29:b6:67:c3: + 2d:7e:ed:d6:79:65:d1:cf:3a:b6:d1:b1:5e:56:61: + 50:7a:5a:ce:4e:50:31:80:03:98:47:e7:e4:18:7c: + 44:5a:c6:a4:b3:3b:c6:c6:c3:3a:f0:6c:c3:8b:c8: + a4:91:05:f3:f5:d9:b6:aa:06:a1:b7:ab:e4:b1:ea: + 21:14:5c:83:a4:fc:ff:b6:50:d3:8c:12:26:99:76: + 70:e9:c0:0f:a6:74:fc:bb:d0:1b:78:ce:72:92:e2: + 28:9c:bc:e6:e9:09:d8:3a:d3:89:e6:be:2e:77:df: + 01:0a:6f:96:f6:e5:8d:3c:4d:52:76:1a:56:e1:73: + 7e:17:ac:3d:ad:6c:a3:52:12:18:70:e6:80:4e:33: + f2:7e:26:32:ac:05:8d:38:a4:e6:76:3c:9f:10:69: + 0e:6d:9d:d2:c1:79:20:6b:5b:cf:33:8d:d1:94:76: *** 1231 LINES SKIPPED *** From nobody Sun Jun 25 23:57: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 4Qq7FT2mSXz4hn7F; Sun, 25 Jun 2023 23:57: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 4Qq7FT2M9bz40Fp; Sun, 25 Jun 2023 23:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687737453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LAHx/pEcIh4gqES/hsp/J4pyarWOn8ymYFv/2lGjQK8=; b=pGG+LJQd1D3F6P8V0CBGqf8RNuwheQNZf5mcsmtJghwO7P2CmX67jtRcK7kkd7Cro65iA1 brSxMLYXCtD/YimXJb7QMDGst/z6+qCNRTDE+kO0cCauZHyMbpMCjkWGgPyVm0P/2wN5AO ZEpbWduy9iYn7ymQsl0m+/egXDvMP6U05nRjhnKkpktoAOSgwuK7i+SOHcSU9wavNOugKD 6J3wKe3syzjMjPIUwXQemvjOgpNSYMX+AzopH+dIf4mcEPwc0pAThM3X8fuQpuf3ixdZZh i50SeQ8+OgmY9CfBdseLzZqshdeAw3bdUc7nb/QLFiAdgI1MMgzUyxX/IIPH4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687737453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LAHx/pEcIh4gqES/hsp/J4pyarWOn8ymYFv/2lGjQK8=; b=DuFqGNWJTuwGhkJCnXXhy+znhdRDOWHhM/Azt2xteTdvE4xYf1+DsetI9xA3QaU+DWzEZt 3HLK+aVfX4m9eKqDx8ARmravn5D1dbwFrhhtTpK1UlVVEnH39x5TLcf7KraDWTqyDwDYf/ lrbufc8bh+WDNy4F9gNbKs6rynMB1POKgJ1g1N8nPZO5avq9aEEh9DxaZpLuA18ZHSCb8t KcnAu9Wv9of1MzlcTZNNwwbJqaxVL1tdvChFVgUPTISzacUuSd8HEfG8PY8gSQ7tfVAr/z yqacPntvhLS/h1Kw/uZ/BvznaH8haWQ6dbpncIybhcV20/fsI4oDJdI7dViJ8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687737453; a=rsa-sha256; cv=none; b=t5FN32ih+dtPJXe5FGe/Hr0f/UGqYt2umVkXuCzMaGkwry1VushgOBWA7BOvEDe96tB5Zl CYtRXolUy+uZHnqDYus7dS7oL5V1s8DjBA/3xkyRRBAWbXHEBLZaa4G37ir1DyjDb3MlnH 80xEyVSNRcQmvUpJRa/v7K7jpxwWcDO+dtPclm2LGlV2SKp4cmyeIu0bsm50SHKRiT512j DUQWhwbKZCEe5HzAkU1m5V06jbWrbnCodWg6NVtL4dhKx93l4gqsUC7hajssih4aD7Qv9W afDt3JN+eG7+ug2PeoBAWEhplXUGH+R/wI47cPVJha9pFDblQ07U0fD6oRxXUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qq7FT1Q0fznTb; Sun, 25 Jun 2023 23:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35PNvXIG073245; Sun, 25 Jun 2023 23:57:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35PNvX4w073244; Sun, 25 Jun 2023 23:57:33 GMT (envelope-from git) Date: Sun, 25 Jun 2023 23:57:33 GMT Message-Id: <202306252357.35PNvX4w073244@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: 5dae8905a514 - main - seq: combine asprintf return value 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5dae8905a5141e0cba1f4f3f94116440a5ce2abb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5dae8905a5141e0cba1f4f3f94116440a5ce2abb commit 5dae8905a5141e0cba1f4f3f94116440a5ce2abb Author: Ed Maste AuthorDate: 2023-06-19 02:10:32 +0000 Commit: Ed Maste CommitDate: 2023-06-25 23:57:17 +0000 seq: combine asprintf return value checks Error handling is identical for all of these failure cases. Sponsored by: The FreeBSD Foundation --- usr.bin/seq/seq.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/usr.bin/seq/seq.c b/usr.bin/seq/seq.c index 3618a106ec9e..d1d2cfbf17ed 100644 --- a/usr.bin/seq/seq.c +++ b/usr.bin/seq/seq.c @@ -198,13 +198,9 @@ main(int argc, char *argv[]) * equal, it means the exit condition of the loop held true due to a * rounding error and we still need to print 'last'. */ - if (asprintf(&cur_print, fmt, cur) < 0) { - err(1, "asprintf"); - } - if (asprintf(&last_print, fmt, last) < 0) { - err(1, "asprintf"); - } - if (asprintf(&prev_print, fmt, prev) < 0) { + if (asprintf(&cur_print, fmt, cur) < 0 || + asprintf(&last_print, fmt, last) < 0 || + asprintf(&prev_print, fmt, prev) < 0) { err(1, "asprintf"); } if (strcmp(cur_print, last_print) == 0 && From nobody Mon Jun 26 02:04: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 4QqB4K6qZ3z4hpwp; Mon, 26 Jun 2023 02:04: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 4QqB4K6KBlz3Qtr; Mon, 26 Jun 2023 02:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687745089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tRcFXRmMvNUy6z7Y2VOQLvi2EDhv1h5Fr0BR7oRZOt8=; b=NP5DAbE/QxAh505rszuPlllAV+ryI+dLuLrBi8yrbSl20/uIO/CHOg1J6DXapY0q7uwKJw YtiRieHRX84R98rxLOMhqry0RafPfiF3n3pB1dbFDN4MVLKVfrrE7CAwBP0Q5Dc6M/rtp9 6fvl+RryEr0CzZUahQNJvCHytRPiWGuIJXGjYS2MuHnhLadiJDUqF62vdXXQ0Q/rWYFk3V 03AKxzZuFfVQjT905fjUaO/0+P7gcxE2luoczgxrxxW05TRjiNcWf1+6VRIG6ZstbwwMdu sByNDQcR5Sz5HM5LPgTwO8vWJ42LyAXThzCDCw1vc8Q1rJ0iXkj4Vb6SMhQ1MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687745089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tRcFXRmMvNUy6z7Y2VOQLvi2EDhv1h5Fr0BR7oRZOt8=; b=bnB0FLRzgmsm08XPjxrSHMifOJkPd6upkVgmCyGY1WU2UZIeVV741AxRFxdsd2/ko28Kgb wkpI0BTJ8qsu3vb/rrXBnsZBvbeP51gOro+/e34WarFfoPSTCmNpOOadzIMzml8fxrrH6y JGNr3FmLeVTVrKbY7FpeX++IdSM05XEmT95Rfuw1EfHenOKF681CD3+STVZ6RKRJcY+pEU jI4ONW7badH0K0urT0BlSxqCsAUAq8CbPCwTUZO6+O50kPimJPQYXpSrVb3HXoi+P+Ixx9 IGNxgUJgzo1k6Q9e1dp3O7WO3g5pdGfVnzTEhCu93uuPTzWkEgDM12JVhMxuTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687745089; a=rsa-sha256; cv=none; b=QfI2oLmSugbZHjwte3/41igPDoWkJYgsGPxQMxuYnc63OtQWDtdO4CkShb4XSoNA3RjehT TQ6vcTNhdku+nz5jKCG9DmlqxtYER3qt3OaUr4NSwyBsk+xDSsC4UPD/IXWC8rJWRXhqrj DiyOhNcGlaB2NfVg95LgbfnTKeqARvcNe/Xq1lmobUcOCH6gaieO/Ljy8jjn1BkXKawHpx 4GtycDM0uHuI3HHZdNsNWNqPUTK/0vJNKmwwQhubZOVahe+OHWNzJm1NBf3WNtcukefKq7 p3cbWzcidIb0DnsIvKMG+0pY9K63H2Wj14BFc20EhjfY0Idl1E+MTpUnm1YM6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqB4K5HvbzrV4; Mon, 26 Jun 2023 02:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35Q24nNP088360; Mon, 26 Jun 2023 02:04:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35Q24nu9088359; Mon, 26 Jun 2023 02:04:49 GMT (envelope-from git) Date: Mon, 26 Jun 2023 02:04:49 GMT Message-Id: <202306260204.35Q24nu9088359@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: b2dcde7e9e75 - main - Assemble .s to .o using cc, not as List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b2dcde7e9e75dd35124d12e68036e56ee650d568 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b2dcde7e9e75dd35124d12e68036e56ee650d568 commit b2dcde7e9e75dd35124d12e68036e56ee650d568 Author: Ed Maste AuthorDate: 2022-07-19 19:36:09 +0000 Commit: Ed Maste CommitDate: 2023-06-26 02:03:19 +0000 Assemble .s to .o using cc, not as As of commit fd71da37d478 we no longer have an `as` in the default toolchain. Although we do not make use of this rule in the base system some ports or downstream projects might. Use `cc -x assembler` instead of as. Reviewed by: arichardson Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35859 --- share/mk/bsd.compat.mk | 1 - share/mk/bsd.lib.mk | 2 +- share/mk/bsd.suffixes.mk | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk index 9a59020b4df2..aabfd6a06192 100644 --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -37,7 +37,6 @@ LIB32_MACHINE= i386 LIB32_MACHINE_ARCH= i386 LIB32WMAKEENV= MACHINE_CPU="i686 mmx sse sse2" LIB32WMAKEFLAGS= \ - AS="${XAS} --32" \ LD="${XLD} -m elf_i386_fbsd" .elif ${COMPAT_ARCH} == "powerpc64" diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 9a947b85bfe2..dfaf554a3619 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -192,7 +192,7 @@ PO_FLAG=-pg ${CTFCONVERT_CMD} .s.po .s.pico .s.nossppico .s.pieo: - ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} + ${CC:N${CCACHE_BIN}} -x assembler ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .asm.po: diff --git a/share/mk/bsd.suffixes.mk b/share/mk/bsd.suffixes.mk index 5396bae05087..8337b9c94102 100644 --- a/share/mk/bsd.suffixes.mk +++ b/share/mk/bsd.suffixes.mk @@ -55,7 +55,7 @@ ${CTFCONVERT_CMD} .s.o: - ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} + ${CC:N${CCACHE_BIN}} -x assembler ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} # XXX not -j safe From nobody Mon Jun 26 04:27: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 4QqFFJ62mPz4j9RB; Mon, 26 Jun 2023 04:27: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 4QqFFJ5ZbWz3pNV; Mon, 26 Jun 2023 04:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687753668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67E5yxPQFLTbr2sKQAA01ka6+w0tgVYeOejpq8G5yiM=; b=Cj88uBV9yt+JLcjkegvU2uZHkXFgEIcJBQMYJtBMDJ72YB8sMD0uMNJXEqDYkE+i4LM/xd FOrTphv5qyYhgckSCax6FNvtbdO6Qg91AYcFTvDWNbMc2RYDxwZhjvuqXQfMwYYt/tKbd9 eHygb6ssCwYRz7Y+nGlaeWLlpqaY2dVlqLf1LXG+YJZRFBCUwhlw2gD62vLBVFQyqFx48z WwTDADykA30/KgPAFGLIgXSuuWkJI0zgG+cqwYQo5Y8YIXWMIp4alnUbJDyN11veUDX3Qx lFSGk1zaHykMSwkt2JVQb64JZOzrWELjnI37IM7m+Euon1bdcN2JRWnHiVE76w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687753668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67E5yxPQFLTbr2sKQAA01ka6+w0tgVYeOejpq8G5yiM=; b=A/UDWSq/7bk9tyYbDi3a8QrZU6+wnhIsCdUrsXIDoMXX91RijayEZWQnIvRBUZbjw60W8b 4Am0WKbsp0sgOiazLF39g/Bpogi2Nh2rL7R0wbKaRMVzVXWzPDUlkWXLQmmBf6OniP5UhP F8RtsmY7KBQYqdN7gp2iObdTHX5H0nu4f/qsebhwyl2Y3B1Ism5pJfHFDbw0S5Giq23G93 G9acxpyXkikO7yWJ2fo8lDyy4mqhCSRvwcLJFZtX01TqkgAYifWxY4hJzW0KnTnxJXKlNR /lyUOtIJs5KsO26IX+1LJXCaFWojWHd4xVj69KEdPYfLWjE3jj86mZduLDXN6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687753668; a=rsa-sha256; cv=none; b=WOYI/u9e3V/a5YKHR+BW/ttILAS0aISB5n6prSrq0aaVhcuUp4pBpfFH5KRp3rPWH9bsGe gZPGSAXfSVR1AlLr6W0tVYA7qGMca58qiOJJjhB28LI4bTV5IHQ4w5+4R8TN6ZyeVq+tvu GYBKQzqJqGrXymkUsjiLaT7pytDpaFqxvJw8Pl7KkY7EAzmYXv5WLgdsUj0fn9C3H9lfdv PTXUwxUczFk5uSJHDnAl9y7kdl/iVeXsKNSa6OWnaQoHmbA2TJnc0wXIDJFI50RHRAxk2Z 5rQGjcrmxnYLSfv8AjAz30twNhJo06SF9RxJtm7MVaRk9QeMnWECdDPP9/2Rbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqFFJ4fJ5zvkq; Mon, 26 Jun 2023 04:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35Q4Rmob021115; Mon, 26 Jun 2023 04:27:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35Q4Rm7q021114; Mon, 26 Jun 2023 04:27:48 GMT (envelope-from git) Date: Mon, 26 Jun 2023 04:27:48 GMT Message-Id: <202306260427.35Q4Rm7q021114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 428647d483bb - stable/13 - motd: MFC: unbreak for source 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: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 428647d483bb78ca8f152e5c4ef7556eec2a2c68 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=428647d483bb78ca8f152e5c4ef7556eec2a2c68 commit 428647d483bb78ca8f152e5c4ef7556eec2a2c68 Author: Eugene Grosbein AuthorDate: 2023-06-19 07:49:35 +0000 Commit: Eugene Grosbein CommitDate: 2023-06-26 04:26:47 +0000 motd: MFC: unbreak for source upgrade In case of source upgrade path from 12.x proper merge of new /etc installs /etc/motd.template. Becase of that, the system is left without symlink /etc/motd -> /var/run/motd but with stale /etc/motd contents. Fix it creating symlink despite of presence of /etc/motd.template. (cherry picked from commit 79a96e294c1acb4a2d17447a35f08647a6d09978) --- libexec/rc/rc.d/motd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc.d/motd b/libexec/rc/rc.d/motd index d9dd60a0f59a..7d865a00a88f 100755 --- a/libexec/rc/rc.d/motd +++ b/libexec/rc/rc.d/motd @@ -38,10 +38,10 @@ motd_start() # Otherwise, create an empty template file. install -c -o root -g wheel -m ${PERMS} /dev/null "${TEMPLATE}" fi - # Provide compatibility symlink: - if [ ! -h "${COMPAT_MOTD}" ]; then - ln -sF "${TARGET}" "${COMPAT_MOTD}" - fi + fi + # Provide compatibility symlink: + if [ ! -h "${COMPAT_MOTD}" ]; then + ln -sF "${TARGET}" "${COMPAT_MOTD}" fi T=`mktemp -t motd` From nobody Mon Jun 26 07:55: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 4QqKrY3fYNz4jPBW; Mon, 26 Jun 2023 07:55: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 4QqKrY3DpYz3xd0; Mon, 26 Jun 2023 07:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687766109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0mIhzF0VnNw8MI0kcliRoGMcH0ZRLZjCJeZ6ujKWTAY=; b=gqhs/knbeMxeXSiCIVzT95J5FAZyujVqs41hjqjBBjIt5C1Fscft9eLOMpUTxeSDwDBlXO LBVNXVR9KwJQgWVvRAl/BMvi4rjhHHkpSBjlqQJnno2Fb2hRwOBnFvq1zK3OFiFAxV+5OO enjGaLc7nRDrPzI+wV4iX40wGmOaqI8u9xqCm/ipau8pzh/zNP61s+Eo3p2MhbBiML8kZd 4IaK1YV5VOYe/gGfl7VVecpoatHnX9zwfBz7Wuzgq82D2xiCIx/3DknC0CxDji+1h9L8up rv6OTZpYGBsdFPXfb6ZmnYVWR6v+6gIhFaCSMuMgztV2DLk6uMayWVOLzxj/QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687766109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0mIhzF0VnNw8MI0kcliRoGMcH0ZRLZjCJeZ6ujKWTAY=; b=U0Pm6rMFNEUizjFSDXSkXXHM3M3yXmxoX2nY6MtqPDSt57LWdirC420X7/lCKnSz2rwPQV azAoNONdh1Gw40zX2w5wZpBltO4NAvi7NXyEr7jxYyHpvbasbYMvWQMHlZzlnhtJfPWsXg 4ho3HVK5F+rbw/uL4LZ8tXzGE2iIvLZ3NbP9cuI0gJKLrSAUJtqko8joiXIA54Xrafky+s 3UZR3sNBMcXlmyMk2By9S0fZ99m2JsJFvV7c3UE5eNNhM7hX/NoWkVg18G80Mx1Jlm/B/U BIU8SW3hNkOfYl6U1RMvI9Y0dxS98WpmqtNNGTkVyvcHPjPh18v8Ftq/sK7Z4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687766109; a=rsa-sha256; cv=none; b=ZOKFVOEGzpAfHBGc+zYbATEnfieS/WvNVVn8D0qbHLt+wI7IEic5p9OUkeUJ1HWz/ej3+o VcQZsnAWfMiOzXJuOYfY/ronCJK/B6cKsbk8aQzr0F9jix2SHQ6nCpsV767KendMOJRSHc b1ZickSaY1q/T9uKa/mEaJGeti64VHnb2GjUDDmfH/xe5gvHcQNrglqbmfbuKkP266b4gp tMToWT4/FUE1sXW8+MIRw5ipe++6WVhWCnb4uR6c5nAZCSaUd7ZPLTwBJwvWAID1/uxxdl I7nbqvwY0gI1q5pqhyQk4bQW6hlMexUEsltVXQkU2A4Z3TAIwAEmOkCHadRE1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqKrY2K8Nz126Q; Mon, 26 Jun 2023 07:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35Q7t97M067194; Mon, 26 Jun 2023 07:55:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35Q7t9dt067193; Mon, 26 Jun 2023 07:55:09 GMT (envelope-from git) Date: Mon, 26 Jun 2023 07:55:09 GMT Message-Id: <202306260755.35Q7t9dt067193@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: 08bc2cc4c4d8 - main - LinuxKPI: cast jiffies_to_msecs() result List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 08bc2cc4c4d8e94ad1db63f97d923dee18bee668 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=08bc2cc4c4d8e94ad1db63f97d923dee18bee668 commit 08bc2cc4c4d8e94ad1db63f97d923dee18bee668 Author: Bjoern A. Zeeb AuthorDate: 2023-06-10 22:57:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 07:54:24 +0000 LinuxKPI: cast jiffies_to_msecs() result jiffies_to_msecs() is expected to return an uint_t. In order to avoid changing printf format strings, properly cast the result to the expected type. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40486 --- sys/compat/linuxkpi/common/include/linux/jiffies.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/jiffies.h b/sys/compat/linuxkpi/common/include/linux/jiffies.h index 76c9c6a749c1..1aca3e2f33be 100644 --- a/sys/compat/linuxkpi/common/include/linux/jiffies.h +++ b/sys/compat/linuxkpi/common/include/linux/jiffies.h @@ -40,7 +40,7 @@ #define jiffies ticks #define jiffies_64 ticks -#define jiffies_to_msecs(x) (((int64_t)(int)(x)) * 1000 / hz) +#define jiffies_to_msecs(x) ((unsigned int)(((int64_t)(int)(x)) * 1000 / hz)) #define MAX_JIFFY_OFFSET ((INT_MAX >> 1) - 1) From nobody Mon Jun 26 09:35: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 4QqN4h4Tfmz4jpsd; Mon, 26 Jun 2023 09:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqN4h4336z4dGT; Mon, 26 Jun 2023 09:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687772148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3GWs4lMLGmI7VtcyS8HFF0d4yW3vn6hN6SwRJdWvFS8=; b=TSHFkB6kiA9rD+02ZUNyncBB9TEN6kYkA0xuqi0BEfkRnn1L16KOViCwEI+3xfLtSDjQRO XkYyjGByKOiLtkSpK1IkAYF7VKlJ8UmweqsLu/TgfmdsMgd4exw8rylW7V86asQqXYtRnR nTlz/Z1lkNTVoH/k6Dvwr3gP/dKl1KPZxuekXv25THiONxl9XeOsmiRyPe/ZAV7OQUeoa3 96TJO+gfCilXLijBVulBVQUY/63lz4nxtxThpsoICwBMwTgbDv1tfWsYlWGay6BAtwCs3W 2EGp1cmLFazcu0jigb4dH/yvXvgMwGm0zMX+hmhtCRzICH0xVXqGZ/EyrMmL1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687772148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3GWs4lMLGmI7VtcyS8HFF0d4yW3vn6hN6SwRJdWvFS8=; b=iug21uR8jMzSOV/jyR/hE/eCX9kjN+udLDghEAI7brU+8SG/svWTptvKVtulDV2e/imcPs dVmi4fHHoLObKP17A1nkmZBfQm+uGHO2xbP2RsVLN/mwRgi78R/uK0AwHqNT3FmHahNR6p sMiFsV7S4bWZw3Gy40lQ4M01IJBNCeTF3I5WKMr/ZsacX4OUvXk2oc6Bv6sgxJ/OtydmML 2auC9gu+bgptJnSW1T7BW/YJsuaWeeFpcrBp89EYfn1UWXdcRAuxZoz7ZulR5s+WvovkVs z2PNCFIxNgxkkho/+P/zDtMPkDDhuqi8ETggFwMPTRH3vtzsYvTEskfI3BY5Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687772148; a=rsa-sha256; cv=none; b=imgthNgSPN4mzu2JtyjRqbxOK7syIvX5yFZHTeCox8qTsIlgjHLqeKf77hyEpPzEZCLblM f8lx/BInKh+52oADAZgwNohHMReE5WLVA1YqflJLVhPKffogEF+X6TCDz/ZDbIQxIL4yLJ Iy5ATliDq0/r2bmWUXwy72lyGqnizZFO8MClpFNFRxKD0yrAVJDLpNIumZHzgiirtjDBeK YGshqeM6YbgH2vlc7DJKuSYx15LVHHILT4w5B9dgbCQuw10atj9L0rLwJkrzpyA1UjN1Nq gI5UYdPLpiiPPPueM7meXvRHqb/yGa87dw3w4/W1Uw1Io/+MTlfURpDFd83ksw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqN4h2rWLz14l8; Mon, 26 Jun 2023 09:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35Q9Zm0X033875; Mon, 26 Jun 2023 09:35:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35Q9ZmdT033874; Mon, 26 Jun 2023 09:35:48 GMT (envelope-from git) Date: Mon, 26 Jun 2023 09:35:48 GMT Message-Id: <202306260935.35Q9ZmdT033874@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: f0c97033018b - main - sys/dev/ichsmb: Silence unhandled SMBALERT device_printfs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f0c97033018b0741aa832bf1b79430ed73ceb0da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f0c97033018b0741aa832bf1b79430ed73ceb0da commit f0c97033018b0741aa832bf1b79430ed73ceb0da Author: Reid Linnemann AuthorDate: 2023-06-26 08:25:26 +0000 Commit: Kristof Provost CommitDate: 2023-06-26 08:29:34 +0000 sys/dev/ichsmb: Silence unhandled SMBALERT device_printfs The ichsmb driver does not actually handle SMBALERT, other than by logging the first 16 occurences of the ICH_HST_STA_SMBALERT_STS_SMBALERT status flag. Because the SMBALERT is not acknowledged by the host, clearing it in the host status register does not appear to work as long as some slave device is pulling the SMBALERT line low, at least for C2000 chips. As a result, if a slave device does pull SMBALERT low the interrupt handler will always loop its maximum of 16 times attempting to clear all status register flags and device_printf the status register. The result is the kernel message buffer is littered with these device_printfs at every interrupt. To remedy the problem, the ICH_HST_STA_SMBALERT_STS flag is zeroed in the read host status register value, just as with ICH_HST_STA_INUSE_STS and ICH_HST_STA_HOST_BUSY. This allows the loop to break when no other flags that must be handled are set in the host status register. Additionally, because the SMBALERT is not actually handled the SMBALERT logging is omitted as it has no actual function at this time. Reviewed by: imp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39966 --- sys/dev/ichsmb/ichsmb.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c index ba2d993ffe5a..d5950f056c0d 100644 --- a/sys/dev/ichsmb/ichsmb.c +++ b/sys/dev/ichsmb/ichsmb.c @@ -510,7 +510,8 @@ ichsmb_device_intr(void *cookie) DBG("%d stat=0x%02x\n", count, status); } #endif - status &= ~(ICH_HST_STA_INUSE_STS | ICH_HST_STA_HOST_BUSY); + status &= ~(ICH_HST_STA_INUSE_STS | ICH_HST_STA_HOST_BUSY | + ICH_HST_STA_SMBALERT_STS); if (status == 0) break; @@ -531,18 +532,6 @@ ichsmb_device_intr(void *cookie) continue; } - /* Handle SMBALERT interrupt */ - if (status & ICH_HST_STA_SMBALERT_STS) { - static int smbalert_count = 16; - if (smbalert_count > 0) { - device_printf(dev, "SMBALERT# rec'd\n"); - if (--smbalert_count == 0) { - device_printf(dev, - "not logging anymore\n"); - } - } - } - /* Check for bus error */ if (status & ICH_HST_STA_BUS_ERR) { sc->smb_error = SMB_ECOLLI; /* XXX SMB_EBUSERR? */ From nobody Mon Jun 26 10:28: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 4QqPF434RVz4k6jJ; Mon, 26 Jun 2023 10:28:08 +0000 (UTC) (envelope-from bz@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 4QqPF42TXRz3pnl; Mon, 26 Jun 2023 10:28:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687775288; 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=Diw0fGC69BcjBSBy5gtCqinSA7Wodil3Ru8qAXhZIq4=; b=wzgPRsxBSuLWSs5EQIHYRnr60xCb5K+q5G9Yw5Vf8STvjvZu+BfRZa3pu+QYUXZ3o4VEvv NUfkIiI10JoQUCWf0wceI26Fwmqh7wazYdqTzY6UOCcZZ/kZDaK+PNP5B+TWehBR4/nPGg Rcw0ERuYKgpJVE4wZFTuhwHhpDIXTjm5k9wwQg4g8LnsdqOKr2MZK2bcYcZtwmaEQi1KYr NnsWe4z4XQ2wys2ids4twn+aRgb6xw0iRiv+0p4ADvu4Ju5H+MWVnaKKj2uiUEpWLQJR/7 pIWE7QEltrMJxRzRFuMgN8fWV5BZVPEvPCI21lrMjHzDTilfbOIrkov5XBo4Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687775288; 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=Diw0fGC69BcjBSBy5gtCqinSA7Wodil3Ru8qAXhZIq4=; b=c9TrpD6CdjYYyrYoE3qxgBCjT8pFS9vRh6NSgPMJtslJ7boewtV2RQWaVRm+m9va/+xHe9 fn7eqclwu1CeZUA3cDrUQT5BH3rB1AHSHfA3tTIamAcQeCEhj43xRLgrZzS6P2krHc1+sb wgddPawO5q/Fr4fOPnzVUaBqnMvAdX3TpphsOt7W0k28THtFXniMCw9tj9v/wsbJJC/Z9I xZcIeApgRprivwVfY13OQ8fALgzBw1b3nug/3GlZgj69GpnGfyPafy4sTplZjy0owujgzb 1crbn8SugNPL/Mg3iEgfo6T4dGcsM7OJE+MLluQuZLg6+YADJoPMGSPwTcs6KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687775288; a=rsa-sha256; cv=none; b=u9CGYPFTddiwMtJoEHyoDb7QBDn6bMdQK3xHPM7HyX3nSMf70+0BtuYvBDnsJCxX70uhnj MgzNo0G2bS4qufi4zS+4j3cMNaQ3ewVZnEnQawRaimGmpMCUJWJKM51Yinj/YtBeHAXf+P X83lCUiluJBoExMCfkbq5fFAWiTDvEee1Bm8kctOAaVCBHEcVZKmJRWUIITwlCPWg/6nqW A4q9B5zRsiwbyuRB3SES3NXBOLkEt+dMq/mB+RErFm20yxBo99pckjB1wkdZ0GB+qHrxpy 95ll/FZvDoiP4TbNT/V3MNuulFH7uBh/Kxelqz5Hq/xM94luKGaq/7Bjp7E7sA== Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QqPF4097kzsWD; Mon, 26 Jun 2023 10:28:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B24618D4A17C; Mon, 26 Jun 2023 10:28:06 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id EFD515C3A831; Mon, 26 Jun 2023 10:28:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id 0FEdHoM2nKOi; Mon, 26 Jun 2023 10:28:04 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id E44535C3A82F; Mon, 26 Jun 2023 10:28:03 +0000 (UTC) Date: Mon, 26 Jun 2023 10:28:03 +0000 (UTC) From: "Bjoern A. Zeeb" To: Ed Maste cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b73183d1a243 - main - ipv6: disable RFC 4620 nodeinfo by default In-Reply-To: <202304261748.33QHmA7N034068@gitrepo.freebsd.org> Message-ID: <7q923q7s-381n-7537-qq21-18r104s319on@SerrOFQ.bet> References: <202304261748.33QHmA7N034068@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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 X-ThisMailContainsUnwantedMimeParts: N On Wed, 26 Apr 2023, Ed Maste wrote: Hi, sorry for the late reply. > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b73183d1a243d486e3889bd71800e94812f5fa17 > > commit b73183d1a243d486e3889bd71800e94812f5fa17 > Author: Ed Maste > AuthorDate: 2023-04-24 19:41:45 +0000 > Commit: Ed Maste > CommitDate: 2023-04-26 17:47:59 +0000 > > ipv6: disable RFC 4620 nodeinfo by default > > RFC 4620 is an experimental RFC that can be used to request information > about a host, including: > > - the fully-qualified or single-component name > - some set of the Responder's IPv6 unicast addresses > - some set of the Responder's IPv4 unicast addresses > > This is not something that should be made available by default. 187069853c6565693b82dc7d2d31de68c2be32c2 already added the flag to not reply to global addresses (see nd6_input check). So by default we were only replying to loopback and link-local. Finding the slides of the talk mentioned in the PR was informational material (advise) only but no real problem shown. The Apple problem is slightly different and I wonder (a) if replying fqdn is considered not a problem still, and (b) is we do interface validation for sending out (link-local) ICMPv6 replies? Has OpenBSD changed it from 1 to 0 as well by now? If we have any doubts I would highly suggest to also handle the default case: around sys/netinet6/icmp6.c line 1404 some better as I assume that with the current code not having spent much time reading it, it is still possible to get the "FQDN" by sending an unknown qtype? Would be nice to have a test case for that... > PR: 257709 > Submitted by: ruben@verweg.com > Reviewed by: melifaro > Relnotes: Yes > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D39778 > --- > sys/netinet6/in6_proto.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c > index 971b61c74899..557edaf2e7e1 100644 > --- a/sys/netinet6/in6_proto.c > +++ b/sys/netinet6/in6_proto.c > @@ -193,8 +193,7 @@ VNET_DEFINE(int, icmp6_rediraccept) = 1;/* accept and process redirects */ > VNET_DEFINE(int, icmp6_redirtimeout) = 10 * 60; /* 10 minutes */ > VNET_DEFINE(int, icmp6errppslim) = 100; /* 100pps */ > /* control how to respond to NI queries */ > -VNET_DEFINE(int, icmp6_nodeinfo) = > - (ICMP6_NODEINFO_FQDNOK|ICMP6_NODEINFO_NODEADDROK); > +VNET_DEFINE(int, icmp6_nodeinfo) = 0; > VNET_DEFINE(int, icmp6_nodeinfo_oldmcprefix) = 1; > > VNET_DEFINE_STATIC(int, ip6_log_interval) = 5; > -- Bjoern A. Zeeb r15:7 From nobody Mon Jun 26 12:08: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 4QqRSd5qJGz4k6TF; Mon, 26 Jun 2023 12:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSd50PVz3hCF; Mon, 26 Jun 2023 12:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a57uKe/Je1sEC2X3T5fT4bE10GsbdhWx5HdJWgKjIBY=; b=tqsljko3842dbBYoWwFbua7tTV8tBZ8N736cKrvLOGeHoPbsrWEz++LQZYNHPLKDW4Fm96 DpyJL+89XWtW+1wTCREwcLCSgdCwzLYzGUVDpfFbeinev56KHycZldetGi0Ckl2L9739XH LZ3Mp9gp1/kUnGYzlMrwOHfqkyiSN7bFS+FO3ZGVhkjkGkKtwDIUJQPwnesEfI6rPyl8dm IREDg+oaWxCuMbYaw9cGEqJMX8Q9ztzvR+bgI8Km6rl0mXBe+zNW0lBJqKWgNi+nwoSRiB FwTRpuJfSY7Q0UzSbwwHdE2P148tJ9jyfz8qDL0GQ/7x9Jgc/ivjpe/ejh+yHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a57uKe/Je1sEC2X3T5fT4bE10GsbdhWx5HdJWgKjIBY=; b=Lcjf9ueOSqcYB/Z1yj8lIiHGKxqq1y7OdhV/QlLdj8a9gg0oC89XBhy4mMYtiQG/+evIdQ tyXXngxnaFwuQiFfdaEe3p39MZFdyKVhk5jOYYakOQq99Td8Y8UXY08N8sOtOs5is92Sz1 3l2/liJhzGrdggivBIkSYC0vKaYXzHiRHMhLHBtJQSEvKMHtOz2aBghuv+OR6QfQXbGJxO nMNgurBz/QbL0BxK+WescDDRAiy6hoAoCtxTd2ta8cu9AE2Y7m4ANH+fK7RmUrvrTcbLP/ vPtxzlOrC5wY3sVUylEX1P6XPEZHaVqbPx5b7VYGdr8yajqugxrM0QFsxjixTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781297; a=rsa-sha256; cv=none; b=i62NlOL6Y9346KB2sDdHox/tb/d1UEmx6EIgl5IQcTytHmn/4R4Hxxqsi8pHnptSu986Ud +AFZE2DKrn/9Bt19+NpYeBtbXuN0lf6E5j9EvnAGYY1k3gqZEDHkkXhSUvojxmAK254BzS M5zy6N28lpUNO5xZMi9N+ci8+qQaanZFyT4QTMsZOEy/hbhNNuEs3/cRZz6QCiJP7euWPX gzZ6DtG4kuhncRo8VP1zudkO5vOtFQKsCV3azpkJlN5SEKMl5wqrtV8ngVWYvcPLGp3s74 4pNBMYMVH0RmS3QUB+g4dfzrPkky2FSv0J5QD18BeObyo9TN8G5p+niBgAFpsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSd44Qdz18Cc; Mon, 26 Jun 2023 12:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8H8s082729; Mon, 26 Jun 2023 12:08:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8HcI082728; Mon, 26 Jun 2023 12:08:17 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:17 GMT Message-Id: <202306261208.35QC8HcI082728@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: 34ee2711941e - stable/13 - dpaa2: add console support for FDT based systems List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 34ee2711941e6d3ddda3f4a34786eabe466a40d9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=34ee2711941e6d3ddda3f4a34786eabe466a40d9 commit 34ee2711941e6d3ddda3f4a34786eabe466a40d9 Author: Bjoern A. Zeeb AuthorDate: 2023-02-14 15:53:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 08:27:00 +0000 dpaa2: add console support for FDT based systems Add DPAA2 console support for MC and AIOP (latter untested) for FDT systems. ACPI systems are prepared but need some proper bus function in order to get the address from MC (and likely a file splitup then). This will come at a later stage once other ACPI/FDT bus parts are cleared up. The work was originally done in July 2022 and finally switched to bus_space[1] lately to be ready for main. Suggested by: andrew [1] Reviewed by: dsl Differential Revision: https://reviews.freebsd.org/D38592 (cherry picked from commit 72ef722b2a34b8f94fd639b05881242686480f05) --- sys/conf/files.arm64 | 1 + sys/dev/dpaa2/dpaa2_console.c | 581 ++++++++++++++++++++++++++++++++++++++++++ sys/modules/dpaa2/Makefile | 2 + 3 files changed, 584 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index df7bbe002f5c..a87c8acf0630 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -167,6 +167,7 @@ dev/cpufreq/cpufreq_dt.c optional cpufreq fdt dev/dpaa2/dpaa2_bp.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_cmd_if.m optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_con.c optional soc_nxp_ls dpaa2 +dev/dpaa2/dpaa2_console.c optional soc_nxp_ls dpaa2 fdt dev/dpaa2/dpaa2_io.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_mac.c optional soc_nxp_ls dpaa2 dev/dpaa2/dpaa2_mc.c optional soc_nxp_ls dpaa2 diff --git a/sys/dev/dpaa2/dpaa2_console.c b/sys/dev/dpaa2/dpaa2_console.c new file mode 100644 index 000000000000..df63574c4f27 --- /dev/null +++ b/sys/dev/dpaa2/dpaa2_console.c @@ -0,0 +1,581 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause AND BSD-2-Clause + */ +/* + * // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) + * + * Freescale DPAA2 Platforms Console Driver + * + * Copyright 2015-2016 Freescale Semiconductor Inc. + * Copyright 2018 NXP + * + * git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/drivers/soc/fsl/dpaa2-console.c#8120bd469f5525da229953c1197f2b826c0109f4 + */ +/* + * Copyright (c) 2022-2023 Bjoern A. Zeeb + * + * 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. + */ + +/* + * Some docs are in: + * - https://www.nxp.com.cn/docs/en/application-note/AN13329.pdf + * - DPAA2UM + * - git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/drivers/soc/fsl/dpaa2-console.c + */ + +#include "opt_platform.h" +#ifdef __notyet__ +#include "opt_acpi.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef FDT +#include +#include +#endif + +/* Table 6-1. MC Memory Map */ +#define MC_REG_MCFBA 0x20 +#define MC_REG_MCFBALR_OFF 0x00 +#define MC_REG_MCFBALR_MASK 0xe0000000 +#define MC_REG_MCFBAHR_OFF 0x04 +#define MC_REG_MCFBAHR_MASK 0x0001ffff + +/* Firmware Consoles. */ +#define MC_BUFFER_OFFSET 0x01000000 +#define MC_BUFFER_SIZE (1024 * 1024 * 16) +#define MC_OFFSET_DELTA MC_BUFFER_OFFSET + +#define AIOP_BUFFER_OFFSET 0x06000000 +#define AIOP_BUFFER_SIZE (1024 * 1024 * 16) +#define AIOP_OFFSET_DELTA 0 + +/* MC and AIOP Magic words */ +#define MAGIC_MC 0x4d430100 +#define MAGIC_AIOP 0X41494f50 + +#define LOG_HEADER_FLAG_BUFFER_WRAPAROUND \ + 0x80000000 +#define LAST_BYTE(a) \ + ((a) & ~(LOG_HEADER_FLAG_BUFFER_WRAPAROUND)) + +struct dpaa2_cons_dev { + struct cdev *cdev; + struct mtx mtx; + size_t offset; + uint32_t magic; + + uint32_t hdr_magic; + uint32_t hdr_eobyte; + uint32_t hdr_start; + uint32_t hdr_len; + + uoff_t start; + uoff_t end; + uoff_t eod; + uoff_t cur; + + bus_space_tag_t bst; + bus_space_handle_t bsh; + vm_size_t size; +}; + +struct dpaa2_cons_softc { + struct resource *res; + bus_space_tag_t bst; + uint64_t mcfba; + struct dpaa2_cons_dev mc_cd; + struct dpaa2_cons_dev aiop_cd; +}; + +struct dpaa2_cons_hdr { + uint32_t magic; + uint32_t _reserved; + uint32_t start; + uint32_t len; + uint32_t eobyte; +}; + +#define DPAA2_MC_READ_4(_sc, _r) bus_read_4((_sc)->res, (_r)) + +/* Management interface */ +static d_open_t dpaa2_cons_open; +static d_close_t dpaa2_cons_close; +static d_read_t dpaa2_cons_read; + +static struct cdevsw dpaa2_mc_cons_cdevsw = { + .d_version = D_VERSION, + .d_flags = 0, + .d_open = dpaa2_cons_open, + .d_close = dpaa2_cons_close, + .d_read = dpaa2_cons_read, + .d_name = "fsl_mc_console", +}; + +static struct cdevsw dpaa2_aiop_cons_cdevsw = { + .d_version = D_VERSION, + .d_flags = 0, + .d_open = dpaa2_cons_open, + .d_close = dpaa2_cons_close, + .d_read = dpaa2_cons_read, + .d_name = "fsl_aiop_console", +}; + +static size_t +dpaa2_cons_read_bs(struct dpaa2_cons_dev *cd, size_t offset, void *dst, size_t len) +{ + size_t count, l; + uint8_t *p; + + count = 0; + p = dst; + l = offset % 8; + if (l != 0) { + bus_space_read_region_1(cd->bst, cd->bsh, offset + count, p + count, l); + count += l; + len -= l; + } + + l = len / 8; + if (l != 0) { + bus_space_read_region_8(cd->bst, cd->bsh, offset + count, (uint64_t *)(p + count), l); + l *= 8; + count += l; + len -= l; + } + l = len / 4; + if (l != 0) { + bus_space_read_region_4(cd->bst, cd->bsh, offset + count, (uint32_t *)(p + count), l); + l *= 4; + count += l; + len -= l; + } + l = len / 2; + if (l != 0) { + bus_space_read_region_2(cd->bst, cd->bsh, offset + count, (uint16_t *)(p + count), l); + l *= 2; + count += l; + len -= l; + } + if (len != 0) { + bus_space_read_region_1(cd->bst, cd->bsh, offset + count, p + count, len); + count += len; + } + + return (count); +} + +static int +dpaa2_cons_open(struct cdev *cdev, int flags, int fmt, struct thread *td) +{ + struct dpaa2_cons_dev *cd; + struct dpaa2_cons_hdr hdr; + size_t rlen __diagused; + uint32_t wrapped; + + if (flags & FWRITE) + return (EACCES); + + cd = cdev->si_drv1; + if (cd->size == 0) + return (ENODEV); + + mtx_lock(&cd->mtx); + rlen = dpaa2_cons_read_bs(cd, 0, &hdr, sizeof(hdr)); + KASSERT(rlen == sizeof(hdr), ("%s:%d: rlen %zu != count %zu, cdev %p " + "cd %p\n", __func__, __LINE__, rlen, sizeof(hdr), cdev, cd)); + + cd->hdr_magic = hdr.magic; + if (cd->hdr_magic != cd->magic) { + mtx_unlock(&cd->mtx); + return (ENODEV); + } + + cd->hdr_eobyte = hdr.eobyte; + cd->hdr_start = hdr.start; + cd->hdr_len = hdr.len; + + cd->start = cd->hdr_start - cd->offset; + cd->end = cd->start + cd->hdr_len; + + wrapped = cd->hdr_eobyte & LOG_HEADER_FLAG_BUFFER_WRAPAROUND; + cd->eod = cd->start + LAST_BYTE(cd->hdr_eobyte); + + if (wrapped && cd->eod != cd->end) + cd->cur = cd->eod + 1; + else + cd->cur = cd->start; + mtx_unlock(&cd->mtx); + + return (0); +} + +static int +dpaa2_cons_close(struct cdev *cdev, int flags, int fmt, struct thread *td) +{ + struct dpaa2_cons_dev *cd; + + cd = cdev->si_drv1; + mtx_lock(&cd->mtx); + cd->hdr_magic = cd->hdr_eobyte = cd->hdr_start = cd->hdr_len = 0; + cd->start = cd->end = 0; + mtx_unlock(&cd->mtx); + + return (0); +} + +static int +dpaa2_cons_read(struct cdev *cdev, struct uio *uio, int flag) +{ + char buf[128]; + struct dpaa2_cons_dev *cd; + size_t len, size, count; + size_t rlen __diagused; + int error; + + cd = cdev->si_drv1; + mtx_lock(&cd->mtx); + if (cd->cur == cd->eod) { + mtx_unlock(&cd->mtx); + return (0); + } else if (cd->cur > cd->eod) { + len = (cd->end - cd->cur) + (cd->eod - cd->start); + } else { + len = cd->eod - cd->cur; + } + size = cd->end - cd->cur; + + if (len > size) { + /* dump cur [size] */ + while (uio->uio_resid > 0) { + count = imin(sizeof(buf), uio->uio_resid); + if (count > size) + count = size; + + rlen = dpaa2_cons_read_bs(cd, cd->cur, buf, count); + KASSERT(rlen == count, ("%s:%d: rlen %zu != count %zu, " + "cdev %p cd %p\n", __func__, __LINE__, rlen, count, + cdev, cd)); + + cd->cur += count; + len -= count; + size -= count; + mtx_unlock(&cd->mtx); + error = uiomove(buf, count, uio); + if (error != 0 || uio->uio_resid == 0) + return (error); + mtx_lock(&cd->mtx); + } + cd->cur = cd->start; + } + + /* dump cur [len] */ + while (len > 0 && uio->uio_resid > 0) { + count = imin(sizeof(buf), uio->uio_resid); + if (count > len) + count = len; + + rlen = dpaa2_cons_read_bs(cd, cd->cur, buf, count); + KASSERT(rlen == count, ("%s:%d: rlen %zu != count %zu, cdev %p " + "cd %p\n", __func__, __LINE__, rlen, count, cdev, cd)); + + cd->cur += count; + len -= count; + mtx_unlock(&cd->mtx); + error = uiomove(buf, count, uio); + if (error != 0 || uio->uio_resid == 0) + return (error); + mtx_lock(&cd->mtx); + } + mtx_unlock(&cd->mtx); + return (0); +} + +static int +dpaa2_cons_create_dev(device_t dev, bus_addr_t pa, size_t size, + size_t offset, uint32_t magic, struct cdevsw *devsw, + struct dpaa2_cons_dev *cd) +{ + struct dpaa2_cons_softc *sc; + struct dpaa2_cons_hdr hdr; + struct make_dev_args md_args; + size_t len; + int error; + + sc = device_get_softc(dev); + + error = bus_space_map(sc->bst, pa, size, 0, &cd->bsh); + if (error != 0) { + device_printf(dev, "%s: failed to map bus space %#jx/%zu: %d\n", + __func__, (uintmax_t)pa, size, error); + return (error); + } + + cd->bst = sc->bst; + cd->size = size; + + len = dpaa2_cons_read_bs(cd, 0, &hdr, sizeof(hdr)); + if (len != sizeof(hdr)) { + device_printf(dev, "%s: failed to read hdr for %#jx/%zu: %d\n", + __func__, (uintmax_t)pa, size, error); + bus_space_unmap(cd->bst, cd->bsh, cd->size); + cd->size = 0; + return (EIO); + } + + /* This checks probably needs to be removed one day? */ + if (hdr.magic != magic) { + if (bootverbose) + device_printf(dev, "%s: magic wrong for %#jx/%zu: " + "%#010x != %#010x, no console?\n", __func__, + (uintmax_t)pa, size, hdr.magic, magic); + bus_space_unmap(cd->bst, cd->bsh, cd->size); + cd->size = 0; + return (ENOENT); + } + + if (hdr.start - offset > size) { + device_printf(dev, "%s: range wrong for %#jx/%zu: %u - %zu > %zu\n", + __func__, (uintmax_t)pa, size, hdr.start, offset, size); + bus_space_unmap(cd->bst, cd->bsh, cd->size); + cd->size = 0; + return (ERANGE); + } + + cd->offset = offset; + cd->magic = magic; + mtx_init(&cd->mtx, "dpaa2 cons", NULL, MTX_DEF); + + make_dev_args_init(&md_args); + md_args.mda_devsw = devsw; + md_args.mda_uid = 0; + md_args.mda_gid = 69; + md_args.mda_mode = S_IRUSR | S_IRGRP; + md_args.mda_unit = 0; + md_args.mda_si_drv1 = cd; + error = make_dev_s(&md_args, &cd->cdev, "%s", devsw->d_name); + if (error != 0) { + device_printf(dev, "%s: make_dev_s failed for %#jx/%zu: %d\n", + __func__, (uintmax_t)pa, size, error); + mtx_destroy(&cd->mtx); + bus_space_unmap(cd->bst, cd->bsh, cd->size); + cd->size = 0; + return (error); + } + + if (bootverbose) + device_printf(dev, "dpaa2 console %s at pa %#jx size %#010zx " + "(%zu) offset %zu, hdr: magic %#010x start %#010x len " + "%#010x eobyte %#010x\n", devsw->d_name, (uintmax_t)pa, + size, size, offset, hdr.magic, hdr.start, hdr.len, hdr.eobyte); + + return (0); +} + +static int +dpaa2_cons_attach_common(device_t dev) +{ + struct dpaa2_cons_softc *sc; + + sc = device_get_softc(dev); + + dpaa2_cons_create_dev(dev, (bus_addr_t)(sc->mcfba + MC_BUFFER_OFFSET), + MC_BUFFER_SIZE, MC_OFFSET_DELTA, MAGIC_MC, + &dpaa2_mc_cons_cdevsw, &sc->mc_cd); + + dpaa2_cons_create_dev(dev, (bus_addr_t)(sc->mcfba + AIOP_BUFFER_OFFSET), + AIOP_BUFFER_SIZE, AIOP_OFFSET_DELTA, MAGIC_AIOP, + &dpaa2_aiop_cons_cdevsw, &sc->aiop_cd); + + return (0); +} + +static void +dpaa2_cons_detach_common(struct dpaa2_cons_dev *cd) +{ + + bus_space_unmap(cd->bst, cd->bsh, cd->size); + mtx_destroy(&cd->mtx); +} + +static int +dpaa2_cons_detach(device_t dev) +{ + struct dpaa2_cons_softc *sc; + + sc = device_get_softc(dev); + + if (sc->aiop_cd.cdev != NULL) + destroy_dev(sc->aiop_cd.cdev); + if (sc->mc_cd.cdev != NULL) + destroy_dev(sc->mc_cd.cdev); + + if (sc->aiop_cd.size != 0) + dpaa2_cons_detach_common(&sc->aiop_cd); + if (sc->mc_cd.size != 0) + dpaa2_cons_detach_common(&sc->mc_cd); + + if (sc->res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->res), + sc->res); + + return (0); +} + +#ifdef __notyet__ +#ifdef ACPI +static int +dpaa2_cons_acpi_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + device_set_desc(dev, "DPAA2 Console Driver"); + return (BUS_PROBE_DEFAULT); +} + +static int +dpaa2_cons_acpi_attach(device_t dev) +{ + struct dpaa2_cons_softc *sc; + uint32_t val; + int error, rid; + + sc = device_get_softc(dev); + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "Could not allocate memory\n"); + return (ENXIO); + } + sc->bst = rman_get_bustag(sc->res); + + val = DPAA2_MC_READ_4(sc, MC_REG_MCFBALR_OFF); + val &= MC_REG_MCFBALR_MASK; + sc->mcfba |= val; + val = DPAA2_MC_READ_4(sc, MC_REG_MCFBAHR_OFF); + val &= MC_REG_MCFBAHR_MASK; + sc->mcfba |= ((uint64_t)val << 32); + + error = dpaa2_cons_attach_common(dev); + + return (error); +} + +static device_method_t dpaa2_cons_acpi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, dpaa2_cons_acpi_probe), + DEVMETHOD(device_attach, dpaa2_cons_acpi_attach), + DEVMETHOD(device_detach, dpaa2_cons_detach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(dpaa2_cons_acpi, dpaa2_cons_acpi_driver, dpaa2_cons_acpi_methods, + sizeof(struct dpaa2_cons_softc)); + +DRIVER_MODULE(dpaa2_cons_acpi, simplebus, dpaa2_cons_acpi_driver, 0, 0); +MODULE_DEPEND(dpaa2_cons_acpi, dpaa2_mc, 1, 1, 1); +#endif +#endif /* 0 */ + +#ifdef FDT +static struct ofw_compat_data compat_data[] = { + { "fsl,dpaa2-console", 1 }, + { NULL, 0 } +}; + +static int +dpaa2_cons_fdt_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "DPAA2 Console Driver"); + return (BUS_PROBE_DEFAULT); +} + +static int +dpaa2_cons_fdt_attach(device_t dev) +{ + struct dpaa2_cons_softc *sc; + uint32_t val; + int error, rid; + + sc = device_get_softc(dev); + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "Could not allocate memory\n"); + return (ENXIO); + } + sc->bst = rman_get_bustag(sc->res); + + val = DPAA2_MC_READ_4(sc, MC_REG_MCFBALR_OFF); + val &= MC_REG_MCFBALR_MASK; + sc->mcfba |= val; + val = DPAA2_MC_READ_4(sc, MC_REG_MCFBAHR_OFF); + val &= MC_REG_MCFBAHR_MASK; + sc->mcfba |= ((uint64_t)val << 32); + + error = dpaa2_cons_attach_common(dev); + + return (error); +} + +static device_method_t dpaa2_cons_fdt_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, dpaa2_cons_fdt_probe), + DEVMETHOD(device_attach, dpaa2_cons_fdt_attach), + DEVMETHOD(device_detach, dpaa2_cons_detach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(dpaa2_cons_fdt, dpaa2_cons_fdt_driver, dpaa2_cons_fdt_methods, + sizeof(struct dpaa2_cons_softc)); + +DRIVER_MODULE(dpaa2_cons_fdt, simplebus, dpaa2_cons_fdt_driver, 0, 0); +#endif diff --git a/sys/modules/dpaa2/Makefile b/sys/modules/dpaa2/Makefile index eeb9e7f340bf..f469bfc032d1 100644 --- a/sys/modules/dpaa2/Makefile +++ b/sys/modules/dpaa2/Makefile @@ -17,6 +17,8 @@ SRCS+= dpaa2_swp_if.c dpaa2_swp_if.h SRCS+= dpaa2_mc_if.c dpaa2_mc_if.h SRCS+= memac_mdio_common.c memac_mdio_if.c memac_mdio_if.h +SRCS+= dpaa2_console.c + SRCS+= bus_if.h device_if.h miibus_if.h SRCS+= pcib_if.h pci_if.h SRCS+= opt_acpi.h opt_platform.h From nobody Mon Jun 26 12:08: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 4QqRSg0NTYz4k6TR; Mon, 26 Jun 2023 12:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSf61d5z3hG3; Mon, 26 Jun 2023 12:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vu4IG/DdOJkAcK8vN5p7pNvDNtuUmwyCn/9NpDPKjgg=; b=E1WKx8lsj3xf2pYI5bfsKK2u53aqrqXojrQHIU8oghGFH6mGeArS2niAoH3QA0D4jF46Ts qinKjURhyMun4p7dycqxmmAkWJIXzIytP8wqlTW38hHpMLdOIR7pJhXY3hNmIBeHc2c3Rz Vzn762svCSn8oW729ePN6RVFoZGI+x4HJhrJm2Qwo7hALT9OEa6WMx1iCOBN36ZbTz4hbC qVj/E7cJ6rVZgr3GnzyD//FRaTm9cooi2odnJQ1cM2AnNQ1HBpepeOX1GSkH+DJsDGF+dt hzl+w2PvNG81PncQJhHEF02RCuDCR/HVoFNzcLXKnj7XX/wDi/3yqcY65olGcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vu4IG/DdOJkAcK8vN5p7pNvDNtuUmwyCn/9NpDPKjgg=; b=Hm4RxKOpZlF2PSnLB+VrWHEGXZ3TjhomFIStJt3PvxMfi4WkY5ZF7g0dY6pI+ovvGPfqOE dTXeb+VSyF8Lc9j3AN3UMP8pEcksZNEHfSnDwh7atqtVGmz/DC2aIPFGbg2xgHkSY8K0mC a7ywnBLGApn1NdKxY2NhsvWbfD6iWiVgiy0swVMFemd8rn4J1nspokPsisuhfg80OWXhh1 22bM8OijqDU5fIXwyV5WHZzyx6aknubPJgglSQFUmwy1UrJ3wE/H4t6ZCGw+UEfGRTPkEb 0V9fN2xRHEOjJJuym6LGnr/8Wg6q5hIjGmJvNBktxZrsx7wTdIxJCC/YV3ey1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781299; a=rsa-sha256; cv=none; b=HFnuKt3UoFi9ZmJnegWzEQM4xZ17/ufDDbvPPA6YiZdlznAWg3iz7vfe401kOOMqpDZAm+ k0qJ05YD/mDYm6pvSQGnS9ay2a92lkaeuxsy5zrZTnsot/XvK42AD6STIsbCQn6Jys5PIS YFkCv5Yl1mIguaOsxtx5sR2sFYgtV0Z/Yr6peiMXUQYDi7lBOCpmuyBgnbkNxWzWdXsRw9 +S4Rttgr6TX0jGkaFcEZxTyWhAh3rYREFSUZQa8tPhZLwBbau8i6EJdbT8OhO0S87S3Evx +nXvWfvJ6IbtQ6nsQvzTTLhFThfvimwqGcl1b8hMdAnZNfM+sXK8iQiDb133ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSf4ywVz18Nr; Mon, 26 Jun 2023 12:08:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8Ii5082751; Mon, 26 Jun 2023 12:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8Isl082750; Mon, 26 Jun 2023 12:08:18 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:18 GMT Message-Id: <202306261208.35QC8Isl082750@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: ca5e52ed3a5d - stable/13 - net80211: make ieee80211_scan_dump_channels 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/stable/13 X-Git-Reftype: branch X-Git-Commit: ca5e52ed3a5d46ee8ab0ed1af5b3616f1f7c188a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ca5e52ed3a5d46ee8ab0ed1af5b3616f1f7c188a commit ca5e52ed3a5d46ee8ab0ed1af5b3616f1f7c188a Author: Bjoern A. Zeeb AuthorDate: 2023-03-14 21:01:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 08:27:10 +0000 net80211: make ieee80211_scan_dump_channels private ieee80211_scan_dump_channels() is only used locally and only when IEEE80211_DEBUG is compiled. Stop exporting it, make it file local and hide under the #ifdef to reduce the footprint for production kernels a tiny bit. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38833 (cherry picked from commit d7fb679dc96b07c38eedfa8c91817b44b214c799) --- sys/net80211/ieee80211_scan.c | 4 ++-- sys/net80211/ieee80211_scan.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c index 50b3151063fa..1e5b6a3f0d14 100644 --- a/sys/net80211/ieee80211_scan.c +++ b/sys/net80211/ieee80211_scan.c @@ -277,7 +277,8 @@ ieee80211_scan_update_locked(struct ieee80211vap *vap, } } -void +#ifdef IEEE80211_DEBUG +static void ieee80211_scan_dump_channels(const struct ieee80211_scan_state *ss) { struct ieee80211com *ic = ss->ss_ic; @@ -294,7 +295,6 @@ ieee80211_scan_dump_channels(const struct ieee80211_scan_state *ss) } } -#ifdef IEEE80211_DEBUG void ieee80211_scan_dump(struct ieee80211_scan_state *ss) { diff --git a/sys/net80211/ieee80211_scan.h b/sys/net80211/ieee80211_scan.h index 07d927cfa1e1..609339ae77e8 100644 --- a/sys/net80211/ieee80211_scan.h +++ b/sys/net80211/ieee80211_scan.h @@ -163,8 +163,6 @@ void ieee80211_scan_detach(struct ieee80211com *); void ieee80211_scan_vattach(struct ieee80211vap *); void ieee80211_scan_vdetach(struct ieee80211vap *); -void ieee80211_scan_dump_channels(const struct ieee80211_scan_state *); - #define IEEE80211_SCAN_FOREVER 0x7fffffff int ieee80211_start_scan(struct ieee80211vap *, int flags, u_int duration, u_int mindwell, u_int maxdwell, From nobody Mon Jun 26 12:08: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 4QqRSh0NP0z4k6GQ; Mon, 26 Jun 2023 12:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSg6kn0z3RM4; Mon, 26 Jun 2023 12:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcaF2ViPLgdQaG0lnDT5uzXB8bu44UgLdTc4zs064q0=; b=GrHrbxQ5jkSWmZT5lLexHCic0z89Um1xJQ/SUj5irk0m2j7tkYcbkixh51dj3Txmp+BhMo JNOqk8mnWC7tXkClP+joE4w4lw56cHHdO/bwDsUZUDaGKvMEzZPY220C0C/qVFK9z8Hoxi UvfOy+bjjEfnKgK1XaFVnfu2A38KeJgd1qbuOcuwwNZa/JXw/9M5iQb3ixzqwWeokGbbTQ dvQw2COHzAZwXg0+SeZkMcfvicQAyGOszkhE6KJgsSe/IU5jphQyoe6TuG5V7DbDSkWyJk GQM0ItX2NtDDTGozScUT7kGZAanjeOrxZK2HLd2qieQHTVoLXGwBKKu36dP9PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcaF2ViPLgdQaG0lnDT5uzXB8bu44UgLdTc4zs064q0=; b=pNuBofQcp+mQHoL1qHD/jNmMVkYwHitKSqeEMwIuvt/gjGqcNoCFBBebFcvAG53mN8EzHB UyxTJwLERWxF1MXSTp8fB1AvvatZClypeqOyVeGpcJMMmHyq8ZBJEnIoiA4G6r+voWY3sV zWbnbUah8AeQEHB/HNc34uuR6UyOEuO2iy09jQfBcVfiWpbhv1yYxoi9wO5gN77G7Q+A7k QgMJd2OP5ccs1HBPg8JCfAtNTlT1mrQGWi6c9ehMdWEn3/X1vrQyI0PdDYnAWu83ouCuIL aDrKBwOMBBb6GUVvvKHW/g9CUPkYBWVWuIW9LTj6jJqn5EW9zHrWC1xI9AV7BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781300; a=rsa-sha256; cv=none; b=Bho53T3HLBLk2CQhK13jLU/LOMd3gj3jcBcGj0Bms9yhUuvZrxP6o6JbID3gQyJ3WfRgIa GggJAca3AdzmvT+HsHtCNtqjxolPkxX5KgU1K/Ci5vMtmk+lOue+wIqbsh4VnJYsSKL1Ao v2sWwuqqIDP4LCVnaybGBWB1NMcw0Y7Z5eFab72Rzx76AeJ1u1WiddXa7FtC/H/kdRHkjj IkJGGBCcETPFTgesk4gfnYP0QdOtF9YjVZSRDepAT1oO6U246p7IxCZ4CzaX2NSR1+2CZl Z3Ap2E9X3cqdGQyliW4DzAqVPEGS+j+/YQQyQ6pYrnwZ8n8DqTQ+QIWKYVLJjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSg5dBdz18LZ; Mon, 26 Jun 2023 12:08:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8J9s082771; Mon, 26 Jun 2023 12:08:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8J0R082770; Mon, 26 Jun 2023 12:08:19 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:19 GMT Message-Id: <202306261208.35QC8J0R082770@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: c6f7abeaeb5b - stable/13 - net80211: define mask for ss_flags rather than using hardcoded 0xfff List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: c6f7abeaeb5ba9754799c4ff2129a4c49056448d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c6f7abeaeb5ba9754799c4ff2129a4c49056448d commit c6f7abeaeb5ba9754799c4ff2129a4c49056448d Author: Bjoern A. Zeeb AuthorDate: 2023-03-14 21:00:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 08:29:22 +0000 net80211: define mask for ss_flags rather than using hardcoded 0xfff scan state ss_flags in two places cut off the "internal" GOTPICK options. Replace the hardcoded 0xfff with a defined mask. Note that "internal" flags is confusing as we also supplement the the 16bit by another 16bit of "internal flags" passed around but comaparing to GOTPICK never stored to my understanding. No functional change. Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D38832 (cherry picked from commit 3346164ce844f8995311c3988ab193bd6ddda0c9) --- sys/net80211/ieee80211_scan.h | 1 + sys/net80211/ieee80211_scan_sw.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_scan.h b/sys/net80211/ieee80211_scan.h index 609339ae77e8..32330322ce33 100644 --- a/sys/net80211/ieee80211_scan.h +++ b/sys/net80211/ieee80211_scan.h @@ -136,6 +136,7 @@ struct ieee80211_scan_state { #define IEEE80211_SCAN_ONCE 0x0010 /* do one complete pass */ #define IEEE80211_SCAN_NOBCAST 0x0020 /* no broadcast probe req */ #define IEEE80211_SCAN_NOJOIN 0x0040 /* no auto-sequencing */ +#define IEEE80211_SCAN_PUBLIC_MASK 0x0fff /* top 4 bits for internal use */ #define IEEE80211_SCAN_GOTPICK 0x1000 /* got candidate, can stop */ uint8_t ss_nssid; /* # ssid's to probe/match */ struct ieee80211_scan_ssid ss_ssid[IEEE80211_SCAN_MAX_SSID]; diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c index 4c184095ad35..f72f4658ad67 100644 --- a/sys/net80211/ieee80211_scan_sw.c +++ b/sys/net80211/ieee80211_scan_sw.c @@ -195,8 +195,7 @@ ieee80211_swscan_start_scan_locked(const struct ieee80211_scanner *scan, if ((flags & IEEE80211_SCAN_NOSSID) == 0) ieee80211_scan_copy_ssid(vap, ss, nssid, ssids); - /* NB: top 4 bits for internal use */ - ss->ss_flags = flags & 0xfff; + ss->ss_flags = flags & IEEE80211_SCAN_PUBLIC_MASK; if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) vap->iv_stats.is_scan_active++; else @@ -306,7 +305,7 @@ ieee80211_swscan_check_scan(const struct ieee80211_scanner *scan, ic->ic_flags |= IEEE80211_F_SCAN; /* NB: need to use supplied flags in check */ - ss->ss_flags = flags & 0xff; + ss->ss_flags = flags & IEEE80211_SCAN_PUBLIC_MASK; result = ss->ss_ops->scan_end(ss, vap); ic->ic_flags &= ~IEEE80211_F_SCAN; From nobody Mon Jun 26 12:08: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 4QqRSj2brwz4k6Tc; Mon, 26 Jun 2023 12:08: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 4QqRSj125tz3hS1; Mon, 26 Jun 2023 12:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hi/y+7j/gCk3bGUrIedoWGMzUHBe+GseEkJ3GqoAnRg=; b=p+s1aVKaRK80r7g8FVwxnRuPIfxFX/jBozFkFsGPW02c3iKrWAJobPNrkisDTcVOEZhWcw sdWed2vGfVgLeqm7/ZeYimkj6MwF7PCvrtgoHjR8ddexDwjjyi+0IEcVLsXS21AnuoA7mz M47jGN6O7wCLAIhVYsRgI0QeEX9sqGu2teuiTVx0/sVYW0xZ8xfTf2cuhJ490csJsjscds LdFVOeVrU1StcV5DsL1HRv/BDcfC4BKjBCLbOt0KMiTnqgIIHAq66aHn0lQzZOhqWTgHMP FgdOoZi1FtXD/Dpt9bxTBoA5xaBveUjW/Q0WlSK3fcK3APfdIfxrs+Zr/UrZLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hi/y+7j/gCk3bGUrIedoWGMzUHBe+GseEkJ3GqoAnRg=; b=EdKOfXu+N98irsWCUgSVycEri4KtojW/jmquNUqCqip2kwup6xYgpvVSLalvwjlVZgGTA8 iwlU42rR+NenpXrTBMW4W5PcCVN6BfIbgdy41R/wE7h4jQWg3LoeCzUHUH7fBErJqG8shX sVTFpC845fQ6tHglzHR/c3na7Xrx5lbc1nfL5Y87UaTF4iHm50bWLTxiJQrOwSqIRtnr0k dWkqjwIudRjolCz5owG4pqlXQ9t9WDeBI/P+nzkxAt//kmXdREPDdIdD8Fi0P2uI5yJERc k74h5yeQyppKpw2vyd9WR2WsBU47MqA6aj/kP2fp9HrZ++2ZmIC1GyEb7tRKHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781301; a=rsa-sha256; cv=none; b=MIj5/OTfOfMDfAGFcItdFkcsK2bJduldToEa9RDltOUqcxHlYBh6LMwQopd7FkjjizFIc1 0txYToaqlYSZdaUlKT9ENoXfdjnRfYC7TWxK3iM3Mzk565B2FJhaSDV1KX0dKBt5OgsXMo MOZ656q9q2U+hLw1ECsKOlWNclRhoNqJfcJE1Fl0ctMzMQlLTM1+KNm1jZkyzSWfFvHMIx a+1AD+UlrNpS2M8HXgF6qtMpNaM80PkD6ZTCmH6LQ5FwNiTo/2LncjtKWE0B/Hp/Tx1nAk 9GOY9dlZUt1QUuXbHIpPKsbG4pBPK78CtAg4JIAcZp76GAgiM0HNGfX+gs8uDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSh6KQRz18Cd; Mon, 26 Jun 2023 12:08:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8KqY082791; Mon, 26 Jun 2023 12:08:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8KXl082790; Mon, 26 Jun 2023 12:08:20 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:20 GMT Message-Id: <202306261208.35QC8KXl082790@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: a3a5f67d3949 - stable/13 - ifconfig: ifieee80211: print bssid name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: a3a5f67d394999dc79be1c32a02ae659eea24963 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a3a5f67d394999dc79be1c32a02ae659eea24963 commit a3a5f67d394999dc79be1c32a02ae659eea24963 Author: Bjoern A. Zeeb AuthorDate: 2023-03-21 21:25:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 08:29:30 +0000 ifconfig: ifieee80211: print bssid name In certain setups (e.g., autonomous APs) it is extremly helpful to have a way to map the BSSIDs to names for both normal status output as well as the scan list. This often allows a quicker overview than remembering (or manually looking up) BSSIDs. Call ether_ntohost() on the bssid and consult /etc/ethers and print "(name)" after the bssid for the status output and "(name)" at the end of the line after the IE list. Reviewed by: adrian, cy Differential Revision: https://reviews.freebsd.org/D39192 (cherry picked from commit e091be417add7e9130653462012a9ab2f4fb5269) --- sbin/ifconfig/ifieee80211.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index cb465a02b794..065a141da0f1 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -3716,6 +3716,17 @@ printmimo(const struct ieee80211_mimo_info *mi) mi->ch[3].noise[0]); } +static void +printbssidname(const struct ether_addr *n) +{ + char name[MAXHOSTNAMELEN + 1]; + + if (ether_ntohost(name, n) != 0) + return; + + printf(" (%s)", name); +} + static void list_scan(int s) { @@ -3767,6 +3778,7 @@ list_scan(int s) ); printies(vp + sr->isr_ssid_len + sr->isr_meshid_len, sr->isr_ie_len, 24); + printbssidname((const struct ether_addr *)sr->isr_bssid); printf("\n"); cp += sr->isr_len, len -= sr->isr_len; } while (len >= sizeof(struct ieee80211req_scan_result)); @@ -4904,8 +4916,10 @@ ieee80211_status(int s) printf(" channel UNDEF"); if (get80211(s, IEEE80211_IOC_BSSID, data, IEEE80211_ADDR_LEN) >= 0 && - (memcmp(data, zerobssid, sizeof(zerobssid)) != 0 || verbose)) + (memcmp(data, zerobssid, sizeof(zerobssid)) != 0 || verbose)) { printf(" bssid %s", ether_ntoa((struct ether_addr *)data)); + printbssidname((struct ether_addr *)data); + } if (get80211len(s, IEEE80211_IOC_STATIONNAME, data, sizeof(data), &len) != -1) { printf("\n\tstationname "); From nobody Mon Jun 26 12:08: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 4QqRSk3F2Tz4k6Yh; Mon, 26 Jun 2023 12:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSk1T6Cz3hH0; Mon, 26 Jun 2023 12:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y73ah+ON2YBzKAE4tfOZzdO6BXrsiLgl1kixIj5PunY=; b=XyajDyoCNTVuyToyXTEVjV+QXJ8d03C3Wgu6WmVmkjov0K3gWK6TGHiM+fNdZJU3wOmhuE GbKay319u11klCDdQIKB32i+htQZclAPYy1jcFEa/T5jHMBxbsxCxQMW2jOFV6Ea/DCmYJ yGxQ4hd6p/SG5ewZdMHu8HWs8z8MoVNKhWnyL9e73MFS3q9Yki6MSc5EyO3wtCvu2EfPX/ qAqx5Bm3XZhx9aHVEpU5cfU3qS2TFfjpRxzVCUCekp/WgJvolEMzwyEGGA6sLPNvX/f3Oa /88ZjdXN+KJNWa4QMAz9F8bkXuausi8qR7assGwZavVSvkVzVMq8HGxHRp9i9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y73ah+ON2YBzKAE4tfOZzdO6BXrsiLgl1kixIj5PunY=; b=FJ8Alm6gvaUBWOFRnOAybI//sAWhiSAww23Mruwwuex2AZWIyomeNbE3nnjCIcA5D7nZfz U8g5uEsPSGm/DcSUBf1ri1NUmoB4Wl8bUXiUtcuatzbCM9Lu64D3IiuYP0NVGrsKxufbT+ TITQKintQ23dhabBZGIbMDw+MLXgJryzGD5pfhSs+fpqPbgutWqHy3+3GxbrJ66O2xLaHz NM1+PzzdSmtqlE/y02+pzSbZ616eEl3SYhNOv9cQFtG6ZTR47dxv+rjjGGwuwNEBWfdin0 kn98X+9e5ZEUof3K9NqBR1fbPpv912iw82mbJQhH4mUvMe8RDQUmRlVsXkZ6ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781302; a=rsa-sha256; cv=none; b=LE26RjA+jldWu2CG9USIPl/lli8Pv/XMvrl9mgOVgKh/6kCaL3brNTekQe9qX87Qc6NrWd tHNbjkQhv2FAMd1FrK2Fm/NC9/KOBSxd2Zz/sGcnxIcyZIQ2t84dyrpwQLaKNR6NoyNQ3z 0coHS3w07hXDpfJCjITquBFKDSHUXw4IZ6/xBZX2KSc4xL7ndekNKNHzwGY9n61Di+aJZr m2np/hWhMk03PYZm5ZSDDsJyc+ZNNDjz50wzIGujlstoJCD+yGED6cnH1fOYJiWaz43x8Y /+3osVUyuzoY4S6RIzGWZyM2PDeo74eoDhx2cde1w1QYjT+BiMX/beLkhOC31g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSk07t6z18Cf; Mon, 26 Jun 2023 12:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8L2b082811; Mon, 26 Jun 2023 12:08:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8LjB082810; Mon, 26 Jun 2023 12:08:21 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:21 GMT Message-Id: <202306261208.35QC8LjB082810@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: ded53e898c7b - stable/13 - rc/WPA: driver_bsd.c: backout upstream IFF_ change and add logging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: ded53e898c7be6d610e94c1746fd22304f5c5988 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ded53e898c7be6d610e94c1746fd22304f5c5988 commit ded53e898c7be6d610e94c1746fd22304f5c5988 Author: Bjoern A. Zeeb AuthorDate: 2023-03-23 22:37:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:00:55 +0000 rc/WPA: driver_bsd.c: backout upstream IFF_ change and add logging This reverts the state to our old supplicant logic setting or clearing IFF_UP if needed. In addition this adds logging for the cases in which we do (not) change the interface state. Depending on testing this seems to help bringing WiFi up or not log any needed changes (which would be the expected wpa_supplicant logic now). People should look out for ``(changed)`` log entries (at least if debugging the issue; this way we will at least have data points). There is a hypothesis still pondered that the entire IFF_UP toggling only exploits a race in net80211 (see further discssussions for more debugging and alternative solutions see D38508 and D38753). That may also explain why the changes to the rc startup script [1] only helped partially for some people to no longer see the continuous CTRL-EVENT-SCAN-FAILED. It is highly likely that we will want further changes and until we know for sure that people are seeing ''(changed)'' events this should stay local. Should we need to upstream this we'll likely need #ifdef __FreeBSD__ around this code. Remove ifconfig down/up workaround (bfb202c4554a) in rc.d/wpa_supplicant as it is no longer needed. [1] 5fcdc19a81115d975e238270754e28557a2fcfc5 and d06d7eb09131edea666bf049d6c0c55672726f76 Sponsored by: The FreeBSD Foundation Reviewed by: cy, enweiwu (earlier) Differential Revision: https://reviews.freebsd.org/D38807 (cherry picked from commit bfb202c4554a72383202a1a401d80721935b8c95) Reviewed by: bz (for wireless) Differential Revision: https://reviews.freebsd.org/D39257 (cherry picked from commit 052211e08c0e227277d0c4dc603bba2253eb3d73) --- contrib/wpa/src/drivers/driver_bsd.c | 50 ++++++++++++++++++++++++++++-------- libexec/rc/rc.d/wpa_supplicant | 6 ----- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c index 345bbb892ecf..d5ff51cee456 100644 --- a/contrib/wpa/src/drivers/driver_bsd.c +++ b/contrib/wpa/src/drivers/driver_bsd.c @@ -294,8 +294,9 @@ bsd_send_mlme_param(void *priv, const u8 op, const u16 reason, const u8 *addr) } static int -bsd_get_iface_flags(struct bsd_driver_data *drv) +bsd_ctrl_iface(void *priv, int enable) { + struct bsd_driver_data *drv = priv; struct ifreq ifr; os_memset(&ifr, 0, sizeof(ifr)); @@ -307,6 +308,33 @@ bsd_get_iface_flags(struct bsd_driver_data *drv) return -1; } drv->flags = ifr.ifr_flags; + + + if (enable) { + if (ifr.ifr_flags & IFF_UP) + goto nochange; + ifr.ifr_flags |= IFF_UP; + } else { + if (!(ifr.ifr_flags & IFF_UP)) + goto nochange; + ifr.ifr_flags &= ~IFF_UP; + } + + if (ioctl(drv->global->sock, SIOCSIFFLAGS, &ifr) < 0) { + wpa_printf(MSG_ERROR, "ioctl[SIOCSIFFLAGS]: %s", + strerror(errno)); + return -1; + } + + wpa_printf(MSG_DEBUG, "%s: if %s (changed) enable %d IFF_UP %d ", + __func__, drv->ifname, enable, ((ifr.ifr_flags & IFF_UP) != 0)); + + drv->flags = ifr.ifr_flags; + return 0; + +nochange: + wpa_printf(MSG_DEBUG, "%s: if %s (no change) enable %d IFF_UP %d ", + __func__, drv->ifname, enable, ((ifr.ifr_flags & IFF_UP) != 0)); return 0; } @@ -526,7 +554,7 @@ bsd_set_ieee8021x(void *priv, struct wpa_bss_params *params) __func__); return -1; } - return 0; + return bsd_ctrl_iface(priv, 1); } static void @@ -1030,7 +1058,8 @@ bsd_init(struct hostapd_data *hapd, struct wpa_init_params *params) if (l2_packet_get_own_addr(drv->sock_xmit, params->own_addr)) goto bad; - if (bsd_get_iface_flags(drv) < 0) + /* mark down during setup */ + if (bsd_ctrl_iface(drv, 0) < 0) goto bad; if (bsd_set_mediaopt(drv, IFM_OMASK, IFM_IEEE80211_HOSTAP) < 0) { @@ -1055,12 +1084,13 @@ bsd_deinit(void *priv) { struct bsd_driver_data *drv = priv; + if (drv->ifindex != 0) + bsd_ctrl_iface(drv, 0); if (drv->sock_xmit != NULL) l2_packet_deinit(drv->sock_xmit); os_free(drv); } - static int bsd_set_sta_authorized(void *priv, const u8 *addr, unsigned int total_flags, unsigned int flags_or, @@ -1309,7 +1339,7 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) * NB: interface must be marked UP for association * or scanning (ap_scan=2) */ - if (bsd_get_iface_flags(drv) < 0) + if (bsd_ctrl_iface(drv, 1) < 0) return -1; os_memset(&mlme, 0, sizeof(mlme)); @@ -1354,11 +1384,8 @@ wpa_driver_bsd_scan(void *priv, struct wpa_driver_scan_params *params) } /* NB: interface must be marked UP to do a scan */ - if (!(drv->flags & IFF_UP)) { - wpa_printf(MSG_DEBUG, "%s: interface is not up, cannot scan", - __func__); + if (bsd_ctrl_iface(drv, 1) < 0) return -1; - } #ifdef IEEE80211_IOC_SCAN_MAX_SSID os_memset(&sr, 0, sizeof(sr)); @@ -1664,7 +1691,7 @@ wpa_driver_bsd_init(void *ctx, const char *ifname, void *priv) drv->capa.key_mgmt_iftype[i] = drv->capa.key_mgmt; /* Down interface during setup. */ - if (bsd_get_iface_flags(drv) < 0) + if (bsd_ctrl_iface(drv, 0) < 0) goto fail; /* Proven to work, lets go! */ @@ -1688,6 +1715,9 @@ wpa_driver_bsd_deinit(void *priv) if (drv->ifindex != 0 && !drv->if_removed) { wpa_driver_bsd_set_wpa(drv, 0); + /* NB: mark interface down */ + bsd_ctrl_iface(drv, 0); + wpa_driver_bsd_set_wpa_internal(drv, drv->prev_wpa, drv->prev_privacy); diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant index e7a34e6c5f6e..8a86fec90e4d 100755 --- a/libexec/rc/rc.d/wpa_supplicant +++ b/libexec/rc/rc.d/wpa_supplicant @@ -12,7 +12,6 @@ name="wpa_supplicant" desc="WPA/802.11i Supplicant for wireless network devices" -start_postcmd="wpa_poststart" rcvar= ifn="$2" @@ -28,11 +27,6 @@ is_ndis_interface() esac } -wpa_poststart() { - ifconfig ${ifn} down - ifconfig ${ifn} up -} - if is_wired_interface ${ifn} ; then driver="wired" elif is_ndis_interface ${ifn} ; then From nobody Mon Jun 26 12:08: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 4QqRSl3T5qz4k6fc; Mon, 26 Jun 2023 12:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSl1mByz3hQm; Mon, 26 Jun 2023 12:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/AZjE6nlqPM2HDk99FBjZlR7kyk+oqpuqdEZI5JUcg=; b=lD2V12jRBh4rKm9zreD1BPbOBIc2B4zmcLh3MNkk9luW5CFsbIiBNSUc2y8q5qfS0hzW8d OLGCKYPchPIm78TKC1UiJahRWvfJUqwqTB9I3ahdnULggiiEAtQlRKmnpb/gTebIiTngIV tw8HdrlEw11HBtuVxz/LjTHckT+bzr14Bhp8a5roLmf/GKLU9zowP+oQBRH5eziAQkw6qZ YEBrSqnhAhoKblbzOiXQamzdjamWWRw3KzJ6IDQLYNKyfTOTV/O7r08LlnL8ZqOvtbv0tF 6PiPomvhwAHLKbxIytUKsaMQ7R88K4wgdQPGfa1DvkcUemDHVPt+RMu9QL822w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/AZjE6nlqPM2HDk99FBjZlR7kyk+oqpuqdEZI5JUcg=; b=GeDLTtc7h0wTansDiJmi+wtLYVoQJEjDlA64I/j6189aFC2or/Fg1SpToe1Vjq7fFR2daT 7PUneI+zkmQ9BDa/BHZ+QuoncWH+hC3LUXhbZ//Ov1H5I4MZ/ztWheeoDGBUGS6Mev16bD KM5EaboY07uNobe3qmRunPkg/S6vTbAgJyOZYiQx3NP1mKhye6NrH65CUe8w+0XNalj+Wy qGe7lsNOPio6roUEQ/Y7smCK2lMX0AB9uAu6rJM7/o8/KZXXdx1+0NUeJNLxkl+LLkZM5C HA9YApKnfufbRs0/v0/TrRrdLOqc1LRUfQCPYG/tXQRU0weNffjgTQaAXNbXCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781303; a=rsa-sha256; cv=none; b=u7+qLDnf3ocMupFctU5BQI0l8zJ8NKp+MCV52v18KmpqScp7BdQhjyQIs4vEP2voysKHOW +E8kK6mFqf+7VkXrBJZrHb0MuSw4DlvKpjOsk3ZCEJs0aYkjBC3fd0EzVdaQ5QzFHUvoDz ijGik1PgnJLXJ1tjpOmhdA6bMW3SLp/zAg9ezBH5t2dx4wP5ienqcUrQRDHf9hR26Zx8Xj /gin2MnHuAG6c1eqXiUgQ8IvAyZjh9jdw6yCuSuqzueiLWOiCsX1WuU1l9KVxw7D/xnRNc M7fwM68grQef/MV1gjF5gjurtToM1CWhUS3YqlJVzI+KsrPRBJvJkSeKZSd8DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSl0rtTz18Ns; Mon, 26 Jun 2023 12:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8N15082836; Mon, 26 Jun 2023 12:08:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8NuT082835; Mon, 26 Jun 2023 12:08:23 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:23 GMT Message-Id: <202306261208.35QC8NuT082835@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: 6a50f0e12d9c - stable/13 - network.subr: adjust regex for wlans_xxxxx rc.conf 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a50f0e12d9c1dce684a4ad93cebdd815636add4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6a50f0e12d9c1dce684a4ad93cebdd815636add4 commit 6a50f0e12d9c1dce684a4ad93cebdd815636add4 Author: Bjoern A. Zeeb AuthorDate: 2023-04-18 14:40:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:04:12 +0000 network.subr: adjust regex for wlans_xxxxx rc.conf entries Drivers like ath1[012]k will not match the current wlans_*-regex as they have digits followed by letters. Adjust the regex to allow this combination in order to be able to configure interfaces with names like wlans_ath11k0="..." Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39674 (cherry picked from commit de1dde5dfea4407119955a6f94528396b258db3f) --- libexec/rc/network.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/network.subr b/libexec/rc/network.subr index 29ac06daefb2..852a548b7afc 100644 --- a/libexec/rc/network.subr +++ b/libexec/rc/network.subr @@ -1259,7 +1259,7 @@ wlan_up() _iflist=$* # Parse wlans_$parent="$child ..." - for parent in `set | sed -nE 's/wlans_([a-z]+[0-9]+)=.*/\1/p'`; do + for parent in `set | sed -nE 's/wlans_([a-z]+[a-z0-9]+[0-9]+)=.*/\1/p'`; do child_wlans=`get_if_var $parent wlans_IF` for child in ${child_wlans}; do create_args="wlandev $parent `get_if_var $child create_args_IF`" @@ -1301,7 +1301,7 @@ wlan_down() _iflist=$* # Parse wlans_$parent="$child ..." - for parent in `set | sed -nE 's/wlans_([a-z]+[0-9]+)=.*/\1/p'`; do + for parent in `set | sed -nE 's/wlans_([a-z]+[a-z0-9]+[0-9]+)=.*/\1/p'`; do child_wlans=`get_if_var $parent wlans_IF` for child in ${child_wlans}; do case $_iflist in From nobody Mon Jun 26 12: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 4QqRSm3lZ3z4k6fd; Mon, 26 Jun 2023 12: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 4QqRSm2n5lz3hL8; Mon, 26 Jun 2023 12: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=1687781304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F4NVJPve5H524fydqi/XeKGR9QZ9su532Ey240aGoQo=; b=IrBDzsOaSfEaxgNk2x44DmbCQXUJuTtG6DCuJLsH8SR0g6/UfeO7ZQcCBN9ZCb07uzifkV mDWtVFz43BTvPbmkxP1hODZX2Z+dS1BvBiBXS8xTQ2qcmlpTrf07Zaw4Kz+skwdsmODrIX s26rFSW7QZxRhzSfs/hH60u5Xr8mVwnmgh1KJU2hOL+weVMtngPYSPsWC3hw/y8+bW8qVH xnphM/ZUsSspv2mWMjCnrkx0utzIVOqOrf40v+afEow/8iKWbiIi9JPNVgzs+Tn1SMiA9U n3MpH5bWl/PBu0E/05L+kvrwxBIwjQmh0LlxA7SnnMb5TsEM9PKBN1bJS8d3Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F4NVJPve5H524fydqi/XeKGR9QZ9su532Ey240aGoQo=; b=rBQsRS9VZP0FdbJ+1WcW+O5wsSVn4piN+mrbrX6AcM5rO3HFp/VVYgFZVyUHm8MRmd6RN4 KrI6Wfkcai7pohh8mvRfT+dmDnkwUZub3T+HlS6CRYLz+T6uDudINebcfXEXEfKhjk9JM2 aw+z5sNfuyUJO+Yfe/D9fnEDXvSrurC/NTN7LeqPe23fsce9G2Iq28vnKbk9hZhRugjK6O +4H8P9rS8MzSLtRI+Ja01jnLV4GrO0ZKlT++V9B9mgRX4Cv/lUWZ6SlBzIS+6reQgJgZfN 5AvYdJTCA1fsz+bj5JNdjtwCd405BK7s2BOxJFwlwIe5nd62+w97v54chriAkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781304; a=rsa-sha256; cv=none; b=KoM1zDmRq2ThRZKi4KMYjNYIloXGQ2/W+663RxnukLRyiBlMHGPv9hg0mKqnhEqwvq3DmX Ine7KtIj0+Dx5oE9nd8rEC7X9ddIrWs55GfyY2EcaHe3luvmFkzO2aZZQVABjq+gLI48CB V2Gm9R1gdprZcpvcwIrn4v/l3QMpGnbwSYZse3i+CW2EX1ECNVttfN6kBCqaO3A0wJrN8R HbuM1bGJ/MRy5B7FGeM/4UN6Whxz7m0gUtnmolNSyRwcJTvTweRoewgoKfClvAbQ0+Phti 3p3Pj14eMVMtfzs4sHs8IbB1dp5jE4GRd/wN7CNvxNnJmpBZaOMbFR/WKh/unw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSm1tWrz17dV; Mon, 26 Jun 2023 12:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8OBq082855; Mon, 26 Jun 2023 12:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8OlM082854; Mon, 26 Jun 2023 12:08:24 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:24 GMT Message-Id: <202306261208.35QC8OlM082854@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: bacbebb16d84 - stable/13 - ifconfig: improve trimming off interface number at end List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: bacbebb16d844100eefdb3b98007952272428e45 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bacbebb16d844100eefdb3b98007952272428e45 commit bacbebb16d844100eefdb3b98007952272428e45 Author: Bjoern A. Zeeb AuthorDate: 2023-05-17 20:40:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:04:18 +0000 ifconfig: improve trimming off interface number at end When trying to auto-load a module, we trim the interface number off the end. Currently we stop at the first digit. For interfaces which have numbers in the driver name this does not work well. In the current example ifconfig ath10k0 would load ath(4) instead of ath10k(4). For module/interface names like rtw88[0] we never guess correctly. To improve for the case we can, start trimming off digits from the end rather than the front. Sponsored by: The FreeBSD Foundation Reported by: thierry Reviewed by: melifaro, thierry Differential Revision: https://reviews.freebsd.org/D40137 (cherry picked from commit 2e6756b752e07878ae5f5e3e9b74934231f9fd17) --- sbin/ifconfig/ifconfig.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index f01f40e46a8b..6deeebba9f01 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1566,11 +1566,13 @@ ifmaybeload(const char *name) /* trim the interface number off the end */ strlcpy(ifname, name, sizeof(ifname)); - for (dp = ifname; *dp != 0; dp++) - if (isdigit(*dp)) { - *dp = 0; + dp = ifname + strlen(ifname) - 1; + for (; dp > ifname; dp--) { + if (isdigit(*dp)) + *dp = '\0'; + else break; - } + } /* Either derive it from the map or guess otherwise */ *ifkind = '\0'; From nobody Mon Jun 26 12:08: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 4QqRSn58gxz4k6Z4; Mon, 26 Jun 2023 12:08: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 4QqRSn3QBxz3hYl; Mon, 26 Jun 2023 12:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yw5uFTTNjAW5fOmXnes/GmzEcLA2Ihe/ziAjR3Z+zBA=; b=McI+xgQUawxb3edkGECYnuOK+Y0kcxskmW1Nv5xbl4ysRkInIwZ3/bg7F5jhHySiLxzYZF iE8ugH4kp9Oh26h0nTEQk2ZEKOouRuPEgCf7N5DeM01mIPwi3JH6FEZq5jdOA7wPxfBYG+ bP77cffKbl85dxgUzZX4f/E70m1nK3j05wQe5Eslg2Yc2qLWFbv9mhcY49Q1ZZ6bXYXV/l 3Ogy0ynej+8b4dGt5Ln2BoJSaV5qNmABcaT6OML5eLUnUOprWBEpRDyzgDiB7hxgAGl9pB jx9lqJ56DqetDJ2d7fOWKnkPMUED20+2gP6UhU+i3B68PVfHmt8ZiGDurUvyIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yw5uFTTNjAW5fOmXnes/GmzEcLA2Ihe/ziAjR3Z+zBA=; b=RhXw6HhRmAzKLZI6qum41VtohXTndsS3n6CGkh4uKWJUQRi7ZP/IYn6eOBKdWxlGJLK89X yXG0Tmpzgmn1Iq4qwRq0zV++OPzvNG1Rg+uIkbuTuTdRCYF8MXAf0zPev7WYM+E3D7J5bK lNqPwDYqBNF45MSFnaH0+7GVa4RQMQmy13ebEcWGBrPbSlaYBsV7IygIMP7tdcTBhqBq1a pGHMNMGbXW+ZL7LtDHlFFmSLfs7D5cx9/U3G0kpNtLKbm4EmEDhQ8oVXAHoqOCBnG66UI2 pR2m9fFj09SsGlkgAWU868weFLX6jk/IWWQs/eh4U7IcpXfM+0JAuDmxoN8lKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781305; a=rsa-sha256; cv=none; b=txzt8h/68NnET9+YOpurdgqmre/KJ+eb3Bka3toxxyWUs5vqIvuDqoP8N2Ae6c5soH2ZTT 43wkvo7eCvlW1xMm8KzcnUABy+jZ+rcwXZqS/bpIS80mBVQdqUeGjdv/nPM1DFpYRS/emb YEOKy7/MKgkY2AxOVu/A/D8T7fPsVGQmEyr1AQwpZee7zekFLc6Cuwa3xULR3tTLNYcKaR QqHBR7fL8MYq7ptll+zGyzcBWoNs0YDLubDuPQkjGWxAXwC3sKUDO1CddsCb4cxKxoA5Bk CwxmROayq41ME+t7yaVdZYjXyfQ1kp4iLVwZWIRWi2clBEznQ5sEJ3At8+Hw3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSn2CKYz18TV; Mon, 26 Jun 2023 12:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8PH5082874; Mon, 26 Jun 2023 12:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8PSV082873; Mon, 26 Jun 2023 12:08:25 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:25 GMT Message-Id: <202306261208.35QC8PSV082873@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: 4bea3d1c6995 - stable/13 - man4: fix some mandoc lint for iwlwifi.4 and rtw88.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 4bea3d1c69952ee234553f4e83a5edcd4f4aa3d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4bea3d1c69952ee234553f4e83a5edcd4f4aa3d1 commit 4bea3d1c69952ee234553f4e83a5edcd4f4aa3d1 Author: Bjoern A. Zeeb AuthorDate: 2023-04-23 13:21:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:04:26 +0000 man4: fix some mandoc lint for iwlwifi.4 and rtw88.4 Address warnings (but one) from mandoc -T lint for these man pages. Sponsored by: The FreeBSD Foundation (cherry picked from commit b95fa4203d698063b02b03647cd00906cd94687a) --- share/man/man4/iwlwifi.4 | 16 +++++++++------- share/man/man4/rtw88.4 | 10 ++++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index 94614b3b15ff..201e1693783e 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -28,7 +28,7 @@ .\" $FreeBSD$ .\" .Dd June 3, 2022 -.Dt iwlwifi 4 +.Dt IWLWIFI 4 .Os .Sh NAME .Nm iwlwifi @@ -62,10 +62,10 @@ all chipsets supported by the part of that driver. .Pp .Bl -bullet -compact -.% --------------------------------------------------------------------- -.% This list is manually generated from a sysctl and post-processing. -.% Edits will be overwritten on next update. -.% --------------------------------------------------------------------- +.\" --------------------------------------------------------------------- +.\" This list is manually generated from a sysctl and post-processing. +.\" Edits will be overwritten on next update. +.\" --------------------------------------------------------------------- .It Intel(R) Dual Band Wireless AC 7260 .It @@ -180,7 +180,7 @@ Intel(R) Wi-Fi 6E AX231 160MHz Intel(R) TBD Bz device .It Intel(R) Wi-Fi 6 AX204 160MHz -.% --------------------------------------------------------------------- +.\" --------------------------------------------------------------------- .El .Pp .Nm @@ -197,7 +197,9 @@ The driver uses the and .Em linuxkpi compat framework to bridge between the Linux and -native FreeBSD driver code as well as to the native +native +.Fx +driver code as well as to the native .Xr net80211 4 wireless stack. .Pp diff --git a/share/man/man4/rtw88.4 b/share/man/man4/rtw88.4 index 4508ab8ab4f7..b6fad219d8c8 100644 --- a/share/man/man4/rtw88.4 +++ b/share/man/man4/rtw88.4 @@ -24,8 +24,8 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2022 -.Dt rtw88 4 +.Dd April 22, 2023 +.Dt RTW88 4 .Os .Sh NAME .Nm rtw88 @@ -69,7 +69,9 @@ The driver uses the and .Em linuxkpi compat framework to bridge between the Linux and -native FreeBSD driver code as well as to the native +native +.Fx +driver code as well as to the native .Xr net80211 4 wireless stack. .Pp @@ -108,4 +110,4 @@ section above. The .Nm driver first appeared in -.Fx 14.0 . +.Fx 13.2 . From nobody Mon Jun 26 12:08: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 4QqRSp5WjDz4k6Pg; Mon, 26 Jun 2023 12:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSp4PlXz3hby; Mon, 26 Jun 2023 12:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l9YEQN2U5ThFrZgxrbuW+ePyEdJilIcw5g1h19hGRh4=; b=jOxHpDXsH1Zb9OxPOiKi7R6nZWm4kOE9nU/Y0ea4qR2VB0/LYG+P7tbvO81VZaPzgE6s9h HF2Uze+4ddd//TPJQm7rFh0b+L95TmGqB1PPu6OVRjLr1XS17CiwrPhYr7TN47FZKNDcuE +KORx1VREN3jRbnk72HaktLAIDjgvYmS0pcDqeI3oG+AVFhQxSyogkwBjsOTB+zKyXfd2+ xxlwdaeiG1AbV4F1RW9Ktf6HKqAfqmpde2w9W9Hlqe6poPatPjD/oT+XgzN8rb2B6WA+eV 3LebkH06entpMmsEJySnfKUjv8phsWTF3PKX4H5NwQOeP0xwgJ8pNUBGoZBS1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l9YEQN2U5ThFrZgxrbuW+ePyEdJilIcw5g1h19hGRh4=; b=h48I3mHwbF2GENZYL0kn+5J3bK2PpDCTb1Ru6ZYohucK+SzjsBwJpEQt6+epf/b/wQ7UiN HHK44WAll5Oy7FwZ+2o9+7K7+Z0XUte5d9b2AmMUF05K5z+4whfQZmOYTtioRb2rldwOk6 YXh297ekCIyogtfmRaQewvsyg6BvT+cMQLbfmoEt0ZB2ux03HU0swvhOP49bSbdlFSE6uu AvCu3lI4A8nbdj8wCExnSM/QFIY2EwRYQAdZujXQzmiWKhGrQJ28xTS5B7XbXL2fO1GtOy AAevkZ1s0eveMuo6Ksj+782Zb9yPXWmrtoW6tpVejil9Xn/6luugrr63UF0YMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781306; a=rsa-sha256; cv=none; b=g4arXOJzo3KZQAVtPYurS1/ClY5DU145yRLCCI/pEIlX/lOrqTHT5Ux1m3hA948WP06YIL VQ/MJ61dQlzShbs7o+tn1u0x6rVYo/n2KySXNr1PPKbP9yflBQu712HUz5lap2NuUAORI3 Urd4crKfHnsS+iaLqc+bAj6FHyeFkoS9XPByAifAHJv/7m1RRBHoCaXsLNtK6/L61Nuz2p D4fomfVqwrkISvok1OO29n7DWfF1mSn+XFNSEdnbZrKAidUisK6Qxk65mbxkB9rNRABO98 F7zi6yaQHhgL935AqUCv9CsQ0/aS+SyASWM498UgP6kqS0zukmGCleADY2FL1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSp3789z17dW; Mon, 26 Jun 2023 12:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8QPo082893; Mon, 26 Jun 2023 12:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8QNn082892; Mon, 26 Jun 2023 12:08:26 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:26 GMT Message-Id: <202306261208.35QC8QNn082892@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: b534e975c2ba - stable/13 - KASAN: add bus_space*read*_8 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b534e975c2ba6b390db01d87a5993bb151b4ade9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b534e975c2ba6b390db01d87a5993bb151b4ade9 commit b534e975c2ba6b390db01d87a5993bb151b4ade9 Author: Bjoern A. Zeeb AuthorDate: 2023-04-15 15:35:50 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:07:12 +0000 KASAN: add bus_space*read*_8 for aarch64 Add the remaining bus_space*read*_8 functions conditionally for only arm64 in order to not break KASAN builds with new code using one of them. Suggested by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D39581 (cherry picked from commit 42742fe725102a73b09800f4d041ad69b5d81edb) --- sys/kern/subr_asan.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index 2f0334cf52be..95b5fcc1ea2d 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -868,6 +868,13 @@ ASAN_BUS_READ_PTR_FUNC(region, 4, uint32_t) ASAN_BUS_READ_PTR_FUNC(region_stream, 4, uint32_t) ASAN_BUS_READ_FUNC(, 8, uint64_t) +#if defined(__aarch64__) +ASAN_BUS_READ_FUNC(_stream, 8, uint64_t) +ASAN_BUS_READ_PTR_FUNC(multi, 8, uint64_t) +ASAN_BUS_READ_PTR_FUNC(multi_stream, 8, uint64_t) +ASAN_BUS_READ_PTR_FUNC(region, 8, uint64_t) +ASAN_BUS_READ_PTR_FUNC(region_stream, 8, uint64_t) +#endif #define ASAN_BUS_WRITE_FUNC(func, width, type) \ void kasan_bus_space_write##func##_##width(bus_space_tag_t tag, \ From nobody Mon Jun 26 12:08: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 4QqRSr0tYKz4k6X2; Mon, 26 Jun 2023 12: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 4QqRSq6HM9z3hfZ; Mon, 26 Jun 2023 12:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YfoahWHQsmJWYawgRdUKoNC/habO1bh/7c3hwqU9X6o=; b=fdgApZSwigS9D0FOkdG6t0HVFSLoGEdKc5eszya70erjnSJtoyxpGrMlQx97g7T25MIe63 LxkrGxb9G7alwwCGH2EDpAUD3SPXtSEI0MUr41AovCmRv0uj1AV6X3v3Z3610WRCPzoJGb SRS6lo32jkChFgNq5J4bRw00YvMaeMY3pkRWvhQJjL06S3wnGzt9mpIENnOvdyonO1mib+ QY0hf8XrW+pLUoiIrb1n3wN0yNegodnzPly9WEvwCwZA2FpHoDUN+PaKWBEqD9tnzflVbu UKAGFApxiD2yx1iGPWh9BoBFQuPhNlV3rCCLhr8a/q/BnAQLVeKyQdEF7l9+HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YfoahWHQsmJWYawgRdUKoNC/habO1bh/7c3hwqU9X6o=; b=qvkHemWlCRw/Wvj/4ej8CwzohP7tpisN35WPyXbLmKrNVj4+JLK5UNfab1VGWzc2nuqfwv q/fDrLH/YU3uUdr2SMOSoGIDM837MRNLUhEizIoZ1/dwpRBCtgngByLqiT4+4SVuP56m70 5mZng/w4U/BdqhFz6ryqXse8HHmQfY3ADB6UGfOw3UlGnQmxxGAz2XyliEAKMcocg9uE3x 5SniCiqCJ51fUZgCw5uHAbe3dg58tZFA3iOZtJhN12FctFKY0MQtrQVtL2WsyD/koniAap 6jTWkCHjUJQsHtzPxhGCCaY2m45eZ5Qyi9p9jTQToqVQY6L9mekx0/9oQ8yhXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781307; a=rsa-sha256; cv=none; b=vLApS20vWBPMhdkG8Enhel0+F0isK55p5AxFRTj6lPPjara0tNuJeoqLNss+63A4uSk+Ax c1FgzioUsge4jtgrq0eqwgJYXXxLKHyCbtB/fI59RuLB2YJWifsJREpGLWd9Vn2SxJDS8U 7sDjYrdEww21/OzM4yWZo280A6ZzyYyOu+4F8ItdYsr2LIjaopWucpsDx5OpIUMDc7A4pb EyHvVyFWkPymgGv3UVT/0ka7HS3aDcEvLvJ6OWYPBy7aXFL4pBsLGCCxc/7HINylU25DyH oQSx0Ka7Bk3fMGFlYZlCL8rZZgTx5Q221x6PWlb8Mrqn1dTBkSwXG66dY6pgMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSq3lrjz18RM; Mon, 26 Jun 2023 12:08:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8Rmx082917; Mon, 26 Jun 2023 12:08:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8RSZ082916; Mon, 26 Jun 2023 12:08:27 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:27 GMT Message-Id: <202306261208.35QC8RSZ082916@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: ee139670c0a1 - stable/13 - rtw89: 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/13 X-Git-Reftype: branch X-Git-Commit: ee139670c0a1b2133190cd786e7ac2506a5a2a22 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ee139670c0a1b2133190cd786e7ac2506a5a2a22 commit ee139670c0a1b2133190cd786e7ac2506a5a2a22 Author: Bjoern A. Zeeb AuthorDate: 2023-03-23 00:29:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:07:39 +0000 rtw89: fix -Wunused-but-set-variable Fix a -Wunused-but-set-variable warning by adding the field to the debug logging as is done for other versions handler functions. (cherry picked from commit 700acdc7b53213c1d9f35c05a1c1f58f285cd14d) --- sys/contrib/dev/rtw89/coex.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/contrib/dev/rtw89/coex.c b/sys/contrib/dev/rtw89/coex.c index 4779fe3ef1f1..aa90bf616b41 100644 --- a/sys/contrib/dev/rtw89/coex.c +++ b/sys/contrib/dev/rtw89/coex.c @@ -4092,8 +4092,13 @@ static void _update_wl_info(struct rtw89_dev *rtwdev) } rtw89_debug(rtwdev, RTW89_DBG_BTC, +#if defined(__linux__) "[BTC], cnt_connect = %d, link_mode = %d\n", cnt_connect, wl_rinfo->link_mode); +#elif defined(__FreeBSD__) + "[BTC], cnt_connect = %d, connecting = %d, link_mode = %d\n", + cnt_connect, cnt_connecting, wl_rinfo->link_mode); +#endif _fw_set_drv_info(rtwdev, CXDRVINFO_ROLE); } From nobody Mon Jun 26 12: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 4QqRSs11zDz4k6Vm; Mon, 26 Jun 2023 12: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 4QqRSr5rRgz3hk9; Mon, 26 Jun 2023 12: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=1687781308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IhYgkFTC9xWh1NdxvPLtbQtqk9L826HphkJdT1+pMj4=; b=Yd+ofRt5/2AhkHghjZwFsUEihRN4VP5acs+v9cKdRBuRKcJtQ66v0cU4ZuJ8H8jRkc5yK4 B9PLKPyutnbltdkD1Q8LoX4Uv8maZGEitP4PAuDRbwZAmQojwlXCIuP1vLkGkUPqD4UHYl Y85xm+j18i0Ui0jFYjPTzxUO34zgPVZNmYnYLnCNyoPzw/MOj2LExDitfds0TIitJKpCUx w6lAYfkttdbVNircULcBjNzI4HtVEmdyAIppWtmDsSbqJH6c1b2+INHEOqSQXKnUvanzj2 5+nnJ+N/ronGF4f/uATZhRwgp2BMQEoAccFHVLjjRvY14nnzHCKsqU9q+ifIrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IhYgkFTC9xWh1NdxvPLtbQtqk9L826HphkJdT1+pMj4=; b=NG38yqBwSGLRqiQxiliF6mLaTNgxyqXLa9DbtoBuosyILnc+EeN/VwNok2F0MhtOGeQyXQ 7YX9diNui3OziIWW7y+QdDfYFzdAkDBtAHM1RpudsnTbo37wAk263eK4f0rGd4EAIsyLlt UeZw/KRFxdf7/8mLhtgtqIkcHucfWTXuCSNmwjMUOOpYsX+9gHM59++wyz9oUBbsXn0MiQ E0yfCIN7339I8/RFQGAki3bqBk9HHGSrm04CTWvQTiFOgkwiYfOyHSbonbhUKuoRdcBIFt tveo7gEw5J5kyen7nSrICfF40HaN/U2c9oUAnakhsxAniRGh++RgUoeQrZoHTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781308; a=rsa-sha256; cv=none; b=mHNFgQf3QhXaePkHFZIi0saxYyVRGTkdPz2H3Yk6m3/WIsH4LNDlUCVtd7BycfpIC3mcSi H3K71puH+nhnulhPyGOPHVLcxQbuBIm5sbgEtG+V3cIkpjxl0B9Jvr4wFo8Zn6Mw6fF86g wQA4NiX5W+3TBjCuAjBTFMf9bPPmfzy1wGgYQxJ5yaR4dRZ+9TKmxk2URzJI5jJRC/LcTH M5tuqQAcfVro1WhJixFMjf87E+X2az8hahcCqXf868LS1LkRASO72fRfc2VA0uuXaROK+T iTJc8ckGQv9ZpiamjsUFzzxH/UbT0jYMzwIOurTvemYym+I622wWKCg+R/u/xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSr4xttz17ZS; Mon, 26 Jun 2023 12:08:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8SiC082942; Mon, 26 Jun 2023 12:08:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8SQ6082941; Mon, 26 Jun 2023 12:08:28 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:28 GMT Message-Id: <202306261208.35QC8SQ6082941@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: da37ca4a9acb - stable/13 - iwlwifi: rtw88: rtw89: fix gcc 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da37ca4a9acb5c5fb6f72536b293431273d97f92 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=da37ca4a9acb5c5fb6f72536b293431273d97f92 commit da37ca4a9acb5c5fb6f72536b293431273d97f92 Author: Bjoern A. Zeeb AuthorDate: 2023-04-18 19:51:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:08:42 +0000 iwlwifi: rtw88: rtw89: fix gcc warnings Fix -Wno-format and unused variables warnings with gcc by adopting (to|the) FreeBSD-specific code. Reported by: jhb Sponsored by: The FreeBSD Foundation Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D39673 (cherry picked from commit f621b087c00776de713944ae6561e44f83e7b541) --- sys/contrib/dev/iwlwifi/fw/dbg.h | 4 ++++ sys/contrib/dev/iwlwifi/iwl-debug.c | 6 +++--- sys/contrib/dev/iwlwifi/mvm/mac-ctxt.c | 4 ++++ sys/contrib/dev/iwlwifi/mvm/rx.c | 8 ++++++++ sys/contrib/dev/iwlwifi/mvm/rxmq.c | 4 ++++ sys/contrib/dev/rtw88/debug.c | 2 +- sys/contrib/dev/rtw89/debug.c | 2 +- sys/modules/iwlwifi/Makefile | 3 --- 8 files changed, 25 insertions(+), 8 deletions(-) diff --git a/sys/contrib/dev/iwlwifi/fw/dbg.h b/sys/contrib/dev/iwlwifi/fw/dbg.h index be7806407de8..e240ef2e1c96 100644 --- a/sys/contrib/dev/iwlwifi/fw/dbg.h +++ b/sys/contrib/dev/iwlwifi/fw/dbg.h @@ -164,7 +164,11 @@ _iwl_fw_dbg_trigger_simple_stop(struct iwl_fw_runtime *fwrt, if (!iwl_fw_dbg_trigger_check_stop(fwrt, wdev, trigger)) return; +#if defined(__linux__) iwl_fw_dbg_collect_trig(fwrt, trigger, NULL); +#elif defined(__FreeBSD__) + iwl_fw_dbg_collect_trig(fwrt, trigger, ""); +#endif } #define iwl_fw_dbg_trigger_simple_stop(fwrt, wdev, trig) \ diff --git a/sys/contrib/dev/iwlwifi/iwl-debug.c b/sys/contrib/dev/iwlwifi/iwl-debug.c index 5a9c8bc70168..010ac7b4294f 100644 --- a/sys/contrib/dev/iwlwifi/iwl-debug.c +++ b/sys/contrib/dev/iwlwifi/iwl-debug.c @@ -49,7 +49,7 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \ \ va_start(args, fmt); \ vaf.va = &args; \ - vasprintf(&str, M_KMALLOC, fmt, args); \ + vasprintf(&str, M_KMALLOC, vaf.fmt, args); \ dev_ ##fn(dev, "%s", str); \ trace_iwlwifi_ ##fn(&vaf); \ free(str, M_KMALLOC); \ @@ -88,7 +88,7 @@ void __iwl_err(struct device *dev, enum iwl_err_mode mode, const char *fmt, ...) dev_err(dev, "%pV", &vaf); #elif defined(__FreeBSD__) char *str; - vasprintf(&str, M_KMALLOC, fmt, args2); + vasprintf(&str, M_KMALLOC, vaf.fmt, args2); dev_err(dev, "%s%s", (mode == IWL_ERR_MODE_RFKILL) ? "(RFKILL)" : "", str); free(str, M_KMALLOC); #endif @@ -154,7 +154,7 @@ void __iwl_dbg(struct device *dev, dev_printk(KERN_DEBUG, dev, "%s %pV", function, &vaf); #elif defined(__FreeBSD__) char *str; - vasprintf(&str, M_KMALLOC, fmt, args); + vasprintf(&str, M_KMALLOC, vaf.fmt, args); dev_printk(KERN_DEBUG, dev, "%d %u %s %s", curthread->td_tid, (unsigned int)ticks, function, str); free(str, M_KMALLOC); diff --git a/sys/contrib/dev/iwlwifi/mvm/mac-ctxt.c b/sys/contrib/dev/iwlwifi/mvm/mac-ctxt.c index 88893fade5cd..99624505c132 100644 --- a/sys/contrib/dev/iwlwifi/mvm/mac-ctxt.c +++ b/sys/contrib/dev/iwlwifi/mvm/mac-ctxt.c @@ -1438,7 +1438,11 @@ void iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm, if (rx_missed_bcon_since_rx >= stop_trig_missed_bcon_since_rx || rx_missed_bcon >= stop_trig_missed_bcon) +#if defined(__linux__) iwl_fw_dbg_collect_trig(&mvm->fwrt, trigger, NULL); +#elif defined(__FreeBSD__) + iwl_fw_dbg_collect_trig(&mvm->fwrt, trigger, ""); +#endif out: rcu_read_unlock(); diff --git a/sys/contrib/dev/iwlwifi/mvm/rx.c b/sys/contrib/dev/iwlwifi/mvm/rx.c index 72d03c5260dc..ee9249a0c5b0 100644 --- a/sys/contrib/dev/iwlwifi/mvm/rx.c +++ b/sys/contrib/dev/iwlwifi/mvm/rx.c @@ -427,7 +427,11 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, if (rx_status->signal < rssi) iwl_fw_dbg_collect_trig(&mvm->fwrt, trig, +#if defined(__linux__) NULL); +#elif defined(__FreeBSD__) + ""); +#endif } if (!mvm->tcm.paused && len >= sizeof(*hdr) && @@ -692,7 +696,11 @@ iwl_mvm_rx_stats_check_trigger(struct iwl_mvm *mvm, struct iwl_rx_packet *pkt) if (le32_to_cpup((__le32 *) (pkt->data + trig_offset)) < trig_thold) return; +#if defined(__linux__) iwl_fw_dbg_collect_trig(&mvm->fwrt, trig, NULL); +#elif defined(__FreeBSD__) + iwl_fw_dbg_collect_trig(&mvm->fwrt, trig, ""); +#endif } static void iwl_mvm_stats_energy_iter(void *_data, diff --git a/sys/contrib/dev/iwlwifi/mvm/rxmq.c b/sys/contrib/dev/iwlwifi/mvm/rxmq.c index 7325e9d44273..872a45ea15ca 100644 --- a/sys/contrib/dev/iwlwifi/mvm/rxmq.c +++ b/sys/contrib/dev/iwlwifi/mvm/rxmq.c @@ -1958,7 +1958,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, if (rx_status->signal < rssi) iwl_fw_dbg_collect_trig(&mvm->fwrt, trig, +#if defined(__linux__) NULL); +#elif defined(__FreeBSD__) + ""); +#endif } if (ieee80211_is_data(hdr->frame_control)) diff --git a/sys/contrib/dev/rtw88/debug.c b/sys/contrib/dev/rtw88/debug.c index 7b6319c07b65..fbbd11be5eef 100644 --- a/sys/contrib/dev/rtw88/debug.c +++ b/sys/contrib/dev/rtw88/debug.c @@ -1284,7 +1284,7 @@ void __rtw_dbg(struct rtw_dev *rtwdev, enum rtw_debug_mask mask, #if defined(__linux__) dev_printk(KERN_DEBUG, rtwdev->dev, "%pV", &vaf); #elif defined(__FreeBSD__) - vlog(LOG_DEBUG, fmt, args); + vlog(LOG_DEBUG, vaf.fmt, args); #endif va_end(args); diff --git a/sys/contrib/dev/rtw89/debug.c b/sys/contrib/dev/rtw89/debug.c index 1a14633c5ff7..90a15279b8f8 100644 --- a/sys/contrib/dev/rtw89/debug.c +++ b/sys/contrib/dev/rtw89/debug.c @@ -2655,7 +2655,7 @@ void __rtw89_debug(struct rtw89_dev *rtwdev, #elif defined(__FreeBSD__) { char *str; - vasprintf(&str, M_KMALLOC, fmt, args); + vasprintf(&str, M_KMALLOC, vaf.fmt, args); dev_printk(KERN_DEBUG, rtwdev->dev, "%s", str); free(str, M_KMALLOC); } diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile index 5cf652267354..831fe97847a5 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -63,7 +63,4 @@ CFLAGS+= -DCONFIG_IWLWIFI_DEVICE_TRACING=1 #CFLAGS+= -DCONFIG_THERMAL=1 #CFLAGS+= -DCONFIG_EFI=1 -# GCC warns about NULL format strings passed to iwl_fw_dbg_collect_trig -CWARNFLAGS.gcc+= -Wno-format - .include From nobody Mon Jun 26 12:08: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 4QqRSt0bVbz4k6Vs; Mon, 26 Jun 2023 12:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSs6lPpz3hmC; Mon, 26 Jun 2023 12: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=1687781309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g8a1gP3F4DASdDpHfZ2hvo5e6gk1PkbP3Y4Ps8Poydw=; b=TQT4rjN8uIrPWzXUz12QyZnEiSmKwhHtGT215+pFidaYg0XdwkM7fXarMJrx0d/99X4Rzd Se+TGSeHpF+9ifMSmcoln2NUObREzXQcot+eelJgI6i/fMFEmDyKe6zzSfxNWQQy8FkfFT DlDzIdfvigTC9Up6b/xSicNvmye9CAduZLpvlZqvGDqe4ceJKcak5+Bm2lrMnjz4X+YLV6 WTcz4xd3Ue6DX2e17FzGXP0JN9n0ss6CpDPw0P1yQq1NkagSXa7zukyAKYgs9Tm2MJydZ5 cl6jQe6VqlnzK1d3wiEYgfQZ+LlbYjjiozzBtJtmZ+o88rhsw39Zo9lI9zY6YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g8a1gP3F4DASdDpHfZ2hvo5e6gk1PkbP3Y4Ps8Poydw=; b=p9o/xupbUw58A1481ydnx5c7uLO+TjqEy5AhmIfHH1Gq5t5NtJ5y9mz+UCqpoj/CLAQgXT jprP6qZ7Tk/QDyra2/Rij9SYZH1va5uY0+b+EvXuv7BF42e3Sw1gIESg1DryuGvSQ5qR/J RUcX382EtQFe0aq+UfN0+V4S2EDghhGEIh36qDXqgylldT3kYBa2Yypcl9Z2dT4Z+CLc1Q hAuLIpA5XHye+EOTjFY2Ph8aUR1/48aCplpA7I8IwDnECJyXYsLgXwS+fgCn08KDmVNtY5 0CSIdQHo78j1yKEulT1hWUVC0XKJCjxuoDtbdg3LfFLYkhrt/Ihbh0bhOkOtKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781309; a=rsa-sha256; cv=none; b=uFhM/fPoqEfWYEQfFujX1/3tWG3jkkLbkWiYTpB9RxdEjxtYdnvq/JmApURaA222ZoDjA7 EP04evDKyJ13P9ENDhr9un9b4jtbD1NQgLTlE2FvcGmyTPxAGWdEBArjg7VfUrjzeF27Hg BkXsXdNrNHbF8nTtHFaj6TCJpNYjeL16Zo/lwGRUr8igVk1kHgGY6JflY++uk1i9gFPNSQ opsaumyYjq6/WuH0CJHMdXvBHQFzebnPvTnL3wFsjIR4nDKg921NKY/MXUZyz8V7rskBFP rMNmIRvr1oDeXcv3NhZsF5rb4t5SYNqNyJUprNm9uZt91fyVpNTNlDVLtGxGkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSs5mcSz18RN; Mon, 26 Jun 2023 12:08:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8TSs082961; Mon, 26 Jun 2023 12:08:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8TlH082960; Mon, 26 Jun 2023 12:08:29 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:29 GMT Message-Id: <202306261208.35QC8TlH082960@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: ecb6cab8288b - stable/13 - iwlwifi: quieten more compiler 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ecb6cab8288b6b5f411309a9af8ac46bb3d8a21e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ecb6cab8288b6b5f411309a9af8ac46bb3d8a21e commit ecb6cab8288b6b5f411309a9af8ac46bb3d8a21e Author: Bjoern A. Zeeb AuthorDate: 2023-04-20 15:57:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:09:37 +0000 iwlwifi: quieten more compiler warnings Quieten some more (valid) gcc warnings and disable dead code. There are more warnings, some probably a compiler problem, the other related to firmware structs which I do not want to adjust just locally. Leave a comment to revisit after a next driver update. Sponsored by: The FreeBSD Foundation (cherry picked from commit 7db7bfe1a7b95c1acfc7861e05ee8808d448715f) --- sys/contrib/dev/iwlwifi/fw/dbg.c | 6 ++++++ sys/contrib/dev/iwlwifi/fw/pnvm.c | 3 +++ sys/contrib/dev/iwlwifi/mvm/ftm-initiator.c | 4 ++++ sys/contrib/dev/iwlwifi/mvm/ftm-responder.c | 2 ++ sys/contrib/dev/iwlwifi/mvm/mvm.h | 2 ++ sys/contrib/dev/iwlwifi/mvm/sta.c | 2 ++ sys/contrib/dev/iwlwifi/mvm/sta.h | 2 ++ 7 files changed, 21 insertions(+) diff --git a/sys/contrib/dev/iwlwifi/fw/dbg.c b/sys/contrib/dev/iwlwifi/fw/dbg.c index c2928d1f2b65..fd3483fe50b2 100644 --- a/sys/contrib/dev/iwlwifi/fw/dbg.c +++ b/sys/contrib/dev/iwlwifi/fw/dbg.c @@ -1459,6 +1459,9 @@ static int iwl_dump_ini_rxf_iter(struct iwl_fw_runtime *fwrt, __le32 *data; int i; +#if defined(__FreeBSD__) + rxf_data.size = 0; +#endif iwl_ini_get_rxf_data(fwrt, reg_data, &rxf_data); if (!rxf_data.size) return -EIO; @@ -1984,6 +1987,9 @@ static u32 iwl_dump_ini_rxf_get_size(struct iwl_fw_runtime *fwrt, if (reg->fifos.hdr_only) return size; +#if defined(__FreeBSD__) + rx_data.size = 0; +#endif iwl_ini_get_rxf_data(fwrt, reg_data, &rx_data); size += rx_data.size; diff --git a/sys/contrib/dev/iwlwifi/fw/pnvm.c b/sys/contrib/dev/iwlwifi/fw/pnvm.c index b6d3ac6ed440..1ced9cb2836b 100644 --- a/sys/contrib/dev/iwlwifi/fw/pnvm.c +++ b/sys/contrib/dev/iwlwifi/fw/pnvm.c @@ -319,6 +319,9 @@ parse: skip_parse: data = NULL; +#if defined(__FreeBSD__) + len = 0; +#endif /* now try to get the reduce power table, if not loaded yet */ if (!trans->reduce_power_loaded) { data = iwl_uefi_get_reduced_power(trans, &len); diff --git a/sys/contrib/dev/iwlwifi/mvm/ftm-initiator.c b/sys/contrib/dev/iwlwifi/mvm/ftm-initiator.c index 430044bc4755..66140af891d3 100644 --- a/sys/contrib/dev/iwlwifi/mvm/ftm-initiator.c +++ b/sys/contrib/dev/iwlwifi/mvm/ftm-initiator.c @@ -230,7 +230,11 @@ static void iwl_mvm_ftm_cmd_v5(struct iwl_mvm *mvm, struct ieee80211_vif *vif, static void iwl_mvm_ftm_cmd_common(struct iwl_mvm *mvm, struct ieee80211_vif *vif, +#if defined(__linux__) struct iwl_tof_range_req_cmd_v9 *cmd, +#elif defined(__FreeBSD__) + struct iwl_tof_range_req_cmd_v9 *cmd, /* XXX-BZ Probably better solved by a common struct in fw for top parts of the struct. */ +#endif struct cfg80211_pmsr_request *req) { int i; diff --git a/sys/contrib/dev/iwlwifi/mvm/ftm-responder.c b/sys/contrib/dev/iwlwifi/mvm/ftm-responder.c index 9729680476fd..4cb15046ec5c 100644 --- a/sys/contrib/dev/iwlwifi/mvm/ftm-responder.c +++ b/sys/contrib/dev/iwlwifi/mvm/ftm-responder.c @@ -306,6 +306,7 @@ static void iwl_mvm_resp_del_pasn_sta(struct iwl_mvm *mvm, kfree(sta); } +#if defined(__linux__) int iwl_mvm_ftm_respoder_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, u8 *addr, u32 cipher, u8 *tk, u32 tk_len, @@ -374,6 +375,7 @@ int iwl_mvm_ftm_resp_remove_pasn_sta(struct iwl_mvm *mvm, IWL_ERR(mvm, "FTM: PASN station %pM not found\n", addr); return -EINVAL; } +#endif int iwl_mvm_ftm_start_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif) { diff --git a/sys/contrib/dev/iwlwifi/mvm/mvm.h b/sys/contrib/dev/iwlwifi/mvm/mvm.h index 73fd5dca45c4..7e905deab8ab 100644 --- a/sys/contrib/dev/iwlwifi/mvm/mvm.h +++ b/sys/contrib/dev/iwlwifi/mvm/mvm.h @@ -1993,12 +1993,14 @@ void iwl_mvm_ftm_restart_responder(struct iwl_mvm *mvm, struct ieee80211_vif *vif); void iwl_mvm_ftm_responder_stats(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb); +#if defined(__linux__) int iwl_mvm_ftm_resp_remove_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, u8 *addr); int iwl_mvm_ftm_respoder_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, u8 *addr, u32 cipher, u8 *tk, u32 tk_len, u8 *hltk, u32 hltk_len); +#endif void iwl_mvm_ftm_responder_clear(struct iwl_mvm *mvm, struct ieee80211_vif *vif); diff --git a/sys/contrib/dev/iwlwifi/mvm/sta.c b/sys/contrib/dev/iwlwifi/mvm/sta.c index cf3d0922cf83..71d9f2a2988a 100644 --- a/sys/contrib/dev/iwlwifi/mvm/sta.c +++ b/sys/contrib/dev/iwlwifi/mvm/sta.c @@ -4116,6 +4116,7 @@ u16 iwl_mvm_tid_queued(struct iwl_mvm *mvm, struct iwl_mvm_tid_data *tid_data) return ieee80211_sn_sub(sn, tid_data->next_reclaimed); } +#if defined(__linux__) int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_mvm_int_sta *sta, u8 *addr, u32 cipher, u8 *key, u32 key_len) @@ -4155,6 +4156,7 @@ out: iwl_mvm_dealloc_int_sta(mvm, sta); return ret; } +#endif void iwl_mvm_cancel_channel_switch(struct iwl_mvm *mvm, struct ieee80211_vif *vif, diff --git a/sys/contrib/dev/iwlwifi/mvm/sta.h b/sys/contrib/dev/iwlwifi/mvm/sta.h index f1a4fc3e4038..d72f52230f22 100644 --- a/sys/contrib/dev/iwlwifi/mvm/sta.h +++ b/sys/contrib/dev/iwlwifi/mvm/sta.h @@ -545,9 +545,11 @@ void iwl_mvm_modify_all_sta_disable_tx(struct iwl_mvm *mvm, bool disable); void iwl_mvm_csa_client_absent(struct iwl_mvm *mvm, struct ieee80211_vif *vif); void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk); +#if defined(__linux__) int iwl_mvm_add_pasn_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_mvm_int_sta *sta, u8 *addr, u32 cipher, u8 *key, u32 key_len); +#endif void iwl_mvm_cancel_channel_switch(struct iwl_mvm *mvm, struct ieee80211_vif *vif, u32 mac_id); From nobody Mon Jun 26 12:08: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 4QqRSv27G4z4k6XP; Mon, 26 Jun 2023 12:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSv0zXKz3hgc; Mon, 26 Jun 2023 12:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NBAdzrAP2xTzjZu4nFGx57g1/PDUA8FhqejlOyl80YU=; b=T0H8c/O2m8erfgHycD25H9CehmK6e2VuNHFiNfJelSpu0H+1bmZ6FJGLJSOWnx/2EccB/l c2WWNyPvEW5q3o950iDpUG8wjuZmW2y1mJp8/5DqDeYSDKPI8aAoLDU/DiUFFQpQKLi9bU HL/Ax2AGjfzhJwb7474OxDyQkhSLDkwme/H8z//kQ69cLzg1nmnji33nI9xtvp9lFy6ctc WKKGDbi6UwjjzDpW0O7CUd93kVG6RJto8437N1Nj2kRvtwau+REO9cm8KmIii6AoWwPpcq u3/2ztDcoN5ZUPtFIPGTHogpUnSHtMrBSMfWw6Y/lX3Xx5wuWYVOCLKjp58hnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NBAdzrAP2xTzjZu4nFGx57g1/PDUA8FhqejlOyl80YU=; b=MS4prPF6NqYcBpTC9LiZ7Zd2ONGB3JEMUqq4ydSV86q/4EC2/gXgGBtQu6jL8dv7L4xd+/ 1Y+swIYfClPfSmUrytAGA//ubBOQjPo9iurlN+z/1JY02bk/USA6xrAWqSiOU0mweQ88WF b3tfHhyc8cjkvMdC+vXF1Pmf46wyZOFLWuM2aoMVtync7YJOPyekwmteOmaSe0gqsUhZM4 ZYVAUIdCxfh5y7jZoin3irMh3s0V6wERgX4IZDlp0SrFW8Kb2GvZoUUNabFllZ9ttDmEsg GIe5zzwH3P3ug+pdyiTR4FFtzFpz4YVjaQqMDmuSQ/BjLYaCN5vq/+CDT5HjCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781311; a=rsa-sha256; cv=none; b=lpu4uunk0qLcfL2NSttMaDdoMqVPBUSEJuxJfVEpshk7LSgcXIiBC7Bxg5s68/PaPXXfQc +nHzyeoEzdxTeEh+RGmhAKtkuUUmC7xfKEbqlpBd5oU9HcttUK7n4lUfWsPdVLQWTQRnk0 csEyIHlhcnlB2XMdKSi8dxn++ATveRyX5DOJ7cbaX1MVQ8nSVHnbKJqZJlENr8+CszBK46 S/mC+AR73qAZDPQoficCCSA+beGPwsGTphCUd3YHIUzDvPzkPZmQozuawPJ1wHOH5E4LTe DyxAXAoz/RoE+UspgWkBCiiw1kSbcXXqtMckqMQklxQ6kMxwzGaOLLnl4FmWAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSt70Rtz17dX; Mon, 26 Jun 2023 12:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8UrC082981; Mon, 26 Jun 2023 12:08:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8UYv082980; Mon, 26 Jun 2023 12:08:30 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:30 GMT Message-Id: <202306261208.35QC8UYv082980@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: e9a999ea8f2b - stable/13 - LinuxKPI: 802.11: fix a -Wenum-compare warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: e9a999ea8f2b7ab13108d0f8331bfc1464da0463 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e9a999ea8f2b7ab13108d0f8331bfc1464da0463 commit e9a999ea8f2b7ab13108d0f8331bfc1464da0463 Author: Bjoern A. Zeeb AuthorDate: 2023-04-19 21:40:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:09:42 +0000 LinuxKPI: 802.11: fix a -Wenum-compare warning We are asserting that two values from different enums are the same. gcc warns about these. Cast the values to (int) to avoid the warning. Sponsored by: The FreeBSD Foundation (cherry picked from commit f369f10dd8122b1cd1282a378fb16ba81a712a74) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 36e6600f237b..1fcee420232c 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1784,7 +1784,7 @@ ieee80211_action_contains_tpc(struct sk_buff *skb) return (false); /* Check that it is TPC Report or Link Measurement Report? */ - KASSERT(IEEE80211_ACTION_SM_TPCREP == IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP, + KASSERT((int)IEEE80211_ACTION_SM_TPCREP == (int)IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP, ("%s: SM_TPCREP %d != RADIO_MEASUREMENT_LMREP %d\n", __func__, IEEE80211_ACTION_SM_TPCREP, IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP)); if (mgmt->u.action.u.tpc_report.spec_mgmt != IEEE80211_ACTION_SM_TPCREP) From nobody Mon Jun 26 12:08: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 4QqRSw3QPwz4k6SC; Mon, 26 Jun 2023 12:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSw1qsRz3hmt; Mon, 26 Jun 2023 12:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQmyMuJaJ4Qf6S/qgz4pYPyq7UoX+rP+4oauLPmoQ0c=; b=SU6n+/W72vC1DNng9npHIwPEojKM31hU0gb2QpTgHiQkNdL9Px0mIm+xIBNsHHnx1DNl+U IOmtyR/zg3EquvLn/YUEzukjxAOY6ok0zpD8WYn53VWLODrnbKNQWCewZpXt/dOY1Clnfi NtN5cUQQTN+owM1awhH9MCY3TFY4AZccCgMj58/U+e6DJxrt021wX8K6jUq5RE0TDysdwX DuvTHBujNQs6lY/Mf62dMYoTKJFTDkCoDQ9hYCLxrIHF3imI1xte/joKfhADjCG0QJuNsX qA8tbx/Z7kCkFoF6MrkQif8CRrh2emI5TP3kNQKvBWDgmMc4lYdk3zeNSUydOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pQmyMuJaJ4Qf6S/qgz4pYPyq7UoX+rP+4oauLPmoQ0c=; b=qnglbvX84FvOj+9VJPylslAVe57zNETG5BvwILT1km4uuIMj9JdJAnczhkTZN4uVrK5K0C yME+SOhqZ64Df34+Yg0fgD6T/YIA2R41gk5dAFepaFT/klJMTR8y9jakqL3jpAhETjQ9ke 1qS3ajK7vY3Urd9hJ3/1SOfm604FpDCfRFDCyJW2DsrFR7oW3AevuOeG6zlcRkBcyDmqjw a96a6jtKDr4QS/O1X75KoMsgfTbycr+3PXpnvc1tT48147liEznb6mXi9uXJW3tuiMpi8m I2e2tPHS/T4PABxuuHq93hDKwdiB711iLJGKElsN7iddcmEa4io3cpLmL776/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781312; a=rsa-sha256; cv=none; b=OLUtbls1uGjl/rtsaciUhdXIxx3ouyadmiSWOblE2eWvwJRkxPjfhA6IWf23uDT9dSVMSA pBO/I/I3AUkC6SUL4lzE3LUDHbJ6fPW/eMS0QpIgo1ISQVSWill5kybpm/JfnG6wnm9oHC jflZo9wtzElcSWhF6oekKfwWKyp/+TAI3KjWrqhUkMP0fRehWisZmBXZWYeuXO5hj6ai7m HynbHpMqNLNjU2xQU4NNpl56Qp0jMBO6wj+PUbnBbBG28fofI+HkKHkp/+y2SVKMqo8LkP buylGG3MlAwhxh4cua9Dai5M0D2XJUG/FefHtDh/bvsReLmSps3WrqhrfIrQkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSw0xbjz17dY; Mon, 26 Jun 2023 12:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8Wij083000; Mon, 26 Jun 2023 12:08:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8WrL082999; Mon, 26 Jun 2023 12:08:32 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:32 GMT Message-Id: <202306261208.35QC8WrL082999@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: de40bc6f3d6b - stable/13 - LinuxKPI: skbuff.h: fix -Warray-bounds 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: de40bc6f3d6bf8ab1a4b546630cc847a3b8c5113 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de40bc6f3d6bf8ab1a4b546630cc847a3b8c5113 commit de40bc6f3d6bf8ab1a4b546630cc847a3b8c5113 Author: Bjoern A. Zeeb AuthorDate: 2023-04-19 21:37:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:09:49 +0000 LinuxKPI: skbuff.h: fix -Warray-bounds warnings Harmonize sk_buff_head and sk_buff further and fix -Warray-bounds warnings reports by gcc. At the same time simplify some code by re-using other functions or factoring some code out. Sponsored by: The FreeBSD Foundation (cherry picked from commit b2dcb848688e1e8346762531208dd7d468ff3854) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 61 +++++++++++++---------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 12a6be42e743..fca161537837 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -89,8 +89,16 @@ enum sk_buff_pkt_type { struct sk_buff_head { /* XXX TODO */ - struct sk_buff *next; - struct sk_buff *prev; + union { + struct { + struct sk_buff *next; + struct sk_buff *prev; + }; + struct sk_buff_head_l { + struct sk_buff *next; + struct sk_buff *prev; + } list; + }; size_t qlen; spinlock_t lock; }; @@ -527,8 +535,8 @@ __skb_insert(struct sk_buff *new, struct sk_buff *prev, struct sk_buff *next, SKB_TRACE_FMT(new, "prev %p next %p q %p", prev, next, q); new->prev = prev; new->next = next; - next->prev = new; - prev->next = new; + ((struct sk_buff_head_l *)next)->prev = new; + ((struct sk_buff_head_l *)prev)->next = new; q->qlen++; } @@ -538,7 +546,7 @@ __skb_queue_after(struct sk_buff_head *q, struct sk_buff *skb, { SKB_TRACE_FMT(q, "skb %p new %p", skb, new); - __skb_insert(new, skb, skb->next, q); + __skb_insert(new, skb, ((struct sk_buff_head_l *)skb)->next, q); } static inline void @@ -551,24 +559,18 @@ __skb_queue_before(struct sk_buff_head *q, struct sk_buff *skb, } static inline void -__skb_queue_tail(struct sk_buff_head *q, struct sk_buff *skb) +__skb_queue_tail(struct sk_buff_head *q, struct sk_buff *new) { - struct sk_buff *s; - SKB_TRACE2(q, skb); - q->qlen++; - s = (struct sk_buff *)q; - s->prev->next = skb; - skb->prev = s->prev; - skb->next = s; - s->prev = skb; + SKB_TRACE2(q, new); + __skb_queue_after(q, (struct sk_buff *)q, new); } static inline void -skb_queue_tail(struct sk_buff_head *q, struct sk_buff *skb) +skb_queue_tail(struct sk_buff_head *q, struct sk_buff *new) { SKB_TRACE2(q, skb); - return (__skb_queue_tail(q, skb)); + return (__skb_queue_tail(q, new)); } static inline struct sk_buff * @@ -817,26 +819,31 @@ skb_mark_not_on_list(struct sk_buff *skb) SKB_TODO(); } +static inline void +___skb_queue_splice_init(const struct sk_buff_head *from, + struct sk_buff *p, struct sk_buff *n) +{ + struct sk_buff *b, *e; + + b = from->next; + e = from->prev; + + b->prev = p; + ((struct sk_buff_head_l *)p)->next = b; + e->next = n; + ((struct sk_buff_head_l *)n)->prev = e; +} + static inline void skb_queue_splice_init(struct sk_buff_head *from, struct sk_buff_head *to) { - struct sk_buff *b, *e, *n; SKB_TRACE2(from, to); if (skb_queue_empty(from)) return; - /* XXX do we need a barrier around this? */ - b = from->next; - e = from->prev; - n = to->next; - - b->prev = (struct sk_buff *)to; - to->next = b; - e->next = n; - n->prev = e; - + ___skb_queue_splice_init(from, (struct sk_buff *)to, to->next); to->qlen += from->qlen; __skb_queue_head_init(from); } From nobody Mon Jun 26 12:08: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 4QqRSx3RYcz4k6gM; Mon, 26 Jun 2023 12:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSx2Hfqz3j31; Mon, 26 Jun 2023 12:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6OapIoPvT1icZKb77CLEG3kWuhx2dU/AES30XOld21M=; b=VyKCPg/DXwQ119doJRaIUJdAwG8BVJiR4Ju1f5eh3F+YdAEwPn/uLA/jmX0HWTCqr0+8FN rj6fev1ytdLbyjQYvk5xx5KNmgy62Tg2ELcf8/UepHYq+3pEg7nf/RnxLBbs+maAlPFyo3 yiUBn8AVPTOvgfywg2uuBYe6EH2q4UnFHOPy/Ax1axgxQL9VJR81dQBmYBY8ieu+M5EBrk H5RwTaTK1aCfzggQO6/tkDtKJecGzHpId5509Bqp/SLkZRLbEOrQlNOwxEQR/hs9O2Drn0 5MJAwJ0AGNYv+QM6OolbCs4vtrhJ7xzFvL603/ejFKqFYYfYERa0W5xcG3oakA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6OapIoPvT1icZKb77CLEG3kWuhx2dU/AES30XOld21M=; b=vhOyU8jh0M6qJJQ88pbuVcV3NcydGC6cQMfSldZycJ3ZGPzv5/UnSqdn1c3YBrRs1SgAMb g17U48ZiJUB09jcZKm0FLsBqljrOQkRRQvwKDdDocvKmqwvOlrUAiyizDG7KClhdLaYDci EaMyqktJVhcY3dzrLCNvfRnpl7jqKur+rpdsIX/z6w8HCZiWvnd7l4cEd5Qu3qKm7mjpqD KO0g3vzldEeTRXzYv+jkRZoie6HykiDOnPf/UJ19zFB9rJMhA1ZzjRV7tYcnN6t+VfpemZ HdQmZswxYJC8648dE7pLJvL1Uo8Hn2LZe3VRREP6rw1k96AYbKSrpeG4UJktDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781313; a=rsa-sha256; cv=none; b=oJnvlGHU5rplvKPUpQ4g8ZNFIsP5PYItPjqZWHnc08jisdiveSHz3DJOto8FmrzUgL3G3A PhatHQOn7kmROTBkGHBxrO+jnvPzsNkfEAENQOhbwEB8UvFZwzTeJgikZzcLizczq558ap j2Fi0GzpSzw3DRvi6Moghzniq0COVcKhMMV3nF5BVgc0/cRaWlekxm/Tcf6rkgcGCyAmjP ReH1V/ic2q6csczR1XFaUB1Ts/e3TRQCRDISRqM1kK/um3w3d8i1ugcRnwQ3ydzkcE11MJ ItZVG7bCChah5/uM+W1lQ0oGmn8ODl19j3PoZJopncO+ri6LUX2KzIh4iZCJHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSx1P03z17wh; Mon, 26 Jun 2023 12:08:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8XSK083019; Mon, 26 Jun 2023 12:08:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8XGl083018; Mon, 26 Jun 2023 12:08:33 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:33 GMT Message-Id: <202306261208.35QC8XGl083018@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: 38f969d41c54 - stable/13 - LinuxKPI: fix READ_ONCE() -Wcast-equal 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 38f969d41c5487f61fdf03dcc95c1cff0ec679cc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=38f969d41c5487f61fdf03dcc95c1cff0ec679cc commit 38f969d41c5487f61fdf03dcc95c1cff0ec679cc Author: Bjoern A. Zeeb AuthorDate: 2023-04-19 21:43:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:09:53 +0000 LinuxKPI: fix READ_ONCE() -Wcast-equal warnings Rather than using ACCESS_ONCE() in READ_ONCE() add a missing cast to const in order to satisfy -Wcast-equal by gcc. Sadly we cannot do the same to WRITE_ONCE() which still is very noisy. Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D39706 (cherry picked from commit 74e908b3c63b28de1d590dc42502fbe959a6da2e) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 87a37228736f..801618e15f9f 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -98,7 +98,7 @@ #define READ_ONCE(x) ({ \ __typeof(x) __var = ({ \ barrier(); \ - ACCESS_ONCE(x); \ + (*(const volatile __typeof(x) *)&(x)); \ }); \ barrier(); \ __var; \ From nobody Mon Jun 26 12:08: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 4QqRSy4Y4Fz4k6dN; Mon, 26 Jun 2023 12:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSy3dwxz3j83; Mon, 26 Jun 2023 12:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KdaL9ggY6b7u5YNbDqO+9fTNCpG5vqvktqfkO9wGQ14=; b=mAKPd+pMWUnAWl0hPIUv5DJu7Fc32V4Gzlt5IPgnMZ95XP9y7h9Hxs/0peGykfDvkafmVh AmyIlinM8CIHH/EIRHJyOzbdVx9k7fADDfw4mxy2VzLLCV8PTAkyxMZIpksdioAoUDmG4M G4vtZPFLEliScHyBI/RNhUP7nVtogRNZa7fqeCbQNDOb+4pZk4/yM8inj4gSIDadaWzO7W 9m/mbK8AOgIZkdOmgAKq0dk38FXozQ7V4eRCBS1DzmYgDLIyIZLK6DNLHYb5Nw+akWu1+n xY68Nrc+/vXK3S+PjJ+Abs/al5iCQpG2wSpooh6fDdhPvpwceQ0I25BSgK8ZvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KdaL9ggY6b7u5YNbDqO+9fTNCpG5vqvktqfkO9wGQ14=; b=Vw0Z0kZBRovkea7sRdkZ87H5vgyaFEV1oXuG/HBfCHE6z/yCT87i10NP/tTwpcEAkvsCjb auHqHx5iY09KHgm+UgWoD+YpVSi2NAac2h+qvPkwnXjHpv5ZLXePYNkwzJvkz+9xoyp6eX i3xKJnQbH8UyyurntHmEKliHBIa4Lnsq0wOJMOfJnRcDYgO/kDSpJeiUbA2Ow86vqNFyao 5IORFQS9PpZiSj4dbuS1ZxzKMAFV3wG2cWs2hrV1ygGnUjHt0hOuvLE5xGlh9Dhlybv0Km tofhhDGOPHbl9z44MDiQE90CPdR8WWz103IxOyowgfMzzf3HceXMoFKt9vIe+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781314; a=rsa-sha256; cv=none; b=IS1/BoNsIyysLqUiLgR9XmnXKC6dbgvoY0LL+f8LITsldClgUjZf9i3YMw3E2f1mck6xb7 c9gQdmtaLOjVcj8NNlMYEAvEOOjdYvc4YPNDAd6KVU6x9ZnpEeDBEMnf9S1/FV/PhO/aNl 0YiCjW4d8MrRVSR+ZihKcHx7RGnZbix8hiZyEXEH/yzoKmmOdmDyl2BELoAUC09iuFTZ1e PFT5867SZ7lJjYpwFHsuHn8gIMXxVCOkKcUP6uSGeI4S59SLqQMwDnNmbdZAuPXfPGsvu8 JjJtOd2vsEeGhoyTZd7W2kXqD5iVVhNNAaH9Zg81MnIkkwX3OJ0bP7E9RrG4Dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSy2YqSz18RP; Mon, 26 Jun 2023 12:08:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8Y0E083046; Mon, 26 Jun 2023 12:08:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8YmQ083045; Mon, 26 Jun 2023 12:08:34 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:34 GMT Message-Id: <202306261208.35QC8YmQ083045@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: 584bd868b4e4 - stable/13 - LinuxKPI: fix WRITE_ONCE() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 584bd868b4e41ae909fa0a51bc969be567272427 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=584bd868b4e41ae909fa0a51bc969be567272427 commit 584bd868b4e41ae909fa0a51bc969be567272427 Author: Bjoern A. Zeeb AuthorDate: 2023-05-13 15:17:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:11:49 +0000 LinuxKPI: fix WRITE_ONCE() Fix a gcc warning: "to be safe all intermediate pointers in cast from '...' to '...' must be 'const' qualified [-Wcast-qual]". Doing what is essentially a __DECONST() adding the uintptr_t gets rid of the massive amount of warnings we get in LinuxKPI and lets us see the actual problems a lot better. This is a follow-up to 74e908b3c63b28de1d590dc42502fbe959a6da2e which fixed READ_ONCE(). Sponsored by: The FreeBSD Foundation Suggested by: jhb Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40084 (cherry picked from commit 046d8d89ed1956944b12ec4f0580c30bc202bbfb) --- sys/compat/linuxkpi/common/include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 801618e15f9f..a918b6b76371 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -91,7 +91,7 @@ #define WRITE_ONCE(x,v) do { \ barrier(); \ - ACCESS_ONCE(x) = (v); \ + (*(volatile __typeof(x) *)(uintptr_t)&(x)) = (v); \ barrier(); \ } while (0) From nobody Mon Jun 26 12:08: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 4QqRSz5KTJz4k6dR; Mon, 26 Jun 2023 12:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRSz4NqJz3j1f; Mon, 26 Jun 2023 12:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wfFpsdiks56ypZu2dn7eg7r046d3Be8HgOaDOodNKk=; b=dHbEV97JSjrupprzOqVZofc13d7qzmeSlFOXoiY2lQeCMyjS60O/+njrRLG7K9Gbf4DJvd GC6rOR48ovy8/Gyb/bkSPLjYl4cw21Q3u2LVFxP1wNlHEuLlOMeX3/d2ppWTX/5Wr1ejnI GvmHYVA+038yaMtVOo+oaLO/fRwKAfnne+KeOhROQ/fUVLsqRXbr0S7NViYrNCCqQBEicG q5I+winjh1V0WzUrv5cagNk/QKk+rem9dZAcfZaYTWYll2wnLhQKQvx6C5rQtR2dOsNVZe zvUdCXXi4VeuSIQKsfZN894v9WdCceOOlSm881OKRpzS9uGvVqsko5/QAktkdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781315; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wfFpsdiks56ypZu2dn7eg7r046d3Be8HgOaDOodNKk=; b=oEqFVPfPPsH+FbX8U7rLH9Ik1r9/Q23KEVsuc9TGP/6CQ/c9jzzB9vogygFEB55IkqE8q7 sJ6Wxi2HLGAXRQOvf1qonLiEnfZgFX6W/duA+WeHy5teGF0oVxb+R1DaSh+ZUWCFL/tdgT Ld/yTlnZvUnYjfuystCkhPrAS2nST0OUtm5XhZfz7H+K43xYDSj6I62B53aNhZ1NPYAxoF 7wN7koTFgIsdxSM4e6Lun7D/nZWO73ZhSDdg2wi7wU/gAN+bEvTpBrtR4ARPmQaiY6RseV FExRU2kp4d5goBhxzBk4H4Bq5tZI1p3OTUmFYjV6kmOf8+Ak6huURYmOfx8RwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781315; a=rsa-sha256; cv=none; b=NFEBscb+A1P1556oCn84t2R2qCAbj8qfv+pqcT8LHPMyYmAt2PTQLGIhbVv+wlbentQI3q awDA1FulETF9q+5tCJjMG4qIvItHC7FY+p74bNyEzr68No+1cGtQR2vnSrx0QQG5EbytYy yq3kDmfDIsJVUyqa63eGjLWZ7l+XztFw0gXCt/OES9loojZYuy6NgbGlgDClOP0q6gPJen c6LwXrkJJiAToDg7NWBksfE15WIB8714F1cnfwVVpdhav/x3RRheNw4ugIVcmwhcJc8sU9 sNFVB2v5dHg+7UjMNqfYxteiug/QDhzwkvbcPGLqqGUwskMkiOVKt9KnHXLqBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRSz3TJLz17wj; Mon, 26 Jun 2023 12:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8ZPn083068; Mon, 26 Jun 2023 12:08:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8Z43083067; Mon, 26 Jun 2023 12:08:35 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:35 GMT Message-Id: <202306261208.35QC8Z43083067@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: 67121a1ed050 - stable/13 - net80211: Radiotap: update for newer standards (add EHT, U-SIG) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 67121a1ed05043d93b9ab05bb31814697db860c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=67121a1ed05043d93b9ab05bb31814697db860c8 commit 67121a1ed05043d93b9ab05bb31814697db860c8 Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 16:03:17 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:12:47 +0000 net80211: Radiotap: update for newer standards (add EHT, U-SIG) iwlwifi already uses suggested EHT and U-SIG bits as well as some more TLV bits. Update radiotap to know of those even if they might get updated again in the future in order to get newer versions of the driver to compile. ath1xk drivers require further HE defines. Some of those we had already predicted as comments in the past. Sponsored by: The FreeBSD Foundation (cherry picked from commit 7232e6dcc89b978825b30a537bca2e7d3a9b71bb) (cherry picked from commit 63231f4d5bae5fbdb2ebbca4860416557c397059) --- sys/net80211/ieee80211_radiotap.h | 145 +++++++++++++++++++++++++++++++++++--- 1 file changed, 136 insertions(+), 9 deletions(-) diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index 35800325f121..1515ce7afd34 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -234,9 +234,13 @@ enum ieee80211_radiotap_type { IEEE80211_RADIOTAP_AMPDU_STATUS = 20, IEEE80211_RADIOTAP_VHT = 21, + IEEE80211_RADIOTAP_TLV = 28, IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29, - IEEE80211_RADIOTAP_VENDOREXT = 30, + IEEE80211_RADIOTAP_VENDOREXT = 30, /* obsolete? */ + IEEE80211_RADIOTAP_VENDOR_NAMESPACE = 30, IEEE80211_RADIOTAP_EXT = 31, + IEEE80211_RADIOTAP_EHT_USIG = 33, + IEEE80211_RADIOTAP_EHT = 34, }; #ifndef _KERNEL @@ -381,10 +385,25 @@ enum ieee80211_radiotap_type { #define IEEE80211_RADIOTAP_ZERO_LEN_PSDU_NOT_CAPTURED 0x01 #define IEEE80211_RADIOTAP_ZERO_LEN_PSDU_VENDOR 0xFF +/* http://www.radiotap.org/fields/TLV.html */ +struct ieee80211_radiotap_tlv { + uint16_t type; + uint16_t len; + uint8_t data[]; +} __packed; + +struct ieee80211_radiotap_vendor_content { + uint8_t oui[3]; + uint8_t oui_subtype; + uint16_t vendor_type; + uint16_t __padding; + uint8_t data[]; +} __packed; + /* https://www.radiotap.org/fields/HE.html */ struct ieee80211_radiotap_he { uint16_t data1, data2, data3, data4, data5, data6; -}; +} __packed; #define IEEE80211_RADIOTAP_HE_DATA1_FORMAT_SU 0x0000 #define IEEE80211_RADIOTAP_HE_DATA1_FORMAT_EXT_SU 0x0001 @@ -412,7 +431,7 @@ struct ieee80211_radiotap_he { #define IEEE80211_RADIOTAP_HE_DATA2_TXBF_KNOWN 0x0010 #define IEEE80211_RADIOTAP_HE_DATA2_PE_DISAMBIG_KNOWN 0x0020 #define IEEE80211_RADIOTAP_HE_DATA2_TXOP_KNOWN 0x0040 -/* #define IEEE80211_RADIOTAP_HE_DATA2_ midamble periodicity _KNOWN 0x0080 */ +#define IEEE80211_RADIOTAP_HE_DATA2_MIDAMBLE_KNOWN 0x0080 #define IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET 0x3F00 #define IEEE80211_RADIOTAP_HE_DATA2_RU_OFFSET_KNOWN 0x4000 #define IEEE80211_RADIOTAP_HE_DATA2_PRISEC_80_SEC 0x8000 @@ -420,11 +439,11 @@ struct ieee80211_radiotap_he { #define IEEE80211_RADIOTAP_HE_DATA3_BSS_COLOR 0x003F #define IEEE80211_RADIOTAP_HE_DATA3_BEAM_CHANGE 0x0040 #define IEEE80211_RADIOTAP_HE_DATA3_UL_DL 0x0080 -/* #deifne IEEE80211_RADIOTAP_HE_DATA3_data_MCS 0x0F00 */ -/* #define IEEE80211_RADIOTAP_HE_DATA3_data_DCM 0x1000 */ -/* #define IEEE80211_RADIOTAP_HE_DATA3_Coding 0x2000 */ +#define IEEE80211_RADIOTAP_HE_DATA3_DATA_MCS 0x0F00 +#define IEEE80211_RADIOTAP_HE_DATA3_DATA_DCM 0x1000 +#define IEEE80211_RADIOTAP_HE_DATA3_CODING 0x2000 #define IEEE80211_RADIOTAP_HE_DATA3_LDPC_XSYMSEG 0x4000 -/* #define IEEE80211_RADIOTAP_HE_DATA3_STBC 0x8000 */ +#define IEEE80211_RADIOTAP_HE_DATA3_STBC 0x8000 #define IEEE80211_RADIOTAP_HE_DATA4_SU_MU_SPTL_REUSE 0x000F #define IEEE80211_RADIOTAP_HE_DATA4_MU_STA_ID 0x7FF0 @@ -433,6 +452,8 @@ struct ieee80211_radiotap_he { #define IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE3 0x0F00 #define IEEE80211_RADIOTAP_HE_DATA4_TB_SPTL_REUSE4 0xF000 +#define IEEE80211_RADIOTAP_HE_DATA5_DATA_BW_RU_ALLOC 0x000F +#define IEEE80211_RADIOTAP_HE_DATA5_GI 0x0030 #define IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE 0x00C0 #define IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_UNKNOWN 0x0 #define IEEE80211_RADIOTAP_HE_DATA5_LTF_SIZE_1X 0x1 @@ -443,6 +464,7 @@ struct ieee80211_radiotap_he { #define IEEE80211_RADIOTAP_HE_DATA5_TXBF 0x4000 #define IEEE80211_RADIOTAP_HE_DATA5_PE_DISAMBIG 0x8000 +#define IEEE80211_RADIOTAP_HE_DATA6_NSTS 0x000F #define IEEE80211_RADIOTAP_HE_DATA6_DOPPLER 0x0010 /* 0x00e0 (reserved) ; use these for the following undocumented. */ #define IEEE80211_RADIOTAP_HE_DATA6_TB_PPDU_BW_KNOWN 0x0020 @@ -459,7 +481,7 @@ struct ieee80211_radiotap_he_mu { uint16_t flags2; uint8_t ru_ch1[4]; uint8_t ru_ch2[4]; -}; +} __packed; #define IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS 0x000F #define IEEE80211_RADIOTAP_HE_MU_FLAGS1_SIG_B_MCS_KNOWN 0x0010 @@ -490,7 +512,7 @@ struct ieee80211_radiotap_he_mu { struct ieee80211_radiotap_lsig { uint16_t data1; uint16_t data2; -}; +} __packed; #define IEEE80211_RADIOTAP_LSIG_DATA1_LENGTH_KNOWN 0x0002 #define IEEE80211_RADIOTAP_LSIG_DATA2_LENGTH 0xFFF0 @@ -503,4 +525,109 @@ struct ieee80211_radiotap_lsig { #define IEEE80211_RADIOTAP_TIMESTAMP_UNIT_US 0x01 #define IEEE80211_RADIOTAP_TIMESTAMP_SPOS_PLCP_SIG_ACQ 0x10 +/* http://www.radiotap.org/fields/U-SIG.html */ +struct ieee80211_radiotap_eht_usig { + uint32_t common; + uint32_t value; + uint32_t mask; +} __packed; +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_PHY_VER_KNOWN 0x00000001 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW_KNOWN 0x00000002 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_UL_DL_KNOWN 0x00000004 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BSS_COLOR_KNOWN 0x00000008 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_TXOP_KNOWN 0x00000010 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BAD_USIG_CRC 0x00000020 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_PHY_VER 0x00007000 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BW 0x00038000 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_UL_DL 0x00040000 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_BSS_COLOR 0x01f80000 +#define IEEE80211_RADIOTAP_EHT_USIG_COMMON_TXOP 0xfe000000 + +#define IEEE80211_RADIOTAP_EHT_USIG1_MU_B20_B24_DISREGARD 0x0000001f +#define IEEE80211_RADIOTAP_EHT_USIG1_MU_B25_VALIDATE 0x00000020 +#define IEEE80211_RADIOTAP_EHT_USIG2_MU_B0_B1_PPDU_TYPE 0x000000c0 +#define IEEE80211_RADIOTAP_EHT_USIG2_MU_B2_VALIDATE 0x00000100 +#define IEEE80211_RADIOTAP_EHT_USIG2_MU_B3_B7_PUNCTURED_INFO 0x00003e00 +#define IEEE80211_RADIOTAP_EHT_USIG2_MU_B8_VALIDATE 0x00004000 +#define IEEE80211_RADIOTAP_EHT_USIG2_MU_B9_B10_SIG_MCS 0x00018000 +#define IEEE80211_RADIOTAP_EHT_USIG2_MU_B11_B15_EHT_SIG_SYMBOLS 0x003e0000 +#define IEEE80211_RADIOTAP_EHT_USIG2_MU_B16_B19_CRC 0x03c00000 +#define IEEE80211_RADIOTAP_EHT_USIG2_MU_B20_B25_TAIL 0xfc000000 + +#define IEEE80211_RADIOTAP_EHT_USIG1_TB_B20_B25_DISREGARD 0x0000003f +#define IEEE80211_RADIOTAP_EHT_USIG2_TB_B0_B1_PPDU_TYPE 0x000000c0 +#define IEEE80211_RADIOTAP_EHT_USIG2_TB_B2_VALIDATE 0x00000100 +#define IEEE80211_RADIOTAP_EHT_USIG2_TB_B3_B6_SPATIAL_REUSE_1 0x00001e00 +#define IEEE80211_RADIOTAP_EHT_USIG2_TB_B7_B10_SPATIAL_REUSE_2 0x0001e000 +#define IEEE80211_RADIOTAP_EHT_USIG2_TB_B11_B15_DISREGARD 0x003e0000 +#define IEEE80211_RADIOTAP_EHT_USIG2_TB_B16_B19_CRC 0x03c00000 +#define IEEE80211_RADIOTAP_EHT_USIG2_TB_B20_B25_TAIL 0xfc000000 + +/* http://www.radiotap.org/fields/EHT.html */ +struct ieee80211_radiotap_eht { + uint32_t known; + uint32_t data[9]; + uint32_t user_info[]; +} __packed; +#define IEEE80211_RADIOTAP_EHT_KNOWN_SPATIAL_REUSE 0x00000002 +#define IEEE80211_RADIOTAP_EHT_KNOWN_GI 0x00000004 +#define IEEE80211_RADIOTAP_EHT_KNOWN_EHT_LTF 0x00000010 +#define IEEE80211_RADIOTAP_EHT_KNOWN_LDPC_EXTRA_SYM_OM 0x00000020 +#define IEEE80211_RADIOTAP_EHT_KNOWN_PRE_PADD_FACOR_OM 0x00000040 +#define IEEE80211_RADIOTAP_EHT_KNOWN_PE_DISAMBIGUITY_OM 0x00000080 +#define IEEE80211_RADIOTAP_EHT_KNOWN_NSS_S 0x00020000 +#define IEEE80211_RADIOTAP_EHT_KNOWN_BEAMFORMED_S 0x00040000 +#define IEEE80211_RADIOTAP_EHT_KNOWN_NR_NON_OFDMA_USERS_M 0x00080000 +#define IEEE80211_RADIOTAP_EHT_KNOWN_RU_ALLOC_TB_FMT 0x01000000 +#define IEEE80211_RADIOTAP_EHT_KNOWN_PRIMARY_80 0x02000000 + +#define IEEE80211_RADIOTAP_EHT_DATA0_SPATIAL_REUSE 0x00000078 +#define IEEE80211_RADIOTAP_EHT_DATA0_GI 0x00000180 +#define IEEE80211_RADIOTAP_EHT_DATA0_LTF 0x00000600 +#define IEEE80211_RADIOTAP_EHT_DATA0_EHT_LTF 0x00003800 +#define IEEE80211_RADIOTAP_EHT_DATA0_LDPC_EXTRA_SYM_OM 0x00004000 +#define IEEE80211_RADIOTAP_EHT_DATA0_PRE_PADD_FACOR_OM 0x00018000 +#define IEEE80211_RADIOTAP_EHT_DATA0_PE_DISAMBIGUITY_OM 0x00020000 + +#define IEEE80211_RADIOTAP_EHT_DATA1_RU_ALLOC_CC_1_1_1 0x003fe000 +#define IEEE80211_RADIOTAP_EHT_DATA1_RU_ALLOC_CC_1_1_1_KNOWN 0x00400000 +#define IEEE80211_RADIOTAP_EHT_DATA1_PRIMARY_80 0xc0000000 + +#define IEEE80211_RADIOTAP_EHT_DATA2_RU_ALLOC_CC_2_1_1 0x000001ff +#define IEEE80211_RADIOTAP_EHT_DATA2_RU_ALLOC_CC_2_1_1_KNOWN 0x00000200 +#define IEEE80211_RADIOTAP_EHT_DATA2_RU_ALLOC_CC_1_1_2 0x0007fc00 +#define IEEE80211_RADIOTAP_EHT_DATA2_RU_ALLOC_CC_1_1_2_KNOWN 0x00080000 +#define IEEE80211_RADIOTAP_EHT_DATA2_RU_ALLOC_CC_2_1_2 0x1ff00000 +#define IEEE80211_RADIOTAP_EHT_DATA2_RU_ALLOC_CC_2_1_2_KNOWN 0x20000000 + +#define IEEE80211_RADIOTAP_EHT_DATA3_RU_ALLOC_CC_1_2_1 0x000001ff +#define IEEE80211_RADIOTAP_EHT_DATA3_RU_ALLOC_CC_1_2_1_KNOWN 0x00000200 +#define IEEE80211_RADIOTAP_EHT_DATA3_RU_ALLOC_CC_2_2_1 0x0007fc00 +#define IEEE80211_RADIOTAP_EHT_DATA3_RU_ALLOC_CC_2_2_1_KNOWN 0x00080000 +#define IEEE80211_RADIOTAP_EHT_DATA3_RU_ALLOC_CC_1_2_2 0x1ff00000 +#define IEEE80211_RADIOTAP_EHT_DATA3_RU_ALLOC_CC_1_2_2_KNOWN 0x20000000 + +#define IEEE80211_RADIOTAP_EHT_DATA4_RU_ALLOC_CC_2_2_2 0x000001ff +#define IEEE80211_RADIOTAP_EHT_DATA4_RU_ALLOC_CC_2_2_2_KNOWN 0x00000200 + +#define IEEE80211_RADIOTAP_EHT_DATA7_NSS_S 0x0000f000 +#define IEEE80211_RADIOTAP_EHT_DATA7_BEAMFORMED_S 0x00010000 +#define IEEE80211_RADIOTAP_EHT_DATA7_NUM_OF_NON_OFDMA_USERS 0x000e0000 + +#define IEEE80211_RADIOTAP_EHT_DATA8_RU_ALLOC_TB_FMT_PS_160 0x00000001 +#define IEEE80211_RADIOTAP_EHT_DATA8_RU_ALLOC_TB_FMT_B0 0x00000002 +#define IEEE80211_RADIOTAP_EHT_DATA8_RU_ALLOC_TB_FMT_B7_B1 0x000001fc + +#define IEEE80211_RADIOTAP_EHT_USER_INFO_STA_ID_KNOWN 0x00000001 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_MCS_KNOWN 0x00000002 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_CODING_KNOWN 0x00000004 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_NSS_KNOWN_O 0x00000010 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_BEAMFORMING_KNOWN_O 0x00000020 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_DATA_FOR_USER 0x00000080 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_STA_ID 0x0007ff00 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_CODING 0x00080000 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_MCS 0x00f00000 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_NSS_O 0x0f000000 +#define IEEE80211_RADIOTAP_EHT_USER_INFO_BEAMFORMING_O 0x20000000 + #endif /* !_NET80211_IEEE80211_RADIOTAP_H_ */ From nobody Mon Jun 26 12:08: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 4QqRT11Zx6z4k6mY; Mon, 26 Jun 2023 12:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT05hjkz3j8h; Mon, 26 Jun 2023 12:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MsVWTV48Dqx+2c8UTuq8d/YdgfE7ccprqWjwdiIZi0A=; b=vk5tOXQGtJLCxM4GahmRPphHYrHKHNjtqT/P+YwMWFQW6chDGENOikbYIuLsJ1LgvKi7vJ 84VEY2dYoxX48tBwOb1Rp7OeI6XUd7R8gbpmGY5PwHoXYUso2KMWxJRJ0m9Zjt6qlu/hyT rbEZIK+4gbBMoSTQYRTFsbKhHGROlb+1bvRWkJYbmptV+dLneO710T5vHv6wTicR2lerw/ r59+ngCPZ1zYdxd1jw60fl8SGAay8Rcq7KpGehS4tpQ8Egbl+zr+OfBWE1l1xTJUaFJrf9 Zsi81x5vcUNRjFg2I+Hp8lLgadeFcKWu5ja5a555LLwW4udhJC/sv8KWFHEINQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MsVWTV48Dqx+2c8UTuq8d/YdgfE7ccprqWjwdiIZi0A=; b=uanQkKKFcVAdfVNF8JSODUtHiYuLx7Gys9hcN+B1xVMrO+m+riqcYH96Kgo3Tn0f/srJC8 3FbXRUrgsqGrJO07LGFxsiXO8I6BXeTve3yw0XRmWfirTGumlMCOhGUzAikSuKR7Bu6EYe /0APznagIscwPXghsxrRKLGrmsOYhvdkLJCfSdBCnegIPrjLC0k/4enRQXVAeOwGz4/8/Y KeWVHIpzu8lmz+Bk8rVc5gOn34VYtT+KOCpmJVgKRQNd0hWIe+d++SmMcXkOpCmDUIufsk A9psOdfYMLYSZDYcKaMM+Fjfroc16qudNGXgJ2Ya+ttnYREyo4Sy0TJsd2t7Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781316; a=rsa-sha256; cv=none; b=KXHOtoCup40/YVRzmKja4lKZ3KvJuI3ggHoZ96al1JJodPOi9ry6YcJJIXaO4XoFtgzJNY XIrDl4deTUdH7wj+Y+mjylf8V9/qqMkFtl1G4tXtnlC0vQ2CgAK/FG/epJgwLc0GmVIPcY G3BH3Mcmtjg6sjfJiwfbvWzCZyscLKYljflBkII7pr0LNfVhIohxSe9+IMfoPScAB5SmUz 6OnLszP6/Xya8Cafvh1wtMM2HDNllq40x9F+FJn21wNPZvIXPFTGipz3KHGB+V5dxZ97dP UczKWAtmPTmHy06Ej6GcMk3BtOG1HnjWn7ho3ayUd9UkEumFjTjzIqxsw/wMYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT04Nptz18Wr; Mon, 26 Jun 2023 12:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8a1M083087; Mon, 26 Jun 2023 12:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8aeF083086; Mon, 26 Jun 2023 12:08:36 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:36 GMT Message-Id: <202306261208.35QC8aeF083086@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: 0a5256166e7d - stable/13 - LinuxKPI: 802.11: use ic_printf more consistently List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 0a5256166e7d2475834962fe806b49398e7a6a8e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0a5256166e7d2475834962fe806b49398e7a6a8e commit 0a5256166e7d2475834962fe806b49398e7a6a8e Author: Bjoern A. Zeeb AuthorDate: 2023-03-31 07:10:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:13:16 +0000 LinuxKPI: 802.11: use ic_printf more consistently Rather than printing ic_name ourselves (or not at all) use ic_printf() as a common function from net80211 where possible. Sponsored by: The FreeBSD Foundation (cherry picked from commit 3f0083c4e30ab41fad1e93e4138767df42dbdf20) --- sys/compat/linuxkpi/common/src/linux_80211.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 06b52ebaec88..7d0fc75e751d 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2172,7 +2172,7 @@ lkpi_wme_update(struct lkpi_hw *lhw, struct ieee80211vap *vap, bool planned) txqp.aifs = wmep->wmep_aifsn; error = lkpi_80211_mo_conf_tx(hw, vif, ac, &txqp); if (error != 0) - printf("%s: conf_tx ac %u failed %d\n", + ic_printf(ic, "%s: conf_tx ac %u failed %d\n", __func__, ac, error); } LKPI_80211_LHW_UNLOCK(lhw); @@ -2291,7 +2291,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], error = lkpi_80211_mo_start(hw); if (error != 0) { - printf("%s: failed to start hw: %d\n", __func__, error); + ic_printf(ic, "%s: failed to start hw: %d\n", __func__, error); mtx_destroy(&lvif->mtx); free(lvif, M_80211_VAP); return (NULL); @@ -2300,7 +2300,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], error = lkpi_80211_mo_add_interface(hw, vif); if (error != 0) { IMPROVE(); /* XXX-BZ mo_stop()? */ - printf("%s: failed to add interface: %d\n", __func__, error); + ic_printf(ic, "%s: failed to add interface: %d\n", __func__, error); mtx_destroy(&lvif->mtx); free(lvif, M_80211_VAP); return (NULL); @@ -3100,7 +3100,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) */ skb = dev_alloc_skb(hw->extra_tx_headroom + m->m_pkthdr.len); if (skb == NULL) { - printf("XXX ERROR %s: skb alloc failed\n", __func__); + ic_printf(ic, "ERROR %s: skb alloc failed\n", __func__); ieee80211_free_node(ni); m_freem(m); return; @@ -3288,8 +3288,8 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, int cflags = chan_flags; if (channels[i].flags & IEEE80211_CHAN_DISABLED) { - printf("%s: %s: Skipping disabled chan " - "[%u/%u/%#x]\n", ic->ic_name, __func__, + ic_printf(ic, "%s: Skipping disabled chan " + "[%u/%u/%#x]\n", __func__, channels[i].hw_value, channels[i].center_freq, channels[i].flags); continue; @@ -3312,8 +3312,8 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, nflags, bands, chan_flags); /* net80211::ENOBUFS: *n >= maxchans */ if (error != 0 && error != ENOBUFS) - printf("%s: %s: Adding chan %u/%u/%#x/%#x/%#x/%#x " - "returned error %d\n", ic->ic_name, + ic_printf(ic, "%s: Adding chan %u/%u/%#x/%#x/%#x/%#x " + "returned error %d\n", __func__, channels[i].hw_value, channels[i].center_freq, channels[i].flags, nflags, chan_flags, cflags, error); @@ -3358,8 +3358,8 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, int cflags = chan_flags; if (channels[i].flags & IEEE80211_CHAN_DISABLED) { - printf("%s: %s: Skipping disabled chan " - "[%u/%u/%#x]\n", ic->ic_name, __func__, + ic_printf(ic, "%s: Skipping disabled chan " + "[%u/%u/%#x]\n", __func__, channels[i].hw_value, channels[i].center_freq, channels[i].flags); continue; @@ -3382,8 +3382,8 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan, nflags, bands, chan_flags); /* net80211::ENOBUFS: *n >= maxchans */ if (error != 0 && error != ENOBUFS) - printf("%s: %s: Adding chan %u/%u/%#x/%#x/%#x/%#x " - "returned error %d\n", ic->ic_name, + ic_printf(ic, "%s: Adding chan %u/%u/%#x/%#x/%#x/%#x " + "returned error %d\n", __func__, channels[i].hw_value, channels[i].center_freq, channels[i].flags, nflags, chan_flags, cflags, error); From nobody Mon Jun 26 12:08: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 4QqRT24DFGz4k6rs; Mon, 26 Jun 2023 12:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT22WQNz3jFX; Mon, 26 Jun 2023 12:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hMoG4f4Qow5GGaEzjIKIGfLZTvlayNbyazkA76m1gZk=; b=mAEFgeNOD9R6okD+6srEeddD7Fgao0b2cCJgNESP00T3jLlNQPBH3qr5zUGLkrDZUgAN5K 414Sak8MYU2U8Eap6TW+l9tTJWDRdhb8rzHa/B7wxEMh+tpOzEwNLne5PYUZU3T7zLiHFn 0X5pSheN7+rjP+gKhLKmAddL6UaiI9bEFXXCVSFIZMI3zTBaXoQK+POk9mzGYNMcILkSZX XkxEmA4F62ttj1iXWH+nvjlr0+1NL0GdF662L3S7u4FutPRqLowMyPROI+LnpXWqMGCL2S Vxy90ffkoPAPaEnfQ7c5Pg3cgdymiUq0I12lUQ/4e83a3Vi1CynHe7Sl387ljQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hMoG4f4Qow5GGaEzjIKIGfLZTvlayNbyazkA76m1gZk=; b=cJt8NTCpyfAF3k4tJCHMIBhfjnearH4jSZk5v8PRJ21fDSon63SP0WCOXD8dAw+/7ir6kJ tGF0ts847dIQvKtgMLiGGBM3cLOa8SVnphlgKIKvtTKe10HQBlDiXXZHt3jTNtU0xCfAoL IKnvkdo9fQ0GaXbmyB5V++ZK/dEmJY1JHVkhO+/YuT4dkNimBh61jtQ7FFx8S0a1EieOUJ A38VbCHP3b/VMnTsl/XZXRvgM9T9ORkx4F/DnplFTYct/RCvUXjF5FGoVoVLdOIMxTz2NT nn5sy1b40UK2t8YZRSAozPnELEc99Qn1YFCaf4a4BJAukpHWmU5esrJPuBpKDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781318; a=rsa-sha256; cv=none; b=iFwQHpbC25GP33KPdgWJpD2gBvuNu6JGu+LdGRbEREqKH7SUcu0Wgr2fF8hJWI0vTan7Jk IIwyyYKbL41ju5WHprM3QZEYbjVjCDJGsj5o6Pf215550N1wR2hvSJPfl74Iqs6NWb3Q3D kyBoWwQC948O5nmX9a2TCXTrnEJgSsfkle0bhBFiQ0JdIl+elMJyJS5hNacEd3XTC7/twG V/JoSF+NbxorbTAyThOjMZ3bNkHIrZJu+rRP10tkM/a6cXFlJVAur+bXaeTvKehewiwMsr yB1we9zGK/qtvNFUbaKPBpMcaLu6WINmEsdkm2/t3qBJvh7XA3Ex6XO9iUYF8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT15J5Pz18Cg; Mon, 26 Jun 2023 12:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8bCq083106; Mon, 26 Jun 2023 12:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8bDv083105; Mon, 26 Jun 2023 12:08:37 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:37 GMT Message-Id: <202306261208.35QC8bDv083105@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: c513977ca883 - stable/13 - LinuxKPI: 802.11: remove extra spaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: c513977ca883d9600bae6012cbcbe1b276761b16 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c513977ca883d9600bae6012cbcbe1b276761b16 commit c513977ca883d9600bae6012cbcbe1b276761b16 Author: Bjoern A. Zeeb AuthorDate: 2023-04-02 22:25:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:13:19 +0000 LinuxKPI: 802.11: remove extra spaces Remove two extra spaces. No functional change. Sponsored by: The FreeBSD Foundation (cherry picked from commit cfccc7f30a01bb6f00672e4be4abfe4107d645bb) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 7d0fc75e751d..91b17769bdb5 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2349,9 +2349,9 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], ic->ic_set_channel(ic); /* XXX-BZ do we need to be able to update these? */ - hw->wiphy->frag_threshold = vap->iv_fragthreshold; + hw->wiphy->frag_threshold = vap->iv_fragthreshold; lkpi_80211_mo_set_frag_threshold(hw, vap->iv_fragthreshold); - hw->wiphy->rts_threshold = vap->iv_rtsthreshold; + hw->wiphy->rts_threshold = vap->iv_rtsthreshold; lkpi_80211_mo_set_rts_threshold(hw, vap->iv_rtsthreshold); /* any others? */ IMPROVE(); From nobody Mon Jun 26 12:08: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 4QqRT317hzz4k6f2; Mon, 26 Jun 2023 12:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT26hZTz3j2p; Mon, 26 Jun 2023 12:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DwaNbP1yFDX02qGBXg+ED9WZL8u1JKV/EqZdBHt3krg=; b=tSg6KzJLSslUK5i7LwHO1Qnk9AH7OVDeDoy5UHQIPsMXGjcjZliyrncw1HXjiZ+k5bjcl9 FaEGveDjCzIJDSFsMOhKLsco1mIYnLePHFewCdxjrHe+lSwcBvwhJeQM5iIDTHEkT3AOoN JeNdLniziH7y4r2zL69BxhyHzcEnpX/eAwtb87FVS9XyNwpZzEtnWgNPk2I/XVpy8hegRg OXoyhUovdOJAj+B5FQAyVREaNSTIIWurgrLeyls07QfeFa1yzM9OL1EUsyqOdPX/kbIZNR D3jceG24GWqm1cS4G6Iob48e3LLnf/jdA0tDvw9D1HFBy60uT+en7ov83CJ0Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DwaNbP1yFDX02qGBXg+ED9WZL8u1JKV/EqZdBHt3krg=; b=St/C1VRQUz92q4jA7Y27xgcm4+xIMebdqEs73JbsngDyK7bwYbO7dVTGUu6R5VkPYg3PJL XFD3Fn4D+kIthFtZ0DzPwR8TqWxMeWlVzkA27FToUkGQtzBLpgMc1lv0WwVGc6KPpvF/AI yj353JgaV4mxOVOJIGU7QNVNBfXFNeHpPDQZS8/HHpVN2x4vvvOVWGqST8h6EMAaOJxcuz g/eJd8oRyXbSOeeJF/zuY8nrW2On6f/GggscTcYDW8qTVnb+FZpLHACzhFiHmBgnCUZSkX LT5uvOtGeF2eU2D/Ifgm2Nd8x/g9RD7afO07XXAuV47+WZxusj911tXEk355cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781318; a=rsa-sha256; cv=none; b=XcRph89lFRtgps3U8+LkhGcgQ1+uU7G5OFQBp+IdkcWKsM+ptQAW6AK0wAZ/3yUzkCJngi WCxpXpw3NS2IDs7jbLhT5BlEeZG6gfXwgDXYXTvAG7M79WEJEj6dQbmHuuQdYfCp2luttJ Q6A5scaMQbxxv7ZKQwVAP9ucwCqxUcWvlp5kgmzhxoZ0f30RUnGAkJCOUCrvluHvVPSIc6 TVgVkyY82zmd4aXL1SYXXWyHD91XcFMFBP15gbEENKfPlgVh3L7CgHcCAXuCJLqFv7gkN0 03T1XDBlyWUbX3Zl8JcThdxlIUQtSgcj20HreDGbAbNTBHbYXpv1JCAlg3Uwpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT25jzkz18Ch; Mon, 26 Jun 2023 12:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8cVF083125; Mon, 26 Jun 2023 12:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8clk083124; Mon, 26 Jun 2023 12:08:38 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:38 GMT Message-Id: <202306261208.35QC8clk083124@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: 9e366ef5c8c7 - stable/13 - LinuxKPI: 802.11: adjust locking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 9e366ef5c8c70e51c6826b3462bb3eea448c1009 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9e366ef5c8c70e51c6826b3462bb3eea448c1009 commit 9e366ef5c8c70e51c6826b3462bb3eea448c1009 Author: Bjoern A. Zeeb AuthorDate: 2023-03-31 19:52:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:13:26 +0000 LinuxKPI: 802.11: adjust locking Split up the lhw lock and the scan lock. The latter is a mtx while the former changes from mtx to sx as mac80211 downcalls may sleep (and the ic lock is not usable in that case either and a larger project to fix). This will also enforce some lookups under lock (mostly scan) as well as general protection for more compat code and avoid a possible deadlock with one of the upcoming callbacks from driver into the compat code. Sponsored by: The FreeBSD Foundation (cherry picked from commit 8ac540d3b8bf9746216c4687b4629296357cf146) --- sys/compat/linuxkpi/common/src/linux_80211.c | 92 +++++++++++++++++++++++----- sys/compat/linuxkpi/common/src/linux_80211.h | 37 ++++++++--- 2 files changed, 105 insertions(+), 24 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 91b17769bdb5..d0b760cd6f4f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2022 The FreeBSD Foundation + * Copyright (c) 2020-2023 The FreeBSD Foundation * Copyright (c) 2020-2022 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from @@ -792,8 +792,12 @@ lkpi_stop_hw_scan(struct lkpi_hw *lhw, struct ieee80211_vif *vif) { struct ieee80211_hw *hw; int error; + bool cancel; - if ((lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) == 0) + LKPI_80211_LHW_SCAN_LOCK(lhw); + cancel = (lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + if (!cancel) return; hw = LHW_TO_HW(lhw); @@ -802,13 +806,18 @@ lkpi_stop_hw_scan(struct lkpi_hw *lhw, struct ieee80211_vif *vif) LKPI_80211_LHW_LOCK(lhw); /* Need to cancel the scan. */ lkpi_80211_mo_cancel_hw_scan(hw, vif); + LKPI_80211_LHW_UNLOCK(lhw); /* Need to make sure we see ieee80211_scan_completed. */ - error = msleep(lhw, &lhw->mtx, 0, "lhwscanstop", hz/2); - LKPI_80211_LHW_UNLOCK(lhw); + LKPI_80211_LHW_SCAN_LOCK(lhw); + if ((lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0) + error = msleep(lhw, &lhw->scan_mtx, 0, "lhwscanstop", hz/2); + cancel = (lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + IEEE80211_LOCK(lhw->ic); - if ((lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0) + if (cancel) ic_printf(lhw->ic, "%s: failed to cancel scan: %d (%p, %p)\n", __func__, error, lhw, vif); } @@ -935,6 +944,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int ni = ieee80211_ref_node(vap->iv_bss); IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { @@ -1078,6 +1088,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int */ out: + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); if (ni != NULL) ieee80211_free_node(ni); @@ -1110,6 +1121,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); /* flush, drop. */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); @@ -1170,6 +1182,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int } out: + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); if (ni != NULL) ieee80211_free_node(ni); @@ -1205,6 +1218,7 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in vif = LVIF_TO_VIF(lvif); IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); ni = NULL; /* Finish auth. */ @@ -1252,6 +1266,7 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in */ out: + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); if (ni != NULL) ieee80211_free_node(ni); @@ -1278,6 +1293,7 @@ lkpi_sta_a_to_a(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) ni = ieee80211_ref_node(vap->iv_bss); IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); lsta = ni->ni_drv_data; IMPROVE("event callback?"); @@ -1300,6 +1316,7 @@ lkpi_sta_a_to_a(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) lsta->in_mgd = true; } + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); if (ni != NULL) ieee80211_free_node(ni); @@ -1334,6 +1351,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); /* flush, drop. */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); @@ -1347,6 +1365,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lsta->in_mgd = true; } + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); /* Call iv_newstate first so we get potential DISASSOC packet out. */ @@ -1355,6 +1374,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i goto outni; IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1438,6 +1458,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i error = EALREADY; out: + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); outni: if (ni != NULL) @@ -1498,6 +1519,7 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int vif = LVIF_TO_VIF(lvif); IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); ni = NULL; IMPROVE("ponder some of this moved to ic_newassoc, scan_assoc_success, " @@ -1608,6 +1630,7 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); out: + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); if (ni != NULL) ieee80211_free_node(ni); @@ -1654,6 +1677,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); /* flush, drop. */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); @@ -1667,6 +1691,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta->in_mgd = true; } + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); /* Call iv_newstate first so we get potential DISASSOC packet out. */ @@ -1675,6 +1700,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto outni; IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1729,6 +1755,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = EALREADY; out: + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); outni: if (ni != NULL) @@ -1763,6 +1790,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); /* flush, drop. */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); @@ -1776,6 +1804,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta->in_mgd = true; } + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); /* Call iv_newstate first so we get potential DISASSOC packet out. */ @@ -1784,6 +1813,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto outni; IEEE80211_UNLOCK(vap->iv_ic); + LKPI_80211_LHW_LOCK(lhw); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); @@ -1890,6 +1920,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = EALREADY; out: + LKPI_80211_LHW_UNLOCK(lhw); IEEE80211_LOCK(vap->iv_ic); outni: if (ni != NULL) @@ -2439,6 +2470,8 @@ lkpi_ic_parent(struct ieee80211com *ic) hw = LHW_TO_HW(lhw); start_all = false; + /* IEEE80211_UNLOCK(ic); */ + LKPI_80211_LHW_LOCK(lhw); if (ic->ic_nrunning > 0) { error = lkpi_80211_mo_start(hw); if (error == 0) @@ -2446,6 +2479,8 @@ lkpi_ic_parent(struct ieee80211com *ic) } else { lkpi_80211_mo_stop(hw); } + LKPI_80211_LHW_UNLOCK(lhw); + /* IEEE80211_LOCK(ic); */ if (start_all) ieee80211_start_all(ic); @@ -2587,12 +2622,17 @@ lkpi_ic_scan_start(struct ieee80211com *ic) struct ieee80211_scan_state *ss; struct ieee80211vap *vap; int error; + bool is_hw_scan; lhw = ic->ic_softc; + LKPI_80211_LHW_SCAN_LOCK(lhw); if ((lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0) { /* A scan is still running. */ + LKPI_80211_LHW_SCAN_UNLOCK(lhw); return; } + is_hw_scan = (lhw->scan_flags & LKPI_LHW_SCAN_HW) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); ss = ic->ic_scan; vap = ss->ss_vap; @@ -2602,7 +2642,7 @@ lkpi_ic_scan_start(struct ieee80211com *ic) } hw = LHW_TO_HW(lhw); - if ((lhw->scan_flags & LKPI_LHW_SCAN_HW) == 0) { + if (!is_hw_scan) { /* If hw_scan is cleared clear FEXT_SCAN_OFFLOAD too. */ vap->iv_flags_ext &= ~IEEE80211_FEXT_SCAN_OFFLOAD; sw_scan: @@ -2747,7 +2787,9 @@ sw_scan: * not possible. Fall back to sw scan in that case. */ if (error == 1) { + LKPI_80211_LHW_SCAN_LOCK(lhw); lhw->scan_flags &= ~LKPI_LHW_SCAN_HW; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); ieee80211_start_scan(vap, IEEE80211_SCAN_ACTIVE | IEEE80211_SCAN_NOPICK | @@ -2769,13 +2811,18 @@ static void lkpi_ic_scan_end(struct ieee80211com *ic) { struct lkpi_hw *lhw; + bool is_hw_scan; lhw = ic->ic_softc; + LKPI_80211_LHW_SCAN_LOCK(lhw); if ((lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) == 0) { + LKPI_80211_LHW_SCAN_UNLOCK(lhw); return; } + is_hw_scan = (lhw->scan_flags & LKPI_LHW_SCAN_HW) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); - if ((lhw->scan_flags & LKPI_LHW_SCAN_HW) == 0) { + if (!is_hw_scan) { struct ieee80211_scan_state *ss; struct ieee80211vap *vap; struct ieee80211_hw *hw; @@ -2802,9 +2849,13 @@ lkpi_ic_scan_curchan(struct ieee80211_scan_state *ss, unsigned long maxdwell) { struct lkpi_hw *lhw; + bool is_hw_scan; lhw = ss->ss_ic->ic_softc; - if ((lhw->scan_flags & LKPI_LHW_SCAN_HW) == 0) + LKPI_80211_LHW_SCAN_LOCK(lhw); + is_hw_scan = (lhw->scan_flags & LKPI_LHW_SCAN_HW) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + if (!is_hw_scan) lhw->ic_scan_curchan(ss, maxdwell); } @@ -2812,9 +2863,13 @@ static void lkpi_ic_scan_mindwell(struct ieee80211_scan_state *ss) { struct lkpi_hw *lhw; + bool is_hw_scan; lhw = ss->ss_ic->ic_softc; - if ((lhw->scan_flags & LKPI_LHW_SCAN_HW) == 0) + LKPI_80211_LHW_SCAN_LOCK(lhw); + is_hw_scan = (lhw->scan_flags & LKPI_LHW_SCAN_HW) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + if (!is_hw_scan) lhw->ic_scan_mindwell(ss); } @@ -2826,6 +2881,7 @@ lkpi_ic_set_channel(struct ieee80211com *ic) struct ieee80211_channel *c; struct linuxkpi_ieee80211_channel *chan; int error; + bool hw_scan_running; lhw = ic->ic_softc; @@ -2834,8 +2890,12 @@ lkpi_ic_set_channel(struct ieee80211com *ic) return; /* If we have a hw_scan running do not switch channels. */ - if ((lhw->scan_flags & (LKPI_LHW_SCAN_RUNNING|LKPI_LHW_SCAN_HW)) == - (LKPI_LHW_SCAN_RUNNING|LKPI_LHW_SCAN_HW)) + LKPI_80211_LHW_SCAN_LOCK(lhw); + hw_scan_running = + (lhw->scan_flags & (LKPI_LHW_SCAN_RUNNING|LKPI_LHW_SCAN_HW)) == + (LKPI_LHW_SCAN_RUNNING|LKPI_LHW_SCAN_HW); + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + if (hw_scan_running) return; c = ic->ic_curchan; @@ -3424,7 +3484,8 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) lhw = wiphy_priv(wiphy); lhw->ops = ops; - mtx_init(&lhw->mtx, "lhw", NULL, MTX_DEF | MTX_RECURSE); + LKPI_80211_LHW_LOCK_INIT(lhw); + LKPI_80211_LHW_SCAN_LOCK_INIT(lhw); sx_init_flags(&lhw->lvif_sx, "lhw-lvif", SX_RECURSE | SX_DUPOK); TAILQ_INIT(&lhw->lvif_head); @@ -3460,7 +3521,8 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) /* Cleanup more of lhw here or in wiphy_free()? */ sx_destroy(&lhw->lvif_sx); - mtx_destroy(&lhw->mtx); + LKPI_80211_LHW_LOCK_DESTROY(lhw); + LKPI_80211_LHW_SCAN_LOCK_DESTROY(lhw); IMPROVE(); } @@ -3867,12 +3929,12 @@ linuxkpi_ieee80211_scan_completed(struct ieee80211_hw *hw, ieee80211_scan_done(ss->ss_vap); - LKPI_80211_LHW_LOCK(lhw); + LKPI_80211_LHW_SCAN_LOCK(lhw); free(lhw->hw_req, M_LKPI80211); lhw->hw_req = NULL; lhw->scan_flags &= ~LKPI_LHW_SCAN_RUNNING; wakeup(lhw); - LKPI_80211_LHW_UNLOCK(lhw); + LKPI_80211_LHW_SCAN_UNLOCK(lhw); return; } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 4d44ca07948e..42b4192bac63 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2022 The FreeBSD Foundation + * Copyright (c) 2020-2023 The FreeBSD Foundation * Copyright (c) 2020-2021 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from @@ -173,7 +173,7 @@ struct lkpi_hw { /* name it mac80211_sc? */ TAILQ_HEAD(, lkpi_vif) lvif_head; struct sx lvif_sx; - struct mtx mtx; + struct sx sx; uint32_t txq_generation[IEEE80211_NUM_ACS]; TAILQ_HEAD(, lkpi_txq) scheduled_txqs[IEEE80211_NUM_ACS]; @@ -195,6 +195,7 @@ struct lkpi_hw { /* name it mac80211_sc? */ #define LKPI_LHW_SCAN_RUNNING 0x00000001 #define LKPI_LHW_SCAN_HW 0x00000002 uint32_t scan_flags; + struct mtx scan_mtx; int supbands; /* Number of supported bands. */ int max_rates; /* Maximum number of bitrates supported in any channel. */ @@ -218,13 +219,31 @@ struct lkpi_wiphy { #define WIPHY_TO_LWIPHY(_wiphy) container_of(_wiphy, struct lkpi_wiphy, wiphy) #define LWIPHY_TO_WIPHY(_lwiphy) (&(_lwiphy)->wiphy) - -#define LKPI_80211_LHW_LOCK(_lhw) mtx_lock(&(_lhw)->mtx) -#define LKPI_80211_LHW_UNLOCK(_lhw) mtx_unlock(&(_lhw)->mtx) -#define LKPI_80211_LHW_LOCK_ASSERT(_lhw) \ - mtx_assert(&(_lhw)->mtx, MA_OWNED) -#define LKPI_80211_LHW_UNLOCK_ASSERT(_lhw) \ - mtx_assert(&(_lhw)->mtx, MA_NOTOWNED) +#define LKPI_80211_LHW_LOCK_INIT(_lhw) \ + sx_init_flags(&(_lhw)->sx, "lhw", SX_RECURSE); +#define LKPI_80211_LHW_LOCK_DESTROY(_lhw) \ + sx_destroy(&(_lhw)->sx); +#define LKPI_80211_LHW_LOCK(_lhw) \ + sx_xlock(&(_lhw)->sx) +#define LKPI_80211_LHW_UNLOCK(_lhw) \ + sx_xunlock(&(_lhw)->sx) +#define LKPI_80211_LHW_LOCK_ASSERT(_lhw) \ + sx_assert(&(_lhw)->sx, SA_LOCKED) +#define LKPI_80211_LHW_UNLOCK_ASSERT(_lhw) \ + sx_assert(&(_lhw)->sx, SA_UNLOCKED) + +#define LKPI_80211_LHW_SCAN_LOCK_INIT(_lhw) \ + mtx_init(&(_lhw)->scan_mtx, "lhw-scan", NULL, MTX_DEF | MTX_RECURSE); +#define LKPI_80211_LHW_SCAN_LOCK_DESTROY(_lhw) \ + mtx_destroy(&(_lhw)->scan_mtx); +#define LKPI_80211_LHW_SCAN_LOCK(_lhw) \ + mtx_lock(&(_lhw)->scan_mtx) +#define LKPI_80211_LHW_SCAN_UNLOCK(_lhw) \ + mtx_unlock(&(_lhw)->scan_mtx) +#define LKPI_80211_LHW_SCAN_LOCK_ASSERT(_lhw) \ + mtx_assert(&(_lhw)->scan_mtx, MA_OWNED) +#define LKPI_80211_LHW_SCAN_UNLOCK_ASSERT(_lhw) \ + mtx_assert(&(_lhw)->scan_mtx, MA_NOTOWNED) #define LKPI_80211_LHW_LVIF_LOCK(_lhw) sx_xlock(&(_lhw)->lvif_sx) #define LKPI_80211_LHW_LVIF_UNLOCK(_lhw) sx_xunlock(&(_lhw)->lvif_sx) From nobody Mon Jun 26 12:08: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 4QqRT41yLVz4k6qR; Mon, 26 Jun 2023 12:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT40ndFz3jNr; Mon, 26 Jun 2023 12:08:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=72u1UJgySjk+b77ey6jlnNCaf4pXuvHWCgqUqHdb020=; b=bzIBZ4KFckQtArvYCMbSq/9rBN9+RbEcHdAYQhhXKWa5yCE7PYmD6DcPzWKVnieHEjq327 tYibbRMHNvdtNnrVzGpdAAN2kMMN3XWmhJXW7LkODHu6Glm8KfLtdUm9vR55BfeJV8yyIO U+v51fRxvYCypcy+OmWjWtbDK2YdVVfkDA1nrbgN2EfyinL3IzjD+hTKULt7qo2Kt571wS M71/IPBqfTr8EWDQtsNfGfHRs9u01kail8e/t2/pa3KJKQRsvjoFfEpWtJNokQI9+ivPwz Eh3AaruSgPqxA+kKUj1n35SzMwyZFTSISRvZM/kIzV2+WCkUISGfWFAmgrSvHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=72u1UJgySjk+b77ey6jlnNCaf4pXuvHWCgqUqHdb020=; b=eiNgkOvBBlFzPqjOfUhGm7+bH05C1FEu2WOFQ1AIX/uWZlnnzf+OPCTi0uz3KOShy+u/6A Ir32C0hBZ0mEEO89Ev6s0rWaDP+bfeD/5IcXDVGSffQkbsT5xyIUyqT1kxpFMn/mgc3VHK f7LZxzRRglxRVfG6ttHQTpehPDWPA9/hrqHQq4Ufe5U4KizWhLgZHNRVFKl4JpnQG0CSkP z6NbxIvkRlq4xp+yKQnIFFz0i9L0UphR/Y1vnuMddJsDjOTpve14Az2vqpkmTomwpkSvTv nAxwTZog/wv55eG63wDTd9uoMrHyV19sIwHj4licwRxEaCoLNtTXOaNUl981lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781320; a=rsa-sha256; cv=none; b=ph4dWHF4YniakqkGsBJHzdy6WYwh2AOfaMmPaWxjE74HBDpYHphcFFCxVTZTfmTH8FJ4Qf q/4Lk38nTwLSvVnBuUcWYSxaOnRYlFHAUnumBOJS2BClwidq28nlJ0xkJIuQHXA9gw7psE 1zrUMuVoB94fYQdpgzKLnR8m4BXkjbhNItbFHRbgt3aidYumPy4lnRTQHu94ZhIXGNc0vO B0KhYsLvWAjJTuWFHCiEg/n2k2t7HCMhhFt/l9GpJED1Vg63Hxu0iFJVqCfDDqA8wsBGdQ 7HKTcSyaJTn8EVjdctdFyh/VXKZ0jymIeYyAIEWyzFw9P0CYpxXmF8lWchRNtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT36stSz17ZT; Mon, 26 Jun 2023 12:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8ds0083150; Mon, 26 Jun 2023 12:08:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8dDJ083149; Mon, 26 Jun 2023 12:08:39 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:39 GMT Message-Id: <202306261208.35QC8dDJ083149@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: 7140d2464579 - stable/13 - LinuxKPI: 802.11: improve assertion and tkip 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7140d2464579e918d5e59ba1a9b2b0b148536c86 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7140d2464579e918d5e59ba1a9b2b0b148536c86 commit 7140d2464579e918d5e59ba1a9b2b0b148536c86 Author: Bjoern A. Zeeb AuthorDate: 2023-04-20 16:01:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:14:04 +0000 LinuxKPI: 802.11: improve assertion and tkip code Move a KASSERT out of a function and make it a CTASSERT with appropriate comments. Skeleton implement two tkip functions, still left TODO, initializing variables with dummy values to quiten compiler warnings. It is unclear to me if we should still ever properly implement TKIP compat code at this point. If so the current code gives a good idea what needs to be done in addition to allocating references to real state along with keyconf. Sponsored by: The FreeBSD Foundation (cherry picked from commit 35f7fa4ac1aea8af9a4f2428b3f0a346151b4071) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 38 ++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 1fcee420232c..77045f866e8b 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1756,6 +1756,11 @@ ieee80211_tu_to_usec(unsigned long tu) return (tu * IEEE80211_DUR_TU); } +/* + * Below we assume that the two values from different emums are the same. + * Make sure this does not accidentally change. + */ +CTASSERT((int)IEEE80211_ACTION_SM_TPCREP == (int)IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP); static __inline bool ieee80211_action_contains_tpc(struct sk_buff *skb) @@ -1783,10 +1788,10 @@ ieee80211_action_contains_tpc(struct sk_buff *skb) mgmt->u.action.category != IEEE80211_ACTION_CAT_RADIO_MEASUREMENT) return (false); - /* Check that it is TPC Report or Link Measurement Report? */ - KASSERT((int)IEEE80211_ACTION_SM_TPCREP == (int)IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP, - ("%s: SM_TPCREP %d != RADIO_MEASUREMENT_LMREP %d\n", __func__, - IEEE80211_ACTION_SM_TPCREP, IEEE80211_ACTION_RADIO_MEASUREMENT_LMREP)); + /* + * Check that it is TPC Report or Link Measurement Report? + * The values of each are the same (see CTASSERT above function). + */ if (mgmt->u.action.u.tpc_report.spec_mgmt != IEEE80211_ACTION_SM_TPCREP) return (false); @@ -1834,7 +1839,12 @@ static __inline void ieee80211_get_tkip_rx_p1k(struct ieee80211_key_conf *keyconf, const u8 *addr, uint32_t iv32, u16 *p1k) { + + KASSERT(keyconf != NULL && addr != NULL && p1k != NULL, + ("%s: keyconf %p addr %p p1k %p\n", __func__, keyconf, addr, p1k)); + TODO(); + memset(p1k, 0xfa, 5 * sizeof(*p1k)); /* Just initializing. */ } static __inline size_t @@ -2051,7 +2061,27 @@ static __inline void ieee80211_get_key_rx_seq(struct ieee80211_key_conf *keyconf, uint8_t tid, struct ieee80211_key_seq *seq) { + + KASSERT(keyconf != NULL && seq != NULL, ("%s: keyconf %p seq %p\n", + __func__, keyconf, seq)); + TODO(); + switch (keyconf->cipher) { + case WLAN_CIPHER_SUITE_CCMP: + case WLAN_CIPHER_SUITE_CCMP_256: + memset(seq->ccmp.pn, 0xfa, sizeof(seq->ccmp.pn)); /* XXX TODO */ + break; + case WLAN_CIPHER_SUITE_AES_CMAC: + memset(seq->aes_cmac.pn, 0xfa, sizeof(seq->aes_cmac.pn)); /* XXX TODO */ + break; + case WLAN_CIPHER_SUITE_TKIP: + seq->tkip.iv32 = 0xfa; /* XXX TODO */ + seq->tkip.iv16 = 0xfa; /* XXX TODO */ + break; + default: + pr_debug("%s: unsupported cipher suite %d\n", __func__, keyconf->cipher); + break; + } } static __inline void From nobody Mon Jun 26 12:08: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 4QqRT53JSNz4k6hM; Mon, 26 Jun 2023 12:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT51dC1z3j55; Mon, 26 Jun 2023 12:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eY/YGXoMGYze0eZQW7JxR2VP9XBtLoiW+1Xz9972GSE=; b=AhTQ98WeiJvv2lCq1FSIobRufB/v7JL5/eZG/eJOBAnNxDdFs9hwKlFlmH964oXldYX4sI 7aJU1EBcjKoqOBumYlUZkq84GsDAdAinqi2wejvkLgLDav/rUswSiffTlakqn50X/4kdfl FJ0l/IufDuwCHNS+oMZ/mowgRnmocRqwDpUEy5mfrxrP8VCn4RBLVeM647AVcoXcmlrJxT ppdW4Cl7zXvC8ABXe0VjGI0eWXeVQfPeW6CFZNpwsC9aLIQSrMGzNrQsUcbPc/1sxhNjld LcofwvE1rj4Na5Yr1dlFr/jVbM1hClIQP+hHlttX4yTjnyvt12hySVg6hvMMXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eY/YGXoMGYze0eZQW7JxR2VP9XBtLoiW+1Xz9972GSE=; b=DNwXaHKI1yTFf4Nxo91Qa6vjBbH7RmVzqoGymjKVGUxpTcUF4JI0cvZ3eqydNBx3BtiC7Q 88D8Lgm3M/yGDX2H7vycvcSewGHoQjS96pb0GX49BzCK/ONlqU9CFsVEu3Mqxe/f2NS8xz nOtgsbtLu11qnLnkcAxMrJjOcGtHloHgVJnJWheCqq+SAyVJb5V4MftzEF3OcmYI5shboB ofbmKsJ7fkQUxxmNg4WpJ8wzWEQl8ZnwOZx9KQmirhmA3sJxDYZwitbXq5O2pzfmSz2ue2 QHYKs4vnEpnlyYA/cHb42ONY3AQHre8gDWtD0EAGKyx9LSPoTFr+lxcl4V69VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781321; a=rsa-sha256; cv=none; b=dhRJXfiRMq0T+xz0TySvPo9LGkCyC5IEC0swcxf6icYVUAdB5r7cb4ilXunrhzlafuX1Z1 eXomgrd84fA2SS8Xr9NxfhQWuvIGcllC3C1R8xKRm9a0U6ZV97fl6NUR01GwbAf/eSH/SP 0AXTmwjVYiGGs3dTBtxOnnWx4P9pbq/cRwlbkysYSR0kzD7eFkAti1qN1o0LtPUUp9NMcT CQoqQakerdM2K27omy4vSMrdAsf8qOnYzipjGEvfYBtjiISEq4VPYtnXFbFCxNdMb4G3Zb LYUBpn/brHMfdZ1J59tWVN+YHsove9i7N94dPwSE/Nt+ccdZiAZde3ELEfFihg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT50kRkz18Cj; Mon, 26 Jun 2023 12:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8f0W083169; Mon, 26 Jun 2023 12:08:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8fYP083168; Mon, 26 Jun 2023 12:08:41 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:41 GMT Message-Id: <202306261208.35QC8fYP083168@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: 6503ae09604f - stable/13 - LinuxKPI: pci.h: always initialize return value List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 6503ae09604f362e1446583bed30c69a6716b0e6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6503ae09604f362e1446583bed30c69a6716b0e6 commit 6503ae09604f362e1446583bed30c69a6716b0e6 Author: Bjoern A. Zeeb AuthorDate: 2023-04-20 15:59:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:14:11 +0000 LinuxKPI: pci.h: always initialize return value In pcie_capability_read_*() always initialize the return value to avoid warnings of uninitialized values in callers. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39721 (cherry picked from commit 0e8953b94b7481a53945cbd1e16517773996e16e) --- sys/compat/linuxkpi/common/include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index f8071524c9e0..55435f6b72bc 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1198,6 +1198,7 @@ static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos) static inline int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *dst) { + *dst = 0; if (pos & 3) return -EINVAL; @@ -1210,6 +1211,7 @@ pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *dst) static inline int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *dst) { + *dst = 0; if (pos & 3) return -EINVAL; From nobody Mon Jun 26 12:08: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 4QqRT64gdKz4k6qk; Mon, 26 Jun 2023 12:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT62df3z3j7j; Mon, 26 Jun 2023 12:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rg5JVhpv+gny1UFZ+SEPzs259xISw+uy1MtlIh85V+c=; b=U9HK6niAMgDpfXsq8IbHqr28Yd9G7AnUyM/7d1gcIiy66hjYjbmyBddBgeypIDLLNWbDol OsDQolFf/cBQyNILLasgVRRgfdDHfuu9BeKlsM81vUTdp54ygr655laUipcosAndneu0CT 5mbZLaLfWlIoftFvDhxM1/3+CDgBiDdBw90NohonkrhQnnoIn/hNzTXhTT9/n6sIQoIrsb zHJfbwbXca9d+xxwIVr//op7bJVElh19MbTN2PbrpeNr7kbnSt5B2vP+I4vnoXGxo9b8Rq EcOJayBLfn6Qs8irpl+1RtfhL5ZsDCKqriL/fQ8yIuXVnwFhhdxkER28NGaOxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rg5JVhpv+gny1UFZ+SEPzs259xISw+uy1MtlIh85V+c=; b=in4laHlvB0uMOQtrCDgb412AU6quEJmSrHRi0HDxpRACRj961EqzxK75B2xHY2GI2Xq4m0 7UcDcFVVmizJ9czzaVjTJ6Qr3b4F3cdMZQBGMqk7l7Jb15o4GjtKWhJx8s/1Vsct7ss75L 8fq7Ii9+4LDVfE9atpOXEtphg7Z/t05oj0eHHSSPUwf1Jp4XToQzxiJwQPcWRf9IrMxyZW 7T6rmBFPUPBrmI+eo6k51y7x5aqHii6TPjpxuZ8jqQBaAZLQVWhkNI9sbMVBVIpTS8Moim UcarjkNjhcIJp4/WWsZYEaYu1UaSJaSmhAB5FkZVShvJCbrBwbdbwcMJQJ1DRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781322; a=rsa-sha256; cv=none; b=vdsjb7l/TYq2mKOEgn1ixh+OdwytzqaTV/5owgiC5V/omDKzNdGeSFmeaIY7R731vCyP/i BxAGBV7icGgq2cESoG8+8OXnRp1ND5f+43//a+8qqWvXl76QIYZZqoPkYfi/nnsowSltIG w8b9ExZmBq/ygGFmzAtlchsndCUpNkB0Eie6lSCs1LXRtn19qr6f5jQZ4hscyRutmH+g6U P0mMnI5GFhF70jeu9JDBEsPRXRTpNsj9sVUw2lk/CVq2AgYR8EQ2cY8F0tl1HDY7l1lxH8 2goElQUGkLh5ztCC1wg6O/ykYw0RgcpF+pPRkU4yRVX3eYfrkDdJIAS4G6u6TA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT61lCmz17dZ; Mon, 26 Jun 2023 12:08:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8gjU083188; Mon, 26 Jun 2023 12:08:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8gc1083187; Mon, 26 Jun 2023 12:08:42 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:42 GMT Message-Id: <202306261208.35QC8gc1083187@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: 3df3e9a27d5f - stable/13 - LinuxKPI: 802.11: fix IEEE80211_TX_INFO_DRIVER_DATA_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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3df3e9a27d5f5cc4dedc2d4003bbb049c471f789 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3df3e9a27d5f5cc4dedc2d4003bbb049c471f789 commit 3df3e9a27d5f5cc4dedc2d4003bbb049c471f789 Author: Bjoern A. Zeeb AuthorDate: 2023-05-11 21:35:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:14:22 +0000 LinuxKPI: 802.11: fix IEEE80211_TX_INFO_DRIVER_DATA_SIZE Fix the sizing of IEEE80211_TX_INFO_DRIVER_DATA_SIZE so that it also works on 32bit platforms. Otherwise it triggers a compile-time assertion in ath10k for i386. Sponsored by: The FreeBSD Foundation (cherry picked from commit 910a834383587fc6630225200cc66b7965d5102f) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 77045f866e8b..9cef12d825d7 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -755,7 +755,7 @@ struct ieee80211_tx_info { bool is_valid_ack_signal; void *status_driver_data[16 / sizeof(void *)]; /* XXX TODO */ } status; -#define IEEE80211_TX_INFO_DRIVER_DATA_SIZE (5 * sizeof(void *)) /* XXX TODO 5? */ +#define IEEE80211_TX_INFO_DRIVER_DATA_SIZE 40 void *driver_data[IEEE80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *)]; }; }; From nobody Mon Jun 26 12:08: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 4QqRT755shz4k6bc; Mon, 26 Jun 2023 12:08: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 4QqRT73wCHz3jPy; Mon, 26 Jun 2023 12:08:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWiZdi9UkuaQ/u3N/AQ/n9nKdHVTuA4QsfD9Oj6qZpA=; b=OWxcmCY6Ijiwp/tw4SwvpOMJgm4p3V28fVZPMxfmPOwCSRvWH4vhKRdQo+ecO9FWZaa5PB DeUnLFYB4xltmPOQ66fzNb8lZwBs1CxRgUoAAv2kp2rKnXxL85fJu69IgSeSMulCl3jgd9 KuzJ2lWGo5f9GhHESjpusNp5fX9/6NBxQNTG+3eSEd1lsTnzbpZHfAfBDUiLsMRbKnyyxy lkg74Vwmp2IpouDmeLgV2YCpOEL1Gmvna9wnVLHRH+joUNqt+uXs7mKIGz8fEur0fACeJ4 dOVzbfnfAGxmo2+B+qxTXPa8NzC8XqlT8R4ExXJO9Z/BIEi01h6WyiNcQs66qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWiZdi9UkuaQ/u3N/AQ/n9nKdHVTuA4QsfD9Oj6qZpA=; b=lv3c+/U2pFFTak7Rc2KQNqqtNSeyRB4lhUtk9xs7Sydmsu9syKfE78gDkSYQd65tkW+mqf CbxOZzjhuII4OylrsKdphGAkFcpxA4iECCDCRUAtTPChKGySYTmS7ditNPXiZ9HdKzRFa8 nK9mj8uyu2qkADU1AOTLduGJyEvEVXIAiEtgJaerbuEygimFy9jP33vrn26UiKAnlsFl/f 32hmu45TBgH2vR8Rz2sjHHPUfWpTtRnplU/z2XHrFvYrgr6c8Wcr2tOqId86iDrbDj+4o2 wsY1EfSPKgQ89IFFZTOkgCCEi0ut+jntTObMfWojCjhfx2eh8w0+dvdpO5D5sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781323; a=rsa-sha256; cv=none; b=tcvaLb5nyODw/WkfLICw+lmr8fFB0UOZ1uHVLBrviZMY9D6pPCZIWUYGmjpYHvMwX1c8Vs acehw2snnDouBycteC/+7CL5F25l9tK/2qBv+qJ/flf54J/2c4WZDT/PGcn/Xw4RKoV73D BABTRy3Phhq0KpoGAzgg1P1XOk+lgbs/mLJQRjJSDlVe3ANAZvIF/EXbzXUBzKJFeVDSo/ QB0GB8xyl5hKYDpIArPYfl+ZBNhWDWxTwMflzyepgNm/FluF7wWm2ZLBiwex0eWrW68+IL BqxeRX6k7X5TvH9lqb1I2laNnRW4t258Sp/PEhCQFb4LHO5dZqTnMR2RXfXm8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT72mLDz18Ck; Mon, 26 Jun 2023 12:08:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8hnn083207; Mon, 26 Jun 2023 12:08:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8hb8083206; Mon, 26 Jun 2023 12:08:43 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:43 GMT Message-Id: <202306261208.35QC8hb8083206@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: 46f8d147fbc9 - stable/13 - LinuxKPI: add dummy hash.h and kernel_connect() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 46f8d147fbc94f5ea7a2f916a87d25cd3b42cca2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=46f8d147fbc94f5ea7a2f916a87d25cd3b42cca2 commit 46f8d147fbc94f5ea7a2f916a87d25cd3b42cca2 Author: Bjoern A. Zeeb AuthorDate: 2023-05-11 22:19:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:14:28 +0000 LinuxKPI: add dummy hash.h and kernel_connect() Add crypto/hash.h and a dummy kernel_connect() needed to compile the ath11k wireless driver. While I hope we will not actually need the hash.h fallbacks, kernel_connect() we will have to deal with once we sort out more QMI bits. (cherry picked from commit d544b53cb0b6bc25f2ba078bd9c07e611095bf29) --- sys/compat/linuxkpi/common/include/crypto/hash.h | 94 +++++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/socket.h | 11 +++ 2 files changed, 105 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/crypto/hash.h b/sys/compat/linuxkpi/common/include/crypto/hash.h new file mode 100644 index 000000000000..bf401691722a --- /dev/null +++ b/sys/compat/linuxkpi/common/include/crypto/hash.h @@ -0,0 +1,94 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * 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 + * 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 _LINUXKPI_CRYPTO_HASH_H +#define _LINUXKPI_CRYPTO_HASH_H + +#include /* for pr_debug */ + +struct crypto_shash { +}; + +struct shash_desc { + struct crypto_shash *tfm; +}; + +static inline struct crypto_shash * +crypto_alloc_shash(const char *algostr, int x, int y) +{ + + pr_debug("%s: TODO\n", __func__); + return (NULL); +} + +static inline void +crypto_free_shash(struct crypto_shash *csh) +{ + pr_debug("%s: TODO\n", __func__); +} + +static inline int +crypto_shash_init(struct shash_desc *desc) +{ + pr_debug("%s: TODO\n", __func__); + return (-ENXIO); +} + +static inline int +crypto_shash_final(struct shash_desc *desc, uint8_t *mic) +{ + pr_debug("%s: TODO\n", __func__); + return (-ENXIO); +} + +static inline int +crypto_shash_setkey(struct crypto_shash *csh, const uint8_t *key, size_t keylen) +{ + pr_debug("%s: TODO\n", __func__); + return (-ENXIO); +} + +static inline int +crypto_shash_update(struct shash_desc *desc, uint8_t *data, size_t datalen) +{ + pr_debug("%s: TODO\n", __func__); + return (-ENXIO); +} + +static inline void +shash_desc_zero(struct shash_desc *desc) +{ + + explicit_bzero(desc, sizeof(*desc)); +} + +/* XXX review this. */ +#define SHASH_DESC_ON_STACK(desc, tfm) \ + uint8_t ___ ## desc ## _desc[sizeof(struct shash_desc)]; \ + struct shash_desc *desc = (struct shash_desc *)___ ## desc ## _desc + +#endif /* _LINUXKPI_CRYPTO_HASH_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/socket.h b/sys/compat/linuxkpi/common/include/linux/socket.h index 3afb9bdfe3ba..8818971fa4c7 100644 --- a/sys/compat/linuxkpi/common/include/linux/socket.h +++ b/sys/compat/linuxkpi/common/include/linux/socket.h @@ -33,6 +33,17 @@ #include +#define AF_QIPCRTR 42 + +static inline int +kernel_connect(int sd, struct sockaddr *sa, size_t salen, int flags) +{ + + /* kern_connectat()? It is used for sockaddr_qrtr by ath1xk/qmi. */ + pr_debug("%s: TODO\n", __func__); + return (-EINVAL); +} + #ifdef notyet static inline int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len) From nobody Mon Jun 26 12:08: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 4QqRT85q5Cz4k6hm; Mon, 26 Jun 2023 12:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT84nPKz3jV0; Mon, 26 Jun 2023 12:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2znRkJeGDGknUATd4uPaeU+QxQRuoyGRDZ3J6pjLSRk=; b=SiZBBnUlSPJUGiU9QUXg8ls4y2hOJnMgPd5WXP/gLfhs78B6USSSy2sTGkhWo5WJHzIauJ pXjcvsCQTccO9FBEH7KtbHw7ge/E51wR9pSByHyy7xgX9KskJcqa6qyrBkQOJ4MiqAfdgW YIfXYLq9KeYNG44EbErGqP/djXzYcRs179ktqp0oPgS2aieaNg+AEeYyKdQU1cuFfCGwy+ aA1elMlTxZ3DNuG89G8/BPVCOr7/UKaV3z2rYQBG/IyndQZPwHkY5VkXEMEnyNvwtU0ys7 K1F/PT96vRoYwHVSBonFHE2dccZ/3f/v/Fl4E5b1Aq6YrHWvQg6fBSEKG9ifyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2znRkJeGDGknUATd4uPaeU+QxQRuoyGRDZ3J6pjLSRk=; b=kBx1OLamLHTpUBCIeS82Wd7g61WttSvMJudezPzDcCEgAZXyKOVAqmdT8Fsij1nW+YEWLl g0EZcpm+fRv5GqbYFe4b29/bDB66OfMrYSEGHXwnpZTRbkMVNii+q3uTIxslW6b8Bvyj5L mD2vP8c1eE9tE+l1VrQdOtQtkpT80aXaSF5yl9fS7utQs8eaJrbSLYRwBD2gosX5hmZqkv SiPykmoEbk8Ie6vmGZfQ5BDdLyyoCp1fsLOvJU8285Fj7rugZhcLsGg4OAlBnIMx9t2mt9 VG1R0cRg1Y+UAlNfF5y98xM5RbGAMKz68+1HvjNX4FiSsab3e2oIxSxZmWZO/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781324; a=rsa-sha256; cv=none; b=vXXvZl/ujR9wppiaV/VYw3RQ/3sBcljgkdcTYSzgzFKlK6HjDcruvRG3F/1f4ivpxLNA9+ vlVBySnf8pzSeuA7jO40X2mXdteBcOATjfaUkQzaUgfxqoMciz1jIs2bzDfRNMN5MLHAkf yGMp8aFBCz5pTQYDhyjyr9EPfYAxnHbrzuc+DLyruQnCfRffOoMu/6nCk1YG3WN2sDxomm f+CslDoVA78hq6N5l5dzbhMfuhP8oCCLgib74ujRUQIPbry7CA/s++kj9VxD4oHNnAgAoc BTPtC/EVP7GWZjGn9LW0fOKsF+MVDDzc0kDDwnYGFcCUqfIturCXoApB8Ova9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT83rGPz17ZV; Mon, 26 Jun 2023 12:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8itY083232; Mon, 26 Jun 2023 12:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8ijh083229; Mon, 26 Jun 2023 12:08:44 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:44 GMT Message-Id: <202306261208.35QC8ijh083229@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: 6427092f1a09 - stable/13 - LinuxKPI: add ptp_clock_kernel.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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6427092f1a093640850b1ffe8e87ca80389f4d4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6427092f1a093640850b1ffe8e87ca80389f4d4d commit 6427092f1a093640850b1ffe8e87ca80389f4d4d Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 21:24:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:14:36 +0000 LinuxKPI: add ptp_clock_kernel.h Add the new ptp_clock_kernel.h with structs and dummy functions for kernel ptp support. This is needed for the next iwlwifi update. Sponsored by: The FreeBSD Foundation (cherry picked from commit 972bf40b62f7de0a4c652e4577c551200dfe45a5) --- .../common/include/linux/ptp_clock_kernel.h | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h b/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h new file mode 100644 index 000000000000..b7b0bac0607e --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software was developed by Björn Zeeb 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. + * + * $FreeBSD$ + */ + +#ifndef _LINUXKPI_LINUX_PTP_CLOCK_KERNEL_H +#define _LINUXKPI_LINUX_PTP_CLOCK_KERNEL_H + +#include +#include +#include /* pr_debug */ +#include /* system_device_crosststamp */ + +/* This very likely belongs elsewhere. */ +struct system_device_crosststamp { + ktime_t device; + ktime_t sys_realtime; + ktime_t sys_monotonic_raw; /* name guessed based on comment */ +}; + +struct ptp_clock_info { + char name[32]; + int max_adj; + void *owner; /* THIS_MODULE */ + int (*adjfine)(struct ptp_clock_info *, long); + int (*adjtime)(struct ptp_clock_info *, s64); + int (*getcrosststamp)(struct ptp_clock_info *, struct system_device_crosststamp *); + int (*gettime64)(struct ptp_clock_info *, struct timespec *); +}; + +static inline struct ptp_clock * +ptp_clock_register(struct ptp_clock_info *ptpci, struct device *dev) +{ + + pr_debug("%s: TODO\n", __func__); + return (NULL); +} + +static inline void +ptp_clock_unregister(struct ptp_clock *ptpc) +{ + pr_debug("%s: TODO\n", __func__); +} + +static inline int +ptp_clock_index(struct ptp_clock *ptpc) +{ + pr_debug("%s: TODO\n", __func__); + return (0); +} + +#endif /* _LINUXKPI_LINUX_PTP_CLOCK_KERNEL_H */ From nobody Mon Jun 26 12:08: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 4QqRTB22cZz4k6sg; Mon, 26 Jun 2023 12:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRT95wm0z3jKh; Mon, 26 Jun 2023 12:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b52qBV2HOi8uR8GLkry2HxnyDEbvWkHM9yGCxJKCP2c=; b=pkiI/U1MTgwJCfJmR1NbAom0Cn8lXDq/AMqY41c3i+tCDdZncuz4/VtczV3ngnUkX1IbWp rtWPxdamW4CnyoRAbdK3F70Nd9F/50vkF6hIlYAEhBHxkhViSfp7Kz7ce0nWI2V47gALVf zX0X3uFNv8t/XPcqidvRg2fyoisyyOzUx/J5vjfuB21Xsq1POHuH9CuSzaJonCr9YK4NhH IlSP1CFHLwJc2DeIdI3A2cE6Jtbx0qb0pmkPvs3WF+m4DMSoS+9HBQA83ySZqqtKRi5B7p +TcS35C9TRNdU1d3iEGLE5Eo45auj8JytLjz7vdZx4ksvKixZOoJ2UPUP6v8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b52qBV2HOi8uR8GLkry2HxnyDEbvWkHM9yGCxJKCP2c=; b=Dl3P37cLRCkgFQ4Ml5vYppA82dlUZxYkSbJd3AbcHmhAHc/IqLM7qFYRQxZ381b0wPnwYl FZM/Kowean/8FKEWdnxjzBPwXAbvzMS81DyLpwwuXvJ2oGD8d3BGb3mYzCN7gxfsYHbA3F Ay9YCbZFHPuMXMtPV1z1afvMDyXeQ0rzQIQtGfry7dfzWT7NIYFuQB37BlgZJH55HyCQVD 8Z0YMDqEXkggrt+FjPxTp301MN/5ozG2KZvm6/SfO3qhg8aqPyIMkhrXBCkOAH8IKgHGWx OZTsgcBkReJvGdmtT2hHO34N4GYyRbSz2IfGwkfLL0eujXf6t9yctg8JOm+6/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781325; a=rsa-sha256; cv=none; b=TqN5TYsnwSf+uQgPB+6FWJOFag2O37FTGyhSKwmTio7PfyVKJFOWBKCY2+7hv157aE0esr 7VJRV6pQto199oZhRfTXQOtH3feNxZY3tUe6gXcUw43ggHsKrmoaDX6gG//O0N9DYDChlF nI+Dib8cX/N4M/PP00f9EC/6/KRkJwfp6548+RCrnPHzBpE3yS5J7bO6JJE0tP770spK5P YHHnzET8lrnJPpFV+EcVtly4Sks/+1r5gIkKm3g71bxGcAG0FuBMBO3BHmKGvJvhJgMdq9 uJ5K8Tkg2hKjstVM1VXrDY0p+kWUnxb/2IJAi0oMcBNWx+WBjYToZdX9UmIeDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRT94y63z18Lb; Mon, 26 Jun 2023 12:08:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8jHF083266; Mon, 26 Jun 2023 12:08:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8jvF083265; Mon, 26 Jun 2023 12:08:45 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:45 GMT Message-Id: <202306261208.35QC8jvF083265@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: b30d9f2e5204 - stable/13 - LinuxKPI: skbuff.h: add more (skeleton) functions used by wireless drivers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: b30d9f2e5204b475cf79150542b758c3dab14e70 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b30d9f2e5204b475cf79150542b758c3dab14e70 commit b30d9f2e5204b475cf79150542b758c3dab14e70 Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 21:22:34 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:15:20 +0000 LinuxKPI: skbuff.h: add more (skeleton) functions used by wireless drivers Add a dummy skb_hwtstamps() function for now, and implement skb_mac_header(), skb_reset_mac_header(), and skb_set_mac_header(). Add a dummy implementation of skb_get_hash() until we'll hit and implement it. Add napi_build_skb() and skb_mark_for_recycle(). Sponsored by: The FreeBSD Foundation (cherry picked from commit 262c5e81937ff1682632f33e92c3e42bc92e5a77) (cherry picked from commit 369264acf7d2a317383599141ab2f36ee3d2130c) (cherry picked from commit 1213a6bea8a16dc797efea5a7ed7d6a4d7cb4675) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 60 ++++++++++++++++++++--- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index fca161537837..8d4fefdb1a2b 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2020-2022 The FreeBSD Foundation - * Copyright (c) 2021-2022 Bjoern A. Zeeb + * Copyright (c) 2020-2023 The FreeBSD Foundation + * Copyright (c) 2021-2023 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -46,6 +46,7 @@ #include #include #include +#include /* #define SKB_DEBUG */ #ifdef SKB_DEBUG @@ -85,6 +86,10 @@ enum sk_buff_pkt_type { PACKET_OTHERHOST, }; +struct skb_shared_hwtstamps { + ktime_t hwtstamp; +}; + #define NET_SKB_PAD max(CACHE_LINE_SIZE, 32) struct sk_buff_head { @@ -154,6 +159,7 @@ struct sk_buff { uint16_t _flags; /* Internal flags. */ #define _SKB_FLAGS_SKBEXTFRAG 0x0001 enum sk_buff_pkt_type pkt_type; + uint16_t mac_header; /* offset of mac_header */ /* "Scratch" area for layers to store metadata. */ /* ??? I see sizeof() operations so probably an array. */ @@ -928,22 +934,38 @@ skb_header_cloned(struct sk_buff *skb) } static inline uint8_t * -skb_mac_header(struct sk_buff *skb) +skb_mac_header(const struct sk_buff *skb) { SKB_TRACE(skb); - SKB_TODO(); - return (NULL); + /* 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) +{ + SKB_TRACE(skb); + skb->mac_header = skb->data - skb->head; } static inline void -skb_orphan(struct sk_buff *skb) +skb_set_mac_header(struct sk_buff *skb, const size_t len) +{ + SKB_TRACE(skb); + skb_reset_mac_header(skb); + skb->mac_header += len; +} + +static inline struct skb_shared_hwtstamps * +skb_hwtstamps(struct sk_buff *skb) { SKB_TRACE(skb); SKB_TODO(); + return (NULL); } static inline void -skb_reset_mac_header(struct sk_buff *skb) +skb_orphan(struct sk_buff *skb) { SKB_TRACE(skb); SKB_TODO(); @@ -1024,6 +1046,30 @@ napi_consume_skb(struct sk_buff *skb, int budget) SKB_TODO(); } +static inline struct sk_buff * +napi_build_skb(void *data, size_t len) +{ + + SKB_TRACE(skb); + SKB_TODO(); + return (NULL); +} + +static inline uint32_t +skb_get_hash(struct sk_buff *skb) +{ + SKB_TRACE(skb); + SKB_TODO(); + return (0); +} + +static inline void +skb_mark_for_recycle(struct sk_buff *skb) +{ + SKB_TRACE(skb); + SKB_TODO(); +} + #define SKB_WITH_OVERHEAD(_s) \ (_s) - ALIGN(sizeof(struct skb_shared_info), CACHE_LINE_SIZE) From nobody Mon Jun 26 12:08: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 4QqRTC2YK8z4k6yB; Mon, 26 Jun 2023 12:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRTB6dr2z3jd4; Mon, 26 Jun 2023 12:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6fAfEsTwkalP7LuuHb+0VHhDFh1jpE9ewoeBnX4Z10=; b=oS0GoJbeJ/HSktyABjZwic20TeJkxHnmhY5z+qE4uO79XNuaF7USIK4/ER+CvADuTU4OO8 5QFxwOA4Ltjnv3hINkBmChtmPlMusbGtXPFj+AmmpHqA5CB61uVMUDR9XJa0cnhjWTyFza 8cHAuJm/+XaaDzY3vQG4+up8wQltola452XEyfXKAfO9v6IbsVnqi/n/SsMk4Ibmm15XmD jwK9y2lmiS2SgRZmDQuTQcKloqiA64osAeoCMY80AuSDcpHchYDl2UYsNRMrDbbkLCgSjp 7mxoZo6/ZcJtGEGOkHZbzp0coPjh7aLBtXrTjHu6hUDgWAjDowQxfBrGX8SaDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B6fAfEsTwkalP7LuuHb+0VHhDFh1jpE9ewoeBnX4Z10=; b=pA51iE28hUxuCWi3chkUMVZqvApsUzaxNY/i+f6UUBqNXldzTeWFhz9EmbjOk6sFTw2QFw w/RSkxa83k1FYK97qUOdZayziJVrEeHWGVK/KSsIM32Y1P2v5sscCOXzQ/A/OVYhIxsA52 iQyrZC02Lj2nl7xl1KpEoFRimT7knxcPYFqon06ERkJqaAhtSVpeo/3CFwr4U7yVip1oyP I1Mj22urVgReHwXGF3BO2kmcE0qO04o6XxQQymLsAYLWM/Sx1JKtd1ht+4QBh584knPAvT VOU9nh0P5HnykhC6w9lQDa70snq7PwD4U5RGcUyBMTkcIDwyucUkEbRsRT1nIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781326; a=rsa-sha256; cv=none; b=uChzlqXszdW3xvFAj+gvUTJuhKB/RcX7QmrktXbkS9Em8wQ2DARyEP809kzqqkH6+5cKWf kITO/3hzDo0cf6YeIVBZE10/behsBSu21tpytATxFo0W8dDZtBJ72ZIct0Ly8Xryf1mHvN Npdy8bO2BAl4FLTwD+LLUxt7SS/t90b7N4MmjNJQFibpVzhzTuy7kKO7eypUKsTs3br9O9 EEugpJNt41cF/ycSu/cw+kRaGjeEvx+AAkT/q7IYd3RXSTn/3i7sH/HzuoI0/jjQ6lIVz9 td0fVlzNQwHNl/rzMCG5S4cr61ZYcvyB9/45WesslUxOZo9AV+BtfDukSAri2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTB5lqKz18Ws; Mon, 26 Jun 2023 12:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8kj9083285; Mon, 26 Jun 2023 12:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8kN2083284; Mon, 26 Jun 2023 12:08:46 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:46 GMT Message-Id: <202306261208.35QC8kN2083284@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: de3045f3f955 - stable/13 - LinuxKPI: add ns_to_timespec64() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: de3045f3f95565278ae0ce1dcda0a2677c894edc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de3045f3f95565278ae0ce1dcda0a2677c894edc commit de3045f3f95565278ae0ce1dcda0a2677c894edc Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 21:00:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:17:28 +0000 LinuxKPI: add ns_to_timespec64() Add ns_to_timespec64() which does not seem to require anything from us given timespec64 is aliases to timespec. Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40123 (cherry picked from commit 71fde8e5070c4128e35acdb7f69a01460bce4638) --- sys/compat/linuxkpi/common/include/linux/time.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/time.h b/sys/compat/linuxkpi/common/include/linux/time.h index 2b69ec46935c..59a78887c7e3 100644 --- a/sys/compat/linuxkpi/common/include/linux/time.h +++ b/sys/compat/linuxkpi/common/include/linux/time.h @@ -119,6 +119,8 @@ ns_to_timespec(const int64_t nsec) return (ts); } +#define ns_to_timespec64(_x) ns_to_timespec(_x) + static inline int timespec_valid(const struct timespec *ts) { From nobody Mon Jun 26 12:08: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 4QqRTD2dJLz4k6st; Mon, 26 Jun 2023 12:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRTD0W4wz3jgj; Mon, 26 Jun 2023 12:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ljpnzsmSlYEMqXDF7S8xFOJaQap9TW67LndjXiql+o=; b=Wlwy4GO+wuaQzWPqAZo4mqLf6gnkUEcQNXyzrwzR5Sp7Eq4Q+rhWG4wTtTGT1bqvkRVRDU fgAXZHvkk7ip6KalvHV7L0nkUBRmnblVuDOtiDKqOmdeSkUxsAF3cukodfGMps3MryfCH3 rwUiobL6OSileC0Ozaltqk/l9WKDxKxG3mqaXOkLr24RoCViVkBFDMEx486i1lL5kMAZ5U 5A3bWaIZM6DDVPxQi6fd/BqUAR25+IEaFmNExYx6vfWb512rEiDuXt7usAsHQURtWWl35C lBpxgt5d/FM58kwTdOxA1+yhaG93bEDtZ25SG61t+o4K3SkwBqBxEXJGdxfXSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ljpnzsmSlYEMqXDF7S8xFOJaQap9TW67LndjXiql+o=; b=d9PqqxJJmoe7znqGWsAJB7UPYci4Dsm6vIm/vOXh7sEUgCP2QcW7Q1K3K6Sy8bWGhp6TAV 7ZZ1G9pdAbYg//fupRdUPun3NiDNE0NO4GGWenZCDoLrkDWdNEj0Yj1EwmCtwDivXDfVQf 9M3Nk3aotLfkJXmyBYE5tMj+uKB102bVfPXEh1M689XxeovFngMko0amGoLiIJy6U9VhV0 0edska1LOfI6eS4QVLkBif5F3mozqpe930PbVEjH6go+CMkYDLIjZbXdl4zj9HlegUzxBO GCGK+illE5bumfCGquwlKVZB0K/LQtvutjgCSxpKgbA6RU+B0Oq2gxZGz7zebA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781328; a=rsa-sha256; cv=none; b=ILTBu1yJVKcxTs1z+tDdjzpgtTRDIW1Utcl7+dJLSTGd229/qwkI09ylmrYJ4YlHxAs3IC nzC8qByHtrtxFE/T0KBicqNVz5vA+tUN2doHwGXDwa1QR4Hc5aiJFTyDTD29C7BsoQTY5g RZbolRpC6WX6N2e4Cjl3BmofMh5cKDcUEF6JOo16jWY2COKHnB/KJBaeZNoOY2yQZdzfhA FzXu+xH4GTO0KYdGski8E3k70QZcInNw2EygSqvTHPEvmpKQEMlveKJOfpQpDn0DPtQzN8 ys7ZtemuYsufZc8Ql9UfE1CiG0JAudQHYqcjZAGTzby20Rpa7BOzBeCFZp0zIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTC6kwMz17db; Mon, 26 Jun 2023 12:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8ltS083307; Mon, 26 Jun 2023 12:08:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8lMc083306; Mon, 26 Jun 2023 12:08:47 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:47 GMT Message-Id: <202306261208.35QC8lMc083306@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: d5881640664c - stable/13 - LinuxKPI: add put_unaligned_le16() and get_unaligned_be64() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: d5881640664cf8740b48888397b90eae32f4fd01 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d5881640664cf8740b48888397b90eae32f4fd01 commit d5881640664cf8740b48888397b90eae32f4fd01 Author: Bjoern A. Zeeb AuthorDate: 2023-05-20 00:52:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:17:32 +0000 LinuxKPI: add put_unaligned_le16() and get_unaligned_be64() Add the two new functions needed by wireless drivers by the same implementation pattern we did for different sizes. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40174 (cherry picked from commit ae1e336e05171b80123bf6db7457f19c174accc4) --- sys/compat/linuxkpi/common/include/asm/unaligned.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/asm/unaligned.h b/sys/compat/linuxkpi/common/include/asm/unaligned.h index 8a001ec38c3d..c13089b2c5f4 100644 --- a/sys/compat/linuxkpi/common/include/asm/unaligned.h +++ b/sys/compat/linuxkpi/common/include/asm/unaligned.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 The FreeBSD Foundation + * Copyright (c) 2020,2023 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -50,6 +50,15 @@ get_unaligned_le32(const void *p) return (le32_to_cpup((const __le32 *)p)); } +static __inline void +put_unaligned_le16(__le16 v, void *p) +{ + __le16 x; + + x = cpu_to_le16(v); + memcpy(p, &x, sizeof(x)); +} + static __inline void put_unaligned_le32(__le32 v, void *p) { @@ -82,4 +91,11 @@ get_unaligned_be32(const void *p) return (be32_to_cpup((const __be32 *)p)); } +static __inline uint64_t +get_unaligned_be64(const void *p) +{ + + return (be64_to_cpup((const __be64 *)p)); +} + #endif /* _LINUXKPI_ASM_UNALIGNED_H */ From nobody Mon Jun 26 12:08: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 4QqRTF31Lxz4k6r9; Mon, 26 Jun 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 4QqRTF1p8pz3jSJ; Mon, 26 Jun 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=1687781329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVouI6fmXT3G6+lYQpGybjSvpZ1ckAoI/53ifnzxWvs=; b=i49/+8et+4gCakyq4uUNZm6VLJQ4ZxOLDhH2iu2S8Zplg5jHs9JGt8LPxLu53Dtgerxa58 Hh0dqtbYV+4FmtIpjKJBVABP9+hnTU/8edBKg4QhTzbRHXyHhInko8ppYYD660dqzKd2P4 e3xVGOapfPIqcQDPuwbJhGKHuL1wEUdyYfUL+Gnn47tigYGVNaVrCtxviGtDOHviw2bq6u me0MyBkInTuq3h0nUyaZMYvutWQLW8UxHqmbR1jMQ7V9Qc+bgDZMWnK/tUVEs6B0aBjFxH rrIvvSv4fRLKNYTwg9CJHAHeT5oxzMJxkGWZcgRKOvDkQvW6/7d4+TWB4U0xJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVouI6fmXT3G6+lYQpGybjSvpZ1ckAoI/53ifnzxWvs=; b=BbhWCHAJy+jVhtLgEyGd7F2WuenBzJrxSg4DV7dB5kWzGMbHHvexbq0mVzyf0vVn3COlOH 6vstlFJKSVI5UxgCw6Kc/92pyqO1KhDPZJQMKqMpMBM2Eb/jWAt334sD6if6+WPeRgDQc6 cUIUTouz5gMgxaJpOas/gnIX+JaMacjjJjrfM1cNnFWMpBA/StgF/rH63FFR4/eK81Ug7W 7SR+uoSUPkalssAPRauX1WDuxOISgiP6QD/ThAjjoidgH8SAwiPez1SdLfhlGmSsPcch7T RyrYmIB2TY94pL7HgbXhcHNhYPFBIxQinLpzhO4fXG+RP0BpLI2Au4hgbWweXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781329; a=rsa-sha256; cv=none; b=KdIOsVL1mF3pM9vokbjFTqBnZb6vZiukk09yTcGRumaegFm24XCu/u5rczwI8tCRcGme9f FBQh2MPgS8Oea1tct+V7ch6/t8irp/AAXThmuOP8aNXa3TyZBP4V4EXoyhLQqxczwWYDXe pDFOB0/rtn4DCNRXKrf1R3vi3E5iI6CJHhAOXj0blsMdHpLMGtUo9n9kQMEOpgkrlgLieV jmNfIgG6ZFmhQuRRdU8QAmHLQYXnvYD14J9hlHpHuetpTTB0FkJkKHVSIr5FRvjMOpHuLM wMZRlYwPo1zVz0C5aPzN3qpKUtVxwsS5jK1k5rG9/oA6Fq8txmZ/U0w/VOAtuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTF0csZz18Cl; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8m9U083326; Mon, 26 Jun 2023 12:08:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8mZK083325; Mon, 26 Jun 2023 12:08:48 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:48 GMT Message-Id: <202306261208.35QC8mZK083325@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: 41ca81606eb5 - stable/13 - LinuxKPI: netdevice: add dev_set_threaded() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 41ca81606eb512990f377c9156e9b5c650c29f3d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=41ca81606eb512990f377c9156e9b5c650c29f3d commit 41ca81606eb512990f377c9156e9b5c650c29f3d Author: Bjoern A. Zeeb AuthorDate: 2023-05-20 00:51:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:17:39 +0000 LinuxKPI: netdevice: add dev_set_threaded() Add dev_set_threaded() to the dummy functions of netdevice.h in order to keep an upcoming wireless driver compiling. While here also update the name of a function argument for consistency. (cherry picked from commit 6153bef9ec961786d79c52e51c6908324661e26e) --- sys/compat/linuxkpi/common/include/linux/netdevice.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index 8653b5df68bd..64441999538f 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h @@ -342,12 +342,20 @@ ether_setup(struct net_device *ndev) } static __inline void -dev_net_set(struct net_device *dev, void *p) +dev_net_set(struct net_device *ndev, void *p) { pr_debug("%s: TODO\n", __func__); } +static __inline int +dev_set_threaded(struct net_device *ndev, bool threaded) +{ + + pr_debug("%s: TODO\n", __func__); + return (-ENODEV); +} + /* -------------------------------------------------------------------------- */ static __inline bool From nobody Mon Jun 26 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 4QqRTH0Pm7z4k6nc; Mon, 26 Jun 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 4QqRTG4Trzz3jSs; Mon, 26 Jun 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=1687781330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l7gQCamSAEpUPzZ5U0YL1DWRctnr3lYkfZAke0nEfu0=; b=oIxwFOt8Tes96bJVIykb3KFrqdH5EodCpKnuoKHYP/mXnRXECxUOFTuHj8P5EyNKgJwS+5 ssR6x5uMkKJe8bBX24m+2EvYkDOnc287ah8ly8h1WgKFxsnSGvOvoIREFAFX41Uy4I2Ms6 FBPskO/pKEJ4DEnYpzdDVbjGinprr/2gAiZ4WwRbXnufcK4nwaFj+dIZ34AeeizSwnDLeF xKNcMM6v91GFV4QlHpokoIrtE4R4IebF2zNFbLdT+eT66K//nY2AzvOmn70ox7RNhUkswb UohJYYSb0hwBwv0Hq81NKxxEnCvEwfDdOCEHtB+6sRdlzeRmTuMDRkNkXf5vfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l7gQCamSAEpUPzZ5U0YL1DWRctnr3lYkfZAke0nEfu0=; b=YJL8oL60nfZRyfriHEXwp29Yxr/7tqM/N34dSSrjjCPOYHxyDE9lt8J2mMGqvt3hbBy0+9 eAMWXXuiMuXh0dcc8qpkyJ7CkEAVT9/XxSnN8l9sDqRYCygj1Iurq9ao7Tsz75nwLFqQ5c 0wZZyFMQpYJ/e2j3OBpbfQBXvqWZWCQLgh/mYO6K5UMCeLOzE5k8kr1dgqKP4GFx9mDEyu ag7evVBThS8iHLP0Yu2VIFPtcJI/lyYojZvWIXaHZbCzaGoI/HSrD8UxlP6xPk/3Z8zkSA s9KnPPs2DnOodhornjwuJQzTwrfooi0d7s9GPk6X2KF66tuBP1wh5OyjAmw9Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781330; a=rsa-sha256; cv=none; b=qUGr6LqLfWjsHlBghkvhUsBUz6cPtfxaT4NgDe/+FErzwy6+O4co8gQ3Jtt1WHRjLG3fPs k0Fq5pjPrgw/HBG0JkVSQGLi3BbUN0K+F3HGgQcIstYhZm62KXe0R4hHP9mHC4/X8Z6TNx i8wXKSPFBpf7a2seZgtwEd/VrJ8I9/hZb9lksZzGKQibwMadyhi5DzuzrtTtbOZODbxDeN PYbYBy4jGPhvMIkbJmsfZpkRRgaSyAsDsMjzKDRZm+Qu80jFXkHbgoBWb0El2N6URasX8N heNLs55oObZHh4rPBAcOcyrEzwcBnLvD2orApUekB50tZAuUeIAvwj/XgTFuHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTG1D71z18Ct; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8o2L083345; Mon, 26 Jun 2023 12:08:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8odM083344; Mon, 26 Jun 2023 12:08:50 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:50 GMT Message-Id: <202306261208.35QC8odM083344@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: adc27210ecb4 - stable/13 - ath10k: ath11k: add specific LinuxKPI 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: adc27210ecb4d0c6d452a80ade7431c234320d7c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=adc27210ecb4d0c6d452a80ade7431c234320d7c commit adc27210ecb4d0c6d452a80ade7431c234320d7c Author: Bjoern A. Zeeb AuthorDate: 2023-04-18 20:21:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:18:50 +0000 ath10k: ath11k: add specific LinuxKPI support Add files needed by ath1?k drivers to linuxkpi/linuxkpi_wlan. This contain (skeleton) implementations of what is needed to compile but specifically mhi/qmi/qrtr will need more work for ath11k. (cherry picked from commit 06a1103fe38677ba6213cae321255f53e9476dcd) (cherry picked from commit 047298203fc3bc2b290f44b9531a7b7d553fe9b7) (cherry picked from commit bee50f894b9e0b51668c83e24bf2ec7c275725eb) --- sys/compat/linuxkpi/common/include/linux/mhi.h | 222 +++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/qrtr.h | 41 ++++ .../linuxkpi/common/include/linux/soc/qcom/qmi.h | 175 ++++++++++++++++ sys/compat/linuxkpi/common/src/linux_mhi.c | 94 +++++++++ sys/conf/files | 2 + sys/modules/linuxkpi_wlan/Makefile | 3 + 6 files changed, 537 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mhi.h b/sys/compat/linuxkpi/common/include/linux/mhi.h new file mode 100644 index 000000000000..5f59db81a6db --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/mhi.h @@ -0,0 +1,222 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022-2023 Bjoern A. Zeeb + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUXKPI_LINUX_MHI_H +#define _LINUXKPI_LINUX_MHI_H + +#include + +/* Modem Host Interface (MHI) */ + +/* XXX FIXME */ +#define MHI_DB_BRST_DISABLE 0 +#define MHI_ER_CTRL 0 + +enum mhi_callback { + MHI_CB_SYS_ERROR, + MHI_CB_BW_REQ, + MHI_CB_EE_MISSION_MODE, + MHI_CB_EE_RDDM, + MHI_CB_FATAL_ERROR, + MHI_CB_IDLE, + MHI_CB_LPM_ENTER, + MHI_CB_LPM_EXIT, + MHI_CB_PENDING_DATA, +}; + +struct mhi_channel_config { + const char *name; + int auto_queue, dir, doorbell, doorbell_mode_switch, ee_mask, event_ring, lpm_notify, num, num_elements, offload_channel, pollcfg; +}; + +struct mhi_event_config { + int client_managed, data_type, hardware_event, irq, irq_moderation_ms, mode, num_elements, offload_channel, priority; +}; + +struct mhi_device { +}; + +struct mhi_controller_config { + const struct mhi_channel_config *ch_cfg; + struct mhi_event_config *event_cfg; + + int buf_len, max_channels, num_channels, num_events, use_bounce_buf; + + uint32_t timeout_ms; +}; + +struct mhi_controller { + struct device *cntrl_dev; + struct mhi_device *mhi_dev; + void *regs; + int *irq; + const char *fw_image; + + bool fbc_download; + size_t rddm_size; + size_t sbl_size; + size_t seg_len; + size_t reg_len; + int nr_irqs; + unsigned long irq_flags; + uint32_t timeout_ms; + + dma_addr_t iova_start; + dma_addr_t iova_stop; + + int (*runtime_get)(struct mhi_controller *); + void (*runtime_put)(struct mhi_controller *); + void (*status_cb)(struct mhi_controller *, enum mhi_callback); + int (*read_reg)(struct mhi_controller *, void __iomem *, uint32_t *); + void (*write_reg)(struct mhi_controller *, void __iomem *, uint32_t); +}; + +/* -------------------------------------------------------------------------- */ + +struct mhi_controller *linuxkpi_mhi_alloc_controller(void); +void linuxkpi_mhi_free_controller(struct mhi_controller *); +int linuxkpi_mhi_register_controller(struct mhi_controller *, + const struct mhi_controller_config *); +void linuxkpi_mhi_unregister_controller(struct mhi_controller *); + +/* -------------------------------------------------------------------------- */ + +static inline struct mhi_controller * +mhi_alloc_controller(void) +{ + + /* Keep allocations internal to our implementation. */ + return (linuxkpi_mhi_alloc_controller()); +} + +static inline void +mhi_free_controller(struct mhi_controller *mhi_ctrl) +{ + + linuxkpi_mhi_free_controller(mhi_ctrl); +} + +static inline int +mhi_register_controller(struct mhi_controller *mhi_ctrl, + const struct mhi_controller_config *cfg) +{ + + return (linuxkpi_mhi_register_controller(mhi_ctrl, cfg)); +} + +static inline void +mhi_unregister_controller(struct mhi_controller *mhi_ctrl) +{ + + linuxkpi_mhi_unregister_controller(mhi_ctrl); +} + +/* -------------------------------------------------------------------------- */ + +static __inline int +mhi_device_get_sync(struct mhi_device *mhi_dev) +{ + /* XXX TODO */ + return (-1); +} + +static __inline void +mhi_device_put(struct mhi_device *mhi_dev) +{ + /* XXX TODO */ +} + +/* -------------------------------------------------------------------------- */ + +static __inline int +mhi_prepare_for_power_up(struct mhi_controller *mhi_ctrl) +{ + /* XXX TODO */ + return (0); +} + +static __inline int +mhi_sync_power_up(struct mhi_controller *mhi_ctrl) +{ + /* XXX TODO */ + return (0); +} + +static __inline int +mhi_async_power_up(struct mhi_controller *mhi_ctrl) +{ + /* XXX TODO */ + return (0); +} + +static __inline void +mhi_power_down(struct mhi_controller *mhi_ctrl, bool x) +{ + /* XXX TODO */ +} + +static __inline void +mhi_unprepare_after_power_down(struct mhi_controller *mhi_ctrl) +{ + /* XXX TODO */ +} + +/* -------------------------------------------------------------------------- */ + +static __inline int +mhi_pm_suspend(struct mhi_controller *mhi_ctrl) +{ + /* XXX TODO */ + return (0); +} + +static __inline int +mhi_pm_resume(struct mhi_controller *mhi_ctrl) +{ + /* XXX TODO */ + return (0); +} + +static __inline int +mhi_pm_resume_force(struct mhi_controller *mhi_ctrl) +{ + /* XXX TODO */ + return (0); +} + +/* -------------------------------------------------------------------------- */ + +static __inline int +mhi_force_rddm_mode(struct mhi_controller *mhi_ctrl) +{ + /* XXX TODO */ + return (0); +} + +#endif /* _LINUXKPI_LINUX_MHI_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/qrtr.h b/sys/compat/linuxkpi/common/include/linux/qrtr.h new file mode 100644 index 000000000000..1d2af0efdce2 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/qrtr.h @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * 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 + * 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 _LINUXKPI_LINUX_QRTR_H +#define _LINUXKPI_LINUX_QRTR_H + +/* Qualcomm IPC Router (QRTR) */ + +#include + +struct sockaddr_qrtr { + sa_family_t sq_family; + uint32_t sq_node; + uint32_t sq_port; +}; + +#endif /* _LINUXKPI_LINUX_QRTR_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h b/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h new file mode 100644 index 000000000000..63e0cd3e45fc --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h @@ -0,0 +1,175 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022-2023 Bjoern A. Zeeb + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUXKPI_LINUX_SOC_QCOM_QMI_H +#define _LINUXKPI_LINUX_SOC_QCOM_QMI_H + +/* QMI (Qualcomm MSM Interface) */ + +#include + +enum soc_qcom_qmi_data_type { + QMI_EOTI, + QMI_DATA_LEN, + QMI_OPT_FLAG, + QMI_UNSIGNED_1_BYTE, + QMI_UNSIGNED_2_BYTE, + QMI_UNSIGNED_4_BYTE, + QMI_UNSIGNED_8_BYTE, + QMI_SIGNED_4_BYTE_ENUM, + QMI_STRUCT, + QMI_STRING, +}; + +#define QMI_RESULT_SUCCESS_V01 __LINE__ +#define QMI_INDICATION __LINE__ + +struct qmi_handle; + +enum soc_qcom_qmi_array_type { + NO_ARRAY, + STATIC_ARRAY, + VAR_LEN_ARRAY, +}; + +/* Should this become an enum? */ +#define QMI_COMMON_TLV_TYPE 0 + +struct qmi_elem_info { + enum soc_qcom_qmi_data_type data_type; + uint32_t elem_len; + uint32_t elem_size; + enum soc_qcom_qmi_array_type array_type; + uint8_t tlv_type; + uint32_t offset; + const struct qmi_elem_info *ei_array; +}; + +struct qmi_response_type_v01 { + uint16_t result; + uint16_t error; +}; + +struct qmi_txn { +}; + +struct qmi_service { + uint32_t node; + uint32_t port; +}; + +struct qmi_msg_handler { + uint32_t type; + uint32_t msg_id; + const struct qmi_elem_info *ei; + size_t decoded_size; + void (*fn)(struct qmi_handle *, struct sockaddr_qrtr *, struct qmi_txn *, const void *); +}; + +struct qmi_ops { + int (*new_server)(struct qmi_handle *, struct qmi_service *); + void (*del_server)(struct qmi_handle *, struct qmi_service *); +}; + +struct qmi_handle { + int sock; + + const struct qmi_msg_handler *handler; + struct qmi_ops ops; +}; + + +/* XXX-TODO need implementation somewhere... it is not in ath1xk* */ +extern struct qmi_elem_info qmi_response_type_v01_ei[]; + +static inline int +qmi_handle_init(struct qmi_handle *handle, size_t resp_len_max, + const struct qmi_ops *ops, const struct qmi_msg_handler *handler) +{ + + handle->handler = handler; + if (ops != NULL) + handle->ops = *ops; + + /* We will find out what else to do here. */ + /* XXX TODO */ + + return (0); +} + +static __inline int +qmi_add_lookup(struct qmi_handle *handle, uint32_t service, uint32_t version, + uint32_t service_ins_id) +{ + + /* XXX TODO */ + return (0); +} + +static __inline void +qmi_handle_release(struct qmi_handle *handle) +{ + + /* XXX TODO */ +} + +static __inline int +qmi_send_request(struct qmi_handle *handle, void *x, struct qmi_txn *txn, + uint32_t msd_id, size_t len, const struct qmi_elem_info *ei, void *req) +{ + + /* XXX TODO */ + return (-ENXIO); +} + +static __inline void +qmi_txn_cancel(struct qmi_txn *txn) +{ + + /* XXX TODO */ +} + +static __inline int +qmi_txn_init(struct qmi_handle *handle, struct qmi_txn *txn, + const struct qmi_elem_info *ei, void *resp) +{ + + /* XXX TODO */ + return (-ENXIO); +} + +static __inline int +qmi_txn_wait(struct qmi_txn *txn, uint64_t jiffies) +{ + + /* XXX TODO */ + return (-ENXIO); +} + +#endif /* _LINUXKPI_LINUX_SOC_QCOM_QMI_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_mhi.c b/sys/compat/linuxkpi/common/src/linux_mhi.c new file mode 100644 index 000000000000..fb68f1ef8305 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_mhi.c @@ -0,0 +1,94 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * 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 + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include /* pr_debug */ +#include + +static MALLOC_DEFINE(M_LKPIMHI, "lkpimhi", "LinuxKPI MHI compat"); + +struct mhi_controller * +linuxkpi_mhi_alloc_controller(void) +{ + struct mhi_controller *mhi_ctrl; + + mhi_ctrl = malloc(sizeof(*mhi_ctrl), M_LKPIMHI, M_NOWAIT | M_ZERO); + + return (mhi_ctrl); +} + +void +linuxkpi_mhi_free_controller(struct mhi_controller *mhi_ctrl) +{ + + /* What else do we need to check that it is gone? */ + free(mhi_ctrl, M_LKPIMHI); +} + +int +linuxkpi_mhi_register_controller(struct mhi_controller *mhi_ctrl, + const struct mhi_controller_config *cfg) +{ + + if (mhi_ctrl == NULL || cfg == NULL) + return (-EINVAL); + +#define CHECK_FIELD(_f) \ + if (!mhi_ctrl->_f) \ + return (-ENXIO); + CHECK_FIELD(cntrl_dev); + CHECK_FIELD(regs); + CHECK_FIELD(irq); + CHECK_FIELD(reg_len); + CHECK_FIELD(nr_irqs); + + CHECK_FIELD(runtime_get); + CHECK_FIELD(runtime_put); + CHECK_FIELD(status_cb); + CHECK_FIELD(read_reg); + CHECK_FIELD(write_reg); +#undef CHECK_FIELD + + printf("%s: XXX-BZ TODO\n", __func__); + return (0); +} + +void +linuxkpi_mhi_unregister_controller(struct mhi_controller *mhi_ctrl) +{ + + pr_debug("%s: TODO\n", __func__); +} diff --git a/sys/conf/files b/sys/conf/files index dc776d09abf5..74f331f1509e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4647,6 +4647,8 @@ compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_lock.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_mhi.c optional compat_linuxkpi wlan \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_netdev.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_page.c optional compat_linuxkpi \ diff --git a/sys/modules/linuxkpi_wlan/Makefile b/sys/modules/linuxkpi_wlan/Makefile index fccd1249bc72..ef86121366c3 100644 --- a/sys/modules/linuxkpi_wlan/Makefile +++ b/sys/modules/linuxkpi_wlan/Makefile @@ -5,6 +5,9 @@ KMOD= linuxkpi_wlan SRCS= linux_80211.c \ linux_80211_macops.c +# QCA ath11k support. +SRCS+= linux_mhi.c + SRCS+= opt_wlan.h SRCS+= ${LINUXKPI_GENSRCS} From nobody Mon Jun 26 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 4QqRTH5KgJz4k6t7; Mon, 26 Jun 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 4QqRTH2yN9z3jYq; Mon, 26 Jun 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=1687781331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e6FxtJNfwlV9yKlqfLw7Phu5XhABtT09qsrtGJhFl1g=; b=XoOEZsgUDjUrU7Ie/jd3ARzRAGJ1N9yeya4tbdCS4GUCLMKPGxkAoFN0J55NCjZrOtyyeP wZ0CgKwFrsG/7ItbAJroqLfTNd05xO2bawKFNUypqbN6Bg4wTUTmp7HBPXgbw4gvzC9YIM t8xYQwclysKKmLDJzqFVqQFd5JEb0KmgipVfgI8c+sIHyLrA9hdOae33ovYEX7niQVQWnP EmTjKQ2J77qf2EUNaWkG3nEInSqQcBGJx3XukFwQUTgkqXleLojlGN+oNGg3ku0ZgbKm/6 1v7u68U3aUaS6IRMNDwCgmDV/abzalpcnjlrPeMnLS+g4Ydy/0jes7fRmWaH4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e6FxtJNfwlV9yKlqfLw7Phu5XhABtT09qsrtGJhFl1g=; b=MCozWxL/A89D9oVWKI+zhWG50+D+CtsyCvPTgfMoGNuU62+85uLb05H06orpuBR8UUgBzY ywVt3LLayk1eRlbffYUUlilzwAqR/7doQBksJG9TWZCZOD7n3zZNuycwANL8e4jFV/6z6F xVYHLGOJrLduBLrR6DXCCe2X60b8G5UTY/fOot+ZmMdxivmBIhpDSoZGPW7+6ya9+z/Jrl +Z0bjDBssKoiBeaoa0RyS+KwqWoTx34Hblt/mR7/xMPvh5qOI6hRCqx6WqBlidKpVW5vA9 2+xJIbgxa/xSeVZzF/zOhbcOeToX/kMdz4//Sadaztg2mOSj/WdrUpGrP3gCYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781331; a=rsa-sha256; cv=none; b=AsAol50DY93Fj85Xt+hh4zbX9AD1sQijKPb/ub0dyL1RVjJX2uL7zLgALPuLT8i1eIl0Vp M8vhh99PILFUiwiJw0huZzN/Xa9z1FTNWYy3+GIWhDgSiRNVWCyakIhQDIDUtFgPag+/YC Y9TEatdl4LwyliNCwziNFUJHkYu8pPQmZa/nr0XriC6sClvGBc03LSnsKpgCGhyTwJDoVD jJ5UQdubdlGnB00go2KwVqRzcbPQmcHz8GuxzPBomPW+sh5rZyhuZ0m+EZOjqIwHX6sxm4 REDBU+KwqORaK8cg1MFSj5qpxywvaTRh35h+B34/ySTswtDWl/hs/RNBFBx8mQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTH1w1Bz18P0; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8pY1083371; Mon, 26 Jun 2023 12:08:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8pKa083370; Mon, 26 Jun 2023 12:08:51 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:51 GMT Message-Id: <202306261208.35QC8pKa083370@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: d6f5ea1dc1b3 - stable/13 - LinuxKPI: add further dummy header 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d6f5ea1dc1b32021fa623c27bfcfa17f9e4e2567 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d6f5ea1dc1b32021fa623c27bfcfa17f9e4e2567 commit d6f5ea1dc1b32021fa623c27bfcfa17f9e4e2567 Author: Bjoern A. Zeeb AuthorDate: 2023-05-20 00:41:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:19:17 +0000 LinuxKPI: add further dummy header files Wireless drivers try to include these files. Add them empty for no better reason yet. Sponsored by: The FreeBSD Foundation (cherry picked from commit b7afaf8a411a0536691feabb024ffd5afb579eb5) (cherry picked from commit 6a1c5037363aebd14333bb759237d2b19a1608d8) (cherry picked from commit ab55b58b5c515148e6ef65422c9fda17085f07cd) --- sys/compat/linuxkpi/dummy/include/linux/kstrtox.h | 0 sys/compat/linuxkpi/dummy/include/linux/of.h | 0 sys/compat/linuxkpi/dummy/include/linux/of_irq.h | 0 sys/compat/linuxkpi/dummy/include/linux/thermal.h | 0 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/linux/kstrtox.h b/sys/compat/linuxkpi/dummy/include/linux/kstrtox.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/of.h b/sys/compat/linuxkpi/dummy/include/linux/of.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/of_irq.h b/sys/compat/linuxkpi/dummy/include/linux/of_irq.h new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/compat/linuxkpi/dummy/include/linux/thermal.h b/sys/compat/linuxkpi/dummy/include/linux/thermal.h new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Mon Jun 26 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 4QqRTJ5TTKz4k6tD; Mon, 26 Jun 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 4QqRTJ4BkGz3jnX; Mon, 26 Jun 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=1687781332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Frss8uFL2JTLYyqqT6nKPxSYHrcmqTuKhqs1+S5ie1M=; b=jb6uLhfLq81pUJ69DJC0NrdNxgHskCu20tYOF+KSLb93F6mbrFREVG050Nb5wwtnI0OgL8 o4SxVqrUWo0/5A3hj+3HoO7eJNup/yamTk4ld3D5VMnMbtlg+FGQL37khlqyxQx9CHbTP6 zPh6XIQrw/HBfbgbYaML8eCfohczkg516Mcj1hrhPoAQalMBD4u+WabmhLwWY+M3fLeRnA GGUufNkaDr+rHKmMjkh9j9CG3gTvSHQ76IRTtWlwvU9z4nMtMcur9MgEimqrDX4D2vExZc bRexkqYvU70V0tejTj4Cg6eT/+tXL/UbeXulvqhT1WbfGhCzdBoV/V6iOaNFXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Frss8uFL2JTLYyqqT6nKPxSYHrcmqTuKhqs1+S5ie1M=; b=P4jmcOa3VJiVSeRlp5hd1w6yue8gX37+EyFHZ8z96xLXW6LqCQ3AlyQoiDZUo0PRcOQYrU bH09Oz7XOASmeAP5v4/JfnvVK52pZFpVPfef4eSQ4kGcaiCyQFpC3V/vaDj+qLmhr4huwB tDQGhvbMQhDnq0dTX2wGMqn7z+m7Nt/WuhES1VNoR1HPXT7jpm6GLF/4hQN7Se32X1IzIA 3uQ3a4LG7LMzhjJEEfHJ4FjI2OjoxTfqywBfZsh6LBBTmfLhfsY1D/eHaG2/Ep21tPZ6Oc oxuXN72NLgaM5/WIK0nXbfkLm2IJrKWPFaNzKD/16sfzeIRXfootwXRuzkxLNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781332; a=rsa-sha256; cv=none; b=KB10tZLLx3cTPIQ+7GTJIbeVEvMsH1Tu3YQKm8ehYO3U2FcWHI76216GLMItIK6fLPX5QW B8lkTh6mxf/tq9aRqxtqiI0S6u6rYGsXvVDguCdaFmStKKXIru+TYyguhwJTxCGoRIEl0Q PLunlk5s7S6xqhpIHGj12wxhx1w02aSZHQk7XNyufF3hMGpJVSjn/NSH2EPw0ZoRUqDwUu PrUx6Ljq3LK4QRPPGxgSfQS7UyoPrpZshB4HcEKwykvPHCvjYf2U/lnxx/v35DBqSh3uX2 EEp8YxSAPWxhbxGuiVZxCzqJFCBDCxhHHF0EB4UqfS4nFPJaOQJIsos1LzqGfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTJ302bz18X1; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8q4H083390; Mon, 26 Jun 2023 12:08:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8qTp083389; Mon, 26 Jun 2023 12:08:52 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:52 GMT Message-Id: <202306261208.35QC8qTp083389@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: e7c58fc886ec - stable/13 - LinuxKPI: implement pci_rescan_bus() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: e7c58fc886ec09fe16bb544a2a3b2e9fcfbc0008 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e7c58fc886ec09fe16bb544a2a3b2e9fcfbc0008 commit e7c58fc886ec09fe16bb544a2a3b2e9fcfbc0008 Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 20:59:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:19:42 +0000 LinuxKPI: implement pci_rescan_bus() Try to implement pci_rescan_bus(). pci_rescan_method() is already doing most of the job. We only have to do the count for the return value again ourselves. Sponsored by: The FreeBSD Foundation Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D40122 (cherry picked from commit 525dd4acaacc59b815131caccfdebc905d4d7bff) --- sys/compat/linuxkpi/common/include/linux/pci.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 55435f6b72bc..f3c495ff1a21 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -277,6 +277,7 @@ _Static_assert(sizeof(struct pci_driver) == __PCI_DRIVER_SIZE, struct pci_bus { struct pci_dev *self; + /* struct pci_bus *parent */ int domain; int number; }; @@ -1425,6 +1426,29 @@ pci_stop_and_remove_bus_device(struct pci_dev *pdev) { } +static inline int +pci_rescan_bus(struct pci_bus *pbus) +{ + device_t *devlist, parent; + int devcount, error; + + if (!device_is_attached(pbus->self->dev.bsddev)) + return (0); + /* pci_rescan_method() will work on the pcib (parent). */ + error = BUS_RESCAN(pbus->self->dev.bsddev); + if (error != 0) + return (0); + + parent = device_get_parent(pbus->self->dev.bsddev); + error = device_get_children(parent, &devlist, &devcount); + if (error != 0) + return (0); + if (devcount != 0) + free(devlist, M_TEMP); + + return (devcount); +} + /* * The following functions can be used to attach/detach the LinuxKPI's * PCI device runtime. The pci_driver and pci_device_id pointer is From nobody Mon Jun 26 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 4QqRTK6lV9z4k71t; Mon, 26 Jun 2023 12:08: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 4QqRTK4tXCz3jsq; Mon, 26 Jun 2023 12:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gMmbjsKkTHg3egHnUN0UPcgOQen7TkJs9c/MwtFNu5U=; b=xOYFMrxm0urUA1LrKJ7LdgFhQr4DR58+w4ubbwGX35/ErSvhk3+9Zbj6zJq/npNtcJ0scY 7nkCUVki/o9G7IYuXwaRpZFTREp3nxLaSKpSV97ka571KyMu+PAx2kqJzPacQgCfLWz9uJ nZO2NJwoAK3w8RtHk0p9x1hnYneU6F5nNFN/iRNhDp9yusosr9FDqsua30WtTYSQ/xta1D su5qhf1QQUfYWDGRjTYf23dQd+q434Cw6U/SGc1cEfm6pmne/riKbg9+PkWZbuCZ48WdT0 69VC4bnMS9Tm08+kOK7x8HMtg2Ne5B8QMuKGxZVNyYCyN5TW1DCu9dMcSqBdWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gMmbjsKkTHg3egHnUN0UPcgOQen7TkJs9c/MwtFNu5U=; b=stZNHI32+ciahaUD6TpTLujHYwYAa0Rrq+JvV+7P4XJ7XkE4tmHjlRkgWBkiwweSGRRJ5p Y4tij5IexfXIOIIFfBa+9rMz+cfxg/vDThwUyf5IkXndeuMrN9iUv7GTvw2eah8mA9LPXw +ixESQOy02XZbAiRl5QCXoCy+h5a1sgUD2NzJJWKc/Yif02o7163FnzDXFuUnaLZcAy7xm e0y0oonz3BjxbEUInXZMTJ4zlvtObNpy34ZoWDW1k+BviV4opCSMhQyKWeyRZxPFiF4XV1 oWdKMuOAsniX9p9pyz95pf0tSj/tQfgh3SRyH5xo4CsSVj9JS5oNV+dvhu/C3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781333; a=rsa-sha256; cv=none; b=U1HuIjZiLi3VY/N1LuMJo+w/mTurs7mkBeTVSp/CxjU78bimZkJZd+IPAE5ItqPrU4Nlv5 m0ZAFnWBYU7R1MgVvR7rlF7buT28t6H2zIDyyiA7JhqYFNx07GOFPMDtHu7uhLDw4QaBbf yHLv3Hyo45AXpsfpM26cg364UeApTG9hQhELl4R3Fk6c5SGhn9SnDUlISDtDtQkDasizVm O7vduokv1VyQW6QLG4sN6Ec2AsWnKKD49Cgglf+WSr1E1kg099VgOWq77IkxxoK670KNH9 0u02rbWn6iGjGRn7RiMHk8lAUytjNeiOh8VWBgbC74CxHGqH9l53ABsuQQi8fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTK3yjGz17ZZ; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8rkR083409; Mon, 26 Jun 2023 12:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8rVG083408; Mon, 26 Jun 2023 12:08:53 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:53 GMT Message-Id: <202306261208.35QC8rVG083408@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: 8e77643e0441 - stable/13 - LinuxKPI: pci: add PCI_COMMAND_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/13 X-Git-Reftype: branch X-Git-Commit: 8e77643e0441f6894776e784d1562f1462a6e624 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8e77643e0441f6894776e784d1562f1462a6e624 commit 8e77643e0441f6894776e784d1562f1462a6e624 Author: Bjoern A. Zeeb AuthorDate: 2023-05-23 23:11:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:19:45 +0000 LinuxKPI: pci: add PCI_COMMAND_MEMORY Add another PCI alias to our native defines for a wireless driver. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40247 (cherry picked from commit 7d7d12ba7765902f51dabb259a186ca3b1a2d351) --- sys/compat/linuxkpi/common/include/linux/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index f3c495ff1a21..c2643a27b910 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -113,6 +113,7 @@ MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ #define PCI_DEVICE_ID PCIR_DEVICE #define PCI_COMMAND PCIR_COMMAND #define PCI_COMMAND_INTX_DISABLE PCIM_CMD_INTxDIS +#define PCI_COMMAND_MEMORY PCIM_CMD_MEMEN #define PCI_EXP_DEVCTL PCIER_DEVICE_CTL /* Device Control */ #define PCI_EXP_LNKCTL PCIER_LINK_CTL /* Link Control */ #define PCI_EXP_LNKCTL_ASPM_L0S PCIEM_LINK_CTL_ASPMC_L0S From nobody Mon Jun 26 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 4QqRTL6hGzz4k6rb; Mon, 26 Jun 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 4QqRTL5gDMz3jyg; Mon, 26 Jun 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=1687781334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a1SkeeX7FFB9EuWbWg2RmIIrwRe6cFz/QMDp1utizsE=; b=GZoos1BN2OQXSs1Fns/K/VBjDacyRBvpks53OFsp/YQMdkCM203TTszYrsOgF/sTm8/WND Lgb0Bs4QB6foHQBM0Qo/eeZgw6hUnVb1OjT2MHH+hFsxwYEC4VmnXFXUxeVcFaAjidJ0NI EOHCHWeFNoU/qQYYBkvSIP9opPgKrFlQyIgrXTb2WLHeVvnOktnCDAjJ/3/nrJMvQrxZm3 FYvQBwO79rf4RUJB20QgFWqQ8gTm3Ok2wWOKvDcEITPJKtQI3HY8dZazI+rMf2qfI3daEM zh80btkss35pB5uRWkeD96nlLo+fHWMsPZT0ySUqQDeuZF3PoYgmRUZQj0a16g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a1SkeeX7FFB9EuWbWg2RmIIrwRe6cFz/QMDp1utizsE=; b=asKKMCfl0e4910O5Fbi3aGM6wu6Q61MsbreW2ICBIhYNWvi5ExWnckFS238EVTYFObr7ln RAfVe3qdbcOd7HwxjAyrQSjtDqP1Y4DajU2aZ9dv3PtVIc8aObBszQAHnA8xxLqgEYljq9 xnB11+DrIs5p9b+Ht17py/gJz0HOM52w43/J5ftexpgxzYhocwtLwl5rMX9OQhn5xMSWI4 nsE/mlMeTSuj9cawtBoCReNgIYF62A3oUwt22fcar37wnMdZzk1LBqdgOY8pDRLh4+YB0S 9IF7Nsc+usd/uKeB5GeaVzkYPgRGunIQE1y/8w+Td9FDxzEP3gslusYryafsXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781334; a=rsa-sha256; cv=none; b=IkjKLVpIkwmOhX2dmjWn3uBkdqWwXxLFHZu9XwRbQ+TqFZLd2TB4GHmX4ouDS7QeqDOnIA Q5r1pxfyEY1pG4yE+NYayqZ2H4N782lXnusPyM/RVWs1btgojI0iDOdWpuGZ1YNtUbeuEX nwbBSNYdyFmHI+urNHrYSPjadg+q304hcTKYDpi2ywX/5SYrHkX8pIoF7UN4iW4hWXXzIt 0410e5cJqQK9XlfuvkI2hqhTP0bPaiJFN+h1f6lmUFw6IIxgEeuOKG7aL19xjltAwshuzF AO58jOhnoauOTh+5j20JwqY3MqFjf/pC7nXRco6kvf9zRkT2EylZnkW4dFN8GQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTL4mRrz18P1; Mon, 26 Jun 2023 12:08:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC8sTm083428; Mon, 26 Jun 2023 12:08:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8sO6083427; Mon, 26 Jun 2023 12:08:54 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:54 GMT Message-Id: <202306261208.35QC8sO6083427@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: 50b27a0771b1 - stable/13 - LinuxKPI: pci: update struct msi_desc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 50b27a0771b112bba2b52ed137903c49947e884d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=50b27a0771b112bba2b52ed137903c49947e884d commit 50b27a0771b112bba2b52ed137903c49947e884d Author: Bjoern A. Zeeb AuthorDate: 2023-05-20 00:48:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:19:50 +0000 LinuxKPI: pci: update struct msi_desc It seems struct msi_desc is setup differently (or was changed) compared to how we added it a while ago. Catch up in order to keep drivers directly accessing fields compiling. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40175 (cherry picked from commit 17bde9cbc6fc3ac219aa11243c0b75025786f628) --- sys/compat/linuxkpi/common/include/linux/pci.h | 8 ++++++-- sys/compat/linuxkpi/common/src/linux_pci.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index c2643a27b910..9cc56237482c 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -312,13 +312,17 @@ struct msi_msg { uint32_t data; }; -struct msi_desc { - struct msi_msg msg; +struct pci_msi_desc { struct { bool is_64; } msi_attrib; }; +struct msi_desc { + struct msi_msg msg; + struct pci_msi_desc pci; +}; + /* * If we find drivers accessing this from multiple KPIs we may have to * refcount objects of this structure. diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 88a6b749a043..4ee3e3dc5838 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1016,7 +1016,7 @@ lkpi_pci_msi_desc_alloc(int irq) desc = malloc(sizeof(*desc), M_DEVBUF, M_WAITOK | M_ZERO); - desc->msi_attrib.is_64 = + desc->pci.msi_attrib.is_64 = (msi->msi_ctrl & PCIM_MSICTRL_64BIT) ? true : false; desc->msg.data = msi->msi_data; From nobody Mon Jun 26 12:08: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 4QqRTN38mxz4k6wn; Mon, 26 Jun 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 4QqRTM6lgkz3jrj; Mon, 26 Jun 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=1687781336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JztP+vtUHSTKuC4H0cRpSm8LBGoIwznQPO7ORgAINJI=; b=wzH7LVUAl2/IPh0Xn+4WukUprUK/jrfAfwWyNUwr7NnxRKajlsrVqb6LkZZqKVzNYmUOEc i2RfiitpcCAnHPPGFt2lux6pjvFI6Mo61PL+3OveBC/+uqw7/p0VNZPny4l4M3bsemYoTX EemAfhJikEUbBdswnvbuABISTeMw+Qt9sa+XR0rkhz+nZImaTsilTXMQ5fT6xohA1Ss0W2 7Ntd3v8WnlPqronTnu84aF5HBQUdmdNmXdpCA7OYlOwamjHG4OgO8dx9SlISPuFYceliSq NKP6CssgyK97Bpcu8Iiy2kd3WIc3roCx3C1xunEuF72ujiqz9Qa6hYFUT22Dug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JztP+vtUHSTKuC4H0cRpSm8LBGoIwznQPO7ORgAINJI=; b=Hm1Bb9V65U7071vDhWAEwEYmnpl1cMvz715Sa+xOczEmyN2vt+npgUDF/SCWfne2N28Mb1 UDtF4hNbUmy1f0Fy5yCyBoAUFggKegWSgdiQf3iJ00vD/jWTVJNHGnvhbXLJAKS6QepqkV uN+/eBwO1e5Z2PfjsP6KzxptpxK0H8H9nmJT8zcQw+QTazB4/OTTFHmg6HI7IumyGba2tT 83UvQL6/Qt76aXFQ9+fV2jrzBuX6Bs2OGrK2xYHg8grxjhy/i+0tOLpOCV+JcNzv667uXi LoXicty6lu+sxv9mCUvp3vfMZMRHO9McBp2qxELoTSH5/zttjBq2KYbPWomhlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781336; a=rsa-sha256; cv=none; b=s3ceRUNf2ykAIaO+0c/sRxy48i73Lw1V0O4tYwaC4yLDRLN5JPY9kCESikGvadWiCJtK1c 49S5edlOBICRnwUcKOpLen6Sr03nI0w+1gdhqj6W52rGNr47fyhVPwuqNK0dbWsySdvjyb j/nv4qvqrNOP3NEN73UC7nWpYAlR2h4FjepCS1w/zvJy/iutgyUBMWPf4sn0pXi9V2FpqZ w98uhnZfAMO8KoEMcWTSz+NCCwYn0+qj4ONFgDDkApak2qIeP1nZFiqTTCFhnodCyWaLsF k0GjgquyMkO8bzk1+n236Gm/+34p2UNcdGsVSRaBmefmvO2tc0CcAH+BkW1YbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTM5qs5z17dd; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8tgh083453; Mon, 26 Jun 2023 12:08:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8tjI083452; Mon, 26 Jun 2023 12:08:55 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:55 GMT Message-Id: <202306261208.35QC8tjI083452@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: 523d17b26290 - stable/13 - LinuxKPI: add utsname for init_utsname() with release List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 523d17b262905c8dab686025edc337d91c0f3a86 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=523d17b262905c8dab686025edc337d91c0f3a86 commit 523d17b262905c8dab686025edc337d91c0f3a86 Author: Bjoern A. Zeeb AuthorDate: 2023-05-23 23:12:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:20:21 +0000 LinuxKPI: add utsname for init_utsname() with release A wireless dirver is requesting release from the result of init_utsname(). Populate the field on startup. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40248 (cherry picked from commit ad513b4dba3e330b6f2714bdde4d864898c4222e) --- sys/compat/linuxkpi/common/include/linux/utsname.h | 51 ++++++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_compat.c | 4 ++ 2 files changed, 55 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/utsname.h b/sys/compat/linuxkpi/common/include/linux/utsname.h new file mode 100644 index 000000000000..1f7f4b7f4289 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/utsname.h @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2023 Bjoern A. Zeeb + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUXKPI_LINUX_UTSNAME_H +#define _LINUXKPI_LINUX_UTSNAME_H + +#include +#include + +struct _utsname { + char release[OSRELEASELEN]; +}; + +struct uts_namespace { + struct _utsname name; +}; + +extern struct uts_namespace init_uts_ns; + +static inline struct _utsname * +init_utsname(void) +{ + + return &init_uts_ns.name; +} + +#endif /* _LINUXKPI_LINUX_UTSNAME_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 4ceb33c348f6..dce3cdcc2de3 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -139,6 +140,7 @@ struct class linux_class_misc; struct list_head pci_drivers; struct list_head pci_devices; spinlock_t pci_lock; +struct uts_namespace init_uts_ns; unsigned long linux_timer_hz_mask; @@ -2815,6 +2817,8 @@ linux_compat_init(void *arg) */ for (i = 0; i < MAXCPU; i++) CPU_SET(i, &static_single_cpu_mask[i]); + + strlcpy(init_uts_ns.name.release, osrelease, sizeof(init_uts_ns.name.release)); } SYSINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_init, NULL); From nobody Mon Jun 26 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 4QqRTP1p4nz4k6wt; Mon, 26 Jun 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 4QqRTP0gjNz3jtr; Mon, 26 Jun 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=1687781337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lcXP22bKmEfJp+suO8GJ0/HYEbHAxhCCYCk0EF55tXk=; b=C/uLCDB7SgorQHjN+LXdOHUgUt24/Q0kClbUXIw2H/pvGh9hSQYpImbGu7mj2oZelWsSg+ n1XLeTxOdXnkSPJtp70bMhaAQNnK5CF35uJWXrjoPC3DoG8K8ctWXyuZhjzYfCd0PmWi1o aMtYDY5pYECS42VIXOOMIHJ/9TdAfdXuwi6bYTG4CmHrxEAxzbH1zSPp2S/NMryx15vp9x 0qHqepYYMpX/6OW4zfcq+KcRXUt3mUPr0Vyep8kLuwho2LUn4ZfvbCfTS3G6n06wXoH/vF /ii7z0B3aMW4aqJsL4FiWbF4KPTrMRJ6ku6x7joqGpMmjX1kv8Q9z5aCFN0cgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lcXP22bKmEfJp+suO8GJ0/HYEbHAxhCCYCk0EF55tXk=; b=m0t4fl8f9B1HnOWRyMKANFKoLkD6AUc/ij2b9iQfarl4tjgGRvRqInJnQ/+RT9Qf2nQBSy vdYBWzbVDoQnR7LIS2EWhrZTyW/+HLG/EVcvOeQHPikryMY1SkRbO4s3m99U0XfqthfdPp HtJS82dsL/5m1a2hpayGrS+RVg6qt27Tkda7gpomFhwEcYDsB3FKj8fRY16le4iUT6k6yj 9blznrNW79FMRxXDsz/6Ce8WNC76Z6hYAXGhwX2LmOQI2OZIecE30KMitXGtSYjH35vXwO +ptUD6eGH5FY+QDjIZIFHtaB84tvceZNyETvazMMgO2EdRdgjWfuDHIMXZ1W3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781337; a=rsa-sha256; cv=none; b=iwavu3m+IEs9ODcRbuEHJkEGOvBoXMwLkx94kKJ3m42rIe9VFOiG8NnPEPyZLj3FudQA+z PuZDsOrFtiNYD8OSH+PLpAbRoFlauPHG6E8VeUE+MeERtIeSLE9c9ohD+0Sya3MRQe8ixM l6n2HC/dKNe0z6rdtjLQVGiyDMtPic1HQEuI8xdUmvNyNQBvPiy52SN9dxvCe9Smj69fiR OLgDZihvBOwXNGbcL3/fYARwI+3WwaTsVnhtOqQYaX58YFGysoMgRENKDhyC5S3rBHp8s6 h1tRYP8NPP51pau/keOaq9MikDMWf/CWEL2NCEIW2mz0r8T60hTm32a6RQ17gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTN6tmGz18X2; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8uYu083478; Mon, 26 Jun 2023 12:08:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8unc083477; Mon, 26 Jun 2023 12:08:56 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:56 GMT Message-Id: <202306261208.35QC8unc083477@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: bd0b4de28d6b - stable/13 - LinuxKPI: uuid: add guid_gen() and guid_copy() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: bd0b4de28d6b1fb598b0e2bd5f3713ac427cbda7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bd0b4de28d6b1fb598b0e2bd5f3713ac427cbda7 commit bd0b4de28d6b1fb598b0e2bd5f3713ac427cbda7 Author: Bjoern A. Zeeb AuthorDate: 2023-05-23 23:15:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:20:27 +0000 LinuxKPI: uuid: add guid_gen() and guid_copy() Add function used by a wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40249 (cherry picked from commit c1b6e9121e889608b86530d1a37047797dfeb460) --- sys/compat/linuxkpi/common/include/linux/uuid.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/uuid.h b/sys/compat/linuxkpi/common/include/linux/uuid.h index 31a018497f78..63b77dd7d0bc 100644 --- a/sys/compat/linuxkpi/common/include/linux/uuid.h +++ b/sys/compat/linuxkpi/common/include/linux/uuid.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2021 The FreeBSD Foundation + * Copyright (c) 2021,2023 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -33,6 +33,8 @@ #ifndef _LINUXKPI_LINUX_UUID_H #define _LINUXKPI_LINUX_UUID_H +#include + #define UUID_STRING_LEN 36 #define GUID_INIT(x0_3, x4_5, x6_7, x8, x9, x10, x11, x12, x13, x14, x15) \ @@ -59,4 +61,19 @@ typedef struct { char x[16]; } guid_t; +static inline void +guid_gen(guid_t *g) +{ + + get_random_bytes(g, 16); + g->x[7] = (g->x[7] & 0x0f) | 0x40; + g->x[8] = (g->x[8] & 0x3f) | 0x80; +} + +static inline void +guid_copy(guid_t *dst, const guid_t *src) +{ + memcpy(dst, src, sizeof(*dst)); +} + #endif /* _LINUXKPI_LINUX_UUID_H */ From nobody Mon Jun 26 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 4QqRTQ2t6Yz4k706; Mon, 26 Jun 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 4QqRTQ1mCgz3k3W; Mon, 26 Jun 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=1687781338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AtIHkZKMFEzhYbIvE8kLHugg3uLTSznyrJIH+H5yMDo=; b=ermZhp/AyPe0OanE0wqL+bJiKZj4Ic/lRhHwg1Sn8jzEzhSdBgOsPK9kVyQeCmUKfIXKlA svSjoLc1GZxPtNRk8GfYwOySQjCRuW2YigwEqgOA37+1E/3HpxLgvdOmcgYmHobO3j/K5I exAY2ouZfbFdCT54rjRZmQ2MCINCMSrxAmnx6iVXXcrHv4KNczpesM6fN9WXIxn6misXo2 e1O56osGSUCC4lNHaFvuPHTFrqadjAOFlxFmfcmEM6tNppGFK3kFXin6qwtjSm4knRLqJd uPaSzmQMgzwOKt5ZJPxoQuS3ELnzjkFW+KbEhIh52JtXPoqq+5gRZI4X7I48+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AtIHkZKMFEzhYbIvE8kLHugg3uLTSznyrJIH+H5yMDo=; b=Sld7u4zSkhPpVFa/c1YcQ+BpzWM0buEU4ZxxNkDueF9w/gxKlCCRxqb7b9fg85yWxlgGpg hPoXUhMbQNXF66JpjME9yJM7pnI/RzRYKyzYT+ZqDkO6/qymStwgvfN9UVMqRUveOblCFM H0mKEHRsqddwCwCROlvAgA9UeaWK4oxKZaUukvA+u41nyIn2KPzy068gwDlf4S+B3oTdTt G51RloDBdTyP7PATGeDWmbeV/JWK+j5q/7OWdGuPGBmCY6gDGD+EU06XBJQ8O6YjztXHFd mRuPj28DhaXtsvKaAoQ8E2bSAA8/DnO3B82eOrB0aqAn4NMfFETxcZZJbdZQqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781338; a=rsa-sha256; cv=none; b=CBnYp7BfF2e3j/LzEEN/8sFUf+rimO0bVa7tLoTgWYkiDETNdoGhpsnoO8NV0wo99tttHF acNaImSGKjG52GwBsf+ADwaNGO2J1iutGU1SDG539AhP24xtEarsnbMJUNcOtIDVUgTRFT uwDN6l2PYk3B0V/4ySHQQHjc/bLIox2AzM1FOVLln4beVnBpdvYELOc2rCst9bIUd9nR8v RWkGpUdyfZGLTR8iQU/ipsdyw8zuVLjmSwHx7BFXo7GhlW1k62UnhSUvBplZ9I6c+aXgS7 EFKu8emp9Kw+V0GrLq9t1I7g9QQlUCY/0GHNhQakBPhlbDL4pTpicJSIA55BcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTQ0sk8z18Cv; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8wGj083497; Mon, 26 Jun 2023 12:08:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8wb7083496; Mon, 26 Jun 2023 12:08:58 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:58 GMT Message-Id: <202306261208.35QC8wb7083496@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: bf22f62d9a1a - stable/13 - LinuxKPI: add dummy rhashtable implementation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: bf22f62d9a1adfb3d4865110f01bcd3b1e4253a1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bf22f62d9a1adfb3d4865110f01bcd3b1e4253a1 commit bf22f62d9a1adfb3d4865110f01bcd3b1e4253a1 Author: Bjoern A. Zeeb AuthorDate: 2023-05-20 00:45:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:20:32 +0000 LinuxKPI: add dummy rhashtable implementation Add a skeleton implementation of rhashtable in order to keep an upcoming wireless driver compiling. We'll implement it as soon as we get there. Reviewed by: emaste (previous version before his suggested changes) Differential Revision: https://reviews.freebsd.org/D40176 (cherry picked from commit a30a0d940daef2df51371cf142790109e2019fa0) --- .../linuxkpi/common/include/linux/rhashtable.h | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/rhashtable.h b/sys/compat/linuxkpi/common/include/linux/rhashtable.h new file mode 100644 index 000000000000..273ea235b801 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/rhashtable.h @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2023 Bjoern A. Zeeb + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUXKPI_LINUX_RHASHTABLE_H +#define _LINUXKPI_LINUX_RHASHTABLE_H + +#include /* pr_debug */ + +struct rhash_head { +}; + +struct rhashtable_params { + uint16_t head_offset; + uint16_t key_len; + uint16_t key_offset; + uint16_t nelem_hint; + bool automatic_shrinking; +}; + +struct rhashtable { +}; + +static inline int +rhashtable_init(struct rhashtable *rht, + const struct rhashtable_params *params) +{ + + pr_debug("%s: TODO\n", __func__); + return (-1); +} + +static inline void +rhashtable_destroy(struct rhashtable *rht) +{ + pr_debug("%s: TODO\n", __func__); +} + +static inline void * +rhashtable_lookup_fast(struct rhashtable *rht, const void *key, + const struct rhashtable_params params) +{ + + pr_debug("%s: TODO\n", __func__); + return (NULL); +} + +static inline void * +rhashtable_lookup_get_insert_fast(struct rhashtable *rht, + struct rhash_head *obj, const struct rhashtable_params params) +{ + + pr_debug("%s: TODO\n", __func__); + return (NULL); +} + +static inline int +rhashtable_remove_fast(struct rhashtable *rht, + struct rhash_head *obj, const struct rhashtable_params params) +{ + + pr_debug("%s: TODO\n", __func__); + return (-ENOENT); +} + +#endif /* _LINUXKPI_LINUX_RHASHTABLE_H */ From nobody Mon Jun 26 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 4QqRTR3rpgz4k78y; Mon, 26 Jun 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 4QqRTR34gDz3kBD; Mon, 26 Jun 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=1687781339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EDiPa4k7wNDVZ0gqaBiywTxUoGuem/BSs33Bv0mb5Yo=; b=HmoCAWxhN1nKm+VIzDkZPxkvWFf4ua5k0VF9RXY5suQD70k8tWJ40G5EMEJuiyg38zXOkh mcXzEdgquixYSkxZJpaB91CTWbj9V4uBm2bJnF5hiy8eMUeJgSZZPQz408mVOgm+yqZAwX NzcouxYDweIWABUdCJB8hEcENhhKHaffFvGgCrD4auUeQQZ11nlUcydh3Dk9RyH3aO2+qN BaIVO8YWl1d8EQmP4L5oapFEg0jBbnt62L6QMthVwAqQ3Ija7Wyj8dYktykFJaiaBgpX2h 6Gaxe72dLiwq797O28gHEEpxQMHAqm+avO53wg/31KoQrOei0Mdp61W7uqL6cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EDiPa4k7wNDVZ0gqaBiywTxUoGuem/BSs33Bv0mb5Yo=; b=sVYTdFxOxOqQEg8CeQr2HRLSgLtS3rO6CkqK5nSyaMxnLK1n0vqjuSjoJbWH8csvjmq8Uf HkFH1axTnC/W2YdLI/Mt5OHWxXFW6CB3Rj44lVrKR+VbuPpsJhhso23p0IpGVGRzpg1yZF K5acZIyCKI6UljpT4Qum62T8Hx/x6QZW+8azr9ldVaU+oUl2Otu+95pbZBapB8+WDvkUKa KtZjFDbnO8S0jND9A3pH1EDQMajbdwiOiNZIYVymT8RE5Mdwi3SdC5jXZ0mKWxUAH2b8uL B7ZcsV/n2B77EkVvpiEfpHq8kPNkklNyP7f0vlICNMj+Kj0+F/sFDCIO/VmJRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781339; a=rsa-sha256; cv=none; b=F+W8aCqDL1byq5Id7pCfw28ydjLuxPBUnzZTZPJgvtTRj5+wVs851Hpdb2iZ2V2PAy/7R+ buF/92sJxJDv//U3wyJIvZWUVmr7WYLYaXIlbZJnEBlhmNwOqGWlrXSUIzXz8GcCIVuYf+ hcTM5YRYWUpNW+8trr3cjSzdHCTNkG6lTb02u/DUTlFDOiaUp2XNj9ug2KtJRI3Vg7n4uR vDC/AQoFJMqFBynG6yEcUM9YsSGkbqTQuezSRTAyQPYqOlybQWA4QJnrpX5EshYRcgBf8F +mBbsdfAJh7lqLInxHUCGWSCvgtZAaDsogmOZA6La74zV6GrHcuJPid6ebCCmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTR1z3gz18P2; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC8xsZ083517; Mon, 26 Jun 2023 12:08:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC8xRu083516; Mon, 26 Jun 2023 12:08:59 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:08:59 GMT Message-Id: <202306261208.35QC8xRu083516@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: 9a37368d2beb - stable/13 - LinuxKPI: add ktime_get_real_ts64() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 9a37368d2beb26a236e9f91fbd5caefc055d0ef6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9a37368d2beb26a236e9f91fbd5caefc055d0ef6 commit 9a37368d2beb26a236e9f91fbd5caefc055d0ef6 Author: Bjoern A. Zeeb AuthorDate: 2023-05-23 23:10:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:20:38 +0000 LinuxKPI: add ktime_get_real_ts64() Add a wrapper for ktime_get_real_ts64() used by a wireless driver. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40246 (cherry picked from commit b889315da3009256c5078e629a28763d981b70ad) --- sys/compat/linuxkpi/common/include/linux/ktime.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h index e0722aa2589b..ebb82d7787c4 100644 --- a/sys/compat/linuxkpi/common/include/linux/ktime.h +++ b/sys/compat/linuxkpi/common/include/linux/ktime.h @@ -190,6 +190,7 @@ timespec64_to_ns(struct timespec64 *ts) #define ktime_get_ts(ts) getnanouptime(ts) #define ktime_get_ts64(ts) getnanouptime(ts) #define ktime_get_raw_ts64(ts) getnanouptime(ts) +#define ktime_get_real_ts64(ts) getnanotime(ts) #define getrawmonotonic64(ts) getnanouptime(ts) static inline int64_t From nobody Mon Jun 26 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 4QqRTS6kf8z4k70K; Mon, 26 Jun 2023 12:09: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 4QqRTS3mSbz3jyT; Mon, 26 Jun 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=1687781340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DV+UwG+fpXW64dfnT9B4C8Ygtyu65p/Dsk9T5C2+mBg=; b=nQ1VAR+09RlyV9tD27ztaj2SZGsAE9IwgHj24OzuuJOCnGwXhxZ3gQgr8DrEVaDyk+Kjhu MzScKDymhZeo0DHvZEMjc4VLi3/8dzIFfLaEj7V/f4si0Q7/g5eZ2QpCp6fMHKKH2cOYdy Nu1+EZBBE9I4G1gV5tpGZ5jwX+YLoNkvIl1RW+vWDMY3Zasg+JP7Vz8vOy3rSFSaWopO/t AegqakOewcfFH+9uxqlNrHj6RV7yq46ccy80pz5fZ60nMAifzTvmzbkXh16+nl2zwUbnNR j+tqSFMJgF8yrJQewntuYa9Q9f8H/OpURZO0Ny0rsLjdyEd5SFlGvKh4Eza1bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DV+UwG+fpXW64dfnT9B4C8Ygtyu65p/Dsk9T5C2+mBg=; b=BpkBDXKPINmYOMjpFjOwskhCZXN249DBWq1uuBg9RBXWAVcb+51TofoLAhzyIWa7Xw+8rL ZVHa0r2seWBp+yW5oduAyGAeyc11oz4YDqKLOAgAPZTZdowCs7LE1crzLghzrHtIULeLYc Oo9ipRy06aqm1vO3t6jYti2nyY7XcU1YeXyShefIrHm4kvhMeT0/0dXtsMo5ULUxgNJmSG 0sfZQDZG95REb5ACbdbY2TB63CR2e295WkNTURAVBPCwhUcZCeW+P+A0NcG/K/grvUw/c0 wsCefhKoBenNrmwDa2k0HG4PDxF9OQwe67DaXiF4gloqJJieauQi1jwiD5AQ0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781340; a=rsa-sha256; cv=none; b=nKRTzzNz0ollyOd1GYX3ueUBaBRYYOc5ysoWkz+GN0dSVK2Zn34/BSCurwxDwEh0g820cq 1GFFPn4YWDwSPfSG7gzxaI7YNW1TfNOtB/UiB71rjo0UhcdzZItQ9a3Z2O8k2mRXdQA9wE QbKKPsAkEN5l2BAFq/iKtFwD4nQUg68FZlzwHej5cU89sbrD5p3Kd5ABJRFm8sHjb42hfv Ji/K21mTClFaUKNuO5Oy1vlNql0tv9Dhy9v0a8cN1wQM97j8Ius671QkH4c7zJoWgVNv3z Zd8VU7O0khKPiMZCjcgBDXo4yN5IzzFPmcuO9xkiZkTIcAWkU0qFfLK5l2xIhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTS2szLz17df; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC90br083543; Mon, 26 Jun 2023 12:09:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC90tT083542; Mon, 26 Jun 2023 12:09:00 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:09:00 GMT Message-Id: <202306261209.35QC90tT083542@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: 28dc06cfb4d9 - stable/13 - LinuxKPI: Add linux/stddef.h and add struct_group(...) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 28dc06cfb4d9249bdf6fe7ace75284309e56d6f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=28dc06cfb4d9249bdf6fe7ace75284309e56d6f1 commit 28dc06cfb4d9249bdf6fe7ace75284309e56d6f1 Author: Bjoern A. Zeeb AuthorDate: 2023-05-17 22:22:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:22:30 +0000 LinuxKPI: Add linux/stddef.h and add struct_group(...) Merge the original addition of stddef.h. (cherry picked from commit 7c7419f60cafa4f666f5a22b5e5f090081516cd2) Add a struct_group() macro needed by a wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40138 (cherry picked from commit 7c0c69d1a0f3735e315a48436bffbd482f956270) --- sys/compat/linuxkpi/common/include/linux/stddef.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/stddef.h b/sys/compat/linuxkpi/common/include/linux/stddef.h new file mode 100644 index 000000000000..a3bc6b13765e --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/stddef.h @@ -0,0 +1,15 @@ +/* Public domain */ + +#ifndef _LINUXKPI_LINUX_STDDEF_H_ +#define _LINUXKPI_LINUX_STDDEF_H_ + +#include + +#define struct_group(NAME, ...) \ + union { \ + struct { __VA_ARGS__ }; \ + struct { __VA_ARGS__ } NAME; \ + } + +#endif /* _LINUXKPI_LINUX_STDDEF_H_ */ + From nobody Mon Jun 26 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 4QqRTT5xhFz4k6lN; Mon, 26 Jun 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 4QqRTT4vfhz3kBw; Mon, 26 Jun 2023 12:09:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RRKncrdV3HtEqGDSQ4UTGwzn98La9RhOqwRNTBYBJbw=; b=AkDf+ib4WR4QRKAg1KX0HzjxZD6fwqPBbEEqqLd8eGc+3BI6Veut9YhW0MCZ4Ugey363+n HcvSSUpbJVFvy32f4lanZ+hA9RnW0ywptJznUyUSwTCZIaJUMtopngb4jjnD0cFsnlpB2p jeiir26wgRXSLE9tZKYdUoLcc9tdZZif9qWrn2RLkNfpw0Z8E6+IvAl/QMeWq1tHeuses7 Q7znByuUErQP3e0JMGDeh5nOws4mvPwH2yn0Mrbir6lmoJNzM/3b7qA17udXe/i02X/UFB /2xl4/xTT66eUauSQYwAmKSl/RtKaw5Y5FoXHQ4LCwYkKISLPygxqdwSPoct1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RRKncrdV3HtEqGDSQ4UTGwzn98La9RhOqwRNTBYBJbw=; b=eLaPXKoma4vCg0NSSxPbEoPbOppBuFRY41ppzPRIfL0xTl9UBHlqn6FPR9UybxuGtScqVQ wNAk+p0spSdJZ6fBDZ2UOwbjZwjPYx9Tym5UBV5S0A6EIS2qQgZE2tgmkOipbvl+fW6Om+ v8D1jcrgACMBtPjCkTNiSSpwYy6y8C//AmWjQFDz0FJn+G3Ae/8heuzjXxLwiKTzhjsE3j Kln/i88yxPT4z7moSfmcNLHbo3DHdzxkVX0wlHE65mGZq/xmSKM2JPpYMuBZHVhdUEhsXS 6lDnZQ2GLRGmqVzw93DfPmUTmKmjUJF7eGF0dYuRoQgEHuS8xha7hAp0+nHqXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781341; a=rsa-sha256; cv=none; b=Zr1iP0MsuhVJ7KhpNMNlNwhhR7ern/1YEDS4euFzmXvUtXlLw0fKACK2TaHTSLMWHsMYO7 UtHKuXAjkjPUdaTA2FIxJNuICMEOnOANQIBSAZ0eKMukDxNjT2wTXpW6l5JjZPy7FMqm90 S8Ue6WCNCpNlL47ryf+A7W6K/zOrME+6x2PpQ33+DFe+8dT8/NY06uB8RUO2u45cW8DNVW s7+pRdpRfVAcwe1dxVNPh5q6AeHCcVepNRZYCXR2AhlbQ5t5GCxS9GmR1quzlklM6g58+v +228JF2yPFBmbWC4z1dvSIpkQAoA27VVFjE1al9t4ZQK0wLvyBamIdqPHSTC+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 4QqRTT41x0z18RW; Mon, 26 Jun 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.16.1/8.16.1) with ESMTP id 35QC91SR083566; Mon, 26 Jun 2023 12:09:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC91Op083565; Mon, 26 Jun 2023 12:09:01 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:09:01 GMT Message-Id: <202306261209.35QC91Op083565@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: 6faade07b16b - stable/13 - LinuxKPI: add devm_ioremap() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 6faade07b16bfb0bfbe5ee02595a0705a797274d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6faade07b16bfb0bfbe5ee02595a0705a797274d commit 6faade07b16bfb0bfbe5ee02595a0705a797274d Author: Bjoern A. Zeeb AuthorDate: 2023-05-20 00:53:21 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:25:42 +0000 LinuxKPI: add devm_ioremap() Given we do not seem to support ioremap() do not support the "devm" version either and simply return NULL, which means we do not have to keep track of the memory to be freed on device free later. Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40173 (cherry picked from commit 4cbd427788ec625f17c1ecdfccbb7b06c1c908d9) --- sys/compat/linuxkpi/common/include/linux/io.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index 4eb69bca6141..2a63af5d61bf 100644 --- a/sys/compat/linuxkpi/common/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h @@ -399,6 +399,13 @@ void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr); #define _ioremap_attr(...) NULL #endif +struct device; +static inline void * +devm_ioremap(struct device *dev, resource_size_t offset, resource_size_t size) +{ + return (NULL); +} + #ifdef VM_MEMATTR_DEVICE #define ioremap_nocache(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_DEVICE) From nobody Mon Jun 26 12:09: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 4QqRTV6mxRz4k7Fn; Mon, 26 Jun 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 4QqRTV5vWZz3kT1; Mon, 26 Jun 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=1687781342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jIhfau2LgMNbbsh06q75zKIns9MPKtTR0KrxV/ycN3w=; b=dyYP5nfmnn5vAoJz2hJ+F2+dSmGlsIm1YidVjm/R1mSxqJclkVfX3u3zFtDbM7ZGxkhXLg 9zx1ATNQQ5+4yW4fvALLSjtw0unfeZPWjjeSOoLthiBgj2rUKXWLoJbngzmqJsV9G0hkbt shTskOMdnH3jtpc+5w/d07Ti/m0nCyG9vwiWzc7/MpDgxmAzN+gc+r0SLIGN+LYWp9kwQA mEk1c0EW2ueUAleOi8IZCwwgcvf1/x1HhloyV4AXoWgT82+GZz5w+mKUB6/sLSF3DRMn6J XpzAs6kItCk6mLjcbFNzdeaXQaoCb3PW9EEPbFowbkbXQHYwGt70I0fFlTWD7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jIhfau2LgMNbbsh06q75zKIns9MPKtTR0KrxV/ycN3w=; b=hkqoN2ls5wzz87qOZAalDmSC+3NzNqn0vmwEHHLYQ5vervVJRJJvk+nQ3HAaBcQ5/dRHix bfMt5AVyhQnNUQmyAHv/yYukkxUintDwDGdpb4Lb2kB+Alb8D9+ZZmi9MXvN4RsVrrMnqN eNAzOUenvRqZ3SZ2Ngoex3+CWEB06+w3KGJG7F3NeRidrAY4pbvAZsDe7Y58LNZGeSCKfz gt0/qvSb3/3hOFp5BFjZcKoMgdHOqSE2skBFI5r5J4p3WpTJGOPNKHLQMaIFthifJd8/Py 8gyRmm/3WX9nQkrr4UoU5UM5iNVX1KfYgjZvOGXcfbr4oXSm454E7OJqJIy79w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781342; a=rsa-sha256; cv=none; b=CjrM99LrgYGi3ZTn3HTOVb7iNA2jRAy6xuYcCertsQo9zlKD926J8IHuRxP2WNKB9vPwpo P5SshNZnGdKJngicdexdBSsNHgVykDLHkJVEmg7BqvpYP3kNwWoQzlK6s9U1SpEqx1Cj+g mat4HVpYWiC6J6FenHGY3WI3qNFQpjAbpyAuxR/O8BukUM9/Lk3B1hG1wjP/8hIA5Wm6fu DoogqC2rkIHemC7HvQPprwUI1Cxih2euBB4uO7lYMt5dc+bN5YLON8LnWZzKuYd5XyYvi6 3bOkU3iav6zt7ti07DqeshNaxM3a2RqWetcbtkLEnDqNrAv9/bKoQAeCUNMQKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTV4xFzz18Lc; Mon, 26 Jun 2023 12:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC92TR083593; Mon, 26 Jun 2023 12:09:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC92cv083592; Mon, 26 Jun 2023 12:09:02 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:09:02 GMT Message-Id: <202306261209.35QC92cv083592@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: 0dd2a3b488f0 - stable/13 - LinuxKPI: implement timer_{delete,shutdown}_sync() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 0dd2a3b488f00df7871288fa6b85b304a7a40fc5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0dd2a3b488f00df7871288fa6b85b304a7a40fc5 commit 0dd2a3b488f00df7871288fa6b85b304a7a40fc5 Author: Bjoern A. Zeeb AuthorDate: 2023-05-16 21:02:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:25:47 +0000 LinuxKPI: implement timer_{delete,shutdown}_sync() Implement timer_{delete,shutdown}_sync(), which do not seem to require anything additional to the already existing del_timer_sync(). Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40124 (cherry picked from commit 2e07e885d65973f13d6111f7e0fcfb848a68082e) --- sys/compat/linuxkpi/common/include/linux/timer.h | 2 ++ sys/compat/linuxkpi/common/src/linux_compat.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/timer.h b/sys/compat/linuxkpi/common/include/linux/timer.h index 3432bfc46c4f..7b2f589a3047 100644 --- a/sys/compat/linuxkpi/common/include/linux/timer.h +++ b/sys/compat/linuxkpi/common/include/linux/timer.h @@ -83,6 +83,8 @@ extern void add_timer(struct timer_list *); extern void add_timer_on(struct timer_list *, int cpu); extern int del_timer(struct timer_list *); extern int del_timer_sync(struct timer_list *); +extern int timer_delete_sync(struct timer_list *); +extern int timer_shutdown_sync(struct timer_list *); #define timer_pending(timer) callout_pending(&(timer)->callout) #define round_jiffies(j) \ diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index dce3cdcc2de3..a1bf711a421e 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2148,6 +2148,20 @@ del_timer_sync(struct timer_list *timer) return (1); } +int +timer_delete_sync(struct timer_list *timer) +{ + + return (del_timer_sync(timer)); +} + +int +timer_shutdown_sync(struct timer_list *timer) +{ + + return (del_timer_sync(timer)); +} + /* greatest common divisor, Euclid equation */ static uint64_t lkpi_gcd_64(uint64_t a, uint64_t b) From nobody Mon Jun 26 12:09: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 4QqRTX004Yz4k79F; Mon, 26 Jun 2023 12:09: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 4QqRTW6XNgz3kFl; Mon, 26 Jun 2023 12:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cv9o6ISW6I2ZzmcOsnV0trz0ly4LLEKcGdYTtmA6VRw=; b=PbAjTvDN6GKQNn8SqeWfR61G37hwXz2dtsPzrMFzowrd5a+8Emkkp7VxG2wyI8IS9t+Qwc Y8UqRhDrXI0KZ/dXi1UACLhtAAPWC8Cz+BBs1RsN7afJYOrp1cQfGUQNn/l5qEvYlnV0cA a1RPM8K+e7VDblec2DnEZ2WuHba+laSUjcxpeAN7dR7aj/TvsS6RValPoK0G82W/t78l8m JZ3R+v70ke9xg7M3736BW73bh8CCjWqiWGrXJDPSovvGji61ug2UbPK0qG9HUeURO5u/UK DNa6qlNYJSL9UiE463Yf2hapUIEr2Wdp8ofDoGshKXM0ORdwojvbkn5JLIjgEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cv9o6ISW6I2ZzmcOsnV0trz0ly4LLEKcGdYTtmA6VRw=; b=dVtVbjNt5O2MlIy/TRL1UI4hH1fwuU3jKwQlHhUl92csdziQcgjKPa583XIT6x6K7Jdwjz 6A/2Hr12i8wWoGlf3o/FKFh5lEv0YVWo3S/W7FSWMueLvqF5XbSiFPM37QLs3k5/92L8Iq gQzCgALlweoP84o/hf87zXBTZ6Tk/RdvspWnaiwW9MA8s5kJsZujumj7TuXAoiYDsBoHC7 xPyvSzuuH2hTdhehhACu+QFxTMkgrp9SBye+SnRCalFEu/3ModZNlzWtUhJfBzgSgTG+H3 1UwlSoeX/x8b9jkcB/tLmviOEVNUTruahuEQFl6urX8L+7QRZEr1zuHnJDVf0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781343; a=rsa-sha256; cv=none; b=PmYn1xmI05GMtK0CDkIc0TO7nFhdavGhjOR6wEYJ//kF47XL6zslplPqeh1b1mno4UsKPh ZcARJyTJatKq0J04wkt5UXRtNE6CU/Td165pkcdBl3Oev92GRrCaaw81MT5Vdzw9X8NGHD ZKVlQk56C2q+x3MQsz6+lFkHUAZ/SdHZq6c9KZaZwkvZ5cKcPRy5oqw/sCJLLxB1r6vG2z eXc8flfB+XOcUaoahoUHqOSRvNJ1EobxL59QwdSbXzRnvwkkJB3sNRMFDr7IzleT+7jmSN YfJhzvRHql/7w2RJvX9ypdZf+yGhwkK9Wvu9KtRY/wCAWm3lTdA6CVHwkyOwmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTW5d3sz18Cx; Mon, 26 Jun 2023 12:09:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC937v083614; Mon, 26 Jun 2023 12:09:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC93Jm083613; Mon, 26 Jun 2023 12:09:03 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:09:03 GMT Message-Id: <202306261209.35QC93Jm083613@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: 38a7e400656f - stable/13 - LinuxKPI: 802.11: correct HE_MAC_CAP3 values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 38a7e400656f305389a76b4a1d2971b60ff7193c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=38a7e400656f305389a76b4a1d2971b60ff7193c commit 38a7e400656f305389a76b4a1d2971b60ff7193c Author: Bjoern A. Zeeb AuthorDate: 2023-06-10 22:56:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:25:53 +0000 LinuxKPI: 802.11: correct HE_MAC_CAP3 values While we had assigned dummy values so far to HE, correct the HW_MAC_CAP3 values to avoid compile time errors of drivers when shifting values out of range. Sponsored by: The FreeBSD Foundation (cherry picked from commit 51117ed11640e40e877872065ea039e9f97a9cd0) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 8b73dc1abe3f..250f07ee0669 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -614,15 +614,14 @@ struct linuxkpi_ieee80211_regdomain { #define IEEE80211_HE_MAC_CAP2_MU_CASCADING 0x40 #define IEEE80211_HE_MAC_CAP2_TRS 0x80 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2 0x1 -#define IEEE80211_HE_MAC_CAP3_OMI_CONTROL 0x2 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 0x10 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 0x20 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x40 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x70 +#define IEEE80211_HE_MAC_CAP3_OMI_CONTROL 0x02 +#define IEEE80211_HE_MAC_CAP3_OFDMA_RA 0x04 +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 0x08 +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 0x10 +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x18 +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x18 +#define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x40 #define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80 -#define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x80 -#define IEEE80211_HE_MAC_CAP3_OFDMA_RA 0x80 #define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x1 #define IEEE80211_HE_MAC_CAP4_BQR 0x2 From nobody Mon Jun 26 12:09: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 4QqRTY1bTTz4k77C; Mon, 26 Jun 2023 12:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRTY0b9jz3kLy; Mon, 26 Jun 2023 12:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VE8NqAisBcEJPok93R2HZz+X0Tu60Yt/vnXvq8BPt8c=; b=vDk4i8v/bTdwYJWOocFqVp4Owu86aNJm9RrAIa8PKScnLgWk6WuZDqE+07Nun3EWACALVX tRaK7QRJfp0pCeIy+oY348VOCd9o6SmNJBEpVviWV7hC1ZtJWzYarQfvTvUN4+Lz48mQ9j b5vdROw3PiGIcAV/oIGJDFCEvmeD8knYdr6QoeabdQjFBvMdmZFC+Enr3slzANFUyceyw2 UQ7SeNIdW09yEK8s0MfjneEerw7RS87MFeP0kPX7bkMStliR+zN4i8MehnBY+pWvkcUpGr FyhWSv6Ye+/UKdaPv50lRzbp2635q3C9Z+MPoPJNGb/AIurkXLyMeytHmM1tgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VE8NqAisBcEJPok93R2HZz+X0Tu60Yt/vnXvq8BPt8c=; b=TF3UY7iXuumvys5yaktk2UMAqUxCWnEGAflveBBLjGWDAZDb2HlWN50PY2jJSVFULIhcbq +SRLtbPOhRQnQcKsfdw6XMIArchojyYZ8KLiLxLgEwA2mXFHF72JGcM/D0hbeC/ZJvGTbt xU1nFhEV7uVT+cPlLhFTDmvAKrNw/7pBtQdJvtg+FrR1ZeanreobQXGfqATyueI843t9wQ MfSpUPt9CmWhRMkKgRhlorZxL7Bw80DN8NeacIExghHVo3pnpot2sdj0wG4F18JwjfF3Wc vr3jd4HGk1h8i3Izd7kxo1QHuwmaOy68eCbvzY53zp7loFRwytyhpdKatQehmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781345; a=rsa-sha256; cv=none; b=btTcTEm/Z2L2V4XUj+sVHOx1wm65bitaB9jXHWJgsCbEl6Lat+N422B+AEOEVYMENg6mY8 X2qeleJlUfs+p5GlahG21ioNzJXycLKd/GSTAlhcUZUBXLmQVhubXd+TJpsVVzi/YDTP4Q yHOUgzOiekxD67wFKLCeWJODCl0locWPFO3470mXLqHXxC5jYBx+h5aIFrV6Qb3dxLtoL2 NMQIcf8zkQr8qv0v/mn5DRr9CqC8YtemVIpmJazUSUcfzRIueRp97l4+cMhckAUxATKwiR slPLG3sU3M84liCeDQtDCSY5pFyXJ0QSWd056iah230V7N87TghePirCCmOu0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTX6klCz18Ld; Mon, 26 Jun 2023 12:09:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC94vL083633; Mon, 26 Jun 2023 12:09:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC94Cn083632; Mon, 26 Jun 2023 12:09:04 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:09:04 GMT Message-Id: <202306261209.35QC94Cn083632@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: 2c284913a976 - stable/13 - LinuxKPI: 802.11: improve scan handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 2c284913a97600a2c2bc1ee4fee4cdc0c4c2791c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2c284913a97600a2c2bc1ee4fee4cdc0c4c2791c commit 2c284913a97600a2c2bc1ee4fee4cdc0c4c2791c Author: Bjoern A. Zeeb AuthorDate: 2023-06-10 21:53:56 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:26:03 +0000 LinuxKPI: 802.11: improve scan handling Under certain circumstances a hw_scan may be downgraded to a software scan. Handle these situations better and make sure we free resources in all cases once. [1] Also leave a note about scanning all bands (or we would have to switch bands manually). In both cases hardware doing and driver saying seem not entirely consistent for all and all firmware. Sponsored by: The FreeBSD Foundation Reported by: imp [1] (cherry picked from commit 3206587a20de9810b549ba8fd0032f7ab884bbec) --- sys/compat/linuxkpi/common/src/linux_80211.c | 72 ++++++++++++++++++---- .../linuxkpi/common/src/linux_80211_macops.c | 21 ++++--- 2 files changed, 72 insertions(+), 21 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d0b760cd6f4f..eefa3de54125 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2669,12 +2669,7 @@ sw_scan: int band, i, ssid_count, common_ie_len; uint32_t band_mask; uint8_t *ie, *ieend; - - if (!ieee80211_hw_check(hw, SINGLE_SCAN_ON_ALL_BANDS)) { - IMPROVE("individual band scans not yet supported"); - /* In theory net80211 would have to drive this. */ - return; - } + bool running; ssid_count = min(ss->ss_nssid, hw->wiphy->max_scan_ssids); ssids_len = ssid_count * sizeof(*ssids); @@ -2688,6 +2683,18 @@ sw_scan: ss->ss_chans[ss->ss_next + i]); band_mask |= (1 << band); } + + if (!ieee80211_hw_check(hw, SINGLE_SCAN_ON_ALL_BANDS)) { + IMPROVE("individual band scans not yet supported, only scanning first band"); + /* In theory net80211 should drive this. */ + /* Probably we need to add local logic for now; + * need to deal with scan_complete + * and cancel_scan and keep local state. + * Also cut the nchan down above. + */ + /* XXX-BZ ath10k does not set this but still does it? &$%^ */ + } + chan_len = nchan * (sizeof(lc) + sizeof(*lc)); common_ie_len = 0; @@ -2704,10 +2711,7 @@ sw_scan: common_ie_len, hw->wiphy->max_scan_ie_len); } - KASSERT(lhw->hw_req == NULL, ("%s: ic %p lhw %p hw_req %p " - "!= NULL\n", __func__, ic, lhw, lhw->hw_req)); - - lhw->hw_req = hw_req = malloc(sizeof(*hw_req) + ssids_len + + hw_req = malloc(sizeof(*hw_req) + ssids_len + s6ghzlen + chan_len + lhw->supbands * lhw->scan_ie_len + common_ie_len, M_LKPI80211, M_WAITOK | M_ZERO); @@ -2737,7 +2741,7 @@ sw_scan: c = ss->ss_chans[ss->ss_next + i]; lc->hw_value = c->ic_ieee; - lc->center_freq = c->ic_freq; + lc->center_freq = c->ic_freq; /* XXX */ /* lc->flags */ lc->band = lkpi_net80211_chan_to_nl80211_band(c); lc->max_power = c->ic_maxpower; @@ -2774,12 +2778,48 @@ sw_scan: lvif = VAP_TO_LVIF(vap); vif = LVIF_TO_VIF(lvif); + + LKPI_80211_LHW_SCAN_LOCK(lhw); + /* Re-check under lock. */ + running = (lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0; + if (!running) { + KASSERT(lhw->hw_req == NULL, ("%s: ic %p lhw %p hw_req %p " + "!= NULL\n", __func__, ic, lhw, lhw->hw_req)); + + lhw->scan_flags |= LKPI_LHW_SCAN_RUNNING; + lhw->hw_req = hw_req; + } + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + if (running) { + free(hw_req, M_LKPI80211); + return; + } + error = lkpi_80211_mo_hw_scan(hw, vif, hw_req); if (error != 0) { ieee80211_cancel_scan(vap); - free(hw_req, M_LKPI80211); - lhw->hw_req = NULL; + /* + * ieee80211_scan_completed must be called in either + * case of error or none. So let the free happen there + * and only there. + * That would be fine in theory but in practice drivers + * behave differently: + * ath10k does not return hw_scan until after scan_complete + * and can then still return an error. + * rtw88 can return 1 or -EBUSY without scan_complete + * iwlwifi can return various errors before scan starts + * ... + * So we cannot rely on that behaviour and have to check + * and balance between both code paths. + */ + LKPI_80211_LHW_SCAN_LOCK(lhw); + if ((lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0) { + free(lhw->hw_req, M_LKPI80211); + lhw->hw_req = NULL; + lhw->scan_flags &= ~LKPI_LHW_SCAN_RUNNING; + } + LKPI_80211_LHW_SCAN_UNLOCK(lhw); /* * XXX-SIGH magic number. @@ -2790,6 +2830,12 @@ sw_scan: LKPI_80211_LHW_SCAN_LOCK(lhw); lhw->scan_flags &= ~LKPI_LHW_SCAN_HW; LKPI_80211_LHW_SCAN_UNLOCK(lhw); + /* + * XXX If we clear this now and later a driver + * thinks it * can do a hw_scan again, we will + * currently not re-enable it? + */ + vap->iv_flags_ext &= ~IEEE80211_FEXT_SCAN_OFFLOAD; ieee80211_start_scan(vap, IEEE80211_SCAN_ACTIVE | IEEE80211_SCAN_NOPICK | diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index 762a54e4a823..16b502b1ca49 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -43,8 +43,9 @@ __FBSDID("$FreeBSD$"); #ifdef LINUXKPI_DEBUG_80211 #define LKPI_80211_TRACE_MO(fmt, ...) \ if (linuxkpi_debug_80211 & D80211_TRACE_MO) \ - printf("LKPI_80211_TRACE_MO %s:%d:_" fmt "\n", \ - __func__, __LINE__, __VA_ARGS__) + printf("LKPI_80211_TRACE_MO %s:%d: %d %d %u_" fmt "\n", \ + __func__, __LINE__, curcpu, curthread->td_tid, \ + (unsigned int)ticks, __VA_ARGS__) #else #define LKPI_80211_TRACE_MO(...) do { } while(0) #endif @@ -215,18 +216,22 @@ lkpi_80211_mo_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct lkpi_hw *lhw; int error; + /* + * MUST NOT return EPERM as that is a "magic number 1" based on rtw88 + * driver indicating hw_scan is not supported despite the ops call + * being available. + */ + lhw = HW_TO_LHW(hw); if (lhw->ops->hw_scan == NULL) { - /* XXX-BZ can we hide other scans like we can for sta_add..? */ - error = EOPNOTSUPP; + /* Return magic number to use sw scan. */ + error = 1; goto out; } - lhw->scan_flags |= LKPI_LHW_SCAN_RUNNING; - LKPI_80211_TRACE_MO("hw %p vif %p sr %p", hw, vif, sr); + LKPI_80211_TRACE_MO("CALLING hw %p vif %p sr %p", hw, vif, sr); error = lhw->ops->hw_scan(hw, vif, sr); - if (error != 0) - lhw->scan_flags &= ~LKPI_LHW_SCAN_RUNNING; + LKPI_80211_TRACE_MO("RETURNING hw %p vif %p sr %p error %d", hw, vif, sr, error); out: return (error); From nobody Mon Jun 26 12:09: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 4QqRTZ1zFzz4k79M; Mon, 26 Jun 2023 12:09: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 4QqRTZ1M3cz3kML; Mon, 26 Jun 2023 12:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z9eES1opOEZTjFzyPO8Bxcngbgt+PTVYvUT0CkSj/1Q=; b=BMoQmc5zXQh/HHYWIr1OWKlCl9/kXiWiMQo1ety1ebeL8bUG8QWDLGqEQ+FcQdGA1gH+6R uu6+HPyf3+/Y52pKHSM4zb+9uiHPL2OlJS5hHIsbccY/P/8jv229SHDhUJhA1NTTfVVYVd VGVRmaIiatEm2TPED089d6XWjyttnjXvCOfgKItfltIV2ha14qbTjVtf+bFcGq6nsolGfS JRw5F2x4wPGj9gsJESA4YGvDT09BC3cNlI9891qwtftL+iLRHzl3NGPy57z1kfVi54XoyT DDYvMhuv2MO/IjfddWVelqOnVxVRBTEPlBQOUsVXvPOrEldRyBM2ha0bP4NJiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z9eES1opOEZTjFzyPO8Bxcngbgt+PTVYvUT0CkSj/1Q=; b=uoIKoCYQ08QJsdeGG4alxrU2Yodkdr28gL0dl3bxojBW3xNxwHBNCTCIlsRaIKbAU7Xqn3 RpjOG/TespWfplH2oHwsju7wK4vXZeS7+IdpkNuvCtM5IRJaYf7LJUgFcceoqac07EiBzu SjBu6ZPOQuui45zlqsylREEpn6Hivz/+adLsovNEKAQPvS/euYKVDJsiGJd2hmQOnpCspu oXbiab+4IXZeeKsCRyGkBpVXBrPGY3+o1WegNuula14M2lq/+TDAO8GkFaPGaPAyjYDWOy z45yRhfNrPVzcC/hLKcPBaD2FrfW/NkvhpL+VFQESAVigMm7TVS9vmMcImfm5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781346; a=rsa-sha256; cv=none; b=WzGLlm5PPlHFy6/PKi0qSLFS01ZMCdB4KwmIneoTSoIb32U0+bFI88xCqDpAZuTU/mmU7O ggtdgmAm+2fIFkiY2H3BBun1aoONDwGmVz2DiYpj/2QhGoAqL2Dsr1KCUPiG3PW7aob3JU NGQ0ALoqgEa+cdNoIh8ScnwLnChSFVwnHUwuEy/QRGXz+YtRgfY9MLra0IIZRYy7Ke/TXR lE/ZveesIFlM/DySytZwYUWboGrxgYRoG8V9/mXvfG+ntzCxIcF/sFRibzF39lI71+jHzL p5UPA+jxiue44Ddhz1ztzBse8aKj4LQOFiVpvqq/ki1OBCVC6N5pw4dE1t9Imw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTZ0Rfrz18TY; Mon, 26 Jun 2023 12:09:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC95Md083652; Mon, 26 Jun 2023 12:09:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC95FK083651; Mon, 26 Jun 2023 12:09:05 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:09:05 GMT Message-Id: <202306261209.35QC95FK083651@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: 992075d8f9ed - stable/13 - LinuxKPI: 802.11: initialize txq List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 992075d8f9edb9db87bc1361227bebdec7222d86 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=992075d8f9edb9db87bc1361227bebdec7222d86 commit 992075d8f9edb9db87bc1361227bebdec7222d86 Author: Bjoern A. Zeeb AuthorDate: 2023-06-10 22:18:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 09:26:15 +0000 LinuxKPI: 802.11: initialize txq In 5a9a0d7803382321b5f9fff1deae5fb08463cf1a we omitted the initialization of the per-hw txq settings. Fix this. Sponsored by: The FreeBSD Foundation Fixes: 5a9a0d7803382321b5f9fff1deae5fb08463cf1a (cherry picked from commit a5ae63edd59453f23d51a0cc61922bd3e1e4cce4) --- sys/compat/linuxkpi/common/src/linux_80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index eefa3de54125..adf8391bbe9c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3521,6 +3521,7 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) struct ieee80211_hw *hw; struct lkpi_hw *lhw; struct wiphy *wiphy; + int ac; /* Get us and the driver data also allocated. */ wiphy = wiphy_new(&linuxkpi_mac80211cfgops, sizeof(*lhw) + priv_len); @@ -3534,6 +3535,10 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) LKPI_80211_LHW_SCAN_LOCK_INIT(lhw); sx_init_flags(&lhw->lvif_sx, "lhw-lvif", SX_RECURSE | SX_DUPOK); TAILQ_INIT(&lhw->lvif_head); + for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { + lhw->txq_generation[ac] = 1; + TAILQ_INIT(&lhw->scheduled_txqs[ac]); + } /* * XXX-BZ TODO make sure there is a "_null" function to all ops From nobody Mon Jun 26 12:09: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 4QqRTb2rxFz4k7Cg; Mon, 26 Jun 2023 12:09: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 4QqRTb25wwz3kVv; Mon, 26 Jun 2023 12:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjMREq/U1xZTs1jrICgiXaK4vRsxPwHOxYQJEzFo8AA=; b=crtEx97CQnq8Dzly5IIwgTqLmmAJFjYvHps088BknZNKuxmUbiXsTW3Gc+AdaI1W+g/JX9 dRI1ubXoFKRT8mzxUx1hXnrso7Y7kHVWxIRyGwIdY8HtuK3WF4j9+P9tXcYNO1B6Z57cZA mHPp2tfQ0wiCAZc4jcPnDSv61hEZFQpA8oG+73NUhc78Ln/rNDrDXFfIIRA+yor2xWpadM SDqiHe6ssQWSGjuJvWQodjndVjTIb3mtIk7a3C3pnIKCVjrcARdJZW+c3dvSgu8I+zUYv0 I79/RauYkU5Hk1eglBbr+m3zn34uGS8BTHQ/mj7cVxIFyO1oGqsjohGiBumFEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjMREq/U1xZTs1jrICgiXaK4vRsxPwHOxYQJEzFo8AA=; b=AX8BD7jrwjTzQuyN4OCczE1hYOAyuEVllzDqu+DYleqMjlPMizAFuSuhHSicyEhTr3xAyf 5H//IYa1xk7DxIU9a99ZJD8UcBXVUlqfB36D1UaqPXGQGegwwGpGMKIGR0WKT3vmViH77t l2AxArAD7biYDmnKc5NDphajxUpdgHH1KVXWFS+qI7TTSYDP47yn1JTuZWoikztLfeC4b5 kfk2N3KlEj49z6niPQYXos4YPSjeKJ2ftlviIrJZbBcxZDM9bDgUz0TG7nLXj9ip7bpgTy aPgbeQdfJIisXSMLfS5D9Tz1YseoPb5SoigeUK0Dow8476oyKZPaFxSnmgxZWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781347; a=rsa-sha256; cv=none; b=pwhiZurDeiEL9SoVSQtjMVhpVgrGiMrsQX2pF8mAE0spOqMkJgUGwX+XbtcNAIcckMvr+Q cVp97obpk885u08r+3eaiANrFiY6dQsBWoafNh5NP4KXB4+wyq6bm0XwAUVa0BHmE9Hciz fEj4/AV5zQ5SLWlpnI7oy8WHAN7OG09yeiup2MtKjwI40KSxVniz8mdbb6EdUTEK+r0sc3 IWjiqtdmQ+pGL4OK/E0movOMEq3aFPDXPi/7NXDMXx/sNVqHPZYy1y4Fso1VPHCIbPr9Qk iQ7Xgg/niC18JaOD8Itq41LHK/fcXwETdLnID3p8BvqtVMtcPmLjopH2wMfuVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTb196lz18P3; Mon, 26 Jun 2023 12:09:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC97cZ083671; Mon, 26 Jun 2023 12:09:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC97lQ083670; Mon, 26 Jun 2023 12:09:07 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:09:07 GMT Message-Id: <202306261209.35QC97lQ083670@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: 6c9bcecfb296 - stable/13 - net80211: fail for unicast traffic without unicast key List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 6c9bcecfb296b96a383012e02bc9582260588339 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6c9bcecfb296b96a383012e02bc9582260588339 commit 6c9bcecfb296b96a383012e02bc9582260588339 Author: domienschepers AuthorDate: 2022-11-10 00:00:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 12:02:00 +0000 net80211: fail for unicast traffic without unicast key Falling back to the multicast key may cause unicast traffic to leak. Instead fail when no key is found. For more information see the 'Framing Frames: Bypassing Wi-Fi Encryption by Manipulating Transmit Queues' paper. [ I updated the commit message to reference the paper and the code comment to record historic behaviour as discussed in private email. ] (cherry picked from commit 61605e0ae5d8f34b89b8e71e393f3006f511e86a) --- sys/net80211/ieee80211_crypto.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index 59760d1e7d9c..f5941392465b 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -560,13 +560,17 @@ ieee80211_crypto_get_txkey(struct ieee80211_node *ni, struct mbuf *m) /* * Multicast traffic always uses the multicast key. - * Otherwise if a unicast key is set we use that and - * it is always key index 0. When no unicast key is - * set we fall back to the default transmit key. + * + * Historically we would fall back to the default + * transmit key if there was no unicast key. This + * behaviour was documented up to IEEE Std 802.11-2016, + * 12.9.2.2 Per-MSDU/Per-A-MSDU Tx pseudocode, in the + * 'else' case but is no longer in later versions of + * the standard. Additionally falling back to the + * group key for unicast was a security risk. */ wh = mtod(m, struct ieee80211_frame *); - if (IEEE80211_IS_MULTICAST(wh->i_addr1) || - IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)) { + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { if (vap->iv_def_txkey == IEEE80211_KEYIX_NONE) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr1, @@ -578,6 +582,8 @@ ieee80211_crypto_get_txkey(struct ieee80211_node *ni, struct mbuf *m) return &vap->iv_nw_keys[vap->iv_def_txkey]; } + if (IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)) + return NULL; return &ni->ni_ucastkey; } From nobody Mon Jun 26 12:09: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 4QqRTc4mpmz4k77f; Mon, 26 Jun 2023 12:09: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 4QqRTc30wrz3kgj; Mon, 26 Jun 2023 12:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qw1Zyo9JifWrTBSmCrCwJr1DUzlfdPAc3IvGVJ3zrk4=; b=Xv8+hawZqIJi3E1dGaM8opHT7/JeDvXvGfyBuycLaUhKBfoZhCVkOYqMbGbnfrHCtDP4en 69RvqIIgCyDc8FEyKPW5+zweFawmRVvi5CdTf3waVSCjz4o25SECw6ahRWYRRM5xTarR/y 7Kad3uquIvDTyDJMUQhABavRN1mYuc/l/r+Q8cLwCHDctY2YH9dIrnPLrCLZtXYcidAtdB i99wcqHWAmtff4NzD729JQ5wTz1CtW4geeF9IGGtwGlZmJfTa0PT/37vfPmw+erGJI3ZIA 4PsZ6L2yFcnA5gIIFTKFF1gxs0WZaX1h2Tzyfm1atLE6lF2mLjoRs7U97140vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687781348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qw1Zyo9JifWrTBSmCrCwJr1DUzlfdPAc3IvGVJ3zrk4=; b=uSqloxy29yzkO1dGhMwtu6WSuD/BVH2T2Q642I5Jx0C9U2O8vNW4RyiiQ6rsHAwlDLmWSN M42gD7BYhRpnck1OLNZKUUuNFW0FdcFPbkRayiwfhlHE76mgngZqkkRuXzHL3uZQJ2XXVA /fKvSrY/d3L83e27HS0UzRC+hGCTrW+pyXOuDbv4os25AwkNIQmAyYgAR4FOjmdO8mw3sJ Fu4JpHh4gmW5InQ8pptkOJhOXWeGkJIcJ3xavlC4HM8V0YC4ITz46rg52gtu/btQM9BZj7 2yL4+0rCc1zZiSOsEFd80j4K3m0r2CezjEYakKs+lxHE9yFhwJ1te6I80Tqb7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687781348; a=rsa-sha256; cv=none; b=eIeAXTP0JjwVLGMUw4oqwsOK/03+1n54/QHTo4dZBDOz8dF7G+fI3V/pO3SLQYeNcaN1ee D0unDjr/AIx7ER5I4ColqvQ8/qwSsVvNu3oIFxp9HEpX3mLkNYA5n5L9Br0CPhFM/vDZIs 7WHkZ6lJl8nTYN81SbmZRl9ahPKe5qRJafCS+Y4oRN2SeGeuib+4w6k0T6POSoyQEHkGtt 3+QrMBfROZniZ8HJ2qqPPWvfmN5JBs7dUqe/eetJbm19W4IJJHPPZdwtbEdeRkejFS13Ht ppzvkUGf+Wl6YyF0WNMeihkQYoG+N4bWb2G8NUzlH1MqBh0mwrQRaeCwQj/dnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRTc26zgz18TZ; Mon, 26 Jun 2023 12:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QC98BX083696; Mon, 26 Jun 2023 12:09:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QC98nH083695; Mon, 26 Jun 2023 12:09:08 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:09:08 GMT Message-Id: <202306261209.35QC98nH083695@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: e982b1cf1fe1 - stable/13 - Bump __FreeBSD_version to 1302506 for merges of LinuxKPI changes. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: e982b1cf1fe1dc0b84dc24f03d1c21e3fe6bdef3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e982b1cf1fe1dc0b84dc24f03d1c21e3fe6bdef3 commit e982b1cf1fe1dc0b84dc24f03d1c21e3fe6bdef3 Author: Bjoern A. Zeeb AuthorDate: 2023-06-26 12:05:50 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 12:05:50 +0000 Bump __FreeBSD_version to 1302506 for merges of LinuxKPI changes. Sponsored by: The FreeBSD Foundation --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index b57c5afb5d05..6a0328d8aa45 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1302505 /* Master, propagated to newvers */ +#define __FreeBSD_version 1302506 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Mon Jun 26 12:29: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 4QqRxG4bnyz4kSkT; Mon, 26 Jun 2023 12:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqRxG4BSwz46x7; Mon, 26 Jun 2023 12:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687782578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jy8n+XmFsuYsmNMnOFOo5CwDqgTq22twiZGXItMGVZc=; b=OgKI7lu/7CKZtDV/uaTfiYOLiq6pbNB4mPhA9LyZ5hfPQMlyYwJG9Mly8KxqGYi4TTWQid 2jye0qfJarhNlz4oclPAB4IM/Tu/JSRvHvRxzdycYOGuu/PUvNpMnB5FSc9256Fm+bdPfI MJZK1JnlfrwkpR1H8VM9RonCC46vWMA1vuuCT+tkDdu8MqG/ArV3Mw9ub8GT9BT92pwNEK yUWpZoom70/QP4ILoeV/nm57vAEBll+PwijOwARhP2IqoMB+fLDDdNPkXCxegPMTL6Zrj8 yPs1qm+2iZZAK6VgU9CCGEqnBKgeC45mLshMZ9XvCcViOwsNR2qepJDJiLbblQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687782578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jy8n+XmFsuYsmNMnOFOo5CwDqgTq22twiZGXItMGVZc=; b=dbzRG355w9KipGRcZ7e35HNkh3CpEx9/G979Jj+OpoIXCI1ZLqvJM7bbysijIERy45qDmp mbbIWJgsNFeQBhdGXrPbU+9jSxA+oKmCdOrjLxHjXGeLg1Kt6FPduZookuod63QCElYQOO uGbZzXuEzPRHXG/uxKLruHWdwUXbF5SUvVik9Wsix4u9J61xjrwnzCuJzP+4o2o3apIc0p KVBHJfEm2quvRk2HK49kw+RS+EzMuilPYfYoD91fJaj8x3JmoBJjreigrABGMtZcpXm0Zb LE+n8lIO/+0Hk9qSFBRTMnoIYEz1SqG2nmEzE7aPcAXYwgWu/tn8DWD/4D2M0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687782578; a=rsa-sha256; cv=none; b=GNwbfHyt9s0MPsyJxoVi26ojHg/Qtk8CFv044nbZPz+0lVCIYs6Fjlht7suRw/ScJPJzGv 3eWSbrfRzfsNOE7E/4JHbbccNvk1lS5W9vs6aA29vKjNCY9k5fdgvCMcZ26qyM5UD2xfkp iN+6YRkKIFJoo+GbELisli46gHZMWHfUGYwk3mcTRti0R8V1/kTwt5G8ErlYwwtPczzHoI nqy1CfCa3WLehLPC54I2Q1+3f6UY2tZyWMNYmXvFrMJVtIkegKiFy/44AtpLig19zgEROq N4z8bCKLn+AgUzdKh5TmSScQiGgZJs9HZjEmjksHBQ3xRuXBDzLXS3apEh7zAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqRxG3H5vz194W; Mon, 26 Jun 2023 12:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QCTcJd017509; Mon, 26 Jun 2023 12:29:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QCTcVk017507; Mon, 26 Jun 2023 12:29:38 GMT (envelope-from git) Date: Mon, 26 Jun 2023 12:29:38 GMT Message-Id: <202306261229.35QCTcVk017507@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: 84d538470bce - stable/12 - net80211: fail for unicast traffic without unicast key List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: 84d538470bced9b1a45064c7845c92551a15e3e1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=84d538470bced9b1a45064c7845c92551a15e3e1 commit 84d538470bced9b1a45064c7845c92551a15e3e1 Author: domienschepers AuthorDate: 2022-11-10 00:00:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-26 12:28:52 +0000 net80211: fail for unicast traffic without unicast key Falling back to the multicast key may cause unicast traffic to leak. Instead fail when no key is found. For more information see the 'Framing Frames: Bypassing Wi-Fi Encryption by Manipulating Transmit Queues' paper. [ I updated the commit message to reference the paper and the code comment to record historic behaviour as discussed in private email. ] (cherry picked from commit 61605e0ae5d8f34b89b8e71e393f3006f511e86a) --- sys/net80211/ieee80211_crypto.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index d565b3511170..0e605bf13a43 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -560,13 +560,17 @@ ieee80211_crypto_get_txkey(struct ieee80211_node *ni, struct mbuf *m) /* * Multicast traffic always uses the multicast key. - * Otherwise if a unicast key is set we use that and - * it is always key index 0. When no unicast key is - * set we fall back to the default transmit key. + * + * Historically we would fall back to the default + * transmit key if there was no unicast key. This + * behaviour was documented up to IEEE Std 802.11-2016, + * 12.9.2.2 Per-MSDU/Per-A-MSDU Tx pseudocode, in the + * 'else' case but is no longer in later versions of + * the standard. Additionally falling back to the + * group key for unicast was a security risk. */ wh = mtod(m, struct ieee80211_frame *); - if (IEEE80211_IS_MULTICAST(wh->i_addr1) || - IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)) { + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { if (vap->iv_def_txkey == IEEE80211_KEYIX_NONE) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr1, @@ -578,6 +582,8 @@ ieee80211_crypto_get_txkey(struct ieee80211_node *ni, struct mbuf *m) return &vap->iv_nw_keys[vap->iv_def_txkey]; } + if (IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)) + return NULL; return &ni->ni_ucastkey; } From nobody Mon Jun 26 13:51: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 4QqTly57Jfz4jHGs; Mon, 26 Jun 2023 13:51:42 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QqTly2SNNz3wKm; Mon, 26 Jun 2023 13:51:42 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2b6985de215so24756941fa.2; Mon, 26 Jun 2023 06:51:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687787500; x=1690379500; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M8B8g4UXqSUFwnKIfYBjze9dS368jwo0SZfkqKvRYaQ=; b=BNALj2FGg8jNip30f8ZtIdyd3VCPYOiucfuPH8PukC6ZbFm0v7af+Pe2NqT+gIy12K +/pRw5ahir/vamrVy4TFgorqArYHP9mkxJe0oUZkv7FZJELszNAsahH2pqX0h/+22MXS VzCfy/x31/i3n6fslF0oMZZkzETEvMr52Laifg8wZ0wRWGvOpYtEH8WoFFTB19SDlP4H GBflW0M10VZEtzgGVaMEGykEq8sZV0Ob6BR02dxkcr6LOwyeRmm3o6KPYAT2jkD5q/5t oqAXClptNAy3WnT3s+XnKbCEZzbONRjfGJSJgxJPqLx+j0dRq+3XuYXpbFGh8foMIoNw 0E5g== X-Gm-Message-State: AC+VfDx1NONUo6IjvnSHYLSmHIdFWzAXp/25bX+3Qb3pgWUMYxDmKmz3 alwrib7EBOBLsiS2hNkqhNe8Bc/zEGspVHoaIQG4sWmJ X-Google-Smtp-Source: ACHHUZ6an1J5e3cwHVjBh7Qk8PHcuI6IljE3YzQCQhXnWMuPiBGnX1YnPl7syIcdIlInG1q9TaZbRGyFZtp9G2XkDRY= X-Received: by 2002:a2e:980d:0:b0:2b6:9d02:ab86 with SMTP id a13-20020a2e980d000000b002b69d02ab86mr1951326ljj.33.1687787499517; Mon, 26 Jun 2023 06:51:39 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202304261748.33QHmA7N034068@gitrepo.freebsd.org> <7q923q7s-381n-7537-qq21-18r104s319on@SerrOFQ.bet> In-Reply-To: <7q923q7s-381n-7537-qq21-18r104s319on@SerrOFQ.bet> From: Ed Maste Date: Mon, 26 Jun 2023 09:51:27 -0400 Message-ID: Subject: Re: git: b73183d1a243 - main - ipv6: disable RFC 4620 nodeinfo by default To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4QqTly2SNNz3wKm X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > > URL: https://cgit.FreeBSD.org/src/commit/?id=b73183d1a243d486e3889bd71800e94812f5fa17 > > > > commit b73183d1a243d486e3889bd71800e94812f5fa17 > > Author: Ed Maste > > AuthorDate: 2023-04-24 19:41:45 +0000 > > Commit: Ed Maste > > CommitDate: 2023-04-26 17:47:59 +0000 > > > > ipv6: disable RFC 4620 nodeinfo by default > > Has OpenBSD changed it from 1 to 0 as well by now? They disabled it by default in 2014, and subsequently removed support entirely. I think this code could at least use some detailed review. From nobody Mon Jun 26 16:30: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 4QqYHP1QB9z4kZh1; Mon, 26 Jun 2023 16:30: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 4QqYHN1dJbz46Bp; Mon, 26 Jun 2023 16:30:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687797040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gXg8FxS8XjnEGBnkp6xIj48wjlqxqCpxyfIEHNtBdqM=; b=Q70Xf9IaLK5Qk8e0N44EWa8ioMqbT4ZvfHHfyucbULRcFaZWaqFPcLjlEJx3gmay/qygGv c502VfQA/g0wMyP/VvZookpfrgyTRI0myjI6pAQMblH5SP8oSyYErsgQNpkmgcIE64AP25 RBtvsdR6IJhSscy2Hr4kOUCT/9FXWA81ErIX2tNZJUYGnnHZZYzeihgtvXgM5dOJlr30E8 EGtSnd2glfbtT+zaUAEag1dmttE0lJlPaG19+ehUWQLucbjKUuiexPChzOEgUFVRVaqL69 We6bFI9q1ZFA9gxiV1Vu4vOMkyhSNvsRhEAcKG7YWgyMxTIj+fJ/3s805Gafrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687797040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gXg8FxS8XjnEGBnkp6xIj48wjlqxqCpxyfIEHNtBdqM=; b=fn3arE8vXqI5AbznXqqCL0aQLPkm5d4AacqV9pVGItG+1r4DRIMEuiUEPl/m2BoeS4IWZW tqDGMVmGF9N3Tl2bxT1VuZX8WUHwyZ78TZLX1wvUEKVDczp/meiv7AkHODljZhKYoifhKO uj/rjXX4QfXJ2Ebb3y4kDOn6Dfku7aI4TESomKKtyTqMA4F4k7RJDFU96o/NJQ98f5XxtJ Pdkn8+ZXKqCfL/SNwt+UJkGbqeWoWP9RPdmWZZRlCbXvSmW9fqmEFs0ghjMMjYxtVaEUKY 4keXsod/UjBVcYTUkpcFsDZRThi3kB6dNzMYH46sn8xVsBx2LeLf+QI0mp62bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687797040; a=rsa-sha256; cv=none; b=jAovL9T0uMHaitv7i/5qGLRNzI7Qm7o5Phu8qUywKAfZfgQ3JEeacNwHYXiGQ+Qgst+7d1 jzyR+QPJ+LNv+VUleLHC/dD7ZLwn2r2oEhOmGNaZk802OyTNccJz7SeDqGHkbPbC0llvBd s98ZEoVR5duvaJ+du2HPYs0sh1nRTpQoslJ8f8y5gKjyKst81fHAtiy04A0jybMy25N6Zm O4eRvMppq/kO3HhmYhMoisoexfmf17+8XCOPdTNZEkaKH2scjnM9IKYGVS+4n//+9KiycO GTRiJS9njcggw9gyD/+FQ8koCR154uSfpVz4ZL7T8isyDsB84leGsLdj6/Ef/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 4QqYHN0Q0DzHRH; Mon, 26 Jun 2023 16:30:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QGUdXV025492; Mon, 26 Jun 2023 16:30:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QGUdRk025491; Mon, 26 Jun 2023 16:30:39 GMT (envelope-from git) Date: Mon, 26 Jun 2023 16:30:39 GMT Message-Id: <202306261630.35QGUdRk025491@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: 6403f0ac1281 - stable/13 - seq: fix potential NULL ptr reference List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 6403f0ac1281a9f95f387c98ef17f88f59714e56 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6403f0ac1281a9f95f387c98ef17f88f59714e56 commit 6403f0ac1281a9f95f387c98ef17f88f59714e56 Author: Mariusz Zaborski AuthorDate: 2022-09-30 17:36:04 +0000 Commit: Ed Maste CommitDate: 2023-06-26 16:30:31 +0000 seq: fix potential NULL ptr reference asprintf(3) allocates memory, and there isn't any guarantee of success. MFC after: 2 weeks Obtained from: OpenBSD (cherry picked from commit 94c4f663bab58ec07584786dd76866011d5b2506) --- usr.bin/seq/seq.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.bin/seq/seq.c b/usr.bin/seq/seq.c index 7559dbd9ce20..47ba0b7ce3af 100644 --- a/usr.bin/seq/seq.c +++ b/usr.bin/seq/seq.c @@ -199,8 +199,12 @@ main(int argc, char *argv[]) * loop held true due to a rounding error and we still need to print * 'last'. */ - asprintf(&cur_print, fmt, cur); - asprintf(&last_print, fmt, last); + if (asprintf(&cur_print, fmt, cur) < 0) { + err(1, "asprintf"); + } + if (asprintf(&last_print, fmt, last) < 0) { + err(1, "asprintf"); + } if (strcmp(cur_print, last_print) == 0 && cur != last_shown_value) { fputs(last_print, stdout); fputs(sep, stdout); From nobody Mon Jun 26 16:30: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 4QqYHP3X3Hz4kZh3; Mon, 26 Jun 2023 16:30: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 4QqYHP2VdXz46Bt; Mon, 26 Jun 2023 16:30:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687797041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xLXbu4UnNaBIE+iMuP9A+xVGwiEstvjoXv1ZuRdZ3Cg=; b=KtVFtEk8B2zHBJ9NCIfT0l10eEgB4QAiFjTKSR3HTW4dSGZ5iJmNnpmVHvHe6VZFX+784U Poba5Gw5w2jkpdNWNgWf0Yzx0/KTaWWiXhndTUw4PSRlfU2MhjWShuCYTeQvZniS+YV9F/ nfOAWnu+c2+AnB7ZYi2cPXL4zHs4Sc2GrrG9Enf8qLKnor9JYVEjekz7+dX9WJRKktxP0G iilrPu4myE+u7XtTrR47NeIGJrMgZxKqp0hZ7gyn8rNzCyKSZpapeklMjSDa4hYW5Tl5mZ PcnleuMu1kFVHUpn6g17vicjsNrmoehsJGc0VBVWaW3YIpwRwmapsnhSQ8a0Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687797041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xLXbu4UnNaBIE+iMuP9A+xVGwiEstvjoXv1ZuRdZ3Cg=; b=lzMP5M/7pWijUa4MWA5Ac1l8YteK1jy3n3t2esBAvSdxYywY7V5PZF3K3Hwhfe5fCkyt5J LYR+bKT/2kYPZLBHkxY9mdN9a2Bo1KUXb6WUtXwFw+y0vl3HRyoYC6CBJk7g8LVEpIz/rf ncHei3oe5n4CRD3Bkp/y0RLSX1zvMSxvvuEfDQKmG061phrc60+oIgbSdIito+iz7/WQ0F +cu5dPNGUaBuOg38tQDyB5sjHv2Mej7aerKByXT8d7VDdSKw/O8uqxckoBhs9jbG7G4nYd NJIoc6ht3A17uMT74eguTa37MCgQqVH7lfx46cdqnOobmA+9RLtgsF+FFA+lgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687797041; a=rsa-sha256; cv=none; b=tSqIsd0aWvWFx/enNSmI+Q84YITf3PimTJCmz+TZXbjpVEKH5pl24YK9F6NrbRDvfq2GJG MBijGAavhC4/k98Nydi6zh1naUp32QBFavYDJmHM40LyX7hcJ9z4u5TfGLETTItYxMOiXt LFqg9LgCpTuHaNMcxlFluHGFiJiVtyFfjEc/PlDY+cWAe1Q0FKXMH6EMmOboT8OBFkgoFQ nBjtnxt/xDL776H5yyC58vL/edt2j/qD1on+LnOgo0KRVEmUCYj2aWG4BRPYSTwLqz1CWH oAuAR+6VkGJ2R3AN5ejd9f7azRMbs6r0JD/1hAADcFbeivbZgBWHpbDzR3iz2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqYHP1LmYzH1q; Mon, 26 Jun 2023 16:30:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QGUfXU025523; Mon, 26 Jun 2023 16:30:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QGUfUN025518; Mon, 26 Jun 2023 16:30:41 GMT (envelope-from git) Date: Mon, 26 Jun 2023 16:30:41 GMT Message-Id: <202306261630.35QGUfUN025518@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: 5b59888c3d0d - stable/13 - seq: fix style nits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5b59888c3d0dab25d672a0c2e8eba3ba938ff2f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5b59888c3d0dab25d672a0c2e8eba3ba938ff2f7 commit 5b59888c3d0dab25d672a0c2e8eba3ba938ff2f7 Author: Mariusz Zaborski AuthorDate: 2022-09-30 17:38:34 +0000 Commit: Ed Maste CommitDate: 2023-06-26 16:30:31 +0000 seq: fix style nits MFC after: 2 weeks (cherry picked from commit 6da5e5d649ba255d41318daccc24e7af6984e0b1) --- usr.bin/seq/seq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/seq/seq.c b/usr.bin/seq/seq.c index 47ba0b7ce3af..823e8c2c4da0 100644 --- a/usr.bin/seq/seq.c +++ b/usr.bin/seq/seq.c @@ -151,7 +151,7 @@ main(int argc, char *argv[]) if (argc > 1) first = e_atof(argv[0]); - + if (argc > 2) { incr = e_atof(argv[1]); /* Plan 9/GNU don't do zero */ From nobody Mon Jun 26 16:30: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 4QqYHQ65Ylz4kZmv; Mon, 26 Jun 2023 16:30: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 4QqYHQ46pkz46Hf; Mon, 26 Jun 2023 16:30:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687797042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpXEJ4kedeHIG2jVhNW61OgwSyPT+IaLlbl0WkEM66o=; b=vQ2mGJWldpmLTSWtpB7CLNqsxnhtZ/sdWQ8sEYaMS0Z6ocmFls5UKk3ecYY6+ZtKmsdeZs LlN2yDv3iGhnYopx7AX6rAfshmZSTHmvf/kv0g2cKx+ZHTp7TW1yIdk6emqfbTYI5+K0Pf m9YPTIvss4XHGvIKb8kMAJ3OaAjb8VYFKPaA8RuVejqr75KaKehayBKGvjURjY9zvtOeZc Mjt+2jWu8FViDRC7AlUtsM/XT5etIqTxcSmJp/AS01Mwn0YMaxBMuOiAJeC0wEZWuCNvhU yTLMb9MmD5NoV4KWgVA89OF9Cw9I/TdzTpY4cevOWmMEChuomNu/+dkoG3odxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687797042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpXEJ4kedeHIG2jVhNW61OgwSyPT+IaLlbl0WkEM66o=; b=iTsuMjGGiz9dKXBaMPF+Zdzj+fYSUCMZ+zabjkxhZ2dgAlHvhO7kPYA+UHuBr3kpRsvnnm F9kbv1ZNn7IITeMj0UPMNoxYxC+xHSH0/dwmPagCzITKvBRnr7mRFmpN1s9OuHtLtz1fPL rSkLJ4h+uodcVEIvrsHP1L8fgCsSpI1MdBbUJLlwH5rP4ohe4T0iPnXcYWP5rjndiOZcD0 46wCyC+h5yzK4sIwHpxLrtcxB1JQ/DWiz9n7lBYrVcX7QL0ESmcKnF/c6F2kgOHxVm60LM hDZHwxldRW3WiBa0IV6yt6HK8geMjBTqwKC4DARNKFJeXhBfxFbm6R26l5j5QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687797042; a=rsa-sha256; cv=none; b=NStI1A0ClukdWNURGHwn7JSQv0M2f5SvTeZE1yGObE/oL6gESO6s8IWHGXLJ6+2qeuv+OB S4RGNfiQr8O4KBjIHNVEz6CC3NnSgX96qrqRPVAxiWsTH7AgY4UEOwFsj2qDjIoRL9pLAN G6ERDuRwN02HYkkien10/hhhijWnyek46AxzfRayeWI3RJYmDHygc2cC3wqhaXFLoXjgLa QxnkK/tG624HEBeAQK9DARyUn4wgiRzcb6ahiqXp0zjmo37dj7Rt7eHNRIFc8662U72ZL8 ytwCTR1YZ0sUHcbve7FE3fB7dFw3U3LG1yfrGEehXM/GpdipBj5WxxDe3AmDQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqYHQ2FbQzGmp; Mon, 26 Jun 2023 16:30:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QGUgkk025543; Mon, 26 Jun 2023 16:30:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QGUgGJ025542; Mon, 26 Jun 2023 16:30:42 GMT (envelope-from git) Date: Mon, 26 Jun 2023 16:30:42 GMT Message-Id: <202306261630.35QGUgGJ025542@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: 70af4d57c18f - stable/13 - seq: fix check for rounding error/truncation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 70af4d57c18fbcb46e3d7d7501cad756f812bed3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=70af4d57c18fbcb46e3d7d7501cad756f812bed3 commit 70af4d57c18fbcb46e3d7d7501cad756f812bed3 Author: Ed Maste AuthorDate: 2023-06-19 01:37:06 +0000 Commit: Ed Maste CommitDate: 2023-06-26 16:30:31 +0000 seq: fix check for rounding error/truncation Based on OpenBSD 30f0fd29ba6c: > We need to compare the printable version of the last value displayed, > not the floating point representation. Otherwise, we may print the > last value twice. PR: 271964 Reported by: Daniel Kolesa Reviewed by: yuripv Obtained from: OpenBSD Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40601 (cherry picked from commit e54db9a9ccd588f650a2e57bf9d1cbbafc0e12eb) --- usr.bin/seq/seq.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/usr.bin/seq/seq.c b/usr.bin/seq/seq.c index 823e8c2c4da0..50c6b6022967 100644 --- a/usr.bin/seq/seq.c +++ b/usr.bin/seq/seq.c @@ -88,14 +88,14 @@ main(int argc, char *argv[]) { const char *sep, *term; struct lconv *locale; - char pad, *fmt, *cur_print, *last_print; - double first, last, incr, last_shown_value, cur, step; + char pad, *fmt, *cur_print, *last_print, *prev_print; + double first, last, incr, prev, cur, step; int c, errflg, equalize; pad = ZERO; fmt = NULL; first = 1.0; - last = incr = last_shown_value = 0.0; + last = incr = prev = 0.0; c = errflg = equalize = 0; sep = "\n"; term = NULL; @@ -186,7 +186,7 @@ main(int argc, char *argv[]) cur = first + incr * step++) { printf(fmt, cur); fputs(sep, stdout); - last_shown_value = cur; + prev = cur; } /* @@ -194,10 +194,9 @@ main(int argc, char *argv[]) * * We might have, so check if the printable version of the last * computed value ('cur') and desired 'last' value are equal. If they - * are equal after formatting truncation, but 'cur' and - * 'last_shown_value' are not equal, it means the exit condition of the - * loop held true due to a rounding error and we still need to print - * 'last'. + * are equal after formatting truncation, but 'cur' and 'prev' are not + * equal, it means the exit condition of the loop held true due to a + * rounding error and we still need to print 'last'. */ if (asprintf(&cur_print, fmt, cur) < 0) { err(1, "asprintf"); @@ -205,12 +204,17 @@ main(int argc, char *argv[]) if (asprintf(&last_print, fmt, last) < 0) { err(1, "asprintf"); } - if (strcmp(cur_print, last_print) == 0 && cur != last_shown_value) { + if (asprintf(&prev_print, fmt, prev) < 0) { + err(1, "asprintf"); + } + if (strcmp(cur_print, last_print) == 0 && + strcmp(cur_print, prev_print) != 0) { fputs(last_print, stdout); fputs(sep, stdout); } free(cur_print); free(last_print); + free(prev_print); if (term != NULL) fputs(term, stdout); From nobody Mon Jun 26 18:44: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 4QqcFs2HV5z4kD3J; Mon, 26 Jun 2023 18:44: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 4QqcFs1mWpz4FS5; Mon, 26 Jun 2023 18:44:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687805073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ht3QpbnCaIJDvyhTM/2yAiez/91FVhBLjE38h5HpEOo=; b=qUEdwS4j590bJTEXAHlYj2ZdVUNyUEJmuhHGNON1fn92dGNr32drpBG2GbrgvLKckUeLq+ khRkDyfV+XI1qMc65phsb+Yl4PxWUwcrQcZONRMON4+ULOvMaqYv4JxgYE2l5yn5b5zPws yl30FnCRkL996l71a6m2tFzYwFKoEQpObOksSYxAvNqFhdt2btNREJGuTYXio5U08X/xc1 V8maCVJBfx1K5z+WVXnMYtxaWQgbrOEKWLw406x8MEteGBqHcs877Nluhri0KpsoBEkBvm Fcc37pBjZQWdH8ili5MbqzNK6mYkThHNPsRGLl8scz0/wCAtz6+1HSEZ0dCQZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687805073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ht3QpbnCaIJDvyhTM/2yAiez/91FVhBLjE38h5HpEOo=; b=aYNU8zPGQG2ierFAIWTodhD9qZdKXU2gubM6kgKk9x8+Qjl6zoZwznyqi+x5lQmZ6U9D3c +BGs0QnMdH/8Y2Clbyz30m5aY4VK3XJfiNkJ41j+YlK2J13r5SlhChGNHAl+xcinDWC3a8 TIJJa6JnRmegHXV4xpNO4vxU9fcW3fGuQX0+dt7PlxqIH9sTrt9LggBwQsb2GPq9/QQoSW 2mhBDjzI7e1Tjoi8NG3lzm/znGTf3Owu5f0CwhTdBi8GvqBGvmR/W+xbNnXBpuaWSTzs6W 0ekMclFUfeFX5Q03AWKHzpZ0nf677Y1DXLpiOAuUVsGmQBapwkrSlK6mtTdL3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687805073; a=rsa-sha256; cv=none; b=TWqiPwaf8yBddk1qK9hVt7BjbpAvKyNID9nixiZchS64uN5YNZJgQ5TiAFLOnXBq1AQzjH SruhlrZgBL/heQuYFGpwluEDI39D3nWNeubRvncMlBxyoCht+w2phYhUYLRug5xKGX7Aco +WmVWawNotHIPoiJoVcjrUR8xXw/YfXQVqHm1gsTolKtSXSWH+gzlg/drVOSDTR9sWFmxN IKfIKfgQZCaDhUPxmxHnCfn1CQu7zWW7iifTiyL1dWMmuOSHI3StW0D5X3uWoie1f2auGS tcDVh7CZfjD9F1eAdRidon6BcWFklnaMD5HaXv8SnQwZeXEMpTFLz1mZC9n/Ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqcFs0pz8zLn8; Mon, 26 Jun 2023 18:44:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QIiXkT047212; Mon, 26 Jun 2023 18:44:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QIiXot047211; Mon, 26 Jun 2023 18:44:33 GMT (envelope-from git) Date: Mon, 26 Jun 2023 18:44:33 GMT Message-Id: <202306261844.35QIiXot047211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: f81be7a8318b - main - rc.d/routing: Correct setting default gateway for each FIB List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f81be7a8318b178e406c12d98f78cfa2a4229af7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=f81be7a8318b178e406c12d98f78cfa2a4229af7 commit f81be7a8318b178e406c12d98f78cfa2a4229af7 Author: Andrew Fengler AuthorDate: 2023-06-26 18:40:21 +0000 Commit: Allan Jude CommitDate: 2023-06-26 18:43:46 +0000 rc.d/routing: Correct setting default gateway for each FIB There was a mistake in the previous commit, it used the incorrect spelling of the FIB variable name and was not functional Also corrects an issue with the IPv6 default route variable name. Fixes: 30659d1dcbcc ("Add support for adding default routes for other FIBs") Sponsored-by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D37685 --- libexec/rc/rc.d/routing | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/rc/rc.d/routing b/libexec/rc/rc.d/routing index 37b3da0f0cef..2f6500938e6a 100755 --- a/libexec/rc/rc.d/routing +++ b/libexec/rc/rc.d/routing @@ -171,7 +171,7 @@ static_inet() ;; *) static_routes="${static_routes} _default_fib${_fibnum}" - eval route__default_fib${fibnum}="'default ${_fib_gw} -fib ${_fibnum}'" + eval route__default_fib${_fibnum}="'default ${_fib_gw} -fib ${_fibnum}'" ;; esac done @@ -247,8 +247,8 @@ static_inet6() [Nn][Oo] | '') ;; *) - ipv6_static_routes="${static_routes} _default_fib${_fibnum}" - eval ipv6_route__default_fib${fibnum}="'default ${_fib_gw} -fib ${_fibnum}'" + ipv6_static_routes="${ipv6_static_routes} _default_fib${_fibnum}" + eval ipv6_route__default_fib${_fibnum}="'default ${_fib_gw} -fib ${_fibnum}'" ;; esac done From nobody Mon Jun 26 19:52: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 4QqdmG0nMHz4gWY0; Mon, 26 Jun 2023 19:52: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 4QqdmF6cZMz3RFD; Mon, 26 Jun 2023 19:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687809149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6DcrzqbCEC0z4BfPAwfhZ8odkT0kUen7eZWCpOgSxlI=; b=tXa91vB3m8Jj/nlmR1lZie0JjGxsA2Hb0C6OqO1Qh/+MPUvKfBuW625pUH1K9pzW19jDkx aenq6j3mZp5wiTQxHywqc9PqHyluUHuNkYUc0EHiLF+Un7MHZU5tkbI/rZkxR2E7fv/oMC i3PSbku+hBpxhWIBlpSx1wGjLhjcVDM84T+gVTFc8LO1oqJNt7qGkW9Cvc/8bc1zh4A/nc mv6i5oZ+O9pDFMkThI2sp6xll2XnEkQ2a7z9IrKAUa5lt9rSjpLlXdR4N5jas4BB8KWUn6 53vJqQRYIPIK07pTHoz+o/CsoZHn1GSMJ25wQ/KcNoBasWCZ6SHELLpQ1l/Daw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687809149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6DcrzqbCEC0z4BfPAwfhZ8odkT0kUen7eZWCpOgSxlI=; b=wbtN/S9DgaYlLKfq1GaKX3mBigl+BcM+APX+exNGap35MM1tGshxEFVWOd535dQoxxxVwF 3Mo+AQg3uOh1zGp3j+dq8d4YlF5IX7OmkVicc4/+ShikRxBrC73es/I/GZ3HkOyUHbu3TH +AR9R8HteQf+2kBUdri4zKQdPKXsJ3jd8qnab8zIrJDUNlKLGxKca2J838oTFHONcxP3NI RYoDV+zn51Xdj/ijQpM0aG+O20oO2BO97CvULyW9n9ye/tdkFEIf9Lar42IIBjH1O/7q+7 /mur6jeY+YEFWWnyUFWCDBu7/SxtCFntJyyQslumqgQhLT4Jnr43dofurKS3zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687809149; a=rsa-sha256; cv=none; b=kdDXsDNt4vZgDPebEKltmJSO8Hc7iiXvbSg2PMAOLA08fROCwUPqJLnN5dru4AbL5JAqzm djMVWYZnyw0gazQ1iTYKE0kNwQMphk9kiJ/xv0kRj4ut4IlDu8DDS4ACfoe51b/bBtlvsK NYxxf2kdzMqquNxkWMVBGCi/+PHuCUQVOSzL7qcGqV100HbPbQDU7qDulHcgD71dBP2TqY 0OWyzI49M/FOKA1QBVtBP3mBoJRzEDd0sMtEIa9S1hL3+clKhXV4fyKAQ4BG/tBhgHsj5c Nd/A3OCoNj840KJRzFAuKE5COq5MHodzJB99Am9kfz2oGrL8cCVCmIg8q/B69Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqdmF5hmMzNNc; Mon, 26 Jun 2023 19:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QJqTfQ063641; Mon, 26 Jun 2023 19:52:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QJqT5g063640; Mon, 26 Jun 2023 19:52:29 GMT (envelope-from git) Date: Mon, 26 Jun 2023 19:52:29 GMT Message-Id: <202306261952.35QJqT5g063640@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: 8beff65a4a2d - stable/13 - x86: Add defines for a couple of thermal and PM 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8beff65a4a2d230c1937df876c7041ea3f5c2f04 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8beff65a4a2d230c1937df876c7041ea3f5c2f04 commit 8beff65a4a2d230c1937df876c7041ea3f5c2f04 Author: Mark Johnston AuthorDate: 2023-06-19 17:26:07 +0000 Commit: Mark Johnston CommitDate: 2023-06-26 19:52:08 +0000 x86: Add defines for a couple of thermal and PM bits MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit e60316d1eac91000e187ae248839fca31143090c) --- sys/x86/include/specialreg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/include/specialreg.h b/sys/x86/include/specialreg.h index 1b109b48818b..2d3d2b8080ae 100644 --- a/sys/x86/include/specialreg.h +++ b/sys/x86/include/specialreg.h @@ -338,7 +338,9 @@ #define CPUTPM1_HWP_PECI_OVR 0x00010000 #define CPUTPM1_HWP_FLEXIBLE 0x00020000 #define CPUTPM1_HWP_FAST_MSR 0x00040000 +#define CPUTPM1_HW_FEEDBACK 0x00080000 #define CPUTPM1_HWP_IGN_IDLE 0x00100000 +#define CPUTPM1_THREAD_DIRECTOR 0x00800000 /* Ebx. */ #define CPUTPM_B_NSENSINTTHRESH 0x0000000f From nobody Mon Jun 26 19:52: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 4QqdmH1rwgz4gWhV; Mon, 26 Jun 2023 19:52: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 4QqdmH0V4Pz3R8g; Mon, 26 Jun 2023 19:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687809151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAgf1ASUkauytZjSdLECBBaD82pn/PirKmO1g5d1AOg=; b=KXYfj+HuVdHZIQ5HyTUX5SxJLuhN4U3cnH5aiZdvGk/leZApwTUTcnwKe6xwpP8H6i/n4H InRdsbbiKkdwvYW0yxnehms1GQFaVy8HppI0tM2U0T//Z42hcQ3KE1VVptgsoTWoZ5Mt3T ract0QFocHUq1+wAqNszp2vdTFOZ3AD4tZTay7zwZy3bA5GY2m+q0IDvm5ifSIqwJNKH7H nH8QsNlml9mgkNFoF2dOW1v+4dV2a4Nd2P882LhOenYfBJnEIMAibauc+44yZTSzaBJWrf cmh/IbJxLVELQRr8pYc3BfGLD3evVHFn/uYw3CKRtF1tZJ8JCPSffPPX9ZR1bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687809151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAgf1ASUkauytZjSdLECBBaD82pn/PirKmO1g5d1AOg=; b=G9knfGTsnIWZfcXZfLi/P0jZPtiCNaphXSotQopnxlObGGdn4DaoyVzdd5aPpuAHEACkrQ T/8xIResMWl8A73qCM/vcL8vnLst/RU0eCG9TnUwAXY3DkdtNtNEdkh44eJuzfZ+5Gi+hc D904LVoP/g72T8QnR1NjxkqksjcWZvfIo1MePSF+UB0O72fNdiTXD22oIyq2cMS08XoffR KjZc98VVQEXftl9jK8yiqDb+lGq1SoLHaLvoE8m2z6mPpDKqCfdy9oVRaaaLxhU23fEp59 1fMgVvnd38B+Gu9NnPWjEL7OYwwH+afbKvhVRZ3C8Eam3dcA9EY1ftYiT5em0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687809151; a=rsa-sha256; cv=none; b=d7rrf2WQIbT/JRmwVAcDA9XLBAmgifUVE5wqsDVPCMn1Qk8ErOqtiRi7W5uEkVHoC69plX eukUwWkJfRvmdXf+sfs0r0W92EExhnFN5ujfgrreqwZL06iUJ6g6FFCfCcTmI6om5P6F2V UPiFmXxU4q4+39t30AXS8yWVtC0nfIU3MyvrwJDCXL9OQLPVTv5lX/tmwu6fWytiirYmio DJtn3wdminbISPMIO1ilZUjHBGerJaQWmEN3WIV1jJ5NNJjnHzkLmGRXQYE3h8q03l47KP KQdyNAG0gR0L2sJ20z9JAl0TXVWFzJaLkWSislJJn9IqOiH/iNcNDJFl90S0Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqdmG6crpzN3R; Mon, 26 Jun 2023 19:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QJqUFV063662; Mon, 26 Jun 2023 19:52:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QJqUIm063661; Mon, 26 Jun 2023 19:52:30 GMT (envelope-from git) Date: Mon, 26 Jun 2023 19:52:30 GMT Message-Id: <202306261952.35QJqUIm063661@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: d93451762782 - stable/13 - bhyve: Remove some unneeded includes of segments.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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d93451762782c89ab01480615e2f4da154b7733c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d93451762782c89ab01480615e2f4da154b7733c commit d93451762782c89ab01480615e2f4da154b7733c Author: Mark Johnston AuthorDate: 2023-06-08 21:24:45 +0000 Commit: Mark Johnston CommitDate: 2023-06-26 19:52:08 +0000 bhyve: Remove some unneeded includes of segments.h They are not needed and are specific to x86. No functional change intended. MFC after: 1 week Sponsored by: Innovate UK (cherry picked from commit 6d1dfc87416f451164e79ebdc4a0fb53b001bfd9) --- usr.sbin/bhyve/inout.c | 1 - usr.sbin/bhyve/snapshot.c | 1 - usr.sbin/bhyve/task_switch.c | 1 - 3 files changed, 3 deletions(-) diff --git a/usr.sbin/bhyve/inout.c b/usr.sbin/bhyve/inout.c index 225697906393..6e58f544b452 100644 --- a/usr.sbin/bhyve/inout.c +++ b/usr.sbin/bhyve/inout.c @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 37aba32a1929..3f805192bb99 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #ifndef WITHOUT_CAPSICUM #include diff --git a/usr.sbin/bhyve/task_switch.c b/usr.sbin/bhyve/task_switch.c index 0dfb536f09f8..1aac3c4bfea4 100644 --- a/usr.sbin/bhyve/task_switch.c +++ b/usr.sbin/bhyve/task_switch.c @@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include From nobody Mon Jun 26 19:52: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 4QqdmJ2VlSz4gWn1; Mon, 26 Jun 2023 19:52: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 4QqdmJ1k5yz3RJD; Mon, 26 Jun 2023 19:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687809152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHNvtzYaDhcahfcQt/BoApDg8bkT13PDhUaX96EF/A8=; b=FjMrQ3HZVgn9fKHMiRtS6XqS4XSoNREiF8zDDqXlD244sMiONziSOQuHZbskieQ8IQJ8Ox 11X/dL+MAcLtvBJVoBQTBjcd4pIpqWOzqQpAWLh+6mBoKoPlmt5xKKyXjYhlty9SI1Hr70 lR7Vcz1ilU0KdZVGAcVjqhglZItbsJomhGLZjWO0SpENX0na7ibMQ1VjpbZDXcdT8+vFQR xUucltgxvT1IBo52mRw14Yx7kQBwIFZFC538NLWzcCkM4Nb7+qNndtu/7c7EHrUzkK4cJo hXhAnUsIPNfmV6AgST3GQK4sTv0jyQQxGAqJEA/GYPTfEUQakmZOfDnG1DFziQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687809152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHNvtzYaDhcahfcQt/BoApDg8bkT13PDhUaX96EF/A8=; b=VRV8HDyHE/7yBvMfUbheTNS5qW4kHDI0v6i37ZMko7uXQkCRo9uIucHcumnAHFYIQ19R3B xdhDGIKtXgvwwd+jHJElGZm38bHbkqxlUp8qsEgvY0BXrOIGcZsvvci1rPCss5yK6p3CJ2 oXaLijnckT8h3w1EH9dEAIeNLw+uxNycBYseFMIgNMWLNP0sLrefZl7W2UKAYlCD/4Ames iAhp6ok+iISUwnNd6IPoCYBOI0tYhqJpOTeNPWF3wlf1cTaHkrA6REyiGK55dDF/+yWXaf 2GF4u/Le9ILDrH3OtkAkXrBggYoT+ESAdJhDENCRA9LFBKM671f5ujs28e2hPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687809152; a=rsa-sha256; cv=none; b=gHMXN9nHQ81K1bC3kEERxThIJTGiwZwkYp5vAQDFFrwxxoab3p9wVFTFh5soTMMFdn3xIX bY2l+dlU0ybCbb9fRGUnO9xPoqc1Fs1NKHbyXBHg3UO5cYbD7V2QIPrT7QMABzMKDIzfmn AvmSzin7mWaLxeabvbUawWXPaCEBWODSKD+d609q0YvojzFbhIHUik8A8CZ/o1jELDySfI abNPjVYZMBAuERbadJkOiUSfgxPn/ob7MyEanmEUcwC8QXEo24Qy7Ltt6T3mh8vqJDYcT8 G0bgY2VmSMVxl6oc3CUK+mHQGTYgR+R6irB7xOAPvUVnE0AhczEEOAmunCvliQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqdmJ0T2SzN3T; Mon, 26 Jun 2023 19:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QJqVKb063688; Mon, 26 Jun 2023 19:52:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QJqVCu063687; Mon, 26 Jun 2023 19:52:31 GMT (envelope-from git) Date: Mon, 26 Jun 2023 19:52:31 GMT Message-Id: <202306261952.35QJqVCu063687@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: b44b64eeff1d - stable/13 - hwpstate_amd: calculate power if P-state info comes from MSR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b44b64eeff1dac47fe0c0922a471b9785c27d266 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b44b64eeff1dac47fe0c0922a471b9785c27d266 commit b44b64eeff1dac47fe0c0922a471b9785c27d266 Author: Johannes Totz AuthorDate: 2023-06-12 16:00:15 +0000 Commit: Mark Johnston CommitDate: 2023-06-26 19:52:08 +0000 hwpstate_amd: calculate power if P-state info comes from MSR Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40140 (cherry picked from commit e74dd9577fb00518834a1bf07fad8c1d4c978d7a) --- sys/x86/cpufreq/hwpstate_amd.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c index 3193cbd908cc..3760b40ad397 100644 --- a/sys/x86/cpufreq/hwpstate_amd.c +++ b/sys/x86/cpufreq/hwpstate_amd.c @@ -85,6 +85,8 @@ __FBSDID("$FreeBSD$"); #define AMD_10H_11H_CUR_DID(msr) (((msr) >> 6) & 0x07) #define AMD_10H_11H_CUR_FID(msr) ((msr) & 0x3F) +#define AMD_17H_CUR_IDIV(msr) (((msr) >> 30) & 0x03) +#define AMD_17H_CUR_IDD(msr) (((msr) >> 22) & 0xFF) #define AMD_17H_CUR_VID(msr) (((msr) >> 14) & 0xFF) #define AMD_17H_CUR_DID(msr) (((msr) >> 8) & 0x3F) #define AMD_17H_CUR_FID(msr) ((msr) & 0xFF) @@ -447,6 +449,9 @@ hwpstate_get_info_from_msr(device_t dev) did = AMD_10H_11H_CUR_DID(msr); fid = AMD_10H_11H_CUR_FID(msr); + hwpstate_set[i].volts = CPUFREQ_VAL_UNKNOWN; + hwpstate_set[i].power = CPUFREQ_VAL_UNKNOWN; + hwpstate_set[i].lat = CPUFREQ_VAL_UNKNOWN; /* Convert fid/did to frequency. */ switch (family) { case 0x11: @@ -467,6 +472,29 @@ hwpstate_get_info_from_msr(device_t dev) } fid = AMD_17H_CUR_FID(msr); hwpstate_set[i].freq = (200 * fid) / did; + /* Vid step is 6.25mV, so scale by 100. */ + hwpstate_set[i].volts = + (155000 - (625 * AMD_17H_CUR_VID(msr))) / 100; + /* + * Calculate current first. + * This equation is mentioned in + * "BKDG for AMD Family 15h Models 70h-7fh Processors", + * section 2.5.2.1.6. + */ + hwpstate_set[i].power = AMD_17H_CUR_IDD(msr) * 1000; + switch (AMD_17H_CUR_IDIV(msr)) { + case 3: /* divide by 1000 */ + hwpstate_set[i].power /= 10; + case 2: /* divide by 100 */ + hwpstate_set[i].power /= 10; + case 1: /* divide by 10 */ + hwpstate_set[i].power /= 10; + case 0: /* divide by 1 */ + ; + } + hwpstate_set[i].power *= hwpstate_set[i].volts; + /* Milli amps * milli volts to milli watts. */ + hwpstate_set[i].power /= 1000; break; default: HWPSTATE_DEBUG(dev, "get_info_from_msr: %s family" @@ -476,10 +504,6 @@ hwpstate_get_info_from_msr(device_t dev) return (ENXIO); } hwpstate_set[i].pstate_id = i; - /* There was volts calculation, but deleted it. */ - hwpstate_set[i].volts = CPUFREQ_VAL_UNKNOWN; - hwpstate_set[i].power = CPUFREQ_VAL_UNKNOWN; - hwpstate_set[i].lat = CPUFREQ_VAL_UNKNOWN; } return (0); } From nobody Mon Jun 26 19:52: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 4QqdmK2gNPz4gWdx; Mon, 26 Jun 2023 19:52: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 4QqdmK29jvz3hDJ; Mon, 26 Jun 2023 19:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687809153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xddWsu/rcXy5XBOLChNIFb6oYxMNK/jTwpmgv+NDAik=; b=NAY8Bd5YEL92D57JQccvO9bZd4BS8rIwCOh4buYZUfZP3rRcvar+1YHKzXF9zd3WwNAGG+ KEMo9Bl1v0VrXPKAME3WgoxWH5iMnWqHx1gp1ldrZTWLxJ8Pz0Z994YJTS7iOcanx7MUOF 4/p4HGG3gv73E8GzS9yO11dh9/0yGTl6Wxy+OH9TpuT5X8pEXUA9t/mT2Iv8thZLlIA1Il 8Lv86YeYTDD/4pcFfmzX+5IW8Jyl8w2PEoojh4VXf4HRUWreToKNDwvhOJy/Z0awIHsOJE JYCA/L4wZrodFF6vlIWfM+PLL+xriaL9U8RnO239qpeExhUJEK5gUdn1yCnj+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687809153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xddWsu/rcXy5XBOLChNIFb6oYxMNK/jTwpmgv+NDAik=; b=ldxOr7ndpqarr1GCTI/JVdJ1+hABnfVy33Y46/yfbVOmHyZTfx70orscbnmscK+enHiyqI 5eHJ9AfJVjnJjboVqAk9kvspfF6RWDg+/Q8qk3f8HvI3lWAayYJhiKeGiQXdgrB5BT3jS7 JZpqpJJTYRducmKjDH4VUe846Qk/zcCoktd9/aAWyPunPkWFmIZt9YZxbJvXQyEIAuyEqE kwyZqo4+5CWy4PH2h0YLZ/hWGqs3RK51S2qqkkZq0QN9TYv4VE7gnX0fbCOCsOyC7/PqdV TBn7kNaHi1iyl/TAM2M3Cm8PXiIx7X5/mc5JmKTZYAFrq850N1h8a0NtrEEr+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687809153; a=rsa-sha256; cv=none; b=vK3+qN4TVz4dpU7lsmgpuuFOosbW3ZOajuGBEBqVXzh73kM0z5dTn+RbghxJrHWSLHZW8E ulqj1V1mzX8JzMxM7ov4APbbB6ME+boXjGXYQGexWUni8lYwHX7cKTjlyV+xNSlbZf5TT8 Ljwi+pOxhKycQyTiPg6AUYVieovu45QGbC6gtpW3mjn3bOsyZNYGd0lfxMhsvAFeM13TK0 vyTKRkOd8tIVt93omJ0/XION2dkyKXno+/E+rXrormkBIxl5rnqjhmn2e87evhZ8cZjwcF QCOfUOy0shKNrYSl9y6PjAHjFy6Himq3Jso4kItgOrk/XmGfInHRQ85VyqeXNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqdmK17kPzNXl; Mon, 26 Jun 2023 19:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QJqXqO063709; Mon, 26 Jun 2023 19:52:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QJqXdC063708; Mon, 26 Jun 2023 19:52:33 GMT (envelope-from git) Date: Mon, 26 Jun 2023 19:52:33 GMT Message-Id: <202306261952.35QJqXdC063708@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: 861fae6089cd - stable/13 - bhyve: Include vmm.h via the usual path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 861fae6089cd75641ebb2ca629d30da95d158473 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=861fae6089cd75641ebb2ca629d30da95d158473 commit 861fae6089cd75641ebb2ca629d30da95d158473 Author: Mark Johnston AuthorDate: 2023-06-08 21:25:25 +0000 Commit: Mark Johnston CommitDate: 2023-06-26 19:52:08 +0000 bhyve: Include vmm.h via the usual path No functional change intended. MFC after: 1 week Sponsored by: Innovate UK (cherry picked from commit 1da1a2643649ef83a5ddb2df16010dd2a48c1347) --- usr.sbin/bhyve/kernemu_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/kernemu_dev.c b/usr.sbin/bhyve/kernemu_dev.c index 2fa0c3dc1f35..503c40462715 100644 --- a/usr.sbin/bhyve/kernemu_dev.c +++ b/usr.sbin/bhyve/kernemu_dev.c @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include struct vm; struct vm_hpet_cap; From nobody Mon Jun 26 22:38: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 4QqjRx0Fmxz4hjS1; Mon, 26 Jun 2023 22:38: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 4QqjRw6tq6z3H5S; Mon, 26 Jun 2023 22:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687819117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZvRT3+IwMdJaTMJGRBGtkSi1tEJ15nBlcONlxwaYopk=; b=SnjGRlakUDNLe4i81D5AqoXexInBLuCUX7Ql2rVaiDMJkX2SQggP7BJ+wJD+08hGKTlGii Iei5V1Rm5c6ziu1nt58FZ7E5d8Yp0yCBOQQ2oV3VlmH3WVNH5DlDidz2o9jiJqyw4GO+nZ Gb3aUwiSoL2yyDCqfUny32fE6sBBhM8NOyPJUC0QeTmRLgBQDeUz/aifjdNHYopzuMdmhg bPLaEuXAaA3pZQQFoyxeCRBUK2T5sIMBYYOJaO628JgZed4a4RikUDd+20QKjAtIMt7AxN QoiyWEWUftWj1OgE3vdEBFiNA49RdfIFiGG9k6keE4MAHiLNgS2+Di3u6ionkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687819117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZvRT3+IwMdJaTMJGRBGtkSi1tEJ15nBlcONlxwaYopk=; b=IvJjvVqavVt2M3eohmaPUR/6YPKqod4KO1nAsE0z+TwgMbGXKEMp2RLl0aGohH1vSR8kBN dZD4gpjVbBjy1ggyTcH963VSso0Nh6EI2LQtw7DCf7O9+3Nwagdqi3CGetEWOckYxL4HOx 0zMdOezJkVqcW30gDBN+E8nJdKlRq/dJJETJMyB+0LSHFz+Z6smHxP3QKpJJigtawcL7cQ ABV8nJQGXUFqBfWm6dSwx6sn/hNAzrsv2L71X4ilwmUbidKr42yQI6wwiF7s5TNUHhCx1N ALAufklu7DjLaiZ5/GDiM4PEpi2+/vv83/DbOVnKrGdrHr0MFimVCnJ4QxK0RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687819117; a=rsa-sha256; cv=none; b=DGfov7o1tcHwHKT8WXEFGxlcwAWhX5Mv4AqUoCNIr/XK5AZ5ElWC5KNv48WmY1l5L2x0n/ c0wTgD1yB/IdhIkBCmKYBOKKzLdFSqKnqAPmfYUSKL7l0MRPK+0S5nY+KrDwWF9j+blKyX GUYlYcb5/7x3bYxaX8MXBilMbmDlPETzzqdoJ+oAkLY8qN2xkgd5BuaMO4AwM1QNWG1IHO 2E0BuS6s1uCgB/IqBNjW+bSShTj1e9lO5L0bb6HZUOPRtp62mAqC8WDecMYSWM9VtgBSts raMSxpppwdybeWjCgnA5lhfWkgSzuk9/eWZ1WbK4CflC34U/Izk41qlMWlkaZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqjRw5z11zS2P; Mon, 26 Jun 2023 22:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QMcaG7032006; Mon, 26 Jun 2023 22:38:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QMcaV3032005; Mon, 26 Jun 2023 22:38:36 GMT (envelope-from git) Date: Mon, 26 Jun 2023 22:38:36 GMT Message-Id: <202306262238.35QMcaV3032005@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: 70bc3f4331a1 - main - timeout(1): link to related manual 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70bc3f4331a1b6e7045ae5326cbe03428503b612 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=70bc3f4331a1b6e7045ae5326cbe03428503b612 commit 70bc3f4331a1b6e7045ae5326cbe03428503b612 Author: Tom Hukins AuthorDate: 2023-06-26 22:34:03 +0000 Commit: Warner Losh CommitDate: 2023-06-26 22:36:25 +0000 timeout(1): link to related manual pages Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/783 --- bin/timeout/timeout.1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/timeout/timeout.1 b/bin/timeout/timeout.1 index 88ceade7409d..0282d3409d02 100644 --- a/bin/timeout/timeout.1 +++ b/bin/timeout/timeout.1 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2021 +.Dd June 26, 2023 .Dt TIMEOUT 1 .Os .Sh NAME @@ -194,7 +194,9 @@ $ timeout -k 5s 1m fetch \\ .Ed .Sh SEE ALSO .Xr kill 1 , -.Xr signal 3 +.Xr nohup 1 , +.Xr signal 3 , +.Xr daemon 8 .Sh HISTORY The .Nm From nobody Mon Jun 26 22:38: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 4QqjRy1ksZz4hj3f; Mon, 26 Jun 2023 22:38: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 4QqjRy13ljz3HJp; Mon, 26 Jun 2023 22:38:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687819118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ar258ofUD10KDYgSidYbzMtE9KQV/AaweCrDqcfOmVw=; b=qVxVlylaBOTOeuLZrX5WlRbJaWyVB6IbDK40OztuYp2HhrI60Tjozvb7tRrU3RexbN8//X mSwCzDxSeySWUtHaEm1WgDa3fZikUfrjghcKrL8a6C0dw/NJTHjNqCzb16MvXnpSViKGxj iAIojjCVC9a73senJSA46GYEHLtRzLPsy0nQyv5JIFULuwMHMSv7oZWYThW4rEFrHBqYYE co5XABEWukhRF2/n7f9G4eGum2Rb4kj3f0nuBcH8SqenXdspyNPe2VXdG+HGtyoozretJa QYGh85dIquNKQ+Alke498VZWU64/eoFbTuUukOi302+SdSlV+a/Mx3kSeQc94Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687819118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ar258ofUD10KDYgSidYbzMtE9KQV/AaweCrDqcfOmVw=; b=ydWRbs793vBhbnJFgLegHT/0bSYSWsQ0k5zXidOLS0apPW6NoHMdJO5M7EeCTk7SZkt5R5 7XS+LBeJjYHlJvjfh6AbVY0QyJPofTib7ejOoPdNV8yMS6Ldrk78OiZ26p0GOwZh95ujfh WoHxQmMbZoxigGagQQVg6UYemVDLbG4Y/k2kB0V6RrOCEtYRFsSf/vPc7FwjTpPEwtD63v Ib5irHw0YVAi5KTLkfmeOCxeDjsZncyK06aF5wPcn2HIseGZ1PU2eyC8AvJcmGqJxAOKRQ W8F2FDhwWE4MB8J2oRU2OzJuk0f7UxA3LXaXf26QFyexhD5avpg83klKE5KnPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687819118; a=rsa-sha256; cv=none; b=oIKReGd9GzXOPEBeNWbr7M8otkOG0upOPPqlmqtinyGvEEaiZ02JXFhtL15A1NkXBKLkdD sSPJf9xiWPOtv/vuFPvcK2EgZ4hYKnkGDBCwz4ruiOHNiQhqlb7aB8UGkrjeJ5eHqeuD1q 44TrN9yR/q6W4Hk0eeIiup+N+aFibOQD63WRWQKSRjn0I7pxu7w7h24z6NTO/SWi6suznm oOmRoql5CSA/eeyIO+rnQeo6D6jPy4VxTFhfRKn0T6eC9VwWVK3YteqSAA5WMHAEY09K3n BzdRik0UDAZHmU2f7NUa3qdCAeUdSV+1mIKdvFLjrj5bjsMI41VMvb9LqUOeqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqjRy099xzSD4; Mon, 26 Jun 2023 22:38:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QMcbHV032025; Mon, 26 Jun 2023 22:38:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QMcbeg032024; Mon, 26 Jun 2023 22:38:37 GMT (envelope-from git) Date: Mon, 26 Jun 2023 22:38:37 GMT Message-Id: <202306262238.35QMcbeg032024@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: 3df959b5febe - main - nohup(1): link to a related manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3df959b5febeb489c96c1f428793e7985acb704f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3df959b5febeb489c96c1f428793e7985acb704f commit 3df959b5febeb489c96c1f428793e7985acb704f Author: Tom Hukins AuthorDate: 2023-06-26 22:34:03 +0000 Commit: Warner Losh CommitDate: 2023-06-26 22:36:25 +0000 nohup(1): link to a related manual page Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/783 --- usr.bin/nohup/nohup.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/nohup/nohup.1 b/usr.bin/nohup/nohup.1 index 084f521bd1e2..1bac6328264c 100644 --- a/usr.bin/nohup/nohup.1 +++ b/usr.bin/nohup/nohup.1 @@ -31,7 +31,7 @@ .\" @(#)nohup.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 9, 2018 +.Dd June 26, 2023 .Dt NOHUP 1 .Os .Sh NAME @@ -107,6 +107,7 @@ will be that of .Sh SEE ALSO .Xr builtin 1 , .Xr csh 1 , +.Xr timeout 1 , .Xr signal 3 , .Xr daemon 8 .Sh STANDARDS From nobody Mon Jun 26 23:01: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 4Qqjyl2zPHz4jtXp; Mon, 26 Jun 2023 23:01: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 4Qqjyl2YYMz3hh3; Mon, 26 Jun 2023 23:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687820511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qcNIDSSeX4IWhG57ERkKZOq/b6AUnFnkH5fGKpTRbdQ=; b=S13fcHb8vvJUAxjGvYiM2S4NYa4IrbVq04gWYYoiABoPhyxjCrPvSAuvVM5cQCdNB4V1OD tksnU3bWia+QxAusYKRWq/oeqkYj+ELJehKzbZjXcAWwbt6NFpmt1bujxsVlJuwH15o3/a hB1A6v98atpxqpcwQhbR15jChY75nEJ40OHy2IZSFk5SkoQv5fB3jCHptoRlVBeY2sw145 oH5V6IS1Qo9HRRuOvDRfByfdWlyGdwBToySHZO1bZOMLJzCaZj9V1drsntcoPh+2m9uijU t2zHUbEHz0PmYcGhhOWKhhgmReQTrl48q0ZwbgTG+UwmI9GamiwFQo8wzUzh3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687820511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qcNIDSSeX4IWhG57ERkKZOq/b6AUnFnkH5fGKpTRbdQ=; b=M9cAw6R5F1FTN8+9Arbf2yDXw/UTKADRVpsutAbvLjxjP5lFUa5ioA92VDzWvYLNnfC1sN E0lXcpl+gLHSe8fVhkDq30iyaHqrIZ4Osk3kQzaqmhtQmTqc8/MB9syVb7FwLikfZKct93 bh++UeTXEp+y74NFtLwJ/tPisEEgXQx9eMZdmF3qbhYzBZEjrB24JxUas5yD8uJ8+pwWIg Vv/gaJBQ0258/n6hFl07XkeIaHJ+foZdbvmvoypk2BQ7Rcbpb/aI8+MTBYS8lX0tBGiOd0 YrbyakFUOliKrXSHMa6wkwU+BAGRrdKyCE0E8reYWlDzN8P0D8zVjS9MN94ysg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687820511; a=rsa-sha256; cv=none; b=kvXlOokRZ290qTotLCrd9ud2a4+1k9nr4syMfOXnjkvaunHw3+JxQ25dJYqWlGqm6hoZlO bDfl7sNvuaBE04cwYZiuRQyGcYpep7/X6N1cQ21DKaKj51QjcrOnvvUYVKnW36V3KQFat1 hyLMKs+Mw/QGR6hS4wklNRkIBx/OSvu2L2mzil/F2sr43w4ithJ0TPWR4SVAuoENDaeQ5k 5+DOL8NZjdcAfuWbF55+hCHmjip6NI7vNbvsBykeISQOP1awKhMy3TTJ6Q2pv5qavawWht SCRR7bw9ZYYtG+9zbsheIQkxNBZ2j5bOEoaw8d8dg1aypkNmUZIi0c4fh5z4VA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqjyl1g3fzSqG; Mon, 26 Jun 2023 23:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QN1pMV081997; Mon, 26 Jun 2023 23:01:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QN1pjw081996; Mon, 26 Jun 2023 23:01:51 GMT (envelope-from git) Date: Mon, 26 Jun 2023 23:01:51 GMT Message-Id: <202306262301.35QN1pjw081996@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: 780332f1c1cf - main - loader.efi: Remove redundant error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 780332f1c1cfc38cf44daf29f39516be75d2f979 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=780332f1c1cfc38cf44daf29f39516be75d2f979 commit 780332f1c1cfc38cf44daf29f39516be75d2f979 Author: VexedUXR AuthorDate: 2023-06-26 22:57:28 +0000 Commit: Warner Losh CommitDate: 2023-06-26 22:57:31 +0000 loader.efi: Remove redundant error message efi_copy_init already prints an error message (with more information) if it fails. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/777 --- stand/efi/loader/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 872f78ba82b2..5e6a10adb98b 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1062,10 +1062,8 @@ main(int argc, CHAR16 *argv[]) */ boot_howto_to_env(howto); - if (efi_copy_init()) { - printf("failed to allocate staging area\n"); + if (efi_copy_init()) return (EFI_BUFFER_TOO_SMALL); - } if ((s = getenv("fail_timeout")) != NULL) fail_timeout = strtol(s, NULL, 10); From nobody Mon Jun 26 23:02: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 4Qqjzb4KVHz4jv43 for ; Mon, 26 Jun 2023 23:02: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 4Qqjzb3tFkz3jNM; Mon, 26 Jun 2023 23:02:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687820555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFOUMv1UzqVot6fiurQugzU87I7QZntt8jffSemt1vs=; b=j83V6ds70PSKQSk/l5esbZT1NvC4yGdFNgObivcXUV6BUoBLNpfxy+/Vbo/RD1ZZmbJG0W pEik+LjM3TRnEcQjoD1DJs1EtrrgJFsyF4uivEL83bXPzT4HUf+z+kk+09+RyVZ/r+CIhl E1WAU0BKLHHkA/1RM9lLdb0uo1QejCrLjstsDChD+WHiAbJdHgQ6+BmkT2eEmtDbqMcWXK rfe9tXVMTPzaobh7miI+AvBIkc0FV66wqpumwh0fTvkjpyhmp+s/QHh/XESkNp2Y6y/6wv /qoihBa7S6/iNltOBUPJIROfRo2EGgNlbxoDUR3JV2yCoMGK1EJORA5z/wP6rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687820555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFOUMv1UzqVot6fiurQugzU87I7QZntt8jffSemt1vs=; b=KLfYZI9fboWRuMW72LPuBvgD3wbJQb5S9c2kbe3/yBgxO9XWXbThLdPCitF5IlwgHNp+mh uMNeYPRwwnQlYIDINj0Hv7irRGM8wUykD2/3VkswHPMegmqgD//2aGupNbA6r1JSra1UNT 0cBHuM6b65IHnr9suerkU56zFLyhhV2F9t37DbLKXSbghfGlbI0Mu32HWGbQolAVE2K5cP 8zhtqbi+yXkhbN5U9gqRZTTfJAi2DuEwiS6rRB3LgXJcvSQixcfODTDoy1pfLnZhWrV9JR iwAiEpLZsPqit78uS+doMx0caZFwjxMBUwqukgaqGntJAncsRTN1G+Fpiehnng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687820555; a=rsa-sha256; cv=none; b=lNzXp7pwfNu87RH5yJoutFtPjB2qXnnmAWd6TBssWoA8Q6wPgZKvMJIHjjJTPdeerrv5F3 MGDJk4/TNfh2cef+32gwSVoLpCQviA0u1lMDi0UtOEcCwLTtmVA1vgu7V9HU9l0rVYG2LB MyDG38gAPaQs4kEQE3zXYKdUTdYQ6QctXwHjGkHPS7eCvbPDa+dP1/+2WLWTXYfz8BiT95 hsMfivMlpokkXF5g+uIEof7dgpD18lUEOa1a5BUn1VUoBOIGwgB8guQ20qohK5iuKWlPI4 B3QBsbqKmeznQTiaiZwVgOejtZRsva05DhGfEatkt6rvWDU+3KELngO1wOZFfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqjzb2h4gzSvv; Mon, 26 Jun 2023 23:02:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QN2Z8M082202; Mon, 26 Jun 2023 23:02:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QN2ZhK082201; Mon, 26 Jun 2023 23:02:35 GMT (envelope-from git) Date: Mon, 26 Jun 2023 23:02:35 GMT Message-Id: <202306262302.35QN2ZhK082201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 6f4e10db3298..b6a943f7197a - vendor/heimdal - 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/vendor/heimdal X-Git-Reftype: branch X-Git-Commit: b6a943f7197af1a5eb6bb028b9b808ec5016e30c X-Git-Oldrev: 6f4e10db3298f6d65e1e646fe52aaafc3682b788 X-Git-Newrev: b6a943f7197af1a5eb6bb028b9b808ec5016e30c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/heimdal has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=6f4e10db3298..b6a943f7197a b6a943f7197a heimdal: Vendor import f62e2f278 From nobody Mon Jun 26 23:02: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 4Qqjzc2PWTz4jv84 for ; Mon, 26 Jun 2023 23:02: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 4Qqjzc1cgJz3jdX; Mon, 26 Jun 2023 23:02:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687820556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcxcMBTXUrz9nvFAwgmBDWIq8uXmEDcJjPTHwcttjCQ=; b=FxGTyCugyY3hcoC6amGc0DeG34tfJAoPbLlAKQEqjwNVVMWCnz51pJ6IwuhNLBX69B4ATG Vp4PDuojiHpJen31CI6OLVTI6KRkrI5PHvBaPZSi+yUXpPj13ooDRQEcb0vA036CCGM3AA ROVYw1bsnCY6O/wvbzeuhOMl2cbl27y6saq9ip093kNnIjZaS3QDEzTRWoZ2/4qMBjDofV X7UoTMcGxwadfQ1YDee5MAOoqFZDadJCUVr4BGn5eRrB9JO1JzlMWChsOnpmAqPFI7Looz 6rMdQNfTo9fNpLIa8GrJUHpF2X2gltysQ3FEVttP5QMzHjjiLS+aPIhwZiLZPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687820556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CcxcMBTXUrz9nvFAwgmBDWIq8uXmEDcJjPTHwcttjCQ=; b=RGVkSItHiRs4at5Es7Z884J4iDaDG5QD6n+PhDBu4JrQ+7f0FkZUkdVKUpcJsx9OMR8QBw c1t3AC5jo/t2eisthX6DeKNvyh+faxCCfRxa3OTfbxsn0zc7yIsiKJYcvnAxPTCHLV8P9H 4mCOjytK0xaWK3GOmZZjkcRgRA9Tmvd5LqZG0U7w1FBg5MMMimWw8ZL2+6o4PElKmPte03 PPywgaLaIpH9ESzjobxsdhKUL47aUPkbvXpP7C8szGhyk94OnicSYcz5e8Uj1iOSKWN0E8 AgWJDFJBDxuOcG2dwLgqJAnJzol6thWYITRQXtcFH39LIH1cxdmtf+qPRNKnaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687820556; a=rsa-sha256; cv=none; b=fvc+uSJkvRdSqOc1uEUPXrrhP44EZl2OhgVGZucBEUEWTQhHmJuzDMnd9iPU2CQwzGKJ+e bv8wwT/a915WoxK8N3nXMliogEs4AhmjnzvzdAyukAnZJTHIIuJ5m20BtDWr7Xwr7zdhwq DDlgCD2KNnCAX3uT57HGV7LOLY52LcIkKB1MYykllILbHjkMD6XGTyhW9ozzJMJtu/jMLS XcnS2b3fZP0Cb4xndYTLalO41kJANplSOh1jSnrqPFJHMUBdcuYkAPOgXPo0csNQ7eTALk IX671BOjCF9p8kQ1aRVE9gehRosTMr4yV8fOaVPTQK0vKKXgzovOeSD4rG8eFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqjzc0FNfzT9d; Mon, 26 Jun 2023 23:02:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QN2ZIJ082221; Mon, 26 Jun 2023 23:02:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QN2ZSk082220; Mon, 26 Jun 2023 23:02:35 GMT (envelope-from git) Date: Mon, 26 Jun 2023 23:02:35 GMT Message-Id: <202306262302.35QN2ZSk082220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: b835c41723b9 - Create tag vendor/heimdal/7.8.0-2023-06-10-f62e2f278 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/tags/vendor/heimdal/7.8.0-2023-06-10-f62e2f278 X-Git-Reftype: annotated tag X-Git-Commit: b835c41723b96f5f4e180553fac88b87ee08dacf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/heimdal/7.8.0-2023-06-10-f62e2f278 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/heimdal/7.8.0-2023-06-10-f62e2f278 tag vendor/heimdal/7.8.0-2023-06-10-f62e2f278 Tagger: Cy Schubert TaggerDate: 2023-06-26 22:59:45 +0000 heimdal: Tag f62e2f278 committed by upstream on 2023-06-10 commit b6a943f7197af1a5eb6bb028b9b808ec5016e30c Author: Cy Schubert AuthorDate: 2023-06-26 22:56:52 +0000 Commit: Cy Schubert CommitDate: 2023-06-26 22:56:52 +0000 heimdal: Vendor import f62e2f278 Heimdal 7.8.0 does not support OpenSSL 3.0. 7.9.0 will but it hasn't been released yet. We are importing f62e2f278 for its OpenSSL 3.0 support. From nobody Mon Jun 26 23:10: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 4Qqk8p351Bz4k2MN; Mon, 26 Jun 2023 23:10: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 4Qqk8p2f1Zz3mGd; Mon, 26 Jun 2023 23:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687821034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DODB2hGvGFLk9P/oqH8pyLmFQNyh1aAHlaqfoMGqc30=; b=meLxA610GBAjKl/iO3Xauh0hDCILS6hM8UviFNsz20fZLqmKf/l5OJSuLZeZgypQhQlEj4 vs7ifbROPJSUXV5b6jp1dJHEZiZnmbwCyVOq9lsxEEpl4Q02M1ahyvCzy3QHOIR+jXjkB8 uBoWKHqLgtce9jOADwMTVhexLifrlIAwLICMpfKI7eV9rPVlQ8gFUxWgfAapRPMzgp2d8Q jE2Y4lHWpVAOFyD9D8FyzB7yynz4GakmKTtVllwxCiZ0YmhjXIHfG9TsshcFS3wUfGAF9X JF4aWo9VjYfHTkXip9EaUOwC3tQvX8dmkxYHamWwXWB2nHcFV5iCePsrak2Y7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687821034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DODB2hGvGFLk9P/oqH8pyLmFQNyh1aAHlaqfoMGqc30=; b=g1a7Rd6ng7KR+emlS99J9YXj0CgfDlxCFJsC22krClNDs+rr30UyWvFkKBS2aeQc8ELaRA TCMhgaW7+nKvhBuXdlcyyaJ4DitfymeaYWxnbE/shGIxHy3EeUfWLpHRs3OB8BLfrTlz91 wpvgxrJA3ZNnM7I4WI2N/xEu6Yh+VqFusoKpDfNW1qAXG2lX3F0X+RNQKIgXk+ht1YphoX 2I4bT1ubGm4UzlzcOOBTrXamBucxy1KM4VwyYWCDMBZL5ERNMxBmzqpVx88vDB0nWYBTgH lgDt6tulCCqfXKKtq33vNgdtaE69SLCEjksmFWTEdCzPzh3e8aFjBhOWfQrSdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687821034; a=rsa-sha256; cv=none; b=K8OOSFW8Da5TWGX2QsqpkK5jVxYpoTsuPh/YkIDmr6EleaGoDYQ9LumVLpoU/BGio87dLw 4McPDlJ5zmC/6lc177CxgcW80oRogT+bMF/VptU5lyDbL/afxoRaG3xOdbylxSptmExUxm AhXq9VpV/NYwalOniefcS4xssjDi+JJGV3A73aE7kRQ04N6kjjlmAgRB632cnnwGHUKfLT zm5kgrsk4eUDvCL/b0XQeN+wBFVuA0pgWVoa/NX5swHBJqtKaxgiLzx5mScd9E9Jcvw72N Gr+D+O8/5xJ8CWQyAnQmpBDK8hpkG+Qj872B7Us5dySxbbq7fLE6iUg484CkBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqk8p1lJSzSqQ; Mon, 26 Jun 2023 23:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35QNAYx9091791; Mon, 26 Jun 2023 23:10:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35QNAYM8091790; Mon, 26 Jun 2023 23:10:34 GMT (envelope-from git) Date: Mon, 26 Jun 2023 23:10:34 GMT Message-Id: <202306262310.35QNAYM8091790@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: e495600ce3ab - main - netstat(1): Use simpler language List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e495600ce3abd66169e93f763568aeae6969f421 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e495600ce3abd66169e93f763568aeae6969f421 commit e495600ce3abd66169e93f763568aeae6969f421 Author: Tom Hukins AuthorDate: 2023-06-26 23:02:36 +0000 Commit: Warner Losh CommitDate: 2023-06-26 23:07:27 +0000 netstat(1): Use simpler language Reviewed by: imp, Mina Galić Pull Request: https://github.com/freebsd/freebsd-src/pull/771 --- usr.bin/netstat/netstat.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index b215a792f333..e2ea7047456c 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -28,7 +28,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd April 19, 2023 +.Dd June 26, 2023 .Dt NETSTAT 1 .Os .Sh NAME @@ -101,10 +101,10 @@ .Sh DESCRIPTION The .Nm -command symbolically displays the contents of various network-related +command shows the contents of various network-related data structures. -There are a number of output formats, -depending on the options for the information presented. +The arguments passed determine which of the below output formats the +command uses. .Bl -tag -width indent .It Xo .Bk -words From nobody Mon Jun 26 23:14: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 4QqkF867qgz4k5Ql for ; Mon, 26 Jun 2023 23:14:20 +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 4QqkF81Gfhz3p7M; Mon, 26 Jun 2023 23:14:19 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id Dm2qqJhFiLAoIDvPXqc1nw; Mon, 26 Jun 2023 23:14:19 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPA id DvPVqdYITcyvuDvPWqlLn4; Mon, 26 Jun 2023 23:14:19 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=649a1bcb a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=of4jigFt-DYA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=nZUBcaOa3e7fHKfkU-oA: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 794643AE; Mon, 26 Jun 2023 16:14:17 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 6DC8314D; Mon, 26 Jun 2023 16:14:17 -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: Cy Schubert cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org Subject: Re: git: b835c41723b9 - Create tag vendor/heimdal/7.8.0-2023-06-10-f62e2f278 In-reply-to: <202306262302.35QN2ZSk082220@gitrepo.freebsd.org> References: <202306262302.35QN2ZSk082220@gitrepo.freebsd.org> Comments: In-reply-to Cy Schubert message dated "Mon, 26 Jun 2023 23:02:35 +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: Mon, 26 Jun 2023 16:14:17 -0700 Message-Id: <20230626231417.6DC8314D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfM0wfUy86Y3Vdu5yM2+iW0cjRoBd5ULfOvi08K1yNgTdg1uDhwkCCfvLdGXxJaDEAcsdBrUCfC1jJQDQP3UhpckQ1ogQsGf+KpfX/aY/nm1OSNU0pa7O rWYA3gPivjIO4YJZl/pJjP7IccxmROajv0gll2PVTtGlP4eRLBaXYdK3q6Qtzap23n7GVbNRGyI2jZseKxEK9FLvkOiwxh+m3njbn5mP33wWSvYii1tQ4AtV jqpzzuZpTfAdJEajEAxTfHyE1KjIQTM+5xMA9lCVPgntUb8khw0SgxTAJmPtPNrk X-Rspamd-Queue-Id: 4QqkF81Gfhz3p7M X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202306262302.35QN2ZSk082220@gitrepo.freebsd.org>, Cy Schubert write s: > The annotated tag vendor/heimdal/7.8.0-2023-06-10-f62e2f278 has been created > by cy: > > URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/heimdal/7.8.0-2023-06-10-f62e > 2f278 > > tag vendor/heimdal/7.8.0-2023-06-10-f62e2f278 > Tagger: Cy Schubert > TaggerDate: 2023-06-26 22:59:45 +0000 > > heimdal: Tag f62e2f278 committed by upstream on 2023-06-10 > > commit b6a943f7197af1a5eb6bb028b9b808ec5016e30c > Author: Cy Schubert > AuthorDate: 2023-06-26 22:56:52 +0000 > Commit: Cy Schubert > CommitDate: 2023-06-26 22:56:52 +0000 > > heimdal: Vendor import f62e2f278 > > Heimdal 7.8.0 does not support OpenSSL 3.0. 7.9.0 will but it hasn't > been released yet. We are importing f62e2f278 for its OpenSSL 3.0 > support. > To let people know, I've been working on importing Heimdal 7.8.0 to replace our Heimdal 1.5.2. Rebasing my heimdal branch with main (with OpenSSL 3.0) resulted in more regressions, Heimdal 7.8.0 does not support OpenSSL 3.0. I discovered this morning that the Heimdal team has incrementally added OpenSSL 3.0 support late last year and this year. Unrelated to this, our pam_krb5 breaking su(1) -- pwd is overwritten by our pam_krb5 (though replacing our pam_krb5 with NetBSD's fixes it), I am working finding the exact difference that allows the NetBSD version to work. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue Jun 27 03:31: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 4Qqqxc6f9bz4hyj5; Tue, 27 Jun 2023 03:31: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 4Qqqxc68nyz3J93; Tue, 27 Jun 2023 03:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687836676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cQxJUKWvON4g5gIWsm6PKC1XZz6CO8sVA4YHPElAhK4=; b=FRIgSLyzV8f7D2POXr1dBbFL5m8NVsUTcwsfoDuUBSobLdN50SCituPX8VGydvY5bCw2uU gtlDj+yaoXUHRiuWrAt6jDaE6KfdibiYUevD16UKwjnxxjmjZ3tITzB+I7vcqyRMHDo93W 7q3HcS0bGdP/F7svH0ZI5jVTcR+8PygXzK2eZyNNExJOdCo9iS8AW+NaaAPSBDIQKM+E/V iYx9FFghZV71KoCTtC97+/0BCCBoX8+fcqyK318LNJVU9fiVTjt/UbgWXF/e/FM/lxCLB+ lHa9/N/WoootcwuyxXKyJV8Lq7bPsad74up09X58rpXfHoveZZxSDFdA81s3TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687836676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cQxJUKWvON4g5gIWsm6PKC1XZz6CO8sVA4YHPElAhK4=; b=NEsBPaWfnerB9IkatukLnAUzuL5LPpfNrg9+ORadoK6wMulKdhyPd4tuol5Mg+AB8JiHqF B2tHqBhlmWyaLONASUSRrFbkhZwVjjMtdHTgSvYNa+NU/pCQ0Dene/RJqukUNiYLDEScBn 35YTC5kDfNkfkcjSCslwMKd9pW1C468lrZHIrPkmJk0q3syGZ9VNqR3GhKjsvElhcXxNGk 8wOi/5W/+vV4DaHCRxd0R7+31/f/Bbuti8RzsH4nyqwqftEuDHnTgBBecH+2sFGFQAHeRS tqHRmUeNPsqnwH4kyqJ6GTab4t9ZnNF8LhJNcBzhYleLNYFIIEButqje54eHjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687836676; a=rsa-sha256; cv=none; b=MUr5K4ySxOcHUkOEgDW93GSliIaTNoeqzfGwYULFj8pnMGnJMEIyE7m5sTej08JHKnDzsV EVqfPi7oO51pBCLumwyNYOrIv3X21F4la1zAe7wMcRY5ICGXGAWDAxdu9yAZJmF21L6zlq GZ8oo+qmCdEcnXGk0B9QN0tx3pTbXHh/WHRhu2oUHiWYO9qrpD+zV2aFwty10SB6EN7nUy Ipzy2OEZBkxDKx14pM9d5ho1BO8gYium/eAOPo/DgahQbZLeM5IFj5xOdSIpOJo/DC4LVQ hznsKOohkbmFOuDdEpfobGS9T1ly1BFbOAjVCZWdHSk5qwkGV1DcAwF/HTVWCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqqxc57QqzcN5; Tue, 27 Jun 2023 03:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35R3VGIi026797; Tue, 27 Jun 2023 03:31:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35R3VGe8026796; Tue, 27 Jun 2023 03:31:16 GMT (envelope-from git) Date: Tue, 27 Jun 2023 03:31:16 GMT Message-Id: <202306270331.35R3VGe8026796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1aaa8f670a01 - main - nvme: Don't install nvme_private.h in /usr/include. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1aaa8f670a0188677bd7d2ff1c83e18906715144 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1aaa8f670a0188677bd7d2ff1c83e18906715144 commit 1aaa8f670a0188677bd7d2ff1c83e18906715144 Author: John Baldwin AuthorDate: 2023-06-27 03:30:45 +0000 Commit: John Baldwin CommitDate: 2023-06-27 03:30:45 +0000 nvme: Don't install nvme_private.h in /usr/include. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40394 --- ObsoleteFiles.inc | 3 +++ include/Makefile | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index c5f19d070741..25a1ce080c39 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20230626: Only install sys/dev/nvme/nvme.h to /usr/include +OLD_FILES+=usr/include/dev/nvme/nvme_private.h + # 20230623: OpenSSL 3.0.9 OLD_LIBS+=lib/libcrypto.so.111 OLD_FILES+=usr/include/openssl/rand_drbg.h diff --git a/include/Makefile b/include/Makefile index eba2675e1d1f..922337a87772 100644 --- a/include/Makefile +++ b/include/Makefile @@ -48,7 +48,7 @@ LDIRS= geom net net80211 netgraph netinet netinet6 \ LSUBDIRS= dev/acpica dev/agp dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ - dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \ + dev/ic dev/iicbus dev/io dev/mfi dev/mmc \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wg \ fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \ @@ -174,6 +174,10 @@ HYPERVDIR= ${INCLUDEDIR}/dev/hyperv OPENCRYPTO= cryptodev.h OPENCRYPTODIR= ${INCLUDEDIR}/crypto +.PATH: ${SRCTOP}/sys/dev/nvme +NVME= nvme.h +NVMEDIR= ${INCLUDEDIR}/dev/nvme + .PATH: ${SRCTOP}/sys/dev/pci PCI= pcireg.h PCIDIR= ${INCLUDEDIR}/dev/pci @@ -245,6 +249,7 @@ INCSGROUPS= INCS \ HID \ HYPERV \ OPENCRYPTO \ + NVME \ PCI \ RPC \ SECAUDIT \ From nobody Tue Jun 27 03:38: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 4Qqr5x2n2Rz4jr8D; Tue, 27 Jun 2023 03:38: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 4Qqr5x2JLcz3Lxq; Tue, 27 Jun 2023 03:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687837109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5vL889eaMW6uk7nIb6m1inud6tP04O4sc7gFj4imjUc=; b=PQqsTNzVsNw5wblautzzuG33Dw4hKCA6jP3yEsKOj2BGMZB6ux4go0wQoj/lKVqwUPeO6S dcsXSoiWg+bTg91IPnbQvkoyOOJFnokqwLTuhngm1VwGeixUyv6t1DM8sJBWbsqxxPJnh0 M8MUSowp0EWkjzwx01eRJo7A3CRtD3654sd7d7JdKbyTzxqg9rP9rYQYPo7TX9ngZa6w9B V4+iUJsQF2WnGX5/dCn0UHYTcXO7X4RLPV/WxXudUelRslGqD+HLNSeXXxJU8cygklSDVQ QxOyg/3h9NXfhdRx7WVwjdySN/RCVt8FehZUd7j28eOLSdToFzmsw8Zdq6Ac9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687837109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5vL889eaMW6uk7nIb6m1inud6tP04O4sc7gFj4imjUc=; b=e6AAfM12coPUmyHvntsE8Bp11Iec9xYTTZJQwEc0LnQ8sViGKo2XvfScdioo+ScnGQvWdU o7PbkzIWerrnle8xOQuur9gTWPTFnEczOKR0JSBJ9QhpQuwkJlvyOHMlW/lp1ft4sApxK4 5lL3UuiC8VaCWanBanPZUJPoRiiZdhNzQRuJ4UWNe+VXGlR5XLJ+u1h/bD8K4NmCWr2Sf7 ofkAa5TPqSPQ268tS9gLXslnckPsCV69T//3qmjVX53hrfcad5dz9ESlJ738k3UpwXdPKc Z03rzKYwgRwaJQ4zOdVSaWuMkMWtlg/ogVMiHGMLRIiNTkTKQnuF46BBE8nKfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687837109; a=rsa-sha256; cv=none; b=kUuFn+ZmeWZOkl88741eDqHL8ttUsIl++tdF8sr+IT1Mr32kIY249bKvwo6uRjq/Mt+tEA v7X976tfYt2K/9R27cCg95NDgsKlYfiTg1k5nrSzH+l2Zskl/meps7+yNN4l4XregOAm/9 Sv3VdVCOJqJgR4Zid1FfY/lwPWS4OyypJhm80y3bMP77BTjczijsrWzfoCZRYOakcdMAg3 vx0saaVXQ0aJaoMKsHLQZYeDzikj1sSk1eWdPv62OY9SwmKS65BMgY/w16HjHFuDVRJJaB AYt7359bubvwzhD9ul+sWg/8LbA/xGWTjuI6vlsNozzBbqQblDamwD/f5WPROA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqr5x1NX7zcNN; Tue, 27 Jun 2023 03:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35R3cTeF034521; Tue, 27 Jun 2023 03:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35R3cT8C034520; Tue, 27 Jun 2023 03:38:29 GMT (envelope-from git) Date: Tue, 27 Jun 2023 03:38:29 GMT Message-Id: <202306270338.35R3cT8C034520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9c2203a691ba - main - nvme: Tidy up transfer rate settings in XPT_GET_TRAN_SETTINGS. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c2203a691baaa52f2045d0ae69eb108509284e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9c2203a691baaa52f2045d0ae69eb108509284e8 commit 9c2203a691baaa52f2045d0ae69eb108509284e8 Author: John Baldwin AuthorDate: 2023-06-27 03:32:29 +0000 Commit: John Baldwin CommitDate: 2023-06-27 03:32:29 +0000 nvme: Tidy up transfer rate settings in XPT_GET_TRAN_SETTINGS. - Replace a magic number with CTS_NVME_VALID_SPEC. - Set the transport and protocol versions the same as for XPT_PATH_INQ. Probably we shouldn't bother with setting the version in the 'spec' member of ccb_trans_settings_nvme at all and use the transport and/or protocol version field instead. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40616 --- sys/dev/nvme/nvme_sim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index 9a191d3042be..ec8cc03cb774 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -243,11 +243,13 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) } /* XXX these should be something else maybe ? */ - nvmep->valid = 1; + nvmep->valid = CTS_NVME_VALID_SPEC; nvmep->spec = nvmex->spec; cts->transport = XPORT_NVME; + cts->transport_version = nvmex->spec; cts->protocol = PROTO_NVME; + cts->protocol_version = nvmex->spec; cts->ccb_h.status = CAM_REQ_CMP; break; } From nobody Tue Jun 27 03:38: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 4Qqr5y4Glwz4jr4Y; Tue, 27 Jun 2023 03:38: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 4Qqr5y3p20z3MDN; Tue, 27 Jun 2023 03:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687837110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iYolLzIQQJo6PIb2ZBcFQwrks4up9Gwe5PkGJ0nKn94=; b=eadzVybGMjP4kSnBnU2fb0ZJI/0zRFxvqfFJTHH7Na08aGEvb3sK+R1T9feiHBAs8ZMM03 aIYUAq+QGBd+3TcojQMmzEdHdLhUw34C2rJDii8WCynKpkjb4rVRb+5R4x6DKRODSeaVOa qgVbS33aPUwhem1DysRpeqhO2mazT2eMNO2qfqWAuqWFBt0oFwSrOWY3bdokYzar1WqA8S 19Z96Y1tEEFmBRqafJF4C84/7xHW8BHTgtUSzsTTrIdOcL6mSZOMDpGxWGrQye7qBkrVQP e3QBzKfTcuqNoUQQ9/OneIdNOkOlCEPbsZOY7BA1kz0XOLi05loKBL5kHjl+Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687837110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iYolLzIQQJo6PIb2ZBcFQwrks4up9Gwe5PkGJ0nKn94=; b=jUKG1LB+xsPzsdBffyWY8WDpg5hucJQGHvbRIKm00pjS0obhlCqJrvPvAHYgy2zB/Z5vDI cVK9IKzlF3+2wKQ1Hj76kBSq5fG0brq1CUivgqmQsz7YFkEYQK/RekwvJ+Iqx5HUSQjQc1 DWW4E6qJ/UP2JX0VKxriRYMiIKaM6jmOCUmOY/QrUPt7lQCaX53PSu8QtG5nDleDNzjEy6 sbo9yKCKY3S+XN2925BLmpl3xRwjCcIg9T8wb7ZskOa1UcsCPxdbcU4ABwSu/jINv5TTFG 0YNKUtlUkhZ/hHqZ+sOKhM75DWPZ/rQLf2utXVDq/41Oxr3cWwPDjrnUVlGmgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687837110; a=rsa-sha256; cv=none; b=ptYBTQiuTUquSGNl4cJap/BPtG3ck4O3uD+N2EBmeQnBdX4WhhKOIkDT8zxd1J1GVkoPAn BOqX9UeCOkeKAid72vzKALXZUxZvQSamxIp1hGg6cfvdlbpIuaVJEsejwndpBQHluCmRF1 CQEfvG4eQwVtWkhrZq6xPvtOmC8edyvkv/9+G4mX58zEWtHyI1KU4pDwEsqd3758AmFIsX za/s0KpoGmkTzQHUCDYfof0PpfnAKxyzezsWibWFrexqDFIYMcPhneb3Bn3XWZ2bZsP7xq NkOq8kigvxDbyUe1SAxxWHIDDHxxSkq783jVdtBun7KfWrAKZqfwsIr6nHBN0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqr5y2DjQzcWQ; Tue, 27 Jun 2023 03:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35R3cUdE034540; Tue, 27 Jun 2023 03:38:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35R3cUER034539; Tue, 27 Jun 2023 03:38:30 GMT (envelope-from git) Date: Tue, 27 Jun 2023 03:38:30 GMT Message-Id: <202306270338.35R3cUER034539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e932f0d2a3c3 - main - cam_xpt: Properly fail if a sim uses an unsupported transport. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e932f0d2a3c3ccbdf6c72745a75488022662f80c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e932f0d2a3c3ccbdf6c72745a75488022662f80c commit e932f0d2a3c3ccbdf6c72745a75488022662f80c Author: John Baldwin AuthorDate: 2023-06-27 03:33:25 +0000 Commit: John Baldwin CommitDate: 2023-06-27 03:36:06 +0000 cam_xpt: Properly fail if a sim uses an unsupported transport. The default xport ops for a new bus is xport_default, not NULL, so check for that when determining if a bus failed to find a suitable transport. In addition, the path needs to be freed with xpt_free_path instead of a plain free so that the path's reference on the sim is dropped; otherwise, cam_sim_free in the caller after xpt_bus_register returns failure will hang forever. Note that we have to exempt the xpt bus from this check as it uses xport_default on purpose. Reviewed by: mav, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40617 --- sys/cam/cam_xpt.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 7bca42cb553e..9eb42a8f9141 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4018,7 +4018,14 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, uint32_t bus) xpt_path_inq(&cpi, path); - if (cam_ccb_success((union ccb *)&cpi)) { + /* + * Use the results of PATH_INQ to pick a transport. Note that + * the xpt bus (which uses XPORT_UNSPECIFIED) always uses + * xport_default instead of a transport from + * cam_xpt_port_set. + */ + if (cam_ccb_success((union ccb *)&cpi) && + cpi.transport != XPORT_UNSPECIFIED) { struct xpt_xport **xpt; SET_FOREACH(xpt, cam_xpt_xport_set) { @@ -4027,11 +4034,11 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, uint32_t bus) break; } } - if (new_bus->xport == NULL) { + if (new_bus->xport == &xport_default) { xpt_print(path, "No transport found for %d\n", cpi.transport); xpt_release_bus(new_bus); - free(path, M_CAMXPT); + xpt_free_path(path); return (EINVAL); } } From nobody Tue Jun 27 03:38: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 4Qqr605FjYz4jqyW; Tue, 27 Jun 2023 03:38: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 4Qqr5z45HKz3MCP; Tue, 27 Jun 2023 03:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687837111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZGzJn2PEng+6eGkJ/3Jcb0v8jfCA39ouFBhrkxG4Rd4=; b=K11ivxunzQzGGmO0fFSQaLZXVKDTb+368Jrh4S9/7lgDrIslbrtRuYSHlQ5NAssB9sV8sh /DJlDKfE/WUdUWtExStlGHG/3rFKQI9dLz00iY/b5m3Dl0C0xHqzH5vvv4lS4NX3yOX+w3 mS71d/QK0FB7E9YoclvzNss/XRlcDcAUUD45apQE7mmNGi2uZtaatsGYAo4B0JgS3/vvbw EXtH0txHAHaA5tPUBq6KwFugMyYpnQDhGvqT9CIeuODP6XGh+82LKf7lclAfD0oCJvkpbX LrYZRWu6y5Fv70vjw727+x47JcKGv8qm9esxPxumcJokNYj+4FjasnZT7xqkJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687837111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZGzJn2PEng+6eGkJ/3Jcb0v8jfCA39ouFBhrkxG4Rd4=; b=cNIV5/zPgep1ZL34zYs+1llPp/yGTXi1/Pf7wM66MMN9oCvsDR/vRcYKUeRkK3IaeVSK8k bjWQTLl8zPc9LzI5dwDTY9zRZw/Z9bjsqNEufzvIc7kocfDxDA84aekMq7XDHcIw+slbDS Qm4YSk+F96AMv60wvegxAl2ygXgM2QxxqmV5tHwX/dn7HyB/ftlzDFsqpCUue97qNwrF3p r1EwcyJK9ub/8U3Qib3nyvKFX74MxevZ8DKu35eWduCc52MFYuLTNwkqc3QJpRAUp7+5vI ugGByx0OMe1mPtoWSuSfMjXYNeIHXsfiKZsYsNEDB7n/DypB8kLKCtV5JR8CoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687837111; a=rsa-sha256; cv=none; b=qrHmbNabW93xXoNwGqNekPkU+iiykaUGEDr1omxjLn62ZSR2cXL7hqNYc6d3w8OR9cnbBZ PAZCic0pieiLnAdMXOmk/U+S62OdUKIphbX2Tyh2TaPpKyM6vFXMnPVzcT+NaFO0wKPoSU hyh33OfT/tpj+/L+5G4BLiEdNHyPYhkLOJhO+PHg9mv3B7At9kjINHtQjHZqXg88YpeUNC 8RwCrx1q0yZt7aFR9L1uqN8DFHZCZZwQgKU5Hn6/B9BPEqzKabyIF4ZScDtqOkMoHGQDcf XvrEZRe83pRsDlzxBG5B5OOJNZw+Nx5h2AF75OaQRuPcm92REiIodyRX+bAE8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqr5z38tczbp5; Tue, 27 Jun 2023 03:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35R3cVMo034559; Tue, 27 Jun 2023 03:38:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35R3cVo0034558; Tue, 27 Jun 2023 03:38:31 GMT (envelope-from git) Date: Tue, 27 Jun 2023 03:38:31 GMT Message-Id: <202306270338.35R3cVo0034558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: af296130eadb - main - nvme_xpt: Tidy nvme_announce_periph for fabrics 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af296130eadbad541d57717719d87bec43353e18 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=af296130eadbad541d57717719d87bec43353e18 commit af296130eadbad541d57717719d87bec43353e18 Author: John Baldwin AuthorDate: 2023-06-27 03:37:43 +0000 Commit: John Baldwin CommitDate: 2023-06-27 03:37:43 +0000 nvme_xpt: Tidy nvme_announce_periph for fabrics support. - Read the version from cts.protocol_version. - Only check xport_specific.nvme for PCI-e info for XPORT_NVME. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40618 --- sys/cam/nvme/nvme_xpt.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c index 0575c5220c0b..f1bcd581a096 100644 --- a/sys/cam/nvme/nvme_xpt.c +++ b/sys/cam/nvme/nvme_xpt.c @@ -802,19 +802,22 @@ nvme_announce_periph(struct cam_periph *periph) xpt_action((union ccb*)&cts); if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) return; - nvmex = &cts.xport_specific.nvme; /* Ask the SIM for its base transfer speed */ xpt_path_inq(&cpi, periph->path); sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); sbuf_printf(&sb, "%s%d: nvme version %d.%d", periph->periph_name, periph->unit_number, - NVME_MAJOR(nvmex->spec), - NVME_MINOR(nvmex->spec)); - if (nvmex->valid & CTS_NVME_VALID_LINK) - sbuf_printf(&sb, " x%d (max x%d) lanes PCIe Gen%d (max Gen%d) link", - nvmex->lanes, nvmex->max_lanes, - nvmex->speed, nvmex->max_speed); + NVME_MAJOR(cts.protocol_version), + NVME_MINOR(cts.protocol_version)); + if (cts.transport == XPORT_NVME) { + nvmex = &cts.proto_specific.nvme; + if (nvmex->valid & CTS_NVME_VALID_LINK) + sbuf_printf(&sb, + " x%d (max x%d) lanes PCIe Gen%d (max Gen%d) link", + nvmex->lanes, nvmex->max_lanes, + nvmex->speed, nvmex->max_speed); + } sbuf_printf(&sb, "\n"); sbuf_finish(&sb); sbuf_putbuf(&sb); From nobody Tue Jun 27 04: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 4QqsYL4r6Kz4k3XV; Tue, 27 Jun 2023 04: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 4QqsYL4Ltsz464l; Tue, 27 Jun 2023 04: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=1687841030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NW10CTEicfp8teh4Sbd0urJPhH7+9IAGRz/cznrSdzg=; b=SAIXjwEQpf2HZspw7trJVWE8aspU3e1I6OepYNNY6I9RaiaHraDAF0A5Nm/WC4181BLgC7 qpOszn69AMLG4BSJ7rrvnzn9wEQStm3ynWAl7c/Vjzf+yS8jCNySNTjTUJqxTWW6mE7tKK Y99Yw0rsMOooLAOF5flv+zwClygYQ3ecU3rKf6TmCC9yIoHnQNYJUyYl/eeMKarjukWR6L 9SaiBYpc7yQYFflw0dxpTBDvLz+HNXQNIhSmqH3V1MbaV7tHa5yZibwI3CpmnaPdgXy32A pXeYPO3dw2AByF99CQ+uHz24A8jjAilUOBo9WwZo/L/eDd88Pve1k4baQwMLPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687841030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NW10CTEicfp8teh4Sbd0urJPhH7+9IAGRz/cznrSdzg=; b=vkfioRvym/zI+CQ8I1QW8HrdtTt5UIpVJIdlg4XNDRmGZWGO0lphQQy/57VbKZB0X1pjVW qi9e92Q4ihadXOW5GojB4OBh873vf7ii3AcjT6xyce2J4XP5FDIN04BWuy9F3+Oko3upMT 8xnRjtirhWU4IfRGVj8/fws/oZ0ZS43hJ5U4MlAMv7z/vA8+vt478bv0iVDbAa3sFHjZyL JWHtKKyXEUy5oFHldZi9GTKExHn2GQGSZ3uAk7hrHNmAUX0mh13lNa3KpQmLAkjyMzQuSM m7lI6f/1+BqsNMOwYBCX5Z6tyukFvdPm8O+F5H4z8nwsMz5wrpRlbrYVXQVUHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687841030; a=rsa-sha256; cv=none; b=Y+akLvaRNg2ZwhHnkV+49gL/wTszW2mUStIFAMRYLLJm3SKs3a+LROv6CNkNvGYYQ7qUpL BcPxL1OWlLpnOn2K0tZueOzUW+PgFVPmbFlnLC+mytyMcYEVG1WwQADoBnWPpp2SzXJyCS +43JjTY4LmvgY68ectdYKVWehhJ2qslyRM+WBKrxsx08a0ieuRJZ04usqbO9O+X410elTj KfCffDW9cxKFXJi6qo4QceRe4loi9OQh9NGHI/azLKCsV3QbwvkraUhYy9TgeKS67nQGXt ZL1n1/xn/b3cgt0zmHdfYGfwruru1Uk2DHUR9EhEjTFJh49sjEl0L1BhmwXRPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqsYL3QH7zf1V; Tue, 27 Jun 2023 04:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35R4hoJI050813; Tue, 27 Jun 2023 04:43:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35R4hofY050812; Tue, 27 Jun 2023 04:43:50 GMT (envelope-from git) Date: Tue, 27 Jun 2023 04:43:50 GMT Message-Id: <202306270443.35R4hofY050812@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: d8e6f4946cec - main - vm: Fix anonymous memory clustering under ASLR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8e6f4946cec0b84a6997d62e791b8cf993741b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=d8e6f4946cec0b84a6997d62e791b8cf993741b2 commit d8e6f4946cec0b84a6997d62e791b8cf993741b2 Author: Alan Cox AuthorDate: 2023-06-23 17:00:32 +0000 Commit: Alan Cox CommitDate: 2023-06-27 04:42:48 +0000 vm: Fix anonymous memory clustering under ASLR By default, our ASLR implementation is supposed to cluster anonymous memory allocations, unless the application's mmap(..., MAP_ANON, ...) call included a non-zero address hint. Unfortunately, clustering never occurred because kern_mmap() always replaced the given address hint when it was zero. So, the ASLR implementation always believed that a non-zero hint had been provided and randomized the mapping's location in the address space. To fix this problem, I'm pushing down the point at which we convert a hint of zero to the minimum allocatable address from kern_mmap() to vm_map_find_min(). Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40743 --- sys/vm/vm_map.c | 10 +++++++--- sys/vm/vm_map.h | 1 + sys/vm/vm_mmap.c | 8 +++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index f5863a9b9939..a02107b5e64d 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1981,14 +1981,14 @@ SYSCTL_INT(_vm, OID_AUTO, cluster_anon, CTLFLAG_RW, "Cluster anonymous mappings: 0 = no, 1 = yes if no hint, 2 = always"); static bool -clustering_anon_allowed(vm_offset_t addr) +clustering_anon_allowed(vm_offset_t addr, int cow) { switch (cluster_anon) { case 0: return (false); case 1: - return (addr == 0); + return (addr == 0 || (cow & MAP_NO_HINT) != 0); case 2: default: return (true); @@ -2111,7 +2111,7 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset, } else alignment = 0; en_aslr = (map->flags & MAP_ASLR) != 0; - update_anon = cluster = clustering_anon_allowed(*addr) && + update_anon = cluster = clustering_anon_allowed(*addr, cow) && (map->flags & MAP_IS_SUB_MAP) == 0 && max_addr == 0 && find_space != VMFS_NO_SPACE && object == NULL && (cow & (MAP_INHERIT_SHARE | MAP_STACK_GROWS_UP | @@ -2255,6 +2255,10 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, int rv; hint = *addr; + if (hint == 0) + cow |= MAP_NO_HINT; + if (hint < min_addr) + *addr = hint = min_addr; for (;;) { rv = vm_map_find(map, object, offset, addr, length, max_addr, find_space, prot, max, cow); diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 2ac54a39a57b..fd8b606e8ddc 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -383,6 +383,7 @@ long vmspace_resident_count(struct vmspace *vmspace); #define MAP_CREATE_STACK_GAP_DN 0x00020000 #define MAP_VN_EXEC 0x00040000 #define MAP_SPLIT_BOUNDARY_MASK 0x00180000 +#define MAP_NO_HINT 0x00200000 #define MAP_SPLIT_BOUNDARY_SHIFT 19 diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 56345fcaf560..408e077476dd 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -353,10 +353,12 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) * the hint would fall in the potential heap space, * place it after the end of the largest possible heap. * - * There should really be a pmap call to determine a reasonable - * location. + * For anonymous mappings within the address space of the + * calling process, the absence of a hint is handled at a + * lower level in order to implement different clustering + * strategies for ASLR. */ - if (addr == 0 || + if (((flags & MAP_ANON) == 0 && addr == 0) || (addr >= round_page((vm_offset_t)vms->vm_taddr) && addr < round_page((vm_offset_t)vms->vm_daddr + lim_max(td, RLIMIT_DATA)))) From nobody Tue Jun 27 05:44: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 4Qqtvp0VBRz4k9JT; Tue, 27 Jun 2023 05:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qqtvn6X5Zz3MDk; Tue, 27 Jun 2023 05:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687844694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juqNReqlMh+28m/RAAHYWrlIlI6ewwAl/mIQ2YHD4YU=; b=KJWxFk+ow9ZabrT5oVWWTNHkWJxU1XoAv6n7tJvTxM110gJ5XxXB1dAxqxqgO9YLlmWnDe xE3rDJuWa29PEsqcIwW/SMmn2lvINKDX/m0/2dKfI9qrWX7v7SlsY1CFHqgHgjY8r8LKlq LNvNCuT1cOQ3pTfbJNzqh/MKJAumj99YzhhKzDiyui9FbxEv2xPdF0TipmOYu93/Ig3Xdm qIe+OAwd9molJkGQ68KmIERN5B3uXcjsE8C5jdRPUvCTiIf1lg9ZSG20qjsR/H+WN5gyks ffCmaKSURsmoK8OwGb+tsf6kCdyU1JZ9M37Xy2Umvt4wLEh0n0b5w/kl7Eon5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687844694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juqNReqlMh+28m/RAAHYWrlIlI6ewwAl/mIQ2YHD4YU=; b=epV20OPlWysv9ZR8tZDrC1Bh29ASW7Ug1wViLTDKeze6elTS7Ne7CQilOQ2+CyUFj9z/2k 08gqRnpTw5Oe4DriJaUZduG05lqaZEAKOJYRq0BHMNAV4VQNHJEApp1FKOKzQYAgelp+nR Nv2F/HZY75FMrEbmne0vwwKAVkzSyA/qhtjva1xw6kCAmkpV7bmcOVkMPrqs33z8loHs2o GecGcGc4Hu9vroMjIh3f3xHxUKtbEQnVNX+zPOcC+fRw7zTHk31CPvtPxWcp3CI65xytkq K91fz/wEqFS6xmpHtujiZaUuU/3deed5jL+/vAqKq73kV+RXYUrU4v6uFg+G0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687844694; a=rsa-sha256; cv=none; b=INd9ZLqtcbrqVBNJhCrpFZyYDM75rJLcI3KNv9Ik8odMJRk2BWnTdUjcaDVWBtKVBbNtnp ZF8vFXUUEeZ3tpOJYCQn87pMgFpTjPjdxYgmIBF60bjUBXUVGh3qB5Y0iJn4B/azTCweFE RrW3HNBryBGLAvrrGHWG5pywF+F7oZDim39lVB64snMZPahpBDfrtyuWpoEDvuyJdsVoXn c/ruWdLJp70ScYYDv+f3VDiCCSgcTuGPgNHnrxwM8kSNQYgH7+dVNdRfx2MCKZmXk3MQOq Mj+XMGmCMOcTjaa8WlIQRUeyJrAyy8+doO+LOdbieiKF4GOS314pLFN+rVVJrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qqtvn51PSzgJb; Tue, 27 Jun 2023 05:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35R5ir9Y050908; Tue, 27 Jun 2023 05:44:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35R5iraT050907; Tue, 27 Jun 2023 05:44:53 GMT (envelope-from git) Date: Tue, 27 Jun 2023 05:44:53 GMT Message-Id: <202306270544.35R5iraT050907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 72c3a43b16b2 - main - radix_trie: skip compare in lookup_le, lookup_ge List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72c3a43b16b20cdc86508e58f61c2e0e28e65549 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=72c3a43b16b20cdc86508e58f61c2e0e28e65549 commit 72c3a43b16b20cdc86508e58f61c2e0e28e65549 Author: Doug Moore AuthorDate: 2023-06-27 05:42:41 +0000 Commit: Doug Moore CommitDate: 2023-06-27 05:42:41 +0000 radix_trie: skip compare in lookup_le, lookup_ge In _lookup_ge, where a loop "looks for an available edge or val within the current bisection node" (to quote the code comment), the value of index has already been modified to guarantee that it is the least value than can be found in the non-NULL child node being examined. Therefore, if the non-NULL child is a leaf, there's no need to compare 'index' to anything, and the value can just be returned. The same is true for _lookup_le with 'most' replacing 'least'. Reviewed by: alc Tested by: pho Differential Revision: https://reviews.freebsd.org/D40746 --- sys/kern/subr_pctrie.c | 10 ++++++---- sys/vm/vm_radix.c | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index 44a00a9eef77..d9269bfb3885 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -560,8 +560,9 @@ ascend: NULL, PCTRIE_LOCKED); if (pctrie_isleaf(child)) { m = pctrie_toval(child); - if (*m >= index) - return (m); + KASSERT(*m >= index, + ("pctrie_lookup_ge: leaf < index")); + return (m); } else if (child != NULL) goto descend; } while (slot < (PCTRIE_COUNT - 1)); @@ -677,8 +678,9 @@ ascend: NULL, PCTRIE_LOCKED); if (pctrie_isleaf(child)) { m = pctrie_toval(child); - if (*m <= index) - return (m); + KASSERT(*m <= index, + ("pctrie_lookup_le: leaf > index")); + return (m); } else if (child != NULL) goto descend; } while (slot > 0); diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index 7d3408226be1..9c8ba5287d4e 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -595,8 +595,9 @@ ascend: LOCKED); if (vm_radix_isleaf(child)) { m = vm_radix_topage(child); - if (m->pindex >= index) - return (m); + KASSERT(m->pindex >= index, + ("vm_radix_lookup_ge: leafpindex <= index) - return (m); + KASSERT(m->pindex <= index, + ("vm_radix_lookup_le: leaf>index")); + return (m); } else if (child != NULL) goto descend; } while (slot > 0); From nobody Tue Jun 27 07: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 4QqxvH2W9rz4k4kK; Tue, 27 Jun 2023 07: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 4QqxvH22TGz3FR5; Tue, 27 Jun 2023 07: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=1687852779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZeiVizkXjOAL8YbdG8M6CDARRwwxfpvS6zhpTf78gjg=; b=oIyAjVhGy27LNXro9fVtw+fvpFehBD3Br1Drs54mKZbBskj2FROHLyZRDmeZTaJC6/il5T eF7AFg9GUR9Ipbq/ZXhJ0yWydYLEaLW7OqJs5CvOpDuORKmQl7DnGWre7Jt2IlkWy+kMRT LHZqegMnFbFNWFe7qmC7YOMMeu26yp7A34FhUfasZWn2zNNQ4fefSUxWdMcqXTfmjYLONA C8YzcRl//qbmPNNpJ2oajnDryfPaCtaLgjIyAD14ym60DdHLLh8mKqv8nZqaB2ybwbOduS QsEaLIGsPv70BkOE6x3WNcvD7xC7IIkMMtCsa+Gyae5Ix0LYz7GkoooNtlFEJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687852779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZeiVizkXjOAL8YbdG8M6CDARRwwxfpvS6zhpTf78gjg=; b=PmfXj8w8Sj8btw9mRVuIo2ga9YCEYaMmofWWOm71SoQvyPN/EgLy+/5lRyFkfMAlbBlKPj UbqJlz9O8Tk2kN32CQifrjMuvEE3C+rsrJRPPgGTfvCAcJ/HrfuLFUUSIBC/mDNKKMtxKS 5zJtV091+ktodWAf4cArJ+F+peF9PjMBypnnbRgOoRmd595hne56Le8KsbZHCXwI08LoJp 1zXmG8y4+o45i6SZ3THeK6BqqAPlbXVsSXbCbzddQl1arRwFKmDdXA26pEsNpiDM1x9bG+ lr6y1G/xmKI1FmKLGe3LPKI28QLsayE8LIc/W92Q4cysSPtMLzMQdETYZ4psyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687852779; a=rsa-sha256; cv=none; b=noXzW/6nHSM8puau/RCaez5eFAjGAuQQtauyhbXZ7zt8g+29Zt7h72+h5lSOd6usou6zdX 5iEoIxM/XQRKZkN29G4OP/n/+y4NUWkzN3YzsW0vVAGvyrcXp36BglquqQpBemzbr0sEsX +agk96g+aKD2tlr+YHwOr0Ezv+MkNaTyF0h0e2EOR/+P4ieSoTsfAzWqEhQps6SKGzvyzQ 7s20jY4qBjhx5XFnWsmX+Yamr/Qeg2OhR85xxb3H6x9dPZyynm6VoinmS48Y7Szg+dNmVR v9tafXf3AbljSXBIE6tfPsrl185sTXEFiqXnpBO+lgwfHn7C+2lmMTeJp9l4Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QqxvH166Kzkwk; Tue, 27 Jun 2023 07:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35R7xdUx071225; Tue, 27 Jun 2023 07:59:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35R7xdAD071224; Tue, 27 Jun 2023 07:59:39 GMT (envelope-from git) Date: Tue, 27 Jun 2023 07:59:39 GMT Message-Id: <202306270759.35R7xdAD071224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: eb550615eff7 - main - release/azure: Update reference URL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb550615eff7f53dc4dfe523d455d276ce15d8b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=eb550615eff7f53dc4dfe523d455d276ce15d8b2 commit eb550615eff7f53dc4dfe523d455d276ce15d8b2 Author: Li-Wen Hsu AuthorDate: 2023-06-27 07:58:55 +0000 Commit: Li-Wen Hsu CommitDate: 2023-06-27 07:58:55 +0000 release/azure: Update reference URL Sponsored by: The FreeBSD Foundation --- release/tools/azure.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/azure.conf b/release/tools/azure.conf index dd43260201aa..2a4f03db4028 100644 --- a/release/tools/azure.conf +++ b/release/tools/azure.conf @@ -16,7 +16,7 @@ export VM_RC_LIST="ntpd sshd waagent firstboot_freebsd_update firstboot_pkgs" # See ResourceDisk.EnableSwap and ResourceDisk.SwapSizeMB in waagent.conf export NOSWAP=YES -# https://docs.microsoft.com/en-us/azure/marketplace/azure-vm-create-certification-faq#vm-images-must-have-1mb-free-space +# https://learn.microsoft.com/en-us/partner-center/marketplace/azure-vm-certification-faq#vm-images-must-have-1-mb-of-free-space export VM_BOOTPARTSOFFSET=1M vm_extra_pre_umount() { From nobody Tue Jun 27 09:17: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 4Qqzcn26Lxz4kWs7; Tue, 27 Jun 2023 09:17:13 +0000 (UTC) (envelope-from kp@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 4Qqzcn1MCgz44Kr; Tue, 27 Jun 2023 09:17:13 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687857433; 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=dTjsc9YSN9A+qlN2DvJv4EKKhKoUq/w1gzjk6hNBn1Y=; b=lxGReQ668FTFfRniYJL+MkC+z2MgJE64Gtp/wcyRpNhY/ZWCarYGsSvwfg9FHCJRKMnqv+ sfHfrrgbBeMKArgWoUQAdSNhxG5xx2Fy3zutH+f3yW25ixoQ6g12G7/OCMZa0zEVtS1pJf m/kft+bgjoWT/qzMlqrWqdS6SLGOI8kCiy2ygQ9ErFtSKxkfOb9IG1mw5Z8ZpFosQFqgCp rP9HRqW/0Y8VnkPtcSLd3a3QwT42sHFkvMoXb9r201/hbBNZxZHQvqA5lvv6ywm1QIOBwQ a63IW3cFtscJR6AFyzQnANXcRE2ZYgTx92UXBgD2LkBVgp4XoDJWBBBp+51N4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687857433; 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=dTjsc9YSN9A+qlN2DvJv4EKKhKoUq/w1gzjk6hNBn1Y=; b=Za2Vqxz2cIr4DEMzJnHJezE9VZZBUsxIrfdB3SAa5A2SQnljI8qhEPhPFmwNnvAWIM3iyB YI5sn6aemsSO49rxW+Yp9rdYPad8cw8/NqLwgidKUxm7LeeS2XY9d6azPfzNsLtpiPHtWZ 5HptJjz8ixbMWrutTEmQyvY4wYzsxIVdix59MV509Wj7szF0GWmeEkwkdwUVvplxQndZGz 8LNvC4qAoySpmfSxOjUakZMNdWwCSgjxm4W3mkEnLEDl0sP2mBG/V1A1d3SqrqUvsESkYB FhJ/vH9GFTpovDjQxneNu8hoZF6Grh4okbF26pyqs7F9H5LMp217G/AxlxSVIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687857433; a=rsa-sha256; cv=none; b=sVC2LvF8enf9wBS5HCGGeA3wzvcJRBBzkFWFeIPCZPgs7VbCJ00kTFOOTPgq8MvK4lXawl 4S1d8pbq6YyU9XqTWZ/ZdI4OB/PwuJZ67Huza0dW/pyiNRjpg+s/FUI4stdykBzjriHJ6K LPshtn3nwacapLpOkee6Ba0kyi3Q4wPPUhx9yGqCD3PpiaqZB7gEWFroJkN106xqNboYlT 0v+DwvBOgQZ3aKaOjfzrKjf+HkW1HwRo1irtRGS+tkhF0/Lu3Ukg5pooFXvrPotVK1AphD eGkIagzlgQTqylWsXwbJ0hAl/sr/0qoiLBw2SBngBuFWgCwG6EdZVuZ3cb6CEA== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qqzcm6nDxz1JH5; Tue, 27 Jun 2023 09:17:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 26DB0EED6; Tue, 27 Jun 2023 11:17:11 +0200 (CEST) From: Kristof Provost To: Warner Losh , Sumit Saxena Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 91fcacc35597 - main - if_bnxt: Add support for VLAN on Thor Date: Tue, 27 Jun 2023 11:17:10 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: <419530F4-DB8F-46EA-BF45-C130BCF8A3DE@FreeBSD.org> In-Reply-To: <202211042255.2A4MtqVv032693@gitrepo.freebsd.org> References: <202211042255.2A4MtqVv032693@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: multipart/alternative; boundary="=_MailMate_7EE3E919-6334-4664-B618-2D7388FA5076_=" X-ThisMailContainsUnwantedMimeParts: N --=_MailMate_7EE3E919-6334-4664-B618-2D7388FA5076_= Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable On 4 Nov 2022, at 23:55, Warner Losh wrote: > The branch main has been updated by imp: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D91fcacc355971f74aa26fc7861020= dc3a2a2d717 > > commit 91fcacc355971f74aa26fc7861020dc3a2a2d717 > Author: Sumit Saxena > AuthorDate: 2022-11-04 22:24:32 +0000 > Commit: Warner Losh > CommitDate: 2022-11-04 22:24:32 +0000 > > if_bnxt: Add support for VLAN on Thor > > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D36443 > --- > sys/dev/bnxt/bnxt.h | 3 +- > sys/dev/bnxt/bnxt_hwrm.c | 110 = > ++++++++++++++++++++++++++++------------------- > sys/dev/bnxt/bnxt_hwrm.h | 7 ++- > sys/dev/bnxt/if_bnxt.c | 7 ++- > 4 files changed, 74 insertions(+), 53 deletions(-) > This commit appears to have broken vlan on these interfaces. My hardware is a Broadcom BCM57416 NetXtreme-E 10GBase-T Ethernet, (in a = Dell T640, if that helps). A simple vlan creation on top of one: ifconfig vlan create ifconfig vlan0 vlan 201 vlandev bnxt0 Results in a loss of connectivity. The kernel logs this, which I assume = is related: `bnxt0: HWRM_CFA_L2_FILTER_ALLOC command returned INVALID_PARAMS error.` After reverting this (and 72e9dbb58cad5262190cf2eae47f764021072128) I = can create vlan interfaces on top of bnxt0 without losing connectivity. Best regards, Kristof --=_MailMate_7EE3E919-6334-4664-B618-2D7388FA5076_= Content-Type: text/html Content-Transfer-Encoding: quoted-printable

On 4 Nov 2022, at 23:55, Warner Losh wrote:

The branch main has been updated by= imp:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3D91fcacc355971f74aa26fc7861020dc3a2a2d717

commit 91fcacc355971f74aa26fc7861020dc3a2a2d717
Author: Sumit Saxena <sumit.saxena@broadcom.com>
AuthorDate: 2022-11-04 22:24:32 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-11-04 22:24:32 +0000

if_bnxt: Add support for VLAN on Thor

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D36443
---
sys/dev/bnxt/bnxt.h | 3 +-
sys/dev/bnxt/bnxt_hwrm.c | 110 ++++++++++++++++++++++++++++-------------= ------
sys/dev/bnxt/bnxt_hwrm.h | 7 ++-
sys/dev/bnxt/if_bnxt.c | 7 ++-
4 files changed, 74 insertions(+), 53 deletions(-)


This commit appears to have broken vlan on these interfac= es.
My hardware is a Broadcom BCM57416 NetXtreme-E 10GBase-T Ethernet, (in a = Dell T640, if that helps).

A simple vlan creation on top of one:
ifconfig vlan create
ifconfig vlan0 vlan 201 vlandev bnxt0

Results in a loss of connectivity. The kernel logs this, = which I assume is related:

bnxt0: HWRM_CFA_L2_FILTER_ALLOC command returned INVALID_PARAMS erro= r.

After reverting this (and 72e9dbb58cad5262190cf2eae47f764= 021072128) I can create vlan interfaces on top of bnxt0 without losing co= nnectivity.

Best regards,
Kristof

--=_MailMate_7EE3E919-6334-4664-B618-2D7388FA5076_=-- From nobody Tue Jun 27 10:43: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 4Qr1Xd0Qv3z4gBYL; Tue, 27 Jun 2023 10: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 4Qr1Xd01LCz3lBq; Tue, 27 Jun 2023 10: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=1687862625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eo6Xtbvkn4P8qj41D6Rx6j8WCe4ub6q2UNLscjDzsJ8=; b=pc3Lb4KbJzJkp7K9zkMGUBewqyPOd9bye/JCI1CwPffqJGz6qjKzbBBmcK5c2Dv4JU1Kb8 uoSxxd3VVCCS3BDiulGPYx50c5QPj3ofaGE2wcQXCS62C7J4jABg2z7EG5iYJC0LMD9RPz MTShAauGZe9n4+nzAYZNXl9rIwxzl6lizo+THbQbkfoYP0ghIGjvGDaTocNH712WIRBKCo 3LEVBJS9ectv0EOraYdgyFp9hBP8vwyT6KgFbGD9U9BzCrahSUB5J2vTfYDWFeCA/+VbJ/ QFqNszC8mSIJ0F5M32cBcMcdaYcHaXdU7k1e8k7oY1F07qICImuUj+RNZQ5Q2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687862625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eo6Xtbvkn4P8qj41D6Rx6j8WCe4ub6q2UNLscjDzsJ8=; b=VaCBKcT7OrBfS79kb/i6vhOz2ZL4YYY3dChho16IpoLFO6hTzCfqTrs/+/Xyqn2X0bkngR 1sxtXeEcaLWQFUGLTt3ySr2Z6Jnnh0DlHsv7GrtzXq6O5iFe7MZhXKTe0BgGcQYeikP9Ar kKEPJHt5C9dlKhrDklbJIR4/WEW3SKusO1qWdNqajfsquxeMg13+Pg4xLStb70E1A+oF7K F+T4S2pYURtVc5/wjM8dBRa4dhjf37MvSZEtMxF55IHxsh/AY6LoNt5QHMaoNdBo92H4Jv di527Pn9pohEBJ6nQ5ld3hJcRRH/bqQarGptU3+uT8uHV/GNkDDD4qhcEcolfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687862625; a=rsa-sha256; cv=none; b=OmfrQaU4UgdI87plsnPBnhYUgKDYeL+crqoV7dtuUFFlCtgyHGNwPHaoCauh7SgLai2cJM lUJt5vEdtPJv3xAGfIgR4Gs/WDlhgyACzFVq4voumi9+XqtGhG5VPPplR3GjdIWdHFUvRs GVlKmOkwjjUWw97WYvGUNqTTXwaVbqghwwNGcByk2nzLs4nWcf02SbGFQKTwvod47J1QHU RXB+9KSJMjOiVeQe8N6FbHv6iH/w6OsR60j44nxydoPEw/75sIjdzgQFwrBkAj4DrfAwvA cMHsrhchBySmv+ehCmAUdfvUhWt7tjZbWuKaaGgeWmjExcuwIfCl+ib+kBmyAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr1Xc6C9zzpFk; Tue, 27 Jun 2023 10:43:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RAhiL8054423; Tue, 27 Jun 2023 10:43:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RAhiNA054422; Tue, 27 Jun 2023 10:43:44 GMT (envelope-from git) Date: Tue, 27 Jun 2023 10:43:44 GMT Message-Id: <202306271043.35RAhiNA054422@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: 3bffa2262328 - main - fdescfs: improve linrdlnk mount 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3bffa2262328e4ff1737516f176107f607e7bc76 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3bffa2262328e4ff1737516f176107f607e7bc76 commit 3bffa2262328e4ff1737516f176107f607e7bc76 Author: Konstantin Belousov AuthorDate: 2023-06-22 13:30:59 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-27 10:43:17 +0000 fdescfs: improve linrdlnk mount option Instead of using VV_READLINK vnode flag and checking it in one place, just assign VLNK type to the Fdesc vnodes for linrdlnk mounts. Then all places where symlinks needs to be followed, e.g. lookup(), are handled. PR: 272127 Reported by: Peter Eriksson Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40700 --- sys/fs/fdescfs/fdesc_vnops.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 1c4b6d0c6cdb..3f6fca16c715 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -190,8 +190,9 @@ loop: fd->fd_type = ftype; fd->fd_fd = fd_fd; fd->fd_ix = ix; - if (ftype == Fdesc && fmp->flags & FMNT_LINRDLNKF) - vp->v_vflag |= VV_READLINK; + /* Cannot set v_type to VCHR */ + if (ftype == Fdesc && (fmp->flags & FMNT_LINRDLNKF) != 0) + vp->v_type = VLNK; error = insmntque1(vp, mp); if (error != 0) { vgone(vp); @@ -457,7 +458,8 @@ fdesc_getattr(struct vop_getattr_args *ap) break; case Fdesc: - vap->va_type = (vp->v_vflag & VV_READLINK) == 0 ? VCHR : VLNK; + vap->va_type = (VFSTOFDESC(vp->v_mount)->flags & + FMNT_LINRDLNKF) == 0 ? VCHR : VLNK; vap->va_nlink = 1; vap->va_size = 0; vap->va_rdev = makedev(0, vap->va_fileid); From nobody Tue Jun 27 10: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 4Qr1Xf1q97z4gBYc; Tue, 27 Jun 2023 10:43: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 4Qr1Xf1LYLz3l89; Tue, 27 Jun 2023 10: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=1687862626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKvYilyzS3wz6UeM0pcy29ZrZZYiE1LYebfNpR+O+Po=; b=gkMULY6KvlhaSSU2gY/7+WfSbPPcv+1rfU5KLc0MQ7P8q32WzLgvRunrnIEe9ahWmbb06e zyXhbfJG7qhvz4tDxYRA1O85KuPPyoCmdZTAGe5BxSYZIkFmshr6jjlS8EtsgePUQ9odMp Vrruf8BHR3c0AjiNmsq5jG85ywQcNb515X6Blzowlo7thIlr07TYbNiwDeJhAUTy4TtHqM j2OSijqn56cHGxB+Z7xeqAx9+RGsujVpwZc7Cmf+9d5VnfkvmiOC2hUozDOECHFIPV0hUu H9bqCbCGW/z+vtBanYjGnuzQ54DipTunWzoUbZYAnpVRJqygzivx3eK2FKViUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687862626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKvYilyzS3wz6UeM0pcy29ZrZZYiE1LYebfNpR+O+Po=; b=C2WbqjiV7vJcF9V8D9cA06LKBAvucl962Q2uXrb6XG11I3SFKpIYgn8/gULkWmZeOm+Ajp wt6C7N/Q/Hy8mo+l1cEstKVoVQ45/qQWOPhDdX0ObRdmwQR5UOm9jcsL2OqZJbJtvxE9Im hSjOgOr/DmyAEddO1kVRsNhDGCP7QIbwD7sznU0+Y+Ooo5RDb3leXKLcmWePrsb8FutvEZ L4CWON/n/y5/D5k4Znz9SY37Oz2Z9Rx74sJ5ULM9iinMEzsW8XZz0/5uh8AdjlV+s9PX4E pdvtdX1hMhtBDjqHkkjiBhWjuTPn/0ipT1fGrDn8JhcDaONAZAqruuAAJ0QCwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687862626; a=rsa-sha256; cv=none; b=iTnOQ+1/3IEANvjuVaf0ZJGK/ue5SDCD12y+eMeHOR6/3maGhpBrcmB2mUy8i6GuBzBF7C mmSszAk7/u9uwaXNSOs9c8L3/7g93v11coxoWYWZjDg/2Ou1ZBMyq1Wfm+bUQlOMCBMsnR 142p77CHbofqcYmQTIazJ9kXGwrkQzA+6Lbpz5Mbe6FAC22dqCIsxr5usYydOl2RCo2w1j +OhqFu5GFakQ4eJrxv5Lh49NN9zsEZPaw1IO4uz0LatP6L8p7jjQmCI67qe9IsNVyf++ZS JnaHKNKjPwqmN+TzxRjZVmfZnnMyv6t3q5hBvp25IJPLrX6BZTwX8ywuTBINiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr1Xf086NzpFl; Tue, 27 Jun 2023 10:43:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RAhjLV054443; Tue, 27 Jun 2023 10:43:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RAhjCM054442; Tue, 27 Jun 2023 10:43:45 GMT (envelope-from git) Date: Tue, 27 Jun 2023 10:43:45 GMT Message-Id: <202306271043.35RAhjCM054442@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: 4a402dfe0bc4 - main - VFS: Remove VV_READLINK 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: 4a402dfe0bc44770c9eac6e58a501e4805e29413 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4a402dfe0bc44770c9eac6e58a501e4805e29413 commit 4a402dfe0bc44770c9eac6e58a501e4805e29413 Author: Konstantin Belousov AuthorDate: 2023-06-21 16:37:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-27 10:43:25 +0000 VFS: Remove VV_READLINK flag since its only reason to exist is removed. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40700 --- sys/kern/vfs_subr.c | 4 +--- sys/kern/vfs_syscalls.c | 2 +- sys/sys/vnode.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9901a20172a4..252e0ca60c3b 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4284,11 +4284,9 @@ vn_printf(struct vnode *vp, const char *fmt, ...) strlcat(buf, "|VV_MD", sizeof(buf)); if (vp->v_vflag & VV_FORCEINSMQ) strlcat(buf, "|VV_FORCEINSMQ", sizeof(buf)); - if (vp->v_vflag & VV_READLINK) - strlcat(buf, "|VV_READLINK", sizeof(buf)); flags = vp->v_vflag & ~(VV_ROOT | VV_ISTTY | VV_NOSYNC | VV_ETERNALDEV | VV_CACHEDLABEL | VV_VMSIZEVNLOCK | VV_COPYONWRITE | VV_SYSTEM | - VV_PROCDEP | VV_DELETED | VV_MD | VV_FORCEINSMQ | VV_READLINK); + VV_PROCDEP | VV_DELETED | VV_MD | VV_FORCEINSMQ); if (flags != 0) { snprintf(buf2, sizeof(buf2), "|VV(0x%lx)", flags); strlcat(buf, buf2, sizeof(buf)); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index d68af4ea4d51..52145ece7120 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2677,7 +2677,7 @@ kern_readlink_vp(struct vnode *vp, char *buf, enum uio_seg bufseg, size_t count, if (error != 0) return (error); #endif - if (vp->v_type != VLNK && (vp->v_vflag & VV_READLINK) == 0) + if (vp->v_type != VLNK) return (EINVAL); aiov.iov_base = buf; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 7ba95de34b5d..428bf31b3996 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -251,7 +251,7 @@ _Static_assert(sizeof(struct vnode) <= 448, "vnode size crosses 448 bytes"); #define VV_DELETED 0x0400 /* should be removed */ #define VV_MD 0x0800 /* vnode backs the md device */ #define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */ -#define VV_READLINK 0x2000 /* fdescfs linux vnode */ +#define VV_UNUSED01 0x2000 /* was: fdescfs linux vnode */ #define VV_UNREF 0x4000 /* vunref, do not drop lock in inactive() */ #define VV_CROSSLOCK 0x8000 /* vnode lock is shared w/ root mounted here */ From nobody Tue Jun 27 11:56: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 4Qr3934bvWz4hf6w; Tue, 27 Jun 2023 11:56: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 4Qr39348Jlz4LHS; Tue, 27 Jun 2023 11:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687867015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CxPlQhA1eVMtjRuffAdnq+ba1KkM8TOoUC2VkY5l8g=; b=xDVIarMDkMf3uc4pN/V/eRWo7Sw+CCiKZ562Pf9ihxA5Iuu253hInj/MyrElj+Hnwra/Bv XG+6xxZ5plzLUDlBV/Kmhm5QJEcgYItjAwBS2TBoKyQBIE1/aSKDWq4xVHsIZK7jS9mHD+ 8TC3xPb2PraNqe2pc0sqoRm8tF0pC1UhWmGKVBEzurFO4W5l/oF7CO5vQNlbK/lOyRBlqb 3pxl89K5DDxp9JrKQ1E7tMFCgvu9jW0UxcGSv9TygvbD1Qq++6ibrvMz/uPjdkByPIR+5A YcW1A7cyoM5YPhciXi9YjZGsP0WmHo8KyXU+S3ECYLnPoeTxVEimG0NKs4mL6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687867015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CxPlQhA1eVMtjRuffAdnq+ba1KkM8TOoUC2VkY5l8g=; b=eyQ4g3r2oQXxrjvRf/wRT6luPbJYlR1MkoxlA+mq9FO0BVicYQi28AkJFnrTqcWonSZvuD lt5AAN1NpoJKJFGVXywkch/9VTuqFXz9PBiYGyx7THWwqnO4JJYtKPHHPwq0ejyNdxbKy+ kuvvUmgRaTKhjmJjDf9eDJE0byMOESwRV2LsGSsGucJaMfjYiYK5TmgdQXG4YJiCOfEMiF Ff7sh7DzdiUOTPI9YuhTBLQwGMuu0U+SwRofggcK1p+OAfa0dIXvMyNN8yDskjMe2IWiXo /Gy0Azh9InqEN152NLIsMuDK3FE7wFjKjSV6+CrEPWTER4UjWMHSbYCENYcGEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687867015; a=rsa-sha256; cv=none; b=W8XdUYNfm1+qGHdU7ty16jgysCjWvriEV4KsJDL/yThbXQHMn6QALJXXDrcdpZBtRlK0zG qCk+bCSyajG1t1WdDaHgkFzEJ4Jblw6cyg7uLLHTTO5+X8e5Pb4SdE9EBSzUVzkG4cnLjm YTQvM05DWqBD7KahC/l3HdQdLABo1g3KS7VA2ghVYs9uq8tEOMpqN1oUWrjZWvjLIXqo3x 8VuYmZnIW89+w3rkOK5EDLMDHI6LT8h/xd2abKfvaad/lfGuR3Yv79xC8MjX29/aUn1r1b KA2eLbZz3hPJey3Cf12kWa1N2Ywx203QHt6ZRWNxSS3kySafMbnCv+yiWLVwng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr3933F6zzrTW; Tue, 27 Jun 2023 11:56:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RButuw071801; Tue, 27 Jun 2023 11:56:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RButXO071800; Tue, 27 Jun 2023 11:56:55 GMT (envelope-from git) Date: Tue, 27 Jun 2023 11:56:55 GMT Message-Id: <202306271156.35RButXO071800@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: a6c0d801ca59 - main - libpthread: allocate rwlocks and spinlocks in dedicated cachelines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a6c0d801ca5934bb9b9cca6870ea7406d5db0641 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a6c0d801ca5934bb9b9cca6870ea7406d5db0641 commit a6c0d801ca5934bb9b9cca6870ea7406d5db0641 Author: Greg Becker AuthorDate: 2023-06-27 01:08:29 +0000 Commit: Mateusz Guzik CommitDate: 2023-06-27 11:56:44 +0000 libpthread: allocate rwlocks and spinlocks in dedicated cachelines Reduces severe performance degradation due to false-sharing. Note that this does not account for hardware which can perform adjacent cacheline prefetch. [mjg: massaged the commit message and the patch to use aligned_alloc instead of malloc] PR: 272238 MFC after: 1 week --- lib/libthr/thread/thr_pspinlock.c | 3 ++- lib/libthr/thread/thr_rwlock.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libthr/thread/thr_pspinlock.c b/lib/libthr/thread/thr_pspinlock.c index 089416a18a07..374fe498034b 100644 --- a/lib/libthr/thread/thr_pspinlock.c +++ b/lib/libthr/thread/thr_pspinlock.c @@ -60,7 +60,8 @@ _pthread_spin_init(pthread_spinlock_t *lock, int pshared) if (lock == NULL) return (EINVAL); if (pshared == PTHREAD_PROCESS_PRIVATE) { - lck = malloc(sizeof(struct pthread_spinlock)); + lck = aligned_alloc(CACHE_LINE_SIZE, + roundup(sizeof(struct pthread_spinlock), CACHE_LINE_SIZE)); if (lck == NULL) return (ENOMEM); *lock = lck; diff --git a/lib/libthr/thread/thr_rwlock.c b/lib/libthr/thread/thr_rwlock.c index b7526376a9a3..3e8af974fa18 100644 --- a/lib/libthr/thread/thr_rwlock.c +++ b/lib/libthr/thread/thr_rwlock.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "namespace.h" #include @@ -102,9 +103,11 @@ rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr) if (attr == NULL || *attr == NULL || (*attr)->pshared == PTHREAD_PROCESS_PRIVATE) { - prwlock = calloc(1, sizeof(struct pthread_rwlock)); + prwlock = aligned_alloc(CACHE_LINE_SIZE, + roundup(sizeof(struct pthread_rwlock), CACHE_LINE_SIZE)); if (prwlock == NULL) return (ENOMEM); + memset(prwlock, 0, sizeof(struct pthread_rwlock)); *rwlock = prwlock; } else { prwlock = __thr_pshared_offpage(rwlock, 1); From nobody Tue Jun 27 11:56: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 4Qr39555x6z4hf77; Tue, 27 Jun 2023 11:56:57 +0000 (UTC) (envelope-from SRS0=ozBo=CP=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qr3950kpKz4LLM; Tue, 27 Jun 2023 11:56:57 +0000 (UTC) (envelope-from SRS0=ozBo=CP=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; none Date: Tue, 27 Jun 2023 13:56:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1687867008; 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=LYijmR5hfILmsr8Rpl36j6p2+JVn/fNsrDXPe+0efXs=; b=FILRvWQbSmsBzl6D5z0x5HaoCp20M+JTNKgMHmlKOu1lDx36Fxcd1xp7JP6Q8z7hWzFSo2 8Ed7jNFwHCFk1G9pIfjUlZrxO5EMdtb5kNRz+jP29ZHbiXckWVVlYmDH0z9AeYoWgVhulQ qIqmP0oRpZj4ZcQVCLBNNxfQ0onc2p75NnlhsxN0xXfGQHsKz+3QK/nhyi4JUUFkNN6WtP RS7RdltVyV2QvVc7UtzJxlgy0qPx1+uGsgB+FRte9DTjXtv6UZ/oyJGM4rv2oOcgMZKZiC e7xSdWTUkqm+6ObbA1WE1TI1190YPhnVEIfYX529WN2uur3koQHbJh4S+Udl/A== From: Ronald Klop To: Alan Cox Cc: dev-commits-src-all@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: <1976086601.6443.1687867008855@localhost> In-Reply-To: <202306270443.35R4hofY050812@gitrepo.freebsd.org> References: <202306270443.35R4hofY050812@gitrepo.freebsd.org> Subject: Re: git: d8e6f4946cec - main - vm: Fix anonymous memory clustering under ASLR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6442_948850698.1687867008768" X-Mailer: Realworks (659.136) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 4Qr3950kpKz4LLM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N ------=_Part_6442_948850698.1687867008768 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, Could this be a reason of this issue? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260187 Regards, Ronald. Van: Alan Cox Datum: dinsdag, 27 juni 2023 06:43 Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Onderwerp: git: d8e6f4946cec - main - vm: Fix anonymous memory clustering under ASLR > > The branch main has been updated by alc: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d8e6f4946cec0b84a6997d62e791b8cf993741b2 > > commit d8e6f4946cec0b84a6997d62e791b8cf993741b2 > Author: Alan Cox > AuthorDate: 2023-06-23 17:00:32 +0000 > Commit: Alan Cox > CommitDate: 2023-06-27 04:42:48 +0000 > > vm: Fix anonymous memory clustering under ASLR > > By default, our ASLR implementation is supposed to cluster anonymous > memory allocations, unless the application's mmap(..., MAP_ANON, ...) > call included a non-zero address hint. Unfortunately, clustering > never occurred because kern_mmap() always replaced the given address > hint when it was zero. So, the ASLR implementation always believed > that a non-zero hint had been provided and randomized the mapping's > location in the address space. To fix this problem, I'm pushing down > the point at which we convert a hint of zero to the minimum allocatable > address from kern_mmap() to vm_map_find_min(). > > Reviewed by: kib > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D40743 > --- > sys/vm/vm_map.c | 10 +++++++--- > sys/vm/vm_map.h | 1 + > sys/vm/vm_mmap.c | 8 +++++--- > 3 files changed, 13 insertions(+), 6 deletions(-) > > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > index f5863a9b9939..a02107b5e64d 100644 > --- a/sys/vm/vm_map.c > +++ b/sys/vm/vm_map.c > @@ -1981,14 +1981,14 @@ SYSCTL_INT(_vm, OID_AUTO, cluster_anon, CTLFLAG_RW, > "Cluster anonymous mappings: 0 = no, 1 = yes if no hint, 2 = always"); > > static bool > -clustering_anon_allowed(vm_offset_t addr) > +clustering_anon_allowed(vm_offset_t addr, int cow) > { > > switch (cluster_anon) { > case 0: > return (false); > case 1: > - return (addr == 0); > + return (addr == 0 || (cow & MAP_NO_HINT) != 0); > case 2: > default: > return (true); > @@ -2111,7 +2111,7 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset, > } else > alignment = 0; > en_aslr = (map->flags & MAP_ASLR) != 0; > - update_anon = cluster = clustering_anon_allowed(*addr) && > + update_anon = cluster = clustering_anon_allowed(*addr, cow) && > (map->flags & MAP_IS_SUB_MAP) == 0 && max_addr == 0 && > find_space != VMFS_NO_SPACE && object == NULL && > (cow & (MAP_INHERIT_SHARE | MAP_STACK_GROWS_UP | > @@ -2255,6 +2255,10 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, > int rv; > > hint = *addr; > + if (hint == 0) > + cow |= MAP_NO_HINT; > + if (hint < min_addr) > + *addr = hint = min_addr; > for (;;) { > rv = vm_map_find(map, object, offset, addr, length, max_addr, > find_space, prot, max, cow); > diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h > index 2ac54a39a57b..fd8b606e8ddc 100644 > --- a/sys/vm/vm_map.h > +++ b/sys/vm/vm_map.h > @@ -383,6 +383,7 @@ long vmspace_resident_count(struct vmspace *vmspace); > #define MAP_CREATE_STACK_GAP_DN 0x00020000 > #define MAP_VN_EXEC 0x00040000 > #define MAP_SPLIT_BOUNDARY_MASK 0x00180000 > +#define MAP_NO_HINT 0x00200000 > > #define MAP_SPLIT_BOUNDARY_SHIFT 19 > > diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c > index 56345fcaf560..408e077476dd 100644 > --- a/sys/vm/vm_mmap.c > +++ b/sys/vm/vm_mmap.c > @@ -353,10 +353,12 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) > * the hint would fall in the potential heap space, > * place it after the end of the largest possible heap. > * > - * There should really be a pmap call to determine a reasonable > - * location. > + * For anonymous mappings within the address space of the > + * calling process, the absence of a hint is handled at a > + * lower level in order to implement different clustering > + * strategies for ASLR. > */ > - if (addr == 0 || > + if (((flags & MAP_ANON) == 0 && addr == 0) || > (addr >= round_page((vm_offset_t)vms->vm_taddr) && > addr < round_page((vm_offset_t)vms->vm_daddr + > lim_max(td, RLIMIT_DATA)))) > > > > ------=_Part_6442_948850698.1687867008768 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi,

Could this be a reason of this issue?
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260187

Regards,
Ronald.

 

Van: Alan Cox <alc@FreeBSD.org>
Datum: dinsdag, 27 juni 2023 06:43
Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Onderwerp: git: d8e6f4946cec - main - vm: Fix anonymous memory clustering under ASLR

The branch main has been updated by alc:

URL: https://cgit.FreeBSD.org/src/commit/?id=d8e6f4946cec0b84a6997d62e791b8cf993741b2

commit d8e6f4946cec0b84a6997d62e791b8cf993741b2
Author:     Alan Cox <alc@FreeBSD.org>
AuthorDate: 2023-06-23 17:00:32 +0000
Commit:     Alan Cox <alc@FreeBSD.org>
CommitDate: 2023-06-27 04:42:48 +0000

    vm: Fix anonymous memory clustering under ASLR
    
    By default, our ASLR implementation is supposed to cluster anonymous
    memory allocations, unless the application's mmap(..., MAP_ANON, ...)
    call included a non-zero address hint.  Unfortunately, clustering
    never occurred because kern_mmap() always replaced the given address
    hint when it was zero.  So, the ASLR implementation always believed
    that a non-zero hint had been provided and randomized the mapping's
    location in the address space.  To fix this problem, I'm pushing down
    the point at which we convert a hint of zero to the minimum allocatable
    address from kern_mmap() to vm_map_find_min().
    
    Reviewed by:    kib
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D40743
---
 sys/vm/vm_map.c  | 10 +++++++---
 sys/vm/vm_map.h  |  1 +
 sys/vm/vm_mmap.c |  8 +++++---
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index f5863a9b9939..a02107b5e64d 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1981,14 +1981,14 @@ SYSCTL_INT(_vm, OID_AUTO, cluster_anon, CTLFLAG_RW,
     "Cluster anonymous mappings: 0 = no, 1 = yes if no hint, 2 = always");
 
 static bool
-clustering_anon_allowed(vm_offset_t addr)
+clustering_anon_allowed(vm_offset_t addr, int cow)
 {
 
    switch (cluster_anon) {
    case 0:
        return (false);
    case 1:
-       return (addr == 0);
+       return (addr == 0 || (cow & MAP_NO_HINT) != 0);
    case 2:
    default:
        return (true);
@@ -2111,7 +2111,7 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
    } else
        alignment = 0;
    en_aslr = (map->flags & MAP_ASLR) != 0;
-   update_anon = cluster = clustering_anon_allowed(*addr) &&
+   update_anon = cluster = clustering_anon_allowed(*addr, cow) &&
        (map->flags & MAP_IS_SUB_MAP) == 0 && max_addr == 0 &&
        find_space != VMFS_NO_SPACE && object == NULL &&
        (cow & (MAP_INHERIT_SHARE | MAP_STACK_GROWS_UP |
@@ -2255,6 +2255,10 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
    int rv;
 
    hint = *addr;
+   if (hint == 0)
+       cow |= MAP_NO_HINT;
+   if (hint < min_addr)
+       *addr = hint = min_addr;
    for (;;) {
        rv = vm_map_find(map, object, offset, addr, length, max_addr,
            find_space, prot, max, cow);
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index 2ac54a39a57b..fd8b606e8ddc 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -383,6 +383,7 @@ long vmspace_resident_count(struct vmspace *vmspace);
 #define    MAP_CREATE_STACK_GAP_DN 0x00020000
 #define    MAP_VN_EXEC     0x00040000
 #define    MAP_SPLIT_BOUNDARY_MASK 0x00180000
+#define    MAP_NO_HINT     0x00200000
 
 #define    MAP_SPLIT_BOUNDARY_SHIFT 19
 
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index 56345fcaf560..408e077476dd 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -353,10 +353,12 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp)
         * the hint would fall in the potential heap space,
         * place it after the end of the largest possible heap.
         *
-        * There should really be a pmap call to determine a reasonable
-        * location.
+        * For anonymous mappings within the address space of the
+        * calling process, the absence of a hint is handled at a
+        * lower level in order to implement different clustering
+        * strategies for ASLR.
         */
-       if (addr == 0 ||
+       if (((flags & MAP_ANON) == 0 && addr == 0) ||
            (addr >= round_page((vm_offset_t)vms->vm_taddr) &&
            addr < round_page((vm_offset_t)vms->vm_daddr +
            lim_max(td, RLIMIT_DATA))))
 


  ------=_Part_6442_948850698.1687867008768-- From nobody Tue Jun 27 12:21: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 4Qr3jX2m7Zz4k7C5; Tue, 27 Jun 2023 12:21:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qr3jW5Vnwz3Hxt; Tue, 27 Jun 2023 12:21:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 35RCLMqv094960 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 27 Jun 2023 15:21:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 35RCLMqv094960 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 35RCLMnR094959; Tue, 27 Jun 2023 15:21:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 27 Jun 2023 15:21:22 +0300 From: Konstantin Belousov To: Mateusz Guzik Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a6c0d801ca59 - main - libpthread: allocate rwlocks and spinlocks in dedicated cachelines Message-ID: References: <202306271156.35RButXO071800@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 Content-Disposition: inline In-Reply-To: <202306271156.35RButXO071800@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4Qr3jW5Vnwz3Hxt X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, Jun 27, 2023 at 11:56:55AM +0000, Mateusz Guzik wrote: > The branch main has been updated by mjg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a6c0d801ca5934bb9b9cca6870ea7406d5db0641 > > commit a6c0d801ca5934bb9b9cca6870ea7406d5db0641 > Author: Greg Becker > AuthorDate: 2023-06-27 01:08:29 +0000 > Commit: Mateusz Guzik > CommitDate: 2023-06-27 11:56:44 +0000 > > libpthread: allocate rwlocks and spinlocks in dedicated cachelines Why e.g. mutexes were not handled in the similar way? From nobody Tue Jun 27 13:47: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 4Qr5cD0462z4jrPW; Tue, 27 Jun 2023 13:47:08 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oa1-x35.google.com (mail-oa1-x35.google.com [IPv6:2001:4860:4864:20::35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qr5cC5Pz5z4Dn0; Tue, 27 Jun 2023 13:47:07 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-1b0627731d1so508957fac.1; Tue, 27 Jun 2023 06:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687873626; x=1690465626; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2CyGkG3JRY3SZfdVrl7ii7mTJPKvbGgtVGnCe4+Dj+g=; b=FwZdQQINnyOH3bMxxYcZ1V+mAuPqXEqyS2H7FQSSpwf54QBkbAADSahkuO/Nek+E/A JXmHf8asDWdLCI8FfB9XmdADPXMiUOcLCLlB/FRIEd61otzVEXGKyhjaJO5TsXWMd5Xz 5e463KnNHhNKHE/j/bFIMr+hqBbt7VfhxS2t+JA2bJJV7Zr9Qwt45imUJNvlRLOvKqxC R55aeOuJsubcaA7poATYtMMuyZjCLTGM74SWlj8nsNGs3QyYTKOuhzJ+lF4SMmbcwrRH O3QjJ9K8qJP9soiny6vNPrDe9TUOn71feu0WQ9eS3MPEbSk3z6QfbyGXmn2bj+ydkul6 koMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687873626; x=1690465626; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2CyGkG3JRY3SZfdVrl7ii7mTJPKvbGgtVGnCe4+Dj+g=; b=HMMrrmchILhaay5FUJek1mlzHDIDWk/RhYso9Q1Fd1dSh4McuuBnrK0E3zALv07dm2 eRyz54caX+fAWxkDsPvWui2llNa+CFrb4Yo488xG+jHluvaIFy7MVrYefCX4f2AQ/PH4 I7mrEig4ulVvUWl8bjbKbFLMrjpNZ2XHgrzbRJqEFH4JixfThCOT6J0RhKewBCl/uZD+ Ap9k8VzVfQ9elScV1dTU52EnVzAi/xr5KM/O5dyfQK3a1b15bnceUMeCZ+i+8WP3Ekg3 KBsBHE/gJywdBnkAAIZbbnLwJLhJn4bEanC68NvgqW1V5v+V5aTqeIO4uzKww5TIvcW4 4d7Q== X-Gm-Message-State: AC+VfDyxLJ5w8HUzfA695bP1O/2wRG6/QKuFvHLuVuihoo9dBtdscoGp ndBF57+ASeO5J3qDI8aUL9YWfYY8Zyzj79G4L4sLJLQo X-Google-Smtp-Source: ACHHUZ57ZkJN3lSill1+wZqYBBtMVL6qXqwPPynJw85abJdFt1DMU+rc6Xc3NyHfbT91V9F/KeI5i2YFEt0UgJ+J2Xc= X-Received: by 2002:a05:6870:5383:b0:1a6:5f0d:f955 with SMTP id h3-20020a056870538300b001a65f0df955mr21219770oan.1.1687873626020; Tue, 27 Jun 2023 06:47:06 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:a8a:611:0:b0:4e1:6042:cdc9 with HTTP; Tue, 27 Jun 2023 06:47:05 -0700 (PDT) In-Reply-To: References: <202306271156.35RButXO071800@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 27 Jun 2023 15:47:05 +0200 Message-ID: Subject: Re: git: a6c0d801ca59 - main - libpthread: allocate rwlocks and spinlocks in dedicated cachelines To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Qr5cC5Pz5z4Dn0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 6/27/23, Konstantin Belousov wrote: > On Tue, Jun 27, 2023 at 11:56:55AM +0000, Mateusz Guzik wrote: >> The branch main has been updated by mjg: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=a6c0d801ca5934bb9b9cca6870ea7406d5db0641 >> >> commit a6c0d801ca5934bb9b9cca6870ea7406d5db0641 >> Author: Greg Becker >> AuthorDate: 2023-06-27 01:08:29 +0000 >> Commit: Mateusz Guzik >> CommitDate: 2023-06-27 11:56:44 +0000 >> >> libpthread: allocate rwlocks and spinlocks in dedicated cachelines > Why e.g. mutexes were not handled in the similar way? > Sorting out the general problem looks like quite a bit of churn. For example the aforementioned mutexes end up with __thr_calloc -> __crt_calloc which does not provide alignment support afaics. The above patch sorts out some of the problem in a trivial manner, so I saw no issue putting it in. -- Mateusz Guzik From nobody Tue Jun 27 15:04: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 4Qr7KN2bGwz4k4gV; Tue, 27 Jun 2023 15:04: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 4Qr7KN1fRzz3N1k; Tue, 27 Jun 2023 15:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687878264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yaNGQwYYgiea3v3wVN/DfPXe7beAJJjI4000ieU3HnQ=; b=DqK+dGkXOBVCk6lBFAdECWJvR5lXzEToIQTfRaRwcEU0Zvse/Jk7oz+izkzCkcwIw881b+ aAI5D34z0W0KdSeQW0UX8OfSeZ5X2hJhlqQp5u7W0CLhskPmieO0+q+TeJd3CKX7mvL4bb GWm6+EPE1wmgv+J7cdb4+m0Ip3xMkSWT1paS1aza1UUvMLZg+jLpYxRCYjvGtylHI5mRNk CBO4VI4rAev6mOk8SLTebm4EFUO0NN7yNmQIgKdcV4OZnKB8xPniSvPKMvC1HZBmF0QLXX R4TgKG9uW0qQyPYjieGjDQ2uHMzb6bqbiV36N9Ce4ZJ1hYgu7Ih+/7HRqylT8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687878264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yaNGQwYYgiea3v3wVN/DfPXe7beAJJjI4000ieU3HnQ=; b=Vcm9P9dr/7N1fl4QeT0YOhrsabyfK7vgTnIv/TnEzynKjFtz9iez6eNYUhe///bGpP513C /+sOZGXVz/SuBmrUr+8bfdZEplgyjDOa7G6QoIUAZ4/y6wRnxg/x1aSZXh+LzYvYhWGtaF OvGTNzfWoNgMcBaY0JQ6le/x5hSdftCuRoL8+PNpTBJSnOLC0xdLA2xoMZ5J2uKRpIr8gT lg+N1cUcWghDhfyGs7APUapqbo1ax65OQSUD/5wQeG6//7f9CTqnKSVermv1VJjyCoqcXV DdiflAoHB7+XsjpTXcVO9/gvQEPeViD72VC0PLhTXfHK+ZyzrSBgUpwXR8tcew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687878264; a=rsa-sha256; cv=none; b=hir5xaYrKC4Z+waYfCFR1jPPGruzfnbfiChFhQjR29hBTJXNd9fDd8djJN/KwP+m8mEmLA UI3EbdEsQDvPBB2zNxQBIgSG2hDHpSkc8jcF+g0KbNhxQZuEBwxD4y7+YVogmW+dIPre+j gHEWvJeeHD/Fio3vur5v98oQ6ewd6VP7DXExtUDMMYhuT4mdO3OLlqShXL/4IIy1j/n2gC OJfLKsyFoDaqUrbAXFwZ5jlhlecMh44aq+qqMzgRvZjtiITbTm7/kZHe6jLXndbZXi3nEu yHhkTADDK1g5aPjgo+PMN8NdoDzGOmomkGp9qJI/hnQmtgFYAq8Eix8LiJBcHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr7KN0XKmzx1H; Tue, 27 Jun 2023 15:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RF4N0c089311; Tue, 27 Jun 2023 15:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RF4Nfl089310; Tue, 27 Jun 2023 15:04:23 GMT (envelope-from git) Date: Tue, 27 Jun 2023 15:04:23 GMT Message-Id: <202306271504.35RF4Nfl089310@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: 8edb6fb572f2 - main - man(1): Support custom sections List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8edb6fb572f29578877fdac3c30f718e589a0360 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8edb6fb572f29578877fdac3c30f718e589a0360 commit 8edb6fb572f29578877fdac3c30f718e589a0360 Author: Mohamed Akram AuthorDate: 2023-06-27 13:51:24 +0000 Commit: Warner Losh CommitDate: 2023-06-27 13:51:27 +0000 man(1): Support custom sections PR: 271830 Signed-off-by: Mohamed Akram Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/764 --- usr.bin/man/man.sh | 70 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index aa7d1287405a..2b20c4394733 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -69,6 +69,25 @@ build_manlocales() { decho "Available manual locales: $MANLOCALES" } +# Usage: build_mansect +# Builds a correct MANSECT variable. +build_mansect() { + # If the user has set mansect, who are we to argue. + if [ -n "$MANSECT" ]; then + return + fi + + parse_configs + + # Trim leading colon + MANSECT=${mansect#:} + + if [ -z "$MANSECT" ]; then + MANSECT=$man_default_sections + fi + decho "Using manual sections: $MANSECT" +} + # Usage: build_manpath # Builds a correct MANPATH variable. build_manpath() { @@ -548,10 +567,10 @@ man_find_and_display() { fi } -# Usage: man_parse_args "$@" +# Usage: man_parse_opts "$@" # Parses commandline options for man. -man_parse_args() { - local IFS cmd_arg +man_parse_opts() { + local cmd_arg OPTIND=1 while getopts 'K:M:P:S:adfhkm:op:tw' cmd_arg; do @@ -601,19 +620,6 @@ man_parse_args() { do_apropos "$@" exit fi - - IFS=: - for sect in $man_default_sections; do - if [ "$sect" = "$1" ]; then - decho "Detected manual section as first arg: $1" - MANSECT="$1" - shift - break - fi - done - unset IFS - - pages="$*" } # Usage: man_setup @@ -633,14 +639,8 @@ man_setup() { decho "Using architecture: $MACHINE_ARCH:$MACHINE" setup_pager - - # Setup manual sections to search. - if [ -z "$MANSECT" ]; then - MANSECT=$man_default_sections - fi - decho "Using manual sections: $MANSECT" - build_manpath + build_mansect man_setup_locale man_setup_width } @@ -787,6 +787,10 @@ parse_file() { trim "${line#MANCONFIG}" config_local="$tstr" ;; + MANSECT*) decho " MANSECT" 3 + trim "${line#MANSECT}" + mansect="$mansect:$tstr" + ;; # Set variables in the form of FOO_BAR *_*[\ \ ]*) var="${line%%[\ \ ]*}" trim "${line#$var}" @@ -1008,12 +1012,28 @@ do_full_search() { } do_man() { - man_parse_args "$@" + local IFS + + man_parse_opts "$@" + man_setup + + shift $(( $OPTIND - 1 )) + IFS=: + for sect in $MANSECT; do + if [ "$sect" = "$1" ]; then + decho "Detected manual section as first arg: $1" + MANSECT="$1" + shift + break + fi + done + unset IFS + pages="$*" + if [ -z "$pages" -a -z "${Kflag}" ]; then echo 'What manual page do you want?' >&2 exit 1 fi - man_setup if [ ! -z "${Kflag}" ]; then # Short circuit because -K flag does a sufficiently From nobody Tue Jun 27 15:30: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 4Qr7vw3bxRz4kYCW; Tue, 27 Jun 2023 15:30: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 4Qr7vw332dz3rDk; Tue, 27 Jun 2023 15:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687879852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QNEF0/a3y/XJI+Bm/JF0yQtBK+PfmIebYjS8e+j2kzE=; b=DHM/eNtEDwz56g6ov7Zukovh3vwrfEJXdkA+ae6Op7j4LbRZND/NW7B6LbNodmljtcJtMF 961lRtEnOVRHRKew+v16dFac0YGQt2n3eup7DMLuLnRTO2lJPdTnLaoKmyexu+JK+UqoPd PzzEIj6HzloqlpGBLsfTQDa+gHDWHq8bmkqpwpf6eKy/njz0EjaEuen9K9VwGKON6ZsfeV QCukUQrcR9qqJHlSv6Pzyq5WrG57PrC7u5PDn/Pmte2CEYpTqw/Ttu1NdqYUk56oHeIVAz kceR6+Vq0nqoz31JvvyOcYj9jr2DQO5l2KF6IengdatV9t5+AhvJfNbYGfaPPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687879852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QNEF0/a3y/XJI+Bm/JF0yQtBK+PfmIebYjS8e+j2kzE=; b=DNhb7STfAwJKHx4ZxXDXv99G76XAd68idLFVl3/gWG1xaXZtKadJDeYrwTqjipTZVqvzp2 oktwilYoJN3i77ZO0v9wn02g5YMMIOxSQMXELv3SqDP/Agp48C73/ks3V0uXTwSdLTX9kf F2K+onfzQPbzRHlIQDrd0+4+YJ6W8knNwDlzos8o0UHj/XBzVJyApzEHddFeb3MUpaV9N+ KPK12xGcGn8xtHFAZEhM6lGsP1RXhGO7d/8Z3sjb5xEE2HTXItj16Ong20+zok0Pacm3Hs YeLPbTYZZexJPnEo/E3WNPYuBAH1WUJLSzBc/cER2/bFXfCu0sgFBJKko5qlaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687879852; a=rsa-sha256; cv=none; b=lUEc9BJyM0d11OPCau1KnKdglJPe2xPK8d6efXCFOHQamdp81HgzTq9E9JPEC5mSPFEDtM GDMunk8Uo1UpP8P5aSp9iPPtTPLecHit6+906elP3J5ghWpEmH5NxOEB1CxHCQFGT+SE+o jbTDklQQuvB5AwRdvii8Mi5+DdGkP8C3JzLq2iJz7EGoLYkCvI+hOLJtlS6GqOzGR8ASLM 46jJBUiDvwgPPAoaIpo7A4hCaheAFzyTGkP9jm3CZwky7P581wanRpDBIHIwzCe41Jyowy nNWJ3Y7dQcJpB5RpQ7Ecma+yrMGVt4vCc7VE0/dpWUNwfkrwJI6IyLzEkDl0Pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr7vw1Tb8zxhD; Tue, 27 Jun 2023 15:30:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RFUqdm033472; Tue, 27 Jun 2023 15:30:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RFUqiB033471; Tue, 27 Jun 2023 15:30:52 GMT (envelope-from git) Date: Tue, 27 Jun 2023 15:30:52 GMT Message-Id: <202306271530.35RFUqiB033471@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: cea84a423599 - stable/13 - cap_net.3: fix 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cea84a42359937cc4abd1f07bc25a4d97496d34c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cea84a42359937cc4abd1f07bc25a4d97496d34c commit cea84a42359937cc4abd1f07bc25a4d97496d34c Author: Shawn Webb AuthorDate: 2023-06-21 00:47:19 +0000 Commit: Ed Maste CommitDate: 2023-06-27 14:00:27 +0000 cap_net.3: fix typo Signed-off-by: Shawn Webb --- lib/libcasper/services/cap_net/cap_net.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libcasper/services/cap_net/cap_net.3 b/lib/libcasper/services/cap_net/cap_net.3 index e74f7dd70d67..532da5e6ad59 100644 --- a/lib/libcasper/services/cap_net/cap_net.3 +++ b/lib/libcasper/services/cap_net/cap_net.3 @@ -128,7 +128,7 @@ CAPNET_DEPRECATED_NAME2ADDR name resolution is allowed with CAPNET_BIND bind syscall is allowed CAPNET_CONNECT connect syscall is allowed CAPNET_CONNECTDNS connect syscall is allowed to the values - returned from privies call to + returned from previous call to the cap_getaddrinfo or cap_gethostbyname .Ed .Pp From nobody Tue Jun 27 17:00: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 4Qr9v94vnQz4kjcn; Tue, 27 Jun 2023 17:00: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 4Qr9v94V3dz3CfD; Tue, 27 Jun 2023 17:00:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hYRVqqMpRbIfGlVQuMiyLRvETO1MPnfs8xNIbJKCgCM=; b=RuRjLlEq+HDfle2nBp/JzzgqIOW3oTvcDFDNq6i6Oznhel6Amnqw+CoDJENgHhlMz/7tvD PTIXzeoqtYXt47dp3pt/SykT0eg0nWXus/ToPcrTS3cjBK1QO1xhfpcN4RQgx1TxvsNuBY 9mWhCtdpx/PWVpBwS5FclqfWx7GzGPDCJQEXNeDIlQPSJUBBtp66JXof+VlrgRgR1tq4kv tTCkIPNVZguiMfl5DVaMSECakbD0Mvz+FqJ93C8Kue6jOzTXOa+YXYGZpRo7pSrXSeP8Hf chiLb8aq38qMJmNms37pMdUwAo1Rjys52ZI5oojAMclq/FpatSdeYNu+gbqGGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hYRVqqMpRbIfGlVQuMiyLRvETO1MPnfs8xNIbJKCgCM=; b=KEbOkqRUUwkgSg9nsA7JJLCldyqB2vrBFkCav7MsuGGX6OpIkdh3DorrOqeNmP2bJAiJ5o LkHyAsD4+DVFKIwozQNlMe/mqpNDbaLlxFBYdDa9xlSlOzlUABDKG3mDxXmMPdlp1JhJsS 4vPccpvUVbckRYaPUDgybv+UwUPABZByanMskITPUBnpxomYYF3UM+RUkjBiAiPp21HGLW KLGzRHUnkro2T6WrjnnqrTDmu4kzt4pEqNzvBfEp8r+3/+9mf2EiYbzu8TdkW6rJ2vOLmK Q/VYOlS+bh5y4KO141Qc4J6XVyUp/ke/0UmqpmRt1LRA2k6/CgvoZvya/r15+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687885221; a=rsa-sha256; cv=none; b=l3DF/JyvtrWhPBkw9Jm78X0s17HSM0JQ8zhIsipiK8Vd2G5HvtELyqmKtRchxzitTsAG1t xkKDSFq1JmlOaCR5eNlwyGXaqD3anvOPa/dPbZKFi+Uzoi4u0AVi3Xaq/t2/nJl7TcqrcT 4AOMi6E6ovlZfwu8yXrKEZfvkVrX841k3uqr+peGNkgZYa53zIFvYJ/1hF0J/hwXTF1ZTS sTQQEz6sVg1eURk+04S4oa+ieIEEDPNCp7MOgZaX3TYIOuFWzEmYU6o1zI1IbcXmPQteTv b99miAmDaRKu96b4tMJVr9CZFoRQxG/96Q8BhUmfGWgeNTVrplqRYF3oGeocTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr9v93FyDz10kT; Tue, 27 Jun 2023 17:00:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RH0LFI081404; Tue, 27 Jun 2023 17:00:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RH0L16081403; Tue, 27 Jun 2023 17:00:21 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:00:21 GMT Message-Id: <202306271700.35RH0L16081403@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: a227908571da - main - unzip: add -O/-I encoding 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a227908571da056f66abb7263f965331303bf02f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a227908571da056f66abb7263f965331303bf02f commit a227908571da056f66abb7263f965331303bf02f Author: Mingye Wang AuthorDate: 2023-06-27 16:54:12 +0000 Commit: Warner Losh CommitDate: 2023-06-27 16:55:26 +0000 unzip: add -O/-I encoding support These are for compatibility with the info-zip version of unzip. PR: 271657 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/752 --- usr.bin/unzip/unzip.1 | 6 +++++- usr.bin/unzip/unzip.c | 11 +++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 index 82e2c3a60ea0..436f1a928ce9 100644 --- a/usr.bin/unzip/unzip.1 +++ b/usr.bin/unzip/unzip.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2023 +.Dd June 27, 2023 .Dt UNZIP 1 .Os .Sh NAME @@ -34,6 +34,7 @@ .Sh SYNOPSIS .Nm .Op Fl aCcfjLlnopqtuvy +.Op { Fl O | Fl I No } Ar encoding .Op Fl d Ar dir .Op Fl x Ar pattern .Op Fl P Ar password @@ -62,6 +63,9 @@ Update existing. Extract only files from the zipfile if a file with the same name already exists on disk and is older than the former. Otherwise, the file is silently skipped. +.It Fl I Ar encoding +.It Fl O Ar encoding +Convert filenames from the specified encoding. .It Fl j Ignore directories stored in the zipfile; instead, extract all files directly into the extraction directory. diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index 578eaca9d772..1200aa53e7e3 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -59,6 +59,7 @@ static int C_opt; /* match case-insensitively */ static int c_opt; /* extract to stdout */ static const char *d_arg; /* directory */ static int f_opt; /* update existing files only */ +static char *O_arg; /* encoding */ static int j_opt; /* junk directories */ static int L_opt; /* lowercase names */ static int n_opt; /* never overwrite */ @@ -917,6 +918,9 @@ unzip(const char *fn) ac(archive_read_support_format_zip(a)); + if (O_arg) + ac(archive_read_set_format_option(a, "zip", "hdrcharset", O_arg)); + if (P_arg) archive_read_add_passphrase(a, P_arg); else @@ -999,7 +1003,7 @@ usage(void) { fprintf(stderr, -"Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] [-x pattern] [-P password] zipfile\n" +"Usage: unzip [-aCcfjLlnopqtuvyZ1] [{-O|-I} encoding] [-d dir] [-x pattern] [-P password] zipfile\n" " [member ...]\n"); exit(EXIT_FAILURE); } @@ -1010,7 +1014,7 @@ getopts(int argc, char *argv[]) int opt; optreset = optind = 1; - while ((opt = getopt(argc, argv, "aCcd:fjLlnopP:qtuvx:yZ1")) != -1) + while ((opt = getopt(argc, argv, "aCcd:fI:jLlnO:opP:qtuvx:yZ1")) != -1) switch (opt) { case '1': Z1_opt = 1; @@ -1030,6 +1034,9 @@ getopts(int argc, char *argv[]) case 'f': f_opt = 1; break; + case 'I': + case 'O': + O_arg = optarg; case 'j': j_opt = 1; break; From nobody Tue Jun 27 17:00: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 4Qr9vB6GF7z4kjWj; Tue, 27 Jun 2023 17:00: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 4Qr9vB5N4wz3Cp2; Tue, 27 Jun 2023 17:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+hDCWnemMVVAj8AYI2+2ZHsv7KAcUwYLO4Rzvv5THwI=; b=LFIrLxz4+yfKRZBsrqT3gAFUXtoxOJmMn92KkQukEKFL36TKec74W3K707qLp6Ifpub97K xuziwvYZN45HhdB0/Eo2JWYRCv+lnCHKmhFfzwt9yx577ap4/7h5rPAUNFxnxBJadCFaD3 yhUiOnEFBWMsu2Z/WlTBdy+GyyQHiRbu5+aJMefZ5gj89rvCT7SN/pgv7Hu7Z8mrd/fhc6 /UCaPt7HCfdblofTAvFs6YDKRQ0qKrG+WovVAGNeG+jXI0/G63aeVnvc3+5gnP4Aywce5G zI5JoD/ATOA7zCSEJLK8mljLqrnZw2J93xURYbhC6CKdsL1bclE5XaqjDb3+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+hDCWnemMVVAj8AYI2+2ZHsv7KAcUwYLO4Rzvv5THwI=; b=oosyOfYKNo3Jbai8qPZsimg6p+szDxEBOAjADHSxIsiFO/oisPS0igkfTZbTJQtw6W2r4k lS+fKACZb193gOh7E/Bygm9vcRMtC1flB4qBO/wmyJmPTcnq78jiIpiscqYhPcP8+rKEvx N08//wdZwozeFkJYjqLA2LjAXmR9Jdu4XyumDEbb/LDuaTRP4grQhx9244RRv4NG3Jo5f8 oLYxobfec1W82eQloySmoMOojZZSLmq1beVrZ3OaYa0qezX8SLZXgNPC9xUfs0MJ3fGtO+ WAA0bpV2EHtXvhUTL/t8Y/EIjNmzApZZR153QGXlSFEASCTYK+TQ/uH7tNlS5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687885222; a=rsa-sha256; cv=none; b=G02MH7Xp070H49jDCeY7EGbps7ccK1oRgTuiIXUA1GjWqeivjNsj98VEjhPzBWjQlQeU6i eUyiij3ZYU9tjQUp0MYgTMo8sAlSD/jYRwH5JKpopEFe8n03dMzv6jRmIUJJsQKc2fKJ9n LAKDgkCqA5DqMt4fhce08b03tPQaeTBPG0cyqp2zPat08HepxKoyboWeY84iZYrO9x8A9p TU1IP2vSmaDNicIwkiyeD7fha40+Slw1ySfz1CrLeXpGXYiMw1nsWzS3ZaKQFus5Ajqn3/ wLqLQGNZO9O6MICGwpdlyeyy3evXe50LgsPZSCyglF1nt0jqaDo22OkadTeM2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr9vB4NWRz10lZ; Tue, 27 Jun 2023 17:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RH0MHm081423; Tue, 27 Jun 2023 17:00:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RH0MTi081422; Tue, 27 Jun 2023 17:00:22 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:00:22 GMT Message-Id: <202306271700.35RH0MTi081422@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: a1db51dbdb01 - main - unzip(1): Comma after e.g. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a1db51dbdb016d4130a7a2f4ad93908fcc44eedd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a1db51dbdb016d4130a7a2f4ad93908fcc44eedd commit a1db51dbdb016d4130a7a2f4ad93908fcc44eedd Author: Warner Losh AuthorDate: 2023-06-27 16:58:40 +0000 Commit: Warner Losh CommitDate: 2023-06-27 16:58:40 +0000 unzip(1): Comma after e.g. Add comma after e.g. to make igor happy (oh, and I suppose to conform to normal English grammar rules). Sponsored by: Netflix --- usr.bin/unzip/unzip.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1 index 436f1a928ce9..fd826fbe1c05 100644 --- a/usr.bin/unzip/unzip.1 +++ b/usr.bin/unzip/unzip.1 @@ -127,7 +127,7 @@ Currently only mode 1 is supported, which lists the file names one per line. .It Ar [member ...] Optional list of members to extract from the zipfile. -Can include patterns, e.g. +Can include patterns, e.g., .Ar 'memberdir/*' will extract all files and dirs below memberdir. .El From nobody Tue Jun 27 17:01: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 4Qr9wv732tz4kkDm; Tue, 27 Jun 2023 17:01: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 4Qr9wv6Zdvz3F0g; Tue, 27 Jun 2023 17:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yjg3jvbVF8Kt3F9wXdd9tCCuP2/kcTvLrWQRikf6+EE=; b=gOqhJYA+dnHFicQE4TgT4NjhL7iJ5UF4oR2qENeoT68AZT8x7cXcn9V+iKkKE04JGYzNko BDw3yId0pS9Zf60oJrSKNvSHiF4WNnJtlAe6C/GpdgJ06/HIKF/ScYnSGyCyLqFeqZn7mY PQvYjAR7OoM34Zt1Yjrn4KUUGL9wWtNSX7w1jNRB6gq/uLUvzSz2mEEpM4SXm72qdMMkqr OUtBVrASy+UCbTxihj5gm+3/FhfiJ9VLTEJ1UTtDwwlooerTK2LrFufWwRmd1G6QjLT3gi 16SYxkbsoK6NZ4UgflLKNHgQgE2auiFDVpLWFbqdAEwDwBZk/6goE418BVkl1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yjg3jvbVF8Kt3F9wXdd9tCCuP2/kcTvLrWQRikf6+EE=; b=Liy8AOQ0JE4AaDIkjd7VS6qDXCZe65PUbs/g83yzwd02AyvhR77xClybQWije/z2H3fWDw YEuuOLrmsLmuEawK4R9ZQFcPqtcdOOAyBGqH3GZIrCAowKRUAw8LDsKo2P8S/Y2S2QRx1a 404Tfx2pMB3uEXsQGjKkUTigZBIXK4FBzV+zx+KAp7wY4HRLXpy09XDw1mRfHwc5WSc8B8 zWC/67aEq3YZ7432Xv808YrRVhqBfNBiNg4w6rNdVRw55X7VZMp73lxNKw3H+ZLgiIPO94 Zun5Z+z7owKpALZ97Yk5ShMTSVus0ysdUYRCXGrfSpMJXavio2mvi+r0uZIizw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687885311; a=rsa-sha256; cv=none; b=JweSmQDsOfyRKIAHI39/0Dr2PwYipByfx73TYVKC7rSWg2TG/YkkAYoZPxtZEiun4vz0yS gb9NwjEn4C6IsooN5xFvV/7I6DOQRRdu9Wk0UiLqtZf6o47qBx07WD31YX4nxdgx80g1Tx Q7LF/A8quheiqhZOrcPglJhlmTLO+8kj5rOlZqghzTjV5OFyM5cwT0GhFjtfsMXAXfD27S xxTdvosjzfW8wS+qx/smgwW4DVgsJcwOXVZ94o9jGW1ftsDjKmi9G7j2IYPpuIc2NTpdA5 cT+agp7ac3JlPFIXj1y4sUZAymy18OJ4m96YRnv4hUFbbf0KqwHwEsrCp+ZnWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr9wv5dKYz10kl; Tue, 27 Jun 2023 17:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RH1pPV085969; Tue, 27 Jun 2023 17:01:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RH1pgF085968; Tue, 27 Jun 2023 17:01:51 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:01:51 GMT Message-Id: <202306271701.35RH1pgF085968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 9cfed089ac48 - main - radix_trie: clean up overlong lines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cfed089ac4820b95457818f1aa1bd199535ddca Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=9cfed089ac4820b95457818f1aa1bd199535ddca commit 9cfed089ac4820b95457818f1aa1bd199535ddca Author: Doug Moore AuthorDate: 2023-06-27 16:59:12 +0000 Commit: Doug Moore CommitDate: 2023-06-27 17:01:33 +0000 radix_trie: clean up overlong lines This is purely a cosmetic change. vm_radix.c has lines that reach past column 80 and this change cleans that up. The associated changes to subr_pctrie.c are just to keep mirroring vm_radix.c. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40764 --- sys/kern/subr_pctrie.c | 13 +++++++++++-- sys/vm/vm_radix.c | 31 ++++++++++++++++++++----------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index d9269bfb3885..b5dee2163a40 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -228,6 +228,15 @@ pctrie_isleaf(struct pctrie_node *node) return (((uintptr_t)node & PCTRIE_ISLEAF) != 0); } +/* + * Returns val with leaf bit set. + */ +static __inline void * +pctrie_toleaf(uint64_t *val) +{ + return ((void *)((uintptr_t)val | PCTRIE_ISLEAF)); +} + /* * Returns the associated val extracted from node. */ @@ -249,7 +258,7 @@ pctrie_addval(struct pctrie_node *node, uint64_t index, uint16_t clev, slot = pctrie_slot(index, clev); pctrie_node_store(&node->pn_child[slot], - (void *)((uintptr_t)val | PCTRIE_ISLEAF), access); + pctrie_toleaf(val), access); } /* @@ -356,7 +365,7 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) */ node = pctrie_root_load(ptree, NULL, PCTRIE_LOCKED); if (node == NULL) { - ptree->pt_root = (uintptr_t)val | PCTRIE_ISLEAF; + ptree->pt_root = (uintptr_t)pctrie_toleaf(val); return (0); } parentp = (smr_pctnode_t *)&ptree->pt_root; diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index 9c8ba5287d4e..a34de9e6ff92 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -254,6 +254,15 @@ vm_radix_isleaf(struct vm_radix_node *rnode) return (((uintptr_t)rnode & VM_RADIX_ISLEAF) != 0); } +/* + * Returns page cast to radix node with leaf bit set. + */ +static __inline struct vm_radix_node * +vm_radix_toleaf(vm_page_t page) +{ + return ((struct vm_radix_node *)((uintptr_t)page | VM_RADIX_ISLEAF)); +} + /* * Returns the associated page extracted from rnode. */ @@ -275,7 +284,7 @@ vm_radix_addpage(struct vm_radix_node *rnode, vm_pindex_t index, uint16_t clev, slot = vm_radix_slot(index, clev); vm_radix_node_store(&rnode->rn_child[slot], - (struct vm_radix_node *)((uintptr_t)page | VM_RADIX_ISLEAF), access); + vm_radix_toleaf(page), access); } /* @@ -325,7 +334,8 @@ vm_radix_reclaim_allnodes_int(struct vm_radix_node *rnode) KASSERT(rnode->rn_count <= VM_RADIX_COUNT, ("vm_radix_reclaim_allnodes_int: bad count in rnode %p", rnode)); for (slot = 0; rnode->rn_count != 0; slot++) { - child = vm_radix_node_load(&rnode->rn_child[slot], UNSERIALIZED); + child = vm_radix_node_load(&rnode->rn_child[slot], + UNSERIALIZED); if (child == NULL) continue; if (!vm_radix_isleaf(child)) @@ -395,7 +405,7 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) */ rnode = vm_radix_root_load(rtree, LOCKED); if (rnode == NULL) { - rtree->rt_root = (uintptr_t)page | VM_RADIX_ISLEAF; + rtree->rt_root = (uintptr_t)vm_radix_toleaf(page); return (0); } parentp = (smrnode_t *)&rtree->rt_root; @@ -764,7 +774,8 @@ vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index) m = vm_radix_topage(tmp); if (m->pindex != index) return (NULL); - vm_radix_node_store(&rnode->rn_child[slot], NULL, LOCKED); + vm_radix_node_store( + &rnode->rn_child[slot], NULL, LOCKED); rnode->rn_count--; if (rnode->rn_count > 1) return (m); @@ -838,7 +849,7 @@ vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage) if (m->pindex != index) panic("%s: original replacing root key not found", __func__); - rtree->rt_root = (uintptr_t)newpage | VM_RADIX_ISLEAF; + rtree->rt_root = (uintptr_t)vm_radix_toleaf(newpage); return (m); } for (;;) { @@ -846,13 +857,11 @@ vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage) tmp = vm_radix_node_load(&rnode->rn_child[slot], LOCKED); if (vm_radix_isleaf(tmp)) { m = vm_radix_topage(tmp); - if (m->pindex == index) { - vm_radix_node_store(&rnode->rn_child[slot], - (struct vm_radix_node *)((uintptr_t)newpage | - VM_RADIX_ISLEAF), LOCKED); - return (m); - } else + if (m->pindex != index) break; + vm_radix_node_store(&rnode->rn_child[slot], + vm_radix_toleaf(newpage), LOCKED); + return (m); } else if (tmp == NULL || vm_radix_keybarr(tmp, index)) break; rnode = tmp; From nobody Tue Jun 27 17:02: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 4Qr9xm4Lcyz4kl8W for ; Tue, 27 Jun 2023 17:02: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 4Qr9xm3wXHz3FY9; Tue, 27 Jun 2023 17:02:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qtMY1AJJI9ALwECsGTuBtFILOfpltoGQZ5qQ59Sn6oY=; b=y1H3DbqpftLNcN9uiuy3TW0RIGLZhM84KloetTC0mFYnYtg/lZVuZmQ8ufvRxoeqkI6mdP r5SEx1YVx5g4gAEsCFpcS7Z9cU9oiL0WxbXY/4TAWBUc7uhx59hCIIqpnfNLxMYIckePR0 cxL3/gCHLiHFZS+9/kLmErHqeApTduHMWWCV5vYDWKOHtldIk/MMiiT/8yXsKHQFz2RbUa 4yoxpbzyLJbqR+qyJbZNG2jAZyQabrFtZb6q+uy6KJSYG/PMTkOZAUKOgyQDRh3Lv3C0pu ADvCvYCDynct0ks+WX/hJqAn/nK9gS0zdKpFxP/kV19LP5dS7uqrQaVgySnYFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qtMY1AJJI9ALwECsGTuBtFILOfpltoGQZ5qQ59Sn6oY=; b=MX+2mGQEw+wADksRcJxuAxAns9TpgVwwrKI+OkJUy/m51PF+mb/K5uBPwdF1Kaxy2rf84J zgaBsBtyTKuC1IIyqrEaXmSyTRg26yp6MUjPpU4KPW1UN0SRVEGLnoCg5YCpY/gvRtCDWt esxkusBiYLCXRZBymKT7JW94nZIr4MjEQruog+z6wmG3vupsxzzi5ml1HoXEXps9UKu6wR JSOnObOVJ8yaeyXyIKkiIcyax1w6wxCXxIMB3XjB08O8xm8z16eCvuk05JTPRAUSpltCay KxfQohZmlREYOaD8p8zxD8ru8ZGbiScIAuCGnEjx7D+DZATV7Qd6Y4p3A3CuWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687885356; a=rsa-sha256; cv=none; b=KGIbIKwQxi+eUcTp2D/at1QKGNCmvywUyS051EesGF0PFX3CMIM8KQSaDvEQhAf2VR5/KM kui2sJP+wBhnxvpRSBOno5FpJDgxe1KMuVx7tLVVovhA4w44OyZfpeu1eFazetxUziDyx/ PLKewTY+LxwNdR6dYlpdyA8toMh/+i76qjj5fekn3+l33JhOg4g8GjszoNyfCrS3xmp5Am X7mLqeZGOnPmoV6bFATTFvYxxH7A8tStm8esjQIo6ljjZtAcCazDjTEr74a9Wc8AhbC+VV 0Yg200Tq9ke2JiPJSsXoVTVpd7SdKjvzv+dYwm6VRr6VrT4P2Uq6A2XPDuso9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr9xm2gqFz10pp; Tue, 27 Jun 2023 17:02:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RH2a02088221; Tue, 27 Jun 2023 17:02:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RH2aox088220; Tue, 27 Jun 2023 17:02:36 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:02:36 GMT Message-Id: <202306271702.35RH2aox088220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 5d48efff83b6..5894a4142a9d - vendor/openpam - 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: des X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openpam X-Git-Reftype: branch X-Git-Commit: 5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b X-Git-Oldrev: 5d48efff83b6fdae4767f16014f8391a22d31ac9 X-Git-Newrev: 5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openpam has been updated by des: URL: https://cgit.FreeBSD.org/src/log/?id=5d48efff83b6..5894a4142a9d 5894a4142a9d Vendor import of OpenPAM Ximenia. From nobody Tue Jun 27 17:02: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 4Qr9xw0szmz4kl7j for ; Tue, 27 Jun 2023 17:02: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 4Qr9xw0BQbz3G6H; Tue, 27 Jun 2023 17:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qTkvS8NG5sFqseaAUxO3FgAaiB4teH2++WvBcHpGXFg=; b=dwfDkO3PKg0yu55qZgML/vxjii2XHWAm17tK/G76R4QauYLF9AcApPAR+cll2w90sPSFaR ORF3tJq8dEr9i1aw3kqaAypZULw63284yDt03CVzCxnOalF8K0KaAuJ6/itCZG4gFjHIqO /Kz8ymUcJINtQnx709DotYHKGrlEEvr1pLs9f0YTjQXKHjiJ3CnjIKBo41AOCNTh9y4J9p CUH8TPabRBHEC0o2ryAuxa0EWr+TfdxBcTk54UJiSBIzK5tMK+6cvT6I5VY3WqUf0MqyHe xWA9zqXcsLhIXwxXXfuKPgOpKLUNPAJI459SEovNBZ3iQWz8yDMkjHv+epEq/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qTkvS8NG5sFqseaAUxO3FgAaiB4teH2++WvBcHpGXFg=; b=n/LJEINgwTopkQdlkdd9vWzw7WcTROWmXaHmNekJnuk4GXSxer2MJyAVTz0+cND0B74X6k xLk8pn0uANJ7WCAKCHRTRF/PBF/eQeJ9FvgJfpi5lHqBKSNTC0Uk46Sh/JZU+mXz335mhB uBVDxAklFFmJu9hsDqhk88S2WshBGTg+tuNwzuUlIsRNID6TvHxNCTVM0P326fF2xrLbqG EYKqaBmqY/ULpsplLMgc59tPYKnA1EqaQYEuBPcdzSPbKg3bODF/rnhke8y6ninhIzRq9X y0kVHjrVs/ScMFYQeI1DBO+4YQMtIt2SB/e4zAATNOUGeP+Ok8ADZTUYqUz0XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687885364; a=rsa-sha256; cv=none; b=UbRvtlMcqgzRFEXyYPzqu1aXPyAu2eLWnwTgmbiprJNcBvvJkb26aYD8ZU+iaSgdh+f2Lf ZNRVcuuv3vo1WR1f60CzFEAfMKanUVqbzc5ZYyGusbm+wgh7wKMfumpnDeVdFpGoy9Dbso 73rhZwGmQaa3z4Sue2CABOg6t9s+C1tYkmxkesKQ90ShEB+m+hRuajSD7fiWWd51M3eXAM 4RDcVIVsCo3+CDObcnm9NML21I0/gm0kpVcNLUrlbZZnW10hG02Ei+kNQ1b0wuNj9ksm0p gYS1ild6+PFgxwABFymH4Oo+1IA1IpiH7pWwyvfeyysL184TYYaDHgFlbNUQKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr9xv6NJlz10VW; Tue, 27 Jun 2023 17:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RH2hYj088332; Tue, 27 Jun 2023 17:02:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RH2hTF088331; Tue, 27 Jun 2023 17:02:43 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:02:43 GMT Message-Id: <202306271702.35RH2hTF088331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 4b53769b1cea - Create tag vendor/openpam/XIMENIA List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/tags/vendor/openpam/XIMENIA X-Git-Reftype: annotated tag X-Git-Commit: 4b53769b1ceaf7fad52510bb304a0b59fc9125a0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/openpam/XIMENIA has been created by des: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/openpam/XIMENIA tag vendor/openpam/XIMENIA Tagger: Dag-Erling Smørgrav TaggerDate: 2023-06-27 17:02:06 +0000 Tag OpenPAM Ximenia. commit 5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b Author: Dag-Erling Smørgrav AuthorDate: 2023-06-27 17:01:49 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-27 17:01:49 +0000 Vendor import of OpenPAM Ximenia. From nobody Tue Jun 27 17:05: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 4QrB0X6Btzz4kmkp; Tue, 27 Jun 2023 17:05: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 4QrB0X61q2z3GpB; Tue, 27 Jun 2023 17:05:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2iC3b6Xn/xafgpLcynFG/EfDmHQ7sJZrAVqIfjHtuus=; b=enAKtY9wyb+KANVxlCCDM6gfFGp4wo9jlJVD5dGLD4rAMWewhLP4neNCeod8cpNA4x2F8M 2FTrjjVL5ZijOjeKK/tQH+PcknVN+uN/e0tCdVteK3MVSi/k0xgDUryS1YZo9yZru3bWNC sLbVmjNOgF2ivgYve1X/y5RN1vmlnzMfRXG1wVAQgNvipdfZGmtd68tBudESJh4PZLVYvs eye7yERcddmPf4JG/AHAuBVUNJTpmx7EnZeY+UVuEhAN8kxhTxe61BNr0kb/H5xehNwbzA dioglUrLO9DKfO8hsdCEby24OGxG87p2bh1am9+HuQkmJoww3rkBUSPGEyZGvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2iC3b6Xn/xafgpLcynFG/EfDmHQ7sJZrAVqIfjHtuus=; b=UpxLRDcDfjGnur1ahGRlQN/VSHsuD37jO8AiJQni+uURSh5kPM+P6wRHTZldXJlXJFk7OQ sRmOLTjyC1OVDGMprnyMOBd/oOLo1S0pBCFKml/+8N/G1J0YK9puuPxadiyPvDKxaondib H7Hj7UX/qaDrq0wWfwgeNRbY6WdZp+FZvsz3DKHtvfARfxhRCqFHNp857o/OpQSu5vo3j5 2bkVhb50nLyzmQ6vvUIJVlP6RmUBdatYtLb0bvKd/mTSveV6b/WsnR4dVOt6WdiGkgc6MA LQcZvSEmmJKfMxtfKh4MCFRqJk2sTE4Q8LCJ6Uqj2sKPxQu2VQNkziXZP7H0TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687885500; a=rsa-sha256; cv=none; b=IVOmvGS3yMiwy8EgrDqmAUGa+pSZ58STv8Tgr1EJ68SghJLc9ArUaXtXTdb/Fi0WlLaNva C2uc8dTs2lR9fiU0d2eF8d5tmU00ovX4hhOpN0PgBIIaa80Ka5iFeut3w/brKVMU/NpUqd Tgxu+jGTdBZKW4xuTqHlU5LD+bUV/OZJjWH0/tg+ZKIjEMi4yihEK7VP3NdGgHHVefHapc ZVETQyL7cIwJeZ/+7Oca8KWTKMMCLxqgNwPhkpBJaKS0R0iKOa86M6ecv1Bj0c1LZ82gqT sHfFfSWCd0FQuwQPG87IZL+ExAbm0e/RoZrd77eRrO0dHhyLHf4zi4GLszBUGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrB0X54TNz10ps; Tue, 27 Jun 2023 17:05:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RH50xf088735; Tue, 27 Jun 2023 17:05:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RH50Ep088734; Tue, 27 Jun 2023 17:05:00 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:05:00 GMT Message-Id: <202306271705.35RH50Ep088734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 3ba4c8c81a28 - main - Upgrade to OpenPAM Ximenia. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456 commit 3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456 Merge: 9cfed089ac48 5894a4142a9d Author: Dag-Erling Smørgrav AuthorDate: 2023-06-27 17:03:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-27 17:03:17 +0000 Upgrade to OpenPAM Ximenia. Merge commit '5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b' contrib/openpam/CREDITS | 1 + contrib/openpam/HISTORY | 11 + contrib/openpam/LICENSE | 2 +- contrib/openpam/Makefile.am | 31 +- contrib/openpam/Makefile.in | 99 +- contrib/openpam/RELNOTES | 4 +- contrib/openpam/aclocal.m4 | 119 +- contrib/openpam/autogen.sh | 3 - contrib/openpam/bin/Makefile.am | 2 - contrib/openpam/bin/Makefile.in | 29 +- .../openpam/bin/openpam_dump_policy/Makefile.am | 2 - .../openpam/bin/openpam_dump_policy/Makefile.in | 29 +- .../bin/openpam_dump_policy/openpam_dump_policy.c | 2 - contrib/openpam/bin/pamtest/Makefile.am | 2 - contrib/openpam/bin/pamtest/Makefile.in | 29 +- contrib/openpam/bin/pamtest/pamtest.1 | 4 +- contrib/openpam/bin/pamtest/pamtest.c | 2 - contrib/openpam/bin/su/Makefile.am | 2 - contrib/openpam/bin/su/Makefile.in | 29 +- contrib/openpam/bin/su/su.1 | 4 +- contrib/openpam/bin/su/su.c | 2 - contrib/openpam/compile | 6 +- contrib/openpam/config.guess | 747 +- contrib/openpam/config.h.in | 114 +- contrib/openpam/config.sub | 1674 +- contrib/openpam/configure | 23391 +++++++++++-------- contrib/openpam/configure.ac | 55 +- contrib/openpam/depcomp | 2 +- contrib/openpam/doc/Makefile.am | 2 - contrib/openpam/doc/Makefile.in | 29 +- contrib/openpam/doc/man/Makefile.am | 2 - contrib/openpam/doc/man/Makefile.in | 27 +- contrib/openpam/doc/man/openpam.3 | 5 +- contrib/openpam/doc/man/openpam.man | 3 - contrib/openpam/doc/man/openpam_borrow_cred.3 | 3 +- contrib/openpam/doc/man/openpam_free_data.3 | 3 +- contrib/openpam/doc/man/openpam_free_envlist.3 | 3 +- contrib/openpam/doc/man/openpam_get_feature.3 | 3 +- contrib/openpam/doc/man/openpam_get_option.3 | 3 +- contrib/openpam/doc/man/openpam_log.3 | 3 +- contrib/openpam/doc/man/openpam_nullconv.3 | 3 +- contrib/openpam/doc/man/openpam_readline.3 | 3 +- contrib/openpam/doc/man/openpam_readlinev.3 | 3 +- contrib/openpam/doc/man/openpam_readword.3 | 3 +- contrib/openpam/doc/man/openpam_restore_cred.3 | 3 +- contrib/openpam/doc/man/openpam_set_feature.3 | 3 +- contrib/openpam/doc/man/openpam_set_option.3 | 3 +- contrib/openpam/doc/man/openpam_straddch.3 | 3 +- contrib/openpam/doc/man/openpam_subst.3 | 3 +- contrib/openpam/doc/man/openpam_ttyconv.3 | 3 +- contrib/openpam/doc/man/pam.3 | 5 +- contrib/openpam/doc/man/pam.conf.5 | 4 +- contrib/openpam/doc/man/pam.man | 3 - contrib/openpam/doc/man/pam_acct_mgmt.3 | 3 +- contrib/openpam/doc/man/pam_authenticate.3 | 3 +- contrib/openpam/doc/man/pam_chauthtok.3 | 3 +- contrib/openpam/doc/man/pam_close_session.3 | 3 +- contrib/openpam/doc/man/pam_conv.3 | 4 +- contrib/openpam/doc/man/pam_end.3 | 3 +- contrib/openpam/doc/man/pam_error.3 | 3 +- contrib/openpam/doc/man/pam_get_authtok.3 | 3 +- contrib/openpam/doc/man/pam_get_data.3 | 3 +- contrib/openpam/doc/man/pam_get_item.3 | 3 +- contrib/openpam/doc/man/pam_get_user.3 | 3 +- contrib/openpam/doc/man/pam_getenv.3 | 3 +- contrib/openpam/doc/man/pam_getenvlist.3 | 3 +- contrib/openpam/doc/man/pam_info.3 | 3 +- contrib/openpam/doc/man/pam_open_session.3 | 3 +- contrib/openpam/doc/man/pam_prompt.3 | 3 +- contrib/openpam/doc/man/pam_putenv.3 | 3 +- contrib/openpam/doc/man/pam_set_data.3 | 3 +- contrib/openpam/doc/man/pam_set_item.3 | 3 +- contrib/openpam/doc/man/pam_setcred.3 | 3 +- contrib/openpam/doc/man/pam_setenv.3 | 3 +- contrib/openpam/doc/man/pam_sm_acct_mgmt.3 | 3 +- contrib/openpam/doc/man/pam_sm_authenticate.3 | 3 +- contrib/openpam/doc/man/pam_sm_chauthtok.3 | 3 +- contrib/openpam/doc/man/pam_sm_close_session.3 | 3 +- contrib/openpam/doc/man/pam_sm_open_session.3 | 3 +- contrib/openpam/doc/man/pam_sm_setcred.3 | 3 +- contrib/openpam/doc/man/pam_start.3 | 3 +- contrib/openpam/doc/man/pam_strerror.3 | 3 +- contrib/openpam/doc/man/pam_verror.3 | 3 +- contrib/openpam/doc/man/pam_vinfo.3 | 3 +- contrib/openpam/doc/man/pam_vprompt.3 | 3 +- contrib/openpam/freebsd/Makefile.in | 33 + contrib/openpam/include/Makefile.am | 2 - contrib/openpam/include/Makefile.in | 29 +- contrib/openpam/include/security/Makefile.am | 2 - contrib/openpam/include/security/Makefile.in | 29 +- contrib/openpam/include/security/openpam.h | 2 - contrib/openpam/include/security/openpam_attr.h | 4 - contrib/openpam/include/security/openpam_version.h | 8 +- contrib/openpam/include/security/pam_appl.h | 2 - contrib/openpam/include/security/pam_constants.h | 2 - contrib/openpam/include/security/pam_modules.h | 2 - contrib/openpam/include/security/pam_types.h | 2 - contrib/openpam/install-sh | 172 +- contrib/openpam/lib/Makefile.am | 2 - contrib/openpam/lib/Makefile.in | 29 +- contrib/openpam/lib/libpam/Makefile.am | 2 - contrib/openpam/lib/libpam/Makefile.in | 29 +- contrib/openpam/lib/libpam/openpam_asprintf.c | 2 - contrib/openpam/lib/libpam/openpam_asprintf.h | 2 - contrib/openpam/lib/libpam/openpam_borrow_cred.c | 2 - .../openpam/lib/libpam/openpam_check_owner_perms.c | 2 - contrib/openpam/lib/libpam/openpam_configure.c | 2 - contrib/openpam/lib/libpam/openpam_constants.c | 2 - contrib/openpam/lib/libpam/openpam_constants.h | 2 - contrib/openpam/lib/libpam/openpam_cred.h | 2 - contrib/openpam/lib/libpam/openpam_ctype.h | 2 - contrib/openpam/lib/libpam/openpam_debug.h | 2 - contrib/openpam/lib/libpam/openpam_dispatch.c | 2 - contrib/openpam/lib/libpam/openpam_dlfunc.h | 2 - contrib/openpam/lib/libpam/openpam_dynamic.c | 2 - contrib/openpam/lib/libpam/openpam_features.c | 2 - contrib/openpam/lib/libpam/openpam_features.h | 2 - contrib/openpam/lib/libpam/openpam_findenv.c | 2 - contrib/openpam/lib/libpam/openpam_free_data.c | 2 - contrib/openpam/lib/libpam/openpam_free_envlist.c | 2 - contrib/openpam/lib/libpam/openpam_get_feature.c | 2 - contrib/openpam/lib/libpam/openpam_get_option.c | 2 - contrib/openpam/lib/libpam/openpam_impl.h | 2 - contrib/openpam/lib/libpam/openpam_load.c | 2 - contrib/openpam/lib/libpam/openpam_log.c | 2 - contrib/openpam/lib/libpam/openpam_nullconv.c | 2 - contrib/openpam/lib/libpam/openpam_readline.c | 2 - contrib/openpam/lib/libpam/openpam_readlinev.c | 4 - contrib/openpam/lib/libpam/openpam_readword.c | 3 - contrib/openpam/lib/libpam/openpam_restore_cred.c | 2 - contrib/openpam/lib/libpam/openpam_set_feature.c | 2 - contrib/openpam/lib/libpam/openpam_set_option.c | 5 +- contrib/openpam/lib/libpam/openpam_static.c | 2 - contrib/openpam/lib/libpam/openpam_straddch.c | 4 - contrib/openpam/lib/libpam/openpam_strlcat.c | 2 - contrib/openpam/lib/libpam/openpam_strlcat.h | 2 - contrib/openpam/lib/libpam/openpam_strlcmp.h | 2 - contrib/openpam/lib/libpam/openpam_strlcpy.c | 2 - contrib/openpam/lib/libpam/openpam_strlcpy.h | 2 - contrib/openpam/lib/libpam/openpam_strlset.c | 2 - contrib/openpam/lib/libpam/openpam_strlset.h | 2 - contrib/openpam/lib/libpam/openpam_subst.c | 7 +- contrib/openpam/lib/libpam/openpam_ttyconv.c | 2 - contrib/openpam/lib/libpam/openpam_vasprintf.c | 2 - contrib/openpam/lib/libpam/openpam_vasprintf.h | 2 - contrib/openpam/lib/libpam/pam_acct_mgmt.c | 2 - contrib/openpam/lib/libpam/pam_authenticate.c | 2 - .../lib/libpam/pam_authenticate_secondary.c | 2 - contrib/openpam/lib/libpam/pam_chauthtok.c | 2 - contrib/openpam/lib/libpam/pam_close_session.c | 2 - contrib/openpam/lib/libpam/pam_end.c | 2 - contrib/openpam/lib/libpam/pam_error.c | 2 - contrib/openpam/lib/libpam/pam_get_authtok.c | 2 - contrib/openpam/lib/libpam/pam_get_data.c | 2 - contrib/openpam/lib/libpam/pam_get_item.c | 2 - .../openpam/lib/libpam/pam_get_mapped_authtok.c | 2 - .../openpam/lib/libpam/pam_get_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_get_user.c | 2 - contrib/openpam/lib/libpam/pam_getenv.c | 2 - contrib/openpam/lib/libpam/pam_getenvlist.c | 2 - contrib/openpam/lib/libpam/pam_info.c | 2 - contrib/openpam/lib/libpam/pam_open_session.c | 2 - contrib/openpam/lib/libpam/pam_prompt.c | 2 - contrib/openpam/lib/libpam/pam_putenv.c | 2 - contrib/openpam/lib/libpam/pam_set_data.c | 2 - contrib/openpam/lib/libpam/pam_set_item.c | 2 - .../openpam/lib/libpam/pam_set_mapped_authtok.c | 2 - .../openpam/lib/libpam/pam_set_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_setcred.c | 2 - contrib/openpam/lib/libpam/pam_setenv.c | 2 - contrib/openpam/lib/libpam/pam_sm_acct_mgmt.c | 2 - contrib/openpam/lib/libpam/pam_sm_authenticate.c | 2 - .../lib/libpam/pam_sm_authenticate_secondary.c | 2 - contrib/openpam/lib/libpam/pam_sm_chauthtok.c | 2 - contrib/openpam/lib/libpam/pam_sm_close_session.c | 2 - .../openpam/lib/libpam/pam_sm_get_mapped_authtok.c | 2 - .../lib/libpam/pam_sm_get_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_sm_open_session.c | 2 - .../openpam/lib/libpam/pam_sm_set_mapped_authtok.c | 2 - .../lib/libpam/pam_sm_set_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_sm_setcred.c | 2 - contrib/openpam/lib/libpam/pam_start.c | 2 - contrib/openpam/lib/libpam/pam_strerror.c | 2 - contrib/openpam/lib/libpam/pam_verror.c | 2 - contrib/openpam/lib/libpam/pam_vinfo.c | 2 - contrib/openpam/lib/libpam/pam_vprompt.c | 2 - contrib/openpam/ltmain.sh | 855 +- contrib/openpam/m4/ax_compiler_vendor.m4 | 117 + contrib/openpam/m4/libtool.m4 | 227 +- contrib/openpam/m4/ltoptions.m4 | 4 +- contrib/openpam/m4/ltsugar.m4 | 2 +- contrib/openpam/m4/ltversion.m4 | 13 +- contrib/openpam/m4/lt~obsolete.m4 | 4 +- contrib/openpam/misc/Makefile.am | 2 +- contrib/openpam/misc/Makefile.in | 34 +- contrib/openpam/misc/coverage.sh.in | 33 - contrib/openpam/misc/gendoc.pl | 2 - contrib/openpam/missing | 2 +- contrib/openpam/mkpkgng.in | 177 - contrib/openpam/modules/Makefile.am | 2 - contrib/openpam/modules/Makefile.in | 29 +- contrib/openpam/modules/pam_deny/Makefile.am | 2 - contrib/openpam/modules/pam_deny/Makefile.in | 29 +- contrib/openpam/modules/pam_deny/pam_deny.c | 2 - contrib/openpam/modules/pam_permit/Makefile.am | 2 - contrib/openpam/modules/pam_permit/Makefile.in | 29 +- contrib/openpam/modules/pam_permit/pam_permit.c | 2 - contrib/openpam/modules/pam_return/Makefile.am | 2 - contrib/openpam/modules/pam_return/Makefile.in | 29 +- contrib/openpam/modules/pam_return/pam_return.c | 2 - contrib/openpam/modules/pam_unix/Makefile.am | 2 - contrib/openpam/modules/pam_unix/Makefile.in | 29 +- contrib/openpam/modules/pam_unix/pam_unix.c | 2 - contrib/openpam/t/Makefile.am | 4 +- contrib/openpam/t/Makefile.in | 87 +- contrib/openpam/t/t_openpam_ctype.c | 2 - contrib/openpam/t/t_openpam_dispatch.c | 2 - contrib/openpam/t/t_openpam_readlinev.c | 2 - contrib/openpam/t/t_openpam_readword.c | 2 - contrib/openpam/t/t_openpam_straddch.c | 183 + contrib/openpam/t/t_openpam_subst.c | 105 + contrib/openpam/t/t_pam_conv.c | 2 - contrib/openpam/t/t_pam_conv.h | 2 - contrib/openpam/t/t_pam_env.c | 2 - contrib/openpam/t/t_pam_err.c | 2 - contrib/openpam/t/t_pam_err.h | 2 - contrib/openpam/test-driver | 25 +- 227 files changed, 17395 insertions(+), 11816 deletions(-) diff --cc contrib/openpam/RELNOTES index 895370ae8774,000000000000..3bbd7bb19721 mode 100644,000000..100644 --- a/contrib/openpam/RELNOTES +++ b/contrib/openpam/RELNOTES @@@ -1,21 -1,0 +1,21 @@@ + - Release notes for OpenPAM Tabebuia - ================================== ++ Release notes for OpenPAM Ximenia ++ ================================= + +OpenPAM is developed primarily on FreeBSD, but is expected to work on +almost any POSIX-like platform that has GNU autotools, GNU make and +the GNU compiler suite installed. + +The OpenPAM distribution consists of the following components: + + - The PAM library itself, with complete API documentation. + + - Sample modules (pam_permit, pam_deny and pam_unix) and a sample + application (su) which demonstrate how to use the PAM library. + + - A test application (pamtest) which can be used to test policies and + modules. + + - Unit tests for limited portions of the library. + +Please direct bug reports and inquiries to . diff --cc contrib/openpam/compile index 99e50524b3ba,000000000000..df363c8fbfbc mode 100755,000000..100755 --- a/contrib/openpam/compile +++ b/contrib/openpam/compile @@@ -1,348 -1,0 +1,348 @@@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2018-03-07.03; # UTC + - # Copyright (C) 1999-2018 Free Software Foundation, Inc. ++# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; - CYGWIN*) ++ CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; - cygwin/*) ++ cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --cc contrib/openpam/config.guess index 0bb53aebf96d,b1f709e5aa0f..b1f709e5aa0f mode 100644,100755..100755 --- a/contrib/openpam/config.guess +++ b/contrib/openpam/config.guess diff --cc contrib/openpam/config.sub index 3580aaf3ef9c,dad71239a8f8..dad71239a8f8 mode 100644,100755..100755 --- a/contrib/openpam/config.sub +++ b/contrib/openpam/config.sub diff --cc contrib/openpam/depcomp index 65cbf7093a1e,000000000000..715e34311ed2 mode 100755,000000..100755 --- a/contrib/openpam/depcomp +++ b/contrib/openpam/depcomp @@@ -1,791 -1,0 +1,791 @@@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2018-03-07.03; # UTC + - # Copyright (C) 1999-2018 Free Software Foundation, Inc. ++# Copyright (C) 1999-2021 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading *** 1311 LINES SKIPPED *** From nobody Tue Jun 27 17:06: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 4QrB2W3n99z4ds7W; Tue, 27 Jun 2023 17:06: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 4QrB2W2vhVz3HKT; Tue, 27 Jun 2023 17:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2PxgykpIGlpfE0D8TAP0HgPpFHEoZrDq6tfhMPm4lq0=; b=Ek16V2n5TTPg2I8LwqLKWWi9krBRHNkpGAhRx5C2vFpNudld5uWDrSn07iOXbf2QnwTU6h vSlSu/wBmB9RPLMmnulP2ivkAX3FbxJmIj0UzIrViiAw5eTnP4LVPZGUq/psNwThFxC6FZ 6sOT9HLapbqMlxdZZjUv+3Q3BQzQgrOxXp4VweOpyQg59+atmAgEFMEwGjXoQE74J7+ssn UAcFtBikGzF1cMOX2RLT2S3X/Xnlq66hH2prKgEb0kC61lAE+/mFWE76pCs//ohZrrKcL8 1YjquqO+IWRp6JxlgRQzcDDXBzFVHOpcrG8+7MNGVUviiHJe7H3FKLdvrAn1Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687885603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2PxgykpIGlpfE0D8TAP0HgPpFHEoZrDq6tfhMPm4lq0=; b=GSkW9TXzJ57WbKEFQU8HQ6ndZ3BZVdnMELmH7cLYIA5pK+NpXBTN5WhhL5LgNZ8wXC6SH1 RoyV5v+nCLMO8ORk5TOqAnIqvsK2XPsfrp1Kx6+IlDVshgs2YoC2Gi9a+dDKEVBAOAdYRq 9dz0WriNzVMYqmb4MEq4Mk9NfPRsbgP+CrEhZ2yUUIAUwZnunpRrxXRbc0PBQ57M7MVlJt SGkHoC1rwRafX5ZdZcuibDfTHJVMaT7u3FHSw5WmRz1V0tO5d0Gsf1JnbSqNihXIEwhbCk gG7nZqrkJ3zL9XWbUUvDe235/VMKpNyxI3FGi4mJ4wd+4iqX837oBJHvm2goBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687885603; a=rsa-sha256; cv=none; b=QHr8D3bkP2llR2lExe7OBFmhECNUauRzo8vLa+PU5/ayfeDkrNbIBs7v1uwRsxtVDuw/8S btpEW7cannWwytqEquR7CACi4To6UEQ/5tNUUuPcGcxxJynjTnJQVnLXpEhEUfPt6fWEax RfOLwGIMVk9Xbkiqg/ku11CrRThC7/yGwnIbF7Xdp6rDAgWmFdDsPUMGUMPCzFFiiVWQsm 3+hdGpRhDmnWZtLoi9vbRnHz5GKT6GRKZDLPkQHclrLQee7pmcskBeSSoDwLqHjaKOdsut GhvAacsfntxClxF5wcviBM/zwvxdLTpwaU+0ubPIRkI02ZaFpisONmtpw2coEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrB2W1wT2z110t; Tue, 27 Jun 2023 17:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RH6ha5089076; Tue, 27 Jun 2023 17:06:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RH6hZY089075; Tue, 27 Jun 2023 17:06:43 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:06:43 GMT Message-Id: <202306271706.35RH6hZY089075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 5ae4463498aa - main - nvme: Fix typo in "Command Aborted by Host" constant name. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ae4463498aad49fe53475a277a2e98af23e98e0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5ae4463498aad49fe53475a277a2e98af23e98e0 commit 5ae4463498aad49fe53475a277a2e98af23e98e0 Author: John Baldwin AuthorDate: 2023-06-27 17:06:22 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:06:22 +0000 nvme: Fix typo in "Command Aborted by Host" constant name. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40763 --- sys/dev/nvme/nvme.h | 2 +- sys/dev/nvme/nvme_qpair.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index a671aab63e20..b8e2813e977b 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -818,7 +818,7 @@ enum nvme_path_related_status_code { NVME_SC_ASYMMETRIC_ACCESS_TRANSITION = 0x03, NVME_SC_CONTROLLER_PATHING_ERROR = 0x60, NVME_SC_HOST_PATHING_ERROR = 0x70, - NVME_SC_COMMAND_ABOTHED_BY_HOST = 0x71, + NVME_SC_COMMAND_ABORTED_BY_HOST = 0x71, }; /* admin opcodes */ diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index d593e225f656..3dcc6aadc6ca 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -305,7 +305,7 @@ static struct nvme_status_string path_related_status[] = { { NVME_SC_ASYMMETRIC_ACCESS_TRANSITION, "ASYMMETRIC ACCESS TRANSITION" }, { NVME_SC_CONTROLLER_PATHING_ERROR, "CONTROLLER PATHING ERROR" }, { NVME_SC_HOST_PATHING_ERROR, "HOST PATHING ERROR" }, - { NVME_SC_COMMAND_ABOTHED_BY_HOST, "COMMAND ABOTHED BY HOST" }, + { NVME_SC_COMMAND_ABORTED_BY_HOST, "COMMAND ABORTED BY HOST" }, { 0xFFFF, "PATH RELATED" }, }; From nobody Tue Jun 27 17:16: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 4QrBFk5Bmsz4f2N0; Tue, 27 Jun 2023 17:16: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 4QrBFk4m8Yz3Lth; Tue, 27 Jun 2023 17:16:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nkGUM24y68aaNHI/1hCnKaI47UaJHNAEQLI9qFlhMyY=; b=QEHLSenQ8rxo7FwM5GgMeIRbSFwZegQQLVTiF/zBgmL3CTY60vmS+yzSBPRUuO4vgRJ9W2 pnmtwmhm2kvuoQ2utWVQ6r+HU2zlGn4HWqukgJ0TJnJs+1938n8mEdVOf5U2ut1qhPilNR GUkkaZA0+IDBfgFA1LSHWecXZk+1HhnNoyJPtclXVWb0npZLfDvsjSIcDNtwdhlqsb2FU3 w/PsxVb92IychhqACuSf1Ik2rOwmt5b8M2FVO2kLt/ETFg9gWRg5PT9q6htkqO9i4aT1v1 avtcdk3S4dNf5JVbE26zyA7QWUdFng6a2dMSwfK/mRfr1pdkK3YZNmChs7svGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nkGUM24y68aaNHI/1hCnKaI47UaJHNAEQLI9qFlhMyY=; b=UcRjI0s57LIz21a6yDsEXy1HFYV3DU/a+8zAyG9o2FsxV+kVaRepM95kBgdAE3t4CoY9Rc k5wF6G3PCM+0YnAR31qDwM7VRgnB4b9wqyNsQbFrEOb1M3qFbxgb3NNp2Q1zGvmF1BKM6f Z0LjvBq+q9rPr8V9hImUcg4j6QIxBPD8lD4K30on/fvlWd4A5ffAPCHP0yrqxe+1JUZYk0 YAHjWoufJxsc1L9KOqBlXY4PGo25yU7/1QwDTD1grs4bFRvLKwggCRYNOdFDI4hFmsv2W9 3O1tf1QIzHAbGItG7Jvw0FU48piN8lFs+vjBkx6kzAn3T5KLVD8Gh5x5J/bAhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886186; a=rsa-sha256; cv=none; b=S+ZVfpzciKi1v2BqT3Q5FJ4hMs09ZwmZTTxn0VY5l2EaCe0IfY//rj0h2F46Enc5Jap9RS 1c7Sy4NW3eExdSTOe2epRmtft1npmWr70ZG3dJ7KIuq7ehMaWHsWme+Ipi1JAUAEqK4+yd BLv+qWd74aIf1XdI34BslJ2/1L7YgXzFXwWekUhDtDRehHdNtjlBCHOu8oLaDhHX/Alb99 Vch3Rf8HGtR+A7V1jyxzQSYOSmPVSP5Lj3DzLeQiaow0OF9VdjDtdBMgvupttToY/z8VLv Cige4p1j0TmyzC8vFoNG4gVAXS1gu7PSMK2zGgfITtTyglr631Dy5YHwHQo4ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBFk3WZvz10r5; Tue, 27 Jun 2023 17:16:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHGQtD006154; Tue, 27 Jun 2023 17:16:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHGQSS006153; Tue, 27 Jun 2023 17:16:26 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:16:26 GMT Message-Id: <202306271716.35RHGQSS006153@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: 2d38d9839b27 - main - openzfs: Remove broken symlinks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2d38d9839b275a0499cdde08320b9b156846847d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2d38d9839b275a0499cdde08320b9b156846847d commit 2d38d9839b275a0499cdde08320b9b156846847d Author: Warner Losh AuthorDate: 2023-06-27 17:11:03 +0000 Commit: Warner Losh CommitDate: 2023-06-27 17:15:20 +0000 openzfs: Remove broken symlinks These symlinks are broken. They point to files that don't exist, and rely on having them be built using a 'in-tree' build that FreeBSD doesn't use. They also show up as errors on grep -r. Since they are broken and can't possibly work, remove them for now since non-functional symlinks matching an upstrem repo that can't work in our repo aren't worth the error messages. Though one could argue the whole debian directory should be removed, I did the minimal change necessary. These can return when the fundamental issue is fixed and the contrib/debian tree is useful on FreeBSD systems. --- sys/contrib/openzfs/contrib/debian/openzfs-zfs-zed.zfs-zed.init | 1 - sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-import.init | 1 - sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-load-key.init | 1 - sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-mount.init | 1 - sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-share.init | 1 - 5 files changed, 5 deletions(-) diff --git a/sys/contrib/openzfs/contrib/debian/openzfs-zfs-zed.zfs-zed.init b/sys/contrib/openzfs/contrib/debian/openzfs-zfs-zed.zfs-zed.init deleted file mode 120000 index 3f41f6813577..000000000000 --- a/sys/contrib/openzfs/contrib/debian/openzfs-zfs-zed.zfs-zed.init +++ /dev/null @@ -1 +0,0 @@ -../etc/init.d/zfs-zed \ No newline at end of file diff --git a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-import.init b/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-import.init deleted file mode 120000 index bfc368fd3426..000000000000 --- a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-import.init +++ /dev/null @@ -1 +0,0 @@ -../etc/init.d/zfs-import \ No newline at end of file diff --git a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-load-key.init b/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-load-key.init deleted file mode 120000 index 3f3e97f811bb..000000000000 --- a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-load-key.init +++ /dev/null @@ -1 +0,0 @@ -../etc/init.d/zfs-load-key \ No newline at end of file diff --git a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-mount.init b/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-mount.init deleted file mode 120000 index 62a544332422..000000000000 --- a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-mount.init +++ /dev/null @@ -1 +0,0 @@ -../etc/init.d/zfs-mount \ No newline at end of file diff --git a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-share.init b/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-share.init deleted file mode 120000 index 3f069f9baaaf..000000000000 --- a/sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-share.init +++ /dev/null @@ -1 +0,0 @@ -../etc/init.d/zfs-share \ No newline at end of file From nobody Tue Jun 27 17:19: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 4QrBKQ0bwJz4f4TL; Tue, 27 Jun 2023 17:19: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 4QrBKP6phZz3N0s; Tue, 27 Jun 2023 17:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iKjdv+fLZ0Goi09D8UViYtNKCrrvMWBVrujTdFk9too=; b=T0AVFUCdc1q7QOFawWeLbY5NhYBe5gfO4SIFLBmM1J31GwMKxThwZz+OSIyYML8Ut0Vn6G A46zhQ7xt07HYTaqrnPS/B7clgk9kvEzFkqIiPNLXbINZk4GVtnErVTnJOihfIlmokOL6a wCoD6jIGwQ2v8jdCJ4Na+LbkXBljW9fv8gtfYTXqrQ0hbhmx7VRnwpMoeTc1/4MrQ+QAJ3 tncsmB7ewHUgPsiUaMCb+EJHnTF2wpNdM3hIo/2Y8vVeGt2RyNHOfugEkgopHT7D8Vc57v Ii2NMs49qPeE1mAxt1vi+jUeSOyzlDKf2BgVR5wAqUr+kZzqQGDFu/g0ffqwaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iKjdv+fLZ0Goi09D8UViYtNKCrrvMWBVrujTdFk9too=; b=HjDC9MhDSqT41rmSaG4qz7PIbjv6TD3mULIN/TncGJk2+IV3aYvkuQbGLN3uwe5xs7R8pR 9t6CW371Kqttd6keufE1NBQkaSRJKISsPV56lTNyN0rcgPGYIXiuLyMf+PChU3whDaERDZ tsGzu1PVPetwYd3TARdltYECXoprtzWus7/nxIifL6xLdoAiCEFDNTNK2AAIrEMATSqL1o TqHaUMunLBYrSxiPsf0Jtb3jGVrv0qxpyHbgbIpAaHTcobkIia8XXI4/0IlhGSUez07p/x 61mTDngTU6De5yFzjVa0DAGZe7Sqidlw1lNdR5aoNOTO4lvOxF5jgNFqVMktHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886378; a=rsa-sha256; cv=none; b=d+5nG8fZeuDZwxhbBtnt+03HVwhzcRPGzyb+X6Gqw3JYxiT2uQmPorLq0sVoU/sjh1tJpE ypzTv/HgRKwddyQUnMDEqfo3kNnouDUlA/uehp9I3S7AKFapDk4K262CMpFUXW+0QYI6sI v2n1upjSNuH9OjcXhJKfjJQ4lFvq1Jw9inlFz2QdkM7kpc1FNSHEHFhLMf6Xux8um97W5j Zw3qL21DkwYI7F5uG8ShqFFhxze0c3s7bGv2HZBcDuG5NB67To5xBoOw2JenmwXDr8fLXY GVTk9SDsDOAUlnS6I8SgznNt57HO+PM2Y8i6tXT0MwQXk6+2IX0oYOtUoYv++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 4QrBKP5sWTz11Fm; Tue, 27 Jun 2023 17:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJbaj006767; Tue, 27 Jun 2023 17:19:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJbEB006766; Tue, 27 Jun 2023 17:19:37 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:37 GMT Message-Id: <202306271719.35RHJbEB006766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 36c2fec31dd6 - main - riscv: Remove MACHINE_ARCH-specific remnants of riscv64sf. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36c2fec31dd6e7663acf8f9aac12e66dfff71889 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=36c2fec31dd6e7663acf8f9aac12e66dfff71889 commit 36c2fec31dd6e7663acf8f9aac12e66dfff71889 Author: John Baldwin AuthorDate: 2023-06-27 17:19:31 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:31 +0000 riscv: Remove MACHINE_ARCH-specific remnants of riscv64sf. - Remove now unnecessary MACHINE_ARCHES definition. The default logic in kern_mib.c works fine now for RISC-V. - Remove custom sv_machine_arch hook from sysentvec. Fixes: 1ca12bd927d7 Remove the riscv64sf architecture. Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D40648 --- sys/riscv/include/param.h | 3 --- sys/riscv/riscv/elf_machdep.c | 13 ------------- 2 files changed, 16 deletions(-) diff --git a/sys/riscv/include/param.h b/sys/riscv/include/param.h index 56fe9530b76d..1192865cda28 100644 --- a/sys/riscv/include/param.h +++ b/sys/riscv/include/param.h @@ -50,9 +50,6 @@ #ifndef MACHINE_ARCH #define MACHINE_ARCH "riscv64" #endif -#ifdef _KERNEL -#define MACHINE_ARCHES "riscv64" -#endif #ifdef SMP #ifndef MAXCPU diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c index e0d37257facd..54298e8f7797 100644 --- a/sys/riscv/riscv/elf_machdep.c +++ b/sys/riscv/riscv/elf_machdep.c @@ -59,8 +59,6 @@ __FBSDID("$FreeBSD$"); #include #include -static const char *riscv_machine_arch(struct proc *p); - u_long elf_hwcap; static struct sysentvec elf64_freebsd_sysvec = { @@ -98,7 +96,6 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_thread_detach = NULL, .sv_trap = NULL, .sv_hwcap = &elf_hwcap, - .sv_machine_arch = riscv_machine_arch, .sv_onexec_old = exec_onexec_old, .sv_onexit = exit_onexit, .sv_regset_begin = SET_BEGIN(__elfN(regset)), @@ -106,16 +103,6 @@ static struct sysentvec elf64_freebsd_sysvec = { }; INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); -static const char * -riscv_machine_arch(struct proc *p) -{ - - if ((p->p_elf_flags & EF_RISCV_FLOAT_ABI_MASK) == - EF_RISCV_FLOAT_ABI_SOFT) - return (MACHINE_ARCH "sf"); - return (MACHINE_ARCH); -} - static Elf64_Brandinfo freebsd_brand_info = { .brand = ELFOSABI_FREEBSD, .machine = EM_RISCV, From nobody Tue Jun 27 17:19: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 4QrBKR1kRpz4f4Fg; Tue, 27 Jun 2023 17:19: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 4QrBKR0jHpz3N1J; Tue, 27 Jun 2023 17:19:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h2IFIfowirtFYH0JV2/XMkbXEXRM8D6lGKCdQCylPAY=; b=r3PnA0/XWxEkV4cUAjfA1qvUuH5cWpHC0JA1WwcqqDqKj4KapTbQKZIUlhSUqdpv7o3D+q 0VPbyTtTTuEoZLsThFt/jvdDW6Dkuq6HvGNhF0ynU7JinmrtZjKTowbFRZxHtn2MwRhrK6 Bl6zBX8iLii6iA2OqF0bfyHAgupulh50wLBWBS9eBhKY3WdcKdtdzratZqLDMbDwDCvrs9 GHrsQ7qG0EkE2gqYI02QzSJy+KShLr2roh0oMOf+CEzsrR1FBAwNQSl1XAJb/qPIVpu6bt qdGJ0NjAFCCmirhpb9oXnUTzfRKBehK0c6jySqadh0oWXZ7w7QQzXEiqq03qqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h2IFIfowirtFYH0JV2/XMkbXEXRM8D6lGKCdQCylPAY=; b=IXLx+lyJkM+YnyqHO5PVddLmlPGUVLndwjU7f9E9vQiZDYRqq90qeEqa3JuqO+hW9YwRIb CB7YAhGJN71elPUy677NzvQf68u0BUIsw0+GlIciZ+dlba/JGo7vfkXxRXfyiULCG+KpnF +JtO9uiNmHWugDpOBVXrDA5T1O/M9eGsa53ikJLDV99128tkL14cYAm7/Hp8YSAHSPRPfm PtOACMHqQ07wbY/zl52wg+1raW4LZmnaaBmw+jIDIQdAbo4UOZJE+JVUkVt+NsBAM6tYhU uQIXIeh1KV0GdKtPoE46y1i9SNSg5w0ntTAdpkkqhBhiFRI4SEjVMsc2ALXaBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886379; a=rsa-sha256; cv=none; b=EDaiw/LwPhiaqSfrIJk2XwmizokLxfCKZBmLYgirgGwSlz5d/A70yharlrifAWD34cGSak xDEIZYVYCtvna6gC6hNZ7ktPBWVZ5euRCJolrdbjSQpiEz5clLXwgk0sxPM+hL7drjV3qa arme+G2hxr71XK0GMs2z5LXNZcHtRZ8HTTQNx+IQaVsC3IF2TJLpUquua67Vbt6Fkgf2m2 bYkmlLQvUqsXjVODIKZPiqCgMR7RFsRHv8Er509zs1AYl83Mx93RlhBpwMKiMaQCu8AHM0 t5KSdMrbPLw6GiJxp+i0R8JG3rvKBSnumg7N2jwmhk/N6c0UUOVqVPTELu7NNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKQ6nPWz11JH; Tue, 27 Jun 2023 17:19:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJcMd006786; Tue, 27 Jun 2023 17:19:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJchT006785; Tue, 27 Jun 2023 17:19:38 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:38 GMT Message-Id: <202306271719.35RHJchT006785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ccfd87fe2ac0 - main - libefivar: Use a void cast in unimplemented stubs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccfd87fe2ac0e2e6aeb1911a7d7cce6712a8564f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ccfd87fe2ac0e2e6aeb1911a7d7cce6712a8564f commit ccfd87fe2ac0e2e6aeb1911a7d7cce6712a8564f Author: John Baldwin AuthorDate: 2023-06-27 17:19:31 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:31 +0000 libefivar: Use a void cast in unimplemented stubs. This "consumes" an otherwise unused argument. Differential Revision: https://reviews.freebsd.org/D40650 --- lib/libefivar/efivar-dp-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libefivar/efivar-dp-parse.c b/lib/libefivar/efivar-dp-parse.c index b47f3401c835..b9a2a138d18b 100644 --- a/lib/libefivar/efivar-dp-parse.c +++ b/lib/libefivar/efivar-dp-parse.c @@ -45,8 +45,8 @@ __FBSDID("$FreeBSD$"); #include "uefi-dplib.h" /* XXX STUBS -- this stuff doesn't work yet */ -#define StrToIpv4Address(str, unk, ipv4ptr, unk2) -#define StrToIpv6Address(str, unk, ipv6ptr, unk2) +#define StrToIpv4Address(str, unk, ipv4ptr, unk2) (void)(str) +#define StrToIpv6Address(str, unk, ipv6ptr, unk2) (void)(str) /* * OK. Now this is evil. Can't typedef it again. Sure beats changing them all. From nobody Tue Jun 27 17:19: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 4QrBKS3CtNz4f4Tl; Tue, 27 Jun 2023 17:19: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 4QrBKS2Db6z3NDg; Tue, 27 Jun 2023 17:19:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hpqOS90t+0o5hL+x9QClpSTiFb4KKSJuIz/U0pBnk+A=; b=dNFMHsLSxHFn86tNeCxQBs7xwirBTUm3eS8ME+u7TDr0TqnSW/Nm5PnQ2O9Cv5WwAcCro1 f3XcIoIdKyp6kSLT1BsFmfLUiDdTDDILAa+gHv8jEirjPHC60GBzG19pgwaZGilhmJcNA4 OV0uSFhCNda96dUfuCNdhOkvrY/5M8p0iWazKNZUH25yg2+0ftAweFlLcHlCc0IuvcXxVI 5ueC7ehxyGjj1QdnfLtpZqndDrNEAdhb3JToK5bmTq0WOvirAJ1LJegrbc0sjNzBCixh3n /f0Kd9kM6K8pA4b0+EYuyEu28dTYLuDgVgadnSyRz+r/06OTxy04vGYwKXutPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hpqOS90t+0o5hL+x9QClpSTiFb4KKSJuIz/U0pBnk+A=; b=UwE53oo95GpxWrCgrhlbSC2UH4NP7lytAMUIuHKH5bmbv4OMdlbzlmvKvVhhcA7Khat5Es IIpnBPeqAikJx4e3QtvIaCCk1nhxPR4XrmfJ4GkdLhKLrmOSk8aTMpV37rRwLvCyHJ9yYb BGO85fU1mEn6lUQ2ZKpIviVA1YyxG9zYQlUeFeXpi8JddopajBJcdc6fr3q04SQw5537ey sseuV1k9xQT3wp9Vr6fK2MxWhjVseujszq9S3+y/X3WKPXNfQGW9rW5PESyELGh7vhVmvm m1AJttgz32uOpaivMij8gOZCYM+6gATtwY9ODJi6KHwLjiOxhSd+G4xbzKQ6Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886380; a=rsa-sha256; cv=none; b=bStUvN7VsCBcesnmgJhSx8Rmdd/+lpZlifPCNgDdJiqbT50KF5nksf1MbxwLaHRzytCMeI g3nKL5naAKVnlRBRVXTI0FgqESulj2Tr51jAdj/Q2SZ7oI85gDLQUSxMgE6eMbIU1m9xPU rdmBTLGK5GZk8d+i8FaOlL86XA/OIa4awbOWsY+8dLBcqoMFcrBtUlYU6jWW4PcKpW4dBZ cBFK6dPBOfcxNdB78zJ9hHn71IKccy2rVNICeA9CwsUkOvbceC0lVqg9YI9jrRnVxWgr8M 7vHN+TRXIX62bCXqB++YXU10ngy/oxb/PJCoD/Lml12YiIlyjsr/7w4pgqIdrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKS12qDz111f; Tue, 27 Jun 2023 17:19:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJd9I006805; Tue, 27 Jun 2023 17:19:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJdm5006804; Tue, 27 Jun 2023 17:19:39 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:39 GMT Message-Id: <202306271719.35RHJdm5006804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a7f25f141ac5 - main - libipf: Remove set but unused variable from printfraginfo(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7f25f141ac5fee8b67c2b60ad96bc91eaade870 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a7f25f141ac5fee8b67c2b60ad96bc91eaade870 commit a7f25f141ac5fee8b67c2b60ad96bc91eaade870 Author: John Baldwin AuthorDate: 2023-06-27 17:19:31 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:31 +0000 libipf: Remove set but unused variable from printfraginfo(). Reported by: GCC Differential Revision: https://reviews.freebsd.org/D40652 --- sbin/ipf/libipf/printfraginfo.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sbin/ipf/libipf/printfraginfo.c b/sbin/ipf/libipf/printfraginfo.c index fcafdde707be..6abec4316a41 100644 --- a/sbin/ipf/libipf/printfraginfo.c +++ b/sbin/ipf/libipf/printfraginfo.c @@ -14,7 +14,6 @@ void printfraginfo(char *prefix, struct ipfr *ifr) { - frentry_t fr; int family; PRINTF("%s", prefix); @@ -25,14 +24,8 @@ printfraginfo(char *prefix, struct ipfr *ifr) PRINTF("inet"); family = AF_INET; } - fr.fr_flags = 0xffffffff; PRINTF(" %s -> ", hostname(family, &ifr->ipfr_src)); -/* - if (kmemcpy((char *)&fr, (u_long)ifr->ipfr_rule, - sizeof(fr)) == -1) - return; - */ PRINTF("%s id %x ttl %lu pr %d pkts %u bytes %u seen0 %d ref %d\n", hostname(family, &ifr->ipfr_dst), ifr->ipfr_id, ifr->ipfr_ttl, ifr->ipfr_p, ifr->ipfr_pkts, ifr->ipfr_bytes, From nobody Tue Jun 27 17:19: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 4QrBKV27RSz4f4Fy; Tue, 27 Jun 2023 17:19: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 4QrBKT72fDz3NBw; Tue, 27 Jun 2023 17:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RDN2tMMyeFTdrunFbQl0Vk1UBICDywIV8a4bFBiGgis=; b=yN1NJ4UQSjvG2OQum5Xl7YuLyjNv6cigiA26OVQ3TIdD2etGuz/dBTXSBIPPWwJFx7iVgc OdJfN/HXxcTP+pgFuyNP3Mf7IU8qcjUugotzwNRfUyp4Yt8qH8tg1vm0p7Izq/m3spk0ZO Q6tmJE6iYtcsVzDFXa3xVDxmiRGdXQE/PtWBIYjTUVSW7S4y3/MTKNgF/sg6RreJwYSqFO 90O6IiK7DB2Lqb/rp8IWK4+rNJbAjsk5w+zzG0M4LlqXAt6NGJ0Q6vWg+5Rr1Yc1AUFLUg sfdJcrfwLKiiueIDFtUxseDsEkZlliUC0UNxf/5qxjcQTlGDl3zScJ/ulSoIUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RDN2tMMyeFTdrunFbQl0Vk1UBICDywIV8a4bFBiGgis=; b=OBOZmjA1BtUCO/55IyINXDn/nhDaZ1Xm/j26sl5hPcerz8OXict72fikcGbaX3pTrjZiSm A5TY4aTXZNL2Nydfb9Puw5PVS1dM5c/+8k1H02xHlrIi+SNm+11abzbM4M7M11KezDc23X knldHoB+A5SfOv+l+/ev86o5RKWdVjK8QI4dmJX85UPAPro8a+jqXDPj6zEVDFlps8Ibn2 WOYswFTPSouwZorVgQa/C9iRxIQA/BvAs0CpoJ1bMkVcZkfxl7nfu2PROeYhe+e/V1OVQH qHSi7rD23MaQQVdnsLtP8fT9CYYoKMpCS4PI6oV77JFpbKNaiZBHooTCsD9Ezg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886382; a=rsa-sha256; cv=none; b=Jg5Dt33qjnosnO16xqU/qZezgyVa1yWV2YlIVrDyH3m9QiZ23knDu05H6mfDG0aORtZwa4 GjukuTnHwR3iezHEolcsP4AOFW+h8QrpFIsxOtdRiBol2xi9fmVZvSx/zrqAIBBiZsR3Lq 6lVob2vFBTRaIC9fhanqpqF7m9bXmfQfwVurXaHkHwGwk/4ivdo5kINm4bNHbav6ovF3h7 Mu0wQw6Y6fA5R+vCqgx6QE4CwWjGInMwwzlxD3rSfClGCK3rN3nm/d1/6rwNTI8GxTV5OF vLOAYPIioiDCAX5/ixyUb/VB6+09xOZX14tiqXSaT0Z8vXXDEb7SLiJzK84I5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKT1mptz10mt; Tue, 27 Jun 2023 17:19:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJfoU006829; Tue, 27 Jun 2023 17:19:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJfD5006828; Tue, 27 Jun 2023 17:19:41 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:41 GMT Message-Id: <202306271719.35RHJfD5006828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f5e73306336f - main - ipfw: Remove set but unused variables. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5e73306336f22b842da143f973f08c5dcd13671 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f5e73306336f22b842da143f973f08c5dcd13671 commit f5e73306336f22b842da143f973f08c5dcd13671 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 ipfw: Remove set but unused variables. Reported by: GCC Differential Revision: https://reviews.freebsd.org/D40654 --- sbin/ipfw/nat.c | 3 +-- sbin/ipfw/nat64clat.c | 3 +-- sbin/ipfw/nat64lsn.c | 3 +-- sbin/ipfw/nat64stl.c | 3 +-- sbin/ipfw/nptv6.c | 3 +-- sbin/ipfw/tables.c | 6 ++---- 6 files changed, 7 insertions(+), 14 deletions(-) diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index 1076e1038b8a..2be03f47c229 100644 --- a/sbin/ipfw/nat.c +++ b/sbin/ipfw/nat.c @@ -1074,7 +1074,6 @@ nat_foreach(nat_cb_t *f, void *arg, int sort) struct nat44_cfg_nat *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(struct nat44_cfg_nat); @@ -1097,7 +1096,7 @@ nat_foreach(nat_cb_t *f, void *arg, int sort) cfg = (struct nat44_cfg_nat*)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, arg); /* Ignore errors for now */ + (void)f(cfg, arg); /* Ignore errors for now */ cfg = (struct nat44_cfg_nat *)((caddr_t)cfg + olh->objsize); } diff --git a/sbin/ipfw/nat64clat.c b/sbin/ipfw/nat64clat.c index 08be444318cc..bd286f78cfc2 100644 --- a/sbin/ipfw/nat64clat.c +++ b/sbin/ipfw/nat64clat.c @@ -505,7 +505,6 @@ nat64clat_foreach(nat64clat_cb_t *f, const char *name, uint8_t set, int sort) ipfw_nat64clat_cfg *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(*cfg); @@ -528,7 +527,7 @@ nat64clat_foreach(nat64clat_cb_t *f, const char *name, uint8_t set, int sort) cfg = (ipfw_nat64clat_cfg *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, name, set); /* Ignore errors for now */ + (void)f(cfg, name, set); /* Ignore errors for now */ cfg = (ipfw_nat64clat_cfg *)((caddr_t)cfg + olh->objsize); } diff --git a/sbin/ipfw/nat64lsn.c b/sbin/ipfw/nat64lsn.c index 755414f49959..f005432d7fbc 100644 --- a/sbin/ipfw/nat64lsn.c +++ b/sbin/ipfw/nat64lsn.c @@ -853,7 +853,6 @@ nat64lsn_foreach(nat64lsn_cb_t *f, const char *name, uint8_t set, int sort) ipfw_nat64lsn_cfg *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(ipfw_nat64lsn_cfg); @@ -877,7 +876,7 @@ nat64lsn_foreach(nat64lsn_cb_t *f, const char *name, uint8_t set, int sort) cfg = (ipfw_nat64lsn_cfg *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, name, set); /* Ignore errors for now */ + (void)f(cfg, name, set); /* Ignore errors for now */ cfg = (ipfw_nat64lsn_cfg *)((caddr_t)cfg + olh->objsize); } diff --git a/sbin/ipfw/nat64stl.c b/sbin/ipfw/nat64stl.c index def9b9dd9b58..8ac0b546a44d 100644 --- a/sbin/ipfw/nat64stl.c +++ b/sbin/ipfw/nat64stl.c @@ -521,7 +521,6 @@ nat64stl_foreach(nat64stl_cb_t *f, const char *name, uint8_t set, int sort) ipfw_nat64stl_cfg *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(*cfg); @@ -544,7 +543,7 @@ nat64stl_foreach(nat64stl_cb_t *f, const char *name, uint8_t set, int sort) cfg = (ipfw_nat64stl_cfg *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, name, set); /* Ignore errors for now */ + (void)f(cfg, name, set); /* Ignore errors for now */ cfg = (ipfw_nat64stl_cfg *)((caddr_t)cfg + olh->objsize); } diff --git a/sbin/ipfw/nptv6.c b/sbin/ipfw/nptv6.c index f2ebbdb65185..27b6d3945d26 100644 --- a/sbin/ipfw/nptv6.c +++ b/sbin/ipfw/nptv6.c @@ -420,7 +420,6 @@ nptv6_foreach(nptv6_cb_t *f, const char *name, uint8_t set, int sort) ipfw_nptv6_cfg *cfg; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(*cfg); @@ -442,7 +441,7 @@ nptv6_foreach(nptv6_cb_t *f, const char *name, uint8_t set, int sort) cfg = (ipfw_nptv6_cfg *)(olh + 1); for (i = 0; i < olh->count; i++) { - error = f(cfg, name, set); + (void)f(cfg, name, set); cfg = (ipfw_nptv6_cfg *)((caddr_t)cfg + olh->objsize); } free(olh); diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c index 37cbd7a2d7ae..d4fc770d375e 100644 --- a/sbin/ipfw/tables.c +++ b/sbin/ipfw/tables.c @@ -1408,7 +1408,6 @@ guess_key_type(char *key, uint8_t *ptype) { char *p; struct in6_addr addr; - uint32_t kv; if (ishexnumber(*key) != 0 || *key == ':') { /* Remove / if exists */ @@ -1424,7 +1423,7 @@ guess_key_type(char *key, uint8_t *ptype) } else { /* Port or any other key */ /* Skip non-base 10 entries like 'fa1' */ - kv = strtol(key, &p, 10); + (void)strtol(key, &p, 10); if (*p == '\0') { *ptype = IPFW_TABLE_NUMBER; return (0); @@ -1712,7 +1711,6 @@ tables_foreach(table_cb_t *f, void *arg, int sort) ipfw_xtable_info *info; size_t sz; uint32_t i; - int error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(ipfw_xtable_info); @@ -1737,7 +1735,7 @@ tables_foreach(table_cb_t *f, void *arg, int sort) info = (ipfw_xtable_info *)(olh + 1); for (i = 0; i < olh->count; i++) { if (g_co.use_set == 0 || info->set == g_co.use_set - 1) - error = f(info, arg); + (void)f(info, arg); info = (ipfw_xtable_info *)((caddr_t)info + olh->objsize); } From nobody Tue Jun 27 17: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 4QrBKW0lRtz4f4LJ; Tue, 27 Jun 2023 17: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 4QrBKV5nhtz3NMq; Tue, 27 Jun 2023 17:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFl7OEyshRRfQA1hYwq9Iog09GWhjz/qRPqGdSx2OA4=; b=nLzxYj7XDSe4RqWRa+y/6Ur+sOvnLdZIO1o7cvSW2JZf/39KCa5MevduV5MriyR+GIgyFv YPI3oOR/Yd12Bmwsed70h4n9r/6zpMUjbmJfolnnf9WKn1Xh1o0Fcw0d5lF6z2RcXjPWV6 20xgkAFiK2vKDT1Gw26lt9Wv7yTEjh6sQszioatfjBsIMby5w/hfsfSi+OBUm4kIcRvdbK p7eaeJAjNoptHYsC5q3Jjup4i0wxJSBMoThtotbJaijkRxLHmTGAqsp8NQuaAQS1Ly6Amt /1yRsV7DuabJobLQ1QlgJO6R+RMoMUuKTXPEsQyEuZBQCMtS9JALPwP/hA2AAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFl7OEyshRRfQA1hYwq9Iog09GWhjz/qRPqGdSx2OA4=; b=nIocFhyF6BT0LEetdqQ7gQRjrBFcBxYL8yE+aubI1VSwWlPLa5wQxr5QNhGdhOXR2ll1uG RKaM085onBr748UhkgW28nxmaaa1k5QybBuSMR1CL2nz9dlAhemqzKsN/Cq8ICf64iNh2X 5T4oqEQZx9cyPSPCTGgYtx/MD0mOAAZ7UJ2nhD9FStR7QWKhJ9eEid2USWVW39ehiVToSg oh+HR1HigmzBZrP8rtbu0vGAgXFvxYGVCallx9iPH0xkuh8qiK50vCkhbNjsX7IVYdBBHq lC0gEkd0gvn6fAu+D+9RYRwxx7zD0Z+0RZ7xcY9tOG+/MTa0FTH1AFA+tlNqAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886382; a=rsa-sha256; cv=none; b=jKoiO2z0dlq0smOCQYk+3TYGP36WiVxSRenDVxuqp3/CndEkgPR+tMvXGLeW0H8MdbyKYf thtApL5meBbQSlNIJIXt+cZPo/rp0+hUNCE8U6az/D7NUsGx+qjNKCkFeNuDZmZXVpTaSJ dc7b0WiqnE2TRGu3gUgxSSfWqI7cjvwlQhPTftIk0bdQEO1Nn3DCz4+rs2X687al6HyL2n 2rQXUhGTrySTi+qyxaPLEOutO5WM08Fs9m8QYNnXe2hnWdcihlnp4oHbYZmj/9GRL2/LAw ZgZCFtcXruC1t3b3gmxt7oI7eOgU/JrjbB351HHREMjJzAAZkxU59JCZzGr2ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKV2fdpz1148; Tue, 27 Jun 2023 17:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJglY006851; Tue, 27 Jun 2023 17:19:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJgPH006850; Tue, 27 Jun 2023 17:19:42 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:42 GMT Message-Id: <202306271719.35RHJgPH006850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f66a8328c3ef - main - bsdinstall: Replace correct, but fragile, string builder with open_memstream. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f66a8328c3effcb4fbd7807b798d0288b865421d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f66a8328c3effcb4fbd7807b798d0288b865421d commit f66a8328c3effcb4fbd7807b798d0288b865421d Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 bsdinstall: Replace correct, but fragile, string builder with open_memstream. The old one triggered a false positive -Warray-bounds from GCC (the compiler assumed len was always 0), but it was also fragile with manually computed lengths paired with strcat vs using a string builder. Differential Revision: https://reviews.freebsd.org/D40658 --- usr.sbin/bsdinstall/partedit/scripted.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/scripted.c b/usr.sbin/bsdinstall/partedit/scripted.c index 48ac94d112f2..62c36724d7c5 100644 --- a/usr.sbin/bsdinstall/partedit/scripted.c +++ b/usr.sbin/bsdinstall/partedit/scripted.c @@ -195,23 +195,26 @@ int parse_disk_config(char *input) int scripted_editor(int argc, const char **argv) { - char *token; - int i, error = 0, len = 0; + FILE *fp; + char *input, *token; + size_t len; + int i, error = 0; - for (i = 1; i < argc; i++) - len += strlen(argv[i]) + 1; - char inputbuf[len], *input = inputbuf; - strcpy(input, argv[1]); + fp = open_memstream(&input, &len); + fputs(argv[1], fp); for (i = 2; i < argc; i++) { - strcat(input, " "); - strcat(input, argv[i]); + fprintf(fp, " %s", argv[i]); } + fclose(fp); while ((token = strsep(&input, ";")) != NULL) { error = parse_disk_config(token); - if (error != 0) + if (error != 0) { + free(input); return (error); + } } + free(input); return (0); } From nobody Tue Jun 27 17:19: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 4QrBKW4hwfz4f4Zg; Tue, 27 Jun 2023 17: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 4QrBKW44kVz3N8m; Tue, 27 Jun 2023 17: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=1687886383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6brNlkP4/+HAASbAIfqmbBuhzMLbR31FEAZyuGrZQCA=; b=jV1MbjY7ZBmosIKnp4oEvJkI9Yea+i9n7kCYAbIpydbmgCIM0c1Ez9kRTLMU9cp/3tOEg9 SOy/TjMuIU5eQ4mKqIQnEM1qCEmVy9/P/Qo7mY01ZBWdlgp/XE1AdyppCdgjL+VTpc8gvr N8KLYtnRN2tF/oOJ7KXj4yvWSSM29n4JwuYwYmQ40b9lS3uS49Gd9n1kEPV49ocx5B1+JS F6W54bnXaPrOu4rdHSjnZvIRWOkBnH39VzlgEIN8P1p7XR1bBkF1gZsw7kWfX+euFNulAJ BPA9HgI9DNySNqMl1fLmfdU/mMlXLzV2tnk8WX5upxKr9Jo+I4kzLo7PZx34eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6brNlkP4/+HAASbAIfqmbBuhzMLbR31FEAZyuGrZQCA=; b=n6lfbRL7wehFCeVh4a1Vr8OipU0avjFitoeXBcYrD20XX0IG0RkDwkhMITEU1cpPm/f0Ty ZyNzAytnh+MBeiyeIkDMvjzyx8Q96CGajULFKdMk84rBTKLL3s8hJdpxloCVXIdlKLQRLh Y8t6dbyK6I486tiW9TxfZDOnn3NcT2JmW2FzSLP8U26KU9k0P72cCcDh8jXKgQxCY6akHU 9QDLKQ9z1g+r63eQCjcT9YY+Mb6PcbK9pAAgQxTF+MEGCmw8RcH+2CK7n/8B84GMI57Se5 HoufFWA2kboHJ+wp4AXhUko1U/5ScuGarP683rKUXqx0QKbPHvTI7+aZCuJqMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886383; a=rsa-sha256; cv=none; b=xCgctLuY9UsBxUVNuuo6/65KVc0BWLPNxbOSxc3PmB1WaU7r1qvhX4DmZwXecS2yviCG4+ LPuLUAtsULqugSghJEK4NYtGI+E2Rkp/BbaDfJI4NqMUZN0rS4d3Oh+RdtqYbcEojp8fB3 4IzVYe85kCD0qIFZTPSZU/xGyfUhUfEi0YKfkrSpycxZf+TiNwPrGSJCDAj6yDIlJEhaT/ tYJaDHuXfdjs7kvv2m/gMd9gCmcq+BGRV3qE9OBG+uysyFys5ArBi4eD+cR/7ZoaVTDC2a +L1ewRMmKKyvecG+uO4Qu7hqNGUDVLJiZu/1p9xs+XVhBUy28E2TIpTESmjxOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKW37prz11FB; Tue, 27 Jun 2023 17:19:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJhtm006877; Tue, 27 Jun 2023 17:19:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJh7s006876; Tue, 27 Jun 2023 17:19:43 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:43 GMT Message-Id: <202306271719.35RHJh7s006876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 32c7dde816fd - main - hyperv/kvp: Remove set but unused variables. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32c7dde816fd1d738a48af82bf490307cb7b4739 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=32c7dde816fd1d738a48af82bf490307cb7b4739 commit 32c7dde816fd1d738a48af82bf490307cb7b4739 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 hyperv/kvp: Remove set but unused variables. Reported by: GCC Reviewed by: Souradeep Chakrabarti Differential Revision: https://reviews.freebsd.org/D40660 --- contrib/hyperv/tools/hv_kvp_daemon.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/contrib/hyperv/tools/hv_kvp_daemon.c b/contrib/hyperv/tools/hv_kvp_daemon.c index 2770a8d6bc97..c111bb14ced8 100644 --- a/contrib/hyperv/tools/hv_kvp_daemon.c +++ b/contrib/hyperv/tools/hv_kvp_daemon.c @@ -193,7 +193,6 @@ static void kvp_update_file(int pool) { FILE *filep; - size_t bytes_written; kvp_acquire_lock(pool); @@ -204,7 +203,7 @@ kvp_update_file(int pool) exit(EXIT_FAILURE); } - bytes_written = fwrite(kvp_pools[pool].records, + fwrite(kvp_pools[pool].records, sizeof(struct kvp_record), kvp_pools[pool].num_records, filep); @@ -1217,11 +1216,9 @@ kvp_op_enumerate(struct hv_kvp_msg *op_msg, void *data __unused) char *key_name, *key_value; int error = 0; int op_pool; - int op; assert(op_msg != NULL); - op = op_msg->hdr.kvp_hdr.operation; op_pool = op_msg->hdr.kvp_hdr.pool; op_msg->hdr.error = HV_S_OK; @@ -1375,7 +1372,7 @@ main(int argc, char *argv[]) struct hv_kvp_msg *hv_kvp_dev_buf; struct hv_kvp_msg *hv_msg; struct pollfd hv_kvp_poll_fd[1]; - int op, pool; + int op; int hv_kvp_dev_fd, error, len, r; int ch; @@ -1488,11 +1485,10 @@ main(int argc, char *argv[]) /* * We will use the KVP header information to pass back * the error from this daemon. So, first save the op - * and pool info to local variables. + * to a local variable. */ op = hv_msg->hdr.kvp_hdr.operation; - pool = hv_msg->hdr.kvp_hdr.pool; if (op < 0 || op >= HV_KVP_OP_COUNT || kvp_op_hdlrs[op].kvp_op_exec == NULL) { From nobody Tue Jun 27 17:19: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 4QrBKX6QlGz4f4XY; Tue, 27 Jun 2023 17:19: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 4QrBKX57hDz3NYW; Tue, 27 Jun 2023 17:19:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cagej4ne6ER1eRBQ/cWo/jG5MRLTZoAL7UJvfx99k2M=; b=qG2bJK7lTJsThDLJGIoL30hGZRW+YducYloKULYCfiN/52F4jier2fsCgXLNnuXTxGLBoQ p1TFTEwnvFh8MY0kHHywD0ewu925pbD4PSYWYiAJFIrzonznuXrImSHLdo8PQx2keKKT0W sknptNfXj2RbqKO/1qa8UcCxz+4FKEspFugmwlPo3+Ot07vZKqgkDh1mlGVLfCBdoUGuEn 8vnvfE+5nB6UFYj/sf4kSRamNIs54lEyq2qdctmsvqecdaMRh0NFdPrj2QyxppNsrVzEOg 8iUteYy52jm8dsGAsSPDE2NDx0pU/J/3jtiQIq6XDGZcJ6s2kVi7aGXwZ5QiSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cagej4ne6ER1eRBQ/cWo/jG5MRLTZoAL7UJvfx99k2M=; b=lpzuxJazat9vF8Q7W6qLn2lFopcVBkuSagRmXhDrjHkSB/5j0CJtH4PdTHSTOmIc0PLbLm hDQ3VnbkHRjrcSGxJXhCJmuZ4Fn6SubSUMYE5uyZFdzICs/HSQTBj6ZOK0s6Ri1nh956Je +eoq+BT9+k73kV8oZZ79eCxTMuu3WAyN4xJogOunVnm63X0i1ygBc8x+W/pe/rGpc5+Z/y 4scNgOo2ziuQKYZd7G8omqBxL0wNmmD50OtzNQtMtT5Zx6bekIDanm6ioyjTEyoJPH3bFO 15K2pxfTpIs1z1WM+SLDKo3gywBc+fvq/u+vIy3Kzwtu4/FdvCnKEFp3k805Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886384; a=rsa-sha256; cv=none; b=PC1pdnVx9vSlXr+QOXysaaW234xelS7FNnt0A/vJ1oskKYgDwTjKMYk3SvQtdABIct4gAl CwSjAsO9h06W/SO1ISShMTGgNMD+8Pm6gxoJd1KFODDlithsccajHcycQ71jXjt6w8y7zv Q4RXZIsJARqeibvAFRrahXJ1egu2iyguoDgMxvCqC94kv06/Lafc5SEZsX9lwLLZdgGhID qYHrpGyeaQCGeq+ynKJlGdx0sHXMSAKMrJsTVxMJdAnOXhYx+QRiCP0/zpCi3xcmiUVHmK QQKKLM0IF4lP/o/VeJtEUCfFXb4CY2FYwN8+ra+5x/aVKvGbeAziVQ3Nc6WkoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKX44x0z11JJ; Tue, 27 Jun 2023 17:19:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJiap006905; Tue, 27 Jun 2023 17:19:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJiFH006904; Tue, 27 Jun 2023 17:19:44 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:44 GMT Message-Id: <202306271719.35RHJiFH006904@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 235c8f6631cb - main - ncurses: Silence -Wunused-but-set-variable for various 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 235c8f6631cb58a50e5b36e786d6354ae4e43cea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=235c8f6631cb58a50e5b36e786d6354ae4e43cea commit 235c8f6631cb58a50e5b36e786d6354ae4e43cea Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 ncurses: Silence -Wunused-but-set-variable for various files. Presumably these will be fixed upstream eventually. Differential Revision: https://reviews.freebsd.org/D40664 --- lib/ncurses/form/Makefile | 2 ++ lib/ncurses/ncurses/Makefile | 2 ++ lib/ncurses/tinfo/Makefile | 3 +++ 3 files changed, 7 insertions(+) diff --git a/lib/ncurses/form/Makefile b/lib/ncurses/form/Makefile index 8a26672544c5..341205aca2d9 100644 --- a/lib/ncurses/form/Makefile +++ b/lib/ncurses/form/Makefile @@ -57,6 +57,8 @@ CLEANFILES= ncurses_def.h CFLAGS+= -I${SRCDIR} CFLAGS+= -I${NCURSES_DIR}/menu +CWARNFLAGS.fty_enum.c= ${NO_WUNUSED_BUT_SET_VARIABLE} + LIBADD+= ncursesw INCS= form.h diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index 45c8fcd11301..1c1b995a9ff6 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -147,6 +147,8 @@ DBGSRCS= \ CLEANFILES= ${GENSRCS} +CWARNFLAGS.lib_set_term.c= ${NO_WUNUSED_BUT_SET_VARIABLE} + .if ${MK_INSTALLLIB} != "no" SYMLINKS+= libncursesw.a ${LIBDIR}/libcursesw.a # backward compat diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile index 2d251072acb8..40cd36bc17a4 100644 --- a/lib/ncurses/tinfo/Makefile +++ b/lib/ncurses/tinfo/Makefile @@ -167,6 +167,9 @@ CLEANFILES= ${GENSRCS} ${GENHDRS} keys.list make_hash term.h.new \ CFLAGS+= -DTERMIOS +CWARNFLAGS.comp_parse.c= ${NO_WUNUSED_BUT_SET_VARIABLE} +CWARNFLAGS.read_entry.c= ${NO_WUNUSED_BUT_SET_VARIABLE} + # Installed HEADERS= curses.h term.h termcap.h unctrl.h SRCHDRS= ncurses_dll.h From nobody Tue Jun 27 17:19: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 4QrBKZ01rGz4f4Lw; Tue, 27 Jun 2023 17:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrBKY5xX1z3NPM; Tue, 27 Jun 2023 17:19:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kw+r3yDgxUxG3qatxdcsSeoyJ3Gf6RQebB5eQM/N1Hg=; b=oPyXlP6vb2Inpf1cLTuJVkMliAsKMIbo5Qm+t7YGFv+9GwbmWkOQhEryZ/r3elIaI0Cq67 mY+34Ud5yfN4GOWELR3xZUhWknB+OPYavx6dBco1Ret9MIBVwnlOWg5Dyi80DQxpOQa6YG sg9lgrLZw02FdTCs7NQZEvyymH9QQdfb10Ou9BRd7pxYcTyr+LWdeVx4r2nYW9DgdLkiuu yxIjrGmU4ZQOArFBq3UXRLQVQc4RmJMkEEyJzUZpmt9pNU6WyyOJMHJki+WTEeP+4KAood lz5NZ5Tl1OKYBafyoMQ/4u1vpRtmXdCPwt6eh7eDQv51MrgL6FY6f9TIRTiF4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kw+r3yDgxUxG3qatxdcsSeoyJ3Gf6RQebB5eQM/N1Hg=; b=w29VLztZMaM0fqNgbnoIHWvVdD9lZ1Tg+ZDv34H9XfNEFRqdX8yFrn6UKEMCqVr749VEYI qRrtV//mYYwn7yhg4gYX+ui9kt9G2j7n1uTSFaBgPAbp1mPmMq1B7+a2//ayfRh2wUjazs YS1qfkhFII5TMLTYm/83txzErPrfcvzqUJcii+7oLNjeXjXKCL7Jrf0K64Gnk25lTiG9J5 cRzYez5e21OA1Pj/QMBofCgeUsT0bv285WCqsrNpwVGnWnFUDNi1Ig82p5vaMCbNzrGKwZ RlcSb71PWcxaVYd2fsqk7vc8tWFRjcE/0A74V7Tuer25cuMU0b81Yv13QAX8qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886385; a=rsa-sha256; cv=none; b=cISLK2wpGSUs7jsWba6xYwa+vaYu8qMSnaaygSosts6G5CmteXm1XaaSH3n55ZErS9lYBT TA6G3N535ld/Tp+XMfqCawz9KhknU5F/uQKt590mJEaQNhP3tgfB8BAE2YVSetx52u0DyZ jE26te8XAxFGLL6ubW7tccJevlC5cDHOdB8xcadHyLn53x4UBAD/DSETqly5GG3lg6OkFp 6UNxIHDYpAcbpjv6SabVqj2dGg/Fyk7FQ/groTBqRKTifc5h5aiJr2R+7Iki5PZGo1mlFB seOTKWp7At9BHqp/9eRPEFVcSnZx6lIUUS8RYhcYXFR2zxr9Ad//Krfma7OC4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKY51gNz10r7; Tue, 27 Jun 2023 17:19:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJjtu006924; Tue, 27 Jun 2023 17:19:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJjeS006923; Tue, 27 Jun 2023 17:19:45 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:45 GMT Message-Id: <202306271719.35RHJjeS006923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 90f2fee0e040 - main - ipf: Remove set but unused variables. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90f2fee0e0400a785db8e5eadad40801d77b74b8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=90f2fee0e0400a785db8e5eadad40801d77b74b8 commit 90f2fee0e0400a785db8e5eadad40801d77b74b8 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 ipf: Remove set but unused variables. Reported by: clang Differential Revision: https://reviews.freebsd.org/D40667 --- sbin/ipf/ipmon/ipmon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sbin/ipf/ipmon/ipmon.c b/sbin/ipf/ipmon/ipmon.c index 4f07dda27e62..3aa6d4d05043 100644 --- a/sbin/ipf/ipmon/ipmon.c +++ b/sbin/ipf/ipmon/ipmon.c @@ -304,7 +304,6 @@ static icmp_subtype_t * find_icmpsubtype(int type, icmp_subtype_t *table, size_t tablesz) { icmp_subtype_t *ist; - int i; if (tablesz < 2) return (NULL); @@ -312,11 +311,10 @@ find_icmpsubtype(int type, icmp_subtype_t *table, size_t tablesz) if ((type < 0) || (type > table[tablesz - 2].ist_val)) return (NULL); - i = type; if (table[type].ist_val == type) return (table + type); - for (i = 0, ist = table; ist->ist_val != -2; i++, ist++) + for (ist = table; ist->ist_val != -2; ist++) if (ist->ist_val == type) return (ist); return (NULL); @@ -327,7 +325,6 @@ static icmp_type_t * find_icmptype(int type, icmp_type_t *table, size_t tablesz) { icmp_type_t *it; - int i; if (tablesz < 2) return (NULL); @@ -335,11 +332,10 @@ find_icmptype(int type, icmp_type_t *table, size_t tablesz) if ((type < 0) || (type > table[tablesz - 2].it_val)) return (NULL); - i = type; if (table[type].it_val == type) return (table + type); - for (i = 0, it = table; it->it_val != -2; i++, it++) + for (it = table; it->it_val != -2; it++) if (it->it_val == type) return (it); return (NULL); From nobody Tue Jun 27 17:19: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 4QrBKb3B75z4f4M5; Tue, 27 Jun 2023 17:19: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 4QrBKZ6ps5z3NLM; Tue, 27 Jun 2023 17:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3EF7xgto9PDgn9UOEU+VxpSDooPcQHWtNzcfjVAA9PM=; b=SLWGbZv2IorTWIX2M3fhkux24QPSB2sT1GacpC15nFn5TTWePz0fY0Gg/91GRbxj85uMvN 7puReML8AKUwEN+tEDj3z9fTXvfAYALLb8BerY9Xa+zcOq0AoOB+HmfqyJaDmIBW+mxwid QTzlrvicLO3lQT3gBCq0QibCDoQ3DRVzSgyZqqyXA2VZY+0qEXJgbbZ5Zh+cTCVeEmdjZW lsFmY3jXcecsJU1CfIbqPp4oMA0fj+7Meey6/lYN8nwJnh5KZdp9z2QKTg6o4m8AvUt2Wd WgtfeBzKrgsUxvLc1ILXZeUfabnFD2SFQKXxU/Uc5Hp0UGjZMB6xBeHY4Psq3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3EF7xgto9PDgn9UOEU+VxpSDooPcQHWtNzcfjVAA9PM=; b=gGq9nxygquqxx9j4zCxtjaZsn8v/zs5KSFV+i/FEM8lQrBrVEycphLcT4XvmZhQMGzOioR zzi5bvVOLkHxzQl8lPQScUL82laEK7B0TWlugfoE0hcHh5eAzugQ/tqSLtC9BWgOWmXg2n x3WD6f37qzL/URlmcqIRn4oPLFquE+otpi3yYcDAPlyzRklX7hQtqiiAcNyD8UsO5xkUd0 UIrLwITPuPlhmyYWmk4SLW0VXa8NsmyIqt7F6P4mVThYMl8eUljc0MNRTzD2dHaAQks70h ieHPupK8U5S/ql60yfkz/E3C+gPJ28P9vi+4CcIzYU5NCjXIUX84cK/sNN+HTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886387; a=rsa-sha256; cv=none; b=qclRC2GnQNdU2eoKO3rCn4Vxli/M75ApqAxI60mHs9bpgKaFjl7wlyum3SBgvVxWIhwtDd qFaGpEbskau2GMlXrT1ghJupWJ7LKu70R2x9t8aHFbVdc+Al3Ejs4lN11ZvoxaBleQR3FU zGCPdcYed42AwOCKuD2b3SloQqOFjjy9jftDRfjZOlNNvTFb+4/IXmYNxj+g3sjAhCyTmU v23V5ewg0i1fUJnMQs5CXzbNvp3zLc+CtHSfFhYEbBWFHvTNAbUBttmJ7G7cHi7EyBMlK2 8apbJsDpdCe+yFCgwdA9hyjSP04IKamgo09MvKIG1lNoOh9l+Rng1TFqThpSeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKZ5pzKz1149; Tue, 27 Jun 2023 17:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJkrC006943; Tue, 27 Jun 2023 17:19:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJkSp006942; Tue, 27 Jun 2023 17:19:46 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:46 GMT Message-Id: <202306271719.35RHJkSp006942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1e80d4b18897 - main - xo: Disable -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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e80d4b18897a8c3ff32291d970077aa7174ab96 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1e80d4b18897a8c3ff32291d970077aa7174ab96 commit 1e80d4b18897a8c3ff32291d970077aa7174ab96 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 xo: Disable -Wunused-but-set-variable. Presumably these warnings will be fixed upstream at some point. contrib/libxo/xo/xo.c:99:9: error: variable 'hflag' set but not used [-Werror,-Wunused-but-set-variable] int hflag = 0, jflag = 0, tflag = 0, ^ contrib/libxo/xo/xo.c:99:20: error: variable 'jflag' set but not used [-Werror,-Wunused-but-set-variable] int hflag = 0, jflag = 0, tflag = 0, ^ contrib/libxo/xo/xo.c:99:31: error: variable 'tflag' set but not used [-Werror,-Wunused-but-set-variable] int hflag = 0, jflag = 0, tflag = 0, ^ contrib/libxo/xo/xo.c:100:2: error: variable 'zflag' set but not used [-Werror,-Wunused-but-set-variable] zflag = 0, qflag = 0, star1 = 0, star2 = 0; ^ contrib/libxo/xo/xo.c:100:13: error: variable 'qflag' set but not used [-Werror,-Wunused-but-set-variable] zflag = 0, qflag = 0, star1 = 0, star2 = 0; ^ Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D40668 --- usr.bin/xo/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/xo/Makefile b/usr.bin/xo/Makefile index 5cc36ab95dd9..2a98c10c7114 100644 --- a/usr.bin/xo/Makefile +++ b/usr.bin/xo/Makefile @@ -22,3 +22,5 @@ HAS_TESTS= SUBDIR.${MK_TESTS}+= tests .include + +CWARNFLAGS+= ${NO_WUNUSED_BUT_SET_VARIABLE} From nobody Tue Jun 27 17:19: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 4QrBKc2Hzjz4f4cb; Tue, 27 Jun 2023 17:19: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 4QrBKc16r9z3Nhb; Tue, 27 Jun 2023 17:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RO+rdvGG+lgltzWO72pc/DdxbtPoqWZ0XQhmocN2OMk=; b=CCOsqBGzw7V4XMVxzPFqvRhXYmDsFwKgxc/KWEbNRDoLmimjXyL0WfP6pHVKMi6HoQqnsy obGEdjJQK/JuovW8CT7EMx7bul7jL4A38eR87R7s0w7IoLxL4aSSXgV3Ni45e3kxia8q8w eV/RWwsaW0aITo2us1TwM6NEuSNuQI2QUXlqD6NjkSntBDMuN03Ue++izykMcjFIt84bI0 y+k2wvK9hVbbv7nO8A3AKh87L/PJE4grpbPXuO/2rdDMklVmNGUxkuLUK+vrUEarQ49UYv /EqfShmKldMpe1qYBSmtdpHJRTStBv5vkzlvRRRKIeb1Oz+gx11Fu+574Q/Miw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RO+rdvGG+lgltzWO72pc/DdxbtPoqWZ0XQhmocN2OMk=; b=jZG590JZLujwtu9QioME/jd1+Ns+1C4aIDzcL3Zwgt2ElkUQo8GvmvWodmxrANqvsGMQ3a OXtB95/qoS+2sWM/RKEZ98HtyWfMXYKznzfYriOCeDQnDX7Jpa+XDzyOeOaaL9x4A4ip2h Yis8HHAUa0iE/B4BmUw3pAg9QFPWJnQ1SCr7QO6faFUUDRkGgcMBA8vtziJcHaKVwTsA7K czmmBqXyVAzkc4OEtNx1KTf2hWwrvAJNIqQdegSg2IG1/OTroI21+3f2gHfHtk+QK+OiNC RiUQ12FYv8yiVTxRq1FhfTUGPw6eA6fFxTSMORIlT9uyh7uUADNkdknI/ymhVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886388; a=rsa-sha256; cv=none; b=dXph8VDan3Yl3QJx6zRAocH63w2Ekl8UKgojVfTzEmDO5boIdds0lerwSY+3umS0U+VU2U yVzl3DiFQH55GwDRkzQid5vVxizZSgxHlSZW2F0hJskvfCe5I86pK4y6dK80KGftihDMsk ZFyeVxjiFTUfEp2YREpSoCTvcAB6/J/toRzY+RQYs4+5W4t/UMUkjXczTIT96/LuYwcCC6 3miODRRWiNV/rVkPdWXedGU7R9N/uZ5VBDDVTvhIxwBHJveYQz6648zU8CpQK4Roaqc6Rl CFOEHotdLfvW1agzdt8VPyV4qgzyCwDyWnBAUk8q1d6DO1TKUKMP3E8k+bZb1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKb6ml5z11FC; Tue, 27 Jun 2023 17:19:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJl8A006962; Tue, 27 Jun 2023 17:19:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJlqG006961; Tue, 27 Jun 2023 17:19:47 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:47 GMT Message-Id: <202306271719.35RHJlqG006961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: eca9714e4bf2 - main - libbsnmptools: Fully comment out set but unused count 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eca9714e4bf299cd704eb9e28a06a97d1bb1c301 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eca9714e4bf299cd704eb9e28a06a97d1bb1c301 commit eca9714e4bf299cd704eb9e28a06a97d1bb1c301 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 libbsnmptools: Fully comment out set but unused count variable. These functions all end with 'return (2/* count */);'. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40670 --- usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c index 9dc2f890ac7f..219be6f7209b 100644 --- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c +++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c @@ -483,7 +483,7 @@ parse_ascii(char *ascii, uint8_t *binstr, size_t binlen) int32_t parse_authentication(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) { - int32_t count, subopt; + int32_t /* count, */ subopt; char *val, *option; const char *const subopts[] = { "proto", @@ -492,7 +492,7 @@ parse_authentication(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) }; assert(opt_arg != NULL); - count = 1; + /* count = 1; */ while ((subopt = getsubopt1(&opt_arg, subopts, &val, &option)) != EOF) { switch (subopt) { case 0: @@ -530,7 +530,7 @@ parse_authentication(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) warnx("Unknown suboption - '%s'", suboptarg); return (-1); } - count += 1; + /* count += 1; */ } return (2/* count */); } @@ -538,7 +538,7 @@ parse_authentication(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) int32_t parse_privacy(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) { - int32_t count, subopt; + int32_t /* count, */ subopt; char *val, *option; const char *const subopts[] = { "proto", @@ -547,7 +547,7 @@ parse_privacy(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) }; assert(opt_arg != NULL); - count = 1; + /* count = 1; */ while ((subopt = getsubopt1(&opt_arg, subopts, &val, &option)) != EOF) { switch (subopt) { case 0: @@ -583,7 +583,7 @@ parse_privacy(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) warnx("Unknown suboption - '%s'", suboptarg); return (-1); } - count += 1; + /* count += 1; */ } return (2/* count */); } @@ -591,7 +591,7 @@ parse_privacy(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) int32_t parse_context(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) { - int32_t count, subopt; + int32_t /* count, */ subopt; char *val, *option; const char *const subopts[] = { "context", @@ -600,7 +600,7 @@ parse_context(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) }; assert(opt_arg != NULL); - count = 1; + /* count = 1; */ while ((subopt = getsubopt1(&opt_arg, subopts, &val, &option)) != EOF) { switch (subopt) { case 0: @@ -625,7 +625,7 @@ parse_context(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) warnx("Unknown suboption - '%s'", suboptarg); return (-1); } - count += 1; + /* count += 1; */ } return (2/* count */); } @@ -633,7 +633,7 @@ parse_context(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) int32_t parse_user_security(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) { - int32_t count, subopt, saved_errno; + int32_t /* count, */ subopt, saved_errno; char *val, *option; const char *const subopts[] = { "engine", @@ -644,7 +644,7 @@ parse_user_security(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) }; assert(opt_arg != NULL); - count = 1; + /* count = 1; */ while ((subopt = getsubopt1(&opt_arg, subopts, &val, &option)) != EOF) { switch (subopt) { case 0: @@ -697,7 +697,7 @@ parse_user_security(struct snmp_toolinfo *snmptoolctx __unused, char *opt_arg) warnx("Unknown suboption - '%s'", suboptarg); return (-1); } - count += 1; + /* count += 1; */ } return (2/* count */); } From nobody Tue Jun 27 17:19: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 4QrBKd3211z4f4VW; Tue, 27 Jun 2023 17:19: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 4QrBKd24vxz3Nnc; Tue, 27 Jun 2023 17:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hCSGudppe/ZsVZsfOusczL1i3Xj76PODWWTnVNPcABM=; b=W+ALAZxqOZzTFvjNSdCRXf6VDkaTLbRNizugVPt4mRUO9kNi6l1afSj/BAf1ky+Re1HjBr dAboCRxNgqvtHx551hRPuTlhEJQ9jjyyW4rwRpI+YsGGMHdjHKnu6ZDarN56QZ2p3PLJxb bXexnaItGbcQ38epcYnSs9PSrPlhIrdJZjQuiIdEk934G/BX10g+3XhZ+D+KJVkyZgwb/K p2cqULrYB89U5/+tTMcCe1EbzXIOS4FpA9KvVUk6u4wOC7A3y3fdCy6ZTOUwIcLswoWBZF in4aNPBVeb4xi9pJQ+fBtZDs8mH2RHBgbsg20+yUacnYSwDx6jfB/DXAkUDExg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hCSGudppe/ZsVZsfOusczL1i3Xj76PODWWTnVNPcABM=; b=bXSMNlI0Mw+AoX6kZmgblwWHLjOaFwGrQfTNry6sXF1OmNpBhKVzHAAZFS89ZHKqQ+PxIc mcDiGKwzofwryA1OxgcvyZPXRMO76oIFYul7j9n2BpsR7kPC0I6+AvKrBzT1YtgxQoiRBu geH8J3q6owvjLSzGjQZHQ1LnCC0GjzRv4Pi5xZ9bsjTqlVfnbB3e0nQqdwrX4EzKxNmKCC HSwwp9MDN7eQllbOAqhmbK6C56YUMZ0gQQYm5ziuC94zNhn9XO/R/6Cn7zm+fgLRKwFINB 3mCXAuah1mLh1HMKVgwuY/l9fIkAR9se2YFqN/Rs3JO7xrOGv7f6ecr3vRz6XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886389; a=rsa-sha256; cv=none; b=HGU3p1KL1uB9hlm65dsU27OQfL0i6aMilOMXXAuoo1UM8IhCdJSCkywwwfR4f21wX05KFm sFMtiI++Sx5ApJ3pZNeFtxwma3PtydYjTqnIsIivTlFSDXWghpiW+ihdDfYH6HQC+tM7RT YXNvjIzBXaHVUqLMHQa+8U7G5Nmbn/bjC9BwdWuZIJxb2dvs8kBloG31tLVMdT64aCK/M8 6xV4wQrdnRu41bGBjGkGdfLngdc8djtiklYWxk9ygCJTDTfleN2YvF+9TZsM8qwcl1EiR3 OktGIGrEF1+7xeiEeXxQJ3MpqlmGRNKC3clHU3MCJYNuJi9Mt0pp05gK5k0vkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKd0kP2z11JK; Tue, 27 Jun 2023 17:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJnLa006988; Tue, 27 Jun 2023 17:19:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJmbJ006987; Tue, 27 Jun 2023 17:19:48 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:48 GMT Message-Id: <202306271719.35RHJmbJ006987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b9f56cabeda4 - main - efi loader: Move 'module' variable under #ifdef MODINFOMD_MODULEP. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9f56cabeda4c05c8dec1dd0315ccea45f5739da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b9f56cabeda4c05c8dec1dd0315ccea45f5739da commit b9f56cabeda4c05c8dec1dd0315ccea45f5739da Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 efi loader: Move 'module' variable under #ifdef MODINFOMD_MODULEP. This quiets a set but unused warning on platforms without this module info such as aarch64. Differential Revision: https://reviews.freebsd.org/D40672 --- stand/efi/loader/bootinfo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index d79f59343af1..6dad3868b840 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -334,7 +334,10 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) struct devdesc *rootdev; struct file_metadata *md; vm_offset_t addr; - uint64_t kernend, module; + uint64_t kernend; +#ifdef MODINFOMD_MODULEP + uint64_t module; +#endif uint64_t envp; vm_offset_t size; char *rootdevname; @@ -415,7 +418,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) kernend = 0; /* fill it in later */ /* Figure out the size and location of the metadata. */ - module = *modulep = addr; + *modulep = addr; file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof(howto), &howto); file_addmetadata(kfp, MODINFOMD_ENVP, sizeof(envp), &envp); @@ -428,6 +431,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) #endif file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof(kernend), &kernend); #ifdef MODINFOMD_MODULEP + module = *modulep; file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof(module), &module); #endif #ifdef EFI From nobody Tue Jun 27 17:19: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 4QrBKf3Y2Zz4f4fs; Tue, 27 Jun 2023 17:19: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 4QrBKf31g3z3Np2; Tue, 27 Jun 2023 17:19:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtXIqjWeQjY1ReeOyFSxdkLB2V6DnIj5J8GOmiMJzd8=; b=ba9ArSM9TvsF50TpM6EhpnonP7g3GySYRnhoP2mh76ZzxhglWyDuUE5RrB3BU1HrtWFDei wmYzKaMUzwaxMIEYxMMIux7e95cSC7n+L3+97XHGsw1erOsY47kX8fY7PiEPSmyT3BvV+S BY/JCMjg3llwPoI0b3pyNryAw37j9bfS5jfJTBtMSaSRMxJnFntkWfx9BixphD/R58hiUl YWDrmybfyuLBpbOb6BoVITNA0ZkxhdKHLvtp6EY6iZ0ZJv6CwdJEuS7QLK0K8LE1R1iV4d YX3twKNSpbsf/W7WSMmTuHGcmCU52J2OrjGCqu/lOHJsq9kCVGjxn/K4hLGSRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtXIqjWeQjY1ReeOyFSxdkLB2V6DnIj5J8GOmiMJzd8=; b=x4dM+UtKM/fLofCn3xHcnC3LndzjQXPDPtRGkhPbzmxcGpoJ5v6W7jJY2d49G5Zq6Zk+/i R3Jxhw0qS2Gqka9I552tyBAQ3swAxXy0nuAgrW/YNUrwK/kLWgUA8XJLcjsL5Fm7w133R7 WcYChuJlzNy0HHlA1RKgbj+ttOQx8aimC40MgbGNyg9TKi6T81Ppku3OX3+EJBbcWdhgrx QzQu5oiew+RFfM6KCnWqUaqVGYswinGZm+nz3LchLsG2wI2idS5OiNsQf5O/RGtG6ne+8d BTeZFoCYkSpP2LPBI35tjXVC4sjofu165L7ZPA0VwhaSnaaRVaC4D4NQOLITfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886390; a=rsa-sha256; cv=none; b=tqx7vKWLwdWpm0y1VoCxsXgYzDa2qnKvLdu1gTQv7wpT9dWaG2xlE0Gmz2U9Ni0f3umi6j to1nuPaGbYst/ciGEWJr3R+6wSyVfDDrYUezHA5uZMbDGNSMPZ253XSywsJcKpv51r0shV mbhuNbUy+/HEbNR7DqnwKlpjpa04iy8txOurGocTdEF1Zfd6nGt9M8dh0iAI3stMrm7mNx gSOkAjBorQnwYRxAQotHMQ3qpgf2S1+JG/0Mk+uxGE66MWjh3o4GndlL9/PEXDSPWPqlHP EtJhizwXZV5jJEHHbc4sYLHEMuJZEe+WK+sSAFIpa1rxX8r1s0kwRCEZC711zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKf1pz9z111g; Tue, 27 Jun 2023 17:19:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJoV3007007; Tue, 27 Jun 2023 17:19:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJo1P007006; Tue, 27 Jun 2023 17:19:50 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:50 GMT Message-Id: <202306271719.35RHJo1P007006@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 2e1665ff3454 - main - ldns: Remove a set but unused 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e1665ff345498c3f99ffd07b6e90669172d2df2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2e1665ff345498c3f99ffd07b6e90669172d2df2 commit 2e1665ff345498c3f99ffd07b6e90669172d2df2 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 ldns: Remove a set but unused variable. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D40695 --- contrib/ldns/wire2host.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/contrib/ldns/wire2host.c b/contrib/ldns/wire2host.c index 63b67a0d1713..91d3f1364d75 100644 --- a/contrib/ldns/wire2host.c +++ b/contrib/ldns/wire2host.c @@ -59,7 +59,6 @@ ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire, size_t max, size_t *pos) uint16_t pointer_target; uint8_t pointer_target_buf[2]; size_t dname_pos = 0; - size_t uncompressed_length = 0; size_t compression_pos = 0; uint8_t tmp_dname[LDNS_MAX_DOMAINLEN]; unsigned int pointer_count = 0; @@ -120,7 +119,6 @@ ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire, size_t max, size_t *pos) return LDNS_STATUS_DOMAINNAME_OVERFLOW; } memcpy(&tmp_dname[dname_pos], &wire[*pos], label_size); - uncompressed_length += label_size + 1; dname_pos += label_size; *pos = *pos + label_size; From nobody Tue Jun 27 17:22: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 4QrBNB5kYLz4f69V; Tue, 27 Jun 2023 17:22: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 4QrBNB5GNVz3jDf; Tue, 27 Jun 2023 17:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wCWZUZojmppVkA+ig4+9/BTwMrWNA3ie//Me12AXY5U=; b=RFU9b7vfFpd4jzRGUBYMUgWVsBUSzYFy9wqGnln05rL3/BGONoLICtRSzaWaCfFiHUJfNU A0wZNs/A8CBsH1Sy0W848Aw6Ygme1C12ZLzHvWmL3gFY8W0ZaSJUXJpcLWoOhvfHsJLyXo oeAs/4dsuaZu+NBvEEFNxJlgN4psxzLJU8zPfSv8XAVCBni41p6Visq1Wpw05x7EloJxfE Bsfq9xa3YP04NkRior9yc93iNUPJvdLFC2gdWNyXBndkQIY84MXbynLwiPxwma8hYf8MED BUhutjbHIJYxLBcrQLsvRZXhPqP2axj/hxN9piWIIcsyUCp3QWHCMFWN5/6B9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wCWZUZojmppVkA+ig4+9/BTwMrWNA3ie//Me12AXY5U=; b=eKKsDQWI9G+70/71AkktprhISz0gDsDtKUgB78q/JEt5jd+YsWqIgi8qA8b0YeofQns+bC WPkLIsYKHhvui8kRxAgOUXf88mjGmQvMYB6sGsXgG2yb1utWOkctfxxN2QKQ+oRl+OFRb6 AnwHaksczCUdNeTEgazs3z36sKvGayE6rkElZxneX1Fn+UUOGRq8jshHhC0FdEqrmOnmUI rSkohP8KLXSTMMx2exjWsqUVjPla/R7G+Hq0MlfSAsYEHJArVlYE7YxIbijLhiriFt8xIC D7YvuqaKoSZHg6aBC8jQBgZiawaydXnkugZBH8T1/+Lkr9KIojOI0phg4JKPUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886522; a=rsa-sha256; cv=none; b=C8wQg/SzgUZAwXdf9RLEO/d2t+GlQuKbWwkA7nB/H4RRrqZxRF0A1nCBdBhWz3DX6X7Cya nCcPy5cy74qm5/qxg7cf1xv9ZtMW6gEFGhDo6N3Mhr45KFc4xJjWQ1cmR251H5SMByFnf0 dIzsLz73dpHK7neqFGBBWclB3QV+CIFuO6cNEWKyodx8EVocRvtCiG+K9spMUKdHDIvagG qU7/aU7xKEeZW0n+xThql98+zpoVoMP2d/rws9WQFUKxVktMm/w3tm/vu8lwKPfJp8Q6K7 +RYnkIkA0r8UlFpJbtUMBt0Ong+UDePKW8nj1TMKrrHNEYUoG/Xlb3Zg+JWe1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBNB4LvMz10nH; Tue, 27 Jun 2023 17:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHM26l021153; Tue, 27 Jun 2023 17:22:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHM2bv021152; Tue, 27 Jun 2023 17:22:02 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:22:02 GMT Message-Id: <202306271722.35RHM2bv021152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 372f51eaf363 - stable/12 - Merge upstream r948: fix race condition in openpam_ttyconv(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: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 372f51eaf3638036eddeac6710afa00d6582bea4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=372f51eaf3638036eddeac6710afa00d6582bea4 commit 372f51eaf3638036eddeac6710afa00d6582bea4 Author: Dag-Erling Smørgrav AuthorDate: 2020-11-19 05:46:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-27 17:21:25 +0000 Merge upstream r948: fix race condition in openpam_ttyconv(3). (cherry picked from commit a90c7d9aa82430454b3194d6750e0c0c748ac6dc) --- contrib/openpam/CREDITS | 1 + contrib/openpam/lib/libpam/openpam_ttyconv.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/contrib/openpam/CREDITS b/contrib/openpam/CREDITS index b40c9d3b4826..a560f9e12c1f 100644 --- a/contrib/openpam/CREDITS +++ b/contrib/openpam/CREDITS @@ -18,6 +18,7 @@ ideas: Ankita Pal Baptiste Daroussin Brian Fundakowski Feldman + Brooks Davis Christos Zoulas Daniel Richard G. Darren J. Moffat diff --git a/contrib/openpam/lib/libpam/openpam_ttyconv.c b/contrib/openpam/lib/libpam/openpam_ttyconv.c index 8066b3b67298..1a50f1c99639 100644 --- a/contrib/openpam/lib/libpam/openpam_ttyconv.c +++ b/contrib/openpam/lib/libpam/openpam_ttyconv.c @@ -94,12 +94,6 @@ prompt_tty(int ifd, int ofd, const char *message, char *response, int echo) int pos, ret; char ch; - /* write prompt */ - if (write(ofd, message, strlen(message)) < 0) { - openpam_log(PAM_LOG_ERROR, "write(): %m"); - return (-1); - } - /* turn echo off if requested */ slflag = 0; /* prevent bogus uninitialized variable warning */ if (!echo) { @@ -115,6 +109,12 @@ prompt_tty(int ifd, int ofd, const char *message, char *response, int echo) } } + /* write prompt */ + if (write(ofd, message, strlen(message)) < 0) { + openpam_log(PAM_LOG_ERROR, "write(): %m"); + return (-1); + } + /* install signal handlers */ caught_signal = 0; action.sa_handler = &catch_signal; From nobody Tue Jun 27 17:22: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 4QrBNm0pswz4f6JF; Tue, 27 Jun 2023 17:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrBNm0JHtz3jyj; Tue, 27 Jun 2023 17:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U8R8s+FsxLSy55NGmRA22UdXzSFFPzNJGdE0cDTFVrM=; b=b7m6gjZBnE8Xbvt9pW98XdiCPfA4DdJBT4Shz9yy+ywoyBgCvv08E4RLfvcJtsLEB6eSzx +nWygZ6rucG+rhC/4VAFVEfKt17Ouxn2mdfrwEau9O9/ovVwJ2Z5tJ9pFGI6lBD7dKhuet iOeVvg5avQnjkTMTU7n03E1bMk8ILxQLDBqITIdYe6X54O4SxwsuLuF7TIymQRvARluAzd FoKqXj+HpAFcaQ8+z0F3mct/XjaARmPovwarSJeHPtOSfTqK+cDTOJjRsrD+2pVgvKTMUE 89+Y1Ekp7t7CvstDDrLXjEJHwDw0rhmRMz+6vt3NBsxRllhtgCKIs9vasaZSxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U8R8s+FsxLSy55NGmRA22UdXzSFFPzNJGdE0cDTFVrM=; b=LjNvaxin9Cf+NJK7KJayh62OB2ouIoZxbb+pjzarhLSqJPrlWj+YrJul3TWRcqFsgrCLFp NtNGJUADklxtyTy3R1cmW76kYrGkN3BQ57UVUtXyRdx97W9FGJjWIXfJTqGkZH1h8qR/6S Z8UfJFluozHW4R1aXX6yTw+JQ6wHVwgQzheqApCfw8cpxerdK+dap6r7p6H6gg9neP7DQ4 i7JKj/d0t+SNz3WGyZx9B1agxlmTAk0zdyKm5WYLwlpk7lzwSgWb8m8gNNHMvc6RMPeOkc RDYMa7lfMHH88C0Okz3tk9QLbWykbhax78sieaORF74+bnX4ybGCKjQLkkdb8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886552; a=rsa-sha256; cv=none; b=EsP/9+VI4lZIUTmYgCGXnZaauZfThh5R8jy97XK/w/cz5GZf5aJqKH3oeAv5hkL9BYjk08 S1DsqE0Opn6PwjiJaTgfwoGBFqsiQN6bmi1WopHVQ9ozGVc99v/KpUZo4CA5Ve0S45TxJW PuDi9TH34KzaJCAUQkB2sHiMBe/WgzXtjc6VUmziEC7cOPYuTueUe0m15OXfOGUJODL5xJ oS7/I4l0CwjYnF+JIw+VcgSG2+rj2X7QinTmIXAqXxVmTA6FK8l1aHggQU5Z/D/OSa3Ttx H6l6fvbvCALK/jSRKVjTStaIJ//1AfZ37BHLiC0PLdljQNsJoi0QUQzyi1k7mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBNl6TGfz11MJ; Tue, 27 Jun 2023 17:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHMV8N022208; Tue, 27 Jun 2023 17:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHMVT6022207; Tue, 27 Jun 2023 17:22:31 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:22:31 GMT Message-Id: <202306271722.35RHMVT6022207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: da72505f9c6a - main - radix_trie: pass fewer params to node_get List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da72505f9c6a95009ef710fb1c2b4f2c63cce509 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=da72505f9c6a95009ef710fb1c2b4f2c63cce509 commit da72505f9c6a95009ef710fb1c2b4f2c63cce509 Author: Doug Moore AuthorDate: 2023-06-27 17:21:11 +0000 Commit: Doug Moore CommitDate: 2023-06-27 17:21:11 +0000 radix_trie: pass fewer params to node_get Let node_get calculate it's own owner value. Don't pass the count parameter, since it's always 2. Save 16 bytes in insert(). Move, without modifying, slot and trimkey to handle use-before-declaration problem. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40723 --- sys/kern/subr_pctrie.c | 47 ++++++++++++++++++++++------------------------- sys/vm/vm_radix.c | 44 +++++++++++++++++++++----------------------- 2 files changed, 43 insertions(+), 48 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index b5dee2163a40..0f28e5ebb2f1 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -92,13 +92,29 @@ enum pctrie_access { PCTRIE_SMR, PCTRIE_LOCKED, PCTRIE_UNSERIALIZED }; static __inline void pctrie_node_store(smr_pctnode_t *p, void *val, enum pctrie_access access); +/* + * Return the position in the array for a given level. + */ +static __inline int +pctrie_slot(uint64_t index, uint16_t level) +{ + return ((index >> (level * PCTRIE_WIDTH)) & PCTRIE_MASK); +} + +/* Computes the key (index) with the low-order 'level' radix-digits zeroed. */ +static __inline uint64_t +pctrie_trimkey(uint64_t index, uint16_t level) +{ + return (index & -PCTRIE_UNITLEVEL(level)); +} + /* * Allocate a node. Pre-allocation should ensure that the request * will always be satisfied. */ static struct pctrie_node * -pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t owner, - uint16_t count, uint16_t clevel) +pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t index, + uint16_t clevel) { struct pctrie_node *node; @@ -116,8 +132,8 @@ pctrie_node_get(struct pctrie *ptree, pctrie_alloc_t allocfn, uint64_t owner, PCTRIE_UNSERIALIZED); node->pn_last = 0; } - node->pn_owner = owner; - node->pn_count = count; + node->pn_owner = pctrie_trimkey(index, clevel + 1); + node->pn_count = 2; node->pn_clev = clevel; return (node); } @@ -146,23 +162,6 @@ pctrie_node_put(struct pctrie *ptree, struct pctrie_node *node, freefn(ptree, node); } -/* - * Return the position in the array for a given level. - */ -static __inline int -pctrie_slot(uint64_t index, uint16_t level) -{ - - return ((index >> (level * PCTRIE_WIDTH)) & PCTRIE_MASK); -} - -/* Computes the key (index) with the low-order 'level' radix-digits zeroed. */ -static __inline uint64_t -pctrie_trimkey(uint64_t index, uint16_t level) -{ - return (index & -PCTRIE_UNITLEVEL(level)); -} - /* * Fetch a node pointer from a slot. */ @@ -376,8 +375,7 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) panic("%s: key %jx is already present", __func__, (uintmax_t)index); clev = pctrie_keydiff(*m, index); - tmp = pctrie_node_get(ptree, allocfn, - pctrie_trimkey(index, clev + 1), 2, clev); + tmp = pctrie_node_get(ptree, allocfn, index, clev); if (tmp == NULL) return (ENOMEM); /* These writes are not yet visible due to ordering. */ @@ -408,8 +406,7 @@ pctrie_insert(struct pctrie *ptree, uint64_t *val, pctrie_alloc_t allocfn) */ newind = node->pn_owner; clev = pctrie_keydiff(newind, index); - tmp = pctrie_node_get(ptree, allocfn, - pctrie_trimkey(index, clev + 1), 2, clev); + tmp = pctrie_node_get(ptree, allocfn, index, clev); if (tmp == NULL) return (ENOMEM); slot = pctrie_slot(newind, clev); diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c index a34de9e6ff92..b3d0d92f9969 100644 --- a/sys/vm/vm_radix.c +++ b/sys/vm/vm_radix.c @@ -119,11 +119,27 @@ static smr_t vm_radix_smr; static void vm_radix_node_store(smrnode_t *p, struct vm_radix_node *v, enum vm_radix_access access); +/* + * Return the position in the array for a given level. + */ +static __inline int +vm_radix_slot(vm_pindex_t index, uint16_t level) +{ + return ((index >> (level * VM_RADIX_WIDTH)) & VM_RADIX_MASK); +} + +/* Computes the key (index) with the low-order 'level' radix-digits zeroed. */ +static __inline vm_pindex_t +vm_radix_trimkey(vm_pindex_t index, uint16_t level) +{ + return (index & -VM_RADIX_UNITLEVEL(level)); +} + /* * Allocate a radix node. */ static struct vm_radix_node * -vm_radix_node_get(vm_pindex_t owner, uint16_t count, uint16_t clevel) +vm_radix_node_get(vm_pindex_t index, uint16_t clevel) { struct vm_radix_node *rnode; @@ -141,8 +157,8 @@ vm_radix_node_get(vm_pindex_t owner, uint16_t count, uint16_t clevel) NULL, UNSERIALIZED); rnode->rn_last = 0; } - rnode->rn_owner = owner; - rnode->rn_count = count; + rnode->rn_owner = vm_radix_trimkey(index, clevel + 1); + rnode->rn_count = 2; rnode->rn_clev = clevel; return (rnode); } @@ -171,23 +187,6 @@ vm_radix_node_put(struct vm_radix_node *rnode, int8_t last) uma_zfree_smr(vm_radix_node_zone, rnode); } -/* - * Return the position in the array for a given level. - */ -static __inline int -vm_radix_slot(vm_pindex_t index, uint16_t level) -{ - - return ((index >> (level * VM_RADIX_WIDTH)) & VM_RADIX_MASK); -} - -/* Computes the key (index) with the low-order 'level' radix-digits zeroed. */ -static __inline vm_pindex_t -vm_radix_trimkey(vm_pindex_t index, uint16_t level) -{ - return (index & -VM_RADIX_UNITLEVEL(level)); -} - /* * Fetch a node pointer from a slot in another node. */ @@ -416,8 +415,7 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) panic("%s: key %jx is already present", __func__, (uintmax_t)index); clev = vm_radix_keydiff(m->pindex, index); - tmp = vm_radix_node_get(vm_radix_trimkey(index, - clev + 1), 2, clev); + tmp = vm_radix_node_get(index, clev); if (tmp == NULL) return (ENOMEM); /* These writes are not yet visible due to ordering. */ @@ -447,7 +445,7 @@ vm_radix_insert(struct vm_radix *rtree, vm_page_t page) */ newind = rnode->rn_owner; clev = vm_radix_keydiff(newind, index); - tmp = vm_radix_node_get(vm_radix_trimkey(index, clev + 1), 2, clev); + tmp = vm_radix_node_get(index, clev); if (tmp == NULL) return (ENOMEM); slot = vm_radix_slot(newind, clev); From nobody Tue Jun 27 17:29: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 4QrBXG3Qn1z4gC9k; Tue, 27 Jun 2023 17:29:02 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 4QrBXG2xS4z3lxk; Tue, 27 Jun 2023 17:29:02 +0000 (UTC) (envelope-from pstef@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886942; 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=EI0oq3E4MuOSEdhtVkkgjiWtHYBZLqC9xuUKrR5LgZw=; b=A+sKTY5B34Y8iHoW/FAzB18Zb9Dly91BQeIPi5cOgqnF3qxL9yOlJfMQyyDJefAP25b49y tDxBIDZ4myYu+5fjvSNXEko0Jxb9RTkj2i3qhcGrRnAvOY+8eQyybXi9EaRdVTDs89FDZ8 iIajNNIKcr5fP/aiW0ox8i0O4P12b7igVm+gkfoviqYwHrUEMfN3o5ABlFW8hbiFexCgKa P257uTHlvHLrjx/Np32hZ29dLRlMdfZokTRYHucNHTIOex48i+JUmjcHphtdQIdoCAdl2/ 8bB14P5PqzafE7hjPh7CXGV+01UNK7D/X60R9HCQGnpWQgd28he4OODyHmWq8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886942; 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=EI0oq3E4MuOSEdhtVkkgjiWtHYBZLqC9xuUKrR5LgZw=; b=ojYdZmgAGzPxaCnjMtT3i1P/GqNKEwwlrPXnDKRikN5FPfYVarUJadTHhHFGlrP3Ucq/DO YdKVbRWSYq27KuBhdZr9CCaE1muoYb70mlEJO846eX8GZN9V2tfdCgZhmmFkUfg72w4s2n TQuOrTl1tpbF0fpiq32WvX1vk4mpcnO8I84WIsVqCVGmAfEE817vdnxPU2BevgpCYf11Yq Rp5UMS9KEuKaC17fHapAF49tziv1I2iAQuDhF/L/VXjJeA+dBWC6lLrgwm6vYQLaQW7gI5 /rtuCuGsR6Y2/B0rXwhRhmpjXdh88YEMca5onoPUYGUqGNjJsRHOBhpo2r56nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886942; a=rsa-sha256; cv=none; b=FighXisyGhkaiMLLVI3amayEXoQzNh5XJgUxeiQh9VLaQjEtEaZCPdyssU9vkQVXHhLTET h9NWzOPwXr9TVincrlqi7hRbC5s2OEP6kT+k1cFwVkB5LnTsM4sI2cenTEEc1sEJDeotKT km8I4ZlWj4PHCHSaHZBdMcoE6km5juzQHPBIfq/SrMsT3+phBaLVxAY27e2XUdyS323Te+ 9c3BfPC/XHsjWgg2jQ+tTwWx0t1Jj6q71gRVJe2FCYMHAaw/7RlYEXdQMPcZ8npWIGr2xG C6mkyOtlSuFBujn5x+atrN4vMUDADK752VCWN8K82qAyRPnxfXz3Gv1iji3OUQ== Received: by freefall.freebsd.org (Postfix, from userid 1403) id 5164324617; Tue, 27 Jun 2023 17:29:02 +0000 (UTC) Date: Tue, 27 Jun 2023 17:29:02 +0000 From: "Piotr P. Stefaniak" To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1e80d4b18897 - main - xo: Disable -Wunused-but-set-variable. Message-ID: References: <202306271719.35RHJkSp006942@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: <202306271719.35RHJkSp006942@gitrepo.freebsd.org> X-ThisMailContainsUnwantedMimeParts: N On 2023-06-27 17:19:46, John Baldwin wrote: > xo: Disable -Wunused-but-set-variable. > > Presumably these warnings will be fixed upstream at some point. https://github.com/Juniper/libxo/issues/85 Piotr From nobody Tue Jun 27 18:36: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 4QrD1m53jCz4kGlP; Tue, 27 Jun 2023 18:36: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 4QrD1m4Y2dz4LMH; Tue, 27 Jun 2023 18:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687890972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Y3SvWb9jXON/TycimGNSu5hEjgW3+J3YLM12kaaf6k=; b=hZ6XHMDD/jKAUeKUZP236G1ox4YKb2kiSoevn9Nx1umevxAxUVJ6nisea0UAh7T7OtSDEu 8zgDtFjDpCldcb5Bjz9qfN0a+1AtfPdslSOqbnstpB00TfFKKLzFaUX8qVjEGDXMmUYyNm THmG4TTD9Epi5w/eMVDRRj+qaIipSALL2WmnRGshYjGidOg/cIRnZZq7vajW0GdJNfOFyU GiKi2fZhnbLYDDg/jGF8OhcjVrZ+82yxol9XdTEO8vWsC9hEGYQXeRhuZX/extCae7xMOM +oHkgrkzqXIDZ5oIzMNh0n0OQZXkZguCBjn+XEDs/5BZjUvgOFce5SFpexUZUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687890972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Y3SvWb9jXON/TycimGNSu5hEjgW3+J3YLM12kaaf6k=; b=tWj/+WC4wtgjYOaywrwEWYhwy97+qvrcTjNqRimevAYUHgd2DsQD+PHYjz6JiZTueicgvI ImmQ5fab1Kg48SRwRs70C9jaEDYFAsrQ2E75s6dOqxvntL6dN1lG0YW8Yh1fIRV3idIU2K ijqVIbB0WnU6X9FnFkXDXnmqFysVycK+eCU8MstpETvR783rOIbO1I+c9G/QFGcH5Yj9mT D3qdeMmKWFNfnquGgyXDWeL2QTY/AX1D3VwR/pLC7ihX1qA4yKFGgaEfL13WjaY7gkM5LH Rx3weCwkoIzENhECgzOV3cLjp1eGaBNR0AdrwO/A9+GRZ0BZYg5vUqQg3tGzQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687890972; a=rsa-sha256; cv=none; b=Py+cm1mJSAZtA2xv6tPiUT4IhBvjDMH3+3QfVYHd3ZLr4DGklw+wjva94Cy3vlFXB7VCdr UcZsidxMb2TS96JbYPgcgA4kJ+UvyL0WxEK0UMcfMnaSl6eC8iFI4nmbOdBOD/B4UeAx0b tVJHlBJi3LEa7oiMyVqnc5GO5WClolNIyXW/Jh81hlrX0MB9zH/yuWkM0ZE4entwelLOSE c5KsuHY64eLYjqIynb2TQY4Sax/2xjMamtvT0VrpFfYgpxh7l16MPW3c56Y8rEP7jNrPEd 9uQLlXOTg/EOM7ryFZT8ey6OZw/PR6XFZRBHFYrxwqi1jokjot04/wrbuFEomQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrD1m3fm5z12xK; Tue, 27 Jun 2023 18:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RIaCjF038597; Tue, 27 Jun 2023 18:36:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RIaCdm038596; Tue, 27 Jun 2023 18:36:12 GMT (envelope-from git) Date: Tue, 27 Jun 2023 18:36:12 GMT Message-Id: <202306271836.35RIaCdm038596@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: e36b028933b7 - main - systat: Chase 70ea484e3ec5, removing vdev_cache List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: e36b028933b72c1ad13144f32ff111b6d52f42df Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e36b028933b72c1ad13144f32ff111b6d52f42df commit e36b028933b72c1ad13144f32ff111b6d52f42df Author: Cy Schubert AuthorDate: 2023-06-23 05:01:25 +0000 Commit: Cy Schubert CommitDate: 2023-06-27 18:34:29 +0000 systat: Chase 70ea484e3ec5, removing vdev_cache As of 70ea484e3ec5 vdev_cache has been removed. Stop reporting on it. Without this systat reports: sysctl(kstat.zfs.misc.vdev_cache_stats.misses...) failed: No such file or directory Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D40742 --- usr.bin/systat/zarc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/usr.bin/systat/zarc.c b/usr.bin/systat/zarc.c index 8eb3849a9172..abc5336a6cf7 100644 --- a/usr.bin/systat/zarc.c +++ b/usr.bin/systat/zarc.c @@ -48,7 +48,6 @@ struct zfield { uint64_t arcstats_prefetch_metadata; uint64_t zfetchstats; uint64_t arcstats_l2; - uint64_t vdev_cache_stats; }; static struct zarcstats { @@ -99,7 +98,6 @@ labelzarc(void) L(arcstats.prefetch_metadata); L(zfetchstats); L(arcstats.l2); - L(vdev_cache_stats); #undef L dslabel(12, 0, 18); } @@ -128,7 +126,6 @@ domode(struct zarcstats *delta, struct zarcrates *rate) DO(arcstats_prefetch_metadata); DO(zfetchstats); DO(arcstats_l2); - DO(vdev_cache_stats); DO(arcstats); DO(arcstats_demand_data); DO(arcstats_demand_metadata); @@ -136,7 +133,6 @@ domode(struct zarcstats *delta, struct zarcrates *rate) DO(arcstats_prefetch_metadata); DO(zfetchstats); DO(arcstats_l2); - DO(vdev_cache_stats); #undef DO } @@ -165,7 +161,6 @@ showzarc(void) E(arcstats_prefetch_metadata); E(zfetchstats); E(arcstats_l2); - E(vdev_cache_stats); #undef DO #undef E #undef MISSES @@ -233,10 +228,6 @@ getinfo(struct zarcstats *ls) ls->hits.arcstats_l2); GETSYSCTL("kstat.zfs.misc.arcstats.l2_misses", ls->misses.arcstats_l2); - GETSYSCTL("kstat.zfs.misc.vdev_cache_stats.hits", - ls->hits.vdev_cache_stats); - GETSYSCTL("kstat.zfs.misc.vdev_cache_stats.misses", - ls->misses.vdev_cache_stats); } void From nobody Tue Jun 27 19:32: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 4QrFGN26Lyz4k7md; Tue, 27 Jun 2023 19:32: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 4QrFGN1gcCz3mmP; Tue, 27 Jun 2023 19:32:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687894332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjJ6hFvyzVMwFtfIYuF6G2tjel9lZhHnVNGpcQvELsQ=; b=sP2Ww5bm7m6NAxXbhYXq47/Gqjdc0dh4Jy2oyH6a7WIJfBKLkVMkU84DLV/UjhGVOu2BRi ZyhZQytVEteRwDf2NSJb9JMdy4BJMv82t5+FvCu89qAhpm5Ary2lSepdo2mt8VERbX4B25 FPgJ1rZfeMd29hiuGTeow1A4OAWWF5OoeaMFpMyWxNX+lmRntn3BovjjqA9Snqdu94Rab+ ovu7B494oqgEWjdzj4nFob1KWwvhomm8twjcCA7uVDiSRpV5IhyDzPbWPoJ4CgguLzxz+y PQftvontURpZUvFfeEmZPX2trU1mANOCOvuNfikc8xdrvsHdjlTPxUa9jyjYKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687894332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjJ6hFvyzVMwFtfIYuF6G2tjel9lZhHnVNGpcQvELsQ=; b=DPC8hdFJmZlfgau6LMCEcNX/7NaT38NO/4bTGDS55iqYpVTgZk3Efi1ZAWVgjPkU36Qm3m k72kHBppBST+mI4lSjXVP17FCL4KYjqo9OkInVKLqddD3Unq+NXAIUlfc5IPoQUwItypeS sYFQ78lEOGSCx2Yje0xiOfExoY1AakSQ6R+HxsoOuXm3QKJ8jZ1yzy7PePTEFEOvh1U26U Cy5Lz40WXBBiJLi6fzYfPzjhDYWy/n3/GWfIrwORBv7M+tVVwJvgsGyVz39ckT1ZSbq6Xo XG1mtzNK6Ux3EJ/v3PoQgTL+M9o4NB86hnC/rhWKAZVj2VPILCv1RVmNCFc8uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687894332; a=rsa-sha256; cv=none; b=DBGjVBkKMljhRuLXR6VeA3QCUIQeuei2+13BSxYCh/u1OKwDQqXjiUD88vR8NyJDc66TGb 3T16RxlTaq8tBZBiP3fO+N3kE593AU3gjDXYp7M8r9Ew9iOki4T6D6yktOrFx2CDrcBti0 OsLJXLZEUtzAjogz/F3WFvSWn7U5beI/3Pg1vkVBVk81GVc5XCLKbd6nl2mBA3yvbqVLef UbIFjmcPlyZxKdeQgAcT49VKbZhZ7uv3aOiw7IWzCSbXE9VqJNKiXf2M0fslU0su3iCpj0 kBd0nFH1eBda8P/WJfTM2TFQERpzP9xwQadQuQrRrfLwkOHlRpRWOz/LXGMyNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrFGN0lPdz14f8; Tue, 27 Jun 2023 19:32:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RJWCCq035916; Tue, 27 Jun 2023 19:32:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RJWC8k035915; Tue, 27 Jun 2023 19:32:12 GMT (envelope-from git) Date: Tue, 27 Jun 2023 19:32:12 GMT Message-Id: <202306271932.35RJWC8k035915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: b374a3921d97 - main - hier(7): fix inline markup for a 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: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b374a3921d97bdb20b103aaeb91988c3d355ea71 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=b374a3921d97bdb20b103aaeb91988c3d355ea71 commit b374a3921d97bdb20b103aaeb91988c3d355ea71 Author: Graham Perrin AuthorDate: 2023-06-27 19:22:32 +0000 Commit: Graham Perrin CommitDate: 2023-06-27 19:22:32 +0000 hier(7): fix inline markup for a variable I mistakenly preceded macro Va with macro It in https://github.com/freebsd/freebsd-src/pull/763/commits/8ff26f2cb5c0d69cce319e1ac1f792ea4245445a https://bugs.freebsd.org/261349 PR: 261349 Approved by: emaste, imp, mhorne Fixes: 6469f9c hier(7): improvement, modernisation --- share/man/man7/hier.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 66eb4b2b8b6c..f606684334eb 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 10, 2023 +.Dd June 27, 2023 .Dt HIER 7 .Os .Sh NAME @@ -188,7 +188,7 @@ single-user and multi-user modes temporary files that may be removed by .Xr rc 8 ; see the -.It Va clear_tmp_enable +.Va clear_tmp_enable variable of .Xr rc.conf 5 .It Pa /usr/ From nobody Tue Jun 27 20:30: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 4QrGYh05qZz4k0Tb for ; Tue, 27 Jun 2023 20:30: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 4QrGYg6qVJz4Gby; Tue, 27 Jun 2023 20:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687897832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mPenqLMNwRsS6U3PuamSH1jfyB96c+YevUkHpT+H7W8=; b=m8ANZ0WSpLrknOTG3FxtoosqqJ5mISJw/jc1sGnlN6rWJs3/hyRlCl8augoFEj95dS3fdV 5R6T+du9frfjjEtyct0k3q0eVVTxbZaL8cB1j68Vl+kGvofNQQgXo6kjlndelT6LGG8aVQ 5rn1meq8xdIwxI8MwKjfga6JvJSD/ivtRUWhWteh5rxNzluvQ0SimgT36T8Hfw4vAjaSXT fd1En5peKAdxbHyoiHooUrk0yhuNxDCfc/ADop4RFblvfAKriGH6ligkBwM7JZ3SuSLr1A L5+m27NYmG+eI0V271zkef7QAPywi9wgi6HYOCbYqygumwVHU/xlXnPiBXlbhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687897832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mPenqLMNwRsS6U3PuamSH1jfyB96c+YevUkHpT+H7W8=; b=wprX6vtCO4/6VIcTTNrOG94/sqgoqjDq3B5R9x6BIgZdJvvvjjVHzZponDq3teqn0BVBkZ 2ZzgItepLaiDO5WIinfJznBI0ugwsRRG/etmYxJbGtogUV6xjb1HR6zoIXzKDP858GhGms Szk0172v3kfUbhlvf3kY2NuwF5INisbvCmLF8osi77eIomK4TLs3Vpu8AFH9UhihS1QMXG h9+APPyKfCnmxPUTyUpaZdTejPJ3f++myT3kjEhs7swpaCtZ18Nes0VMY3zGRXJjCJoojU luLxlocnH1znmQqdh0eU1UWIyHZPGC2Zw10Lr1679haVe3lvVkwyf8PJ4iGHiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687897832; a=rsa-sha256; cv=none; b=hK57aNyV5cn2jJs2/O/hE2bNrMY2820Uu/86Y7Hd0ucUoZXdvHqGG0h036phVQRkMwtqCZ Hbwr//jDmT59ZGNUVZvP7/8gnkYzeyXnxPrLO5Qdc1TcRY+M/ti9gvCMPMCt7iYIniJ2W7 2auAvtulOMnTpK7oZvypFYtZ8Ib2WPD/1ljDIUPJyiAuY3gOOtNEXda1kjThScZ93MVk2u bDiIIKa/KiZRHqQnfpRzXz8r1jE+VPWvW/ckaV3tl3FIrbBBXDLMbKoh2XlQmTCrfnhPLQ s5YZyXyeYa6GOCN/Jx3pmWIUGyd/Fxz2E1hhnUkPvJ7xnvUQJV+/CJ4jBamfqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrGYg5q7lz15cP; Tue, 27 Jun 2023 20:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RKUVjr039635; Tue, 27 Jun 2023 20:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RKUVKY039634; Tue, 27 Jun 2023 20:30:31 GMT (envelope-from git) Date: Tue, 27 Jun 2023 20:30:31 GMT Message-Id: <202306272030.35RKUVKY039634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" Subject: git: deff8e07e67e - Create tag vendor/NetBSD/bmake/20230622 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/tags/vendor/NetBSD/bmake/20230622 X-Git-Reftype: annotated tag X-Git-Commit: deff8e07e67ee1bdd22f95905ff98631436c114d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/NetBSD/bmake/20230622 has been created by sjg: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/NetBSD/bmake/20230622 tag vendor/NetBSD/bmake/20230622 Tagger: Simon J. Gerraty TaggerDate: 2023-06-27 20:29:54 +0000 Tag bmake/20230622 commit 3e39ce563b9ba25883e5aa37d9799eda9e57c1e0 Author: Simon J. Gerraty AuthorDate: 2023-06-27 20:29:43 +0000 Commit: Simon J. Gerraty CommitDate: 2023-06-27 20:29:43 +0000 Import bmake-20230622 Relevant/interesting changes: o optimize string matching for ':M' and ':N' o warn about malformed patterns in ':M', ':N' and '.if make(...)' o allow guards to be targets as well as variables The guard targets may include variable references like __${.PARSEDIR:tA}/${.PARSEFILE}__ o optimization for makefiles protected from multiple-inclusion skip even opening the file after first include. o var.c: do not allow delete of readOnly variable o parse.c: .break takes no args From nobody Tue Jun 27 20:30: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 4QrGYh0f8cz4k0Tc for ; Tue, 27 Jun 2023 20:30: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 4QrGYg6xlvz4GfB; Tue, 27 Jun 2023 20:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687897832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L6JFu9UJVqks0ZE/Hb2tzES8q7EZudmCSyOUG9RdufM=; b=EyRShkoDKttLCXWGsDt+JW+mkRjeZpV9FNHYKO6G2MPuKOb3cSM4mgiXho6Vb0nedHdg3t U70HFFbRCf17Pct/H3oFzPkxNmW+/cSL5bd7TvwcgvYwIdR1VUxE5H2gKvl0JZyD1UXlyc lyB5o9eOVtda5W2nvOM/IYNav9BGrTtRNYmXATuqcfI3f+1tOtq6rYTM9wRG69dDcbw8Q9 BbXW9x0JfKOTlteIwDSii8/+gv+MJjdobvGiCUu5VagU0svg9ZZc7OyPjrfS8nrznUIMZi QjOCKuFqF+ibJijQON5V5KfQNFl2wOB4nYRW6hykVaX6RCerjBNQ0z+SCK8XPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687897832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L6JFu9UJVqks0ZE/Hb2tzES8q7EZudmCSyOUG9RdufM=; b=LEN3AW6v/EZpJrZZf3Ze7g8oBWQNIJDVqMzVAe4eYAw6ANbsupsMw+DgSz9yY8N9izCc0T Dfvb+YIZDymVzVGHgbXRF5tAQzV9aLclatzadwqSTrukzKbla8ezo4MXX/X6eTHNye6S+z cnNabLs2X3d1dHw7qyPOJDVb/E8Cva12usxty6/hc0M+64dHp76hH9ARnUfJblYMBAqssW q11BjKyUibaKTDFHMfxiCHUzSmISzcg5Sn28PR7nCFWJ9gfMODdSDB1VOyxrZ7D92NPBkm RISycqYe3CeDXzU2cHgOrBXYsx9oswVVX2yDVaiovu+dY7Vg2UyPkFLVdi1xOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687897832; a=rsa-sha256; cv=none; b=NMjdf2rglnYRyS1OV+PsbhLQBsj4GC9NivjQ9mqkziSxt4ZvrhvC7pOy57k4Ap5iabvqt/ 3mh8GrYAi3+N5unBZtSCoCVEhcZ3AWoiNMKlDNYzCVTzXFUJ16QjqsgbH0S4J73Ianhq1d AA7QRqmk6UkdvOXBImn7MdFui/828n+/2Z996XJvBrxFx1e2+c59qSCpstOKnT05mKV+Wc +LhyYEqRtBzWftJhZ5/8paFbOxdP1zDnMfLKJjSNkGsaIf8y2+/faCBJp/ys1UT8N+6UUQ nOL9s+7oIelYwnBlbH6hUU4V94OZmt6wi3+17h5X0+SDSG5XsHkrQI6Yt1rFmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrGYg5f02z15s6; Tue, 27 Jun 2023 20:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RKUVH8039616; Tue, 27 Jun 2023 20:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RKUV6x039615; Tue, 27 Jun 2023 20:30:31 GMT (envelope-from git) Date: Tue, 27 Jun 2023 20:30:31 GMT Message-Id: <202306272030.35RKUV6x039615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 945078deae44..3e39ce563b9b - vendor/NetBSD/bmake - 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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/vendor/NetBSD/bmake X-Git-Reftype: branch X-Git-Commit: 3e39ce563b9ba25883e5aa37d9799eda9e57c1e0 X-Git-Oldrev: 945078deae448e0a13c34b3393d836087719fb16 X-Git-Newrev: 3e39ce563b9ba25883e5aa37d9799eda9e57c1e0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/NetBSD/bmake has been updated by sjg: URL: https://cgit.FreeBSD.org/src/log/?id=945078deae44..3e39ce563b9b 3e39ce563b9b Import bmake-20230622 From nobody Tue Jun 27 20:59: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 4QrHBz46dXz4kY9N; Tue, 27 Jun 2023 20:59: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 4QrHBz3qZ4z4Vqc; Tue, 27 Jun 2023 20:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDp5COeCviVZOGcoqkQF1gmjdx3uPrFFZ1xZRfSp0lM=; b=BWrAWjbtfb/hE3iThq2XTiF/8TRNq8lcTqZymokGwYqn0It+B1n+CLMY24iRfNvG2ec/hm lVyW0FUUmvkZ8hVUgBuPgvK4nexd5FcAK21/n0/cslb7BO6rhFlMKBx94bSWMTA7K50zD3 HZg6Es3uJFfUaJCWrk70lsTxObJ7f5hQhusSyBkAjtBEyEWYcar1mibKFTkCwkeYAVCHnL LcTilpK7DogQTt3qhctEzzR/E4+9EcMv+KdnkKZPtW4Or8KEeDAQyLA0z6o+UdiGSAvR9p H6jrLegQVWtDXigc1FdyHUfUm8OGPH2aE4EieLNMjTJ74goMgRbr9kVs0M/Dbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XDp5COeCviVZOGcoqkQF1gmjdx3uPrFFZ1xZRfSp0lM=; b=UC08fw8lWApMIFSQTJxw0rGgDB9m+9s/HH189YALu+nevLasUfetbjJ61WXHVupn7XMnhJ 38VktxNnctbQP5GAbh07GlX6cu4Ti2QnM9PqWGM3e5qUXMsOZW7Ot58v+Sji/uhH+xzdye ZeqKtlB+yNEr84+nHCXnw3gVZqO0F8RUOoYb7i6qfIWDgaXEwbxHMxwHRzVG3N3WhOKEr/ LTLoCy4nLk9bYnj+DzxKxZo7e7kZsZ2FBLsgcC/1UMS+vYjwXhJxuDR/T0GtvCUrEtXBzY Al9Uc/8MEMkQ/FALZ6WWEJUxH9BkF7xjwlqY4uawJqr7hC36Qv1XBoLTOX1I4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687899563; a=rsa-sha256; cv=none; b=kenSfnX99wDVxA9h/96hrOqBXotGeM0FP0CsbQch7gRJ9dfVUQaCXe2BU9+GIfk26CpBdn XH1WdNgj1SJQCo2u2OLHmn3awlZO+vgl06EjOvI9zJgB4xIQA6/CPn/nuLwCSXHc3/EE3A EcedgjkwGFhW6LCH4534PMh2OM081zf1ZsUZKCeC3/WwCvM2UBScNFriJ/byGrOFJbGTtG psKUn8SSzlml/Q2EEpb5UOALLWs4LRy33tQ2o1eWQ9IC6cKCjc+khwMuBiRmnEQDb5DIdp O1wkLI8SqbaOal+s0JW2UZ5bAmV4gHtHL2g6Bqqh3SEaa+PBYhmtjD78qxVhJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrHBz2tDtz16cR; Tue, 27 Jun 2023 20:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RKxNM6080274; Tue, 27 Jun 2023 20:59:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RKxK7a080265; Tue, 27 Jun 2023 20:59:20 GMT (envelope-from git) Date: Tue, 27 Jun 2023 20:59:20 GMT Message-Id: <202306272059.35RKxK7a080265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 148ee8457000 - main - Merge bmake-20230622 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 148ee84570001f46b7b667c86573d378101c3801 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=148ee84570001f46b7b667c86573d378101c3801 commit 148ee84570001f46b7b667c86573d378101c3801 Merge: b374a3921d97 3e39ce563b9b Author: Simon J. Gerraty AuthorDate: 2023-06-27 20:38:02 +0000 Commit: Simon J. Gerraty CommitDate: 2023-06-27 20:57:58 +0000 Merge bmake-20230622 Merge commit '3e39ce563b9ba25883e5aa37d9799eda9e57c1e0' contrib/bmake/ChangeLog | 71 +++ contrib/bmake/FILES | 6 +- contrib/bmake/Makefile | 6 +- contrib/bmake/VERSION | 2 +- contrib/bmake/boot-strap | 2 +- contrib/bmake/buf.c | 6 +- contrib/bmake/buf.h | 4 +- contrib/bmake/cond.c | 101 +++- contrib/bmake/dir.c | 14 +- contrib/bmake/for.c | 40 +- contrib/bmake/make.h | 19 +- contrib/bmake/mk/ChangeLog | 46 ++ contrib/bmake/mk/dirdeps.mk | 73 +-- contrib/bmake/mk/host-target.mk | 31 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/meta.autodep.mk | 5 +- contrib/bmake/mk/sys.dirdeps.mk | 46 +- contrib/bmake/mk/sys.vars.mk | 11 +- contrib/bmake/os.sh | 16 +- contrib/bmake/parse.c | 106 +++- contrib/bmake/str.c | 116 +++-- contrib/bmake/str.h | 9 +- contrib/bmake/unit-tests/Makefile | 17 +- contrib/bmake/unit-tests/cmdline-undefined.exp | 24 +- contrib/bmake/unit-tests/cmdline-undefined.mk | 14 +- contrib/bmake/unit-tests/cond-cmp-numeric-eq.exp | 4 +- contrib/bmake/unit-tests/cond-cmp-numeric-eq.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-unary.exp | 2 +- contrib/bmake/unit-tests/cond-cmp-unary.mk | 11 +- contrib/bmake/unit-tests/cond-eof.exp | 6 +- contrib/bmake/unit-tests/cond-eof.mk | 10 +- contrib/bmake/unit-tests/cond-func-defined.exp | 10 +- contrib/bmake/unit-tests/cond-func-defined.mk | 8 +- contrib/bmake/unit-tests/cond-func-empty.exp | 4 +- contrib/bmake/unit-tests/cond-func-empty.mk | 7 +- contrib/bmake/unit-tests/cond-func-make.exp | 1 + contrib/bmake/unit-tests/cond-func-make.mk | 7 +- contrib/bmake/unit-tests/cond-func.exp | 18 +- contrib/bmake/unit-tests/cond-func.mk | 12 +- contrib/bmake/unit-tests/cond-op-and-lint.exp | 2 +- contrib/bmake/unit-tests/cond-op-and-lint.mk | 3 +- contrib/bmake/unit-tests/cond-op-and.exp | 8 +- contrib/bmake/unit-tests/cond-op-and.mk | 6 +- contrib/bmake/unit-tests/cond-op-not.exp | 12 +- contrib/bmake/unit-tests/cond-op-not.mk | 8 +- contrib/bmake/unit-tests/cond-op-or-lint.exp | 2 +- contrib/bmake/unit-tests/cond-op-or-lint.mk | 3 +- contrib/bmake/unit-tests/cond-op-or.exp | 8 +- contrib/bmake/unit-tests/cond-op-or.mk | 6 +- contrib/bmake/unit-tests/cond-op-parentheses.exp | 4 +- contrib/bmake/unit-tests/cond-op-parentheses.mk | 4 +- contrib/bmake/unit-tests/cond-op.exp | 37 +- contrib/bmake/unit-tests/cond-op.mk | 28 +- contrib/bmake/unit-tests/cond-token-number.exp | 8 +- contrib/bmake/unit-tests/cond-token-number.mk | 6 +- contrib/bmake/unit-tests/cond-token-plain.exp | 30 +- contrib/bmake/unit-tests/cond-token-plain.mk | 13 +- contrib/bmake/unit-tests/cond-token-string.exp | 20 +- contrib/bmake/unit-tests/cond-token-string.mk | 14 +- contrib/bmake/unit-tests/cond-token-var.exp | 8 +- contrib/bmake/unit-tests/cond-token-var.mk | 8 +- contrib/bmake/unit-tests/cond-undef-lint.exp | 14 +- contrib/bmake/unit-tests/cond-undef-lint.mk | 9 +- .../bmake/unit-tests/dep-colon-bug-cross-file.exp | 4 +- .../bmake/unit-tests/dep-colon-bug-cross-file.mk | 4 +- contrib/bmake/unit-tests/dep-wildcards.mk | 8 +- contrib/bmake/unit-tests/dep.mk | 14 +- contrib/bmake/unit-tests/deptgt-begin.exp | 4 +- contrib/bmake/unit-tests/deptgt-begin.mk | 4 +- contrib/bmake/unit-tests/deptgt-delete_on_error.mk | 2 +- contrib/bmake/unit-tests/deptgt.exp | 22 +- contrib/bmake/unit-tests/deptgt.mk | 5 +- contrib/bmake/unit-tests/directive-elif.exp | 36 +- contrib/bmake/unit-tests/directive-elif.mk | 25 +- contrib/bmake/unit-tests/directive-else.exp | 14 +- contrib/bmake/unit-tests/directive-else.mk | 12 +- contrib/bmake/unit-tests/directive-endfor.exp | 2 +- contrib/bmake/unit-tests/directive-endfor.mk | 3 +- contrib/bmake/unit-tests/directive-endif.exp | 8 +- contrib/bmake/unit-tests/directive-endif.mk | 28 +- contrib/bmake/unit-tests/directive-error.exp | 2 +- contrib/bmake/unit-tests/directive-error.mk | 3 +- contrib/bmake/unit-tests/directive-for-break.exp | 1 + contrib/bmake/unit-tests/directive-for-break.mk | 8 +- contrib/bmake/unit-tests/directive-for-empty.exp | 10 +- contrib/bmake/unit-tests/directive-for-empty.mk | 6 +- contrib/bmake/unit-tests/directive-for-errors.exp | 28 +- contrib/bmake/unit-tests/directive-for-errors.mk | 4 +- contrib/bmake/unit-tests/directive-for-escape.exp | 151 +++--- contrib/bmake/unit-tests/directive-for-escape.mk | 10 +- .../unit-tests/directive-for-generating-endif.exp | 8 +- .../unit-tests/directive-for-generating-endif.mk | 6 +- contrib/bmake/unit-tests/directive-for-if.exp | 6 +- contrib/bmake/unit-tests/directive-for-if.mk | 5 +- contrib/bmake/unit-tests/directive-for-lines.exp | 12 +- contrib/bmake/unit-tests/directive-for-lines.mk | 8 +- contrib/bmake/unit-tests/directive-for.exp | 60 +-- contrib/bmake/unit-tests/directive-for.mk | 10 +- contrib/bmake/unit-tests/directive-if.exp | 28 +- contrib/bmake/unit-tests/directive-if.mk | 10 +- contrib/bmake/unit-tests/directive-ifmake.exp | 14 +- contrib/bmake/unit-tests/directive-ifmake.mk | 9 +- contrib/bmake/unit-tests/directive-ifndef.exp | 2 +- contrib/bmake/unit-tests/directive-ifndef.mk | 33 +- .../bmake/unit-tests/directive-include-fatal.exp | 2 +- .../bmake/unit-tests/directive-include-fatal.mk | 3 +- .../bmake/unit-tests/directive-include-guard.exp | 88 ++++ .../bmake/unit-tests/directive-include-guard.mk | 552 +++++++++++++++++++++ contrib/bmake/unit-tests/directive-include.exp | 12 +- contrib/bmake/unit-tests/directive-include.mk | 6 +- contrib/bmake/unit-tests/directive-info.exp | 24 +- contrib/bmake/unit-tests/directive-info.mk | 19 +- .../bmake/unit-tests/directive-misspellings.exp | 84 ++-- contrib/bmake/unit-tests/directive-misspellings.mk | 46 +- contrib/bmake/unit-tests/directive-undef.exp | 6 +- contrib/bmake/unit-tests/directive-undef.mk | 5 +- .../bmake/unit-tests/directive-unexport-env.exp | 6 +- contrib/bmake/unit-tests/directive-unexport-env.mk | 5 +- contrib/bmake/unit-tests/directive-unexport.exp | 8 +- contrib/bmake/unit-tests/directive-unexport.mk | 5 +- contrib/bmake/unit-tests/directive-warning.exp | 14 +- contrib/bmake/unit-tests/directive-warning.mk | 9 +- contrib/bmake/unit-tests/doterror.mk | 3 +- contrib/bmake/unit-tests/error.exp | 6 +- contrib/bmake/unit-tests/error.mk | 5 +- contrib/bmake/unit-tests/export-env.mk | 6 +- contrib/bmake/unit-tests/forsubst.exp | 2 - contrib/bmake/unit-tests/forsubst.mk | 22 - contrib/bmake/unit-tests/include-main.exp | 10 +- contrib/bmake/unit-tests/include-main.mk | 6 +- contrib/bmake/unit-tests/modmatch.exp | 17 - contrib/bmake/unit-tests/modmatch.mk | 30 -- contrib/bmake/unit-tests/modmisc.exp | 1 - contrib/bmake/unit-tests/modmisc.mk | 10 +- contrib/bmake/unit-tests/opt-debug-file.exp | 6 +- contrib/bmake/unit-tests/opt-debug-file.mk | 5 +- contrib/bmake/unit-tests/opt-debug-for.exp | 12 +- contrib/bmake/unit-tests/opt-debug-hash.exp | 2 +- contrib/bmake/unit-tests/opt-debug-hash.mk | 3 +- contrib/bmake/unit-tests/opt-debug-lint.exp | 14 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 9 +- contrib/bmake/unit-tests/opt-debug-parse.exp | 28 +- contrib/bmake/unit-tests/opt-debug-parse.mk | 5 +- .../bmake/unit-tests/opt-warnings-as-errors.exp | 4 +- contrib/bmake/unit-tests/opt-warnings-as-errors.mk | 4 +- contrib/bmake/unit-tests/parse.exp | 2 +- contrib/bmake/unit-tests/parse.mk | 3 +- contrib/bmake/unit-tests/recursive.exp | 4 +- contrib/bmake/unit-tests/recursive.mk | 4 +- contrib/bmake/unit-tests/var-eval-short.exp | 8 +- contrib/bmake/unit-tests/var-eval-short.mk | 4 +- contrib/bmake/unit-tests/var-op-append.mk | 19 +- contrib/bmake/unit-tests/var-op-assign.exp | 4 +- contrib/bmake/unit-tests/var-op-assign.mk | 4 +- contrib/bmake/unit-tests/var-op-expand.exp | 6 +- contrib/bmake/unit-tests/var-op-expand.mk | 4 +- contrib/bmake/unit-tests/var-op-shell.exp | 8 +- contrib/bmake/unit-tests/var-op-shell.mk | 6 +- contrib/bmake/unit-tests/var-readonly.mk | 9 +- contrib/bmake/unit-tests/var-recursive.exp | 12 +- contrib/bmake/unit-tests/var-recursive.mk | 4 +- contrib/bmake/unit-tests/var-scope-cmdline.exp | 4 +- contrib/bmake/unit-tests/var-scope-cmdline.mk | 4 +- contrib/bmake/unit-tests/vardebug.exp | 6 +- contrib/bmake/unit-tests/vardebug.mk | 5 +- contrib/bmake/unit-tests/varmod-assign-shell.exp | 2 +- contrib/bmake/unit-tests/varmod-assign-shell.mk | 3 +- contrib/bmake/unit-tests/varmod-edge.exp | 42 +- contrib/bmake/unit-tests/varmod-edge.mk | 23 +- contrib/bmake/unit-tests/varmod-gmtime.exp | 20 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 12 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 24 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 13 +- contrib/bmake/unit-tests/varmod-indirect.exp | 32 +- contrib/bmake/unit-tests/varmod-indirect.mk | 13 +- contrib/bmake/unit-tests/varmod-localtime.exp | 20 +- contrib/bmake/unit-tests/varmod-localtime.mk | 12 +- contrib/bmake/unit-tests/varmod-loop-delete.exp | 2 +- contrib/bmake/unit-tests/varmod-loop-delete.mk | 3 +- contrib/bmake/unit-tests/varmod-loop-varname.exp | 16 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 10 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 6 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 37 +- contrib/bmake/unit-tests/varmod-match.exp | 12 +- contrib/bmake/unit-tests/varmod-match.mk | 25 +- contrib/bmake/unit-tests/varmod-order.exp | 20 +- contrib/bmake/unit-tests/varmod-order.mk | 13 +- contrib/bmake/unit-tests/varmod-range.exp | 20 +- contrib/bmake/unit-tests/varmod-range.mk | 12 +- contrib/bmake/unit-tests/varmod-subst.mk | 84 +++- contrib/bmake/unit-tests/varmod-sysv.exp | 2 +- contrib/bmake/unit-tests/varmod-sysv.mk | 3 +- contrib/bmake/unit-tests/varmod-to-abs.exp | 4 +- contrib/bmake/unit-tests/varmod-to-abs.mk | 5 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 28 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 14 +- contrib/bmake/unit-tests/varmod.exp | 10 +- contrib/bmake/unit-tests/varmod.mk | 7 +- contrib/bmake/unit-tests/varname-dollar.exp | 8 +- contrib/bmake/unit-tests/varname-dollar.mk | 6 +- contrib/bmake/unit-tests/varname-dot-makeflags.exp | 12 +- contrib/bmake/unit-tests/varname-dot-makeflags.mk | 5 +- contrib/bmake/unit-tests/varname-dot-parsedir.exp | 6 +- contrib/bmake/unit-tests/varname-dot-parsedir.mk | 12 +- contrib/bmake/unit-tests/varname-dot-parsefile.exp | 6 +- contrib/bmake/unit-tests/varname-dot-parsefile.mk | 12 +- contrib/bmake/unit-tests/varname-makeflags.mk | 10 +- contrib/bmake/unit-tests/varname.exp | 6 +- contrib/bmake/unit-tests/varname.mk | 5 +- contrib/bmake/unit-tests/varparse-dynamic.exp | 4 +- contrib/bmake/unit-tests/varparse-dynamic.mk | 9 +- contrib/bmake/unit-tests/varparse-errors.exp | 8 +- contrib/bmake/unit-tests/varparse-errors.mk | 6 +- contrib/bmake/var.c | 115 ++--- usr.bin/bmake/Makefile | 6 +- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 17 +- 217 files changed, 2692 insertions(+), 1119 deletions(-) diff --cc contrib/bmake/Makefile index 212885f7b900,000000000000..22e92b4da9ac mode 100644,000000..100644 --- a/contrib/bmake/Makefile +++ b/contrib/bmake/Makefile @@@ -1,236 -1,0 +1,238 @@@ - # $Id: Makefile,v 1.124 2023/02/25 20:27:44 sjg Exp $ ++# $Id: Makefile,v 1.125 2023/05/17 00:15:46 sjg Exp $ + +PROG= bmake + +SRCS= \ + arch.c \ + buf.c \ + compat.c \ + cond.c \ + dir.c \ + for.c \ + hash.c \ + job.c \ + lst.c \ + main.c \ + make.c \ + make_malloc.c \ + meta.c \ + metachar.c \ + parse.c \ + str.c \ + suff.c \ + targ.c \ + trace.c \ + util.c \ + var.c + +.-include "VERSION" +.-include "Makefile.inc" + +# this file gets generated by configure +.-include "Makefile.config" + +.if !empty(LIBOBJS) +SRCS+= ${LIBOBJS:T:.o=.c} +.endif + +# just in case +prefix?= /usr +srcdir?= ${.CURDIR} + +DEFAULT_SYS_PATH?= ${prefix}/share/mk + +CPPFLAGS+= -DUSE_META +CFLAGS+= ${CPPFLAGS} +CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE +CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" + +.for x in FORCE_MACHINE FORCE_MACHINE_ARCH +.ifdef $x +COPTS.main.c+= "-D$x=\"${$x}\"" +.endif +.endfor + +# meta mode can be useful even without filemon +# should be set by now +USE_FILEMON ?= no +.if ${USE_FILEMON:tl} != "no" +.PATH: ${srcdir}/filemon +SRCS+= filemon_${USE_FILEMON}.c +COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} +COPTS.job.c+= ${COPTS.meta.c} + +.if ${USE_FILEMON} == "dev" +FILEMON_H ?= /usr/include/dev/filemon/filemon.h +.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" +COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} +.endif - .endif # USE_FILEMON == dev ++.elif ${USE_FILEMON} == "ktrace" ++COPTS.filemon_ktrace.c += -Wno-error=unused-parameter ++.endif + +.endif # USE_FILEMON + +.PATH: ${srcdir} + +.if make(obj) || make(clean) +SUBDIR+= unit-tests +.endif + +# start-delete1 for bsd.after-import.mk +# we skip a lot of this when building as part of FreeBSD etc. + +# list of OS's which are derrived from BSD4.4 +BSD44_LIST= NetBSD FreeBSD OpenBSD DragonFly MirBSD Bitrig +# we are... +OS := ${.MAKE.OS:U${uname -s:L:sh}} +# are we 4.4BSD ? +isBSD44:=${BSD44_LIST:M${OS}} + +.if ${isBSD44} == "" && ${OS:NDarwin:NLinux} != "" +MANTARGET= cat +INSTALL?=${srcdir}/install-sh +.if ${MACHINE} == "sun386" +# even I don't have one of these anymore :-) +CFLAGS+= -DPORTAR +.elif ${OS} != "SunOS" +# assume the worst +SRCS+= sigcompat.c +CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART +.endif +.else +MANTARGET?= man +.endif + +# turn this on by default - ignored if we are root +WITH_INSTALL_AS_USER= + +# suppress with -DWITHOUT_* +OPTIONS_DEFAULT_YES+= \ + AUTOCONF_MK \ + INSTALL_MK \ + PROG_LINK + +OPTIONS_DEFAULT_NO+= \ + PROG_VERSION + +# process options now +.include + +.if ${MK_PROG_VERSION} == "yes" +PROG_NAME= ${PROG}-${_MAKE_VERSION} +.if ${MK_PROG_LINK} == "yes" +SYMLINKS+= ${PROG_NAME} ${BINDIR}/${PROG} +.endif +.endif + +EXTRACT_MAN=no +# end-delete1 + +MAN= ${PROG}.1 +MAN1= ${MAN} + +.if ${PROG} != "make" +CLEANFILES+= my.history +.if make(${MAN}) || !exists(${srcdir}/${MAN}) +my.history: + @(echo ".Nm"; \ + echo "is derived from NetBSD"; \ + echo ".Xr make 1 ."; \ + echo "It uses autoconf to facilitate portability to other platforms."; \ + echo ".Pp") > $@ + +.NOPATH: ${MAN} +${MAN}: make.1 my.history + @echo making $@ + @sed \ + -e '/^.Dt/s/MAKE/${PROG:tu}/' \ + -e 's/^.Nx/NetBSD/' \ + -e '/^.Nm/s/make/${PROG}/' \ + -e '/^.Sh HISTORY/rmy.history' \ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ + +all beforeinstall: ${MAN} +_mfromdir=. +.endif +.endif + +MANTARGET?= cat +MANDEST?= ${MANDIR}/${MANTARGET}1 + +.if ${MANTARGET} == "cat" +_mfromdir=${srcdir} +.endif + +.include + +CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H +COPTS.var.c += -Wno-cast-qual +COPTS.job.c += -Wno-format-nonliteral +COPTS.parse.c += -Wno-format-nonliteral +COPTS.var.c += -Wno-format-nonliteral + +# Force these +SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} +BINDIR= ${BINDIR.bmake:U${prefix}/bin} +MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} + +${OBJS}: config.h + +# start-delete2 for bsd.after-import.mk + +# make sure that MAKE_VERSION gets updated. +main.o: ${srcdir}/VERSION + +.if ${MK_AUTOCONF_MK} == "yes" +CONFIGURE_DEPS += ${.CURDIR}/VERSION +# we do not need or want the generated makefile +CONFIGURE_ARGS += --without-makefile +AUTOCONF_GENERATED_MAKEFILE = Makefile.config +.include +.endif +SHARE_MK ?= ${SHAREDIR}/mk +MKSRC = ${srcdir}/mk +INSTALL ?= ${srcdir}/install-sh + +.if ${MK_INSTALL_MK} == "yes" +install: install-mk +.endif + +beforeinstall: + test -d ${DESTDIR}${BINDIR} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${BINDIR} + test -d ${DESTDIR}${MANDEST} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${MANDEST} + +install-mk: +.if exists(${MKSRC}/install-mk) + test -d ${DESTDIR}${SHARE_MK} || ${INSTALL} -m ${DIRMODE} -d ${DESTDIR}${SHARE_MK} + sh ${MKSRC}/install-mk -v -m ${NONBINMODE} ${DESTDIR}${SHARE_MK} +.else + @echo need to unpack mk.tar.gz under ${srcdir} or set MKSRC; false +.endif +# end-delete2 + +# A simple unit-test driver to help catch regressions +TEST_MAKE ?= ${.OBJDIR}/${PROG:T} +accept test: .NOMETA + cd ${.CURDIR}/unit-tests && \ + MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}} + + +.if make(test) && ${MK_AUTO_OBJ} == "yes" +# The test target above visits unit-tests with -r -m / +# which prevents MK_AUTO_OBJ doing its job +# so do it here +.if defined(MAKEOBJDIRPREFIX) || ${MAKEOBJDIR:U:M*/*} != "" +_utobj = ${.OBJDIR}/unit-tests +.else +_utobj = ${.CURDIR}/unit-tests/${MAKEOBJDIR:Uobj} +.endif +utobj: .NOMETA + @test -d ${_utobj} && exit 0; \ + echo "[Creating ${_utobj}...]"; \ + umask ${OBJDIR_UMASK:U002}; \ + mkdir -p ${_utobj} +test: utobj +.endif diff --cc contrib/bmake/boot-strap index 40984edcbe62,40984edcbe62..8892f2b1c990 --- a/contrib/bmake/boot-strap +++ b/contrib/bmake/boot-strap @@@ -420,7 -420,7 +420,7 @@@ op_build() op_test() { [ -x bmake ] || op_build -- Bmake test "$@" || exit 1 ++ Bmake test "$@" TEST_MAKE=$objdir/bmake || exit 1 } op_clean() { diff --cc contrib/bmake/os.sh index 6bf52420c90f,78b2de95a679..78b2de95a679 mode 100755,100644..100644 --- a/contrib/bmake/os.sh +++ b/contrib/bmake/os.sh diff --cc contrib/bmake/unit-tests/directive-include-guard.exp index 000000000000,487e67e33e77..487e67e33e77 mode 000000,100644..100644 --- a/contrib/bmake/unit-tests/directive-include-guard.exp +++ b/contrib/bmake/unit-tests/directive-include-guard.exp diff --cc contrib/bmake/unit-tests/directive-include-guard.mk index 000000000000,1d19a67944e5..1d19a67944e5 mode 000000,100644..100644 --- a/contrib/bmake/unit-tests/directive-include-guard.mk +++ b/contrib/bmake/unit-tests/directive-include-guard.mk diff --cc usr.bin/bmake/Makefile index ed2f5b3d5e2f,000000000000..fddd0564459d mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile +++ b/usr.bin/bmake/Makefile @@@ -1,179 -1,0 +1,181 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# +# $FreeBSD$ + +SRCTOP?= ${.CURDIR:H:H} + +# look here first for config.h +CFLAGS+= -I${.CURDIR} + +# for after-import +CLEANDIRS+= FreeBSD +CLEANFILES+= bootstrap + - # $Id: Makefile,v 1.124 2023/02/25 20:27:44 sjg Exp $ ++# $Id: Makefile,v 1.125 2023/05/17 00:15:46 sjg Exp $ + +PROG?= ${.CURDIR:T} + +SRCS= \ + arch.c \ + buf.c \ + compat.c \ + cond.c \ + dir.c \ + for.c \ + hash.c \ + job.c \ + lst.c \ + main.c \ + make.c \ + make_malloc.c \ + meta.c \ + metachar.c \ + parse.c \ + str.c \ + suff.c \ + targ.c \ + trace.c \ + util.c \ + var.c + +.sinclude "Makefile.inc" + +# this file gets generated by configure +.sinclude "Makefile.config" + +.if !empty(LIBOBJS) +SRCS+= ${LIBOBJS:T:.o=.c} +.endif + +# just in case +prefix?= /usr +srcdir?= ${.CURDIR} + +DEFAULT_SYS_PATH?= ${prefix}/share/mk + +CPPFLAGS+= -DUSE_META +CFLAGS+= ${CPPFLAGS} +CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE +CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" + +.for x in FORCE_MACHINE FORCE_MACHINE_ARCH +.ifdef $x +COPTS.main.c+= "-D$x=\"${$x}\"" +.endif +.endfor + +# meta mode can be useful even without filemon +# should be set by now +USE_FILEMON ?= no +.if ${USE_FILEMON:tl} != "no" +.PATH: ${srcdir}/filemon +SRCS+= filemon_${USE_FILEMON}.c +COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} +COPTS.job.c+= ${COPTS.meta.c} + +.if ${USE_FILEMON} == "dev" +FILEMON_H ?= /usr/include/dev/filemon/filemon.h +.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" +COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} +.endif - .endif # USE_FILEMON == dev ++.elif ${USE_FILEMON} == "ktrace" ++COPTS.filemon_ktrace.c += -Wno-error=unused-parameter ++.endif + +.endif # USE_FILEMON + +.PATH: ${srcdir} + +.if make(obj) || make(clean) +SUBDIR+= unit-tests +.endif + + +MAN= ${PROG}.1 +MAN1= ${MAN} + +.if ${PROG} != "make" +CLEANFILES+= my.history +.if make(${MAN}) || !exists(${srcdir}/${MAN}) +my.history: + @(echo ".Nm"; \ + echo "is derived from NetBSD"; \ + echo ".Xr make 1 ."; \ + echo "It uses autoconf to facilitate portability to other platforms."; \ + echo ".Pp") > $@ + +.NOPATH: ${MAN} +${MAN}: make.1 my.history + @echo making $@ + @sed \ + -e '/^.Dt/s/MAKE/${PROG:tu}/' \ + -e 's/^.Nx/NetBSD/' \ + -e '/^.Nm/s/make/${PROG}/' \ + -e '/^.Sh HISTORY/rmy.history' \ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ + +all beforeinstall: ${MAN} +_mfromdir=. +.endif +.endif + +MANTARGET?= cat +MANDEST?= ${MANDIR}/${MANTARGET}1 + +.if ${MANTARGET} == "cat" +_mfromdir=${srcdir} +.endif + +.include + +CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H +COPTS.var.c += -Wno-cast-qual +COPTS.job.c += -Wno-format-nonliteral +COPTS.parse.c += -Wno-format-nonliteral +COPTS.var.c += -Wno-format-nonliteral + +# Force these +SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} +BINDIR= ${BINDIR.bmake:U${prefix}/bin} +MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} + +${OBJS}: config.h + + +# A simple unit-test driver to help catch regressions +TEST_MAKE ?= ${.OBJDIR}/${PROG:T} +accept test: .NOMETA + cd ${.CURDIR}/unit-tests && \ + MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}} + + +.if make(test) && ${MK_AUTO_OBJ} == "yes" +# The test target above visits unit-tests with -r -m / +# which prevents MK_AUTO_OBJ doing its job +# so do it here +.if defined(MAKEOBJDIRPREFIX) || ${MAKEOBJDIR:U:M*/*} != "" +_utobj = ${.OBJDIR}/unit-tests +.else +_utobj = ${.CURDIR}/unit-tests/${MAKEOBJDIR:Uobj} +.endif +utobj: .NOMETA + @test -d ${_utobj} && exit 0; \ + echo "[Creating ${_utobj}...]"; \ + umask ${OBJDIR_UMASK:U002}; \ + mkdir -p ${_utobj} +test: utobj +.endif + +# override some simple things +BINDIR= /usr/bin +MANDIR= /usr/share/man/man + +# make sure we get this +CFLAGS+= ${COPTS.${.IMPSRC:T}} + +after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk + cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk + diff --cc usr.bin/bmake/Makefile.config index 83920a75165b,000000000000..afaf0a1d15cd mode 100644,000000..100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@@ -1,28 -1,0 +1,28 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# +# $FreeBSD$ + +SRCTOP?= ${.CURDIR:H:H} + +# things set by configure + - _MAKE_VERSION?=20230510 ++_MAKE_VERSION?=20230622 + +prefix?= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= cc +DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk + +EGREP = egrep +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} -DHAVE_CONFIG_H +LDFLAGS+= +LIBOBJS+= ${LIBOBJDIR}stresep$U.o +LDADD+= +USE_META?= yes +USE_FILEMON?= dev +FILEMON_H?= /usr/include/dev/filemon/filemon.h +BMAKE_PATH_MAX?= 1024 +# used if MAXPATHLEN not defined +CPPFLAGS+= -DBMAKE_PATH_MAX=${BMAKE_PATH_MAX} diff --cc usr.bin/bmake/unit-tests/Makefile index cacf343d162f,000000000000..987dceae51ff mode 100644,000000..100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@@ -1,859 -1,0 +1,868 @@@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# +# $FreeBSD$ - # $Id: Makefile,v 1.195 2023/05/10 18:26:24 sjg Exp $ ++# $Id: Makefile,v 1.199 2023/06/20 17:27:20 sjg Exp $ +# - # $NetBSD: Makefile,v 1.335 2023/05/10 13:03:06 rillig Exp $ ++# $NetBSD: Makefile,v 1.339 2023/06/20 09:25:34 rillig Exp $ +# +# Unit tests for make(1) +# +# The main targets are: +# +# all: +# run all the tests +# test: +# run 'all', and compare to expected results +# accept: +# move generated output to expected results +# +# Settable variables +# +# TEST_MAKE +# The make program to be tested. +# +# +# Adding a test case +# +# Each feature should get its own set of tests in its own suitably +# named makefile (*.mk), with its own set of expected results (*.exp), +# and it should be added to the TESTS list. +# + +.MAIN: all + +# we use these below but we might be an older make +.MAKE.OS?= ${uname -s:L:sh} +.MAKE.UID?= ${id -u:L:sh} + +# for many tests we need a TMPDIR that will not collide +# with other users. +.if ${.OBJDIR} != ${.CURDIR} +# easy +TMPDIR:= ${.OBJDIR}/tmp +.elif defined(TMPDIR) +TMPDIR:= ${TMPDIR}/uid${.MAKE.UID} +.else +TMPDIR:= /tmp/uid${.MAKE.UID} +.endif +# make sure it exists +.if !exist(${TMPDIR}) +_!= mkdir -p ${TMPDIR} +.endif + +# Each test is in a sub-makefile. +# Keep the list sorted. +# Any test that is commented out must be ignored in +# src/tests/usr.bin/make/t_make.sh as well. +#TESTS+= archive +#TESTS+= archive-suffix +TESTS+= cmd-errors +TESTS+= cmd-errors-jobs +TESTS+= cmd-errors-lint +TESTS+= cmd-interrupt +TESTS+= cmdline +TESTS+= cmdline-redirect-stdin +TESTS+= cmdline-undefined +TESTS+= comment +TESTS+= compat-error +TESTS+= cond-cmp-numeric +TESTS+= cond-cmp-numeric-eq +TESTS+= cond-cmp-numeric-ge +TESTS+= cond-cmp-numeric-gt +TESTS+= cond-cmp-numeric-le +TESTS+= cond-cmp-numeric-lt +TESTS+= cond-cmp-numeric-ne +TESTS+= cond-cmp-string +TESTS+= cond-cmp-unary +TESTS+= cond-eof +TESTS+= cond-func +TESTS+= cond-func-commands +TESTS+= cond-func-defined +TESTS+= cond-func-empty +TESTS+= cond-func-exists +TESTS+= cond-func-make +TESTS+= cond-func-make-main +TESTS+= cond-func-target +TESTS+= cond-late +TESTS+= cond-op +TESTS+= cond-op-and +TESTS+= cond-op-and-lint +TESTS+= cond-op-not +TESTS+= cond-op-or +TESTS+= cond-op-or-lint +TESTS+= cond-op-parentheses +TESTS+= cond-short +TESTS+= cond-token-number +TESTS+= cond-token-plain +TESTS+= cond-token-string +TESTS+= cond-token-var +TESTS+= cond-undef-lint +TESTS+= counter +TESTS+= counter-append +TESTS+= dep +TESTS+= dep-colon +TESTS+= dep-colon-bug-cross-file +TESTS+= dep-double-colon +TESTS+= dep-double-colon-indep +TESTS+= dep-duplicate +TESTS+= dep-exclam +TESTS+= dep-none +TESTS+= dep-op-missing +TESTS+= dep-percent +TESTS+= dep-var +TESTS+= dep-wildcards +TESTS+= depsrc +TESTS+= depsrc-end +TESTS+= depsrc-exec +TESTS+= depsrc-ignore +TESTS+= depsrc-made +TESTS+= depsrc-make +TESTS+= depsrc-meta +TESTS+= depsrc-nometa +TESTS+= depsrc-nometa_cmp +TESTS+= depsrc-nopath +TESTS+= depsrc-notmain +TESTS+= depsrc-optional +TESTS+= depsrc-phony +TESTS+= depsrc-precious +TESTS+= depsrc-recursive +TESTS+= depsrc-silent +TESTS+= depsrc-use +TESTS+= depsrc-usebefore +TESTS+= depsrc-usebefore-double-colon +TESTS+= depsrc-wait +TESTS+= deptgt +TESTS+= deptgt-begin +TESTS+= deptgt-begin-fail +TESTS+= deptgt-begin-fail-indirect +TESTS+= deptgt-default +TESTS+= deptgt-delete_on_error +TESTS+= deptgt-end +TESTS+= deptgt-end-fail +TESTS+= deptgt-end-fail-all +TESTS+= deptgt-end-fail-indirect +TESTS+= deptgt-end-jobs +TESTS+= deptgt-error +TESTS+= deptgt-ignore +TESTS+= deptgt-interrupt +TESTS+= deptgt-main +TESTS+= deptgt-makeflags +TESTS+= deptgt-no_parallel +TESTS+= deptgt-nopath +TESTS+= deptgt-notparallel +TESTS+= deptgt-objdir +TESTS+= deptgt-order +TESTS+= deptgt-path +TESTS+= deptgt-path-suffix +TESTS+= deptgt-phony +TESTS+= deptgt-posix +TESTS+= deptgt-precious +TESTS+= deptgt-shell +TESTS+= deptgt-silent +TESTS+= deptgt-silent-jobs +TESTS+= deptgt-stale +TESTS+= deptgt-suffixes +TESTS+= dir +TESTS+= dir-expand-path +TESTS+= directive +TESTS+= directive-dinclude +TESTS+= directive-elif +TESTS+= directive-elifdef +TESTS+= directive-elifmake +TESTS+= directive-elifndef +TESTS+= directive-elifnmake +TESTS+= directive-else +TESTS+= directive-endfor +TESTS+= directive-endif +TESTS+= directive-error +TESTS+= directive-export +TESTS+= directive-export-env +TESTS+= directive-export-impl +TESTS+= directive-export-gmake +TESTS+= directive-export-literal +TESTS+= directive-for +TESTS+= directive-for-break +TESTS+= directive-for-empty +TESTS+= directive-for-errors +TESTS+= directive-for-escape +TESTS+= directive-for-generating-endif +TESTS+= directive-for-if +TESTS+= directive-for-lines +TESTS+= directive-for-null +TESTS+= directive-hyphen-include +TESTS+= directive-if +TESTS+= directive-if-nested +TESTS+= directive-ifdef +TESTS+= directive-ifmake +TESTS+= directive-ifndef +TESTS+= directive-ifnmake +TESTS+= directive-include +TESTS+= directive-include-fatal ++TESTS+= directive-include-guard +TESTS+= directive-info +TESTS+= directive-misspellings +TESTS+= directive-sinclude +TESTS+= directive-undef +TESTS+= directive-unexport +TESTS+= directive-unexport-env +TESTS+= directive-warning +TESTS+= dollar +TESTS+= doterror +TESTS+= dotwait +TESTS+= error +TESTS+= # escape # broken by reverting POSIX changes +TESTS+= export +TESTS+= export-all +TESTS+= export-env +TESTS+= export-variants - TESTS+= forsubst +TESTS+= gnode-submake +TESTS+= hanoi-include +TESTS+= impsrc +TESTS+= include-main +TESTS+= job-flags +#TESTS+= job-output-long-lines +TESTS+= job-output-null +TESTS+= jobs-empty-commands +TESTS+= jobs-empty-commands-error +TESTS+= jobs-error-indirect +TESTS+= jobs-error-nested +TESTS+= jobs-error-nested-make +TESTS+= lint +TESTS+= make-exported +TESTS+= meta-cmd-cmp +TESTS+= moderrs - TESTS+= modmatch +TESTS+= modmisc +.if ${.MAKE.UID} > 0 +TESTS+= objdir-writable +.endif +TESTS+= opt +TESTS+= opt-backwards +TESTS+= opt-chdir +TESTS+= opt-debug +TESTS+= opt-debug-all +TESTS+= opt-debug-archive +TESTS+= opt-debug-curdir *** 623 LINES SKIPPED *** From nobody Tue Jun 27 21:02: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 4QrHH103y4z4kcXs; Tue, 27 Jun 2023 21:02: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 4QrHH06V56z4Xmx; Tue, 27 Jun 2023 21:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PPIKmr1Q1p8SAjYVppQur7skshe1VBQrr0P3nKWFeB4=; b=ExLPVHoCTxMTj/K39tYECxeKfNRjUJBqcI2tyuY7jixiRZqzZwwr5DQhQSm3yUdnWiWS5V XGy2F9ffXkSSqw72AtP91GB7sw8TsJRAQoiveFzj8orAZwVIKo6KyzIdHKDK8MC9oT+DxL zls0E1Cmfqj/O4WrH854NxoXLMQv1mH7Z3spt5O+6aMQoUXf7TWyJA8Ln6wym3SRAJi22C e8a/7ABf9K0UXoVUDdufb2jlzzPi1NuvxTldLzUu91jP9X9Ura5Of1PIt2bnIE3jHZvPFE erQr3r5fUW10ckNsDOqsUILF1xfG3Way0yLqEcHohdy06bHcYXiVryK1yk56RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PPIKmr1Q1p8SAjYVppQur7skshe1VBQrr0P3nKWFeB4=; b=jPbRs7Tcyime7GqnavzyKwilfSRMdO7dABWIkfoZlwlJIdn4ehkfgISL81YKAJ3Kpf5qTa NXAnb7hBP1wJy7MO/jREcLPq/GQ/kahtPNyU8GVzSRGM/LXLvtptdRZwt1VkH+mn2MIDx2 yoV/PzJVNKZ8adsNhkFFo23tF2/vkl+sW8ZtsMnqI34ISRenEtqJyvgjSSQ0yvbhCE6rGX 5ZAylmtGjHm9nvYm7SAyC+nwtBS8l/NXaV0N5SwwhlR4VAJON0jfA9RVLisG+hHIMOuJEm +Z3ydh95hiEn7Ji75fxm9u3YYKHSW5N8rfUVRb4XBW2i+LGk/n3ik3lUiQShfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687899772; a=rsa-sha256; cv=none; b=EHjA0a60JsVBmaILBitTnSaUzatbNI1lcbj8bEVtU7I4YkdymHjkOJARuQz5zEFrEY6Goh LGVcVHwBt6G4vliu2iEQxEn3fj+zTPvpC8mh1D59UJBSXH0EZQEyYzgpFpUM6wmxbBYagr y2D8vztjELTMymzCyfVIRv/rjaNEPibbU7bneUYWTQNTMTov1kTDX00d16R11BcPveHxsf PHrWQ9O1lF6b4NXSeVrC7ZmqOyu7gRLdKIa3MuXaJKJLWsoC2TrRM/g+NjUXNBYfgoz791 mX+7ueGld6JgVxTYW89EkLS0YHKCv8ba2oD2WLatTWhaxbN7vbuLdu7azfFvxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrHH05Z5Zz176B; Tue, 27 Jun 2023 21:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RL2qFf097249; Tue, 27 Jun 2023 21:02:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RL2qDn097248; Tue, 27 Jun 2023 21:02:52 GMT (envelope-from git) Date: Tue, 27 Jun 2023 21:02:52 GMT Message-Id: <202306272102.35RL2qDn097248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 7d387749dcdd - stable/13 - e1000: Format em_txrx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7d387749dcdd61b8f423a3f39da79da18e08c00b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=7d387749dcdd61b8f423a3f39da79da18e08c00b commit 7d387749dcdd61b8f423a3f39da79da18e08c00b Author: Kevin Bowling AuthorDate: 2023-06-09 02:06:04 +0000 Commit: Kevin Bowling CommitDate: 2023-06-27 21:02:42 +0000 e1000: Format em_txrx No functional changes intended. Reviewed by: markj (prior version) Differential Revision: https://reviews.freebsd.org/D30072 (cherry picked from commit 5253d74e4650300815af351cc510a1c392a16584) --- sys/dev/e1000/em_txrx.c | 77 +++++++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index aebafca73cca..6bff741ba665 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -42,10 +42,10 @@ /********************************************************************* * Local Function prototypes *********************************************************************/ -static int em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, - u32 *txd_lower); -static int em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, - u32 *txd_upper, u32 *txd_lower); +static int em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, + uint32_t *txd_upper, uint32_t *txd_lower); +static int em_transmit_checksum_setup(struct e1000_softc *sc, + if_pkt_info_t pi, uint32_t *txd_upper, uint32_t *txd_lower); static int em_isc_txd_encap(void *arg, if_pkt_info_t pi); static void em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx); static int em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear); @@ -63,7 +63,7 @@ static int lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); static void em_receive_checksum(uint16_t, uint8_t, if_rxd_info_t); -static int em_determine_rsstype(u32 pkt_info); +static int em_determine_rsstype(uint32_t pkt_info); extern int em_intr(void *arg); struct if_txrx em_txrx = { @@ -116,7 +116,8 @@ em_dump_rs(struct e1000_softc *sc) cur = txr->tx_rsq[rs_cidx]; printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); } - printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); + printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, + txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { if (txr->tx_base[i].upper.fields.status & E1000_TXD_STAT_DD) printf("%d set ", i); @@ -132,7 +133,8 @@ em_dump_rs(struct e1000_softc *sc) * **********************************************************************/ static int -em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) +em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, + uint32_t *txd_lower) { if_softc_ctx_t scctx = sc->shared; struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; @@ -159,7 +161,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_ TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; TXD->lower_setup.ip_fields.ipcse = htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); - TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); + TXD->lower_setup.ip_fields.ipcso = + pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); /* * Start offset for payload checksum calculation. @@ -189,7 +192,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_ if (++cur == scctx->isc_ntxd[0]) { cur = 0; } - DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, pi->ipi_pidx, cur); + DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, + pi->ipi_pidx, cur); return (cur); } @@ -215,15 +219,16 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_ **********************************************************************/ static int -em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) +em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, + uint32_t *txd_upper, uint32_t *txd_lower) { - struct e1000_context_desc *TXD = NULL; + struct e1000_context_desc *TXD = NULL; if_softc_ctx_t scctx = sc->shared; struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; struct tx_ring *txr = &que->txr; int csum_flags = pi->ipi_csum_flags; int cur, hdr_len; - u32 cmd; + uint32_t cmd; cur = pi->ipi_pidx; hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen; @@ -260,7 +265,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_up */ TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; TXD->lower_setup.ip_fields.ipcse = htole16(hdr_len); - TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); + TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + + offsetof(struct ip, ip_sum); cmd |= E1000_TXD_CMD_IP; } @@ -293,8 +299,9 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_up if (++cur == scctx->isc_ntxd[0]) { cur = 0; } - DPRINTF(iflib_get_dev(sc->ctx), "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", - csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); + DPRINTF(iflib_get_dev(sc->ctx), + "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", + csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); return (cur); } @@ -309,7 +316,7 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) int nsegs = pi->ipi_nsegs; int csum_flags = pi->ipi_csum_flags; int i, j, first, pidx_last; - u32 txd_flags, txd_upper = 0, txd_lower = 0; + uint32_t txd_flags, txd_upper = 0, txd_lower = 0; struct e1000_tx_desc *ctxd = NULL; bool do_tso, tso_desc; @@ -347,7 +354,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) txd_lower |= htole32(E1000_TXD_CMD_VLE); } - DPRINTF(iflib_get_dev(sc->ctx), "encap: set up tx: nsegs=%d first=%d i=%d\n", nsegs, first, i); + DPRINTF(iflib_get_dev(sc->ctx), + "encap: set up tx: nsegs=%d first=%d i=%d\n", nsegs, first, i); /* XXX sc->pcix_82544 -- lem_fill_descriptors */ /* Set up our transmit descriptors */ @@ -383,7 +391,9 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = i; if (++i == scctx->isc_ntxd[0]) i = 0; - DPRINTF(iflib_get_dev(sc->ctx), "TSO path pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); + DPRINTF(iflib_get_dev(sc->ctx), + "TSO path pidx_last=%d i=%d ntxd[0]=%d\n", + pidx_last, i, scctx->isc_ntxd[0]); } else { ctxd->buffer_addr = htole64(seg_addr); ctxd->lower.data = htole32(cmd | txd_lower | seg_len); @@ -391,7 +401,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = i; if (++i == scctx->isc_ntxd[0]) i = 0; - DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); + DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", + pidx_last, i, scctx->isc_ntxd[0]); } } @@ -402,12 +413,15 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) */ if (txd_flags && nsegs) { txr->tx_rsq[txr->tx_rs_pidx] = pidx_last; - DPRINTF(iflib_get_dev(sc->ctx), "setting to RS on %d rs_pidx %d first: %d\n", pidx_last, txr->tx_rs_pidx, first); + DPRINTF(iflib_get_dev(sc->ctx), + "setting to RS on %d rs_pidx %d first: %d\n", + pidx_last, txr->tx_rs_pidx, first); txr->tx_rs_pidx = (txr->tx_rs_pidx+1) & (ntxd-1); MPASS(txr->tx_rs_pidx != txr->tx_rs_cidx); } ctxd->lower.data |= htole32(E1000_TXD_CMD_EOP | txd_flags); - DPRINTF(iflib_get_dev(sc->ctx), "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); + DPRINTF(iflib_get_dev(sc->ctx), + "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); pi->ipi_new_pidx = i; return (0); @@ -538,7 +552,8 @@ em_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct e1000_softc *sc = arg; struct em_rx_queue *que = &sc->rx_queues[rxqid]; @@ -555,7 +570,7 @@ lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct rx_ring *rxr = &que->rxr; struct e1000_rx_desc *rxd; - u32 staterr = 0; + uint32_t staterr = 0; int cnt, i; for (cnt = 0, i = idx; cnt < scctx->isc_nrxd[0] && cnt <= budget;) { @@ -580,7 +595,7 @@ em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct rx_ring *rxr = &que->rxr; union e1000_rx_desc_extended *rxd; - u32 staterr = 0; + uint32_t staterr = 0; int cnt, i; for (cnt = 0, i = idx; cnt < scctx->isc_nrxd[0] && cnt <= budget;) { @@ -605,8 +620,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) struct em_rx_queue *que = &sc->rx_queues[ri->iri_qsidx]; struct rx_ring *rxr = &que->rxr; struct e1000_rx_desc *rxd; - u16 len; - u32 status, errors; + uint16_t len; + uint32_t status, errors; bool eop; int i, cidx; @@ -667,9 +682,9 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) struct rx_ring *rxr = &que->rxr; union e1000_rx_desc_extended *rxd; - u16 len; - u32 pkt_info; - u32 staterr = 0; + uint16_t len; + uint32_t pkt_info; + uint32_t staterr = 0; bool eop; int i, cidx; @@ -756,7 +771,7 @@ em_receive_checksum(uint16_t status, uint8_t errors, if_rxd_info_t ri) * ******************************************************************/ static int -em_determine_rsstype(u32 pkt_info) +em_determine_rsstype(uint32_t pkt_info) { switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) { case E1000_RXDADV_RSSTYPE_IPV4_TCP: @@ -765,7 +780,7 @@ em_determine_rsstype(u32 pkt_info) return M_HASHTYPE_RSS_IPV4; case E1000_RXDADV_RSSTYPE_IPV6_TCP: return M_HASHTYPE_RSS_TCP_IPV6; - case E1000_RXDADV_RSSTYPE_IPV6_EX: + case E1000_RXDADV_RSSTYPE_IPV6_EX: return M_HASHTYPE_RSS_IPV6_EX; case E1000_RXDADV_RSSTYPE_IPV6: return M_HASHTYPE_RSS_IPV6; From nobody Tue Jun 27 21:02: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 4QrHH22kC0z4kcQH; Tue, 27 Jun 2023 21:02: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 4QrHH20xJZz4Xf1; Tue, 27 Jun 2023 21:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KoT626S7U2Wj7LoS2oTSTQmLn14ApHfCZt/uHd+MVZg=; b=A1EHmYMUeHzHSnSoi4U8tIlNFJE02uqpKYc9HdUoRRXN16U+u+l1SZ1ZcJRE+Q8AXw/tZW wbNSbwBprseTr/JrAXHVlDvGw4ddlELZTwBhFtIKZfkwTqSR6z92tnJHdhprSK7lA+HcmP CTpqa66uCFiwXMsEJAgFlNn3/hBATSUC3+3sFssbNuS6/LJow7eDAYM2C5K9+qrX+1VgYp 8jnZKpdALHhh45b3oLfEGwpV6jZ55Dp3JXq5f1c6yu2zgWQjQOieX8S3C9LeSP9EnpGwg1 U5JyPunmLQjOuhyFx73PiQGLYW6TlRZ9Szs4nvJqy6FsfCG76ztfYmBGMU88rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KoT626S7U2Wj7LoS2oTSTQmLn14ApHfCZt/uHd+MVZg=; b=OTRnejS7fZ1EavZs5DRfvP9mB2Ag7Nb/kGttk+fy0u/je/10axqU6UhSbq/jtcy7ZxeCVt g0Ex4h8htRBay9Mb/V9+Lmtbs9dGCzwuVy74qAlh8TN3PpU2hWf7bri3O4Yhnrcb57zEp9 PE9UG0dGTTgylpwz4Px9mVIOfN1rkNdhZifQ+Hd2KWFjzZLIEhlgIksfmFM6lbRubhlZbD BxetuCUqRJ6Z+gBq0PMV6YKr2lEVZf1loDeQmOfszt1llQ7ditDIEvY8qJUpwN/mnSewbi XCb2pTq5BxY65b6sSVrvvVVrnD1657i3mtO5/f2qi74xvXLdE2P/aD7x7Qprkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687899774; a=rsa-sha256; cv=none; b=WaO4pQ3bDjfWAZvr8Q0uisoWOJUg13UhEu/L9m2n7NPvPq4zhXR9kneqMJNnXrbNNBYQx6 nGnff7OOh1W4NhTXCbmRmOTm5uqKJeewiCpIiGIIEnMsar2nRTGG8aE9QmeCstzBWEUmEJ uW6y3RBSrtOscLoaylosV6LmoaLxvElL4FT0TZpI1sLMhYOmOFAHDgO9RXW10s/g9hmiTz 7LCJLz2ru1OQkvcAd79f43dWJ3FzRDbbOcYL9fiY7PSppT4MnWKp1yz5L7WY+BzClRuQcA 3Enx9PZLzNPZCLbW5AUBzTFLrbqrl+/Q/DvYxz1hQuenCvW0NYMCwHQaoqw7bA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrHH16jWGz176C; Tue, 27 Jun 2023 21:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RL2r2Z097273; Tue, 27 Jun 2023 21:02:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RL2rWs097272; Tue, 27 Jun 2023 21:02:53 GMT (envelope-from git) Date: Tue, 27 Jun 2023 21:02:53 GMT Message-Id: <202306272102.35RL2rWs097272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 0b6e5abfb855 - stable/13 - e1000: Add SPDX tag to em_txrx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0b6e5abfb855df990c846ef45b90390e561b02e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0b6e5abfb855df990c846ef45b90390e561b02e3 commit 0b6e5abfb855df990c846ef45b90390e561b02e3 Author: Kevin Bowling AuthorDate: 2023-06-09 01:42:20 +0000 Commit: Kevin Bowling CommitDate: 2023-06-27 21:02:42 +0000 e1000: Add SPDX tag to em_txrx Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D30072 (cherry picked from commit 034f38cdf864e6794fd63b67bf16c59627576699) --- sys/dev/e1000/em_txrx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 6bff741ba665..255aea6347d2 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2016 Nicole Graziano * Copyright (c) 2017 Matthew Macy * All rights reserved. From nobody Tue Jun 27 21:03: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 4QrHJ42lGLz4kd52; Tue, 27 Jun 2023 21:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrHJ421jMz4Ybt; Tue, 27 Jun 2023 21:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kdNyd0TJfJhggjKXNuM3e5fTfBk2/2VaBdwE6hFw09A=; b=fyurZbqwXZODfjNCBsnBpsNsJCp+gH4tGxVUW8S8whZwXCS830WndYOwoBbjsL2Ul0XFxO fYqPx5phGdjQswr+hvZyWVjT72qF+HwBQ9EyqrBWReIxv/g74R9FDEUBwTctpmomWFkg9x RBgMNTPdOQOozDSIeG4HUI23lXH818X53ehjcEO7vAIabIuWg6r9DRDaEAeNKSoA+Zs/HP bQfChwEhozpmkKfvgRPXVMzK8yBfyjpcrfVRrACvz3DBKp9Az4CiBiywxrifNytf+xsAOX B5SiIYI2drmRLSTTkGvpkiSfGgcfnNJ764aACask/rFKaHAVC+qnB68Z900Dxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kdNyd0TJfJhggjKXNuM3e5fTfBk2/2VaBdwE6hFw09A=; b=DoSR/yNkGcr1nv0pv8e0K2m1CN1kP9cZ3gZaLZfTT+dPeTykiGSpQ1q41ClIW/+gismSjJ CsazHzgSH6VOQ/uGyLonG7ZDXUrJc+zkPm1wvp4rLpvtt3B5JlqXE3entTjEgxecx9cEcF GaKefBaCKiAGX8IMfHYXq44mKl46fUe6O+4o7kYNoXqcwEDmSHj3UUd1dfjh2f33u08FIt r6+UR85B/DdnegOAC/gQbTWaeTTnGD476RAfhkLitXGUrSeSEBGpKqbujLhgRu+4FIONHY qWe6Jl9DTy8PZ166km4jZAYV7DhxqKN7MlyoCey7tcx0bEMLCrbNenw7q3d7lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687899828; a=rsa-sha256; cv=none; b=dxYgrZBuD8T9Ayrl0efaHEb0WJRcDHmS0OZG4TGi89+pP4kFOa1rVQsfM+D1vdJbXi3xIr aM8E02Bm6hhNn8ElgqPgWgPHXVAOkOCdaxl0otGFLSjKtZZLLlk3lSd5rcs+fMewjug9Ej u/4+SHA2ai6+rpFQR2COU2bBABBgAoKPMTmtYeARbio1zWSPwPOoOU4YFqnIpfr/RLRJjJ fRS2riOJ5AAuqJdmmJem4OBw2Z6T01znUUlu5oihKCzXzG02siRhWLdMwqxIHoR/Dw4B2h VNfUtAYFIZSjUpUydzn9NhCCi77cGyLxanpS0Wds6A7fIbkZOnbzX+X+GQ2Mnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrHJ4157Bz16s9; Tue, 27 Jun 2023 21:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RL3mQw097605; Tue, 27 Jun 2023 21:03:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RL3mbq097604; Tue, 27 Jun 2023 21:03:48 GMT (envelope-from git) Date: Tue, 27 Jun 2023 21:03:48 GMT Message-Id: <202306272103.35RL3mbq097604@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: ef747607ead4 - main - vm_fault: move FAULT_* return codes out of range for Mach 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: ef747607ead43552cb3ebb093fadd2c39c56a36d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ef747607ead43552cb3ebb093fadd2c39c56a36d commit ef747607ead43552cb3ebb093fadd2c39c56a36d Author: Konstantin Belousov AuthorDate: 2023-06-27 11:41:14 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-27 21:03:14 +0000 vm_fault: move FAULT_* return codes out of range for Mach errors This way a possible clash between FAULT_* and KERN_* numbering is avoided, and panics checks for fault_status confusion become more efficient. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D40771 --- sys/vm/vm_fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 1f9063a5988a..8b4b8ebb7375 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -161,7 +161,7 @@ struct faultstate { * Return codes for internal fault routines. */ enum fault_status { - FAULT_SUCCESS = 1, /* Return success to user. */ + FAULT_SUCCESS = 10000, /* Return success to user. */ FAULT_FAILURE, /* Return failure to user. */ FAULT_CONTINUE, /* Continue faulting. */ FAULT_RESTART, /* Restart fault. */ From nobody Tue Jun 27 21:03: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 4QrHJ86b6yz4kdP1; Tue, 27 Jun 2023 21:03: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 4QrHJ85x1Rz4Ygy; Tue, 27 Jun 2023 21:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cZjdPG1nML3cojp8TY6IuNWoqe8lWfmSaWgIriLNzTI=; b=o0NDHlrkvsTH+xLyiqyF/2r+GHJnCGbMjGepeL7ix8ymbXEsXVeRydCq4C3xvtMXP7yZke Qp56fgjCrmiK5lyiRbV7zMBrbFVMSUZfzFGDN65/huIbgFHnX73FtMhg9JvHuSsSGDiHwP 4QcdNmYpxuQHZpgHYZBIpaGN5BpkQ05RKewh07P5ABPhBzMxfED5eXoFtkN5jr1Klp8U8P +38wDhYWjKXLqjIv3vMaB47eMJkM7kN5m9z6m4qEu/s4chgQSfflDrpPY6zDKe/fbbIHVo nCH0FCfcbMxsCgO6wlO7R5wQf32ISvVt6l3ThGynODKs5a6hiD+atc4R8/7+ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cZjdPG1nML3cojp8TY6IuNWoqe8lWfmSaWgIriLNzTI=; b=kH1wRMu2Wg9qt1GBkV5UDCLnxM4SyIYjunHvrbj+kp9OE/R0HyD0Xe/pXu1/rqNNL4MWoA 2cvhJm+lJhR2K5qfeeG2XA6Ba6CFvCsZLYruPFSyMxNaYpzFVrlH76X+trjZ1IDK2tVlae y42v+9O5xWLxDV75CM0Eexc9AFqG4g4Y2YRWt8M9YsZ1uNWzd9M14WTfg+XlqwndByGqRw yi1kUr7C7zGmdiRMsOxp01WjGmCh70N1zXEsTewgK2XqybMUjwsCdgr9ZF4YeaSZQs3+Pn fUeKSKZWMCaS9xXqPHhoerU9MrWveTqAtyxO3ZU4ixLDVp2wmdl4ObNeMJLukA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687899832; a=rsa-sha256; cv=none; b=i+fwp9lPb44m9O0/xtNVzeNbvEfWuowqR7G7tLPHcnoPmzd8QUARGGFGS++G1HaiMBE82p UlYb3tWhma9eA2VJxUF4albQxnWkiixVNOJxpC+GY2MM0xH3IXyC2NDd/LJD5HBuQsRpct m/ZQrxPSvqJvdK1FCorW6XpQtOv096myGBXYmRzUVeTMwdwWxb0j9Whf+xz0cf/4poP93W 9xkLnudL0cJJP1DbQe1r/uqu72xA8c8MwiEVUy7MNnBfh64b7n2ddSMLZGJLdb37XnCx7N de1xzg+ksVuJoUkUlSjHLEkzwnmSt6rTnCqqDBpBNOKwKGMNi7bTwcOsDaHjLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrHJ84zGMz16sB; Tue, 27 Jun 2023 21:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RL3qxB097733; Tue, 27 Jun 2023 21:03:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RL3qDw097732; Tue, 27 Jun 2023 21:03:52 GMT (envelope-from git) Date: Tue, 27 Jun 2023 21:03:52 GMT Message-Id: <202306272103.35RL3qDw097732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 670a17e9f978 - stable/12 - e1000: Format em_txrx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 670a17e9f978a2821960fe3dcd4773469921b14d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=670a17e9f978a2821960fe3dcd4773469921b14d commit 670a17e9f978a2821960fe3dcd4773469921b14d Author: Kevin Bowling AuthorDate: 2023-06-09 02:06:04 +0000 Commit: Kevin Bowling CommitDate: 2023-06-27 21:03:36 +0000 e1000: Format em_txrx No functional changes intended. Reviewed by: markj (prior version) Differential Revision: https://reviews.freebsd.org/D30072 (cherry picked from commit 5253d74e4650300815af351cc510a1c392a16584) --- sys/dev/e1000/em_txrx.c | 77 +++++++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index aebafca73cca..6bff741ba665 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -42,10 +42,10 @@ /********************************************************************* * Local Function prototypes *********************************************************************/ -static int em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, - u32 *txd_lower); -static int em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, - u32 *txd_upper, u32 *txd_lower); +static int em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, + uint32_t *txd_upper, uint32_t *txd_lower); +static int em_transmit_checksum_setup(struct e1000_softc *sc, + if_pkt_info_t pi, uint32_t *txd_upper, uint32_t *txd_lower); static int em_isc_txd_encap(void *arg, if_pkt_info_t pi); static void em_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx); static int em_isc_txd_credits_update(void *arg, uint16_t txqid, bool clear); @@ -63,7 +63,7 @@ static int lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, static int lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri); static void em_receive_checksum(uint16_t, uint8_t, if_rxd_info_t); -static int em_determine_rsstype(u32 pkt_info); +static int em_determine_rsstype(uint32_t pkt_info); extern int em_intr(void *arg); struct if_txrx em_txrx = { @@ -116,7 +116,8 @@ em_dump_rs(struct e1000_softc *sc) cur = txr->tx_rsq[rs_cidx]; printf("qid[%d]->tx_rsq[rs_cidx-1=%d]: %d ", qid, rs_cidx, cur); } - printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, txr->tx_rs_pidx); + printf("cidx_prev=%d rs_pidx=%d ",txr->tx_cidx_processed, + txr->tx_rs_pidx); for (i = 0; i < ntxd; i++) { if (txr->tx_base[i].upper.fields.status & E1000_TXD_STAT_DD) printf("%d set ", i); @@ -132,7 +133,8 @@ em_dump_rs(struct e1000_softc *sc) * **********************************************************************/ static int -em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) +em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, uint32_t *txd_upper, + uint32_t *txd_lower) { if_softc_ctx_t scctx = sc->shared; struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; @@ -159,7 +161,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_ TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; TXD->lower_setup.ip_fields.ipcse = htole16(pi->ipi_ehdrlen + pi->ipi_ip_hlen - 1); - TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); + TXD->lower_setup.ip_fields.ipcso = + pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); /* * Start offset for payload checksum calculation. @@ -189,7 +192,8 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_ if (++cur == scctx->isc_ntxd[0]) { cur = 0; } - DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, pi->ipi_pidx, cur); + DPRINTF(iflib_get_dev(sc->ctx), "%s: pidx: %d cur: %d\n", __FUNCTION__, + pi->ipi_pidx, cur); return (cur); } @@ -215,15 +219,16 @@ em_tso_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_ **********************************************************************/ static int -em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_upper, u32 *txd_lower) +em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, + uint32_t *txd_upper, uint32_t *txd_lower) { - struct e1000_context_desc *TXD = NULL; + struct e1000_context_desc *TXD = NULL; if_softc_ctx_t scctx = sc->shared; struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; struct tx_ring *txr = &que->txr; int csum_flags = pi->ipi_csum_flags; int cur, hdr_len; - u32 cmd; + uint32_t cmd; cur = pi->ipi_pidx; hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen; @@ -260,7 +265,8 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_up */ TXD->lower_setup.ip_fields.ipcss = pi->ipi_ehdrlen; TXD->lower_setup.ip_fields.ipcse = htole16(hdr_len); - TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + offsetof(struct ip, ip_sum); + TXD->lower_setup.ip_fields.ipcso = pi->ipi_ehdrlen + + offsetof(struct ip, ip_sum); cmd |= E1000_TXD_CMD_IP; } @@ -293,8 +299,9 @@ em_transmit_checksum_setup(struct e1000_softc *sc, if_pkt_info_t pi, u32 *txd_up if (++cur == scctx->isc_ntxd[0]) { cur = 0; } - DPRINTF(iflib_get_dev(sc->ctx), "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", - csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); + DPRINTF(iflib_get_dev(sc->ctx), + "checksum_setup csum_flags=%x txd_upper=%x txd_lower=%x hdr_len=%d cmd=%x\n", + csum_flags, *txd_upper, *txd_lower, hdr_len, cmd); return (cur); } @@ -309,7 +316,7 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) int nsegs = pi->ipi_nsegs; int csum_flags = pi->ipi_csum_flags; int i, j, first, pidx_last; - u32 txd_flags, txd_upper = 0, txd_lower = 0; + uint32_t txd_flags, txd_upper = 0, txd_lower = 0; struct e1000_tx_desc *ctxd = NULL; bool do_tso, tso_desc; @@ -347,7 +354,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) txd_lower |= htole32(E1000_TXD_CMD_VLE); } - DPRINTF(iflib_get_dev(sc->ctx), "encap: set up tx: nsegs=%d first=%d i=%d\n", nsegs, first, i); + DPRINTF(iflib_get_dev(sc->ctx), + "encap: set up tx: nsegs=%d first=%d i=%d\n", nsegs, first, i); /* XXX sc->pcix_82544 -- lem_fill_descriptors */ /* Set up our transmit descriptors */ @@ -383,7 +391,9 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = i; if (++i == scctx->isc_ntxd[0]) i = 0; - DPRINTF(iflib_get_dev(sc->ctx), "TSO path pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); + DPRINTF(iflib_get_dev(sc->ctx), + "TSO path pidx_last=%d i=%d ntxd[0]=%d\n", + pidx_last, i, scctx->isc_ntxd[0]); } else { ctxd->buffer_addr = htole64(seg_addr); ctxd->lower.data = htole32(cmd | txd_lower | seg_len); @@ -391,7 +401,8 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) pidx_last = i; if (++i == scctx->isc_ntxd[0]) i = 0; - DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", pidx_last, i, scctx->isc_ntxd[0]); + DPRINTF(iflib_get_dev(sc->ctx), "pidx_last=%d i=%d ntxd[0]=%d\n", + pidx_last, i, scctx->isc_ntxd[0]); } } @@ -402,12 +413,15 @@ em_isc_txd_encap(void *arg, if_pkt_info_t pi) */ if (txd_flags && nsegs) { txr->tx_rsq[txr->tx_rs_pidx] = pidx_last; - DPRINTF(iflib_get_dev(sc->ctx), "setting to RS on %d rs_pidx %d first: %d\n", pidx_last, txr->tx_rs_pidx, first); + DPRINTF(iflib_get_dev(sc->ctx), + "setting to RS on %d rs_pidx %d first: %d\n", + pidx_last, txr->tx_rs_pidx, first); txr->tx_rs_pidx = (txr->tx_rs_pidx+1) & (ntxd-1); MPASS(txr->tx_rs_pidx != txr->tx_rs_cidx); } ctxd->lower.data |= htole32(E1000_TXD_CMD_EOP | txd_flags); - DPRINTF(iflib_get_dev(sc->ctx), "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); + DPRINTF(iflib_get_dev(sc->ctx), + "tx_buffers[%d]->eop = %d ipi_new_pidx=%d\n", first, pidx_last, i); pi->ipi_new_pidx = i; return (0); @@ -538,7 +552,8 @@ em_isc_rxd_refill(void *arg, if_rxd_update_t iru) } static void -em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, qidx_t pidx) +em_isc_rxd_flush(void *arg, uint16_t rxqid, uint8_t flid __unused, + qidx_t pidx) { struct e1000_softc *sc = arg; struct em_rx_queue *que = &sc->rx_queues[rxqid]; @@ -555,7 +570,7 @@ lem_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct rx_ring *rxr = &que->rxr; struct e1000_rx_desc *rxd; - u32 staterr = 0; + uint32_t staterr = 0; int cnt, i; for (cnt = 0, i = idx; cnt < scctx->isc_nrxd[0] && cnt <= budget;) { @@ -580,7 +595,7 @@ em_isc_rxd_available(void *arg, uint16_t rxqid, qidx_t idx, qidx_t budget) struct em_rx_queue *que = &sc->rx_queues[rxqid]; struct rx_ring *rxr = &que->rxr; union e1000_rx_desc_extended *rxd; - u32 staterr = 0; + uint32_t staterr = 0; int cnt, i; for (cnt = 0, i = idx; cnt < scctx->isc_nrxd[0] && cnt <= budget;) { @@ -605,8 +620,8 @@ lem_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) struct em_rx_queue *que = &sc->rx_queues[ri->iri_qsidx]; struct rx_ring *rxr = &que->rxr; struct e1000_rx_desc *rxd; - u16 len; - u32 status, errors; + uint16_t len; + uint32_t status, errors; bool eop; int i, cidx; @@ -667,9 +682,9 @@ em_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) struct rx_ring *rxr = &que->rxr; union e1000_rx_desc_extended *rxd; - u16 len; - u32 pkt_info; - u32 staterr = 0; + uint16_t len; + uint32_t pkt_info; + uint32_t staterr = 0; bool eop; int i, cidx; @@ -756,7 +771,7 @@ em_receive_checksum(uint16_t status, uint8_t errors, if_rxd_info_t ri) * ******************************************************************/ static int -em_determine_rsstype(u32 pkt_info) +em_determine_rsstype(uint32_t pkt_info) { switch (pkt_info & E1000_RXDADV_RSSTYPE_MASK) { case E1000_RXDADV_RSSTYPE_IPV4_TCP: @@ -765,7 +780,7 @@ em_determine_rsstype(u32 pkt_info) return M_HASHTYPE_RSS_IPV4; case E1000_RXDADV_RSSTYPE_IPV6_TCP: return M_HASHTYPE_RSS_TCP_IPV6; - case E1000_RXDADV_RSSTYPE_IPV6_EX: + case E1000_RXDADV_RSSTYPE_IPV6_EX: return M_HASHTYPE_RSS_IPV6_EX; case E1000_RXDADV_RSSTYPE_IPV6: return M_HASHTYPE_RSS_IPV6; From nobody Tue Jun 27 21:03: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 4QrHJB19P1z4kdKJ; Tue, 27 Jun 2023 21:03:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrHJ974ldz4YsM; Tue, 27 Jun 2023 21:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JLtBXPC9cAGiAGQ1I0g4WNrO5gJ1QoJtetdHYla0NF8=; b=lTisA2xDlrv7NiPNlWEB1UHcP+bOLUUWMERkGq8o2oxq7TrEVbFIaKaHuOfNyI2b5RM989 5sYs+iehdGTjtAv7+undzLIT6LqlGw7XGjEEeFpG8F8QAkiNAyf4JhQ9hrNiKobLgDyV6W +aG9H1UHdz3jg8sEzKZm+0xkhNboZEnIwJeA4BARNTOHMSEUT6QGLGiRIpdgD/3kH5fiBj Vpc1C6APEjkUQBi0FxMkFYNjfwJ41c42y2/Mu4E4YZyvXEyHectnsxNwbK9Y/DJ7Fh/NqU jEybAT+6YZGHv8TC7L1b2QDmlVfupYVZ1f54SqdDU0J6tFWzYy/RmYS0Abgkfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687899834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JLtBXPC9cAGiAGQ1I0g4WNrO5gJ1QoJtetdHYla0NF8=; b=H6vqVveshwNlAnRXMrzMlwFJHM6NTNPrP+DQRE8JTMP68jpE6b7zvZiEljuTO74AvoyWyk 2tqix7/7PFsWMaR74LQ45x2C7b3OSugeLUKoKLx7atS5E2MOXkdU/rOhVL7rsNgbxpIV4Y WHDv6aysIbB4dRpVR+x5Z4G8O1ZOmlGVQuDmtM24rELD73NN5/yIHmMaakhIh23NRzqaio 07jOAuQI7QxlQbqy1U0X1lnfyXfjgyzVQrsxsrpDkbVIpydhHi+7GJ7w0GARXvgIyQ3v7H gzb1P9TUpiwz4t/5NOWIc9bI+Ih56EzmC9egXnwCypCW/P2ub2d+NmfnxgqWaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687899834; a=rsa-sha256; cv=none; b=CV7kotqkBVE5mDUETPKeDd21na80ww6IaniJjiuT2LUgDOcNun5J62wq+Xfg6ygtdPtxqH hUGH6l8D5xLHpg++B+yCltVBLxCdJqv+9fwM5IKjEL39SqdksNugUCBnSOVM1QYO+dWM2o +OWnT0Nk7/8XD9oMG7nnnEazClG5jXTJMi8Tm3R3PZRlFmd6eqF09YTWoQjLC7uMxGp16m SOfwK2Ex3opja39qy8s+JdRKwXWdY3SN1atzakDkM0OLx/r+xlMlSBIQ9rsnv6Yaij1H7J 7Pn/WAvSRZXltzK1RoiCmj73lKxNf+ElFGP+vlhbwOGVP4fl2ZHHAqtOBjNAGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrHJ95vFrz16m9; Tue, 27 Jun 2023 21:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RL3rcD097756; Tue, 27 Jun 2023 21:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RL3rpF097755; Tue, 27 Jun 2023 21:03:53 GMT (envelope-from git) Date: Tue, 27 Jun 2023 21:03:53 GMT Message-Id: <202306272103.35RL3rpF097755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: dac6aa05f8da - stable/12 - e1000: Add SPDX tag to em_txrx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: dac6aa05f8da6421bc2e18be65a342a75ef31029 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=dac6aa05f8da6421bc2e18be65a342a75ef31029 commit dac6aa05f8da6421bc2e18be65a342a75ef31029 Author: Kevin Bowling AuthorDate: 2023-06-09 01:42:20 +0000 Commit: Kevin Bowling CommitDate: 2023-06-27 21:03:43 +0000 e1000: Add SPDX tag to em_txrx Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D30072 (cherry picked from commit 034f38cdf864e6794fd63b67bf16c59627576699) --- sys/dev/e1000/em_txrx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/e1000/em_txrx.c b/sys/dev/e1000/em_txrx.c index 6bff741ba665..255aea6347d2 100644 --- a/sys/dev/e1000/em_txrx.c +++ b/sys/dev/e1000/em_txrx.c @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2016 Nicole Graziano * Copyright (c) 2017 Matthew Macy * All rights reserved. From nobody Tue Jun 27 22: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 4QrKC30Rdpz4l01l; Tue, 27 Jun 2023 22:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrKC301M9z3tQT; Tue, 27 Jun 2023 22:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687904975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMS2rAhuTdc5Gqe8hO6JHVkYUcH0HvzM9sqKNkc5crg=; b=ZJHjON38BZ1SHzCHfyg9eqLZNqBu5lgFz5qEy7nQ6l2G+2boFwwD3px9HdsoeEPxgNpj9R oF5cfJiz7d17ieDlzeKBZEAksxdhyw9yq9sPGg9Oi56b1XntJm/dIhV4lqEIl3HIsZ2xj1 U7ww5USS3k4sAhhe31TKobVZlgBhd+8HpzWYdBvs7Mam51FcVdXrjX6OCk6wT70z7De5k0 K/m4BunV0ki0qtnGSaSfKN1dhyjNnlsXdhKfr4iL/q10lAFka+A10pTiFO1mVSX8i6HA4w vloIEyVZD+qMfuFXEjQ3OodOj/zc2LvSd6Y7BwgKIy1bF9SsEkH+gC5MGwEYmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687904975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMS2rAhuTdc5Gqe8hO6JHVkYUcH0HvzM9sqKNkc5crg=; b=msfvZq/Um+BeOpZrn05Oel4XXZ1Ywckw6547S9+1+5xcTQlZNlT6ZzDwQ3XO87/6uIPY5f vL4h+GV46wZq2dcIv3pdmYEWEaf6q9XTgxGNo4HFTUt18AQL2GtEnAVyhVII8O65ZoE7nS k7b5gB/orINUK4Z56gg5TwJv59zUP/FjuLcz42cm3w3vS2qvDXU9ZIpNZ/2qT78daGE+ww 20n1N1UuEc2vFShp2u7OdDLzNhN5ICSH0RvTCVEbeUwuPXYvikEYngOFsELMtGAlsrnjsH UMEsAwEEiwYB2aiYnOp6TzyeiRHOJM/LbBWaINp+RuNfM336dI4M41AmrXJjsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687904975; a=rsa-sha256; cv=none; b=rZidGpRrinFL0JMfCOcaV93k3TIq9NbdN5D6GZPKaG4lsFCz6kwNndmHT5EkhqIZB9/v+D x2vk2RTMnX3wI0hnjeU7zy+vo8cFGNwGA80WL/2UkZNz441nnqYkAwN/HPjmwiXTaEj736 e6hDaA6QuM44ofJGRC0xO7Wdv/1XIjFi+0S5P69+h7hFglt7+fvOov0+PjrhwaBJni4qLr IcF+nZ0sDFhJ6s4pDCujR0ofErlfGfkoRv0IoYzgyJCAQTn8PvyV1bn+RKniZkRRhmTdlh aNyTaFlpMsYAil6wA25zES8FAVApWmvXxq6XmXfB4yV3GF3EYx0gjAWqC438zQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrKC26C6Zz182j; Tue, 27 Jun 2023 22:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RMTYAO031765; Tue, 27 Jun 2023 22:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RMTYFQ031764; Tue, 27 Jun 2023 22:29:34 GMT (envelope-from git) Date: Tue, 27 Jun 2023 22:29:34 GMT Message-Id: <202306272229.35RMTYFQ031764@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: 21c32cebf81a - main - ifconfig: skip calling fnmatch once the result no longer matters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 21c32cebf81aa763771607ba3d7cc71b9eaa3fa1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=21c32cebf81aa763771607ba3d7cc71b9eaa3fa1 commit 21c32cebf81aa763771607ba3d7cc71b9eaa3fa1 Author: Alfonso Gregory AuthorDate: 2023-06-27 22:18:55 +0000 Commit: Warner Losh CommitDate: 2023-06-27 22:28:44 +0000 ifconfig: skip calling fnmatch once the result no longer matters Because fnmatch has no side effects, we can safely avoid calling fnmatch if the end result does not matter anyway (the compiler cannot see this, so it calls fnmatch in the event it has side-effects). Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/747 --- sbin/ifconfig/ifconfig.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 5d789795e636..b26fbaf82776 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -910,11 +910,11 @@ group_member(const char *ifname, const char *match, const char *nomatch) matched = false; nomatched = true; for (ifg = ifgr.ifgr_groups; ifg && len >= sizeof(*ifg); ifg++) { - len -= sizeof(struct ifg_req); - if (match) - matched |= !fnmatch(match, ifg->ifgrq_group, 0); - if (nomatch) - nomatched &= fnmatch(nomatch, ifg->ifgrq_group, 0); + len -= sizeof(*ifg); + if (match && !matched) + matched = !fnmatch(match, ifg->ifgrq_group, 0); + if (nomatch && nomatched) + nomatched = fnmatch(nomatch, ifg->ifgrq_group, 0); } free(ifgr.ifgr_groups); From nobody Tue Jun 27 22: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 4QrKKH00Sdz4jq35; Tue, 27 Jun 2023 22: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 4QrKKG6gg6z3wqK; Tue, 27 Jun 2023 22: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=1687905298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVHSiWxvMo6tPW5yxraDK7DcETTEG5QMKEraKhBo3Oo=; b=pPMWiGxGngKxW8Yf8BXyhN8xGI6XCjfjE6kDWosH4hEDeshWsvWaDJNJHA/3u1ydQNEj2n 19idWLyeqHpLZlA9PSghvqAyGu89KrE3bFcBhiS/5nGn17cos4BFOnG+sHD3EE1TJ6tylF NCyXt0ztwjDfeHFODEt693NysTgU2aKmI3JHPA74TIEEplPL57UEdciYBQYTrn+Q2AE52S 1nOsOBMht8O0nL5ZlEzWWX9R3qBdsqyqSjEYR0vueLicy79VlssSDuFdA4FfvLW6HnAmpf doTxICbJxJRcV99KvRQyHbBs6zv6sTyEFXcgwoz9oyN8fF/Q1CgCDitLaCs97g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687905298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVHSiWxvMo6tPW5yxraDK7DcETTEG5QMKEraKhBo3Oo=; b=TeQa2MYihpWCiyZDHrCg8XkzER6Vr3b/luCYPveoiHoMyDGXhIYDj6fupC4hWxvcQERKYi T1QzpE89ww37IitEsAOIgjCnoihq0JOmBZgUYy2ceYb+CwWdp6lIoCA+JazlJpZy9lPAcf T6AlghdZ/9k0omduzSofttWHjc4cBqteEJzN7AVhxZX2jF2KZgGNF/XDpBPOnSRbPMSDEr uug9zgHtksotc7B38JpVi7KfSt8cY5dZOp7AdHaoUQb1lcZM5vbv0s7Ffihs9zfojfUz9C bsmt9zUEr8WQHZFxNQoy2ka4L2rjOcdmafpKU7QJcZhw9akr+1IrKc/F+MLsTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687905298; a=rsa-sha256; cv=none; b=yxW2Yz1okv5ViXjnvUWFasmmyVrzRNZOLo1YVOMME94O6l5hFZXgKvaN90JXHugqSrJULf 1RmIDD1VANVoJw89vn3i0mT0Ish3souuWwRvDKfBJk7IF1Pv/z3J0Vv1lfDoK1b7aX0M3p PasuUf4cdwkACE21pNTPSD8dY9zBjYAjmNPylNwscCvxvm46X0FNEIeHt1+I6Q19Y1DPAy PmZbBjYUg7gdcqzImnbyErsAzPnfTcOiq0wP7VQIeiayx4qFHeNWf2FNA6i7vKTLDS9/YU V1gfEJBITDLghyHaWwIemzf1LAARB568yR0TUJ94EmqK9BsFUJI5qHI06JVK7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrKKG5fMRz18t3; Tue, 27 Jun 2023 22:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RMYwAY047277; Tue, 27 Jun 2023 22:34:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RMYwab047276; Tue, 27 Jun 2023 22:34:58 GMT (envelope-from git) Date: Tue, 27 Jun 2023 22:34:58 GMT Message-Id: <202306272234.35RMYwab047276@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: 5958cd88f2e7 - main - vfs: fix description comment of vfs_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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5958cd88f2e7a40190bfed4604dc41b2784c2d62 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5958cd88f2e7a40190bfed4604dc41b2784c2d62 commit 5958cd88f2e7a40190bfed4604dc41b2784c2d62 Author: Igor Ostapenko AuthorDate: 2023-06-27 22:31:50 +0000 Commit: Warner Losh CommitDate: 2023-06-27 22:33:25 +0000 vfs: fix description comment of vfs_lookup() Signed-off-by: Igor Ostapenko Reviewed by: imp, mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/737 --- sys/kern/vfs_lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index dd6282a45d97..52fc3ecbd01d 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -877,7 +877,7 @@ vfs_lookup_failifexists(struct nameidata *ndp) * Search a pathname. * This is a very central and rather complicated routine. * - * The pathname is pointed to by ni_ptr and is of length ni_pathlen. + * The pathname is pointed to by cn_nameptr and is of length ni_pathlen. * The starting directory is taken from ni_startdir. The pathname is * descended until done, or a symbolic link is encountered. The variable * ni_more is clear if the path is completed; it is set to one if a @@ -898,7 +898,7 @@ vfs_lookup_failifexists(struct nameidata *ndp) * Overall outline of lookup: * * dirloop: - * identify next component of name at ndp->ni_ptr + * identify next component of name at ndp->ni_cnd.cn_nameptr * handle degenerate case where name is null string * if .. and crossing mount points and on mounted filesys, find parent * call VOP_LOOKUP routine for next component name From nobody Tue Jun 27 22: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 4QrKKJ1wDjz4jqYS; Tue, 27 Jun 2023 22: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 4QrKKJ11DPz3x2H; Tue, 27 Jun 2023 22: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=1687905300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8P1+ZU9DoqfbJKjeXU/8ZSNqiv7iLEGKoWC27PQEtwY=; b=mqxZsczdvGYk9XGZeSC8GztGxkg1HfT5On/CuWVpocoBTcaWr4uCQ2SgEt4h15GdQqHK6V pDp3UMim4Cws2btSvo3Z1NgumpX63oIivztxuWYWSdRRTLr7bO76VoQBOFSwye62vB9njG yFJaBgfGvZUk0j67uqibpP9EqLPSRcyBH75XfJH/19OkFaIRNVkquXw9bMAEyRN1tjDQGN GRjl0UnKgOK/EFc7bQOIjYhrt1BWIuXWk7u4pOAuF+BRdDCJKVJTLsMSAxi2hsoVWqVOew ypz4h3Ptx+h2GZbl98x6oAagre0vmRKg8xBVaD3wp24LYHWX5t48ciOWIgPqhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687905300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8P1+ZU9DoqfbJKjeXU/8ZSNqiv7iLEGKoWC27PQEtwY=; b=JBgTLvGcbyd13PF5zj1pehmZLZWofDB4jljcvF58dsP+ALaldUj3TWumb06yjbr37nFne8 V1y7kkBCYuc5xicC7VMFZb6PXjIFRT7fqdlzMoHOFcTpRchJE1cE9nSVTuuNgyfQ5cdKi1 c9OwuoYWhmJ5GwDoTZMkSGqqe0KneRV82jF1gbhHi0KAQqpULFynL2LmWxO+TqbQxn2cxn LdFGIkx3ZiWGHmjFojF2Fua8PSL9n04ErSMRhss4U2QqRf8uRgwncDkcYDx3fWJOgob1Yr MkDaFXR944daSioqoPm1JOV/HglxiM6SbPLr5MN/Z4gWz1XGisFZpCH9gcsWpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687905300; a=rsa-sha256; cv=none; b=wA6p4ENeFpKMPy7UT9jcbIG/1WiQ5THSVbJaWJo/NyHIw7nzL/z7KYHeSEdJ8r0M5gDDax 8EvB76qb387mE473tIm9/ezHOxED8JEq/3V5jiJEhVzJpYsy+w6oihK6HWbhOmVDI+zLIb CYkBm9UxYwBPFCsykiJVQsi6MWp/77pApMpd5Vv57NJBvdp1JiORdZn0Log2Vc4LsaLC4i C1mIYmx1FAxXBwoj7sqq26SrbT2GUoUiPtFJt1eCJNMWh37qep5C7WlbYSqfybYmkl+UAZ KXcawFSTE1lH96PZJ2Ty9GXXjLXsm32haSmnL9DEzCRfOE8LyH2bCRxU+rRzCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrKKH62Cpz18rL; Tue, 27 Jun 2023 22:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RMYxlY047297; Tue, 27 Jun 2023 22:34:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RMYxAt047296; Tue, 27 Jun 2023 22:34:59 GMT (envelope-from git) Date: Tue, 27 Jun 2023 22:34:59 GMT Message-Id: <202306272234.35RMYxAt047296@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: 7b5a1c39f1e6 - main - vfs: bring vfs_lookup() description comment up to date List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7b5a1c39f1e65737b8c29de46aecb88f90c7c33d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b5a1c39f1e65737b8c29de46aecb88f90c7c33d commit 7b5a1c39f1e65737b8c29de46aecb88f90c7c33d Author: Igor Ostapenko AuthorDate: 2023-06-27 22:31:50 +0000 Commit: Warner Losh CommitDate: 2023-06-27 22:34:02 +0000 vfs: bring vfs_lookup() description comment up to date Signed-off-by: Igor Ostapenko Reviewed by: imp, mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/737 --- sys/kern/vfs_lookup.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 52fc3ecbd01d..73df48e96efe 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -879,27 +879,27 @@ vfs_lookup_failifexists(struct nameidata *ndp) * * The pathname is pointed to by cn_nameptr and is of length ni_pathlen. * The starting directory is taken from ni_startdir. The pathname is - * descended until done, or a symbolic link is encountered. The variable - * ni_more is clear if the path is completed; it is set to one if a + * descended until done, or a symbolic link is encountered. The cn_flags + * has ISLASTCN or'ed if the path is completed or ISSYMLINK or'ed if a * symbolic link needing interpretation is encountered. * - * The flag argument is LOOKUP, CREATE, RENAME, or DELETE depending on + * The cn_nameiop is LOOKUP, CREATE, RENAME, or DELETE depending on * whether the name is to be looked up, created, renamed, or deleted. * When CREATE, RENAME, or DELETE is specified, information usable in * creating, renaming, or deleting a directory entry may be calculated. - * If flag has LOCKPARENT or'ed into it, the parent directory is returned - * locked. If flag has WANTPARENT or'ed into it, the parent directory is + * If cn_flags has LOCKPARENT or'ed into it, the parent directory is returned + * locked. If it has WANTPARENT or'ed into it, the parent directory is * returned unlocked. Otherwise the parent directory is not returned. If - * the target of the pathname exists and LOCKLEAF is or'ed into the flag + * the target of the pathname exists and LOCKLEAF is or'ed into the cn_flags * the target is returned locked, otherwise it is returned unlocked. - * When creating or renaming and LOCKPARENT is specified, the target may not - * be ".". When deleting and LOCKPARENT is specified, the target may be ".". * * Overall outline of lookup: * + * handle degenerate case where name is null string + * * dirloop: * identify next component of name at ndp->ni_cnd.cn_nameptr - * handle degenerate case where name is null string + * handle .. special cases related to capabilities, chroot, jail * if .. and crossing mount points and on mounted filesys, find parent * call VOP_LOOKUP routine for next component name * directory vnode returned in ni_dvp, unlocked unless LOCKPARENT set @@ -907,6 +907,7 @@ vfs_lookup_failifexists(struct nameidata *ndp) * if result vnode is mounted on and crossing mount points, * find mounted on vnode * if more components of name, do next level at dirloop + * if VOP_LOOKUP returns ERELOOKUP, repeat the same level at dirloop * return the answer in ni_vp, locked if LOCKLEAF set * if LOCKPARENT set, return locked parent in ni_dvp * if WANTPARENT set, return unlocked parent in ni_dvp From nobody Tue Jun 27 22:37: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 4QrKMm0g6Tz4js67; Tue, 27 Jun 2023 22:37: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 4QrKMm0F75z40Cd; Tue, 27 Jun 2023 22:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687905428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oVYXYywsYCBeCgpZwcvQZQig6fI3VtbkK5kebHKBRqg=; b=vZmakgCkWa3orSUYAxoz/bK0dDguZ2GuzEk/9k7nPZGGPBtdCbIhNFwn0JT/u+X7uMvi4A KaRNTFMVKRkQQ+4Q8/4hULPIo3IkSDh0w5BKNNVU2tZDu1hT7sGG1N3ob1IKgjLdHaLjwJ DQOr9eJB2W7QThUMCTO0BQ4VthMBvMnkmP599hNl6o2QeFoIM4ZBx3VduPy5KJRGA0W+z6 ggOzlsDvdFeUoEttras/nb3bkilk7gBA49/I1zjFwTRR21YbMtrYx80MdLTSYDviFqIFG1 ZUu1eAwV4R77FJ8fVT0aNbnNCEABmfKPlPQTKlWtWOdkU1bpIuK+7i5YlSQqgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687905428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oVYXYywsYCBeCgpZwcvQZQig6fI3VtbkK5kebHKBRqg=; b=Wm11tZ+iSSBFD7qGkqp5rULsszaB6IIENT0G9Hh8K0TWpWAYBWbDF4UWmrk5PhdZ/ITMSj ED1MSoo1vvNJQV6fO6g/eFUQHuPQ71AFlKZ0wygODPUaQ0kbfBlurUwDDt/aGDP3xN1zV1 XN/hNbbqrY/I/Hc3VAczfagwqQPJr1kAdirFZ2zI1p55oeJOP+zGyrf777+vTYC77ndP5f L9ABY8y6wIvDsYpocX/F/H+sEmrda6NMqC5lb98Wb+YfWzsCF2mPqUaOqCP2vrtDoIyp5C J6ZRGCwZpa/Tg9u/DJSmO8YBPsajulvgYIMoupQEKfskk8yVtGevhNytjZAZ1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687905428; a=rsa-sha256; cv=none; b=w9OAAl1NbKT9v4odOOjJu3Y51MIQKLkbklDeUNLRIzVftj0TxImow/5FmDmGYD4sT0j08w /YnNYyl6USwacneymXCKuGJnPLsSL9OEdRXVUxoAT5AX3tskYAE7iZ7zE+nmCllQrBUNbl IDLU44/x7DBDhi2HDkAJNs15rs0dWkv7bcbZQTp8TCHuvm0+vIpaoz7wXDvov585Zobp5B fVC3QdA1mjhJzQqzi2y/Q2gR90ZwCaR3BDFyEwPkE1kAQIiFtj39R00F/suIANy0lPKLFn P9/eFUhPhtvDyOFeuCL9tQFVyAal+xBn6SPmT/RbgZr19/Vk/ELEQ14mGRQbEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrKMl6Kc7z18rM; Tue, 27 Jun 2023 22:37:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RMb7Hj047716; Tue, 27 Jun 2023 22:37:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RMb7VR047715; Tue, 27 Jun 2023 22:37:07 GMT (envelope-from git) Date: Tue, 27 Jun 2023 22:37:07 GMT Message-Id: <202306272237.35RMb7VR047715@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: d3a83456e1e3 - main - Add vendor id for Quectel USB modem and align with quectel marketing names. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d3a83456e1e304db7901178e66e6df198573dbf4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d3a83456e1e304db7901178e66e6df198573dbf4 commit d3a83456e1e304db7901178e66e6df198573dbf4 Author: Gabriele Laganà AuthorDate: 2023-06-27 22:35:18 +0000 Commit: Warner Losh CommitDate: 2023-06-27 22:35:20 +0000 Add vendor id for Quectel USB modem and align with quectel marketing names. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/750 --- share/man/man4/u3g.4 | 2 +- sys/dev/usb/serial/u3g.c | 26 +++++++++++++++++++++----- sys/dev/usb/usbdevs | 26 +++++++++++++++++++++----- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/share/man/man4/u3g.4 b/share/man/man4/u3g.4 index e8990968fd7b..f24ce6a2873d 100644 --- a/share/man/man4/u3g.4 +++ b/share/man/man4/u3g.4 @@ -72,7 +72,7 @@ Qualcomm Inc. CDMA MSM .It Qualcomm Inc. GOBI 1000, 2000 and 3000 devices with MDM1000 or MDM2000 chipsets .It -QUECTEL EC25, EM05, EM12-G, EP06-E. +QUECTEL BGX, ECX, EGX, EMX, EPX, RGX series. .It Quectel EM160R (see CAVEATS) .It diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index 1cdc28d93de4..c6584430c4e6 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -513,11 +513,27 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUANTA, GLX, 0), U3G_DEV(QUANTA, Q101, 0), U3G_DEV(QUANTA, Q111, 0), - U3G_DEV(QUECTEL, EC25, 0), - U3G_DEV(QUECTEL, EM05, 0), - U3G_DEV(QUECTEL, EM12_G, 0), - U3G_DEV(QUECTEL, EP06_E, 0), - U3G_DEV(QUECTEL, EM160R, 0), + U3G_DEV(QUECTEL, EC25, 0), + U3G_DEV(QUECTEL, EM05, 0), + U3G_DEV(QUECTEL, EC21, 0), + U3G_DEV(QUECTEL, EG91, 0), + U3G_DEV(QUECTEL, EG95, 0), + U3G_DEV(QUECTEL, EP06, 0), + U3G_DEV(QUECTEL, EG065K, 0), + U3G_DEV(QUECTEL, EM12, 0), + U3G_DEV(QUECTEL, BG96, 0), + U3G_DEV(QUECTEL, BG95, 0), + U3G_DEV(QUECTEL, AG35, 0), + U3G_DEV(QUECTEL, AG15, 0), + U3G_DEV(QUECTEL, AG520, 0), + U3G_DEV(QUECTEL, AG550, 0), + U3G_DEV(QUECTEL, EM160R, 0), + U3G_DEV(QUECTEL, RG500, 0), + U3G_DEV(QUECTEL, RG520, 0), + U3G_DEV(QUECTEL, EC200, 0), + U3G_DEV(QUECTEL, EC200S, 0), + U3G_DEV(QUECTEL, EC200T, 0), + U3G_DEV(QUECTEL, UC200, 0), U3G_DEV(SIERRA, AC402, 0), U3G_DEV(SIERRA, AC595U, 0), U3G_DEV(SIERRA, AC313U, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 3af37f74a8b9..9ded33d79207 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -3985,11 +3985,27 @@ product QUANTA GLE 0xea06 HSDPA modem product QUANTA RW6815R 0xf003 HP iPAQ rw6815 RNDIS /* Quectel products */ -product QUECTEL EC25 0x0125 LTE modem -product QUECTEL EM05 0x0127 LTE modem -product QUECTEL EP06_E 0x0306 LTE modem -product QUECTEL EM12_G 0x0512 LTE modem -product QUECTEL EM160R 0x0620 LTE modem +product QUECTEL EC25 0x0125 Quectel EC20(MDM9x07)/EC25/EG25 +product QUECTEL EM05 0x0127 Quectel EM05 +product QUECTEL EC21 0x0121 Quectel EC21 +product QUECTEL EG91 0x0191 Quectel EG91 +product QUECTEL EG95 0x0195 Quectel EG95 +product QUECTEL EP06 0x0306 Quectel EG06/EP06/EM06 +product QUECTEL EG065K 0x030B Quectel EG065K/EG060K +product QUECTEL EM12 0x0512 Quectel EG12/EP12/EM12/EG16/EG18 +product QUECTEL BG96 0x0296 Quectel BG96 +product QUECTEL BG95 0x0700 Quectel BG95/BG77/BG600L-M3/BC69 +product QUECTEL AG35 0x0435 Quectel AG35 +product QUECTEL AG15 0x0415 Quectel AG15 +product QUECTEL AG520 0x0452 Quectel AG520 +product QUECTEL AG550 0x0455 Quectel AG550 +product QUECTEL EM160R 0x0620 Quectel EM160R/EG20 +product QUECTEL RG500 0x0800 Quectel RG500/RM500/RG510/RM510 +product QUECTEL RG520 0x0801 Quectel RG520/RM520/SG520 +product QUECTEL EC200 0x6000 Quectel EC200/UC200 +product QUECTEL EC200S 0x6002 Quectel EC200S +product QUECTEL EC200T 0x6026 Quectel EC200T +product QUECTEL UC200 0x6120 Quectel UC200 /* Quickshot products */ product QUICKSHOT STRIKEPAD 0x6238 USB StrikePad From nobody Tue Jun 27 23:09: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 4QrL4Z2SMhz4kTbN; Tue, 27 Jun 2023 23: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 4QrL4Z1pWQz4GrK; Tue, 27 Jun 2023 23: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=1687907342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/4H+Vro3Au/Kjydo+HxRHxR2ExJDigia2A0gzgsAtY=; b=bdJtbgwTlEqT8caSDUkL+Fz08usqw2GBrIq/okltpGC8HLq4rP45Fo0WZGKyjCCooNXEQ5 1vrJzUElOfE/ps7PZnGtEZGbBUFCQJriBhu/eudADlEz19+eKfc6OUZj9YxVPgQmWwEFgq VjCdbfGCNG85XT+HrS56f+0Se1jeDkdaZ57lyMlo0nueUaNM4JO2yVkzc9m9J6qp0RIQDO ZP/cIFpkam0hfPsngDTjdx8I9AmJrf9GGCECoxmy+VLW2WBieKjQOvByvVrTg2MAgZzY3L LMgcdfYGQa3oZjSSkOyVD2nlLTYxjkFDDbhXJ7GXWoyc5kVAGwhqy3fkVy9y0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687907342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/4H+Vro3Au/Kjydo+HxRHxR2ExJDigia2A0gzgsAtY=; b=HdJx+mxAB8nvPua6f104dgzKw4+ZIMq7GVbM86u9nbRdE+e8UTkXgW91CzsraUUHnw708t VmAMC5JG862sa37ZRN8IcDEIXupj+9CLhypN7ZE6DIM2hvqmukBFTBu124NWt/GpBr1F5Q iy8BXpgjAdpEYGI4n3nF/cwHU9T/JZqNkQ4wqW500LjWE8eF9QwVOSqkJkBfPhgSogcb3L baViZrCERi0Fu8TbS16CjxsM5j2m96ILttSurqE2BrVC86rnCMme+4DIaq0mjZWq0iF0so rXs4U4M7NtQNI/DBAkfZRYTzC1tfd8HyDaktjyKVJEaSj9D/AsIX8PAwXfCvCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687907342; a=rsa-sha256; cv=none; b=HcCI18vQ844eL+7EiXmkBbbou1Lk+JGC0MkZpJgjjkTed3FcQIKfXG3q/Y6tJ26/J7g5EF vhTWVQRTSP/YFHJIPhxJic7vZv7bJJJ990KryIAxDRQmIwEmRGt+fL9xciee3OBOLtVmvY UksVPn7JOTKrAIfb4DjSbDKkQf3EZYw2EGRmIuvjyZiDlajm6THGQIEbgHbSKzm2I7GkOo uoHenv86iySPISgnGQJON8BlImuXGgxC41lLn/U0Cv1oJJksvHd73OT+r2MuKBIEBbQxUP xqwRHvPqAgzIrVuzfoBPJjPDQDejQkGTLhP5ejiVJj9Rp7L0h7gCd2kHofVdpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrL4Z0tDcz19PW; Tue, 27 Jun 2023 23:09:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RN92gO098174; Tue, 27 Jun 2023 23:09:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RN92dE098173; Tue, 27 Jun 2023 23:09:02 GMT (envelope-from git) Date: Tue, 27 Jun 2023 23:09:02 GMT Message-Id: <202306272309.35RN92dE098173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 9b3bce2074b3 - main - usb: Fixed botched spacing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b3bce2074b32a3debc22f6d1e39071c96310034 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=9b3bce2074b32a3debc22f6d1e39071c96310034 commit 9b3bce2074b32a3debc22f6d1e39071c96310034 Author: Jessica Clarke AuthorDate: 2023-06-27 23:07:54 +0000 Commit: Jessica Clarke CommitDate: 2023-06-27 23:07:54 +0000 usb: Fixed botched spacing Fixes: d3a83456e1e3 ("Add vendor id for Quectel USB modem and align with quectel marketing names.") --- sys/dev/usb/serial/u3g.c | 42 +++++++++++++++++++++--------------------- sys/dev/usb/usbdevs | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/dev/usb/serial/u3g.c b/sys/dev/usb/serial/u3g.c index c6584430c4e6..f98f76988d72 100644 --- a/sys/dev/usb/serial/u3g.c +++ b/sys/dev/usb/serial/u3g.c @@ -513,27 +513,27 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = { U3G_DEV(QUANTA, GLX, 0), U3G_DEV(QUANTA, Q101, 0), U3G_DEV(QUANTA, Q111, 0), - U3G_DEV(QUECTEL, EC25, 0), - U3G_DEV(QUECTEL, EM05, 0), - U3G_DEV(QUECTEL, EC21, 0), - U3G_DEV(QUECTEL, EG91, 0), - U3G_DEV(QUECTEL, EG95, 0), - U3G_DEV(QUECTEL, EP06, 0), - U3G_DEV(QUECTEL, EG065K, 0), - U3G_DEV(QUECTEL, EM12, 0), - U3G_DEV(QUECTEL, BG96, 0), - U3G_DEV(QUECTEL, BG95, 0), - U3G_DEV(QUECTEL, AG35, 0), - U3G_DEV(QUECTEL, AG15, 0), - U3G_DEV(QUECTEL, AG520, 0), - U3G_DEV(QUECTEL, AG550, 0), - U3G_DEV(QUECTEL, EM160R, 0), - U3G_DEV(QUECTEL, RG500, 0), - U3G_DEV(QUECTEL, RG520, 0), - U3G_DEV(QUECTEL, EC200, 0), - U3G_DEV(QUECTEL, EC200S, 0), - U3G_DEV(QUECTEL, EC200T, 0), - U3G_DEV(QUECTEL, UC200, 0), + U3G_DEV(QUECTEL, EC25, 0), + U3G_DEV(QUECTEL, EM05, 0), + U3G_DEV(QUECTEL, EC21, 0), + U3G_DEV(QUECTEL, EG91, 0), + U3G_DEV(QUECTEL, EG95, 0), + U3G_DEV(QUECTEL, EP06, 0), + U3G_DEV(QUECTEL, EG065K, 0), + U3G_DEV(QUECTEL, EM12, 0), + U3G_DEV(QUECTEL, BG96, 0), + U3G_DEV(QUECTEL, BG95, 0), + U3G_DEV(QUECTEL, AG35, 0), + U3G_DEV(QUECTEL, AG15, 0), + U3G_DEV(QUECTEL, AG520, 0), + U3G_DEV(QUECTEL, AG550, 0), + U3G_DEV(QUECTEL, EM160R, 0), + U3G_DEV(QUECTEL, RG500, 0), + U3G_DEV(QUECTEL, RG520, 0), + U3G_DEV(QUECTEL, EC200, 0), + U3G_DEV(QUECTEL, EC200S, 0), + U3G_DEV(QUECTEL, EC200T, 0), + U3G_DEV(QUECTEL, UC200, 0), U3G_DEV(SIERRA, AC402, 0), U3G_DEV(SIERRA, AC595U, 0), U3G_DEV(SIERRA, AC313U, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 9ded33d79207..a7802257e3d6 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -4003,7 +4003,7 @@ product QUECTEL EM160R 0x0620 Quectel EM160R/EG20 product QUECTEL RG500 0x0800 Quectel RG500/RM500/RG510/RM510 product QUECTEL RG520 0x0801 Quectel RG520/RM520/SG520 product QUECTEL EC200 0x6000 Quectel EC200/UC200 -product QUECTEL EC200S 0x6002 Quectel EC200S +product QUECTEL EC200S 0x6002 Quectel EC200S product QUECTEL EC200T 0x6026 Quectel EC200T product QUECTEL UC200 0x6120 Quectel UC200 From nobody Tue Jun 27 23:11: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 4QrL7r4DDVz4kXWT; Tue, 27 Jun 2023 23:11: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 4QrL7r3npvz4JJl; Tue, 27 Jun 2023 23:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687907512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LpWmlE97RZnvmMzwvpqRlWC2qxSqE9WLW0hFINNei4=; b=enwER7G8KiUhMBypxmEl5talucHCWAjQGhXOho2h9b3k6lgTXA9QO9k54po6vXSTR9dMLb wgGZWreNl+a9y6DX4A3NYuNksJU1oWWRUshoTkxst4dcWWvR5LzUijLmilWa+mx6pBs2UY zJCrW/U4XUSC/i+ll/u63v+KZTM/3/9LhgMM3J3nBvprCi9+0OlWFrGATJ+PAb2REDoz3N jAkOxPy1mcBCmNdO7rXbbX9GueZEVzYpXiOEl9XkyeaNPuZzr8u8+bHEojR//xI7YN6ejN I48LimDyTLlYgktvan6bAe3eNszdiSWgrSI93gCOINHIJ08/Qj8AxlX4bBa8fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687907512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LpWmlE97RZnvmMzwvpqRlWC2qxSqE9WLW0hFINNei4=; b=fQgEB9RRrHfQ73coxtrgoCgU13aqHgWiNuZ6hKUqF1vfRXxnQltzuF5NAGG8iH2uitN2BY CF9W2iyekicZMJLSlCajbfWZ1jFMq+FNUsSmY/mx1LzMQ3M9FTFX4rp58bn+YLQ3BLCXt+ v0r9yzWpLjeNFGUSGTFx21F7tlrh9Sotwv6g2XsvFrHgWUXCclmzeYXXlx3EYbbfJ/gJRf ZqDU4xI62YAh3ZEutAPmU0xKgUB/t3DA7YSbypXPiE1olJWkJagNgfrc82AJ24nt4WcXMn QedKRZ0CO95sDtWzl4uXHqHVXh1L0SzPdCuOH7adpuNWj9fKqZeWup3zHCc2Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687907512; a=rsa-sha256; cv=none; b=Gpsv1HYLUDDVBEchvYdTogSw4QN1rmvz4hTNkJA1ERzGp95qqf9AqFbd9DXo5qfflys9UX UElYNdz0lIEKHTjq5tRDblztzC7HUsGYn6X0dhlzYsLWXj7/DsRZqKATvAk4oWE5RUq+3H qY0fYQPstmqBbgbmEgOlu8eKUcy/eEDBDeL2g8Dbi4VzmbUFmOTONcdusharBKpOIrelF6 grOCP/Ezr7s7tFVt7KJP71+TPMrbaw8GkOidauStv8wr9xdAeUoQfD8sbdHPfjOhs8oyiR J8cwI4xDWIseKdn8PEEwNgu1NT45XcgBpvJTBFvQDRaVpcIGGm9VVG4YYNyicg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrL7r2pWSz1B1W; Tue, 27 Jun 2023 23:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RNBqkW008967; Tue, 27 Jun 2023 23:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RNBq0r008966; Tue, 27 Jun 2023 23:11:52 GMT (envelope-from git) Date: Tue, 27 Jun 2023 23:11:52 GMT Message-Id: <202306272311.35RNBq0r008966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 5ed851515129 - main - Makefile.libcompat: Remove unused _LC_INCDIRS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ed851515129c9c3bfe255baac1c29cb3b041862 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=5ed851515129c9c3bfe255baac1c29cb3b041862 commit 5ed851515129c9c3bfe255baac1c29cb3b041862 Author: Jessica Clarke AuthorDate: 2023-06-27 23:09:44 +0000 Commit: Jessica Clarke CommitDate: 2023-06-27 23:09:44 +0000 Makefile.libcompat: Remove unused _LC_INCDIRS This is no longer referenced as of commit 724123b9f4d3 ("libcompat: Use WORLDTMP sysroot"). Reviewed by: brooks, jhb, imp Differential Revision: https://reviews.freebsd.org/D40569 --- Makefile.libcompat | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Makefile.libcompat b/Makefile.libcompat index 5343b2e2480c..05e77a980b6a 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -45,11 +45,6 @@ _LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib _LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib _LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib -_LC_INCDIRS= \ - include \ - lib/ncurses/tinfo \ - ${_LC_LIBDIRS.yes} - .if ${MK_FILE} != "no" _libmagic= lib/libmagic .endif From nobody Tue Jun 27 23:11: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 4QrL7s5hNMz4kXT7; Tue, 27 Jun 2023 23:11: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 4QrL7s530Jz4JSF; Tue, 27 Jun 2023 23:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687907513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QinmUXArk40HtmnErXqAm3B91gpafM47vNYYH/v0rKM=; b=e/G7xmG7/q0nUl7GwBSNIrUOfcTFIPXJRpnTZKgd1DR+rMGQ3WZ7srhu1A8kGgKCvvXm0q H2v7lehbVyry03ooK47EqebLye03CnLful/hvlHnNsuRchhijktv5wM8C0tX9OZa8ZgpdL sY0perD+KKKLAEDL8LKmimXq1R0j6g/S4p3X3JHad1vAk35POecQ7JjVbPYl3BW7Ke/43j Zk7XDZPuXa8TJIV/reFaGtnjc4Py7WJa8Ynbj5xs6fiujFcm+sHttjVsNN0+c2xtAqaniR DxgzsPISrgHzMfaQA3xaE6KnNRpS2sQdCVOKRTK6wjFeTkHTOPY1wvBhWRW1Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687907513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QinmUXArk40HtmnErXqAm3B91gpafM47vNYYH/v0rKM=; b=Fg3Kpbx9hzpnnHWhW/gVWYak5O4LIe5aDxTM57dVRWshAYJxKtacQxkQmrQ5VM04Me0w+U yWNQYi1nFnYTw+x//AtSh691qcr4MO4Nmjpq92p9aa60bwI/C3yplawOY7HS2LRUTxq08r UUExm55IlomQwOEaCDiJiIOU2k3IOl4a4XoxnlbpC44kchExn9MMVzK71ywyTg5258TLth GljkuXJGF9HTUW4LOTdBI/5ZE1EPnCGtOZTwaYNFi771kgLOxxtOjkC7TLeOnZgFWegTRN jev0JlfaR4ARLt8jTfJPC8Rvpvxxa1HrwuUDRFBw7OqDhqWwdeGFgNEkVp39sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687907513; a=rsa-sha256; cv=none; b=q3elPYzvKr31MN4kOMkfxP1YBFkkN0Wb3dHZ6PFVGuzX3sIydJDauH9RuuljSLGRVZwau/ YfU451vb5++t9YDTLJ1eI+v7eXFZQ+IOl6Ca8Y8Or+IZHHzN3+AvML6267R4ywfdbkwZwt mWH4NlLi2++SxbW0qgZonPLDDvCGpv410NEcrnRn5VrPNU8C8ENaiQisee59ATgsDMgavj eBw/G8W7lpGi80iqEjv5cLjkrvsLaaHRBMb4ZgBy/CgeF1h/9glH0U/J5LNBcuG8/3ib2S X13xyOOIJ2bCxKfVN2FKoP6dHWCkxHnW/U89pyVKQXyTdRy6w8OVjcJPhPEOkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrL7s3WDwz19Vn; Tue, 27 Jun 2023 23:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RNBrFl008986; Tue, 27 Jun 2023 23:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RNBrkU008985; Tue, 27 Jun 2023 23:11:53 GMT (envelope-from git) Date: Tue, 27 Jun 2023 23:11:53 GMT Message-Id: <202306272311.35RNBrkU008985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 10afc5eada47 - main - Makefile.libcompat: Handle MK_FOO varying for native and compat arches List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10afc5eada472f7903238c7021a00f722f49a789 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=10afc5eada472f7903238c7021a00f722f49a789 commit 10afc5eada472f7903238c7021a00f722f49a789 Author: Jessica Clarke AuthorDate: 2023-06-27 23:10:30 +0000 Commit: Jessica Clarke CommitDate: 2023-06-27 23:10:30 +0000 Makefile.libcompat: Handle MK_FOO varying for native and compat arches Currently Makefile.libcompat queries a few MK_FOO variables to determine what is being built. However, it is plausible (and indeed, downstream in CheriBSD, this is the case) that these may vary between the native and the compat architecture. In order to correctly determine their values for the compat architecture, we need to defer their evaluation until we are in the compat sub-make where src.opts.mk will give us the right value for the compat MACHINE_ARCH. Reviewed by: brooks, jhb, imp Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D40570 --- Makefile.libcompat | 56 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/Makefile.libcompat b/Makefile.libcompat index 05e77a980b6a..11668bf54eda 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -39,20 +39,6 @@ LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*} \ MK_INCLUDES=no \ -DLIBRARIES_ONLY -_LC_LIBDIRS.yes= lib -_LC_LIBDIRS.yes+= gnu/lib -_LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib -_LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib -_LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib - -.if ${MK_FILE} != "no" -_libmagic= lib/libmagic -.endif -.if ${MK_PMC} != "no" -_jevents= lib/libpmc/pmu-events -.endif - - # Shared logic build${libcompat}: .PHONY @echo @@ -65,16 +51,14 @@ build${libcompat}: .PHONY ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${WORLDTMP}/usr/lib/debug/usr >/dev/null .endif -.for _dir in lib/ncurses/tinfo ${_libmagic} ${_jevents} -.for _t in ${_obj} build-tools - ${_+_}cd ${.CURDIR}/${_dir}; \ + ${_+_}cd ${.CURDIR}; \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ - ${MAKE} DESTDIR= \ + ${MAKE} -f Makefile.inc1 \ + DESTDIR= \ OBJTOP=${LIBCOMPAT_OBJTOP} \ OBJROOT='$${OBJTOP}/' \ MAKEOBJDIRPREFIX= \ - DIRPRFX=${_dir}/ \ -DNO_LINT \ -DNO_CPU_CFLAGS \ MK_ASAN=no \ @@ -83,15 +67,41 @@ build${libcompat}: .PHONY MK_SSP=no \ MK_UBSAN=no \ MK_WERROR=no \ - ${_t} -.endfor -.endfor + _lc_build-tools ${_+_}cd ${.CURDIR}; \ ${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries distribute${libcompat} install${libcompat}: .PHONY + ${_+_}cd ${.CURDIR}; \ + ${LIBCOMPATIMAKE} -f Makefile.inc1 _lc_${.TARGET:S/${libcompat}$//} + +# These depend on MK_*, which could vary between the native and compat +# architectures. Thus targets using them are run within a compat sub-make +# rather than the native make environment. + +_LC_LIBDIRS.yes= lib +_LC_LIBDIRS.yes+= gnu/lib +_LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib +_LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib +_LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib + +.if ${MK_FILE} != "no" +_libmagic= lib/libmagic +.endif +.if ${MK_PMC} != "no" +_jevents= lib/libpmc/pmu-events +.endif + +_lc_build-tools: +.for _dir in lib/ncurses/tinfo ${_libmagic} ${_jevents} +.for _t in ${_obj} build-tools + ${_+_}cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ ${_t} +.endfor +.endfor + +_lc_distribute _lc_install: .for _dir in ${_LC_LIBDIRS.yes} - ${_+_}cd ${.CURDIR}/${_dir}; ${LIBCOMPATIMAKE} ${.TARGET:S/${libcompat}$//} + ${_+_}cd ${.CURDIR}/${_dir}; ${MAKE} ${.TARGET:S/^_lc_//} .endfor .endif # !targets(__<${_this:T}>__) From nobody Tue Jun 27 23:11: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 4QrL7t5tK0z4kXNV; Tue, 27 Jun 2023 23:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrL7t5XkJz4JQ7; Tue, 27 Jun 2023 23:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687907514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3VarNxY2pgH4DXqOW5ry08krZ48axcbBbEFFqaXENwU=; b=dEJ11ML9Qk0oED6afTTqoN2D9pC4r4Eq1JTu+N69mPQMLunTguFlE5G6V79hAla66pAaoU nUwMrPufE2cJvZjyJFfUXcZVgOLvk/hd0Z/dcOHTl33scQOuMoKNCwssj0WYaTlPii9z+T dcb+YxY5kw4cLDRcdArkg8t6e0tXQNZ0CyGa0MTtBgrgxqvv9+Q9U/8iIQxgXKmrkqn+1y zUTc9RkBDVxJywF1KjN4Nq9SdhVJh33pn/ca/dRgVKAtKF8Emv8lpmbLPOIhkHVTqevuoF wSna9X8Vpr8lD9CtBV/WUSxosULcx38WYpvUa4dbaudK0lpSQwxpfGTNHh7iZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687907514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3VarNxY2pgH4DXqOW5ry08krZ48axcbBbEFFqaXENwU=; b=tExk6DE3wfsZ4lMayW/qyORrKdzKwG31wfr1MG3p9RM6LZFdmLNrLvqxTdZl/ZSPw/5jvY aogxSVX70htV1hVL2yzcttak59N6LVahvqgJPfJR5M3JjOB34ZtZ0bgHorah8h3n59Nlla dMAjgsW8yIxDxzMwKU4RvxCZqkf/FQfvjLDIIVQqQuhjL7JjCGUsK3LUi79x9WkWxVwe7T e5eI1531mMRy5sLoPRK7NP/DuNouUQhf4Zi9IIoKi1wnF5Xyi8+yqzXvUnYMY0cJ7di4nS 7h4f2SgpxHGyYtdaU5a0BMStZf/J40koIY9Hqr0UOl46fLXLFen4KQiCXC82jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687907514; a=rsa-sha256; cv=none; b=Yhqt2jLepnAQOsCYhNYMNX9nIxUGHT5dwO3XjIuZvSLOQsml2XvdYs0a+TafK3rnLWz3uw yXEMRwpDu4PvI06bMtTLW5oXdXMs9rWFBHdmDUUtb9w9MISSBdTCDxdKK1TTtIhgemhv9/ QT7GNjBHXUNvoGXrHXeJOlMKs6eaYnNYwQwoz95cVL7gItRPgol1KWs/YAqzMvjXs5snPT 95kV82Vr6qvtKl1wtPH0PcmW2fdHpD/57210e+7zu0n3qJ4FgDZBqPK0jA682XSXc2U+N+ Ul0lF+04vSA1/dOu1cJA89IrwWd49BpmwMycauS4hGGUxw2zrE9hzs3QpKKPVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrL7t4dp9z19Vp; Tue, 27 Jun 2023 23:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RNBshv009005; Tue, 27 Jun 2023 23:11:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RNBsh1009004; Tue, 27 Jun 2023 23:11:54 GMT (envelope-from git) Date: Tue, 27 Jun 2023 23:11:54 GMT Message-Id: <202306272311.35RNBsh1009004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 91d7edd549f5 - main - Generalise libcompat to be a list rather than a single 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91d7edd549f52d09dbb12ecf5f0cf2298287f1c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=91d7edd549f52d09dbb12ecf5f0cf2298287f1c8 commit 91d7edd549f52d09dbb12ecf5f0cf2298287f1c8 Author: Jessica Clarke AuthorDate: 2023-06-27 23:10:49 +0000 Commit: Jessica Clarke CommitDate: 2023-06-27 23:10:49 +0000 Generalise libcompat to be a list rather than a single option Whilst the kernel can support any number of COMPAT_FOO, world can only build a single libfoo. Upstream this isn't such an issue, since the only option is lib32 anyway, but downstreams, such as CheriBSD, may wish to support multiple at the same time. Thus, adjust the top-level Makefiles to turn _LIBCOMPAT into a _LIBCOMPATS list that gets iterated over, and adjust bsd.compat.mk to support this use-case. For the normal NEED_COMPAT/WANT_COMPAT case, LIBCOMPATFOO remain set and refer to the requested compat's, preserving the current interface. For the top-level Makefiles those variables are no longer set (since there is no longer "the" compat) and only the per-compat ones are available. Reviewed by: brooks, jhb, imp Differential Revision: https://reviews.freebsd.org/D40571 --- Makefile.inc1 | 42 +++++++++++++++--------------- Makefile.libcompat | 33 +++++++++++++++--------- share/mk/bsd.compat.mk | 69 ++++++++++++++++++++++++++++++-------------------- 3 files changed, 84 insertions(+), 60 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 68b1a22c1365..6db68b627d96 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -852,9 +852,9 @@ XCFLAGS+= ${BFLAGS} .endif .if ${MK_LIB32} == "yes" -_LIBCOMPAT= 32 -.include "Makefile.libcompat" +_LIBCOMPATS+= 32 .endif +.include "Makefile.libcompat" # META_MODE normally ignores host file changes since every build updates # timestamps (see NO_META_IGNORE_HOST in sys.mk). There are known times @@ -1100,9 +1100,9 @@ _cleanobj: # Avoid including bsd.compiler.mk in clean and obj with _NO_INCLUDE_COMPILERMK # since the restricted $PATH might not contain a valid cc binary ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t ${CLEANDIR} -.if defined(_LIBCOMPAT) - ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR} -.endif +.for LIBCOMPAT in ${_LIBCOMPATS} + ${_+_}cd ${.CURDIR}; ${LIB${LIBCOMPAT}WMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR} +.endfor .else ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack .endif # ${MK_CLEAN} == "yes" @@ -1179,8 +1179,10 @@ WMAKE_TGTS+= _includes .if !defined(NO_LIBS) WMAKE_TGTS+= _libraries .endif -.if defined(_LIBCOMPAT) && empty(SUBDIR_OVERRIDE) +.if empty(SUBDIR_OVERRIDE) +.for libcompat in ${libcompats} WMAKE_TGTS+= build${libcompat} +.endfor .endif WMAKE_TGTS+= everything @@ -1241,7 +1243,7 @@ buildenv: .PHONY INSTALL="${INSTALL_CMD} ${INSTALLFLAGS}" \ MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}" BUILDENV=1 ${BUILDENV_SHELL} -TOOLCHAIN_TGTS= ${WMAKE_TGTS:Neverything:Nbuild${libcompat}} +TOOLCHAIN_TGTS= ${WMAKE_TGTS:Neverything:${libcompats:@v@Nbuild${v}@:ts:}} toolchain: ${TOOLCHAIN_TGTS} .PHONY KERNEL_TOOLCHAIN_TGTS= ${TOOLCHAIN_TGTS:N_obj:N_cleanobj:N_includes:N_libraries} .if make(kernel-toolchain) @@ -1362,9 +1364,9 @@ ITOOLS+=${LOCAL_ITOOLS} # Non-base distributions produced by the base system EXTRA_DISTRIBUTIONS= -.if defined(_LIBCOMPAT) +.for libcompat in ${libcompats} EXTRA_DISTRIBUTIONS+= lib${libcompat} -.endif +.endfor .if ${MK_TESTS} != "no" EXTRA_DISTRIBUTIONS+= tests .endif @@ -1420,14 +1422,14 @@ distributeworld installworld stageworld: _installcheck_world .PHONY ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null .endif -.if defined(_LIBCOMPAT) +.for libcompat in ${libcompats} ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null .if ${MK_DEBUG_FILES} != "no" ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/usr >/dev/null .endif -.endif +.endfor .if ${MK_TESTS} != "no" && ${dist} == "tests" -mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ @@ -1447,10 +1449,10 @@ distributeworld installworld stageworld: _installcheck_world .PHONY .if ${TARGET_ARCH} == "amd64" echo "./${dist}/usr/include/i386 type=dir uname=root gname=wheel mode=0755" >> ${METALOG} .endif -.if defined(_LIBCOMPAT) +.for libcompat in ${libcompats} ${IMAKEENV} ${DISTR_MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \ sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} -.endif +.endfor .endif .endfor -mkdir ${DESTDIR}/${DISTDIR}/base @@ -1579,9 +1581,9 @@ restage reinstall: .MAKE .PHONY @echo ">>> Installing everything started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install -.if defined(_LIBCOMPAT) +.for libcompat in ${libcompats} ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install${libcompat} -.endif +.endfor @echo "--------------------------------------------------------------" @echo ">>> Installing everything completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" @@ -1591,10 +1593,10 @@ redistribute: .MAKE .PHONY @echo ">>> Distributing everything" @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute -.if defined(_LIBCOMPAT) +.for libcompat in ${libcompats} ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute${libcompat} \ DISTRIBUTION=lib${libcompat} -.endif +.endfor distrib-dirs distribution: .MAKE .PHONY ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH:Q} ${MAKE} \ @@ -1678,7 +1680,7 @@ _cleankernobj_fast_depend_hack: .PHONY .endfor .endif -${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY +${WMAKE_TGTS:N_worldtmp:${libcompats:@v@Nbuild${v}@:ts:}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY # record kernel(s) build time in seconds .if make(buildkernel) @@ -3589,10 +3591,10 @@ _xi-mtree: .PHONY .if ${TARGET_ARCH} == "amd64" mkdir -p ${XDDESTDIR}/usr/include/i386 .endif -.if defined(_LIBCOMPAT) +.for libcompat in ${libcompats} ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${XDDESTDIR}/usr >/dev/null -.endif +.endfor .if ${MK_TESTS} != "no" mkdir -p ${XDDESTDIR}${TESTSBASE} ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ diff --git a/Makefile.libcompat b/Makefile.libcompat index 11668bf54eda..4bcb7479270c 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -6,10 +6,14 @@ __<${_this:T}>__: # Makefile for the compatibility libraries. # - 32-bit compat libraries on PowerPC, and AMD64. +.if defined(_LIBCOMPATS) + .include +.for libcompatidx _LIBCOMPAT libcompat in ${_LIBCOMPATS:range:@i@${i} ${_LIBCOMPATS:[$i]} ${libcompats:[$i]}@} + # Yes, the flags are redundant. -LIBCOMPATWMAKEENV+= \ +LIB${_LIBCOMPAT}WMAKEENV+= \ INSTALL="${INSTALL_CMD} -U" \ PATH=${TMPPATH} \ SYSROOT=${WORLDTMP} \ @@ -19,22 +23,23 @@ LIBCOMPATWMAKEENV+= \ DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}" .if ${MK_META_MODE} != "no" # Don't rebuild build-tools targets during normal build. -LIBCOMPATWMAKEENV+= BUILD_TOOLS_META=.NOMETA +LIB${_LIBCOMPAT}WMAKEENV+= BUILD_TOOLS_META=.NOMETA .endif -LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \ - CXX="${XCXX} ${LIBCOMPATCXXFLAGS} ${LIBCOMPATCFLAGS}" \ - CPP="${XCPP} ${LIBCOMPATCFLAGS}" \ +LIB${_LIBCOMPAT}WMAKEFLAGS+= CC="${XCC} ${LIB${_LIBCOMPAT}CFLAGS}" \ + CXX="${XCXX} ${LIB${_LIBCOMPAT}CXXFLAGS} ${LIB${_LIBCOMPAT}CFLAGS}" \ + CPP="${XCPP} ${LIB${_LIBCOMPAT}CFLAGS}" \ DESTDIR=${WORLDTMP} \ -DNO_CPU_CFLAGS \ MK_BOOT=no \ MK_CTF=no \ MK_TESTS=no -LIBCOMPATWMAKE+= ${TIME_ENV} ${LIBCOMPATWMAKEENV} ${MAKE} ${LIBCOMPATWMAKEFLAGS} \ - OBJTOP=${LIBCOMPAT_OBJTOP} \ +LIB${_LIBCOMPAT}WMAKE+= ${TIME_ENV} ${LIB${_LIBCOMPAT}WMAKEENV} ${MAKE} \ + ${LIB${_LIBCOMPAT}WMAKEFLAGS} \ + OBJTOP=${LIB${_LIBCOMPAT}_OBJTOP} \ OBJROOT='$${OBJTOP}/' \ MAKEOBJDIRPREFIX= \ MK_MAN=no MK_HTML=no -LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*} \ +LIB${_LIBCOMPAT}IMAKE+= ${LIB${_LIBCOMPAT}WMAKE:NINSTALL=*:NDESTDIR=*} \ ${IMAKE_INSTALL} \ MK_INCLUDES=no \ -DLIBRARIES_ONLY @@ -43,7 +48,7 @@ LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*} \ build${libcompat}: .PHONY @echo @echo "--------------------------------------------------------------" - @echo ">>> stage 4.3: building lib${libcompat} shim libraries" + @echo ">>> stage 4.3.${libcompatidx}: building lib${libcompat} shim libraries" @echo "--------------------------------------------------------------" ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${WORLDTMP}/usr >/dev/null @@ -56,7 +61,7 @@ build${libcompat}: .PHONY MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ ${MAKE} -f Makefile.inc1 \ DESTDIR= \ - OBJTOP=${LIBCOMPAT_OBJTOP} \ + OBJTOP=${LIB${_LIBCOMPAT}_OBJTOP} \ OBJROOT='$${OBJTOP}/' \ MAKEOBJDIRPREFIX= \ -DNO_LINT \ @@ -69,11 +74,15 @@ build${libcompat}: .PHONY MK_WERROR=no \ _lc_build-tools ${_+_}cd ${.CURDIR}; \ - ${LIBCOMPATWMAKE} -f Makefile.inc1 -DNO_FSCHG libraries + ${LIB${_LIBCOMPAT}WMAKE} -f Makefile.inc1 -DNO_FSCHG libraries distribute${libcompat} install${libcompat}: .PHONY ${_+_}cd ${.CURDIR}; \ - ${LIBCOMPATIMAKE} -f Makefile.inc1 _lc_${.TARGET:S/${libcompat}$//} + ${LIB${_LIBCOMPAT}IMAKE} -f Makefile.inc1 _lc_${.TARGET:S/${libcompat}$//} + +.endfor # libcompatidx _LIBCOMPAT libcompat + +.endif # defined(_LIBCOMPATS) # These depend on MK_*, which could vary between the native and compat # architectures. Thus targets using them are run within a compat sub-make diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk index aabfd6a06192..388a687e695b 100644 --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -3,9 +3,13 @@ .if !targets(__<${_this:T}>__) __<${_this:T}>__: -.if defined(_LIBCOMPAT) +_ALL_LIBCOMPATS:= 32 + +.if defined(_LIBCOMPATS) COMPAT_ARCH?= ${TARGET_ARCH} -COMPAT_CPUTYPE?= ${CPUTYPE_${_LIBCOMPAT}} +.for _LIBCOMPAT in ${_ALL_LIBCOMPATS} +LIB${_LIBCOMPAT}CPUTYPE?= ${CPUTYPE_${_LIBCOMPAT}} +.endfor .if (defined(WANT_COMPILER_TYPE) && ${WANT_COMPILER_TYPE} == gcc) || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) COMPAT_COMPILER_TYPE= gcc @@ -14,7 +18,9 @@ COMPAT_COMPILER_TYPE= clang .endif .else COMPAT_ARCH= ${MACHINE_ARCH} -COMPAT_CPUTYPE= ${CPUTYPE} +.for _LIBCOMPAT in ${_ALL_LIBCOMPATS} +LIB${_LIBCOMPAT}CPUTYPE= ${CPUTYPE} +.endfor .include COMPAT_COMPILER_TYPE=${COMPILER_TYPE} .endif @@ -22,11 +28,11 @@ COMPAT_COMPILER_TYPE=${COMPILER_TYPE} # ------------------------------------------------------------------- # 32 bit world .if ${COMPAT_ARCH} == "amd64" -HAS_COMPAT=32 -.if empty(COMPAT_CPUTYPE) +HAS_COMPAT+= 32 +.if empty(LIB32CPUTYPE) LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 .else -LIB32CPUFLAGS= -march=${COMPAT_CPUTYPE} +LIB32CPUFLAGS= -march=${LIB32CPUTYPE} .endif .if ${COMPAT_COMPILER_TYPE} == gcc .else @@ -40,11 +46,11 @@ LIB32WMAKEFLAGS= \ LD="${XLD} -m elf_i386_fbsd" .elif ${COMPAT_ARCH} == "powerpc64" -HAS_COMPAT=32 -.if empty(COMPAT_CPUTYPE) +HAS_COMPAT+= 32 +.if empty(LIB32CPUTYPE) LIB32CPUFLAGS= -mcpu=powerpc .else -LIB32CPUFLAGS= -mcpu=${COMPAT_CPUTYPE} +LIB32CPUFLAGS= -mcpu=${LIB32CPUTYPE} .endif .if ${COMPAT_COMPILER_TYPE} == "gcc" @@ -89,43 +95,50 @@ WANT_COMPAT:= ${NEED_COMPAT} .if defined(HAS_COMPAT) && defined(WANT_COMPAT) .if ${WANT_COMPAT} == "any" -_LIBCOMPAT:= ${HAS_COMPAT:[1]} +USE_COMPAT:= ${HAS_COMPAT:[1]} .else -_LIBCOMPAT:= ${WANT_COMPAT} +USE_COMPAT:= ${WANT_COMPAT} .endif + +_LIBCOMPATS= ${USE_COMPAT} .endif +libcompats= ${_LIBCOMPATS:tl} + # ------------------------------------------------------------------- # Generic code for each type. # Set defaults based on type. -libcompat= ${_LIBCOMPAT:tl} -_LIBCOMPAT_MAKEVARS= _OBJTOP TMP CPUFLAGS CFLAGS CXXFLAGS LDFLAGS \ - _MACHINE _MACHINE_ARCH _MACHINE_ABI \ - WMAKEENV WMAKEFLAGS WMAKE WORLDTMP -.for _var in ${_LIBCOMPAT_MAKEVARS} -.if !empty(LIB${_LIBCOMPAT}${_var}) -LIBCOMPAT${_var}?= ${LIB${_LIBCOMPAT}${_var}} -.endif -.endfor - +.for _LIBCOMPAT _libcompat in ${_LIBCOMPATS:@v@${v} ${v:tl}@} WORLDTMP?= ${SYSROOT} # Shared flags -LIBCOMPAT_OBJTOP?= ${OBJTOP}/obj-lib${libcompat} +LIB${_LIBCOMPAT}_OBJTOP?= ${OBJTOP}/obj-lib${_libcompat} -LIBCOMPATCFLAGS+= ${LIBCOMPATCPUFLAGS} \ +LIB${_LIBCOMPAT}CFLAGS+= ${LIB${_LIBCOMPAT}CPUFLAGS} \ --sysroot=${WORLDTMP} \ ${BFLAGS} -LIBCOMPATLDFLAGS+= -L${WORLDTMP}/usr/lib${libcompat} +LIB${_LIBCOMPAT}LDFLAGS+= -L${WORLDTMP}/usr/lib${_libcompat} -LIBCOMPATWMAKEENV+= MACHINE=${LIBCOMPAT_MACHINE} -LIBCOMPATWMAKEENV+= MACHINE_ARCH=${LIBCOMPAT_MACHINE_ARCH} +LIB${_LIBCOMPAT}WMAKEENV+= MACHINE=${LIB${_LIBCOMPAT}_MACHINE} +LIB${_LIBCOMPAT}WMAKEENV+= MACHINE_ARCH=${LIB${_LIBCOMPAT}_MACHINE_ARCH} # -B is needed to find /usr/lib32/crti.o for gcc. -LIBCOMPATCFLAGS+= -B${WORLDTMP}/usr/lib${libcompat} +LIB${_LIBCOMPAT}CFLAGS+= -B${WORLDTMP}/usr/lib${_libcompat} +.endfor + +.if defined(USE_COMPAT) +libcompat= ${USE_COMPAT:tl} + +_LIBCOMPAT_MAKEVARS= _OBJTOP TMP CPUFLAGS CFLAGS CXXFLAGS LDFLAGS \ + _MACHINE _MACHINE_ARCH _MACHINE_ABI \ + WMAKEENV WMAKEFLAGS WMAKE WORLDTMP +.for _var in ${_LIBCOMPAT_MAKEVARS} +.if !empty(LIB${USE_COMPAT}${_var}) +LIBCOMPAT${_var}?= ${LIB${USE_COMPAT}${_var}} +.endif +.endfor -.if defined(WANT_COMPAT) LIBDIR_BASE:= /usr/lib${libcompat} LIBDATADIR:= /usr/lib${libcompat} _LIB_OBJTOP= ${LIBCOMPAT_OBJTOP} From nobody Wed Jun 28 00:57: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 4QrNTR3DQCz4kJJN; Wed, 28 Jun 2023 00:57: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 4QrNTR2m25z46YM; Wed, 28 Jun 2023 00:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NeKosSUkdUTpclSGs0IF8xbV4IvRMJpoPtwuSRnxfl0=; b=m8tbZiCy3Nja/n4ScyM5DyKZhPOMpDN+ZrGg0yOJK5ItLKvoZjI0l0g3VxWxohfo5GBGFz 7iP7WDkNqCHmWTi/6HQwcAUMsACO5dFH2SFPH8yxfW+b6SQqnlJzp2CejAPt7ocQ0jxSPM MUmzJQN6rV9Ie9RGGsqbPtBfhdbcbrlyQoG9JEudXRoO7Urd46k1t6EHt9F+L2qbimwL7Q UXSIQ2zb9jhM7f5a0AJtddtHTFJvjHrLG336mygCL4IBi79FsVapM5XIRR8DPMwWrXbxLn powIlNoQ+TTmSPJiWLOLF2BYTJM5q5T7eU80eb7Q8yB9OcK3W5Z2/zPJ7iAFSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NeKosSUkdUTpclSGs0IF8xbV4IvRMJpoPtwuSRnxfl0=; b=HL2WJGZkQJWgDzwH1ij3y0EFvawLNR6hENvRu6Ilq9Nf1qfHdOF4pxjLmArzg0M9fNQl+t nz2bRS8p2JweIKZMWblp00uYYs9WGZRDnOVLQPGdlUuAcUwYP5Knt4YHG6xDIZCvs0T4Ug 8XFftrB+J0cXyuIPHZb+BgWhNProgvtnM8RWazwaljmmP10ZsbJ9C4HT5CoaLtLvoraDOC pUBU/oA7P/Ih6MBhd9ywU6qH04bswCLdtDAq/V7vyAmY+rFNUUzCbTL4UdvMHGFpG85WSE DfY83IbxEsPYpCjjiQ3XKmeIZryxUZzY3iZek9Z1SpEd6bneATnwNOps6FBNwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687913835; a=rsa-sha256; cv=none; b=K+53dsxMO46mql37MhHRzQrG5epTs+SsxQVPswHy+Ts9am406tdAswhphI9esDxUEubk3z 4oS6AzYMluWCZbRwYQ5MOKP1M9gUujN3drKp70mGoivTGmrFh35qAWz72H0JNG+F1jKnZx 9kGa9cf8/ZLYmrVU+cPJEGGgRSBrgW59toxzaI1BPr4Yj+daHH9ygKeRAiafdfVx1T5Mm1 gcMMR5QT6ARf2o7G3aySEh/mt9vZue9tn9T1/0BBMYfsk6eAWwYwcGShc0kpRUl72lZVcf 77kSVMACRMHqBqoKyjkWgd28NDSawwqYpHJMbkWZE854vsOo8WL40TzG27u5PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrNTR1rSLzF1V; Wed, 28 Jun 2023 00:57:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S0vFZB079094; Wed, 28 Jun 2023 00:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S0vFDc079093; Wed, 28 Jun 2023 00:57:15 GMT (envelope-from git) Date: Wed, 28 Jun 2023 00:57:15 GMT Message-Id: <202306280057.35S0vFDc079093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ca461ad3dec4 - stable/13 - top(8): designate the sorted_state[] array as constant List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: ca461ad3dec4cf90879bee18080ee31effe3652e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ca461ad3dec4cf90879bee18080ee31effe3652e commit ca461ad3dec4cf90879bee18080ee31effe3652e Author: Konstantin Belousov AuthorDate: 2023-06-19 13:49:19 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-27 21:04:14 +0000 top(8): designate the sorted_state[] array as constant (cherry picked from commit 5c6393451f58c4e6c92410ae66e28c899bfacdb9) --- usr.bin/top/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 2fbdb8551bb0..c11851ebce63 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1261,7 +1261,7 @@ compare_tid(const void *p1, const void *p2) * that reflects this ordering. */ -static int sorted_state[] = { +static const int sorted_state[] = { 0, /* not used */ 3, /* sleep */ 1, /* ABANDONED (WAIT) */ From nobody Wed Jun 28 00:57: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 4QrNTS4NlSz4kJLV; Wed, 28 Jun 2023 00:57: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 4QrNTS3cvjz46sH; Wed, 28 Jun 2023 00:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QncGCnfgDLQYapnxUtA7nC2YQ1GYhmExHy9r+BAAaU0=; b=RqdCw34Mc1qocPA6yIYKtO37cQNpOXnHXibPdZMkZ/3qGqY9oVTleg93XSPvkUxz0WeCbb 4BMLSTeN21hYxrxs08qv2gWuJ9Pqcdq+Ero61boGHulkkfoJRFe+S6VUntDWUYcMprqi6R v/6QfiYitStZcDlNL1XcDvO3HyKXT5AMQfqNBICR9qv3DvIh1rQDB5Yi5TktpaBSOPQZQH /KFyT+5v/Sz0mbzb/Rn50shbWjxKooyauOTI8vJGL0Lixh7Fj4C2llelAZVeUFYWSj6eon jt4Edl3ezWBwmSbDra+SBkJ2Th22lWhBjOdhs5HvbblBQQbg5fNJiiML/r1yqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QncGCnfgDLQYapnxUtA7nC2YQ1GYhmExHy9r+BAAaU0=; b=EHtNQxPf7Klv19UpuRmUMAREz/348i1Xqjaz86DlqgHerGVvcrn/XM36rtNPwpNbMXPI5N QTK+y4HoHbzkVwFKQO7a22EKfxZ1Nxt74J+JUFCPmKmZr2BGNxS+bSBHqyGmkacwE0va7x ACyV6VferST8oF4cOzv172PpdyBD1yrI3BlyZZLw1cAMQLM+15Oy4IzL2RgAsMuutrKnhh gK/gpmXX0FQkzrND+QOGRu6Mmkb+r+JyN68f/szj16rtl7mLrEJK0bGg2iMuby9wzh0sRe rZHTEbinOXEqMrECGIfMwECjENWHNF2kRSRe1d4/5nplDRgU3QsCFCKyRcFo/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687913836; a=rsa-sha256; cv=none; b=qtu80LaSmC4yROLiIENEVYemcNHcLK5mEZCt1tiCOXM2ES1BfZQgAOm/p7r8s2KScuNH98 bVEkYjoWHHV33Qu2HEoMWgpczY5BpGcXarxhdfbmTyySx4eMbD/SB/GdLJG1E4jY3MqN4g 4CQDW4a8VmREiEvcXW/kQXMfAyTbqXHDqAka05utrW5+gcR4KdusoKU5D5lNJzkK7gfThp yjlFOaXgAKhTrCn8UaCx4ijuldXtmURF8XryU00AJoNbIFR1XM3qxIm+bExFymPf7x+s06 B2Oy+NKRZ23wx725nNu+d0jRwteySJpWNblleFqUwn2yMrGuGQwUBTQ2uMjd0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrNTS2kgvzF1b; Wed, 28 Jun 2023 00:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S0vGx0079116; Wed, 28 Jun 2023 00:57:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S0vGwq079115; Wed, 28 Jun 2023 00:57:16 GMT (envelope-from git) Date: Wed, 28 Jun 2023 00:57:16 GMT Message-Id: <202306280057.35S0vGwq079115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: deb1289c9e6a - stable/13 - top(8): use designated initializers for sorted_state[] List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: deb1289c9e6a225ad05d4d0d710f3c42297e14df Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=deb1289c9e6a225ad05d4d0d710f3c42297e14df commit deb1289c9e6a225ad05d4d0d710f3c42297e14df Author: Konstantin Belousov AuthorDate: 2023-06-19 13:52:05 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-27 21:04:15 +0000 top(8): use designated initializers for sorted_state[] (cherry picked from commit bc2ac2585aa89c110861972aeb243719ea5012b8) --- usr.bin/top/machine.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index c11851ebce63..033861d3f7fb 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1262,13 +1262,12 @@ compare_tid(const void *p1, const void *p2) */ static const int sorted_state[] = { - 0, /* not used */ - 3, /* sleep */ - 1, /* ABANDONED (WAIT) */ - 6, /* run */ - 5, /* start */ - 2, /* zombie */ - 4 /* stop */ + [SIDL] = 3, /* being created */ + [SRUN] = 1, /* running/runnable */ + [SSLEEP] = 6, /* sleeping */ + [SSTOP] = 5, /* stopped/suspended */ + [SZOMB] = 2, /* zombie */ + [SWAIT] = 4, /* intr */ }; From nobody Wed Jun 28 00:57: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 4QrNTV0tX3z4kJFx; Wed, 28 Jun 2023 00:57: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 4QrNTT49Hjz46xw; Wed, 28 Jun 2023 00:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SFweqlQsrWToCItx+KD2Sn4STwvE/wJix4ZTe1mhTJA=; b=g9X08xcPvFPiiWL1euKiDtlxZKILPL/7z5LnWF4AvrtRW5z1eJhowJv7IhPvDWYNrF+p6r ntw63uIv+Zz59ZvIY4qWZXE1R+2tDPfwKRNNjHAywAB2/hM34tQ6SFyukpKSxlIuFRLrlJ 4JMxW7FGRkedRRiWpxrH/vHRh9MIJ9i6WhpmZDBzDC8sMkHYAyfyHCHJAVvQ2nkubTmamZ KuEnajoEvWwcA5Iaas2gCEv4iYEUlV5/KTrwIhHcZChH0sDcBYy1cki08p5yyTlufOnPXW hKnpC8TeCGi77bfG0TlAkBItZk6ZYRYDn8dzrY7t7Pbc9prmJmP66ynqTX0+3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SFweqlQsrWToCItx+KD2Sn4STwvE/wJix4ZTe1mhTJA=; b=PWh7oCMbFHEp88xTiZSMhnQGDiq1vA7WjlUHNP8B1wZp0q86ON6qKlqgdDZVoxH9a1dApv Z3oI3dt1uYh+GB93VniUExNCBIs7NcyFVbiug4lkXojANRQ7FPthvAS38qCNxUeVbueF1a Ev497Aadod5VjDyJHCx/WVllrkAAjQulP8XM/spEmuPt6Ir1By++X+jFM3vaLlp37sxUx3 i+WfyJadAbTLUys/zuC/lW61ACnxrIA3yHMW2Z9JYyJMhP4PfdHv0eYo4J2d7UmM+jwB3h FgXj/9hCmRD/BjRCvcB/rY6IWmuVZKjyJaoBW3EKB52l2+CuWAISydVB6n7gLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687913837; a=rsa-sha256; cv=none; b=CFXXxIaJ6uzXurcyFmHEhJfPvQvM/quZk6/MYfzMfHUdUTa4ea93RxwxfKzHWuAc5YLZGK PiwJY7zbNmuYbRtwBkRsbipE6c+Ygl4IsRtIrYe9lDKdeNvbvl5Cb+Ck5cbCWmS0tXuddZ MFAS75LaJJkoJiAB4P46UQcqXLiMl2DH75p421yH6iiAlVUvsx/RZ6JcP+s2FvwpVL4H/9 RchHqkRAvz7CuIBw8E5gdW5KZYRtKDV8lijAmFIzhnQ2O1YNKGAKu7qGT6SniJOtScUutT NC2Sw4i2E4QVHIzXeAoGZrbOB85momi1+OlM7McDmLnX3Efu0KbDDwXA5VGJYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrNTT3C6JzDnJ; Wed, 28 Jun 2023 00:57:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S0vHxU079142; Wed, 28 Jun 2023 00:57:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S0vHLX079141; Wed, 28 Jun 2023 00:57:17 GMT (envelope-from git) Date: Wed, 28 Jun 2023 00:57:17 GMT Message-Id: <202306280057.35S0vHLX079141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8a5c2ed0c7f6 - stable/13 - top(8): document the actual sort order for process sorting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 8a5c2ed0c7f66cfa5c3b40696c9b531be17886a5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8a5c2ed0c7f66cfa5c3b40696c9b531be17886a5 commit 8a5c2ed0c7f66cfa5c3b40696c9b531be17886a5 Author: Konstantin Belousov AuthorDate: 2023-06-19 15:57:00 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-27 21:04:15 +0000 top(8): document the actual sort order for process sorting (cherry picked from commit d636fc5bd1e218d2eb4d017b93ee59f5db5c8507) --- usr.bin/top/machine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 033861d3f7fb..15788fe53443 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1256,9 +1256,9 @@ compare_tid(const void *p1, const void *p2) * distinct keys. The keys (in descending order of importance) are: * percent cpu, cpu ticks, state, resident set size, total virtual * memory usage. The process states are ordered as follows (from least - * to most important): WAIT, zombie, sleep, stop, start, run. The - * array declaration below maps a process state index into a number - * that reflects this ordering. + * to most important): run, zombie, idle, interrupt wait, stop, sleep. + * The array declaration below maps a process state index into a + * number that reflects this ordering. */ static const int sorted_state[] = { From nobody Wed Jun 28 00:57: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 4QrNTW2XHJz4kJC9; Wed, 28 Jun 2023 00:57: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 4QrNTV4hVDz476H; Wed, 28 Jun 2023 00:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+NXLuLadSyBwc3dlL9bLvOgekwbMOHOs4hHbCf5yeo=; b=Ul8P1TAGhKoXo7BMVdrumGl5dTh3yp94JPoV9ba9m0C+bLvxqWEdN0t2II4Op6MKEuZrtq ZiuD5hFwga4QtZkgbH7jN9jR3EMo4E2zpUjun0lug4G5OdaZfMDyfgTqSw5KD0ylSQ9tUf FfnjOzNcjOVYzA2UvNOGLDmc0ZFoluOOZD/KYuGClFQ74QEfIv1ZXcMuHTF0srdsrtp67h IwU4RA1R6GQSgpHDJoZgdCmkSeNxFllHout3Nj2HVsi9fCsZkCUrmaqGFmzTrNOip+6xwA ADr5eUE58CGoG7C+0aXJIe4DaVx7AdshLZ/Mvkjy514+C4iCuY0BSXVdZFGY0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+NXLuLadSyBwc3dlL9bLvOgekwbMOHOs4hHbCf5yeo=; b=h0dH7gbyjUw8rUcGqqDpCM1D7Q3990sNHs+NS3phveG0C3vqwjEWG7zNgWVFbqAUZMqEDe VWz0HtRvZZU86+E2YtmV4P1aqp9eXfwqQUG025tJj2ypkBwe/qCFl4SBxae0mvRzkdaD6i 6e6A9QGyneMhRvBv6g2ji3Pe8UTNO3us5O8uPsAHHwyayYzhGySzvYvTPJpr7tORd+AMUj 3fyvDvtrpXe5G9wxyCgG2Ceg84A043uTLk3Bwlb10hiEEYN7+/+kr+dzu4PPxllo83o/es L3Ti5hAO/d2j8cyjgdWjVkcNHheEZqvUu1clzqZZcQk3rO2rDFU7surYXvdp3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687913838; a=rsa-sha256; cv=none; b=Ft7G3mNbmQ5zsRRcrpDp/igsa2tjgFh/9JW5mgd2pQc/bpzf/VRIOPTUzux2Es4FizYDaL nBGhf3kki2hqWJzdpLzWUAf+0rSI/YyqW2v847ORs9HW8vITr9c3k06tb3B/L4ySUAPf/1 JsOoRCkMeTxbaWX3P3rNfGO+2gQZIy5s5M6N5UJaxJ+N60btiCI/BNKcDv6Ky3ysca+FjG +1zlDyYQZtgcKX9/Vzdom5V/QtDFWRoej3syZzEX2Lk6fHGj66ZldMnjTet/mknyjab1jv xO3JW/zEgiaMeEmRbZljIo6/pL8TBKfIN61yiTPqoat9BpmR3ZNEKic6TDAatA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrNTV3pbPzDrT; Wed, 28 Jun 2023 00:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S0vIbU079161; Wed, 28 Jun 2023 00:57:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S0vIa7079160; Wed, 28 Jun 2023 00:57:18 GMT (envelope-from git) Date: Wed, 28 Jun 2023 00:57:18 GMT Message-Id: <202306280057.35S0vIa7079160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 732e4df3b388 - stable/13 - top(8): add missed SLOCK state to the sorted_state[] List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 732e4df3b3884790588bc97392895b832dbbc0b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=732e4df3b3884790588bc97392895b832dbbc0b6 commit 732e4df3b3884790588bc97392895b832dbbc0b6 Author: Konstantin Belousov AuthorDate: 2023-06-19 16:00:15 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-27 21:04:16 +0000 top(8): add missed SLOCK state to the sorted_state[] (cherry picked from commit 6a5e6a50bd55c3fb4933abe1edaad3a928700c42) --- usr.bin/top/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 15788fe53443..1785db8b9dc4 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1267,7 +1267,7 @@ static const int sorted_state[] = { [SSLEEP] = 6, /* sleeping */ [SSTOP] = 5, /* stopped/suspended */ [SZOMB] = 2, /* zombie */ - [SWAIT] = 4, /* intr */ + [SLOCK] = 7, /* blocked on lock */ }; From nobody Wed Jun 28 00:57: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 4QrNTX1S90z4kJNy; Wed, 28 Jun 2023 00:57: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 4QrNTW5kdRz4798; Wed, 28 Jun 2023 00:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ATFwdIs1pVx1NAmictf1RuiXqTkWrMg3Ygz5r2fTzCc=; b=BOIWXFAeCyVydBUhunzd9l+THMXXyDeVQvBoPzen0nbyIAg8fpfUliuGNxpzpUTI+QClxM zJeJkyT0rXcD7f6PzWk0X7xiO8nPIfz2NsneXzG9/kmSzM67Lv5+vNht8dJXGKPqO4V50l 1P1qdZSEPHFdxA2qwc+s2Wm+WP8To6+0jAVo8uG12eRPRFzcamKa9OQIMUNOuBoUuO+eMy EXl7+Zh8aRQg3moWI83GRW1EWNT2vhoK7zLtVTBZkHt/KBuz50JvhStWD7p0kkkydIJa4n iPFYm9rzVJwCe+qPqXes4zzfmNOR8loRRsyoe76HL8BFeQ9mfsu9gRfKZbY1vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687913839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ATFwdIs1pVx1NAmictf1RuiXqTkWrMg3Ygz5r2fTzCc=; b=Iwl9KcfduNt/WDRd+qbI8nODiOlrJfjKVKr64/rWrUTqYH3ZQxtE60z2VpnhguHnuDqC3r vvmzHp1NCY0Uap77faA1BoxMtNYtuFgLFrlhiyxFOMIxx05xmgFk9HcTq73RMsKXOwVZXT bw8g6L2pd5toJyj0tj4B1rPS4BD9Lz4mQA1hoXHUT8KKg+6Gp+N3ViO7QTz441eZGuJxTA 450yqL6KYjTB/K6S+qfbX6F+jt140MX6tfDzHKccMCE2//tuJahp79dd52Drhrk2aYcrQp 1+hLvzHM98qb9RL8nNAGzmOdp7UrLpriSvMa0I2B8sM8Wz+czfbaPPKvjbiDaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687913839; a=rsa-sha256; cv=none; b=mIj+l+t4jKFLPwzE29c/ccP/R5JT5TKqapKkLjZx0YnFWMwfsDOqgJN+gnSeFzCcCz7HLo w4HdiRISvDcY6vY390ycovlnSdW4TdD931ntxXtEZ/5O9YS3TlowGBCnJRs46oCUjM/70d /Xm+3r8GUIieM4UXDXEOs6w11eZFv1CWYQQz5AMjv5XT2A73+5ztj0x4FuVgB9OQi5BMZH cOl/vZpCe+8o9TfFk2IKzStXkvOv/Al2iCvoo970gCKsyQPylP9TllPW658bAHsk+1XYhN eFtCKlqqILL4h2JUqXRiZqevGlNg9YaUMkyXR633FlG4+46wSXMdQgF3GM+Wjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrNTW4kmQzDj6; Wed, 28 Jun 2023 00:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S0vJoj079180; Wed, 28 Jun 2023 00:57:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S0vJnw079179; Wed, 28 Jun 2023 00:57:19 GMT (envelope-from git) Date: Wed, 28 Jun 2023 00:57:19 GMT Message-Id: <202306280057.35S0vJnw079179@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 15347d162287 - stable/13 - top(8): restore erronously removed SWAIT array element List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 15347d16228773e715400577cc01d0b56244976a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=15347d16228773e715400577cc01d0b56244976a commit 15347d16228773e715400577cc01d0b56244976a Author: Konstantin Belousov AuthorDate: 2023-06-21 05:43:11 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-27 21:04:16 +0000 top(8): restore erronously removed SWAIT array element (cherry picked from commit 5bd5470a2c975b8d3c841a68ac66bd0a3acdf966) --- usr.bin/top/machine.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 1785db8b9dc4..414b92560523 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1267,6 +1267,7 @@ static const int sorted_state[] = { [SSLEEP] = 6, /* sleeping */ [SSTOP] = 5, /* stopped/suspended */ [SZOMB] = 2, /* zombie */ + [SWAIT] = 4, /* intr */ [SLOCK] = 7, /* blocked on lock */ }; From nobody Wed Jun 28 01:33: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 4QrPGq4CZJz4kxwS; Wed, 28 Jun 2023 01:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrPGq3ZTJz3DGw; Wed, 28 Jun 2023 01:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1dOvFLirulABbR5YQWe0TiCjsQfFEI89prccvaA2TKY=; b=HEqZbQF8WlpuNfTScxYo+pkcWs8QMZvo8RP6nh4AIO+Of7Cn9C54XEvGp9NytnChwi17t1 ankFSSasBGL80wHctsk9wxVqabqJlGVFFXANxb300IJG0vCNJbVRlFfLB3Ib9yDNczwvsM nRRJEunuO9ot5Q3f+qJ898wTk46gbjA9l8bmx9eRZLK3sYcvuIZtxJpJ3AUfyjiSYw2+Fn 93KVjVFeNq2kQw9kpyZk2CdyqrCO1glUr8ro43xgox8A+UrQJBN4vi6S6L6/o6tk4PiTWi h2hM1xAl1Q1dNj50qjjPNlW2zLrEgtV9BKujnSupjO93Ya1iziEM/oYYETuEzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1dOvFLirulABbR5YQWe0TiCjsQfFEI89prccvaA2TKY=; b=pwv+actmdeV2dJDFmQMpVGm5WzgvUa2kLQpnxReHvyFgS+WZoHmc6my88Qxns6AQml9XhL RarxXpXc6VwWVKxdXNc/Bki9/LUXhzUK8wzeyRsM8F/AVxNG4PT0HCueCv4QgXdNC/QNlY b7PRpIUxVwH2Ex5hHy711tOKBpvUHT/qE5Yt5a102+e/U0MyH2FyKEyZHf5Qq0/1tEs4v2 0sPZkYmLQ4IJ+iK6FopZmk0RJ7OMglnR9Ny5pTIBM18Mdnryhz6vfGFXVK9oIJ3YgB2niU f6lELC9LxMJlN38gbm7ko3Vyfpd0vxi0U9DsC2kb39NbEAbztk9HeF5QBahmrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687915987; a=rsa-sha256; cv=none; b=lsSqQXY3luUKNJTx3I983JykmH3HUAAM8R7HJFJD/yQ/StA5YefNkXMFab+fzjMyqwFQ/X Yk7VlJ2LDETEL7UAH0mMGkFMZ6AaWbdFx/q0GauEwoeyTjM0R0i2V/fAk1PszS5i4RDZi8 nah14c5kTZmu8KfNOZkBi3G2fzmU+7vL+/lkclDhVmWdYm4d2kDue5gnMVJHLOuHjgPwJm P42BT4QsPqOuUZGJibp945BeyjfY7uwaYyzzstTD8L8ULVcHCCIM8SDcEj9+NILOKnq/jN f4NYJ1hwrfcD/bk9LySs8/tLk2dN/4tuYjLSGQN6PiwXIVAg2FALOEtN6kmkCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrPGq2dzPzFYX; Wed, 28 Jun 2023 01:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S1X7jB044983; Wed, 28 Jun 2023 01:33:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S1X7Ye044982; Wed, 28 Jun 2023 01:33:07 GMT (envelope-from git) Date: Wed, 28 Jun 2023 01:33:07 GMT Message-Id: <202306280133.35S1X7Ye044982@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: 1b18fb7faa75 - main - LinuxKPI: list.h add list_count_nodes() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1b18fb7faa75cc6dfa2e253190b41e63a997ca9d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1b18fb7faa75cc6dfa2e253190b41e63a997ca9d commit 1b18fb7faa75cc6dfa2e253190b41e63a997ca9d Author: Bjoern A. Zeeb AuthorDate: 2023-06-26 08:45:17 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-28 01:32:29 +0000 LinuxKPI: list.h add list_count_nodes() Implement list_count_nodes() using a simple loop. This is needed by an updated wireless driver. Sponsored by: The FreeBSD Foundation MFC after: 10 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40757 --- sys/compat/linuxkpi/common/include/linux/list.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index 46da7cc7bc8e..194f09f0c570 100644 --- a/sys/compat/linuxkpi/common/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h @@ -466,6 +466,20 @@ static inline int list_is_last(const struct list_head *list, return list->next == head; } +static inline size_t +list_count_nodes(const struct list_head *list) +{ + const struct list_head *lh; + size_t count; + + count = 0; + list_for_each(lh, list) { + count++; + } + + return (count); +} + #define hlist_entry(ptr, type, field) container_of(ptr, type, field) #define hlist_for_each(p, head) \ From nobody Wed Jun 28 01:33: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 4QrPGt17Wbz4kxlW; Wed, 28 Jun 2023 01:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrPGs5ddjz3Ddp; Wed, 28 Jun 2023 01:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AZstMLRQcKpjmlwblU9/HKBnEmgFqKuHrKDEUaecl9o=; b=bvKUQybzi+mFaE3xmswutrkEZ5Q0rLMLZiGlIs7fvHFYwaiLWASFhTV2ObJURA/dTdZ/sM AVcCAPznSAog9Xvmds84ZhkeR9R+oRl1hlHrQg1MBjtngoMNEKRsrhUOnBkpciOxfxPoEV 3quMLqRSJMuPznGZ4y5MXXE4tUNyNoy2nZrRRgQRmMACGK3yVEZVdyxNfUksqQ0+0nsjKO ASr8QlyDsQQ5LjpabxrNXsYpqzwiHUAXMVfGKyYMyx7cEUZ0NcyS+gRksKoYkeUmSrNjUB Xqcw31Swy2uddoC06iXzRWBizdLLPPgXOVFnwuwE31bXTyuwF5XZG6WlWcJ5GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AZstMLRQcKpjmlwblU9/HKBnEmgFqKuHrKDEUaecl9o=; b=qJAQlTwLRu46fNWItwKh30V8HMGyknntPjqzjNv5qzVIDol635G7PY9ArE61VvaJ2CNfb7 0tVHHFDrLJPK0FPHgp8Xui2cZBSL4urMU+ahvlXm+UgO9DI5MCOBozG45JnPi318PGO3uu bEkGMaqdOWEenQy/79FPoINvk2yubBsJVgP/ICjkfLRvPdRAGA682KvJn4y6l+DfERW3nL vtLrszLHYEolQmEq/XEjkKqluJmdW3dJndjveXzELnrjCnC19acq1ab/Gly90edmRicdAy A8ILxPzkzvfG8m8YLARm5GTWoPry+XdfonIxzuZBrNHaSK09xD1pX/MjIjbUpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687915989; a=rsa-sha256; cv=none; b=HlNQJhC2St6xqjQSJE7QJ3fCKh9DwnVQzGn8n6+sjxlTU3+w7zOcI1I7EiTN9NennI1ol4 s8a4FZAl5Nd47P4tpOU700sFjW009+miOfBGRu11XRXrdRlBqBavA6U9xtsizPGXTT58Ad LGzKiSAN6+gMNVCbrMgcmajvvU7MSr2PlX0fOGqX72U0wQKJ5sBYrmpRdksBRZOf0VkvSL a6OVVoXYmO8YbHFrzCkDbfAjDf2CWVQmfWA9MrnpJVzt/gMn7Gh8yx397IfHx4nt67Liv7 1UBba5AYlXiLDAfBMuPPxS/DpVs9sQ6R3GHFhH3jiUQ0spFiaPEoCJAk77WB3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrPGs4lJJzG1b; Wed, 28 Jun 2023 01:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S1X97L045115; Wed, 28 Jun 2023 01:33:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S1X9OJ045114; Wed, 28 Jun 2023 01:33:09 GMT (envelope-from git) Date: Wed, 28 Jun 2023 01:33:09 GMT Message-Id: <202306280133.35S1X9OJ045114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5771c3bd1df8 - stable/13 - systat: Fix a bunch of use after frees in fetch_ifstat(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5771c3bd1df809113214abbbc3f42d8e05277b4a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5771c3bd1df809113214abbbc3f42d8e05277b4a commit 5771c3bd1df809113214abbbc3f42d8e05277b4a Author: John Baldwin AuthorDate: 2022-11-22 19:11:42 +0000 Commit: John Baldwin CommitDate: 2023-06-28 01:32:47 +0000 systat: Fix a bunch of use after frees in fetch_ifstat(). I think this was probably just a typo. initifstat() continues around a similar loop if the mib data fails to fetch, and fetch_ifstat() was already using a FOREACH_SAFE loop here so expected to keep going. Calling clearifstat() from the fetch routine also seems wrong, and the sort_interface_list() call triggered by the existing needsort = 1 will itself set needclear to trigger a future clearifstat(). Reported by: GCC 12 -Wuse-after-free Differential Revision: https://reviews.freebsd.org/D36823 (cherry picked from commit f6fdf9214a657351e78c68aac1888e674c0481f6) --- usr.bin/systat/ifstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/systat/ifstat.c b/usr.bin/systat/ifstat.c index 82e3429dbfda..d5e43cf1d0aa 100644 --- a/usr.bin/systat/ifstat.c +++ b/usr.bin/systat/ifstat.c @@ -299,7 +299,7 @@ fetchifstat(void) SLIST_REMOVE(&curlist, ifp, if_stat, link); free(ifp); needsort = 1; - clearifstat(); + continue; } else if (strcmp(ifp->dev_name, ifp->if_mib.ifmd_name) != 0 ) { /* a device was removed and another one was added */ format_device_name(ifp); From nobody Wed Jun 28 01:33: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 4QrPGv3KFNz4kxp7; Wed, 28 Jun 2023 01: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 4QrPGt6khHz3DTJ; Wed, 28 Jun 2023 01:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P6Px+PWKaFdGelQb2FtQ/RLCU6EksKBM5h8Pp7hjF3o=; b=JH3Q9nrAwpbUneBfm1Kt0buyUVytT66WVrTy3GlXVmkZTMfU9wEIyC3U8SEx2H7sMv9cbw 0Pmrm8cg5gBE+C/UXnwQrnjlKwELmUdL2rIY5fu7jiPsHeA8YNgA6npAqW8+3gt76QK+2m aV7yun5s62m0D32YjWpJM3z9fcmq1S10osRl/bpeZn6ogQ9ye7DUDNyhqZhPZqnTWdudfm PDIMNGnQ5SB2HIIz5vsBfNapXQfhRE3yieCoa4SAEIdKmIwsXrSTREzagIMPpwtkR4oJNy yhDsytVFnsw6sN081agoeYu/k4aYK6pAFyIDrOKAi0HqKV7sETfbzFhoTGBbOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P6Px+PWKaFdGelQb2FtQ/RLCU6EksKBM5h8Pp7hjF3o=; b=b6lkGGQBvQ62a+nn5pz2brYmx3R1ACwNTvTPHb29C7OripphR/n5L2JNQTVrwHv1eBdCyA w2bXjtvizoOZtJLkIInxBfUdF/h4XVM6c6r6MxCyWJXTWELHUJXgcVfSKGX1dR2KvWxACe K3sXoobR2KvXMdQReaJ1ngtuu5ZD5KVjiqZZMr4DGKCbM5JEYDIZF76NCsQw3bzRIXw0yL j5ACVuJtAlBLXLq+FOUMlTyTQdpfnql4inSwlz9KRpKtvAadl+JiR0sEeUC2x4z2C+WACs GVLyXK7+Gbq+0e9sVn+gSwvV8EYajtjNFEAb/iizLU73eNv2wqk1f+6E9ObD6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687915991; a=rsa-sha256; cv=none; b=Ne9EcHS0k8hiC80PWW8d8nG+RBIfM4Bjxg4lP8TFdcY3QtpJ03Atfnzv4GrYS6qGb1JdV8 CT4rkWTF9Zpo8E6UH1J/lzMQ+5BuXWrdL8SFfrXiI9nrK0BpH4MTYSer2F0bEPkZwvRlMo TGUwqBIPiYNRev4zO4klXAlzl8vD1wLoqxiPTGumIW90SCePmYN6w0SKNnagHKyA/AMwMV FrZU7RCOXU+8oKwx04LzIYQUHnsn6GbRhuI5AROtSgyylAju05wKB72RpuLnhW1+kyng84 UQCzmhesgzlWKOKrW7kuTgFkHx20JYubl2W6x+kfISEg5f8S6/HogLAci4dCyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrPGt5SKYzFcm; Wed, 28 Jun 2023 01:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S1XAoi045139; Wed, 28 Jun 2023 01:33:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S1XApw045138; Wed, 28 Jun 2023 01:33:10 GMT (envelope-from git) Date: Wed, 28 Jun 2023 01:33:10 GMT Message-Id: <202306280133.35S1XApw045138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ed19cb27bde8 - stable/13 - ether_demux: Defer stripping the Ethernet 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ed19cb27bde8c87ece83e390b0fd40991abdc9b3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ed19cb27bde8c87ece83e390b0fd40991abdc9b3 commit ed19cb27bde8c87ece83e390b0fd40991abdc9b3 Author: John Baldwin AuthorDate: 2022-11-30 22:38:51 +0000 Commit: John Baldwin CommitDate: 2023-06-28 01:32:47 +0000 ether_demux: Defer stripping the Ethernet header. This avoids having to undo it before invoking NetGraph's orphan input hook. Reviewed by: ae, melifaro Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D37510 (cherry picked from commit 79b679942352a7f10d759fdee1892aa251e0f439) --- sys/net/if_ethersubr.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 25daf13ccef6..9a614fbe6844 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -886,11 +886,9 @@ ether_demux(struct ifnet *ifp, struct mbuf *m) /* * Reset layer specific mbuf flags to avoid confusing upper layers. - * Strip off Ethernet header. */ m->m_flags &= ~M_VLANTAG; m_clrprotoflags(m); - m_adj(m, ETHER_HDR_LEN); /* * Dispatch frame to upper layer. @@ -918,6 +916,10 @@ ether_demux(struct ifnet *ifp, struct mbuf *m) default: goto discard; } + + /* Strip off Ethernet header. */ + m_adj(m, ETHER_HDR_LEN); + netisr_dispatch(isr, m); return; @@ -930,11 +932,6 @@ discard: if (ifp->if_l2com != NULL) { KASSERT(ng_ether_input_orphan_p != NULL, ("ng_ether_input_orphan_p is NULL")); - /* - * Put back the ethernet header so netgraph has a - * consistent view of inbound packets. - */ - M_PREPEND(m, ETHER_HDR_LEN, M_NOWAIT); (*ng_ether_input_orphan_p)(ifp, m); return; } From nobody Wed Jun 28 01: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 4QrPGw1Hfdz4ky71; Wed, 28 Jun 2023 01:33: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 4QrPGw0gRTz3DwD; Wed, 28 Jun 2023 01:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jAYsN3PMmHXdVJoIc+C2RAQBZqEE207ELv3pRsFZv/E=; b=YFRtyspC8OZm9/A07j390gRg16bK165NC7TpKiUgZxIXy/koj1qZjgEVcXktLowujro/CT 81uIuE0PTkC/2AcSlU05XjWIIANoOkWfLNABGNNHUrfiWu54WFkhqJVB9yqhBizcj8HmaG xmq/utlpBU46ZDxZJHfXIhp0AYOE8IjbvG5zqCC60gLqIgLfIzHd6iJmOBdoFJ4IQqMxmK EVFigaDmhgZYjtlG6pznJ676sWp/DfFfwrCYWFLSvkRl+6pTWvZjfQTcZKOrOgoPo5pbZG pLtCE9oO4BTd4owEP7/1Xg/j4RKtScnEVfG/mTe9Uc0BlMiprSYSSfXfhaKYYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jAYsN3PMmHXdVJoIc+C2RAQBZqEE207ELv3pRsFZv/E=; b=Szf7HnKrdKG3EVPGlL4f23gkqbo1XWcEXYShoqUxwPouxs1tdVR22fOKArTNRYW1Ihqgdn DXAdctIZfK/VoGmU5dWAlhgre/0kaE8gMcBrK8dCuZam+biwsaSXrOtenp7PF/CvOUVO8d aWHNRq8yY3IMBGzdie2aOCi3fVHMtw63Z1EW7dsGbUg5nWM8z2RTQ7kVAhwy3UFT4toFQT qG9FPJyvEIsPUXDHVISqUrisxJJR2AnYxz1CejZf6o/WrYvnKCBL97MV1s/SJb7sXhwuEQ TCCStX9ioIYMqyxLRPbub9O/72qiJUAN8EMX0ib5XDsk77PJWMi+EwJ67FurZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687915992; a=rsa-sha256; cv=none; b=ks9Nj/Iwlt+KUmWka95J9n7C9+xf0wuGYc/kffnDT0ejLFcArbGX4pZA0rLeNCOyZPBqJr lLxWRSkTgeo1cKco8OcXtGzu1ge5oJQP+qMBeGn3/lnBMjsac8I7eoGpmAsZm6l0xx1YLy aA0Ad6DDHqLBDQRaJa4jH+oWJmUqTX02ohiIHSRh6HtAb+Jc9CznO/QCcf0QlfaXKuMZMq 7rNkFUy6y6x3QrVeeZekWWlth6uBi1ng/VwiM09j5CJzRVst2Z7y381WYRowxUvvcSO43h //W6PSTV+obdLx0547ZnE5b8uKz8BLzHaKrOBZWnssgr6NPBf4CgefpJ2HhdFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrPGv6jl0zFyB; Wed, 28 Jun 2023 01:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S1XBmm045158; Wed, 28 Jun 2023 01:33:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S1XBDk045157; Wed, 28 Jun 2023 01:33:11 GMT (envelope-from git) Date: Wed, 28 Jun 2023 01:33:11 GMT Message-Id: <202306280133.35S1XBDk045157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7148e1593b68 - stable/13 - : Decay expression passed to fallback version of __generic() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7148e1593b6866bfaf5d640d099af1931d053459 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7148e1593b6866bfaf5d640d099af1931d053459 commit 7148e1593b6866bfaf5d640d099af1931d053459 Author: John Baldwin AuthorDate: 2023-01-27 00:28:22 +0000 Commit: John Baldwin CommitDate: 2023-06-28 01:32:47 +0000 : Decay expression passed to fallback version of __generic() This ensures that __generic() more closely matches _Generic() when using the fallback version when _Generic() is not available (such as GCC). Co-authored by: jrtc27 Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D38215 (cherry picked from commit 9d2f9798175586bdcd3423443804fbbc0cffb8d2) --- sys/sys/cdefs.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 3d45271d3e31..28e464122e58 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -313,6 +313,9 @@ * __generic(). Unlike _Generic(), this macro can only distinguish * between a single type, so it requires nested invocations to * distinguish multiple cases. + * + * Note that the comma operator is used to force expr to decay in + * order to match _Generic(). */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ @@ -322,7 +325,7 @@ #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) #define __generic(expr, t, yes, no) \ __builtin_choose_expr( \ - __builtin_types_compatible_p(__typeof(expr), t), yes, no) + __builtin_types_compatible_p(__typeof((0, (expr))), t), yes, no) #endif /* From nobody Wed Jun 28 01:33: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 4QrPGx1l8qz4ky7D; Wed, 28 Jun 2023 01:33: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 4QrPGx104vz3Dnw; Wed, 28 Jun 2023 01:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7zBacHDQs5XDzK3EQhCsiEsNuCmOtS3dUUC7vdeZwA=; b=ac3x7TdgRXh/pCNkK7sQcl3t2Ul/XcbfdW68YgnNo31+9UFZ9I+pWl5O4gl2MppO07PCtq Pj0ISBII4WciUVEBDXaMa4PVdsUznU5sX2B3b/5Ql6Qp7c3DiaAssCpLkalnm5vvTTZBJC Kz0jP/86b555yY3YJX4uZZm6AB0BE7DtvYUBt/rCoNLQy+Ak9NrkOskGuw6Nipqiefn4J1 PBU84ZX26WQhjT5AXfglP+BgOKVXFvqkaHqvQUq6FnUBL8Vekuqqm7r0yjnLcvBI0GqviS /xpO6fzwM3coB7fiTxCqMyodesNC3tmB90jRYMKiXTqeuynGgzUwTzrKYyQvIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687915993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7zBacHDQs5XDzK3EQhCsiEsNuCmOtS3dUUC7vdeZwA=; b=KpAh4GMuSOv7BMlSlfLeqy0Tri5GwUwqvKQ/dVXg49NXrXTpj0KrjpGh1Nr7WLRMBI8ZLe vLCod092U8CbUG5fWtILgO0cwfb+3jk9J+9X2WePsMeQUUaIk/IN55Wwy8TlK2ZYRhnFhJ QgswjTM0wst2UQqQCn91LOxgQLGHQj+VYxR4WYPe2mhWXiMyN2xef7TESuWSaQtJSM8lRL 1Do7JDcJDNhRA2uaz5VYYgFQgUx7nOPV/N1XUt+Vb/WtyGWuah0lbkk4RG3En9uiTGA/4k 2dBsfzAbkBioGanLixGVzppcHv4cwG6u6irn9rvIlPnDYPNWGThOptprmMyraA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687915993; a=rsa-sha256; cv=none; b=g4fTwxwx90rPkgd6oOJhMVLzhJCTMTH+Dh/mOE8mLjWa+A4/czlDjbWxeGp/9qKFBJOajl qyqrjFEsT1OxikTBolwSbutVDJlsT7yI0a8utkY/tJN29noun2MQMqCOsz/W3zyMptaFkS /W8SaPc/LeX3aKCTcKCr9BR5R5dP5eub+LZ/rT3CFER6oMB+D+UxtXD4AoBuPU1eDZ/ouc E8iQvlzRO194YIJNVRIqSROoEgfwddZG67SV+dOGq1+K08B5azniJewR7Q6LhhHB9XMcBP DBFhepKo1ooPv8HgO4qcaEbU64t8pdpfuzBDRiAGwDGXSYrHL3WepBmrRcGfTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrPGx00LSzFlM; Wed, 28 Jun 2023 01:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S1XCss045177; Wed, 28 Jun 2023 01:33:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S1XCkN045176; Wed, 28 Jun 2023 01:33:12 GMT (envelope-from git) Date: Wed, 28 Jun 2023 01:33:12 GMT Message-Id: <202306280133.35S1XCkN045176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 12ce57e6d3e7 - stable/13 - pcib: Allocate the memory BAR with the MSI-X table. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 12ce57e6d3e770db9ca83a8cbaa8f332515ce3d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=12ce57e6d3e770db9ca83a8cbaa8f332515ce3d7 commit 12ce57e6d3e770db9ca83a8cbaa8f332515ce3d7 Author: John Baldwin AuthorDate: 2023-06-19 16:15:48 +0000 Commit: John Baldwin CommitDate: 2023-06-28 01:32:47 +0000 pcib: Allocate the memory BAR with the MSI-X table. This is required for pci_alloc_msix() to work and to thus use MSI-X interrupts for PCI-e hotplug. Reported by: cperciva Reviewed by: cperciva MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D40581 (cherry picked from commit e6b838363fb473b5e35a8ae6a1da5e15f5b52960) --- sys/dev/pci/pci_pci.c | 23 ++++++++++++++++++----- sys/dev/pci/pcib_private.h | 1 + 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index b735da657a6c..4284b1cbf567 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -1324,7 +1324,7 @@ static int pcib_alloc_pcie_irq(struct pcib_softc *sc) { device_t dev; - int count, error, rid; + int count, error, mem_rid, rid; rid = -1; dev = sc->dev; @@ -1336,9 +1336,17 @@ pcib_alloc_pcie_irq(struct pcib_softc *sc) */ count = pci_msix_count(dev); if (count == 1) { - error = pci_alloc_msix(dev, &count); - if (error == 0) - rid = 1; + mem_rid = pci_msix_table_bar(dev); + sc->pcie_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &mem_rid, RF_ACTIVE); + if (sc->pcie_mem == NULL) { + device_printf(dev, + "Failed to allocate BAR for MSI-X table\n"); + } else { + error = pci_alloc_msix(dev, &count); + if (error == 0) + rid = 1; + } } if (rid < 0 && pci_msi_count(dev) > 0) { @@ -1386,7 +1394,12 @@ pcib_release_pcie_irq(struct pcib_softc *sc) error = bus_free_resource(dev, SYS_RES_IRQ, sc->pcie_irq); if (error) return (error); - return (pci_release_msi(dev)); + error = pci_release_msi(dev); + if (error) + return (error); + if (sc->pcie_mem != NULL) + error = bus_free_resource(dev, SYS_RES_MEMORY, sc->pcie_mem); + return (error); } static void diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h index af0b70a7add3..0dea325b6436 100644 --- a/sys/dev/pci/pcib_private.h +++ b/sys/dev/pci/pcib_private.h @@ -134,6 +134,7 @@ struct pcib_softc uint16_t pcie_link_sta; uint16_t pcie_slot_sta; uint32_t pcie_slot_cap; + struct resource *pcie_mem; struct resource *pcie_irq; void *pcie_ihand; struct task pcie_hp_task; From nobody Wed Jun 28 02:13: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 4QrQ990ZSxz4kT36; Wed, 28 Jun 2023 02:13: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 4QrQ990122z3pqd; Wed, 28 Jun 2023 02:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687918397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EyZooF1TO8tT5oYUK18kFSNgKmurHnVBVvfkzPCY5LY=; b=kRbC89eTCxOBDjje2FnldcCHD2Mk4XDCTEmGZoIUpjY4xaHEF/qElDkH+Xq3UIS3UiBi4S c4oAgLMLajmXOhnfikM1//1Rmq3jtUhvPCEqoh/yrx+XeEroq0DYrDq2jUho993ekSGa0m x4pQsup/dHoBMxFXZtCw6FAQ13hsuYl6C3BWUFKIIbjU2k685mXkbfqpt0gV8BqsCrDdfb 5wL0bIV/dDnw7uOLGwLNRDCyvQMvG5hvpacBBrQ8VcZkMEukNzxmNNeTF7109Wz+d2w93k CKspigXO0+Sybu055B0C6nBoJch8lGfCgcdirkzq7vt1aGJkVBhVEKZOJJlZ7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687918397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EyZooF1TO8tT5oYUK18kFSNgKmurHnVBVvfkzPCY5LY=; b=DzAR8alWctst4Ab9tE0jEJg8WH6GGqvGp85AfTq7shgYM7AzvzLZxmUja5LR44AiRdX+cq RCCa7hBQcN45o4XDOzCRVel11/SPG7UcWsDq4mmCodez2IVIjnO7f58AMb3W39miUjwCtZ f9hu2dkkz7n1e0iTOeW9qrXJtv3j8iuLyRvSwmyfhbWfUxGxNemKaNMFwqQIGBRwuL1jFx C4Cf6jVmIaEieInDqJD5MgYEuKm+2ZvDS7qY4MKn0FWtB/2PCKKCCXgf8X4HMKKFJWmZnk fpTCXxEDa2c2wJk1kT7edYNnOfycpH5QllJqLKgYYnCEBUeNHH8HhMRLX5132A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687918397; a=rsa-sha256; cv=none; b=kZD98fhEbgQVAJc1PwK+GGoK6wvNzA/tTWu9Tpn28oe9ICFr9DeWaGWNM5fS2mtD8DxUkI /TWCzRReLA7jP8I6lGGvjJMyBAe9G7XrfR+Q3Kai+S6G0x8M+CBWe8jYPM6aoqFpjMtKzh kRETD+VJmLjxdAEV7AEI7OF7/eaCaoVWq2mlBb/3F+xztkqDvOjUrHZ+dJeRqxZ2tpqetC bSZG/ROP2AZMgScwcnLGIsDa/kXn8vtt7WmZkatWyQLHRszoClt5Yo0SfZoiyDPhF2hjtk jN6ZGdWjlsqcFGSvEBaH+47oLpihEeEYg2sNEyw/mu1yEZNziSf8tsd4YaeTeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrQ986DTRzGTk; Wed, 28 Jun 2023 02:13:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S2DGa1011715; Wed, 28 Jun 2023 02:13:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S2DGr6011714; Wed, 28 Jun 2023 02:13:16 GMT (envelope-from git) Date: Wed, 28 Jun 2023 02:13:16 GMT Message-Id: <202306280213.35S2DGr6011714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 6927176113ee - main - bectl(8): clarifications, expansion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6927176113ee775983952edb3c201fed6be318d3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=6927176113ee775983952edb3c201fed6be318d3 commit 6927176113ee775983952edb3c201fed6be318d3 Author: Graham Perrin AuthorDate: 2023-06-28 02:05:26 +0000 Commit: Graham Perrin CommitDate: 2023-06-28 02:05:26 +0000 bectl(8): clarifications, expansion Reviewed-by: imp Pull-request: https://github.com/freebsd/freebsd-src/pull/728 --- sbin/bectl/bectl.8 | 68 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 25 deletions(-) diff --git a/sbin/bectl/bectl.8 b/sbin/bectl/bectl.8 index 61efabb98df4..20ab6e541d38 100644 --- a/sbin/bectl/bectl.8 +++ b/sbin/bectl/bectl.8 @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2023 +.Dd June 28, 2023 .Dt BECTL 8 .Os .Sh NAME @@ -25,6 +25,8 @@ .Nd Utility to manage boot environments on ZFS .Sh SYNOPSIS .Nm +.Op Fl h\&? +.Nm .Op Fl r Ar beroot .Cm activate .Op Fl t | Fl T @@ -89,18 +91,14 @@ .Brq Cm umount | unmount .Op Fl f .Ar beName -.Pp -.Nm -.Op Fl h\&? .Sh DESCRIPTION The .Nm command is used to setup and interact with ZFS boot environments, which are bootable clones of datasets. .Pp -Boot environments -allow the system to be upgraded, while preserving the old system environment in -a separate ZFS dataset. +A boot environment allows the system to be upgraded, while preserving the +pre-upgrade system environment. .Pp .Nm itself accepts an @@ -119,10 +117,13 @@ one of the system's resident disks will require the .Fl r flag to work. .Pp -The following commands are supported by -.Nm : +.Ss Supported Subcommands and Flags .Bl -tag -width activate .It Xo +.Fl h | +.Fl \&? +Print usage information. +.It Xo .Cm activate .Op Fl t | Fl T .Ar beName @@ -194,7 +195,7 @@ See .Sx Boot Environment Structures for a discussion on different layouts. .Pp -No new boot environment is created with this command. +No new boot environment is created with this subcommand. .It Xo .Cm destroy .Op Fl \&Fo @@ -321,18 +322,20 @@ arbitrary white space. .It Fl s Display all snapshots as well. .It Fl c Ar property -Sort boot environments by given property name. +Sort boot environments by the given ZFS dataset property. The following properties are supported: .Pp .Bl -tag -width 4n -offset indent -compact -.It name (default output) +.It name (the default) .It creation .It origin .It used -.It usedds -.It usedsnap -.It usedrefreserv +.It usedbydataset +.It usedbyrefreservation +.It usedbysnapshots .El +.Pp +Short forms usedds, usedrefreserv and usedsnap are also supported. .It Fl C Ar property Same as the .Fl c @@ -347,10 +350,28 @@ or .Fl a option is used. .It Cm mount Ar beName Op Ar mountpoint -Temporarily mount the boot environment. -Mount at the specified +Mount the given boot environment. +.Pp +If a nonexistent .Ar mountpoint -if provided. +is given: +.Nm +will make the directory, including intermediate directories as required. +.Pp +If no +.Ar mountpoint +is given: +.Nm +will make a directory such as +.Pa be_mount.c6Sf +in +.Pa /tmp . +Randomness in the last four characters of the directory name will prevent +mount point conflicts. +Unmount of an environment, followed by mount of the same environment +without giving a +.Ar mountpoint , +will result in a different randomly-named mountpoint. .It Cm rename Ar origBeName newBeName Rename the given .Ar origBeName @@ -374,14 +395,10 @@ Unmount the given boot environment, if it is mounted. Specifying .Fl f will force the unmount if busy. +.Pp +Unmount will not remove the mount point. .El .Pp -.Nm -prints usage information if -.Fl h -or -.Fl \&? -is specified. .Ss Boot Environment Structures The traditional .Fx @@ -455,7 +472,7 @@ In this example, is excluded from the boot environment. .Pp .Nm -commands that have their own +subcommands that have their own .Fl r operate on this second, .Dq deep @@ -474,6 +491,7 @@ flags. \" .El .Sh SEE ALSO .Xr libbe 3 , +.Xr zfsprops 7 , .Xr beinstall.sh 8 , .Xr jail 8 , .Xr zfs 8 , From nobody Wed Jun 28 09:16: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 4QrbYW3msHz4jrLt; Wed, 28 Jun 2023 09:16: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 4QrbYW17BNz3mfv; Wed, 28 Jun 2023 09:16:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687943791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z1Nlva4m0O0p0us6Uabl0yWbxzeMgkLNm9qInDK+OrI=; b=JKpLHw60Hm/UT+7+hCFZF5rYElVUAuTDC9uUR0H7cSmB+HM4ohT7WdMzO7G/TOq61CFPT4 cgbBdBeWPa0MgLXaGEKpTcyZf4I77t/2zFCH32cjYm6fD/M8zF0TM/BnEcUQ1fN7wPondt qSPFzsVpehTt7XJqffdutRv4VcTOU0xfg7tJZ6Ceb6L3u5L0iBs2vJ/tYjHtNciataXx+T h9pFKa1rgfcFc2j8xOV4zhabgKHtFcpZ3TDJ2tbRXmRnFip0QXA70UyB27UNf/V/HdT8CT /QZ38+4XIUTYpff1TWxu8PxODhsMcMt8foCfb2aIEs6n7Y80SSSJZiBUKW43Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687943791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z1Nlva4m0O0p0us6Uabl0yWbxzeMgkLNm9qInDK+OrI=; b=Jl5xApSC97SujUCAhFzjmU+ngnLa1U8VC1HF2IKGgo7X6hq6SZ4gvbATBsMrzXsiepDE5Q /8Mn9cUr6cHcHI7ASSIIcafRsCOOzcMeehPPe/Dc8pQ+172taIn/5HEdAUriKNIBJTvAT9 neO+GP4pZAIMRGaSTCzTFoTuJBwuZWJxLhTEfsI2VYY5Sg9GWOC5WrfUqNP3XpGhREXBMS 2xW7YDRgx+DXI3icJboi64TdcMc6a30F5fezqcgWmcI5WPntTe1zdnEJsrAvrLJon/U0DU acAIQX/BjTLNfepf1hjERsZJRrDpc/IUxNFPcvuOQmDsLhxS2/sXcL25DPPyLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687943791; a=rsa-sha256; cv=none; b=xb5bLu0WQWyURpmh5Lv1PtZUpd68cZFChRrVP12EYZt2ZXV/hL8UPcqKKv08MoFpR7gWah xdw9mj3VclFOziaUICsrQ9+Rz/qr3KdPzrU/NBmmKpMYSgAz2SdYWpaYP/luwUf1E2A/3c P+68je5o2TxeCgK5pHcaSrLck2C9jjN50k7FIuLWALC1XbGY5y0J1aTBclLnbV99RZ/rB2 8yvSO09bn/5Ckzukyz/0+1iMOpoFelBb8f2/GM45D2umsRyk2gJDHf24vJwJ1ACCLglPY8 a5JbQiHTJ+pBtkAH98zu6qACy7lUg4jGb37CsQLB80PXy/tIjLQBRPzOlvAQnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrbYW0DP3zStJ; Wed, 28 Jun 2023 09:16:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S9GU4m010186; Wed, 28 Jun 2023 09:16:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S9GURj010185; Wed, 28 Jun 2023 09:16:30 GMT (envelope-from git) Date: Wed, 28 Jun 2023 09:16:30 GMT Message-Id: <202306280916.35S9GURj010185@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: 0da2f02c1b2a - stable/13 - netinet: re-read IP length after PFIL hook List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0da2f02c1b2a2fb0daca8625a1992ee3a0426f44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0da2f02c1b2a2fb0daca8625a1992ee3a0426f44 commit 0da2f02c1b2a2fb0daca8625a1992ee3a0426f44 Author: Kristof Provost AuthorDate: 2023-06-02 14:38:30 +0000 Commit: Kristof Provost CommitDate: 2023-06-28 09:15:14 +0000 netinet: re-read IP length after PFIL hook The pfil hook may modify the packet, so before we check its length (to decide if it needs to be fragmented or not) we should re-read that length. This is most likely to happen when pf is reassembling packets. In that scenario we'd receive the last fragment, which is likely to be a short packet, pf would reassemble it (likely exceeding the interface MTU) and then we'd transmit it without fragmenting, because we're comparing the MTU to the length of the last fragment, not the fully reassembled packet. See also: https://redmine.pfsense.org/issues/14396 Reviewed by: cy MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D40395 (cherry picked from commit 185c1cddd7ef34db82bc3a25b3c92556416a4e55) --- sys/netinet/ip_output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 595957afe146..60aac79886c3 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -705,6 +705,7 @@ sendit: case 0: /* Continue normally */ ip = mtod(m, struct ip *); + ip_len = ntohs(ip->ip_len); break; case -1: /* Need to try again */ From nobody Wed Jun 28 09:16: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 4QrbYW2bHkz4jrJk; Wed, 28 Jun 2023 09:16: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 4QrbYV68Fcz3mYb; Wed, 28 Jun 2023 09:16:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687943790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+S1xaRq0+auGMuxHjv01gPUIpASQX38XhF+lupwBJQ=; b=mDcaOAPDUw+DnO3IEZdzD6f0JL2xpyp7Aj8Ir+tKhR6sWZw+JVcxRoqAi5CElBhU6LhBpW Ubqtj5iCZl7z96Lj1XqYrAwtGUt2rG0HkNrfXqYlmCXjZIsPrDxEHwSscEMZjXiKB0SF9h r2sGVeDZ/f74zqo9GCYaa/mOwMT8CSjbaOqJnAg4RL4tBYvJ3QS/wSx/sG78+NaOyM/rdy caq24/niotVw+XjJkjZF7UbH1Ij8Po9rHkDsBELCSDT2glh1+fkLtLtOzTnxI7aVckLVNM IH6tEI3WWj9EbU9Ku9PJ6sze5s+9V4NXdJnYw6W7crgAEDq0ATZ024MzYAC5pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687943790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+S1xaRq0+auGMuxHjv01gPUIpASQX38XhF+lupwBJQ=; b=vKpXL7ylY/5k4cqy9JIe2QFl++t0HTFPckZAyDt+iB/sj0w9kxhLREkW9eWBwG9YOj6EuF BXkkQakWF9oDm4THqR6NsizMiikg6K2RYsycT3LkrE7kCAA4wh9IpU3y4LZsSOTRKfZNGk T5/gV+bQw4UZuhPAqxaWsQKqum97HYPgHwLSUkffi5L8gUlAkwLbCtYVbnR9cng9PGPknL n+qmDxrRW8paAKKYrN384TAM4IUkYv8Y07+PQO4H/0lripwR+Py2Rj4LF/IdazpOA3+eNc 1L/R5kgJV6U4z3anV7O4S7OjxshboAO+DoGGTb/oCd0O73/Qvd5CR4ZVdG+R7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687943790; a=rsa-sha256; cv=none; b=itDEvCCCcRR6zAvRYv4We3Y0qFt+g1XmLTP1qLCaC6jA9sNzV0acTF6cjzGAGCzhQuileQ jpBtbkQc6w/L+qT6KzDY31pfy7x1hPIt6ZRwz6+6Q+Zg90znuLb6c4Ix7E/pF4LeQj5VDo RCHoOI8H2eO/vtDk7EyERYKK7Au5c9gEtEOVoWClTxQcTPzveMe4JlvEqSPqf5yDaXaYTo fJyPehhzPc52kUaImM4fm7E443iE3QOKfFyhLzedF/oBLwG732NLala/Zc86uOkzmsn+UX JEkemVnf+a2/Q8KKzXB5o5gPuETffbmzxWw1qIG4fGOgq2vbe/UJOyYEnMK/rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrbYV5CV8zSdL; Wed, 28 Jun 2023 09:16:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S9GUOg010119; Wed, 28 Jun 2023 09:16:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S9GUtM010118; Wed, 28 Jun 2023 09:16:30 GMT (envelope-from git) Date: Wed, 28 Jun 2023 09:16:30 GMT Message-Id: <202306280916.35S9GUtM010118@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: d0076c7a8653 - stable/12 - netinet: re-read IP length after PFIL hook List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: d0076c7a86538d295ca2508dddc5d5429a2c4ff7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d0076c7a86538d295ca2508dddc5d5429a2c4ff7 commit d0076c7a86538d295ca2508dddc5d5429a2c4ff7 Author: Kristof Provost AuthorDate: 2023-06-02 14:38:30 +0000 Commit: Kristof Provost CommitDate: 2023-06-28 09:15:59 +0000 netinet: re-read IP length after PFIL hook The pfil hook may modify the packet, so before we check its length (to decide if it needs to be fragmented or not) we should re-read that length. This is most likely to happen when pf is reassembling packets. In that scenario we'd receive the last fragment, which is likely to be a short packet, pf would reassemble it (likely exceeding the interface MTU) and then we'd transmit it without fragmenting, because we're comparing the MTU to the length of the last fragment, not the fully reassembled packet. See also: https://redmine.pfsense.org/issues/14396 Reviewed by: cy MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D40395 (cherry picked from commit 185c1cddd7ef34db82bc3a25b3c92556416a4e55) --- sys/netinet/ip_output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 93b41376f3c2..a2e4513f1118 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -584,6 +584,7 @@ sendit: case 0: /* Continue normally */ ip = mtod(m, struct ip *); + ip_len = ntohs(ip->ip_len); break; case -1: /* Need to try again */ From nobody Wed Jun 28 10:30: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 4QrdBm2rVzz4k0dm; Wed, 28 Jun 2023 10:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrdBm2LFJz4QKn; Wed, 28 Jun 2023 10:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687948224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tq7sim9Ba4leEPpNqdvxvuEDONTbreG3Zwhj5DBHy9g=; b=fdMIEt+e5LXqJgSNW7VUc4IexJGiQ7KLxJIAW2qY0fWgZUulGcDcx0uVezhLrt2ZfuX4p8 zgd+pRj3GZxHBDPHHrRwLxNqHDUWJdiM33RGk0rGnUaMXi2+rPQCeD2TIDvxnhO1sYaBsQ hNs3yLW1smYdPL1PlNil9gTpgN+NRkkRZU2Rn3WZfgwDhsAeg7TH1qKDjcJYcNPll12Zn6 kDbHvawGyIOlnYvixTjhVI8gfyrGgqVgDfT0DiRTvs4h4hhXgMgnphBQh8CXz8bDqb8vvx +OAayrC4Ao/7Nh+4UP6bPC5HyxY4UXRbLlmB8cF6Ze99x6J3yG2FeQJkbfCZlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687948224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tq7sim9Ba4leEPpNqdvxvuEDONTbreG3Zwhj5DBHy9g=; b=mnVBgUCKoh9BZEvXusr4i2NMK4d8VbDEexyMl+emvMYF2YT74F40zcWqj6H52mqloO6lkJ tz92YrShFm4UfgRY7um6wrITOCdHmm8NDmijBsMevaAgrgYb5jeyPnlxR0mGczPaX6+CEZ 7dQmw9JzsjJnEFue/KOP6b7sjDB4rDKqjZ6+FYZBYp3WQ9iuXMQSeX+xHBWDrPDcEBErCM 0pAPK7MYIBa5hM//npIYL1mRE15l7mCM25WDTH4spk4OCBdcDfadscaJHy92t858hLZjdh MUHeAZQs4ot0a+rYAHcPjnaMH96sg7TH0t1F155lOnoW7TiggBeo/WPgjS2Spg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687948224; a=rsa-sha256; cv=none; b=aAz45zDh2oCDbmIf7zUVpOcF11mc62NnhhQ7BEOxn6xPbAKuiegdmUuRlGkoIvV+LuxcpA oY7F714BantwJVc23qtoVKNUhe4A3G/610bx41vqmZR2pF/Jhp4wPxqzt0r5cck0921G+w /waZfn05mEt+cLB2RF1ixLjtE+GbRGZyIoyfG5gcW5+8/wczzTVzF78milOXJ/w80fRKpB Ha+t3nrCwCmmfGV1HdQhzXJ8xrt8wdahEAslikbaaFSHgD27xLbEr3Bl5d8Jb7T3QOv/qs WV3+dUSfAWoU/KkHWgxZXHjsnt8BAf/aQvIGRrUhyti69SyCY4ZhtXmLF8+96g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrdBm171lzVJ9; Wed, 28 Jun 2023 10:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SAUOKO035159; Wed, 28 Jun 2023 10:30:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SAUOmj035158; Wed, 28 Jun 2023 10:30:24 GMT (envelope-from git) Date: Wed, 28 Jun 2023 10:30:24 GMT Message-Id: <202306281030.35SAUOmj035158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 0cd2d88d8d0f - main - carp: use nd6log() macro to log debug messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cd2d88d8d0f808d331a0a04743b98cb082d653e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=0cd2d88d8d0f808d331a0a04743b98cb082d653e commit 0cd2d88d8d0f808d331a0a04743b98cb082d653e Author: Andrey V. Elsukov AuthorDate: 2023-06-28 10:27:37 +0000 Commit: Andrey V. Elsukov CommitDate: 2023-06-28 10:27:37 +0000 carp: use nd6log() macro to log debug messages Obtained from: Yandex LLC Sponsored by: Yandex LLC --- sys/netinet6/nd6_nbr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index a4fb5f75fa93..00bb19f9ba39 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -517,9 +517,9 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, */ if (ifa != NULL && ifa->ifa_carp != NULL && !(*carp_master_p)(ifa)) { - log(LOG_DEBUG, + nd6log((LOG_DEBUG, "nd6_ns_output: NS from BACKUP CARP address %s\n", - ip6_sprintf(ip6buf, &ip6->ip6_src)); + ip6_sprintf(ip6buf, &ip6->ip6_src))); ifa_free(ifa); goto bad; } @@ -742,9 +742,9 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) * the CARP master. */ if (!(*carp_master_p)(ifa)) { - log(LOG_DEBUG, + nd6log((LOG_DEBUG, "nd6_na_input: NA for BACKUP CARP address %s\n", - ip6_sprintf(ip6bufs, &taddr6)); + ip6_sprintf(ip6bufs, &taddr6))); ifa_free(ifa); goto freeit; } From nobody Wed Jun 28 15:20: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 4QrldC72pDz4jq2g; Wed, 28 Jun 2023 15:20: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 4QrldC6dhvz44Y4; Wed, 28 Jun 2023 15:20:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687965615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hYKR1LQTpoA574vJLNVjLu+e5yT08tT1mlONzB5m2kU=; b=Jy6/dB0NBCtjlmbLSdLnXu2vSm3vaDS88C90zcew3ldnH/krJPLFW91XyQpcAVFcyWYV/w MiS/xBIABUGKLtfPo6rEAHG05DONZESrT1Dc1qG259rHlj8FkWGCcc9Vy98fnJT2QrJ8Kk tSe6tVtaCBA0Em27OGAlg7eqHZCegcKPKIZGFAN6jq1210Ob4mj2pQpTBqnnZ9+sIWpnqQ HluDsTHQvpsyGYoMofZOKjsroCBXi5wI5Sy1zDRDvyiWZWDjvFGu07Y1FHMAimGpEJz7Jg MYveIZyT/F7rr6tOC44KYGOO9C4EEl8V2XA1wX2oA8jCEMuD1v3dVgJQNnoZqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687965615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hYKR1LQTpoA574vJLNVjLu+e5yT08tT1mlONzB5m2kU=; b=KQGzFuge243EM6ILZYLSTwxxr0Dlpukv/fGdHcDW0ZhxVvW7VXoM79lb3Gj9jCL4Yo5wY0 18Q2fhLnDaO6bUOLiMLV/rgfGsktjtrRoVcddWncRKLhi4sFQdZhtJjQ1he1EfWciHFsDZ AAKwDec671zmliCL8Bc6w1aO1uAhwDLUUF9R0d9oRqKbdIwPCDa7J/kZtSc5apfzU0IZL2 AhYJSWUoQgC9JrbFsBsO9oaXwIPZW1a2aTcIqP0SR5Ap17+PmnlxgXhq2HMC4MUpYH9tR1 46FQqPqKXIdbP0hSORpj6ZLuMUoW+yrxIObKP1VCSEUNj7D3J8CyJtdX+/iUUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687965615; a=rsa-sha256; cv=none; b=YtbS/KHnCUGNx1uD4pZSzEJx/nnQF0md7SQH3zupWY9D1ABfeTQ0NJLpNGyBDNDC3I5rlZ h48+hYvie91M47HL9gtK/N73FcDYUXhb9tHq3u8SnQTa4iT403ZzmcuuftPvF9rHNbEhDh 3Z6bT0yt1IDrNz5OPtfHyf8xnPbDJufJc6V1RfVbHUCYooQG6thTDYT9KCz8EAf6SXBapd gvcC6kjTIPYceO7QNQ5TzIDfSfECun8aVrzQ8X2pqHIuK5Hj6CgwCrzUkhaRmBwRT1SoK2 mAjGtB66OuEszb4aOrDCnyeNKuhHPNElc1aY/FpvV5yQnHUjb4Fmhy7lHdqWSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrldC5cXczdqV; Wed, 28 Jun 2023 15:20:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SFKFxE017569; Wed, 28 Jun 2023 15:20:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SFKFbY017563; Wed, 28 Jun 2023 15:20:15 GMT (envelope-from git) Date: Wed, 28 Jun 2023 15:20:15 GMT Message-Id: <202306281520.35SFKFbY017563@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: 96eb0d90cd75 - main - tcp: With the right options in the kernel cc_cubic stays in slowstart always. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 96eb0d90cd75c56517bef952a03240f82f525d2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=96eb0d90cd75c56517bef952a03240f82f525d2e commit 96eb0d90cd75c56517bef952a03240f82f525d2e Author: Randall Stewart AuthorDate: 2023-06-28 15:18:47 +0000 Commit: Randall Stewart CommitDate: 2023-06-28 15:18:47 +0000 tcp: With the right options in the kernel cc_cubic stays in slowstart always. So this is a subtle bug I have found in cubic. If you compile a number of options into the kernel (accounting and tracking) then all of the kernel code "knows" the proper offset of t_rttupdatecnt however cubic does not see the options (and htcp too) and thus will look for the count in the wrong place seeing 0. Which then means it never builds an MIN RTT which then means it always hangs in slowstart. The solution is to put all options that effect tcpcb size into the opt_global.h so that the kernel has a consistent view of the tcpcb size. Reviewed by: tuexen, rscheff Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D40761 --- sys/conf/options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/options b/sys/conf/options index 7a34fa0f7333..6f1a488bf33f 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -229,7 +229,7 @@ SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h TCPHPTS opt_inet.h TCP_REQUEST_TRK opt_global.h -TCP_ACCOUNTING opt_inet.h +TCP_ACCOUNTING opt_global.h # # TCP SaD Detection is an experimental Sack attack Detection (SaD) # algorithm that uses "normal" behaviour with SACK's to detect From nobody Wed Jun 28 16:22: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 4Qrn1H0L1Nz4kdvY; Wed, 28 Jun 2023 16:22: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 4Qrn1G5nz2z3CxT; Wed, 28 Jun 2023 16:22:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687969362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TDT6YFV8Q/t1s5P5Mq6jdBzA6jF8kGYgW1YsdKNyMhQ=; b=k6yEIari7piHTVbfsdOypWe7/jWEOPwbkJ2Bp4T5C1UJ4q/dE2QK/1M5GR3rorBnrk6LV9 eaG/32mlLw7beuOKkipfUudDVcl+GSlvIRg6zcmVeiSEpkxIohXv9xPS/wEHaDLEpIHemT PBvX+FS87Yarby4gx5IPI5eyiw/ry2SvPPI4+kITnWAMZ/064K+qBSDiTGrulThKlZDOmD wkDt0P14OMrTur3VxH2AS+IDHWENtYuNGn+2QdjD8y68cAvoTAdoQQO4ZKaZbZeAEVIrVC mMbUZDeW1TX/uYHB3wVchImMAvLgP8dhgc6vmOG+ILVaG1zy+w4fO5J3XEaqwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687969362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TDT6YFV8Q/t1s5P5Mq6jdBzA6jF8kGYgW1YsdKNyMhQ=; b=tUfArcPiOwUoYeAsOyIQRl3ZFo040q5f0NDVLaZZKKLnKCSywDbNr+roIcfC13XQ0I/cpm 9kEKjMOxJvXb0ds12B1OzL7nELPajRMhZ8NxX+9YwfjqTEqERLBgwUspWfAA+2Urgl3HpW oew66IqdXKRu5EGl7+qiHU5hV+ZNnUuHqH5Yc7QJ1oNbU8aeW6v72/trMI8qVjLlVBDKTw B+OGT56qSrMkfarokW0W9/qDVAPvB++BjCtJxdUksyKwHycM1y3ZL+S56CcaBq5hrwGRX6 uBLWZQXU0rg6mupdSly/tgWN+Pgy9c49ELH5dcgL9unPh93GBxR7P5m/h52Akg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687969362; a=rsa-sha256; cv=none; b=wiZDwtSWeygMfhPAMBeg3ih0mz7Cao5KmGHjSy8i0v+RGjjbWRyustp7iT/js3ofZgLRs/ otxM+RXrqzl7gVRtkFm807z6GsnUpfnfZeGV9JvEfqcMzPDdHpnZUuP1f8//gOiRqTJgGD 27hQGaPzgYFBa/7I9FBmnPDITsoNiEyL2N0VwHe5YmsrpjAcERVl1AgXki2mdtmdcRdrPM WjES+FL9oWAwZde2fa1ZPhsB1xgTorqlerY+Ep1+f/2mwS6XvAEP/4CK9f8hqH9jyxWXAz ZYuErIJbwu/QD7knoGf3aDzqk7mQuGaB/aVIs08QBrJLec1N1ukdZ7Lf+IjKug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrn1G4rMRzglp; Wed, 28 Jun 2023 16:22:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SGMg0e025306; Wed, 28 Jun 2023 16:22:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SGMgTf025305; Wed, 28 Jun 2023 16:22:42 GMT (envelope-from git) Date: Wed, 28 Jun 2023 16:22:42 GMT Message-Id: <202306281622.35SGMgTf025305@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: acdf666147ee - main - hier(7): tweak /media 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acdf666147eea8bf8626d3733087861493d90e23 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=acdf666147eea8bf8626d3733087861493d90e23 commit acdf666147eea8bf8626d3733087861493d90e23 Author: Mitchell Horne AuthorDate: 2023-06-28 16:21:28 +0000 Commit: Mitchell Horne CommitDate: 2023-06-28 16:22:30 +0000 hier(7): tweak /media description It comes as an empty directory by default. While here, use a serial (Oxford) comma, per the FDP Primer. PR: 261349 Reported by: karels Reviewed by: grahamperrin, karels Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40774 --- share/man/man7/hier.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index f606684334eb..5ed12c814b6a 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -161,8 +161,8 @@ system utilities that are critical to binaries in and .Pa /sbin .It Pa /media/ -contains subdirectories that are mount points for removable media such as -USB drives, CDs and DVDs +empty directory commonly containing mount points for removable media such as +USB drives, CDs, and DVDs .It Pa /mnt/ empty directory commonly used by system administrators as a temporary mount point From nobody Wed Jun 28 16:53: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 4QrnhZ56v6z4ks5h; Wed, 28 Jun 2023 16:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrnhZ4f1dz3M17; Wed, 28 Jun 2023 16:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687971198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1myLr/qE40ur5iVaor3ye+Gvr3zIE+A+OfNcRDrYPM=; b=ZMKdBrlo4XfsCeLjZJrwTuI8Rv3seBQMaNvKnkH1iXpqvHvmEZXXTEvwJGQiH5g4GIvPkw bfKGoiQ2h6KNnYtQxDzqNwqpq70y03/jlzpNZ5uShOORqUmpFkuSD9db2tzF5M1bPh2ISN VuogmEUdgikJnGFZAWESob5uH1jz0XFfXQQfs8+noJIU3QK98yUmpujlh/Bw4NH0ZVmBHI S+2BhJTC/v1EXsH2bDT3b8t7tk+IydHP0udo1VvKZvM669YOFgH04n7hVHvOPLNQCP8LdM N/TmB+Hv+pD3WCO4byjgTLYiyacke+gYMJ9Jn4ir4cSH9EkEqnI9c6bqQh2VxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687971198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P1myLr/qE40ur5iVaor3ye+Gvr3zIE+A+OfNcRDrYPM=; b=wgqPyycUCzcJdxcGCmEM5y3FranNEMSzqfYTiOAedzvIZ/E8YFcVKuNStZanzNjRt5SaEG GqjugPw5jerzRJ2o6M7yIkmRRvm1uDTwUSNVdicCuHR+SGP8Yp57DOV3f4kM8fyTIkq2KK 8Pv3wk9XarXGAF6AjeoNNzjuvpvtrfkInj8On3blJS9nBAqlYp/T6+QB+uNGnvQn1NL/AU L0VFpVJl4cXU3f5tkKDYSVz0rSu4DETUNfq13WW6iaYIX1NARTIAxYCxYSegpkEPCbszCk f4RWslD0S3z1GhQvIPngwFvh4miRXFWeIdzgCcw/g1MOviOmAjb4vfnfhqbt+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687971198; a=rsa-sha256; cv=none; b=rqrMF1UTT0O6yM6WVuDOnFqg4jxvs+RRAJw6KY9G9B+WEM5hPsZ8bD+kL1kWhYBgPh1QwD Un51BhDsMS+nWO92nC/0jfmIUuxfjtRAwt9UXOW8EqlZawkMhzQjnaxStNlQLQZK/GkenX DWKT55IDPzxvp/reJndf9IjggZX2nqzFRfcFVR4rkH6DQyyEzLfHE4i85eJg/13SQkGXcc Swfhl1N1MTKuHHxGdYDi3Pt2wCRoh26l1hC58dseLFqTNyn8AW/W4yFY6+DaSxjDBYYRBN eu0RNL5k1vNwE5iBPvBuZ60qAGLdqQUxl1dT5wRfQoGeiXrodnQu1DHlj6zYrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrnhZ3jmrzhYy; Wed, 28 Jun 2023 16:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SGrIvv074751; Wed, 28 Jun 2023 16:53:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SGrIM5074750; Wed, 28 Jun 2023 16:53:18 GMT (envelope-from git) Date: Wed, 28 Jun 2023 16:53:18 GMT Message-Id: <202306281653.35SGrIM5074750@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: 7776cec946fb - main - Add quotes around variables and replace backticks with $() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7776cec946fbb3a087ace68468c290572398dce9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=7776cec946fbb3a087ace68468c290572398dce9 commit 7776cec946fbb3a087ace68468c290572398dce9 Author: Benedict Reuschling AuthorDate: 2023-06-28 16:48:39 +0000 Commit: Benedict Reuschling CommitDate: 2023-06-28 16:48:39 +0000 Add quotes around variables and replace backticks with $() The quotes are added to prevent word splits and globbing. Some whitespaces were also removed after variables. Approved by: imp Differential Revision: https://reviews.freebsd.org/D40726 --- usr.sbin/zzz/zzz.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/zzz/zzz.sh b/usr.sbin/zzz/zzz.sh index ef9527bb76b3..d4311ac82302 100644 --- a/usr.sbin/zzz/zzz.sh +++ b/usr.sbin/zzz/zzz.sh @@ -18,18 +18,18 @@ APM_SUSPEND_DELAY=machdep.apm_suspend_delay # Check for ACPI support if sysctl $ACPI_SUSPEND_STATE >/dev/null 2>&1; then # Get configured suspend state - SUSPEND_STATE=`sysctl -n $ACPI_SUSPEND_STATE ` + SUSPEND_STATE=$(sysctl -n $ACPI_SUSPEND_STATE) # Get list of supported suspend states - SUPPORTED_STATES=`sysctl -n $ACPI_SUPPORTED_STATES ` + SUPPORTED_STATES=$(sysctl -n $ACPI_SUPPORTED_STATES) # Check if the configured suspend state is supported by the system - if echo $SUPPORTED_STATES | grep $SUSPEND_STATE >/dev/null; then + if echo "$SUPPORTED_STATES" | grep "$SUSPEND_STATE" >/dev/null; then # execute ACPI style suspend command - exec acpiconf -s $SUSPEND_STATE + exec acpiconf -s "$SUSPEND_STATE" else echo -n "Requested suspend state $SUSPEND_STATE " - echo -n "is not supported. " + echo -n "is not supported." echo "Supported states: $SUPPORTED_STATES" fi # Check for APM support From nobody Wed Jun 28 17:03: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 4QrnwP2WjFz4kwvt; Wed, 28 Jun 2023 17:03: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 4QrnwP1zN4z3QlN; Wed, 28 Jun 2023 17:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687971813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBb5UAH9E6yds4E7QbS1fu3SEj5JXvjGn2Gx2qrD1Lo=; b=ummIwsPS7N3JkZ8SxTOUK2m9wVkpzqSC0vZrOuBUFXgLVIkzOxOxXeNJs5w1Pag3RIdPVU gjP8RSrq5PsLTx9lHUbP61VawXqzdXW6yo4LoAUW6HMZkaRebwVDR4tg6WsAm4z7l6CKGk dwsMHPkDA2ZAFKUccDfkrFHXYFKU0xpQsJHuTs4sdSW5aW++I8Xpiwm2ram9pW/ueTruyO LMWexSDbfgbBMTxPhscWGwR0UhcTsPtVsoq6HHKB7jQa+jvdSv6RXCx7QKGYtF+2nFdhEw +DQVTyHhNzLZibKRnATFPTC2D9FRk+n9VoNmfSTygLt6FOdOC8RSI1lre0g7XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687971813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBb5UAH9E6yds4E7QbS1fu3SEj5JXvjGn2Gx2qrD1Lo=; b=ms9dqvjbOppWbzppwCNqvBMU06ZzTTcxRsnZX7fgAdrMO+TwIgmhsIJjUxPoQWrqFmElMT 9+EVEvB8kjmDNHP17K5/YOKC2pYcBZmFlL+G0yRPj33XLvrfJY6P2xioyTJezCFkDnbe1b UZh9U2s7CJ7TT4e1OSUt1Z88vx0pP6xBOlolroQM6uZTcuGKcAwvgavZi4ArskVxQ8woR1 sLbmp0RtDvYdr53BM4KQLM+CaxC02vTtykOGEflXKpQMdTiOGGXxkYVPSGt4sMoubhvd9o 5mlhR16U7R8ZCGN+jR3FHxj3u0o2ELfPLZoEeF53iWg749SPzMiZcA5hCCZ7LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687971813; a=rsa-sha256; cv=none; b=il+nCZstEcZELuQCslKF9oZiEfa1l4d+BKuLYwmiDmjHLZmMPYCrn/WhwWy9ORIVlNezeP 02n6ihI3gejUsKwN/94FhKU2zwLDOIDeJkXP4zQiNH2XS1jY75ypap3eS+i8H2sOll8PtN PzoFdkqQIdqDwQ1IGf6ay/0ZgIuD8CO/N8gZ0N2p2IT3/ADQe6XV2e3wi4+XSQNFPR30Ki J4GicRHKOvDGrHV3tP7QZ4M31BgpSr6dlmySD/oh1mx6ZwtY8sHrk0BcOZcQ/Yv/Vyhx/e CFl8JXX7NIueVEGjXsHHZOT44Fc2kbJjZ3hj1mjRbb0Wq8r54GnhzpblB1Qp9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrnwP12jmzhjw; Wed, 28 Jun 2023 17:03:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SH3Xg3091850; Wed, 28 Jun 2023 17:03:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SH3Xt5091849; Wed, 28 Jun 2023 17:03:33 GMT (envelope-from git) Date: Wed, 28 Jun 2023 17:03:33 GMT Message-Id: <202306281703.35SH3Xt5091849@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: 1e0ba9d43cf0 - main - Hide irq_next_free, it's not used out of this 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e0ba9d43cf035c63b8e525606ca5bc89f3b22a4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=1e0ba9d43cf035c63b8e525606ca5bc89f3b22a4 commit 1e0ba9d43cf035c63b8e525606ca5bc89f3b22a4 Author: Andrew Turner AuthorDate: 2023-06-27 08:31:34 +0000 Commit: Andrew Turner CommitDate: 2023-06-28 17:03:08 +0000 Hide irq_next_free, it's not used out of this file Reviewed by: mhorne Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40767 --- sys/kern/subr_intr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index cbacdf677ee6..5c7c99f458c1 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -135,7 +135,7 @@ static struct intr_pic *pic_lookup(device_t dev, intptr_t xref, int flags); /* Interrupt source definition. */ static struct mtx isrc_table_lock; static struct intr_irqsrc **irq_sources; -u_int irq_next_free; +static u_int irq_next_free; #ifdef SMP #ifdef EARLY_AP_STARTUP From nobody Wed Jun 28 17:03: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 4QrnwQ3Vwfz4kxBm; Wed, 28 Jun 2023 17:03: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 4QrnwQ2fVSz3QtH; Wed, 28 Jun 2023 17:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687971814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nkj+qE2SYxU/6xiNVGQg6q5mr98XUhE9FUNeWaMol4c=; b=PV4Hyqr35JmdvjODi0gN3FnNJUufA4UCOT7qISe6m6hgscWaPr0pA3rxqNLM1kDtMZPKDf nH0Kf0fywAoqqxjJ4LRoEaoBrFGVKKNw5ounurphE8xGu+wp49/IVspJd/nbOY4VdnGjeJ ZPlOIaogjBF48hCi80CfSw06ZnChRwgqdR9fi12woyT0ijT2hTJqWB0wa66dj2QUkZz7Cb TdCyWGYAifdBWnYih+HRK72rQ+w7J1lkX1qlyiYL4Gs0zxXOQU94DUQjdWmbNCFrFB+Mq6 L9NK03cn8P+YI3xStyoNo1cnksM4F0xSkXimvhPvYrojHeq7+IkDorrr1Skoxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687971814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nkj+qE2SYxU/6xiNVGQg6q5mr98XUhE9FUNeWaMol4c=; b=q9lD+xs66cSz93UK3honrwmdaOugI8WRhYY8qYUkunqp+/d2GjnX2800TXQFxAN8nh+LOq ygWZXrFkvm4VuY/lSjrsIght1tqEpK8OM65bpULLS20rZp8M1/ecdpCnuQc8KMiAbXY3nx gYQ7HYLkL8lU6MtMnuT8nZK7TZDSZjHHzD3xTf0YNY0dmabJJKhqG2hDt97OouTSrDWTV+ u9K4B0X5M15OHOAPpg7fi6H2IsM6g2MinA7FWM39cuwL5K3R51pS1GWFA5bthRdyB64WPU QYIkdCod2Sb7WDHHxXaJAlxgoIAWKkRzufRxGSfJ83yF4ULFUa+q/gb5lo+KKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687971814; a=rsa-sha256; cv=none; b=OvEaGLW8ZU/Lq6tLDxmgLrI6fAhoWC/N8RyxDqf+HXhWB9n0lfcSUPd1120lKeJPRkJ3Af o9UG8FFvmCrfAuVuO172gT4ltVBbg4WsK8DDCo61/p3VQS3rKZ4l/m+0k5DTglLWHg4vOu R/xCDomX80i1xrcx4vSrogsfQRCKxHza0F14CYOmlpnrPBf7Vk+aPwUYsYUBX+y99Cv4tN EPbWgNbnn6BRx9wrdvLaaG5NZtQ0W0KMJytsSBmc1Plps2nGAYluNLvVf3F56rQI7C6I6a EmH9z84x1DCoWcqPtoQyVA0qonTAka6ChVN0Au7H1y4mYO62TP+OyXl3Txm53w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrnwQ1cm5zhlb; Wed, 28 Jun 2023 17:03:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SH3YZ3091870; Wed, 28 Jun 2023 17:03:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SH3YHA091869; Wed, 28 Jun 2023 17:03:34 GMT (envelope-from git) Date: Wed, 28 Jun 2023 17:03:34 GMT Message-Id: <202306281703.35SH3YHA091869@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: 9beb195fd9fd - main - Continue searching for an irq map from the 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9beb195fd9fdc4beb7d5bca865cf5b19ccd7449b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=9beb195fd9fdc4beb7d5bca865cf5b19ccd7449b commit 9beb195fd9fdc4beb7d5bca865cf5b19ccd7449b Author: Andrew Turner AuthorDate: 2023-06-27 08:32:12 +0000 Commit: Andrew Turner CommitDate: 2023-06-28 17:03:08 +0000 Continue searching for an irq map from the start When searching for a free irq map location continue the search from the beginning of the list. There may be holes in the map before irq_map_first_free_idx, e.g. when removing an entries in order will increase the index past the current free entry. PR: 271990 Reviewed by: mhorne Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40768 --- sys/kern/subr_intr.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 5c7c99f458c1..ab882209c1e3 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -1720,6 +1720,14 @@ intr_map_irq(device_t dev, intptr_t xref, struct intr_map_data *data) return (i); } } + for (i = 0; i < irq_map_first_free_idx; i++) { + if (irq_map[i] == NULL) { + irq_map[i] = entry; + irq_map_first_free_idx = i + 1; + mtx_unlock(&irq_map_lock); + return (i); + } + } mtx_unlock(&irq_map_lock); /* XXX Expand irq_map table */ From nobody Wed Jun 28 17:20: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 4QrpJ51Fsfz4jqH2; Wed, 28 Jun 2023 17:20: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 4QrpJ50pW0z3mR1; Wed, 28 Jun 2023 17:20:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687972837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuIJRf8CaLEKkyqc6SlHrds9gfynINLyPdxA22fdbME=; b=Zaj8vSmcV8/fcvkLZzag+ITRek2mfIw5JPX3OvOKQ6a2oGpdk66Qg/9tHIj0tZe1oH58wo KfddAJNrJmTHZc5Ea6FfOgCkLi/a7+Aemh9svJXNIG6FgBLaEBDq4+WdZcgm6cjd7wQF48 CFNe19J1wiTakTfrZNyu2l+oWbcV7Sf7sbW3CElwhjRc7lH/pM9oSq8jxJMR3sJ7Nltrmu 4HasJ1qlxg1ACusxSLK2moXrYqnoWTRKfcrexwryExuJWuxtwMA6sP3kqE8dKLnaIbdEqX xJMc/B9RC97krSprT+Js2VNoWak73oIzVVsyKI9ADmisBJu3mwXnODczUIevGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687972837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuIJRf8CaLEKkyqc6SlHrds9gfynINLyPdxA22fdbME=; b=x3Pt2xo4toTuhs27MN36nIU/Sd6OixrvC+1KPNZYDKxSZkCpgCbHlIEr6rpOxlv8nqMHaz IzSvijjh5/R+F7B6SHKIpN0481RbyrwrWDyT8IVb43GreVdl1tVwe13DwcERVgf+lSjhLg l0Fqdy0xD/raWaPucpNkjVftRzHfBRZPx/Q2Mop+4JPbYcRJ+NURuPmNr1MOEC3PNUyyBZ ootKuXw8mEOhdQYmo7nGWcJKFANEYzZKJpjMJXZqmxQYaBszxPKETBDjahTSNIXafvqCKT x3tZdUurcm9HcJSUQS4w4tCnaQ2cR4ym7ejO7mzKCMMim4sxpOuAdyHzfb5b8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687972837; a=rsa-sha256; cv=none; b=bR01oHJ3nv6K8YyOh6J+2bdGAi1JimAi5ivhnWH0xwjzji0LOQih9AlrM+AeEBQraoAaCm fephlAxJZOX4X6wbxfo1JSPZ2qTzhTcqmbbxr57io5GR2PSz91GDI5+/lu7lF0uUPNiSeI J2mAQ6nJfiZyJDOpmIolVyWT0noyIQ2oo2CzfM2hnvVZ3K7ZZL6SYfFffY+t9Xtlr6gG+g pjIXzQeEgekiO7MftPNgYhVsButxc9tYqFnc4qXVkmv88J3ubu+niLw+O6hlX6guVWU7PY plw29AyBbBf8cELW0RKRIWb1OdDRlhiOhjGnbmazwJKGvV4cHZVh9WiIBHJlbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrpJ471pSzhmf; Wed, 28 Jun 2023 17:20:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SHKaUe018387; Wed, 28 Jun 2023 17:20:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SHKaVs018386; Wed, 28 Jun 2023 17:20:36 GMT (envelope-from git) Date: Wed, 28 Jun 2023 17:20:36 GMT Message-Id: <202306281720.35SHKaVs018386@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: 599a4548f8f1 - main - Adds support for Purism coreboot keyboards List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 599a4548f8f1758afe1d33c53e9a56e42c5f3e30 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=599a4548f8f1758afe1d33c53e9a56e42c5f3e30 commit 599a4548f8f1758afe1d33c53e9a56e42c5f3e30 Author: Jon Hopper AuthorDate: 2023-06-28 17:04:46 +0000 Commit: Warner Losh CommitDate: 2023-06-28 17:19:24 +0000 Adds support for Purism coreboot keyboards On Purism coreboot systems the quirks mode in atkbdc prevents built in Keyboard from being used. Add quirk to prevent that. MFC After: 2 weeks PR: 271737 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40405 --- sys/dev/atkbdc/atkbdc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c index c3c53f98e491..f24c3d883351 100644 --- a/sys/dev/atkbdc/atkbdc.c +++ b/sys/dev/atkbdc/atkbdc.c @@ -114,6 +114,7 @@ struct atkbdc_quirks { static struct atkbdc_quirks quirks[] = { {"coreboot", "System76", NULL, 0}, + {"coreboot", "Purism", NULL, 0}, {"coreboot", NULL, NULL, KBDC_QUIRK_KEEP_ACTIVATED | KBDC_QUIRK_IGNORE_PROBE_RESULT | KBDC_QUIRK_RESET_AFTER_PROBE | KBDC_QUIRK_SETLEDS_ON_INIT}, From nobody Wed Jun 28 17:53: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 4Qrq1b0MJ9z4kL4p; Wed, 28 Jun 2023 17:53: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 4Qrq1Z73n0z42Z9; Wed, 28 Jun 2023 17:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687974787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GnFy+qIDiJdSztPeGWNscfR9FOp/lkz/iw78piMMIoA=; b=FXRZQtKRftW7DyPDlON+SNeqEsYVElm0jDw9tsoZ73xuvLkR7l7LV5TTAKQ4dzkYSx6Vy4 x3UOTbCiJEFBMx8fMMPVAiu4+9SUWleiL6TyKo8Ng8DEu0vaQHd7TH+NSbouHYK6ESvrBk mQxwM8jndjBnwPxhfN56wvAXMXhJcZC0fMu1+oS/+NEBpteq8czxhRn26k8frSAS7njkvf BuZoE6a1yEG1OZjyd9ZnyKpF4CpjkmKDVRMWKeaehQbh4FGGhrq8bJv9vKPKsydbHtWA22 xMFVdilLyAf/Bwv7Ov6ZV3MWFP+QPKoyFzOpz3MPZ+P+2wIxPGLsuWGY2CZSgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687974787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GnFy+qIDiJdSztPeGWNscfR9FOp/lkz/iw78piMMIoA=; b=fwx69glpxR8bYr1K9LzlI0R/l/pADS4kIZLMu+putDiq4I4zQcKWZS1nGIhdBEp+HBVUJN lDbCMthlUUGrj34hQ6IHwBaAefp8scWWepWDCUhf7idPejCEAztHukPcKOWXJFm5fbyY7i LxezqmM4aFqK/+YqRXnenYiKAV8vLi2s8B5WTLM/JeadHpnMRi4YDvn0JlR10TeqM0MJPf PxCiAOLiF+5NmFCkZofTLEbBsHQtL1V8Sr9Ya4wDkVU6Wnfw7veHTolJ+EeYha9DfaAV7a wcgM024+Szw+6jP0a27HyEhjjR/Ha2bTfajh9z53f+D/vCsql+CROLslflYV4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687974787; a=rsa-sha256; cv=none; b=YgYbsXUHdHsLINcFWzEAmNtxWRS9oYwj+qSgp1gkPWt5DvcvqFuGIAHKGs/ASwpWYZqZ0U CijbfMaK2Nrpeg91/ndWVnzLm0/y9uJmwAy6W7WoZXU39ybTZUiWRGd3u+zB0cmg2T8hSt R5/jC9H4FCoCfG7cjTqbRoJbnVWIYPrG7cu/F1edthVLIfJiV3pnICT0OKzUJfsT2Xgfgx jH078E6ZBqxzylYxyhYvzHLj9TQdoK/S1t45y+/irMr8YBTtc9xn0m+85XlxYxsRuV3/J7 otu4lAg2Ar3KBdmZy1uYcIFrZDXnWFjcjZmkhJNlGqNt7XF0HirJoH7B6m2CkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrq1Z5rlpzjxN; Wed, 28 Jun 2023 17:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SHr6FA074550; Wed, 28 Jun 2023 17:53:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SHr6CA074549; Wed, 28 Jun 2023 17:53:06 GMT (envelope-from git) Date: Wed, 28 Jun 2023 17:53:06 GMT Message-Id: <202306281753.35SHr6CA074549@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 3767de839742 - main - arm64 pmap: Tidy up pmap_promote_l2() calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3767de83974206e4267dabf7fbe66b151c1a0b14 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=3767de83974206e4267dabf7fbe66b151c1a0b14 commit 3767de83974206e4267dabf7fbe66b151c1a0b14 Author: Alan Cox AuthorDate: 2023-06-28 07:08:02 +0000 Commit: Alan Cox CommitDate: 2023-06-28 17:46:15 +0000 arm64 pmap: Tidy up pmap_promote_l2() calls Since pmap_ps_enabled() is true by default, check it inside of pmap_promote_l2() instead of at every call site. Modify pmap_promote_l2() to return true if the promotion succeeded and false otherwise. (A similar change was applied to the amd64 pmap in 0d2f98c2f092.) Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D40781 --- sys/arm64/arm64/pmap.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 3166b3d7959b..46520889728f 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -435,7 +435,7 @@ void (*pmap_stage2_invalidate_all)(uint64_t); #define TLBI_VA(addr) (((addr) >> TLBI_VA_SHIFT) & TLBI_VA_MASK) #define TLBI_VA_L3_INCR (L3_SIZE >> TLBI_VA_SHIFT) -static int superpages_enabled = 1; +static int __read_frequently superpages_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, superpages_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &superpages_enabled, 0, "Are large page mappings enabled?"); @@ -4141,14 +4141,21 @@ pmap_pv_promote_l2(pmap_t pmap, vm_offset_t va, vm_paddr_t pa, * aligned, contiguous physical memory and (2) the 4KB page mappings must have * identical characteristics. */ -static void +static bool pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset_t va, vm_page_t mpte, struct rwlock **lockp) { pt_entry_t all_l3e_AF, *firstl3, *l3, newl2, oldl3, pa; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - PMAP_ASSERT_STAGE1(pmap); + + /* + * Currently, this function only supports promotion on stage 1 pmaps + * because it tests stage 1 specific fields and performs a break- + * before-make sequence that is incorrect for stage 2 pmaps. + */ + if (pmap->pm_stage != PM_STAGE1 || !pmap_ps_enabled(pmap)) + return (false); /* * Examine the first L3E in the specified PTP. Abort if this L3E is @@ -4157,14 +4164,14 @@ pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset_t va, vm_page_t mpte, firstl3 = (pt_entry_t *)PHYS_TO_DMAP(PTE_TO_PHYS(pmap_load(l2))); newl2 = pmap_load(firstl3); if ((newl2 & ATTR_SW_NO_PROMOTE) != 0) - return; + return (false); /* ... is not the first physical page within an L2 block */ if ((PTE_TO_PHYS(newl2) & L2_OFFSET) != 0 || ((newl2 & ATTR_DESCR_MASK) != L3_PAGE)) { /* ... or is invalid */ atomic_add_long(&pmap_l2_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx" " in pmap %p", va, pmap); - return; + return (false); } /* @@ -4212,7 +4219,7 @@ setl2: atomic_add_long(&pmap_l2_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx" " in pmap %p", va, pmap); - return; + return (false); } setl3: if ((oldl3 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == @@ -4232,7 +4239,7 @@ setl3: atomic_add_long(&pmap_l2_p_failures, 1); CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx" " in pmap %p", va, pmap); - return; + return (false); } all_l3e_AF &= oldl3; pa -= PAGE_SIZE; @@ -4263,7 +4270,7 @@ setl3: CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx in pmap %p", va, pmap); - return; + return (false); } if ((newl2 & ATTR_SW_MANAGED) != 0) @@ -4277,6 +4284,7 @@ setl3: atomic_add_long(&pmap_l2_promotions, 1); CTR2(KTR_PMAP, "pmap_promote_l2: success for va %#lx in pmap %p", va, pmap); + return (true); } #endif /* VM_NRESERVLEVEL > 0 */ @@ -4681,17 +4689,13 @@ validate: #if VM_NRESERVLEVEL > 0 /* - * Try to promote from level 3 pages to a level 2 superpage. This - * currently only works on stage 1 pmaps as pmap_promote_l2 looks at - * stage 1 specific fields and performs a break-before-make sequence - * that is incorrect a stage 2 pmap. + * If both the page table page and the reservation are fully + * populated, then attempt promotion. */ if ((mpte == NULL || mpte->ref_count == NL3PG) && - pmap_ps_enabled(pmap) && pmap->pm_stage == PM_STAGE1 && (m->flags & PG_FICTITIOUS) == 0 && - vm_reserv_level_iffullpop(m) == 0) { - pmap_promote_l2(pmap, pde, va, mpte, &lock); - } + vm_reserv_level_iffullpop(m) == 0) + (void)pmap_promote_l2(pmap, pde, va, mpte, &lock); #endif rv = KERN_SUCCESS; @@ -5096,18 +5100,17 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, * attempt promotion. */ if ((mpte == NULL || mpte->ref_count == NL3PG) && - pmap_ps_enabled(pmap) && pmap->pm_stage == PM_STAGE1 && (m->flags & PG_FICTITIOUS) == 0 && vm_reserv_level_iffullpop(m) == 0) { if (l2 == NULL) l2 = pmap_pde(pmap, va, &lvl); - pmap_promote_l2(pmap, l2, va, mpte, lockp); /* * If promotion succeeds, then the next call to this function * should not be given the unmapped PTP as a hint. */ - mpte = NULL; + if (pmap_promote_l2(pmap, l2, va, mpte, lockp)) + mpte = NULL; } #endif From nobody Wed Jun 28 18:00: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 4QrqBY27TJz4kPt4; Wed, 28 Jun 2023 18:00: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 4QrqBX5hFKz44Jm; Wed, 28 Jun 2023 18:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687975252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WPdrgWz2x51Hz9zqZVjLgFcU8UFUxo+kOIk/S58rVI0=; b=T1YFQ8aaqg2zm3pnWyhNTbkdFiGOK1L63IALg+XGMd+OkxNntLxAHip7bml0NsS3GBRNNh zPtDe4bxE2PBxCI2Klg/bbcgP/ZmT/22+XqGXuKkKHOJjFEDtf1cCDf09/WNKfIi7O3K0c kkP4eBg8jIsfFWsSrUguso8n4pic3ueG3TVZZF5xUhsA8Lpg7uUYDUKto7VkafZvqxiIIn Snktdsb+Mh51kj105f+5jrem+5iN8gwrutO7rwOOKisjjw3RPKZJpIa1wOP2nSerMoFpCR RO6nNWamSiemHeb/3RtSRq7WWr6h7aWBMXaGJ47KO6vfFlNzNaXNzsrvwCJGXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687975252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WPdrgWz2x51Hz9zqZVjLgFcU8UFUxo+kOIk/S58rVI0=; b=VWXwftz65af2Ap6i2bWk1GSk9NqPICsyDh/Ua/tePYIwcyThF15x7GbxKe9Yz874wl57mw lt0fmIQfJl8PYv91bDPbNzQyizbvDjhWfiIhoWb3wDvcprk7RS6WWuVqRZ6LOCmA1mCElJ DQC2E6uateLTelKkp+RjXStfyYtG9gvBtovnoNRmJ2yXHdkb5FD/yCzUKHEkZr0zjPLugF 0o11wR4SdR6SSPjfxlA0taxA0xbY/Kpzxp6cZsfEwI3skCy96ZzAQuSzebWeUJi4WVPrHT 4pI5fU6byJz5F04ME8/LBQUr2TnbGMPwU/GYN6ucz7dRm3nrrtTln6NdT/j15w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687975252; a=rsa-sha256; cv=none; b=mgJuBr1teg6lNtOpR3qorsauWLOeyBDkrvy1gABjA6uJq/9uhck+CilEPoUOMAYhtDMe/t 6dHAr6ko578D0qt2Is4GK7ielmVIDXpDQ5bRLC7QvKNl8FtXm+jYp537SIdogQjl/TLir+ hKOPKs7ElxV110ywXUflNcJwtDtQLEWMS0mOBbkvAvV62ewxYy1/h5X1YeYbLdkvx2+cM5 MFsVDQn/z6kPcSbRnaqU2u+/OCCze0Ie56zETM7tipPRxDZjRK3v/jr1Mp/VW5e6S8rH8o BS6jUe3s3Z0x3BlC1t84e29laEl+Cy6nTc5RNDjkM6J+qAzQT9Ls/4+hqKUCaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrqBX4mHBzjjM; Wed, 28 Jun 2023 18:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SI0qZS088377; Wed, 28 Jun 2023 18:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SI0quc088376; Wed, 28 Jun 2023 18:00:52 GMT (envelope-from git) Date: Wed, 28 Jun 2023 18:00:52 GMT Message-Id: <202306281800.35SI0quc088376@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: 1706d72e36a0 - stable/13 - Apply llvm fix for hanging gcc builds on 32-bit arm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1706d72e36a03da4e5c2bd166362dabf8f2b1d6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1706d72e36a03da4e5c2bd166362dabf8f2b1d6a commit 1706d72e36a03da4e5c2bd166362dabf8f2b1d6a Author: Dimitry Andric AuthorDate: 2023-06-19 18:32:40 +0000 Commit: Dimitry Andric CommitDate: 2023-06-28 17:59:58 +0000 Apply llvm fix for hanging gcc builds on 32-bit arm Merge commit 962c306a11d0 from llvm-project (by Florian Hahn): [LV] Don't consider pointer as uniform if it is also stored. Update isVectorizedMemAccessUse to also check if the pointer is stored. This prevents LV to incorrectly consider a pointer as uniform if it is used as both pointer and stored by the same StoreInst. Fixes #61396. PR: 271992 Reported by: John F. Carr MFC after: 3 days (cherry picked from commit dbbaf77801a8f30e49731395e85757f339f345bf) --- .../llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 5fd4e45d80fb..9d95cb25efa0 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -4627,11 +4627,17 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) { WideningDecision == CM_Interleave); }; - // Returns true if Ptr is the pointer operand of a memory access instruction - // I, and I is known to not require scalarization. + // I, I is known to not require scalarization, and the pointer is not also + // stored. auto isVectorizedMemAccessUse = [&](Instruction *I, Value *Ptr) -> bool { - return getLoadStorePointerOperand(I) == Ptr && isUniformDecision(I, VF); + auto GetStoredValue = [I]() -> Value * { + if (!isa(I)) + return nullptr; + return I->getOperand(0); + }; + return getLoadStorePointerOperand(I) == Ptr && isUniformDecision(I, VF) && + GetStoredValue() != Ptr; }; // Holds a list of values which are known to have at least one uniform use. @@ -4679,8 +4685,8 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) { if (isa(I) && Legal->isUniformMemOp(I)) addToWorklistIfAllowed(&I); - if (isUniformDecision(&I, VF)) { - assert(isVectorizedMemAccessUse(&I, Ptr) && "consistency check"); + if (isVectorizedMemAccessUse(&I, Ptr)) { + assert(isUniformDecision(&I, VF) && "consistency check"); HasUniformUse.insert(Ptr); } } From nobody Wed Jun 28 18:10: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 4QrqPf5tJMz4kVhT; Wed, 28 Jun 2023 18:10: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 4QrqPf5Ryfz46JN; Wed, 28 Jun 2023 18:10:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687975830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eForoTMOSbTo1NFZLB4UWQfEejaoLmUXYS6L0eqHXT8=; b=vRQTQR1GzTl4SA8JsxzCvGFt3WXMkGW852baeh+8QBN+jExzNv72a+BUqGNJ650dz2xv1j ekErLXJq4S1JfBT05bqIkX1ITolSeO9XBH6A8ecSscIYLh9FnlFxTurCoQ1BBh7sItqAak gDX5QjrPTMtdSsNBwqDgrjl7r33AmWobBg6Fbd/fs/gVK3a8KCx76SrAm+w/1zUZMwT47F kVuYryvboGtaH6Ab0baZ48MawG4nmONqZFDHt+FwDufny/4p1DIzmrNKL+BLHvsQZ48bhI J3LwRJxFIBTRT4inO8foSCjsI7YDZYM3Tal/W2U07ZCrtkJxz7X/FcFy4SBFaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687975830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eForoTMOSbTo1NFZLB4UWQfEejaoLmUXYS6L0eqHXT8=; b=x26+3LyYlIL6W8NnBme92vnYAUqGi98AsT7NTnsSYKWsqBU4Ik35Ozgs7mTACbyKCpANJU NA/EBV2REqK2dtMI/c4CVaWMg1oAfHaKVZhWlvtCwW4QP8TEvGN9oF+pz6+LjBFP4PWgHu sRgcQzdKYZCuhWFgLw0g/UyU15SQZMpddJBZk2vCRhJk9Wl8VMk1dZXiqQVtVUN7yqBbjW 8FFbYX2CY4rdq9vDTd/QT1pNf9gCOIDJMkbwqUym/GgM1yagMQHdD9Il7ZmyNGIMa8hxol cqB7Yxaxq2O5cMpL1bI5xgsJeSyqPVaMG/A2wz/7S9vOQm3XJ1kQw6Q4lg8wiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687975830; a=rsa-sha256; cv=none; b=VkWf29/03GubBqGUkaf3+0+Z8M2W+9eLw/ORptApaHoiPNpqO3rdfAhyLe+OEzzQt9/qwc HDNYFAlQYVLtjnPPvDEDz8scX0VZa2kuwYhLS0sp7vA1d+QJFBz/OcK4FXJRTWodR8xAfs rPNWzRUcA9FIP0K8iWNhVT27UXF9ZR+kCVTYm84z74iGpc5kwsm7LpXR6JojcdTrANNU99 F/WyBfwURp4dUn2lMrm8RLKY5Ed5uLFtuBOv5S5w2AjvVoz7BuTHwr7GVmu5mesazWKLmw WM8eNDWBi13bwfCN0VI+B954lYDJ3XJJ8DZFWTLI+lS/Lcf+BnogPIjDFVhGeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrqPf4WPdzkDV; Wed, 28 Jun 2023 18:10:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SIAUWH002139; Wed, 28 Jun 2023 18:10:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SIAUGc002138; Wed, 28 Jun 2023 18:10:30 GMT (envelope-from git) Date: Wed, 28 Jun 2023 18:10:30 GMT Message-Id: <202306281810.35SIAUGc002138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 78cb8841f085 - main - mrsas: Use mrsas_sge64 instead of iovec for the S/G list for passthru. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78cb8841f0853e8059537c32ec4bd31d1fec7134 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=78cb8841f0853e8059537c32ec4bd31d1fec7134 commit 78cb8841f0853e8059537c32ec4bd31d1fec7134 Author: John Baldwin AuthorDate: 2023-06-28 18:10:05 +0000 Commit: John Baldwin CommitDate: 2023-06-28 18:10:05 +0000 mrsas: Use mrsas_sge64 instead of iovec for the S/G list for passthru. The DMA scatter/gather list for mrsas passthrough ioctl commands is stored in a SGL at the end of the DCMD frame. Given the SGL member at the end of the DCMD frame it seems likely this S/G list is formatted as a fixed-width structure such as the type mrsas_sge64 and not as a iovec which contains a kernel pointer and length that vary with the native architecture size. Reviewed by: imp Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D40727 --- sys/dev/mrsas/mrsas_ioctl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/mrsas/mrsas_ioctl.c b/sys/dev/mrsas/mrsas_ioctl.c index 9d3699df5b7b..6f27d18ccab9 100644 --- a/sys/dev/mrsas/mrsas_ioctl.c +++ b/sys/dev/mrsas/mrsas_ioctl.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include struct mrsas_passthru_cmd { - struct iovec *kern_sge; + struct mrsas_sge64 *kern_sge; struct mrsas_softc *sc; struct mrsas_mfi_cmd *cmd; bus_dma_tag_t ioctl_data_tag; @@ -112,8 +112,8 @@ mrsas_passthru_load_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) } for (i = 0; i < nseg; i++) { - cb->kern_sge[i].iov_base = PTRIN(segs[i].ds_addr); - cb->kern_sge[i].iov_len = segs[i].ds_len; + cb->kern_sge[i].phys_addr = htole64(segs[i].ds_addr); + cb->kern_sge[i].length = htole32(segs[i].ds_len); } cb->sge_count = nseg; @@ -421,7 +421,7 @@ mrsas_user_command(struct mrsas_softc *sc, struct mfi_ioc_passthru *ioc) bus_dma_tag_t ioctl_data_tag; bus_dmamap_t ioctl_data_dmamap; bus_addr_t ioctl_data_phys_addr; - struct iovec *kern_sge; + struct mrsas_sge64 *kern_sge; int ret, ioctl_data_size; char *ioctl_temp_data_mem; @@ -457,11 +457,11 @@ mrsas_user_command(struct mrsas_softc *sc, struct mfi_ioc_passthru *ioc) if (sizeof(bus_addr_t) == 8) cmd->frame->hdr.flags |= MFI_FRAME_SGL64 | MFI_FRAME_SENSE64; - kern_sge = (struct iovec *)(&dcmd->sgl); + kern_sge = (struct mrsas_sge64 *)(&dcmd->sgl); if (ioctl_data_size == 0) { - kern_sge[0].iov_base = 0; - kern_sge[0].iov_len = 0; + kern_sge[0].phys_addr = 0; + kern_sge[0].length = 0; } else { ioctl_temp_data_mem = malloc(ioc->buf_size, M_MRSAS, M_WAITOK); if (ioctl_temp_data_mem == NULL) { From nobody Wed Jun 28 18:11: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 4QrqQW3Jf8z4kW2Z; Wed, 28 Jun 2023 18:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrqQW2sDhz46m9; Wed, 28 Jun 2023 18:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687975875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K42crHyr/tiXqFJkAGBHe+s2YB/wySpmozBTftvk+Tg=; b=v7z/Ik7lYTVe0eCtX2vOH/+FiQKkOVhHcfnSAHvgHLWQE5cFigPFqNvXT6nwZvLjCILzv6 QxDsYL1TyV7daabv09JkXmWJtHhDcPLWImNXdiKsqcjgX0T1pPb3n7dVCc6wCt+Xy7tV6t I/P1Osk3wAa5kvW+q7ggHW2W4BNFAluOhe8J3nFYwqdzwSIsmejvhjrpY+9VkoevYxn7Xz ZCLiANA1SbvLEsG1sykJsOYf+ynizf4ep8TsRDCfj56Jd5x4ub9EQlA6ZgQt5aQjGq5ngX ut94x282qm5RT+IuTePX6O3rVJ+pjPiHscfvJaGeZ//NIQp6YtPw80Kfy0GS/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687975875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K42crHyr/tiXqFJkAGBHe+s2YB/wySpmozBTftvk+Tg=; b=Q9C7DMK21vnjjrcCUy1YOdCCXKoqlZkXoAzRzYMz2W6RG5HOclOA9y17K0wAtg91magzHk 9HHSaqbfb9fWi7HnVVYYOwgnMzvHykeviESxvb6ycFoyhvCFb+crxzElQ1pJohqCACPDiC 3QNRg/eCCVg0yYvgbYOCtB/lhMfLhUQtAnUeFq/waOM0TSrrHfW4DAGw+5hXchOdv+B+5D 8Q06B3BAkbLchMtCUvS5QT0rJf/rQ2BB//+oO+zAW/KeE3A7PB5vgWz8PFXRZNqm2CUIt3 6eHOLLSbVVW2MWioRO/teqwnwX3//0CxFfqntA3unhx86rm/sPST1Hj9QbXqDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687975875; a=rsa-sha256; cv=none; b=tl8ELQpiIQ8n+4aViu1KvJPMjeiK/dJM205V7bSiVvqYjOV8P0ryNBvu9Lg8Sz54ZtQTB1 XMhkh3fRasOUVwBsoFlPYPbS3eocSI57+/hULynd9BVmxwlreA2Wvk4/XC9MAumg73jyWR xMpWks5VE4Sv4bvBtrLB+2xAZwsRFVAyaZG4tB+qrBT9HY9ggW0Jc2O9oE0wE6CYvdPI18 fMkKWzDA6a2Tgx11jnm1fl2TMYjAmcUteFRh5rAZiPo0VWy31gIo0cVFsbadLcZj+0LIzk VP4f/K9Z9jmWpNKmeqJT7df53a8Yi5JL9PDqRIxFOSav7KRBcK9WvEmseULccA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrqQW1xTWzjyS; Wed, 28 Jun 2023 18:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SIBFOm005773; Wed, 28 Jun 2023 18:11:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SIBF3H005772; Wed, 28 Jun 2023 18:11:15 GMT (envelope-from git) Date: Wed, 28 Jun 2023 18:11:15 GMT Message-Id: <202306281811.35SIBF3H005772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 230990991965 - main - bsdinstall: Handle errors from geom_gettree. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23099099196548550461ba427dcf09dcfb01878d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=23099099196548550461ba427dcf09dcfb01878d commit 23099099196548550461ba427dcf09dcfb01878d Author: John Baldwin AuthorDate: 2023-06-28 18:11:00 +0000 Commit: John Baldwin CommitDate: 2023-06-28 18:11:00 +0000 bsdinstall: Handle errors from geom_gettree. geom_gettree probably never fails, and if it does there isn't much of a fallback other than aborting partitioning. However, a few places were checking the return value and not doing anything with it triggering a unused-but-set-variable warning. Checking the errors resolves the warning. While here, check for errors in other places that weren't checking for them at all, remove a spurious double call (the second call overwrote the mesh structure leaking all the pointers from the first), and close a few resource leaks on error paths. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D40779 --- usr.sbin/bsdinstall/partedit/part_wizard.c | 40 +++++++++++++++++++----------- usr.sbin/bsdinstall/partedit/partedit.c | 22 ++++++++-------- usr.sbin/bsdinstall/partedit/scripted.c | 34 +++++++++++++++++-------- 3 files changed, 62 insertions(+), 34 deletions(-) diff --git a/usr.sbin/bsdinstall/partedit/part_wizard.c b/usr.sbin/bsdinstall/partedit/part_wizard.c index db78cea768aa..e7b513f3193a 100644 --- a/usr.sbin/bsdinstall/partedit/part_wizard.c +++ b/usr.sbin/bsdinstall/partedit/part_wizard.c @@ -65,31 +65,37 @@ part_wizard(const char *fsreq) startwizard: error = geom_gettree(&mesh); + if (error != 0) + return (1); bsddialog_backtitle(&conf, "FreeBSD Installer"); - error = geom_gettree(&mesh); disk = boot_disk_select(&mesh); - if (disk == NULL) + if (disk == NULL) { + geom_deletetree(&mesh); return (1); + } bsddialog_clearterminal(); bsddialog_backtitle(&conf, "FreeBSD Installer"); schemeroot = wizard_partition(&mesh, disk); free(disk); + geom_deletetree(&mesh); if (schemeroot == NULL) return (1); - geom_deletetree(&mesh); bsddialog_clearterminal(); bsddialog_backtitle(&conf, "FreeBSD Installer"); error = geom_gettree(&mesh); + if (error != 0) { + free(schemeroot); + return (1); + } error = wizard_makeparts(&mesh, schemeroot, fstype, 1); - if (error) - goto startwizard; free(schemeroot); - geom_deletetree(&mesh); + if (error) + goto startwizard; return (0); } @@ -310,11 +316,13 @@ query: if (strcmp(scheme, "MBR") == 0) { struct gmesh submesh; - geom_gettree(&submesh); - gpart_create(provider_for_name(&submesh, disk), - "freebsd", NULL, NULL, &retval, - choice /* Non-interactive for "Entire Disk" */); - geom_deletetree(&submesh); + + if (geom_gettree(&submesh) == 0) { + gpart_create(provider_for_name(&submesh, disk), + "freebsd", NULL, NULL, &retval, + choice /* Non-interactive for "Entire Disk" */); + geom_deletetree(&submesh); + } } else { retval = strdup(disk); } @@ -334,7 +342,7 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, struct gmesh submesh; char swapsizestr[10], rootsizestr[10]; intmax_t swapsize, available; - int retval; + int error, retval; struct bsddialog_conf conf; if (strcmp(fstype, "zfs") == 0) { @@ -381,12 +389,16 @@ wizard_makeparts(struct gmesh *mesh, const char *disk, const char *fstype, humanize_number(rootsizestr, 7, available - swapsize - 1024*1024, "B", HN_AUTOSCALE, HN_NOSPACE | HN_DECIMAL); - geom_gettree(&submesh); + error = geom_gettree(&submesh); + if (error != 0) + return (error); pp = provider_for_name(&submesh, disk); gpart_create(pp, fsname, rootsizestr, "/", NULL, 0); geom_deletetree(&submesh); - geom_gettree(&submesh); + error = geom_gettree(&submesh); + if (error != 0) + return (error); pp = provider_for_name(&submesh, disk); gpart_create(pp, "freebsd-swap", swapsizestr, NULL, NULL, 0); geom_deletetree(&submesh); diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c index f26aa0085748..ece258b2c070 100644 --- a/usr.sbin/bsdinstall/partedit/partedit.c +++ b/usr.sbin/bsdinstall/partedit/partedit.c @@ -63,9 +63,10 @@ sigint_handler(int sig) struct gmesh mesh; /* Revert all changes and exit dialog-mode cleanly on SIGINT */ - geom_gettree(&mesh); - gpart_revert_all(&mesh); - geom_deletetree(&mesh); + if (geom_gettree(&mesh) == 0) { + gpart_revert_all(&mesh); + geom_deletetree(&mesh); + } bsddialog_end(); @@ -216,16 +217,17 @@ main(int argc, const char **argv) if (prompt == NULL) { error = geom_gettree(&mesh); - if (validate_setup()) { - error = apply_changes(&mesh); - } else { - gpart_revert_all(&mesh); - error = -1; + if (error != 0) { + if (validate_setup()) { + error = apply_changes(&mesh); + } else { + gpart_revert_all(&mesh); + error = -1; + } + geom_deletetree(&mesh); } } - geom_deletetree(&mesh); - free(items); bsddialog_end(); return (error); diff --git a/usr.sbin/bsdinstall/partedit/scripted.c b/usr.sbin/bsdinstall/partedit/scripted.c index 62c36724d7c5..2f79d643fd08 100644 --- a/usr.sbin/bsdinstall/partedit/scripted.c +++ b/usr.sbin/bsdinstall/partedit/scripted.c @@ -76,6 +76,8 @@ part_config(char *disk, const char *scheme, char *config) scheme = default_scheme(); error = geom_gettree(&mesh); + if (error != 0) + return (-1); if (provider_for_name(&mesh, disk) == NULL) { fprintf(stderr, "GEOM provider %s not found\n", disk); geom_deletetree(&mesh); @@ -97,16 +99,22 @@ part_config(char *disk, const char *scheme, char *config) if (strcmp(scheme, "MBR") == 0) { struct gmesh submesh; - geom_gettree(&submesh); - gpart_create(provider_for_name(&submesh, disk), - "freebsd", NULL, NULL, &disk, 0); - geom_deletetree(&submesh); + + if (geom_gettree(&submesh) == 0) { + gpart_create(provider_for_name(&submesh, disk), + "freebsd", NULL, NULL, &disk, 0); + geom_deletetree(&submesh); + } } else { - disk= strdup(disk); + disk = strdup(disk); } geom_deletetree(&mesh); error = geom_gettree(&mesh); + if (error != 0) { + free(disk); + return (-1); + } /* Create partitions */ if (config == NULL) { @@ -133,6 +141,10 @@ part_config(char *disk, const char *scheme, char *config) NULL, 0); geom_deletetree(&mesh); error = geom_gettree(&mesh); + if (error != 0) { + free(disk); + return (-1); + } size = type = mount = NULL; } @@ -143,8 +155,8 @@ finished: return (0); } -static -int parse_disk_config(char *input) +static int +parse_disk_config(char *input) { char *ap; char *disk = NULL, *scheme = NULL, *partconfig = NULL; @@ -184,9 +196,11 @@ int parse_disk_config(char *input) if (disk == NULL || strcmp(disk, "DEFAULT") == 0) { struct gmesh mesh; - geom_gettree(&mesh); - disk = boot_disk_select(&mesh); - geom_deletetree(&mesh); + + if (geom_gettree(&mesh) == 0) { + disk = boot_disk_select(&mesh); + geom_deletetree(&mesh); + } } return (part_config(disk, scheme, partconfig)); From nobody Wed Jun 28 18:13: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 4QrqT40N8Vz4kX71; Wed, 28 Jun 2023 18:13: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 4QrqT34QHrz47cM; Wed, 28 Jun 2023 18:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687976007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Y2YZ20d4moBwornTlNEPWAE6BSYrlTAR+o5BEMWC2Y=; b=BijE09dneqX7rYpiJOxrl0BuwQ5YlzhB0WDx6oM2wSWN/u28R4jzGrLP2P5YLYEJEHkQ9b ckj5FPOyTrjUwD4iWst/zCkrSZxmUS9aiz7IrRbjmMCI2+FrF9Hf0LfFO8rpgH5di4wYD4 Je0ASXM6oWCM100raOoKCCdE3xfroBboWSu7oT7A0w23R6b3nKfgMIfODhNNb5weh+SOTK jmUyT/LyUErOg3/unXmYZL96TFz8RuVDjtEkogiQ5OO0yYDwRdv4K9OeAvUxTk1BFX5EZp cFNEf1Z2LFRxGxu2jQ845IWgs3khiA1Xe4gU54dWQKaXUhU3qPRAkucaSTNYKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687976007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Y2YZ20d4moBwornTlNEPWAE6BSYrlTAR+o5BEMWC2Y=; b=uldoPXoVeiTEGrYXi/L3Gh1Wpjd+/gmwA9+N1F9k9+6JEQNreEHBc4Bhf90MTT1av4x3Kd 7I3z3y5TQoBkU59SEg0/LHvSqAYUkgv2A9LIXBHip449/wVubsxX7XsfhBFLBcav1tn/0I B3p7/7X9gzo7uPXBcwTI6Qoi+U4O8jLkp5lJiZEfrpKUrF3gvpcpjBd4lNC3z44aH/7r7A JY5/sBWq7a47hW3oljATIq6Ht+Ghopfrfot87Nc0rMj+YhQ40yy1vtvxUjspcTXjYJ8688 LCPUvd7YJZofgbg8PVok0ZKY/wMrsunlyDJSFP56dlUSWq7UswtWiJtgAcjMsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687976007; a=rsa-sha256; cv=none; b=NmSN2dct45fifjw6/og3iZHNB44FsWQ4xDfJPtTd07BNZ/UicNJbZuvANnSYGwVHYGlAXC kp0b7Yqgyc1vR8Q8p74LYJb9aKRvfSKTO+bbFON1DSZLac1oAPX4XPIJYrQmXH2pveNlE2 TfIk0erE/6FT7EEhLEGZH5olY5L4yB1SrgnUbuoZ60x3Vvy6YU8ZIqWrfQ3cGH0GidjElB 7+zvUenT9gbNfgG9DYhh2o0AFZX1GxWncthS4f0sNfzA8RCH26SPPKzCJvU0GymTvMPM5+ XMwqBj5+r+JdUeTe7JJQDrsE0AzQjdS967/TbasklAdqMNNctSZbXAeiKSO96Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrqT33WGZzkDx; Wed, 28 Jun 2023 18:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SIDREK008883; Wed, 28 Jun 2023 18:13:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SIDRmR008882; Wed, 28 Jun 2023 18:13:27 GMT (envelope-from git) Date: Wed, 28 Jun 2023 18:13:27 GMT Message-Id: <202306281813.35SIDRmR008882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a80e5bdff5d8 - main - camdd: Remove some dead code but also make -E functional. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a80e5bdff5d8093da4a93b081781c57b8d0243a3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a80e5bdff5d8093da4a93b081781c57b8d0243a3 commit a80e5bdff5d8093da4a93b081781c57b8d0243a3 Author: John Baldwin AuthorDate: 2023-06-28 18:12:50 +0000 Commit: John Baldwin CommitDate: 2023-06-28 18:12:50 +0000 camdd: Remove some dead code but also make -E functional. - Pass down the top-level arglist from main down to camdd_rw and use it in place of the hardcoded CAMDD_ARG_ERR_RECOVER when calling camdd_probe_pass. This now disables error recovery by default unless -E is specified. - Use the return value of parse_btl to determine if an explicit LUN was specified. - Remove most CAMDD_ARG_* flags that are only set and never checked. CAMDD_ARG_VERBOSE remains, but could perhaps be removed (and possibly -v should be removed as well since it is currently a no-op). Reported by: clang -Wunused-but-set-variable (arglist in main) Differential Revision: https://reviews.freebsd.org/D40666 --- usr.sbin/camdd/camdd.c | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/usr.sbin/camdd/camdd.c b/usr.sbin/camdd/camdd.c index f6c4baff763c..1be2ca0f59a0 100644 --- a/usr.sbin/camdd/camdd.c +++ b/usr.sbin/camdd/camdd.c @@ -95,14 +95,7 @@ typedef enum { typedef enum { CAMDD_ARG_NONE = 0x00000000, CAMDD_ARG_VERBOSE = 0x00000001, - CAMDD_ARG_DEVICE = 0x00000002, - CAMDD_ARG_BUS = 0x00000004, - CAMDD_ARG_TARGET = 0x00000008, - CAMDD_ARG_LUN = 0x00000010, - CAMDD_ARG_UNIT = 0x00000020, - CAMDD_ARG_TIMEOUT = 0x00000040, CAMDD_ARG_ERR_RECOVER = 0x00000080, - CAMDD_ARG_RETRIES = 0x00000100 } camdd_argmask; typedef enum { @@ -444,8 +437,7 @@ static sig_atomic_t need_status = 0; #define CAMDD_PASS_DEFAULT_DEPTH 6 #define CAMDD_PASS_RW_TIMEOUT 60 * 1000 -static int parse_btl(char *tstr, int *bus, int *target, int *lun, - camdd_argmask *arglst); +static int parse_btl(char *tstr, int *bus, int *target, int *lun); void camdd_free_dev(struct camdd_dev *dev); struct camdd_dev *camdd_alloc_dev(camdd_dev_type dev_type, struct kevent *new_ke, int num_ke, @@ -500,8 +492,8 @@ void camdd_sig_handler(int sig); void camdd_print_status(struct camdd_dev *camdd_dev, struct camdd_dev *other_dev, struct timespec *start_time); -int camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, - uint64_t max_io, int retry_count, int timeout); +int camdd_rw(struct camdd_io_opts *io_opts, camdd_argmask arglist, + int num_io_opts, uint64_t max_io, int retry_count, int timeout); int camdd_parse_io_opts(char *args, int is_write, struct camdd_io_opts *io_opts); void usage(void); @@ -516,7 +508,7 @@ void usage(void); * Returns the number of parsed components, or 0. */ static int -parse_btl(char *tstr, int *bus, int *target, int *lun, camdd_argmask *arglst) +parse_btl(char *tstr, int *bus, int *target, int *lun) { char *tmpstr; int convs = 0; @@ -527,17 +519,14 @@ parse_btl(char *tstr, int *bus, int *target, int *lun, camdd_argmask *arglst) tmpstr = (char *)strtok(tstr, ":"); if ((tmpstr != NULL) && (*tmpstr != '\0')) { *bus = strtol(tmpstr, NULL, 0); - *arglst |= CAMDD_ARG_BUS; convs++; tmpstr = (char *)strtok(NULL, ":"); if ((tmpstr != NULL) && (*tmpstr != '\0')) { *target = strtol(tmpstr, NULL, 0); - *arglst |= CAMDD_ARG_TARGET; convs++; tmpstr = (char *)strtok(NULL, ":"); if ((tmpstr != NULL) && (*tmpstr != '\0')) { *lun = strtol(tmpstr, NULL, 0); - *arglst |= CAMDD_ARG_LUN; convs++; } } @@ -3208,8 +3197,8 @@ camdd_print_status(struct camdd_dev *camdd_dev, struct camdd_dev *other_dev, } int -camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io, - int retry_count, int timeout) +camdd_rw(struct camdd_io_opts *io_opts, camdd_argmask arglist, int num_io_opts, + uint64_t max_io, int retry_count, int timeout) { struct cam_device *new_cam_dev = NULL; struct camdd_dev *devs[2]; @@ -3231,13 +3220,12 @@ camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io, switch (io_opts[i].dev_type) { case CAMDD_DEV_PASS: { if (isdigit(io_opts[i].dev_name[0])) { - camdd_argmask new_arglist = CAMDD_ARG_NONE; int bus = 0, target = 0, lun = 0; int rv; /* device specified as bus:target[:lun] */ rv = parse_btl(io_opts[i].dev_name, &bus, - &target, &lun, &new_arglist); + &target, &lun); if (rv < 2) { warnx("numeric device specification " "must be either bus:target, or " @@ -3246,9 +3234,8 @@ camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io, goto bailout; } /* default to 0 if lun was not specified */ - if ((new_arglist & CAMDD_ARG_LUN) == 0) { + if (rv == 2) { lun = 0; - new_arglist |= CAMDD_ARG_LUN; } new_cam_dev = cam_open_btl(bus, target, lun, O_RDWR, NULL); @@ -3273,7 +3260,7 @@ camdd_rw(struct camdd_io_opts *io_opts, int num_io_opts, uint64_t max_io, devs[i] = camdd_probe_pass(new_cam_dev, /*io_opts*/ &io_opts[i], - CAMDD_ARG_ERR_RECOVER, + arglist, /*probe_retry_count*/ 3, /*probe_timeout*/ 5000, /*io_retry_count*/ retry_count, @@ -3578,7 +3565,6 @@ main(int argc, char **argv) if (retry_count < 0) errx(1, "retry count %d is < 0", retry_count); - arglist |= CAMDD_ARG_RETRIES; break; case 'E': arglist |= CAMDD_ARG_ERR_RECOVER; @@ -3611,7 +3597,6 @@ main(int argc, char **argv) errx(1, "invalid timeout %d", timeout); /* Convert the timeout from seconds to ms */ timeout *= 1000; - arglist |= CAMDD_ARG_TIMEOUT; break; case 'v': arglist |= CAMDD_ARG_VERBOSE; @@ -3634,7 +3619,7 @@ main(int argc, char **argv) if (timeout == 0) timeout = CAMDD_PASS_RW_TIMEOUT; - error = camdd_rw(opt_list, 2, max_io, retry_count, timeout); + error = camdd_rw(opt_list, arglist, 2, max_io, retry_count, timeout); bailout: free(opt_list); From nobody Wed Jun 28 18:15: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 4QrqWG2GSqz4kXw6; Wed, 28 Jun 2023 18:15: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 4QrqWG1jXwz48ts; Wed, 28 Jun 2023 18:15:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687976122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OL267aC1C5s18Yaf8kKUpAvIWdE+lsiLf7HvywgMXEc=; b=W9OTQaYS8sFgPnxK5SmUHhj3u6NDZoJxlp9JSrCRpO34LKb5seDmbXRm6D9CRLLTkK5zaA BNn2yDhWYHaYaPyYC5XM445Z2T9hVW69eFKSxxoE6290SnWSkuFu6hK8S6GQO3cGMmgdtO /r7a9mBKnV9Bcghn766H+P/jYFtRgsa6DELpXPn4vlAVzdb0fnb5jRh72KE/rzQ3xh8m1q S95EoyRcE0zYA8nSjLS7BctPNGbiBHI0lZKMpnwUX/KTORwoZke1ky/MiiwaO2cBERW1pa b/ele0umQuMnmImdCzliZ0wOMcsLWCE0PFI2ax0IHSmsT7tfLEdupVGmZW0zeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687976122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OL267aC1C5s18Yaf8kKUpAvIWdE+lsiLf7HvywgMXEc=; b=etmwUV75tBOi8V7IJWj+d4LbQrlPKTadbdfnNdVIMOEyeVHsmCj+fGef13joMgqP9gihk+ WV3QfE22mGptmebjo6S7/24l3JoUDb4+YE5iiqReIAdqrWc+EO9oDMHNyNTtniacaJMyIL ZRhC52QvMA19HWAK54e4LuDOJ6AOVwgOuZfjtD650y8Llf5gmyXiXTsBU2YumHNB1qPeIv SCgkWvjCHjmL0nze04TmcQsnmSMdfjhlXUp3muM9NDh0gSezBQWjtwEdbJ+5V4L+Vi5rre iy19Fhe8/AmokA9hwNG6Ca3r3CzIZs2aN3cCX7cpcuy5SfFYpGaFw6RDNJTT9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687976122; a=rsa-sha256; cv=none; b=BI4cMrJKvAUEoQ8APsKj0TW9czWI+LKq6CVZiKMCgSSd4eOkDi5KthlD5xXGyhmVewyo/M qo20+oDUbThtqxzDtMt10w73QooTnYe6l3OKH15ZI4MLs7ENSdqtah+B6EEMehC4voKRuV 6ffwUVdqB4ytaAOZDjQSNPHO4zUA7bPtx9HwJo7wYyQkU2qhIGlGst4bNHUYx8LWZj8/x5 7RAa2uuJUOf7dUp4do3knV9+GwOeogYjPrrhvtN0kxNPwfXx+3BDDk6uQIiJYcBdVYqksj Yvc77eDwPFB6Ar7pmXQ5gKRtm7NEFyp0QuFcvjdRxRGzKOf6BlVRNHfxc3ifDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrqWG0n19zkR3; Wed, 28 Jun 2023 18:15:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SIFM8T009238; Wed, 28 Jun 2023 18:15:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SIFMLk009237; Wed, 28 Jun 2023 18:15:22 GMT (envelope-from git) Date: Wed, 28 Jun 2023 18:15:22 GMT Message-Id: <202306281815.35SIFMLk009237@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: 2846052cd44e - stable/12 - Apply llvm fix for hanging gcc builds on 32-bit arm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: 2846052cd44ec28a99af774127f578d626d6f368 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2846052cd44ec28a99af774127f578d626d6f368 commit 2846052cd44ec28a99af774127f578d626d6f368 Author: Dimitry Andric AuthorDate: 2023-06-19 18:32:40 +0000 Commit: Dimitry Andric CommitDate: 2023-06-28 18:00:06 +0000 Apply llvm fix for hanging gcc builds on 32-bit arm Merge commit 962c306a11d0 from llvm-project (by Florian Hahn): [LV] Don't consider pointer as uniform if it is also stored. Update isVectorizedMemAccessUse to also check if the pointer is stored. This prevents LV to incorrectly consider a pointer as uniform if it is used as both pointer and stored by the same StoreInst. Fixes #61396. PR: 271992 Reported by: John F. Carr MFC after: 3 days (cherry picked from commit dbbaf77801a8f30e49731395e85757f339f345bf) --- .../llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 671bc6b5212b..d131f48a7af3 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -5415,11 +5415,17 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) { WideningDecision == CM_Interleave); }; - // Returns true if Ptr is the pointer operand of a memory access instruction - // I, and I is known to not require scalarization. + // I, I is known to not require scalarization, and the pointer is not also + // stored. auto isVectorizedMemAccessUse = [&](Instruction *I, Value *Ptr) -> bool { - return getLoadStorePointerOperand(I) == Ptr && isUniformDecision(I, VF); + auto GetStoredValue = [I]() -> Value * { + if (!isa(I)) + return nullptr; + return I->getOperand(0); + }; + return getLoadStorePointerOperand(I) == Ptr && isUniformDecision(I, VF) && + GetStoredValue() != Ptr; }; // Holds a list of values which are known to have at least one uniform use. @@ -5458,8 +5464,8 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) { if (isa(I) && Legal->isUniformMemOp(I)) addToWorklistIfAllowed(&I); - if (isUniformDecision(&I, VF)) { - assert(isVectorizedMemAccessUse(&I, Ptr) && "consistency check"); + if (isVectorizedMemAccessUse(&I, Ptr)) { + assert(isUniformDecision(&I, VF) && "consistency check"); HasUniformUse.insert(Ptr); } } From nobody Wed Jun 28 18:52: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 4QrrLR3mJ7z4kmtX; Wed, 28 Jun 2023 18:52: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 4QrrLR3Kbsz4KJM; Wed, 28 Jun 2023 18:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687978367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqW/Xc3LCbTPNjEqIcczPy5LRQEj+lfYdUlWWV9M/9k=; b=Ry5HeiNL/moNqHbKHY3npV8DHHMlTvgQoWf4LebsX340vR4A4ynIEluAFyRsRzOZGnTrPf 2vVX+/41Dww8ZKvpx/u2CjSGqrKRIwtYglWLpHhXFkdrcZ9AzAv6/KxMVIv7m8rtc/tvmp JUCWT2r6/+TMhR3X73usPw19u8jY7wkblnYYBeYVNBW1CacamP1EgVE3xP3iUHl/XHGbek jnbLwcHnHT2D2DDuquVb/1pTakqW2eWU6nvkzc0qxBvXEQ9m29k1DNQsh4fqvlL9AcFRAz e0OpxiM49YyV97WiGNHAYgLi9lUQueBeTLqwFypgkDuq04NuQ4SJ58gL4WsjsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687978367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqW/Xc3LCbTPNjEqIcczPy5LRQEj+lfYdUlWWV9M/9k=; b=HbDzAEvyudMkWg1J+ZWzLln4mF3NR8LdPKXDn4stO+ZbnmbF2GT4lWB3cO2gHKAzs7w9XC RYqZW977ZGjHMblPti2rkXGR0oXgiAOSPUVvzXI6AWdgAVJVzy1OTpl91BU2RXh8gI5l+Q v3SgVW0TgrlRTU7GOeuLngYM4DYdAf2dVmS4Yv2fxrJ/RnGBhulIAwWN/X8mit4oJvc7Un I5pmkh0yK37B2qWgfbLCFEPbhCx1hSSyYtJBKlyLB0kaESWYOVFgntlKuerWUVxaONXAZW N802qgkz0SwSpczweVvKXlpF9zvgDJpBuWtjkI95LvknBD1IMr1eTKPFKBu/dA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687978367; a=rsa-sha256; cv=none; b=pqLgmvJv+k/+1dQrmEjctiskQU+kVfabQ2bXjlk6Djo9Chut8m26y+gTn2blELpnv+XR/E QSNrOotdm/Hrts2MpzaoN66he//q9M22e1f67RD7nFLbpb0UKIKA1uxITp7KFmdu/e7g/9 Seleo6W5T7EJZQ4HqWhPQZCtDmI9w39/ZHX/3iSS5zLiAEmbXiy/tLjM/CBRqv99x+HDux YmGwTpndtsiX/mp4HI5YjHzaKLoGzR9mz89ij+884jxmF35XXwIm9H34aOL/y15LlQn/gq rYy2XvPWHREki4eKiNbdwgpN0dl9022V16Nxs+OEAbIIKC1vZQNbmGPkv7xTjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrrLR2Q8KzlSx; Wed, 28 Jun 2023 18:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SIqlAv074914; Wed, 28 Jun 2023 18:52:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SIqlsd074913; Wed, 28 Jun 2023 18:52:47 GMT (envelope-from git) Date: Wed, 28 Jun 2023 18:52:47 GMT Message-Id: <202306281852.35SIqlsd074913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 39240ddf854f - main - bsd.sys.mk: Stop muting -Wunused-but-set-variable for GCC. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39240ddf854f569bb75f1e1a9c7283ac0c2aee38 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=39240ddf854f569bb75f1e1a9c7283ac0c2aee38 commit 39240ddf854f569bb75f1e1a9c7283ac0c2aee38 Author: John Baldwin AuthorDate: 2023-06-28 18:13:58 +0000 Commit: John Baldwin CommitDate: 2023-06-28 18:13:58 +0000 bsd.sys.mk: Stop muting -Wunused-but-set-variable for GCC. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40662 --- share/mk/bsd.sys.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index f3eb1fe99b2f..eb6a74a3e98d 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -182,7 +182,6 @@ CWARNFLAGS+= -Wno-error=address \ -Wno-error=logical-not-parentheses \ -Wno-error=strict-aliasing \ -Wno-error=uninitialized \ - -Wno-error=unused-but-set-variable \ -Wno-error=unused-function \ -Wno-error=unused-value .endif From nobody Wed Jun 28 19:03: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 4Qrrb01348z4kqVp; Wed, 28 Jun 2023 19: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 4Qrrb00XRmz4Llw; Wed, 28 Jun 2023 19: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=1687979020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qy1h3nYvXZ6hqn1pSmEPCo4WCTjBQRkW1icd9HgxsmM=; b=WEfYtmJjl/I/IH75IiRZltwalzpQW1sMXqFcN3pwqoHo444WPGdTn2sNo8gAPpuioKcOkZ cwnlnZgr0BtYJkO23NgwUTBhGLkqP7hCoJ6uEDZ5TTmZhnHsjGHc6npdnHRU5jrssAT9XJ rC5YZRLLjTrRsGiI11MI+C5AeHGLu5K/PilEgp1a+k8SLuOzICfCbpeGG0yMMa16RE5MpT E43b5k8EILARh2+5UF73Q17GuJS09Oe/w37PpuwjN/AC9xNss0oiZ1VVapoy7D25wbCMhB 7Whop5Bm49ar2Jr/nyoP7vlJ1Sp4I8L5/TYv+k/IYglh3QYE5cRTg5pMdoFtXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687979020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qy1h3nYvXZ6hqn1pSmEPCo4WCTjBQRkW1icd9HgxsmM=; b=x1NmJnD3d8jOfIXGtQmEuPlP6DWHAczDZXd/vWEWizi16FSqcQgIoQrszAx7kOTnNJJ70T /i+FRQiKD0tqHJfi0W0E33hw/6zf68GsT4nlx9JUryhFPgnzecIHtWWfbEIDF5laO7eGVL Ye/c2zLMKcmuDOedyyQjb8RDlrSy7cDm+9KgQteN36m+YIbVcISlwmatNqJV52EgS6pqF3 4PJ48112+1dhJU+XZtRg9/1xJYgDhhD4OBEtsSNqQIWKCxNtj3UKsfyOMie7ReXFN3m7UU owh02Ap1RyeTH0bdKaAo1mpsbII0XCRCKNUczBXEWijTSK5umesyfnqPpA8n1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687979020; a=rsa-sha256; cv=none; b=FRTGFMhkfDZ4EOwACAY2jPC55vMdNTIYYOtonXDhwV09/G7we5goLp5ALd88HxQ4gU57i2 TqqacuKWtklZxU7Y6e+yITZrUC4qEh08BxCeuN1JpB8y+qIrLZxgilAkAqT+6EUWed+c8C WRT7FxJ4RzxgTlfHiRqD/JrtTVgXJJFTyLvo3DQsnWPJp3r6BVmbvpf7CQlHl5Vpg12v7e xlvv+BBZ4v/GF/u5SinaIvQFrRSa+tHvwatcJwmQrOYecsO1LCRg9mjxlwlG3I0YM3+zEK djS7lHzCDi2nZJb3nBvXB1MxRJAQ37lLP2ljN57ZHMsWsQgIrg5lua/7ZWurOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrrZz6jcmzlBf; Wed, 28 Jun 2023 19:03:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SJ3dUp092969; Wed, 28 Jun 2023 19:03:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SJ3dBa092968; Wed, 28 Jun 2023 19:03:39 GMT (envelope-from git) Date: Wed, 28 Jun 2023 19:03:39 GMT Message-Id: <202306281903.35SJ3dBa092968@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: ab2f6ae8d174 - main - login.conf: document how to specify env var values with commas List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ab2f6ae8d1742f57552c37425e9cab8499d2d4ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ab2f6ae8d1742f57552c37425e9cab8499d2d4ea commit ab2f6ae8d1742f57552c37425e9cab8499d2d4ea Author: Ed Maste AuthorDate: 2023-06-28 18:50:49 +0000 Commit: Ed Maste CommitDate: 2023-06-28 19:02:14 +0000 login.conf: document how to specify env var values with commas As of f32db406504e quotes may be used to specify login class capabilities that include commas. This is true in general but is particularly relevant for setenv, a comma-separated list of environment variables and values, so mention it there. PR: 236204 Sponsored by: The FreeBSD Foundation --- lib/libutil/login.conf.5 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5 index 7276863f53a9..cf8787495a18 100644 --- a/lib/libutil/login.conf.5 +++ b/lib/libutil/login.conf.5 @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 6, 2021 +.Dd June 28, 2023 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -247,6 +247,7 @@ the login session will be terminated. .It "requirehome bool false Require a valid home directory to login." .It "setenv list A comma-separated list of environment variables and" values to which they are to be set. +Values containing commas must be quoted. .It "shell prog Session shell to execute rather than the" shell specified in the passwd file. The SHELL environment variable will From nobody Wed Jun 28 19:27: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 4Qrs6z6dqpz4kwf6; Wed, 28 Jun 2023 19:27: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 4Qrs6z5rYFz4PrP; Wed, 28 Jun 2023 19:27:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687980475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzFeByCgnVHL0PErkWU3Jhjl0H8QlJbg/it4RSUuKaQ=; b=V2rd7LDzhviufG0sc0mhZzEmBHWbYrY3i37p/oImET0FX43KOsX5P5fIItQ6UuXX77Mtg5 ydzRmxDy0XYYHeLNd+O35CDE2HCRx1owhB10w5hRkxBUxZBHjuE510sSd5BYuYRuEks+C3 PUfd4+i2lGNlG687pVhJwU8OaGlC9FjETwkmfbGjmDiVEXQDuuBhlI2blaXitE9mhPMSiR AR71kKQxfNE7+Het1CwSlUrEqstAYVrvW2lTpH9RyGaWFRZnFak8kjIsQU7ZKq5pQADK7N nLxbwmIo1NhAzFpmsgqMYLJ3moxzdTJNkXls4RxbSSabbr6y/m6mucvFNEjClA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687980475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzFeByCgnVHL0PErkWU3Jhjl0H8QlJbg/it4RSUuKaQ=; b=Chn0IVXaSi8KNlx7jGO7f2QEVvqmupNub8Y5MNemd5nLwAagWhoxRlpW+DRfNdxUCtrpzt +tvDCNXK86HlnWbb+v5beLmgl21kc9w1SgT+dMDRHBN6U01Y8D9HRXjy5hNhZ5JTAhynka lqgdHseYT0NTIhZSotBZ3nFOhSRNuh39h8dz7SV+1Iwvz/QlecUdjJ5jqQwgACU5y3macM fK1JJtmXbTnPBgo8nFXf+6x7gHsyYvDHS1UhBlfMh9K6spAyhwQ7k9zSZ8/n5OKp+77Eof GqmGknMUQ1mE600otUJ3Hwd9QnAE8QGlImceF6/iOwrvntTLlwS4A40ObpEmJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687980475; a=rsa-sha256; cv=none; b=mGWX8IcvrZhSpuyKmKOsSYNDLbnv+S2JhAz9S5l0GUsg1yYnRkmTaOc4Vw5eTpY6SIPzYm f5+CXJKmsRDhlnHCf5MEwYu3mWwqk2G1aCOwZWmC+svGax/hG27VPVERIigkks0KbVSts9 gDO9nUsXbOVvjd4ja9TtGH3dc0RxU+dlC94T/IKxSOahZDb4LU24DSSYUewZ6UV6qXDVYF VUrvTwUasUimPEpkHrHtrLph/07Cqr2LUfI4hqpWBt5I5iiZINfdJu2SjDhQ7Buf8zzbTK 5EgL5GMoZYP8ulUTfskXtVaIyEYoma0NZ+8tqx0OFIH1Trw6Y3oxfEdUQstTsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrs6z4mDhzm1v; Wed, 28 Jun 2023 19:27:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SJRt6J025570; Wed, 28 Jun 2023 19:27:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SJRtIB025569; Wed, 28 Jun 2023 19:27:55 GMT (envelope-from git) Date: Wed, 28 Jun 2023 19:27:55 GMT Message-Id: <202306281927.35SJRtIB025569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d036adc4e913 - main - bsd.sys.mk: Re-enable -Wunused-but-set-variable for clang 13+. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d036adc4e913701fea4d0df454bf535de27ed1de Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d036adc4e913701fea4d0df454bf535de27ed1de commit d036adc4e913701fea4d0df454bf535de27ed1de Author: John Baldwin AuthorDate: 2023-06-28 19:27:43 +0000 Commit: John Baldwin CommitDate: 2023-06-28 19:27:43 +0000 bsd.sys.mk: Re-enable -Wunused-but-set-variable for clang 13+. Reviewed by: dim, emaste Differential Revision: https://reviews.freebsd.org/D40674 --- share/mk/bsd.sys.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index eb6a74a3e98d..b005a8332798 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -86,9 +86,6 @@ CWARNFLAGS+= -Wdate-time .if ${WARNS} <= 6 CWARNFLAGS.clang+= -Wno-empty-body -Wno-string-plus-int CWARNFLAGS.clang+= -Wno-unused-const-variable -.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 -CWARNFLAGS.clang+= -Wno-error=unused-but-set-variable -.endif .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000 CWARNFLAGS.clang+= -Wno-error=unused-but-set-parameter .endif From nobody Wed Jun 28 20:47: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 4Qrttr1d8nz4kbWy; Wed, 28 Jun 2023 20:47: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 4Qrttr0mk4z3nvy; Wed, 28 Jun 2023 20:47:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pGihifo8G3tczpHhu1agT71+wxqbIiskyY9P0Fy2Rz8=; b=gkiprTwyqMIloXBj9AB9E0lfUtSJ9pq+cF9HY8oUPWMDRYDH3xkfc3SPFL3viWUK1U9O8D HVXrUMia2GzGhqY8yYGmL4WCMFk1frZiB+RMDFvCGyYn8FzuNFx/hss3L1aV92qET9IQyr RPgKcAYHyPTiUWFY6h6Yq1bEvMlZ0HqsF0GtQyFEB8QjPNKbF7H0R1a9eUYN+LHL8Ukmth B175jxPUYGBzSqzzq0BAJAxYzJSLLphJRPZ6xaIDutkk5B9e1kz3lUCVXfMO7npnriiT97 TLOw6KmyBHGdnAWigj3IIgguaJZlbUtWEOQGuG+NnX7OjaXp8xnC46z1vYnhjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pGihifo8G3tczpHhu1agT71+wxqbIiskyY9P0Fy2Rz8=; b=IAUu2BixxrD6Lsg7OLruT+yDAIb0DCXukqlQetNL+aEGmJ4v4I0NcjdkG7q/2PNffU3JfF /Q9wJz4sc5kIcOjkKqK9KX2F5mRC2VrO7thRspUQQGKPbTDVYxzDLFYv65vM1KcPxasVLF 54BpFjIl34algHU39tq6hLh+lKjMZeGcx5FTUuu2pLouPYJihvzxkLKIyuKtkXKaVVBRP+ sWojXXi5ZuU9cDM2O9J47z5PEGMVFbrsI7cCY57XP4gGjQa2L5DWa1paETw7pFsKXiTuIw h6YMe3QLKNRxfEk3CpRmnWCnY6QexoULHw91smJZidRrrTpONaAgRhmMxkMIcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687985252; a=rsa-sha256; cv=none; b=j2qDagr3GILhmyt19J+PMY5CLg8+4JacCcOcGs2cPyRElnrue+Y+ePPXQGvNdz8nUCs9MZ n3oyOkS0pPlZxxeDKGW5ZwSyjuXjU9g0mKFKLmfeocLatIoWp/UREcVAYmNRIy1zTN/1V9 lLZYsIA8abCvbPcHL5xdfi718mvRdncz4lE8gTJbNkjDEx3xdY/T2zR6MXDVwv9xf+JXsl CsG4yRyfiSrQDAQoHFq1zUkhlG4Y8iBkOsaatBvn1RkK0wW3CsbgpevucCHCxzHn//XiHL KwTbLSjxaxBheDMGYQeK603vpILUMj/hDk6sbNqb72d6SvRE3eT1EMoeie09Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrttq6x0lznVv; Wed, 28 Jun 2023 20:47:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SKlVcA058471; Wed, 28 Jun 2023 20:47:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SKlV2G058470; Wed, 28 Jun 2023 20:47:31 GMT (envelope-from git) Date: Wed, 28 Jun 2023 20:47:31 GMT Message-Id: <202306282047.35SKlV2G058470@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: 13013d266e77 - main - bhyve: Stop calling pci_lintr_request() in the NVMe device model List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 13013d266e7781022fde04509670d0ce5f2ac25f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=13013d266e7781022fde04509670d0ce5f2ac25f commit 13013d266e7781022fde04509670d0ce5f2ac25f Author: Mark Johnston AuthorDate: 2023-06-28 20:06:21 +0000 Commit: Mark Johnston CommitDate: 2023-06-28 20:29:49 +0000 bhyve: Stop calling pci_lintr_request() in the NVMe device model The device model effectively assumes that MSI-X is enabled (it never asserts the legacy interrupt), so any guest which relies on being able to use the legacy PCI interrupt will fail. The WIP arm64 port does not implement legacy PCI interrupts, but NVMe emulation is potentially useful there. Simply remove the call. Reviewed by: corvink, chuck, jhb Tested by: chuck MFC after: 1 month Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40731 --- usr.sbin/bhyve/pci_nvme.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index a18413a50367..67153b4cd00f 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -3312,8 +3312,6 @@ pci_nvme_init(struct pci_devinst *pi, nvlist_t *nvl) pci_nvme_reset(sc); - pci_lintr_request(pi); - done: return (error); } From nobody Wed Jun 28 20:47: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 4Qrtts2VwXz4kbLs; Wed, 28 Jun 2023 20:47: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 4Qrtts1MF2z3nnb; Wed, 28 Jun 2023 20:47:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zA+EcrxidZYwbiOATZ1q1ZFdzuL7nLrRw/HVxG5Xvko=; b=yfGUZM4Y9Nrk09CD1I3Vjaap46QosnN0b0i7ucTRK53OhKl95VTU5kEQuulEvByUBkyXKQ qX8qiicahcaUpbWYDg4CnDdN2bY80IyINXy3um1EuSGcIP+NE7fackbehW5Ujdmp6h/DEt VobRSIgT3kUaRV8JbrclZTflNEGnmBFezzKAx0TkNgD7t5p4KdvbaOAnyT7NSwVoz4jAiB F1sDY3QUhDqRWp7YUqO+ck0sk9cE+0ykHrLGjKAn2pYZz+bIlJajIyv+OD7gp5xObN02if pOSM6VprTI5ih+N65H/6FIkTTY4/JYsSQJQPLBYGrYiCVinLuxui5nH8aKlbfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zA+EcrxidZYwbiOATZ1q1ZFdzuL7nLrRw/HVxG5Xvko=; b=mXNm/OgZLS/f5RAZphfDAkj4GX+srgN/DBoPIXL/OyUHhCqdodiHUnPo2/rejdd4wz7EC0 +3MbGoliiLydbQnt8KqrB5f//g5cfvrYKzLzJhWdkTx/eWhPQsR12UH09Pj6Kp4KjdQDN8 bW2r033NAfPNYLE1Bu0xIFR2ppDKIE50DKfvk/F7jasJMLgOge2si9YqfjtswbRJ1rleNu kHPQXy2JyKSli4p3Hpg4GsyxKT8m0sshVa/WuN6ZxVm5qjIBHFKXkjkg/gwvUC+8NSQmdQ OWvgaiiq6+ipEKHhOHb+G7OzID2vWIgIpsrX4pJUFlsOP6Kw7pbB5tBvzI7e5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687985253; a=rsa-sha256; cv=none; b=Aa4ESFKTDz6JRmNB9W8bKhEhaqOyVN7RiScalYL22H7M+bf6db1E4kblhfjzi3hQ04z4K0 sVRV1KSg6T37Y+E4qgYVeoMwiQy6KDmdeP5S/iyQjhXEuwgdrBDThTNIIlRav0FgZgbBf7 8HXOmEZSli/CJf9QqC5yL7Q5yYxqJvIxPZ1T9knmWEaOim1wHLIu0o41nGHtutGeuboO3Q 3uhNi9kXTIC6BJfqnNipFcJDPTdK1/BbblhdHirXukr9T3qvXFfY4u0goViuFtQnmq8ZbN xITUx04KFfeXdCSFH5/6wwEezliDoaDjrjpi02NUg3L8YAc/FFRxTZwEKE/qMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrtts0RmszpJk; Wed, 28 Jun 2023 20:47:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SKlXsp058490; Wed, 28 Jun 2023 20:47:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SKlXms058489; Wed, 28 Jun 2023 20:47:33 GMT (envelope-from git) Date: Wed, 28 Jun 2023 20:47:33 GMT Message-Id: <202306282047.35SKlXms058489@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: f4841d8af0cd - main - bhyve: Rename a pci_cfgrw() parameter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f4841d8af0cd42c16fa66529bfde7b3a8b4f16d6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f4841d8af0cd42c16fa66529bfde7b3a8b4f16d6 commit f4841d8af0cd42c16fa66529bfde7b3a8b4f16d6 Author: Mark Johnston AuthorDate: 2023-06-28 20:06:37 +0000 Commit: Mark Johnston CommitDate: 2023-06-28 20:29:49 +0000 bhyve: Rename a pci_cfgrw() parameter pci_cfgrw() may be called via a write to the extended config space, which is memory-mapped. In this case, the name "eax" is misleading. Give it a more generic name. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40732 --- usr.sbin/bhyve/pci_emul.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index ad6180c79470..f921abc356ec 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -2175,7 +2175,7 @@ pci_emul_cmdsts_write(struct pci_devinst *pi, int coff, uint32_t new, int bytes) static void pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, - uint32_t *eax) + uint32_t *valp) { struct businfo *bi; struct slotinfo *si; @@ -2197,7 +2197,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, if (pi == NULL || (bytes != 1 && bytes != 2 && bytes != 4) || (coff & (bytes - 1)) != 0) { if (in) - *eax = 0xffffffff; + *valp = 0xffffffff; return; } @@ -2207,7 +2207,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, */ if (coff >= PCI_REGMAX + 1) { if (in) { - *eax = 0xffffffff; + *valp = 0xffffffff; /* * Extended capabilities begin at offset 256 in config * space. Absence of extended capabilities is signaled @@ -2215,7 +2215,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, * offset 256. */ if (coff <= PCI_REGMAX + 4) - *eax = 0x00000000; + *valp = 0x00000000; } return; } @@ -2228,19 +2228,19 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, if (in) { /* Let the device emulation override the default handler */ if (pe->pe_cfgread != NULL) { - needcfg = pe->pe_cfgread(pi, coff, bytes, eax); + needcfg = pe->pe_cfgread(pi, coff, bytes, valp); } else { needcfg = 1; } if (needcfg) - *eax = CFGREAD(pi, coff, bytes); + *valp = CFGREAD(pi, coff, bytes); - pci_emul_hdrtype_fixup(bus, slot, coff, bytes, eax); + pci_emul_hdrtype_fixup(bus, slot, coff, bytes, valp); } else { /* Let the device emulation override the default handler */ if (pe->pe_cfgwrite != NULL && - (*pe->pe_cfgwrite)(pi, coff, bytes, *eax) == 0) + (*pe->pe_cfgwrite)(pi, coff, bytes, *valp) == 0) return; /* @@ -2269,7 +2269,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, pi->pi_bar[idx].addr = bar = 0; break; case PCIBAR_IO: - addr = *eax & mask; + addr = *valp & mask; addr &= 0xffff; bar = addr | pi->pi_bar[idx].lobits; /* @@ -2281,7 +2281,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, } break; case PCIBAR_MEM32: - addr = bar = *eax & mask; + addr = bar = *valp & mask; bar |= pi->pi_bar[idx].lobits; if (addr != pi->pi_bar[idx].addr) { update_bar_address(pi, addr, idx, @@ -2289,7 +2289,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, } break; case PCIBAR_MEM64: - addr = bar = *eax & mask; + addr = bar = *valp & mask; bar |= pi->pi_bar[idx].lobits; if (addr != (uint32_t)pi->pi_bar[idx].addr) { update_bar_address(pi, addr, idx, @@ -2298,7 +2298,7 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, break; case PCIBAR_MEMHI64: mask = ~(pi->pi_bar[idx - 1].size - 1); - addr = ((uint64_t)*eax << 32) & mask; + addr = ((uint64_t)*valp << 32) & mask; bar = addr >> 32; if (bar != pi->pi_bar[idx - 1].addr >> 32) { update_bar_address(pi, addr, idx - 1, @@ -2306,12 +2306,12 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, } break; case PCIBAR_ROM: - addr = bar = *eax & mask; + addr = bar = *valp & mask; if (memen(pi) && romen(pi)) { unregister_bar(pi, idx); } pi->pi_bar[idx].addr = addr; - pi->pi_bar[idx].lobits = *eax & + pi->pi_bar[idx].lobits = *valp & PCIM_BIOS_ENABLE; /* romen could have changed it value */ if (memen(pi) && romen(pi)) { @@ -2325,11 +2325,11 @@ pci_cfgrw(int in, int bus, int slot, int func, int coff, int bytes, pci_set_cfgdata32(pi, coff, bar); } else if (pci_emul_iscap(pi, coff)) { - pci_emul_capwrite(pi, coff, bytes, *eax, 0, 0); + pci_emul_capwrite(pi, coff, bytes, *valp, 0, 0); } else if (coff >= PCIR_COMMAND && coff < PCIR_REVID) { - pci_emul_cmdsts_write(pi, coff, *eax, bytes); + pci_emul_cmdsts_write(pi, coff, *valp, bytes); } else { - CFGWRITE(pi, coff, *eax, bytes); + CFGWRITE(pi, coff, *valp, bytes); } } } From nobody Wed Jun 28 20:47: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 4Qrttt3Cjxz4kbVC; Wed, 28 Jun 2023 20:47: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 4Qrttt2mK8z3p2W; Wed, 28 Jun 2023 20:47:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAxuw8iGy85+BIIUkmaMmJIUxzDFfc4eCcCbRT6xhmM=; b=nLtwsPAdWOISj1CNOyAiPOJdUsriIiacjgU63DPKjXH3px2E6SGa0X7pZ3T7/Jjb3ZLbAS dZETjNRGCsMXIUaYGiYqpldgZCbdc6JcTzSae6jRbbcfJ1FqRg+vaJdko7REhhkpfa+VGQ dW3/rFvfPUn/uSdzLk2LrBdiJCwh7pFVchlREwDIuD5n7/W9JRo3VZpg+KRy2/315NiuCc 6L/5hOWM7UtNJjf3oCG4SbxzCPa8NKAZYoSiVZ0bunNc6qkqpZEN2xPmIKpSjb9zQLKkQj CEYqRhEJyqj4r7cKfvFC2ZjHfcv7EB/dG6p/rv4Uvnm98OeOvcMgFpe50VxZLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAxuw8iGy85+BIIUkmaMmJIUxzDFfc4eCcCbRT6xhmM=; b=vKCKjCXlxiDai0u+jfNQFKtMHh+Vn3vIiYEL0i2bldnt3YZ46d09opJb9GXrY5vPcYFiAi HC+chiOW0qQi01UHTS8L/pS2sn1HWpT86dF9howoDgBV5MD32OUXIg+BrV0thE/0q99ES8 ZfDPsoHLppzFJdCifFCyB82qtOUOWmzYM2yQhTHwqYvaKiMWCmmTmc+4PElWISFL5BssQs 3apXx8t1X/G5Or4G0O/ckKA4A+cRC6xL7P6D5JFS8B682yKWue1QPgmujovc7FLY+hHIwz Cv5HSkmypuqDXHyl1dSKumHg2JK7zadFyuRwY0rQVSP8qrR2KFWv3rTdg0iaiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687985254; a=rsa-sha256; cv=none; b=sJrYR6qjeeoPNjoGd8241LR/HN1x+EdvJgONpcZrYeTyvuvXg01r8moNkPCjOg5CF+KyXt Z5+zfoTE/5FP3Z23NuPBzQzdINLt3toLvowM1/5gB355eglj2RmS6X8dTfhyns50yXEeV+ uTZpeTDW8h1fdQCGT/sFVF+XaCxqBd3OAPc/jtian+ngZhgsPG1ASkdIN8JAFrRzHDYiLO bbmaff3Q1K3T26PSo0DJurwlNpb00cPblnitON7rX6uufI7piQOYfFbEen60lZT9QcWVG/ bLdbgwyUMfpdxSnzxosol9d/at04+TdMc0cJ2DcEkt2z8KdEsp/pYoTpieTKZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrttt1fMszp5C; Wed, 28 Jun 2023 20:47:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SKlYDY058515; Wed, 28 Jun 2023 20:47:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SKlYpV058514; Wed, 28 Jun 2023 20:47:34 GMT (envelope-from git) Date: Wed, 28 Jun 2023 20:47:34 GMT Message-Id: <202306282047.35SKlYpV058514@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: 258a0d760aa8 - main - ctfconvert: Integer encoding types are unsigned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 258a0d760aa8b42899a000e30f610f900a402556 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=258a0d760aa8b42899a000e30f610f900a402556 commit 258a0d760aa8b42899a000e30f610f900a402556 Author: Mark Johnston AuthorDate: 2023-06-06 17:28:02 +0000 Commit: Mark Johnston CommitDate: 2023-06-28 20:29:49 +0000 ctfconvert: Integer encoding types are unsigned Before this change, encodings in the user-defined range were being sign-extended. MFC after: 1 week Sponsored by: Innovate UK --- cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c index 67866555ae5d..ec5a3c58856d 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c @@ -1367,7 +1367,7 @@ static const fp_size_map_t fp_encodings[] = { }; static uint_t -die_base_type2enc(dwarf_t *dw, Dwarf_Off off, Dwarf_Signed enc, size_t sz) +die_base_type2enc(dwarf_t *dw, Dwarf_Off off, Dwarf_Unsigned enc, size_t sz) { const fp_size_map_t *map = fp_encodings; uint_t szidx = dw->dw_ptrsz == sizeof (uint64_t); @@ -1398,9 +1398,9 @@ static intr_t * die_base_from_dwarf(dwarf_t *dw, Dwarf_Die base, Dwarf_Off off, size_t sz) { intr_t *intr = xcalloc(sizeof (intr_t)); - Dwarf_Signed enc; + Dwarf_Unsigned enc; - (void) die_signed(dw, base, DW_AT_encoding, &enc, DW_ATTR_REQ); + (void) die_unsigned(dw, base, DW_AT_encoding, &enc, DW_ATTR_REQ); switch (enc) { case DW_ATE_unsigned: From nobody Wed Jun 28 20:47: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 4Qrttv4ZRxz4kbZq; Wed, 28 Jun 2023 20:47: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 4Qrttv3ZWpz3p35; Wed, 28 Jun 2023 20:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E90x7aqqvPWFURy5O9UggDcwkwcwLrrX3+aSp3gRy/U=; b=oOZaz0TIpys5Vbq3hFWui2Um5NroGy1XhEMODPBD/FaZ5wIPUTzBCLsKso+jYawzpELXNT Sz10OMzI9wZNgBsYa1NlAIoALQeuncLUGzEueSLmz9sL4qiDp2/aolKeZQ0UCfP31SgzcU Lvu/XyF6DgKEm9O8ZLXVmflnEGIcTJxEjSLdQV4tTaP49m65weZlHQqcFIwWYwz1iL8j9w +l/HdnHKqnE7ib6Td4oFytbjk11XsjXw8+V2Z3PHQKKVl0PMUudMHabV7dSL6Fd7YdK3qC xgS12xYmNrcZ4NenUh+KSvpfeqM02jq/833hDR6PreFwZsg9Q+yMJ2d/VKEfJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E90x7aqqvPWFURy5O9UggDcwkwcwLrrX3+aSp3gRy/U=; b=HvKIZujLgA+56NeGzsQGarLOExjIoKuMakN07JV8zKQVZU123oz8RQc9dwoDrKTv46nm8D Niumgozwd3/+MwavqlX259UJ3gxPry/AkPrHHRcR20wEMiAyYDLyu1luXWvpmO346pzfEw yocfTx2LE8SFWvWRKj4ft3lMxWNEa9hxk7c6dZ3Jc/TUpE1d2OV2TcjKVYstxtXeYNmpcP kdFvevrvej9u6xjdmUODdnx/gKF33mtQT8YlNxBtVu4zaIvSM89UKe0WVUFA8iyKoz26EF 5zgfClmZNbyJXV9kAkv833Dcg5JwHqc9OIbqIM/usM7m4FBpfLlpQaO5SAZOvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687985255; a=rsa-sha256; cv=none; b=X3BjemJ8a9hrkn2ym5zk5IrR0Nr8I1R9mX4NVnYXngfaM8REZDdWNg5wbvuDP/PlOuQrt2 ds7Y7Ji1g5z+xAFOl/GJyeijAw1WIvnWEERQZDHli1YptlsYEckJOU0gDoNwU5pq2QwZdE kB481e61M770E920pPfQow3PaQ8r7Ld/W56mPL2LDmRQylcY8CM7YGZzMVZOYD6lCXt0U1 L806lk92TTuaTn+RBoWOEJXAdR871fZwPMrmOxR9qWXwy1VvzrRkO+Bq1YjbDT2+J40/eH lLDCx1hAmRXnY0hFWYE+he0q+IOks9WfhW1/4D2rvo5Fy/pd4jIhWRuoeDtelA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrttv2Q5Fzp5D; Wed, 28 Jun 2023 20:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SKlZWV058536; Wed, 28 Jun 2023 20:47:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SKlZeT058535; Wed, 28 Jun 2023 20:47:35 GMT (envelope-from git) Date: Wed, 28 Jun 2023 20:47:35 GMT Message-Id: <202306282047.35SKlZeT058535@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: fbec1f91951f - main - arm64: Add a masked get_kernel_reg() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fbec1f91951fe01c1c590bab5e6c16a30884f352 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fbec1f91951fe01c1c590bab5e6c16a30884f352 commit fbec1f91951fe01c1c590bab5e6c16a30884f352 Author: Mark Johnston AuthorDate: 2023-06-28 20:12:47 +0000 Commit: Mark Johnston CommitDate: 2023-06-28 20:29:49 +0000 arm64: Add a masked get_kernel_reg() This lets consumers fetch the value of a system register and apply a mask over individual fields. That is, each field in the returned value will be the "smaller" of the two provided by "mask" and the value saved in kern_cpu_desc. This will be used by vmm to sanitize host system register fields. Reviewed by: andrew MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. (hardware) Differential Revision: https://reviews.freebsd.org/D40500 --- sys/arm64/arm64/identcpu.c | 90 +++++++++++++++++++++++++++++----------------- sys/arm64/include/cpu.h | 1 + 2 files changed, 59 insertions(+), 32 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index e96f0a089784..01e663ff47c2 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -1721,38 +1721,6 @@ user_mrs_handler(vm_offset_t va, uint32_t insn, struct trapframe *frame, return (1); } -bool -extract_user_id_field(u_int reg, u_int field_shift, uint8_t *val) -{ - uint64_t value; - int i; - - for (i = 0; i < nitems(user_regs); i++) { - if (user_regs[i].reg == reg) { - value = CPU_DESC_FIELD(user_cpu_desc, i); - *val = value >> field_shift; - return (true); - } - } - - return (false); -} - -bool -get_kernel_reg(u_int reg, uint64_t *val) -{ - int i; - - for (i = 0; i < nitems(user_regs); i++) { - if (user_regs[i].reg == reg) { - *val = CPU_DESC_FIELD(kern_cpu_desc, i); - return (true); - } - } - - return (false); -} - /* * Compares two field values that may be signed or unsigned. * Returns: @@ -1808,6 +1776,64 @@ update_lower_register(uint64_t val, uint64_t new_val, u_int shift, return (val); } +bool +extract_user_id_field(u_int reg, u_int field_shift, uint8_t *val) +{ + uint64_t value; + int i; + + for (i = 0; i < nitems(user_regs); i++) { + if (user_regs[i].reg == reg) { + value = CPU_DESC_FIELD(user_cpu_desc, i); + *val = value >> field_shift; + return (true); + } + } + + return (false); +} + +bool +get_kernel_reg(u_int reg, uint64_t *val) +{ + int i; + + for (i = 0; i < nitems(user_regs); i++) { + if (user_regs[i].reg == reg) { + *val = CPU_DESC_FIELD(kern_cpu_desc, i); + return (true); + } + } + + return (false); +} + +/* + * Fetch the specified register's value, ensuring that individual field values + * do not exceed those in the mask. + */ +bool +get_kernel_reg_masked(u_int reg, uint64_t *valp, uint64_t mask) +{ + struct mrs_field *fields; + uint64_t val; + + for (int i = 0; i < nitems(user_regs); i++) { + if (user_regs[i].reg == reg) { + val = CPU_DESC_FIELD(kern_cpu_desc, i); + *valp = 0; + fields = user_regs[i].fields; + for (int j = 0; fields[j].type != 0; j++) { + *valp |= update_lower_register(mask, val, + fields[j].shift, 4, fields[j].sign); + } + return (true); + } + } + + return (false); +} + void update_special_regs(u_int cpu) { diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 1ea497756698..0bb320f2e0a0 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -213,6 +213,7 @@ void ptrauth_mp_start(uint64_t); void update_special_regs(u_int); bool extract_user_id_field(u_int, u_int, uint8_t *); bool get_kernel_reg(u_int, uint64_t *); +bool get_kernel_reg_masked(u_int, uint64_t *, uint64_t); void cpu_desc_init(void); From nobody Wed Jun 28 20: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 4Qrttw4yVfz4kbPk; Wed, 28 Jun 2023 20:47: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 4Qrttw42rrz3pGD; Wed, 28 Jun 2023 20:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjvjCLQBu8QU4z+N88z4sS4jJqixaAfs4ezoCYCzzYk=; b=F0ab5cUA1QDrqGzSAJDrc9hjPYGxwgy5Moupr7P4jI56wnkzuwNRi1WglGO345t3B45LE5 B54VyAJm5d1Xe07qqIbT8XUJBqZ1kYl2vKwgFM+X8OzwwRA14uqgKgzQ2ZD0Ed4lzz2DMI M2GokwTiqGtICQlzzSRHrrpaZ9Rv6I5k8FNy0WnPKU6tWgoxyHeEZL5yw+zwqgiT8zuukh X3NFUnb3mB3F7oiHQmJUEXNIK81nFNjG2JIVL0HE+hKhVerepdKbITMlZkmCKcpQFV6yd3 rySwugK4XsgccFt2JCgiJlhrylz1iR5Iwlm+b4bnjNcW/bPxQ1W73PHhkCRRMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjvjCLQBu8QU4z+N88z4sS4jJqixaAfs4ezoCYCzzYk=; b=bTAVehwl9LH+jjQ/kHluyGzQ/lY+FzpYp5WnnThNfIiiN9qw3RTqhdVCiwVXAOgwCsIcxx pjGbDAH/nEi0HvvGcnyIKWwq8/3uqVq2/GCYn1/Lt1gJfSd+563NACbFWd3+96ERcFtJ8Q FZ7NYT2BkOsC2LWHOP4uyq69ek1FvFvcQnUdRCy2svMWj56QPgeiZPXXeuXGlo/0ye/rxj N7lek8YTnlo539Pm84Ou3Jn+6Io4NIFsjmrF65B5ld+gi829LCAyv96P6EQuCn6ajET2nr zFM4B5XwArwZ+ZBMBX0DapEe2sDd3DWGZOZYhJlBoFKfkpLwkr09bkAUqDILhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687985256; a=rsa-sha256; cv=none; b=N7fyI48V1Yx86Kyb05f5SltWl9QElqt/Jwqkjd3j5bn2X4zOFTal8S4JhACbQaTg3YCFoL +L/ZrjuLBBFkp0Rwnws5uay6JMhIGqZrwyAgv7HYfUcSJX0iZq8EDfRmfimmwbCsjnYD9I mZ1gx0l+pkLN7Q61s6Rl/n4X+DPwPGlwZKgyIhbQZ+tg/69VUebY990xZcJaO4hDlT6Q2I x/J8dptvDZCMkxJrLgSa3+Y/gNow91+L08r2NNT/i8RmHg1eQc1TeyA9Z0Pcxqw5z9tKyt OeHJHOwYyJVRpCIsqaki/yQRijyuGuVqW7WfXnYVqt3ufLwhCOKT2jMk9eclyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrttw3770zpJl; Wed, 28 Jun 2023 20:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SKlaqq058564; Wed, 28 Jun 2023 20:47:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SKlatQ058563; Wed, 28 Jun 2023 20:47:36 GMT (envelope-from git) Date: Wed, 28 Jun 2023 20:47:36 GMT Message-Id: <202306282047.35SKlatQ058563@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: 00bcb77ebcbc - main - arm64: Make register definitions const List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 00bcb77ebcbcb89bd27205b289699d711a0caf3d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=00bcb77ebcbcb89bd27205b289699d711a0caf3d commit 00bcb77ebcbcb89bd27205b289699d711a0caf3d Author: Mark Johnston AuthorDate: 2023-06-28 20:13:37 +0000 Commit: Mark Johnston CommitDate: 2023-06-28 20:29:49 +0000 arm64: Make register definitions const No functional change intended. Reviewed by: andrew MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. (hardware) Differential Revision: https://reviews.freebsd.org/D40502 --- sys/arm64/arm64/identcpu.c | 401 +++++++++++++++++++++++---------------------- 1 file changed, 201 insertions(+), 200 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 01e663ff47c2..20ef74f58de2 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -328,8 +328,8 @@ struct mrs_field_hwcap { struct mrs_field { const char *name; - struct mrs_field_value *values; - struct mrs_field_hwcap *hwcaps; + const struct mrs_field_value *values; + const struct mrs_field_hwcap *hwcaps; uint64_t mask; bool sign; u_int type; @@ -353,53 +353,53 @@ struct mrs_field { #define MRS_FIELD_END { .type = MRS_INVALID, } /* ID_AA64AFR0_EL1 */ -static struct mrs_field id_aa64afr0_fields[] = { +static const struct mrs_field id_aa64afr0_fields[] = { MRS_FIELD_END, }; /* ID_AA64AFR1_EL1 */ -static struct mrs_field id_aa64afr1_fields[] = { +static const struct mrs_field id_aa64afr1_fields[] = { MRS_FIELD_END, }; /* ID_AA64DFR0_EL1 */ -static struct mrs_field_value id_aa64dfr0_tracefilt[] = { +static const struct mrs_field_value id_aa64dfr0_tracefilt[] = { MRS_FIELD_VALUE(ID_AA64DFR0_TraceFilt_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_TraceFilt_8_4, "Trace v8.4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_doublelock[] = { +static const struct mrs_field_value id_aa64dfr0_doublelock[] = { MRS_FIELD_VALUE(ID_AA64DFR0_DoubleLock_IMPL, "DoubleLock"), MRS_FIELD_VALUE(ID_AA64DFR0_DoubleLock_NONE, ""), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_pmsver[] = { +static const struct mrs_field_value id_aa64dfr0_pmsver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE, "SPE"), MRS_FIELD_VALUE(ID_AA64DFR0_PMSVer_SPE_8_3, "SPE v8.3"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_ctx_cmps[] = { +static const struct mrs_field_value id_aa64dfr0_ctx_cmps[] = { MRS_FIELD_VALUE_COUNT(ID_AA64DFR0, CTX_CMPs, "CTX BKPT"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_wrps[] = { +static const struct mrs_field_value id_aa64dfr0_wrps[] = { MRS_FIELD_VALUE_COUNT(ID_AA64DFR0, WRPs, "Watchpoint"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_brps[] = { +static const struct mrs_field_value id_aa64dfr0_brps[] = { MRS_FIELD_VALUE_COUNT(ID_AA64DFR0, BRPs, "Breakpoint"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_pmuver[] = { +static const struct mrs_field_value id_aa64dfr0_pmuver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3, "PMUv3"), MRS_FIELD_VALUE(ID_AA64DFR0_PMUVer_3_1, "PMUv3 v8.1"), @@ -409,13 +409,13 @@ static struct mrs_field_value id_aa64dfr0_pmuver[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_tracever[] = { +static const struct mrs_field_value id_aa64dfr0_tracever[] = { MRS_FIELD_VALUE(ID_AA64DFR0_TraceVer_NONE, ""), MRS_FIELD_VALUE(ID_AA64DFR0_TraceVer_IMPL, "Trace"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64dfr0_debugver[] = { +static const struct mrs_field_value id_aa64dfr0_debugver[] = { MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8, "Debugv8"), MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_VHE, "Debugv8_VHE"), MRS_FIELD_VALUE(ID_AA64DFR0_DebugVer_8_2, "Debugv8.2"), @@ -423,7 +423,7 @@ static struct mrs_field_value id_aa64dfr0_debugver[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64dfr0_fields[] = { +static const struct mrs_field id_aa64dfr0_fields[] = { MRS_FIELD(ID_AA64DFR0, TraceFilt, false, MRS_EXACT, id_aa64dfr0_tracefilt), MRS_FIELD(ID_AA64DFR0, DoubleLock, false, MRS_EXACT, @@ -443,158 +443,158 @@ static struct mrs_field id_aa64dfr0_fields[] = { /* ID_AA64DFR1_EL1 */ -static struct mrs_field id_aa64dfr1_fields[] = { +static const struct mrs_field id_aa64dfr1_fields[] = { MRS_FIELD_END, }; /* ID_AA64ISAR0_EL1 */ -static struct mrs_field_value id_aa64isar0_rndr[] = { +static const struct mrs_field_value id_aa64isar0_rndr[] = { MRS_FIELD_VALUE(ID_AA64ISAR0_RNDR_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR0_RNDR_IMPL, "RNG"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_rndr_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_rndr_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_RNG, ID_AA64ISAR0_RNDR_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_tlb[] = { +static const struct mrs_field_value id_aa64isar0_tlb[] = { MRS_FIELD_VALUE(ID_AA64ISAR0_TLB_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR0_TLB_TLBIOS, "TLBI-OS"), MRS_FIELD_VALUE(ID_AA64ISAR0_TLB_TLBIOSR, "TLBI-OSR"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar0_ts[] = { +static const struct mrs_field_value id_aa64isar0_ts[] = { MRS_FIELD_VALUE(ID_AA64ISAR0_TS_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR0_TS_CondM_8_4, "CondM-8.4"), MRS_FIELD_VALUE(ID_AA64ISAR0_TS_CondM_8_5, "CondM-8.5"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_ts_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_ts_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_FLAGM, ID_AA64ISAR0_TS_CondM_8_4), MRS_HWCAP(&elf_hwcap2, HWCAP2_FLAGM2, ID_AA64ISAR0_TS_CondM_8_5), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_fhm[] = { +static const struct mrs_field_value id_aa64isar0_fhm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, FHM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_fhm_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_fhm_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDFHM, ID_AA64ISAR0_FHM_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_dp[] = { +static const struct mrs_field_value id_aa64isar0_dp[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, DP, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_dp_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_dp_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDDP, ID_AA64ISAR0_DP_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sm4[] = { +static const struct mrs_field_value id_aa64isar0_sm4[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SM4, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sm4_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sm4_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SM4, ID_AA64ISAR0_SM4_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sm3[] = { +static const struct mrs_field_value id_aa64isar0_sm3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SM3, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sm3_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sm3_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SM3, ID_AA64ISAR0_SM3_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sha3[] = { +static const struct mrs_field_value id_aa64isar0_sha3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA3, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sha3_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sha3_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SHA3, ID_AA64ISAR0_SHA3_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_rdm[] = { +static const struct mrs_field_value id_aa64isar0_rdm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, RDM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_rdm_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_rdm_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDRDM, ID_AA64ISAR0_RDM_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_atomic[] = { +static const struct mrs_field_value id_aa64isar0_atomic[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, Atomic, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_atomic_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_atomic_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ATOMICS, ID_AA64ISAR0_Atomic_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_crc32[] = { +static const struct mrs_field_value id_aa64isar0_crc32[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, CRC32, NONE, BASE), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_crc32_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_crc32_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_CRC32, ID_AA64ISAR0_CRC32_BASE), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sha2[] = { +static const struct mrs_field_value id_aa64isar0_sha2[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA2, NONE, BASE), MRS_FIELD_VALUE(ID_AA64ISAR0_SHA2_512, "SHA2+SHA512"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sha2_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sha2_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SHA2, ID_AA64ISAR0_SHA2_BASE), MRS_HWCAP(&elf_hwcap, HWCAP_SHA512, ID_AA64ISAR0_SHA2_512), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_sha1[] = { +static const struct mrs_field_value id_aa64isar0_sha1[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, SHA1, NONE, BASE), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_sha1_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_sha1_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SHA1, ID_AA64ISAR0_SHA1_BASE), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar0_aes[] = { +static const struct mrs_field_value id_aa64isar0_aes[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR0, AES, NONE, BASE), MRS_FIELD_VALUE(ID_AA64ISAR0_AES_PMULL, "AES+PMULL"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar0_aes_caps[] = { +static const struct mrs_field_hwcap id_aa64isar0_aes_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_AES, ID_AA64ISAR0_AES_BASE), MRS_HWCAP(&elf_hwcap, HWCAP_PMULL, ID_AA64ISAR0_AES_PMULL), MRS_HWCAP_END }; -static struct mrs_field id_aa64isar0_fields[] = { +static const struct mrs_field id_aa64isar0_fields[] = { MRS_FIELD_HWCAP(ID_AA64ISAR0, RNDR, false, MRS_LOWER, id_aa64isar0_rndr, id_aa64isar0_rndr_caps), MRS_FIELD(ID_AA64ISAR0, TLB, false, MRS_EXACT, id_aa64isar0_tlb), @@ -627,116 +627,116 @@ static struct mrs_field id_aa64isar0_fields[] = { /* ID_AA64ISAR1_EL1 */ -static struct mrs_field_value id_aa64isar1_i8mm[] = { +static const struct mrs_field_value id_aa64isar1_i8mm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, I8MM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_i8mm_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_i8mm_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_I8MM, ID_AA64ISAR1_I8MM_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_dgh[] = { +static const struct mrs_field_value id_aa64isar1_dgh[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, DGH, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_dgh_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_dgh_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_DGH, ID_AA64ISAR1_DGH_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_bf16[] = { +static const struct mrs_field_value id_aa64isar1_bf16[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, BF16, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_bf16_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_bf16_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_BF16, ID_AA64ISAR1_BF16_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_specres[] = { +static const struct mrs_field_value id_aa64isar1_specres[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_SPECRES_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_SPECRES_IMPL, "PredInv"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar1_sb[] = { +static const struct mrs_field_value id_aa64isar1_sb[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, SB, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_sb_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_sb_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SB, ID_AA64ISAR1_SB_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_frintts[] = { +static const struct mrs_field_value id_aa64isar1_frintts[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, FRINTTS, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_frintts_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_frintts_caps[] = { MRS_HWCAP(&elf_hwcap2, HWCAP2_FRINT, ID_AA64ISAR1_FRINTTS_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_gpi[] = { +static const struct mrs_field_value id_aa64isar1_gpi[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, GPI, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_gpi_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_gpi_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_PACG, ID_AA64ISAR1_GPI_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_gpa[] = { +static const struct mrs_field_value id_aa64isar1_gpa[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, GPA, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_gpa_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_gpa_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_PACG, ID_AA64ISAR1_GPA_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_lrcpc[] = { +static const struct mrs_field_value id_aa64isar1_lrcpc[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_LRCPC_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_LRCPC_RCPC_8_3, "RCPC-8.3"), MRS_FIELD_VALUE(ID_AA64ISAR1_LRCPC_RCPC_8_4, "RCPC-8.4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_lrcpc_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_lrcpc_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_LRCPC, ID_AA64ISAR1_LRCPC_RCPC_8_3), MRS_HWCAP(&elf_hwcap, HWCAP_ILRCPC, ID_AA64ISAR1_LRCPC_RCPC_8_4), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_fcma[] = { +static const struct mrs_field_value id_aa64isar1_fcma[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, FCMA, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_fcma_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_fcma_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_FCMA, ID_AA64ISAR1_FCMA_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_jscvt[] = { +static const struct mrs_field_value id_aa64isar1_jscvt[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR1, JSCVT, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_jscvt_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_jscvt_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_JSCVT, ID_AA64ISAR1_JSCVT_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_api[] = { +static const struct mrs_field_value id_aa64isar1_api[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_API_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_API_PAC, "API PAC"), MRS_FIELD_VALUE(ID_AA64ISAR1_API_EPAC, "API EPAC"), @@ -747,12 +747,12 @@ static struct mrs_field_value id_aa64isar1_api[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_api_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_api_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_PACA, ID_AA64ISAR1_API_PAC), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_apa[] = { +static const struct mrs_field_value id_aa64isar1_apa[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_APA_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_APA_PAC, "APA PAC"), MRS_FIELD_VALUE(ID_AA64ISAR1_APA_EPAC, "APA EPAC"), @@ -763,25 +763,25 @@ static struct mrs_field_value id_aa64isar1_apa[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_apa_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_apa_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_PACA, ID_AA64ISAR1_APA_PAC), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar1_dpb[] = { +static const struct mrs_field_value id_aa64isar1_dpb[] = { MRS_FIELD_VALUE(ID_AA64ISAR1_DPB_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR1_DPB_DCCVAP, "DCPoP"), MRS_FIELD_VALUE(ID_AA64ISAR1_DPB_DCCVADP, "DCCVADP"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar1_dpb_caps[] = { +static const struct mrs_field_hwcap id_aa64isar1_dpb_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_DCPOP, ID_AA64ISAR1_DPB_DCCVAP), MRS_HWCAP(&elf_hwcap2, HWCAP2_DCPODP, ID_AA64ISAR1_DPB_DCCVADP), MRS_HWCAP_END }; -static struct mrs_field id_aa64isar1_fields[] = { +static const struct mrs_field id_aa64isar1_fields[] = { MRS_FIELD_HWCAP(ID_AA64ISAR1, I8MM, false, MRS_LOWER, id_aa64isar1_i8mm, id_aa64isar1_i8mm_caps), MRS_FIELD_HWCAP(ID_AA64ISAR1, DGH, false, MRS_LOWER, id_aa64isar1_dgh, @@ -815,22 +815,22 @@ static struct mrs_field id_aa64isar1_fields[] = { /* ID_AA64ISAR2_EL1 */ -static struct mrs_field_value id_aa64isar2_pac_frac[] = { +static const struct mrs_field_value id_aa64isar2_pac_frac[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, PAC_frac, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar2_bc[] = { +static const struct mrs_field_value id_aa64isar2_bc[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, BC, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar2_mops[] = { +static const struct mrs_field_value id_aa64isar2_mops[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, MOPS, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar2_apa3[] = { +static const struct mrs_field_value id_aa64isar2_apa3[] = { MRS_FIELD_VALUE(ID_AA64ISAR2_APA3_NONE, ""), MRS_FIELD_VALUE(ID_AA64ISAR2_APA3_PAC, "APA3 PAC"), MRS_FIELD_VALUE(ID_AA64ISAR2_APA3_EPAC, "APA3 EPAC"), @@ -841,32 +841,32 @@ static struct mrs_field_value id_aa64isar2_apa3[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar2_apa3_caps[] = { +static const struct mrs_field_hwcap id_aa64isar2_apa3_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_PACA, ID_AA64ISAR2_APA3_PAC), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar2_gpa3[] = { +static const struct mrs_field_value id_aa64isar2_gpa3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, GPA3, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64isar2_gpa3_caps[] = { +static const struct mrs_field_hwcap id_aa64isar2_gpa3_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_PACG, ID_AA64ISAR2_GPA3_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64isar2_rpres[] = { +static const struct mrs_field_value id_aa64isar2_rpres[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, RPRES, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64isar2_wfxt[] = { +static const struct mrs_field_value id_aa64isar2_wfxt[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64ISAR2, WFxT, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64isar2_fields[] = { +static const struct mrs_field id_aa64isar2_fields[] = { MRS_FIELD(ID_AA64ISAR2, PAC_frac, false, MRS_EXACT, id_aa64isar2_pac_frac), MRS_FIELD(ID_AA64ISAR2, BC, false, MRS_EXACT, id_aa64isar2_bc), @@ -882,69 +882,69 @@ static struct mrs_field id_aa64isar2_fields[] = { /* ID_AA64MMFR0_EL1 */ -static struct mrs_field_value id_aa64mmfr0_exs[] = { +static const struct mrs_field_value id_aa64mmfr0_exs[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, ExS, ALL, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran4_2[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran4_2[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_TGran4, ""), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_NONE, "No S2 TGran4"), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran4_2_IMPL, "S2 TGran4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran64_2[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran64_2[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_TGran64_2_TGran64, ""), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran64_2_NONE, "No S2 TGran64"), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran64_2_IMPL, "S2 TGran64"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran16_2[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran16_2[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_TGran16, ""), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_NONE, "No S2 TGran16"), MRS_FIELD_VALUE(ID_AA64MMFR0_TGran16_2_IMPL, "S2 TGran16"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran4[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran4[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran4,NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran64[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran64[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran64, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_tgran16[] = { +static const struct mrs_field_value id_aa64mmfr0_tgran16[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, TGran16, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_bigendel0[] = { +static const struct mrs_field_value id_aa64mmfr0_bigendel0[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, BigEndEL0, FIXED, MIXED), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_snsmem[] = { +static const struct mrs_field_value id_aa64mmfr0_snsmem[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, SNSMem, NONE, DISTINCT), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_bigend[] = { +static const struct mrs_field_value id_aa64mmfr0_bigend[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR0, BigEnd, FIXED, MIXED), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_asidbits[] = { +static const struct mrs_field_value id_aa64mmfr0_asidbits[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_ASIDBits_8, "8bit ASID"), MRS_FIELD_VALUE(ID_AA64MMFR0_ASIDBits_16, "16bit ASID"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr0_parange[] = { +static const struct mrs_field_value id_aa64mmfr0_parange[] = { MRS_FIELD_VALUE(ID_AA64MMFR0_PARange_4G, "4GB PA"), MRS_FIELD_VALUE(ID_AA64MMFR0_PARange_64G, "64GB PA"), MRS_FIELD_VALUE(ID_AA64MMFR0_PARange_1T, "1TB PA"), @@ -955,7 +955,7 @@ static struct mrs_field_value id_aa64mmfr0_parange[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64mmfr0_fields[] = { +static const struct mrs_field id_aa64mmfr0_fields[] = { MRS_FIELD(ID_AA64MMFR0, ExS, false, MRS_EXACT, id_aa64mmfr0_exs), MRS_FIELD(ID_AA64MMFR0, TGran4_2, false, MRS_EXACT, id_aa64mmfr0_tgran4_2), @@ -981,53 +981,53 @@ static struct mrs_field id_aa64mmfr0_fields[] = { /* ID_AA64MMFR1_EL1 */ -static struct mrs_field_value id_aa64mmfr1_xnx[] = { +static const struct mrs_field_value id_aa64mmfr1_xnx[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, XNX, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_specsei[] = { +static const struct mrs_field_value id_aa64mmfr1_specsei[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, SpecSEI, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_pan[] = { +static const struct mrs_field_value id_aa64mmfr1_pan[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, PAN, NONE, IMPL), MRS_FIELD_VALUE(ID_AA64MMFR1_PAN_ATS1E1, "PAN+ATS1E1"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_lo[] = { +static const struct mrs_field_value id_aa64mmfr1_lo[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, LO, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_hpds[] = { +static const struct mrs_field_value id_aa64mmfr1_hpds[] = { MRS_FIELD_VALUE(ID_AA64MMFR1_HPDS_NONE, ""), MRS_FIELD_VALUE(ID_AA64MMFR1_HPDS_HPD, "HPD"), MRS_FIELD_VALUE(ID_AA64MMFR1_HPDS_TTPBHA, "HPD+TTPBHA"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_vh[] = { +static const struct mrs_field_value id_aa64mmfr1_vh[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR1, VH, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_vmidbits[] = { +static const struct mrs_field_value id_aa64mmfr1_vmidbits[] = { MRS_FIELD_VALUE(ID_AA64MMFR1_VMIDBits_8, "8bit VMID"), MRS_FIELD_VALUE(ID_AA64MMFR1_VMIDBits_16, "16bit VMID"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr1_hafdbs[] = { +static const struct mrs_field_value id_aa64mmfr1_hafdbs[] = { MRS_FIELD_VALUE(ID_AA64MMFR1_HAFDBS_NONE, ""), MRS_FIELD_VALUE(ID_AA64MMFR1_HAFDBS_AF, "HAF"), MRS_FIELD_VALUE(ID_AA64MMFR1_HAFDBS_AF_DBS, "HAF+DS"), MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64mmfr1_fields[] = { +static const struct mrs_field id_aa64mmfr1_fields[] = { MRS_FIELD(ID_AA64MMFR1, XNX, false, MRS_EXACT, id_aa64mmfr1_xnx), MRS_FIELD(ID_AA64MMFR1, SpecSEI, false, MRS_EXACT, id_aa64mmfr1_specsei), @@ -1043,94 +1043,94 @@ static struct mrs_field id_aa64mmfr1_fields[] = { /* ID_AA64MMFR2_EL1 */ -static struct mrs_field_value id_aa64mmfr2_e0pd[] = { +static const struct mrs_field_value id_aa64mmfr2_e0pd[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, E0PD, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_evt[] = { +static const struct mrs_field_value id_aa64mmfr2_evt[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_EVT_NONE, ""), MRS_FIELD_VALUE(ID_AA64MMFR2_EVT_8_2, "EVT-8.2"), MRS_FIELD_VALUE(ID_AA64MMFR2_EVT_8_5, "EVT-8.5"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_bbm[] = { +static const struct mrs_field_value id_aa64mmfr2_bbm[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_BBM_LEVEL0, ""), MRS_FIELD_VALUE(ID_AA64MMFR2_BBM_LEVEL1, "BBM level 1"), MRS_FIELD_VALUE(ID_AA64MMFR2_BBM_LEVEL2, "BBM level 2"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_ttl[] = { +static const struct mrs_field_value id_aa64mmfr2_ttl[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, TTL, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_fwb[] = { +static const struct mrs_field_value id_aa64mmfr2_fwb[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, FWB, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_ids[] = { +static const struct mrs_field_value id_aa64mmfr2_ids[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, IDS, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_at[] = { +static const struct mrs_field_value id_aa64mmfr2_at[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, AT, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64mmfr2_at_caps[] = { +static const struct mrs_field_hwcap id_aa64mmfr2_at_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_USCAT, ID_AA64MMFR2_AT_IMPL), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64mmfr2_st[] = { +static const struct mrs_field_value id_aa64mmfr2_st[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, ST, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_nv[] = { +static const struct mrs_field_value id_aa64mmfr2_nv[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, NV, NONE, 8_3), MRS_FIELD_VALUE(ID_AA64MMFR2_NV_8_4, "NV v8.4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_ccidx[] = { +static const struct mrs_field_value id_aa64mmfr2_ccidx[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_CCIDX_32, "32bit CCIDX"), MRS_FIELD_VALUE(ID_AA64MMFR2_CCIDX_64, "64bit CCIDX"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_varange[] = { +static const struct mrs_field_value id_aa64mmfr2_varange[] = { MRS_FIELD_VALUE(ID_AA64MMFR2_VARange_48, "48bit VA"), MRS_FIELD_VALUE(ID_AA64MMFR2_VARange_52, "52bit VA"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_iesb[] = { +static const struct mrs_field_value id_aa64mmfr2_iesb[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, IESB, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_lsm[] = { +static const struct mrs_field_value id_aa64mmfr2_lsm[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, LSM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_uao[] = { +static const struct mrs_field_value id_aa64mmfr2_uao[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, UAO, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64mmfr2_cnp[] = { +static const struct mrs_field_value id_aa64mmfr2_cnp[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64MMFR2, CnP, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64mmfr2_fields[] = { +static const struct mrs_field id_aa64mmfr2_fields[] = { MRS_FIELD(ID_AA64MMFR2, E0PD, false, MRS_EXACT, id_aa64mmfr2_e0pd), MRS_FIELD(ID_AA64MMFR2, EVT, false, MRS_EXACT, id_aa64mmfr2_evt), MRS_FIELD(ID_AA64MMFR2, BBM, false, MRS_EXACT, id_aa64mmfr2_bbm), @@ -1153,67 +1153,67 @@ static struct mrs_field id_aa64mmfr2_fields[] = { /* ID_AA64PFR0_EL1 */ -static struct mrs_field_value id_aa64pfr0_csv3[] = { +static const struct mrs_field_value id_aa64pfr0_csv3[] = { MRS_FIELD_VALUE(ID_AA64PFR0_CSV3_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_CSV3_ISOLATED, "CSV3"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_csv2[] = { +static const struct mrs_field_value id_aa64pfr0_csv2[] = { MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_ISOLATED, "CSV2"), MRS_FIELD_VALUE(ID_AA64PFR0_CSV2_SCXTNUM, "SCXTNUM"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_dit[] = { +static const struct mrs_field_value id_aa64pfr0_dit[] = { MRS_FIELD_VALUE(ID_AA64PFR0_DIT_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_DIT_PSTATE, "PSTATE.DIT"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64pfr0_dit_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr0_dit_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_DIT, ID_AA64PFR0_DIT_PSTATE), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64pfr0_amu[] = { +static const struct mrs_field_value id_aa64pfr0_amu[] = { MRS_FIELD_VALUE(ID_AA64PFR0_AMU_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_AMU_V1, "AMUv1"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_mpam[] = { +static const struct mrs_field_value id_aa64pfr0_mpam[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, MPAM, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_sel2[] = { +static const struct mrs_field_value id_aa64pfr0_sel2[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, SEL2, NONE, IMPL), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_sve[] = { +static const struct mrs_field_value id_aa64pfr0_sve[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, SVE, NONE, IMPL), MRS_FIELD_VALUE_END, }; #if 0 /* Enable when we add SVE support */ -static struct mrs_field_hwcap id_aa64pfr0_sve_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr0_sve_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_SVE, ID_AA64PFR0_SVE_IMPL), MRS_HWCAP_END }; #endif -static struct mrs_field_value id_aa64pfr0_ras[] = { +static const struct mrs_field_value id_aa64pfr0_ras[] = { MRS_FIELD_VALUE(ID_AA64PFR0_RAS_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_RAS_IMPL, "RAS"), MRS_FIELD_VALUE(ID_AA64PFR0_RAS_8_4, "RAS v8.4"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_gic[] = { +static const struct mrs_field_value id_aa64pfr0_gic[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, GIC, CPUIF_NONE, CPUIF_EN), MRS_FIELD_VALUE(ID_AA64PFR0_GIC_CPUIF_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR0_GIC_CPUIF_EN, "GIC"), @@ -1221,55 +1221,55 @@ static struct mrs_field_value id_aa64pfr0_gic[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_advsimd[] = { +static const struct mrs_field_value id_aa64pfr0_advsimd[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, AdvSIMD, NONE, IMPL), MRS_FIELD_VALUE(ID_AA64PFR0_AdvSIMD_HP, "AdvSIMD+HP"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64pfr0_advsimd_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr0_advsimd_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_ASIMD, ID_AA64PFR0_AdvSIMD_IMPL), MRS_HWCAP(&elf_hwcap, HWCAP_ASIMDHP, ID_AA64PFR0_AdvSIMD_HP), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64pfr0_fp[] = { +static const struct mrs_field_value id_aa64pfr0_fp[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, FP, NONE, IMPL), MRS_FIELD_VALUE(ID_AA64PFR0_FP_HP, "FP+HP"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_hwcap id_aa64pfr0_fp_caps[] = { +static const struct mrs_field_hwcap id_aa64pfr0_fp_caps[] = { MRS_HWCAP(&elf_hwcap, HWCAP_FP, ID_AA64PFR0_FP_IMPL), MRS_HWCAP(&elf_hwcap, HWCAP_FPHP, ID_AA64PFR0_FP_HP), MRS_HWCAP_END }; -static struct mrs_field_value id_aa64pfr0_el3[] = { +static const struct mrs_field_value id_aa64pfr0_el3[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, EL3, NONE, 64), MRS_FIELD_VALUE(ID_AA64PFR0_EL3_64_32, "EL3 32"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_el2[] = { +static const struct mrs_field_value id_aa64pfr0_el2[] = { MRS_FIELD_VALUE_NONE_IMPL(ID_AA64PFR0, EL2, NONE, 64), MRS_FIELD_VALUE(ID_AA64PFR0_EL2_64_32, "EL2 32"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_el1[] = { +static const struct mrs_field_value id_aa64pfr0_el1[] = { MRS_FIELD_VALUE(ID_AA64PFR0_EL1_64, "EL1"), MRS_FIELD_VALUE(ID_AA64PFR0_EL1_64_32, "EL1 32"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr0_el0[] = { +static const struct mrs_field_value id_aa64pfr0_el0[] = { MRS_FIELD_VALUE(ID_AA64PFR0_EL0_64, "EL0"), MRS_FIELD_VALUE(ID_AA64PFR0_EL0_64_32, "EL0 32"), MRS_FIELD_VALUE_END, }; -static struct mrs_field id_aa64pfr0_fields[] = { +static const struct mrs_field id_aa64pfr0_fields[] = { MRS_FIELD(ID_AA64PFR0, CSV3, false, MRS_EXACT, id_aa64pfr0_csv3), MRS_FIELD(ID_AA64PFR0, CSV2, false, MRS_EXACT, id_aa64pfr0_csv2), MRS_FIELD_HWCAP(ID_AA64PFR0, DIT, false, MRS_LOWER, id_aa64pfr0_dit, @@ -1293,26 +1293,26 @@ static struct mrs_field id_aa64pfr0_fields[] = { /* ID_AA64PFR1_EL1 */ -static struct mrs_field_value id_aa64pfr1_mte[] = { +static const struct mrs_field_value id_aa64pfr1_mte[] = { MRS_FIELD_VALUE(ID_AA64PFR1_MTE_NONE, ""), MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL_EL0, "MTE EL0"), MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL, "MTE"), MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr1_ssbs[] = { *** 403 LINES SKIPPED *** From nobody Wed Jun 28 21:27: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 4Qrvn26yLhz4k1Hk for ; Wed, 28 Jun 2023 21:27: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 4Qrvn26Wbpz41Zf; Wed, 28 Jun 2023 21:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687987654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qS7sLlzPzv0ocGKM0XLe9oTx94aAVvmW+hHwZRhQ6mI=; b=mhqEhwSyDsyV0CRQvKk/sliTV7PGsom3pHkCOYxiOynh+B9jHUkzXUeHI404ZEP6toiYVC sow9CCSekZ/PwobGSayex34e1Zfj5RWNZW02ipXplw2GWqIY7/HgQRZn9TVDtlG7WyPvSc NHzj4+YhI5KOjHcwlo77ZkTICZGPO6RAGqJ/kpVk6AcL5z21V6wCAY8290vOvo2Ym9QSnX NNVS6aXf2GgZHy7+FiGzQ5lxphDidsDrr7JtpXa1yGNbpM1/yd3WaEqUANv8UjMnioS8xl gR5HrsCHFPqQFPZl3u+0oOy7Po+hNgrtAQNEgKQvgF1J5gFe+8mqisJVKsFZBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687987654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qS7sLlzPzv0ocGKM0XLe9oTx94aAVvmW+hHwZRhQ6mI=; b=Qh31XmmWIjNiXv+bp8I9sCTQWQM/BNS8C64ujZql+JOUHPbV6A5NzRUNzI0LZSrQDRcfiW X9JZsM7CNBflcCh9gBZ6sePQr4tY/5kIoE9TdOdvsrVKXF1FAPPmo70AZq8uBKcCjFLdZC BmwCDBX215r2NRfV9hXIJQTSdH1SM6FQunLPKwJT3hqtxyh+0iv+GyAcF7kYgiVjHP5fUI bsQaWA45NdCvbTM8PDoBdJX5peMfDXWSNAnB49tlm58PzFJjV88MiNba1lzs6lAT7KlXVj VoHLKmSmstumBifq14dlO7iwHgY4qZLbZN1HkaqV28jxXxM7UuU255jamIbPTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687987654; a=rsa-sha256; cv=none; b=cofIpWB6T8eyNcrvbeytgm1f9+tWFVci0szTsZO8lM+J7b2OtQip+Mp2pHpzp3AN2lsaeB lJ77A+PJmcHdRwjpEAR3V9hlRixdP6Am4/juZBcV3QhNd3uQONo5/WPJIV/nLTHDeZw9WC Lq7Czulg/Eeo5VGa5gGNyxTFgM/LbPZF98uwNVY/3dY3od4+G+U0am0V+xCkMwOzCFXNO2 4LCti0TFcq3jy6Al5/ksI0WMk8Y1qBNr9spscKQeZcH+clXRGFzvBkhnJxaRqKrGO2Zc3w iCXagzOGdJqHzmP6IEWRhbgPUjVirkuye40AuycafBXDHEej5zuI7Q4inY30lA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrvn25ZK0zpyD; Wed, 28 Jun 2023 21:27:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SLRYSM025005; Wed, 28 Jun 2023 21:27:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SLRYcR025004; Wed, 28 Jun 2023 21:27:34 GMT (envelope-from git) Date: Wed, 28 Jun 2023 21:27:34 GMT Message-Id: <202306282127.35SLRYcR025004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 8e8acabdcaeb..a9d6b0690b18 - 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: a9d6b0690b1863f39a7efce08b1227f2e9e26abb X-Git-Oldrev: 8e8acabdcaeb831c777f71361722f4235b698a8d X-Git-Newrev: a9d6b0690b1863f39a7efce08b1227f2e9e26abb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=8e8acabdcaeb..a9d6b0690b18 35a6247c5fe7 Add a delay to tearing down threads. 8469b5aac0ce Another set of vdev queue optimizations. bc9d0084ea82 Remove unnecessary commas in zpool-create.8 b0cbc1aa9a1f Use big transactions for small recordsize writes. a9d6b0690b18 ZIL: Fix another use-after-free. From nobody Wed Jun 28 22:20: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 4QrwxZ2lL1z4kZdp; Wed, 28 Jun 2023 22:20: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 4QrwxZ2JsYz4HHN; Wed, 28 Jun 2023 22:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687990802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HOu2gBT7ZndevNDYFJWVuJN6e5s0scAM2VcsZQ1DsRg=; b=dyVgwqMil+QZ+ZQsbYMzndVAmcVBKGGKiD1DSkgOZNpiBl719+6CgiAa+YL5EsivdULH+n ZH0porjKfbnpL8RyNkUU6bz4HCkJxuy/1Zr9kFc/16EkC5EDiXQg6dKi2l1hlFzW3yepGK QlgbFofRBLn6ZKshZTZcDxtv1xUeMc/myf9F46Kk1Mg5mTtCZVBizeq7lG3AooxawJi6ef J0O9TDIXQ1o3M9CgmV91ULYhUqn41WlkolQpW7TubVPReFYcAUHsnIouuobTP52SPNm4nW YzskWljowngfyn+OjipmDSAA2Yyq7FYVPIcU+slO6XLZApW6BouZbMVvcba/Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687990802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HOu2gBT7ZndevNDYFJWVuJN6e5s0scAM2VcsZQ1DsRg=; b=v3xnkK4n6sPcnsP5jf6eOVTlx4MSE1Wy4hS+wqcDyWVMn/E6w22LI3Y/ZNnkmBBS6z0JNh YwjrO15Ju9OVKyEMyU1nMGLaEL1xGEvTYFtwMedV/NfjtvluFq3fKIGYW3aotXtu/ELDDV 62pqOKKSFSI4Cs1DG1ZkTMVqi+3F8HNrkhU+eFzrmd1hppNK1pROEgKmw93RLgZdciXPKm 2jSoKkRtCE7YO1XFHkQg8Ev/1fYzbQPNHw1sZU2d3V+wHX1VW5wbrzBcY8b7mTVBsqsutV Wg5DMd/dsL6uYCAsBsfToJPlv6gOUmIv2abfyOrXMw+IIJ21Y5sQWSVVSjy8dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687990802; a=rsa-sha256; cv=none; b=qlNmNW9K4CKunYs9XRGbgDW6C4bWPIVoqZedEUEntC7T0Fswb7IZMDj9UkV5l02RbHkvtx uoCB0IDxpOHQxZq5S0hxIBj8PZIPqYQnsdUNgLp+RqAlJpuxL7XEAhqplNUi/4sDief63l Z3EVw/GIow7hjp3lWCvfP3WC/6NTUFe7pF6aKonSklamyewmXJTLv6cxonx5f6zMXmTbDn nemRZ5Gt26Cp+hEMonJiZDBsb2J6L8kFyqhRTUCvmOzUrep2GDpSBcMwcU6y7lvydK04kG x6Mt9oVPpiqHSD66fDXy6QVzdlBfhvrMUWhyNv98/77tsE3wE194eVgsWEZwLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrwxZ1Q18zrTV; Wed, 28 Jun 2023 22:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SMK2wZ010337; Wed, 28 Jun 2023 22:20:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SMK2Y4010334; Wed, 28 Jun 2023 22:20:02 GMT (envelope-from git) Date: Wed, 28 Jun 2023 22:20:02 GMT Message-Id: <202306282220.35SMK2Y4010334@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: 31b3e4f1b431 - main - atkbdc: Minor style nits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 31b3e4f1b43133f5def754479911496187813d05 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=31b3e4f1b43133f5def754479911496187813d05 commit 31b3e4f1b43133f5def754479911496187813d05 Author: Warner Losh AuthorDate: 2023-06-28 18:00:46 +0000 Commit: Warner Losh CommitDate: 2023-06-28 22:18:47 +0000 atkbdc: Minor style nits 'char* ' -> 'char *', per style(9) Sponsored by: Netflix --- sys/dev/atkbdc/atkbdc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c index f24c3d883351..9a8ab3397706 100644 --- a/sys/dev/atkbdc/atkbdc.c +++ b/sys/dev/atkbdc/atkbdc.c @@ -106,9 +106,9 @@ static int wait_for_aux_data(atkbdc_softc_t *kbdc); static int wait_for_aux_ack(atkbdc_softc_t *kbdc); struct atkbdc_quirks { - const char* bios_vendor; - const char* maker; - const char* product; + const char *bios_vendor; + const char *maker; + const char *product; int quirk; }; @@ -129,9 +129,9 @@ static int atkbdc_getquirks(void) { int i; - char* bios_vendor = kern_getenv("smbios.bios.vendor"); - char* maker = kern_getenv("smbios.system.maker"); - char* product = kern_getenv("smbios.system.product"); + char *bios_vendor = kern_getenv("smbios.bios.vendor"); + char *maker = kern_getenv("smbios.system.maker"); + char *product = kern_getenv("smbios.system.product"); for (i = 0; i < nitems(quirks); i++) if (QUIRK_STR_MATCH(quirks[i].bios_vendor, bios_vendor) && From nobody Wed Jun 28 22:20: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 4Qrwxb5zt0z4kZVr; Wed, 28 Jun 2023 22:20: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 4Qrwxb32m0z4HBb; Wed, 28 Jun 2023 22:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687990803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cujgUIUHQKzXpdHbapVpLAhtteifNM7ePWaUzjCGYd0=; b=LBnzP9XQiC9MmUDUqDETCj8tdLYW36kozz18K9jaQPRqkEIhpBosYusON9VhfcjQtYGYis PywKHiPFlErc7eQijM9ez/XNpeIXodWbwkrKg91CBu4iR3f4BDL8qMKFc6oQO516HiWJWG xwOxEkxCIEBLWig9c9ClT7WqdvmaIFrboXHUvBmSJNK/gxbCDlIGZ/Fethur8yJsnCP0Nl Ug1AbkSWgNUlMoZpWiD2zjnF6sYDZKAculWgKiuUNzZEU/iXKNj/nA7GyYGB1QufI0UhLr 8w3hRatRehNxDHzAQ5tnxho27Dy8w8CNOD9gzbCy/Z6aGM6tMQpiq2Li+z+rWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687990803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cujgUIUHQKzXpdHbapVpLAhtteifNM7ePWaUzjCGYd0=; b=k1oYl0dQhFVBBfX4UkS/m0iKLeGiLoN+Q/S6fnYwkNqfdW+pVVCgFBO7yOyuApkJf+cP/+ T884nTxDT2Hq0EPcRSfGvSC1cOre0FiZMNbdnVDC+IyMt2/OvNFEYRNRZ6lDWjDoOaQOjd 2ygJxNLzJqljeQEFpPJYNMH8lzGmLgbqykq/ltj+PYD3r7XHJjyakkXd0KWNkeMmxRLp05 EuDmKtTy55Y7FyojKxbHsowX8OMkTwTjTkJD5WEPK4w1zk7F+lKDKTUq2vE9xovSvxTt5C lDTcOYmfp0XkSskfeoutTyf+FZL/ocflItqR5Ki0Mj0voS/lserqs3e/ABQlaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687990803; a=rsa-sha256; cv=none; b=OWfbY6nxuZjPo42XmmoO8eSyum6VdVbWp3/tvuRMeJApe2kNtdcxTUXgErN31ruhJgVZ3L LQtsF7IhPRrxbg6sR5gUvqt1U0F/vDHwTDxMvLvxRCd/OVJLKd/ELgM9VWO/Y5iSlBQK/B Y6y1XPTVI5E8B2gFWz2m5t/VM28QnZliI17/s+LjkSigbj98SScEkHMhiB4A78RoNXogr9 oxJhOxh2dhldiyUHhArVgzIIWMhcy7lNs67AMtBRDCAAX09oKWFbESwmgloFSlMZcYBPpZ jIoQzDSRILdt3o5vG7Ouqm9O/HwBlK0HEvdzPnBubQROnrtT/x62ZAiX09ew6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrwxb1sJtzrHq; Wed, 28 Jun 2023 22:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SMK3jL010590; Wed, 28 Jun 2023 22:20:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SMK3RA010588; Wed, 28 Jun 2023 22:20:03 GMT (envelope-from git) Date: Wed, 28 Jun 2023 22:20:03 GMT Message-Id: <202306282220.35SMK3RA010588@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: 430168942f2b - main - newfs: prefer unsigned index over signed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 430168942f2bf68b0230906a658a0ceb7acceef2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=430168942f2bf68b0230906a658a0ceb7acceef2 commit 430168942f2bf68b0230906a658a0ceb7acceef2 Author: Alfonso Gregory AuthorDate: 2023-06-28 22:14:07 +0000 Commit: Warner Losh CommitDate: 2023-06-28 22:18:47 +0000 newfs: prefer unsigned index over signed We can just use a for loop starting at 0 instead of a while loop starting at -1. Reviewed by: imp, mckusick Pull Request: https://github.com/freebsd/freebsd-src/pull/733 --- sbin/newfs/newfs.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index a2d97131d3a7..2dbd27ce2a0f 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -137,7 +137,8 @@ main(int argc, char *argv[]) struct stat st; char *cp, *special; intmax_t reserved; - int ch, i, rval; + int ch, rval; + size_t i; char part_name; /* partition name, default to full disk */ part_name = 'c'; @@ -153,9 +154,10 @@ main(int argc, char *argv[]) break; case 'L': volumelabel = optarg; - i = -1; - while (isalnum(volumelabel[++i]) || - volumelabel[i] == '_' || volumelabel[i] == '-'); + for (i = 0; isalnum(volumelabel[i]) || + volumelabel[i] == '_' || volumelabel[i] == '-'; + i++) + continue; if (volumelabel[i] != '\0') { errx(1, "bad volume label. Valid characters " "are alphanumerics, dashes, and underscores."); From nobody Wed Jun 28 22:38: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 4QrxMJ5Dbcz4kmSL; Wed, 28 Jun 2023 22:38: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 4QrxMJ2FlMz4Mvn; Wed, 28 Jun 2023 22:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687991932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9yjBibzQmjVNWhcGsZBK3eYS9+TJagKhTULXkxJS9A0=; b=Mmv3N5dFqIaYteb7Zk2g1tpEauXi3kqHMqZ2mK93eeL1hjIcrEOJ0dmOaDDlJBogJS/Wvp NmBwG2q/5uDE0fGfemahTLrDYQxxPMWt2JOqFvWBFuSQrLCAlXI6yy/fw8qbAA3i0Rpc8Z AYui7E+GryS192iTmDGMK12NlfP0jNkGnyMf/JRp7EyCMjbykKtHyAyMyG76dBfS2tBeRH 8yyaGT0eziCMOzvyikucKNXre+IsZUfg4rOJ5t/V66posyEwkDXk23kjdxlJLLfinkGmRK SB0D1OuRyyA3AQO7uUJXvMabxAXP2s9+J6d3z5djf7IOWpAukHXeDov8LHO3qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687991932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9yjBibzQmjVNWhcGsZBK3eYS9+TJagKhTULXkxJS9A0=; b=gccAfFwOV6j5uxVlZeil0XKhnD1zEs455R0+BmTkzLstE/8W9TMnzMFjyoadqiWE/AZvgN rkd8vY8qRcTGGix1MQlBwkyLhgps4Fb6+g+sGWJCzublTuOQ16lQ9muL1gfXhVM4ByfVVb 7ajLk0qOseQlnvd7Y+3Xx+SR0z3djvbNxcr2mgEX5YFATnVs7ZJzhoc0z6afaMnN/oC3g6 c5VcGDLltDclBzeM3c0lP73OYqx8VDu2YgoO36NhfrHdv+t0BVHRXs4/t7aVQcQIRb/3D5 GTlZ3MN9oPHohBA9zrK5ocxyuYdQU7SatdoMie3NOPdkKw5B5uWU7pSHHJAW/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687991932; a=rsa-sha256; cv=none; b=vtRoxt7wv2RW8cg9anGyC9k2uO4zmVLilCCgb/vcJDUwpnx96+zpzaKk0d2zW6mgxxv+GW bWbX3GB6/9WFxN6s/0wkazk1LcnZBc98gxB4u+NMZlY3WsXXkq+e0ybsNqFTMHnYZTD22X pMQGDH+kgNWzeLSsUbsBG0F3zOtvaugYfZh2oUqskaGRANwZRJ10NXi8ORHREYvmQy2a81 YAHf1HI4+z5UjbOQs/S8nfmwIrSZG2MJN0NzioQnzOpRDx1NLJc3c9z2mvOdPSvOUpwKVT czwArsno74aDNd37MsC5Ae7+nFp2uJvMkGpWPBEGtUjMMktNXi4Tc9aERR6uBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrxMJ1L4Qzrnh; Wed, 28 Jun 2023 22:38: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 35SMcqW6015553; Wed, 28 Jun 2023 22:38:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35SMcqq1015552; Wed, 28 Jun 2023 22:38:52 GMT (envelope-from git) Date: Wed, 28 Jun 2023 22:38:52 GMT Message-Id: <202306282238.35SMcqq1015552@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: 27cebb4eac3d - main - newfs: nextnum should be a u_int32_t, not an int List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 27cebb4eac3d03b81defa2785eae350f6caca2c7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=27cebb4eac3d03b81defa2785eae350f6caca2c7 commit 27cebb4eac3d03b81defa2785eae350f6caca2c7 Author: Alfonso Gregory AuthorDate: 2023-06-28 22:20:33 +0000 Commit: Warner Losh CommitDate: 2023-06-28 22:26:06 +0000 newfs: nextnum should be a u_int32_t, not an int The function that uses nextnum expects to return a u_int32_t, not a mere int, so let's make nextnum a u_int32_t instead. Note: retained current u_int32_t style, since the rest of the file uses it. Reviewed by: imp, mckusick Pull Request: https://github.com/freebsd/freebsd-src/pull/734 --- sbin/newfs/mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 28b02d250e17..85137c7881f9 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1230,7 +1230,7 @@ ilog2(int val) static u_int32_t newfs_random(void) { - static int nextnum = 1; + static u_int32_t nextnum = 1; if (Rflag) return (nextnum++); From nobody Wed Jun 28 23:40: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 4Qrykh0RXjz4k9lG; Wed, 28 Jun 2023 23:40: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 4Qrykh0Hlfz3BmM; Wed, 28 Jun 2023 23:40:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687995644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1q15FhUDhILyQF4eAaoINjuDlHYYE+CJ04ia12Ok98o=; b=gtyTzFSlDkFY107lMBVZvtuWwdM4slY9ziBQSLsOPjlZUUIlXqmnb8gCvpu5acdQsa3tjO Rv+zkS5KlhZw2y8JaWJ3YfnCXLMBWdR+WrUg0fn/ts6paNRYKEzZBCse4vRYBQGDhpmF/5 5J8DG6S0wrFIpZYW3nWpIU1MAIdY/dNU83uPk0/Na/wof80jpS8p51U9z8rVJSxrDK6Kez gtK51sfgeKEouDgUasMSAujjeMIKjBnrAdJdvvBJSaredwsaAx+/KFePr2wb6GKCdNSLhC izKVpkm8dxDYq/I0fK8TNpaeH7O4pfuXXQd29aVBR8zpjCHwVsJ0iF8LIyOoWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687995644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1q15FhUDhILyQF4eAaoINjuDlHYYE+CJ04ia12Ok98o=; b=J+zAM8cf5pcyzrZIpxVwbvnTj5bnYkgSQmANUyycTsYjUEp5J8a/5TXECCJJrUsIrizQsn R02Upxx9/SIilAEOkuqCO81JagxALiVVq0dwbJ1AYI1QCaAlbzxBUS5v7IZpGiEz5gY7ul u2ezBqOPvE5RldImufdlzsSwgBPqrj02WoDI9WCLyKVGITEMB+jqe4ATEuvY1mcBRGzig4 SJCkJpItqa4fiFTCiq/EjLnSrdJq2KbJLbioHLvJuBBavOh+vqKLz+/hYr4b5zLO+UoXad hW8KaFGuVPwBUHdu5JwZz5pmAuugRmRSA3PK7abffRcanxAU05tKwj91gtSCWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687995644; a=rsa-sha256; cv=none; b=D+bA+85G28GA5g64q0WsaqTxbPFk+2g+FvcsvggH6lAkcpvTFG6mgS+Kedet+mVkSrmOX3 f0Pb6ZILXvEQZdRnpooAgFfrqzqaIij+bXSG1DTwcfSPl4spkDTuX3p0kBvayKKNi01bsp h1dVCRkR3rDOCdbnIvgA+ohvTmxKarxEFX54LS5OdFOWGYoMmrysOvBYoikqTFD0KbCqti zB8sfcrWH5B/F+sBBdfhxB6bEb+mokYsiFJ700gypUamhNwH/thjaum82ao+ns1Eh8HMX6 v3WiQ8LfGbC6wMR21yxP5MGMW7B6D7Tye4lH3dJMtnSf/kTs1k83o98nHe1ZWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrykg6VQ4zsym; Wed, 28 Jun 2023 23:40: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 35SNehkT023038; Wed, 28 Jun 2023 23:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35SNebj9023036; Wed, 28 Jun 2023 23:40:37 GMT (envelope-from git) Date: Wed, 28 Jun 2023 23:40:37 GMT Message-Id: <202306282340.35SNebj9023036@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: 7b5e687355af - main - zfs: merge openzfs/zfs@a9d6b0690 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7b5e687355afe772894661db63d1d4466751d806 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=7b5e687355afe772894661db63d1d4466751d806 commit 7b5e687355afe772894661db63d1d4466751d806 Merge: 27cebb4eac3d a9d6b0690b18 Author: Martin Matuska AuthorDate: 2023-06-28 23:39:19 +0000 Commit: Martin Matuska CommitDate: 2023-06-28 23:39:52 +0000 zfs: merge openzfs/zfs@a9d6b0690 Notable upstream pull request merges: #14925 Another set of vdev queue optimizations #14964 Use big transactions for small recordsize writes #14999 ZIL: Fix another use-after-free Obtained from: OpenZFS OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb .../openzfs/include/os/linux/spl/sys/taskq.h | 1 + sys/contrib/openzfs/include/sys/vdev.h | 3 +- sys/contrib/openzfs/include/sys/vdev_impl.h | 17 +- sys/contrib/openzfs/include/sys/zio.h | 15 +- sys/contrib/openzfs/man/man4/spl.4 | 15 + sys/contrib/openzfs/man/man4/zfs.4 | 6 - sys/contrib/openzfs/man/man8/zpool-create.8 | 4 +- .../openzfs/module/os/linux/spl/spl-taskq.c | 34 ++- sys/contrib/openzfs/module/zfs/spa_misc.c | 2 +- sys/contrib/openzfs/module/zfs/txg.c | 13 +- sys/contrib/openzfs/module/zfs/vdev.c | 16 +- sys/contrib/openzfs/module/zfs/vdev_queue.c | 305 ++++++++++++--------- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 106 ++++--- sys/contrib/openzfs/module/zfs/zil.c | 2 +- sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 16 files changed, 306 insertions(+), 239 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index eb096b584d97,000000000000..ddddc1ef9504 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1090 -1,0 +1,1090 @@@ +/* + * $FreeBSD$ + */ + +/* 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() 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_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 */ + +/* 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 */ + +/* 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_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_*_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 + +/* 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 */ + +/* 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 */ + +/* 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 */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->read/write_iter() are available */ +/* #undef HAVE_VFS_RW_ITERATE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* yes */ +/* #undef HAVE_WAIT_ON_BIT_ACTION */ + +/* wait_queue_entry_t exists */ +/* #undef HAVE_WAIT_QUEUE_ENTRY_T */ + +/* wq_head->head and wq_entry->entry exist */ +/* #undef HAVE_WAIT_QUEUE_HEAD_ENTRY */ + +/* int (*writepage_t)() takes struct folio* */ +/* #undef HAVE_WRITEPAGE_T_FOLIO */ + +/* xattr_handler->get() wants dentry */ +/* #undef HAVE_XATTR_GET_DENTRY */ + +/* xattr_handler->get() wants both dentry and inode */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->get() wants xattr_handler */ +/* #undef HAVE_XATTR_GET_HANDLER */ + +/* xattr_handler has name */ +/* #undef HAVE_XATTR_HANDLER_NAME */ + +/* xattr_handler->list() wants dentry */ +/* #undef HAVE_XATTR_LIST_DENTRY */ + +/* xattr_handler->list() wants xattr_handler */ +/* #undef HAVE_XATTR_LIST_HANDLER */ + +/* xattr_handler->list() wants simple */ +/* #undef HAVE_XATTR_LIST_SIMPLE */ + +/* xattr_handler->set() wants dentry */ +/* #undef HAVE_XATTR_SET_DENTRY */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() wants xattr_handler */ +/* #undef HAVE_XATTR_SET_HANDLER */ + +/* xattr_handler->set() takes mnt_idmap */ +/* #undef HAVE_XATTR_SET_IDMAP */ + *** 158 LINES SKIPPED *** From nobody Wed Jun 28 23:45: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 4Qryrh5rxSz4kDn3; Wed, 28 Jun 2023 23:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qryrh5R4dz3D1h; Wed, 28 Jun 2023 23:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687995956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ny+2TSL1Q1d8vIpHfjCsGijjdNAG17bGY3qq48s+aDw=; b=CvFNT/7mM6cn3/YATyze7VnW/AeRmMrQZKyGRsBXrkLRGBeAZEcEwxGM8J+Zpc44DlmrLI oaXLOOwSIDl4fBlLqytqs1YhWuBpZpW6DGn2m6QTOcKTjUOqxfSUF3B6yvcet6yhC61Cid uSCfiNuMPV0D8R/CCPHVVetcv9hj/j79onTnm0zPFKuChThU/fjx0vZ7wc9uTNW3ZR8kR4 gCYcpFEK0JMJM1SsgHCCLPl+VYYwpbioUmfP9rv3WS9yJ/K4hSHlsmaNUKq3W8SpFNe9dS r6rUEcd6SucXsMXSx6PtynLlWl3NJ6J9rsx7j09DzWD5jkF1FzE/iBCE+D0kaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687995956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ny+2TSL1Q1d8vIpHfjCsGijjdNAG17bGY3qq48s+aDw=; b=at072UfjRPvj4Lq3PwR2wJoJpK7f6uN/H1Ouwr9SO/Fx2WmMsXpnlhGteKH9Ce4O0iHElo WVRcmV3ooDLAZIcXU7QBZqooOoTKpbrB+tShMiM+6hlTEKFNI+S9lnXJwOPYskFxaStjT9 oxKClBIMg+ciYfqy5JF7MRWIkzCSFpXPdTFoNILIx6lDbaGFmK4/Aq3MOV3daHMLtP1ItX EXTEBuZAATM7ilYJxvq4YQ+5vWhDib1BuZkO7mscAovbDH5TAiZCjhydEV7z7xdOD9scVb oQcv0mgAsdVeDzzC8zNvoqgFyPMgV5zrIhgjWlVmeDKlQptHbbwXYSPGkjDIvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687995956; a=rsa-sha256; cv=none; b=MrXDbOXtBE0BO8LSsXx6u6O6mKcoXOVSmDN/uVfeQsUe5Ww41xvleSYlWirAzd01pKjg87 yDHuIxSkttr3mbeFbY243s6fvlcG8tcj+wQ88U5VMKN0Mg415YpJY3Xg6M7IZqOmqEEprG g1Md3spCseC6F/AUjEIZqUGbRkqDb5QwaHFzeDGZ3cvP33KbCAewvrysu1grUF4iax63Js UuLyCJFGPEKlAGHtXHe7/QGQP4VD/7PFYZXdwwwTkbFbYJxSI5xCLrvL32QDVSCx0GxSJj LanSpNBPozMqH9WcUpEuTDSmHryRqON6hDgpLB+IIDe1j9GjN+dhiWiGy90mYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qryrh4VPbztbp; Wed, 28 Jun 2023 23:45: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 35SNjur4030104; Wed, 28 Jun 2023 23:45:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35SNjuKG030103; Wed, 28 Jun 2023 23:45:56 GMT (envelope-from git) Date: Wed, 28 Jun 2023 23:45:56 GMT Message-Id: <202306282345.35SNjuKG030103@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: fd774e065c5d - main - gdtoa: fix endianness issue on 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: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fd774e065c5d4df1f708a33139bf820ac8bfb7a7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=fd774e065c5d4df1f708a33139bf820ac8bfb7a7 commit fd774e065c5d4df1f708a33139bf820ac8bfb7a7 Author: Piotr Kubaj AuthorDate: 2023-06-28 23:41:56 +0000 Commit: Piotr Kubaj CommitDate: 2023-06-28 23:45:50 +0000 gdtoa: fix endianness issue on powerpc64le The current code assumes running on big-endian, which causes issues with e.g. strtod() as reported on https://github.com/ocaml/ocaml/pull/10837#issuecomment-1605346422 This is probably a leftover from when powerpc64le was introduced. Approved by: jhibbits (on IRC) --- lib/libc/powerpc64/gd_qnan.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/libc/powerpc64/gd_qnan.h b/lib/libc/powerpc64/gd_qnan.h index d70d8c318c4c..8ce5594b81b1 100644 --- a/lib/libc/powerpc64/gd_qnan.h +++ b/lib/libc/powerpc64/gd_qnan.h @@ -8,6 +8,19 @@ */ #define f_QNAN 0x7fc00000 +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define d_QNAN0 0x0 +#define d_QNAN1 0x7ff80000 +#define ld_QNAN0 0x0 +#define ld_QNAN1 0x7ff80000 +#define ld_QNAN2 0x0 +#define ld_QNAN3 0x0 +#define ldus_QNAN0 0x0 +#define ldus_QNAN1 0x0 +#define ldus_QNAN2 0x0 +#define ldus_QNAN3 0x7ff8 +#define ldus_QNAN4 0x0 +#else #define d_QNAN0 0x7ff80000 #define d_QNAN1 0x0 #define ld_QNAN0 0x7ff80000 @@ -19,3 +32,4 @@ #define ldus_QNAN2 0x0 #define ldus_QNAN3 0x0 #define ldus_QNAN4 0x0 +#endif From nobody Thu Jun 29 08:19: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 4QsBFn4XlMz4knSt; Thu, 29 Jun 2023 08:19: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 4QsBFn464dz3sbf; Thu, 29 Jun 2023 08:19:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9S0CGklsE3pzcPKa5nacwuCfy5k483OVsMimsTYWe7g=; b=EKVefaO5fY7gtiz8v/uy7N5/AZUhmSiKQ0iYmgN+7pPXlDakRkboBu1aARnxDZm7gD3nLz MWdtzdZDjXbOElkwbcj8lq3SRy7wqA6vbdG2qTDqECImeGbHgwdEOcW58QK1nv+COciaU8 u88L06JwE4Pydpp5qP7JX0AjnxbDkSjZKKGsh5oNETNjRuLI87LBxujYd0rZ67qNt+C4P7 Vx/I37Q4LOj9/uKh2jPBOip14jEiV4DrX/7k8WInv7RqrdUVC5GTTPUcPIRDkyicA58gVt WiBL1nu+3Z+CmO0KiTj02ikM678dgPGd0IR4GzGRwV/6lMIfAdG92Rcu35o7Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9S0CGklsE3pzcPKa5nacwuCfy5k483OVsMimsTYWe7g=; b=eg7SFjPhWzPbxSqcVwZCsH3hQ+FJNTNwsJjkTP6JhFRIUtEIUuxO1LzXE4qwDHsWmZ5YpI DMzL3QalWknMSHrJXcVijmWuHQV2/zKlw/xwRJnfnYmZNXjztXEvvg2+uZ23sEx6SfaIPQ Splg9vxWLetptIHLh/fWd8nLD2Nml13H5+YRK76/C108rzUolzWvZKclLVttKejCBUKS+s lpKEYA9ZdpqLOFA6ws73tWuiO2aOfDVSvBFRvLtI45Kp2zmyYg0QYIzRbAn7YuZc1SFuw7 B+lUubdgoF2icXEz/5D+JslNAgQPgyXv+MzLANNvZMZF1dmAaekbOCWxQOe5CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026797; a=rsa-sha256; cv=none; b=Sf8vxjOMT0WDo86CSoz0zERFTsaX/Je2xDctiwxqWhqKxOn2u4iNdk7iGRiu+9GfgS2ZsG nPv2yvL3T9RvnTe6c6wfAXz7R5gpynao0eNNBYvsCfkbbFd36c2pU8Rf8zlhG27utrLx0G 7V/10GPI7Hxx42wU902QPCePoqAolvaI9Ra0h2VLghnWZk95b5+uLEEKYbTk2hpGHivtBC LpDN3/Iqpthy7kjh/Xy0R5ue1xMv6JAGzy3fWIiJBkYoipG5DqasGC8HxAw9nlw3emh+2F EccUPwx6GyqpxaE/Ju+ookD2Qram2UoNM83A9NSDTyYWe3MeY7LoCxGI2D8mEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFn34S7z17QG; Thu, 29 Jun 2023 08:19: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 35T8JvO1074467; Thu, 29 Jun 2023 08:19:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8JvfF074466; Thu, 29 Jun 2023 08:19:57 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:19:57 GMT Message-Id: <202306290819.35T8JvfF074466@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: fdab8b794ac3 - stable/13 - linsysfs(4): Keep Linux compatible sysfs the same as Ubuntu List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: fdab8b794ac3e84dacf0fea586b330197baf6f76 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=fdab8b794ac3e84dacf0fea586b330197baf6f76 commit fdab8b794ac3e84dacf0fea586b330197baf6f76 Author: Vico Chen AuthorDate: 2023-03-25 10:41:04 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:13 +0000 linsysfs(4): Keep Linux compatible sysfs the same as Ubuntu By checking Ubuntu, there is no `/sys/subsystem' in sysfs. To compatible with Ubuntu, delete the 'subsystem' creation in Linux compatible module. On the other hand, the sysfs `/sys/subsystem' cause failure for some Linux udev cases. In Linux udev source code, there is a function named `scan_devices_all', and it will scan `/sys/subsystem' if it is existed, but now there are nothing in /sys/subsystem `, and it returns empty to cause some use cases failed. Reviewed by: dchagin Differential Revision: https://reviews.freebsd.org/D38885 MFC after: 1 month XMFC with: ifAPI (cherry picked from commit 1f0c8bfd650422a30aa6fcf01da860b8d43628a8) --- sys/compat/linsysfs/linsysfs.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/compat/linsysfs/linsysfs.c b/sys/compat/linsysfs/linsysfs.c index 9ec066ac34c4..afb4e6466006 100644 --- a/sys/compat/linsysfs/linsysfs.c +++ b/sys/compat/linsysfs/linsysfs.c @@ -680,9 +680,6 @@ linsysfs_init(PFS_INIT_ARGS) /* /sys/kernel/debug, mountpoint for lindebugfs. */ pfs_create_dir(kernel, "debug", NULL, NULL, NULL, 0); - /* /sys/subsystem/... */ - dir = pfs_create_dir(root, "subsystem", NULL, NULL, NULL, 0); - return (0); } From nobody Thu Jun 29 08:19: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 4QsBFp6MSbz4knT1; Thu, 29 Jun 2023 08:19: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 4QsBFp5YzWz3sWf; Thu, 29 Jun 2023 08:19:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=spX6D6rXptJzzDqCjK2llHo5OJX3f3dOKgQM1iAElL8=; b=fRFjYDqNZbBSsrmg/81SpcHonOrACLiee4i7z3gzmH8rfHk5sPG0H5BZ+Tsdivh4loKxGI R/a0+W0kQkm6U1ry5PEZb2g5CA1uCKCD0FWvU4u3fg1gJJl5lYKBdeRVb68l7g9MA4jTIj HPvkRZ72cyrhmDq11NaHAGVRx4oheBkof8nkKbjSaKVBA1e+8n3U7QlH/yJLi9ukP17QMB EGGiAqg0xt/XZHMUKs2DSjhJZOvu6k7zbcD8qoDlcuS8+xqWyROO8dHpZNIY0ov94wcRm5 nsJ9DzdlgAVEOCJDVZAoj9e1ladPPDjk0cJJcGg5a/TAz/ZcnCuG31U78+vDlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=spX6D6rXptJzzDqCjK2llHo5OJX3f3dOKgQM1iAElL8=; b=yRyWmKdjdF5MLXYQo80O2REMFB0vKVbRuX4w1u/NE/COWxPXBZihkSx2xrpw1FDJ2B+0Vy HSnKJ3C0e53e9/u+Bh8F05gK70o1GaqRcg0TUhUHnZKO3UQrVhT5zM7h3HiCIDkM7/zyca bUGeviHo3ANMVIdsfHhexaT/7Z5vj5msvJMgWcPGJ5+t2995WRd4cfNlnLJ5h+BqB5TmFg NOw8CMIFjdvbKyM+cWK/RovYpAhopdQ7fjhHThxNM7pSg/oEyljjUNbVZu6C/bhQO98bTg 4qui2SWSjBUROADsQdkGhdg+gb6nZvDyrHt8aeeYLRS4pvTsx4vwTjv+J7cRxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026798; a=rsa-sha256; cv=none; b=L9AwA8JuA3WfIN79k9R+VEgzD5zEz4TWvNXB37vo1MODgosHwUQvo631A7GtnBW2EHcBSY bgyZfsTGp2GJ9f+xU12hYgDibIDq86kzyRr41/riSRIMi7kG6k2ZPUReVQpGICWrw48cmh WH/k49cQmT95yfptvzjxPVo/It0U/Ih+fUFKokuMGAjoQSPrXUxGrXPDmsscH+t+F5HDGx Dbc8eIk2gY/qwNntCoBK/gmkxb0pcdCmIufb29zJ7DtDJtc5yBK8vL5aWsAzHoQ+8iy3Fk wb9i9ugOq3KTlgF4wiqJj9tFvzs7CfismgoQwvpI+fUNeMDc0y6Jb7T9g/n5wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFp3VrMz17q1; Thu, 29 Jun 2023 08:19: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 35T8JwBh074492; Thu, 29 Jun 2023 08:19:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8Jws5074491; Thu, 29 Jun 2023 08:19:58 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:19:58 GMT Message-Id: <202306290819.35T8Jws5074491@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: 14ee31bcccfb - stable/13 - pseudofs: Microoptimize struct pfs_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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 14ee31bcccfbd6ef14548f0129fcaa5a113e4c82 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=14ee31bcccfbd6ef14548f0129fcaa5a113e4c82 commit 14ee31bcccfbd6ef14548f0129fcaa5a113e4c82 Author: Dmitry Chagin AuthorDate: 2023-04-02 08:20:07 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:17 +0000 pseudofs: Microoptimize struct pfs_node Since 81167243b the size of struct pfs_node is 280 bytes, so the kernel memory allocator takes memory from 384 bytes sized bucket. However, the length of the node name is mostly short, e.g., for Linux emulation layer it is up to 16 bytes. The size of struct pfs_node w/o pfs_name is 152 bytes, i.e., we have 104 bytes left to fit the node name into the 256 bytes-sized bucket. Reviewed by: des Differential revision: https://reviews.freebsd.org/D39381 MFC after: 1 month (cherry picked from commit 7f72324346ea154a92671fc913dbe82c0287501a) --- sys/fs/pseudofs/pseudofs.c | 8 +++++--- sys/fs/pseudofs/pseudofs.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index 3c82021a8148..15a714e23bc6 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -72,18 +72,20 @@ pfs_alloc_node_flags(struct pfs_info *pi, const char *name, pfs_type_t type, int { struct pfs_node *pn; int malloc_flags; + size_t len; - KASSERT(strlen(name) < PFS_NAMELEN, + len = strlen(name); + KASSERT(len < PFS_NAMELEN, ("%s(): node name is too long", __func__)); if (flags & PFS_NOWAIT) malloc_flags = M_NOWAIT | M_ZERO; else malloc_flags = M_WAITOK | M_ZERO; - pn = malloc(sizeof *pn, M_PFSNODES, malloc_flags); + pn = malloc(sizeof(*pn) + len + 1, M_PFSNODES, malloc_flags); if (pn == NULL) return (NULL); mtx_init(&pn->pn_mutex, "pfs_node", NULL, MTX_DEF | MTX_DUPOK); - strlcpy(pn->pn_name, name, sizeof pn->pn_name); + memcpy(pn->pn_name, name, len); pn->pn_type = type; pn->pn_info = pi; return (pn); diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h index 158f74575e33..e355e5f5609f 100644 --- a/sys/fs/pseudofs/pseudofs.h +++ b/sys/fs/pseudofs/pseudofs.h @@ -219,7 +219,6 @@ struct pfs_info { * is not enforcable by WITNESS. */ struct pfs_node { - char pn_name[PFS_NAMELEN]; pfs_type_t pn_type; int pn_flags; struct mtx pn_mutex; @@ -240,6 +239,7 @@ struct pfs_node { struct pfs_node *pn_nodes; /* (o) */ struct pfs_node *pn_last_node; /* (o) */ struct pfs_node *pn_next; /* (p) */ + char pn_name[]; /* Keep it last */ }; /* From nobody Thu Jun 29 08:19: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 4QsBFr0m4mz4knQn; Thu, 29 Jun 2023 08:20: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 4QsBFq5Xh3z3sfY; Thu, 29 Jun 2023 08:19:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UuCvCVnvkPoFyG7yvPWqk771eCXXxBDghd3gQHZxggI=; b=TjPQhrREoa+8kOdzcme8vzcfg3Ws7eMHEIIwgs1XQgFpx2pRIQHsXzp4VZkz0HC8q/HxJm +KjKmTHe4QKWyq1mCKq2QGhgIl5C0q5Lrw0EAL3gD3ytvZ7N7DxDDt7eHSF2E9hXjHQKEN hBtTr8OGIWeV9l/lHnnLqCa2EWjjFJtMqoIpD1Fg/SMYV9COlFOraRkW8ocWX+mIdU6dT6 SQcI2UNoc37K1U8fWSZCwu7kPVl0c7LZ9UYWwx1v0Di6TRqePwRbUAi154ct5x7OwYeuhb IIsivWbYylPvoDo2/BV3LTpM0i10ygVmWXe28cwcsOHezMxoS9BgYXz+U8HL/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UuCvCVnvkPoFyG7yvPWqk771eCXXxBDghd3gQHZxggI=; b=hM1SYNDeMQazHhCofyhWkbytS6LmR4Y9thgknWF1HOM1vwUGQARhvsrVQ97fDpqlp23UcS +mFkE3Mo28oyvk2r//M3xJO5r2HmZBZpagSaCy7/szYNkjWg8MS9MiA6UkRU9shzmCPex9 5qJY6dpWSXmA8X/yRzGRytiFPUvEGIF3IVhkeo+JvEH7SxQ/20wpBZkHeaPKWAmVOd+91G pFGRmiRIkBPPYULzahomJYy6azjTDY8vN9bCKU7Oo8zbuQmYLTa/FPKj35ozHDAG3vXOeW yhBfPYZE3zMk7yXRsjKV3cujzp3itBR/IiZqOots7F/nbteSuoAvc2iiieNvgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026799; a=rsa-sha256; cv=none; b=dMhAGcR58f0dbgrQLM7ibfqJpMOsPhFBbaeIMBcol5bsJv/1pXcOL2LM+ZDG4Dbv/HmhM+ I1mdsgtGo6XRB9Ka4nLhitD3+ThwXrKyZH4rEAGrH2dCOF5zmkD/K/vjlBcHB1BhinxvCw r1cdbpDp7QjGf8aU5taDijuexRX9aGlx5xnfKRx9YOBqR9LjcfgQAqgdxWN4GzZ329n0XM mQO789e2wfkRJ07ziXSBxhPEZ/WH7T+BKxM0/CKk4x3Qzj5fLF4JVW3W2YATSCYXJ2FxVD SI9C+waVyyNAKpPHCk9mEUxrNg38rqiXPPTlJwuoKQGD9n6FrT62wvAqchaS3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFq4cMhz17sN; Thu, 29 Jun 2023 08:19: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 35T8JxFh074511; Thu, 29 Jun 2023 08:19:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8JxD9074510; Thu, 29 Jun 2023 08:19:59 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:19:59 GMT Message-Id: <202306290819.35T8JxD9074510@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: c38bb48b04c9 - stable/13 - pseudofs: Allow vis callback to be called for a named 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c38bb48b04c9bb24e549eee6a099d9f9362b1ae8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c38bb48b04c9bb24e549eee6a099d9f9362b1ae8 commit c38bb48b04c9bb24e549eee6a099d9f9362b1ae8 Author: Dmitry Chagin AuthorDate: 2023-04-02 08:21:15 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:17 +0000 pseudofs: Allow vis callback to be called for a named node This will be used later in the linsysfs module to filter out VNETs. Reviewed by: des Differential revision: https://reviews.freebsd.org/D39382 MFC after: 1 month (cherry picked from commit 405c0c04edb6143405426da6a5273f4c5998d594) --- sys/fs/pseudofs/pseudofs_internal.h | 7 ++++--- sys/fs/pseudofs/pseudofs_vnops.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/fs/pseudofs/pseudofs_internal.h b/sys/fs/pseudofs/pseudofs_internal.h index 2cc8f32b1d01..85df317d30cc 100644 --- a/sys/fs/pseudofs/pseudofs_internal.h +++ b/sys/fs/pseudofs/pseudofs_internal.h @@ -156,9 +156,10 @@ pn_vis(PFS_VIS_ARGS) { PFS_TRACE(("%s", pn->pn_name)); - KASSERT(pn->pn_vis != NULL, ("%s(): no callback", __func__)); - KASSERT(p != NULL, ("%s(): no process", __func__)); - PROC_LOCK_ASSERT(p, MA_OWNED); + if (pn->pn_vis == NULL) + return (1); + if (p != NULL) + PROC_LOCK_ASSERT(p, MA_OWNED); pfs_assert_not_owned(pn); return ((pn->pn_vis)(PFS_VIS_ARGNAMES)); } diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index 29bb1544e7ad..f58b1f8bdc47 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -119,7 +119,7 @@ pfs_visible(struct thread *td, struct pfs_node *pn, pid_t pid, if (p) *p = NULL; if (pid == NO_PID) - PFS_RETURN (1); + PFS_RETURN (pn_vis(td, NULL, pn)); proc = pfind(pid); if (proc == NULL) PFS_RETURN (0); @@ -826,7 +826,7 @@ pfs_iterate(struct thread *td, struct proc *proc, struct pfs_node *pd, } else if (proc != NULL) { visible = pfs_visible_proc(td, *pn, proc); } else { - visible = 1; + visible = pn_vis(td, NULL, *pn); } if (!visible) goto again; From nobody Thu Jun 29 08:20: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 4QsBFr738xz4knFs; Thu, 29 Jun 2023 08:20: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 4QsBFr61Lgz3slK; Thu, 29 Jun 2023 08:20:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=McZ/o/sYj5pdub2ENN2M/5DPqUwKIhvL4UbnO3QV7mY=; b=ewmZML1UeBEBKI+o2JLAGv9t8wcja9JDwlsrtwIYeOkmZU58rsw6ou9j7iFc5w6ZuV52kY 60g0j/A2aWcDLvMVa1YXX/NlL3Gt0eSHY4HPYsasbNBHZGqqz/FEFJS8jILs+zCK2M0cPK ojxkvXoEbN389764BsgInc7eqvyRfRvNFJIEfooMfoh9bEFEYoUfBsDLpH11r1wDohwEy1 kJEyu/Q+ATCmyTqA9j7xce8TIlUe39tLKTGNSerZ3XMkR0DPPXlOEd8YPtofwlsZscxWsE fw5hMjyafKDzXMiKWhRyc1aSNDaQMLnAAzlZZW7eycYREZl/IqOzIY+Ptzq8tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=McZ/o/sYj5pdub2ENN2M/5DPqUwKIhvL4UbnO3QV7mY=; b=hIrEjWs7o/iNKJam/DOTdYXeG3tazgpOipQX0LpTYrU9zIYT2M6n1oZOXvNwRaYtjJIkhF pTrcPQVB2kobqmOm3FQmJYwXrLGOTNtowPIuQ29exY4uXKsHPkg8BaeLqYdTodFM+X8/n1 mi9gfTvQh7J+Z55sP2IbWy3BIDNtsX2qemCCf79ZNhYWN8uPusbb3PROBYQoY3RzqLVOQz Ka9Kpx1RU5X7py9KrvMVHzenOjwxc/h4nFGUXR6w/KDggC8dKPP86MMoCTEQFKpHE4+PbY PfFjd2mEaQFqeCyUQFGga7p02eKzZ1hFoCz8bgHRsWnnOD5dDxY9eo1z1s2xnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026800; a=rsa-sha256; cv=none; b=SgkmIPArFr0wgW29L4KlfpF+UR87cNCTos7Bg+Et4Qg0S+eM4tmLvDrKQmPfRiUPS9PBm7 CUJ/TDwvWUP48r47nr+JCf7J18eo9lDHMVLvmNFQgrBNTH6ztrylxAOqD6CN+gzySOZKL2 Rtsup1MPQsu2VTbvQWCl/5nIV3MbM+qJSrmIQfn9CODK1MpmP5NhDEMQZ1ERWKX89QXUvW tu38xCz5IYY7DiH+zy6QYfMdXFNOiz3gbv+JCHDrr/38V/7ca0f6+SNutnHLa8Mj9W3KZE csMi+rBLYSukg3R20z5B1bzFatAkUjWAAFDzEZrQEHkL+Cl7QXOQZZuajkgAiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFr52lnz17gd; Thu, 29 Jun 2023 08:20: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 35T8K0o5075734; Thu, 29 Jun 2023 08:20:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K0XL075715; Thu, 29 Jun 2023 08:20:00 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:00 GMT Message-Id: <202306290820.35T8K0XL075715@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: b73e978d7d17 - stable/13 - pseudofs: Simplify pfs_visible_proc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: b73e978d7d17c8e7c995d631c722c654b12df1cd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b73e978d7d17c8e7c995d631c722c654b12df1cd commit b73e978d7d17c8e7c995d631c722c654b12df1cd Author: Dmitry Chagin AuthorDate: 2023-04-02 08:24:10 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:17 +0000 pseudofs: Simplify pfs_visible_proc Reviewed by: des Differential revision: https://reviews.freebsd.org/D39383 MFC after: 1 month (cherry picked from commit a32ed5ec05d9bc01b8e70b45ff510d2f972a0877) --- sys/fs/pseudofs/pseudofs_vnops.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index f58b1f8bdc47..e0c795ed2a25 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -90,21 +90,17 @@ pn_fileno(struct pfs_node *pn, pid_t pid) static int pfs_visible_proc(struct thread *td, struct pfs_node *pn, struct proc *proc) { - int visible; if (proc == NULL) return (0); PROC_LOCK_ASSERT(proc, MA_OWNED); - visible = ((proc->p_flag & P_WEXIT) == 0); - if (visible) - visible = (p_cansee(td, proc) == 0); - if (visible && pn->pn_vis != NULL) - visible = pn_vis(td, proc, pn); - if (!visible) + if ((proc->p_flag & P_WEXIT) != 0) return (0); - return (1); + if (p_cansee(td, proc) != 0) + return (0); + return (pn_vis(td, proc, pn)); } static int From nobody Thu Jun 29 08:20: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 4QsBFt0JMsz4knY7; Thu, 29 Jun 2023 08:20: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 4QsBFs6tsNz3srP; Thu, 29 Jun 2023 08:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026802; h=from:from:reply-to:subject:subject: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/Rz9zNb/GnAJKbzBTxMcr6SncfBKCZpmcCU40brrDI=; b=KDPsyZsM8h4lH0MjzmK+6eWwJuAgnk5YHQ1vqmOIChw0I6DAwKp62c++DbCD8OzIW3gjmf c/ueM1Q1mhw5EYKiPRLa1cDP0Q/uO+gr1tvFApgtJKHi0alrOy2v4/qhiQVljwkEIIsfHG ejhtxKwwvPXFZqHLuDb1NPQvGIMr661e+u+SAXTHlCugk/uKQIIp4RYZ/OXJDXEmYOzWwF AIm7iowwJFLAV4P3nEt9H8feGPZYbp9ORvPF7LJRyJPxV3E8NCNO93jL6Z9yV9ftXJP+1B fQALTHa/Yoj6muGAIGNaKm5IpMOqsnLNLHayAhsHPVyHrZ5reDju6mTYGCvsdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026802; h=from:from:reply-to:subject:subject: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/Rz9zNb/GnAJKbzBTxMcr6SncfBKCZpmcCU40brrDI=; b=GnI1w91BjJphXOs8oEI8rseCTQ8ot7NtO+6dQVEXlub+JSv1T/jrdvjtNe6VlsYPvrrs1z TFEVaI9XNPfNxU1zSvPSwcwWTTvtKrgA4Hc/ZiPfTjXBGRmPeZn5f73TxOLQ+sebrarpuL KXiE2nESxDPoGOVKAN315b0y4yjEzZqdRG3P1ruDpNF3BEAl1Q/qs0uLSttyWowniZZ1Ou qwa+78Zh5pu5Uuk3JvUhMNZZr0kBKYKWkWwuVv5RzUPXoRDPAmjM2kaRiM/ertxSNpq5ud KjeaTpVnTCWjmiv2XiVAuAjqBB+qBSya8BgKTGQx7/V5Kn1BVhLOjYkE+bAOFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026802; a=rsa-sha256; cv=none; b=MzP1XcmloGpxtqoMYDACKgjnSXGOeIukKY4jxGQ+UTBTNneixkRn6Haxva23jRGXq1wZZt Uanw/qbngkeGUb8m7elgYt4y9rsaYTzXMepDAjhyi2w716hMIuqZ+JPglF+7cdSgNYUrob 57CA6YWmWPsAGJikDX86Xil6Dy8Hq8COKcFdxc9MWkvVFMmb1zHusPOYRG7ZD991VgiWM0 Je55sLHCPH2ss8QtMBfa0/om3skMTwjEZo3Qs/W+W3b/uQnL/IoVtjrWeSyN8TonktVZLp JqldhGFnVIIHuLvZ7ID3t6Zj77eV72agGpZf97GX4/5s2qTd9yRzC4kH+C1t1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFs5Y6Hz17QJ; Thu, 29 Jun 2023 08:20: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 35T8K1w9076471; Thu, 29 Jun 2023 08:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K1pg076468; Thu, 29 Jun 2023 08:20:01 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:01 GMT Message-Id: <202306290820.35T8K1pg076468@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: 49f134373de6 - stable/13 - linux(4): Modify close_range syscall to match 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 49f134373de627561875087827dc1508405a89e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=49f134373de627561875087827dc1508405a89e3 commit 49f134373de627561875087827dc1508405a89e3 Author: Dmitry Chagin AuthorDate: 2023-04-04 20:23:24 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:18 +0000 linux(4): Modify close_range syscall to match Linux MFC after: 2 weeks (cherry picked from commit 1c27dce1f8979e7bbe3ca51f4f2db38b202042a0) --- sys/amd64/linux/syscalls.master | 8 ++++++-- sys/amd64/linux32/syscalls.master | 8 ++++++-- sys/arm64/linux/syscalls.master | 8 ++++++-- sys/i386/linux/syscalls.master | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 896bbcc5e652..90476b15433f 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -2097,8 +2097,12 @@ l_size_t usize ); } -436 AUE_NULL STD { - int linux_close_range(void); +436 AUE_CLOSERANGE STD { + int linux_close_range( + l_uint first, + l_uint last, + l_uint flags + ); } 437 AUE_NULL STD { int linux_openat2(void); diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 935f44d5b34f..4561667dc3cc 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -2524,8 +2524,12 @@ l_size_t usize ); } -436 AUE_NULL STD { - int linux_close_range(void); +436 AUE_CLOSERANGE STD { + int linux_close_range( + l_uint first, + l_uint last, + l_uint flags + ); } 437 AUE_NULL STD { int linux_openat2(void); diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index c31e85956ca2..647fd0262e8c 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -1771,8 +1771,12 @@ l_size_t usize ); } -436 AUE_NULL STD { - int linux_close_range(void); +436 AUE_CLOSERANGE STD { + int linux_close_range( + l_uint first, + l_uint last, + l_uint flags + ); } 437 AUE_NULL STD { int linux_openat2(void); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index d0e23e90cc38..a5b246c0822a 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -2542,8 +2542,12 @@ l_size_t usize ); } -436 AUE_NULL STD { - int linux_close_range(void); +436 AUE_CLOSERANGE STD { + int linux_close_range( + l_uint first, + l_uint last, + l_uint flags + ); } 437 AUE_NULL STD { int linux_openat2(void); From nobody Thu Jun 29 08:20: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 4QsBFt6t1Jz4knJC; Thu, 29 Jun 2023 08:20: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 4QsBFt6gtDz3spR; Thu, 29 Jun 2023 08:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p/3X3xGkAlQDiV23cMrgTfow17HDPQiJXcQNPugLRuM=; b=r/Fiw5pqdSSL8tumfebZdHJvTPRGjEEc0raIhFR6GuL8lXJY+SLT5SZQJcutgkR7pcb+A9 3VMGiSl4hOb1geOYMcQS6DGCToFbi62vNvae9naHQhV8TOinrkz+FIi6vvM3kVzmaaJufo IOBk3PcrnCXWZXUoQYx8WGpPJ0YJbOkVTftxQOkL2uuuozB4zJlhZtlSdhle460q7ySYSj FaXEOxxfTBYOzYiv1LjwgczzzmQ3B5bCagcReWXW08C45NM55j0eUAkKIOU50LBfMVzMfa nHG210ekU1nrczgnkfgfuArTHrj5dj1wSSXS6pMjOTIibr3muvvmOr1mc9QDsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p/3X3xGkAlQDiV23cMrgTfow17HDPQiJXcQNPugLRuM=; b=RX1WUpv04nJBM65RKeOocOix7PLU+2/yya1Xo/9C9StxwZqpG4oPy0NkVPFx+QI/a1vhyv dUoOnXing05JxMqt9ATUtnDNvup0ayCFbHLIBS8bTsymWnN/yvPG4HUzf+swCYaoWdfl/O khBDt8aO7iE2HjvIMiziD4WHWQjoddA9p7O0Fg1uEMSAN3T+Uf5Xp8hxbHudPA6fDoIogh nuru/qnT36Mo55x9oGnW+MXiX0D+yGCw9awzYOOhlZ82lMAmONwnqoWr7wUv9SaF5LNCjU 4a7s8zoCnm4xsRFKVaktGnye33SJ6xvLy+I+4435UPv68LiY2f9bsepXPowsdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026802; a=rsa-sha256; cv=none; b=i7FW7iXndBiBvlCEbNRFFNNiZwrFMzGjLBAIbS7t/+QJYo7klpFwnA+PdK0b34WVJhGUxS 4YS1f3XOtJpCdz6Ao6vi2sY5xINa8LEPZCUJyVJYkOzQfu3FV8jUS6qpKJvqATgwlSb9jh Ul8vWxHm35SQvO9CHjW/Sr2tiYzYbJDoPJ7j5aMiNW0efX9T3HTJRfEmWuA7QZO+mjeEBW cHRYrYkypgHwi2MFBJUl7sWwf3f0CcaCXJxvqPbvK/7+2fA85E1hELcamUlK3naCmjxs2W yrp3DbHiPwtz4iqq8zZzOujawbtHJf286kZtr0kdlKN//jSDnwY80iW+psrQew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFt5cSwz17sP; Thu, 29 Jun 2023 08:20: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 35T8K2sR076730; Thu, 29 Jun 2023 08:20:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K2pD076723; Thu, 29 Jun 2023 08:20:02 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:02 GMT Message-Id: <202306290820.35T8K2pD076723@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: 416e0455c488 - stable/13 - linux(4): Regen for close_range syscall List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 416e0455c488d500537911c4e54f356036de7cba Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=416e0455c488d500537911c4e54f356036de7cba commit 416e0455c488d500537911c4e54f356036de7cba Author: Dmitry Chagin AuthorDate: 2023-04-04 20:23:37 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:22 +0000 linux(4): Regen for close_range syscall MFC after: 2 weeks (cherry picked from commit 50111714f5a46add66264d48456c32b7d3d0036a) --- sys/amd64/linux/linux_proto.h | 6 ++++-- sys/amd64/linux/linux_sysent.c | 2 +- sys/amd64/linux/linux_systrace_args.c | 22 +++++++++++++++++++++- sys/amd64/linux32/linux32_proto.h | 6 ++++-- sys/amd64/linux32/linux32_sysent.c | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 22 +++++++++++++++++++++- sys/arm64/linux/linux_proto.h | 6 ++++-- sys/arm64/linux/linux_sysent.c | 2 +- sys/arm64/linux/linux_systrace_args.c | 22 +++++++++++++++++++++- sys/i386/linux/linux_proto.h | 6 ++++-- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 22 +++++++++++++++++++++- 12 files changed, 104 insertions(+), 16 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index de8456e16562..fcb4a718a665 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -1363,7 +1363,9 @@ struct linux_clone3_args { char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)]; }; struct linux_close_range_args { - register_t dummy; + char first_l_[PADL_(l_uint)]; l_uint first; char first_r_[PADR_(l_uint)]; + char last_l_[PADL_(l_uint)]; l_uint last; char last_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_openat2_args { register_t dummy; @@ -2028,7 +2030,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_fspick AUE_NULL #define LINUX_SYS_AUE_linux_pidfd_open AUE_NULL #define LINUX_SYS_AUE_linux_clone3 AUE_NULL -#define LINUX_SYS_AUE_linux_close_range AUE_NULL +#define LINUX_SYS_AUE_linux_close_range AUE_CLOSERANGE #define LINUX_SYS_AUE_linux_openat2 AUE_NULL #define LINUX_SYS_AUE_linux_pidfd_getfd AUE_NULL #define LINUX_SYS_AUE_linux_faccessat2 AUE_NULL diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index 708ae7e50c72..23f923402f9d 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -453,7 +453,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */ { .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */ + { .sy_narg = AS(linux_close_range_args), .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_CLOSERANGE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */ { .sy_narg = AS(linux_faccessat2_args), .sy_call = (sy_call_t *)linux_faccessat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 439 = linux_faccessat2 */ diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 44d2b92b066c..d03f99f10f26 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -2695,7 +2695,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_close_range */ case 436: { - *n_args = 0; + struct linux_close_range_args *p = params; + iarg[0] = p->first; /* l_uint */ + iarg[1] = p->last; /* l_uint */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; break; } /* linux_openat2 */ @@ -7077,6 +7081,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_close_range */ case 436: + switch (ndx) { + case 0: + p = "l_uint"; + break; + case 1: + p = "l_uint"; + break; + case 2: + p = "l_uint"; + break; + default: + break; + }; break; /* linux_openat2 */ case 437: @@ -8607,6 +8624,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_close_range */ case 436: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_openat2 */ case 437: /* linux_pidfd_getfd */ diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index a03ae004ff7d..d76b685b17e6 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1669,7 +1669,9 @@ struct linux_clone3_args { char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)]; }; struct linux_close_range_args { - register_t dummy; + char first_l_[PADL_(l_uint)]; l_uint first; char first_r_[PADR_(l_uint)]; + char last_l_[PADL_(l_uint)]; l_uint last; char last_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_openat2_args { register_t dummy; @@ -2466,7 +2468,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_fspick AUE_NULL #define LINUX32_SYS_AUE_linux_pidfd_open AUE_NULL #define LINUX32_SYS_AUE_linux_clone3 AUE_NULL -#define LINUX32_SYS_AUE_linux_close_range AUE_NULL +#define LINUX32_SYS_AUE_linux_close_range AUE_CLOSERANGE #define LINUX32_SYS_AUE_linux_openat2 AUE_NULL #define LINUX32_SYS_AUE_linux_pidfd_getfd AUE_NULL #define LINUX32_SYS_AUE_linux_faccessat2 AUE_NULL diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index 9e24074d30ed..51697f74d360 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -453,7 +453,7 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */ { .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */ + { .sy_narg = AS(linux_close_range_args), .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_CLOSERANGE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */ { .sy_narg = AS(linux_faccessat2_args), .sy_call = (sy_call_t *)linux_faccessat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 439 = linux_faccessat2 */ diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 8fc22b1910b3..8dd85ea9720a 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3209,7 +3209,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_close_range */ case 436: { - *n_args = 0; + struct linux_close_range_args *p = params; + iarg[0] = p->first; /* l_uint */ + iarg[1] = p->last; /* l_uint */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; break; } /* linux_openat2 */ @@ -8456,6 +8460,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_close_range */ case 436: + switch (ndx) { + case 0: + p = "l_uint"; + break; + case 1: + p = "l_uint"; + break; + case 2: + p = "l_uint"; + break; + default: + break; + }; break; /* linux_openat2 */ case 437: @@ -10273,6 +10290,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_close_range */ case 436: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_openat2 */ case 437: /* linux_pidfd_getfd */ diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index 1bff7e30c71f..edfd1d088654 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -1173,7 +1173,9 @@ struct linux_clone3_args { char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)]; }; struct linux_close_range_args { - register_t dummy; + char first_l_[PADL_(l_uint)]; l_uint first; char first_r_[PADR_(l_uint)]; + char last_l_[PADL_(l_uint)]; l_uint last; char last_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_openat2_args { register_t dummy; @@ -1740,7 +1742,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_fspick AUE_NULL #define LINUX_SYS_AUE_linux_pidfd_open AUE_NULL #define LINUX_SYS_AUE_linux_clone3 AUE_NULL -#define LINUX_SYS_AUE_linux_close_range AUE_NULL +#define LINUX_SYS_AUE_linux_close_range AUE_CLOSERANGE #define LINUX_SYS_AUE_linux_openat2 AUE_NULL #define LINUX_SYS_AUE_linux_pidfd_getfd AUE_NULL #define LINUX_SYS_AUE_linux_faccessat2 AUE_NULL diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 45cf61a5a6e2..5f6124b83c97 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -453,7 +453,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */ { .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */ + { .sy_narg = AS(linux_close_range_args), .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_CLOSERANGE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */ { .sy_narg = AS(linux_faccessat2_args), .sy_call = (sy_call_t *)linux_faccessat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 439 = linux_faccessat2 */ diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 3e87921a99a4..d57ad97796cd 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -2317,7 +2317,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_close_range */ case 436: { - *n_args = 0; + struct linux_close_range_args *p = params; + iarg[0] = p->first; /* l_uint */ + iarg[1] = p->last; /* l_uint */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; break; } /* linux_openat2 */ @@ -6152,6 +6156,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_close_range */ case 436: + switch (ndx) { + case 0: + p = "l_uint"; + break; + case 1: + p = "l_uint"; + break; + case 2: + p = "l_uint"; + break; + default: + break; + }; break; /* linux_openat2 */ case 437: @@ -7467,6 +7484,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_close_range */ case 436: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_openat2 */ case 437: /* linux_pidfd_getfd */ diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index f86a5a0bb136..f877c94a73fb 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1662,7 +1662,9 @@ struct linux_clone3_args { char usize_l_[PADL_(l_size_t)]; l_size_t usize; char usize_r_[PADR_(l_size_t)]; }; struct linux_close_range_args { - register_t dummy; + char first_l_[PADL_(l_uint)]; l_uint first; char first_r_[PADR_(l_uint)]; + char last_l_[PADL_(l_uint)]; l_uint last; char last_r_[PADR_(l_uint)]; + char flags_l_[PADL_(l_uint)]; l_uint flags; char flags_r_[PADR_(l_uint)]; }; struct linux_openat2_args { register_t dummy; @@ -2463,7 +2465,7 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_fspick AUE_NULL #define LINUX_SYS_AUE_linux_pidfd_open AUE_NULL #define LINUX_SYS_AUE_linux_clone3 AUE_NULL -#define LINUX_SYS_AUE_linux_close_range AUE_NULL +#define LINUX_SYS_AUE_linux_close_range AUE_CLOSERANGE #define LINUX_SYS_AUE_linux_openat2 AUE_NULL #define LINUX_SYS_AUE_linux_pidfd_getfd AUE_NULL #define LINUX_SYS_AUE_linux_faccessat2 AUE_NULL diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index 4328cae47f0c..de0493a6dda6 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -453,7 +453,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fspick, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 433 = linux_fspick */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_open, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 434 = linux_pidfd_open */ { .sy_narg = AS(linux_clone3_args), .sy_call = (sy_call_t *)linux_clone3, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 435 = linux_clone3 */ - { .sy_narg = 0, .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */ + { .sy_narg = AS(linux_close_range_args), .sy_call = (sy_call_t *)linux_close_range, .sy_auevent = AUE_CLOSERANGE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 436 = linux_close_range */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_openat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 437 = linux_openat2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pidfd_getfd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 438 = linux_pidfd_getfd */ { .sy_narg = AS(linux_faccessat2_args), .sy_call = (sy_call_t *)linux_faccessat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 439 = linux_faccessat2 */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 419c067199c0..27d277e98aa3 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3248,7 +3248,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) } /* linux_close_range */ case 436: { - *n_args = 0; + struct linux_close_range_args *p = params; + iarg[0] = p->first; /* l_uint */ + iarg[1] = p->last; /* l_uint */ + iarg[2] = p->flags; /* l_uint */ + *n_args = 3; break; } /* linux_openat2 */ @@ -8533,6 +8537,19 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_close_range */ case 436: + switch (ndx) { + case 0: + p = "l_uint"; + break; + case 1: + p = "l_uint"; + break; + case 2: + p = "l_uint"; + break; + default: + break; + }; break; /* linux_openat2 */ case 437: @@ -10379,6 +10396,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_close_range */ case 436: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_openat2 */ case 437: /* linux_pidfd_getfd */ From nobody Thu Jun 29 08:20: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 4QsBFw2vSTz4knTN; Thu, 29 Jun 2023 08:20: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 4QsBFv6zmVz3snF; Thu, 29 Jun 2023 08:20:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x0ZCR8M3XYE5hjadg4lDgXE+bm+2xfDS62y6f8Xyp8U=; b=IwygQHGi8lnN9YgsS5K0MFeFx/+QBEV9I1NcCYeZ9bXgEu4uf1ToMFqGShsTr4YlotpH+n gtK0nMeHfIoB34f5X89SjCUWzFtHHtHTJrUuyjZHtgXnqWECucfhD1c/ZTwILF7WyrlfI7 p2sEooBjDG2MrsvTi5w+54BUqIywfBhoyhxkUwtdoZZjg1gHfUSg427DypUsRSxksEqxi8 AQmJ1+4Zi+S4i/WONhpyZig8X8gBpj3wdK28Hngqgyx0HsCLVN4ZxApJVutH3pCaiZC9GC AY+VZy5xhIlYRzBw1zaAKMkBDEO1rYhV5fLv5MVvF2XD5UQc0egcuWwCVxWJxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x0ZCR8M3XYE5hjadg4lDgXE+bm+2xfDS62y6f8Xyp8U=; b=OMDUW0KusGGR3UxaEDZAsfYYC9C9b8Y0L9dVgMh2FdxHGHCey3RCIPPo+UQeDLcQ+/Sq8X w56s8EYdytngJTfEZU2s6+j1O8z1J9bUG2Z2J6Z4YHyCVZDIWUt5AFV+bsk4zfThVP5HT1 23uBq46UKBrlIJ6d8kalaekBnTOZ+Ed2xsz421S8p+pet01evFOO6T8n5F+lhoYadfn4CP izx7j9KYlTlEGRId/1y+FVVcar/KEN8yfxeVQikdkTdY264snEohslS7xzezLdttxd6+r9 oUOI+LvHSWO7d1j6ByAXmbzZHh1BZxmXzZRYoG+n19FI1/EHhiKbnL8xf6B92w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026804; a=rsa-sha256; cv=none; b=SZ/cLXSWBGCMhJZAyDzIIk6tWiwne46/MCqeNf8zv+3NiHDVkzdnimPmaN1vXPi0PFSEX9 7Di4726bfwiKV6w2vW+u/SU9v9AzNZQH3OskK2QQ3yT4dO58RmCRxxl90y5HpYPavdNgMp NvDD6RFhDAT42hV86IJiQBdZFWhFiT+EQApArw5FxMpG+OCmkOd9aRr3yddQ2DEi65ewG1 dYjL4xXLfDkl2Fz4ZMe+CRIwH3OXJJACXxxHyzSkMNx4DR+yw/yadtNBRcF7jf2nMsguEC B4D3ypXpq/pc7UDmlSfdWMT7esHK+rixiW6om4tNZBT9zhRY/INlCCdLnLI6uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFv642Pz17NM; Thu, 29 Jun 2023 08:20: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 35T8K3NF076975; Thu, 29 Jun 2023 08:20:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K3mE076972; Thu, 29 Jun 2023 08:20:03 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:03 GMT Message-Id: <202306290820.35T8K3mE076972@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: 10b49af72e5d - stable/13 - linux(4): Deduplicate linux_copyout_auxargs() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 10b49af72e5d9f4ac0fdfa9f239f48022604cae5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=10b49af72e5d9f4ac0fdfa9f239f48022604cae5 commit 10b49af72e5d9f4ac0fdfa9f239f48022604cae5 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:16:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:26 +0000 linux(4): Deduplicate linux_copyout_auxargs() Export default MINSIGSTKSZ value for the x86 until we do not preserve AVX registers in the signal context. Differential Revision: https://reviews.freebsd.org/D39644 MFC after: 1 month (cherry picked from commit 7d8c98398302b939b97310d31883ebdab8c0b938) --- sys/amd64/linux/linux.h | 2 +- sys/amd64/linux/linux_sysvec.c | 56 ++++++--------------------------- sys/amd64/linux32/linux.h | 2 +- sys/amd64/linux32/linux32_sysvec.c | 64 ++++++-------------------------------- sys/arm64/linux/linux_sysvec.c | 58 +++++----------------------------- sys/compat/linux/linux_elf.c | 54 ++++++++++++++++++++++++++++++++ sys/compat/linux/linux_elf.h | 2 ++ sys/i386/linux/linux.h | 2 +- sys/i386/linux/linux_sysvec.c | 64 +++++++------------------------------- 9 files changed, 98 insertions(+), 206 deletions(-) diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index b31b520cb573..305c4c43a471 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -90,7 +90,7 @@ typedef struct { /* * Miscellaneous */ -#define LINUX_AT_COUNT 20 /* Count of used aux entry types. */ +#define LINUX_AT_COUNT 21 /* Count of used aux entry types. */ struct l___sysctl_args { diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 2ad1868db8d4..5e7bc96d0148 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -206,52 +206,14 @@ linux_set_fork_retval(struct thread *td) frame->tf_rax = 0; } -static int -linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) +void +linux64_arch_copyout_auxargs(struct image_params *imgp, Elf_Auxinfo **pos) { - Elf_Auxargs *args; - Elf_Auxinfo *argarray, *pos; - struct proc *p; - int error, issetugid; - - p = imgp->proc; - args = (Elf64_Auxargs *)imgp->auxargs; - argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, - M_WAITOK | M_ZERO); - - issetugid = p->p_flag & P_SUGID ? 1 : 0; - AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, linux_vdso_base); - AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); - AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); - AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); - AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); - AUXARGS_ENTRY(pos, AT_PHENT, args->phent); - AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); - AUXARGS_ENTRY(pos, AT_BASE, args->base); - AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); - AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); - AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); - AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); - AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); - AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); - AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); - AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); - AUXARGS_ENTRY(pos, LINUX_AT_HWCAP2, 0); - if (imgp->execpathp != 0) - AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); - if (args->execfd != -1) - AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); - AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); - AUXARGS_ENTRY(pos, AT_NULL, 0); - - free(imgp->auxargs, M_TEMP); - imgp->auxargs = NULL; - KASSERT(pos - argarray <= LINUX_AT_COUNT, ("Too many auxargs")); - - error = copyout(argarray, (void *)base, - sizeof(*argarray) * LINUX_AT_COUNT); - free(argarray, M_TEMP); - return (error); + + AUXARGS_ENTRY((*pos), LINUX_AT_SYSINFO_EHDR, linux_vdso_base); + AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP, cpu_feature); + AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP2, 0); + AUXARGS_ENTRY((*pos), LINUX_AT_PLATFORM, PTROUT(linux_platform)); } /* @@ -622,7 +584,7 @@ struct sysentvec elf_linux_sysvec = { .sv_psstrings = LINUX_PS_STRINGS_LA48, .sv_psstringssz = sizeof(struct ps_strings), .sv_stackprot = VM_PROT_ALL, - .sv_copyout_auxargs = linux_copyout_auxargs, + .sv_copyout_auxargs = __linuxN(copyout_auxargs), .sv_copyout_strings = __linuxN(copyout_strings), .sv_setregs = linux_exec_setregs, .sv_fixlimit = NULL, @@ -637,6 +599,8 @@ struct sysentvec elf_linux_sysvec = { .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap = linux_vsyscall, + .sv_hwcap = NULL, + .sv_hwcap2 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index c77897344506..0449790bd981 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -103,7 +103,7 @@ typedef struct { /* * Miscellaneous */ -#define LINUX_AT_COUNT 21 /* Count of used aux entry types. +#define LINUX_AT_COUNT 22 /* Count of used aux entry types. * Keep this synchronized with * linux_fixup_elf() code. */ diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index a67f2166deb0..2a7860cc3381 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -139,61 +139,15 @@ LINUX_VDSO_SYM_INTPTR(kern_tsc_selector); LINUX_VDSO_SYM_INTPTR(kern_cpu_selector); LINUX_VDSO_SYM_CHAR(linux_platform); -static int -linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) +void +linux32_arch_copyout_auxargs(struct image_params *imgp, Elf_Auxinfo **pos) { - Elf32_Auxargs *args; - Elf32_Auxinfo *argarray, *pos; - int error, issetugid; - - args = (Elf32_Auxargs *)imgp->auxargs; - argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, - M_WAITOK | M_ZERO); - - issetugid = imgp->proc->p_flag & P_SUGID ? 1 : 0; - AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO, __kernel_vsyscall); - AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, linux_vdso_base); - AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); - AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); - /* - * Do not export AT_CLKTCK when emulating Linux kernel prior to 2.4.0, - * as it has appeared in the 2.4.0-rc7 first time. - * Being exported, AT_CLKTCK is returned by sysconf(_SC_CLK_TCK), - * glibc falls back to the hard-coded CLK_TCK value when aux entry - * is not present. - * Also see linux_times() implementation. - */ - if (linux_kernver(curthread) >= LINUX_KERNVER_2004000) - AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); - AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); - AUXARGS_ENTRY(pos, AT_PHENT, args->phent); - AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); - AUXARGS_ENTRY(pos, AT_BASE, args->base); - AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); - AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); - AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); - AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); - AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); - AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); - AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); - AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, PTROUT(imgp->canary)); - AUXARGS_ENTRY(pos, LINUX_AT_HWCAP2, 0); - if (imgp->execpathp != 0) - AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); - if (args->execfd != -1) - AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); - AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); - AUXARGS_ENTRY(pos, AT_NULL, 0); - - free(imgp->auxargs, M_TEMP); - imgp->auxargs = NULL; - KASSERT(pos - argarray <= LINUX_AT_COUNT, ("Too many auxargs")); - - error = copyout(argarray, (void *)base, - sizeof(*argarray) * LINUX_AT_COUNT); - free(argarray, M_TEMP); - return (error); + AUXARGS_ENTRY((*pos), LINUX_AT_SYSINFO, __kernel_vsyscall); + AUXARGS_ENTRY((*pos), LINUX_AT_SYSINFO_EHDR, linux_vdso_base); + AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP, cpu_feature); + AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP2, 0); + AUXARGS_ENTRY((*pos), LINUX_AT_PLATFORM, PTROUT(linux_platform)); } static void @@ -847,7 +801,7 @@ struct sysentvec elf_linux_sysvec = { .sv_psstrings = LINUX32_PS_STRINGS, .sv_psstringssz = sizeof(struct linux32_ps_strings), .sv_stackprot = VM_PROT_ALL, - .sv_copyout_auxargs = linux_copyout_auxargs, + .sv_copyout_auxargs = __linuxN(copyout_auxargs), .sv_copyout_strings = linux_copyout_strings, .sv_setregs = linux_exec_setregs, .sv_fixlimit = linux32_fixlimit, @@ -862,6 +816,8 @@ struct sysentvec elf_linux_sysvec = { .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap = NULL, + .sv_hwcap = NULL, + .sv_hwcap2 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 7e1e35e6bae3..709566ee15bc 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -115,7 +115,6 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); /* DTrace probes */ LIN_SDT_PROBE_DEFINE0(sysvec, linux_exec_setregs, todo); -LIN_SDT_PROBE_DEFINE0(sysvec, linux_copyout_auxargs, todo); LINUX_VDSO_SYM_CHAR(linux_platform); LINUX_VDSO_SYM_INTPTR(kern_timekeep_base); @@ -160,55 +159,14 @@ linux_set_syscall_retval(struct thread *td, int error) } } -static int -linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) +void +linux64_arch_copyout_auxargs(struct image_params *imgp, Elf_Auxinfo **pos) { - Elf_Auxargs *args; - Elf_Auxinfo *argarray, *pos; - struct proc *p; - int error, issetugid; - - LIN_SDT_PROBE0(sysvec, linux_copyout_auxargs, todo); - p = imgp->proc; - - args = (Elf64_Auxargs *)imgp->auxargs; - argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, - M_WAITOK | M_ZERO); - - issetugid = p->p_flag & P_SUGID ? 1 : 0; - AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, linux_vdso_base); - AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, LINUX_MINSIGSTKSZ); - AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, *imgp->sysent->sv_hwcap); - AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); - AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); - AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); - AUXARGS_ENTRY(pos, AT_PHENT, args->phent); - AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); - AUXARGS_ENTRY(pos, AT_BASE, args->base); - AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); - AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); - AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); - AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); - AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); - AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); - AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); - AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); - AUXARGS_ENTRY(pos, LINUX_AT_HWCAP2, *imgp->sysent->sv_hwcap2); - if (imgp->execpathp != 0) - AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); - if (args->execfd != -1) - AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); - AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); - AUXARGS_ENTRY(pos, AT_NULL, 0); - - free(imgp->auxargs, M_TEMP); - imgp->auxargs = NULL; - KASSERT(pos - argarray <= LINUX_AT_COUNT, ("Too many auxargs")); - - error = copyout(argarray, (void *)base, - sizeof(*argarray) * LINUX_AT_COUNT); - free(argarray, M_TEMP); - return (error); + + AUXARGS_ENTRY((*pos), LINUX_AT_SYSINFO_EHDR, linux_vdso_base); + AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP, *imgp->sysent->sv_hwcap); + AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP2, *imgp->sysent->sv_hwcap2); + AUXARGS_ENTRY((*pos), LINUX_AT_PLATFORM, PTROUT(linux_platform)); } /* @@ -423,7 +381,7 @@ struct sysentvec elf_linux_sysvec = { .sv_psstrings = LINUX_PS_STRINGS, .sv_psstringssz = sizeof(struct ps_strings), .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, - .sv_copyout_auxargs = linux_copyout_auxargs, + .sv_copyout_auxargs = __linuxN(copyout_auxargs), .sv_copyout_strings = __linuxN(copyout_strings), .sv_setregs = linux_exec_setregs, .sv_fixlimit = NULL, diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index 43df9508d470..9b2c38aba444 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -488,3 +488,57 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel) return (true); } + +int +__linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) +{ + Elf_Auxargs *args; + Elf_Auxinfo *aarray, *pos; + struct proc *p; + int error, issetugid; + + p = imgp->proc; + issetugid = p->p_flag & P_SUGID ? 1 : 0; + args = imgp->auxargs; + aarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, + M_WAITOK | M_ZERO); + + __linuxN(arch_copyout_auxargs)(imgp, &pos); + /* + * Do not export AT_CLKTCK when emulating Linux kernel prior to 2.4.0, + * as it has appeared in the 2.4.0-rc7 first time. + * Being exported, AT_CLKTCK is returned by sysconf(_SC_CLK_TCK), + * glibc falls back to the hard-coded CLK_TCK value when aux entry + * is not present. + * Also see linux_times() implementation. + */ + if (linux_kernver(curthread) >= LINUX_KERNVER_2004000) + AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); + AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); + AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); + AUXARGS_ENTRY(pos, AT_PHENT, args->phent); + AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); + AUXARGS_ENTRY(pos, AT_BASE, args->base); + AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); + AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); + AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); + AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); + AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); + AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); + AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); + AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); + if (imgp->execpathp != 0) + AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); + if (args->execfd != -1) + AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); + AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, LINUX_MINSIGSTKSZ); + AUXARGS_ENTRY(pos, AT_NULL, 0); + + free(imgp->auxargs, M_TEMP); + imgp->auxargs = NULL; + KASSERT(pos - aarray <= LINUX_AT_COUNT, ("Too many auxargs")); + + error = copyout(aarray, PTRIN(base), sizeof(*aarray) * LINUX_AT_COUNT); + free(aarray, M_TEMP); + return (error); +} diff --git a/sys/compat/linux/linux_elf.h b/sys/compat/linux/linux_elf.h index 87b21c4a14b2..8f134cd4e233 100644 --- a/sys/compat/linux/linux_elf.h +++ b/sys/compat/linux/linux_elf.h @@ -42,6 +42,8 @@ struct note_info_list; void __linuxN(prepare_notes)(struct thread *, struct note_info_list *, size_t *); +void __linuxN(arch_copyout_auxargs)(struct image_params *, Elf_Auxinfo **); +int __linuxN(copyout_auxargs)(struct image_params *, uintptr_t); int __linuxN(copyout_strings)(struct image_params *, uintptr_t *); bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel); diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 43bf3ca126b6..61ab5e40fe1d 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -95,7 +95,7 @@ typedef struct { /* * Miscellaneous */ -#define LINUX_AT_COUNT 20 /* Count of used aux entry types. +#define LINUX_AT_COUNT 21 /* Count of used aux entry types. * Keep this synchronized with * linux_fixup_elf() code. */ diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index ce61cfdec205..fb6f01adf66d 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -138,60 +138,14 @@ linux_fixup(uintptr_t *stack_base, struct image_params *imgp) return (0); } -static int -linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) +void +linux32_arch_copyout_auxargs(struct image_params *imgp, Elf_Auxinfo **pos) { - Elf32_Auxargs *args; - Elf32_Auxinfo *argarray, *pos; - int error, issetugid; - - issetugid = imgp->proc->p_flag & P_SUGID ? 1 : 0; - args = (Elf32_Auxargs *)imgp->auxargs; - argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, - M_WAITOK | M_ZERO); - - AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, linux_vdso_base); - AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO, __kernel_vsyscall); - AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); - /* - * Do not export AT_CLKTCK when emulating Linux kernel prior to 2.4.0, - * as it has appeared in the 2.4.0-rc7 first time. - * Being exported, AT_CLKTCK is returned by sysconf(_SC_CLK_TCK), - * glibc falls back to the hard-coded CLK_TCK value when aux entry - * is not present. - * Also see linux_times() implementation. - */ - if (linux_kernver(curthread) >= LINUX_KERNVER_2004000) - AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); - AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); - AUXARGS_ENTRY(pos, AT_PHENT, args->phent); - AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); - AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); - AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); - AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); - AUXARGS_ENTRY(pos, AT_BASE, args->base); - AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); - AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); - AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); - AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); - AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); - AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); - AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); - if (imgp->execpathp != 0) - AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); - if (args->execfd != -1) - AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); - AUXARGS_ENTRY(pos, AT_NULL, 0); - - free(imgp->auxargs, M_TEMP); - imgp->auxargs = NULL; - KASSERT(pos - argarray <= LINUX_AT_COUNT, ("Too many auxargs")); - - error = copyout(argarray, (void *)base, - sizeof(*argarray) * LINUX_AT_COUNT); - free(argarray, M_TEMP); - return (error); + AUXARGS_ENTRY((*pos), LINUX_AT_SYSINFO_EHDR, linux_vdso_base); + AUXARGS_ENTRY((*pos), LINUX_AT_SYSINFO, __kernel_vsyscall); + AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP, cpu_feature); + AUXARGS_ENTRY((*pos), LINUX_AT_PLATFORM, PTROUT(linux_platform)); } static void @@ -649,6 +603,8 @@ struct sysentvec linux_sysvec = { .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap = NULL, + .sv_hwcap = NULL, + .sv_hwcap2 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, @@ -677,7 +633,7 @@ struct sysentvec elf_linux_sysvec = { .sv_psstrings = LINUX_PS_STRINGS, .sv_psstringssz = sizeof(struct ps_strings), .sv_stackprot = VM_PROT_ALL, - .sv_copyout_auxargs = linux_copyout_auxargs, + .sv_copyout_auxargs = __linuxN(copyout_auxargs), .sv_copyout_strings = __linuxN(copyout_strings), .sv_setregs = linux_exec_setregs, .sv_fixlimit = NULL, @@ -692,6 +648,8 @@ struct sysentvec elf_linux_sysvec = { .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap = NULL, + .sv_hwcap = NULL, + .sv_hwcap2 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, From nobody Thu Jun 29 08:20: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 4QsBFx1gtXz4knRD; Thu, 29 Jun 2023 08:20: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 4QsBFx0Ktvz3snT; Thu, 29 Jun 2023 08:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E6T7cS4DwLyAPEfUU0hU5ZW7HY/Xgvx7XwDxtmDW3JY=; b=ggGEAg2JLQp/RYkSW7pIpXacHCV5Y8JTTpXfXN2jBRRaoIUpGIBb19EdOrsIaE+jcS1Q8a p8RtykL4VDP+6pSJFmkhFLohXAb7vneLeQaO+2HMi4Gn8X8EVO5lzUugUzV/tGBdJIBoqk GoFOxItMFUulZQFVXLHvMuw+WWAGboIi0o4nAF/C+QlIVVolzub8Py31vANC6TfxUjqplu YTR56LHm6sGQFymcNf4NVeH6BMpvRqnHFIx7+BLeWkAHS1vMOtXr0xjLIlQI5IEFNugIFe wZZ4pR1exv0TgEsaLN2DTQ4NhM0b1nrvqpnxqpdi3p+2Pt+s2w36nGXzDMO9VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E6T7cS4DwLyAPEfUU0hU5ZW7HY/Xgvx7XwDxtmDW3JY=; b=y2DHtLPTGb0Lm0gzTqTLr+oCzmBEZvANVa67hQR2kPLDwLt95FeMsHo9I79YmwBffB4bPE bVR5a1ZC+hJLihHxF4LSf1G/ta2w3qhKbHecW5WbDgCx/AsZHucvlGAesvr35woQaUNlFZ TVgrU5EDduzHmQ5kQog9H/k5HvW3Y8J/sxLv9c2cFh/LifX8o/bxS3N1wpbngz3XBo1qWX xlTESs3g9Cxdt3rO2N+IqXDE8BX7QPI+f0ne8IUeRNmSTrPgATDHXdspy59BX0nQeDQHS+ 7PkJsDLP9kJvimMR3Z8vzXvRuO1SFpLXoSp9cT1Ye8y37j+Y81D/bRk053j0WQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026805; a=rsa-sha256; cv=none; b=aJExGZgIBXA6HJA7DyyRbs6gFf0W6jorS3DoOmMXrMOs4UEviKE1Y3BJyxM+ljcsNMbkbM R7ntPFSr6JCy6UcGtfYZQwuFSntw1fWrKEfLBogctaHzLFQTVAUmXG7Ie2roipvUcqt2s2 EqPDAnSrsUYl5qk3Ao4W8W6RLR7Vv7+BuDdQci/QFzXyBeIWCp5po3DFjKJk0N+TM5v3Z3 5OCzv08yTTBVM5z+jq88b/wiXmkF+g+cHnERS/z/Mh3qdh+2O7FPd/ZH8xlC5oQkAgIPS5 ebOcvXBubaGrIRg6i6cQfvuhKSfqqcpyLV0o4M0J+ZhUkuJ6HoK86ryzAih52w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFw6YfPz17sQ; Thu, 29 Jun 2023 08:20: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 35T8K4vf077225; Thu, 29 Jun 2023 08:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K4bE077223; Thu, 29 Jun 2023 08:20:04 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:04 GMT Message-Id: <202306290820.35T8K4bE077223@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: b7ee4a377911 - stable/13 - linux(4): Fix LINUX_AT_COUNT comments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: b7ee4a3779118fa76f98fb4be0d4866400b07efa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b7ee4a3779118fa76f98fb4be0d4866400b07efa commit b7ee4a3779118fa76f98fb4be0d4866400b07efa Author: Dmitry Chagin AuthorDate: 2023-04-22 19:16:43 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:26 +0000 linux(4): Fix LINUX_AT_COUNT comments Differential Revision: https://reviews.freebsd.org/D39645 MFC after: 1 month (cherry picked from commit 56c5230afdcf2b317d904009abe577e91b382542) --- sys/amd64/linux/linux.h | 5 ++++- sys/amd64/linux32/linux.h | 2 +- sys/arm64/linux/linux.h | 5 ++++- sys/i386/linux/linux.h | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index 305c4c43a471..0cf7d02c5833 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -90,7 +90,10 @@ typedef struct { /* * Miscellaneous */ -#define LINUX_AT_COUNT 21 /* Count of used aux entry types. */ +#define LINUX_AT_COUNT 21 /* Count of used aux entry types. + * Keep this synchronized with + * linux_copyout_auxargs() code. + */ struct l___sysctl_args { diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 0449790bd981..d0c966ad3c92 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -105,7 +105,7 @@ typedef struct { */ #define LINUX_AT_COUNT 22 /* Count of used aux entry types. * Keep this synchronized with - * linux_fixup_elf() code. + * linux_copyout_auxargs() code. */ struct l___sysctl_args { diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index 8ecadff2e220..bee97691b744 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -81,7 +81,10 @@ typedef struct { #define l_fd_set fd_set /* Miscellaneous */ -#define LINUX_AT_COUNT 21 +#define LINUX_AT_COUNT 21 /* Count of used aux entry types. + * Keep this synchronized with + * linux_copyout_auxargs() code. + */ struct l___sysctl_args { diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 61ab5e40fe1d..c4b70b2a6aaa 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -97,7 +97,7 @@ typedef struct { */ #define LINUX_AT_COUNT 21 /* Count of used aux entry types. * Keep this synchronized with - * linux_fixup_elf() code. + * linux_copyout_auxargs() code. */ struct l___sysctl_args { From nobody Thu Jun 29 08:20: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 4QsBFy1cCBz4knTc; Thu, 29 Jun 2023 08:20: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 4QsBFy15t1z3sqM; Thu, 29 Jun 2023 08:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uMD019MOw+m+jTAsnSKrNv+dGqIR7vtX6o9+1LZIyho=; b=pwzNaUs4aW4q1Xan4LWaEsVx35G44c8/YL1McHAzIPl3qIjrg2tfW1m+f0eJ+41oNmWGjY BZJ+PJ2Rx3l2ZjUL4FClKg/yxJ9jPFYm1BZfgMKWqy70035CnOlE1lm0J2w/FfqQjOKFbA dlGC9EiSatvCcjfGQSKgYIexivcBSM/fmlpOfpG4aWC2LgobIJtEjUeXGoaiHn5xwaLR6G SgW9r6CzlH+iSD7YoIlhmUryCQDhTOy4QMcG/jeovt4G/ehYqZBgLQ85SeXIOxmwINAadi Wluw+fLxwL1nRPRxCNLl/1Zh8M2mKK9Esb7LURbV82oGGLH+YlPZl3QNaWPMqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uMD019MOw+m+jTAsnSKrNv+dGqIR7vtX6o9+1LZIyho=; b=kjCluN/12Fv0XXIE2Xh6EYcLjSCP5aqzJ+QW55DuT0x+DoWEANRS+FBTyU0erAU3MyKuhx dLII4tsK/hVFDYFRkRFNiayRo6HZ0/5UP8ZwBAl9BjAPFXSNKY0nxmTCKWFio617dd2FYr EjU8QOai9SkVG5W0E56swdCHOTRLQ4/Fgff0JNfQmeupSvRPdZuEBkzHLgMYm74kwuwK8f DcLiJWBVFFzn439UzDPpcTH4L35SMqhRgycPdZFRZ8P7rdPds7YB8DDUbClWlK9/LaCHeE F4HEqJlk39YaR/JIbX8Dj9yfcd8iG70n3Z0AUbOLUI/mkxMGr20SiK+wzjW8tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026806; a=rsa-sha256; cv=none; b=v72OE1pcdpNX4eNURv62MGnSMrzlEP++kmKmLKz+S008XKLVWqhBuvgqEl8q/Xt/ZHJYVm W/Gx0aD30vf2EzXar/s81/Obs7FEV2cvI1CkTUVS4MblpCPdwh0nWi1/WWX1CVYIym1flI x93jzxZCwF7aXI8p8n+E88oBRc6wWxXwx3wlmLXVaPs8Ms1/19h4dtS6dvNUqq+6wlJYAs /UPtkSgG2jhj79/BLQI84h4fesJU2p+rHEOoLHp/8Q8CkP2eVfKCU+VHByO2IAwxICZqjT brcAKPvCMHkX2sNixFzZWs2rMZHZ8ML2PEEvBawkWvxzPiHX9EZ/d7XSLdqhEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFx72yzz17QK; Thu, 29 Jun 2023 08:20: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 35T8K5i2077481; Thu, 29 Jun 2023 08:20:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K5CV077479; Thu, 29 Jun 2023 08:20:05 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:05 GMT Message-Id: <202306290820.35T8K5CV077479@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: de67d174a10c - stable/13 - linux(4): Export the AT_RANDOM depending on the process osreldata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: de67d174a10c296e6d44499d0c577cd0e9d048ef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=de67d174a10c296e6d44499d0c577cd0e9d048ef commit de67d174a10c296e6d44499d0c577cd0e9d048ef Author: Dmitry Chagin AuthorDate: 2023-04-22 19:17:17 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:26 +0000 linux(4): Export the AT_RANDOM depending on the process osreldata AT_RANDOM has appeared in the 2.6.30 Linux kernel first time. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39646 MFC after: 1 month (cherry picked from commit 40c36c4674eb9602709cf9d0483a4f34ad9753f6) --- sys/compat/linux/linux_elf.c | 3 ++- sys/compat/linux/linux_mib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index 9b2c38aba444..d0e547c1b882 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -526,7 +526,8 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); - AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); + if (p->p_osrel >= LINUX_KERNVER_2006030 || p->p_osrel == 0) + AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); if (imgp->execpathp != 0) AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); if (args->execfd != -1) diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index 615439b4d107..b1d5a0981a7d 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -58,6 +58,7 @@ int linux_kernver(struct thread *td); #define LINUX_VERSION_STR LINUX_XKERNVERSTR(LINUX_KVERSION.LINUX_KPATCHLEVEL.LINUX_KSUBLEVEL) #define LINUX_KERNVER_2004000 LINUX_KERNVER(2,4,0) +#define LINUX_KERNVER_2006030 LINUX_KERNVER(2,6,30) #define LINUX_KERNVER_2006039 LINUX_KERNVER(2,6,39) #define LINUX_KERNVER_5004000 LINUX_KERNVER(5,4,0) From nobody Thu Jun 29 08:20: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 4QsBFz1t8Wz4knNM; Thu, 29 Jun 2023 08:20: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 4QsBFz1QVWz3t4g; Thu, 29 Jun 2023 08:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ktrg75QSrrQldCmByER5LLM8KFpKtrbv1i0z3AwBFS4=; b=pTv3lbxw72AjjRqVlxzCd0WFJzOPznc1eGRmbuy6y4S/5sEVxyB78HwosCgS5Ma8wyHIlc RM4ecHWo9YZa3VIKHzaIJuLg3B8on3kiBfjpHhfDd6ARqueLXwvpWg1iDobhTZChByF7IJ yAeM2jCFfWKQn10IIzXVC77uHaGr/ItEczlk1igsYK74jSxFNEfiuNMjPtq8E82XzvUrHF GBt5KiqfF658xE8ILHcIEbBaTEDvTvEnwoZsm3ctNhFecsy4Vjwc8wLs6aQG+jD6Cv9FRY /9I1NviqB2YRPe3odSoBLrOmEiDfKiJmHgOsOn0IHempM7F+QNpVL7Ug/GZNgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ktrg75QSrrQldCmByER5LLM8KFpKtrbv1i0z3AwBFS4=; b=G5hdq5H5HbKvWb6RtPOG5lPjExU3U6GqGZs4PaB+vlOOy0dGPBm8lXO6mbzoYBDovdID7v alQYqxzLqZEHr0Q4SD72Spp/SoUBB9OTPCN0SzZnHoy8Dx1q7O6giLrOikzxYmy9SY9TR5 7RFttOHFxB0GgpQ/SBbBkuL94+Y3KiJWUyt7IHiGNPJWGoj7fWcNaU3MsYHCvNQ7Ra/1A7 BP5x5yz4pxvIyef8QxdwyK8SXPxxmzfP+5aq+8PvBLN2supvozwmgBlkhs7n2qpBV5cGr3 Urt5LofFxP/tYgdydZYlLMmilseBGpDoX0poENr+oIorRc2EIHG5ulhne/oxCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026807; a=rsa-sha256; cv=none; b=hRXy5WRJ9rqnet6/sG1V/qOmZGHFJig8gUWXOfEs0up93fAppAQ9BfDBpuVBuhgWrs8Ysv 6Ety9xtOjQvkvoxCWSsQqNtqWIEVtWzhugpDXPQE9e8O/+/wFPzjwRwCoAfmc/LhnJPcit zRXYpJiPNhP2iX7q/vxaNrO6eRCa/a0qwcNi56YI5FNpyfgFwK9AXUJthrHh7QBEsP/BS3 cOLTRcqKXDl7iLyYqdbrsMA9fEBeXxwKSXLzRlrjx4DRax7wFO7VdHqVIwwVmF1DzXsoxJ ySUX8qEhEdsuy5NSnpZWW7qqOA72Y2cjQZG7NcKF8Rv/oLwEWfrPi1Z8q4t0Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBFz0PlZz17QL; Thu, 29 Jun 2023 08:20: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 35T8K6I1077735; Thu, 29 Jun 2023 08:20:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K6Lq077733; Thu, 29 Jun 2023 08:20:06 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:06 GMT Message-Id: <202306290820.35T8K6Lq077733@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: 364bdf887ae3 - stable/13 - linux(4): Export the AT_EXECFN depending on the process osreldata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 364bdf887ae3d9298834038b1a755e4c27719888 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=364bdf887ae3d9298834038b1a755e4c27719888 commit 364bdf887ae3d9298834038b1a755e4c27719888 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:17:36 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:27 +0000 linux(4): Export the AT_EXECFN depending on the process osreldata AT_EXECFN has appeared in the 2.6.26 Linux kernel first time. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39647 MFC after: 1 month (cherry picked from commit 70eab81d6ffecf0ba4c7f19a8b6389178eda5259) --- sys/compat/linux/linux_elf.c | 3 ++- sys/compat/linux/linux_mib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index d0e547c1b882..a1a04e23d43d 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -528,7 +528,8 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); if (p->p_osrel >= LINUX_KERNVER_2006030 || p->p_osrel == 0) AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); - if (imgp->execpathp != 0) + if ((p->p_osrel >= LINUX_KERNVER_2006026 || p->p_osrel == 0) && + imgp->execpathp != 0) AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index b1d5a0981a7d..05068bbf1029 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -58,6 +58,7 @@ int linux_kernver(struct thread *td); #define LINUX_VERSION_STR LINUX_XKERNVERSTR(LINUX_KVERSION.LINUX_KPATCHLEVEL.LINUX_KSUBLEVEL) #define LINUX_KERNVER_2004000 LINUX_KERNVER(2,4,0) +#define LINUX_KERNVER_2006026 LINUX_KERNVER(2,6,26) #define LINUX_KERNVER_2006030 LINUX_KERNVER(2,6,30) #define LINUX_KERNVER_2006039 LINUX_KERNVER(2,6,39) #define LINUX_KERNVER_5004000 LINUX_KERNVER(5,4,0) From nobody Thu Jun 29 08:20: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 4QsBG05THhz4knYX; Thu, 29 Jun 2023 08:20: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 4QsBG028WBz3sx2; Thu, 29 Jun 2023 08:20:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8aPOlLs1YDFmK4foj6yHjmGtTUvKQOJSNnjtl9zfMc=; b=F/d3GHS7js4KbaGCxE06pRsYuLsMcZWUPTTPry4gbaDu7mcsqa+ebzeYWbGXbK22u9k4n2 1u5G4iePb1vygISu5eS+dLoC64fCMYWUIIEuGznnc5c4Pa9mx8IKXIDFT+XSRR1wpTSFRE N/BTTXdFaYdwT69kD/5O9/pAbhMIrXsjKd9K3BnhHCQOZX0TYjUKS+B3GhddhqKrhHm0tC O55yMhOCNg5NbtAclPTwqrf76WnTSkNyY+WTWtCS1tz38Z14QxAZ+ORADwzYwBl+mBPA7x TWp7w4XL5JygmUzFasxEDXCRp8AsFd7/S9MQKzGG49ZKS85fAg4nVYMRaR15KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8aPOlLs1YDFmK4foj6yHjmGtTUvKQOJSNnjtl9zfMc=; b=GsGqDJN80I+puYJHAJ5z4lA7RNFipzTKfXNAikHe9enRTPTNfdL0DDDTJHFawrt1KMRg7b 9v9mkSXfigtGK+/28yCog1OY1fSaSadU8z4Ir6DGAjGGw/qUQc9OLqPjJLdTZCgcVl1d5v g8kVUswpDk53cCopeuFOlrPjCMOud3o04G4HHvoP16VJRtQFZ8n+obzha8ShH7pnlqtKFR /nr7Dnelc5OooPd9eQCpb7TcpEI0J37ENrhC1rSTdOgd5ZHv4wu7PKjB2FtRaNLaogDIth UZKbwjkA7OMRfhk4zmaOkl0YavUczMDoiVbRn2ITXqe/B+O/LvGMMLylKTymZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026808; a=rsa-sha256; cv=none; b=jjnxKSk2f+o1pcHLvAkhvDjrSgYy7RfHXK8hpzJYLvm/qY6ObaDbY0IM7u23X0cgyMYZe2 /dHdwTvqR+9s0Mrsfxi9egdbqy9oo5j5N5Ebx9CkEKR3O83eGjflrrfh6ImwDXkrxt7QP+ AzI2a8mMwepEr+lhhBmAiHI5nnt8Y9WFDdPT0W4YqfQd2E4Yhgk1LdGmeCQmA6kW+xURxl 9uaBLtSBO2QwJrXuIDt1UrXsoZRq9rJd9tpk2hHZu1T6ue3v7dwLCgU1eCKeqDNTUSkS2v P50J87q3SCvqq+aHlEjHpnQJfRRrDmBCyWmUDH0FLIvoDksULObk63QvW7Hg9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG019s6z17dZ; Thu, 29 Jun 2023 08:20: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 35T8K8Vf078006; Thu, 29 Jun 2023 08:20:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K893078003; Thu, 29 Jun 2023 08:20:08 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:08 GMT Message-Id: <202306290820.35T8K893078003@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: 8dc4c073cdd1 - stable/13 - linux(4): Export the AT_MINSIGSTKSZ depending on the process osreldata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 8dc4c073cdd1e2452dd725bc324977038366f3e6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=8dc4c073cdd1e2452dd725bc324977038366f3e6 commit 8dc4c073cdd1e2452dd725bc324977038366f3e6 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:17:52 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:27 +0000 linux(4): Export the AT_MINSIGSTKSZ depending on the process osreldata AT_MINSIGSTKSZ has appeared in the 5.13.0 Linux kernel first time. Differential Revision: https://reviews.freebsd.org/D39648 MFC after: 1 month (cherry picked from commit b7a6bcdd1319b4e5da0bfc5e7790cbf26efe9892) --- sys/compat/linux/linux_elf.c | 3 ++- sys/compat/linux/linux_mib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index a1a04e23d43d..9db599d83bac 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -533,7 +533,8 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); - AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, LINUX_MINSIGSTKSZ); + if (p->p_osrel >= LINUX_KERNVER_5013000 || p->p_osrel == 0) + AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, LINUX_MINSIGSTKSZ); AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index 05068bbf1029..ae650934273e 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -62,6 +62,7 @@ int linux_kernver(struct thread *td); #define LINUX_KERNVER_2006030 LINUX_KERNVER(2,6,30) #define LINUX_KERNVER_2006039 LINUX_KERNVER(2,6,39) #define LINUX_KERNVER_5004000 LINUX_KERNVER(5,4,0) +#define LINUX_KERNVER_5013000 LINUX_KERNVER(5,13,0) #define linux_use54(t) (linux_kernver(t) >= LINUX_KERNVER_5004000) From nobody Thu Jun 29 08:20: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 4QsBG150n4z4knYf; Thu, 29 Jun 2023 08:20: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 4QsBG12ns8z3t9S; Thu, 29 Jun 2023 08:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4VA2N4vGbVwTLjc0mdEPC2b3OAWYlyWZBXAmvWZ/gw=; b=Tanfyusw2m2SSRQ2O4pgAzky7MIyxawnRXp01NXwB2w4KxDYYeYa29b/f4jZYZnV6vSkqV bQKIpx9LZR8hMfFx8BXMWntc+I3AosgKVOvCk9oc/MSp779P3bsk/y6B5QjPCXT+3t4h4H 83VDGZGTKCHz3HVjqFNIYXsvZzwVZ+uX4iNdmeTLmiWlWoUINDiDmV18IrvxsQMO3lF6Vg fXgFg8m0SDRHeP7cEHGTQcgGHMyk49TSO/nCXkmZpNqCx3NpJBrbucOx+c050ZngXMTGmm 2/V4H69ga/SJFJYaNfS3tmKbAXqmSmO8rbEB3VFDg1kOJQ44UOx1wXfQ33/nUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4VA2N4vGbVwTLjc0mdEPC2b3OAWYlyWZBXAmvWZ/gw=; b=Ux87Op5BHkzd3MbOkpwoN/+RrN72d3o3uiqiKv8T8qN6bs+j2aCmdyHPVgllsRml7uNMLe zjoRiORrqgpdfaYeblfRGACVziGsHykOacftdTZ8IoyC3RxRdbkQdnjEDiYoYaT2C4bwUB ienFujjMgSNSN86SyTm06UCBJYJhpVRpiKBs16vrx5UkkLBNbqkUxToDWM0yooXedN2hsD 1Mayx8u41drOjmLp4nGAT5+TbmRo08Bbyr6k6TKW526i7yops9jKJmgK+zbZzdVmoPEnFL G4H5kTFyFsYASoxz9Uh4mniC9MVJHvMRIfyn22oqybBP4t/bNEu61Q9Zw5vTaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026809; a=rsa-sha256; cv=none; b=WJRDJIuYQaqxAAs9HfoxjO8le/cGs0YxIHrRMp7YT1KO2GMtK0AmonVjXCbUDUDgfO2+wi lY7MqoGA0RWIuKV64mmm3itSr9qoDjwqilxBIbywMoVYkFD2f5u7Thghl/DFYwOfvxsgsR T3ioh4RyOYLxUJTCg1lFDJ4zHq5kDEWK3TN7WKjEcGmj8LR9StqHBi0UCHZd4aL9IlAdAJ ckwtJsNCUe0BosjzQ17606Vkadvv1XnKInF2QwzCnSptc5kKREpYR6JI1qB28dW0F0D6MD L0LrFWDJPuNFjHHE6MEQXXdSF35RKVeQz3QPETltxke/ftb9Y51RZi08AuPk+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 4QsBG11Rdmz17gg; Thu, 29 Jun 2023 08:20: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 35T8K9s0078477; Thu, 29 Jun 2023 08:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K99O078471; Thu, 29 Jun 2023 08:20:09 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:09 GMT Message-Id: <202306290820.35T8K99O078471@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: 93cac961f46a - stable/13 - linux(4): Bump osrelease to 5.15.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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 93cac961f46a244866daa9c52fa43868b162b792 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=93cac961f46a244866daa9c52fa43868b162b792 commit 93cac961f46a244866daa9c52fa43868b162b792 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:18:08 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:27 +0000 linux(4): Bump osrelease to 5.15.0 Linux kernel version 5.15 named Trick or Treat is a 22nd LTS release. Reviewed by: trasz, emaste Differential Revision: https://reviews.freebsd.org/D39649 MFC after: 1 month (cherry picked from commit 0ef30b5d6b75596e087a86c3cb01a0b2c611e7e6) --- sys/compat/linux/linux_mib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index ae650934273e..41b53d40da3a 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -46,8 +46,8 @@ int linux_get_oss_version(struct thread *td); int linux_kernver(struct thread *td); -#define LINUX_KVERSION 4 -#define LINUX_KPATCHLEVEL 4 +#define LINUX_KVERSION 5 +#define LINUX_KPATCHLEVEL 15 #define LINUX_KSUBLEVEL 0 #define LINUX_KERNVER(a,b,c) (((a) << 16) + ((b) << 8) + (c)) From nobody Thu Jun 29 08:20: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 4QsBG244d5z4knbk; Thu, 29 Jun 2023 08:20: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 4QsBG23Bg3z3t7f; Thu, 29 Jun 2023 08:20:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PfUMA0AJd/7COcnJROC6hQI1hYe2bqxTUnz/EKUHU04=; b=eCMSrOIVV0jw4gRS+hkcWftdaQYWu8jlqRXORyB0AZeb1/NArEy/o4Ullr7U0k8rjL5zVD AzWOhCYHjK/msp3mnJ2cB7pk96TYgVX3c4svMRFrDBGa23eBmcYFvGhIOSkJfiDPrie2As S/yJmdotP5nS7M3Sy83paRh9TtL82IpV3jfZT3EZMcqfJNxJ9e4PotMRXUkVPQwHifri9G +jCtrYeI8qg/HV+wcGyfrn1GKVfoT+C4tUGuM5dWAPMHPpY+lYXRnNLLMjyO4R83g4q8lv 2YAIx9VEnTpzG9PwQaK1hklSZmnNBvpP2V2gOihX/N+mBqiDCmhu6vgwpioIBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PfUMA0AJd/7COcnJROC6hQI1hYe2bqxTUnz/EKUHU04=; b=aEHBXVHqC3skH0uF1hGnHFMX1o1bI7vA9YdAqLbxMq72Lw0TLYsiM6YWV4/hvi+tNX+5KN xm0+50EUuluJle/2tJ9rQbJPvCUnf0ROfnNSOVYW0h/XsMATq9dMt+HcdJ+Jm9r5ZQU5TJ SwFlkE8zf1/aKmpMPCu6jhgEAAwAll10SfqzR+ohrSbAST0Xusak6RoGHIbEN+nlYiXq/1 UqtImwvWOt7//m7+/wffu/XfAdHobepZhZqaECbX2cjomUJC6kk5+I7K+J/C+VCz7UVgNU lu0DRB56EaJMLeOQvn1xD9G8GNeFfXdOcTYipVkWW8cS5sKUDViNZA1RNUrDRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026810; a=rsa-sha256; cv=none; b=nNwddxSRXxhR9Fu182yUv9oGYNhLg4Naqw+aJGfPfapdrRmcBt0p0vj0H1c9/fBJuyDP21 0Zzbr7o0k6HGEQ+u+M0+ytTCBSXgW5usSpwI1AvY5HHXp0JK4Kf4OMPTiLeNxMq1Loy3fi yWvBzPtm5y9Vn5bhpt1IGCdJJb5F9zS5po2lp+l30R7+ry4+/hzAqtwvN5yrPSZkmuMOOa CH9CITMqpQccJTdnUX0aeqSvO8pYRexmYYD0D6D6fFoJc1t3HBWAdbYiPF+xHVxUyoT8hU OCRJ8tv/gVQB8PfnZJDmkeLbDiPPl3MjBFS+5w/RvIV6mbri7JdFpyyilTUrZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG21z1Sz17gh; Thu, 29 Jun 2023 08:20: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 35T8KAn9079070; Thu, 29 Jun 2023 08:20:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KA74079064; Thu, 29 Jun 2023 08:20:10 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:10 GMT Message-Id: <202306290820.35T8KA74079064@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: 276bc96ff331 - stable/13 - linux(4): Fix arm64 build after b7a6bcdd, missed chunk added List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 276bc96ff331f3706b36b72e08f5c55f56784b46 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=276bc96ff331f3706b36b72e08f5c55f56784b46 commit 276bc96ff331f3706b36b72e08f5c55f56784b46 Author: Dmitry Chagin AuthorDate: 2023-04-22 22:41:12 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:28 +0000 linux(4): Fix arm64 build after b7a6bcdd, missed chunk added MFC after: 1 month (cherry picked from commit 66e8f1f7d37b5f657086437f5411a63c9080e25c) --- sys/compat/linux/linux_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index 9db599d83bac..f335f18e252f 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -534,7 +534,8 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); if (p->p_osrel >= LINUX_KERNVER_5013000 || p->p_osrel == 0) - AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, LINUX_MINSIGSTKSZ); + AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, + imgp->sysent->sv_minsigstksz); AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); From nobody Thu Jun 29 08:20: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 4QsBG351Ffz4knWR; Thu, 29 Jun 2023 08:20: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 4QsBG33gpPz3tTm; Thu, 29 Jun 2023 08:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Q7PPBkAs17GKCZ3LpE5Wh7QfEaGnEsUYlEhiL7SyfY=; b=R/a4Rz+XP9EIklhXA1vC9HqKxc4YVt2UJVH4IG6H9J8KEzs43sG5NDH3QkAOH9uEaIwCjX Xr/iZeHemw/gIExQcQYhty+mTLDyHWSDImMdEDPb0h2g2uz2cqj1CGX+drWPQtT77TwPwt Mzoa7H6DeLfJcJUSpCgIojhEz5/kfmvnCgrCYVaW8mP9Mw3Xs/8e7MRb9owmIwq4L0NM4u govw0wJcjE1rufRxnrfqp0CLB3VjQnp1eEXYeuOUzN8Bifbjfv7MFZwKyVYGKWW1JOcJFB oC69l/oSprfhy4IpYyGTe2K3Vj4C/6fHhR0K9fN08+dKPr/BDVNjjdPOKLOLGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Q7PPBkAs17GKCZ3LpE5Wh7QfEaGnEsUYlEhiL7SyfY=; b=n0GA7FSUD1dT66KTi1WjtjQi6EVvZ5tKJDxOn7UqUsL+TEyvVQSOy4WdNurZyH1/Avq2aV ezSQ/nkEMxSebK6/uSzyTn0gLVy6SeVceAT0faluM8vK3bPmN2ikh94/3dV/PV27vlLf/x ePGgRq1PB46f5uRNTGCGkPxIz87zwn5m+6FPA7a6yY8/yicvGjWodhFhuHY9VcFMl72Xdi oN56NwH9BGx/m5f47S2w5CIP3eJ+vU7OIAeOy5EXAi50uyH/5+gNMBauQxivwevaoWT2gW DLt69Q9kdEfv8/9jPaKBk4kehnSCgod6CyDB0NKhlLdwjZGvvmoxPS7y1wMH2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026811; a=rsa-sha256; cv=none; b=adoDXlad2QMXKAbBfO8v3+u6326nUlx2AXYDQxNtj9Zj3RpWWiDDwxeEW0lUzaiCDbpy/8 FhyzOTL1HI7+BVqAXWUE6THm1b9saM1PmvwDeWHLOil2jlRrejhkQszyup0pQo57v2Hni2 LhXEF7QB5Dbj3Zdrn72870/Z/vCZUIafKIRskWLThCCLIjrqtB1nm5Idxz/JpmSIyDaurB vE2mj4xsTaSYTx5yMPl75XH5XBVZ4W/PUFjSo3Kd/6DNYrx/vXbgca0WXMBmX6mmthCICN gaCpiBke7TI12OcwGOs7H+bvX0oeGu3hPA/TPUWT0yd+aksOerHFBCIU4ugMUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG32gM1z182t; Thu, 29 Jun 2023 08:20: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 35T8KBKY079695; Thu, 29 Jun 2023 08:20:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KBKt079689; Thu, 29 Jun 2023 08:20:11 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:11 GMT Message-Id: <202306290820.35T8KBKt079689@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: dde5ee79d043 - stable/13 - linux(4): Don't relie on process osreldata when testing features List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: dde5ee79d04385222a9704b704d2d2de0b3758a7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=dde5ee79d04385222a9704b704d2d2de0b3758a7 commit dde5ee79d04385222a9704b704d2d2de0b3758a7 Author: Dmitry Chagin AuthorDate: 2023-04-26 13:56:41 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:28 +0000 linux(4): Don't relie on process osreldata when testing features The ELF note identifyies the operating-system ABI that the executable was created for. The note data of the Glibc executable contains the earliest release number of the Linux kernel that supports this ABI. As of a current 2.37 version of Glibc, it is 3.2.0 for x86, 3.7.0 for Aarch64. Glibc does not use this release number and the current kernel's LINUX_VERSION_CODE to detect kernel features, using fallbacks to known previous way in case of ENOSYS or something else instead. A dynamically linked Glibc reads the current kernel's LINUX_VERSION_CODE from the ELF note in the vDSO or fallback to uname syscall if the vDSO can't be located and parse the release field in struct utsname. Glibc uses the current kernel's LINUX_VERSION_CODE for "kernel too old" check. While here use inlined LINUX_KERNVER for tests to improve readability, as suggested by emaste@. MFC after: 1 month (cherry picked from commit 76f8584e49cf7eedaa2e1312593bf46c7225d79a) --- sys/compat/linux/linux_elf.c | 8 ++++---- sys/compat/linux/linux_mib.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index f335f18e252f..1af861122f81 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -492,6 +492,7 @@ linux_trans_osrel(const Elf_Note *note, int32_t *osrel) int __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) { + struct thread *td = curthread; Elf_Auxargs *args; Elf_Auxinfo *aarray, *pos; struct proc *p; @@ -526,14 +527,13 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); - if (p->p_osrel >= LINUX_KERNVER_2006030 || p->p_osrel == 0) + if (linux_kernver(td) >= LINUX_KERNVER(2,6,30)) AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); - if ((p->p_osrel >= LINUX_KERNVER_2006026 || p->p_osrel == 0) && - imgp->execpathp != 0) + if (linux_kernver(td) >= LINUX_KERNVER(2,6,26) && imgp->execpathp != 0) AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); - if (p->p_osrel >= LINUX_KERNVER_5013000 || p->p_osrel == 0) + if (linux_kernver(td) >= LINUX_KERNVER(5,13,0)) AUXARGS_ENTRY(pos, LINUX_AT_MINSIGSTKSZ, imgp->sysent->sv_minsigstksz); AUXARGS_ENTRY(pos, AT_NULL, 0); diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index 41b53d40da3a..7022d811959b 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -58,11 +58,8 @@ int linux_kernver(struct thread *td); #define LINUX_VERSION_STR LINUX_XKERNVERSTR(LINUX_KVERSION.LINUX_KPATCHLEVEL.LINUX_KSUBLEVEL) #define LINUX_KERNVER_2004000 LINUX_KERNVER(2,4,0) -#define LINUX_KERNVER_2006026 LINUX_KERNVER(2,6,26) -#define LINUX_KERNVER_2006030 LINUX_KERNVER(2,6,30) #define LINUX_KERNVER_2006039 LINUX_KERNVER(2,6,39) #define LINUX_KERNVER_5004000 LINUX_KERNVER(5,4,0) -#define LINUX_KERNVER_5013000 LINUX_KERNVER(5,13,0) #define linux_use54(t) (linux_kernver(t) >= LINUX_KERNVER_5004000) From nobody Thu Jun 29 08:20: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 4QsBG508DTz4knWT; Thu, 29 Jun 2023 08:20: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 4QsBG441lhz3tQ7; Thu, 29 Jun 2023 08:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPNNEWNLkQdjkA1j+GjQkY8Bjom6XTMMLxIKS9OfrFE=; b=cZHpzgrBYZXGaJe+W/fDNmiwusWDtbLFu7J2VUFgd2lfuBVDfd1ZvA7VseJvno1Kx1TCnn EveTrkvO28zna8xZeaej94RFFa0+yCqBVylXxSgbU9x/0T7eH3I/uXYNiK5r5zv5l8xqNP GJigTLc0+93Z7BE82wXdMLkD3fBjxUXb9LvuflN2ZJEPha9arW0HSoGum8rwGXv/LqXOjH 7veOEP1I87cDzYSqZeoVHbKJhnRlGKAH88TBGKIZgkWkuwXCjx4xh/36NEjlK3bcK6ylRp 3uaIRBO8oJTPgyrj1i5CqyN9NoXA4F8bav5vS5RNqWcfGhzbdHJpH6eQRko2Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPNNEWNLkQdjkA1j+GjQkY8Bjom6XTMMLxIKS9OfrFE=; b=EgtNfy+XF8d9aElOD9MJXmRdaltyGktPgvhFrkwlCB1uVZUYk9Q5rlOTiwjtEYE76V5dIn dan2Xufn/tqM1R3XebGPbGFEnWrlptk23ixWjI3Yz5mDdXUdM+/BW/2iMKYj9TxSP8rhA3 0h/xWhWlfuMmuleH90Lwk6kr/4wfdTx906vRr3GPv2JdnfmxscBE5ivrY+G+ruiTFFxaCI 6ni8W/LNFsuYZPQIwCF8uRxZZDwgan3kbrj5k13FEZIikBCJbEUFGxDoqCzPyCX6A+l3/A +Cwre4lBltLcpwZ6oW4bpB+jYAC020GLmiaTxrknweY3/7j6FVm5l8Jdz6xLRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026812; a=rsa-sha256; cv=none; b=eEJv29cYSRB3yATxEgENmw4c8tDUCzIBCdtfyBPM6vQZ9TEHCCjKtnUkrI9NF/mCAj/4VD bzfLGHLGjltVkMbMKMqItdvTG1G6NPcrAoP88oH9xPOwvbH/OXoCNIRJ6ykIyBuIL7FCM3 TSgYGJ2lzgV12fySjzzqMk/o1yFEXqRf9wUDACwXOccslP2HupaPes6/fQA59I7rTzuwJn So1uvAx2dPrYWFYGdjbM3Z+/dfPdmgRUlMqKsImage7X2EdNO7o4lx4LYgiKsf+cLcVW6L bJadR1V0fKh2q4b0s+265YW8xS1U58uoOYV0w/YS1FUzKrmz5DYFiVhYBuh91w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG437dFz17db; Thu, 29 Jun 2023 08:20: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 35T8KCjf080326; Thu, 29 Jun 2023 08:20:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KCjH080320; Thu, 29 Jun 2023 08:20:12 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:12 GMT Message-Id: <202306290820.35T8KCjH080320@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: 2c7aac44f5ab - stable/13 - linux(4): Use inlined LINUX_KERNVER for tests to improve 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c7aac44f5abd751465d5bf854a9ef0f104c5ee0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=2c7aac44f5abd751465d5bf854a9ef0f104c5ee0 commit 2c7aac44f5abd751465d5bf854a9ef0f104c5ee0 Author: Dmitry Chagin AuthorDate: 2023-04-26 13:57:30 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:28 +0000 linux(4): Use inlined LINUX_KERNVER for tests to improve readability MFC after: 1 month (cherry picked from commit e185d83fc48ba0f28896a986104c02203005b533) --- sys/compat/linux/linux_elf.c | 2 +- sys/compat/linux/linux_mib.h | 6 ------ sys/compat/linux/linux_misc.c | 4 ++-- sys/compat/linux/linux_signal.c | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index 1af861122f81..06a384325d14 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -513,7 +513,7 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) * is not present. * Also see linux_times() implementation. */ - if (linux_kernver(curthread) >= LINUX_KERNVER_2004000) + if (linux_kernver(td) >= LINUX_KERNVER(2,4,0)) AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index 7022d811959b..5902f523dfee 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -57,12 +57,6 @@ int linux_kernver(struct thread *td); #define LINUX_XKERNVERSTR(x) LINUX_KERNVERSTR(x) #define LINUX_VERSION_STR LINUX_XKERNVERSTR(LINUX_KVERSION.LINUX_KPATCHLEVEL.LINUX_KSUBLEVEL) -#define LINUX_KERNVER_2004000 LINUX_KERNVER(2,4,0) -#define LINUX_KERNVER_2006039 LINUX_KERNVER(2,6,39) -#define LINUX_KERNVER_5004000 LINUX_KERNVER(5,4,0) - -#define linux_use54(t) (linux_kernver(t) >= LINUX_KERNVER_5004000) - extern int linux_debug; extern int linux_default_openfiles; extern int linux_default_stacksize; diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index bc62c6b24d2c..ba0ac190a946 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -384,7 +384,7 @@ struct l_times_argv { #define CONVOTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK)) #define CONVNTCK(r) (r.tv_sec * stclohz + r.tv_usec / (1000000 / stclohz)) -#define CONVTCK(r) (linux_kernver(td) >= LINUX_KERNVER_2004000 ? \ +#define CONVTCK(r) (linux_kernver(td) >= LINUX_KERNVER(2,4,0) ? \ CONVNTCK(r) : CONVOTCK(r)) int @@ -850,7 +850,7 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args) idtype = P_PID; break; case LINUX_P_PGID: - if (linux_use54(td) && args->id == 0) { + if (linux_kernver(td) >= LINUX_KERNVER(5,4,0) && args->id == 0) { p = td->td_proc; PROC_LOCK(p); id = p->p_pgid; diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 5a3cb97c385f..89f0f38d7b6c 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -776,7 +776,7 @@ lsiginfo_to_siginfo(struct thread *td, const l_siginfo_t *lsi, switch (lsi->lsi_code) { case LINUX_SI_TKILL: - if (linux_kernver(td) >= LINUX_KERNVER_2006039) { + if (linux_kernver(td) >= LINUX_KERNVER(2,6,39)) { linux_msg(td, "SI_TKILL forbidden since 2.6.39"); return (EPERM); } From nobody Thu Jun 29 08:20: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 4QsBG56TByz4knbw; Thu, 29 Jun 2023 08:20: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 4QsBG54YFcz3tK5; Thu, 29 Jun 2023 08:20:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IoIzQ/WNtpBrny7lQeIsC0SzFfK54R+m3qQoJBO+qfI=; b=BNRAAkrWoh4oz6ZStQyuOK5wGpInuLfhr6f4s9NpDbryrI3SNT526cQ8b3z1qbp6I/Gnr+ Cn81MP9HZiOnwYGbmxm9hVu99V3bZAQqhzOi92hYBzYlO+GtA7P5KniJXjsXqoOjFMjPVz OJccGQqseXVq12xHypHCgJRr33D2tB+ibah++kjGpbzvlEs/8dJeIFUTLUzh2miouID519 KCELfQomdoH8ftQrJZAWJvr1C7fKbNlWWRBoJvVtu0T636U6F0etnVE0pmGVDIpPsBwOks nS/aIREuhL/lbrodogWkWBdtVHQVY53EDiVm6G2N5oI62nmmMQEefTxLa2LpuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IoIzQ/WNtpBrny7lQeIsC0SzFfK54R+m3qQoJBO+qfI=; b=wh4TFdbuLKJrz4onm1Qc29P4qOUU1UDSj2mJkQ0sKaDtVc+pwOgqcVKZ2n3FOdjgtMaL1f h1Xydbdei6EIi+U3J3okLhM70IDSVW+Z1XI7sLqKrpDMRhnK8ZTM/TbLaDRt9AL8oOToQL U0rxlo6d/85MAdNXFuA/QoqtG2B/gLRcInO0sboXfNUuNM1zVIsfcEkS7RewAqoasJRu8O 0BHQirbPR5vHH0YLlfcYYQk/vxy8kLPim7UMvJ6FiUGHCMlajMOrhJvNgEtbV6okT40A6O IFzYBdXorU5e76Hbxzo09M6kaG3tivZ+gYQcClDw7ByXBiA9PQCRzsliIv/ROQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026813; a=rsa-sha256; cv=none; b=XHwDPzcTXTvcqe0mthSIhIGOJFCf7m5HhmrNz0HgoaS4VNSpsB3kCj8Yf4XKyaQCx3BAng KvbQcZdpYBYjjLdzHixEjuM2IRAyhL/WmVP8Q/o+h/AeUq3cNXOxsNIvjKOwgcOq29E3Ee iaUSEkjka0bB4a6oZUUPuvSAWQgY8lTbo7gGSedcanQZE90WG7kke32CnGcMeo/ipKFHyq rBZr3F743WLjt+SMiukI/Gghjj46XHPD6+aWl0qr4g2yTTa3J3hi4hLt6x52vSd3FsDmPQ fssTv7RAfIsalpy9DbseW8WKW48TGfHfgCuPTcTlkDrxDk5zl2WncR9mJaNQmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG53gMnz182v; Thu, 29 Jun 2023 08:20: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 35T8KDYp080977; Thu, 29 Jun 2023 08:20:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KDam080971; Thu, 29 Jun 2023 08:20:13 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:13 GMT Message-Id: <202306290820.35T8KDam080971@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: 78c8b272ae7d - stable/13 - linux(4): Sort includes in the linux_stats.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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 78c8b272ae7d856e493d5dd302e0e51e926e2606 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=78c8b272ae7d856e493d5dd302e0e51e926e2606 commit 78c8b272ae7d856e493d5dd302e0e51e926e2606 Author: Dmitry Chagin AuthorDate: 2023-04-28 08:54:58 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:28 +0000 linux(4): Sort includes in the linux_stats.c (cherry picked from commit 2a38f51c5b8a7cf38f0a29a59e7558d8aef91047) --- sys/compat/linux/linux_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index d00888e77e84..79937fd9fa86 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$"); #include #endif -#include #include +#include static void translate_vnhook_major_minor(struct vnode *vp, struct stat *sb) From nobody Thu Jun 29 08:20: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 4QsBG661ljz4knRr; Thu, 29 Jun 2023 08:20: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 4QsBG654N6z3tR3; Thu, 29 Jun 2023 08:20:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rGfPuvYyOEYGppzTEhnYQpSkBzIRMHwxstc1Oz05Dn8=; b=VhQvvwf0SJ8Ne7+7g48vRAMlAuhGyMskLBijct1vIEpQctj3XSy5fBFEm8kZ8txjmrv/SL MlxdrXk2zPkURkaTdv7X1ylGpPO5IKp2X8waVa8bijP7N4tD0Yo6RF4XtD/hdvKsGCQSJM QgaiB7waAZluabeDfWrwC2fB84BfIfU8m2201iuikwC7Ta3nKOi27uSFVv9B84ktG7wdu6 A7344FcRdezTmp/oJN1n/RjpaHGYWtvV37SPXQZVof7QmUczPteDeTkfgmnBLdNF4gwpBY wzq9ieZ79tdPDJg3GSdS7GcbIWrYgtlpy5P/lp2+10TR7Sm6mYztXb9m4lz6gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rGfPuvYyOEYGppzTEhnYQpSkBzIRMHwxstc1Oz05Dn8=; b=GNwPDUlhRNPmLqE+NgbiWbxrlTccQCBjB80QrAjszepT9oyhUJky5sFZwplRu2eim1TsaY 8hmXwSEXvuc7QojeWsmJZfCmJKT/ShQ6dxpIspT4bltu5GrTbtAmV/DMitxqTarBmZyE0Y xvjzb+YIbCdn3QUKu9aSicCEtXvwcM0TPhMSPXCzfVTy61sHfNNahIl9MbYdRmr0CRRWOj 3LP60C73aEaLe5BA9T5o1oJzTHR7LOowFNnNgieEvdQOy/FodcimCQzbw+OioYQrmHWH5Z nNcL5CvM6JkJDDGV+kfGamtr7LH8pEeM8Oh4LbXYT8vnfxClQ3uBsxskUBMNZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026814; a=rsa-sha256; cv=none; b=e/ki8QKD9zvcoG9u8nAC4kVUbWmDXdLvCSVJT8eBMIEMzGLvV+CxYgi9hZs7Rxb6KXUOAv aOauhArJF+G4QsLHgSEW1sYlFqT/leSVRCw7/Q7c+BhVZ7Vt/K9U1sQ05zCwrUQucuP+cz K9dWOD6V+s453WXPiFMUWaPB+k/rcwaDw4rVhSncjPTiZ1WWn7GtCKJ+VQ4H/vrr67An1E Pp6y+r7IYE0Y2Gp05Mfw4Zv2UyZzwhhSmV0KNT9qBov+uFyxQl7x+V9RjOq6Pvnuvgdek+ 9SEZAv7lsHEShUqQ4FC65SzSK56ViUPeOuUveJiqYiTym2u9MIMvyZr40MIU0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG63ywNz17NN; Thu, 29 Jun 2023 08:20: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 35T8KEU0081643; Thu, 29 Jun 2023 08:20:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KEBs081637; Thu, 29 Jun 2023 08:20:14 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:14 GMT Message-Id: <202306290820.35T8KEBs081637@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: c43f5eb2f4c7 - stable/13 - linux(4): Move translate_vnhook_major_minor() into the Linux common module List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: c43f5eb2f4c7cbfde1873c9d0ece23e719ae312e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c43f5eb2f4c7cbfde1873c9d0ece23e719ae312e commit c43f5eb2f4c7cbfde1873c9d0ece23e719ae312e Author: Dmitry Chagin AuthorDate: 2023-04-28 08:54:58 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:29 +0000 linux(4): Move translate_vnhook_major_minor() into the Linux common module (cherry picked from commit 6072eea0c375fc3ab0cf5bb494c75d1beac7b8ba) --- sys/compat/linux/linux_stats.c | 24 ------------------------ sys/compat/linux/linux_util.c | 26 ++++++++++++++++++++++++++ sys/compat/linux/linux_util.h | 3 +++ 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 79937fd9fa86..219f4a602eb4 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -52,30 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -static void -translate_vnhook_major_minor(struct vnode *vp, struct stat *sb) -{ - int major, minor; - - if (vn_isdisk(vp)) { - sb->st_mode &= ~S_IFMT; - sb->st_mode |= S_IFBLK; - } - - /* - * Return the same st_dev for every devfs instance. The reason - * for this is to work around an idiosyncrasy of glibc getttynam() - * implementation: it checks whether st_dev returned for fd 0 - * is the same as st_dev returned for the target of /proc/self/fd/0 - * symlink, and with linux chroots having their own devfs instance, - * the check will fail if you chroot into it. - */ - if (rootdevmp != NULL && vp->v_mount->mnt_vfc == rootdevmp->mnt_vfc) - sb->st_dev = rootdevmp->mnt_stat.f_fsid.val[0]; - - if (linux_vn_get_major_minor(vp, &major, &minor) == 0) - sb->st_rdev = (major << 8 | minor); -} static int linux_kern_statat(struct thread *td, int flag, int fd, const char *path, diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 2a21fdc10bd7..5995ac5e18af 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -225,6 +226,31 @@ linux_vn_get_major_minor(const struct vnode *vp, int *major, int *minor) return (error); } +void +translate_vnhook_major_minor(struct vnode *vp, struct stat *sb) +{ + int major, minor; + + if (vn_isdisk(vp)) { + sb->st_mode &= ~S_IFMT; + sb->st_mode |= S_IFBLK; + } + + /* + * Return the same st_dev for every devfs instance. The reason + * for this is to work around an idiosyncrasy of glibc getttynam() + * implementation: it checks whether st_dev returned for fd 0 + * is the same as st_dev returned for the target of /proc/self/fd/0 + * symlink, and with linux chroots having their own devfs instance, + * the check will fail if you chroot into it. + */ + if (rootdevmp != NULL && vp->v_mount->mnt_vfc == rootdevmp->mnt_vfc) + sb->st_dev = rootdevmp->mnt_stat.f_fsid.val[0]; + + if (linux_vn_get_major_minor(vp, &major, &minor) == 0) + sb->st_rdev = (major << 8 | minor); +} + char * linux_get_char_devices(void) { diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index 37445ad0af27..f61aeea99136 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -105,6 +105,8 @@ struct linux_device_handler { int linux_char_device; }; +struct stat; + int linux_device_register_handler(struct linux_device_handler *h); int linux_device_unregister_handler(struct linux_device_handler *h); char *linux_driver_get_name_dev(device_t dev); @@ -112,6 +114,7 @@ int linux_driver_get_major_minor(const char *node, int *major, int *minor); int linux_vn_get_major_minor(const struct vnode *vn, int *major, int *minor); char *linux_get_char_devices(void); void linux_free_get_char_devices(char *string); +void translate_vnhook_major_minor(struct vnode *vp, struct stat *sb); #if defined(KTR) From nobody Thu Jun 29 08:20: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 4QsBG76VFkz4knVD; Thu, 29 Jun 2023 08:20: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 4QsBG75ZnFz3tWq; Thu, 29 Jun 2023 08:20:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2wk2thw8jyUVIo1GZ8oPLYy/DHKU1ZrF01qp5jWW7FQ=; b=KmiAefGe8/55fDnBbwk4LAgmCGa8vaQL90P6gluWa8XCJ9C2g9LSqP8tNVnNYg21wjU++G JWdO0k+87XmbHQbVBILf+ftnBfGgrEu2ZZlpewAmVAS9xTY34ksv+eOXYpwbWbh7VtBXFw wLjvgWZZ9cZ7eBIRT0BAN8IbyMGePuHvvJACN2jMA3tx8ewVqjdGByuOTHrwnmOebe+7p6 3BcG5hZ0MXzyonN60ys01yPBNvgvp0siskaVeTmJh/XIkeyXm3jAKfJjIRYUF83rTLQ6wf 5JoQUb6Pu1/BkOi1W6lPIWtHoRUqqR/NkrxF5QHdihyQqSuRi4EZ28+1Q08U4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2wk2thw8jyUVIo1GZ8oPLYy/DHKU1ZrF01qp5jWW7FQ=; b=lvUm+vo8PX8BIr/shJToosrsQgMZWj34lJR+lewtGuvayIrgZO5IfgOlbYrAD0iXkfUunb sQfMq+zyjuodcbUHAg24b6vMJ2AgZdD1CI+F5+dxaCU9EpFw3qmdkLzT2pprY/9aL6TJJU 1qhedLIfe/6FNRHe3HEwoi93Dc1zcETnWHoRuKKZdtUEehyOKMmv6Gx3/1rKaFOYa0FGBj j0/sJwXdNrlbDIqaxJpy9haNu4y6zxIEIKYmZo2zdIHyUwyF67dp7BGXbQQauY3QNGDFpB Ty1NObnENJciQm+xU+COsSi+ywWrvlzo3qap8flTeASnrENXURx9LAoK8rD86w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026815; a=rsa-sha256; cv=none; b=tqWVCM+VRxG+RMvvFX40Oz4pf2965rdn2bCUeJz1oN1rCRQjvzcjEs9tVmh1PiXDeR7Ccm Oyz/cIdGKyhJcIGOBCtN0w+cpN71NxyeAqGop9+TMhSTSrXtR9ud/t226XxwGt3STMgLTO Bapj4ndRkQVC45gkLZ0gtGZCQs1hLWuGTqoG4R3sbeb4biH9p0UdLphgtl9acwiEgu1mvG 7HVX5tXltXNJKrf/T2okn1wZOiYehqx+UCsCOJ3KR7C2/P4xD2TAVcZkyT04IKDfhKxmak xuMVBo2whapGiDQdi0TjX8bUx/U+L8WbCafmHrCAIwFuLXb7F8kT0jvThRb0Mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG74g9Jz182w; Thu, 29 Jun 2023 08:20: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 35T8KFho082287; Thu, 29 Jun 2023 08:20:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KFKG082284; Thu, 29 Jun 2023 08:20:15 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:15 GMT Message-Id: <202306290820.35T8KFKG082284@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: 815a433165a0 - stable/13 - linux(4): Move statx_copyout() close to linux_statx() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 815a433165a0406a88e70931db6a40e2e1e74c2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=815a433165a0406a88e70931db6a40e2e1e74c2e commit 815a433165a0406a88e70931db6a40e2e1e74c2e Author: Dmitry Chagin AuthorDate: 2023-04-28 08:54:59 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:29 +0000 linux(4): Move statx_copyout() close to linux_statx() Just for future changes of the conditional Linuxulator build. We need a small refactoring of the MI code to help porting Linuxulator to other platforms. (cherry picked from commit e9204c5c2c5c471ad2182ec6358a46be74c9ebb6) --- sys/compat/linux/linux_stats.c | 67 +++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 219f4a602eb4..04589c33547b 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -165,39 +165,6 @@ newstat_copyout(struct stat *buf, void *ubuf) return (copyout(&tbuf, ubuf, sizeof(tbuf))); } -static int -statx_copyout(struct stat *buf, void *ubuf) -{ - struct l_statx tbuf; - - bzero(&tbuf, sizeof(tbuf)); - tbuf.stx_mask = STATX_ALL; - tbuf.stx_blksize = buf->st_blksize; - tbuf.stx_attributes = 0; - tbuf.stx_nlink = buf->st_nlink; - tbuf.stx_uid = buf->st_uid; - tbuf.stx_gid = buf->st_gid; - tbuf.stx_mode = buf->st_mode; - tbuf.stx_ino = buf->st_ino; - tbuf.stx_size = buf->st_size; - tbuf.stx_blocks = buf->st_blocks; - - tbuf.stx_atime.tv_sec = buf->st_atim.tv_sec; - tbuf.stx_atime.tv_nsec = buf->st_atim.tv_nsec; - tbuf.stx_btime.tv_sec = buf->st_birthtim.tv_sec; - tbuf.stx_btime.tv_nsec = buf->st_birthtim.tv_nsec; - tbuf.stx_ctime.tv_sec = buf->st_ctim.tv_sec; - tbuf.stx_ctime.tv_nsec = buf->st_ctim.tv_nsec; - tbuf.stx_mtime.tv_sec = buf->st_mtim.tv_sec; - tbuf.stx_mtime.tv_nsec = buf->st_mtim.tv_nsec; - - tbuf.stx_rdev_major = buf->st_rdev >> 8; - tbuf.stx_rdev_minor = buf->st_rdev & 0xff; - tbuf.stx_dev_major = buf->st_dev >> 8; - tbuf.stx_dev_minor = buf->st_dev & 0xff; - - return (copyout(&tbuf, ubuf, sizeof(tbuf))); -} #ifdef LINUX_LEGACY_SYSCALLS int @@ -753,6 +720,40 @@ linux_syncfs(struct thread *td, struct linux_syncfs_args *args) return (error); } +static int +statx_copyout(struct stat *buf, void *ubuf) +{ + struct l_statx tbuf; + + bzero(&tbuf, sizeof(tbuf)); + tbuf.stx_mask = STATX_ALL; + tbuf.stx_blksize = buf->st_blksize; + tbuf.stx_attributes = 0; + tbuf.stx_nlink = buf->st_nlink; + tbuf.stx_uid = buf->st_uid; + tbuf.stx_gid = buf->st_gid; + tbuf.stx_mode = buf->st_mode; + tbuf.stx_ino = buf->st_ino; + tbuf.stx_size = buf->st_size; + tbuf.stx_blocks = buf->st_blocks; + + tbuf.stx_atime.tv_sec = buf->st_atim.tv_sec; + tbuf.stx_atime.tv_nsec = buf->st_atim.tv_nsec; + tbuf.stx_btime.tv_sec = buf->st_birthtim.tv_sec; + tbuf.stx_btime.tv_nsec = buf->st_birthtim.tv_nsec; + tbuf.stx_ctime.tv_sec = buf->st_ctim.tv_sec; + tbuf.stx_ctime.tv_nsec = buf->st_ctim.tv_nsec; + tbuf.stx_mtime.tv_sec = buf->st_mtim.tv_sec; + tbuf.stx_mtime.tv_nsec = buf->st_mtim.tv_nsec; + + tbuf.stx_rdev_major = buf->st_rdev >> 8; + tbuf.stx_rdev_minor = buf->st_rdev & 0xff; + tbuf.stx_dev_major = buf->st_dev >> 8; + tbuf.stx_dev_minor = buf->st_dev & 0xff; + + return (copyout(&tbuf, ubuf, sizeof(tbuf))); +} + int linux_statx(struct thread *td, struct linux_statx_args *args) { From nobody Thu Jun 29 08:20: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 4QsBG91kdPz4knVF; Thu, 29 Jun 2023 08:20: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 4QsBG85wZsz3tqJ; Thu, 29 Jun 2023 08:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DqI0h4RAJo9rWy5KY5M51Ep+jgQfRSvcSy17WmhQaiU=; b=iYrAoC5bJBKiDpDklPh+krMvx40YF6BphPmqg1VMOLu56NibdOBFQYg/QbhAARlP7Vb/oJ 6zrC8yehX65iHzgKVN49ZeC72SVOyb2e/ajcCEaPA9jXHdPVPjyBV8w50gzuH7Ju0G1fk7 hIJvMLYv9Vx0nos+/iWqjQK4q8N8uAKdH1REGLnZFo+DdJoOM57qRGW3ni5tBl/zWgoGWj X+aN9JOPupf64i7fw/0PJ4gPf2yuNKBsZlUgjn38hIGH1LuXGhfebEUJCF0ohu4T4abEDA 6y0+EBvUrii1haO5G3r13qQj0km9Vpl2Qs2gCLE3qUgN9wUtHsrouvjmnubWxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DqI0h4RAJo9rWy5KY5M51Ep+jgQfRSvcSy17WmhQaiU=; b=gP1B5f93SojnJqZP1KzgsVuqDP/ouyubCAF5y550mYnb+rqa9tJB23MCiMv3ElJH3BAR8f fd1d9GNWhbjSVLV08udZH+3/Qg2eR3MFx/0aBcscMqNaSRavp9NoP4tPp1gAWx38LAovxM ncC1Obt5XBK3/xXq15XYvZZylu6g+jOGRDK1FJ+Yw7Em9NYLYtwIK0Q+qRjQXlEiccb5F5 vTOBJ3pPA6gTVOxAZk3ABJPfLFuD1OT0l8JaAgfWqZ9j7hZ5YGGU5EAjxW2vPo8k1KQ3SR SiCASif7VR6qfI2yvTBTc0D0Rek/jkwAv/kvzaDWvtQQ167BpUQMM6DbPoic+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026816; a=rsa-sha256; cv=none; b=oN6x38VESf5Ez0NZ18EXxt0FYyGO7UbX09xe6KjmEXtVc440N0N7/mItIonu0sUP+GubUn LLrRGibgYEmOyB0MTCENNcx9ZGCqLQLERRZGOm0sqzXi41CMY+GYJXvRdQfdZfDaxTcF8j xYnnZCkaV/C6Qm7YHxZk5TuMVFzKAgf7s/xMX4CbZBssutDpCfYTgIJX/Eaf/ZblinqVMi nCKFkDThZITMkXTtsHxD5wKluDWXU25Z2Uc46YdrnKzlEhG2k4TPmkZB0pifMEAKxzmUIJ ql0M2pb8984RFQOnx8Xyz+1qs6YWUs5MHNhvkCk5CZJ/cIuZqvbFpB3wlaeFLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG852Mwz17sR; Thu, 29 Jun 2023 08:20: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 35T8KG1r082884; Thu, 29 Jun 2023 08:20:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KGT4082879; Thu, 29 Jun 2023 08:20:16 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:16 GMT Message-Id: <202306290820.35T8KGT4082879@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: aaf17ef31c38 - stable/13 - linux(4): Rename obsolete old struct l_stat to struct l_old_stat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: aaf17ef31c383e357dd622353002fb07a88ae518 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=aaf17ef31c383e357dd622353002fb07a88ae518 commit aaf17ef31c383e357dd622353002fb07a88ae518 Author: Dmitry Chagin AuthorDate: 2023-04-28 08:54:59 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:29 +0000 linux(4): Rename obsolete old struct l_stat to struct l_old_stat (cherry picked from commit a408fc097f43b80fd1477196e595edc796804520) --- sys/amd64/linux32/linux.h | 3 ++- sys/compat/linux/linux_stats.c | 8 ++++---- sys/i386/linux/linux.h | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index d0c966ad3c92..4552c60e260b 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -199,7 +199,8 @@ struct l_newstat { l_ulong __unused5; }; -struct l_stat { +/* __old_kernel_stat now */ +struct l_old_stat { l_ushort st_dev; l_ulong st_ino; l_ushort st_mode; diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 04589c33547b..58c378d6bc08 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -222,9 +222,9 @@ linux_newfstat(struct thread *td, struct linux_newfstat_args *args) #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) static int -stat_copyout(struct stat *buf, void *ubuf) +old_stat_copyout(struct stat *buf, void *ubuf) { - struct l_stat lbuf; + struct l_old_stat lbuf; bzero(&lbuf, sizeof(lbuf)); lbuf.st_dev = dev_to_ldev(buf->st_dev); @@ -266,7 +266,7 @@ linux_stat(struct thread *td, struct linux_stat_args *args) if (error) { return (error); } - return (stat_copyout(&buf, args->up)); + return (old_stat_copyout(&buf, args->up)); } int @@ -286,7 +286,7 @@ linux_lstat(struct thread *td, struct linux_lstat_args *args) if (error) { return (error); } - return (stat_copyout(&buf, args->up)); + return (old_stat_copyout(&buf, args->up)); } #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index c4b70b2a6aaa..7e10ff357e00 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -172,7 +172,8 @@ struct l_newstat { l_ulong __unused5; }; -struct l_stat { +/* __old_kernel_stat now */ +struct l_old_stat { l_ushort st_dev; l_ulong st_ino; l_ushort st_mode; From nobody Thu Jun 29 08:20: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 4QsBGB0qGSz4knPL; Thu, 29 Jun 2023 08:20:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QsBG96vhvz3tfH; Thu, 29 Jun 2023 08:20:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JMYrq+vnHyMZG8vVykILfSNDj6YhLWoUT1Y1Zvtt9Qw=; b=EuXgvYJcS+pSw5UjWbV+Q5oYGMt2ieNKfZ8xTTo4nm1lorfsuY5geCRA+KqMneXQlTDz5g B5YDGcOIdWbrDuAGRbcd0zPaR4ZomwX3JTqOVD9s0/l49s6LQtOPU/LOunezcAsjpP9U+c uSRmJ9kqxPieTf4uZ+Q7g+UqHiL41t48akYyiaFMv4+OAtRbn59NIv9BA7KnkWUu3yuERM l4phB6lT3uENpORsd8FjJ5U3YX9fphgiiSAw7Ey5b++958wXq1QHCTCq9Q5NKQIeHK8uZf mYYRx1FKpiv7PwbFe17sgpzztPTil0c6331a3s8dA8JAvZ2ad1rHuNqxEnZ13g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JMYrq+vnHyMZG8vVykILfSNDj6YhLWoUT1Y1Zvtt9Qw=; b=fceU33E6AkQ1XJdiwKRY1y7fXo0yGf2VGKaKWEPcgMN+d/aSvknyDJ0JeeXhAa+lDG1huV NLNi4XDjIbejNMfaN/fiHXgFeA2b/rf6L07gx2H8qjMy86YqzH00X21zIGHkuAXSyV0ukC Rgq2jrlN7GYpx3ZgDzuRtN/HiQiqbZFro0nt7L1Q2dRpD6gUeMqiE0nEnG6rgKUctr2oCK VUsmXjz+soYK/tGT9FEG3ghLAmQCf78ejUWfiNI9+jy6P4XnZQFS2ggqiDLpmqF3GKYh/g oLu2pDdZpP338TRtmatbnvhUBC407qc7u7f3SQciUovMT8MsGLqLPtItOCdLeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026818; a=rsa-sha256; cv=none; b=xVIy9sk0BzWeSH1uKnRvSEYnTbjU+aW8z47YBeUN5O95nNyfeRwq1UJF8FwYbe9SKBs0Y5 HRHInrrdRk+hrwuVggV5dxNaGtHRtM+T+1ekawiZqs4k9n8TqSTolM6AZU38BGNmC80TCF VL/Dx3r3D34txcyBU5E8PO11kZWpqVibV1Pf4Nq6aOsudADOhcSNTRxTgHV2ueXRMXJ9e3 bqQjies0RjmNn+z3QqDx5EcFwGScqeuQf9bseWer6TtZUCZv2pbG9mRVVZXweTUC582Yq/ xltUgtbwI+xWM/2sZFNlmP9eap+P7qC/t0Ue6jd6ghfFUp+UWF4fhJafa8caNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBG95zQKz17sS; Thu, 29 Jun 2023 08:20: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 35T8KHka083291; Thu, 29 Jun 2023 08:20:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KHKu083290; Thu, 29 Jun 2023 08:20:17 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:17 GMT Message-Id: <202306290820.35T8KHKu083290@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: 361f6ce4a675 - stable/13 - linux(4): Mark old fstat syscal as unimplemented List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 361f6ce4a67533e433e43d34fbc79a48b5edeb43 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=361f6ce4a67533e433e43d34fbc79a48b5edeb43 commit 361f6ce4a67533e433e43d34fbc79a48b5edeb43 Author: Dmitry Chagin AuthorDate: 2023-04-28 08:54:59 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:30 +0000 linux(4): Mark old fstat syscal as unimplemented It looks like the old fstat system call never been implemented. (cherry picked from commit 391fd1e1a1e8d360d4ebaceecf1ab7c46063b257) --- sys/amd64/linux32/linux32_dummy_machdep.c | 1 + sys/i386/linux/linux_dummy_machdep.c | 2 +- sys/i386/linux/syscalls.master | 7 +------ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/amd64/linux32/linux32_dummy_machdep.c b/sys/amd64/linux32/linux32_dummy_machdep.c index bc7a3c0aa69b..4dc0f6ffc0bd 100644 --- a/sys/amd64/linux32/linux32_dummy_machdep.c +++ b/sys/amd64/linux32/linux32_dummy_machdep.c @@ -44,6 +44,7 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); UNIMPLEMENTED(break); UNIMPLEMENTED(ftime); +UNIMPLEMENTED(fstat); UNIMPLEMENTED(gtty); UNIMPLEMENTED(stty); UNIMPLEMENTED(lock); diff --git a/sys/i386/linux/linux_dummy_machdep.c b/sys/i386/linux/linux_dummy_machdep.c index 7f29d2a6808c..87edfed4a17d 100644 --- a/sys/i386/linux/linux_dummy_machdep.c +++ b/sys/i386/linux/linux_dummy_machdep.c @@ -50,6 +50,7 @@ LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); UNIMPLEMENTED(break); UNIMPLEMENTED(ftime); +UNIMPLEMENTED(fstat); UNIMPLEMENTED(gtty); UNIMPLEMENTED(stty); UNIMPLEMENTED(lock); @@ -59,7 +60,6 @@ UNIMPLEMENTED(profil); UNIMPLEMENTED(ulimit); DUMMY(bdflush); -DUMMY(fstat); DUMMY(olduname); DUMMY(stime); DUMMY(uname); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index a5b246c0822a..98143e300e6c 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -189,12 +189,7 @@ l_uint secs ); } -28 AUE_FSTAT STD { - int linux_fstat( - l_uint fd, - struct linux_stat *up - ); - } +28 AUE_NULL UNIMPL fstat 29 AUE_NULL STD { int linux_pause(void); } From nobody Thu Jun 29 08:20: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 4QsBGC106Hz4knVS; Thu, 29 Jun 2023 08:20: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 4QsBGC078qz3tqy; Thu, 29 Jun 2023 08:20:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7iCh72hxwlD8rZNHF93nQzp+xf32WmF2VMbprKesA4Y=; b=gooRsa/+mQGD0BtN1djIK0umpcPHTN1uLe1+orKJkmy/l+9yAdG/jKRVIL99RkNip4LK9y pJPqtcM5fh/QUMAq1JV5hHOuWWD0GmA64X1zP5ExaKAtcuHabnlI/kUyW6B0HqlvMXR4kF myrcXBypvKKHfHbR29/aWw6Xq6S0D/MWC3Tpise/m48N58EKT/tMmyXN0gmESuu70GqdOR 4tNhrojCtCkoWjr1ViiG9Gl83buVvppTTHg+5I4QogaDYINwN7SWAF7R8Saem8zrdLT8Gn B6t3AD5yeS6wLWgU6hXyIgUyEqfZK0xxDbwheOGw8j+GapfnsWyCkg6AQ7vwoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7iCh72hxwlD8rZNHF93nQzp+xf32WmF2VMbprKesA4Y=; b=tPdGI5Pi+7EjvrbGJ/J0l8O9SkILzDs+F+6HxclRu3MstE23iSfQym9u2V57pesiXUsgNG 36l6BjwvvwFEql2+C3+GNBufW/9OkirfPmz0sfYOLnT5HuI7irv8fqV8HX710OjXvFR8Fr uMBjOMiKBDYtG72fbKgMjSL20XQ202Qmz8EFssjk3Y/7Lj5OTtcnsHx27nHIBy3sPsxkoZ LqB7EwxcYU225JeQRLUChVVtMFXMcFLwmDcYlGeymleHkv3SfWSmJF51G45ihFjGijxrUh hdip5dFFRvzZz/L8m0fd6/GJn2fhcfXOE2YTjlAh8CATVbKL5hFjlkwTQX8Vow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026819; a=rsa-sha256; cv=none; b=HV7BGBmBKaORXv9TnC8X/qsJ3eLkal22R/XaxrK/0+mtYzdslkoQN4riVKfRayDICr6ucV epYvNIeg5HtYY58L1Bb2Y/z4l/c2P2xyP8c3xDJgUNvv14Sx/kbVopM9Fqb3xboK9dvDSv 5IHzVWzdxky2MZ6G7wRAt9nVkceVHrCnAzqd8MeWDtzx+1UG4KU7pkjr/Y0YFi/woJgthW 9SuGWVKriYw/bOhnjuEhKQtBwdPu3K9yzn7IL5U2v7KCoPPtH3A2/b97Gd5nBVdZFmkvHc MjtzfNHmtE/7X4UUX1lrsetXTtDq7dJZukTDdFbr8SccQY40A9/ddFGaPNGqYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGB6Kyxz17sT; Thu, 29 Jun 2023 08:20:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 35T8KIUU083316; Thu, 29 Jun 2023 08:20:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KIlU083315; Thu, 29 Jun 2023 08:20:18 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:18 GMT Message-Id: <202306290820.35T8KIlU083315@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: 69a2984e3c88 - stable/13 - linux(4): Update syscalls.master to reflect struct l_old_stat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 69a2984e3c889577332b389f2098671b4e1b4337 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=69a2984e3c889577332b389f2098671b4e1b4337 commit 69a2984e3c889577332b389f2098671b4e1b4337 Author: Dmitry Chagin AuthorDate: 2023-04-28 08:54:59 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:30 +0000 linux(4): Update syscalls.master to reflect struct l_old_stat (cherry picked from commit 2370c7321fd392cfd23059760a816e852c921cde) --- sys/amd64/linux32/syscalls.master | 4 ++-- sys/i386/linux/syscalls.master | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 4561667dc3cc..497e0e42da92 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -138,7 +138,7 @@ 18 AUE_STAT STD { int linux_stat( char *path, - struct linux_stat *up + struct l_old_stat *up ); } 19 AUE_LSEEK STD { @@ -450,7 +450,7 @@ 84 AUE_LSTAT STD { int linux_lstat( char *path, - struct linux_lstat *up + struct l_old_stat *up ); } 85 AUE_READLINK STD { diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 98143e300e6c..4827e1eca2df 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -138,7 +138,7 @@ 18 AUE_STAT STD { int linux_stat( char *path, - struct linux_stat *up + struct l_old_stat *up ); } 19 AUE_LSEEK STD { @@ -450,7 +450,7 @@ 84 AUE_LSTAT STD { int linux_lstat( char *path, - struct l_stat *up + struct l_old_stat *up ); } 85 AUE_READLINK STD { From nobody Thu Jun 29 08:20: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 4QsBGD2FPbz4knVT; Thu, 29 Jun 2023 08:20: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 4QsBGD1H2yz3trQ; Thu, 29 Jun 2023 08:20:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tG4VuCRNkekNxvvfAhCLFcnqljo7XLNCLNmHClnLyD4=; b=p5i4HmPAPdb939/FG4u2BiDXZKn1vCWSk3hknLUjJIvdQOtUAkhGuZoQG/g6xlH6pqZFRR VS8k0Qcqs9Rz1V+6qsqvXHtIZxsB4IcJYytornS9h8iuwTyX5P2xbhyMSP1asWjnKi1WkK d6FA+/6a/QvJHcLSzUVu/8SBdc44i1BVVeLko3ZVHXGjIVYPwi1DXAVdLiGP6kvq/drdos YMNBg2V03dwHxGnuYbA1ZCDLje/ApBn9J/XHOAD7ycjZa5CwKHzXZr4vkDbO32uQwZtVK3 FBStv5WI8to8zqJNy14nCcXlLK6beNyu7t85AG2ugSiNqGJXY8WKL0d7dGuJSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tG4VuCRNkekNxvvfAhCLFcnqljo7XLNCLNmHClnLyD4=; b=fQiPdyknYuPMXe5oCFDVmrKy1boqezCLEwN3B7Pu4yiLw0l8HY9eubFtKvom0eMqqVMfNe k8yhxhcfF6sSLWICbGbvthjCuxZCbO1mQGxPbutFLC/Gs/uBb+p6AReTp54AnyEDAwr3tq ibdoItV0g2dPEQ3Mk7InzutdNhlG60zgCHr8PewQSS0oFM5CkoV0EnLErKcZZRiY2C1g3s bgYCqTJOiG0lw/fISnG+79ooVNgLFQ7Qi/+YHrv3QTIiAOtHANKB9vtUqdrwphPxQ7D/tv RmFXKz5OVm9LmKIfL2jQvJ4/ps+b+EdIFShg/9vNozuaTVQXYXitn2foWoiGEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026820; a=rsa-sha256; cv=none; b=Y8BAy00A7jXsGFQ3Zx20RMfxNLfL73pMtumZ2FJDFCP4jlCuqMF5OUodcGDuZBJebQFRsc n4lw3lkyhmSh/PS1ngdDEawivGVdeUCqMEhLaVzV2j2oO9dhy5VqSZNanvpdF6ATGfqBpg BYYSyDcr67AUtjU/3tbwR9z6B9l4aVG6NXn41osEgsEhWxpm2OZK83OW3K9c8ynk8MHmwn MS2LYU39memmmlVbYEVNC6NOlC9N9PW/bGVth//qr31c+wom/lQ6ABBvBD6jxvFsNlyuxK TEKkR9S3YYJSgRfDnXyOlvGV6TAY6mNeCI46+paSFr1+Kp3/0SOGJYJggxgLkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGD0NGrz17sV; Thu, 29 Jun 2023 08:20: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 35T8KJx6083335; Thu, 29 Jun 2023 08:20:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KJpO083334; Thu, 29 Jun 2023 08:20:19 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:19 GMT Message-Id: <202306290820.35T8KJpO083334@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: 5e43a15ba4d9 - stable/13 - linux(4): Regen for struct l_old_stat changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 5e43a15ba4d9e5f039f1a0ecbcbb86b3ba8c1159 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5e43a15ba4d9e5f039f1a0ecbcbb86b3ba8c1159 commit 5e43a15ba4d9e5f039f1a0ecbcbb86b3ba8c1159 Author: Dmitry Chagin AuthorDate: 2023-04-28 08:55:01 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:33 +0000 linux(4): Regen for struct l_old_stat changes (cherry picked from commit 023e6884967d0cb0b330eb15264d159619b0533b) --- sys/amd64/linux32/linux32_proto.h | 4 ++-- sys/amd64/linux32/linux32_systrace_args.c | 8 ++++---- sys/i386/linux/linux_proto.h | 10 ++------- sys/i386/linux/linux_syscall.h | 1 - sys/i386/linux/linux_syscalls.c | 2 +- sys/i386/linux/linux_sysent.c | 2 +- sys/i386/linux/linux_systrace_args.c | 34 ++++--------------------------- 7 files changed, 14 insertions(+), 47 deletions(-) diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index d76b685b17e6..79a7f54b8ce9 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -89,7 +89,7 @@ struct linux_lchown16_args { }; struct linux_stat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char up_l_[PADL_(struct linux_stat *)]; struct linux_stat * up; char up_r_[PADR_(struct linux_stat *)]; + char up_l_[PADL_(struct l_old_stat *)]; struct l_old_stat * up; char up_r_[PADR_(struct l_old_stat *)]; }; struct linux_lseek_args { char fdes_l_[PADL_(l_uint)]; l_uint fdes; char fdes_r_[PADR_(l_uint)]; @@ -273,7 +273,7 @@ struct linux_symlink_args { }; struct linux_lstat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char up_l_[PADL_(struct linux_lstat *)]; struct linux_lstat * up; char up_r_[PADR_(struct linux_lstat *)]; + char up_l_[PADL_(struct l_old_stat *)]; struct l_old_stat * up; char up_r_[PADR_(struct l_old_stat *)]; }; struct linux_readlink_args { char name_l_[PADL_(char *)]; char * name; char name_r_[PADR_(char *)]; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index 8dd85ea9720a..fa5a50a0dd86 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -143,7 +143,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 18: { struct linux_stat_args *p = params; uarg[0] = (intptr_t)p->path; /* char * */ - uarg[1] = (intptr_t)p->up; /* struct linux_stat * */ + uarg[1] = (intptr_t)p->up; /* struct l_old_stat * */ *n_args = 2; break; } @@ -562,7 +562,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 84: { struct linux_lstat_args *p = params; uarg[0] = (intptr_t)p->path; /* char * */ - uarg[1] = (intptr_t)p->up; /* struct linux_lstat * */ + uarg[1] = (intptr_t)p->up; /* struct l_old_stat * */ *n_args = 2; break; } @@ -3480,7 +3480,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "userland struct linux_stat *"; + p = "userland struct l_old_stat *"; break; default: break; @@ -4086,7 +4086,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "userland struct linux_lstat *"; + p = "userland struct l_old_stat *"; break; default: break; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index f877c94a73fb..1957c8d0c1b3 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -89,7 +89,7 @@ struct linux_lchown16_args { }; struct linux_stat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char up_l_[PADL_(struct linux_stat *)]; struct linux_stat * up; char up_r_[PADR_(struct linux_stat *)]; + char up_l_[PADL_(struct l_old_stat *)]; struct l_old_stat * up; char up_r_[PADR_(struct l_old_stat *)]; }; struct linux_lseek_args { char fdes_l_[PADL_(l_uint)]; l_uint fdes; char fdes_r_[PADR_(l_uint)]; @@ -127,10 +127,6 @@ struct linux_ptrace_args { struct linux_alarm_args { char secs_l_[PADL_(l_uint)]; l_uint secs; char secs_r_[PADR_(l_uint)]; }; -struct linux_fstat_args { - char fd_l_[PADL_(l_uint)]; l_uint fd; char fd_r_[PADR_(l_uint)]; - char up_l_[PADL_(struct linux_stat *)]; struct linux_stat * up; char up_r_[PADR_(struct linux_stat *)]; -}; struct linux_pause_args { register_t dummy; }; @@ -265,7 +261,7 @@ struct linux_symlink_args { }; struct linux_lstat_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char up_l_[PADL_(struct l_stat *)]; struct l_stat * up; char up_r_[PADR_(struct l_stat *)]; + char up_l_[PADL_(struct l_old_stat *)]; struct l_old_stat * up; char up_r_[PADR_(struct l_old_stat *)]; }; struct linux_readlink_args { char name_l_[PADL_(char *)]; char * name; char name_r_[PADR_(char *)]; @@ -1716,7 +1712,6 @@ int linux_getuid16(struct thread *, struct linux_getuid16_args *); int linux_stime(struct thread *, struct linux_stime_args *); int linux_ptrace(struct thread *, struct linux_ptrace_args *); int linux_alarm(struct thread *, struct linux_alarm_args *); -int linux_fstat(struct thread *, struct linux_fstat_args *); int linux_pause(struct thread *, struct linux_pause_args *); int linux_utime(struct thread *, struct linux_utime_args *); int linux_access(struct thread *, struct linux_access_args *); @@ -2130,7 +2125,6 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_stime AUE_SETTIMEOFDAY #define LINUX_SYS_AUE_linux_ptrace AUE_PTRACE #define LINUX_SYS_AUE_linux_alarm AUE_NULL -#define LINUX_SYS_AUE_linux_fstat AUE_FSTAT #define LINUX_SYS_AUE_linux_pause AUE_NULL #define LINUX_SYS_AUE_linux_utime AUE_UTIME #define LINUX_SYS_AUE_linux_access AUE_ACCESS diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index a3a6fe680a7c..a77c91896fd6 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -31,7 +31,6 @@ #define LINUX_SYS_linux_stime 25 #define LINUX_SYS_linux_ptrace 26 #define LINUX_SYS_linux_alarm 27 -#define LINUX_SYS_linux_fstat 28 #define LINUX_SYS_linux_pause 29 #define LINUX_SYS_linux_utime 30 #define LINUX_SYS_linux_access 33 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index 95e44584ef2c..1454490c9318 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -35,7 +35,7 @@ const char *linux_syscallnames[] = { "linux_stime", /* 25 = linux_stime */ "linux_ptrace", /* 26 = linux_ptrace */ "linux_alarm", /* 27 = linux_alarm */ - "linux_fstat", /* 28 = linux_fstat */ + "#28", /* 28 = fstat */ "linux_pause", /* 29 = linux_pause */ "linux_utime", /* 30 = linux_utime */ "#31", /* 31 = stty */ diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index de0493a6dda6..3d92ce04eb52 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -45,7 +45,7 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_stime, .sy_auevent = AUE_SETTIMEOFDAY, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 25 = linux_stime */ { .sy_narg = AS(linux_ptrace_args), .sy_call = (sy_call_t *)linux_ptrace, .sy_auevent = AUE_PTRACE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 26 = linux_ptrace */ { .sy_narg = AS(linux_alarm_args), .sy_call = (sy_call_t *)linux_alarm, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 27 = linux_alarm */ - { .sy_narg = AS(linux_fstat_args), .sy_call = (sy_call_t *)linux_fstat, .sy_auevent = AUE_FSTAT, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 28 = linux_fstat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 28 = fstat */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_pause, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 29 = linux_pause */ { .sy_narg = AS(linux_utime_args), .sy_call = (sy_call_t *)linux_utime, .sy_auevent = AUE_UTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 30 = linux_utime */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 31 = stty */ diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 27d277e98aa3..72c6ba134b26 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -143,7 +143,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 18: { struct linux_stat_args *p = params; uarg[0] = (intptr_t)p->path; /* char * */ - uarg[1] = (intptr_t)p->up; /* struct linux_stat * */ + uarg[1] = (intptr_t)p->up; /* struct l_old_stat * */ *n_args = 2; break; } @@ -213,14 +213,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } - /* linux_fstat */ - case 28: { - struct linux_fstat_args *p = params; - iarg[0] = p->fd; /* l_uint */ - uarg[1] = (intptr_t)p->up; /* struct linux_stat * */ - *n_args = 2; - break; - } /* linux_pause */ case 29: { *n_args = 0; @@ -570,7 +562,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 84: { struct linux_lstat_args *p = params; uarg[0] = (intptr_t)p->path; /* char * */ - uarg[1] = (intptr_t)p->up; /* struct l_stat * */ + uarg[1] = (intptr_t)p->up; /* struct l_old_stat * */ *n_args = 2; break; } @@ -3519,7 +3511,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "userland struct linux_stat *"; + p = "userland struct l_old_stat *"; break; default: break; @@ -3621,19 +3613,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* linux_fstat */ - case 28: - switch (ndx) { - case 0: - p = "l_uint"; - break; - case 1: - p = "userland struct linux_stat *"; - break; - default: - break; - }; - break; /* linux_pause */ case 29: break; @@ -4138,7 +4117,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "userland struct l_stat *"; + p = "userland struct l_old_stat *"; break; default: break; @@ -8737,11 +8716,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* linux_fstat */ - case 28: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* linux_pause */ case 29: /* linux_utime */ From nobody Thu Jun 29 08:20: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 4QsBGF4Fycz4kng9; Thu, 29 Jun 2023 08:20: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 4QsBGF2hfPz3tjp; Thu, 29 Jun 2023 08:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CaCA1Qb6LlqvwNCspI/sGzvtQx2+uLaDwgvSTL9GPM0=; b=e7qCwcKwJtdaD7HjPXzRjiMiw/TUksvN7b4JmTUheS6l/IwS9ytuRiDYROGrTkFJz5LRKG fuOPR0Sn7QO21gPRImhUf6MS9zIxAfbPiiNNl2NnADeWi8iPoweAl4ovxxfo3MWqp/YeJS b3gK/BI5m/YKBLl8d/h64Bx95/Aq8UwAMPINezcGZzc9fyELyRoa6kOKerjHw2xgmUdCJY 7Kx0GEvK5hWnmqkSnxHQHZPQRL73Skw86DqiwqM/VDO+39qz20NHCxu4JXZm+3Q8jONgMp JBdTdr8j94Ry/Ur6y0hfSnXaFlaaOCSFeRXWqLU8LUXhpxj4C457NmoiHjrD7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CaCA1Qb6LlqvwNCspI/sGzvtQx2+uLaDwgvSTL9GPM0=; b=T3MS5qsOEGaOtT6KvYha7yb5xL7JCgXPxHIBHo6ew4uKo0fmJKLEzwCfC5VvXcoRdfK54F H5kmjuZwM0Z5BZdejU3zbMQIUQpITCbHTgix2aTuWkUfoNxjrISCHJvfw4W3f0hD5Ba1K1 jooo8bpBNvS+d6GbwH8tSMZbg4/41nAxzFNQufc6wC6DTKgeqJb1EkAqiXtLsmTQvM59HB vtAf7U206VpTHfJwYqdDBg7FgQoMtrDIpKVXrn16rQYJSva1sZ98XHhxRx0W7BEP7Tzf8k sMdI466iCcJJ9kFzUPyuPRHBF7L1ZlZmt8z2Y4/NTqel8L/8v2SbwMC4Hzl8+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026821; a=rsa-sha256; cv=none; b=R1xuBiC7vqN2iq8QrMtXQNobP3lvTNbZLUf/cpbBYBzQfb3IQBANwwg+F6r6JZtzftkWkk CMNWRqrEw+HAkhrVjotTYKZLYxfaTNIDS9Em6XjrBLWO26JLK1dTlg+1YpWe7TxtLt3iJ0 qZOFlM5faznzS+2g5FqrWDs/X6pbyGzhA7R+ODj3ntT3en1TBJcMrcKEBOurGHvYJDJYJd M2NBbTeOzWWJ7WHMgyc8mUlQXTlR7o2ncQ3vcW/C1K1dCpA7cVBO+okANLYJGd30qr1aMg GDYrrT6WhruhGhpGF/Py7fQ9ASxnCeDX9VPP/HXW+OB9ePDIlrbo9YnmEHcMGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGF11kNz182x; Thu, 29 Jun 2023 08:20: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 35T8KLXE083354; Thu, 29 Jun 2023 08:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KLmk083353; Thu, 29 Jun 2023 08:20:21 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:21 GMT Message-Id: <202306290820.35T8KLmk083353@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: 38e5a2a185bc - stable/13 - linux(4): Make struct newstat to match actual Linux one List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 38e5a2a185bc87d6775b96f07055263ca3377bcd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=38e5a2a185bc87d6775b96f07055263ca3377bcd commit 38e5a2a185bc87d6775b96f07055263ca3377bcd Author: Dmitry Chagin AuthorDate: 2023-04-28 08:55:01 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:36 +0000 linux(4): Make struct newstat to match actual Linux one In the struct stat the st_dev, st_rdev are unsigned long. (cherry picked from commit e0bfe0d62ca708c8c6173296cc05f6bbfb79b2ee) --- sys/amd64/linux/linux.h | 6 +++--- sys/amd64/linux32/linux.h | 6 ++---- sys/arm64/linux/linux.h | 4 ++-- sys/i386/linux/linux.h | 6 ++---- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index 0cf7d02c5833..81d9f48f6271 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -134,14 +134,14 @@ struct l_timespec { }; struct l_newstat { - l_dev_t st_dev; + l_ulong st_dev; l_ino_t st_ino; l_ulong st_nlink; l_uint st_mode; l_uid_t st_uid; l_gid_t st_gid; - l_uint __st_pad1; - l_dev_t st_rdev; + l_uint __st_pad0; + l_ulong st_rdev; l_off_t st_size; l_long st_blksize; l_long st_blocks; diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 4552c60e260b..02fcd320152d 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -180,15 +180,13 @@ struct l_timespec64 { }; struct l_newstat { - l_ushort st_dev; - l_ushort __pad1; + l_ulong st_dev; l_ulong st_ino; l_ushort st_mode; l_ushort st_nlink; l_ushort st_uid; l_ushort st_gid; - l_ushort st_rdev; - l_ushort __pad2; + l_ulong st_rdev; l_ulong st_size; l_ulong st_blksize; l_ulong st_blocks; diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index bee97691b744..a20b3c90a066 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -128,7 +128,7 @@ struct l_timespec { #define LINUX_O_LARGEFILE 000400000 struct l_newstat { - l_dev_t st_dev; + l_ulong st_dev; l_ino_t st_ino; l_uint st_mode; l_uint st_nlink; @@ -136,7 +136,7 @@ struct l_newstat { l_uid_t st_uid; l_gid_t st_gid; - l_dev_t st_rdev; + l_ulong st_rdev; l_ulong __st_pad1; l_off_t st_size; l_int st_blksize; diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 7e10ff357e00..2ccb2f92ef22 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -153,15 +153,13 @@ struct l_timespec64 { }; struct l_newstat { - l_ushort st_dev; - l_ushort __pad1; + l_ulong st_dev; l_ulong st_ino; l_ushort st_mode; l_ushort st_nlink; l_ushort st_uid; l_ushort st_gid; - l_ushort st_rdev; - l_ushort __pad2; + l_ulong st_rdev; l_ulong st_size; l_ulong st_blksize; l_ulong st_blocks; From nobody Thu Jun 29 08:20: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 4QsBGG5H2Mz4knlK; Thu, 29 Jun 2023 08:20: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 4QsBGG3b0Sz3tsN; Thu, 29 Jun 2023 08:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6cDstRouRl1KrvStcEameLgyMkDcF4okWReC3Ss53M=; b=e7QWWRsPTQWAC307t8j9FntCQeoFGmf50BxuifgpKMVxcMHmgzOn3JNI+nUI5nlSKezM4c MyF+T2YdG7/jKEmGF2MvkjDZmMvQi0qHpZLP7al+lYYojevyF39DYC0n7lBa++GK5PPgxh lMtnw2w6FUYymzzwZSLe6f6fOmhq946HvuLr5kfmfL38sdFeaHcdbJPk0DYsBVkJPiLcnf xAZeKLyCF1zMDRoEItdng9IpNfeJy0ouaFkS69M6jwTaP/is87to2pb08FfbgUxglsDvgE UN+053PkOsvfk06ya46ap3XnA4fNHwXpVYpSSQlIyHcl9HVTP4FPKALy8oG3ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6cDstRouRl1KrvStcEameLgyMkDcF4okWReC3Ss53M=; b=hfKpd1O4eORSRIT80TFgNknTvvYw+hPWtTxyYZ+de/2S6WjyeZkYQs9zFW8Nqy3oJQB3ms n7KWOfpWk+rLEeeCwaoU6ajeGXTPEETiTuW8K1n4FoVe2dcy5iN7DQX7Er4NwDRJden+4k YshxJYfWTqMoB3DhrROkbLFzAAAxgS5WGxvoW5ua/3X5TVBPIHG+N51zU32Ky5jN7bzJFd Wd99uhsJ5TlWhfYHxFUKSdsFbdxfAMr/fVdWsImTnFWYIoNVhnnVz3Q4p7q+iwZgctr69L Da1zrB334o/r/c3T3tkYRfcuOAXSVL7OTXzlUVr/3aUKOSGwYynlxMM+whCluw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026822; a=rsa-sha256; cv=none; b=X3B8RtwmdlNUzKnXLOle8L2rEK7JvLErCgg3OTpx0J0YwCh973g4vRuz/mMDoWssDEDVfA jp6CdUWeZxtyohdJ1iiNnfuvek57GswPiDUXOTJbHgOmZGPw3rIszedka78wqWG85g2tn3 8z2wQAdY9ELfgWl0SJDUS654oZZwhbLcmLfHisDEsByE3gJAWL73zfgVpGvtR7zS8I+bRF xue6Vahkeev4TWd2O9fGPOB6oFzAGj2ozZ4RJkD8d8kvVjLHE/XZYiC2bEnmk1Akbb/Bfx aMM2KGWpOE/GTwCtaOsIEtuPeWcBosw9r4iklqOqylvsu/0Nbk9b/xmfWaJ79g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGG1qgVz17sW; Thu, 29 Jun 2023 08:20: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 35T8KM84083373; Thu, 29 Jun 2023 08:20:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KMBg083372; Thu, 29 Jun 2023 08:20:22 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:22 GMT Message-Id: <202306290820.35T8KMBg083372@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: 4d7a9535977f - stable/13 - linux(4): Move dev_t type declaration under /compat/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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4d7a9535977fb450b97ec112d739d5563fbc166b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4d7a9535977fb450b97ec112d739d5563fbc166b commit 4d7a9535977fb450b97ec112d739d5563fbc166b Author: Dmitry Chagin AuthorDate: 2023-04-28 08:55:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:36 +0000 linux(4): Move dev_t type declaration under /compat/linux As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit unsigned integer on all platforms. Move it into the MI linux.h under /compat/linux. (cherry picked from commit 19973638bee2205be2a7eb07bc154b8afb1e44a3) --- sys/amd64/linux/linux.h | 1 - sys/amd64/linux32/linux.h | 1 - sys/arm64/linux/linux.h | 1 - sys/compat/linux/linux.h | 5 +++++ sys/i386/linux/linux.h | 1 - 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index 81d9f48f6271..a5682c6a980d 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -54,7 +54,6 @@ typedef uint16_t l_ushort; typedef l_ulong l_uintptr_t; typedef l_long l_clock_t; typedef l_int l_daddr_t; -typedef l_ulong l_dev_t; typedef l_uint l_gid_t; typedef l_ushort l_gid16_t; typedef l_uint l_uid_t; diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 02fcd320152d..9ad288e339df 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -63,7 +63,6 @@ typedef unsigned short l_ushort; typedef l_ulong l_uintptr_t; typedef l_long l_clock_t; typedef l_int l_daddr_t; -typedef l_ushort l_dev_t; typedef l_uint l_gid_t; typedef l_ushort l_gid16_t; typedef l_ulong l_ino_t; diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index a20b3c90a066..5a391c3543d3 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -49,7 +49,6 @@ typedef uint16_t l_ushort; typedef l_ulong l_uintptr_t; typedef l_long l_clock_t; typedef l_int l_daddr_t; -typedef l_ulong l_dev_t; typedef l_uint l_gid_t; typedef l_ushort l_gid16_t; /* XXX */ typedef l_uint l_uid_t; diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 055d8e3b9cf6..9061548399e4 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -28,6 +28,11 @@ #ifndef _LINUX_MI_H_ #define _LINUX_MI_H_ +/* + * Machine independent set of types for the Linux types. + */ +typedef uint32_t l_dev_t; + /* * Private Brandinfo flags */ diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 2ccb2f92ef22..32f92d8c637b 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -55,7 +55,6 @@ typedef char *l_caddr_t; typedef l_ulong l_uintptr_t; typedef l_long l_clock_t; typedef l_int l_daddr_t; -typedef l_ushort l_dev_t; typedef l_uint l_gid_t; typedef l_ushort l_gid16_t; typedef l_ulong l_ino_t; From nobody Thu Jun 29 08:20: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 4QsBGH54yNz4knXF; Thu, 29 Jun 2023 08:20: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 4QsBGH3NBBz3v34; Thu, 29 Jun 2023 08:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i78ckU4QW1jIs/2YuTz+RfznNYeyJqdYtKdE+fL8tr4=; b=NaETSyy2qnWq9lzVxuSi7nGRLeDWwcpvZBJ4Hd0HzDdzI+NzgF12E4a+miEImh6nqe1JiS Dcv/pS8G4FGG4qE2m2R9UUbCamcK6VYkKGHqNwFUDo3F+Jy6NUuDAjiv07uKz76uxC54FL A6+U+LQJBB9xhChy+cHwJhMMg9XOwlxLRZToCExqY2ibDK8Bz8NHCM8vHkndQ7qqfSXd7l pbbWMAuPVivekTOZngIQsgv7dF7v0vEhWtxAd/8RLpLPaV2cnGc+QN4/IcTGYCfYotaDzg Jwxpdvktj8/ENAeC7CQLjl/z8k10L1sfyXdyd1VMm61wGBUzpYPpe3V8dKQc8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i78ckU4QW1jIs/2YuTz+RfznNYeyJqdYtKdE+fL8tr4=; b=DULZshCscBwbrZs9+l5PkIl8T7K3IB5XmkVnyFazt+1J0YJkelmTZYECwCR2qD0MN21f32 M4Kq9rcx5QtzLQ8BtnruNrumHU6bEUoVZCEZUvo6m5ciyItRZJp+R1lFMBCFcOWHBDXsCh XbaJpS3vcgLfsENaojb87u7dXsMSg9aLIlm7ZsS25E2HkGbtEX+OC7e1NstQWoUjeFFHpl cipvlnpzXhlflM7dmdg4NPWoOZPCYvhRwMCj8zQJmWC9CUd4lV3UsaqlkEDShqwUZqeEoP Wg4KrbfITwydW+6QN46E/aHobOQh4ZGWkxZ0Jnc7AtOX5kJDKlnbwOCYN3n34g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026823; a=rsa-sha256; cv=none; b=Z8TefxiUX8TXVdq9o/FOxTDrUH2+DA+UZ+g0Z93vtdBMcyiRUWNESftO6QID+v3kmJzwP3 TqptrYj0h54vtIBiNRBEZ9HxCvJ+bxqYZha1M29Up+oiL/kDbfWbfd5ttp8wzmPqeeUsDc 91ICtt+/JbJ6h1EDeTxmuqzOkweoyKdWqgFO4YQ4e/zuMkYlOVinaif3p5fFZab9DcPmyr fB8+SCi+QBklESVm3y8LnBuoIFprDO5TNp4mE2gfrL53KUSIUyjJoa7NiqHiXzDQFvg16W VLejfSbwPTylipTTcYNYXJ5Dn24C5ZSoeKWp6JVVvAGDvXCy7mINohU3/ekbSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGH2RZpz17sX; Thu, 29 Jun 2023 08:20: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 35T8KNPi083392; Thu, 29 Jun 2023 08:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KN9Z083391; Thu, 29 Jun 2023 08:20:23 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:23 GMT Message-Id: <202306290820.35T8KN9Z083391@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: 71d26d149f05 - stable/13 - linux(4): Use Linux dev_t type for mknod syscalls dev argument List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 71d26d149f055305e89e8ee35501e5bd0447ce6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=71d26d149f055305e89e8ee35501e5bd0447ce6a commit 71d26d149f055305e89e8ee35501e5bd0447ce6a Author: Dmitry Chagin AuthorDate: 2023-04-28 08:55:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:37 +0000 linux(4): Use Linux dev_t type for mknod syscalls dev argument As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit unsigned integer on all platforms. Prior the 2.6 kernel dev_t type was an unsigned short. However, since the firs commit of the Linuxulator, mknod syscall get int dev argument. Also, there is some confusion here, while the kernel declares a dev_t type as a 32-bit sized, the user-space dev_t type can be size of 64 bits, e.g., in the Glibc library. To avoid confusion and to help porting of the Linuxulator to other platforms use explicit l_dev_t for dev argument of mknod syscalls. (cherry picked from commit ca3333dd4a3bef7b615d5df104c525f8cac51b26) --- sys/amd64/linux/syscalls.master | 4 ++-- sys/amd64/linux32/syscalls.master | 2 +- sys/arm64/linux/syscalls.master | 2 +- sys/i386/linux/syscalls.master | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 90476b15433f..d4e7212c5ba6 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -872,7 +872,7 @@ int linux_mknod( char *path, l_mode_t mode, - l_uint dev + l_dev_t dev ); } 134 AUE_USELIB UNIMPL uselib @@ -1501,7 +1501,7 @@ l_int dfd, const char *filename, l_mode_t mode, - l_uint dev + l_dev_t dev ); } 260 AUE_FCHOWNAT STD { diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 497e0e42da92..097c1ca4a86c 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -1614,7 +1614,7 @@ l_int dfd, const char *filename, l_int mode, - l_uint dev + l_dev_t dev ); } 298 AUE_FCHOWNAT STD { diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index 647fd0262e8c..19ec0ee6c590 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -200,7 +200,7 @@ l_int dfd, const char *filename, l_int mode, - l_uint dev + l_dev_t dev ); } 34 AUE_MKDIRAT STD { diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 4827e1eca2df..655c44da2fb8 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -1631,7 +1631,7 @@ l_int dfd, const char *filename, l_int mode, - l_uint dev + l_dev_t dev ); } 298 AUE_FCHOWNAT STD { From nobody Thu Jun 29 08:20: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 4QsBGJ68pyz4knnq; Thu, 29 Jun 2023 08:20: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 4QsBGJ4qF9z3v8C; Thu, 29 Jun 2023 08:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THd7Tb0KPms2/B8LR9n0PBZLNy++zGoydLdyd1AKSao=; b=JjJgTK/La00k+inaQAAtu9KIKfKdjHsVEmJC/CQIbj8RTQMU8t5kNM+3W2qO6zMCJFzglK 4w90sZxhxWLWr9MzhDLVcMeVoybR8Ed1ApPPqD2WimgCjh9zezAPmkAjNhbGMKGJ1B07lu XMcCM5H7hSDuJK+7m6v5IhDAudAxct2dMahwkFVWqVRvKuzHNx9IlGiRAw62jT56gbPhyk fhgUt49E+J3jVqMyZHPr6D2UshARt2fRcxWrx+BAvQbeS2ybIA0g6KziLwzEvydFWNKDHn FocFVGK+aHBlnyFjfJEbFH3w9LAGeEGdAcI9YGHqW2eHtPXgkR7vVlWjEIgjJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=THd7Tb0KPms2/B8LR9n0PBZLNy++zGoydLdyd1AKSao=; b=cm/2ZWbOZtnbDEkQm/2r4nzn79guK+sX+8muUKIFCs2yfNYgKhq9KlNxp6o9vVRf0s/OCm lsfy+8KF3vYKasJxgmZvs9YszBPwW25Bp9dfD80TTzPtjlSOCzmT878iygIqqurKHoU61Z sMV1kNxosNWkqxlQMtwZbDf+BwmXVyBxjse268RsxiioGp9gCbYgHIOmorK1pR+f88aDq/ CzBr0XRTYgBGdIaZwTqW2wvlb8OVUU8UQm8pa7pKH1WWlSLbOwpRf6xOtj5yH7pKwO9SpH YPqP8R1hXfubng43y/pIKmYcHCCQmnCDzhxi1STN+x0QkrSxFkLsp7g95m4Vbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026824; a=rsa-sha256; cv=none; b=RQsKdWY3w0HES1gZsnccsDdthn8eX1KdFdYXugnosyiLa3ymO5tZ8NHcknEMX14rpuv6FJ d6J4QYX/YVD8aXXnJv1ZrWCBY2ldLn4lyyZ+HLToRY8YbdMQVxDXbCxjDNFDo73pFJLb4j 2je80F7nDhUIsDAQabMdpbydhyb5D7R+5gLZWh+rNca6JVYF5podi3Wk6wqYaMXn/MZ+Pr efN1bcF9QGqnsNhGYstyxnFMzY1hEXNHFcH7mZYsryvSoxeMvTqPHfzf+QiA7Q4nJ3BBfO KgdfMU9EvjVG32Y13zcBq4i9zqB/JzEL1VZLuuEtfdnaWxJ3ZX6g7ZUcLznXOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGJ3QwGz17NP; Thu, 29 Jun 2023 08:20: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 35T8KO8D083417; Thu, 29 Jun 2023 08:20:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KOKk083416; Thu, 29 Jun 2023 08:20:24 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:24 GMT Message-Id: <202306290820.35T8KOKk083416@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: 46d2b34e1422 - stable/13 - linux(4): Regen for mknod syscall changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 46d2b34e1422b518073503aebe10d7e8dc923f8f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=46d2b34e1422b518073503aebe10d7e8dc923f8f commit 46d2b34e1422b518073503aebe10d7e8dc923f8f Author: Dmitry Chagin AuthorDate: 2023-04-28 08:55:04 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:40 +0000 linux(4): Regen for mknod syscall changes (cherry picked from commit cd0fca82bb86e9287d7eacefead1b02766986762) --- sys/amd64/linux/linux_proto.h | 4 ++-- sys/amd64/linux/linux_systrace_args.c | 8 ++++---- sys/amd64/linux32/linux32_proto.h | 2 +- sys/amd64/linux32/linux32_systrace_args.c | 4 ++-- sys/arm64/linux/linux_proto.h | 2 +- sys/arm64/linux/linux_systrace_args.c | 4 ++-- sys/i386/linux/linux_proto.h | 2 +- sys/i386/linux/linux_systrace_args.c | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index fcb4a718a665..cacaf2b64ac2 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -501,7 +501,7 @@ struct linux_utime_args { struct linux_mknod_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; - char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)]; + char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; }; struct linux_personality_args { char per_l_[PADL_(l_uint)]; l_uint per; char per_r_[PADR_(l_uint)]; @@ -926,7 +926,7 @@ struct linux_mknodat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)]; char mode_l_[PADL_(l_mode_t)]; l_mode_t mode; char mode_r_[PADR_(l_mode_t)]; - char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)]; + char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; }; struct linux_fchownat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index d03f99f10f26..d22d8b55fa43 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -1113,7 +1113,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct linux_mknod_args *p = params; uarg[0] = (intptr_t)p->path; /* char * */ iarg[1] = p->mode; /* l_mode_t */ - iarg[2] = p->dev; /* l_uint */ + iarg[2] = p->dev; /* l_dev_t */ *n_args = 3; break; } @@ -1949,7 +1949,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->dfd; /* l_int */ uarg[1] = (intptr_t)p->filename; /* const char * */ iarg[2] = p->mode; /* l_mode_t */ - iarg[3] = p->dev; /* l_uint */ + iarg[3] = p->dev; /* l_dev_t */ *n_args = 4; break; } @@ -4578,7 +4578,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mode_t"; break; case 2: - p = "l_uint"; + p = "l_dev_t"; break; default: break; @@ -5831,7 +5831,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_mode_t"; break; case 3: - p = "l_uint"; + p = "l_dev_t"; break; default: break; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 79a7f54b8ce9..e575fcebd235 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1000,7 +1000,7 @@ struct linux_mknodat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)]; char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; - char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)]; + char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; }; struct linux_fchownat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index fa5a50a0dd86..9ef4330a27f3 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -2067,7 +2067,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->dfd; /* l_int */ uarg[1] = (intptr_t)p->filename; /* const char * */ iarg[2] = p->mode; /* l_int */ - iarg[3] = p->dev; /* l_uint */ + iarg[3] = p->dev; /* l_dev_t */ *n_args = 4; break; } @@ -6512,7 +6512,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_int"; break; case 3: - p = "l_uint"; + p = "l_dev_t"; break; default: break; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index edfd1d088654..89d5954f0f37 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -163,7 +163,7 @@ struct linux_mknodat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)]; char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; - char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)]; + char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; }; struct linux_mkdirat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index d57ad97796cd..2d1cb2286ab1 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -251,7 +251,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->dfd; /* l_int */ uarg[1] = (intptr_t)p->filename; /* const char * */ iarg[2] = p->mode; /* l_int */ - iarg[3] = p->dev; /* l_uint */ + iarg[3] = p->dev; /* l_dev_t */ *n_args = 4; break; } @@ -2776,7 +2776,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_int"; break; case 3: - p = "l_uint"; + p = "l_dev_t"; break; default: break; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 1957c8d0c1b3..3cf91e19e659 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -993,7 +993,7 @@ struct linux_mknodat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; char filename_l_[PADL_(const char *)]; const char * filename; char filename_r_[PADR_(const char *)]; char mode_l_[PADL_(l_int)]; l_int mode; char mode_r_[PADR_(l_int)]; - char dev_l_[PADL_(l_uint)]; l_uint dev; char dev_r_[PADR_(l_uint)]; + char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; }; struct linux_fchownat_args { char dfd_l_[PADL_(l_int)]; l_int dfd; char dfd_r_[PADR_(l_int)]; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 72c6ba134b26..2ca52683c4e6 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -2102,7 +2102,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->dfd; /* l_int */ uarg[1] = (intptr_t)p->filename; /* const char * */ iarg[2] = p->mode; /* l_int */ - iarg[3] = p->dev; /* l_uint */ + iarg[3] = p->dev; /* l_dev_t */ *n_args = 4; break; } @@ -6580,7 +6580,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "l_int"; break; case 3: - p = "l_uint"; + p = "l_dev_t"; break; default: break; From nobody Thu Jun 29 08:20: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 4QsBGK6GQqz4knXK; Thu, 29 Jun 2023 08:20: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 4QsBGK5JMxz3v95; Thu, 29 Jun 2023 08:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iIshxLIEhLZrRgZvjwZTfV8/Fni8+/FcBzJb1uPxcXE=; b=RXeeUt5Tdh5p+YayMTPRpcvLEHIc8v5GBVu6eu1XEcaN2KOnLqhHNOxT3I60lngsrU5+q5 AAExfx0RKt1ZiAjoHGlWyzLeP4H0rbWNcAHn+QNXPktSbqEtfOycYnrxuma9pEn6AOvqvH VyfPb8p/nMyIL7keRi7ptYvq92tFDZ1915ijuTy2dK215VTlM9HYTX5BROdRmn/C9ZjKNK L0J+eMAN/Z25AkTXXnXnO6SsM5mapUckM3qPyLuV5mdfHeKYT0xeB3DrAe+s2k/iw1RZC2 54ko25ed8mbeWP43GZSm7/lx95Fff+awoYsn1IwGPRAT4zF+58pFHY4VweOsaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iIshxLIEhLZrRgZvjwZTfV8/Fni8+/FcBzJb1uPxcXE=; b=xWCoPkY8bZvxFeywrvMgSXp1zsJjcPLqIw5bE8bgzuVXMBHYN2EJsN6IqJkPfxExY7Ji5S 8SQbLlKg2cFJLcScMsNIzGl/BZRDAVpEF3jEU5uBwobnpMXfdhT5Dytyn/xOJlXCU4Zq0d zE0HPsCiYexhK2RCTaiXCAawBiZ94HsOAHl53JxJG7l9RcIpj5FjpzDX/iKwMarpawDa3u mDvLt6H5SgcZLXB8BoraAytaZ8L7qaJmdZf9VTWToQ5OpumBiU3LhkStZ5VoFNhprXN2M+ ZFAd060ZZqgQx8Nen0rts9X4GUIsqsuas/E8Chz5zkhxsOm6sTVnOwBmemY/MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026825; a=rsa-sha256; cv=none; b=c8y8Lmn1x5DN8eCHn/tzVZ0IvEPRGiSL29qhhE5ZVpY3oh2a2NYboJ+2qUUS9nDVL+9JOw 5QGky8e3yQ+fQbn/D1UpHdmj1YmvP7iGHZLi/4+FZ6wxPWRB4MlRIiDzXit7OD5P91e7Aw IafYd8piQNz/mFlmJU1aCUPvNbErOrD9rAb83fRGydFdte1s6zqD7DmYYoYpzbbQLc1Vf/ mwEDNExwQe38n1rjR0/ek+36DLAD0VgbVT8yHP1QLPyt+zD0EpypLJbPIMqxV2OGISy4BE zeoaAMhoOIJv0nyCq3hVoFcQ0CcEa1bDfAxmC1el95d8ILkyslMw+6uF7Mdwqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGK4PFhz17q2; Thu, 29 Jun 2023 08:20: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 35T8KPFW083436; Thu, 29 Jun 2023 08:20:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KPSW083435; Thu, 29 Jun 2023 08:20:25 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:25 GMT Message-Id: <202306290820.35T8KPSW083435@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: 86fde4e64528 - stable/13 - linux(4): Make struct stat64 to match Linux actual one List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 86fde4e64528d9e5979623f61207c690631ff1ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=86fde4e64528d9e5979623f61207c690631ff1ee commit 86fde4e64528d9e5979623f61207c690631ff1ee Author: Dmitry Chagin AuthorDate: 2023-04-28 08:55:04 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:43 +0000 linux(4): Make struct stat64 to match Linux actual one (cherry picked from commit 80d8a4a0030849229cb9ebd434682ef927bc9963) --- sys/amd64/linux32/linux.h | 11 +++++------ sys/i386/linux/linux.h | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 9ad288e339df..32f2f42b0108 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -216,19 +216,18 @@ struct l_old_stat { }; struct l_stat64 { - l_ushort st_dev; - u_char __pad0[10]; + l_ulonglong st_dev; + u_char __pad0[4]; l_ulong __st_ino; l_uint st_mode; l_uint st_nlink; l_ulong st_uid; l_ulong st_gid; - l_ushort st_rdev; - u_char __pad3[10]; + l_ulonglong st_rdev; + u_char __pad3[4]; l_longlong st_size; l_ulong st_blksize; - l_ulong st_blocks; - l_ulong __pad4; + l_ulonglong st_blocks; struct l_timespec st_atim; struct l_timespec st_mtim; struct l_timespec st_ctim; diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 32f92d8c637b..91102eeaa2be 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -189,19 +189,18 @@ struct l_old_stat { }; struct l_stat64 { - l_ushort st_dev; - u_char __pad0[10]; + l_ulonglong st_dev; + u_char __pad0[4]; l_ulong __st_ino; l_uint st_mode; l_uint st_nlink; l_ulong st_uid; l_ulong st_gid; - l_ushort st_rdev; - u_char __pad3[10]; + l_ulonglong st_rdev; + u_char __pad3[4]; l_longlong st_size; l_ulong st_blksize; - l_ulong st_blocks; - l_ulong __pad4; + l_ulonglong st_blocks; struct l_timespec st_atim; struct l_timespec st_mtim; struct l_timespec st_ctim; From nobody Thu Jun 29 08:20: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 4QsBGM0G4hz4knrY; Thu, 29 Jun 2023 08:20: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 4QsBGL6GJNz3vGQ; Thu, 29 Jun 2023 08:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=maw9p+u8KYPITaFd5J3lsSs8/W8uPI8BL0Nqh8V/mCw=; b=VPbpHhwG4jZhi8j8kLuNVVvcpVXyslIa6iIjnCGMXaXeq/GeZMx6uusIwuU9mu5sfzWdqE 4Rs/KDNx9HDHTP8ugvGcqkBFxp8gErHnpqJ6PdNeC7o2qxnoTVNuzAysJ4S7fcKEWDwHPX 5Vvks5FLESO8gzid0RigDZxnjKL+RNjG3Jorxtnzv8yWBDPtXyye6xkncZNT565eEo05tV 5Sbs7org+/Eg4jU8ANg8aiHNum218/lopA+MS5e0hml6fHksPsGptSzppQVp8F0SOg9R/H +5oEWt3P+1TaZZ7Zjwa1atlAsiErO8kykpaVGj3pRNAOBn4YjgkHJgWQH4AGBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=maw9p+u8KYPITaFd5J3lsSs8/W8uPI8BL0Nqh8V/mCw=; b=KR8Sm4Bf0Gg9zTQ2bnQwPEx98w6O0OEeo8GVVqf2dkJXjaZHmR3l2oJRb7XeDcFsNU5eaD XSF0Ta1tGoUhnSXCkG5NH0FEYHOXLYH9+gtjaiFLLh5TfhUlWUpK+fJHUR9zNOrnOwkopU LaTVSLqS40fhMfBaTLihY4DRwCixu98CX77Rbs+0FlJLTXJ1S830r7ljdk07kjs3f+jMYI c/QTwwL0CKM3s1fA5iML1BIP8fyWeo15jhP0IK0bswG02HQDfYa70SKcaUo2iR0EHEGsCC ZupyiZqq/0ic3h0KNqvtWipv1EUGybeHfYUnsTMgoWeabSYlzN31+HBFLnMVIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026826; a=rsa-sha256; cv=none; b=JFPRNCEpKU+c+qKGw+/U7jrAlJdIupRjQpL8lEqBmLuO9fs+Og67F/LctrzHSzSM5gYfre 3v51ug0chg9PbFaH7DnZCHX+sxL65TgOd1dXriJCSBaKYgXiLj/7PjBCvnJ38sENns3EEF Bva+isEJvmR/diufYz8mbtvDMNXepc5vp/czC45oiJH+EgZPlwidyYYoYbgkCXqMCPsaJJ 9adn2TspvS1Fu+N604dVyd+WRJr80z5qbMsWIX1DPOyaf7RUsVkuFZ/IR87qghEwe/XwZt KykKhQ8C12ZhymtFbgW6i+5SkNvRhXLDahbjE6WMwavnPSl68s+ADUWDMLdsuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGL5Lwkz17q3; Thu, 29 Jun 2023 08:20: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 35T8KQpP083455; Thu, 29 Jun 2023 08:20:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KQii083454; Thu, 29 Jun 2023 08:20:26 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:26 GMT Message-Id: <202306290820.35T8KQii083454@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: 6c324fb645e6 - stable/13 - linux(4): Add a dedicated statat() implementation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 6c324fb645e64e0090e16a5846eafdeb723f4105 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=6c324fb645e64e0090e16a5846eafdeb723f4105 commit 6c324fb645e64e0090e16a5846eafdeb723f4105 Author: Dmitry Chagin AuthorDate: 2023-04-28 08:55:04 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:45 +0000 linux(4): Add a dedicated statat() implementation Get rid of calling Linux stat translation hook and specific to Linux handling of non-vnode dirfd from kern_statat(), Reviewed by: kib, mjg Differential revision: https://reviews.freebsd.org/D35474 (cherry picked from commit cb858340dcbf214cc4c4d78dbb741620d7b3a252) --- sys/compat/cloudabi/cloudabi_file.c | 2 +- sys/compat/freebsd32/freebsd32_misc.c | 13 ++++++------- sys/compat/linux/linux_file.c | 8 ++++---- sys/compat/linux/linux_stats.c | 34 ++++++++++++++++++++++++++++++++-- sys/kern/vfs_mountroot.c | 2 +- sys/kern/vfs_syscalls.c | 34 +++++++++++----------------------- sys/sys/syscallsubr.h | 4 ++-- 7 files changed, 57 insertions(+), 40 deletions(-) diff --git a/sys/compat/cloudabi/cloudabi_file.c b/sys/compat/cloudabi/cloudabi_file.c index 83987b79aa0c..1a1def879977 100644 --- a/sys/compat/cloudabi/cloudabi_file.c +++ b/sys/compat/cloudabi/cloudabi_file.c @@ -659,7 +659,7 @@ cloudabi_sys_file_stat_get(struct thread *td, error = kern_statat(td, (uap->fd.flags & CLOUDABI_LOOKUP_SYMLINK_FOLLOW) != 0 ? 0 : - AT_SYMLINK_NOFOLLOW, uap->fd.fd, path, UIO_SYSSPACE, &sb, NULL); + AT_SYMLINK_NOFOLLOW, uap->fd.fd, path, UIO_SYSSPACE, &sb); cloudabi_freestr(path); if (error != 0) return (error); diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 70eece0311f4..9fd24a91080f 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2251,8 +2251,7 @@ ofreebsd32_stat(struct thread *td, struct ofreebsd32_stat_args *uap) struct ostat32 sb32; int error; - error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, - &sb, NULL); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, &sb); if (error) return (error); copy_ostat(&sb, &sb32); @@ -2301,7 +2300,7 @@ freebsd32_fstatat(struct thread *td, struct freebsd32_fstatat_args *uap) int error; error = kern_statat(td, uap->flag, uap->fd, uap->path, UIO_USERSPACE, - &ub, NULL); + &ub); if (error) return (error); copy_stat(&ub, &ub32); @@ -2318,7 +2317,7 @@ ofreebsd32_lstat(struct thread *td, struct ofreebsd32_lstat_args *uap) int error; error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, - UIO_USERSPACE, &sb, NULL); + UIO_USERSPACE, &sb); if (error) return (error); copy_ostat(&sb, &sb32); @@ -2437,7 +2436,7 @@ freebsd11_freebsd32_stat(struct thread *td, int error; error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, - &sb, NULL); + &sb); if (error != 0) return (error); error = freebsd11_cvtstat32(&sb, &sb32); @@ -2472,7 +2471,7 @@ freebsd11_freebsd32_fstatat(struct thread *td, int error; error = kern_statat(td, uap->flag, uap->fd, uap->path, UIO_USERSPACE, - &sb, NULL); + &sb); if (error != 0) return (error); error = freebsd11_cvtstat32(&sb, &sb32); @@ -2490,7 +2489,7 @@ freebsd11_freebsd32_lstat(struct thread *td, int error; error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, - UIO_USERSPACE, &sb, NULL); + UIO_USERSPACE, &sb); if (error != 0) return (error); error = freebsd11_cvtstat32(&sb, &sb32); diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index db4b1151bc60..249318a2e619 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -732,7 +732,7 @@ linux_unlink(struct thread *td, struct linux_unlink_args *args) if (error == EPERM) { /* Introduce POSIX noncompliant behaviour of Linux */ if (kern_statat(td, 0, AT_FDCWD, args->path, - UIO_USERSPACE, &st, NULL) == 0) { + UIO_USERSPACE, &st) == 0) { if (S_ISDIR(st.st_mode)) error = EISDIR; } @@ -742,8 +742,8 @@ linux_unlink(struct thread *td, struct linux_unlink_args *args) error = kern_funlinkat(td, AT_FDCWD, path, FD_NONE, UIO_SYSSPACE, 0, 0); if (error == EPERM) { /* Introduce POSIX noncompliant behaviour of Linux */ - if (kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, - NULL) == 0) { + if (kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, + &st) == 0) { if (S_ISDIR(st.st_mode)) error = EISDIR; } @@ -769,7 +769,7 @@ linux_unlinkat_impl(struct thread *td, enum uio_seg pathseg, const char *path, if (error == EPERM && !(args->flag & LINUX_AT_REMOVEDIR)) { /* Introduce POSIX noncompliant behaviour of Linux */ if (kern_statat(td, AT_SYMLINK_NOFOLLOW, dfd, path, - pathseg, &st, NULL) == 0 && S_ISDIR(st.st_mode)) + pathseg, &st) == 0 && S_ISDIR(st.st_mode)) error = EISDIR; } return (error); diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 58c378d6bc08..934fc6e5e740 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -29,17 +29,23 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ktrace.h" + #include #include #include #include #include #include +#include #include #include #include #include #include +#ifdef KTRACE +#include +#endif #ifdef COMPAT_LINUX32 #include @@ -57,9 +63,33 @@ static int linux_kern_statat(struct thread *td, int flag, int fd, const char *path, enum uio_seg pathseg, struct stat *sbp) { + struct nameidata nd; + int error; + + if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_RESOLVE_BENEATH | + AT_EMPTY_PATH)) != 0) + return (EINVAL); + + NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_RESOLVE_BENEATH | + AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | + AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights, td); - return (kern_statat(td, flag, fd, path, pathseg, sbp, - translate_vnhook_major_minor)); + if ((error = namei(&nd)) != 0) { + if (error == ENOTDIR && + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) + error = kern_fstat(td, fd, sbp); + return (error); + } + error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED, td); + if (error == 0) + translate_vnhook_major_minor(nd.ni_vp, sbp); + NDFREE_PNBUF(&nd); + vput(nd.ni_vp); +#ifdef KTRACE + if (KTRPOINT(td, KTR_STRUCT)) + ktrstat_error(sbp, error); +#endif + return (error); } #ifdef LINUX_LEGACY_SYSCALLS diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index 1886d3b7aca3..8a4b67836206 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -595,7 +595,7 @@ parse_dir_md(char **conf) free(tok, M_TEMP); /* Get file status. */ - error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &sb, NULL); + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &sb); if (error) goto out; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 3b3947b2ccb7..89f45e898d8e 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -109,7 +109,7 @@ static int kern_readlink_vp(struct vnode *vp, char *buf, enum uio_seg bufseg, static int kern_linkat_vp(struct thread *td, struct vnode *vp, int fd, const char *path, enum uio_seg segflag); -static uint64_t +uint64_t at2cnpflags(u_int at_flags, u_int mask) { u_int64_t res; @@ -2187,8 +2187,7 @@ ostat(struct thread *td, struct ostat_args *uap) struct ostat osb; int error; - error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, - &sb, NULL); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, &sb); if (error != 0) return (error); cvtstat(&sb, &osb); @@ -2212,7 +2211,7 @@ olstat(struct thread *td, struct olstat_args *uap) int error; error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, - UIO_USERSPACE, &sb, NULL); + UIO_USERSPACE, &sb); if (error != 0) return (error); cvtstat(&sb, &osb); @@ -2330,8 +2329,7 @@ freebsd11_stat(struct thread *td, struct freebsd11_stat_args* uap) struct freebsd11_stat osb; int error; - error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, - &sb, NULL); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, &sb); if (error != 0) return (error); error = freebsd11_cvtstat(&sb, &osb); @@ -2348,7 +2346,7 @@ freebsd11_lstat(struct thread *td, struct freebsd11_lstat_args* uap) int error; error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, - UIO_USERSPACE, &sb, NULL); + UIO_USERSPACE, &sb); if (error != 0) return (error); error = freebsd11_cvtstat(&sb, &osb); @@ -2385,7 +2383,7 @@ freebsd11_fstatat(struct thread *td, struct freebsd11_fstatat_args* uap) int error; error = kern_statat(td, uap->flag, uap->fd, uap->path, - UIO_USERSPACE, &sb, NULL); + UIO_USERSPACE, &sb); if (error != 0) return (error); error = freebsd11_cvtstat(&sb, &osb); @@ -2413,7 +2411,7 @@ sys_fstatat(struct thread *td, struct fstatat_args *uap) int error; error = kern_statat(td, uap->flag, uap->fd, uap->path, - UIO_USERSPACE, &sb, NULL); + UIO_USERSPACE, &sb); if (error == 0) error = copyout(&sb, uap->buf, sizeof (sb)); return (error); @@ -2421,8 +2419,7 @@ sys_fstatat(struct thread *td, struct fstatat_args *uap) int kern_statat(struct thread *td, int flag, int fd, const char *path, - enum uio_seg pathseg, struct stat *sbp, - void (*hook)(struct vnode *vp, struct stat *sbp)) + enum uio_seg pathseg, struct stat *sbp) { struct nameidata nd; int error; @@ -2435,17 +2432,9 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights, td); - if ((error = namei(&nd)) != 0) { - if (error == ENOTDIR && - (nd.ni_resflags & NIRES_EMPTYPATH) != 0) - error = kern_fstat(td, fd, sbp); + if ((error = namei(&nd)) != 0) return (error); - } error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED, td); - if (error == 0) { - if (__predict_false(hook != NULL)) - hook(nd.ni_vp, sbp); - } NDFREE_NOTHING(&nd); vput(nd.ni_vp); #ifdef __STAT_TIME_T_EXT @@ -2501,8 +2490,7 @@ freebsd11_nstat(struct thread *td, struct freebsd11_nstat_args *uap) struct nstat nsb; int error; - error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, - &sb, NULL); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, &sb); if (error != 0) return (error); freebsd11_cvtnstat(&sb, &nsb); @@ -2526,7 +2514,7 @@ freebsd11_nlstat(struct thread *td, struct freebsd11_nlstat_args *uap) int error; error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, - UIO_USERSPACE, &sb, NULL); + UIO_USERSPACE, &sb); if (error != 0) return (error); freebsd11_cvtnstat(&sb, &nsb); diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index ae17a10d01da..fb7bbe58a63a 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -80,6 +80,7 @@ struct mmap_req { mmap_check_fp_fn mr_check_fp_fn; }; +uint64_t at2cnpflags(u_int at_flags, u_int mask); int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, size_t buflen, size_t path_max); int kern_accept(struct thread *td, int s, struct sockaddr **name, @@ -312,8 +313,7 @@ int kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value); int kern_socket(struct thread *td, int domain, int type, int protocol); int kern_statat(struct thread *td, int flag, int fd, const char *path, - enum uio_seg pathseg, struct stat *sbp, - void (*hook)(struct vnode *vp, struct stat *sbp)); + enum uio_seg pathseg, struct stat *sbp); int kern_specialfd(struct thread *td, int type, void *arg); int kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, struct statfs *buf); From nobody Thu Jun 29 08:20: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 4QsBGN1065z4knrb; Thu, 29 Jun 2023 08:20: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 4QsBGM72Rgz3v2F; Thu, 29 Jun 2023 08:20:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ugwlVQzoDUSDvsPqiqRezu2GDzi92kG6STA1pHauaF8=; b=M0Bbxm0/JJdHSXAAMBJkMwzMBJrdevDpLdaASNH8SQUvgpWqA27yPsAI1hGMEKGdk8OUZX K5pg4JgExCILlLHANYAUXJWH14fFJVB8soaaVoKvZrR7DOhTCJ4jHfHlAox+iRAIf/blcS qg9494FMkoZ4DAWAfQlSUg1ezsswcNTZZ685ouo8xbAqkN00tuHQijIo8pm57S30KVy6i0 kLEWMoM0D83GxDUvUiQU/y7iGd3dCEZmYrTeIiw6okdRT2nrW4zb6z3M87yU5qQPqZintb xVWVziiasfcE/OUiQDos9gA4OY5mnJ/amneQAZSICn2QFzYP9ZswhTKCKl6Gug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ugwlVQzoDUSDvsPqiqRezu2GDzi92kG6STA1pHauaF8=; b=HIqUceMllaSlsX3whQQcnOxhzLshMuYmoyAsDWJH1ID/aCQHSjgbpum3FQmcjUOruFKW3N 7jAQPt3iaPg+ejQZMuPW1+6FsBX152i57ChH29RpYlzceJM4HpFyBZmeeykpig+7na99ak R1RXpUBaVODGmiHauOAv1o76aznj0HNdBD2iMe8tSgQ23mX9gJTt5b4NI05xJlLvszvS8f 4JSWnJnlmk1eZ6+ABmSJ9CFB00jcQiB2TVPsgPs7NiEMbm7FTNZ/0fCFHOfDmRrF4QTUhy nCBMq69oYh6tVpFNMjk6wtVpJ2dKvljmNcqQPMI+ehmOB+i3PLLnQcJzSR+6vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026828; a=rsa-sha256; cv=none; b=TOO6oImA5R6krKRm2MdvKnjqBwNuXj4bp780FxRvGoXvobugXvsH5Ks4iFym+xtEVwfRtQ GVfegVQUAyDVlTQcDg2I73GJwqTQ82BeznL0w7oZK73ruzxHXdDtSZ86Kj+l2x1nR4dcEe tZR1dKcovBGiE1DcbuTJPvM1ROOJzFJ1BJlnhJMlD+/qGZFheYu9rfaNA94HX6QrI+FgkJ XwnZR/DDSzmQTrk3eD72VlYjIMuQCRkexCs98wlKyob7GSTnIaj2yhOPM3k5rzjl2j1mAe Lxogp0X6YR8He9U9kd0NWo8pV7uu0Q4c9abFkTI6ZyydUcFB2W6D7aBEEqABSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGM65drz182y; Thu, 29 Jun 2023 08:20: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 35T8KR0E083474; Thu, 29 Jun 2023 08:20:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KRgC083473; Thu, 29 Jun 2023 08:20:27 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:27 GMT Message-Id: <202306290820.35T8KRgC083473@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: b971d6aec115 - stable/13 - linux(4): Add a dedicated fstat() implementation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: b971d6aec11597dfdad36a53680c869062b7ba64 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b971d6aec11597dfdad36a53680c869062b7ba64 commit b971d6aec11597dfdad36a53680c869062b7ba64 Author: Dmitry Chagin AuthorDate: 2023-06-29 08:15:49 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:49 +0000 linux(4): Add a dedicated fstat() implementation In between kern_fstat() and translate_fd_major_minor(), another process having the same filedesc could modify or close fd. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D39763 (cherry picked from commit 994ed958ae0545faa86dd43b6e64bf7b64b9220b) --- sys/compat/linux/linux_stats.c | 75 +++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 934fc6e5e740..07ef72706d75 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$"); #include #endif +#include + #ifdef COMPAT_LINUX32 #include #include @@ -59,6 +61,32 @@ __FBSDID("$FreeBSD$"); #include +static int +linux_kern_fstat(struct thread *td, int fd, struct stat *sbp) +{ + struct vnode *vp; + struct file *fp; + int error; + + AUDIT_ARG_FD(fd); + + error = fget(td, fd, &cap_fstat_rights, &fp); + if (__predict_false(error != 0)) + return (error); + + AUDIT_ARG_FILE(td->td_proc, fp); + + error = fo_stat(fp, sbp, td->td_ucred, td); + if (error == 0 && (vp = fp->f_vnode) != NULL) + translate_vnhook_major_minor(vp, sbp); + fdrop(fp, td); +#ifdef KTRACE + if (KTRPOINT(td, KTR_STRUCT)) + ktrstat_error(sbp, error); +#endif + return (error); +} + static int linux_kern_statat(struct thread *td, int flag, int fd, const char *path, enum uio_seg pathseg, struct stat *sbp) @@ -77,7 +105,7 @@ linux_kern_statat(struct thread *td, int flag, int fd, const char *path, if ((error = namei(&nd)) != 0) { if (error == ENOTDIR && (nd.ni_resflags & NIRES_EMPTYPATH) != 0) - error = kern_fstat(td, fd, sbp); + error = linux_kern_fstat(td, fd, sbp); return (error); } error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED, td); @@ -111,45 +139,6 @@ linux_kern_lstat(struct thread *td, const char *path, enum uio_seg pathseg, } #endif -static void -translate_fd_major_minor(struct thread *td, int fd, struct stat *buf) -{ - struct file *fp; - struct vnode *vp; - struct mount *mp; - int major, minor; - - /* - * No capability rights required here. - */ - if ((!S_ISCHR(buf->st_mode) && !S_ISBLK(buf->st_mode)) || - fget(td, fd, &cap_no_rights, &fp) != 0) - return; - vp = fp->f_vnode; - if (vp != NULL && vn_isdisk(vp)) { - buf->st_mode &= ~S_IFMT; - buf->st_mode |= S_IFBLK; - } - if (vp != NULL && rootdevmp != NULL) { - mp = vp->v_mount; - __compiler_membar(); - if (mp != NULL && mp->mnt_vfc == rootdevmp->mnt_vfc) - buf->st_dev = rootdevmp->mnt_stat.f_fsid.val[0]; - } - if (linux_vn_get_major_minor(vp, &major, &minor) == 0) { - buf->st_rdev = (major << 8 | minor); - } else if (fp->f_type == DTYPE_PTS) { - struct tty *tp = fp->f_data; - - /* Convert the numbers for the slave device. */ - if (linux_driver_get_major_minor(devtoname(tp->t_dev), - &major, &minor) == 0) { - buf->st_rdev = (major << 8 | minor); - } - } - fdrop(fp, td); -} - /* * l_dev_t has the same encoding as dev_t in the latter's low 16 bits, so * truncation of a dev_t to 16 bits gives the same result as unpacking @@ -242,8 +231,7 @@ linux_newfstat(struct thread *td, struct linux_newfstat_args *args) struct stat buf; int error; - error = kern_fstat(td, args->fd, &buf); - translate_fd_major_minor(td, args->fd, &buf); + error = linux_kern_fstat(td, args->fd, &buf); if (!error) error = newstat_copyout(&buf, args->buf); @@ -634,8 +622,7 @@ linux_fstat64(struct thread *td, struct linux_fstat64_args *args) struct stat buf; int error; - error = kern_fstat(td, args->fd, &buf); - translate_fd_major_minor(td, args->fd, &buf); + error = linux_kern_fstat(td, args->fd, &buf); if (!error) error = stat64_copyout(&buf, args->statbuf); From nobody Thu Jun 29 08:20: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 4QsBGP2vHLz4knXb; Thu, 29 Jun 2023 08:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QsBGP1DRFz3vHW; Thu, 29 Jun 2023 08:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1iv7gju3PTNTunH5ntJuhLEqftnG0tlaQ3NWr5bpD+U=; b=poi8CMRGpJ4UNZU+Q6NH5cXN+F1YQW55XPy2pnGuRbKZq4euW8iaqMkdFZqfpg3u8dsBGv nC8u9jISm6g4JCU5weUqguVtpy3O3mcwl60ru69S0Wpw3HnO6F9fIdGfGyLkAhS1Ou1oMS uZtJe4OR6y0wRVztLh4e4nlxb0knixNtQLQ11pem0R4ppguf9xHQhcj55NVHgRx8tjRAEa hu+KCuPTe+b2qyE/yqi3tJ7HzE3k+jAwRQQmuq++gmHVplPbtKSVYaDmOH6sXl1MzQiURZ DoxWC5dKXV7+eazuC6LKA8ANn9wfjuBiy70mQ5zn7eoqDVRMaAExSuTu0H2Ysg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1iv7gju3PTNTunH5ntJuhLEqftnG0tlaQ3NWr5bpD+U=; b=RRswWdh1YiqFvKrNItyRlgH/HWu2jcRN1Qwxmr76q8zY/9xtC4yoMWEl1SVHbV/I2zgF4t Dlf9EdofmxyxPXuObCxKBtix0dLuyDWehAMxNsNjsDr+LHLcS2lGXCsx5cHK2THBz0bdPT jy2XIRwF/+I/kKSrqJV0UcTHc9RdFW45ZmIpObhxGgYGOjxeKtTMrybbRzKUzxWQbK6oY7 PaTsfD3vM//HIaZH3Flxwx5ghkHTOW+Ut0zodlkcUxbtRE6Iy3NlUB/SQ9J6/hvtLGdVVs n1s/Q1KVHItRFGgksWtT1sFUYv7KxwGWwX/q7LUJsEi/CasXw3QgOMLiTo88wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026829; a=rsa-sha256; cv=none; b=Q0SCy0o3sTvTjhJAPnpNNy88kzYMpD5GoRBGQ+G0liaxGvAvBAkMLjOJ3FaHTPdQNd0jW9 Unc/ZJs97m/V7ri1ViFKE4uWpK16V3/NewKPhpmryXa1ErUcnCoIHndb8IeMdT7UhVIGym oILmtdK8cJrWw7543j5APfXurFsA4p88FCtE44uaI7bppW9/0XyQc+IKh0BlOy5KdLVN7m L47Y7t5ofJZAwwBt35KLeD9TU8MV0MOE4EUbeD0PKhftrt0JKgQ4dJM0o264hg8Zw+nZtj cC94Xq8pPfEUlZfX4ibE96GVS0J1tx3N4k5RdOYGnaTlTJdcHg/mW9v9sbaWTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGN6fYvz17gj; Thu, 29 Jun 2023 08:20: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 35T8KS9J083497; Thu, 29 Jun 2023 08:20:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KSEh083496; Thu, 29 Jun 2023 08:20:28 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:28 GMT Message-Id: <202306290820.35T8KSEh083496@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: 5e424fec72aa - stable/13 - linux(4): Uniformly dev_t arguments translation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 5e424fec72aafe1154ae23cd0674193e757a4d2a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5e424fec72aafe1154ae23cd0674193e757a4d2a commit 5e424fec72aafe1154ae23cd0674193e757a4d2a Author: Dmitry Chagin AuthorDate: 2023-04-28 08:55:05 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:49 +0000 linux(4): Uniformly dev_t arguments translation The two main uses of dev_t are in struct stat and as a parameter of the mknod system calls. As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit quantity with 12 bits set asaid for the major number and 20 for the minor number. The in-kernel dev_t encoded as MMMmmmmm, where M is a hex digit of the major number and m is a hex digit of the minor number. The user-space dev_t encoded as mmmM MMmm, where M and m is the major and minor numbers accordingly. This is downward compatible with legacy systems where dev_t is 16 bits wide, encoded as MMmm. In glibc dev_t is a 64-bit quantity, with 32-bit major and minor numbers, encoded as MMMM Mmmm mmmM MMmm. This is downward compatible with the Linux kernel and with legacy systems where dev_t is 16 bits wide. In the FreeBSD dev_t is a 64-bit quantity. The major and minor numbers are encoded as MMMmmmMm, therefore conversion of the device numbers between Linux user-space and FreeBSD kernel required. (cherry picked from commit 166e2e5a9e87d32dbfc7838903904673873f1e71) --- sys/compat/linux/linux.h | 68 ++++++++++++++++++++++++++++++++++++++++++ sys/compat/linux/linux_misc.c | 4 +-- sys/compat/linux/linux_stats.c | 49 ++++++++++++------------------ sys/compat/linux/linux_util.c | 3 +- 4 files changed, 91 insertions(+), 33 deletions(-) diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 9061548399e4..bb70007cfc5b 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -33,6 +33,74 @@ */ typedef uint32_t l_dev_t; +/* + * Linux dev_t conversion routines. + * + * As of version 2.6.0 of the Linux kernel, dev_t is a 32-bit quantity + * with 12 bits set asaid for the major number and 20 for the minor number. + * The in-kernel dev_t encoded as MMMmmmmm, where M is a hex digit of the + * major number and m is a hex digit of the minor number. + * The user-space dev_t encoded as mmmM MMmm, where M and m is the major + * and minor numbers accordingly. This is downward compatible with legacy + * systems where dev_t is 16 bits wide, encoded as MMmm. + * In glibc dev_t is a 64-bit quantity, with 32-bit major and minor numbers, + * encoded as MMMM Mmmm mmmM MMmm. This is downward compatible with the Linux + * kernel and with legacy systems where dev_t is 16 bits wide. + * + * In the FreeBSD dev_t is a 64-bit quantity. The major and minor numbers + * are encoded as MMMmmmMm, therefore conversion of the device numbers between + * Linux user-space and FreeBSD kernel required. + */ +static __inline l_dev_t +linux_encode_dev(int _major, int _minor) +{ + + return ((_minor & 0xff) | ((_major & 0xfff) << 8) | + (((_minor & ~0xff) << 12) & 0xfff00000)); +} + +static __inline l_dev_t +linux_new_encode_dev(dev_t _dev) +{ + + return (_dev == NODEV ? 0 : linux_encode_dev(major(_dev), minor(_dev))); +} + +static __inline int +linux_encode_major(dev_t _dev) +{ + + return (_dev == NODEV ? 0 : major(_dev) & 0xfff); +} + +static __inline int +linux_encode_minor(dev_t _dev) +{ + + return (_dev == NODEV ? 0 : minor(_dev) & 0xfffff); +} + +static __inline int +linux_decode_major(l_dev_t _dev) +{ + + return ((_dev & 0xfff00) >> 8); +} + +static __inline int +linux_decode_minor(l_dev_t _dev) +{ + + return ((_dev & 0xff) | ((_dev & 0xfff00000) >> 12)); +} + +static __inline dev_t +linux_decode_dev(l_dev_t _dev) +{ + + return (makedev(linux_decode_major(_dev), linux_decode_minor(_dev))); +} + /* * Private Brandinfo flags */ diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index ba0ac190a946..bc6ff9559493 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -901,7 +901,7 @@ linux_mknod(struct thread *td, struct linux_mknod_args *args) case S_IFCHR: case S_IFBLK: error = kern_mknodat(td, AT_FDCWD, path, seg, - args->mode, args->dev); + args->mode, linux_decode_dev(args->dev)); break; case S_IFDIR: @@ -956,7 +956,7 @@ linux_mknodat(struct thread *td, struct linux_mknodat_args *args) case S_IFCHR: case S_IFBLK: error = kern_mknodat(td, dfd, path, seg, args->mode, - args->dev); + linux_decode_dev(args->dev)); break; case S_IFDIR: diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 07ef72706d75..a5c1949a4d28 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #endif +#include #include #include @@ -139,38 +140,19 @@ linux_kern_lstat(struct thread *td, const char *path, enum uio_seg pathseg, } #endif -/* - * l_dev_t has the same encoding as dev_t in the latter's low 16 bits, so - * truncation of a dev_t to 16 bits gives the same result as unpacking - * using major() and minor() and repacking in the l_dev_t format. This - * detail is hidden in dev_to_ldev(). Overflow in conversions of dev_t's - * are not checked for, as for other fields. - * - * dev_to_ldev() is only used for translating st_dev. When we convert - * st_rdev for copying it out, it isn't really a dev_t, but has already - * been translated to an l_dev_t in a nontrivial way. Translating it - * again would be illogical but would have no effect since the low 16 - * bits have the same encoding. - * - * The nontrivial translation for st_rdev renumbers some devices, but not - * ones that can be mounted on, so it is consistent with the translation - * for st_dev except when the renumbering or truncation causes conflicts. - */ -#define dev_to_ldev(d) ((uint16_t)(d)) - static int newstat_copyout(struct stat *buf, void *ubuf) { struct l_newstat tbuf; bzero(&tbuf, sizeof(tbuf)); - tbuf.st_dev = dev_to_ldev(buf->st_dev); + tbuf.st_dev = linux_new_encode_dev(buf->st_dev); tbuf.st_ino = buf->st_ino; tbuf.st_mode = buf->st_mode; tbuf.st_nlink = buf->st_nlink; tbuf.st_uid = buf->st_uid; tbuf.st_gid = buf->st_gid; - tbuf.st_rdev = buf->st_rdev; + tbuf.st_rdev = linux_new_encode_dev(buf->st_rdev); tbuf.st_size = buf->st_size; tbuf.st_atim.tv_sec = buf->st_atim.tv_sec; tbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; @@ -239,19 +221,27 @@ linux_newfstat(struct thread *td, struct linux_newfstat_args *args) } #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) + +static __inline uint16_t +linux_old_encode_dev(dev_t _dev) +{ + + return (_dev == NODEV ? 0 : linux_encode_dev(major(_dev), minor(_dev))); +} + static int old_stat_copyout(struct stat *buf, void *ubuf) { struct l_old_stat lbuf; bzero(&lbuf, sizeof(lbuf)); - lbuf.st_dev = dev_to_ldev(buf->st_dev); + lbuf.st_dev = linux_old_encode_dev(buf->st_dev); lbuf.st_ino = buf->st_ino; lbuf.st_mode = buf->st_mode; lbuf.st_nlink = buf->st_nlink; lbuf.st_uid = buf->st_uid; lbuf.st_gid = buf->st_gid; - lbuf.st_rdev = buf->st_rdev; + lbuf.st_rdev = linux_old_encode_dev(buf->st_rdev); lbuf.st_size = MIN(buf->st_size, INT32_MAX); lbuf.st_atim.tv_sec = buf->st_atim.tv_sec; lbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; @@ -550,13 +540,13 @@ stat64_copyout(struct stat *buf, void *ubuf) struct l_stat64 lbuf; bzero(&lbuf, sizeof(lbuf)); - lbuf.st_dev = dev_to_ldev(buf->st_dev); + lbuf.st_dev = linux_new_encode_dev(buf->st_dev); lbuf.st_ino = buf->st_ino; lbuf.st_mode = buf->st_mode; lbuf.st_nlink = buf->st_nlink; lbuf.st_uid = buf->st_uid; lbuf.st_gid = buf->st_gid; - lbuf.st_rdev = buf->st_rdev; + lbuf.st_rdev = linux_new_encode_dev(buf->st_rdev); lbuf.st_size = buf->st_size; lbuf.st_atim.tv_sec = buf->st_atim.tv_sec; lbuf.st_atim.tv_nsec = buf->st_atim.tv_nsec; @@ -762,11 +752,10 @@ statx_copyout(struct stat *buf, void *ubuf) tbuf.stx_ctime.tv_nsec = buf->st_ctim.tv_nsec; tbuf.stx_mtime.tv_sec = buf->st_mtim.tv_sec; tbuf.stx_mtime.tv_nsec = buf->st_mtim.tv_nsec; - - tbuf.stx_rdev_major = buf->st_rdev >> 8; - tbuf.stx_rdev_minor = buf->st_rdev & 0xff; - tbuf.stx_dev_major = buf->st_dev >> 8; - tbuf.stx_dev_minor = buf->st_dev & 0xff; + tbuf.stx_rdev_major = linux_encode_major(buf->st_rdev); + tbuf.stx_rdev_minor = linux_encode_minor(buf->st_rdev); + tbuf.stx_dev_major = linux_encode_major(buf->st_dev); + tbuf.stx_dev_minor = linux_encode_minor(buf->st_dev); return (copyout(&tbuf, ubuf, sizeof(tbuf))); } diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 5995ac5e18af..498320937fd3 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -248,7 +249,7 @@ translate_vnhook_major_minor(struct vnode *vp, struct stat *sb) sb->st_dev = rootdevmp->mnt_stat.f_fsid.val[0]; if (linux_vn_get_major_minor(vp, &major, &minor) == 0) - sb->st_rdev = (major << 8 | minor); + sb->st_rdev = makedev(major, minor); } char * From nobody Thu Jun 29 08:20: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 4QsBGQ2ngDz4knpM; Thu, 29 Jun 2023 08:20: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 4QsBGQ1dvMz3vcW; Thu, 29 Jun 2023 08:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OhC5bTfoGAzDh3MgRtXCcQr0Q0+0bIfJYaZLEtDf8gI=; b=v8UjzMmRt3zePrQqCSEcuLh+UnCoKFDOJEHdZGdbxCmHplKL09S9Z1B8ILHkIyFDDA0v3+ WhfvVz9kw0DAHtPsuVHxtky2hmtyqDZ+0IFe69fC2EQWjj7uPRoJm+zxKbBgpINIwN9LqS zlUvTMrpibi5B49AsvljBoGvzCFSRy1zYRKLFlDSfuFcxJCQ6rVTOfCHoO+MC3UNafDagL el5sS/oIgUHykRBK2vhsWWBmHcg2NqZ8g0sR5+HOq9MC95PnJma01jdsBpjqBUwoWAL84N hjZ3ddE1uxHnfnMfyUrKc6MsGjAP5SoGhkjISuV/r6oyuvrRkKngeDca7287Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OhC5bTfoGAzDh3MgRtXCcQr0Q0+0bIfJYaZLEtDf8gI=; b=Cch/JVE9UVX1Tid9IAaKDxf99YEJpSjSZQFO/uZ2EVbEsWlhkRJa1Pj71PMJMssRbBC3L/ r+bIHxYuu7w/Z4Qe61SmoofbQ98rbTzevOhBof+VXlVHdTWnRkP4N2uB3kE5ArWsGWrRc0 +ei6JnZIWkBmWqZ41OUEe1lJxP+gLLtSndUVuAPZNiVyglo1xEtk49wWYpO9b45vi5gARx ET3xl4Xc+AoY6KVgBQ2NUMdJoC285GNu586W7ju53NaP+Wg3OItX9f3F4KmYNpWla1GvOc kBLqBu4gOG4ggIqqk73xqkyrFX9WJoteUP2PtpzPUoN9fKwBUhVN+zvGyXG0Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026830; a=rsa-sha256; cv=none; b=eEX3qyBe+y9JY8hXwyNGOKonXpJ5hKUdt6O8fnQNjjgo9ssEZScekc9o+w+ZPTbnM8diEM fr+khqAFffcL+ZPYt0jTaIQXbYMnmfLNxjjIVMjrfAtKXG44wrlpzxOY4RPpd5SFhEzji4 MfB2Y6rPifjiVg1267rVmCwJovctZRWCn5BBviQFP20OrWfOqoXSJ+VfL4a7rZCAkZghZo HuT72Z7GvV4ClAyPSlIIgwt43/E3pOzClx65ecr8g3cRCQN1o0k/eGyEZbS0gVsbV0obb1 UAPpmE9+vtNapIDjZDklFKErF93zVn5pjVquz4+PFcQjqceo99AXPVaqR/t6cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGQ0Ykfz17sY; Thu, 29 Jun 2023 08:20: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 35T8KTWZ083522; Thu, 29 Jun 2023 08:20:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KTji083521; Thu, 29 Jun 2023 08:20:29 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:29 GMT Message-Id: <202306290820.35T8KTji083521@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: 4d1134a54c85 - stable/13 - fstatat(2): restore AT_EMPTY_PATH handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 4d1134a54c85ae8926eb43b7e51aee6e65b71816 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4d1134a54c85ae8926eb43b7e51aee6e65b71816 commit 4d1134a54c85ae8926eb43b7e51aee6e65b71816 Author: Konstantin Belousov AuthorDate: 2023-05-02 15:11:39 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:50 +0000 fstatat(2): restore AT_EMPTY_PATH handling Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 Reported by: markj Sponsored by: The FreeBSD Foundation (cherry picked from commit a1d71cebc05ccfeedf95f2db3e94b17270167888) --- sys/kern/vfs_syscalls.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 89f45e898d8e..7f7836450811 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2432,8 +2432,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights, td); - if ((error = namei(&nd)) != 0) + if ((error = namei(&nd)) != 0) { + if (error == ENOTDIR && + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) + error = kern_fstat(td, fd, sbp); return (error); + } error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED, td); NDFREE_NOTHING(&nd); vput(nd.ni_vp); From nobody Thu Jun 29 08:20: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 4QsBGR5MWTz4knpP; Thu, 29 Jun 2023 08:20: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 4QsBGR2Jjsz3vPc; Thu, 29 Jun 2023 08:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/38UW8dMTAzb+vX1014HTpyg/EoCSy80t053MOi5sZQ=; b=NL5+VtR/5/n5DCbjyczccSRy1jEq7pQiizct+3PGqTOfCPwgwRnUYLQhEwo2LMheIuI+m6 UQAKcmH60WcfIFmWgOwKGfrbLhfULuu1Ie6A7lDVwxbmtxbsIZ1Yz/q/Vc43TXU6SJPdd+ J4A9UcrJBRP5AtEP86kwlV7M2Fx+ccLkGfCnE9gqozv96jUDwGXjZi1kJs5qafDRBHiJom AXvmcT1zG5mkp2KLnot1BblRMtDUcxbAaojR6lMm3uPuHnX6Y6r46DEQ1P5yrJeA5gSisD xJna0CH84thwswuiJ6aTjUAEM9RXDAGO9SW1F0vZpeNMpEe0Maewj2LFqAPHWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/38UW8dMTAzb+vX1014HTpyg/EoCSy80t053MOi5sZQ=; b=Sox2Yo2wG5WE5ZoKN158njg527CjZaiue2K/a86i5etmGMxF009W0hkLky4WCcRm1GGF+S Cbldu4w6bHlI6HfKnUxkbQ4aMrisZqSbwei6lKhSaW+5vWhz+gbtevo64+9UhkjhNrR/zs qprhjtx4lR3ogiVkP7ceZfdTvp7YESo5XPDu8hg6lccQvie4np7dwkhOAX8dfDqYralytI AIlmVVxVj9auEEOGUwbvaCCPFS48rL6n2MmqUYselGZetuXI/yqH8j7d5HLptsijPsU7yL kAhnHG+1HDJoxaxPrjD+Y+x+1+FtzuZFqGeAY7dHo666WCQAAsgxgQPHj/jzQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026831; a=rsa-sha256; cv=none; b=RO8vluNopLfdr/gGtQQ7HTNnJxxMMKNAO3hLkgtGPs3Q+IZ1TRPshfqoZyNwIJKWmUIUIu +QYJ5qLX7iYbPzZUSTLeYeospnrjAMPfdy+jt/d+GFQ0IGh7FEwQQFSBIErd0GItURFoIL tzcddw9Muu05yn+eailGYqZr6n541GgBXBcKx7F/X4yXSGP//DzdICiwbakhx9Tb6Bs7Pk BOKXKqyjIBdVr4gxiXCpXGKwYH4v9FPDC32W2aoeIv3rVC61AlbzemWlRMDjiYMCA1FD1w KMftc2AXBEh8g3rLIwEts+KZRhq3To9mOK7gn0UsSAtz54K8YfBHAU25dfNkeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGR1JcHz17gk; Thu, 29 Jun 2023 08:20: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 35T8KVA8083541; Thu, 29 Jun 2023 08:20:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KVHZ083540; Thu, 29 Jun 2023 08:20:31 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:31 GMT Message-Id: <202306290820.35T8KVHZ083540@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: cdbdd15ecd8d - stable/13 - ktrace: Fix syscall number on a child return path from fork List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: cdbdd15ecd8de38f6b460330d046e8b94c010f86 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=cdbdd15ecd8de38f6b460330d046e8b94c010f86 commit cdbdd15ecd8de38f6b460330d046e8b94c010f86 Author: Dmitry Chagin AuthorDate: 2023-05-14 21:23:50 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:57 +0000 ktrace: Fix syscall number on a child return path from fork Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40078 MFC after 1 week (cherry picked from commit ae6ac58745b58c0a3424b3714be1205821d93c51) --- sys/kern/kern_fork.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 068dfdb097d3..eebe2e2259f2 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1118,6 +1118,9 @@ fork_exit(void (*callout)(void *, struct trapframe *), void *arg, void fork_return(struct thread *td, struct trapframe *frame) { +#ifdef KTRACE + struct syscall_args *sa; +#endif struct proc *p; p = td->td_proc; @@ -1160,7 +1163,9 @@ fork_return(struct thread *td, struct trapframe *frame) userret(td, frame); #ifdef KTRACE - if (KTRPOINT(td, KTR_SYSRET)) - ktrsysret(SYS_fork, 0, 0); + if (KTRPOINT(td, KTR_SYSRET)) { + sa = &td->td_sa; + ktrsysret(sa->code, 0, 0); + } #endif } From nobody Thu Jun 29 08:20: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 4QsBGT1Gkkz4kntr; Thu, 29 Jun 2023 08:20: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 4QsBGS3Sbzz3vTx; Thu, 29 Jun 2023 08:20:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7gtkhJjd1vdbvowMpoFnzZ/fEF7/Oewg7KIiYYDuXcw=; b=N5AYtZGibPQRDI+pwjhe/ORRNyzNi5Q5xbOam1MpEod4bYTSDSIi/QcAznwVc9XiuprUCk A6h1MZuQ+7wudqMGomDRDumptSWvRtFwzqo+9qz6d3c6LkgPTnEli618oxNCap5akSatHZ OqUBhunm9iNwtHLIT8fQ+zDIA91+1fYgig9NFPKJD6PgMw4Y4bcCvrTyk4IKUqEzmlEnKB 2m2Ryr9DjPvD76v1RDZOOVPfk9W+RkogfZThE76ViC0SfboGxKVzq4cmgny6rmVNwKlkDD 0g7cXj256i4MV19x/TH87/JWZ2F9CyzbviglYI2VY+185FQyi2sLkqvFmM0kfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7gtkhJjd1vdbvowMpoFnzZ/fEF7/Oewg7KIiYYDuXcw=; b=MGEHktQ4ZaG5+EcwAl07OX1jGxYqDsRfjZA+I+eVFz535OeAg3QtgZXFui1QYJT01APmKq TqQhfy/PfoZBNvNhSZU3mHk8jcLxiHtbhr2/Tk2kKCMxAdhlfP0MLGzdwTvPeE279awUm1 j8Ahcm4BibehiPceekjLHGHhtrJSmmiX6WGwFX8lq0oNixhWjkfKUGSdwdGg3edI0vSJrd 8z9rs/opaUOwYnFQBN2XwtADLGdvi8qdiT+KVpbM5qcNo+oZuRdSDEp1PZWOLf2CDTeRoY l+jx8tVlprdeQHk1sXFE97VgVgCtZZfRcVGVxcp3dp04to2CPTP53saUpcEOmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026832; a=rsa-sha256; cv=none; b=vWAI9q93GaedDX+RN5LuLmPwa4Wa+f6i1I3eVlmmZkkIYVxDDfhys6P99HVXnGzYFvyWI2 Ub58Fg1Eq+JdsilIPtYBQta528Oqdcb6Tl0UOblf74ABPy235JUFf9htxliOFZw/pLKIgl tzHmdR7Le2bRmueVr7kf8ThCycPuWosyt2sT+Mh+yL6Mz/FCFnF1W/poouHxsIAv0ssRxE RNKvYLd6NL44adbYKYD4Xwn6UJtkcJkbQqq6drg6F3ftDfOvkq19d39k7JBL69+Qpxoekb DaujVdTgPBsRErtyn7S3nulVnCLWNAumVWTceFSRZaHVZ1dJuMzkj4yQw0sQVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGS2ZGxz181f; Thu, 29 Jun 2023 08:20: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 35T8KW6s083560; Thu, 29 Jun 2023 08:20:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KWJA083559; Thu, 29 Jun 2023 08:20:32 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:32 GMT Message-Id: <202306290820.35T8KWJA083559@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: 8975a63ad5c2 - stable/13 - ktrace: Simplify ae6ac587, drop the sa var declaration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 8975a63ad5c283a0a7ca05964826b2db799a79d2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=8975a63ad5c283a0a7ca05964826b2db799a79d2 commit 8975a63ad5c283a0a7ca05964826b2db799a79d2 Author: Dmitry Chagin AuthorDate: 2023-05-16 19:46:26 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:58 +0000 ktrace: Simplify ae6ac587, drop the sa var declaration Suggested by: kib MFC after: 5 days (cherry picked from commit 0282f87530b33ebba890794b07f75a2874357e3a) --- sys/kern/kern_fork.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index eebe2e2259f2..2d7e7bc0de4a 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1118,9 +1118,6 @@ fork_exit(void (*callout)(void *, struct trapframe *), void *arg, void fork_return(struct thread *td, struct trapframe *frame) { -#ifdef KTRACE - struct syscall_args *sa; -#endif struct proc *p; p = td->td_proc; @@ -1163,9 +1160,7 @@ fork_return(struct thread *td, struct trapframe *frame) userret(td, frame); #ifdef KTRACE - if (KTRPOINT(td, KTR_SYSRET)) { - sa = &td->td_sa; - ktrsysret(sa->code, 0, 0); - } + if (KTRPOINT(td, KTR_SYSRET)) + ktrsysret(td->td_sa.code, 0, 0); #endif } From nobody Thu Jun 29 08:20: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 4QsBGT6Fz3z4knrq; Thu, 29 Jun 2023 08:20: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 4QsBGT4rdKz3vQ4; Thu, 29 Jun 2023 08:20:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y5cBMYC8aOrjC7pnb70/Oc/V8N0GMFMZGwwTbdNWtuk=; b=GoGViS1CrHQqH2qZZ/6iMQI88rGb+mzUp2Dssl2NBThmUjB9lOx67CmwCaKGica0A5OYul 1BL5z9i3Yw4oWzrPgtMYfAuEqI/bIh4J3r4tSjUkXLQYZTU4k6mbs6On40S2VstNtv80kK WohkSoOqU5S9xW0lpqfCX6Qa2kTrHLBmeSAMrj9mY7/RMtpHKAGFW4AmXP6ckxn9bwD+Be HO8Hbpl1o/S+G5PWRwqYEhaljIhs4hUNYON9FRvhiAQuhHVeE682Zuy0nrhbs1j8sNc1F+ EJR45bRS1dqkstfmpmFPT3UaKZLZFHSkvikW46Qpqdg86+OW8VbgeZLPbydJ2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y5cBMYC8aOrjC7pnb70/Oc/V8N0GMFMZGwwTbdNWtuk=; b=lUwQlwqCTkFjezmaqkvHLVzQmndMi1C2s8ZSHkIZ7jA9ES3FSJmkA6UsRi9iscsHrbn9wA x9hiLSMHY8xryCFzY7+z1fiBpUB9LIJsd4nWJfFBHbx4Bp5Im3bM18d9d2XALc3syXe0uz 0/OP5BK6OmnKk+VbSeocv4RXHKnVojBSqGASkhF/gx7TLQXI3aiuU5B0neiFO0ZvnQVXyM AK+fOljRmuFTn8ajUQOf+S7CKEq576hu51Dp6HUG1RnLMA0dpK0BIXAB/QJORZ7NbW2O3d PyWxweghHE3s8y7j88JIeDHta4qLtLsDWGdjevftS1sF/MW/Khe3E7aKkiGOBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026833; a=rsa-sha256; cv=none; b=brkCOv+Qm4Ppp2bnXx1vR9ruY4Y4JPWNQqupbhNN0H9T60ztb+zomyg0KLL8uxBoJdgs8Y 3fgUif01ouw5V6VLcX5DuPE+4FslKSKhxHPm/ygkOVrpGQj5fUaQCwRxXvRxhusIxYRNKp 4qH2JeIA9yq9xqYILo9N2Odg71w7MPi38BIDSCHIHnuxi/iR7HqDiSKgdaCpFY9oFv0qcX nBhYMLaNEJ437Hn3+g+JGzN3NiBtcEYAYRWKML8X5oJc5peQuseTCVl9bvgTMMtGhyo4iG EHllSG8P9szdQF/f11EbpMTYoVeT0Sw0ZxcjXqSQ3SW9SBDqarzkgz6l9uVJBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGT3f8Lz17gm; Thu, 29 Jun 2023 08:20: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 35T8KXYB083579; Thu, 29 Jun 2023 08:20:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KXCn083578; Thu, 29 Jun 2023 08:20:33 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:33 GMT Message-Id: <202306290820.35T8KXCn083578@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: addf706f6ff0 - stable/13 - linux(4): Check fd passed to unlockpt() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: addf706f6ff0214cc19fb6ad17b9994e91292065 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=addf706f6ff0214cc19fb6ad17b9994e91292065 commit addf706f6ff0214cc19fb6ad17b9994e91292065 Author: Dmitry Chagin AuthorDate: 2023-05-18 07:55:39 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:58 +0000 linux(4): Check fd passed to unlockpt() In our implementation, grantpt() and unlockpt() don't actually have any use, because PTY's are created on the fly and already have proper permissions upon creation. Atleast check that a proper fd passed to unlockpt(). For grantpt() Glibc calls TIOCGPTN ioctl which would fail if fd is not a master. Differential Revision: https://reviews.freebsd.org/D40100 MFC after: 1 week (cherry picked from commit 0f62290e7f749b7a453d413dd72c406129a9aba5) --- sys/compat/linux/linux_ioctl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index fd4afd3004be..25f5e6d8df0b 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -1010,8 +1010,12 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args) error = ENOIOCTL; break; case LINUX_TIOCSPTLCK: - /* Our unlockpt() does nothing. */ - error = 0; + /* + * Our unlockpt() does nothing. Check that fd refers + * to a pseudo-terminal master device. + */ + args->cmd = TIOCPTMASTER; + error = (sys_ioctl(td, (struct ioctl_args *)args)); break; default: error = ENOIOCTL; From nobody Thu Jun 29 08:20: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 4QsBGV6G50z4knh9; Thu, 29 Jun 2023 08:20: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 4QsBGV5Sybz3vK0; Thu, 29 Jun 2023 08:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NDIKggNDxdKtAC/d7A5KM8gTWtmgPwi5FwrCDRBDCRo=; b=PCmCT8d5V8kA9f5uJal1ye0/63I01Pmo2ujD44bdVcixrsusbnXHHbG91mZk98Kd9KjBpm obcDvOykNdeaAP5D6slwIzB/yhpyB6rkXauu0UIiZyZOOm7TOSBJWVqyTqQStwYYtKrpp1 irUN+Q1WzOvWipeDFEd6ZrGwrmcjm+DE7JvbUdaq1VPLP31rjOqSNnmZMDUoSgKlxIhHxy gxqevxo2UtTa3tx1fMhDiXxiW4eYLapWPboHC5jAFUUk3ORkJk+fecBWMIV+sXuXx4H0Bk fR41hNAq/gJKe9gXJEbwMrCBG6phr5fPDZnq99FHJztDTpnY9sh8ZTMQXGhT3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NDIKggNDxdKtAC/d7A5KM8gTWtmgPwi5FwrCDRBDCRo=; b=L4VFUECuh57e/aVVWxFAFieXl18N6fTiMELOzJOcRbWs0r+v81euM2rwWxg6jejdxM7Ma8 SWITFmC9shsUqnDxlkpaFZucmzsvCMb1Z1Q4TS/iEwUorb5CDt7dQNodRUNhXbp6d9rS8R wZA1Onrpl+pUvShmJ+uw3D22Cq6KeBm/qe2y4bOil5uUSlTh/82p+udf/x9RMz7T2wykpA cx8fzlPHGIQGYSEyImWA0l+6T3gdbZyKc9PgPr5rl7+8pGB1JqBuLg1QwPnrLH7FML8RY2 VQxka9yuRq6GPRbKouSXS6gQKxkYhS8hADst3OUyxB0S+RCLAe+LxKKwXUvQow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026834; a=rsa-sha256; cv=none; b=eYhCV0VuwYmlNiJuYMYs5lofPuFLqqXHX5oqdehh3IuN+1mnMEs6lS0d25VYCPM9Uunh6X eSQtsBLEQeRQHN7Z3ert9678JqvzRg/9L0hdqxYdzfRqr2XGXzJbxVs1FGsb3V4CTF4Y2l yKIuvbC7UGhXNN/NhrclTx9WRAIyFzLlv1V2o1q4e/WSlsUntE9HVFDOUY9RJosCfViXe2 8DhnxkwivVMLJVzWVI2a2A8/qBJht/BnJiJsXO6DNBGGFISsOmeyBhXTPaoLLfHHTQRtbT NaNDj916O5sr06tw2cT/HOcMcqeyWPxaHgcYZp8+la8dDLSo+PaFUUX8ho6lww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGV4TCRz1832; Thu, 29 Jun 2023 08:20: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 35T8KY0D083740; Thu, 29 Jun 2023 08:20:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KYN3083729; Thu, 29 Jun 2023 08:20:34 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:34 GMT Message-Id: <202306290820.35T8KYN3083729@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: cdae95d79825 - stable/13 - linux(4): Move linux_debug decalration to linux_util.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/stable/13 X-Git-Reftype: branch X-Git-Commit: cdae95d7982553ebf902df42787d20cc9273c3de Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=cdae95d7982553ebf902df42787d20cc9273c3de commit cdae95d7982553ebf902df42787d20cc9273c3de Author: Dmitry Chagin AuthorDate: 2023-05-18 16:58:23 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:58 +0000 linux(4): Move linux_debug decalration to linux_util.h To avoid inclusion of linux_mib.h with linux_util.h in cases where we need rate limiting macro. MFC after: 1 week (cherry picked from commit 38a137f416203494f183cb2b309524102680105e) --- sys/compat/linux/linux_mib.h | 1 - sys/compat/linux/linux_util.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index 5902f523dfee..4d7f32a55646 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -57,7 +57,6 @@ int linux_kernver(struct thread *td); #define LINUX_XKERNVERSTR(x) LINUX_KERNVERSTR(x) #define LINUX_VERSION_STR LINUX_XKERNVERSTR(LINUX_KVERSION.LINUX_KPATCHLEVEL.LINUX_KSUBLEVEL) -extern int linux_debug; extern int linux_default_openfiles; extern int linux_default_stacksize; extern int linux_dummy_rlimits; diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index f61aeea99136..bd364e61e90f 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -38,6 +38,8 @@ #include +extern int linux_debug; + MALLOC_DECLARE(M_LINUX); MALLOC_DECLARE(M_EPOLL); From nobody Thu Jun 29 08:20: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 4QsBGX4b9fz4knkH; Thu, 29 Jun 2023 08:20: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 4QsBGX1Zjnz3vW2; Thu, 29 Jun 2023 08:20:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026836; h=from:from:reply-to:subject:subject: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+8D8ulyVy5JvFnCNcwXH/hqPT+yYTUH1BizUNA4KXk=; b=VhKKk5jAa2Nd9qnbn//G5mP1jjMxpFbcQs9p3zWnvWnqM1DC8bX/yI1Hqp3qRrS9VUlCXl NbYVj5FEA9pKbeMxS4WCDG8jHHCj58psN+reLXNfEMqqzVQeQ3KyQe9CJ6DP9Oxxx4c6XZ +iGAe25JiAIBPWCu8FQtzMhD2ET5T8aQ0kciI+X/YK26XA7iBxFXqcGwpBMkhpjkG/PvUn SS8m/E/1z1caFgztqeu9e5PNhGJxxLK8eOpx1CLOXPvkic1y+VRgHEEQQSjUcOwm9MSISs d09gGa+evogOOukxAF8BFrTz2xgHy7b0+x6JJQPzTJGK9k3mJNLfMwjekLS/OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026836; h=from:from:reply-to:subject:subject: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+8D8ulyVy5JvFnCNcwXH/hqPT+yYTUH1BizUNA4KXk=; b=cAJQ64fAQE8TvEC/I06ckXt2Jz0unVMIektF5vvvrL6r6u3mGbv2wzbobCxKew+JSDfujt 0OMhCF50EPg7dbDnP+0KWVd/UwImUJgn0KvQMkh2INYu0Xcs371H0aUqoQ5R1B1+iwxaiD BIyiFInk7TJK7XqQBWeEW20l5JHTOuAySALq5x1vyEZGgUD0XqANfCAjGuxmAwwO0q9rzV YjRtuIWDpBAcVIxxdtmMkEo/teSt1DCs/znnhOPxeytCNBy54IggzM4dMPluK1jCe82mJQ C09di72qoSiK6EzpQKSseXqQDPFDWbHHDo1S0/8OOKPXhPw+J8zh6Z6Sc4zS8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026836; a=rsa-sha256; cv=none; b=DtyEbZfkxasEQNEbaahC+RSKGFBtLwAbblYawPrAKJCTGuaE2THVui2SdXjKk/K+3QkMgJ NDYVxILzOA5ryGheyHb9RUwsAuggDt4aSBde2FE1KGuKYGM8HAw94V9mVcW/xFT1i+GIcZ VtVC+m0Xv0Rd747qP3Wt9Ahj9FAv+nka7W7EN3yq/x0wqjduRLTXaiKGyCp1ZzolUsss0I JXprM9Tc1S5CzWH3BNn7fwXgfzFE2Tm+AjQI4RcgRcAFkN3pB689Kgd7EgqXlEz8P4OoBG L+YhSYhSVbsKj6EoQXt5uqyeRMKAY1iOD+pZOffzMEGg3mS91kP+3V2VCj8Gqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGW5N67z17QP; Thu, 29 Jun 2023 08:20: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 35T8KZot084510; Thu, 29 Jun 2023 08:20:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KZsT084509; Thu, 29 Jun 2023 08:20:35 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:35 GMT Message-Id: <202306290820.35T8KZsT084509@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: 9480640957ff - stable/13 - linux(4): Make ptrace_peekusr machine dependend List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 9480640957ff48c6bc7c0ea5d4f3eb5930f417e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=9480640957ff48c6bc7c0ea5d4f3eb5930f417e3 commit 9480640957ff48c6bc7c0ea5d4f3eb5930f417e3 Author: Dmitry Chagin AuthorDate: 2023-05-18 17:00:12 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:59 +0000 linux(4): Make ptrace_peekusr machine dependend And partially implement it for x86_64. Differential Revision: https://reviews.freebsd.org/D40095 MFC after: 1 week (cherry picked from commit dd2a6cd701aea5a6ced59b9947e087304f7d7238) --- sys/amd64/linux/linux.h | 2 ++ sys/amd64/linux/linux_machdep.c | 31 ++++++++++++++++++++++++++ sys/amd64/linux32/linux.h | 2 ++ sys/amd64/linux32/linux32_machdep.c | 9 ++++++++ sys/arm64/linux/linux.h | 2 ++ sys/arm64/linux/linux_machdep.c | 8 +++++++ sys/compat/linux/linux_ptrace.c | 43 ------------------------------------- 7 files changed, 54 insertions(+), 43 deletions(-) diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index a5682c6a980d..57f1ee0115e6 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -322,6 +322,8 @@ void linux_ptrace_get_syscall_info_machdep(const struct reg *reg, struct syscall_info *si); int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid, struct linux_pt_regset *l_regset); +int linux_ptrace_peekuser(struct thread *td, pid_t pid, + void *addr, void *data); #endif /* _KERNEL */ #endif /* !_AMD64_LINUX_H_ */ diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index 6c96dd496fdc..233d66a40899 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -367,3 +367,34 @@ linux_ptrace_getregs_machdep(struct thread *td, pid_t pid, return (0); } + +#define LINUX_URO(a,m) ((uintptr_t)a == offsetof(struct linux_pt_regset, m)) + +int +linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) +{ + struct linux_pt_regset reg; + struct reg b_reg; + uint64_t val; + int error; + + if ((uintptr_t)addr & (sizeof(data) -1) || (uintptr_t)addr < 0) + return (EIO); + if ((uintptr_t)addr >= sizeof(struct linux_pt_regset)) { + LINUX_RATELIMIT_MSG_OPT1("PTRACE_PEEKUSER offset %ld " + "not implemented; returning EINVAL", (uintptr_t)addr); + return (EINVAL); + } + + if (LINUX_URO(addr, fs_base)) + return (kern_ptrace(td, PT_GETFSBASE, pid, data, 0)); + if (LINUX_URO(addr, gs_base)) + return (kern_ptrace(td, PT_GETGSBASE, pid, data, 0)); + if ((error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0)) != 0) + return (error); + bsd_to_linux_regset(&b_reg, ®); + val = *(®.r15 + ((uintptr_t)addr / sizeof(reg.r15))); + return (copyout(&val, data, sizeof(val))); +} + +#undef LINUX_URO diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 32f2f42b0108..a98777adeaf5 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -465,6 +465,8 @@ struct reg32; void bsd_to_linux_regset32(const struct reg32 *b_reg, struct linux_pt_regset32 *l_regset); +int linux_ptrace_peekuser(struct thread *td, pid_t pid, + void *addr, void *data); extern bool linux32_emulate_i386; #endif /* _KERNEL */ diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 0bd398042c3f..afc60fb7e822 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -742,3 +742,12 @@ DEFINE_IFUNC(, int, futex_xorl, (int, uint32_t *, int *)) return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? futex_xorl_smap : futex_xorl_nosmap); } + +int +linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) +{ + + LINUX_RATELIMIT_MSG_OPT1("PTRACE_PEEKUSER offset %ld not implemented; " + "returning EINVAL", (uintptr_t)addr); + return (EINVAL); +} diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index 5a391c3543d3..be6733c81d97 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -238,6 +238,8 @@ void linux_ptrace_get_syscall_info_machdep(const struct reg *reg, struct syscall_info *si); int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid, struct linux_pt_regset *l_regset); +int linux_ptrace_peekuser(struct thread *td, pid_t pid, + void *addr, void *data); #endif /* _KERNEL */ #endif /* _ARM64_LINUX_H_ */ diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 4b12476f7865..2e472869eedb 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -152,3 +152,11 @@ linux_ptrace_getregs_machdep(struct thread *td __unused, pid_t pid __unused, return (0); } +int +linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) +{ + + LINUX_RATELIMIT_MSG_OPT1("PTRACE_PEEKUSER offset %ld not implemented; " + "returning EINVAL", (uintptr_t)addr); + return (EINVAL); +} diff --git a/sys/compat/linux/linux_ptrace.c b/sys/compat/linux/linux_ptrace.c index 151355d2bb3f..c1c7abf70a9d 100644 --- a/sys/compat/linux/linux_ptrace.c +++ b/sys/compat/linux/linux_ptrace.c @@ -100,11 +100,6 @@ __FBSDID("$FreeBSD$"); #define LINUX_PTRACE_SYSCALL_INFO_ENTRY 1 #define LINUX_PTRACE_SYSCALL_INFO_EXIT 2 -#define LINUX_PTRACE_PEEKUSER_ORIG_RAX 120 -#define LINUX_PTRACE_PEEKUSER_RIP 128 -#define LINUX_PTRACE_PEEKUSER_CS 136 -#define LINUX_PTRACE_PEEKUSER_DS 184 - static int map_signum(int lsig, int *bsigp) { @@ -179,44 +174,6 @@ linux_ptrace_peek(struct thread *td, pid_t pid, void *addr, void *data) return (error); } -static int -linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) -{ - struct reg b_reg; - uint64_t val; - int error; - - error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0); - if (error != 0) - return (error); - - switch ((uintptr_t)addr) { -#ifdef __amd64__ - case LINUX_PTRACE_PEEKUSER_ORIG_RAX: - val = b_reg.r_rax; - break; - case LINUX_PTRACE_PEEKUSER_RIP: - val = b_reg.r_rip; - break; - case LINUX_PTRACE_PEEKUSER_CS: - val = b_reg.r_cs; - break; - case LINUX_PTRACE_PEEKUSER_DS: - val = b_reg.r_ds; - break; -#endif /* __amd64__ */ - default: - linux_msg(td, "PTRACE_PEEKUSER offset %ld not implemented; " - "returning EINVAL", (uintptr_t)addr); - return (EINVAL); - } - - error = copyout(&val, data, sizeof(val)); - td->td_retval[0] = error; - - return (error); -} - static int linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data) { From nobody Thu Jun 29 08:20: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 4QsBGY0mWXz4knXy; Thu, 29 Jun 2023 08:20: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 4QsBGY047wz3vpf; Thu, 29 Jun 2023 08:20:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NHTHvG08uQuYdZosVAToz/RkYMBS2huyoV85hUoYKc8=; b=GCMa+uye7Wzj6D2IoQZQ/B6VEyjV7ebK6hc8PCFx1rdiSZPMOtNSd9cubrIBDTk5pzSvB6 +2zjcsFNgpKUTSGDjEpg8evo2btL19AYwW6uCpKFlol1YX6Oi20JavSqjSWzR7jO0emN56 6L2dCKVW5MiTfJcjQGoobsAKo4Ki2rifW6WFi36R3Cnmjuds28mxJkYwNmD0xk62Bsdd+f 0uUS20H27pLi8QaGVeMg2RytgvKywh9W9j/WlKXhfKKSlL3XMmJoTeAQHFgn9/jNswHGU4 FtiHhFMTLUjEuVjVMFE4GpflMV0Xg5NDTO+Ni/8npF6/gzCxL+pO8gBu6DqUMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NHTHvG08uQuYdZosVAToz/RkYMBS2huyoV85hUoYKc8=; b=ukNmrxR5+X85qBujEgJdcvWZC5Vlkh0/Na1d/neAgZHFizEQWHqw1QWM6do0Gv/NmrUwrm c79F8n1Gu08XYtRjKATfDX6sYFB8q7X9te5GOAL7tL5zm/Vh/pue/tEiczthHk7O9k5WpF NiF6XbOdSQLsYJIW4k5ovazLAKzqiEEpKpw+H6RrX+QZCfkxGjIlllGUQSQMzF6m/Mhs3M iSjBNajWisvvpgbraIdtlmRUGXTYTsluESwPleG3JkcV+6BHQrT4i7ENImN5yQK/Wwm3QQ mJhlchiBZEbN3fQ+grf++6GsYsAwAPN7ezit5LZEQWDdN2pu+SjcLqGLjl40aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026837; a=rsa-sha256; cv=none; b=OpSfOd/VPwGH6Xg1ByyAnKlOsH25+0U81SYWok+/wEt9RdcDdBbva2Eziu/4o3wYNTw3/e wPrPS75J7qhwlGJO4mEYBJ2KYuh1RbDJ3zG2aPbiVEp/hU1SDEEB9eA2/wpqmF/iOhP+gL sZxJWoHOUmXinHNwSHJQK1XcHx0iY4WfpGH2Ex8Oic4ZnevVLrUjaM3ZVlpZsu80pCm5EO CQQRIrCSM1cul/ILtB0NWbp5CajkGsVMjOYG+cEGjYtkE0zh1A16oL3oxv9iOSSXZFz/GJ tqNKNuxFTNbtKEFXBEw1E5oa93oUo98zZuhHKXKr99KXAftL8GQY6S3t9XSPsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGX6HTZz1837; Thu, 29 Jun 2023 08:20: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 35T8KaEU084529; Thu, 29 Jun 2023 08:20:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8Kauh084528; Thu, 29 Jun 2023 08:20:36 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:36 GMT Message-Id: <202306290820.35T8Kauh084528@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: d056fef82aef - stable/13 - linux(4): Make ptrace_pokeusr machine dependent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: d056fef82aefb703441a33af719db9182ab566bc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d056fef82aefb703441a33af719db9182ab566bc commit d056fef82aefb703441a33af719db9182ab566bc Author: Dmitry Chagin AuthorDate: 2023-05-18 17:01:12 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:59 +0000 linux(4): Make ptrace_pokeusr machine dependent Differential Revision: https://reviews.freebsd.org/D40096 MFC after: 1 week (cherry picked from commit 3d0addcd35193461e927db6cfe4b6d9b579eed6b) --- sys/amd64/linux/linux.h | 2 ++ sys/amd64/linux/linux_machdep.c | 8 ++++++++ sys/amd64/linux32/linux.h | 2 ++ sys/amd64/linux32/linux32_machdep.c | 9 +++++++++ sys/arm64/linux/linux.h | 2 ++ sys/arm64/linux/linux_machdep.c | 9 +++++++++ sys/compat/linux/linux_ptrace.c | 8 -------- 7 files changed, 32 insertions(+), 8 deletions(-) diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index 57f1ee0115e6..a2fb6c94466e 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -324,6 +324,8 @@ int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid, struct linux_pt_regset *l_regset); int linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data); +int linux_ptrace_pokeuser(struct thread *td, pid_t pid, + void *addr, void *data); #endif /* _KERNEL */ #endif /* !_AMD64_LINUX_H_ */ diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index 233d66a40899..ddb291169a03 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -397,4 +397,12 @@ linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) return (copyout(&val, data, sizeof(val))); } +int +linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data) +{ + + LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld " + "not implemented; returning EINVAL", (uintptr_t)addr); + return (EINVAL); +} #undef LINUX_URO diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index a98777adeaf5..0553fe2cae45 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -467,6 +467,8 @@ void bsd_to_linux_regset32(const struct reg32 *b_reg, struct linux_pt_regset32 *l_regset); int linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data); +int linux_ptrace_pokeuser(struct thread *td, pid_t pid, + void *addr, void *data); extern bool linux32_emulate_i386; #endif /* _KERNEL */ diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index afc60fb7e822..23d8f8767282 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -751,3 +751,12 @@ linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) "returning EINVAL", (uintptr_t)addr); return (EINVAL); } + +int +linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data) +{ + + LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld " + "not implemented; returning EINVAL", (uintptr_t)addr); + return (EINVAL); +} diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index be6733c81d97..700a97045dd1 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -240,6 +240,8 @@ int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid, struct linux_pt_regset *l_regset); int linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data); +int linux_ptrace_pokeuser(struct thread *td, pid_t pid, + void *addr, void *data); #endif /* _KERNEL */ #endif /* _ARM64_LINUX_H_ */ diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 2e472869eedb..87014950497e 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -160,3 +160,12 @@ linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) "returning EINVAL", (uintptr_t)addr); return (EINVAL); } + +int +linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data) +{ + + LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld " + "not implemented; returning EINVAL", (uintptr_t)addr); + return (EINVAL); +} diff --git a/sys/compat/linux/linux_ptrace.c b/sys/compat/linux/linux_ptrace.c index c1c7abf70a9d..5b971bbfb497 100644 --- a/sys/compat/linux/linux_ptrace.c +++ b/sys/compat/linux/linux_ptrace.c @@ -174,14 +174,6 @@ linux_ptrace_peek(struct thread *td, pid_t pid, void *addr, void *data) return (error); } -static int -linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data) -{ - - linux_msg(td, "PTRACE_POKEUSER not implemented; returning EINVAL"); - return (EINVAL); -} - static int linux_ptrace_setoptions(struct thread *td, pid_t pid, l_ulong data) { From nobody Thu Jun 29 08:20: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 4QsBGZ1f4kz4knkL; Thu, 29 Jun 2023 08:20: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 4QsBGZ11vZz3vff; Thu, 29 Jun 2023 08:20:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+oAVEwyEn5ejVGU54Rc3hkUC+mcdiOaSH8JVxdsUIhM=; b=ywp5B4i5kh+PtG3l4xPakJKp6k+5aVpj4FHdRIITQudEThTyuuxelk5GxA2xbpUT45OYHX 6wswtVmZBpBGWdriSZFH4rP553pL/gaH4whigmdJGpiEyB6ne22zmTxpy1zV/MWVSyeUiu CRf3zPTbfSvEdP76Nz9WIeXUv2AcZl9UkwgvshfF3xLGDjWXtH2HnYEydxuO4TMydooc96 7wjfO28HFO2regAVT16IUQPZ65eTAplid/sHv3qzGK3apmbYO/AHP9mYJH7sljzxBanwXG ZAjKw2JjV9ANJTXKzYHPTzlqQLlztAEL1rm7XQG/iDcc1UIcX9FZh5sfTN9gkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+oAVEwyEn5ejVGU54Rc3hkUC+mcdiOaSH8JVxdsUIhM=; b=fw8I5HB5vSUDlXQ4PlduZGGZR9lP4KJYcxy6Ia5MoTuKGDcJ+ludlRHPA4YDxysmUY4y7e lNiglHBt9duBtOAverX2E/VSJo2JuZIZisNJQC6P/8oLGcTa4Sx1NTorBc8wTtnaa1ep1p dgvaLPyp5I10ZoKle+ksTOv5uWwIhUgjv/MFWIxgxnwWK3rcLfu4+gmX2vJjkDX86nRN/i Wcl3pknMVeU6K0TEBeW+baHyUZ4XMIGY5ugcWPkQrRuP7lRDVFlT831rJKHQ54Sc6lnx3X rLjZnZzMAtkp3tgPTMS/kUCTHjkxjs0fGZkI6I91011r4w/Lv97j9BLz7Vls+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026838; a=rsa-sha256; cv=none; b=tOu62MnGv2pcGRmV7HFnYpbCP4cALzT6jNSz7/HTOT6FMgqFZvZLR3Pg56zQXMzwNtffzW EoXPcol/23bSMM3+fHjiGE6UBnKyeFnOJPwdUasH9+nt3YgW099KPqO6/P/ej/dsuDmsPo qyddaz4vhSVl5Tgs7WOpAzarOny/rt/sQkl00CpGHoF/JeNC70yxo3I8Z93kdhOuPcVE0e G7Py7dgdHulzJazF8N60xP7EawauNc1ATLykHJye57KauKO7rjhOQBZ8ARJV3LhJTQp/Pf MgmjXfJQp5xaF3CMeqIJM2da1aJj+MBrvh/G3C5JZUvtVWhCkiUAaPbNpKxq5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGZ06rMz181j; Thu, 29 Jun 2023 08:20: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 35T8Kb9K084548; Thu, 29 Jun 2023 08:20:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8Kb3K084547; Thu, 29 Jun 2023 08:20:37 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:37 GMT Message-Id: <202306290820.35T8Kb3K084547@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: 050cd99a65a5 - stable/13 - linux(4): Implement ptrace_pokeusr for x86_64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 050cd99a65a565b678d47c0e6980e14f4fca9112 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=050cd99a65a565b678d47c0e6980e14f4fca9112 commit 050cd99a65a565b678d47c0e6980e14f4fca9112 Author: Dmitry Chagin AuthorDate: 2023-05-18 17:02:35 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:59 +0000 linux(4): Implement ptrace_pokeusr for x86_64 Differential Revision: https://reviews.freebsd.org/D40097 MFC after: 1 week (cherry picked from commit 1d76741520c031730319ed976a6c394213991504) --- sys/amd64/linux/linux_machdep.c | 73 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index ddb291169a03..6ac0ab0cd3d7 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -397,12 +397,79 @@ linux_ptrace_peekuser(struct thread *td, pid_t pid, void *addr, void *data) return (copyout(&val, data, sizeof(val))); } +static inline bool +linux_invalid_selector(u_short val) +{ + + return (val != 0 && ISPL(val) != SEL_UPL); +} + +struct linux_segreg_off { + uintptr_t reg; + bool is0; +}; + +const struct linux_segreg_off linux_segregs_off[] = { + { + .reg = offsetof(struct linux_pt_regset, gs), + .is0 = true, + }, + { + .reg = offsetof(struct linux_pt_regset, fs), + .is0 = true, + }, + { + .reg = offsetof(struct linux_pt_regset, ds), + .is0 = true, + }, + { + .reg = offsetof(struct linux_pt_regset, es), + .is0 = true, + }, + { + .reg = offsetof(struct linux_pt_regset, cs), + .is0 = false, + }, + { + .reg = offsetof(struct linux_pt_regset, ss), + .is0 = false, + }, +}; + int linux_ptrace_pokeuser(struct thread *td, pid_t pid, void *addr, void *data) { + struct linux_pt_regset reg; + struct reg b_reg, b_reg1; + int error, i; - LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld " - "not implemented; returning EINVAL", (uintptr_t)addr); - return (EINVAL); + if ((uintptr_t)addr & (sizeof(data) -1) || (uintptr_t)addr < 0) + return (EIO); + if ((uintptr_t)addr >= sizeof(struct linux_pt_regset)) { + LINUX_RATELIMIT_MSG_OPT1("PTRACE_POKEUSER offset %ld " + "not implemented; returning EINVAL", (uintptr_t)addr); + return (EINVAL); + } + + if (LINUX_URO(addr, fs_base)) + return (kern_ptrace(td, PT_SETFSBASE, pid, data, 0)); + if (LINUX_URO(addr, gs_base)) + return (kern_ptrace(td, PT_SETGSBASE, pid, data, 0)); + for (i = 0; i < nitems(linux_segregs_off); i++) { + if ((uintptr_t)addr == linux_segregs_off[i].reg) { + if (linux_invalid_selector((uintptr_t)data)) + return (EIO); + if (!linux_segregs_off[i].is0 && (uintptr_t)data == 0) + return (EIO); + } + } + if ((error = kern_ptrace(td, PT_GETREGS, pid, &b_reg, 0)) != 0) + return (error); + bsd_to_linux_regset(&b_reg, ®); + *(®.r15 + ((uintptr_t)addr / sizeof(reg.r15))) = (uint64_t)data; + linux_to_bsd_regset(&b_reg1, ®); + b_reg1.r_err = b_reg.r_err; + b_reg1.r_trapno = b_reg.r_trapno; + return (kern_ptrace(td, PT_SETREGS, pid, &b_reg, 0)); } #undef LINUX_URO From nobody Thu Jun 29 08:20: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 4QsBGb4lMkz4knvJ; Thu, 29 Jun 2023 08:20: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 4QsBGb1Y87z3vyN; Thu, 29 Jun 2023 08:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SBKzVRAUo59GPL3ZH78lebY7+nxqBJSk3HsM2i9K/5Y=; b=RfKUek/Z+HIAu5WImJRXJ5H9wzs/2lrtRy//5bnw1bMOe+vN+4YBOOQLF9jSkhTW2xfjK5 DoaBeL/6dgrNIGFrXik+Fnf6SaNUG5O60i6MzSfZlscdO/sMwvKtgleZ1UUhCQ/UqX7v4P 9Q64nd19aRVPISbBhI2pvApOTLnZZT9ruwWr9Q3JhtQ/Y9VSlVyEEg41OmWErJdBGiS8Re JC4v3Zky9RrycpFk9cSfCSy7ujvvvKT9sWHJTDJWFcP840CXjE5aR7LEMwuvRZpZZypAPo jT087fcw/a9Xmlz3V6TSm77iTK7hEysfsnYwRhyVS1+NE1u/qRtmQXx+xyz2pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SBKzVRAUo59GPL3ZH78lebY7+nxqBJSk3HsM2i9K/5Y=; b=PiR7MpKT64H3QB3aayH4CIxvgb98Cl+DeTqntogr9tMUb7L4qXHbP2drwrWD/ZwEVk2Nrx jEe3fw0xMcmk08keUvLvZbDM3vuOpD3x1S271n+gUPoRLcnTmyXoTp/9fqxYnRZIAcmXRu qh5DqctBYRp8mlN2z/bBfSkKHMgTm0Hd77QSw4EHAiXVmd+BAX+PPfb/psrSGyrXejcQ5F s8ImXMiMc0e1JwD/FGefTmVFMM0QjpgfagLvuHRuCP1pffKvOJVXkLOdAHax/tvmr13jav WpWDQDjnMG4u/rGVFlbCblk5b1jOkT3JSzVoW6gEZ3aTAjMvSUqXYgUKOJ6FCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026839; a=rsa-sha256; cv=none; b=r2px3QmKlGr/9bFUCvEkg04ytwk+UuMYBufpr7tlmVmYjxJj+Pp4AzXQ+PWR4JwQ2/5BvG j97Jbk9TC6L2JtA1dnaAe0iLcFN1b5CQnHz61q9JLgTn3S/4BkkJBIwZbYEl5z3Thx2nI1 u3do6+wUtz7t7+yDOpyxfz8JcJ3+vUZnjId1QiDkCSa5JZDSRHk1nyvtT5CB0jNFnbF6Rf J46Ar4QKNB46xj21ZMjQ7JItquCIckSw8EsvJd2XPGcJqz9zu3U8LQkh2E41u4hbNdBJCh VcVsSK9IrJlGZpBFIaRqxLd9dybN6OLNauOdCtV5jfyZG5Z6qvk1V2bxnH/OBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGb0fWNz181l; Thu, 29 Jun 2023 08:20: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 35T8Kdma084567; Thu, 29 Jun 2023 08:20:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KdUr084566; Thu, 29 Jun 2023 08:20:39 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:39 GMT Message-Id: <202306290820.35T8KdUr084566@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: ac9d194f493f - stable/13 - linux(4): Guard linux_fork.h by _KERNEL for use by libsysdecode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: ac9d194f493f3cc3bf161bc8e42f6e359081171b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=ac9d194f493f3cc3bf161bc8e42f6e359081171b commit ac9d194f493f3cc3bf161bc8e42f6e359081171b Author: Dmitry Chagin AuthorDate: 2023-05-26 16:31:47 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:59 +0000 linux(4): Guard linux_fork.h by _KERNEL for use by libsysdecode Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40149 MFC after: 1 month (cherry picked from commit 3f1bfc136f8fb8c6a7c4dcccebd27962bc104670) --- sys/compat/linux/linux_fork.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linux/linux_fork.h b/sys/compat/linux/linux_fork.h index bdc201bce57e..2a6e2a158241 100644 --- a/sys/compat/linux/linux_fork.h +++ b/sys/compat/linux/linux_fork.h @@ -62,6 +62,7 @@ #define LINUX_CSIGNAL 0x000000ff +#if defined(_KERNEL) /* * User-space clone3 args layout. */ @@ -97,5 +98,6 @@ struct l_clone_args { int linux_set_upcall(struct thread *, register_t); int linux_set_cloned_tls(struct thread *, void *); void linux_thread_detach(struct thread *); +#endif /* defined(_KERNEL) */ #endif /* _LINUX_FORK_H_ */ From nobody Thu Jun 29 08:20: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 4QsBGc4ltjz4knkT; Thu, 29 Jun 2023 08:20: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 4QsBGc2Vj7z3vwb; Thu, 29 Jun 2023 08:20:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7IuetUPXilDlxmWBJHnagTywHU+Fkxa3WDXurYvmQk=; b=bmWB5LIodruKQHN43P+RpC81/p68TL3rifG/S+qiKVID1PaOJnMKic04eiUz0sccOsqLe/ upXBCgizlEMfLLD0tZaM2LmuhxGRSWYX3zNs510ACN/VBw70f6jJGOdbWxaJlGaJZgO/Ly FLm50KtGGPv1Pq6nZtNo4+2ietnULjE8wq31/ndNvhyW3rMCd/GuOAVpSfcL/UMh/Oc+hj 0BAWwitxe0bQ+qn2e9BpjgOQ2lgzCnHCl5Pi0PJhQUK6kmmi0Si/Ym0HEi8c0m34Arn8ZP aOieMs5Q6ebcNKb8jsws42UMDJKC/5N+JDj4cQqqyzBuSNULKrBrTMmGZpwC2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7IuetUPXilDlxmWBJHnagTywHU+Fkxa3WDXurYvmQk=; b=xBVoCADo5dlgX15Y+Be3f7AWQsXyg151AvpnyUGz2VuV9SwPPpgAA13tg1AR3Ak8LFx1yf j8+t2ZrGLtW+ufNiJtPU9RiAxk4nUduNhm/N5ClX5zR8FKWCoa/SONOWkiybER0T22wBfX Dre0gxYBrOcCLXdmh8uC/ysbefltAWOM/REN7Fa+ePUn9XLdjyla1M7LDReGD0listasQk MLN6EUPsXWsRbkaIuFrCZgLFEGfSEWFMMKvMQmTWrejv36121Z4IkoCdl5qqJ/vSjUkBFy SrmMGX+dC+3j09THxTmDkjB/93VPA7prpg7TvxCkmNJscYhpyGEy+7wOPC2GCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026840; a=rsa-sha256; cv=none; b=khC3gSPMzGYRFrxXsVqQbUMYjYPer/MnZz3t4FCbZiemqbOi+HN96x75mUvI5LUQx2IJzO INhakadUsO+dbWwZveIehGNHIxd3SKByBXLVpncOI6p6PJVgXWxB6nSmp4VReTfc3tAzdI vhr5oqP5GVl+YTZRLhUS41hQ/jnhTmCCexnTqZcEhSJAwAwVJbaDO47ODqYedflsGmhtdY I4DT0rhZGEfK2a/dyXhBWNNBpt0i1JlQQHA5O5nn4gAqNIfmncxvKfehIp1TRAA/eqHzAp R/WudeSwE1iCRDCWZ+fzPT5Y023dkJJFljv2X532r5e9o5g+qQFM3pFDQLvhVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGc1VLqz17gs; Thu, 29 Jun 2023 08:20: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 35T8KeiO084586; Thu, 29 Jun 2023 08:20:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KebC084585; Thu, 29 Jun 2023 08:20:40 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:40 GMT Message-Id: <202306290820.35T8KebC084585@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: a6ad662abfd9 - stable/13 - libsysdecode: Decode linux_clone syscall flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: a6ad662abfd92ee9eb6ce24b21192fef8cea5f70 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a6ad662abfd92ee9eb6ce24b21192fef8cea5f70 commit a6ad662abfd92ee9eb6ce24b21192fef8cea5f70 Author: Dmitry Chagin AuthorDate: 2023-05-26 16:32:20 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:00 +0000 libsysdecode: Decode linux_clone syscall flags Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40150 MFC after: 1 week (cherry picked from commit bd35e83bcf03a3650b5574f81201e8e55af4cdd7) --- lib/libsysdecode/linux.c | 18 ++++++++++++++++++ lib/libsysdecode/mklinuxtables | 1 + lib/libsysdecode/sysdecode.h | 1 + 3 files changed, 20 insertions(+) diff --git a/lib/libsysdecode/linux.c b/lib/libsysdecode/linux.c index 4b6aab478a33..44de91ef66cb 100644 --- a/lib/libsysdecode/linux.c +++ b/lib/libsysdecode/linux.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #define X(a,b) { a, #b }, @@ -240,3 +241,20 @@ sysdecode_linux_open_flags(FILE *fp, int flags, int *rem) *rem = val | mode; return (printed); } + +bool +sysdecode_linux_clone_flags(FILE *fp, int flags, int *rem) +{ + uintmax_t val; + bool printed; + int sig; + + sig = flags & LINUX_CSIGNAL; + if (sig != 0) + fprintf(fp, "(%s)", sysdecode_linux_signal(sig)); + val = (unsigned)flags & ~LINUX_CSIGNAL; + print_mask_part(fp, cloneflags, &val, &printed); + if (rem != NULL) + *rem = val; + return (printed); +} diff --git a/lib/libsysdecode/mklinuxtables b/lib/libsysdecode/mklinuxtables index eebdadd03613..70490321cc68 100644 --- a/lib/libsysdecode/mklinuxtables +++ b/lib/libsysdecode/mklinuxtables @@ -94,6 +94,7 @@ gen_table "clockflags" "LINUX_TIMER_[A-Z_]+[[:space:]]+0x[0-9]+" "compat gen_table "clockcpuids" "LINUX_CPUCLOCK_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_time.h" "_MASK|_MAX" gen_table "openflags" "LINUX_O_[A-Z_]+[[:space:]]+[0-9]+" "compat/linux/linux_file.h" "O_RDONLY|O_RDWR|O_WRONLY|O_ACCMODE" gen_table "sigprocmaskhow" "LINUX_SIG_[A-Z]+[[:space:]]+[0-9]+" "compat/linux/linux.h" +gen_table "cloneflags" "LINUX_CLONE_[A-Z_]+[[:space:]]+[[:alnum:]]+" "compat/linux/linux_fork.h" "LINUX_CLONE_LEGACY_FLAGS|LINUX_CLONE_CLEAR_SIGHAND|LINUX_CLONE_INTO_CGROUP|LINUX_CLONE_NEWTIME" # Generate a .depend file for our output file if [ -n "$output_file" ]; then diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index 4ea2989ca185..15bc404dc986 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -144,6 +144,7 @@ bool sysdecode_shmflags(FILE *_fp, int _flags, int *_rem); bool sysdecode_linux_atflags(FILE *_fp, int _flag, int *_rem); void sysdecode_linux_clockid(FILE *_fp, clockid_t _which); bool sysdecode_linux_clock_flags(FILE *_fp, int _flags, int *_rem); +bool sysdecode_linux_clone_flags(FILE *_fp, int _flags, int *_rem); bool sysdecode_linux_open_flags(FILE *_fp, int _flags, int *_rem); const char *sysdecode_linux_signal(int _sig); const char *sysdecode_linux_sigprocmask_how(int _how); From nobody Thu Jun 29 08:20: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 4QsBGd4J3cz4kp0c; Thu, 29 Jun 2023 08:20: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 4QsBGd3Ls7z3w4Z; Thu, 29 Jun 2023 08:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QUmn4/4lFKiI8iazS0oBYDhpRzs+K/YXs5J6Bbv5VHY=; b=xqxmrzIdsXvOF7RiP22QGqobAQ7uCOkeoN0y2H/IGx4YgHzFbQNWJTXHDonnha2lCMPN4X C/+uGbDFmhaU8IWUpIgZHD6UkXSyCEy2v1HYYCR47kJS4MOUj0O6ko8ePKzu289f0c8KVr uPPPj2zQF76OvAXcnLA7280cas3Rfq7PrFx6yVPO5vYvjKuOzbyi2sUcAGAvqSJoeGyyoA VwdEqUskGV2itLMiQwk9sIJBHxcX4UJJOA/HZVHuMyxkoi1UCSayLTSU2ri1D8faZ6Z7qe fGuCsptKKC0dBhGWHDRScqDzmCCOSuwk2Skby0HeTU9FlrAiIS1DXK1cRq/Lcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QUmn4/4lFKiI8iazS0oBYDhpRzs+K/YXs5J6Bbv5VHY=; b=GWCCQgQJtQnscCdtjls1P3Yyt9JUkDEcjkelLijJ22mRpYHC/1yaqrwTmO/zk6KXgxiP97 dDhjPBnvXM+sozkCEwTSUG0Y+dqQJ9XnbDQx0osAK4QtFm6V9kgcJE2HQnmojaBX7wIzyG tbFBBMocRndl1MNNwyzhbEgbVa6/Jl9/qvv3XQ36TLCdA2jF66Dxz5WA1VJ2Sa3wve/XQI mKtixF67NHK84ZKPMF0TyC3zwpjsoQwiPuTWbwQ3kZHO+evm5+bGuUa3/P1epQB4Y2v8B6 4CdOU7Htt5acflHbr5bZqFoKMOMZjC2lumOVpjdkl9KR4sSwAUiO/CEUPDs2LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026841; a=rsa-sha256; cv=none; b=g5JwcERnICEqUcd2WGL+Yg+c9IaP24L2EdIPpS3h4FkGxoOm0d4YOFNP1U2y95sWisvbWl a22sWffBivSdVJd8g1ogO8ixY23KpRKWHAysQ09XR2pZq6YIYTvczqC8nErLBAS5NjCblo 6N19AXmHX+1JOkM2CFR9mmcSW9MQQvDQ99I6obDvJzXAni/AwGmIhhS/EOwSY14nM6Uz7Q hW/tLht3bnQ4BDMtvIzi7hiZ3VuEzbOF/WxEA4h5+c2jM8Qvy+pX9hY2Sk/XFFxYgJ3puw Df+Ls2dLG81r7C/rXolIaEsrwrpmqtj9LE8TLHXBA5lMwCNTuW+ne0deMZmi2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGd2PMwz185N; Thu, 29 Jun 2023 08:20: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 35T8KfRL084611; Thu, 29 Jun 2023 08:20:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8Kf0r084610; Thu, 29 Jun 2023 08:20:41 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:41 GMT Message-Id: <202306290820.35T8Kf0r084610@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: 5b81d9f7f02e - stable/13 - kdump: Decode linux_clone syscall flags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 5b81d9f7f02ef91a8708fd9502d9bc2d3371638a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5b81d9f7f02ef91a8708fd9502d9bc2d3371638a commit 5b81d9f7f02ef91a8708fd9502d9bc2d3371638a Author: Dmitry Chagin AuthorDate: 2023-05-26 16:34:33 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:00 +0000 kdump: Decode linux_clone syscall flags Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40151 MFC after: 1 week (cherry picked from commit 829f3d7d2640490ea3dc4180aa96041f440fd743) --- usr.bin/kdump/linux.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/usr.bin/kdump/linux.c b/usr.bin/kdump/linux.c index 109f7b84e622..57f89f9e2faf 100644 --- a/usr.bin/kdump/linux.c +++ b/usr.bin/kdump/linux.c @@ -192,6 +192,13 @@ ktrsyscall_linux(struct ktr_syscall *ktr, register_t **resip, ip++; narg--; break; + case LINUX_SYS_linux_clone: + putchar('('); + print_mask_arg(sysdecode_linux_clone_flags, *ip); + ip++; + narg--; + c = ','; + break; case LINUX_SYS_linux_kill: case LINUX_SYS_linux_tkill: case LINUX_SYS_linux_rt_sigqueueinfo: @@ -394,6 +401,13 @@ ktrsyscall_linux32(struct ktr_syscall *ktr, register_t **resip, ip++; narg--; break; + case LINUX32_SYS_linux_clone: + putchar('('); + print_mask_arg(sysdecode_linux_clone_flags, *ip); + ip++; + narg--; + c = ','; + break; case LINUX32_SYS_linux_kill: case LINUX32_SYS_linux_tkill: case LINUX32_SYS_linux_rt_sigqueueinfo: From nobody Thu Jun 29 08:20: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 4QsBGf5ZYvz4knvX; Thu, 29 Jun 2023 08:20: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 4QsBGf4LsBz3w58; Thu, 29 Jun 2023 08:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uzabykX2n+qOJR5r6koFgoOSaL50ezX2b5I+/PWhCCI=; b=EDZJ5lRxD8GTlFtNgkMNBlDnJMf0nZi6tF12VDT9EnJFgHq/5i41hKg/Y7LUNj6OXBk7Ps 8wK+ccUGLLR+ttRqE9YY7jomvojjOP/COx3MiFai+nXOr6P2GlUMbMyS0CuwqiEO2Gi+gT rrzBCpB8HmHGmt4yQFYtopBDhGoMOWb6mov+fgYWD3Iv7vAEdVXsgKOAunwN4RZNzyJcZK n4MzjkL7bq8DfOI80kcWTXOadoJfatDerLoZIsaip/QJKD4GNur5UTqr1CuB0Rt+aqxypi olRYboyA5jJLxY0edzoKOib9yYY0CmK9yGReqdt7kCQVPJfzEna3CRhDQHxvyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uzabykX2n+qOJR5r6koFgoOSaL50ezX2b5I+/PWhCCI=; b=hNXchIhypk40yPd6VCrOYuhYZmYjnOfWgkOuKdYPSy9aZv7o0WZhy2ksOpm85lksx/4th3 n8D7BW+mKvMEXr2xBX+9aldzy1zSAmg+k2WnKXM4fVNiHkA/FgodfKbIOi9IlcE2wdxYrl flOtiA0WSJvkk+gjpp8fJMsg7rG+fuYaQWxhYscQCHLqQjASV+kQoDa6CFcNvEyr4Qjk+L UOhUl1L5S+kO75XqxRh7L49bwrX843pdmuGeiIV9TOez3c/rPsjOHBrcVvZUa1+Z5BDLYn /JFzIWArYuiEJtIORbm0ccuZVa02RXGMn4o23fl5u8C+ydv7mpi4phQm4jxGjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026842; a=rsa-sha256; cv=none; b=saEZ9r5xp8UX/3PPbdbAtTIBn1+AHMuRXP1GQGsFGg00J0wuDsiHjqd5zYaV1EQThtzukA Xd0hisr7qO+GXR5uwOwKNed73ecqn4kHIhql8x90AcktxLBsMb+vqzFRdP52/8myYjYSg7 N3TylWFSXZ79Y+A3TggDP0tyYbiE3KRqVtOH6oKQmCu7kkD+edTh6/jpt2tX2P+fUPo01w GnFGjCj0e3aP1vyHI9qgGofi3b6iN9i5LdQRez++8TivNbqKRbzyTefzGASoBMGDpeAf5k J1Oxkq8nCVULdn3RaUfCwnVxJtvDGGTrcK/jXfM0KhQl68cuOG58qpsSi4Qvlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGf3FjYz17sm; Thu, 29 Jun 2023 08:20: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 35T8KgKI084630; Thu, 29 Jun 2023 08:20:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KgMq084629; Thu, 29 Jun 2023 08:20:42 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:42 GMT Message-Id: <202306290820.35T8KgMq084629@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: 8bfdf839270b - stable/13 - kdump: Add a facility to print numbers in decimal format always List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 8bfdf839270b3c9be013ec4b51ef8fdc1fe80636 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=8bfdf839270b3c9be013ec4b51ef8fdc1fe80636 commit 8bfdf839270b3c9be013ec4b51ef8fdc1fe80636 Author: Dmitry Chagin AuthorDate: 2023-05-26 16:35:08 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:00 +0000 kdump: Add a facility to print numbers in decimal format always To help grepping kdump output by pid or tid it makes sence to print some numbers in decimal format always. Eg, process or thread identifier at least, as they already printed in decimal format. Switch to print pid/tid arguments of some Linux signal related syscalls in decimal format. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D40099 MFC after: 1 week (cherry picked from commit c2c9ac88c2bb62423ae91beeee4083b596922adc) --- usr.bin/kdump/kdump.h | 13 +++++++++---- usr.bin/kdump/linux.c | 12 ++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/usr.bin/kdump/kdump.h b/usr.bin/kdump/kdump.h index f5b9b85f9779..1d3e9be2b6e0 100644 --- a/usr.bin/kdump/kdump.h +++ b/usr.bin/kdump/kdump.h @@ -34,7 +34,7 @@ extern bool decimal, fancy, resolv; -#define print_number64(first,i,n,c) do { \ +#define _print_number64(first,i,n,c,d) do { \ uint64_t __v; \ \ if (quad_align && (((ptrdiff_t)((i) - (first))) & 1) == 1) { \ @@ -46,7 +46,7 @@ extern bool decimal, fancy, resolv; ((uint64_t)(uint32_t)(i)[1]) << 32; \ else \ __v = (uint64_t)*(i); \ - if (decimal) \ + if (d) \ printf("%c%jd", (c), (intmax_t)__v); \ else \ printf("%c%#jx", (c), (uintmax_t)__v); \ @@ -55,8 +55,8 @@ extern bool decimal, fancy, resolv; (c) = ','; \ } while (0) -#define print_number(i,n,c) do { \ - if (decimal) \ +#define _print_number(i,n,c,d) do { \ + if (d) \ printf("%c%jd", c, (intmax_t)*i); \ else \ printf("%c%#jx", c, (uintmax_t)(u_register_t)*i); \ @@ -65,6 +65,11 @@ extern bool decimal, fancy, resolv; c = ','; \ } while (0) +#define print_number(i,n,c) _print_number(i,n,c,decimal) +#define print_decimal_number(i,n,c) _print_number(i,n,c,true) +#define print_number64(first,i,n,c) _print_number64(first,i,n,c,decimal) +#define print_decimal_number64(first,i,n,c) _print_number64(first,i,n,c,true) + void decode_filemode(int value); void print_integer_arg(const char *(*decoder)(int), int value); void print_integer_arg_valid(const char *(*decoder)(int), int value); diff --git a/usr.bin/kdump/linux.c b/usr.bin/kdump/linux.c index 57f89f9e2faf..df400f554c23 100644 --- a/usr.bin/kdump/linux.c +++ b/usr.bin/kdump/linux.c @@ -202,7 +202,7 @@ ktrsyscall_linux(struct ktr_syscall *ktr, register_t **resip, case LINUX_SYS_linux_kill: case LINUX_SYS_linux_tkill: case LINUX_SYS_linux_rt_sigqueueinfo: - print_number(ip, narg, c); + print_decimal_number(ip, narg, c); putchar(','); print_linux_signal(*ip); ip++; @@ -210,8 +210,8 @@ ktrsyscall_linux(struct ktr_syscall *ktr, register_t **resip, break; case LINUX_SYS_linux_tgkill: case LINUX_SYS_linux_rt_tgsigqueueinfo: - print_number(ip, narg, c); - print_number(ip, narg, c); + print_decimal_number(ip, narg, c); + print_decimal_number(ip, narg, c); putchar(','); print_linux_signal(*ip); ip++; @@ -411,7 +411,7 @@ ktrsyscall_linux32(struct ktr_syscall *ktr, register_t **resip, case LINUX32_SYS_linux_kill: case LINUX32_SYS_linux_tkill: case LINUX32_SYS_linux_rt_sigqueueinfo: - print_number(ip, narg, c); + print_decimal_number(ip, narg, c); putchar(','); print_linux_signal(*ip); ip++; @@ -419,8 +419,8 @@ ktrsyscall_linux32(struct ktr_syscall *ktr, register_t **resip, break; case LINUX32_SYS_linux_tgkill: case LINUX32_SYS_linux_rt_tgsigqueueinfo: - print_number(ip, narg, c); - print_number(ip, narg, c); + print_decimal_number(ip, narg, c); + print_decimal_number(ip, narg, c); putchar(','); print_linux_signal(*ip); ip++; From nobody Thu Jun 29 08:20: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 4QsBGh2tj9z4knkj; Thu, 29 Jun 2023 08:20: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 4QsBGg5jtYz3w0y; Thu, 29 Jun 2023 08:20:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rMVeiHLnpYjWr1tAUg0EzvD1Wv0poQPEscQfj2hMT1o=; b=oREiaIgWoFOvYU90HCSpO9FNWO8oFWiQCSRGez0nn/hBoKiSc0u8tJUqZiiH9Tyt8gyx62 Ffhqdy0vuQjVl5iYzzWV0ieEYuSTrw9kZZ9UzBRsJhuj28zMptRekgP48iGaDWLGZgBTb2 frRO3UwJORO5YOwXHGuEvH7c213An1w9RLeblqjyg9S4RKkbd2zGZDTlC6fOKX/TA46/CZ 8GcHbq2A34qN86DJDmFhiGDIpR6YrMPDXWQLnFA41HYNP0FggAgNqcUse9+PmI0uqqrLjm UJNmNcn6L1Fx+McWJHzP4W3VkPkX2jCzTpL3QGkzxriU2dXT9P9TkoIL9nX6Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rMVeiHLnpYjWr1tAUg0EzvD1Wv0poQPEscQfj2hMT1o=; b=sGqA0aVGAE/r+tR+SQ600SlRVJ4R/LWHEIqLa2/Ds+izJCjU9zFtOH/gPQvS6574EvJVM5 m4uyDu2c6Ujy4SFY0rQ55qFqXTP9NN3fNwmKVm5LGaEVQvmhS1WhEzHE7xWl4M4s/U+6Hg ++CV5cTs4UC6bC9B707NIFb6GNiypHr59KtN4XojrBURPCjAtMf0SUgCke30cyx/vmYc2B CM1w2R1S6fGA39j36QFIyytvUm2FrCNREdroFZHzOTGIkaaDeJyCyz6ABxJxEA3GHBDDQb fWcWRDFTKmYUJ47tDDy7TSusDBKOrU3gBgmfB5UxwHsMpvHTulXeCYu4RQt1LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026843; a=rsa-sha256; cv=none; b=vK0cQ4pdW7T50BTkRIJNczc+Km0amOK85/jJYxyveCCsBoTXE7PXAnotNyKTefNDJtsKyw 5gHODxoYg3qsFxDGGbr7XMeXnwh9g+DA2ttzny1O2mTaYuE3+0e3u60/zmeGRatXfuRohp NvnC1TxN7xV8pvWvq2if98FpA5knnSHvwUGk+20Z0NyGHrbD5YLuTntVAkohqk8ElYAcsv U7dzLlps33+3SoB+LNhrb1M4HC37aVVOrpT+LQk0ch2LISS7SZinDKVbQBgBn6xn3Ba8M4 rT0Ogm6c9f57QbVaLRDisgJu87Hn3ZJBXTn3I7nMdh3TAzJjTlEN9OZA0Hi7sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGg48v3z17sp; Thu, 29 Jun 2023 08:20: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 35T8KhcO084649; Thu, 29 Jun 2023 08:20:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8Kh1Y084648; Thu, 29 Jun 2023 08:20:43 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:43 GMT Message-Id: <202306290820.35T8Kh1Y084648@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: d56be4992dc7 - stable/13 - linux(4): Drop a weird comment from linux_set_syscall_retval 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d56be4992dc753bc08c10223996501be46aceb64 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d56be4992dc753bc08c10223996501be46aceb64 commit d56be4992dc753bc08c10223996501be46aceb64 Author: Dmitry Chagin AuthorDate: 2023-05-28 14:05:44 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:01 +0000 linux(4): Drop a weird comment from linux_set_syscall_retval on amd64 I agree, it would be great to avoid PCB_FULL_IRET, however we should follow Linux system call ABI. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40152 MFC after: 1 month (cherry picked from commit a99b890ecd26131e0c91e5693b55f5700c40a847) --- sys/amd64/linux/linux_sysvec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 5e7bc96d0148..f43e7d3a02bc 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -191,9 +191,6 @@ linux_set_syscall_retval(struct thread *td, int error) * and %r11 values are not preserved across the syscall. * Require full context restore to get all registers except * those two restored at return to usermode. - * - * XXX: Would be great to be able to avoid PCB_FULL_IRET - * for the error == 0 case. */ set_pcb_flags(td->td_pcb, PCB_FULL_IRET); } From nobody Thu Jun 29 08:20: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 4QsBGj0r6Jz4knvd; Thu, 29 Jun 2023 08:20: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 4QsBGh5ymMz3w16; Thu, 29 Jun 2023 08:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewWEfFn2eid9Dq9seBvcIX8cOHBpSA3i8XWQD7GyqE0=; b=YvUQGHp+i7FlJoavRtS4pVijENuiw6xtaLoQsLSvzZyqjlxl7g3olmfPMz0tyPcRJNgDot WZ7QAoze5FeHTFBadrk5+Fu8aDTxWIExx/74U+ZCwpniuySxNW4oI8m/hBLeNzstC7eChT RM/vJCyBBoz+F3U49U08eS0Ee11ZjYVoViPp3c3k3U2JjcSSrgdnCDPqZdCVU5M3kga3ZJ 0Im4uEs0uYzvGLGpdzry4XqlVncqU5I0jIU7UJQxz5FW0QnshTMBr72gMrld/jXglBzhgL /FJTXwbP2qo7Y7EY/WiVt/WTgBvj1LjftdaPqT67Wzi0EJu/e0QIUKX966UWoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ewWEfFn2eid9Dq9seBvcIX8cOHBpSA3i8XWQD7GyqE0=; b=YbWFzbkKSNwdV97VnTHi8A1qfewqfvq32KtLdo3mQXwImqTtllzxvR1v6SBg+YFuZcEugo sSblCrjB3hjB5hHRCTMEvbArX4Sq6tox07Cz3GSDhrRxQiy85+5p3/UHlB+N8i/Nzl6AHF DNLqOfkvncvOAxTDUNEpJ4LBGrxFNQ+YzqXfqAbphzelZiz+Cqi8tzw/Y6T2N3z5uuHVCK S0ZsCpTJIot516H7Iz7UiWek+W6668ODySyydap+tmTw9aN8IVKYJh1gghKhMlZVkCrpWA D8oqRG6VZj2lBjhP3EljnNNNFg5HdoMa/SxvGnpWx3q8hxX7m9mAdKMe4odLow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026844; a=rsa-sha256; cv=none; b=NeNCJQStzAZH/JCZP4u1Z9+MnD8nT4UDOryphkYB6jjxlFHoV1SvQuafv9GPtsc4rpu4E8 8/yB6khe+Jdwej4p7QM37ncYR89v4HSYDbXR4cu8hyi7vlZWY99aPoSqia6YHjkJqnZxPF Ew9A6bRixyQ7koZVNsBN+oxWEYphBumvjKeQfRpMc8TEWsipyG/RWBFBzfA3h2ZGdO8oKO ow1jiH+nztLEYz5aGvxYbsnvUTa1fSDvoSYGWssyW8DkDM5EPirPGokmIZzFKDL0mxXX9j uoBapWdLvdeZFEjI/LrsIuHSPnvWT/J7wjyqkGAnlYmz6jjVhXvyV8Ea1ggTcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGh54lQz17q8; Thu, 29 Jun 2023 08:20: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 35T8KiGU084668; Thu, 29 Jun 2023 08:20:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KiTM084667; Thu, 29 Jun 2023 08:20:44 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:44 GMT Message-Id: <202306290820.35T8KiTM084667@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: d0117d06e9e3 - stable/13 - linux(4): Add a comment explaining registers at syscall entry point 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d0117d06e9e3588a902119b7a011c3613ef4545c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d0117d06e9e3588a902119b7a011c3613ef4545c commit d0117d06e9e3588a902119b7a011c3613ef4545c Author: Dmitry Chagin AuthorDate: 2023-05-28 14:06:05 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:01 +0000 linux(4): Add a comment explaining registers at syscall entry point on amd64 Differential Revision: https://reviews.freebsd.org/D40153 MFC after: 1 month (cherry picked from commit a463dd810851fdae5efcb8f8205d742ebf221bc8) --- sys/amd64/linux/linux_sysvec.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index f43e7d3a02bc..3681dc881485 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -124,6 +124,23 @@ LINUX_VDSO_SYM_INTPTR(kern_timekeep_base); LINUX_VDSO_SYM_INTPTR(kern_tsc_selector); LINUX_VDSO_SYM_INTPTR(kern_cpu_selector); +/* + * According to the Intel x86 ISA 64-bit syscall + * saves %rip to %rcx and rflags to %r11. Registers on syscall entry: + * %rax system call number + * %rcx return address + * %r11 saved rflags + * %rdi arg1 + * %rsi arg2 + * %rdx arg3 + * %r10 arg4 + * %r8 arg5 + * %r9 arg6 + * + * Then FreeBSD fast_syscall() move registers: + * %rcx -> trapframe.tf_rip + * %r10 -> trapframe.tf_rcx + */ static int linux_fetch_syscall_args(struct thread *td) { From nobody Thu Jun 29 08:20: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 4QsBGk0XlWz4knf2; Thu, 29 Jun 2023 08:20: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 4QsBGj6vDFz3wJk; Thu, 29 Jun 2023 08:20:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Yx/hVHcc/HDaZe0CcUc3dEWtJjwwNJq2MwSzqGMH5E=; b=YlYvJgXxvzOzNtpMLN+XXgpFsSzep+BtL6aF427l3w58YmLEaogG2zf8Bk6VvRCydIPoyZ uBXOOG1QFqRIilsz79uC0JTfa1D9kq4if1H8sKveRQkO567rjjQ/3D54pcBC8EBOie+U1F k8IvP7Dwkch4VCRYa0U4c1+vP9ehf32veZIpa+W5yV75HrRHaknt39U5vT1UX9G0/4P6FI X/gv/wgG5l3sV4lQuVl25ZiSjkkUBFVjoR2Ibr8yxFE3PZVn4ANvSDmL5+oxHFwgORJV/i jqD/svwo0/wRCTjdHyjXFiNWg6gGp0yLa7NGT1N0cbK9utHxBW1bM7q4FUNDeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Yx/hVHcc/HDaZe0CcUc3dEWtJjwwNJq2MwSzqGMH5E=; b=HNQhcsJDxZMwEjsPs4bCXgEpf+kh6Pb0IPqVbaSAWwffefB1nytRw0cyQoml+T4UXi2zZc nVWPGX4EihpKet8bWFYl0E/F+sYFxdmYh934Xnn/Rll8AsI28+xDB9wAu0DTJXLksAc08V fNu1av7ZxCKhHGcyHY4tm3hlJFRjqEQRuPV9pSiyZbioR9uSWBOuKfUuLZoz4JWEwHyh+E Z6s5dmyYTlrV+Nk1Ktsm18e/j4IxtWn8zFTxuHLX7+3yJ1fo70oU8CUg/5s+qIM4G8vrkV F/YSXfl3UPv4X5WObW8iqnYieUBsTh9y1xxHMvkTqbeh5tkI3NIUjvVOkxbObg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026846; a=rsa-sha256; cv=none; b=JxwvQnoSS8A3F2Uc4wECbdmA1PFd3NSGk+335ZUpfscLEaAMFjAecXVOAFlftg53biIAaw lHIruQn33FmAFyWrL1Fo42JUKYB9CgEsupgKPjgB5kBcAlRZq4Q7104DjNLNyIYfzra9th 5rjO2fUz5R7QhneI8R5fHzaNSgs3AGDltke59hQCEE2/T+JJiMeY9LU88lf9T+5kG0zP9w PDqqt6FPq5ZkKuOwzEhKqaVkUwJ0i7pDWP/R+oeSwAKzhNn51qJZNu7E+ACfXhg+MlDH/w VAkrP4cbOgvRZieQd+wsHO40EHNQ2lw3s3Q8Xqgclmx/CAhmYFY24Fb9pAdO+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 4QsBGj5pCTz17q9; Thu, 29 Jun 2023 08:20: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 35T8KjQi085284; Thu, 29 Jun 2023 08:20:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KjCs085269; Thu, 29 Jun 2023 08:20:45 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:45 GMT Message-Id: <202306290820.35T8KjCs085269@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: 053cbecd29f8 - stable/13 - linux(4): Simplify %r10 restoring 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 053cbecd29f8f167628f5316d064557323af6ee8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=053cbecd29f8f167628f5316d064557323af6ee8 commit 053cbecd29f8f167628f5316d064557323af6ee8 Author: Dmitry Chagin AuthorDate: 2023-05-28 14:06:23 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:01 +0000 linux(4): Simplify %r10 restoring on amd64 Restore %r10 at system call entry to avoid doing this multiply times. Differential Revision: https://reviews.freebsd.org/D40154 MFC after: 1 month (cherry picked from commit 185bd9fa3096595350ebe7bcd7e0ddcf17773030) --- sys/amd64/linux/linux_machdep.c | 6 ------ sys/amd64/linux/linux_sysvec.c | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index 6ac0ab0cd3d7..155ea918cd0a 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -350,12 +350,6 @@ linux_ptrace_getregs_machdep(struct thread *td, pid_t pid, linux_msg(td, "PT_LWPINFO failed with error %d", error); return (error); } - if ((lwpinfo.pl_flags & PL_FLAG_SCE) != 0) { - /* - * Undo the mangling done in exception.S:fast_syscall_common(). - */ - l_regset->r10 = l_regset->rcx; - } if ((lwpinfo.pl_flags & (PL_FLAG_SCE | PL_FLAG_SCX)) != 0) { /* * In Linux, the syscall number - passed to the syscall diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 3681dc881485..fea1e274ac95 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -166,6 +166,9 @@ linux_fetch_syscall_args(struct thread *td) else sa->callp = &p->p_sysent->sv_table[sa->code]; + /* Restore r10 earlier to avoid doing this multiply times. */ + frame->tf_r10 = frame->tf_rcx; + td->td_retval[0] = 0; return (0); } @@ -180,7 +183,6 @@ linux_set_syscall_retval(struct thread *td, int error) switch (error) { case 0: frame->tf_rax = td->td_retval[0]; - frame->tf_r10 = frame->tf_rcx; break; case ERESTART: @@ -191,7 +193,6 @@ linux_set_syscall_retval(struct thread *td, int error) * */ frame->tf_rip -= frame->tf_err; - frame->tf_r10 = frame->tf_rcx; break; case EJUSTRETURN: @@ -199,7 +200,6 @@ linux_set_syscall_retval(struct thread *td, int error) default: frame->tf_rax = bsd_to_linux_errno(error); - frame->tf_r10 = frame->tf_rcx; break; } From nobody Thu Jun 29 08:20: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 4QsBGl2vsZz4knsl; Thu, 29 Jun 2023 08:20: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 4QsBGl05pLz3w3s; Thu, 29 Jun 2023 08:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LVEOLmii+PN6j20OycVOLtWt68pXHfG0dFWkXNTwTUM=; b=jnPe2HvvOuf+kUGwZOCmIhmBRmL4lZZ76WfpF0tXqWnQgUKt13QMu6GpvwUs0DO44ZQhYC dHFMH83dMmIm275NKPv8kZGmf2TcV+LWARw2FV+mIDxNoRxmF4c/uq/pq/aAW940nLGUhr 8bgxk+aWw3zBMwQuvSlyFGEsqjDhbtK3p0sEOvhdDm4vQHzDcfKIQidgXpCTwu3RqiuMvm M+KxY6Ws6l0gy+lC14nkobyOeavlEnom+M/k5oKxV+klYwOC3DPplkTmDp1i1J6SmZ/SX6 PV3nHtDI/0KyCrN8ckobhWIhsyLEFnc1Oy3+3MJyLhIvnd/gpexlwD9GQ+np9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LVEOLmii+PN6j20OycVOLtWt68pXHfG0dFWkXNTwTUM=; b=X1aU2x0lX5bbB6p1hev7Wj7o7iumP1a0csUMEX5M7+VXWEWpwAsqqBD6nfls6r82/JPz4Z tF9qTR8XKE72/5AinPx1UXNcAIhyEODRchd3OrNe6xxb5zG/36AGRM52RW3Z4cq4jTXFrG gMnrEVPF8zSWOuEZLQyB4G1+q6NmQ5GmjvXEYUhAjR13YQSaQfazfH4JjmltDH3Jmtlx+N mhu7/ciu5zZJDUw/CTtqApK9VMUBFggu2ZwknFFYwg6EiBUHQkWtMtArirN9z/PEydXUHc hiw0dg1R5LX+2/LKpX7dHLlQo3C1JSo4ii25WssKYneXZiYxKxcchf8IB7+S1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026847; a=rsa-sha256; cv=none; b=qqhtP+wr8Af8lL7BMY14U6HJ4j/KqaoTJv6xf3Ar6Kxc3az8Ni86GcQE6SL6gvJGjx3Ckj cs+epHYDf0zGcnu++36nmKGlkejkU0Jb/TibdWQLzhnn7yqolsuPBfXL5ne5FOfBS/2Y/D lG73DdNPIY87bD4tIZgasR0boWigY1H7Z8jpIhNsqdpFZw3dyBxBfGwDH8w7tcz2e7TF5/ iujyBul719EssijIHbIC2p5iieojMEuYu+xlDS78+ZO9JJAQs+iuiT5z77wVEAjAOmW/6m 6HMWDfGRN46/xUNl71hNEumVFh3FFmUOrwzIRP5IZ/jW2C7lbTJH26LmviTUzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGk6Gs0z17NW; Thu, 29 Jun 2023 08:20: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 35T8Kk9w085708; Thu, 29 Jun 2023 08:20:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KkAV085707; Thu, 29 Jun 2023 08:20:46 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:46 GMT Message-Id: <202306290820.35T8KkAV085707@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: fa3d164dd9ef - stable/13 - linux(4): Preserve %rcx (return address) like a Linux do List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: fa3d164dd9ef6fadac6ed4f747ffb09657c5ae76 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3d164dd9ef6fadac6ed4f747ffb09657c5ae76 commit fa3d164dd9ef6fadac6ed4f747ffb09657c5ae76 Author: Dmitry Chagin AuthorDate: 2023-05-28 14:06:47 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:02 +0000 linux(4): Preserve %rcx (return address) like a Linux do Perhaps, this does not makes much sense as destroyng %rcx declared by the x86_64 Linux syscall ABI. However,: a) if we get a signal while we are in the kernel, we should restore tf_rcx when preparing machine context for signal handlers. b) the Linux world is strange, someone can depend on %rcx value after syscall, something like go. Differential Revision: https://reviews.freebsd.org/D40155 MFC after: 1 month (cherry picked from commit 037b60fb0fbcb2dd6b6cbb632b05a2939ff4ff29) --- sys/amd64/linux/linux_sysvec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index fea1e274ac95..53eda1cbc7c0 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -168,6 +168,8 @@ linux_fetch_syscall_args(struct thread *td) /* Restore r10 earlier to avoid doing this multiply times. */ frame->tf_r10 = frame->tf_rcx; + /* Restore %rcx for machine context. */ + frame->tf_rcx = frame->tf_rip; td->td_retval[0] = 0; return (0); From nobody Thu Jun 29 08:20: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 4QsBGm4xLRz4kp13; Thu, 29 Jun 2023 08:20:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QsBGm2KLdz3wKK; Thu, 29 Jun 2023 08:20:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8jW/0WaCCD0J68carQC8I7SBeg7LAqG5PbLqvMBS1hI=; b=qFxH3+aXVeB2Fe+h2/rCQnIUViKOFixVIeSFEPl0jc8yGuL6t5x0intB2O+GJbH166Nxr2 ug/E4AIFiIdTnVk2lcULc/tWJE9ldCsUXwDLVvVJBL1pv6F7guRwnwKZHpBG6e18zqlYMk cXteuggBzFQ5Hi7zc7/4irkLA78XBMmfVE70+HlwwEY1UwC1JVwsvv0LKclkO4q/jjbEbX ZmebW/U4OGa0FMQZyiyf/rq3SQWek/f+4dRCc2ecbw28eiqTmqQvCkdVWnclV0t+ijVzI8 YUkY0TYzH27QLvsXrXatbRbf/LspNc/b8n5qCHR10h1AozL3657nqkcvHyF6pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8jW/0WaCCD0J68carQC8I7SBeg7LAqG5PbLqvMBS1hI=; b=MA4twU5/a+V6ut0zFOLSBQh5Owqac1ALdGcoAH5DWjbPvtK4SJem2CLmEmXmuP+op1ykAz 8DSsfN8vy8mwkrsiI/rJXqHbACQ6FAqhbquZl/M0LVOldjhZ/EdHIW/i/lJe2VKUKhy9Yz WzuW4CEI3BE/pq1seeYpQNYDdfoNEFQVN4D5RI+HUawiMZJbz7GishWgxXTu63mM4e8ZBb 4fVbQ1HpxMJ+GtF+uhaF7PqcZkp3sUPEBQy1kA8iHgF1SmXqd+7gGmRjAFf/n7awi0ylRl mo2GrnH0Gkh67boHrgLau+RVevRUGVfvdnT5UbMqr1I7O/cJu6fsd2LiWZotXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026848; a=rsa-sha256; cv=none; b=CD/G/wovp94bI9qH9F00FbxZd+UfK09cCKfIV6K/tQfsltf4nTlmboFphlv2MWxekzeUDB ej72rs6px5gY14f8Q2rJJ4Rvvux2RmzAemSsCRLsuksuuW4QYfkk6Em4NI8pkM/61WEysT IUCTnojb91M6czzk26L1EgpKJYVulX7n8dPNTFva2Gca6qsXynXkFAQNwCmSjaHs/+vuM3 Oq/yEChVx/VhdIPWQzKc34s0PQk1QcpKGw5cCU7bKiYleH25Wszq0VIsuwJBY4b1SzWyp0 RwU+PMqJM1M8rJUKo/Um2Z5byO/X7H42BLeAmZERYERWZQ70MFKpyKhb/ZGMkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGm04Ytz17NX; Thu, 29 Jun 2023 08:20: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 35T8KlbD085727; Thu, 29 Jun 2023 08:20:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8Kl69085726; Thu, 29 Jun 2023 08:20:47 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:47 GMT Message-Id: <202306290820.35T8Kl69085726@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: 2df4032d7e8c - stable/13 - linux(4): Fix stack unwinding across signal frame on x86_64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 2df4032d7e8c5bdd2a0f498771787fae6b358811 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=2df4032d7e8c5bdd2a0f498771787fae6b358811 commit 2df4032d7e8c5bdd2a0f498771787fae6b358811 Author: Dmitry Chagin AuthorDate: 2023-05-28 14:07:28 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:02 +0000 linux(4): Fix stack unwinding across signal frame on x86_64 Get rid of using register numbers which is undefined in libunwind on x86_64. Differential Revision: https://reviews.freebsd.org/D40156 MFC after: 1 month (cherry picked from commit 78c2e58fa5b0aa4518d79d8155c0513b9a04f531) --- sys/amd64/linux/linux_locore.asm | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/amd64/linux/linux_locore.asm b/sys/amd64/linux/linux_locore.asm index f26996980007..2d7dff839b6f 100644 --- a/sys/amd64/linux/linux_locore.asm +++ b/sys/amd64/linux/linux_locore.asm @@ -60,8 +60,6 @@ ENTRY(linux_rt_sigcode) .cfi_offset %rax, L_SC_RAX .cfi_offset %rcx, L_SC_RCX .cfi_offset %rip, L_SC_RIP - .cfi_offset 49, L_SC_RFLAGS - .cfi_offset %cs, L_SC_CS .cfi_offset %rsp, L_SC_RSP movq %rsp, %rbx /* rt_sigframe for rt_sigreturn */ From nobody Thu Jun 29 08:20: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 4QsBGn2ZJLz4knl2; Thu, 29 Jun 2023 08:20: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 4QsBGn23fzz3wWB; Thu, 29 Jun 2023 08:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZC9mohJWBJ4tmBTMKttWJd+wTZ5f8rybEADC+kjqX9c=; b=D678LgVA228bAo3Obaa46bpXQnk7lZsQ5i5psP/s6sZYH3/4v163lx6LfOAYRfUZvargbZ fUWlSSc8JjXataM400ceugAQkfoKAxOFaLst8yqUIVVUcstuqTcfcMd20y6kNGiEtPMVxg CLlcN3Na2epZQyVpdHHQkmChi3XG5H6PreZJSl+pzpwoz+PUY0ytC65psQrP7IS7xxiU9W qezYtqoF7YBightWp9ZxrwXDExschRWCVUhNsS2l9e6LW9leylQpub7zzIp+YfPHpqxNOz jgb8ulpSyKrzjeSSauUJVe9iXUtd4A7awAsHSD9jnWkr6rHF8gUCSyI5rI8RVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZC9mohJWBJ4tmBTMKttWJd+wTZ5f8rybEADC+kjqX9c=; b=os/BLuy7M1F3EzNB8eEDUxE9yktboIWlaSj7IvQ8SUVQ8B8Mwos7s8mj7xPzjn3i2V070v bYHZYBx7Xh0M38xWv6fnBIoOREk+l85w2im9Al9uqZe7/yPJ1s4v9qI9gjsDE6bPxAnJa7 YXqSxjngQfI8bwAkMhmoLMK9qcGIFE1WhddVHrwxvXF1aAOyqReNfyombKsHn9UQv0cmd0 guCsw3FOYiCRzXcdKvaCkgKJ8ZwTZ8bEZWMO2xlkMvlGrYzFdOnXaSHbjGw92POk+2wY2r gY7l33mICX9eQlJeAfFeq2hDUS+FZISUdpHoM7QsTBfpEbF//CwPnaXQ72GrWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026849; a=rsa-sha256; cv=none; b=qfmh3ZjVgajvl+E83+zX4ZxNjfsYobJORellOv1yNLtOep6sZdaxgy1ovlE1KMF9/sSXpt dM2ztCIiY890tiwH4ZF7sH7OYl7dvymHc5kVSIPlPXm0js5y3pECEXVZu+lTc31ptYeRv/ XEGBJhD5lKw0/IDP+1/TjsNgPfcSh52f/dVBZqIBJyXKF0+7/yR78Z31/JIAZbv+K93u+w X+vczJ908h6H33jEgbpNZNpgCcmvwcRLBqwPy4osl0JWHCjFma6kFOr+FqCDaF3xlrzMw9 dR/2VL1cLtGYV/pJ8jyWILtpSFZG6XVLnJshHigyJMg6EDtpDLLMfiC9OKW1+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 4QsBGn10Kkz17QW; Thu, 29 Jun 2023 08:20: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 35T8Knuj085746; Thu, 29 Jun 2023 08:20:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KnsR085745; Thu, 29 Jun 2023 08:20:49 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:49 GMT Message-Id: <202306290820.35T8KnsR085745@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: 0aa326f7b384 - stable/13 - linux(4) rt_sendsig: Remove the use of caddr_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 0aa326f7b3842178986a3c7a8889965505c61856 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=0aa326f7b3842178986a3c7a8889965505c61856 commit 0aa326f7b3842178986a3c7a8889965505c61856 Author: Dmitry Chagin AuthorDate: 2023-06-06 20:01:39 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:02 +0000 linux(4) rt_sendsig: Remove the use of caddr_t Replace caddr_t by more appropriate char *. MFC after: 2 weeks (cherry picked from commit 84617f6fccd45505f3eeebad1c8cdce1140b7f8e) --- sys/amd64/linux/linux_sysvec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 53eda1cbc7c0..2383a4dd6632 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -409,7 +409,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) struct proc *p; struct thread *td; struct sigacts *psp; - caddr_t sp; + char *sp; struct trapframe *regs; struct savefpu *svfp; mcontext_t mc; @@ -439,9 +439,9 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { - sp = (caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size; + sp = (char *)td->td_sigstk.ss_sp + td->td_sigstk.ss_size; } else - sp = (caddr_t)regs->tf_rsp - 128; + sp = (char *)regs->tf_rsp - 128; mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); @@ -496,7 +496,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) for (i = 0; i < nitems(svfp->sv_xmm); ++i) bcopy(svfp->sv_xmm[i].xmm_bytes, &sf.sf_fs.xmm[i], sizeof(svfp->sv_xmm[i].xmm_bytes)); - sf.sf_uc.uc_mcontext.sc_fpstate = (struct l_fpstate *)((caddr_t)sfp + + sf.sf_uc.uc_mcontext.sc_fpstate = (struct l_fpstate *)((char *)sfp + offsetof(struct l_rt_sigframe, sf_fs)); /* Translate the signal. */ From nobody Thu Jun 29 08:20: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 4QsBGp3K0Sz4kp1B; Thu, 29 Jun 2023 08:20: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 4QsBGp2qGbz3wRK; Thu, 29 Jun 2023 08:20:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y9vXC0ucCNjHb5I28gp4XWb06Wn4PDRKSTyNBaXfF2c=; b=a097hbDBaPYwldCYbTahF7nBk4SHV0733QAtPnCjEltNGM/OhlDq/imVqY2h1F4iM48u+0 dQFwSrc0A/B1nBAhUyCCWTno5DR/xAE2O7XTfGsrftDKAGbK7Xgb8Ka7o32pqkJROjjMZS WXBgB2ToDqI81w+srBuxPTeyKLezEyDB+4rXNj2m0uB6QvE7MQNGOVKYIeqQKRd9rtWX/N Pa5fVUHewNCnJDhgAH7uzlGsS8oDOP4mCnnxXeLdAmKgl+JkPbczXZQsSfQOxmjmM657rR YaghdAhrKE1ZDe9QrPCPUjlHHFYc37Plkqkj/8hU85x+uoxzcHawoUYwGuwHkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y9vXC0ucCNjHb5I28gp4XWb06Wn4PDRKSTyNBaXfF2c=; b=MgMuAcyCTSKk2vvFBRvHuWF2V6R3Du/4IyeAVWzRRmPKRMZ8hzWzgNjrSoZoW8cIoG8Oem xDPfbkFxsxZWu8Fey/e5sUo5PbFJE6NnUGQqpQqZGuArCSOk75GcGblQwoBBVKmmTp/BrN T9JuXVf7F6U8KTdKD7183u2Zu0tgtiwYpJsrjr/rLBW1fDJE6Qi9C3lRYuCuBmiQ9Nc/u4 ZdXgqQzjf6eZKJ5Oo/L/iJEm4S6AjIPphZU1B7H+dnA0xhpDs+QuKpV2oAmUq+VDm8NxSf TNjpZqSwHqA8mHNnJIOIhvKND0DLOC1tsQV1cwuz5RURQVzr/7FqSlkE+G4vOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026850; a=rsa-sha256; cv=none; b=LHX8eHlZTwp2JeHIROkB746B9T8dA6ZA569jo628OSo+S7FGGOc9BwLkO7SWIB0Cji9f3K esVgGawsxi0t6lgnUAtOy0LujFtORu2yYnIHJIoeZE1ynEhrmRrPmixwxFQbVRJ4ZDZeOB 9rgkTTHKe6a8e89Q3lZWRRnAOHSCZOlU+c51LI45GR5eXg9wvudPe5bHFrFdnILM/2Zq9z N1roF4cZA61dLx6zxo423HUd98B2SjVrG4jBs3nqkpH3cmMJdaxR09m54h3VqfJSEpgSIo q6dPDQB94ZgvTMxrfikvcyld9Wo5H8KDvHTu981avIcQSkLp6CCO3t1YlTJuUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGp1vrcz183H; Thu, 29 Jun 2023 08:20: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 35T8Korm085768; Thu, 29 Jun 2023 08:20:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8Ko3c085767; Thu, 29 Jun 2023 08:20:50 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:50 GMT Message-Id: <202306290820.35T8Ko3c085767@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: 4b6a3ed70d8c - stable/13 - linux(4): In preparation for xsave refactor fxsave code 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4b6a3ed70d8cda6463320c464d4eff11f4aaf526 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4b6a3ed70d8cda6463320c464d4eff11f4aaf526 commit 4b6a3ed70d8cda6463320c464d4eff11f4aaf526 Author: Dmitry Chagin AuthorDate: 2023-06-08 22:32:46 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:02 +0000 linux(4): In preparation for xsave refactor fxsave code on amd64 Due to fxsave area is os independent reimplement fxsave handmade code using copying of a whole area. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40443 MFC after: 2 weeks (cherry picked from commit 920184ed6e43b19f4b71253b55fd3ba66a7f0bb2) --- sys/amd64/linux/linux_sysvec.c | 126 ++++++++++++++++++++----------------- sys/x86/linux/linux_x86_sigframe.h | 9 ++- 2 files changed, 76 insertions(+), 59 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 2383a4dd6632..97f49f8a7727 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -79,6 +79,10 @@ __FBSDID("$FreeBSD$"); #include +_Static_assert(sizeof(struct l_fpstate) == + sizeof(__typeof(((mcontext_t *)0)->mc_fpstate)), + "fxsave area size incorrect"); + MODULE_VERSION(linux64, 1); #define LINUX_VDSOPAGE_SIZE PAGE_SIZE * 2 @@ -277,6 +281,31 @@ linux_exec_setregs(struct thread *td, struct image_params *imgp, fpstate_drop(td); } +static int +linux_fxrstor(struct thread *td, mcontext_t *mcp, struct l_sigcontext *sc) +{ + struct savefpu *fp = (struct savefpu *)&mcp->mc_fpstate[0]; + int error; + + error = copyin(PTRIN(sc->sc_fpstate), fp, sizeof(mcp->mc_fpstate)); + if (error != 0) + return (error); + bzero(&fp->sv_pad[0], sizeof(fp->sv_pad)); + return (set_fpcontext(td, mcp, NULL, 0)); +} + +static int +linux_copyin_fpstate(struct thread *td, struct l_ucontext *uc) +{ + mcontext_t mc; + + bzero(&mc, sizeof(mc)); + mc.mc_ownedfp = _MC_FPOWNED_FPU; + mc.mc_fpformat = _MC_FPFMT_XMM; + + return (linux_fxrstor(td, &mc, &uc->uc_mcontext)); +} + /* * Copied from amd64/amd64/machdep.c */ @@ -287,10 +316,9 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) struct l_rt_sigframe sf; struct l_sigcontext *context; struct trapframe *regs; - mcontext_t mc; unsigned long rflags; sigset_t bmask; - int error, i; + int error; ksiginfo_t ksi; regs = td->td_frame; @@ -362,41 +390,42 @@ linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) regs->tf_err = context->sc_err; regs->tf_rflags = rflags; - if (sf.sf_uc.uc_mcontext.sc_fpstate != NULL) { - struct savefpu *svfp = (struct savefpu *)mc.mc_fpstate; - - bzero(&mc, sizeof(mc)); - mc.mc_ownedfp = _MC_FPOWNED_FPU; - mc.mc_fpformat = _MC_FPFMT_XMM; - - svfp->sv_env.en_cw = sf.sf_fs.cwd; - svfp->sv_env.en_sw = sf.sf_fs.swd; - svfp->sv_env.en_tw = sf.sf_fs.twd; - svfp->sv_env.en_opcode = sf.sf_fs.fop; - svfp->sv_env.en_rip = sf.sf_fs.rip; - svfp->sv_env.en_rdp = sf.sf_fs.rdp; - svfp->sv_env.en_mxcsr = sf.sf_fs.mxcsr; - svfp->sv_env.en_mxcsr_mask = sf.sf_fs.mxcsr_mask; - /* FPU registers */ - for (i = 0; i < nitems(svfp->sv_fp); ++i) - bcopy(&sf.sf_fs.st[i], svfp->sv_fp[i].fp_acc.fp_bytes, - sizeof(svfp->sv_fp[i].fp_acc.fp_bytes)); - /* SSE registers */ - for (i = 0; i < nitems(svfp->sv_xmm); ++i) - bcopy(&sf.sf_fs.xmm[i], svfp->sv_xmm[i].xmm_bytes, - sizeof(svfp->sv_xmm[i].xmm_bytes)); - error = set_fpcontext(td, &mc, NULL, 0); - if (error != 0) { - uprintf("pid %d comm %s linux can't restore fpu state %d\n", - p->p_pid, p->p_comm, error); - return (error); - } + error = linux_copyin_fpstate(td, &sf.sf_uc); + if (error != 0) { + uprintf("pid %d comm %s linux can't restore fpu state %d\n", + p->p_pid, p->p_comm, error); + return (error); } set_pcb_flags(td->td_pcb, PCB_FULL_IRET); return (EJUSTRETURN); } +static int +linux_fxsave(mcontext_t *mcp, void *ufp) +{ + struct l_fpstate *fx = (struct l_fpstate *)&mcp->mc_fpstate[0]; + + bzero(&fx->reserved2[0], sizeof(fx->reserved2)); + return (copyout(fx, ufp, sizeof(*fx))); +} + +static int +linux_copyout_fpstate(struct thread *td, struct l_ucontext *uc, char **sp) +{ + mcontext_t mc; + char *ufp = *sp; + + get_fpcontext(td, &mc, NULL, NULL); + KASSERT(mc.mc_fpformat != _MC_FPFMT_NODEV, ("fpu not present")); + + /* fxsave area */ + ufp -= sizeof(struct l_fpstate); + *sp = ufp = (char *)((unsigned long)ufp & ~0x3Ful); + + return (linux_fxsave(&mc, ufp)); +} + /* * copied from amd64/amd64/machdep.c * @@ -411,10 +440,8 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) struct sigacts *psp; char *sp; struct trapframe *regs; - struct savefpu *svfp; - mcontext_t mc; int sig, code; - int oonstack, issiginfo, i; + int oonstack, issiginfo; td = curthread; p = td->td_proc; @@ -446,6 +473,14 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); + if (linux_copyout_fpstate(td, &sf.sf_uc, &sp) != 0) { + uprintf("pid %d comm %s linux can't save fpu state, killing\n", + p->p_pid, p->p_comm); + PROC_LOCK(p); + sigexit(td, SIGILL); + } + sf.sf_uc.uc_mcontext.sc_fpstate = (register_t)sp; + /* Make room, keeping the stack aligned. */ sp -= sizeof(struct l_rt_sigframe); sfp = (struct l_rt_sigframe *)((unsigned long)sp & ~0xFul); @@ -476,29 +511,6 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) sf.sf_uc.uc_mcontext.sc_trapno = bsd_to_linux_trapcode(code); sf.sf_uc.uc_mcontext.sc_cr2 = (register_t)ksi->ksi_addr; - get_fpcontext(td, &mc, NULL, NULL); - KASSERT(mc.mc_fpformat != _MC_FPFMT_NODEV, ("fpu not present")); - svfp = (struct savefpu *)mc.mc_fpstate; - - sf.sf_fs.cwd = svfp->sv_env.en_cw; - sf.sf_fs.swd = svfp->sv_env.en_sw; - sf.sf_fs.twd = svfp->sv_env.en_tw; - sf.sf_fs.fop = svfp->sv_env.en_opcode; - sf.sf_fs.rip = svfp->sv_env.en_rip; - sf.sf_fs.rdp = svfp->sv_env.en_rdp; - sf.sf_fs.mxcsr = svfp->sv_env.en_mxcsr; - sf.sf_fs.mxcsr_mask = svfp->sv_env.en_mxcsr_mask; - /* FPU registers */ - for (i = 0; i < nitems(svfp->sv_fp); ++i) - bcopy(svfp->sv_fp[i].fp_acc.fp_bytes, &sf.sf_fs.st[i], - sizeof(svfp->sv_fp[i].fp_acc.fp_bytes)); - /* SSE registers */ - for (i = 0; i < nitems(svfp->sv_xmm); ++i) - bcopy(svfp->sv_xmm[i].xmm_bytes, &sf.sf_fs.xmm[i], - sizeof(svfp->sv_xmm[i].xmm_bytes)); - sf.sf_uc.uc_mcontext.sc_fpstate = (struct l_fpstate *)((char *)sfp + - offsetof(struct l_rt_sigframe, sf_fs)); - /* Translate the signal. */ sig = bsd_to_linux_signal(sig); /* Fill in POSIX parts. */ diff --git a/sys/x86/linux/linux_x86_sigframe.h b/sys/x86/linux/linux_x86_sigframe.h index 74e7a36e2e71..e5687069651f 100644 --- a/sys/x86/linux/linux_x86_sigframe.h +++ b/sys/x86/linux/linux_x86_sigframe.h @@ -170,7 +170,13 @@ struct l_sigcontext { l_ulong sc_trapno; l_sigset_t sc_mask; l_ulong sc_cr2; - struct l_fpstate *sc_fpstate; + /* + * On Linux sc_fpstate is (struct l_fpstate *) or (struct l_xstate *) + * depending on the FP_XSTATE_MAGIC1 encoded in the sw_reserved + * bytes of (struct l_fpstate) and FP_XSTATE_MAGIC2 present at the end + * of extended memory layout. + */ + l_uintptr_t sc_fpstate; l_ulong sc_reserved1[8]; }; @@ -189,7 +195,6 @@ struct l_ucontext { struct l_rt_sigframe { struct l_ucontext sf_uc; struct l_siginfo sf_si; - struct l_fpstate sf_fs; }; #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ From nobody Thu Jun 29 08:20: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 4QsBGr04fWz4knqd; Thu, 29 Jun 2023 08:20: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 4QsBGq51v4z3wXT; Thu, 29 Jun 2023 08:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Dzuf2I9ixo0yQE22q0Tii9CrzssTSIBPOwmOpOwF60=; b=u3BNRqAn0kjOy17bRgwSbZYYZviZ4+OGKluCTaboz9GrmDFBnsYAYN278InnxU8OkOCLPJ M0//F68n2g6gOB5GB+sc6mk2VVMb0mapDxY5D2KUMB9KePpCMhU7Uu/ijeUP+fVaAi2ehq P1olaJqwa+pyaQDlM9cDVRw9P2cG6ntIONzxwgupJ1VlU67wMW4yVtA4QJqI42d6ek5yA3 h+R7PJZ222dADqGL0K4DjNPh7QR1nEfnx6ky2O/ZkhLhc0tCCaNNpbIQvvnqE3daUmuNya pNF6/gIfLpFA5gorfAJ0QRSEgx00SozJYqjl9770q7fTdReJWlsruJ4W2aDW+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Dzuf2I9ixo0yQE22q0Tii9CrzssTSIBPOwmOpOwF60=; b=PHm4tL7qZxgBG/sxK1dYlIqBYxQUtLZA7xG5OXENZfrmJIv/1GZFDSSBJfLGur5TO9bi1j CaXkYZfHYJwUFb81MMvslfF6lv8MvYTgfO736W8VhYJ3xSeRYQ+cFMtrwDH4sgPeLvUO8u /AuG0Dk1s9t0wsfcYUixR07C9ZIDDCWrDrPBxQg6ebidA3u2UpodMaBujBIXxIofcE7vIU pzN3R+Fb83sVpmi5MQpe8vpXDJuIK36eBzA0TRI8t87zKaepwyEE0GSEkad2DIpsxynKlt cWzSXO1JICLcH/XBFnsdrHI59RdGf2A3PLPR8gK1rwhlB4XgWNSZ3HGnaEMEQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026851; a=rsa-sha256; cv=none; b=uHlRYraI1HNUIGp0sD/evTzDKZ4DtM+1508os9PA9bXoazxLC2w4TFKL3iEdIygxFDQEuI l5ljI0BZ5wZ75btEE42Mj74v5lM9T8F/k+AJATwRVlC5o0M+whHVZhthCXeP8VJaGi83VT X79oiaL2kB5schQpkOq6oQd35Li2xsCkEyLfl7gyA1w9T3ZhkGCIoza38Cyd+dUj7Ne2yF 9W0a+Ih/Zq57OuWFWx3NEyKGwX1pexVhn86nnWPISlbislkbbpoBijKfnn/Y7U7njRIUnm XqrX3lwNLRw0Rc+QtnWwmgoNzMX3vXmCl7CNHY4gmiB+6q0AhmlJzGLS6+8ajw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGq2qTrz183J; Thu, 29 Jun 2023 08:20: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 35T8KpOx085787; Thu, 29 Jun 2023 08:20:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KpGL085786; Thu, 29 Jun 2023 08:20:51 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:51 GMT Message-Id: <202306290820.35T8KpGL085786@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: e40bcfdff7cc - stable/13 - linux(4): Preserve fpu xsave state across signal delivery 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e40bcfdff7cc0596cd4e748e42a1947fd9f5d430 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=e40bcfdff7cc0596cd4e748e42a1947fd9f5d430 commit e40bcfdff7cc0596cd4e748e42a1947fd9f5d430 Author: Dmitry Chagin AuthorDate: 2023-06-08 22:33:26 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:03 +0000 linux(4): Preserve fpu xsave state across signal delivery on amd64 PR: 270247 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40444 MFC after: 2 weeks (cherry picked from commit cbbac560911521c0ded3e06e713107176855fae4) --- sys/amd64/linux/linux_sysvec.c | 99 ++++++++++++++++++++++++++++++++++++-- sys/x86/linux/linux_x86_sigframe.h | 20 +++++++- 2 files changed, 114 insertions(+), 5 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 97f49f8a7727..290e21247b0d 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -294,6 +294,54 @@ linux_fxrstor(struct thread *td, mcontext_t *mcp, struct l_sigcontext *sc) return (set_fpcontext(td, mcp, NULL, 0)); } +static int +linux_xrstor(struct thread *td, mcontext_t *mcp, struct l_sigcontext *sc) +{ + struct savefpu *fp = (struct savefpu *)&mcp->mc_fpstate[0]; + char *xfpustate; + struct proc *p; + uint32_t magic2; + int error; + + p = td->td_proc; + mcp->mc_xfpustate_len = cpu_max_ext_state_size - sizeof(struct savefpu); + + /* Legacy region of an xsave area. */ + error = copyin(PTRIN(sc->sc_fpstate), fp, sizeof(mcp->mc_fpstate)); + if (error != 0) + return (error); + bzero(&fp->sv_pad[0], sizeof(fp->sv_pad)); + + /* Extended region of an xsave area. */ + sc->sc_fpstate += sizeof(mcp->mc_fpstate); + xfpustate = (char *)fpu_save_area_alloc(); + error = copyin(PTRIN(sc->sc_fpstate), xfpustate, mcp->mc_xfpustate_len); + if (error != 0) { + fpu_save_area_free((struct savefpu *)xfpustate); + uprintf("pid %d (%s): linux xrstor failed\n", p->p_pid, + td->td_name); + return (error); + } + + /* Linux specific end of xsave area marker. */ + sc->sc_fpstate += mcp->mc_xfpustate_len; + error = copyin(PTRIN(sc->sc_fpstate), &magic2, LINUX_FP_XSTATE_MAGIC2_SIZE); + if (error != 0 || magic2 != LINUX_FP_XSTATE_MAGIC2) { + fpu_save_area_free((struct savefpu *)xfpustate); + uprintf("pid %d (%s): sigreturn magic2 0x%x error %d\n", + p->p_pid, td->td_name, magic2, error); + return (error); + } + + error = set_fpcontext(td, mcp, xfpustate, mcp->mc_xfpustate_len); + fpu_save_area_free((struct savefpu *)xfpustate); + if (error != 0) { + uprintf("pid %d (%s): sigreturn set_fpcontext error %d\n", + p->p_pid, td->td_name, error); + } + return (error); +} + static int linux_copyin_fpstate(struct thread *td, struct l_ucontext *uc) { @@ -303,7 +351,10 @@ linux_copyin_fpstate(struct thread *td, struct l_ucontext *uc) mc.mc_ownedfp = _MC_FPOWNED_FPU; mc.mc_fpformat = _MC_FPFMT_XMM; - return (linux_fxrstor(td, &mc, &uc->uc_mcontext)); + if ((uc->uc_flags & LINUX_UC_FP_XSTATE) != 0) + return (linux_xrstor(td, &mc, &uc->uc_mcontext)); + else + return (linux_fxrstor(td, &mc, &uc->uc_mcontext)); } /* @@ -410,20 +461,60 @@ linux_fxsave(mcontext_t *mcp, void *ufp) return (copyout(fx, ufp, sizeof(*fx))); } +static int +linux_xsave(mcontext_t *mcp, char *xfpusave, char *ufp) +{ + struct l_fpstate *fx = (struct l_fpstate *)&mcp->mc_fpstate[0]; + uint32_t magic2; + int error; + + /* Legacy region of an xsave area. */ + fx->sw_reserved.magic1 = LINUX_FP_XSTATE_MAGIC1; + fx->sw_reserved.xstate_size = mcp->mc_xfpustate_len + sizeof(*fx); + fx->sw_reserved.extended_size = fx->sw_reserved.xstate_size + + LINUX_FP_XSTATE_MAGIC2_SIZE; + fx->sw_reserved.xfeatures = xsave_mask; + + error = copyout(fx, ufp, sizeof(*fx)); + if (error != 0) + return (error); + ufp += sizeof(*fx); + + /* Extended region of an xsave area. */ + error = copyout(xfpusave, ufp, mcp->mc_xfpustate_len); + if (error != 0) + return (error); + + /* Linux specific end of xsave area marker. */ + ufp += mcp->mc_xfpustate_len; + magic2 = LINUX_FP_XSTATE_MAGIC2; + return (copyout(&magic2, ufp, LINUX_FP_XSTATE_MAGIC2_SIZE)); +} + static int linux_copyout_fpstate(struct thread *td, struct l_ucontext *uc, char **sp) { + size_t xfpusave_len; + char *xfpusave; mcontext_t mc; char *ufp = *sp; - get_fpcontext(td, &mc, NULL, NULL); + get_fpcontext(td, &mc, &xfpusave, &xfpusave_len); KASSERT(mc.mc_fpformat != _MC_FPFMT_NODEV, ("fpu not present")); - /* fxsave area */ + /* Room for fxsave area. */ ufp -= sizeof(struct l_fpstate); + if (xfpusave != NULL) { + /* Room for xsave area. */ + ufp -= (xfpusave_len + LINUX_FP_XSTATE_MAGIC2_SIZE); + uc->uc_flags |= LINUX_UC_FP_XSTATE; + } *sp = ufp = (char *)((unsigned long)ufp & ~0x3Ful); - return (linux_fxsave(&mc, ufp)); + if (xfpusave != NULL) + return (linux_xsave(&mc, xfpusave, ufp)); + else + return (linux_fxsave(&mc, ufp)); } /* diff --git a/sys/x86/linux/linux_x86_sigframe.h b/sys/x86/linux/linux_x86_sigframe.h index e5687069651f..c748073a3457 100644 --- a/sys/x86/linux/linux_x86_sigframe.h +++ b/sys/x86/linux/linux_x86_sigframe.h @@ -35,6 +35,20 @@ #ifndef _X86_LINUX_SIGFRAME_H_ #define _X86_LINUX_SIGFRAME_H_ +#define LINUX_UC_FP_XSTATE 0x1 + +#define LINUX_FP_XSTATE_MAGIC1 0x46505853U +#define LINUX_FP_XSTATE_MAGIC2 0x46505845U +#define LINUX_FP_XSTATE_MAGIC2_SIZE sizeof(uint32_t) + +struct l_fpx_sw_bytes { + uint32_t magic1; + uint32_t extended_size; + uint64_t xfeatures; + uint32_t xstate_size; + uint32_t padding[7]; +}; + #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) /* The Linux sigcontext, pretty much a standard 386 trapframe. */ @@ -140,7 +154,11 @@ struct l_fpstate { u_int32_t mxcsr_mask; u_int8_t st[8][16]; u_int8_t xmm[16][16]; - u_int32_t reserved2[24]; + u_int32_t reserved2[12]; + union { + u_int32_t reserved3[12]; + struct l_fpx_sw_bytes sw_reserved; + }; } __aligned(16); struct l_sigcontext { From nobody Thu Jun 29 08:20: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 4QsBGr73yRz4knqh; Thu, 29 Jun 2023 08:20: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 4QsBGr4c8Rz3wP5; Thu, 29 Jun 2023 08:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DYSGYTjp/MzZHcCKo851KJZmweJ7W1boPYi3b8D9IFg=; b=HHA0vaz/uO45WbbVl2hERt545Ew0EUvLkzf2OM8InkqvALVh/+h218ALDIhVHIFlf7OlBY qmgVkj2QvWrWFeQ8bxla1qGQjjxM+RJZlrbDDzcOtSrVpKOc786O/DY+Ard7COUbKF2R4W gTdFR9rZj0aloNL9PiUkYheB8VqnXLUncqlGWuyKFjDnv5nRQREYC/SzR9yJHwcGgPJkP0 fK0BR3kokN5W2BPMFJ52UFUVwpr1DH4ytg3LLf8k3Cl1Ys0Emd+NZRRxIELFh7mBtl4CeL UX+OtwuZmfrBH5C9gyLaJ6d22iAgzUGco9ZX6CAGMP90jaIgtm1stxbFzrXbfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DYSGYTjp/MzZHcCKo851KJZmweJ7W1boPYi3b8D9IFg=; b=apDV8Pnbe3KmSA4ccCNbQNX2Cxmd4QrtBS55/CN1i88HOwfqiSp1tcBvzxv4zE9r4ZtD0U g8+xgcKG+tp7n2qfbAWu7JbcPTVMUT1beXyHU06yzwVg4YgXhCMIWp2Qw+jPQy/FKCxajr TD/TOjt7As3cTLhjwAANCWu/PyZdEmB9d3ILLzEcN7wJwquSob4LbkFZ0FagCmGWrh3dWE om8nM5v3Ex8unEoBjYcC08AQnCUcaF3dmvi10axvpW28ZFTkDq4xgdodEz1si5wdA3fjKz /FqFzyypvApxs5VZr61uhMdizBXUtYCiSkPQzNa2a5obDPxL7sLH3kOpGr35jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026852; a=rsa-sha256; cv=none; b=Z1Q+TiVq2irvPSYcrtYLA02GQzizqKZQCJQiNM2LexNPo759wh7Fuvln0/22eCcgKY7HQU Y0JCTcefSo1qVwcybNc/yYFpJVwavg7w8UIcMMTQa9LniCBYe8wwD6b9OrtRa2xrNgUQgi ZtHjpQTEHhzh3Yw7ZPfYLQWNxd6brPRoEnqWTFLRKD4xALy5RpWfoUA+A4Vvx1SXiDW8AL s3zAiQrZVaeqIHP/DM3RtNRV/AMbe6iXOMz6qr3XJimUw5ptUHqePdnxHB0ObgYrACWaXS m1z4hFh7cbTUMptXA6MgTU/R1rxOR65QiqelDkWU/w6HJfPE3R+Layr+i73BqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsBGr3kJVz17gx; Thu, 29 Jun 2023 08:20: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 35T8KqTD085822; Thu, 29 Jun 2023 08:20:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8KqkE085820; Thu, 29 Jun 2023 08:20:52 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:52 GMT Message-Id: <202306290820.35T8KqkE085820@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: 4a1f66b81f24 - stable/13 - Revert "linux(4): The futex_wait operation should restart." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 4a1f66b81f24c4ae0207e2898eba145299609308 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4a1f66b81f24c4ae0207e2898eba145299609308 commit 4a1f66b81f24c4ae0207e2898eba145299609308 Author: Dmitry Chagin AuthorDate: 2023-06-11 09:47:27 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:16:03 +0000 Revert "linux(4): The futex_wait operation should restart." This reverts commit 5eec19c8eb0e1afafd7290325c61611c9a13b621 due to its wrong. Linux interrupts futex syscall on signal and return EINTR. (cherry picked from commit 486459056822f080b1ae24600a4c6a7d8ff6f7d6) --- sys/compat/linux/linux_futex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 74f89e3d49fb..d265b015b799 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -786,6 +786,8 @@ linux_futex_wait(struct thread *td, struct linux_futex_args *args) } umtxq_unlock(&uq->uq_key); umtx_key_release(&uq->uq_key); + if (error == ERESTART) + error = EINTR; return (error); } From nobody Thu Jun 29 10:56: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 4QsFkS13kZz4k00Y; Thu, 29 Jun 2023 10: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 4QsFkS0M1Cz3Lcn; Thu, 29 Jun 2023 10: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=1688036192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IHnm/ry2Ca+85iLk+Jfkv5Jv+yJ+T7hNPLOl03zKdPU=; b=mAz7PDL2puSwsTI5Laq9Uwqwo+mI2kkNpegFDcMKnstsLwJxo7ZE+BJ0GwDsxZWD0ZfqH1 G8ua040y4P8ozyIvdH7iXf6SMyQzctW8QBpZ2DzAGZtfoYXNf53f1y93ia1eAaN74CL57P JBt/vHFFFP87Trb9ZC8ViZMiT8RjyzS1pcjrK/1s5WHtzii0ujfjNksm7cqb2B8nAk4pnb Spt33dejXLWBrrKStczATsmGUTScgfNmGklVFQs5WlVgB21WndfNJi7nuFyQko3hX9YSnm 95yR1Q0BrlLJKucplsHyO0/K3bdP21MHMC4QcXdtoM3QnjYPj8e6wkKm629b0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688036192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IHnm/ry2Ca+85iLk+Jfkv5Jv+yJ+T7hNPLOl03zKdPU=; b=G+XvhI4aBrLVAB4oKdt2u4ogrJPmbfqf8PnbngnIY+qlCY8d4MYDX25ZdLWP3vuAcd4774 f+wC5h1rV/sTfH/Nxt/BAK63tpa06O2eAXBeIZiltpec+z020NZewO03lMVoP8hgtmrrVS ntE2GK+VyzPTeh/ZHAe5qOhtT9/4XIznq4utyDp6VhDwhZeZVXYtTkpu1fQqiLoKb7uogJ ATctYTDVEO2JNE9IR3R8isaXylDPs342Ht3jQYPzDokXVxUn5xb5KbUIK+OoZrcMWANSrQ mOj7b2MCoDx7bQbp+of3j9IKRZdl/lF7WmGCkiXx4MH6VAyv8wt7qtXZCIIeyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688036192; a=rsa-sha256; cv=none; b=CvysQIC79jiaNJl0uai5PUO50NoVDfso+sN1iYARg9v9hx1YT/mmHeeRGM7cSFA8pQXend I3GQNrBPONky8/dl4AdB6L6Rwgeq9f1eQ96Y8gD3XZ/OJr+n6yc6SOTIAeQqTLr16in9kc bt5ihnElRcv7C34+8f35bolvJAOTyrkEpu8OTUxmLCn6w75wJ4lofy53FQzOES0Ajw08+K sLPlzZ1Ic71HgK/AY1mgnnwAl9w2yiJbD8Q3jk+sDRO5UbOwV+EoPCY2oS/TeRHqgdqgng sJhHC/NGn4z4D6ujFtxsQEUgNN66R4xJ/RSpE1zCGgfAuacGoEJXv3TPheTGnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsFkR6WVDz1CtK; Thu, 29 Jun 2023 10:56: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 35TAuVrI038771; Thu, 29 Jun 2023 10:56:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TAuVAd038770; Thu, 29 Jun 2023 10:56:31 GMT (envelope-from git) Date: Thu, 29 Jun 2023 10:56:31 GMT Message-Id: <202306291056.35TAuVAd038770@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: 0f287f6a96ca - stable/13 - linux(4): Implement close_range over native List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 0f287f6a96cacda32ee17447987add3e05aa5fc6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=0f287f6a96cacda32ee17447987add3e05aa5fc6 commit 0f287f6a96cacda32ee17447987add3e05aa5fc6 Author: Dmitry Chagin AuthorDate: 2023-04-04 20:24:04 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 10:50:41 +0000 linux(4): Implement close_range over native Handling of the CLOSE_RANGE_UNSHARE flag is not implemented due to difference in fd unsharing mechanism in the Linux and FreeBSD. Reviewed by: mjg Differential revision: https://reviews.freebsd.org/D39398 MFC after: 2 weeks (cherry picked from commit 71bc17803edfaad545f0c1f1111ca892aed7a5c4) --- sys/compat/linux/linux_dummy.c | 1 - sys/compat/linux/linux_file.c | 26 ++++++++++++++++++++++++++ sys/compat/linux/linux_file.h | 7 +++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index 45b0db6d6dde..e3812218514c 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -135,7 +135,6 @@ DUMMY(fsconfig); DUMMY(fsmount); DUMMY(fspick); DUMMY(pidfd_open); -DUMMY(close_range); DUMMY(openat2); DUMMY(pidfd_getfd); DUMMY(process_madvise); diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 249318a2e619..4ce0a2cb4c0e 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -2083,3 +2083,29 @@ linux_splice(struct thread *td, struct linux_splice_args *args) */ return (EINVAL); } + +int +linux_close_range(struct thread *td, struct linux_close_range_args *args) +{ + u_int flags = 0; + + /* + * Implementing close_range(CLOSE_RANGE_UNSHARE) allows Linux to + * unshare filedesc table of the calling thread from others threads + * in a thread group (i.e., process in the FreeBSD) or others processes, + * which shares the same table, before closing the files. FreeBSD does + * not have compatible unsharing mechanism due to the fact that sharing + * process resources, including filedesc table, is at thread level in the + * Linux, while in the FreeBSD it is at the process level. + * Return EINVAL for now if the CLOSE_RANGE_UNSHARE flag is specified + * until this new Linux API stabilizes. + */ + + if ((args->flags & ~(LINUX_CLOSE_RANGE_CLOEXEC)) != 0) + return (EINVAL); + if (args->first > args->last) + return (EINVAL); + if ((args->flags & LINUX_CLOSE_RANGE_CLOEXEC) != 0) + flags |= CLOSE_RANGE_CLOEXEC; + return (kern_close_range(td, flags, args->first, args->last)); +} diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index 3f885f915411..061bd1fc2c24 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -197,4 +197,11 @@ struct l_file_handle { unsigned char f_handle[0]; }; +/* + * Look at linux_close_range() for an explanation. + * + * #define LINUX_CLOSE_RANGE_UNSHARE (1U << 1) + */ +#define LINUX_CLOSE_RANGE_CLOEXEC (1U << 2) + #endif /* !_LINUX_FILE_H_ */ From nobody Thu Jun 29 11:48: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 4QsGtm4Bywz4kYxF; Thu, 29 Jun 2023 11:48: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 4QsGtm3FXpz3qwv; Thu, 29 Jun 2023 11:48:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688039328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=239s61t2W+e5+nuvq7VoUrhHz8BBDbumcJdjeHohuc0=; b=pF9UCy+yDShNe4vSPr5wUlTh8KTUCCT6f5SmHx8Y2tn5XdqAUAjCiEin/PxCpjcygZZotS 9IKZ3DmMgZ/zAKGJHJjVOVq5fmzpVwe+Kd9E+bal+ABT5UTud1wSsiCChUxQSl0XZSKCZz Afx2/q+Zalep7HQZ0xc4qWIXvFDH3H2tysaOh+csGbUphcGG+QGpDhGqs7joPstasdzUGQ bDv3d4n2n3IZLwLfv1twDvm61BVvv9Zf14zwWBXPV4rt3ZktOK6qo8xmHDyEN0kcBKOiyl HnyFu3GWGKVjMiKIlMBpgKSpoTMpZWpQrR6g+1tdEcpORKQS1uQviHp1lQSMGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688039328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=239s61t2W+e5+nuvq7VoUrhHz8BBDbumcJdjeHohuc0=; b=SbtHSgshl1pdqq6/exXQ5QwcyjlEOIA5fe1LHfKusw0pjLD0nMJui9Y1dO1PwIW3FOYWc4 0M1g9f3GahSyQb56oorbN5zsm1j8S3z2zgu/U4isu8YGmtCXLjZCBx01W3ArjY5mDvHgWg h/AlYbDcpGtAOkvKlLql8y8w3nljz82ojalxzKGyj2MRh/mWu6+vdUiZh7zQmiWyb/ka4b ckbgDxuypdds9G0JfkkHQ2OcFlwaG4Z4kQ84MSWlD6DGImgP0IHb9nswCxsHxdgdp4Qud9 kqWfjOWnyzkJHMcZffMDD39FIDeMj1qjg1XRJmYnuLUK4zv+vN3MaA8uNYp5yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688039328; a=rsa-sha256; cv=none; b=a6ov5AEVuQ42ZrakCwm+Ds3XAH9g+5/dMarGdbavlmAovggVhKbThbW5A5wIyQKFB9bafB lVUT/nlYsIht4E33cHyqnFILJR1rkDo5fIgcEd2ZMsxwNUizHkrKm0OY0Dk2RJXQkA+fOO TC6+k/i3XlkDnA3HIDZJb2eGvIHzzRiwQh7vvwQumCGW2uJe3FOxRmJcU8964vQUqUXChS w+zPvVYz8aSAAKUCM4ankaJGyavetg9GxtVu8gSENj7y6W1U2NdTAkxvsB6epjhz8wrtQr mfnwZ+bDCYrUYYO/j+8FfMGpS8atwIVqU104ny1/NkGrp0s6N0E/0eVFfOVWjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsGtm2JCtzF69; Thu, 29 Jun 2023 11:48: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 35TBmmLx023220; Thu, 29 Jun 2023 11:48:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TBmm5h023219; Thu, 29 Jun 2023 11:48:48 GMT (envelope-from git) Date: Thu, 29 Jun 2023 11:48:48 GMT Message-Id: <202306291148.35TBmm5h023219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: 24ec316c13bd - main - Correctly spell illumos (all lowercase) in man 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: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24ec316c13bdbe27c4d68b7982e781d35221980e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=24ec316c13bdbe27c4d68b7982e781d35221980e commit 24ec316c13bdbe27c4d68b7982e781d35221980e Author: Yuri Pankov AuthorDate: 2023-06-29 11:10:48 +0000 Commit: Yuri Pankov CommitDate: 2023-06-29 11:14:45 +0000 Correctly spell illumos (all lowercase) in man pages From illumos FAQ: "illumos (pronounced i-llu-MOS and written in lowercase)" --- lib/libc/string/memmem.3 | 4 ++-- usr.bin/localedef/localedef.1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/string/memmem.3 b/lib/libc/string/memmem.3 index 5f8b9d792e78..0dcef0dabef1 100644 --- a/lib/libc/string/memmem.3 +++ b/lib/libc/string/memmem.3 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2023 +.Dd June 29, 2023 .Dt MEMMEM 3 .Os .Sh NAME @@ -72,7 +72,7 @@ is returned. .Sh CONFORMING TO .Fn memmem started as a GNU extension but is now available in at least -the GNU, musl, bionic, OpenBSD, NetBSD, macOS, and Illumos C runtime libraries. +the GNU, musl, bionic, OpenBSD, NetBSD, macOS, and illumos C runtime libraries. .Sh HISTORY The .Fn memmem diff --git a/usr.bin/localedef/localedef.1 b/usr.bin/localedef/localedef.1 index f67672f9a0c6..df02c60bb3b1 100644 --- a/usr.bin/localedef/localedef.1 +++ b/usr.bin/localedef/localedef.1 @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 2020 +.Dd June 29, 2023 .Dt LOCALEDEF 1 .Os .Sh NAME @@ -267,7 +267,7 @@ first appeared in It was written by .An Garrett D'Amore .Aq Mt garrett@nexenta.com -for Illumos. +for illumos. .An John Marino .Aq Mt draco@marino.st provided the alternations necessary to compile cleanly on From nobody Thu Jun 29 12:47: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 4QsJBk06sQz4jwdx; Thu, 29 Jun 2023 12:47:42 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [94.130.200.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail.bsd4all.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QsJBh5q7Lz4Cmk; Thu, 29 Jun 2023 12:47:40 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gojira.at header.s=mail202005 header.b=gI27Hxr8; spf=pass (mx1.freebsd.org: domain of herbert@gojira.at designates 94.130.200.20 as permitted sender) smtp.mailfrom=herbert@gojira.at; dmarc=none Date: Thu, 29 Jun 2023 14:47:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail202005; t=1688042853; bh=TpVODuiRrVz4+nsltFYM4SccgDy9o3dd0pTVc1Y+wGQ=; h=Date:Message-ID:From:To:Cc:Subject:MIME-Version:Content-Type; b=gI27Hxr8tRJwNk6JyCaCl7aBGPrw87dpybxp/lsGr1vXQWnko8xrfiFbYc83QLBUy G+T2+wRgunidTbKDvVXfm8mQR8HMz5xDYT8W8yzOz0482OvjrNmNoTH9chXoXnmcKd r62u+bnq+0uAnXZJT4IuYZRVWM2+bgePP1cfx1+kYo04VeifvoXsgqjcRqubN2q8Sb FHKwqs+MtUaieRJ888y0jOcq7KQeZ967XK0lQdRAewXY6FwtwQ0h071i4N+PwqH0Rf 93LUURlxujNzpjFXBrz/of2C/bvehpthNLF5D5iC4SN9VfQVWBelM+GOX3llE5hQbH yX3efu/bbvtRA== Message-ID: <87y1k21lm0.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Ed Maste Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: b077aed33b7b - main - Merge OpenSSL 3.0.9 In-Reply-To: <202306232319.35NNJsPv044302@gitrepo.freebsd.org> References: <202306232319.35NNJsPv044302@gitrepo.freebsd.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/30.0 Mule/6.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 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-Result: default: False [-2.40 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.90)[-0.898]; R_DKIM_ALLOW(-0.20)[gojira.at:s=mail202005]; R_SPF_ALLOW(-0.20)[+ip4:94.130.200.20]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; RCVD_COUNT_ZERO(0.00)[0]; BLOCKLISTDE_FAIL(0.00)[94.130.200.20:server fail]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gojira.at:+]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[gojira.at]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ASN(0.00)[asn:24940, ipnet:94.130.0.0/16, country:DE] X-Rspamd-Queue-Id: 4QsJBh5q7Lz4Cmk X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Sat, 24 Jun 2023 01:19:54 +0200, Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b077aed33b7b6aefca7b17ddb250cf521f938613 > > commit b077aed33b7b6aefca7b17ddb250cf521f938613 > Merge: b08ee10c0646 b84c4564effd > Author: Pierre Pronchery > AuthorDate: 2023-06-23 22:53:35 +0000 > Commit: Ed Maste > CommitDate: 2023-06-23 22:53:36 +0000 > > Merge OpenSSL 3.0.9 > > Migrate to OpenSSL 3.0 in advance of FreeBSD 14.0. OpenSSL 1.1.1 (the > version we were previously using) will be EOL as of 2023-09-11. > > Most of the base system has already been updated for a seamless switch > to OpenSSL 3.0. For many components we've added > `-DOPENSSL_API_COMPAT=0x10100000L` to CFLAGS to specify the API version, > which avoids deprecation warnings from OpenSSL 3.0. Changes have also > been made to avoid OpenSSL APIs that were already deprecated in OpenSSL > 1.1.1. The process of updating to contemporary APIs can continue after > this merge. > > Additional changes are still required for libarchive and Kerberos- > related libraries or tools; workarounds will immediately follow this > commit. Fixes are in progress in the upstream projects and will be > incorporated when those are next updated. > > There are some performance regressions in benchmarks (certain tests in > `openssl speed`) and in some OpenSSL consumers in ports (e.g. haproxy). > Investigation will continue for these. > > Netflix's testing showed no functional regression and a rather small, > albeit statistically significant, increase in CPU consumption with > OpenSSL 3.0. > > Thanks to ngie@ and des@ for updating base system components, to > antoine@ and bofh@ for ports exp-runs and port fixes/workarounds, and to > Netflix and everyone who tested prior to commit or contributed to this > update in other ways. > > PR: 271615 > PR: 271656 [exp-run] > Relnotes: Yes > Sponsored by: The FreeBSD Foundation > > ObsoleteFiles.inc | 48 + I guess some files should be removed from ObsoleteFiles.inc. (patch attached) -- Herbert diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 25a1ce080c39..79088dcabaa6 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -9631,22 +9631,17 @@ OLD_FILES+=usr/share/openssl/man/man3/RAND_SSLeay.3.gz OLD_FILES+=usr/share/openssl/man/man3/RSA_PKCS1_SSLeay.3.gz OLD_FILES+=usr/share/openssl/man/man3/RSA_null_method.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_get_ex_new_index.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_need_tmp_rsa.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_custom_cli_ext.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_default_read_ahead.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_ecdh_auto.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_tmp_rsa.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_CTX_set_tmp_rsa_callback.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_SESSION_get_ex_new_index.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_add_session.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_flush_sessions.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_get_accept_state.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_get_ex_new_index.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_get_msg_callback_arg.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_need_tmp_rsa.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_remove_session.3.gz -OLD_FILES+=usr/share/openssl/man/man3/SSL_set_ecdh_auto.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_set_tmp_rsa.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSL_set_tmp_rsa_callback.3.gz OLD_FILES+=usr/share/openssl/man/man3/SSLeay.3.gz From nobody Thu Jun 29 13:01: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 4QsJVV6R5zz4k5QN; Thu, 29 Jun 2023 13:01: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 4QsJVV5y3kz4HF2; Thu, 29 Jun 2023 13:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688043682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bGpapuCgq3bpcbBP3Bze7/NR68HA/Fsi7wLOSRSjKxI=; b=O+M6Iu6N0o5n71kuqAkJIIXevkidZpV/mbOp6ZF5OZmhC8qeonKEXBqEGYWO25yA2ZDhNN zfxj19MV7M5f8Hwgoe/zt41seVnvG3qcvoQcjGTQmDIbhlzc2SEEXCl1AHGXitjK36dtWY UZ0P/w7eA/dU/3o/BLWBmc1zw1G+kG9DkrUr4NG5juYKFcMKCnbgkRQeIlJm9ioNZaqtNR xZjyfhfhBRt4sTBkDidMItjoO1cDADJTm38Bu0DAwEpSCJQ+BXHZ2adksPgDV+9Hb3pafE yjbO1uMHW2HPni82gc4D5Ii8k89Qhc1yn13ZDAU5za74dqe8unB0TXLKH9XSvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688043682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bGpapuCgq3bpcbBP3Bze7/NR68HA/Fsi7wLOSRSjKxI=; b=dXfQzi0fJztYSJAng9pbkfvsc87LcOhysks/Mb+4hlJVEZccfas1GEOwrWR7Sm1SAEPNn1 OVf80ksexqD9p310tcmRQGcATkiYQ5AbZZC0Sf7ibS5MBP+IGAlJ16zoH2qkqgFHEZOR5T cWCXZcSc1P9T75mWPtrQ1T9a7BWQdgx6sH9OBXpkknk5zDoQx34hW1DRSBV6HkrdOsBHo+ KigEe3pb1QCtP/iHmb4wCSWBCWzPhLEOu+6vYXWbzTK08I6dTLdJ/LhC5xu4vLGaE1pX3E ALxS48ONfzaiQXwr25PR60gPoMDKn4dziW/aY7R4L8W57Zv3kIqDN41SP990jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688043682; a=rsa-sha256; cv=none; b=gexNRNHZdoqBrRKRBBfNOuqFaV6yvPqqSBxXk504JY+56ZJhwR8xXqE1kk6fm7vw1YRYGZ cDlzAPOTo9zVlPPbbf1ek9ykvtptI0AZ6aHCoCeLl5IpZ/pCMdqF3VzrMaS8fPVtK1qCcX PH45rnbzLEHsVfJdTq29uGiGV7SDdweHwzmciI4Xlo9TCScu0Bz0ijeEd4vIVJadDWTssy sRkhk+wER/PKYltPc4Xk8nLdtBO8hao7QZi0dLTaW07qE2cmMmdm0oYlhgV3WFDG/CGNZr io1qdU3ludGPRFB0S2D2wOeMGfT6MvsXu+hoklWrhIm6fFpxbAcUbDq+Af+qfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsJVV50FKzHRN; Thu, 29 Jun 2023 13:01: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 35TD1MEa049084; Thu, 29 Jun 2023 13:01:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TD1MMC049083; Thu, 29 Jun 2023 13:01:22 GMT (envelope-from git) Date: Thu, 29 Jun 2023 13:01:22 GMT Message-Id: <202306291301.35TD1MMC049083@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: 81b4bf08955a - main - man: improve man pages for dtrace_sctp and dtrace_tcp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 81b4bf08955a86e51cbc7ff878e95ff5e86e5eee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=81b4bf08955a86e51cbc7ff878e95ff5e86e5eee commit 81b4bf08955a86e51cbc7ff878e95ff5e86e5eee Author: Michael Tuexen AuthorDate: 2023-06-29 12:53:56 +0000 Commit: Michael Tuexen CommitDate: 2023-06-29 12:59:51 +0000 man: improve man pages for dtrace_sctp and dtrace_tcp Reviewed by: manpages MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40796 --- share/man/man4/dtrace_sctp.4 | 14 +++++++------- share/man/man4/dtrace_tcp.4 | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/share/man/man4/dtrace_sctp.4 b/share/man/man4/dtrace_sctp.4 index 7da53ca1f383..7f8490e97ab4 100644 --- a/share/man/man4/dtrace_sctp.4 +++ b/share/man/man4/dtrace_sctp.4 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 22, 2018 +.Dd June 29, 2023 .Dt DTRACE_SCTP 4 .Os .Sh NAME @@ -150,20 +150,20 @@ A script that logs SCTP packets in real time: dtrace:::BEGIN { - printf(" %3s %15s:%-5s %15s:%-5s\n", "CPU", + printf(" %3s %15s:%-5s %15s:%-5s\\n", "CPU", "LADDR", "LPORT", "RADDR", "RPORT"); } sctp:::send { - printf(" %3d %16s:%-5d -> %16s:%-5d\n", cpu, + printf(" %3d %16s:%-5d -> %16s:%-5d\\n", cpu, args[2]->ip_saddr, args[4]->sctp_sport, args[2]->ip_daddr, args[4]->sctp_dport); } sctp:::receive { - printf(" %3d %16s:%-5d <- %16s:%-5d\n", cpu, + printf(" %3d %16s:%-5d <- %16s:%-5d\\n", cpu, args[2]->ip_daddr, args[4]->sctp_dport, args[2]->ip_saddr, args[4]->sctp_sport); } @@ -177,7 +177,7 @@ int last[int]; dtrace:::BEGIN { - printf(" %3s %12s %-25s %-25s\n", + printf(" %3s %12s %-25s %-25s\\n", "CPU", "DELTA(us)", "OLD", "NEW"); } @@ -185,7 +185,7 @@ sctp:::state-change / last[args[1]->cs_cid] / { this->elapsed = (timestamp - last[args[1]->cs_cid]) / 1000; - printf(" %3d %12d %-25s -> %-25s\n", cpu, this->elapsed, + printf(" %3d %12d %-25s -> %-25s\\n", cpu, this->elapsed, sctp_state_string[args[5]->sctps_state], sctp_state_string[args[3]->sctps_state]); last[args[1]->cs_cid] = timestamp; @@ -194,7 +194,7 @@ sctp:::state-change sctp:::state-change / last[args[1]->cs_cid] == 0 / { - printf(" %3d %12s %-25s -> %-25s\n", cpu, "-", + printf(" %3d %12s %-25s -> %-25s\\n", cpu, "-", sctp_state_string[args[5]->sctps_state], sctp_state_string[args[3]->sctps_state]); last[args[1]->cs_cid] = timestamp; diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index dbe3dd7ac099..5372b1a858f0 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 1, 2018 +.Dd June 29, 2023 .Dt DTRACE_TCP 4 .Os .Sh NAME @@ -317,7 +317,7 @@ tcp:::send printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : ""); printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : ""); printf("%s", args[4]->tcp_flags == 0 ? "null " : ""); - printf("\b)\\n"); + printf("\\b)\\n"); } tcp:::receive @@ -333,7 +333,7 @@ tcp:::receive printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : ""); printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : ""); printf("%s", args[4]->tcp_flags == 0 ? "null " : ""); - printf("\b)\\n"); + printf("\\b)\\n"); } .Ed The following script logs TCP connection state changes as they occur: From nobody Thu Jun 29 14: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 4QsKrZ4zX5z4klgN; Thu, 29 Jun 2023 14: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 4QsKrZ4Z67z3LQQ; Thu, 29 Jun 2023 14: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=1688047326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C5TUxalqVEThMrK+fngqO1sYAU3X2KaHnuHrht5MzWU=; b=CY3TLHOmRG9RakHmHHBU2T7cYeVHIFsHxgVvyE32wdBCihBIy+/3kRDqF4eqh41BC6QLlO 8IMtGfhGz+yEZrZeKSV4MRcZhFr8KmiFaKOm3DyQf8zsg3Ev/c+uosksYioq9pD7waKk2T qSu1AE3NkZlroMSz/QznnzkDJCQzbn+PzDRznqEWKnLkrTw0KwECFWfAciOzeb/f+a0cDj WPrqMeftiYIimSG3ZrmKAOPNy9qx+PtVhNhQZ0S912LSUmwf8+ZK8q6oQP00edmDjvjb7d AEOOjjTQsEkqiG0nqzrAOZiozOuAKJkPWCTcPJAQr6eHnuJcD2uFVcQ30Jl4Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688047326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C5TUxalqVEThMrK+fngqO1sYAU3X2KaHnuHrht5MzWU=; b=N1v+H77ZVnFkwsEDdynwWCbSHcKckuNkzPCl0pu6L5MhcIHqm8GFC8OQIKLitsnpefxCPP bo0mroL9SRKIs1Kb2e4wWbxy27vXw0Jrj2hBIIXq/22oEMiMOwZLWZhL2oWfE+XoaDaS5d 74oq5U33x08w99SU5fUhM3SGF2aUpU9DrIKXM57h0grRZWw95m/dIWo0DLylaoUy6az62M Izj5+Q6ZY5yzhzOZ5EUlgV1G9ac1pqkINoxvqsMf7cnU62/iWEYmpN6kWUXgJjdKhZwAY4 qayYIKUwk1w3YxtVEr9YX837Mmzy5kx8tCCvoBlz5lXDQ41x6cqmY1i6NVtwAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688047326; a=rsa-sha256; cv=none; b=tffPKnbLk33Xw3nYykiYMm0KDkwsPgwjRB/LzgtpXAu+2g4ld/LkWxIG2BRhiFS7cDYYPG y3lnQNCjPYP+F2IYNNCZ8sbyekpy+DoqmSFoAs0Gp8y9yTCckY2YJgmyyEz1c/p+VGhL+P 5rwCKj0BWDt9uLbKBg+z8rIMvn91yku5mRTxFBKopiUUTPyQF5EdjiB2CedxofaaBQO7RF e7Ui3MLMlmQ+MQ68w2e5wB/+VM0jEznHzA4wCw/7fC74I39+mN2QTPaVIBVXHruUfwmMkR edpr/N3xqeEiWANCoXQwJ554rkQQCLRaY5sukcEiZblw7SNLTuPY3I53vaQ/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 4QsKrZ3fBhzJPc; Thu, 29 Jun 2023 14: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 35TE26rr054200; Thu, 29 Jun 2023 14: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 35TE264f054199; Thu, 29 Jun 2023 14:02:06 GMT (envelope-from git) Date: Thu, 29 Jun 2023 14:02:06 GMT Message-Id: <202306291402.35TE264f054199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: b5b9eaa96274 - main - Restore and document -ps / -nps 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5b9eaa96274a9c40b06999cadc777c8aeb71d09 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b5b9eaa96274a9c40b06999cadc777c8aeb71d09 commit b5b9eaa96274a9c40b06999cadc777c8aeb71d09 Author: Dag-Erling Smørgrav AuthorDate: 2023-06-29 13:56:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-29 13:59:49 +0000 Restore and document -ps / -nps option. Sponsored by: Klara, Inc. Reviewed by: pauamma_gundo.com, pstef, kevans Differential Revision: https://reviews.freebsd.org/D40788 --- usr.bin/indent/args.c | 2 ++ usr.bin/indent/indent.1 | 10 +++++++++- usr.bin/indent/indent_globs.h | 2 ++ usr.bin/indent/lexi.c | 8 +++++--- usr.bin/indent/tests/Makefile | 3 +++ usr.bin/indent/tests/ps.0 | 4 ++++ usr.bin/indent/tests/ps.0.pro | 1 + usr.bin/indent/tests/ps.0.stdout | 8 ++++++++ 8 files changed, 34 insertions(+), 4 deletions(-) diff --git a/usr.bin/indent/args.c b/usr.bin/indent/args.c index 4d4cc32373a0..58ab9bf4b9f2 100644 --- a/usr.bin/indent/args.c +++ b/usr.bin/indent/args.c @@ -155,12 +155,14 @@ struct pro { {"npcs", PRO_BOOL, false, OFF, &opt.proc_calls_space}, {"npro", PRO_SPECIAL, 0, IGN, 0}, {"npsl", PRO_BOOL, true, OFF, &opt.procnames_start_line}, + {"nps", PRO_BOOL, false, OFF, &opt.pointer_as_binop}, {"nsc", PRO_BOOL, true, OFF, &opt.star_comment_cont}, {"nsob", PRO_BOOL, false, OFF, &opt.swallow_optional_blanklines}, {"nut", PRO_BOOL, true, OFF, &opt.use_tabs}, {"nv", PRO_BOOL, false, OFF, &opt.verbose}, {"pcs", PRO_BOOL, false, ON, &opt.proc_calls_space}, {"psl", PRO_BOOL, true, ON, &opt.procnames_start_line}, + {"ps", PRO_BOOL, false, ON, &opt.pointer_as_binop}, {"sc", PRO_BOOL, true, ON, &opt.star_comment_cont}, {"sob", PRO_BOOL, false, ON, &opt.swallow_optional_blanklines}, {"st", PRO_SPECIAL, 0, STDIN, 0}, diff --git a/usr.bin/indent/indent.1 b/usr.bin/indent/indent.1 index 04e8ad355e28..5a7ca371b0ae 100644 --- a/usr.bin/indent/indent.1 +++ b/usr.bin/indent/indent.1 @@ -30,7 +30,7 @@ .\" @(#)indent.1 8.1 (Berkeley) 7/1/93 .\" $FreeBSD$ .\" -.Dd June 11, 2018 +.Dd June 28, 2023 .Dt INDENT 1 .Os .Sh NAME @@ -78,6 +78,7 @@ .Op Fl npro .Op Fl P Ns Ar file .Op Fl pcs | Fl npcs +.Op Fl ps | Fl nps .Op Fl psl | Fl npsl .Op Fl \&sc | Fl nsc .Bk -words @@ -421,6 +422,13 @@ all procedure calls will have a space inserted between the name and the `('. The default is .Fl npcs . +.It Fl ps , nps +If true +.Pq Fl ps +the pointer dereference operator (`->') is treated like any other +binary operator. +The default is +.Fl nps . .It Fl psl , npsl If true .Pq Fl psl diff --git a/usr.bin/indent/indent_globs.h b/usr.bin/indent/indent_globs.h index ffb70861f5d2..cadf442a2c98 100644 --- a/usr.bin/indent/indent_globs.h +++ b/usr.bin/indent/indent_globs.h @@ -200,6 +200,8 @@ struct options { * lined-up code within the margin */ int lineup_to_parens; /* if true, continued code within parens * will be lined up to the open paren */ + int pointer_as_binop; /* if true, the pointer dereference operator + * will be treated as a binary operator */ int proc_calls_space; /* If true, procedure calls look like: * foo (bar) rather than foo(bar) */ int procnames_start_line; /* if true, the names of procedures diff --git a/usr.bin/indent/lexi.c b/usr.bin/indent/lexi.c index 83178a72b4f6..c47db6baead3 100644 --- a/usr.bin/indent/lexi.c +++ b/usr.bin/indent/lexi.c @@ -492,9 +492,11 @@ stop_lit: else if (*buf_ptr == '>') { /* check for operator -> */ *e_token++ = *buf_ptr++; - unary_delim = false; - code = unary_op; - state->want_blank = false; + if (!opt.pointer_as_binop) { + unary_delim = false; + code = unary_op; + state->want_blank = false; + } } break; /* buffer overflow will be checked at end of * switch */ diff --git a/usr.bin/indent/tests/Makefile b/usr.bin/indent/tests/Makefile index ede9e5ab246c..b9d208cb8285 100644 --- a/usr.bin/indent/tests/Makefile +++ b/usr.bin/indent/tests/Makefile @@ -45,6 +45,9 @@ ${PACKAGE}FILES+= types_from_file.0.list ${PACKAGE}FILES+= types_from_file.0.pro ${PACKAGE}FILES+= wchar.0 ${PACKAGE}FILES+= wchar.0.stdout +${PACKAGE}FILES+= ps.0 +${PACKAGE}FILES+= ps.0.stdout +${PACKAGE}FILES+= ps.0.pro ATF_TESTS_SH+= functional_test diff --git a/usr.bin/indent/tests/ps.0 b/usr.bin/indent/tests/ps.0 new file mode 100644 index 000000000000..0dc72ccfddf2 --- /dev/null +++ b/usr.bin/indent/tests/ps.0 @@ -0,0 +1,4 @@ +struct s { int i; }; +void f(struct s *p) { + p->i--; +} diff --git a/usr.bin/indent/tests/ps.0.pro b/usr.bin/indent/tests/ps.0.pro new file mode 100644 index 000000000000..5fdebee73785 --- /dev/null +++ b/usr.bin/indent/tests/ps.0.pro @@ -0,0 +1 @@ +-ps diff --git a/usr.bin/indent/tests/ps.0.stdout b/usr.bin/indent/tests/ps.0.stdout new file mode 100644 index 000000000000..08f421e984ff --- /dev/null +++ b/usr.bin/indent/tests/ps.0.stdout @@ -0,0 +1,8 @@ +struct s { + int i; +}; +void +f(struct s *p) +{ + p -> i--; +} From nobody Thu Jun 29 14:35: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 4QsLb84JP2z4jrmk; Thu, 29 Jun 2023 14:35: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 4QsLb83frLz3l4x; Thu, 29 Jun 2023 14:35:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688049332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a3xqx99XPYlX0oWzuyt+fhttloo9YxrTcrPCRCNCVsU=; b=n5YiCI/09d3kDfqz/X6+Y0OlLMR7QXklGqwF/oxecZMXGZpYO4BUieB2SSMtnWP3/Xne66 AghKr76Qgfv/ie8RJTyKrTaQF0BTX0PJrYnHhniC2U4Fptu1XRNX1h6sbWb+7Erlm5J2nI gWkVFE7lc4EvEqJTtLVV94iOHsvWCqGDuDv5JVbuOGeH8yZtFkxD9MHdE3Br4w2lC23q3z NQe76UatyKRuwW2vzI2FDIddLsYZCJjK9LzF+MeaitsZWvOkJ5J0eSLulARTbTq51S8Rex RPgO/lc/hKSmBOHehShTCXuITKQnDPOWgZYhAgKgi4D0Y3XGjglfdN/7OaJe+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688049332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a3xqx99XPYlX0oWzuyt+fhttloo9YxrTcrPCRCNCVsU=; b=TIUcIq2lafKuA+aJdiiaHUazEwgBPYZq7mGQ30imYvhDRLJkyD/NHNOQ8aRQOY/gONJYqd xMmxnsNXyLZCqIP9QmfN0GJgyMfeANODVLpis2Y8RjKeCJ39wEXyH79T9qzXTdHWIB6PtH d9kAt+ZdkAknF0fZPo9vn3KlRjEL5CSxEgP/jXu67zYZVfjMWNnYmIuUoGp0Gf4hb7DLuL 434EGxSL+VO/cNqzliLlnoJbookhHVOyxDn2Jjx7wZiKVaHS8go7jwoVAMpPdQ4kAmiP57 EF3cR1Xm/1pZwl/+yNN6wTWH5QjG8kVh/FI5hHRhvMQKzTXoLw6sND4nWsMS9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688049332; a=rsa-sha256; cv=none; b=XxNf2vidriWCGTJapOb+mQ9064Xi+WfV4kgtiWn1840DEpNa5SXsKkmIGRkqZ1pG3TfjHg 2Hz7QVV3SpcVPSRn2BZamYqk9KsxihM5/NIhHEwtTX8NpFz+oGSVim/zQbP7/d+WPSR2Nc AWdSXJDDAdoFG9/PuEHUnc/NxulEz656AFAXuoYBdeIQzvHfZtaZuX89uV7f0NYYr7HYEV GuO81opZ3GeA929Szvy/CAWwKCsloeW9/SUg8Pk/hkZ9cEhGzhKJGKKxMiBVV/YgvBAxK4 ce8B2jLbpnOlfQ4ccAzh+lK3Ii8MDrLRiUYkIfv1Qiv/TEA5u5ELkhOLkQqqaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsLb82knszKnf; Thu, 29 Jun 2023 14:35: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 35TEZWIv003498; Thu, 29 Jun 2023 14:35:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TEZWod003497; Thu, 29 Jun 2023 14:35:32 GMT (envelope-from git) Date: Thu, 29 Jun 2023 14:35:32 GMT Message-Id: <202306291435.35TEZWod003497@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: 319d2bf407b3 - main - atkbc: Better test for old chromebooks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 319d2bf407b3762da6f1c67ffe8dce2fee587aaf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=319d2bf407b3762da6f1c67ffe8dce2fee587aaf commit 319d2bf407b3762da6f1c67ffe8dce2fee587aaf Author: Warner Losh AuthorDate: 2023-06-29 14:24:55 +0000 Commit: Warner Losh CommitDate: 2023-06-29 14:34:47 +0000 atkbc: Better test for old chromebooks Older Chromebooks have issues in their embedded controller (EC) firmware which need working around in atkbd and atkbdc. On these systems, rather than use a standard EC, Google used their own arm-based EC. For a while, its firmware incorrectly implemented the i8042, requiring workaroundsd in the driver. Implement a heuristic recommended by MrChromebox to detect them: If the bios.version starts with Google_, or the maker is either Google or GOOGLE, assume that it's a chromebook with the affected bios. While this isn't strictly true, the number of updated systems without the bug is very small and this will exclude all the non-Google coreboot user that use a standard EC. There's no simple way to test the hardware to see if it's implemented with the buggy EC. Sponsored by: Netflix Reviewed by: jon@thesoo.org, MrChromebox Differential Revision: https://reviews.freebsd.org/D40789 --- UPDATING | 6 ++++++ sys/dev/atkbdc/atkbdc.c | 40 +++++++++++++++++++++++++++++----------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/UPDATING b/UPDATING index 002e30ce2835..3a6255bc6112 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 14.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20230629: + The heuristic for detecting old chromebooks with an EC bug that requires + atkbdc driver workarounds has changed. There should be no functional + change, but if your old chromebook's keyboard stops working, please + file a PR and assign it to imp. + 20230623: OpenSSL has been updated to version 3.0, including changes throughout the base system. It is important to rebuild third-party software diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c index 9a8ab3397706..aa233972335e 100644 --- a/sys/dev/atkbdc/atkbdc.c +++ b/sys/dev/atkbdc/atkbdc.c @@ -109,21 +109,37 @@ struct atkbdc_quirks { const char *bios_vendor; const char *maker; const char *product; + const char *version; int quirk; }; +/* Old chromebooks running coreboot with i8042 emulation quirks */ +#define CHROMEBOOK_WORKAROUND \ + (KBDC_QUIRK_KEEP_ACTIVATED | KBDC_QUIRK_IGNORE_PROBE_RESULT | \ + KBDC_QUIRK_RESET_AFTER_PROBE | KBDC_QUIRK_SETLEDS_ON_INIT) + static struct atkbdc_quirks quirks[] = { - {"coreboot", "System76", NULL, 0}, - {"coreboot", "Purism", NULL, 0}, - {"coreboot", NULL, NULL, - KBDC_QUIRK_KEEP_ACTIVATED | KBDC_QUIRK_IGNORE_PROBE_RESULT | - KBDC_QUIRK_RESET_AFTER_PROBE | KBDC_QUIRK_SETLEDS_ON_INIT}, + /* + * Older chromebooks running coreboot have an EC that imperfectly emulates + * i8042 w/o fixes to its firmware. Since we can't probe for the problem, + * include all chromebooks by matching 'Google_' in the bios version string + * or a maker of either 'Google' or 'GOOGLE'. This is imperfect, but catches + * all chromebooks while omitting non-Google systems from System76 and + * Purism. + */ + {"coreboot", NULL, NULL, "Google_", CHROMEBOOK_WORKAROUND}, + {"coreboot", "GOOGLE", NULL, NULL, CHROMEBOOK_WORKAROUND}, + {"coreboot", "Google", NULL, NULL, CHROMEBOOK_WORKAROUND}, /* KBDC hangs on Lenovo X120e and X121e after disabling AUX MUX */ - {NULL, "LENOVO", NULL, KBDC_QUIRK_DISABLE_MUX_PROBE}, + {NULL, "LENOVO", NULL, NULL, KBDC_QUIRK_DISABLE_MUX_PROBE}, }; -#define QUIRK_STR_MATCH(s1, s2) (s1 == NULL || \ - (s2 != NULL && !strcmp(s1, s2))) +#define QUIRK_STR_EQUAL(s1, s2) \ + (s1 == NULL || \ + (s2 != NULL && strcmp(s1, s2) == 0)) +#define QUIRK_STR_MATCH(s1, s2) \ + (s1 == NULL || \ + (s2 != NULL && strncmp(s1, s2, strlen(s1)) == 0)) static int atkbdc_getquirks(void) @@ -132,11 +148,13 @@ atkbdc_getquirks(void) char *bios_vendor = kern_getenv("smbios.bios.vendor"); char *maker = kern_getenv("smbios.system.maker"); char *product = kern_getenv("smbios.system.product"); + char *version = kern_getenv("smbios.bios.version"); for (i = 0; i < nitems(quirks); i++) - if (QUIRK_STR_MATCH(quirks[i].bios_vendor, bios_vendor) && - QUIRK_STR_MATCH(quirks[i].maker, maker) && - QUIRK_STR_MATCH(quirks[i].product, product)) + if (QUIRK_STR_EQUAL(quirks[i].bios_vendor, bios_vendor) && + QUIRK_STR_EQUAL(quirks[i].maker, maker) && + QUIRK_STR_EQUAL(quirks[i].product, product) && + QUIRK_STR_MATCH(quirks[i].version, version)) return (quirks[i].quirk); return (0); From nobody Thu Jun 29 15:31: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 4QsMr36NDqz4kStj; Thu, 29 Jun 2023 15:31: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 4QsMr34tkwz44QM; Thu, 29 Jun 2023 15:31:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688052707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDB5nUpntFvLiwAOqEYR09unh5prKsn6dFwXqoTKjNM=; b=D9OuBwpvKsxSA2YlyL+pSlBg+khFI9kxADxy8xSvIiqYLZpX4FshPY4iOyA9w+ueOcjvvO 4I25MK8cM3KQcDchQOoZ24B8bSXW8lPeaUaoAaGDIVvOiRllNxslt9Jio4MSeYBqcHx+H9 H0KD9Figz1tfV8Al6YHfPRRDQkeBLhPAgqq9CiY1ZrZtGW6WlEoZVFONBUhZmG1gSzazoi wHpW4W7Is4D7QkiMlHptn80rFm/L+xM+RvoSshg73veGA4BxTy8pmSKdl/CG7dmSMsXbsl YGPjSaElDGoboSFTz/bIPRj/263zlw5MyvZnLq+HyahQQFw23bD73wB1KFuvtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688052707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mDB5nUpntFvLiwAOqEYR09unh5prKsn6dFwXqoTKjNM=; b=MxIdXNG4L0qnCkZ7K2nSfQd0kWG2dA2f7LJw+OYcSCtvxd6XdlZAqhE4tBcYxeOgmDPSZw 803gFDXGipVZpl3wzs97ZW6YUBl3IJvIY26FTQyw7KAbvtf4jLX+LYDgneJjag+6jw9CmU c9Ki9xbybVQa5hu7HDgBfSFPKBaeBSoFN9sE3iwYmJFXPIk9vb4tLNeEmtHoNJFIH0X5hm RxDIM2SbJuF3JMuezP+yLBBZ0Lxd4wXk0i36gS1G3XmUaez5Epg/pBPPVHcB8h0r/ZNDef T6HSS4dFnJWegxLUrlCC4ZT7Nuns94bwPVeDEx2RD0+8QP45LMO5a28rYNpj4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688052707; a=rsa-sha256; cv=none; b=U7237ba6oyGcyx0KO9308ykbiXgmgcuHNvdON3Gr7o8fACnhSqTO0G8p8VdOwfgGB9I7rH Y9MsJmR8YuXsq/28RUdJBOhcWGxPdqRStkojHtGyfM0JTipg91Kr/KF2kdMNiv0+iLapU5 W0TPewfiN4x6wj+zOROA4gkNcu2ijGcT2xzFp3JEIM0sSs8dqb4GH4eHw+HpZLesVlyVpO PeDXpeGEVOSR1nzzjPwAdSA/G1NPqXB1F/2AzV8GRA0lECnukmGxvVtSkqgdzzSYb9trQ1 /KJdcED7iHyGHiSlCKpfQ7kHozXMWlD0Ek+ZMGwSLE3PyYEici2lMgDwA51y4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsMr33h7QzMPd; Thu, 29 Jun 2023 15:31: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 35TFVl9D096373; Thu, 29 Jun 2023 15:31:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TFVlgY096372; Thu, 29 Jun 2023 15:31:47 GMT (envelope-from git) Date: Thu, 29 Jun 2023 15:31:47 GMT Message-Id: <202306291531.35TFVlgY096372@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 78baa632092a - main - stdbuf: Code cleanup. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 78baa632092a87707481a47f47bfd45de9a072ef Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=78baa632092a87707481a47f47bfd45de9a072ef commit 78baa632092a87707481a47f47bfd45de9a072ef Author: Dag-Erling Smørgrav AuthorDate: 2023-06-29 15:30:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-29 15:30:05 +0000 stdbuf: Code cleanup. * Factor out path-setting code. * Normalize usage(). * Remove unnecessary switch case. Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D40799 --- usr.bin/stdbuf/stdbuf.c | 52 ++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/usr.bin/stdbuf/stdbuf.c b/usr.bin/stdbuf/stdbuf.c index ecbcd50a64fb..d80555fd7a5e 100644 --- a/usr.bin/stdbuf/stdbuf.c +++ b/usr.bin/stdbuf/stdbuf.c @@ -36,22 +36,38 @@ #define LIBSTDBUF "/usr/lib/libstdbuf.so" #define LIBSTDBUF32 "/usr/lib32/libstdbuf.so" -extern char *__progname; +static int +appendenv(const char *key, const char *value) +{ + char *curval, *newpair; + int ret; + + curval = getenv(key); + if (curval == NULL) + ret = asprintf(&newpair, "%s=%s", key, value); + else + ret = asprintf(&newpair, "%s=%s:%s", key, curval, value); + if (ret > 0) + ret = putenv(newpair); + if (ret < 0) + warn("Failed to set environment variable: %s", key); + return (ret); +} static void -usage(int s) +usage(void) { - fprintf(stderr, "Usage: %s [-e 0|L|B|] [-i 0|L|B|] [-o 0|L|B|] " - " [args ...]\n", __progname); - exit(s); + fprintf(stderr, + "usage: stdbuf [-e 0|L|B|] [-i 0|L|B|] [-o 0|L|B|] " + " [args ...]\n"); + exit(1); } int main(int argc, char *argv[]) { char *ibuf, *obuf, *ebuf; - char *preload0, *preload1; int i; ibuf = obuf = ebuf = NULL; @@ -66,9 +82,8 @@ main(int argc, char *argv[]) case 'o': obuf = optarg; break; - case '?': default: - usage(1); + usage(); break; } } @@ -87,25 +102,8 @@ main(int argc, char *argv[]) warn("Failed to set environment variable: %s=%s", "_STDBUF_E", ebuf); - preload0 = getenv("LD_PRELOAD"); - if (preload0 == NULL) - i = asprintf(&preload1, "LD_PRELOAD=" LIBSTDBUF); - else - i = asprintf(&preload1, "LD_PRELOAD=%s:%s", preload0, - LIBSTDBUF); - - if (i < 0 || putenv(preload1) == -1) - warn("Failed to set environment variable: LD_PRELOAD"); - - preload0 = getenv("LD_32_PRELOAD"); - if (preload0 == NULL) - i = asprintf(&preload1, "LD_32_PRELOAD=" LIBSTDBUF32); - else - i = asprintf(&preload1, "LD_32_PRELOAD=%s:%s", preload0, - LIBSTDBUF32); - - if (i < 0 || putenv(preload1) == -1) - warn("Failed to set environment variable: LD_32_PRELOAD"); + appendenv("LD_PRELOAD", LIBSTDBUF); + appendenv("LD_32_PRELOAD", LIBSTDBUF32); execvp(argv[0], argv); err(2, "%s", argv[0]); From nobody Thu Jun 29 16:24: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 4QsP132jZTz4l13J; Thu, 29 Jun 2023 16:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QsP132JxNz4Mm3; Thu, 29 Jun 2023 16:24:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688055879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UMwbIT1aL7vcUxUlCqarVGzs0pK3E6PMU1K8+MKDqVM=; b=vqTxRufwP5WVcKvh7w5ibQPxe0Zw8D6mA8tKqHUJmJNamfQZNH7s6otPNjo7Kbkt8a9fv/ EsUIHgJzIsinMNWnJ5k6EkSqSPrawXo2TeFlT66cubl6poab3zJs4aj4gOEDM//Jg/hbm8 UGZjO1GqAx8ks9fuBHKiXv6SHYxz1vxTUYZ9VcJypTTf7vRX4grUQiSVBmDwQxsnMl6lal SWgFSr1l/zG0eqaQ3E+onpbkh7KmiVQrAauSSsWqzmuVfUaEdXW+h4PEcaMQbbNVIJK08W tNLoBvXJ9WMNOpkNqaEWiPlUk2J/poFNBynuOQ7ZOddeD0an9CU4KlFy06IWbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688055879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UMwbIT1aL7vcUxUlCqarVGzs0pK3E6PMU1K8+MKDqVM=; b=fnthK3iZR567qjph3V26Mrbwyv7Dvl2ZbUGWkV9sH1hGuwPb4uTU1+q9C+Aun/SFt+AkVx FV/ucN9VsUXF7f5gv7YIdtnZvSXnvLv7GQcGgz0akGmY+VjkkOOAGJtnvJnA8sim8fJKoQ Ye9f271o81In6IM+4eMN2b9vz93CbUF34XXYf4ioHE6Z31nCB3oScesQnP8gYTHtdCB/Ng KK8j2hW7EhtR4jOQioo8sh2YsENqiM+m6w6GiIcMFAYw8WxRBVsDw0XLRX6X3+6XWmQwQB lGjRhkFhU8WcmbkUBGGWaCJQSKgvnjc8dQj0eax9ddvA/7UO6AjVTUrrocFAWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688055879; a=rsa-sha256; cv=none; b=SL/Cq9aS9eossgEb3oCxJsaVKqOTYT4mSd2xs1NgdPPGTqy5K4Sm82vnu66VtmDAmGBXcl uo0/pW+83zUB5MPXzS0WqNmei8S3PQY7F1GOnbrMWmTc0yi1TJXaE6OZ6WZo5MEDgXcz4M UHXwIqs/NpifznH4K9UIIB3pnzpFWlVXwKFtTRDzxyewPfCWJ432DoZO75I8RlYfnaV5hj 0g4fUNyyQcMmKGptnt5y47mEmXy3GX4P9T5N+KQ9s47HJJJvq2pfDl4lgTf2F+KZ3EtBNe yGcrS1TLejWVrVI5T3SI0sumEYn5YhbTyhRMLm9t5qG9SmE+Oo1Y6X26OynW7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsP131Jp4zNpP; Thu, 29 Jun 2023 16:24: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 35TGOdZW086017; Thu, 29 Jun 2023 16:24:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TGOdCp086016; Thu, 29 Jun 2023 16:24:39 GMT (envelope-from git) Date: Thu, 29 Jun 2023 16:24:39 GMT Message-Id: <202306291624.35TGOdCp086016@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: c09909ed889f - main - libstdbuf: Add proper SEE ALSO 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c09909ed889f4722e68b192e206dff1b03182edb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c09909ed889f4722e68b192e206dff1b03182edb commit c09909ed889f4722e68b192e206dff1b03182edb Author: Dag-Erling Smørgrav AuthorDate: 2023-06-29 16:23:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-29 16:23:45 +0000 libstdbuf: Add proper SEE ALSO section. Sponsored by: Klara, Inc. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D40800 --- lib/libstdbuf/libstdbuf.3 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/libstdbuf/libstdbuf.3 b/lib/libstdbuf/libstdbuf.3 index 9b37cb0224ac..3e1005255e03 100644 --- a/lib/libstdbuf/libstdbuf.3 +++ b/lib/libstdbuf/libstdbuf.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 28, 2012 +.Dd June 29, 2023 .Dt LIBSTDBUF 3 .Os .Sh NAME @@ -82,9 +82,12 @@ output will not stall until the full buffer fills. STDBUF_1=L awk '$2 > 1 || $3 > 1' | cat -n .Ed .Pp -See also the manpage of +See .Xr stdbuf 1 for a simpler way to do this. +.Sh SEE ALSO +.Xr rtld 1 , +.Xr stdbuf 1 .Sh HISTORY The .Nm From nobody Thu Jun 29 16:39: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 4QsPKk3dw1z4jv47; Thu, 29 Jun 2023 16:39: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 4QsPKk37r7z3FTN; Thu, 29 Jun 2023 16:39:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688056746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSWVtASo7wap+HlLAOP9FmTkPLDgWDPObkk6SwAsz2s=; b=fkFS2T0QcxnbNnx8cqoQEzar2IjFzkTXELjC6h4wtkpDpl0C/95FT33eVLJC5oP5KQ3u79 rb60FyFTjnA6l4XAZTGL4oSWIsHel6CIJRevQaEaLjFMyZ+yrpfHX6c7FEu9EDmDMzkaJu zLO7swOi8Hf8+iOQQo4ccirRG59u3oiwpBp3wKLd5A6KoQQ+DQOebPJJrKt8lZ2HF05aMs y5zMHev4yj8R/aPM/LKtk7HezxRNc9Qayc1QUAFRW0k8bDVLhLyYhXK2KqD7/oExp/JUZk J43CmCnoxp3PN1rciQ96yubxPgNr2nDX4tAwIXwlZC7HD6OaEP37SBy9wNIvGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688056746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSWVtASo7wap+HlLAOP9FmTkPLDgWDPObkk6SwAsz2s=; b=skcLH0sbzEUfILmOll2D0BaIyRF1Bgk2ZwOgpHmG3fp/FsRQgCyC+LA8reSPT6nO7wqMae CL+3G6gPVnD2Vyasj8TEPpckhCZ0JA/gBGroa1KMy/nDpLGFdM/XeBzf3iNKmjLLhW7QuN OicYgDC5e0BdvOFfA9BTy5VVgy/uMpGyYer9oTnpXLlWFWhL/4wApqPM4ZPkYtI8YKYL3M MCCPB7WbpcE8jjiJ3HTKuDm8HyAUaUo+Q2YQmlp4QNHOQULs8YRHD68BEodA+RzRZ1YjMy F1/S9PKWR41dO34hgMArjC6mjps8qdUcvTFPVRQtMzCdaDRT4E8gLLD7rwDupw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688056746; a=rsa-sha256; cv=none; b=uolYkqYp1OnaQLnchPWPV8wr2f8FSMhjv7sQvjSK2Xjt4es4geTbQqIivdhwnMM/Ec4uJI nWpZnPVP7etboVqZAavXHvM6Nb4/56yXqljgkJsRuviT9OU3UW2MoboXGAfOL5lEbXDgyH cIkNvkSJkmPdTKjUp5YxNHmoNE834NPXiD+SOBfRqfCcCQjq9rNkY+PP2TrWrUFE3tpgJU zX+AKdczonDc94Kfelvt6Ub1E2zUWqNSspYYqXMr7+qlxsMZzrgutuCLJRu9rlmGpPdSob uhzhq7iODWZ6L8qLbDaT1IRVL8NnPR0+g4MOSnamjBjf4kg7QWXBDSXxl3LzUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsPKk1qZGzP5v; Thu, 29 Jun 2023 16:39: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 35TGd6cm003463; Thu, 29 Jun 2023 16:39:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TGd695003462; Thu, 29 Jun 2023 16:39:06 GMT (envelope-from git) Date: Thu, 29 Jun 2023 16:39:06 GMT Message-Id: <202306291639.35TGd695003462@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: c969310c992a - main - csu: Implement _start using as to satisfy unwinders on x86_64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c969310c992a12459ed4025c1cd8b22f29c763b5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c969310c992a12459ed4025c1cd8b22f29c763b5 commit c969310c992a12459ed4025c1cd8b22f29c763b5 Author: Dmitry Chagin AuthorDate: 2023-06-29 16:34:39 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 16:34:39 +0000 csu: Implement _start using as to satisfy unwinders on x86_64 The right unwinding stop indicator should be CFI-undefined PC. https://dwarfstd.org/doc/Dwarf3.pdf - page 118: If a Return Address register is defined in the virtual unwind table, and its rule is undefined (for example, by DW_CFA_undefined), then there is no return address and no call address, and the virtual unwind of stack activations is complete. This requires the crt code be built with unwind tables, for that remove -fno-asynchronous-unwind-tables to enable unwind tables generation. PR: 241562, 246322, 246537 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40780 --- lib/csu/Makefile.inc | 20 ++++++------ lib/csu/amd64/Makefile | 3 ++ lib/csu/amd64/crt1_c.c | 22 ------------- lib/csu/amd64/crt1_s.S | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 102 insertions(+), 31 deletions(-) diff --git a/lib/csu/Makefile.inc b/lib/csu/Makefile.inc index 1633fa3dc3ea..ee60c3968b87 100644 --- a/lib/csu/Makefile.inc +++ b/lib/csu/Makefile.inc @@ -20,7 +20,6 @@ CRT1OBJS+= crtbrand.o feature_note.o ignore_init_note.o ACFLAGS+= -DLOCORE CFLAGS+= -DSTRIP_FBSDID -CFLAGS+= -fno-asynchronous-unwind-tables CFLAGS+= -fno-omit-frame-pointer CFLAGS+= -I${.CURDIR:H}/common \ -I${SRCTOP}/lib/libc/include @@ -35,25 +34,28 @@ FILESDIR= ${LIBDIR} # These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. .undef LIBRARIES_ONLY +CRT1SRC?= crt1_c.c +CRT1OBJ?= + CLEANFILES+= ${OBJS} ${CRT1OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crti_s.o +CLEANFILES+= crti_s.o ${CRT1SRC:C/.[S|c]$/.o/} -crt1.o: crt1_c.o ${CRT1OBJS} +crt1.o: ${CRT1SRC:C/.[S|c]$/.o/} ${CRT1OBJS} ${CRT1OBJ} ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .if ${MACHINE_ARCH} == "i386" ${OBJCOPY} --localize-symbol _start1 ${.TARGET} .endif -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c +gcrt1_c.o: ${CRT1SRC} + ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/${CRT1SRC} -gcrt1.o: gcrt1_c.o ${CRT1OBJS} +gcrt1.o: gcrt1_c.o ${CRT1OBJS} ${CRT1OBJ} ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c +Scrt1_c.o: ${CRT1SRC} + ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/${CRT1SRC} -Scrt1.o: Scrt1_c.o ${CRT1OBJS} +Scrt1.o: Scrt1_c.o ${CRT1OBJS} ${CRT1OBJ} ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} .if ${MACHINE_ARCH} == "i386" ${OBJCOPY} --localize-symbol _start1 ${.TARGET} diff --git a/lib/csu/amd64/Makefile b/lib/csu/amd64/Makefile index 9f3afb4cc1a0..370d206259d4 100644 --- a/lib/csu/amd64/Makefile +++ b/lib/csu/amd64/Makefile @@ -5,4 +5,7 @@ CFLAGS+= -I${.CURDIR} CFLAGS+= -fno-omit-frame-pointer +CRT1SRC= crt1_s.S +CRT1OBJ= crt1_c.o + .include diff --git a/lib/csu/amd64/crt1_c.c b/lib/csu/amd64/crt1_c.c index 9fe227f2e433..8c57e36becfd 100644 --- a/lib/csu/amd64/crt1_c.c +++ b/lib/csu/amd64/crt1_c.c @@ -29,26 +29,4 @@ #include __FBSDID("$FreeBSD$"); -#include "libc_private.h" #include "csu_common.h" - -void _start(char **, void (*)(void)) __dead2; - -/* The entry function. */ -void -_start(char **ap, void (*cleanup)(void)) -{ - int argc; - char **argv; - char **env; - - argc = *(long *)(void *)ap; - argv = ap + 1; - env = ap + 2 + argc; -#ifdef GCRT - __libc_start1_gcrt(argc, argv, env, cleanup, main, &eprol, &etext); -__asm__("eprol:"); -#else - __libc_start1(argc, argv, env, cleanup, main); -#endif -} diff --git a/lib/csu/amd64/crt1_s.S b/lib/csu/amd64/crt1_s.S new file mode 100644 index 000000000000..0c1c3b960bda --- /dev/null +++ b/lib/csu/amd64/crt1_s.S @@ -0,0 +1,88 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (C) 2023 Dmitry Chagin + * + * 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 + + + .text + .align 8 + + /* + * The program entry point + * %rdi %rsi + * void _start(char **ap, void (*cleanup)(void)) __dead2 + */ + .globl _start + .type _start, @function +_start: + .cfi_startproc + .cfi_undefined %rip /* Terminate call chain. */ + pushq %rbp /* Align stack, terminate call chain. */ + .cfi_def_cfa_offset 8 + movq %rsp, %rbp + .cfi_offset %rbp, -16 + .cfi_def_cfa_register %rbp +#ifdef GCRT + subq $16, %rsp +#endif + movq %rsi, %rcx + movq %rdi, %rsi /* argv = ap */ + addq $8, %rsi /* argv += 1 */ + movq %rdi, %rdx /* env = ap */ + addq $16, %rdx /* env += 2 */ + movslq (%rdi), %rax + movl %eax, %edi /* argc = *(long *)(void *)ap */ + shlq $3, %rax + addq %rax, %rdx /* env += argc */ +#ifdef PIC + /* + * XXX. %rip relative addressing does not intended to use in the + * large memory model due to offset from %rip is limited to 32 bits. + */ + leaq main(%rip), %r8 +#else + movabsq $main, %r8 +#endif +#ifdef GCRT + movabsq $eprol, %r9 + movabsq $etext, %rax + movq %rax, (%rsp) + /* + * %edi %rsi %rdx %rcx %r8 %r9 (%rsp) + * __libc_start1_gcrt(argc, argv, env, cleanup, main, &eprol, &etext) + */ + callq __libc_start1_gcrt +eprol: +#else + /* __libc_start1(argc, argv, env, cleanup, main) */ + callq __libc_start1 +#endif + int3 + .cfi_endproc + .size _start, . - _start + + .section .note.GNU-stack,"",%progbits From nobody Thu Jun 29 16:53: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 4QsPfD6FpVz4k44M; Thu, 29 Jun 2023 16:53: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 4QsPfD5fXlz3KDQ; Thu, 29 Jun 2023 16:53:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688057604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WOUP4YeZ5ErkNOBflshy2pTwTuuNb7Vea3C2U6b/Lpc=; b=SvcpgP7AwLrzMViQso5BO1ro8mGIiKSUzrbM5r/9fDAVx3l6ffqpkW7Tsf61tBBbChCiCC s4s/ePH5fzaOC0CadXSlo8I/YBcOCXLS0HQkg4O/lk9+KSbO1UU0JyLsB3/If24+fo89mu Xgg6EOmu/7fq5SGigfvntD5Dx5Qsbeqd4/GZyL0TKBuxA7RD7lSLLgFmOtRxD4GGDKspeb a44oRt++QKy/CBJUTMwaHFpn6uTHgt5M+4hJjugymHJzEOCUZCjDEfBrBAU+7luntuYJSD JF8wI4C1j1AajfSb5uo5PIkJg+KAN42jnX8pfBs0fD0D21VuZmnIbSKLtOdf+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688057604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WOUP4YeZ5ErkNOBflshy2pTwTuuNb7Vea3C2U6b/Lpc=; b=tHqA+6QIsfixcEs8xoWss1Hv8zA3RP2gj6mLOkO70gg1Xe+ARuZxcOlr8ACTbrr968yt1b 446cuRltBcnr55FgfL5CmfjWyL9loMBdkTFVYobUY/g5tuygp3OZcm9oeUzVvolGLW1pxN OLII+c3F+TxNjlxYJ4D7/fNjTITo2q1gcc4oUrjZ/tEhN3Gzp0Eb06qCmDAG88ZhNxlyrE oOgXyleKo3ru+BbFzigcOY6E0xH08zAZPj+qOaP+WnBSraNlgKsHRxIIVgFzR6oMexF4n5 4xd0trgOlRQCC0B98OmUbADCoNZZt3jLGBYVKVtHs9AZtVQu5/5Pe2Xs0UG1OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688057604; a=rsa-sha256; cv=none; b=Ofyp4Yn+S1CTIVublPHpcvkJhAxolWLEnDWE65AdnGiafb+o+Cste2S2JsXXrS+icFiRvw DvjuiMOJ7ZtOnj58DSUvw0B13OxEtgdQ8c1U3hMM/YwJ3A5u/v56juo/2GdcXEaTpM6EAD OJeIJVLGpvP8WqK8cHAY6hvbAbAl8iv2pgf8SOdU++vkFEAi5nv1rnNlSPZKEtZWXIbUrQ T6b0RwXvos0Lxvo/4Pz0uqjpmK3Xtv34NDqIpIM0ygXnL3O6n/3EqLNUjN62QAkXnvW6x6 ZPtvgKtW3xX+nvRbF08Gpx3cAVzeemcvGVkXmRsnd4vU5l8BaOpA26bDwe7IQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsPfD4kyKzPn2; Thu, 29 Jun 2023 16:53: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 35TGrO9k035550; Thu, 29 Jun 2023 16:53:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TGrO45035549; Thu, 29 Jun 2023 16:53:24 GMT (envelope-from git) Date: Thu, 29 Jun 2023 16:53:24 GMT Message-Id: <202306291653.35TGrO45035549@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: a18b956b73ce - main - libexecinfo: Enable backtrace_test.backtrace_fmt_basic on amd64 again List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a18b956b73cee784e5c422d20fd0e4dabebd7eee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a18b956b73cee784e5c422d20fd0e4dabebd7eee commit a18b956b73cee784e5c422d20fd0e4dabebd7eee Author: Dmitry Chagin AuthorDate: 2023-06-29 16:53:07 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 16:53:07 +0000 libexecinfo: Enable backtrace_test.backtrace_fmt_basic on amd64 again Due to unwind tables generation enabled after c969310c for csu. PR: 241562, 246322, 246537 Reviewed by: kib, ngie Differential Revision: https://reviews.freebsd.org/D40758 --- contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c b/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c index a86465004a3d..6655119cb9c7 100644 --- a/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c +++ b/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c @@ -151,11 +151,6 @@ ATF_TC_HEAD(backtrace_fmt_basic, tc) ATF_TC_BODY(backtrace_fmt_basic, tc) { -#if defined(__amd64__) - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/246537"); -#endif - myfunc(12); if (prevent_inline) From nobody Thu Jun 29 16:55: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 4QsPhm1B0yz4k5Lx; Thu, 29 Jun 2023 16:55: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 4QsPhm0lddz3L0C; Thu, 29 Jun 2023 16:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688057736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PADd/NA955VDnDmQjkgfmSYpfXcHxkj113Tqs67esD8=; b=kSCkabULDWn+yXgIy8/cvuN1uy2PTtKTGLJdrjaWsCLEFkRVGF5DgddFgM6oAsDTs4HhNA u5XxeiDL2Acv9dQnSkmwI8vU4wGFRL/jlvv/fUWQSmBtPXKPuqotNKnWfjjepeeMX5GcfA XYC0jQfT1uS76dDnT8anY5BCPn5Wi80T4Be4q3B5GTs2SelGv9svRHMCSbhNUIZrhJB9uz Ijx6QC7VpMrmd8IP0cqvzRsPik2qbyeLUH2KijBRdKqN//7GjzD3PtnqBGazMdFmorgq55 ZVrsB58cEwmMXTCv7BjbFjl3eZmoDPcS9eJCF9eNqp4wrlenDhLQSk+ndb0CKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688057736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PADd/NA955VDnDmQjkgfmSYpfXcHxkj113Tqs67esD8=; b=Rx9soKHXII7mg7BfUpaUsDEABSdTDXU8yR68YViTqIVYGWiZcM7Q7onydiX2Os7+9aSCkD qMRLG11vhNra0n8IoLESGP6bK/kP5009GpYD+wH9P3qbe5vduFtlJ7bIfSKUjIAyEvfoVt EKAMX6wduH9Fd0H++wSHo1/+RFzYXNxTdVCIAR/vT8GkTubmSmiKeIdphVPEbIPVewyUOH w9ChPlxzWf/2Fu0IU3qLCJjUSR9n/EY+kCqlVXyjAYkKB/sye3lwnXcwhdTfCaj4IBZmt8 NW7Ag4zTbdI9DaMisnZfMuidAUPGfuKLnueUCUQb+TCRY1ZPIP1cNPFK/lbZSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688057736; a=rsa-sha256; cv=none; b=TvUSRfdTfVXWCceooR6YPkJsdzz+il/A/Dxpj93s/+JVE5h5I1AIRiYElKcwqCH0BTHZtX v6zGqoByz/rwyvXo/U7y0UKQV/C7SdO0eBNZRPMZeJOuXz9qF2oJBffp1Z2Ad80IGT6sKX Zqqkrm5rbu0jmOw1/rUKbGHnRMR8aB8WOMl80Qf3Os44waLMJ86P2ckjP8xTwRcmZxC1Yf C9XBYezxXgMpiCSHEw0kZYCrx8mnAWXDYpFiRlEQ/PXGeg16El09mYgenZxrE7URj14jWz l4g/Yqb9RRxiJi5c9TsimpaPNA+g2pTrPYYqGTQ7lijXn72Tk7uJScwb+q8rEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsPhl6xvSzPSK; Thu, 29 Jun 2023 16:55: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 35TGtZXH035916; Thu, 29 Jun 2023 16:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TGtZUx035915; Thu, 29 Jun 2023 16:55:35 GMT (envelope-from git) Date: Thu, 29 Jun 2023 16:55:35 GMT Message-Id: <202306291655.35TGtZUx035915@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: 651d1efd96a6 - main - hier(7): adjust overlays/ 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 651d1efd96a692a141a4c61d54d6a41ee2c0d851 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=651d1efd96a692a141a4c61d54d6a41ee2c0d851 commit 651d1efd96a692a141a4c61d54d6a41ee2c0d851 Author: Mitchell Horne AuthorDate: 2023-06-29 16:53:52 +0000 Commit: Mitchell Horne CommitDate: 2023-06-29 16:55:17 +0000 hier(7): adjust overlays/ subdirectory Device tree overlays are installed in /boot/dtb/overlays by default. Adjust the comment to mention fdt_overlays and loader.conf, but do not repeat what is said in the parent directory's description. PR: 261349 Reviewed by: grahamperrin, kevans MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40785 --- share/man/man7/hier.7 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 5ed12c814b6a..bf0bb5050de3 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 27, 2023 +.Dd June 29, 2023 .Dt HIER 7 .Os .Sh NAME @@ -54,6 +54,15 @@ compiled flattened device tree (FDT) files; see .Xr fdt 4 and .Xr dtc 1 +.Pp +.Bl -tag -width "overlays/" -compact +.It Pa overlays/ +compiled flattened device tree (FDT) overlays; these can be applied using the +.Va fdt_overlays +setting in +.Xr loader.conf 5 +.El +.Pp .It Pa efi/ mount point for the EFI System Partition (ESP) on UEFI systems .It Pa firmware/ @@ -65,11 +74,6 @@ and kernel modules .It Pa modules/ third-party loadable kernel modules, such as those associated with .Xr ports 7 -.It Pa overlays/ -compiled flattened device tree (FDT) overlays; see -.Xr fdt 4 -and -.Xr dtc 1 .It Pa zfs/ .Xr zfs 8 pool cache files From nobody Thu Jun 29 18:07: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 4QsRHR4TH6z4jt72; Thu, 29 Jun 2023 18:07: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 4QsRHR3kFJz3y1d; Thu, 29 Jun 2023 18:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688062035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NOCzACqHuEKxi/D8E+5mNzlHFVozBShe74VFgUSXcEc=; b=SPqy44Cbr5rzc3IBt6NZCLhgZW+luBXH6PgjweZI0mJY6SrTPWgDiXsvL7uzvllYL0cKS4 toXese+LkeFj+1HQopnJOPvQC53fEVpDMWU5OfS0EVbEu9hHbgxgU0r87LXiblDHTP8Ko3 JkWrBHLUwGlmxHCbRvJ8YR7uZFbAGpSw3fEqev9sg9KGPEwcQ6QsMErwJ4WNxmlL8OGy76 UotiV6BT1ouRiNyan1FQPXKx9C41kX4jz4XJ3EothPMwNu1JYtnngXiLY0CQsPHxwene9F Xqu9BUg33jwGfX8Z8UFGwGcCV7l4dB1C1lRZOGeh3Znd+oXJeRYSl2AMR7pzYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688062035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NOCzACqHuEKxi/D8E+5mNzlHFVozBShe74VFgUSXcEc=; b=BP8X71hkE37qMTcdqcQEgbWqw2ctaXvnGp+QhfMGYAG2AMlmxQmcBg1unqWdg71cC1TlY/ Kl8zhReGBGnyG+H1GB1K+FRU96PurOd+cKyu9RWv476RPvUGXWmjx/mnU3qcz9xxP9dkUL vOIG978WG7qLx4WaZUnlicAXWTkHhDGclu7ap1KIKqAoNSDJ57bQDCpemav9bCC/sQWM6v B52zYczUYzp8HX03t40304lirsA3zKOtQfhYLa0uOAFZvQ9y1YOatwwhvs8fUhPYRCzZyd H6G77RNCok05daJ+e34TfARdMCgaEZo6kHDd4nW8+TtFLD0Sq7PJpK7Yd0OWng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688062035; a=rsa-sha256; cv=none; b=Oj60xR0kJNycCar4CfJ5CgDXpYxuRE0+RW89vcGeFh8tgQdvPAAx1kmjnKzkBybLoOeH2h dghi1gGcaM26iCBNNWuNpHoT4w/1Z0ULsLqAHFcKFYIWW6Q7Nrxzuf3/Oj6W4/+9kV8uBl NFSFXEposyDlvcufU7HwnHUa1zbtIWq48nWzX9tdLLeYumYCQNIDQ++QyxL6e6W41k1qML i9jblXkjxICeFGNPua1fi+2JaFbJdGx15ZfmUozv8G9g6gOue5ViBo3luoKLQQ58+k7tNn p/ZazyDcSCGsSvuBd7yJBE2cFmwBcPmdKDTtA6FhK/H1jMqDo8hMnQi5GRFzFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsRHR2mrszRQk; Thu, 29 Jun 2023 18:07: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 35TI7FPL052226; Thu, 29 Jun 2023 18:07:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TI7Fhb052225; Thu, 29 Jun 2023 18:07:15 GMT (envelope-from git) Date: Thu, 29 Jun 2023 18:07:15 GMT Message-Id: <202306291807.35TI7Fhb052225@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: e59d202312f9 - main - arm64: make VM_NFREEORDER and the comment describing it match List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e59d202312f9868583c6603030ded2476085920d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=e59d202312f9868583c6603030ded2476085920d commit e59d202312f9868583c6603030ded2476085920d Author: Alan Cox AuthorDate: 2023-06-28 08:23:09 +0000 Commit: Alan Cox CommitDate: 2023-06-29 17:48:48 +0000 arm64: make VM_NFREEORDER and the comment describing it match The setting of VM_NFREEORDER and the comment describing it were copied from sparc64 where both the page size and the number of page table entries that fit in a cache line are different from arm64. Reviewed by: andrew, kib, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40782 --- sys/arm64/include/vmparam.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index b28a79256453..23b7d0d87c94 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -89,14 +89,15 @@ #define VM_FREELIST_DEFAULT 0 /* - * An allocation size of 16MB is supported in order to optimize the - * use of the direct map by UMA. Specifically, a cache line contains - * at most four TTEs, collectively mapping 16MB of physical memory. - * By reducing the number of distinct 16MB "pages" that are used by UMA, - * the physical memory allocator reduces the likelihood of both 4MB - * page TLB misses and cache misses caused by 4MB page TLB misses. + * When PAGE_SIZE is 4KB, an allocation size of 16MB is supported in order + * to optimize the use of the direct map by UMA. Specifically, a 64-byte + * cache line contains at most 8 L2 BLOCK entries, collectively mapping 16MB + * of physical memory. By reducing the number of distinct 16MB "pages" that + * are used by UMA, the physical memory allocator reduces the likelihood of + * both 2MB page TLB misses and cache misses during the page table walk when + * a 2MB page TLB miss does occur. */ -#define VM_NFREEORDER 12 +#define VM_NFREEORDER 13 /* * Enable superpage reservations: 1 level. From nobody Thu Jun 29 18:26: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 4QsRjJ3r7cz4k4y6; Thu, 29 Jun 2023 18:26: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 4QsRjJ2xcxz477x; Thu, 29 Jun 2023 18:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688063172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PNXIBeM7NN+/OZQbE+f7IilJQjYDD8SageMcSSgBRcY=; b=khsfPimCkL3CrKwH7b9sq69zDuuui9WyVLwz4lkqWEf9yz4ocYEuxuOHIKys5rI9JfFUtW eo99XxGoS59gVYYkOOFX+HeZvOFvxg7/HfW8XkIj4+Nd7SjN4ABG0xqbuZYisBxc+SITkR bruf4e/CauLDp4alIntrjyFG+s3NPY4Yd7bqqG/dGzp7jxW5aA/WDL8OeF1fokmZNWPSjV cr1mrasBl60F2qJWn8BOEfXRhhK0H6en7I34nqybBXEfME9fZXRaCFfQD7CA6CelNQ/wFC kkbhHGRN6UFuEmFnZe0xRWnQ8w80aMzAe49NRxxgCUoNaYd6Q5GCC4l7DYJCMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688063172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PNXIBeM7NN+/OZQbE+f7IilJQjYDD8SageMcSSgBRcY=; b=XjX+y+fUz9jskWNiqFo4ARn//AlvrmUQZ187zsOoqr94llhrlzz+uo4agYrQGsCxyranY3 n12WxyW20oSEuKOvnz/mJjAA8ShCnUjXul4obYrgOul3R3RjaICqHUSbv5Vb9zZU0TDmbu 5bivSO9gTt0urJt0rTllsxHKlh0ZhtatlS3kdQSm631MTlQ06quRbf73bcBDP40qVxkkhL zR7ZF0pRdE1W2/WGZOgsj72vDfdYVGjO7cF3sINWKnDSDIeF0llVk74zlm6EW43zlbQX77 qOm7Zhcvnh2gEAXdgcukX3yOeU6wipqhRN51aAlgUhrPiHWR5ScFvSPrIL1x1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688063172; a=rsa-sha256; cv=none; b=gFYm5S+kN0TpY9H9pYOf8kSaTQKo+Kj/aniAhIhK72z2oIu/D0wAcxj6APmXuKvayp8+sS 306Yer83H3UVS60Bm3CBW29cZm2ud7I6zayItGOQmEcJOZCXVAmq9Gf7wDIbFmzg9V8YxE wM/6xBDi8fxKWlidIZFlf8pWy8ApeoeOTWMGBWphTLQ6eSosVlff022VCA83KG45+4tRDw PCpydDCm80RxY4OrS1dBcOYTeJp5gTHwHxyHTolhITLHpVFbjcJ+9LBv93NV6zg1gESbzs CSUD2sFl+HmSD0MZT1HmYI7xWrCDiVFMAIIuwWK6zwOeVq7NM/RyNVJn9R8qUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsRjJ21LFzRwt; Thu, 29 Jun 2023 18:26: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 35TIQCj0085093; Thu, 29 Jun 2023 18:26:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TIQCqm085092; Thu, 29 Jun 2023 18:26:12 GMT (envelope-from git) Date: Thu, 29 Jun 2023 18:26:12 GMT Message-Id: <202306291826.35TIQCqm085092@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: 529f11385caa - main - tcp(4): fix a misnomer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 529f11385caaf79933ff2d8e1a8798a1c29e6c49 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=529f11385caaf79933ff2d8e1a8798a1c29e6c49 commit 529f11385caaf79933ff2d8e1a8798a1c29e6c49 Author: Mitchell Horne AuthorDate: 2023-06-29 18:24:46 +0000 Commit: Mitchell Horne CommitDate: 2023-06-29 18:25:54 +0000 tcp(4): fix a misnomer This is almost certainly not the meaning of PCB used here. Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40786 --- share/man/man4/tcp.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 382e39a4355d..8ba37474fd1d 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 6, 2023 +.Dd June 29, 2023 .Dt TCP 4 .Os .Sh NAME @@ -776,7 +776,7 @@ which both endpoints are local. .It Va path_mtu_discovery Enable Path MTU Discovery. .It Va pcbcount -Number of active process control blocks +Number of active protocol control blocks (read-only). .It Va perconn_stats_enable Controls the default collection of statistics for all connections using the From nobody Thu Jun 29 19:02: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 4QsSWm1Dxrz4kTB0; Thu, 29 Jun 2023 19:03: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 4QsSWm0p9xz4LtX; Thu, 29 Jun 2023 19:03:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688065380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U43N3VctwbgeTIM+uzxrM+KwXTbtMtcscnCBd/ms11M=; b=Qj1s5Lfr7hoPPfxbEIe+Kz09CqO1tHdpcfKydXoi3haH2mGCfeLipkyX5jbsnteaQH3Dt0 CfTtSJjZale3oXvABbcG3N1dRWYAhdXt8yUiVbjrGjbJirPHeMa2Gggnajy8jn8ay24OwZ Ag63vgJV0+AExn0+ROzNytqnKsaKdCwACFfylG04r2NbWtAfXwHIk0srNBtIlkuvaciJTi zJUfFX5g9k5+kU4EpqwNB1PwaCevTNnqAv+ofpFQr3OGLQmlZQgtq82l3uP+SBO43kHuwG t3t7ktlcbICjLy4zBQBNQ8hBQZvnrhhiujEz+iJ2/j+ACWfs8WSQkMt0h4BWBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688065380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U43N3VctwbgeTIM+uzxrM+KwXTbtMtcscnCBd/ms11M=; b=cWyIwkzj0VnoGgUom+2pPhgFZ7X5BdwZdKjv6sMwxlml6eT5yCi7zpdHbnauLqwTa3Nl9T UCBmXoaLnKzKXckeQZU2KRX+vSwvTHc/QHV6QNkPuP2nC2BU84HpeUjF7gQWpdmzr6/nMO 0VnQnmv6/lHQmXitEAlQitnQKXWP5XrxLLaBSqEFdyGcHGptgzecphso8/cnorxe5k9YyT kv4PECAGZVoH0PB6oXgcg9liIviOXF46MNuo5qLVfnb+J2j4vBiyDM9HeqRY5KJKIT+tP1 NDLJt0jfB3ZSQpEMaGnso3PbVdr+HuUXchbkUDD9KaaHlkpL64eKu/9i9OhyWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688065380; a=rsa-sha256; cv=none; b=azgbuKQ0f9Vwbb1DGH/r6on5vuB5dW64vdFbiS/VklMuFtv1KO4l4jthrA7uIpWP5lUnHy dcmQjhymH1J/YP/udiv2CXWoVWkbAUlsxtXf2bpOjRlmJ+75TFy/VzFtvhZh9C5RBVOC2P Pe+fzGXDeIK95h+GTboIu2PT1KqGwyP/xIid80Dej70EBURqtpGVPRNI2c6Zag4DcF5vo2 tkt/qUB1GZI2wzugpvDBwt0G+o27bhuzknm7BKpLoygf3njUdI4vWpZx/Y1TZ5qWDGdQ4w 2p49d1xE6JAmQCBg+fxEtqEpmVjwPzCu6AnHNNvrtTxYFmInDmPwACupnMOGRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsSWl6yzjzSTF; Thu, 29 Jun 2023 19:02: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 35TJ2xx8051213; Thu, 29 Jun 2023 19:02:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TJ2xYs051212; Thu, 29 Jun 2023 19:02:59 GMT (envelope-from git) Date: Thu, 29 Jun 2023 19:02:59 GMT Message-Id: <202306291902.35TJ2xYs051212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 84c84ae15b31 - main - BOOT_MACHINE_DIR should be stand not boot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84c84ae15b31e71375a9f713432cd69265a21fe7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=84c84ae15b31e71375a9f713432cd69265a21fe7 commit 84c84ae15b31e71375a9f713432cd69265a21fe7 Author: Simon J. Gerraty AuthorDate: 2023-06-29 19:02:27 +0000 Commit: Simon J. Gerraty CommitDate: 2023-06-29 19:02:27 +0000 BOOT_MACHINE_DIR should be stand not boot Reviewed by: stevek --- share/mk/local.sys.dirdeps.env.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/local.sys.dirdeps.env.mk b/share/mk/local.sys.dirdeps.env.mk index fdc03cae29eb..bbac39935ad8 100644 --- a/share/mk/local.sys.dirdeps.env.mk +++ b/share/mk/local.sys.dirdeps.env.mk @@ -13,14 +13,14 @@ TARGET_SPEC_VARS?= MACHINE MACHINE_ARCH ${.MAKE.DEPENDFILE_PREFIX} # some corner cases -BOOT_MACHINE_DIR.amd64 = boot/i386 +BOOT_MACHINE_DIR.amd64 = stand/i386 .-include ALL_MACHINE_LIST?= ${TARGET_MACHINE_LIST} .for m in ${ALL_MACHINE_LIST:O:u} -BOOT_MACHINE_DIR.$m ?= boot/$m +BOOT_MACHINE_DIR.$m ?= stand/$m .endfor HOST_OBJTOP ?= ${OBJROOT}${HOST_TARGET} From nobody Thu Jun 29 20:17: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 4QsVBH5j8Nz4k0bX; Thu, 29 Jun 2023 20:17: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 4QsVBH5DV8z3nLJ; Thu, 29 Jun 2023 20:17:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688069879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gZqxD7CGpE6gaxR1s19eBj+4uE8N4VGNaFs33Q+Dx8=; b=UMNz6Ixvum72dIapmDkjfA8DLcDf5Sd92tB2R33G+w/hiLrS0AfotPoEwkqHrje2RFXcxa E0CLi13QPLsCEy+6T3OiFergCdwPL30TjvAG3qhJEpya74M+yo6wpw/bLPTEwD1kE2lHd+ e6jvrWQ8cqTzE1qdUEfQ8W3g3Nq8NB6vJme3UTCkKCcP4x2wacpndxnXV6EvTqtYUEy0Cp kZBq99aY/yhAQjoNGIowssvv7tihE8hjpTSk5IXMJu1n3sUfI45apMrcRMJZroOaAa4KkU IiaKUK0jEj+aXi2n1a7TeivvhBesWBuQ8uUDMaRy5g++bjmeUpoCEfv87b30Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688069879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1gZqxD7CGpE6gaxR1s19eBj+4uE8N4VGNaFs33Q+Dx8=; b=H2xRfBHvJC4UFYlq8qF0rIHe5zwja+QiLh5oJXpRwr5L9iyiyUudZufma0iYI+LLfmk/aQ //Tc4riq9m4AlNdQ1KYkEa4q+izR+YeEPDPmizW/U883/cOLGPt5d0C3Ac4Z214Dxz4O7D Mo8qExQQjGSrpO/D6P+Va85Ys1Xxko1MOuTIr+9Mmid5QqkT/FP4DYYppJDZpsxS8s+bQ1 /9gZ8Ft89x0Pdk8Fe8xj233RXMSVnilfwvNg8q5lYoe6rGYv/kv4AMPOWCQk14TiEOu4YV GQ/OteRAzOGhM9yuNiZtL/UfjdbRJvc44rGOJdyM7wAXD3Jyyhi1G2UzJY/2QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688069879; a=rsa-sha256; cv=none; b=VsTAqVH8kUvFRzb91vGQrNGTNi4/60VV9JQWHpVtkcD9lZYL7wSQYh7HY3qkezAAZd0NIa 99xzX+RDSOvOO4fzPc0WP4kiroDyRXnshRE2XQcwffKtM7+LfhaVBNYhd0LBJkJLjv7e2k 0xkyQRcyFxzJ+oLvjvU3KkLSspBJB2+JwrN+v46K+dCSKWF7YKNEgsVLOUxaeHEWZEDzt7 h+IJsQpgh6nCZiLyGoOCeHSe0H191xTVlNag9qpWZViLy9KDErFGWa7yErAkrx7M9AfIu+ q3mAv0IqMy/uuNJAMm8fdzjgPI+c3c7YJHLASiKF/+/NjIZ+qDd89D7cNknBOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsVBH49PSzVXZ; Thu, 29 Jun 2023 20:17: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 35TKHxd4067140; Thu, 29 Jun 2023 20:17:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35TKHxVo067139; Thu, 29 Jun 2023 20:17:59 GMT (envelope-from git) Date: Thu, 29 Jun 2023 20:17:59 GMT Message-Id: <202306292017.35TKHxVo067139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: d2a45e9e817a - main - openzfs: use IN_BASE instead of IN_FREEBSD_BASE in spa.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: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2a45e9e817ad68f3e163d13404744b8ea9c675b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=d2a45e9e817ad68f3e163d13404744b8ea9c675b commit d2a45e9e817ad68f3e163d13404744b8ea9c675b Author: Yuri Pankov AuthorDate: 2023-06-29 18:22:50 +0000 Commit: Yuri Pankov CommitDate: 2023-06-29 20:14:18 +0000 openzfs: use IN_BASE instead of IN_FREEBSD_BASE in spa.h Consistently use IN_BASE to allow libzfs to get the same default autotrim value as kernel does. Note that this does not change the default value itself, rather fixing the source of value and the value itself in e.g. zpool get output if it was not set explicitly. (And as a reminder, default value of autotrim on FreeBSD is 'on', despite what zpoolprops(7) says currently.) PR: 264234 Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40075 --- sys/contrib/openzfs/include/sys/spa.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/include/sys/spa.h b/sys/contrib/openzfs/include/sys/spa.h index 1fa2044008dc..ac0847793c84 100644 --- a/sys/contrib/openzfs/include/sys/spa.h +++ b/sys/contrib/openzfs/include/sys/spa.h @@ -723,12 +723,12 @@ typedef enum spa_mode { * Send TRIM commands in-line during normal pool operation while deleting. * OFF: no * ON: yes - * NB: IN_FREEBSD_BASE is defined within the FreeBSD sources. + * NB: IN_BASE is defined within the FreeBSD sources. */ typedef enum { SPA_AUTOTRIM_OFF = 0, /* default */ SPA_AUTOTRIM_ON, -#ifdef IN_FREEBSD_BASE +#ifdef IN_BASE SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_ON, #else SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_OFF, From nobody Thu Jun 29 21: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 4QsWFj2p9lz4kGpd; Thu, 29 Jun 2023 21: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 4QsWFj2P9Kz3xLs; Thu, 29 Jun 2023 21: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=1688072761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo1+txX00zDB8/pM7lpKZwqToDdLNye8zyhZd3jDMfo=; b=cL+3u1dv8JpYrUNGxBdbjxbxj1XtBX+HOzTK+70cDoP/G+G8SxRBFo1+d3741d6rDZVjtZ ssj2ozVJVNdh0vWSc22/ZpXJor30Y8zuS6ROcFD4XrKpLFhz1Dz8XTbXAVo6uzOf+SuP8f cBLmBVMe1g0S4iAGrxbtrUNpoaDm5SMvb0WBrkIEq8csRVITb+wvyzgjeHMs/fp0alm7sE OuDiYc/WH1NHYLmBzWir2zIwf2EFu26dyz9frley5XqTSdFG3yOLXl2YDYikyP3IwDcbrV 7F+oAmxwy0stm2RV+myHoQmFV+hJhxpgjQRoWOQBq/c6a0krRI3oBFveOYI+ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688072761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo1+txX00zDB8/pM7lpKZwqToDdLNye8zyhZd3jDMfo=; b=B8mc/88/p10L3kr+vBGT7STrGsH+tWGB88268T9a5TSJQKBn6/uT8vzBh4s4lHQxCAM44+ x6ScXoo3sNRzfYh7bdCOIj86DQGgChqWz0asTWJnPQEW7sgJInjmt+ZOltTV2q9NFY11w8 1ryt8k/Wbvpjr5XDWHH/KKitJpkLH+lBjNRqUa8AxurIwV8dJHlHlSfbHkVgGPKqOZr+KA HXmNO39Z3z8bnM7RAVnodmFpeqOdFuCyG9rDeqv53R7gf2ObipLZkxRjrv4MgF8sWg715Y viRoctcMIS1EfwU/ScuhfApM2BIQDJLDOK4ljGW1Z5bAFTYzSrZfS93wFrmdiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688072761; a=rsa-sha256; cv=none; b=CO9+JSu1Yf6s6Q4ffXjwYV9+3Q4sqOLsf7J4ppWnDEtxS74bwURM37gWZmVJi9mNkoPL0N Xe93/vZ7LkR0R08XzlB3DUHaWTC01Ar8633ZFwrtY5BPFcBqI6DFXq5C8LuH9PB2poSZV5 9mS3JXvOxt6vIJDk9l07obzcODs+BfZxYbzCejW+Ko64pu9uo2v6JzGscxr+FUMS8n0t6o Cz06ixiRyC7uSXnFIjZIhuSVRdx7YwMkw2mOb8DonTCTijehNERonRD7OZDTMkmEtAO8VV +F6iJ8LFGb/+PHxmorE14wPOFMUNyywQ7sKYUmgIdN6gGUosyDAyrRuk+oV4bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsWFj1TGpzX4b; Thu, 29 Jun 2023 21: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 35TL61oK048888; Thu, 29 Jun 2023 21: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 35TL61Wh048887; Thu, 29 Jun 2023 21:06:01 GMT (envelope-from git) Date: Thu, 29 Jun 2023 21:06:01 GMT Message-Id: <202306292106.35TL61Wh048887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: af2939f227db - main - Revert "openzfs: use IN_BASE instead of IN_FREEBSD_BASE in spa.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: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af2939f227db4a80c0ee463adbcdd6608731dacb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=af2939f227db4a80c0ee463adbcdd6608731dacb commit af2939f227db4a80c0ee463adbcdd6608731dacb Author: Yuri Pankov AuthorDate: 2023-06-29 20:57:02 +0000 Commit: Yuri Pankov CommitDate: 2023-06-29 21:04:35 +0000 Revert "openzfs: use IN_BASE instead of IN_FREEBSD_BASE in spa.h" Further testing (sadly, after committing) shows that I missed the fact that IN_BASE is used as userland/kernel delimiter (and not just for FreeBSD-specific code unlike the IN_FREEBSD_BASE). Revert until I have a full (and proper) fix. This reverts commit d2a45e9e817ad68f3e163d13404744b8ea9c675b. --- sys/contrib/openzfs/include/sys/spa.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/include/sys/spa.h b/sys/contrib/openzfs/include/sys/spa.h index ac0847793c84..1fa2044008dc 100644 --- a/sys/contrib/openzfs/include/sys/spa.h +++ b/sys/contrib/openzfs/include/sys/spa.h @@ -723,12 +723,12 @@ typedef enum spa_mode { * Send TRIM commands in-line during normal pool operation while deleting. * OFF: no * ON: yes - * NB: IN_BASE is defined within the FreeBSD sources. + * NB: IN_FREEBSD_BASE is defined within the FreeBSD sources. */ typedef enum { SPA_AUTOTRIM_OFF = 0, /* default */ SPA_AUTOTRIM_ON, -#ifdef IN_BASE +#ifdef IN_FREEBSD_BASE SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_ON, #else SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_OFF, From nobody Fri Jun 30 06:52: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 4QsmGp6XY2z4kX75; Fri, 30 Jun 2023 06:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QsmGp5qj6z3JMs; Fri, 30 Jun 2023 06:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688107970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Svb/p8gIcHjw5kRdXmMtsvvbVu0ucEMqEdqSBUlBb1Q=; b=unjGKVFTAEZjBSzcgtyvraD07tcGmVSLrTsOJ8zzffoqHFFm9Bf3q1/uLCGG9C5Xzu21ps nMzc32in7aU7dFd4e/uxqFZR6YRSuzOo+j5hLPpDNF3ciasDiJn2fqzll94zM361SU8FiF DNlVvBbMGQ2z1sOeJs7hYUA6e1WBndVnbqezokhnX/L2l4ZWhUJHG2eT+LV738JpQ4oSWn e3JFQ2qpMnyylraPgonxuQOF52oR+5Zlf5iYaFWx2RDzBan0B1lHm7+oHReU4PjLTqlQG3 TD6xHU6zJLvL/gwD12i/AAE81g3LolJbnf3tmccMfBjvuCn2zz66+p0vTjfdew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688107970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Svb/p8gIcHjw5kRdXmMtsvvbVu0ucEMqEdqSBUlBb1Q=; b=eDdBFD4nkwrjp044EW3xnNfX7wy13Ibj3WTqXKygjgR4lfNQoAMTy4wvdp7qwxKszk0P/m i9DGHXQd4U/pmrAtAWl38n1ZotaciBCCNw1nkUP2k62Ai2QI9fZ/bqpd5B3Av7Hx52vfxF CYvxRmXOY1R3UpN5FIWWrAXv4kB9HU5eQien8CzcSRvQj4lnTH+945qSlZq4gRZYT9YYRG KgBXIu6ZdffrPfit/Ppw+htrKyEAxQ2IpiAbssvUf3ISQowgwa4yV0rN5QeFN9JS+/x83S +fTAu31OnC26SNYZc2AZns1hy34rcOFJ2qpZpY2LxKGggMizT5LvlPeFD0cYXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688107970; a=rsa-sha256; cv=none; b=KY6y2xMM6X/alLH8pT6JrSK+AAFiH9D+36hqN01DrY0wTXRZu9eSGPiS/wFsTemTVPmOQb njf36+mXKfAoV6ZZ6OsXF+MRFmMhlCTYqRsSsg8F/ZudaaSbKmV4XkUOzSLv8Nn4bUTkp0 4xJHtG9N+qSPjuCq46tiGpV4JTZxga5Tw8Svrn1VqtUTk4FJvAMeA4W8Qu/NjDHjZMpAPh 7u0uYP+4/V2h+iXZMjZu5bCAJUyIi3kIjvxLLoXdnGB81qgq6S+o+RzGPCa3yoqKTj72iP G2ccRTkA2/6XPYiPJ/be/2am5hWofK+oV9wqkPIL13y54zKETflbB6eB5Bgdgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsmGp4vC4zpNZ; Fri, 30 Jun 2023 06:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 35U6qoYZ027108; Fri, 30 Jun 2023 06:52:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35U6qoVC027107; Fri, 30 Jun 2023 06:52:50 GMT (envelope-from git) Date: Fri, 30 Jun 2023 06:52:50 GMT Message-Id: <202306300652.35U6qoVC027107@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: fcc8d727023c - main - Separate dependencies on tools built for host. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fcc8d727023c3ac0f12b8aebc50f892cfd32992b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fcc8d727023c3ac0f12b8aebc50f892cfd32992b commit fcc8d727023c3ac0f12b8aebc50f892cfd32992b Author: Simon J. Gerraty AuthorDate: 2023-06-30 06:52:03 +0000 Commit: Simon J. Gerraty CommitDate: 2023-06-30 06:52:03 +0000 Separate dependencies on tools built for host. When generated files depend on tools that need to be built for host, we need to carefully separate them for the DIRDEPS_BUILD so we only build them once. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. --- bin/sh/Makefile | 9 ++++++--- usr.bin/awk/Makefile | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 039da7309adc..fafc223b4b29 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -44,22 +44,25 @@ build-tools: mknodes mksyntax DEPENDOBJS+= mknodes mksyntax mknodes mksyntax: ${BUILD_TOOLS_META} +builtins.c builtins.h: mkbuiltins +syntax.c syntax.h: mksyntax +nodes.c nodes.h: mknodes .endif .ORDER: builtins.c builtins.h builtins.h: .NOMETA -builtins.c builtins.h: mkbuiltins builtins.def +builtins.c builtins.h: builtins.def sh ${.CURDIR}/mkbuiltins ${.CURDIR} .ORDER: nodes.c nodes.h nodes.h: .NOMETA -nodes.c nodes.h: mknodes nodetypes nodes.c.pat +nodes.c nodes.h: nodetypes nodes.c.pat ${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat .ORDER: syntax.c syntax.h syntax.h: .NOMETA -syntax.c syntax.h: mksyntax +syntax.c syntax.h: ${BTOOLSPATH:U.}/mksyntax token.h: mktokens diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile index f604684804fa..ee8f7c3f282b 100644 --- a/usr.bin/awk/Makefile +++ b/usr.bin/awk/Makefile @@ -22,12 +22,13 @@ CLEANFILES= maketab proctab.c awkgram.tab.h awkgram.tab.h: awkgram.h ln -sf ${.ALLSRC:M*.h} ${.TARGET} -proctab.c: maketab awkgram.tab.h +proctab.c: awkgram.tab.h ${BTOOLSPATH:U.}/maketab awkgram.tab.h > proctab.c .if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" DEPENDOBJS+= maketab build-tools: maketab +proctab.c: maketab maketab: awkgram.tab.h ${BUILD_TOOLS_META} .endif From nobody Fri Jun 30 06:52: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 4QsmGr0hcbz4kXSS; Fri, 30 Jun 2023 06:52: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 4QsmGq6kfDz3JT9; Fri, 30 Jun 2023 06:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688107972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BfUT5bew5D7ORKqJbFBQxQYO/LNXt5veexN71+W+jS4=; b=K2/zux9tJHoWhzJ7ezlUHTZ28LndIXOj/zLyOvLveHJ5ykrUt4BXk+hXaEhVueBPwo7OEb AdMThpI5ENGE/Lb1lBknOjEzrfPEGwQ1ehrnZOj9IJ9EAyj3Pc2fyBJ4Gdb2ZX34P/ZXGw pwsx/x/RhjEEKKz8SGaaZJ3R3j8AO1rt/p3YOO8xX5vUJDQXyyCP8lHZu2snOHnKzFL1eH 0pnCFjfy6Oo32NnO0C1c8tJcDOLfE83qmXOzZwdpnbAR7apEOKp5bZ6RTKLPea0z2u5yxW KBYx78Iwan4Cc6YTqmKlWvKlsuldbUYE/eWcfW2cMrceLCRBbJSjMBdlO++Zmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688107972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BfUT5bew5D7ORKqJbFBQxQYO/LNXt5veexN71+W+jS4=; b=ZqiJm0zjh8jPisi49af4tVTHe6wMP0hryMeuAYjKPkGQxQ565OJwDK5dw3OyX5w3j3BA5A uO14G2qxFTjGuerJRwBowGlN7gY8v0xHMOnhvgY2bbZUkp2pk4cFJsxiZCSE4BptMKSj62 E1QsJaIKu4CCC65apywlNrc4ifv5vYu+pOXlnbKISXUdwjqp7duWOUg4zd6FMjL1x66VXF Jsfg0ZWJuxRdw5SUL7sUBbDrK4LW6cB2OYpRP9T1E8ZJOJ6/QV/59+MUwticZcg2H1V2Vr VZLsvY37QFikyTmVRrAdSJZdswsX0678tbGZB00G3EjmnC1+r3BLX0IBp4+Kig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688107972; a=rsa-sha256; cv=none; b=Y4aDj28tD+Y6DuqkiANGysBxK2BlXgDIQoEWX5pR/BgA+SbMKKljUhu6p9Bs/8EpEbibHB UA1uOOYaKjtA4UHjcCeQaALGU15ZXN2s8zlF+jLpep64lml+CM7Lqu8cHMqe3fb5upVsmi xULYq0oY1JC06lvtvCtaxCNrGSOcyo86seGivVDSLJ5Hs/MvuSRCLZsNIGJjWwQpEu/FFf VUK0GJZ4uuI0oK3OJGlHvN3h5KKvcvJBoPZGmYut5SQVRuG26+vmuTSseFSzeN0Edk8Mdq y4nfm86VOjtzJZbd8x9JbZ86fR1PS1SaLdFTBrGkBD0BiHEsp6kvh149PBgSAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QsmGq5gj1zpfv; Fri, 30 Jun 2023 06:52: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 35U6qpGE027127; Fri, 30 Jun 2023 06:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35U6qpgP027126; Fri, 30 Jun 2023 06:52:51 GMT (envelope-from git) Date: Fri, 30 Jun 2023 06:52:51 GMT Message-Id: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used 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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56f3f2d2491e30f369f9461c3cb2a366bdffbe1d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=56f3f2d2491e30f369f9461c3cb2a366bdffbe1d commit 56f3f2d2491e30f369f9461c3cb2a366bdffbe1d Author: Simon J. Gerraty AuthorDate: 2023-06-30 06:52:17 +0000 Commit: Simon J. Gerraty CommitDate: 2023-06-30 06:52:17 +0000 libsecureboot: avoid set but not used errors Reviewed by: stevek --- lib/libsecureboot/openpgp/opgp_sig.c | 22 ++++++++++++---------- lib/libsecureboot/vets.c | 7 +++++-- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/libsecureboot/openpgp/opgp_sig.c b/lib/libsecureboot/openpgp/opgp_sig.c index eec3469e3457..7f4e6fb98fd1 100644 --- a/lib/libsecureboot/openpgp/opgp_sig.c +++ b/lib/libsecureboot/openpgp/opgp_sig.c @@ -464,20 +464,22 @@ verify_asc(const char *sigfile, int flags) size_t n; unsigned char *fdata, *sdata; size_t fbytes, sbytes; - + + fdata = NULL; if ((sdata = read_file(sigfile, &sbytes))) { n = strlcpy(pbuf, sigfile, sizeof(pbuf)); - if ((cp = strrchr(pbuf, '.'))) - *cp = '\0'; - if ((fdata = read_file(pbuf, &fbytes))) { - if (openpgp_verify(pbuf, fdata, fbytes, sdata, - sbytes, flags)) { - free(fdata); - fdata = NULL; + if (n < sizeof(pbuf)) { + if ((cp = strrchr(pbuf, '.'))) + *cp = '\0'; + if ((fdata = read_file(pbuf, &fbytes))) { + if (openpgp_verify(pbuf, fdata, fbytes, sdata, + sbytes, flags)) { + free(fdata); + fdata = NULL; + } } } - } else - fdata = NULL; + } free(sdata); return (fdata); } diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c index 4375dfa76a89..12191097ff8c 100644 --- a/lib/libsecureboot/vets.c +++ b/lib/libsecureboot/vets.c @@ -241,11 +241,14 @@ x509_cn_get(br_x509_certificate *xc, char *buf, size_t len) mc.vtable->start_cert(&mc.vtable, xc->data_len); mc.vtable->append(&mc.vtable, xc->data, xc->data_len); mc.vtable->end_cert(&mc.vtable); - /* we don' actually care about cert status - just its name */ + /* we don't actually care about cert status - just its name */ err = mc.vtable->end_chain(&mc.vtable); - if (!cn.status) + if (!cn.status) { buf = NULL; + if (err == 0) /* keep compiler happy */ + buf = NULL; + } return (buf); } From nobody Fri Jun 30 08:17: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 4Qsp8b6W1Jz4jsqB; Fri, 30 Jun 2023 08:17: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 4Qsp8b5zgvz4Qsj; Fri, 30 Jun 2023 08:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688113055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a4NQapghSRIoM871m190P5HX0sC+7zdeS7FY63q6moM=; b=VlpOMY5YxxVhhDJEXrsQxTItfUIqdWDP0+BJs0v2XVefALUao6wcYMiWkeU/SQhLcnwZiV aTPvMZ1CkJ0qq5PBC5eLS8yeVKbyaLpQMtrLLi/3l6Hxv09KZssw6XqSXGgPAKEF5wWTG+ 8YJDmXOibWdfyd53SA6e3e+qCr8IZf/jObqoF/dYtYszzZVEjpReA/vnC8dt2TVzYT5OPX fl/sQdWdKCku2Bp/EuCoOU3hLLd22z/vxlGb0HDfeneP//Luuiq+Z8w1TUQBgTUlT1uwMs i5twoHbS9j6q6CJL0U5CvRz9qnEm74bsewhEuC2q9+13RNuNl9o4uS9BT9f5/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688113055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a4NQapghSRIoM871m190P5HX0sC+7zdeS7FY63q6moM=; b=Gh79PVoW0dWU36/jRRfemAPNTdj7dvm0ZCa8DsThWAmh1IrSOm0Yn+JD4ZyPuLlcy+aymF I43VS9IzZabo2GAtJBX8tvDQCbLGCHFma0anbsaAOfZmSnbta+P+PNaRvskBiZqeH+LSxW wynCgiKI0tt5/laba1zoK2osVnoHZrCk9YqeI1BeG8aOc08YDF09WPrakKz0BNHCU8NSBT fls5dbH2iuCqggxO+w8v+ybTFTHdzmCfHtMPLWTU70T+8bVD0NitkKgzLD3UKaIMb2eoza s6tSonTtpK6A333IaqAor36/u9X0cbNrNpnc3o96eXL8Jq0WFG7TX80hw1h6WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688113055; a=rsa-sha256; cv=none; b=XX/gn9lQm2r9GDlyrqbWDAj6ASHEC21xoJB6+wum5oSW+ikQNshTc+9fKj86RnuO2vitRn uVXtp6s6DeOqogGD20YUGIHgHxe90+mCHFJcMOwxNCVCkh7kpfcM8uJiTJLBYzEA1+ZMpJ 7Dq3UqdTvucVM2p9QNyFX8jWQyVcPtnt1q7O/Nsf0Rrnvw7UvYA7rFUBa4z8QWxD9WIrgw dM3J94SftL62fbrs0vSFPtm7UaKRuB5QobyuJo9vXBSu/8ki6JHOxsRjpMjKQPGk6W3Y4Y /zlXLBKIGUyb/U+KBWLBQ+6mXuaGHY1XIqTtLG4vQlVIdCHLiUZkIJG6RMgcJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qsp8b4wgNzrhD; Fri, 30 Jun 2023 08:17: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 35U8HZZS070233; Fri, 30 Jun 2023 08:17:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35U8HZtX070232; Fri, 30 Jun 2023 08:17:35 GMT (envelope-from git) Date: Fri, 30 Jun 2023 08:17:35 GMT Message-Id: <202306300817.35U8HZtX070232@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: 0aeee1f074a7 - stable/13 - pf: fix some cc --analyze 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0aeee1f074a7a5e53d5a8f1c2eb61bd5285f4fae Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0aeee1f074a7a5e53d5a8f1c2eb61bd5285f4fae commit 0aeee1f074a7a5e53d5a8f1c2eb61bd5285f4fae Author: Mateusz Guzik AuthorDate: 2021-10-19 11:57:47 +0000 Commit: Kristof Provost CommitDate: 2023-06-30 07:06:44 +0000 pf: fix some cc --analyze warnings Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit bcd4c17ccaacf995224882dc1d05e2a51867bdf2) --- sys/netpfil/pf/if_pfsync.c | 2 +- sys/netpfil/pf/pf_ioctl.c | 2 +- sys/netpfil/pf/pf_norm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index b05e1ae9550a..9cf1071b3248 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -2545,7 +2545,7 @@ VNET_SYSINIT(vnet_pfsync_init, SI_SUB_PROTO_FIREWALL, SI_ORDER_ANY, static void vnet_pfsync_uninit(const void *unused __unused) { - int ret; + int ret __diagused; pfsync_pointers_uninit(); diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 00021655605b..07463ecbbcf3 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5639,7 +5639,7 @@ hook_pf(void) { struct pfil_hook_args pha; struct pfil_link_args pla; - int ret; + int ret __diagused; if (V_pf_pfil_hooked) return; diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 56b30faf7e52..cac9c1fe391f 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1002,7 +1002,7 @@ pf_refragment6(struct ifnet *ifp, struct mbuf **m0, struct m_tag *mtag) DPFPRINTF(("refragment error %d\n", error)); action = PF_DROP; } - for (t = m; m; m = t) { + for (; m; m = t) { t = m->m_nextpkt; m->m_nextpkt = NULL; m->m_flags |= M_SKIP_FIREWALL; From nobody Fri Jun 30 14:41: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 4Qsygj0gYmz4kSQl; Fri, 30 Jun 2023 14:41:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qsygh47g2z41Yb; Fri, 30 Jun 2023 14:41:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688136096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pY1MAzfvA2hT27ouf9qEAuPC2iJga1eTx88Cu9fQMWk=; b=KOybUmC39EJP0pqSsQAYuYCr9AJ7rTyqeaC/B6a5fWMqyWFtwhfpjVHvI+cPDGdX1c/rzm FiQ/k5cGs/7yGiw8PxditmTvJ+kiwVBUm1cS4aYMvqHAxI/dFO0I5Xl3Mfs9gJoGRMNxBI m3jdg1FCyh3SJRMAxYk7oQRotRVeF6JPGB4HlUBLg8t3JNTBN+t+cI9ZgPUMs1oF1QhWFv QwY7UWTRtffIBKdyV4lkmlHDnuUB2rMXXTSHHxKIASBf9MpCANCFUDHcxiGS7yOG3Qhi9L Axh1uM86b9eoRtrxKkUhE/NqiT+X+dsd725XsgcWzrHXeWiPSXZJZy/52L50dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688136096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pY1MAzfvA2hT27ouf9qEAuPC2iJga1eTx88Cu9fQMWk=; b=FWqbNfjBq8XBTu04NuZOozKwlzgVpKcykkKwSIP0yGPnQ3PfxeynVLrYBm1zt7SyE0j1rX 1sTCFrt9ZJpZN1SSjEjXU6fcAz/w6GXV2oaiHs2hD0nbszR9/D04k/SjhgIJ1J07cHTzc8 ZP7aCdXQAPPrc7xMGHCm8FkqhiWBsR7fJhIawaw+7nr9HgDU88SNDXKZ9GglcRr2VUyApy UlWw38aNgWEIBX5B+kFW5zaRF5bAN6gJFAuFmBMo7XTqMb7+peICOLIoZ4FEgWfE18xJKV oMD8qcJAGQVCGRdM/2jBnCm/xrQhocxpCic2CfVjOUwmkECysjr9kjarx3VTew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688136096; a=rsa-sha256; cv=none; b=LeqF6dj9dEjjIaoW0zbqvyoZphZgVqo4IhLGTMKdObosr6W6tyKzwVz/SZ3ahMpyrLSyyY XjQToPH0ai2Jigx4Phf6F7iv562kzUAc+I5aaZz0OGX6J5Cp9Gut2U340lzM0rhu8cagm4 J9Mm75b1M1lihPezHVHyegP2enMCRk9LBYmg9e1/5q5j0G0cdZIu2VzlHKO81pg+xogimn REN1MxN52VCEc0370T4aeWc6jrr/KBjnA97VvFBriX270Wa1tTH058FXBnv8fsb7hVpEBn vwCXF7Ko9lmDexOrEhCvifXnXrxg7u1s5lr187Gu49nnQXyhO8SSIPW0MUGiAA== Received: from [IPV6:2601:648:8680:16b0:9018:f799:cdac:ccb1] (unknown [IPv6:2601:648:8680:16b0:9018:f799:cdac:ccb1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qsygh0CnHzbYq; Fri, 30 Jun 2023 14:41:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <2512b2e6-8b57-995f-6901-a1e00a4e9238@FreeBSD.org> Date: Fri, 30 Jun 2023 07:41:34 -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 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: "Simon J. Gerraty" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> From: John Baldwin Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors In-Reply-To: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 6/29/23 11:52 PM, Simon J. Gerraty wrote: > The branch main has been updated by sjg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=56f3f2d2491e30f369f9461c3cb2a366bdffbe1d > > commit 56f3f2d2491e30f369f9461c3cb2a366bdffbe1d > Author: Simon J. Gerraty > AuthorDate: 2023-06-30 06:52:17 +0000 > Commit: Simon J. Gerraty > CommitDate: 2023-06-30 06:52:17 +0000 > > libsecureboot: avoid set but not used errors > > Reviewed by: stevek > --- > lib/libsecureboot/openpgp/opgp_sig.c | 22 ++++++++++++---------- > lib/libsecureboot/vets.c | 7 +++++-- > 2 files changed, 17 insertions(+), 12 deletions(-) > > diff --git a/lib/libsecureboot/openpgp/opgp_sig.c b/lib/libsecureboot/openpgp/opgp_sig.c > index eec3469e3457..7f4e6fb98fd1 100644 > --- a/lib/libsecureboot/openpgp/opgp_sig.c > +++ b/lib/libsecureboot/openpgp/opgp_sig.c > @@ -464,20 +464,22 @@ verify_asc(const char *sigfile, int flags) > size_t n; > unsigned char *fdata, *sdata; > size_t fbytes, sbytes; > - > + > + fdata = NULL; > if ((sdata = read_file(sigfile, &sbytes))) { > n = strlcpy(pbuf, sigfile, sizeof(pbuf)); > - if ((cp = strrchr(pbuf, '.'))) > - *cp = '\0'; > - if ((fdata = read_file(pbuf, &fbytes))) { > - if (openpgp_verify(pbuf, fdata, fbytes, sdata, > - sbytes, flags)) { > - free(fdata); > - fdata = NULL; > + if (n < sizeof(pbuf)) { > + if ((cp = strrchr(pbuf, '.'))) > + *cp = '\0'; > + if ((fdata = read_file(pbuf, &fbytes))) { > + if (openpgp_verify(pbuf, fdata, fbytes, sdata, > + sbytes, flags)) { > + free(fdata); > + fdata = NULL; > + } > } > } > - } else > - fdata = NULL; > + } > free(sdata); > return (fdata); Most of this change seems to be avoiding reading the "real" file if the filename from the signature file was too long to fit into pbuf which I think is a different change? > } > diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c > index 4375dfa76a89..12191097ff8c 100644 > --- a/lib/libsecureboot/vets.c > +++ b/lib/libsecureboot/vets.c > @@ -241,11 +241,14 @@ x509_cn_get(br_x509_certificate *xc, char *buf, size_t len) > mc.vtable->start_cert(&mc.vtable, xc->data_len); > mc.vtable->append(&mc.vtable, xc->data, xc->data_len); > mc.vtable->end_cert(&mc.vtable); > - /* we don' actually care about cert status - just its name */ > + /* we don't actually care about cert status - just its name */ > err = mc.vtable->end_chain(&mc.vtable); For cases like this I've removed the variable and used a (void) cast instead to indicate that the return value is intentionally unused. > - if (!cn.status) > + if (!cn.status) { > buf = NULL; > + if (err == 0) /* keep compiler happy */ > + buf = NULL; > + } > return (buf); > } > -- John Baldwin From nobody Fri Jun 30 14:42: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 4Qsyj40WPzz4kSjC for ; Fri, 30 Jun 2023 14:42:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qsyj361Vjz43QW for ; Fri, 30 Jun 2023 14:42:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3fbc77e76abso7744075e9.1 for ; Fri, 30 Jun 2023 07:42:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688136166; x=1690728166; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nu8s0PokcjkQ52Gkrw1IpnpH+FqERViYUyABgSUu/dE=; b=OMtzMHtvGM6XIsUhi+R1Jf6xS6NM+isKkWd0+EETQc148Y02gh5h1H/560DFRV1spn p1LJxIr/g4PtCccgjki3DxazRhaT3zZReDMImlSxdxALhZgHC6DbUO7x7oJEzf25yjMZ YGldbDcHLgE4CsPzpGfoBEivhu/u+q+C0x5qW6udI/jpz5ZkOkPuc2PW6ISdHOYWPKO0 2Z/Ur1ftIKNPQgb4fDXWmfQegXntWw4pSya2AjNT6/yxrGP+qOC/Rl6jLI9JBQblGjYH PUapNyvQLvl8JAZib3QZneFLPEXd541Y0Awz/uLAtfMPkl+ekejO+w5OGU+9og3TNhCD Uh3w== X-Gm-Message-State: AC+VfDx4Fdi50/X2//7ruNcmTfrkg5wUuvyIT3I6ThN77aVj6113/vvU BXev790W16wkpA1ECKOLgUtoT1TUKdABDr54KG+Tcg== X-Google-Smtp-Source: ACHHUZ4WM/AMppHlKVi9r8iUwuqOFmLMoN9WbUjy8It0O5RuTpKLZGjH7LRx3b9nHcHSTaSZeSvsZg== X-Received: by 2002:a7b:cc15:0:b0:3fb:abd0:2b52 with SMTP id f21-20020a7bcc15000000b003fbabd02b52mr2145803wmh.13.1688136165806; Fri, 30 Jun 2023 07:42:45 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id c14-20020a7bc84e000000b003f8126bcf34sm22075072wml.48.2023.06.30.07.42.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jun 2023 07:42:45 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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 \(3731.600.7\)) Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors From: Jessica Clarke In-Reply-To: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> Date: Fri, 30 Jun 2023 15:42:34 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> To: "Simon J. Gerraty" X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4Qsyj361Vjz43QW X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 30 Jun 2023, at 07:52, Simon J. Gerraty wrote: >=20 > The branch main has been updated by sjg: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D56f3f2d2491e30f369f9461c3cb2a366= bdffbe1d >=20 > commit 56f3f2d2491e30f369f9461c3cb2a366bdffbe1d > Author: Simon J. Gerraty > AuthorDate: 2023-06-30 06:52:17 +0000 > Commit: Simon J. Gerraty > CommitDate: 2023-06-30 06:52:17 +0000 >=20 > libsecureboot: avoid set but not used errors >=20 > Reviewed by: stevek > --- > lib/libsecureboot/openpgp/opgp_sig.c | 22 ++++++++++++---------- > lib/libsecureboot/vets.c | 7 +++++-- > 2 files changed, 17 insertions(+), 12 deletions(-) >=20 > diff --git a/lib/libsecureboot/openpgp/opgp_sig.c = b/lib/libsecureboot/openpgp/opgp_sig.c > index eec3469e3457..7f4e6fb98fd1 100644 > --- a/lib/libsecureboot/openpgp/opgp_sig.c > +++ b/lib/libsecureboot/openpgp/opgp_sig.c > @@ -464,20 +464,22 @@ verify_asc(const char *sigfile, int flags) > size_t n; > unsigned char *fdata, *sdata; > size_t fbytes, sbytes; > - =20 > + > + fdata =3D NULL; > if ((sdata =3D read_file(sigfile, &sbytes))) { > n =3D strlcpy(pbuf, sigfile, sizeof(pbuf)); > - if ((cp =3D strrchr(pbuf, '.'))) > - *cp =3D '\0'; > - if ((fdata =3D read_file(pbuf, &fbytes))) { > - if (openpgp_verify(pbuf, fdata, fbytes, sdata, > - sbytes, flags)) { > - free(fdata); > - fdata =3D NULL; > + if (n < sizeof(pbuf)) { > + if ((cp =3D strrchr(pbuf, '.'))) > + *cp =3D '\0'; > + if ((fdata =3D read_file(pbuf, &fbytes))) { > + if (openpgp_verify(pbuf, fdata, fbytes, sdata, > + sbytes, flags)) { > + free(fdata); > + fdata =3D NULL; > + } > } > } > - } else > - fdata =3D NULL; > + } > free(sdata); > return (fdata); > } > diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c > index 4375dfa76a89..12191097ff8c 100644 > --- a/lib/libsecureboot/vets.c > +++ b/lib/libsecureboot/vets.c > @@ -241,11 +241,14 @@ x509_cn_get(br_x509_certificate *xc, char *buf, = size_t len) > mc.vtable->start_cert(&mc.vtable, xc->data_len); > mc.vtable->append(&mc.vtable, xc->data, xc->data_len); > mc.vtable->end_cert(&mc.vtable); > - /* we don' actually care about cert status - just its name */ > + /* we don't actually care about cert status - just its name */ > err =3D mc.vtable->end_chain(&mc.vtable); >=20 > - if (!cn.status) > + if (!cn.status) { > buf =3D NULL; > + if (err =3D=3D 0) /* keep compiler happy */ > + buf =3D NULL; This is nonsense code. Jess > + } > return (buf); > } >=20 From nobody Fri Jun 30 16:43: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 4Qt1Ms35f7z4kS6D; Fri, 30 Jun 2023 16:43:05 +0000 (UTC) (envelope-from mhorne@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 4Qt1Mr6H3Cz3Qk8; Fri, 30 Jun 2023 16:43:04 +0000 (UTC) (envelope-from mhorne@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688143384; 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=gub6khM6wuucOCC/zryUY1GzeGTsRkDCe+PXfGqxOSY=; b=TZr+ukpmA61u9A8gYYoB3FOpuqJbQIZfxjqJ/jRB6dyl4fvcCGJD10Jy9RctVCn4YelKIC 7yj/7e5t3FJy1kcR01JjerOFC8ZEAFIll0ri/xrrwVbxQQ20HUWaPX/PMR8ZgFV/QiVNw+ mwzF8s5S1lcNRzZSgndcSGNPx7bpq6ZJpSqX8OIQL8Pkgw1rUwS9Qis1+h2V8rt2Kny7ou XRMoBNohW9aCAn1okq+WZuavu93atX3xKdnmc2yGCFth02+fFJcH4FtF1gk8yPNJPTT9/G UHBl1OBY1QGRdmGFX5bXvy/2Fr3jfmBUQpAZSFfroU0MC35qbcExtqVWUcT00Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688143384; 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=gub6khM6wuucOCC/zryUY1GzeGTsRkDCe+PXfGqxOSY=; b=NQBxaa/fRPjCxgIaKhsU4WwyR1rSXJc+81tZBtA83LndpzgMir3IrYXdadwCg0n/YnwaQq wBIEqGKOzNLUkKTANBQXAtU82T9yMdgQ8SD/7Y3/hOd++KjjcHXgHaUf1KsxhmZtcX/l2G X2i7H/TkbZv/G676CTCB5jBUO/a+6zyObVnL3BV4KuFoyNiwO54Z47CvoyBUYTlzWAF35N 3XAw2QzkOxzCelc32rKIuYMbYQP1e+MstgFJBXZ/ZtVZ9GtNbMOb01DixhurZhma5VOPv2 q3uusBGDFOQKb0avzmzzasMkHu2EvkkT9gwK62OsyXHiSTX38A7WVz+IZAxz9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688143384; a=rsa-sha256; cv=none; b=hlWzHM7RrqmW5VayTPYausqKGYmTTGZqRlXlwhEQF35IE9TFn6+iN5Ens8XF9TFG/dDsE2 85XvoEblHZRtC28sLSl5Aj/J1b3UWg0xzDEFII+7FsMONKhGgDlKouZeLOf/aiXsVmeJJg qJAX3mKoKC6e3zgSqklRCPB0nNOoRdzQzuKNOXYklCiqT8AuXFMo6Ve51MUMIN1UE1Ykz5 MjYwH4LJquy0ZyeuP8buHsXc/tqHAaeRo0uZK7lKdlGn54ceCBQHKXAoa84zOHYgycMnPl iyBnXTJrNm1y3RIzW89maParm3AkTPZ3FjZe0FFkcFC/Zgv4C9qEliKFLtSLdg== Received: from [192.168.1.151] (host-173-212-76-127.public.eastlink.ca [173.212.76.127]) (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: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qt1Mr3pfgzd5W; Fri, 30 Jun 2023 16:43:04 +0000 (UTC) (envelope-from mhorne@freebsd.org) Message-ID: <498f3ba2-dc7a-e7d3-626a-76ca68cee5b2@freebsd.org> Date: Fri, 30 Jun 2023 13:43:02 -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/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors Content-Language: en-CA To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> From: Mitchell Horne In-Reply-To: <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 6/30/23 11:42, Jessica Clarke wrote: > On 30 Jun 2023, at 07:52, Simon J. Gerraty wrote: >> >> The branch main has been updated by sjg: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=56f3f2d2491e30f369f9461c3cb2a366bdffbe1d >> >> commit 56f3f2d2491e30f369f9461c3cb2a366bdffbe1d >> Author: Simon J. Gerraty >> AuthorDate: 2023-06-30 06:52:17 +0000 >> Commit: Simon J. Gerraty >> CommitDate: 2023-06-30 06:52:17 +0000 >> >> libsecureboot: avoid set but not used errors >> >> Reviewed by: stevek >> --- >> lib/libsecureboot/openpgp/opgp_sig.c | 22 ++++++++++++---------- >> lib/libsecureboot/vets.c | 7 +++++-- >> 2 files changed, 17 insertions(+), 12 deletions(-) >> >> diff --git a/lib/libsecureboot/openpgp/opgp_sig.c b/lib/libsecureboot/openpgp/opgp_sig.c >> index eec3469e3457..7f4e6fb98fd1 100644 >> --- a/lib/libsecureboot/openpgp/opgp_sig.c >> +++ b/lib/libsecureboot/openpgp/opgp_sig.c >> @@ -464,20 +464,22 @@ verify_asc(const char *sigfile, int flags) >> size_t n; >> unsigned char *fdata, *sdata; >> size_t fbytes, sbytes; >> - >> + >> + fdata = NULL; >> if ((sdata = read_file(sigfile, &sbytes))) { >> n = strlcpy(pbuf, sigfile, sizeof(pbuf)); >> - if ((cp = strrchr(pbuf, '.'))) >> - *cp = '\0'; >> - if ((fdata = read_file(pbuf, &fbytes))) { >> - if (openpgp_verify(pbuf, fdata, fbytes, sdata, >> - sbytes, flags)) { >> - free(fdata); >> - fdata = NULL; >> + if (n < sizeof(pbuf)) { >> + if ((cp = strrchr(pbuf, '.'))) >> + *cp = '\0'; >> + if ((fdata = read_file(pbuf, &fbytes))) { >> + if (openpgp_verify(pbuf, fdata, fbytes, sdata, >> + sbytes, flags)) { >> + free(fdata); >> + fdata = NULL; >> + } >> } >> } >> - } else >> - fdata = NULL; >> + } >> free(sdata); >> return (fdata); >> } >> diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c >> index 4375dfa76a89..12191097ff8c 100644 >> --- a/lib/libsecureboot/vets.c >> +++ b/lib/libsecureboot/vets.c >> @@ -241,11 +241,14 @@ x509_cn_get(br_x509_certificate *xc, char *buf, size_t len) >> mc.vtable->start_cert(&mc.vtable, xc->data_len); >> mc.vtable->append(&mc.vtable, xc->data, xc->data_len); >> mc.vtable->end_cert(&mc.vtable); >> - /* we don' actually care about cert status - just its name */ >> + /* we don't actually care about cert status - just its name */ >> err = mc.vtable->end_chain(&mc.vtable); >> >> - if (!cn.status) >> + if (!cn.status) { >> buf = NULL; >> + if (err == 0) /* keep compiler happy */ >> + buf = NULL; > > This is nonsense code. > > Jess And yours is a needlessly abrasive and unhelpful reply. Seriously Jess, if your choice is to read through and nit-pick peoples' changes, then at least learn to deliver your feedback with an ounce of tact. Mitchell > >> + } >> return (buf); >> } >> > From nobody Fri Jun 30 16:44: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 4Qt1P06K3lz4kSVr; Fri, 30 Jun 2023 16:44: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 4Qt1P05dnWz3RDV; Fri, 30 Jun 2023 16:44:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688143444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mwcqusq4+AGlke12J9Ir800EJ8ZF59si9ogo72mX1xU=; b=DPAnw7TN3oEeCsstemin4IEY/hdkjw8RxkNsCNC3XH7Uy1RSD2PioQ45pfT/Vdjtr22g65 PAQVC8ArfCsfbJTja46e4HtFwVdjSHTgYhEE96L2EawigV8PHCzQjF7sfSsrzG4Up6bpnU Km37n+5ABwAYvR7KoYqap/Y9U5I42X+0+yC3iL1/UV3wAir7VqNviZnc7vRTj7xf2DnYr4 IjU8PcHfJWcz5O9Zn/pV7Xh3bKBgbpF1KDyksDKHZgc2YqE+1uMJ0RBQSgG8jK/SmOB04y jibzFcxV/YaQe2va4kM/DgPGVLkRElsS6XofrCAdD8Neq7orpc4YSdt7NajEOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688143444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mwcqusq4+AGlke12J9Ir800EJ8ZF59si9ogo72mX1xU=; b=FjIDbqVSdvxyz8qd6O4k4dK91pIpdGixTraw+n1oABp4r6nj4D29/B/L7I0PDGe5t3TGPl W8UHRcARsKLufvNo3l54ERCrbCA0RBRhqePGbKERq7AtBR6g80AUEg9Rb3Q2q8uMmdE5HR ippHiZDr5RHBXd5k32AEqg4aRkTwALf7K9SES7m/sCSDsmaUR7UFeDOwO/PfI/jm6yxC6Y 4gIBxXhh/0DuAgs0YAVRPv1lQjnPghhvWzT7fEH88zsEaqEHNlALC7byNC454T/6XGDLw/ pck999KzaD8lYd9cl9F2Ap/puVWuhG2wMj2q+h2mvBNubSU20VAt+AVEJL162g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688143444; a=rsa-sha256; cv=none; b=QywIRUlWYOwj3x5mf4NCcOGmWMP/X8oN5yaNMnaepKTAjzg7KDwaUCaEXDXvSHIbHlefxD 6a9IKWrhOU6kGP2c9zz8XUkuU9q/voh/jT/CklOlqsB56FMbVwVMVqdGZlo6iqPkm1vIMV uUL6wy49HCPRVKHl6nrnhfZAXC640xh2EoeGPgJKRA+TsCrDonK32B9Uty7PlrBiWbktNp 7qJuruX8csOucOYnmGMKCsdf2flj9FBzKksCR3fzWXKV09ghch0cHTafvSdFMITjT1ztj6 f0uSbOEnlf1d+pqWXrF1k3/6tLPHeXo7FboV8XyPMr93nX9xT4KO1NfIVHjCug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qt1P04jzRz15lM; Fri, 30 Jun 2023 16:44: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 35UGi4ND013305; Fri, 30 Jun 2023 16:44:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35UGi4DF013304; Fri, 30 Jun 2023 16:44:04 GMT (envelope-from git) Date: Fri, 30 Jun 2023 16:44:04 GMT Message-Id: <202306301644.35UGi4DF013304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 533f1f686f17 - main - i386 acpi: Remove unneeded function declaration. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 533f1f686f175cbdb7b45280b24fc51d4cd46a06 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=533f1f686f175cbdb7b45280b24fc51d4cd46a06 commit 533f1f686f175cbdb7b45280b24fc51d4cd46a06 Author: John Baldwin AuthorDate: 2023-06-30 16:34:45 +0000 Commit: John Baldwin CommitDate: 2023-06-30 16:43:52 +0000 i386 acpi: Remove unneeded function declaration. The declaration didn't use matching array bounds as the later definition raising a -Warray-parameters warning from GCC. However, the function is also defined before it is used, so the declaration isn't strictly needed. --- sys/i386/acpica/acpi_wakeup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/i386/acpica/acpi_wakeup.c b/sys/i386/acpica/acpi_wakeup.c index 5f4841d76833..f76312eddc65 100644 --- a/sys/i386/acpica/acpi_wakeup.c +++ b/sys/i386/acpica/acpi_wakeup.c @@ -86,7 +86,6 @@ static cpuset_t suspcpus; static struct susppcb **susppcbs; #endif -static void *acpi_alloc_wakeup_handler(void **); static void acpi_stop_beep(void *); #ifdef SMP From nobody Fri Jun 30 16:44: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 4Qt1P16mT9z4kSgb; Fri, 30 Jun 2023 16:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt1P16LYQz3R89; Fri, 30 Jun 2023 16:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688143445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ipAqQPvGhHoQ9ZJYix8Gh7OhFU0pkTtDqGbeRBuo9k=; b=ANUHThm0rQOZcq20FnXRNBjNqevudCX/khKoYEIJToz9iTroXZGrELYiyuhR/vBwWC/Inb PQvKybQ35kGl5VC5vRaRBPjUQ5wVUWaChf29XsZjKlEXji3DC1eLFFNX/HNRlLBRvHPcgB 1iEMkTLssYVwwtSCscTMrDgTA2CprTiqZmfYPWg4+faIIYA2Hwh0QUDroMrUj/qXdwET89 f04C1VLjto8hga2cMD1BovraDtVTW3jVJ0kYs3WaGCo9uAlDQUL6C5rrSfgTXvgCfPHj+S MZKFildUiXGG/5ls8k74auma/S0yCClKjxwVLcAy76OJ17dtAijYKbOzdT++9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688143445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ipAqQPvGhHoQ9ZJYix8Gh7OhFU0pkTtDqGbeRBuo9k=; b=ZEcO5s+by0UCYPQuSIaBV8GKBri5X2Qby0dT1JGa4P9kzEzM+wh3MCC/W42v9uxb566iKU k1TgebQbTLq0pxhKOBn9bJXNfl47zmusX5rAd+77vXlEfDPLJBF7Kh6cRtCvk0FVsQ5or5 ej8JUfaUpMzLE+7d0DUu3dpPvPd1JSIt9M4XTxWlb/ouy5njsnUovU5V1+Nm7QOLGwZVnX E+PyksHDQ9jRxIbz0gerq2pqSVLrr52rTuZI0ubBtkp/FTIgWxerHScRI3uUh1oF0oEsAr aL/iDVntblB9ZBjrsm0olwQBGSjj8X0qVNWBssgeDFMSCEA4PiYWB39dbh2Nvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688143445; a=rsa-sha256; cv=none; b=Fv/En5mhOpNAuJQiOHW4dgD8QfseUMXSHNM/nmteLgbtBXB1YWf0+Fof94jwZmtaBmjy7m kJ600Y+M6efC8g6g4YjmAPsvsPB0wjWwOIABAHucR5l9oUdMDbMCNa6sv3LGzryADkMydn 7d+o8/1mW5CZYip65cLqt+P4ndey2qbGuikVga3eFgqiZsYqYOqjbIg5LwAy4tAj6ndP04 xczYHxGu7kvU/h5zz8LLagfBtzrQyfAtHcw9RW6m6S4frIiKlBvwWGMz230OQwLb9CHYvK eTDmal71TjHzd9fWIjekymtADwaDV1O/2EYyJNz8OkOrEq9xxOoEHEQW5j38rQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qt1P15MRNz164d; Fri, 30 Jun 2023 16:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 35UGi51T013326; Fri, 30 Jun 2023 16:44:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35UGi5gx013325; Fri, 30 Jun 2023 16:44:05 GMT (envelope-from git) Date: Fri, 30 Jun 2023 16:44:05 GMT Message-Id: <202306301644.35UGi5gx013325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f4de136aa829 - main - linux: binutils as requires %eflags instead of %flags for CFI. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4de136aa82978107aa98f91ca1928870b7d310a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f4de136aa82978107aa98f91ca1928870b7d310a commit f4de136aa82978107aa98f91ca1928870b7d310a Author: John Baldwin AuthorDate: 2023-06-30 16:36:16 +0000 Commit: John Baldwin CommitDate: 2023-06-30 16:43:58 +0000 linux: binutils as requires %eflags instead of %flags for CFI. This applies the changes to linux32_locore.asm from commit a35572b16e38 to the i386 copy. --- sys/i386/linux/linux_locore.asm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/i386/linux/linux_locore.asm b/sys/i386/linux/linux_locore.asm index 9aef5ad21d26..bebd05686149 100644 --- a/sys/i386/linux/linux_locore.asm +++ b/sys/i386/linux/linux_locore.asm @@ -23,7 +23,11 @@ ENTRY(linux_vdso_sigcode) .cfi_offset %ds, L_SC_DS .cfi_offset %cs, L_SC_CS .cfi_offset %ss, L_SC_SS +#ifdef __clang__ .cfi_offset %flags, L_SC_EFLAGS +#else + .cfi_offset %eflags, L_SC_EFLAGS +#endif .cfi_offset %edi, L_SC_EDI .cfi_offset %esi, L_SC_ESI .cfi_offset %ebp, L_SC_EBP @@ -54,7 +58,11 @@ ENTRY(linux_vdso_rt_sigcode) .cfi_offset %ds, L_SC_DS .cfi_offset %cs, L_SC_CS .cfi_offset %ss, L_SC_SS +#ifdef __clang__ .cfi_offset %flags, L_SC_EFLAGS +#else + .cfi_offset %eflags, L_SC_EFLAGS +#endif .cfi_offset %edi, L_SC_EDI .cfi_offset %esi, L_SC_ESI .cfi_offset %ebp, L_SC_EBP From nobody Fri Jun 30 17:07: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 4Qt1xV6bTsz4kk5k for ; Fri, 30 Jun 2023 17:08:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt1xV5D34z3nJQ for ; Fri, 30 Jun 2023 17:08:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-3fa8ce2307dso25894565e9.2 for ; Fri, 30 Jun 2023 10:08:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688144925; x=1690736925; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E2Q40cGcxgX8w4wa+2VH27FMMO1EuRCmYdfetdpyHxA=; b=O4vcNZW75kMNuueWtUdoYzwa2L0Dfi9cIZicy/DYC5zkm1WKOQAn08U3zv8JIp/rjV dhuMp6N80QmpjNxNMbOmdPWOz1u3FSfl65yVdlaUAz4yof0MLRankTf9tYxwUjTsbSP5 9/IkM2K+E9LEYKs50BKfAveGBinfrquNNe6ydYQshKIiTGM6MGllky6F+GpNRgIRGQz8 fXx4nd58aBEsOUVqECJ0Jki6zSa4GRi8JPvcX+jRVf0lwc4ywbXbWkJiRCW7D5bjGTfO HicbPvffJwmSks+5PeI9M+SRFIkKECfTO7Cdu1oylshzaLjB6N+le4SyYFQ+WaWDTaql uyeg== X-Gm-Message-State: AC+VfDxceLtVlQAYgWQ2T/4Gf2IYTaBi+S0FNXVjUDAqHlMGczsREFob GIh7i7f9r6ijp84OQqjd5vodvw== X-Google-Smtp-Source: ACHHUZ7xDOzzuPjbCeDj5M0PRCyaylVUguuEx/yfo/rThWcrdjg1iJu/k1bnKW/Zz+g2ReZ8ighNcg== X-Received: by 2002:a1c:7914:0:b0:3fa:984d:7e94 with SMTP id l20-20020a1c7914000000b003fa984d7e94mr3165257wme.18.1688144924731; Fri, 30 Jun 2023 10:08:44 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id z20-20020a7bc7d4000000b003f90067880esm22392173wmk.47.2023.06.30.10.08.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jun 2023 10:08:28 -0700 (PDT) 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 \(3731.600.7\)) Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors From: Jessica Clarke In-Reply-To: <498f3ba2-dc7a-e7d3-626a-76ca68cee5b2@freebsd.org> Date: Fri, 30 Jun 2023 18:07:58 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> <498f3ba2-dc7a-e7d3-626a-76ca68cee5b2@freebsd.org> To: Mitchell Horne X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4Qt1xV5D34z3nJQ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 30 Jun 2023, at 17:43, Mitchell Horne wrote: > On 6/30/23 11:42, Jessica Clarke wrote: >> On 30 Jun 2023, at 07:52, Simon J. Gerraty wrote: >>>=20 >>> The branch main has been updated by sjg: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D56f3f2d2491e30f369f9461c3cb2a366= bdffbe1d >>>=20 >>> commit 56f3f2d2491e30f369f9461c3cb2a366bdffbe1d >>> Author: Simon J. Gerraty >>> AuthorDate: 2023-06-30 06:52:17 +0000 >>> Commit: Simon J. Gerraty >>> CommitDate: 2023-06-30 06:52:17 +0000 >>>=20 >>> libsecureboot: avoid set but not used errors >>>=20 >>> Reviewed by: stevek >>> --- >>> lib/libsecureboot/openpgp/opgp_sig.c | 22 ++++++++++++---------- >>> lib/libsecureboot/vets.c | 7 +++++-- >>> 2 files changed, 17 insertions(+), 12 deletions(-) >>>=20 >>> diff --git a/lib/libsecureboot/openpgp/opgp_sig.c = b/lib/libsecureboot/openpgp/opgp_sig.c >>> index eec3469e3457..7f4e6fb98fd1 100644 >>> --- a/lib/libsecureboot/openpgp/opgp_sig.c >>> +++ b/lib/libsecureboot/openpgp/opgp_sig.c >>> @@ -464,20 +464,22 @@ verify_asc(const char *sigfile, int flags) >>> size_t n; >>> unsigned char *fdata, *sdata; >>> size_t fbytes, sbytes; >>> - >>> + >>> + fdata =3D NULL; >>> if ((sdata =3D read_file(sigfile, &sbytes))) { >>> n =3D strlcpy(pbuf, sigfile, sizeof(pbuf)); >>> - if ((cp =3D strrchr(pbuf, '.'))) >>> - *cp =3D '\0'; >>> - if ((fdata =3D read_file(pbuf, &fbytes))) { >>> - if (openpgp_verify(pbuf, fdata, fbytes, sdata, >>> - sbytes, flags)) { >>> - free(fdata); >>> - fdata =3D NULL; >>> + if (n < sizeof(pbuf)) { >>> + if ((cp =3D strrchr(pbuf, '.'))) >>> + *cp =3D '\0'; >>> + if ((fdata =3D read_file(pbuf, &fbytes))) { >>> + if (openpgp_verify(pbuf, fdata, fbytes, sdata, >>> + sbytes, flags)) { >>> + free(fdata); >>> + fdata =3D NULL; >>> + } >>> } >>> } >>> - } else >>> - fdata =3D NULL; >>> + } >>> free(sdata); >>> return (fdata); >>> } >>> diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c >>> index 4375dfa76a89..12191097ff8c 100644 >>> --- a/lib/libsecureboot/vets.c >>> +++ b/lib/libsecureboot/vets.c >>> @@ -241,11 +241,14 @@ x509_cn_get(br_x509_certificate *xc, char = *buf, size_t len) >>> mc.vtable->start_cert(&mc.vtable, xc->data_len); >>> mc.vtable->append(&mc.vtable, xc->data, xc->data_len); >>> mc.vtable->end_cert(&mc.vtable); >>> - /* we don' actually care about cert status - just its name */ >>> + /* we don't actually care about cert status - just its name */ >>> err =3D mc.vtable->end_chain(&mc.vtable); >>>=20 >>> - if (!cn.status) >>> + if (!cn.status) { >>> buf =3D NULL; >>> + if (err =3D=3D 0) /* keep compiler happy */ >>> + buf =3D NULL; >> This is nonsense code. >> Jess >=20 > And yours is a needlessly abrasive and unhelpful reply. >=20 > Seriously Jess, if your choice is to read through and nit-pick = peoples' changes, then at least learn to deliver your feedback with an = ounce of tact. You=E2=80=99re right that I can be, and was, overly blunt, for which I = apologise, but I don=E2=80=99t think this kind of pointed attack on my = character on-list is an appropriate response. To reword and expand my = original email: A conditional assignment of the same value that has already been = assigned unconditionally is unidiomatic code generally regarded as a = code smell and should be avoided. In an ideal world that would give a = compiler warning, but it doesn=E2=80=99t for both GCC and Clang, perhaps = because the control dependency has ordering implications for atomics. = Since it appears you=E2=80=99re doing this just to insert a dummy read = of err, either err should be marked __unused or it should be removed = entirely and the return value of end_chain explicitly marked as unused = by casting it to void. Jess > Mitchell >=20 >>> + } >>> return (buf); >>> } From nobody Fri Jun 30 20:15: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 4Qt64Z1r4dz4kSGy; Fri, 30 Jun 2023 20:15: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 4Qt64Z18xmz3Gj0; Fri, 30 Jun 2023 20:15:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688156110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZQ5G6DPeTSaO2KPg6Hy5iKZj0gzKvgboa74SqXIHAs=; b=lRTOs3yome1uMcLR9BcI7IeBMm396eUIlZIWXSEwjuJMwoegOIzQ1i5JUrCQAMFgjSH7hm q2P6weVADP4p06pai4pz2YEFJsyGqwzsci+bKGwuSvVIkSa8tepBIqk6p70SBJ8SabnMuJ cIukUE1PqugUTG5ITG1vZsx+KuZJVALJSDvZ/KINTvnaRiT5B1X/I0yfhtVZ44evU0kYrT 7In8mL/H0uRuJeAz4Sg+hcZCGCBZtWZjXbQDZCGyEcvTya6mgSeSWqBck8aHPa//hBwZud PjlusIUjHOIQCTi7mdd8UN2AkSE0ACU90+6ksE2LNbxMDNRwAsT3PAm2RPSr0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688156110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wZQ5G6DPeTSaO2KPg6Hy5iKZj0gzKvgboa74SqXIHAs=; b=lRQnjJT960//hr6z8Esg0rmARgPtMqjbCxBhDDfxzzk6UIhC8+wlVj15EgkHjPCiBHQzAt R+3/y77QejnMNj0IMqbybQxjLoengQB5w1Q+Dwxl9zwBioPhBw88QIjkEcA6fin+giEeZR 7Js7y/gFHozdbFJsn8Naa/x+cejHWlwCoYK3LYGGU9Q+7zNz/hCaUt7pUZQxNh2vkmd0ai gOVOmyszAu+YXntQLXaRjHrF3DiYGE6J3MPEeZ6n5igXNDWSLPBdEAi6OR+tUV8su88U7V QUmI5fX/iqA1GUthX/0OQu9iu2cs/yRIHK+BFjDMVuhW/iA27JV7Pgmw0ndwzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688156110; a=rsa-sha256; cv=none; b=FWzUpbp4AP9qeNb1sA9K4Xj1rMiC+YW6Hg0QmUzRdM7jgiyqE2scAEaV3zCFnS97bjwsjq zd1H6IiJxF1sxK1C/jRPqMvJ2ZM4MadzQTVx5XVCchkR/spxiwcFnXFK9Aisv1gLd/0JoK mfAQU5kbRNt2NmDV3Iwo60XK6kbIIN1hAyfxbXZ2WTqj42g0kA1WNYpBg53ZaXMZ+otx77 9Rpzm5KC5IiDFj3RMWYS4hYz9S1SODVsS9rUFM2tYkzK5CeD5zgGvRT6367+aNqQQDk5Cy XDpVLoNlVJzYNjWlRpQPhiJSAmdFsL496q4vnkRcgO8+6kn3eypd1oEPQHY1WA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qt64Z0Cfqz1Bgk; Fri, 30 Jun 2023 20:15: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 35UKF9iW062147; Fri, 30 Jun 2023 20:15:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35UKF985062146; Fri, 30 Jun 2023 20:15:09 GMT (envelope-from git) Date: Fri, 30 Jun 2023 20:15:09 GMT Message-Id: <202306302015.35UKF985062146@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: dc2d26df43cb - main - siftr: provide dtrace with the correct pointer to data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: dc2d26df43cb69c9c4d8802220af2da929bc1dce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=dc2d26df43cb69c9c4d8802220af2da929bc1dce commit dc2d26df43cb69c9c4d8802220af2da929bc1dce Author: Michael Tuexen AuthorDate: 2023-06-30 20:03:04 +0000 Commit: Michael Tuexen CommitDate: 2023-06-30 20:03:04 +0000 siftr: provide dtrace with the correct pointer to data This fixes a bug which was introduced in the commit https://svnweb.freebsd.org/changeset/base/282276 Reviewed by: cc, rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40806 --- sys/netinet/siftr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index cbcd2b2ead42..930ba6365f26 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -667,7 +667,7 @@ siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp, * maximum pps throughput processing when SIFTR is loaded and enabled. */ microtime(&pn->tval); - TCP_PROBE1(siftr, &pn); + TCP_PROBE1(siftr, pn); } /* From nobody Fri Jun 30 20:19: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 4Qt69C00Dfz4kVhC; Fri, 30 Jun 2023 20:19: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 4Qt69B6gwhz3HN8; Fri, 30 Jun 2023 20:19:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688156350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gf/A0e1LkVtYO6bgWLXNy3nM7DL6XNEZv+PE3b1eOhQ=; b=mM0aA+S/cTNpBtzkp/2nmwCtNv+m/bC2/z+Op3DUt1bqdtpgV/3rC3/yKyYXoE8lafQCNS Nbrtk+iesj03EF5/uvUYZF6V0DcprvdyDLVWwAbbfzgKpID4dLHYrfKngYHrINwUnPdxy4 V22dVQIqU/RmytKKA0nznHXPLf4//omF0o11gtCbA/G2uuakY+R7aSqLG7yVg6Xhw9SvyN saV25MgU7sYgSfeacaUqhqLgXkM8bme0D7ib29Oz4sejDKv509AjD0YmkFC/6aOBfwvzty RzQN9o3SHUHnak1RVf9z6dpbWRO478oRQBqFgz2QO61CSWFBkuJgpf+V5aABSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688156350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gf/A0e1LkVtYO6bgWLXNy3nM7DL6XNEZv+PE3b1eOhQ=; b=Dvq0lWjN144yCseNys+qVI8WXgGxz647k8IKMO4WGZAZgwyAQX6UB2zZ61w7F+iVAudfJu a4ckhedE86hjBR06UABw5uUwtPA0FdLrBcfQBn7X0724Eh/p3gRqf4/Xod36YLO1wgyShg Nug7j0XXOGsaXTntLHvsiCDLYm/O7knHcvM9VP7AMxB9gmDGECwXM9e4SpyiBRuB8qRGX5 Kp5dMvwyW8wuwTJVy4b7+OeZ+YSa1px37QLJ1ViS7SQtn8zYNPPRFFVYLF2tXviBpMC1cZ kj9NhZf7kfU2NeeotEtbmwHglrTmOPqGvQccMhoKuFdbvcMKpZC+YaovHUTdVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688156350; a=rsa-sha256; cv=none; b=EG9U5Nf/qJIr59aNkqRCvRX8oCxUAP/PCP+OUb2mnP/NHN4Cit5CBVuCUlf2aiw9WZGIQf cnE6ifrAhXCAu0Wi4FoWEOCyzRi8MijK0EfCzxwiS23M7mAJvQPx4Uhj5Fz0Il8G/WohNa Y+13oCKl7Ul5bnpAmhl4R5ZFOt9HQs4rCxBvKBtgqbe5clfyG/+ABTYak/d+HsJRTfX1Zj viokpUeeLxQt4FTm5aJzkp7/8UGOTbUHH7x6H2cZPtkSp9JsZWgqtKCSaEFxkX+PI6rEU2 E4IS8Ig911pGUk/yPn/4tyB5ow2wESwUEEvhUf3UaWGdvVQQIr220DV1bU7rAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qt69B5lXkz1Bvn; Fri, 30 Jun 2023 20:19: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 35UKJAZd062787; Fri, 30 Jun 2023 20:19:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35UKJArV062786; Fri, 30 Jun 2023 20:19:10 GMT (envelope-from git) Date: Fri, 30 Jun 2023 20:19:10 GMT Message-Id: <202306302019.35UKJArV062786@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: f5541b85a592 - main - dtrace: fix constants used by the siftr 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5541b85a592da9e1e1723b190f1e08afd7d5b18 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f5541b85a592da9e1e1723b190f1e08afd7d5b18 commit f5541b85a592da9e1e1723b190f1e08afd7d5b18 Author: Michael Tuexen AuthorDate: 2023-06-30 20:15:47 +0000 Commit: Michael Tuexen CommitDate: 2023-06-30 20:15:47 +0000 dtrace: fix constants used by the siftr probe The constants used in the C code were changed in https://svnweb.freebsd.org/changeset/base/343646 but changing them also in the dtrace translator was missed. Reviewed by: cc, rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40805 --- cddl/lib/libdtrace/siftr.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libdtrace/siftr.d b/cddl/lib/libdtrace/siftr.d index 37bc30ff3e06..e75d41534268 100644 --- a/cddl/lib/libdtrace/siftr.d +++ b/cddl/lib/libdtrace/siftr.d @@ -29,9 +29,9 @@ * Convert a SIFTR direction value to a string */ #pragma D binding "1.12.1" SIFTR_IN -inline int SIFTR_IN = 1; +inline int SIFTR_IN = 0; #pragma D binding "1.12.1" SIFTR_OUT -inline int SIFTR_OUT = 2; +inline int SIFTR_OUT = 1; /* SIFTR direction strings. */ #pragma D binding "1.12.1" siftr_dir_string From nobody Fri Jun 30 20:45: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 4Qt6lT2chNz4kmYK; Fri, 30 Jun 2023 20:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt6lT2RRmz3Q4T; Fri, 30 Jun 2023 20:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688157925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UIESA4d3Z9UsKaXA0wfVzal0urCFPXCg8Ko0wJ60cCE=; b=L52F6bvJneFAaPvgBX1enISjbFmoOwmb4IOcO4+vXMQezx1EzwsjG5u2pXxU+ShyPfg7pY gz0KrdOvw3ACj8jIMoJUQv6Vl4vT037jR5saIaVGpub/TCCesHDXlgStwxr3c49DHsGZyp Ao/NZHU8qrBxlj32GRFUaysK96zJJ5UsVEyyNlbJrM/kChtTDLrCiMsWt9PP/1x+stRvJk 3mUvMmbI5/+3Wfq10SObOmgsEsHxWIkfGsMQcCvIaXFNpXQ5IfDI6QutGQtncUrlfKKpjp 3fdjBWQJt2NHhzDoV7h/T83e7kc/AwmTnAf5Qz65ZNELlQyJoiK1MvirQr5tcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688157925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UIESA4d3Z9UsKaXA0wfVzal0urCFPXCg8Ko0wJ60cCE=; b=LX6nkLJ6e534QeZTgmnVL8VzP/J1fSJkXlCeUx+UrQImUU8p47heJgK4YkvIllvrVPMtCr Uwk7yVk42HbZI7ABwVZ94IqaqwFDiaKaLiprmgDbU0yqfP5A/CWLxTuj4uOAem68uac5wS jSiFtpa8q6wJlp76Ldy4JdrmroJuO91sF4hYmUS1fbvEjNxUMW4BRjlt+Y6HVW1ZrVUEp0 cKLBmzwAYjriuqFE5Ke3G2ZUdi/6yNXsk6IW2nb1CJQnNiLKG2EbDZfTGtARmnDKhbfsui EGIuWZrwsyqKHqmyjrIaF8TcqS3n64En7ESesaLILzpoGqoXQQH8bRzaMCZxzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688157925; a=rsa-sha256; cv=none; b=VyhyiHGnqwPPZTOvMVFWhIYGIa+sRMGSTwtrssc8zE3Phd4bWaDbpOZSwkOGqQgG24i9+y ZphEvi82v31iYgdyg8C4ok7RzwaAWMFGD2wKbVxiFn02/du3E4KSTdD+G4WBMi/TNW0GHL 1KM7dM9PGr7e5SSHC6Ob2OZ6U0cj8QE32w8aj/CfQrik5pVYWvJt3XokfeQBtznS/LUMQ+ uNAtgAerqTA3D8iP77F8rFbdqbOq89qSv5hu0uilEMRRT9dQebYnAUngGxkR/Rmc8/rnok lWbdkpbO8Wkus2OhVUYhqYtVWrjTZA3mnu3fF2xrjC2hRN59j3bGVK+WhnvSgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qt6lT1PGgz1Cw2; Fri, 30 Jun 2023 20:45: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 35UKjPup011828; Fri, 30 Jun 2023 20:45:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35UKjOew011827; Fri, 30 Jun 2023 20:45:24 GMT (envelope-from git) Date: Fri, 30 Jun 2023 20:45:24 GMT Message-Id: <202306302045.35UKjOew011827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marius Strobl Subject: git: eb33b693b364 - main - test: remove remainder of testfloat List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb33b693b364a4547dfcfd21c159ffc4fb339bc2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=eb33b693b364a4547dfcfd21c159ffc4fb339bc2 commit eb33b693b364a4547dfcfd21c159ffc4fb339bc2 Author: Marius Strobl AuthorDate: 2023-06-30 20:36:39 +0000 Commit: Marius Strobl CommitDate: 2023-06-30 20:43:50 +0000 test: remove remainder of testfloat These bits are unused since the sparc64-specific glue has been deleted in f33b14f0. --- tools/test/testfloat/README.txt | 50 - tools/test/testfloat/fail.c | 46 - tools/test/testfloat/fail.h | 29 - tools/test/testfloat/random.c | 63 - tools/test/testfloat/random.h | 32 - tools/test/testfloat/slowfloat-32.c | 1183 --------- tools/test/testfloat/slowfloat-64.c | 2109 ---------------- tools/test/testfloat/slowfloat.c | 35 - tools/test/testfloat/slowfloat.h | 167 -- tools/test/testfloat/systemBugs.txt | 323 --- tools/test/testfloat/systflags.h | 33 - tools/test/testfloat/systfloat.c | 553 ----- tools/test/testfloat/systmodes.h | 42 - tools/test/testfloat/testCases.c | 3682 ---------------------------- tools/test/testfloat/testCases.h | 69 - tools/test/testfloat/testFunction.c | 1149 --------- tools/test/testfloat/testFunction.h | 135 - tools/test/testfloat/testLoops.c | 2713 -------------------- tools/test/testfloat/testLoops.h | 143 -- tools/test/testfloat/testfloat-history.txt | 57 - tools/test/testfloat/testfloat-source.txt | 444 ---- tools/test/testfloat/testfloat.c | 299 --- tools/test/testfloat/testfloat.txt | 771 ------ tools/test/testfloat/testsoftfloat.c | 1044 -------- tools/test/testfloat/writeHex.c | 183 -- tools/test/testfloat/writeHex.h | 42 - 26 files changed, 15396 deletions(-) diff --git a/tools/test/testfloat/README.txt b/tools/test/testfloat/README.txt deleted file mode 100644 index fe99fd95d641..000000000000 --- a/tools/test/testfloat/README.txt +++ /dev/null @@ -1,50 +0,0 @@ - -Package Overview for TestFloat Release 2a - -John R. Hauser -1998 December 16 - - -TestFloat is a program for testing that a floating-point implementation -conforms to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -TestFloat is distributed in the form of C source code. The TestFloat -package actually provides two related programs: - --- The `testfloat' program tests a system's floating-point for conformance - to the IEC/IEEE Standard. This program uses the SoftFloat software - floating-point implementation as a basis for comparison. - --- The `testsoftfloat' program tests SoftFloat itself for conformance to - the IEC/IEEE Standard. These tests are performed by comparing against a - separate, slower software floating-point that is included in the TestFloat - package. - -TestFloat depends on SoftFloat, but SoftFloat is not included in the -TestFloat package. SoftFloat can be obtained through the Web page `http:// -HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/SoftFloat.html'. - -TestFloat is documented in three text files: - - testfloat.txt Documentation for using the TestFloat programs - (both `testfloat' and `testsoftfloat'). - testfloat-source.txt Documentation for porting and compiling TestFloat. - testfloat-history.txt History of major changes to TestFloat. - -The following file is also provided: - - systemBugs.txt Information about processor bugs found using - TestFloat. - -Other files in the package comprise the source code for TestFloat. - -Please be aware that some work is involved in porting this software to other -targets. It is not just a matter of getting `make' to complete without -error messages. I would have written the code that way if I could, but -there are fundamental differences between systems that I can't make go away. -You should not attempt to compile the TestFloat sources without first -reading `testfloat-source.txt'. - -At the time of this writing, the most up-to-date information about -TestFloat and the latest release can be found at the Web page `http:// -HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. - diff --git a/tools/test/testfloat/fail.c b/tools/test/testfloat/fail.c deleted file mode 100644 index 30bbea6bd7d7..000000000000 --- a/tools/test/testfloat/fail.c +++ /dev/null @@ -1,46 +0,0 @@ - -/* -=============================================================================== - -This C source file is part of TestFloat, Release 2a, a package of programs -for testing the correctness of floating-point arithmetic complying to the -IEC/IEEE Standard for Floating-Point. - -Written by John R. Hauser. More information is available through the Web -page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -#include -#include -#include -#include "milieu.h" -#include "fail.h" - -char *fail_programName = ""; - -void fail( const char *message, ... ) -{ - va_list varArgs; - - fprintf( stderr, "%s: ", fail_programName ); - va_start( varArgs, message ); - vfprintf( stderr, message, varArgs ); - va_end( varArgs ); - fputs( ".\n", stderr ); - exit( EXIT_FAILURE ); - -} - diff --git a/tools/test/testfloat/fail.h b/tools/test/testfloat/fail.h deleted file mode 100644 index 9c338da260aa..000000000000 --- a/tools/test/testfloat/fail.h +++ /dev/null @@ -1,29 +0,0 @@ - -/* -=============================================================================== - -This C header file is part of TestFloat, Release 2a, a package of programs -for testing the correctness of floating-point arithmetic complying to the -IEC/IEEE Standard for Floating-Point. - -Written by John R. Hauser. More information is available through the Web -page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -extern char *fail_programName; - -void fail( const char *, ... ); - diff --git a/tools/test/testfloat/random.c b/tools/test/testfloat/random.c deleted file mode 100644 index 21326c1ff23f..000000000000 --- a/tools/test/testfloat/random.c +++ /dev/null @@ -1,63 +0,0 @@ - -/* -=============================================================================== - -This C source file is part of TestFloat, Release 2a, a package of programs -for testing the correctness of floating-point arithmetic complying to the -IEC/IEEE Standard for Floating-Point. - -Written by John R. Hauser. More information is available through the Web -page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include "milieu.h" -#include "random.h" - -uint8 randomUint8( void ) -{ - - return (bits8) ( random()>>4 ); - -} - -uint16 randomUint16( void ) -{ - - return ( random() & 0x0000ffff ); - -} - -uint32 randomUint32( void ) -{ - - return ( ( (uint32) random()<<16) | ( (uint32) random() & 0x0000ffff) ); -} - -#ifdef BITS64 - -uint64 randomUint64( void ) -{ - - return ( ( (uint64) randomUint32() )<<32 ) | randomUint32(); - -} - -#endif - diff --git a/tools/test/testfloat/random.h b/tools/test/testfloat/random.h deleted file mode 100644 index 7375499ea965..000000000000 --- a/tools/test/testfloat/random.h +++ /dev/null @@ -1,32 +0,0 @@ - -/* -=============================================================================== - -This C header file is part of TestFloat, Release 2a, a package of programs -for testing the correctness of floating-point arithmetic complying to the -IEC/IEEE Standard for Floating-Point. - -Written by John R. Hauser. More information is available through the Web -page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -uint8 randomUint8( void ); -uint16 randomUint16( void ); -uint32 randomUint32( void ); -#ifdef BITS64 -uint64 randomUint64( void ); -#endif - diff --git a/tools/test/testfloat/slowfloat-32.c b/tools/test/testfloat/slowfloat-32.c deleted file mode 100644 index 549654b05e63..000000000000 --- a/tools/test/testfloat/slowfloat-32.c +++ /dev/null @@ -1,1183 +0,0 @@ - -/* -=============================================================================== - -This C source file is part of TestFloat, Release 2a, a package of programs -for testing the correctness of floating-point arithmetic complying to the -IEC/IEEE Standard for Floating-Point. - -Written by John R. Hauser. More information is available through the Web -page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -int8 slow_float_rounding_mode; -int8 slow_float_exception_flags; -int8 slow_float_detect_tininess; - -typedef struct { - bits32 a0, a1; -} bits64X; - -typedef struct { - flag isNaN; - flag isInf; - flag isZero; - flag sign; - int16 exp; - bits64X sig; -} floatX; - -static const floatX floatXNaN = { TRUE, FALSE, FALSE, FALSE, 0, { 0, 0 } }; -static const floatX floatXPositiveZero = - { FALSE, FALSE, TRUE, FALSE, 0, { 0, 0 } }; -static const floatX floatXNegativeZero = - { FALSE, FALSE, TRUE, TRUE, 0, { 0, 0 } }; - -static bits64X shortShift64Left( bits64X a, int8 shiftCount ) -{ - int8 negShiftCount; - - negShiftCount = ( - shiftCount & 31 ); - a.a0 = ( a.a0<>negShiftCount ); - a.a1 <<= shiftCount; - return a; - -} - -static bits64X shortShift64RightJamming( bits64X a, int8 shiftCount ) -{ - int8 negShiftCount; - bits32 extra; - - negShiftCount = ( - shiftCount & 31 ); - extra = a.a1<>shiftCount ) | ( extra != 0 ); - a.a0 >>= shiftCount; - return a; - -} - -static bits64X neg64( bits64X a ) -{ - - if ( a.a1 == 0 ) { - a.a0 = - a.a0; - } - else { - a.a1 = - a.a1; - a.a0 = ~ a.a0; - } - return a; - -} - -static bits64X add64( bits64X a, bits64X b ) -{ - - a.a1 += b.a1; - a.a0 += b.a0 + ( a.a1 < b.a1 ); - return a; - -} - -static flag eq64( bits64X a, bits64X b ) -{ - - return ( a.a0 == b.a0 ) && ( a.a1 == b.a1 ); - -} - -static flag le64( bits64X a, bits64X b ) -{ - - return ( a.a0 < b.a0 ) || ( ( a.a0 == b.a0 ) && ( a.a1 <= b.a1 ) ); - -} - -static flag lt64( bits64X a, bits64X b ) -{ - - return ( a.a0 < b.a0 ) || ( ( a.a0 == b.a0 ) && ( a.a1 < b.a1 ) ); - -} - -static floatX roundFloatXTo24( flag isTiny, floatX zx ) -{ - - if ( zx.sig.a1 ) { - slow_float_exception_flags |= float_flag_inexact; - if ( isTiny ) slow_float_exception_flags |= float_flag_underflow; - switch ( slow_float_rounding_mode ) { - case float_round_nearest_even: - if ( zx.sig.a1 < 0x80000000 ) goto noIncrement; - if ( ( zx.sig.a1 == 0x80000000 ) && ! ( zx.sig.a0 & 1 ) ) { - goto noIncrement; - } - break; - case float_round_to_zero: - goto noIncrement; - case float_round_down: - if ( ! zx.sign ) goto noIncrement; - break; - case float_round_up: - if ( zx.sign ) goto noIncrement; - break; - } - ++zx.sig.a0; - if ( zx.sig.a0 == 0x01000000 ) { - zx.sig.a0 = 0x00800000; - ++zx.exp; - } - } - noIncrement: - zx.sig.a1 = 0; - return zx; - -} - -static floatX roundFloatXTo53( flag isTiny, floatX zx ) -{ - int8 roundBits; - - roundBits = zx.sig.a1 & 7; - zx.sig.a1 -= roundBits; - if ( roundBits ) { - slow_float_exception_flags |= float_flag_inexact; - if ( isTiny ) slow_float_exception_flags |= float_flag_underflow; - switch ( slow_float_rounding_mode ) { - case float_round_nearest_even: - if ( roundBits < 4 ) goto noIncrement; - if ( ( roundBits == 4 ) && ! ( zx.sig.a1 & 8 ) ) goto noIncrement; - break; - case float_round_to_zero: - goto noIncrement; - case float_round_down: - if ( ! zx.sign ) goto noIncrement; - break; - case float_round_up: - if ( zx.sign ) goto noIncrement; - break; - } - zx.sig.a1 += 8; - zx.sig.a0 += ( zx.sig.a1 == 0 ); - if ( zx.sig.a0 == 0x01000000 ) { - zx.sig.a0 = 0x00800000; - ++zx.exp; - } - } - noIncrement: - return zx; - -} - -static floatX int32ToFloatX( int32 a ) -{ - floatX ax; - - ax.isNaN = FALSE; - ax.isInf = FALSE; - ax.sign = ( a < 0 ); - ax.sig.a1 = ax.sign ? - a : a; - ax.sig.a0 = 0; - if ( a == 0 ) { - ax.isZero = TRUE; - return ax; - } - ax.isZero = FALSE; - ax.sig = shortShift64Left( ax.sig, 23 ); - ax.exp = 32; - while ( ax.sig.a0 < 0x00800000 ) { - ax.sig = shortShift64Left( ax.sig, 1 ); - --ax.exp; - } - return ax; - -} - -static int32 floatXToInt32( floatX ax ) -{ - int8 savedExceptionFlags; - int16 shiftCount; - int32 z; - - if ( ax.isInf || ax.isNaN ) { - slow_float_exception_flags |= float_flag_invalid; - return ( ax.isInf & ax.sign ) ? 0x80000000 : 0x7FFFFFFF; - } - if ( ax.isZero ) return 0; - savedExceptionFlags = slow_float_exception_flags; - shiftCount = 52 - ax.exp; - if ( 56 < shiftCount ) { - ax.sig.a1 = 1; - ax.sig.a0 = 0; - } - else { - while ( 0 < shiftCount ) { - ax.sig = shortShift64RightJamming( ax.sig, 1 ); - --shiftCount; - } - } - ax = roundFloatXTo53( FALSE, ax ); - ax.sig = shortShift64RightJamming( ax.sig, 3 ); - z = ax.sig.a1; - if ( ax.sign ) z = - z; - if ( ( shiftCount < 0 ) - || ax.sig.a0 - || ( ( z != 0 ) && ( ( ax.sign ^ ( z < 0 ) ) != 0 ) ) - ) { - slow_float_exception_flags = savedExceptionFlags | float_flag_invalid; - return ax.sign ? 0x80000000 : 0x7FFFFFFF; - } - return z; - -} - -static floatX float32ToFloatX( float32 a ) -{ - int16 expField; - floatX ax; - - ax.isNaN = FALSE; - ax.isInf = FALSE; - ax.isZero = FALSE; - ax.sign = ( ( a & 0x80000000 ) != 0 ); - expField = ( a>>23 ) & 0xFF; - ax.sig.a1 = 0; - ax.sig.a0 = a & 0x007FFFFF; - if ( expField == 0 ) { - if ( ax.sig.a0 == 0 ) { - ax.isZero = TRUE; - } - else { - expField = 1 - 0x7F; - do { - ax.sig.a0 <<= 1; - --expField; - } while ( ax.sig.a0 < 0x00800000 ); - ax.exp = expField; - } - } - else if ( expField == 0xFF ) { - if ( ax.sig.a0 == 0 ) { - ax.isInf = TRUE; - } - else { - ax.isNaN = TRUE; - } - } - else { - ax.sig.a0 |= 0x00800000; - ax.exp = expField - 0x7F; - } - return ax; - -} - -static float32 floatXToFloat32( floatX zx ) -{ - floatX savedZ; - flag isTiny; - int16 expField; - float32 z; - - if ( zx.isZero ) return zx.sign ? 0x80000000 : 0; - if ( zx.isInf ) return zx.sign ? 0xFF800000 : 0x7F800000; - if ( zx.isNaN ) return 0xFFFFFFFF; - while ( 0x01000000 <= zx.sig.a0 ) { - zx.sig = shortShift64RightJamming( zx.sig, 1 ); - ++zx.exp; - } - while ( zx.sig.a0 < 0x00800000 ) { - zx.sig = shortShift64Left( zx.sig, 1 ); - --zx.exp; - } - savedZ = zx; - isTiny = - ( slow_float_detect_tininess == float_tininess_before_rounding ) - && ( zx.exp + 0x7F <= 0 ); - zx = roundFloatXTo24( isTiny, zx ); - expField = zx.exp + 0x7F; - if ( 0xFF <= expField ) { - slow_float_exception_flags |= - float_flag_overflow | float_flag_inexact; - if ( zx.sign ) { - switch ( slow_float_rounding_mode ) { - case float_round_nearest_even: - case float_round_down: - z = 0xFF800000; - break; - case float_round_to_zero: - case float_round_up: - z = 0xFF7FFFFF; - break; - } - } - else { - switch ( slow_float_rounding_mode ) { - case float_round_nearest_even: - case float_round_up: - z = 0x7F800000; - break; - case float_round_to_zero: - case float_round_down: - z = 0x7F7FFFFF; - break; - } - } - return z; - } - if ( expField <= 0 ) { - isTiny = TRUE; - zx = savedZ; - expField = zx.exp + 0x7F; - if ( expField < -27 ) { - zx.sig.a1 = ( zx.sig.a0 != 0 ) || ( zx.sig.a1 != 0 ); - zx.sig.a0 = 0; - } - else { - while ( expField <= 0 ) { - zx.sig = shortShift64RightJamming( zx.sig, 1 ); - ++expField; - } - } - zx = roundFloatXTo24( isTiny, zx ); - expField = ( 0x00800000 <= zx.sig.a0 ) ? 1 : 0; - } - z = expField; - z <<= 23; - if ( zx.sign ) z |= 0x80000000; - z |= zx.sig.a0 & 0x007FFFFF; - return z; - -} - -static floatX float64ToFloatX( float64 a ) -{ - int16 expField; - floatX ax; - - ax.isNaN = FALSE; - ax.isInf = FALSE; - ax.isZero = FALSE; -#ifdef BITS64 - ax.sign = ( ( a & LIT64( 0x8000000000000000 ) ) != 0 ); - expField = ( a>>52 ) & 0x7FF; - ax.sig.a1 = a; - ax.sig.a0 = ( a>>32 ) & 0x000FFFFF; -#else - ax.sign = ( ( a.high & 0x80000000 ) != 0 ); - expField = ( a.high>>( 52 - 32 ) ) & 0x7FF; - ax.sig.a1 = a.low; - ax.sig.a0 = a.high & 0x000FFFFF; -#endif - if ( expField == 0 ) { - if ( ( ax.sig.a0 == 0 ) && ( ax.sig.a1 == 0 ) ) { - ax.isZero = TRUE; - } - else { - expField = 1 - 0x3FF; - do { - ax.sig = shortShift64Left( ax.sig, 1 ); - --expField; - } while ( ax.sig.a0 < 0x00100000 ); - ax.exp = expField; - } - } - else if ( expField == 0x7FF ) { - if ( ( ax.sig.a0 == 0 ) && ( ax.sig.a1 == 0 ) ) { - ax.isInf = TRUE; - } - else { - ax.isNaN = TRUE; - } - } - else { - ax.exp = expField - 0x3FF; - ax.sig.a0 |= 0x00100000; - } - ax.sig = shortShift64Left( ax.sig, 3 ); - return ax; - -} - -static float64 floatXToFloat64( floatX zx ) -{ - floatX savedZ; - flag isTiny; - int16 expField; - float64 z; - -#ifdef BITS64 - if ( zx.isZero ) return zx.sign ? LIT64( 0x8000000000000000 ) : 0; - if ( zx.isInf ) { - return - zx.sign ? LIT64( 0xFFF0000000000000 ) - : LIT64( 0x7FF0000000000000 ); - } - if ( zx.isNaN ) return LIT64( 0xFFFFFFFFFFFFFFFF ); -#else - if ( zx.isZero ) { - z.low = 0; - z.high = zx.sign ? 0x80000000 : 0; - return z; - } - if ( zx.isInf ) { - z.low = 0; - z.high = zx.sign ? 0xFFF00000 : 0x7FF00000; - return z; - } - if ( zx.isNaN ) { - z.high = z.low = 0xFFFFFFFF; - return z; - } -#endif - while ( 0x01000000 <= zx.sig.a0 ) { - zx.sig = shortShift64RightJamming( zx.sig, 1 ); - ++zx.exp; - } - while ( zx.sig.a0 < 0x00800000 ) { - zx.sig = shortShift64Left( zx.sig, 1 ); - --zx.exp; - } - savedZ = zx; - isTiny = - ( slow_float_detect_tininess == float_tininess_before_rounding ) - && ( zx.exp + 0x3FF <= 0 ); - zx = roundFloatXTo53( isTiny, zx ); - expField = zx.exp + 0x3FF; - if ( 0x7FF <= expField ) { - slow_float_exception_flags |= - float_flag_overflow | float_flag_inexact; -#ifdef BITS64 - if ( zx.sign ) { - switch ( slow_float_rounding_mode ) { - case float_round_nearest_even: - case float_round_down: - z = LIT64( 0xFFF0000000000000 ); - break; - case float_round_to_zero: - case float_round_up: - z = LIT64( 0xFFEFFFFFFFFFFFFF ); - break; - } - } - else { - switch ( slow_float_rounding_mode ) { - case float_round_nearest_even: - case float_round_up: - z = LIT64( 0x7FF0000000000000 ); - break; - case float_round_to_zero: - case float_round_down: - z = LIT64( 0x7FEFFFFFFFFFFFFF ); - break; - } - } -#else - if ( zx.sign ) { - switch ( slow_float_rounding_mode ) { - case float_round_nearest_even: - case float_round_down: - z.low = 0; - z.high = 0xFFF00000; - break; - case float_round_to_zero: - case float_round_up: - z.low = 0xFFFFFFFF; - z.high = 0xFFEFFFFF; - break; - } - } - else { - switch ( slow_float_rounding_mode ) { - case float_round_nearest_even: - case float_round_up: - z.low = 0; - z.high = 0x7FF00000; - break; - case float_round_to_zero: - case float_round_down: - z.low = 0xFFFFFFFF; - z.high = 0x7FEFFFFF; - break; - } - } -#endif - return z; - } - if ( expField <= 0 ) { - isTiny = TRUE; - zx = savedZ; - expField = zx.exp + 0x3FF; - if ( expField < -56 ) { - zx.sig.a1 = ( zx.sig.a0 != 0 ) || ( zx.sig.a1 != 0 ); - zx.sig.a0 = 0; - } - else { - while ( expField <= 0 ) { - zx.sig = shortShift64RightJamming( zx.sig, 1 ); - ++expField; - } - } - zx = roundFloatXTo53( isTiny, zx ); - expField = ( 0x00800000 <= zx.sig.a0 ) ? 1 : 0; - } - zx.sig = shortShift64RightJamming( zx.sig, 3 ); -#ifdef BITS64 - z = expField; - z <<= 52; - if ( zx.sign ) z |= LIT64( 0x8000000000000000 ); - z |= ( ( (bits64) ( zx.sig.a0 & 0x000FFFFF ) )<<32 ) | zx.sig.a1; -#else - z.low = zx.sig.a1; - z.high = expField; - z.high <<= 52 - 32; - if ( zx.sign ) z.high |= 0x80000000; - z.high |= zx.sig.a0 & 0x000FFFFF; -#endif - return z; - -} - -static floatX floatXInvalid( void ) -{ - - slow_float_exception_flags |= float_flag_invalid; - return floatXNaN; - -} - -static floatX floatXRoundToInt( floatX ax ) -{ - int16 shiftCount, i; - - if ( ax.isNaN || ax.isInf ) return ax; - shiftCount = 52 - ax.exp; - if ( shiftCount <= 0 ) return ax; - if ( 55 < shiftCount ) { - ax.exp = 52; - ax.sig.a1 = ! ax.isZero; - ax.sig.a0 = 0; - } - else { - while ( 0 < shiftCount ) { - ax.sig = shortShift64RightJamming( ax.sig, 1 ); - ++ax.exp; - --shiftCount; - } - } - ax = roundFloatXTo53( FALSE, ax ); - if ( ( ax.sig.a0 == 0 ) && ( ax.sig.a1 == 0 ) ) ax.isZero = TRUE; - return ax; - -} - -static floatX floatXAdd( floatX ax, floatX bx ) -{ - int16 expDiff; - floatX zx; - - if ( ax.isNaN ) return ax; - if ( bx.isNaN ) return bx; - if ( ax.isInf && bx.isInf ) { - if ( ax.sign == bx.sign ) return ax; - return floatXInvalid(); - } - if ( ax.isInf ) return ax; - if ( bx.isInf ) return bx; - if ( ax.isZero && bx.isZero ) { - if ( ax.sign == bx.sign ) return ax; - goto completeCancellation; - } - if ( ( ax.sign != bx.sign ) - && ( ax.exp == bx.exp ) - && eq64( ax.sig, bx.sig ) - ) { - completeCancellation: - return - ( slow_float_rounding_mode == float_round_down ) ? - floatXNegativeZero - : floatXPositiveZero; - } - if ( ax.isZero ) return bx; - if ( bx.isZero ) return ax; - expDiff = ax.exp - bx.exp; - if ( expDiff < 0 ) { - zx = ax; - zx.exp = bx.exp; - if ( expDiff < -56 ) { - zx.sig.a1 = 1; - zx.sig.a0 = 0; - } - else { - while ( expDiff < 0 ) { - zx.sig = shortShift64RightJamming( zx.sig, 1 ); - ++expDiff; - } - } - if ( ax.sign != bx.sign ) zx.sig = neg64( zx.sig ); - zx.sign = bx.sign; - zx.sig = add64( zx.sig, bx.sig ); - } - else { - zx = bx; - zx.exp = ax.exp; - if ( 56 < expDiff ) { - zx.sig.a1 = 1; - zx.sig.a0 = 0; - } - else { - while ( 0 < expDiff ) { - zx.sig = shortShift64RightJamming( zx.sig, 1 ); - --expDiff; - } - } - if ( ax.sign != bx.sign ) zx.sig = neg64( zx.sig ); - zx.sign = ax.sign; - zx.sig = add64( zx.sig, ax.sig ); - } - if ( zx.sig.a0 & 0x80000000 ) { - zx.sig = neg64( zx.sig ); - zx.sign = ! zx.sign; - } - return zx; - -} - -static floatX floatXMul( floatX ax, floatX bx ) -{ - int8 bitNum; - floatX zx; - - if ( ax.isNaN ) return ax; - if ( bx.isNaN ) return bx; - if ( ax.isInf ) { - if ( bx.isZero ) return floatXInvalid(); - if ( bx.sign ) ax.sign = ! ax.sign; - return ax; - } - if ( bx.isInf ) { - if ( ax.isZero ) return floatXInvalid(); - if ( ax.sign ) bx.sign = ! bx.sign; - return bx; - } - zx = ax; - zx.sign ^= bx.sign; - if ( ax.isZero || bx.isZero ) { - return zx.sign ? floatXNegativeZero : floatXPositiveZero; - } - zx.exp += bx.exp + 1; - zx.sig.a1 = 0; - zx.sig.a0 = 0; - for ( bitNum = 0; bitNum < 55; ++bitNum ) { - if ( bx.sig.a1 & 2 ) zx.sig = add64( zx.sig, ax.sig ); - bx.sig = shortShift64RightJamming( bx.sig, 1 ); - zx.sig = shortShift64RightJamming( zx.sig, 1 ); *** 14608 LINES SKIPPED *** From nobody Fri Jun 30 21:04: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 4Qt7B73bB5z4l0QR; Fri, 30 Jun 2023 21:05:03 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt7B66TB7z3mkR; Fri, 30 Jun 2023 21:05:02 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108158.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35UKGm1O009495; Fri, 30 Jun 2023 14:05:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=to : cc : subject : in-reply-to : references : from : mime-version : content-type : content-id : content-transfer-encoding : date : message-id; s=PPS1017; bh=g13v26btE0K7TTTysjEfDm/AdROcCxj4+Uu8nnmCflo=; b=SUs/3NNLjuAx3qdeVCzSIVyCeCwW2zw2sMlJ8U9xG+UaYs1OJuy35UScQL+stkQEAu6O bFOk2Knmi/FLDsBdZxXLkiQgERkNrjvOiEixJmbbzkrkrzaBQLfOLstkvIzs4IN0ADcn xeDYRHus+MXZxy92XAbLVAqCbSP+eD4R6vnfCpNAjNsWGJ34UH6fadLY5ihGsASTl0F4 tTJtXz7YkLYb2ieJbmsbvHzAoupNwLhLTcS20KqalOHk4SPQBLJeF15jitEQ9T8Y8VlJ 1poybS2U3OfY1e/EQpKO+vz3sqtUQab5wFuhP4KyRtKsB8Q3m6QRiTsZrKb9i2xEF/C6 aA== Received: from bl0pr02cu006.outbound.protection.outlook.com (mail-eastusazlp17013036.outbound.protection.outlook.com [40.93.11.36]) by mx0a-00273201.pphosted.com (PPS) with ESMTPS id 3rj03n8vk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Jun 2023 14:05:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LlbNhJPxtXR5IPY9MgVjAkgvf/tfyH0ytB6XhAX/VNsYswM3QDORrY/PrqEnLYfPTksgB3cuMUKCvV19JB9CSV6snU5KOgMfQOJTUz92jbRORrogO0IQ28Xip+YYqTU9RtCjq6U6sm5hVwochCDPZjcLf3EV1/Iso1LY5M9/8XZk1TCKCkgzmcYuTip+40MhoO3u0lfNXzhVAvVUUb/XL+COnH9nkh71jEmdUiZA1YAV4INPMIXJTpit47rF4vtTQnAikxENpEYUQshJOwFNXvQ6s0HdX8Bcto24VQAM/l7VCJG5ik0adfHTUXE1AH+I8Q5ZBf7fbyovsgiHdq/vdw== 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=g13v26btE0K7TTTysjEfDm/AdROcCxj4+Uu8nnmCflo=; b=bgNuupGD88ygmHrbWfdglFNHhmjAgmTSYdk0LtUdW8xIPzOgoWv4+Sj8RxFcDlBpw5/B48nWcQX221RI/pGAoqdyNigiHWObxPPvBqZ/Lyfkwz4kVq/h/mUymnfMFKfK2BbA3QKnnTf8txJ3b9WqjfSmVBszIATvwcXX+0YyxARLFYz6GP3YE+qVGPHjz5bf8+86Zj2al7jLuSIr5iBbnp/TL/ccQYr7mdmwGE+tr0XtsEsXE+XK7EyKar3zalVeYr/TG4IKGOlzJOHEXQ9c9TItDmyJzYuwv+8OvQyVc+uCIYOj9AG8iYQCh5R4AU28VypWodjHqIiWSbEU4qmHbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.15) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g13v26btE0K7TTTysjEfDm/AdROcCxj4+Uu8nnmCflo=; b=fwFdnrGC0aJbRA2ab5W5EK/BijTRVttJp81Mgy7fk1v2x1xCWa0fLPjJUZqNYX1hFFdU0RKfhtVqeoxJHOY6tS8qi3YRnwUricagEZHXCUdKtRN/WuWL+X0Ymx8ionMvV/i3oBY8BzjCPHSPOk6BXKTJ/cta3S/ANhb9wqeZ6BQ= Received: from BYAPR06CA0051.namprd06.prod.outlook.com (2603:10b6:a03:14b::28) by CY5PR05MB9141.namprd05.prod.outlook.com (2603:10b6:930:37::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Fri, 30 Jun 2023 21:04:58 +0000 Received: from DM6NAM12FT006.eop-nam12.prod.protection.outlook.com (2603:10b6:a03:14b:cafe::d0) by BYAPR06CA0051.outlook.office365.com (2603:10b6:a03:14b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Fri, 30 Jun 2023 21:04:57 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.15) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.15 as permitted sender) Received: from p-exchfe-eqx-02.jnpr.net (66.129.239.15) by DM6NAM12FT006.mail.protection.outlook.com (10.13.178.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.13 via Frontend Transport; Fri, 30 Jun 2023 21:04:57 +0000 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchfe-eqx-02.jnpr.net (10.104.9.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21; Fri, 30 Jun 2023 16:04:57 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21 via Frontend Transport; Fri, 30 Jun 2023 16:04:56 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 35UL4uek018927; Fri, 30 Jun 2023 14:04:56 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id B5D218D811; Fri, 30 Jun 2023 14:04:29 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id B42808D793; Fri, 30 Jun 2023 14:04:29 -0700 (PDT) To: John Baldwin CC: , , , Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors In-Reply-To: <2512b2e6-8b57-995f-6901-a1e00a4e9238@FreeBSD.org> References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> <2512b2e6-8b57-995f-6901-a1e00a4e9238@FreeBSD.org> Comments: In-reply-to: John Baldwin message dated "Fri, 30 Jun 2023 07:41:34 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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-ID: <58443.1688159069.1@kaos.jnpr.net> Content-Transfer-Encoding: quoted-printable Date: Fri, 30 Jun 2023 14:04:29 -0700 Message-ID: <63110.1688159069@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM12FT006:EE_|CY5PR05MB9141:EE_ X-MS-Office365-Filtering-Correlation-Id: 35573862-0cd5-4b24-3945-08db79ada912 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ygWZTPVHAVAEt/N4KgZn04l0NLe18CByyrkHyWQMUMNfkVp2SqELqsuu6NA1YL0Jpkn6Bso20VDPy4H/7bfVaViErTf8v8KaAkPhoiF2mhBZyyICUQ3Gr91eekNf3l69x8wiy7aRwpKYYix5zK8OzYG9l5LLfpnNRPchSPHEN5Y4i4hqyj1XNkffuSvmQ3g88jswGcliRnODoSlKHcXBglb0MNeHJynHhGjhBd/lPh30hov6ROK6apNgmK+WdwzymPf3cCNr+lulQafh0ba6Odxvur+bmjhyIcFb/FtgOugX6TyUU5z7gDOXmNHMQo6Aq0WiwYr6vLhs4U99jE3jTgq91xBnp8gCwXwTalB+SgkydvCbeJ1IS9L6xHKHQUewUV/EyVUFJUMUDnMKk+/1+Vjwr5OIk3LHJT2BbBwUWR6XcfN8SegDUAwbe/nJHeIPNfDexJNVpDF6VMOM+pE/5vMu3hmr9dMlPiaqfQxhloFq/uIk0/r8n2amJHXvGahjzUmTHCD5yjvjgIfQiz/eZnO2BicGPbPNpkxYmboMQphL6Pp2NQ2PY4qTd31Yxcgt7xSRKY/4wAutGbyPrJNoWr2CerURanDLbolpKu8TyKqDdPNbYgQU8j7UyoZZa92BaKB0mofNN/EbL1fkVRrFV83NStXQw0CMMC8Q58OMCEx91f1Zz2e5P1wqHp7RHrCeA/u4RIXaao+EcgrNjmdbHA+8TanGuPcITQL6Q6UVmPvNTbNK0UEJb3AdBotyzt15z1s/4uekHCyH5KT516HRd+tMAXpPhEIUXzub4dLDWytAxiPcMZTxGkrDrmdf2y9l X-Forefront-Antispam-Report: CIP:66.129.239.15;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-02.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(136003)(346002)(39860400002)(396003)(451199021)(40470700004)(46966006)(36840700001)(186003)(82310400005)(36860700001)(41300700001)(107886003)(9686003)(6266002)(47076005)(54906003)(83380400001)(7126003)(478600001)(336012)(7696005)(2906002)(26005)(6916009)(356005)(55016003)(40460700003)(70206006)(316002)(82740400003)(81166007)(70586007)(5660300002)(450100002)(40480700001)(8936002)(4326008)(86362001)(8676002)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 21:04:57.4966 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 35573862-0cd5-4b24-3945-08db79ada912 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.15];Helo=[p-exchfe-eqx-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT006.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR05MB9141 X-Proofpoint-GUID: OkV3xP2YACG7faQ4KlfGNinQFBzGOJYc X-Proofpoint-ORIG-GUID: OkV3xP2YACG7faQ4KlfGNinQFBzGOJYc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-30_12,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 mlxscore=0 phishscore=0 priorityscore=1501 suspectscore=0 adultscore=0 mlxlogscore=565 lowpriorityscore=0 malwarescore=0 clxscore=1011 impostorscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306300184 X-Rspamd-Queue-Id: 4Qt7B66TB7z3mkR X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N John Baldwin wrote: > > --- > > lib/libsecureboot/openpgp/opgp_sig.c | 22 ++++++++++++---------- > > lib/libsecureboot/vets.c | 7 +++++-- > > 2 files changed, 17 insertions(+), 12 deletions(-) > > > > diff --git a/lib/libsecureboot/openpgp/opgp_sig.c b/lib/libsecureboot/= openpgp/opgp_sig.c > > index eec3469e3457..7f4e6fb98fd1 100644 > > --- a/lib/libsecureboot/openpgp/opgp_sig.c > > +++ b/lib/libsecureboot/openpgp/opgp_sig.c > > @@ -464,20 +464,22 @@ verify_asc(const char *sigfile, int flags) > > size_t n; > > unsigned char *fdata, *sdata; > > size_t fbytes, sbytes; > > - > > + > > + fdata =3D NULL; > > if ((sdata =3D read_file(sigfile, &sbytes))) { > > n =3D strlcpy(pbuf, sigfile, sizeof(pbuf)); > > - if ((cp =3D strrchr(pbuf, '.'))) > > - *cp =3D '\0'; > > - if ((fdata =3D read_file(pbuf, &fbytes))) { > > - if (openpgp_verify(pbuf, fdata, fbytes, sdata, > > - sbytes, flags)) { > > - free(fdata); > > - fdata =3D NULL; > > + if (n < sizeof(pbuf)) { > > + if ((cp =3D strrchr(pbuf, '.'))) > > + *cp =3D '\0'; > > + if ((fdata =3D read_file(pbuf, &fbytes))) { > > + if (openpgp_verify(pbuf, fdata, fbytes, = sdata, > > + sbytes, flags)) { > > + free(fdata); > > + fdata =3D NULL; > > + } > > } > > } > > - } else > > - fdata =3D NULL; > > + } > > free(sdata); > > return (fdata); > = > Most of this change seems to be avoiding reading the "real" file > if the filename from the signature file was too long to fit into > pbuf which I think is a different change? This is all just levels of paranoia. strlcpy will truncate the data anyway, but if the buf isn't big enough to hold the name, someone is playing games and we don't want to play along= . > > diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c > > index 4375dfa76a89..12191097ff8c 100644 > > --- a/lib/libsecureboot/vets.c > > +++ b/lib/libsecureboot/vets.c > > @@ -241,11 +241,14 @@ x509_cn_get(br_x509_certificate *xc, char *buf, = size_t len) > > mc.vtable->start_cert(&mc.vtable, xc->data_len); > > mc.vtable->append(&mc.vtable, xc->data, xc->data_len); > > mc.vtable->end_cert(&mc.vtable); > > - /* we don' actually care about cert status - just its name */ > > + /* we don't actually care about cert status - just its name */ > > err =3D mc.vtable->end_chain(&mc.vtable); > = > For cases like this I've removed the variable and used a (void) cast ins= tead to indicate > that the return value is intentionally unused. Right, but I actually want err, so it can be seen in a debugger easily. It was at least useful when first getting this stuff to work. From nobody Fri Jun 30 21:05: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 4Qt7Ck3VPLz4l1CK; Fri, 30 Jun 2023 21:06:26 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt7Ck0mLHz3nFF; Fri, 30 Jun 2023 21:06:26 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108163.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35UJfTnV004315; Fri, 30 Jun 2023 14:06:24 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=to : cc : subject : in-reply-to : references : from : mime-version : content-type : content-id : date : message-id; s=PPS1017; bh=DVx8LZnEAFrVBJKppWt5JNMkoo0H9jeTToaygWHo/ds=; b=sN/yWG9o79dl7SfIS3DCthrdyi4h9evrx779kUh2r0uAgfkvUujIdFTlDvMPmevq5J3x 7wcDnOph/7jJ9SGKFaBRTBb5QLN3dqYGASkwAXnFqLGl3N1yal21A9OQ/XDCcC1f8vta 3oJONZt5Dc+B/CDw9cN3RqXct7le3ol0Zgb2GINj8IMuOyLDNqlQkeUpNpMgm691S6x/ 9n1lKOvDx/bG+KTprBedbbvS/PVbeI0n/O1wuGeLP8/Brof679akWV5shPBa7dROGEvG 5B5XkSoCQAFjH47K4H97e3812vOy9JOo9ViGmq8jiHtNoFxy6mT1tYMVeJubaQjzDtm/ wQ== Received: from dm4pr02cu001.outbound.protection.outlook.com (mail-centralusazlp17012021.outbound.protection.outlook.com [40.93.13.21]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 3rj5e9r4u1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Jun 2023 14:06:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RkE4cTmcFJSOgmTAyUyFTJBZanglJ4HpYsyR9e1qNZ2EkN9nscph00Ia4JAbxCiGz2693hsONIFFR3yuB4iHovkYXSnRyNyd4HM4FdfoTR2P9/S6PQ4jtHnEzYqT/p4jihEErt4p5e1bDq2PeXUkPG/PyrTfia+LgL3SwEdFsYw2WHDFW/eDqFxA0cYloPSZEv/H4nXtUvcs6nmtTDOd09Fr0phjRSrHJw6n+hfqnl1ZtsHAuuTzg0Tib/FntoD8UXw1NeUmbFr13qYrXadFWdkKn+y9zbZMv+wRqZuhMhRC/InemYsGHn5jQ4UiLMjfV1wrUY+e6UZ4t5jgxOjJHg== 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=DVx8LZnEAFrVBJKppWt5JNMkoo0H9jeTToaygWHo/ds=; b=bku+Y2JSzIBtq3dT2vTZSbJMt8VeZi804MbrUC88WXWY+gXvdDjO/H6iMMSRunwTYrHdf+QVIcfgOBGmHgPa4qmmo/ReeS/iYl61CTKrjludRsQA98rYtg056Wh+jH9jzi5cpqXNQ5qunr7OiT+099sA9uTQvznQgrCUQIWW2SqrD9yydTi+irOaXY74HELvxrykNqHnGSI+Zf72iKtIXofTYC5bWcqMgukMtAQXhMlYLSLKLM4/JQwxrfXwm1doNHT+RNb5riN/Vzy5IcdVbOTLyvlcEFF5TCPZbKK0btzb5U+jnBDvAMkBwZhflf8YVN1RFVBNhdIgzwugyu6JgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.14) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DVx8LZnEAFrVBJKppWt5JNMkoo0H9jeTToaygWHo/ds=; b=ZQMZjRC9nvUmj92y4LRHm3+SnIm8/yiuNtw/fFSfiX1jDOXSDfEKkpmMx3glLIo+AhSpZaDV8JHyX8Ueg5G1ULgZpgji3oesO1+TzeA1T6yVbUmKGElXrewPa0HzKbQZx0+MF4aa+nK+8cykk+DCfCY52CaZjmRZOmIYrv/tVtM= Received: from BY3PR05CA0037.namprd05.prod.outlook.com (2603:10b6:a03:39b::12) by BL3PR05MB9137.namprd05.prod.outlook.com (2603:10b6:208:3b8::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Fri, 30 Jun 2023 21:06:22 +0000 Received: from DM6NAM12FT088.eop-nam12.prod.protection.outlook.com (2603:10b6:a03:39b:cafe::8e) by BY3PR05CA0037.outlook.office365.com (2603:10b6:a03:39b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.10 via Frontend Transport; Fri, 30 Jun 2023 21:06:21 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.14) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.14 as permitted sender) Received: from p-exchfe-eqx-01.jnpr.net (66.129.239.14) by DM6NAM12FT088.mail.protection.outlook.com (10.13.179.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.10 via Frontend Transport; Fri, 30 Jun 2023 21:06:20 +0000 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchfe-eqx-01.jnpr.net (10.104.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21; Fri, 30 Jun 2023 16:06:20 -0500 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21; Fri, 30 Jun 2023 16:06:20 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21 via Frontend Transport; Fri, 30 Jun 2023 16:06:20 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 35UL6JPA019285; Fri, 30 Jun 2023 14:06:19 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id F2DB48D72C; Fri, 30 Jun 2023 14:05:52 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id F255C8D55D; Fri, 30 Jun 2023 14:05:52 -0700 (PDT) To: Jessica Clarke CC: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors In-Reply-To: <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> Comments: In-reply-to: Jessica Clarke message dated "Fri, 30 Jun 2023 15:42:34 +0100." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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-ID: <28071.1688159152.1@kaos.jnpr.net> Date: Fri, 30 Jun 2023 14:05:52 -0700 Message-ID: <28393.1688159152@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM12FT088:EE_|BL3PR05MB9137:EE_ X-MS-Office365-Filtering-Correlation-Id: d0024080-fd93-4858-8768-08db79addac9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zKUkRU7z50/hgWU3zVt0OvOno5eVZJBgN+T8VxD9eypRg3j+m22HDvdyoQcCiiFLaRj9gQMONixKLMdyawMOCAFhZ2Ip2DwwrNiqcMXkENANP8qt40Xmb+nlFS4drUVSCcGViPLjnfGYSBBm+gv1uYHbfAs2T7aMYhgtvZAjdWh5MTvMDEH2/efz+lB752WoTNCYZGB3vhCXgpWdBxDbDRqU0EtgxQHhQ2X7euclRMopfC1L3JkXseyeWEuyZbvZI48XnPJ9N2ONUO7KHHhOkITruxlg5tBG2xVItm+XFjYrdMF1IkvZkl5i6l5iYLND1X/BLgpFUBBAcHMh9vOnmUMQr0PLXIwHTZ8PYFM/isUdxJdRZLkvThB3T6BJOffT/BuVZ2bnpoR598eRrhKcEgy/qgbXT9Q5SA/GR19pJaK6qcP7tKhRa8CF/QFo6c3IW8jtNZLxoCRSEDftAUhLQQd6ntGeS2CW+x6czS3qiw4p0DmpPP9DpCyRF7BtrtSj2u5NmTQYUNbCwobgX5KVNOL8itk+D1Tf3mM8RV8+BPnjl6wg8iDMZ1IAjD8Mhus5zqXYQOQC3fkAwjxfLGWuxMq6fcURzuGwvxvNweW5izCVU1M8z5xNs5wHqDTYwekbtqQxpKZtCoIeraUlf6pxnK9VK6ljW9wuL1I21zV+gBttCtvVBpiUoW052xyvYB/HtFu0a7OoALTHywGoW0D4ffF7dtfTLd+HnbcvVmqMYTfCI7YqBcVP79RICY+N4F4sq/K3czgrWM7762vglrric2oAQaD9n+Ej6ni+6f8TGDd7f0W0RRGXb3NX/BKMvEn7 X-Forefront-Antispam-Report: CIP:66.129.239.14;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-01.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(136003)(39860400002)(376002)(451199021)(46966006)(40470700004)(36840700001)(9686003)(26005)(82310400005)(4326008)(8936002)(36860700001)(107886003)(478600001)(54906003)(7126003)(7696005)(336012)(186003)(356005)(6266002)(4744005)(2906002)(82740400003)(40460700003)(70206006)(47076005)(41300700001)(40480700001)(316002)(55016003)(450100002)(81166007)(70586007)(5660300002)(6916009)(86362001)(8676002)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 21:06:20.8907 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0024080-fd93-4858-8768-08db79addac9 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.14];Helo=[p-exchfe-eqx-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT088.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR05MB9137 X-Proofpoint-GUID: OBUG_FDxVJnwvpXE4B5_ZMO65tizKRQE X-Proofpoint-ORIG-GUID: OBUG_FDxVJnwvpXE4B5_ZMO65tizKRQE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-30_12,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=1 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 spamscore=1 clxscore=1011 priorityscore=1501 malwarescore=0 impostorscore=0 mlxscore=1 mlxlogscore=219 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306300184 X-Rspamd-Queue-Id: 4Qt7Ck0mLHz3nFF X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Jessica Clarke wrote: > > - if (!cn.status) > > + if (!cn.status) { > > buf = NULL; > > + if (err == 0) /* keep compiler happy */ > > + buf = NULL; > > This is nonsense code. The error is nonsense, so yes. I want to keep the variable, but it has no purpose except to look at in a debugger - how do you tell the compiler that? From nobody Fri Jun 30 21:14: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 4Qt7PP1VgWz4l5CP; Fri, 30 Jun 2023 21:14:49 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt7PN5fX0z3qW4; Fri, 30 Jun 2023 21:14:48 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108161.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35UJWP1h008905; Fri, 30 Jun 2023 14:14:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=to : cc : subject : in-reply-to : references : from : mime-version : content-type : content-id : date : message-id; s=PPS1017; bh=9+jxShiVyS4w8DshFgqZ/BEl/9GeZ9u3hTiV6nBQHSQ=; b=0oFk29tppYhCkTqyViK8tZMEdLt1YDeEf4tpfMt0ellBJSQsWln8gYmXfTTiv0KOk/GW Chua+S635cIZIZP8pujcNGZnUvzrXBt4M2Vc4lYwzxoQbAKoAAdALFnIMu+0QLA+s/og UQPkeJ8B+ztdE0IIMvjqbHMgpc7/ez5C1Pfe4bXLRfq54SOCvvhHvyz16ZLWgWxMVP0M /lugZWcfEcSGZNkPSkcLCVBdWE15/swVsUjZRfCvQTqLbfGJ3EQXKHNMw+z/t0MqW+yG A7MIHdtV3/5/BY8IWD3oE4y4poeESVyY8b4q3T33FVFxe2kknwMeYxCShr3Wpi+CTsB6 eA== Received: from mw2pr02cu001.outbound.protection.outlook.com (mail-westus2azlp17012023.outbound.protection.outlook.com [40.93.10.23]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 3rhscgsvuw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Jun 2023 14:14:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WwUohOf9AWYVc8joaPAe7cEqwks85b4tw/We30Vqhl6yLJNlG/q61GyQf+t1ba/VoNjAu5uh1A1VLODCGQgEP/idP5CCwmovm/rRuPoMAz+P94P5Pyx8kJJ3uhSeVzLSLl4lmvJLvauwM39kVa4BReG5Jn5yx8qaYyPuELSlLO/P2ihDjhp0CnEdoJM0vnzbxP4Z/bdRpxMChYJ4kw53UdOATjamj2fXxSpbFc/bfsz/3WdfAlOaEFSbYLXzpgmRhsvtJS9cGkSzRjfo5rxFQgEngd+abxGqZJSP80pxshMC8bQpTmxnKaUoOF+VVfcYobknjZq8Bw6Ec4eU7d7FuQ== 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=9+jxShiVyS4w8DshFgqZ/BEl/9GeZ9u3hTiV6nBQHSQ=; b=WrQ5Ggy29bwm0wSsZUVTwJ2Qj7hHyLD6W9rvQBs43Rd2vS3ck3Qbrsv6NCUiq52O2TAVD97SVvvVF+vTZiroARQWPzrawv5iMXbqzfBfQVF0wPiCTvhNRRxkibe4srUyyd00ntd8U66qDHMfqD2J8tLcloYSCPx3mAT3y9NA7PRHy/E9wejO+mWP7U7yg8xyHNRJEv4Cefrr5lG4bjy4li8bJpsH8gpYxtphbZdSYCwwENGr/MEqDYwkQcvGVnc8eSc/rpLEIe2AtnwJIekr9oBGbJOrAu6mSMee3UUsetBEl/1S/Ruo6whDGv23wWQ8/72QkZr5oEbf56iOJXkGMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.14) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9+jxShiVyS4w8DshFgqZ/BEl/9GeZ9u3hTiV6nBQHSQ=; b=G3dq3GLc8ytjq87pgzyZE6dV6n0lyyHhO/GX1/1NfTn7fRJnLtbByDYzqO2ZJt6a190qNWQmQAlAtmS2TP5EI0AOteQn+vI+Vk90ogIw7nX634rLljXcCQ0jh2vMlAwmcZ9FNLRWrW8TeAyVnOao0nlGkwPU9Vq6Gk8fKid7dBA= Received: from MW4PR04CA0322.namprd04.prod.outlook.com (2603:10b6:303:82::27) by CY5PR05MB8964.namprd05.prod.outlook.com (2603:10b6:930:2c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.21; Fri, 30 Jun 2023 21:14:45 +0000 Received: from MW2NAM12FT053.eop-nam12.prod.protection.outlook.com (2603:10b6:303:82:cafe::10) by MW4PR04CA0322.outlook.office365.com (2603:10b6:303:82::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Fri, 30 Jun 2023 21:14:45 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.14) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.14 as permitted sender) Received: from p-exchfe-eqx-01.jnpr.net (66.129.239.14) by MW2NAM12FT053.mail.protection.outlook.com (10.13.181.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.13 via Frontend Transport; Fri, 30 Jun 2023 21:14:45 +0000 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchfe-eqx-01.jnpr.net (10.104.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21; Fri, 30 Jun 2023 16:14:44 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21 via Frontend Transport; Fri, 30 Jun 2023 16:14:44 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 35ULEig7020902; Fri, 30 Jun 2023 14:14:44 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 8B5668D794; Fri, 30 Jun 2023 14:14:17 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 8ACFC8D72D; Fri, 30 Jun 2023 14:14:17 -0700 (PDT) To: Jessica Clarke CC: Mitchell Horne , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors In-Reply-To: References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> <498f3ba2-dc7a-e7d3-626a-76ca68cee5b2@freebsd.org> Comments: In-reply-to: Jessica Clarke message dated "Fri, 30 Jun 2023 18:07:58 +0100." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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-ID: <76829.1688159657.1@kaos.jnpr.net> Date: Fri, 30 Jun 2023 14:14:17 -0700 Message-ID: <79845.1688159657@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW2NAM12FT053:EE_|CY5PR05MB8964:EE_ X-MS-Office365-Filtering-Correlation-Id: ddccf3f0-03dd-43ca-ffc1-08db79af075a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P4QspvntGycmaFuMnbSZxwBEJzPibLBLDL3ywdWcPra9GJH+BPq8GNWjUAc7iT9e74yxfT/3F0mOIUJ7kWZY9QT4c6JaQRNLVdvPcU6aYSThpRw6oWZOlXVzlegaLOLRGPPKeALaoBOuzxdQJalrIjflht+mQmYoUN+rJGP6w/1s1sS7geuIeSPpVTwF+/izwARXMK/wkVbMFxbHpWK4jug+gO9etxvLOQt19k36HQGH9ivcm27Zdsv2FzyaZM+AtGiU90c7g4fCNJStg8bU7nXwHo93FlrEdvfEVkTYRRkibq++uKQx188tU2xcVTIJLfJIEj4GxhhF4X2boqEF2wyShyHJ4YvurQtf2/PYxXhPjFPucZONMwzO/ZGl5W23jMWR6ad1V11jcTBBu2JdiW4avRM7FW+O/sy1EuPFyzptZjdUyyybG+eUI/KanPjmcFFlMkMMBnWyib4SRZH2xXF5+EDlBmSKXWLXLlNohwlK4Li6ZJbt7dlAel9zctodqsVGhO1qDsSLFRg5mZw4uVOdOs/9Qf7giJgwsF+mSk2Ep5BPR21VgVJ08zWpd359mfO4XY+0zB5lOCSrWAobKXaGC0xmK8WwKvrG9pCsyT0g5ay9tsy7FCSYrlWYVdVX3VyyCdWIXhCGlSY8elGUd56g2+Mc6L1S5C6I2G4316VfkAkpPZT0kIvl5U0UXj6cifX5yzXFIa28Mh3T8t+/RRuhXp06ejAyxjafkMAcIbwwM2ChqJq2hA7H7r+Vl0Y706+adzJrkyyOm7tqN5DTuyv0uBx3064Vy+xFBGGufCPiZKnUmb1aX7CVgdDPlaZY X-Forefront-Antispam-Report: CIP:66.129.239.14;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-01.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(346002)(39860400002)(376002)(136003)(396003)(451199021)(40470700004)(36840700001)(46966006)(356005)(81166007)(82310400005)(82740400003)(55016003)(40480700001)(86362001)(107886003)(5660300002)(9686003)(7126003)(6266002)(70586007)(4744005)(186003)(26005)(450100002)(70206006)(6916009)(478600001)(2906002)(8676002)(7696005)(4326008)(316002)(41300700001)(8936002)(66899021)(47076005)(83380400001)(336012)(36860700001)(54906003)(40460700003)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 21:14:45.2230 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ddccf3f0-03dd-43ca-ffc1-08db79af075a X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.14];Helo=[p-exchfe-eqx-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT053.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR05MB8964 X-Proofpoint-ORIG-GUID: Jzipmdy8BEXSofei7yQ_rjr-uklt1iHR X-Proofpoint-GUID: Jzipmdy8BEXSofei7yQ_rjr-uklt1iHR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-30_12,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 phishscore=0 bulkscore=0 malwarescore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=261 clxscore=1011 adultscore=0 suspectscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306300184 X-Rspamd-Queue-Id: 4Qt7PN5fX0z3qW4 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Jessica Clarke wrote: > A conditional assignment of the same value that has already been > assigned unconditionally is unidiomatic code generally regarded as a > code smell and should be avoided. In an ideal world that would give a I agree. I've been bitten by __unused recently when porting stuff to linux so was looking to avoid that. From nobody Fri Jun 30 21:52: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 4Qt8DF6TPWz4jypj; Fri, 30 Jun 2023 21:51:57 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt8DF2zSrz436j; Fri, 30 Jun 2023 21:51:57 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-98de322d11fso64797066b.1; Fri, 30 Jun 2023 14:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688161914; x=1690753914; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JPADjRtCiM64+La37rVdi5LUEwglBaSmNB9E/N2t+xs=; b=qJU2AgZjv48Z2Axpx0XO+ErhfPaX4AdQZ8IGwdI8Z/DG/k+duGLsM3oF2Dpk0Iwoj6 YLnkxu+Qrg5XqQCu4LdbFMh/5AexYlO8a3vAU4Kfk2aVmnoRhQbglJ3lgaTJuZOCim4F 9kU4lUPDdh9rs5+PQgpi0l26HPJMvtfDMfoR9upumWS47K0vQCX9ljVkbxWeC+JVQEfb NtYeWvHVWmr8zx0GCAAOMFGv2M3RDDnqL1m11e9jUJ2NBQfHIzgGhQcDzh6zq1FJgoak 2DKUxVaiNgXV1OdK9lzotX3BiOBk0ygG20taGAWy/gJ2X1cLXPLlsrr4w3/LWMFH2SoN 4hlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688161914; x=1690753914; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JPADjRtCiM64+La37rVdi5LUEwglBaSmNB9E/N2t+xs=; b=KePBxCd0b5pLCyu9DrVxvmtAzSwiEVn5rC3GF+aEpJamSmAjNqe+39yf6jAx52ijs8 dwO/AiMzBKMkbkwWhcU9LsSoJORBMIpGuy6nBC0n7CAvwtCHwn2qWzyacQNK3HrzdMko PRZTdGqC3wd8VYHErukAqu79sCMWJ9O6zroRi9xmaxknPBvn84BpC+nHprpOKDsR+Z0W coPuKwSb0P5vnBtQGxcRc2eZum7CjnGwn75gvv3yNMu8VjRrR85aG/xw6xlOM4YqzwRE gBxo5s3axxi2Hx5ky+I0czLxxWt/3qZPYRvyi/ktZEy/qj5/kvaAuIULXWSIJ9KeTSRM 8XRQ== X-Gm-Message-State: AC+VfDw+v1HChSKp4muiPB4Qr1JPAniyKz1N1VwWFC3e2xFzv/QKC07Z eC4hUpT2gTjla3YtWN+qW/RioWkNi3X/woCT2G3APrsOJMDy9g== X-Google-Smtp-Source: APBJJlHR26NdI908eKaiVU1WBasoAHkI/H0IthAUMW9oVTU7cwLgG8q8jdkw9UEQsOLM/3WmtZpYQiUE4GhloOUDVxM= X-Received: by 2002:a17:906:aac5:b0:987:6960:36c8 with SMTP id kt5-20020a170906aac500b00987696036c8mr2754784ejb.7.1688161913719; Fri, 30 Jun 2023 14:51:53 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> <498f3ba2-dc7a-e7d3-626a-76ca68cee5b2@freebsd.org> <79845.1688159657@kaos.jnpr.net> In-Reply-To: <79845.1688159657@kaos.jnpr.net> From: Rob Wing Date: Fri, 30 Jun 2023 13:52:37 -0800 Message-ID: Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors To: "Simon J. Gerraty" Cc: Jessica Clarke , Mitchell Horne , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000030d3d505ff5fd3a6" X-Rspamd-Queue-Id: 4Qt8DF2zSrz436j X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000030d3d505ff5fd3a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Looking at this snippet: + if (!cn.status) { buf =3D NULL; + if (err =3D=3D 0) /* keep compiler happy */ + buf =3D NULL; + } return (buf); } And considering the comment at contrib/bearssl/inc/bearssl_x509.h , is it intended for buf to be returned as-is (i.e., not set to NULL) when the decoding status indicates an error condition? On Fri, Jun 30, 2023 at 1:14=E2=80=AFPM Simon J. Gerraty = wrote: > Jessica Clarke wrote: > > A conditional assignment of the same value that has already been > > assigned unconditionally is unidiomatic code generally regarded as a > > code smell and should be avoided. In an ideal world that would give a > > I agree. > > I've been bitten by __unused recently when porting stuff to linux > so was looking to avoid that. > > --00000000000030d3d505ff5fd3a6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Looking at this snippet:

+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (!cn.status) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 buf =3D NULL;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (err =3D=3D 0)= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* keep compiler happy */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0buf =3D NULL;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return (buf);
=C2=A0}

And considering the comment at contrib/bearssl/inc/bear= ssl_x509.h, is it intended for buf to be returned as-is (i.e., not set = to NULL) when the decoding status indicates an error condition?


On Fri, Jun 30, 2023 at 1:14=E2=80=AFPM Simon J. Gerraty <<= a href=3D"mailto:sjg@juniper.net">sjg@juniper.net> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Jessica Clarke <jrtc27@freebsd.org>= wrote:
> A conditional assignment of the same value that has already been
> assigned unconditionally is unidiomatic code generally regarded as a > code smell and should be avoided. In an ideal world that would give a<= br>
I agree.

I've been bitten by __unused recently when porting stuff to linux
so was looking to avoid that.

--00000000000030d3d505ff5fd3a6-- From nobody Fri Jun 30 22:40: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 4Qt9Kd5ZMQz4klcb; Fri, 30 Jun 2023 22:41:41 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qt9Kc6S8zz4JKr; Fri, 30 Jun 2023 22:41:40 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=juniper.net header.s=PPS1017 header.b=f4y9sxtJ; dkim=pass header.d=juniper.net header.s=selector1 header.b=VU+wlUyE; spf=pass (mx1.freebsd.org: domain of sjg@juniper.net designates 208.84.65.16 as permitted sender) smtp.mailfrom=sjg@juniper.net; dmarc=pass (policy=reject) header.from=juniper.net; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0108156.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35UH7D7F015626; Fri, 30 Jun 2023 15:41:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=to : cc : subject : in-reply-to : references : from : mime-version : content-type : content-id : date : message-id; s=PPS1017; bh=DyaztIYunED/v8FbbQFzSEwhNHIU9+EngeBEu8oP7ew=; b=f4y9sxtJ0Rk6NUhBfvqwR/3FxvV0Sd/s6ddkevFL892y+44IzaDPbjPaYXQKYZe/N4ZF JziwzC92T+pkDy6qolNQyxg1y6Iv5J468GC+zIuSi2jFtSxJQPI+tKSgYtiJCCAxYOAC 6zZX6j440tCerVgCkU7qEr9GJaXduz7y7TcOyGbXvsh9xIk7a0AJrHYMhqBP9jrMJrzT vwdOKW8xz/M3AhDZqLNwyc4fMq1b3NdvII53pp03kOOIakCAF4qZyyeq0krSv6Q/4UTQ 4dp0BKGCsh/gv5cRwqZ5YYdaFIo4R47ryM1ZzW+H70wOr+/lDb3DXqfNfV8YYk5LVTcO Iw== Received: from bl0pr02cu006.outbound.protection.outlook.com (mail-eastusazlp17013034.outbound.protection.outlook.com [40.93.11.34]) by mx0a-00273201.pphosted.com (PPS) with ESMTPS id 3rhvj1se8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Jun 2023 15:41:39 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XO3vCos66EtsCpMW3lhUvt26ffys+Q2VRqyesB7ygqtu5Fs/FeGNTGjU+wE5BDFVkBAAGjxVSEirurxJ7E41W7+5F7/vv3X4IJYsUoaTmG9srjjvgEdyb5v/fvVf8D/OC7ZKFRDw+6WE5F0z/cl1ZatEkF02YlydYOBMpIDBPGR6FafwWk6RGhh37mUYQl1OrAys4Id03JuxDBmruREa/eI6T/CsDYpM7SWy41ceAkGG61xoi5quhZ4TxcIK4XMGyT1we3aavzX7vqdyo+uXnNLAxbLRZIp4TcKclF7uE9nbsiosHoWB8SSAFgpCWzLVOSL+lSfz3l3ePNey79ZEPg== 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=DyaztIYunED/v8FbbQFzSEwhNHIU9+EngeBEu8oP7ew=; b=hktbnU5Ib8WodDuyEKKMvHq5wIv3XuF35t7CsEsCioorZp3XtNLGAUoc2818Mh/NJQML1NMYAKhiuj14br5lqw4UkH409WFaVDLcC2jGKCh5xyd/roAk4I8xw8KacG0EcDzeTr22Q9TlcON1T4ZuGtqzq3lP0EP/+OniDSG9pUWItUUuN4EAT/e3pQ4lPkhMmGiYM2398921uOcNvwvUKECi81cR7eMj4OG5fdK5RmFPDHXjtvU9TqVon79oymn3ODGpmeMJfOspj4QRZ2Fq3UpfXsTQvglTaA7zVpyntu7CDbxOqOOGDi9RuxREqhIxIyNdhbzKHg1QNlPLyzet0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.14) smtp.rcpttodomain=gmail.com smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DyaztIYunED/v8FbbQFzSEwhNHIU9+EngeBEu8oP7ew=; b=VU+wlUyEvOsMyZV5Y3dn9Rf/UttY7LbJHeNJCR6DCb1zoPEOukRRGzeGjKquRcPyXL2PfDOTu7H/Qy23+rUCBV80t3Wz8607rTZ/t97rS6gBe3Yda2DlqjbPdL1PcjXVHnGcFp0unFHZqPFDeP5ZzinxvG1R5Yb7dUmmqM4XqVI= Received: from BYAPR03CA0019.namprd03.prod.outlook.com (2603:10b6:a02:a8::32) by CO1PR05MB7909.namprd05.prod.outlook.com (2603:10b6:303:db::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Fri, 30 Jun 2023 22:41:11 +0000 Received: from DM6NAM12FT076.eop-nam12.prod.protection.outlook.com (2603:10b6:a02:a8:cafe::62) by BYAPR03CA0019.outlook.office365.com (2603:10b6:a02:a8::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.22 via Frontend Transport; Fri, 30 Jun 2023 22:41:11 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.14) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.14 as permitted sender) Received: from p-exchfe-eqx-01.jnpr.net (66.129.239.14) by DM6NAM12FT076.mail.protection.outlook.com (10.13.179.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.13 via Frontend Transport; Fri, 30 Jun 2023 22:41:11 +0000 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchfe-eqx-01.jnpr.net (10.104.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21; Fri, 30 Jun 2023 17:41:10 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.21 via Frontend Transport; Fri, 30 Jun 2023 17:41:10 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 35UMf9eK006679; Fri, 30 Jun 2023 15:41:09 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id AC0FD8D819; Fri, 30 Jun 2023 15:40:42 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id AA6938D7A0; Fri, 30 Jun 2023 15:40:42 -0700 (PDT) To: Rob Wing CC: Jessica Clarke , Mitchell Horne , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors In-Reply-To: References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> <667C347E-B7C7-405B-AFEC-F0A0FD0656F6@freebsd.org> <498f3ba2-dc7a-e7d3-626a-76ca68cee5b2@freebsd.org> <79845.1688159657@kaos.jnpr.net> Comments: In-reply-to: Rob Wing message dated "Fri, 30 Jun 2023 13:52:37 -0800." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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-ID: <41426.1688164842.1@kaos.jnpr.net> Date: Fri, 30 Jun 2023 15:40:42 -0700 Message-ID: <44286.1688164842@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM12FT076:EE_|CO1PR05MB7909:EE_ X-MS-Office365-Filtering-Correlation-Id: 35d2967e-d300-4a59-d330-08db79bb1a5b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ayQb7fauN0cPAZzMvRk7UIMQo6AhCy1eqjll65xRzNStpUotnb8uoZbfKU02QJ7eygBZXwF1TWgQwgDrtQLMpQQQTT2h64na4xC1Y2Udnj1zHetpw/2WdbJ8b7uVR4b6mBfxx5fvp7HUN/d+pRKOAPLeq428D3eK0T0CeQiTdOq8tt+yctlXBArkWz5J58Su+LGpELcC1KB/Q0sI+dAgVmqMS/PzYBuGFeeqe7/4LitsuTdIs9cwqtu17QCsRgRt0YOsL7YfHQYjZo/oYQOnttUurq79uoQBOfTAmJ7MiaO/f/Gek1qNAgoVR+QjPqAIT+6VbPNlUcuzTKRuqXoG4c3vDVgYkH6Vrv0/KS5Hu/0+Txm5DwzlXRUsUacvjmLswi4plTAGGY8uqyd/AFQJjy21sKZB9mMarAw2WkBTGfOI/muwcOZh2Ot9OeuKmtYfd90dE4gv9QYoTWqjY3vtokzGMn8Y7K2Bl4oBA8aUVcrjmYmx7Nk/3SH+Gx8JkcZv6PHQBPx4DgXpj2NNXJ0o8abGpMuN/MdaxDfIpLbarteJEs0YJJ/scUEf3EI3obJnoopfd8W2qgoFFJf5a25uH0+TxMFL3JcSO0BgBDrOjYZ6Gz6oFtBxcGqzyj+dM3SZ9dRAPeRzyw9MT8JLjweiWgdz5cVOfRFG3MZmQ9S1CbbpdN61s8IK9hP+ufMbO29LNrBkZMTnZttbwBc/g0HPFqzNn77Zx+3jvThtRQ3mUdYsU+ok6a0jlqws3AJOVfFR8PRqGRJtFpgEA3aCUt1xH+bkQf1LhSeCIaDytq3umCeUQ7QfdhObkW5/PIkBgiEH X-Forefront-Antispam-Report: CIP:66.129.239.14;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-01.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(39860400002)(346002)(396003)(451199021)(40470700004)(46966006)(36840700001)(107886003)(86362001)(54906003)(8936002)(8676002)(5660300002)(82310400005)(26005)(9686003)(7696005)(478600001)(6916009)(4326008)(70206006)(70586007)(41300700001)(316002)(6266002)(186003)(7126003)(2906002)(4744005)(40460700003)(47076005)(55016003)(336012)(36860700001)(40480700001)(82740400003)(356005)(81166007)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2023 22:41:11.0190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 35d2967e-d300-4a59-d330-08db79bb1a5b X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.14];Helo=[p-exchfe-eqx-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT076.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR05MB7909 X-Proofpoint-ORIG-GUID: uuALbe1RZFMFx9y2aiHu1W_ZsmeQEeWy X-Proofpoint-GUID: uuALbe1RZFMFx9y2aiHu1W_ZsmeQEeWy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-30_12,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 phishscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 clxscore=1011 spamscore=0 mlxlogscore=688 adultscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306300198 X-Spamd-Result: default: False [-3.60 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017,juniper.net:s=selector1]; R_SPF_ALLOW(-0.20)[+ip4:208.84.65.16]; RCVD_IN_DNSWL_LOW(-0.10)[208.84.65.16:from]; MIME_GOOD(-0.10)[text/plain]; FREEFALL_USER(0.00)[sjg]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; TAGGED_RCPT(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[40.93.11.34:received]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+]; TO_DN_SOME(0.00)[]; RCVD_COUNT_SEVEN(0.00)[11]; RCPT_COUNT_SEVEN(0.00)[7]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; TO_DN_EQ_ADDR_SOME(0.00)[] X-Rspamd-Queue-Id: 4Qt9Kc6S8zz4JKr X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Rob Wing wrote: > + if (!cn.status) { > buf = NULL; > + if (err == 0) /* keep compiler happy */ > + buf = NULL; > + } > return (buf); > } > > And considering the comment at contrib/bearssl/inc/bearssl_x509.h > is it intended for buf to be returned as-is (i.e., not set to NULL) > when the decoding status indicates an error condition? Good question, probably not, will fix. Thanks for spotting. From nobody Fri Jun 30 23:30: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 4QtBQM5W5mz4lFx8; Fri, 30 Jun 2023 23:30: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 4QtBQM541Fz3JPb; Fri, 30 Jun 2023 23:30:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688167851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xdyZg/wTP3znCUCvJRYdyny+KffCylaPK51q+iasv2c=; b=d+b8EAlpmKEwT6NXpj90YAQ2Upt9BnJfsTp26er8d/UKUgBoO1Rss9jeBm2IGs2JUtU1Pm LdiZ6L7CD8gsNlNKNW7+ydfn9yErJrXZYmZ4HEV+NRw5HEk8WNp6QqjhhgFSP/jFepcssT yNA7QTeqaBF66kh5L+w8g8Sil+TjeZLgiSyUWTbXnCGsZ/bPHvhWmRTUQbRti+xs2HhM68 S54BvpphauQfkbIdk4Ezpal4j7AwHIO8EYmee6BdGY4vD+bHA20DAxLI3U7B5fTJr3GKn3 OzMXjfrUO5M0BAH04BbFhqXLDb8Ur5HOftYBV1geG/4Yg1765LUPzfW4M4S2Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688167851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xdyZg/wTP3znCUCvJRYdyny+KffCylaPK51q+iasv2c=; b=a5AGX8B+GWNx9QwvrEPartAc1t7SzmF0QL7N/4OKnJdNl3ynDhtXax2QK+n650FOjJ+Xl3 5twDWHGScspvxGC5VUkwqDkZLfuDXljzPaM7oAdwostwAmUtEY/N58L6EQd9WZCLjQNrK0 zXBIoEH7ZuzlM7KIXktGzx2PU5ZHv/vKOkTEpoB5FM0QlPWxvhotqcefwHa9Y48Yp84NoC fCYC3R0GlHXZrL1L+WQxktMewk94Sct5kaj0XvUWvkGIAkPdJW+lSwCZDjAle9JpfzcN41 aS+O8pxdu+L+b0G87EAa6SWmXU415AKJoJKAJGBX+1EArWHxaqT5DjJ230aWUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688167851; a=rsa-sha256; cv=none; b=upFaWdYutp3huOez0MXZlcXxiPTaPn0ERluntkoGe99qUBf0610BruspvgrEdk2IkGETqO AtSuUblr55ep54IdZHQaOrViK2RLvIQb6LEVLv9fZCjL6rFlS8lwRyBkUjeWmXgRC8GyEJ u5z4DnYOaWmijoJPZS/oigUkY/XSR7i5hBdjwOf9ZBxnS3ICVDub7bwlPeSMK/89vxc/qQ WFAnBTG/922oDQijxvD4DVB/0eW/QSmkixxJP9mb7KcN7LNUclPWsURLeyceEb7SyStmEy wTKZriXzPH1gqRBfFSuiWobrLNOLVYsYItiymRksxDHvsrBbDR6Cl3YBx7/gMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtBQM47CVz1HpP; Fri, 30 Jun 2023 23:30: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 35UNUpU3088345; Fri, 30 Jun 2023 23:30:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35UNUpNX088344; Fri, 30 Jun 2023 23:30:51 GMT (envelope-from git) Date: Fri, 30 Jun 2023 23:30:51 GMT Message-Id: <202306302330.35UNUpNX088344@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: 0631830a7a3c - main - siftr: document siftr probe to man page of the tcp provider List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0631830a7a3c9625f1678b0b6ab8b525ba5e3873 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=0631830a7a3c9625f1678b0b6ab8b525ba5e3873 commit 0631830a7a3c9625f1678b0b6ab8b525ba5e3873 Author: Michael Tuexen AuthorDate: 2023-06-30 22:13:00 +0000 Commit: Michael Tuexen CommitDate: 2023-06-30 22:18:15 +0000 siftr: document siftr probe to man page of the tcp provider This man page documents what is currently implemented in siftr.d. It doesn't work right now in head, but in stable/13. Follow-up commits will fix it for head. Reviewed by: cc, pauamma_gundo.com MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40809 --- share/man/man4/dtrace_tcp.4 | 138 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 136 insertions(+), 2 deletions(-) diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index 5372b1a858f0..205317819c56 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 29, 2023 +.Dd July 1, 2023 .Dt DTRACE_TCP 4 .Os .Sh NAME @@ -49,6 +49,7 @@ protocol "tcpinfo_t *" .Fn tcp:::state-change "void *" "csinfo_t *" "void *" "tcpsinfo_t *" "void *" \ "tcplsinfo_t *" +.Fn tcp:::siftr "siftrinfo_t *" .Sh DESCRIPTION The DTrace .Nm tcp @@ -65,6 +66,8 @@ All .Nm tcp probes except for .Fn tcp:::state-change +and +.Fn tcp:::siftr have the same number and type of arguments. The last three arguments are used to describe a TCP segment: the .Vt ipinfo_t @@ -136,6 +139,15 @@ Its first, third and fifth arguments are currently always Its last argument describes the from-state in the transition, and the to-state can be obtained from .Dv args[3]->tcps_state . +.Pp +The +.Fn tcp:::siftr +probe fires when a TCP segment is sent or received by the host. +For a detailed description see +.Xr siftr 4 . +The +.Vt siftrinfo_t +argument provides the information about the TCP connection. .Sh ARGUMENTS The .Vt pktinfo_t @@ -285,10 +297,111 @@ The valid TCP state values are given by the constants prefixed with in .Pa /usr/lib/dtrace/tcp.d . .El +.Pp +The +.Vt siftrinfo_t +type is used by the +.Fn tcp:::siftr +probe to provide the state of the TCP connection. +Its fields are: +.Bl -tag -width "u_int sent_inflight_bytes" -offset indent +.It Vt uint8_t direction +Direction of packet that triggered the log message. +Either +.Qq 0 +for in, or +.Qq 1 +for out. +.It Vt uint8_t ipver +The version of the IP protocol being used. +Either +.Qq 1 +for IPv4, or +.Qq 2 +for IPv6. +.It Vt uint32_t hash +Hash of the packet that triggered the log message. +.It Vt uint16_t tcp_localport +The TCP port that the local host is communicating via. +.It Vt uint16_t tcp_foreignport +The TCP port that the foreign host is communicating via. +.It Vt uint64_t snd_cwnd +The current congestion window (CWND) for the flow, in bytes. +.It Vt u_long snd_wnd +The current sending window for the flow, in bytes. +The post scaled value is reported, except during the initial handshake (first +few packets), during which time the unscaled value is reported. +.It Vt u_long rcv_wnd +The current receive window for the flow, in bytes. +The post scaled value is always reported. +.It Vt u_long snd_bwnd +The current bandwidth-controlled window for the flow, in bytes. +This field is currently unused and reported as zero. +.It Vt u_long snd_ssthresh +The slow start threshold (SSTHRESH) for the flow, in bytes. +.It Vt int conn_state +A TCP state. +The valid TCP state values are given by the constants prefixed with +.Ql TCPS_ +in +.Pa /usr/lib/dtrace/tcp.d . +.It Vt u_int max_seg_size +The maximum segment size for the flow, in bytes. +.It Vt int smoothed_rtt +The current smoothed RTT estimate for the flow, in units of TCP_RTT_SCALE * HZ, +where TCP_RTT_SCALE is a define found in +.Pa /usr/include/netinet/tcp_var.h , +and HZ is the kernel's tick timer. +Divide by TCP_RTT_SCALE * HZ to get the RTT in secs. +.It Vt u_char sack_enabled +SACK enabled indicator. 1 if SACK enabled, 0 otherwise. +.It Vt u_char snd_scale +The current window scaling factor for the sending window. +.It Vt u_char rcv_scale +The current window scaling factor for the receiving window. +.It Vt u_int flags +The current value of the t_flags for the flow. +.It Vt int rxt_length +The current retransmission timeout length for the flow, in units of HZ, where HZ +is the kernel's tick timer. +Divide by HZ to get the timeout length in seconds. +.It Vt u_int snd_buf_hiwater +The current size of the socket send buffer in bytes. +.It Vt u_int snd_buf_cc +The current number of bytes in the socket send buffer. +.It Vt u_int rcv_buf_hiwater +The current size of the socket receive buffer in bytes. +.It Vt u_int rcv_buf_cc +The current number of bytes in the socket receive buffer. +.It Vt u_int sent_inflight_bytes +The current number of unacknowledged bytes in-flight. +Bytes acknowledged via SACK are not excluded from this count. +.It Vt int t_segqlen +The current number of segments in the reassembly queue. +.It Vt u_int flowid +Flowid for the connection. +A caveat: Zero '0' either represents a valid flowid or a default value when +the flowid is not being set. +.It Vt u_int flowtype +Flow type for the connection. +Flowtype defines which protocol fields are hashed to produce the flowid. +A complete listing is available in +.Pa /usr/include/sys/mbuf.h +under +.Dv M_HASHTYPE_* . +.El .Sh FILES -.Bl -tag -width "/usr/lib/dtrace/tcp.d" -compact +.Bl -tag -width "/usr/lib/dtrace/siftr.d" -compact .It Pa /usr/lib/dtrace/tcp.d +DTrace type and translator definitions for all the probes of the +.Nm tcp +provider except the +.Nm siftr +probe. +.It Pa /usr/lib/dtrace/siftr.d DTrace type and translator definitions for the +.Nm siftr +probe of the .Nm tcp provider. .El @@ -367,6 +480,26 @@ tcp:::state-change last[args[1]->cs_cid] = timestamp; } .Ed +The following script uses the siftr probe to show the current value of CWND +and SSTHRESH when a packet is sent or received: +.Bd -literal -offset indent +#pragma D option quiet +#pragma D option switchrate=10hz + +dtrace:::BEGIN +{ + printf(" %3s %5s %5s %10s %10s\\n", + "DIR", "LPORT", "RPORT", "CWND", "SSTHRESH"); +} + +tcp:::siftr +{ + printf(" %3s %5d %5d %10d %10d\\n", + siftr_dir_string[args[0]->direction], + args[0]->tcp_localport, args[0]->tcp_foreignport, + args[0]->snd_cwnd, args[0]->snd_ssthresh); +} +.Ed .Sh COMPATIBILITY This provider is compatible with the .Nm tcp @@ -377,6 +510,7 @@ provider in Solaris. .Xr dtrace_sctp 4 , .Xr dtrace_udp 4 , .Xr dtrace_udplite 4 , +.Xr siftr 4 , .Xr tcp 4 , .Xr SDT 9 .Sh HISTORY From nobody Sat Jul 1 06:29: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 4QtMjP5Qlrz4kvbx; Sat, 1 Jul 2023 06:29: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 4QtMjP4syyz3HJR; Sat, 1 Jul 2023 06:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688192969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQT0dVTljyxy4ADe8i61B0r1YhMDNHRF4fSn6MKF+y4=; b=NTRxN2cZqxnYvLy6Gt7nZnrQ+ZQgJ0hdaIfk3ZhnnUTViAIqVeqrOlubsyNU+lq6MwQhqT TdlfO0W8xnBPGUB/bLxJvmgLCwlip3b1svrteQbQYjOnrc9pPjlR3mh32HO414Up+oF/Sr xVOwcfMjIWy6s/C6AlniqVuoHMGc1OPNjMWHke19SLDSt/jlqVOphG7W/sWCdwHglla1LI mxbzDi8q/8FYGQr4WCLjHDA16XL+OopIHNvLpa+UGUJWEkhla+KST7ElCKP4MgXgdZn+it StqPp4qx/ZjKodsbgyBMG9e8naI8cvPqkxkBUwgYb3A4/zrwKl4fkQSKzjSVIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688192969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQT0dVTljyxy4ADe8i61B0r1YhMDNHRF4fSn6MKF+y4=; b=iY5HmmfAaAPQole/tX5cQfTGU+7tMByH+iHA9eRU/rhRvZk8raM46LpUAhNCq8rudM/Cap ArSaLHPAv7KkuIPsDPYIDNl76TYvGRx4i2kUjja8YeRaoyC9nqx2sbLp0dHPuT8193xAos G7prH2BCL127QbznS9HdiusLr+F1qnS1ZYVKt5NRNCUkFCKxXTxYBPfGXnNItqHs4RsMDo MepB4AVXjn7rdiaiyBgfxhcO032kMZEQMGPgHe2vJE2Kals5c8OaAd50hHBVoA8sXrwWIP cQly0V4knmRNnaWJtiho0JYTv6RvsGfd10firf8DW1HLwqqQZm5uwCCQs4AG5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688192969; a=rsa-sha256; cv=none; b=kV1n8xP5qvAt88Y8bzbTYPKKT1aE1+FCZXrNp2w9EfNafQbvBfcyJ2zm69HAXTtXX407ZD vxPUiz2u5UNmv8hCQ2TVOHKmVFOXOXIY676R7uDyAChjtSpMrY3NKAH/3RAw63OfvjurKu ksbZipPZrCC0ZnWNczNylLNTjgmhPtk4EHHU/WDi5urdGVPqZhGJ2S3+huZ8k7nMAQ8Tuo qB8Ug1vCfwTR9jAOn9O8bPph0Daqajo3gVwsJk/RlHXv+yAI9aapbOOPZT2xfizfAz1zAt jC7wLnEPwF+xX9epB1doiqM/GAe4TDstBzU0v6sS89izREkDbI6ej+nrrMI8HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtMjP3fkTzFK7; Sat, 1 Jul 2023 06:29: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 3616TTNp076962; Sat, 1 Jul 2023 06:29:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3616TTSa076961; Sat, 1 Jul 2023 06:29:29 GMT (envelope-from git) Date: Sat, 1 Jul 2023 06:29:29 GMT Message-Id: <202307010629.3616TTSa076961@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: cade9a8e371d - main - dtrace: update siftr 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cade9a8e371d3a95334149aa362bde3a36f13257 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=cade9a8e371d3a95334149aa362bde3a36f13257 commit cade9a8e371d3a95334149aa362bde3a36f13257 Author: Michael Tuexen AuthorDate: 2023-07-01 00:26:52 +0000 Commit: Michael Tuexen CommitDate: 2023-07-01 00:26:52 +0000 dtrace: update siftr probe This adds the changes corresponding to https://cgit.freebsd.org/src/commit/?id=1241e8e7aed5d709a6cf62024e9ae750981c03ae to the siftr probe. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40823 --- cddl/lib/libdtrace/siftr.d | 12 ++++++------ share/man/man4/dtrace_tcp.4 | 13 ++++++------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/cddl/lib/libdtrace/siftr.d b/cddl/lib/libdtrace/siftr.d index e75d41534268..7fbe4ded384b 100644 --- a/cddl/lib/libdtrace/siftr.d +++ b/cddl/lib/libdtrace/siftr.d @@ -47,11 +47,11 @@ typedef struct siftrinfo { uint32_t hash; uint16_t tcp_localport; uint16_t tcp_foreignport; - uint64_t snd_cwnd; - u_long snd_wnd; - u_long rcv_wnd; - u_long snd_bwnd; - u_long snd_ssthresh; + uint32_t snd_cwnd; + uint32_t snd_wnd; + uint32_t rcv_wnd; + uint32_t t_flags2; + uint32_t snd_ssthresh; int conn_state; u_int max_seg_size; int smoothed_rtt; @@ -80,7 +80,7 @@ translator siftrinfo_t < struct pkt_node *p > { snd_cwnd = p == NULL ? 0 : p->snd_cwnd; snd_wnd = p == NULL ? 0 : p->snd_wnd; rcv_wnd = p == NULL ? 0 : p->rcv_wnd; - snd_bwnd = p == NULL ? 0 : p->snd_bwnd; + t_flags2 = p == NULL ? 0 : p->t_flags2; snd_ssthresh = p == NULL ? 0 : p->snd_ssthresh; conn_state = p == NULL ? 0 : p->conn_state; max_seg_size = p == NULL ? 0 : p->max_seg_size; diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index 205317819c56..507be10fbfca 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -325,19 +325,18 @@ Hash of the packet that triggered the log message. The TCP port that the local host is communicating via. .It Vt uint16_t tcp_foreignport The TCP port that the foreign host is communicating via. -.It Vt uint64_t snd_cwnd +.It Vt uint32_t snd_cwnd The current congestion window (CWND) for the flow, in bytes. -.It Vt u_long snd_wnd +.It Vt uint32_t snd_wnd The current sending window for the flow, in bytes. The post scaled value is reported, except during the initial handshake (first few packets), during which time the unscaled value is reported. -.It Vt u_long rcv_wnd +.It Vt uint32_t rcv_wnd The current receive window for the flow, in bytes. The post scaled value is always reported. -.It Vt u_long snd_bwnd -The current bandwidth-controlled window for the flow, in bytes. -This field is currently unused and reported as zero. -.It Vt u_long snd_ssthresh +.It Vt uint32_t t_flags2 +The current value of the t_flags2 for the flow. +.It Vt uint32_t snd_ssthresh The slow start threshold (SSTHRESH) for the flow, in bytes. .It Vt int conn_state A TCP state. From nobody Sat Jul 1 06:47: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 4QtN69691Lz4l5NN; Sat, 1 Jul 2023 06:47: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 4QtN695Mqhz3N0g; Sat, 1 Jul 2023 06:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688194049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kdjPgVwRjH+C0TaRphDX62UqTmAC90kxQVl1AFYm9Dw=; b=jYn/dhCUflWoDw4I0dRP3t8avVYLnogMBJe1AaOUKpQ3/xkmJS8bUmFZhvjUZGreSw8lW5 HkBo3bCoxAoMWcnY7BiT6YgxvZnzvGEc3HjJqwDM1mC58H2rCWXBKzS/0aPKNN+VAfSpFj DGfNJWx9f5JwRc7vh7JzNSqPBj1HLsWVRq2kDkXzuAsUS7youJO9oKbnhjXqkUz266SVUe RIUBkfE+X251HazmTzw3EsV3cTcwZCvHXHPOz8IH+VdDHii6aS8Kk5rwTWDb/2q2BngVmi hXxK5YsbkSdqttB/+gEU44Ti+0VlNAYO8sUaNbzUPGxmmfCUzcCkT9NEobZBLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688194049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kdjPgVwRjH+C0TaRphDX62UqTmAC90kxQVl1AFYm9Dw=; b=KPWjmvQxQ+LFE1ba4UmSWxqZNP4ZNq2t2h7+rlApptyOfPKzSWhnDl2y8XA1ygADzk0KXy H2Uz2pf/s4kxpX0DrMWICcXl3v47CBo2yi/HejkwDA9ZBCGkAq7svrOCCxGWXob5ls/tj5 GI6iKNv6oBNfLPm5vtf8EMzqJWrZ/a+2vpN2hi43Xh7tzxHwP8l7HlkKr4sKh+Ftnbhqkz 2hpZuULmeKW+rWKTJN/3YDtQCGi10o/l+2Y60E6J47WNQx8awUxGJ1VgbfGSRz6PvCBVlu 1tr/WgCEFlAsjS2yyI2oj0rZhrS7DXVf0uFtzLPEgD3trZ85G+QgJIcAJgWuTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688194049; a=rsa-sha256; cv=none; b=XwoLlXD+D7t4Wuvy0nr6w9lGzPTfykeIFr0bRYar4k1Jf2EZGvxflVLVCipLM1ULGXgxzD sxq5/BOD9UrkijtIHiWDqVbAT4DhiCeIBwD41jlLxEvHuguvv500NWqTXRvEHexiH82Zbs 7m0NNvPUBzHdanQFyweA8Ib70taEgMi5cE6TJRt287r43tbe4g0rHvx2p5h146Drg3Z7cY GQLwE8uW6ulmhfTlzOtdzXK/ESzKKVvos+ozX4iI3tx6uVYL/lSc+vBcafeg/g2/oEcYYK HZP7TajsWawTHBtUS8ifOiXpdnEZTEgUv8ynzKGN3s1Imft/Yjli8QhINkiCcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtN694S7tzGKQ; Sat, 1 Jul 2023 06:47: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 3616lTwi009590; Sat, 1 Jul 2023 06:47:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3616lTHu009589; Sat, 1 Jul 2023 06:47:29 GMT (envelope-from git) Date: Sat, 1 Jul 2023 06:47:29 GMT Message-Id: <202307010647.3616lTHu009589@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: 643d06711912 - main - dtrace: another update of the siftr 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 643d06711912b3b318643cccf8f9bda59767aae2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=643d06711912b3b318643cccf8f9bda59767aae2 commit 643d06711912b3b318643cccf8f9bda59767aae2 Author: Michael Tuexen AuthorDate: 2023-07-01 00:45:16 +0000 Commit: Michael Tuexen CommitDate: 2023-07-01 00:45:16 +0000 dtrace: another update of the siftr probe This adds the changes corresponding to https://cgit.freebsd.org/src/commit/?id=d090464ecd4af5cd400ef5cbbfe8409d019eac34 to the siftr probe. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40824 --- cddl/lib/libdtrace/siftr.d | 8 ++++---- share/man/man4/dtrace_tcp.4 | 13 ++++--------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/cddl/lib/libdtrace/siftr.d b/cddl/lib/libdtrace/siftr.d index 7fbe4ded384b..e61155036d96 100644 --- a/cddl/lib/libdtrace/siftr.d +++ b/cddl/lib/libdtrace/siftr.d @@ -54,12 +54,12 @@ typedef struct siftrinfo { uint32_t snd_ssthresh; int conn_state; u_int max_seg_size; - int smoothed_rtt; + uint32_t srtt; u_char sack_enabled; u_char snd_scale; u_char rcv_scale; u_int flags; - int rxt_length; + uint32_t rto; u_int snd_buf_hiwater; u_int snd_buf_cc; u_int rcv_buf_hiwater; @@ -84,12 +84,12 @@ translator siftrinfo_t < struct pkt_node *p > { snd_ssthresh = p == NULL ? 0 : p->snd_ssthresh; conn_state = p == NULL ? 0 : p->conn_state; max_seg_size = p == NULL ? 0 : p->max_seg_size; - smoothed_rtt = p == NULL ? 0 : p->smoothed_rtt; + srtt = p == NULL ? 0 : p->srtt; sack_enabled = p == NULL ? 0 : p->sack_enabled; snd_scale = p == NULL ? 0 : p->snd_scale; rcv_scale = p == NULL ? 0 : p->rcv_scale; flags = p == NULL ? 0 : p->flags; - rxt_length = p == NULL ? 0 : p->rxt_length; + rto = p == NULL ? 0 : p->rto; snd_buf_hiwater = p == NULL ? 0 : p->snd_buf_hiwater; snd_buf_cc = p == NULL ? 0 : p->snd_buf_cc; rcv_buf_hiwater = p == NULL ? 0 : p->rcv_buf_hiwater; diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index 507be10fbfca..6d7fc9f93793 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -346,12 +346,8 @@ in .Pa /usr/lib/dtrace/tcp.d . .It Vt u_int max_seg_size The maximum segment size for the flow, in bytes. -.It Vt int smoothed_rtt -The current smoothed RTT estimate for the flow, in units of TCP_RTT_SCALE * HZ, -where TCP_RTT_SCALE is a define found in -.Pa /usr/include/netinet/tcp_var.h , -and HZ is the kernel's tick timer. -Divide by TCP_RTT_SCALE * HZ to get the RTT in secs. +.It Vt uint32_t srtt +The current smoothed RTT (SRTT) for the flow in microseconds. .It Vt u_char sack_enabled SACK enabled indicator. 1 if SACK enabled, 0 otherwise. .It Vt u_char snd_scale @@ -360,9 +356,8 @@ The current window scaling factor for the sending window. The current window scaling factor for the receiving window. .It Vt u_int flags The current value of the t_flags for the flow. -.It Vt int rxt_length -The current retransmission timeout length for the flow, in units of HZ, where HZ -is the kernel's tick timer. +.It Vt uint32_t rto +The current retransmission timeout (RTO) for the flow in microseconds. Divide by HZ to get the timeout length in seconds. .It Vt u_int snd_buf_hiwater The current size of the socket send buffer in bytes. From nobody Sat Jul 1 07:03: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 4QtNT71mkHz4lD0x; Sat, 1 Jul 2023 07:03:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtNT70v1nz3jbM; Sat, 1 Jul 2023 07:03:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688195035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gBGFYtOJShKp/xG/j6yIXI24sb3FdeSkGhBLyLZQIz4=; b=KPA/+nuK5ge8/swbkkDH/ZJ+C9Fuj/8p8FLNnilkpCNLr3cN8z//o18vr1zcBCq8x3Ecc+ yrWPqXbkFxhE5jQetMVKFqAgG0AnEb2dlv0Q1faM57MtdDkrGITNjTsLp/bGm1+NFqcVZI EXFDvb3cA2EwFTa+PbMvgHBK5Nc0x5i1w4IvokIqOdNHXMTCP9f6bxtaRNMrV009kJO0G4 lzMIazhWgS3Wdvek7Tgm+riMA58dQ4KV+gUCThyXBeJXTAXGfidhVo8o7TNCxHQcpLutND rM/siyZ4iMUEthpqKTmebgHtOLSYsgbIhQl2avAG3iSXhEAoxXeHLJMbiGSM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688195035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gBGFYtOJShKp/xG/j6yIXI24sb3FdeSkGhBLyLZQIz4=; b=lkEAF7Z7nPDYLmYoNwFONt1+pQJQyPOKnV1nyX+jVO77+EKK0hNBpTOMhXx3Yy0qcZlodH 9Tk8uQWCDHx2nTl9260SbpP9OyRgYYAlqiiBBHQB2d4g/mevFha5lEYUjxNpFtBFRS5Qxq 25iR9YlMAVjezlhMlgsn1VncnRKGfxVjHcL/kZcSa6BV005WHDcXvuiMBHlwT3IbxbLLjf r0h8Rf7Uv6a2OClOa3lYgK81+yQREbdVVRVesToOj4oLIpjsbOwNAcc80N4Ush4ADWA4ii Vl1+t49qpf3zdfExmuV2rz2SG43PIqCAwdgbjZoUPY4g16r8rStoE0TQhIWrag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688195035; a=rsa-sha256; cv=none; b=YQPb0RyzIOHkt3A7xnmdpAT4of0igbDKOr/Yj3V6Qm/LdH85hg+Uesh2A+Yt+JpXze+kiz U/dy00208330ECmi31HGU8Xl9vR2SWxJT0KNGhtzh5GRq2XT5ly87GMlo7lt2ZWHn7LNuH 3if/EIiLSPmdq9I7GlTKrb1txYGfHgSY2jNhglTx4wyW0hlhkpkr01VijTh+RhRk+8MU0b 7ZGRjTyUj0v5y7fXtBUd4TZtEezCYMxWejDwUZBebZ/fYZzAZ2UNPupIPgqZIAhig9GRm9 3qViDXYh1QgSdJTAFkByoH0qT8iPhquDrkdHaVZLXlEhmYTZ54dOHl6vIJAF1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtNT673vBzGp6; Sat, 1 Jul 2023 07:03: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 36173soW042707; Sat, 1 Jul 2023 07:03:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36173snk042706; Sat, 1 Jul 2023 07:03:54 GMT (envelope-from git) Date: Sat, 1 Jul 2023 07:03:54 GMT Message-Id: <202307010703.36173snk042706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: bb06a80cf60b - main - netinet[6]: make in[6]_control use ucred instead of td. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb06a80cf60b3afba459b72b2b2842898938fecf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=bb06a80cf60b3afba459b72b2b2842898938fecf commit bb06a80cf60b3afba459b72b2b2842898938fecf Author: Alexander V. Chernikov AuthorDate: 2023-06-29 07:02:46 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-07-01 06:52:24 +0000 netinet[6]: make in[6]_control use ucred instead of td. Reviewed by: markj, zlei Differential Revision: https://reviews.freebsd.org/D40793 MFC after: 2 weeks --- sys/netinet/in.c | 13 +++++++++---- sys/netinet/in_var.h | 3 +++ sys/netinet6/in6.c | 29 ++++++++++++++++++----------- sys/netinet6/in6_var.h | 2 ++ sys/netlink/route/iface.c | 8 ++++---- 5 files changed, 36 insertions(+), 19 deletions(-) diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 6a5e3cb4ee6f..fa0d311bb563 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -325,8 +325,8 @@ in_socktrim(struct sockaddr_in *ap) * Generic internet control operations (ioctl's). */ int -in_control(struct socket *so, u_long cmd, void *data, struct ifnet *ifp, - struct thread *td) +in_control_ioctl(u_long cmd, void *data, struct ifnet *ifp, + struct ucred *cred) { struct ifreq *ifr = (struct ifreq *)data; struct sockaddr_in *addr = (struct sockaddr_in *)&ifr->ifr_addr; @@ -338,8 +338,6 @@ in_control(struct socket *so, u_long cmd, void *data, struct ifnet *ifp, if (ifp == NULL) return (EADDRNOTAVAIL); - struct ucred *cred = (td != NULL) ? td->td_ucred : NULL; - /* * Filter out 4 ioctls we implement directly. Forward the rest * to specific functions and ifp->if_ioctl(). @@ -441,6 +439,13 @@ in_control(struct socket *so, u_long cmd, void *data, struct ifnet *ifp, return (error); } +int +in_control(struct socket *so, u_long cmd, void *data, struct ifnet *ifp, + struct thread *td) +{ + return (in_control_ioctl(cmd, data, ifp, td ? td->td_ucred : NULL)); +} + static int in_aifaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct ucred *cred) { diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 40955e26bd81..ded314bcfbc0 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -437,6 +437,7 @@ inm_rele_locked(struct in_multi_head *inmh, struct in_multi *inm) struct rib_head; struct ip_moptions; +struct ucred; struct in_multi *inm_lookup_locked(struct ifnet *, const struct in_addr); struct in_multi *inm_lookup(struct ifnet *, const struct in_addr); @@ -458,6 +459,8 @@ int in_leavegroup_locked(struct in_multi *, /*const*/ struct in_mfilter *); int in_control(struct socket *, u_long, void *, struct ifnet *, struct thread *); +int in_control_ioctl(u_long, void *, struct ifnet *, + struct ucred *); int in_addprefix(struct in_ifaddr *); int in_scrubprefix(struct in_ifaddr *, u_int); void in_ifscrub_all(void); diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 0ef640c5c4bf..24a2c20b0cca 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -249,8 +249,8 @@ struct in6_ndifreq32 { #endif int -in6_control(struct socket *so, u_long cmd, void *data, - struct ifnet *ifp, struct thread *td) +in6_control_ioctl(u_long cmd, void *data, + struct ifnet *ifp, struct ucred *cred) { struct in6_ifreq *ifr = (struct in6_ifreq *)data; struct in6_ifaddr *ia = NULL; @@ -281,8 +281,8 @@ in6_control(struct socket *so, u_long cmd, void *data, switch (cmd) { case SIOCAADDRCTL_POLICY: case SIOCDADDRCTL_POLICY: - if (td != NULL) { - error = priv_check(td, PRIV_NETINET_ADDRCTRL6); + if (cred != NULL) { + error = priv_check_cred(cred, PRIV_NETINET_ADDRCTRL6); if (error) return (error); } @@ -299,8 +299,8 @@ in6_control(struct socket *so, u_long cmd, void *data, case SIOCSDEFIFACE_IN6: case SIOCSIFINFO_FLAGS: case SIOCSIFINFO_IN6: - if (td != NULL) { - error = priv_check(td, PRIV_NETINET_ND6); + if (cred != NULL) { + error = priv_check_cred(cred, PRIV_NETINET_ND6); if (error) return (error); } @@ -343,8 +343,8 @@ in6_control(struct socket *so, u_long cmd, void *data, switch (cmd) { case SIOCSSCOPE6: - if (td != NULL) { - error = priv_check(td, PRIV_NETINET_SCOPE6); + if (cred != NULL) { + error = priv_check_cred(cred, PRIV_NETINET_SCOPE6); if (error) return (error); } @@ -412,7 +412,7 @@ in6_control(struct socket *so, u_long cmd, void *data, error = in6_setscope(&sa6->sin6_addr, ifp, NULL); if (error != 0) return (error); - if (td != NULL && (error = prison_check_ip6(td->td_ucred, + if (cred != NULL && (error = prison_check_ip6(cred, &sa6->sin6_addr)) != 0) return (error); sx_xlock(&in6_control_sx); @@ -457,8 +457,8 @@ in6_control(struct socket *so, u_long cmd, void *data, goto out; } - if (td != NULL) { - error = priv_check(td, (cmd == SIOCDIFADDR_IN6) ? + if (cred != NULL) { + error = priv_check_cred(cred, (cmd == SIOCDIFADDR_IN6) ? PRIV_NET_DELIFADDR : PRIV_NET_ADDIFADDR); if (error) goto out; @@ -596,6 +596,13 @@ out: return (error); } +int +in6_control(struct socket *so, u_long cmd, void *data, + struct ifnet *ifp, struct thread *td) +{ + return (in6_control_ioctl(cmd, data, ifp, td ? td->td_ucred : NULL)); +} + static struct in6_multi_mship * in6_joingroup_legacy(struct ifnet *ifp, const struct in6_addr *mcaddr, int *errorp, int delay) diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 63dadf6b5207..f80fd80d98fe 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -838,6 +838,7 @@ struct ip6_moptions; struct sockopt; struct inpcbinfo; struct rib_head; +struct ucred; /* Multicast KPIs. */ int im6o_mc_filter(const struct ip6_moptions *, const struct ifnet *, @@ -862,6 +863,7 @@ int ip6_setmoptions(struct inpcb *, struct sockopt *); int in6_mask2len(struct in6_addr *, u_char *); int in6_control(struct socket *, u_long, void *, struct ifnet *, struct thread *); +int in6_control_ioctl(u_long, void *, struct ifnet *, struct ucred *); int in6_update_ifa(struct ifnet *, struct in6_aliasreq *, struct in6_ifaddr *, int); void in6_prepare_ifra(struct in6_aliasreq *, const struct in6_addr *, diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 0874b73a5c98..c32c22af23f6 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -1185,7 +1185,7 @@ handle_newaddr_inet(struct nlmsghdr *hdr, struct nl_parsed_ifa *attrs, if (dst != NULL) req.ifra_dstaddr = *dst; - return (in_control(NULL, SIOCAIFADDR, &req, ifp, curthread)); + return (in_control_ioctl(SIOCAIFADDR, &req, ifp, nlp_get_cred(nlp))); } static int @@ -1204,7 +1204,7 @@ handle_deladdr_inet(struct nlmsghdr *hdr, struct nl_parsed_ifa *attrs, struct in_aliasreq req = { .ifra_addr = *addr }; - return (in_control(NULL, SIOCDIFADDR, &req, ifp, curthread)); + return (in_control_ioctl(SIOCDIFADDR, &req, ifp, nlp_get_cred(nlp))); } #endif @@ -1269,7 +1269,7 @@ handle_newaddr_inet6(struct nlmsghdr *hdr, struct nl_parsed_ifa *attrs, if (dst != NULL) req.ifra_dstaddr = *dst; - return (in6_control(NULL, SIOCAIFADDR_IN6, &req, ifp, curthread)); + return (in6_control_ioctl(SIOCAIFADDR_IN6, &req, ifp, nlp_get_cred(nlp))); } static int @@ -1288,7 +1288,7 @@ handle_deladdr_inet6(struct nlmsghdr *hdr, struct nl_parsed_ifa *attrs, struct in6_aliasreq req = { .ifra_addr = *addr }; - return (in6_control(NULL, SIOCDIFADDR_IN6, &req, ifp, curthread)); + return (in6_control_ioctl(SIOCDIFADDR_IN6, &req, ifp, nlp_get_cred(nlp))); } #endif From nobody Sat Jul 1 07:30: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 4QtP462JqLz4k0W9; Sat, 1 Jul 2023 07:30: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 4QtP461hKKz3r6k; Sat, 1 Jul 2023 07:30:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688196646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6TN+7Tn8F3MwbpS+ec03C0iA52afgkvpQykDpAvNu2c=; b=Fe813scR9C2c49Cz7TmNbpOwrXRThkeKvDyOp37sB+QmNPeOw95gfItmt8jJ8u1FoY9l7n jbRTr0N0aq4rM72p1ARgxq3FfvNWSNwGr012oJGu91UJUB7NrkytPQ7VucfQIAZnSDxvJI rhYcmuaMz9NiM3u7H+/iMlnBBN6iscpWYE7UINiWAxZ3HJi60zRrX49tiVKuH4idpdx8Fy fqEUCnz1bdeg7AKKo6tkq6Srdnp6lIHNsP+ndEvo+brH1OXxqVPJc7YyAdMVfmegtsGwQR VJt4Y+uAb/GUqAt6KAmHvK5xr5E5Tlc90G8mQ9Et2Dov/u5GPrSauDII5YDAMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688196646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6TN+7Tn8F3MwbpS+ec03C0iA52afgkvpQykDpAvNu2c=; b=AKNnOo2eqsL+V/fTxgOOWRFAYb5N/xPCY3XsF2KuvPDCK+bePj578PRZe1NC+h+iA7cB9s tOvZd2x78PiBpDkKuIYNSMle796KjVla2rVmNhTRq/IkcX5uEsLTSwGbZz7rqtNjWubJAG 2cRS5nEHLaC0p3dy/JfS/zruzt70e0FRlhbZINLp5nglZg8gvUjyIhUfCFcb5aE1b4Ymh+ Big/9QjFO9BJRq+6VjJPQAKlO8ax6yn1oWSkzDU6sRNeIFViHsbhfpcIVPxCTzzHguHWhP 8jnOGZ9lY48W8rsVjGY572ltc7gJ98eIAnhBo0qmnsQYNgMBzOEpjrVw/K6ilg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688196646; a=rsa-sha256; cv=none; b=wugnVXILAlksE3eMBPFM9nPxtGlJ9wu6HFN8xl3fFE2hlsboeTjnhUTnz2SnpGpXhKv11m VoXV1lXL1eWVbBXC7a0liapB2HAbW50qXnxSelVSQHn1m0+dKXJIv/xv2//85jgHG45k+Y aK01bEC8l25noN2OADvVwMlcHyXDwqddx8PBKg8c01Ad1KOIPFB6e8xbs0T5AoOJRfJGQP HY6xS3W7YDazooTcdu4qQF8V+RkDAPhtX0e97XKnm4eeWls1DapY4mn2Ljn2QFmt6a8q4R XtUaoRHcg3WGPz4nkmJOJaKzdKic5oJI4vW+JKxioXjtmwJt11qNraFTJdS9Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtP460P8jzHVP; Sat, 1 Jul 2023 07:30: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 3617UjZW084861; Sat, 1 Jul 2023 07:30:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3617Ujeh084860; Sat, 1 Jul 2023 07:30:45 GMT (envelope-from git) Date: Sat, 1 Jul 2023 07:30:45 GMT Message-Id: <202307010730.3617Ujeh084860@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: f85b82daf1d6 - main - dtrace: third update to the siftr 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f85b82daf1d6b6b905831a64161cdebf4307c89c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f85b82daf1d6b6b905831a64161cdebf4307c89c commit f85b82daf1d6b6b905831a64161cdebf4307c89c Author: Michael Tuexen AuthorDate: 2023-07-01 07:27:31 +0000 Commit: Michael Tuexen CommitDate: 2023-07-01 07:30:34 +0000 dtrace: third update to the siftr probe This adds the changes corresponding to https://cgit.freebsd.org/src/commit/?id=60167184abd54ca12c6bf7ab60f2a08b41342f84 to the siftr probe. This concludes the series up updates. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40825 --- cddl/lib/libdtrace/siftr.d | 2 -- share/man/man4/dtrace_tcp.4 | 2 -- 2 files changed, 4 deletions(-) diff --git a/cddl/lib/libdtrace/siftr.d b/cddl/lib/libdtrace/siftr.d index e61155036d96..791693db7638 100644 --- a/cddl/lib/libdtrace/siftr.d +++ b/cddl/lib/libdtrace/siftr.d @@ -44,7 +44,6 @@ typedef struct siftrinfo { struct timeval tval; uint8_t direction; uint8_t ipver; - uint32_t hash; uint16_t tcp_localport; uint16_t tcp_foreignport; uint32_t snd_cwnd; @@ -74,7 +73,6 @@ typedef struct siftrinfo { translator siftrinfo_t < struct pkt_node *p > { direction = p == NULL ? 0 : p->direction; ipver = p == NULL ? 0 : p->ipver; - hash = p == NULL ? 0 : p->hash; tcp_localport = p == NULL ? 0 : ntohs(p->tcp_localport); tcp_foreignport = p == NULL ? 0 : ntohs(p->tcp_foreignport); snd_cwnd = p == NULL ? 0 : p->snd_cwnd; diff --git a/share/man/man4/dtrace_tcp.4 b/share/man/man4/dtrace_tcp.4 index 6d7fc9f93793..49dd9449d887 100644 --- a/share/man/man4/dtrace_tcp.4 +++ b/share/man/man4/dtrace_tcp.4 @@ -319,8 +319,6 @@ Either for IPv4, or .Qq 2 for IPv6. -.It Vt uint32_t hash -Hash of the packet that triggered the log message. .It Vt uint16_t tcp_localport The TCP port that the local host is communicating via. .It Vt uint16_t tcp_foreignport From nobody Sat Jul 1 07:52: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 4QtPY43CK7z4kjyb; Sat, 1 Jul 2023 07:52: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 4QtPY42gQGz3xnX; Sat, 1 Jul 2023 07:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688197944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NudrRo+tz6gW7SltPDZdIErMkUA+38/tJSLBaYyNvsc=; b=BYG2X0PudmVQbDYazMFFQ5fM3i64fFKML8NVJ+oJa42uxZ3CiSPBQAkgWoD8Sm3+9ok8Y8 +sNIrPPGQokK4PsuSihilZjF7Y57Z/NKPrW+6x67Pbdz1MFUCMc39ljoA9Njzlhus75HhK 223ARg81e1FteQG5J9RxUNmbUDM3tJQHbpgacp6pwB3dcrZ1n+2oWJm55ekz1fwewnADE5 HBqC9ECIAl97zBmqHWs60FwqzGE8Qfvmy95v0q0eoisG+2I6ZJSxfr4RzVOVjR4d7ASRZV 9qJpM56N2j1Ybu7UZRGcFfZx2gjDYuCM4lqrNhFpemakaV344pksQsNnM/8y3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688197944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NudrRo+tz6gW7SltPDZdIErMkUA+38/tJSLBaYyNvsc=; b=Oc2Pp848JkohvIF6RKitIk5lnIc6BR6tLm9gbW7nwVwuHGuW8szSVw/OcS+2CVdMdnuQ4J I0ZG230GmeJ2KdubUDHtwXZdgZ/p5g524lAKjgGuXeZqCqy4eZYNOyMQ7HvrEWn5w/fwD/ lxSqgyI8LJ18pkNqL6IKrKv9ykFLyFLZ1hj5BA+bzos4kRX2MMbd0dUK+xggn45XKR5qe+ PPmTi95dFIRV0VHynzMNfHgV+ij57x23jAH3A9eCdqs9LNo7b1BAdwjgPcLqOnrp9r2bEf Huu6+tlAiZOqSQ6T/W9CK+IRqD6Yxh+T8TI05ZERy06vyOClGxwNRoCKuLiyHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688197944; a=rsa-sha256; cv=none; b=HdMAjTdjN03tpDNa712oENRHF115r16QuWKo6q9qpHKLaIcp+j55+5z1t8TNXhv/+TwaVB SvQjs7lrxUTCOlsonGe7yFzJnmvm+O+obzWhph37WSGTz0X2wv7AlagSP3XhsHSfM+pw+9 ae6KmdZEs/aYQ8KYZt0IcTwoi5mVPC1QjH7OhOHt/kbXSEnzdpR4hkIwKsNaex7DkLIBCg FBhLgxlKabkv5yXgAXkLE5yX4dbR0dp9cxFzcSIPJsy/XBnJDTLd4NCzLpbTAb2XR4v+I5 RoQfpN2UV2jrEfi/GI05Ydbbc1xvwpG33q3e5rWOXJ1hsJhISXCwtuptMR9oSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtPY41j5fzHrS; Sat, 1 Jul 2023 07:52: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 3617qOdP023810; Sat, 1 Jul 2023 07:52:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3617qOLF023809; Sat, 1 Jul 2023 07:52:24 GMT (envelope-from git) Date: Sat, 1 Jul 2023 07:52:24 GMT Message-Id: <202307010752.3617qOLF023809@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: 3bdf68086de8 - main - rtld: Add a stop indicator to rtld_start to satisfy unwinders on x86_64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3bdf68086de8bee79f09cba28fd0df3be6565216 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=3bdf68086de8bee79f09cba28fd0df3be6565216 commit 3bdf68086de8bee79f09cba28fd0df3be6565216 Author: Dmitry Chagin AuthorDate: 2023-07-01 07:51:35 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-01 07:51:35 +0000 rtld: Add a stop indicator to rtld_start to satisfy unwinders on x86_64 The right unwinding stop indicator should be CFI-undefined PC. https://dwarfstd.org/doc/Dwarf3.pdf - page 118: If a Return Address register is defined in the virtual unwind table, and its rule is undefined (for example, by DW_CFA_undefined), then there is no return address and no call address, and the virtual unwind of stack activations is complete. That is allows gdb and libunwind successfully stop when unwinding stack from global constructors and destructors. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40794 --- libexec/rtld-elf/amd64/rtld_start.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libexec/rtld-elf/amd64/rtld_start.S b/libexec/rtld-elf/amd64/rtld_start.S index 72240a92c063..5b5cb2ccb47f 100644 --- a/libexec/rtld-elf/amd64/rtld_start.S +++ b/libexec/rtld-elf/amd64/rtld_start.S @@ -30,14 +30,18 @@ .globl .rtld_start .type .rtld_start,@function .rtld_start: + .cfi_startproc + .cfi_undefined %rip xorq %rbp,%rbp # Clear frame pointer for good form subq $24,%rsp # A place to store exit procedure addr + .cfi_def_cfa_offset 32 movq %rdi,%r12 movq %rsp,%rsi # save address of exit proc movq %rsp,%rdx # construct address of obj_main addq $8,%rdx call _rtld # Call rtld(sp); returns entry point popq %rsi # Get exit procedure address + .cfi_def_cfa_offset 24 movq %r12,%rdi # *ap /* * At this point, %rax contains the entry point of the main program, and @@ -47,6 +51,7 @@ .globl .rtld_goto_main .rtld_goto_main: # This symbol exists just to make debugging easier. jmp *%rax # Enter main program + .cfi_endproc /* From nobody Sat Jul 1 07:52: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 4QtPY56dn8z4kjyl; Sat, 1 Jul 2023 07:52: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 4QtPY54DFDz3xlN; Sat, 1 Jul 2023 07:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688197945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vMEIjkGItdVBQdU+5Jk6vtvHai7hghaHf7wHZD2WNU=; b=pfV+qKVofYvHkR3cy8BNUMHUz+xj83g9rlclGmYtlx8Tvyaa4vMwW5mdeye3T9UPCD7irJ ZEz/Rj6YqfOpnUGoEMQjcTSyZXejK797x47hVytWImLMuhTT42u0ZQevdb6FK6Tit6uivJ V20aBivtTKq6rA9vSAXb2m77/hTiUgfeS7kWgWn3CicBsjTKgx+0YKUk0DF5TKf2tVCvqN kFSZ6O7/hkALUDRIAnIoMnOcX4/pG9z5kJW47eXgvGpW52ji7eZQgv6F9Aj5diJEs8S4vQ NXOM50IAcwgw13ACYx8G2uHqqnJqTB6OAK7w9a9tjUaR/uQDtvH0T7PM4C5VKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688197945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vMEIjkGItdVBQdU+5Jk6vtvHai7hghaHf7wHZD2WNU=; b=oBrfwpYB3JbGcaReFq0TXBJOVY+SkOV8hixSAZZYX+AZskXM8IfYEiH/bwGdBMUW1O3mtm SVjpI7qFnf69NJlNYv7dW2LxWsXNWuX1Fi8oa6YsC9cPM7Wy1CoPiOn/Vt607qcChfFNda On3l3wT9BAk8u+PMPB9hmfYSk+tjCG+TQG6EE5DIn7edI9JufuVqzIFd1YyJj6K5O2hb9a wgdqmt6pWLoPqjgqRRpB0jZ1lzjhmt8iVmza/uSj8p2N9BlouI9a4C4xToudD5yaKxJ13b cTPaTRvTgYeFFqkfxcMl7N4uaAVzAnB5JU34V6wOPSdiOi8Sw5nFEgLp8UEC8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688197945; a=rsa-sha256; cv=none; b=Bv4KMtFh9sau+p4ILJGvwfPjQ5xD1Vsg3e2ERPhIPZRwVZcJqo0TOjnnXmPox5rHd9eAYv xB42rXuwXZQPGo43L1TQtayGD94AmBjFPWSSQZw2nIQ0zb7st1HtUbeZwiV0p7g9sm4UUx vdKAogCOaW7ohhmQt3B7xGfj33Q1KJPh0nGGmN+IKJsqUtCdJWpDXe8iI6lX8KHZD2sl/W jUXJeq0tlC+z8io8BjJRacE7arHaAOIOWC8NyZH77uSRByrAZ0NNdscApHJ54D+pKVnjdc XnDiQQD4RUn3Pvb8AytMsmlcvTP7WW5Y1ArNVN8tQBDFSgMixvGRsxIEdOikAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtPY52LMszHL0; Sat, 1 Jul 2023 07:52: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 3617qP0g023831; Sat, 1 Jul 2023 07:52:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3617qPnQ023830; Sat, 1 Jul 2023 07:52:25 GMT (envelope-from git) Date: Sat, 1 Jul 2023 07:52:25 GMT Message-Id: <202307010752.3617qPnQ023830@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: f049c92ad6c3 - main - csu: Add the prologue and epilogue to the _init and _fini on x86_64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f049c92ad6c38ef42265956545897d8e3be1c228 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=f049c92ad6c38ef42265956545897d8e3be1c228 commit f049c92ad6c38ef42265956545897d8e3be1c228 Author: Dmitry Chagin AuthorDate: 2023-07-01 07:52:10 +0000 Commit: Dmitry Chagin CommitDate: 2023-07-01 07:52:10 +0000 csu: Add the prologue and epilogue to the _init and _fini on x86_64 Normally, modern unwinders uses Dwarf information to unwind stack, however in case when the code is not annotated by Dwarf instructions, unwinders fallbacks to a frame-pointer based algorithm. That is allows libunwind to unwind stack from global constructors and destructors. Also it makes gdb happy as it printed nonexistent frame before. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40795 --- lib/csu/amd64/crti.S | 6 ++++-- lib/csu/amd64/crtn.S | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/csu/amd64/crti.S b/lib/csu/amd64/crti.S index 618dca178877..05b8ad8a431a 100644 --- a/lib/csu/amd64/crti.S +++ b/lib/csu/amd64/crti.S @@ -31,13 +31,15 @@ __FBSDID("$FreeBSD$"); .globl _init .type _init,@function _init: - subq $8,%rsp + pushq %rbp + movq %rsp,%rbp .section .fini,"ax",@progbits .align 4 .globl _fini .type _fini,@function _fini: - subq $8,%rsp + pushq %rbp + movq %rsp,%rbp .section .note.GNU-stack,"",%progbits diff --git a/lib/csu/amd64/crtn.S b/lib/csu/amd64/crtn.S index c411f001ac1f..50b5003b9f7c 100644 --- a/lib/csu/amd64/crtn.S +++ b/lib/csu/amd64/crtn.S @@ -27,11 +27,11 @@ __FBSDID("$FreeBSD$"); .section .init,"ax",@progbits - addq $8,%rsp + popq %rbp ret .section .fini,"ax",@progbits - addq $8,%rsp + popq %rbp ret .section .note.GNU-stack,"",%progbits From nobody Sat Jul 1 08:00: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 4QtPkz2jd4z4kpTc; Sat, 1 Jul 2023 08:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtPkz27fpz42Mb; Sat, 1 Jul 2023 08:00:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688198459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aRyCmJMwjrpFRgjRjUh+Zrr34t95QurcbKg65X1MI7Y=; b=aBwutRVlan629sMsCY4P5eh5CMLGR7TjeFB8EkMpnqs1soNyWUpMfm8LJnqOELk0M3PSwD t7qiZUlB5cxdj4T0r2d89HJ4ZT6q6NjWN2oSdLwW7tJOSZCXwNI7BDpGai3ycfTuYk2mah v3YoPQ0b8qeZen2UYnSFnJ5Bz1djCMTtzWfeNHLeiPl8iio6NKmR1LzBTLX6TxCq+DSEUT uxBc1/7UemcbRhZ6D4mU17sz5FlUhnTTNWdSTEIi9inrU+LTg+8UNlXaDXLtt5QpW6pMez 0+XCC1Ak+SbUJOdXNdTiCClyh0kamioldYs47EBS0Co0sDNM2SnlEnnNI84S5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688198459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aRyCmJMwjrpFRgjRjUh+Zrr34t95QurcbKg65X1MI7Y=; b=yKk19Ub4T/xBEb/KW/ldoOUNfTD8ecuPOnWE2YQXXLqz9ScdsT+HSlUVUVgNuzhQJ4Jy+u JFcP+xXwgePzuQRDbQeHqVnCYSuv67n0TLhs18OYtWkqNzRa56iXRzgYTWf6CQ06ICWE+a JKSNh/R2XfPPNyotFEC3T5RQDka01cVQ50sVOgDynF5PGpY5LQMBiRrv+yRu2iyAFxw1BG ow/YJ/p4+iVp+O2lr/0vfifL6B1ydAQzTjem/cf3RUPAPNFGQtMQb4GRH/H090YURB/GPf cSqYXeQgq0kOas/KBsthYc72Bsxo2Cdz8nQ9yOa1+axkrQ5YiJRKYU8k6o9cGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688198459; a=rsa-sha256; cv=none; b=C4Ss41ncrn7Yln6OwSYED1WoJbz7Kf80+jF5mmFqrit+xf7GBrK6Nt+JoIj/E19WIlrQlk dpuRwIJQ18sqpdD1YEp7WWdh5fI2Gp2rfte60Mul9/crU1szT1lFLtrsgMCu0BWzVCsVqD SiS0rujaXLE9WILsYTKZmoYOdVm2kv0uPtLl92Xdzy+8zRkPKN7n2pJz8xQi1l5JwHIyhs 3rCf63XJYYRoPstycx0iIsrCdgeu8IIH0Fs0v3+mLlH8ySSqON+YLO2YMAS69FfCuNppoP bBw8qLJVwEqVGEwnSz/LgoGhk5DA85QBo5KzaJclDxJ/DzQOTlKB1F30uU4nLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtPkz1C33zJDs; Sat, 1 Jul 2023 08:00: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 36180x8b038772; Sat, 1 Jul 2023 08:00:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36180xpm038756; Sat, 1 Jul 2023 08:00:59 GMT (envelope-from git) Date: Sat, 1 Jul 2023 08:00:59 GMT Message-Id: <202307010800.36180xpm038756@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: cd9da8d072e4 - main - siftr: unbreak dtrace 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd9da8d072e4dff4c1eda7307547c6a5a1e5bd35 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=cd9da8d072e4dff4c1eda7307547c6a5a1e5bd35 commit cd9da8d072e4dff4c1eda7307547c6a5a1e5bd35 Author: Michael Tuexen AuthorDate: 2023-07-01 07:50:54 +0000 Commit: Michael Tuexen CommitDate: 2023-07-01 07:50:54 +0000 siftr: unbreak dtrace support This patch adds back some fields needed by the siftr probe, which were removed in https://cgit.freebsd.org/src/commit/?id=aa61cff4249c92689d7a1f15db49d65d082184cb With this fix, you can run dtrace scripts again when the siftr module is loaded. And the siftr probe works again. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40826 --- sys/netinet/siftr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index 930ba6365f26..abbb72a05b06 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -160,6 +160,12 @@ struct pkt_node { DIR_IN = 0, DIR_OUT = 1, } direction; + /* IP version pkt_node relates to; either INP_IPV4 or INP_IPV6. */ + uint8_t ipver; + /* Local TCP port. */ + uint16_t tcp_localport; + /* Foreign TCP port. */ + uint16_t tcp_foreignport; /* Congestion Window (bytes). */ uint32_t snd_cwnd; /* Sending Window (bytes). */ @@ -635,6 +641,9 @@ static inline void siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp, int ipver, int dir, int inp_locally_locked) { + pn->ipver = ipver; + pn->tcp_localport = inp->inp_lport; + pn->tcp_foreignport = inp->inp_fport; pn->snd_cwnd = tp->snd_cwnd; pn->snd_wnd = tp->snd_wnd; pn->rcv_wnd = tp->rcv_wnd; From nobody Sat Jul 1 10:29: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 4QtT1v4mt4z4lMNB for ; Sat, 1 Jul 2023 10:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtT1v4HJyz3Lbb; Sat, 1 Jul 2023 10:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688207347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b75K63vzVR4Wmv2o6oclIqnDmeurLhOUzY0v9Zwz7ms=; b=YM5XWZjCmbp7YPQebpn65tmnGSW5RFz2MKlxHOvh3s9+63BrILX4yrPcg2gonLysg/Ix// HI51BocqdFFVjW1m9VTkqnbBhOl+bm+WKtCXAH8dZVsqGlMp6Ct0zSmUG2AXqnQpwC0slR xpp0X2bTQvZDhw4EX0SGsQmsfTypKAP0AI7/9IAvelmct9ViUlI2aawksP3J9lDZ9UZql4 qyc7cx2Vsn+hluvt7iFRTrPbdE+J/szVqiZ7orpyArWul43IR4inXglap1UIJTqVykp4mh vcKTK5k03rLTjuhKf0TzDSX1Rm/Ya95TlBmp0R1CYSwYz4TkjxXGth7e8SPtCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688207347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b75K63vzVR4Wmv2o6oclIqnDmeurLhOUzY0v9Zwz7ms=; b=LyvMmAyufcWrvVep81YZJIFMqWWPFiumzJ185KNvu4BsvEhSowKmEyBmvjaJlEoM5GSODq HuxZr9j1QBaeyb5YrfS2ZZIJ7E46Z4pDdyNlVGEoKOJY3GDioC/2uo2t6WI3/wmbU+IntC 7+gFzoi3LKHixeAXlSDzZ4WCstoG2tI+8BeNsukUUB//icDFBchQXdr8+JpCUKKxbMU7XV QZFl/B+mxvASy4yywOnJSmD0dneRjCFXg2E+QC5O5icM1ITOZEmowB+XMWuOs5go2IGUoD uaRJfGfOtX1yUmdCBSkjhLBj918sOHjpsHUoCTCTVU9dOo0hXDBht9jnUg8bAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688207347; a=rsa-sha256; cv=none; b=diUeOprTZA8H0jlrGv61xkS+ruoVS95GIIM2x/ZD4KIGZo4fiy3qDa6/oZU5VkjEcTOCji oiT6d6Xeic3YbvXkOEb3rLsju5PY/JcEc9FYtI4ToYZdhtYy4fgxuqsptKIfuj5UHgCZmO IQGshEdAbDXWqNvDEWLHdvgmaczF7UAV1H5t2Z0aHXCFVom0nvGf+I9UlqR/A9Mej9Y+E8 uzqVSj4G3ZTXEj6pKm7OzC4DHIE4GMUBMH55xFhtYYwXzbIgqGVAygygH54g/ELxqUwCHd kK81YTlB4JXo8vGw6/h7HdSeXlGIOBRJo7oDqkBi4L4Kkzpw+fUOvLNv0NGwcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtT1v3MTzzMlv; Sat, 1 Jul 2023 10:29: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 361AT7OA073370; Sat, 1 Jul 2023 10:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361AT7ka073369; Sat, 1 Jul 2023 10:29:07 GMT (envelope-from git) Date: Sat, 1 Jul 2023 10:29:07 GMT Message-Id: <202307011029.361AT7ka073369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 009d3288dea5 - vendor/openzfs/zfs-2.2-release - vendor branch created List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 009d3288dea524c7ad373b04b65bee8bb6f0bfea X-Git-Oldrev: 0000000000000000000000000000000000000000 X-Git-Newrev: 009d3288dea524c7ad373b04b65bee8bb6f0bfea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openzfs/zfs-2.2-release has been created by mm: URL: https://cgit.FreeBSD.org/src/log/?id=009d3288dea5 f1ca4da6f797 Initial commit. All spl source written up to this point wrapped in an initial reasonable autoconf style build system. This does not yet build but the configure system does appear to work properly and integrate with the kernel. Hopefully the next commit gets us back to a buildable version we can run the test suite against. 8f48c2c853b6 Whoops, I knew I'd miss something small in the build system. Fix it 564f6d1509f7 User space build fixes: - Add list handling compatibility library - Drop uu_* list handling in favor of local list implementation - libtoolize - generic makefile cleanup 3d4ea0ced6c2 More build fixes, I have the kernel module almost building and its feeling a lot more sane, cleaner, and linuxy. I may finish this tonight. f1b59d2620ae Lots of build fixes. This is turning out to be a very good idea since it forcefully codifing the ABI. Since the shim layer is no longer linked at build time in to the test suite we can;'t cut any corners and get away with it. 15821fd660fd Move dir ce58df922657 Move dir d01858a1ca78 Move dir 032d12a90053 Move dir 1735fa73f4ac New approach a0aadf5666d5 OK, everything builds now. My initial intent was to place all of the directories at the top level but that proved troublesome. The kernel buildsystem and autoconf were conflicting too much. To resolve the issue I moved the kernel bits in to a modules directory which can then only use the kernel build system. We just pass along the likely make targets to the kernel build system. e4009e98c756 Quiet libtool 70eadc19583d OK, it builds... and the modules load... now for some more cleanup to remove the remaining vestages of the time it lives with the ZFS code. 7c50328b40df More cleanup. - Removed all references to kzt and replaced with splat - Moved portions of include files which do not need to be available to all source files in to local.h files in proper source subdirs. 07d339d46733 Add top level make check target which runs the validation suite. Careful with this right now one of the tests still causes a lockup on the node. This happened before the move from the ZFS repo so its not a new issue. 596e65b4e8e9 OK, I think this is the last of major cleanup and restructuring. We've dropped all the linux- prefixes on the file in favor of spl- which makes more sense. And we've cleaned up some of the includes so everybody should be including their own dependencies properly. All a module which wants to use the spl support needs to do in include spl.h and ensure it has access to Module.symvers. 09b414e880b0 Minor nit, SOLARIS should be SPL f4b377415b4b Reorganize /include/ to add a /sys/, this way we don't need to muck with #includes in existing Solaris style source to get it to find the right stuff. ea70970ff5a3 Almost dropped this! d5f087adef0e Remaining lose ends dbb484ec6002 Stub out some missing headers which are expected. I'll fill in what the contents need to be as I encounter the warnings about missing prototypes, symbols, and such. 14c5326ccd05 More stub headers, moved generic to sysmacros, added some more macros for kernel compatibility 48f940b94399 Fix type 23f28c4f75b6 Remove spl.h, just include the headers you need. Add a few more stubs. a713518f5d9e Checkpoint for the night, added a few more stub headers, fleshed out a few stub headers, added a FIXME file, added various compatibility macros 77b1fe8fa868 Add highbit func, Add sloopy atomic declaration which will need to be fixed (eventually) Fill out more of the Solaris VM hooks Adjust the create_thread function ed61a7d05eb9 Add some missing rw_lock symbols b0dd3380aae2 Minor atomic cleanup, this needs to be done right. Fixed a bug in the timer code Added missing macros 3b3ba48fe9a6 Add missing cred.h functions Resolve compiler warning with kmem_free (unused len) Add stub for byteorder.h Add zlib shim for compress2 and uncompress functions 0b3cf046cb5b Add the initial vestigates of vnode support 05ae387b5024 Add somre debugging support 12472b242dc3 Just filling in more of the env. 6adf99e7d6c1 Add missing headers 4098c921b68e Fix systemic naming mistake 51f443a0741b Add some typedefs to make it clearer when we passing a function, Add fm_panic define Add another bad atomic hack (need to do this right) ee4766827a6e Remap gethrestime() with #define to new symbol and export that new symbol to avoid direct use of GPL only symbol. b123971fc2f9 Two more GPL only symbols moved to helper functions in the spl module. 9490c1483593 Apply fix from bug239 for rwlock deadlock. 4b17158506d5 - Implemented vnode interfaces and 6 test cases to the test suite. - Re-implmented kobj support based on the vnode support. - Add TESTS option to check.sh, and removed delay after module load. 2f5d55aac5bf Add copyin/copyout mapping Fix some vnode types 36e6f8614643 - Add some more missing headers - Map the LE/BE_* byteorder macros to the linux versions - More minor vnodes fixes 73e540a0d1cc Drop unicode support, provided in ZFS tree libport Update uio support 8ddd0ee4154e Add two more missing headers ea19fbed0538 Add missing headers af828292e585 Add missing headers Rework vnodes to be based on the slab cache, just like on Solaris. 79b31f3601af Fix KMEM_DEBUG support (enable by default) Add vmem_alloc/vmem_free support (and test case) Add missing time functions c19c06f3b05a Fix kmem memory accounting 2bdb28fbe07d Missing headers, more minor fixes 1ec74a114cc4 Minimal signal handling interface. 5d86345d3753 Initial pass at a file API getf/releasef hooks e4f1d29f89b7 OK, some pretty substantial rework here. I've merged the spl-file stuff which only inclused the getf()/releasef() in to the vnode area where it will only really be used. These calls allow a user to grab an open file struct given only the known open fd for a particular user context. ZFS makes use of these, but they're a bit tricky to test from within the kernel since you already need the file open and know the fd. So we basically spook the system calls to setup the environment we need for the splat test case and verify given just the know fd we can get the file, create the needed vnode, and then use the vnode interface as usual to read and write from it. 4e62fd4104e9 OK, a first reasonable attempt at a solaris module/chdev shim layer. This should handle the absolute minimum I need for ZFS. It will register the chdev with the right callbacks. Then the generic registered linux callback will find the right registered solaris callback for the function and munge the args just right before passing it on. Should work, but untested (just compiled), so I expect bugs. 336bb0c0c1e0 Two fixes to the module interface. Could be worse! 8ac547ec4c96 Relocated to zfs repo d429b03d85ee - Thinko fix to the SPL module interface - Enhanse the VERIFY() support to output the values which failed to compare as expected before crashing. This make debugging much much much easier. 4a4295b26736 Remove minor lingering CDDL tait of copied headers. Required headers rewritten to include minimally what we need. 9f4c835a0efd Correctly functioning 64-bit atomic shim layer. It's not what I would call effecient but it does have the advantage of being correct which is all I need right now. I added a regression test as well. e487ee08fb0b Fixed that. 8d0f1ee907d4 Add some crude debugging support. It leaves alot to be desired, but it should allow more easy kernel debugging for now. 4fd2f7eea565 Add vmem_zalloc support. e966e04fd52e Ensure all file ops pointer are NULL or we may end up calling garbage pointers on open/close etc and get what look like random crashes. 6a585c61de0f Double large kmalloc warning size to 4 pages. It was 2 pages, and ideally it should be dropped to one page but in the short term we should be able to easily live with 4 page allocations. 0998fdd6dba7 Apparently it's OK for done to be NULL, which was not clear in the Solaris man page. Anyway, since apparently this usage is accectable I've updated the function to handle it. 0a6fd143fd6d - Remapped ldi_handle_t to struct block_device * which is much more useful - Added liunx block device headers to sunldi.h - Made __taskq_dispatch safe for interrupt context where it turns out we need to be useing it. - Fixed NULL const/dest bug for kmem slab caches - Places debug __dprintf debugging messages under a spin_lock_irqsave so it's safe to use then in interrupt handlers. For debugging only! 996faa68697e Correctly implement atomic_cas_ptr() function. Ideally all of these atomic operations will be rewritten anyway with the correct arch specific assembly. But not today. 968eccd1d1cb Update the thread shim to use the current kernel threading API. We need to use kthread_create() here for a few reasons. First off to old kernel_thread() API functioin will be going away. Secondly, and more importantly if I use kthread_create() we can then properly implement a thread_exit() function which terminates the kernel thread at any point with do_exit(). This fixes our cleanup bug which was caused by dropping a mutex twice after thread_exit() didn't really exit. 728b9dd80074 - Fix write-only behavior in vn-open() - Ensure we have at least 1 write-only splat test - Fix return codes for vn_* Solaris does not use negative return codes in the kernel. So linux errno's must be inverted. 79f92663e369 Fix race in rwlock implementation which can occur when your task is rescheduled to a different cpu after you've taken the lock but before calling RW_LOCK_HELD is called. We need the spinlock to ensure there is a wmb() there. 115aed0dd8ea - Add more strict in_atomic() checking to the mutex entry function just to be extra safety and paranoid. 12ea923056d9 Adjust the condition variables to simply sleep uninteruptibly. This way we don't have to contend with superious wakeups which it appears ZFS is not so careful to handle anyway. So this is probably for the best. f23e92fabf09 Add hw_serial support based on a usermodehelper which runs at spl module load time can calls hostid. The resolved hostid is then fed back in to a proc entry for latter use. It's not a pretty thing, but it will work for now. The hw_serial is required for things such as 'zpool status' to work. c5fd77fcbf20 Just cleanup up an error case to avoid overspamming the console. We get the stack once from the BUG() no reason to dump it twice. d61e12af5af3 - Add some spinlocks to cover all the private data in the mutex. I don't think this should fix anything but it's a good idea regardless. 55152ebbb46f * modules/spl/spl-kmem.c : Make sure to disable interrupts when necessary to avoid deadlocks. We were seeing the deadlock when calling kmem_cache_generic_constructor() and then an interrupt forced us to end up calling kmem_cache_generic_destructor() which caused our deadlock. 57d1b1885897 First commit of lustre style internal debug support. These changes bring over everything lustre had for debugging with two exceptions. I dropped by the debug daemon and upcalls just because it made things a little easier. They can be readded easily enough if we feel they are needed. ce86265693be Whoops need this! 2fae1b3d0af1 Frist minor batch of fixes. Catch a dropped ;, and use SBUG instead of BUG. 937879f11db1 Update SPL to use new debug infrastructure. This means: - Replacing all BUG_ON()'s with proper ASSERT()'s - Using ENTRY,EXIT,GOTO, and RETURN macro to instument call paths 892d51061e04 Handful of minor stack checking fixes a8ac0b89668d Whoops, missed an instance where we could recursively stack check... bad. e5bbd245e351 Added 4 missing subsystem flags *** 8587 LINES SKIPPED *** From nobody Sat Jul 1 10:30: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 4QtT351n9qz4lMpj for ; Sat, 1 Jul 2023 10:30: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 4QtT3475hWz3Lxx; Sat, 1 Jul 2023 10:30:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688207409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uu4VHQplZzjXtdshPu/LyFtjXLkffj2P8TCZLqT5A1M=; b=qnEkMFRatRaH/JRTx0iIP6T7eq9sOC9/Xv4FB2qyak1J7bSzgBba71JFLnwyjGS/FwoRzM xlp3SOk1xRjNS5y5QXFcBn29Hwdw011fv7feug6NfLc868TMqk3XIH38Jy/e+S/SpRU3yl /KSh7u+17CiqyYCfK619Cw6jCI2h6exxeBIj25t0/LYsYcjuMDoTApwoBSCOOXPSW1aYI6 MY73SCnDXFBVuV1omdgp93iy+vTfYXwpPzo2TxwWGjl4S4tTPek9HHL1tpGMkt6uhaw8Ha 6RYiPppLhsJDuEW2RqRj7h2MiP06AisjWKq6NpCh/kVsf6EnhNzHiazMS/zIpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688207409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uu4VHQplZzjXtdshPu/LyFtjXLkffj2P8TCZLqT5A1M=; b=LJGzqbDogaQIsQiYvkZehH2iq6VqMY1FxZKPYAL10Ykr9uBKn6RG9zTLi1B+vbVv+mHQ3C ER5loqGB26P4GU9ZmycEKumfWMxntwcHuEtQOhjfj/w1gwCSXFFThwyg2BBCsrUtnnLhLE RIR/xW/EjYnr8KOi1b+3+rCmAmn8aM81HSxUHF6k6YCj25xw0AYHc3BOiSYYWi3cDY7Mju 9APndPP4hw1ofk8myEAUZlonCjpSTuyF8MuRbFBUqsDKPCSTV0NA0XcNCzhSGVbWW5uTLm MlZNAVUgkeoiiJ6ScfxSoJosFyyP1D+/muA0L5u1cKcpLTtsZy2RdGQPU5vVdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688207409; a=rsa-sha256; cv=none; b=ocKX/8XtU/59Q9H8S0ZOdzf8j7GoUzy0Tamxu2EaI59X3LnFwvzFZmpfLwuhdSTPSJhNci n3I7ahbeCXNmkV6al6rQ5/9WBaQSotvM1uxID+wA2vPqevTXUyHIE8tLbFKvvWmsLl+DhN ZAl6+kmL8jkgt+/I6aq9hvVphIzIJR4sHMPuSQOKVZXyUzfMpa8PHont/0suc2PdYMVqvf UvrxHxx5QIza0I8LTdTjHK+1RTDEKDQ47L++G5mdg7t3sswU7UOIznVmLQowaY/iV3sC6L IojQX1fmuIh/Jp6LYei2hOv6wmg5iFRnia3Xz4NnMn7tBRQWYCoazOcjUXimRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtT3466GCzMn9; Sat, 1 Jul 2023 10:30: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 361AU8ld077165; Sat, 1 Jul 2023 10:30:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361AU8W4077162; Sat, 1 Jul 2023 10:30:08 GMT (envelope-from git) Date: Sat, 1 Jul 2023 10:30:08 GMT Message-Id: <202307011030.361AU8W4077162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: a9d6b0690b18..009d3288dea5 - 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: 009d3288dea524c7ad373b04b65bee8bb6f0bfea X-Git-Oldrev: a9d6b0690b1863f39a7efce08b1227f2e9e26abb X-Git-Newrev: 009d3288dea524c7ad373b04b65bee8bb6f0bfea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=a9d6b0690b18..009d3288dea5 62ace21a149c zdb: Add missing poolname to -C synopsis 77a3bb1f47e6 spa.h: use IN_BASE instead of IN_FREEBSD_BASE 24554082bd93 contrib: dracut: Conditionalize copying of libgcc_s.so.1 to glibc only eda32dca92a8 Fix remount when setting multiple properties. 6052060c133d Don't use hard-coded 'size' value in snprintf() fa7b2390d498 Do not report bytes skipped by scan as issued. b4a087309235 Some ZIO micro-optimizations. 233425a153af Again fix race between zil_commit() and zil_suspend(). 61ab05cac748 ddt_addref: remove unnecessary phys fill when refcount is 0 2b10e32561df Pack our DDT ZAPs a bit denser. ac8ae18d2255 Revert "spa.h: use IN_BASE instead of IN_FREEBSD_BASE" 945e39fc3a34 Enable tuning of ZVOL open timeout value 009d3288dea5 Tag 2.2.0-rc1 From nobody Sat Jul 1 16:16: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 4Qtcl231Y7z4jyQN; Sat, 1 Jul 2023 16: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 4Qtcl22sc0z4NRT; Sat, 1 Jul 2023 16: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=1688228206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjFy2+wCG9NcFpEnopSFcblyyoxIMjlXZKz0JqScCMs=; b=QajOV2mZP4zuUAC9jowQWLJKJD/ZdIeXqLjDDc8LdHMtW8MRIanH68gV4s3Qup1NNB0PhB vhlg7mfzgTcI64wbCk1IlpvjuyeYbaP1nLQMmLr5rfVUChizr4cBgaSr2TI4n9hzW44rCl khj/LSCx38ynSD12QK+3y7W55uwwFLnwMj6fJCpN2rog5I/sVLPqY3I72ZBfWcpERt2zTO HML/n16dq8kIyxuCkY1DwqtVnDNQs/yrQdrJk0yYvCgQ4dYS5VQZou7H2L+80goFKzSNiw /AtPNpTlEQMkOAsojTpdcKILbSfLpKotzFrRpd0BOw2NWIaF7z5MRXC6qv7OHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688228206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cjFy2+wCG9NcFpEnopSFcblyyoxIMjlXZKz0JqScCMs=; b=X16shIsj1jPkmk0xui0ZXf+GUuqnPrAnQx4bx4GD8r6Hk9+u+FPFiiXALXDcYjIrN6i685 H+9wKIKlckUCVpRtfijB3Idj93HsM4RKHSYGbTd7s/q0IzPGfIwQKZQnetybjxMbJ4NJ/+ W1rMoPhGKq1Nt6v2vAC5uMr/riIRBuQhqyu398NxJehGjj92V5ty/aqKFzEnS6GVshKZnV Cls504eTIf6+HYEQ/ezLB3QleRhmfAxDKsAVVbCVkEQCjnwIlzkFu523ycJIuEVuPLWzIw EUeLCa+YRKPUJW3JjmTJO6k4jDWnL3nRw6ROmoIFPZ680MZqSkAf1zi0FJZTnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688228206; a=rsa-sha256; cv=none; b=EVn48LcuiI9FOe2G5oZfB570pRC68sCcN9j4TiI1cX7T1r5w4nQX6L+6/e77N5y6gzTogi ZCGHnPjm19EhbFFEtZSllpyJkFuTRqA/5AHLzW+mIoZgb0j2oVnvmqRzjnkhM9VDBRd3sY i+2+h1722GgPMgL9tdLjE+TbLiGnxZ3DJeLMCqZflvFJyNk91ebTeE55MW/kNwCSKj7kDj lCOB6nuylkuKzJ/wF5siZ6riGn+PKp5v6CXZnNpsTGq5uPL9C5gHmNKGsku8Gmq8w7cpKR a0Qdc/IT2xe/R4c0CpqckLSMsqVUzwPsCKczn6Ax3D7ay05QmRR1W2dnE2WJ9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtcl21vn2zXY9; Sat, 1 Jul 2023 16: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 361GGk6L054720; Sat, 1 Jul 2023 16: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 361GGeRl054713; Sat, 1 Jul 2023 16:16:40 GMT (envelope-from git) Date: Sat, 1 Jul 2023 16:16:40 GMT Message-Id: <202307011616.361GGeRl054713@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: 0a97523d4674 - main - zfs: merge openzfs/zfs@009d3288d List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0a97523d467443fa54171ef7a399b1c9043eac75 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=0a97523d467443fa54171ef7a399b1c9043eac75 commit 0a97523d467443fa54171ef7a399b1c9043eac75 Merge: cd9da8d072e4 009d3288dea5 Author: Martin Matuska AuthorDate: 2023-07-01 10:32:38 +0000 Commit: Martin Matuska CommitDate: 2023-07-01 13:24:26 +0000 zfs: merge openzfs/zfs@009d3288d Notable upstream pull request merges: #14654 Pack our DDT ZAPs a bit denser #14979 Again fix race between zil_commit() and zil_suspend() #14985 Some ZIO micro-optimizations #15000 Fix remount when setting multiple properties #15004 ddt_addref: remove unnecessary phys fill when refcount is 0 #15007 Do not report bytes skipped by scan as issued #15023 Enable tuning of ZVOL open timeout value Obtained from: OpenZFS OpenZFS commit: 009d3288dea524c7ad373b04b65bee8bb6f0bfea OpenZFS tag: zfs-2.2.0-rc1 sys/contrib/openzfs/META | 4 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 2 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 14 ++-- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 94 +++++++++++++--------- .../openzfs/cmd/zpool_influxdb/zpool_influxdb.c | 2 +- .../contrib/dracut/90zfs/module-setup.sh.in | 2 +- sys/contrib/openzfs/include/sys/dsl_scan.h | 2 +- sys/contrib/openzfs/include/sys/fs/zfs.h | 3 +- sys/contrib/openzfs/include/sys/vdev_rebuild.h | 1 + sys/contrib/openzfs/include/sys/zio.h | 3 +- sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 7 +- sys/contrib/openzfs/man/man4/zfs.4 | 10 +++ sys/contrib/openzfs/man/man8/zdb.8 | 3 +- sys/contrib/openzfs/man/man8/zpool-scrub.8 | 4 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 7 +- sys/contrib/openzfs/module/zfs/ddt.c | 17 +++- sys/contrib/openzfs/module/zfs/ddt_zap.c | 13 ++- sys/contrib/openzfs/module/zfs/dsl_scan.c | 22 +++-- sys/contrib/openzfs/module/zfs/spa_misc.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 6 +- sys/contrib/openzfs/module/zfs/zil.c | 36 +++++++-- sys/contrib/openzfs/module/zfs/zio.c | 52 +++++++++--- sys/modules/zfs/zfs_config.h | 6 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 24 files changed, 218 insertions(+), 96 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index ddddc1ef9504,000000000000..d448d8dcc96f mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1090 -1,0 +1,1090 @@@ +/* + * $FreeBSD$ + */ + +/* 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() 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_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 */ + +/* 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 */ + +/* 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_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_*_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 + +/* 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 */ + +/* 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 */ + +/* 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 */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->read/write_iter() are available */ +/* #undef HAVE_VFS_RW_ITERATE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* yes */ +/* #undef HAVE_WAIT_ON_BIT_ACTION */ + +/* wait_queue_entry_t exists */ +/* #undef HAVE_WAIT_QUEUE_ENTRY_T */ + +/* wq_head->head and wq_entry->entry exist */ +/* #undef HAVE_WAIT_QUEUE_HEAD_ENTRY */ + +/* int (*writepage_t)() takes struct folio* */ +/* #undef HAVE_WRITEPAGE_T_FOLIO */ + +/* xattr_handler->get() wants dentry */ +/* #undef HAVE_XATTR_GET_DENTRY */ + +/* xattr_handler->get() wants both dentry and inode */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->get() wants xattr_handler */ +/* #undef HAVE_XATTR_GET_HANDLER */ + +/* xattr_handler has name */ +/* #undef HAVE_XATTR_HANDLER_NAME */ + +/* xattr_handler->list() wants dentry */ +/* #undef HAVE_XATTR_LIST_DENTRY */ + +/* xattr_handler->list() wants xattr_handler */ +/* #undef HAVE_XATTR_LIST_HANDLER */ + +/* xattr_handler->list() wants simple */ +/* #undef HAVE_XATTR_LIST_SIMPLE */ *** 172 LINES SKIPPED *** From nobody Sat Jul 1 17:10: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 4Qtdwj243Mz4l3YG; Sat, 1 Jul 2023 17:10: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 4Qtdwj1Zz9z3hQk; Sat, 1 Jul 2023 17:10:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zXGoqznQYDz6U156V5h7+HbwMgqBAtqkvnH1a0O2EVw=; b=U1vP7lb55m5OcE9YkjCTgmON2YLjfn6wiGXJz7L8gVwIomnmaOxcERtDg2eU3SBRFNAlHY u7TMIrUTYvnMA0ENLHl5ou5+M7KD6eMlE3oqFJtRsDquljSbhvFqq8v2ATG2SQgj0s07/l KnJGvUlMkl0Mam2w6m6HpLCSrZqZRL9Vuz/Plv9ut+j1+/1YpssBCgX2/rhb89XIyoSJyq 0/+qlOFw1GM+APL1A7VFW71v9A8sRvLeLNkS40G/lUoO5vKWd/lU+qOW70h6CynH38nV6j ZPnBfDH9NdJ/6etZ4/3MGvZvSBk7xHy7hazAx9Z65UxUIZHITQ33bQe++dnTgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zXGoqznQYDz6U156V5h7+HbwMgqBAtqkvnH1a0O2EVw=; b=IiNhER8rQdq8QgH3f9HhRCuukZk/xm0pbeSB9dEsWDp8OaK3WH/gZ67dlkeN67cWuYKLA3 NXZKa15QAkIrLlQ7btiUuD3gMen6XSVr8VIvNA3u7xSEmNryxSZSQIkvRWdpWTHmpTcxo9 gGQK6Vl6beOvcTsWIMbhKeJ6cMHzHrMbSb2BSx03/uB0MrM9Ls4v4RYez35ojEKlciqwkv s2wkIV9nArlVNYTLXorsVlzbAP+3DhlxNhoYlQrCMd27WZ+Eo7IEueWtmQ3s+nP0eDLYJU LDy9xk64nnfAeiVM9JF3ZVyom3zF63WQHt27UfnmHdpj8euaKSG9V1mZtb7WtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231413; a=rsa-sha256; cv=none; b=WgaE8zHojN7B0eaDxDyjA1ruRl+asVagXu25gK54DkOMeB/licD8Brb/Pgzmzq8BevWWq3 dlmCcapz5VYXhXi8XmqCJhJU5/+JLnV8rl5aimJga8GAcTdao+yAlihZBWqCKcWQS/IJcb 7j8mKzKiuVVklblMoHFVjnlHVZHtFTjskJekiSkCtZZQU+DVqgEq8mNvdw7+BujHmhk9c/ 0BTWIEsgoNdXYPsWD3eTJu/f1uDc8iW3/0EpuIg9KNzIpwgBUPgzN5Uw6RwmkaHmDpRVmM o6W2WTi6aDTTDDA1EwK9wAi1AnE4YPhOpAChwQGOQDyw00JerRd2D5XAeFzR5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtdwj0dwQzYrr; Sat, 1 Jul 2023 17:10: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 361HAC9s044267; Sat, 1 Jul 2023 17:10:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HACj4044259; Sat, 1 Jul 2023 17:10:12 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:10:12 GMT Message-Id: <202307011710.361HACj4044259@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: 134b09369960 - main - qlnxe: Remove -Wno-case-qual from module 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 134b09369960a84cf698a639f7f20be3e10966b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=134b09369960a84cf698a639f7f20be3e10966b6 commit 134b09369960a84cf698a639f7f20be3e10966b6 Author: Mark O'Donovan AuthorDate: 2023-07-01 17:06:50 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:06:55 +0000 qlnxe: Remove -Wno-case-qual from module build Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/779 --- sys/dev/qlnx/qlnxe/ecore.h | 2 +- sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c | 25 ++++++++++++++----------- sys/dev/qlnx/qlnxe/ecore_init_ops.c | 26 +++++++++++++------------- sys/modules/qlnx/qlnxe/Makefile | 1 - 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/ecore.h b/sys/dev/qlnx/qlnxe/ecore.h index 32a6b98156c5..b83e777dac8e 100644 --- a/sys/dev/qlnx/qlnxe/ecore.h +++ b/sys/dev/qlnx/qlnxe/ecore.h @@ -586,7 +586,7 @@ struct ecore_fw_data { struct fw_ver_info *fw_ver_info; #endif const u8 *modes_tree_buf; - union init_op *init_ops; + const union init_op *init_ops; const u32 *arr_data; u32 init_ops_size; }; diff --git a/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c b/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c index 5a859982b5f0..4666963cd087 100644 --- a/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c +++ b/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c @@ -1916,21 +1916,22 @@ static enum dbg_status ecore_dbg_dev_init(struct ecore_hwfn *p_hwfn, return DBG_STATUS_OK; } -static struct dbg_bus_block* get_dbg_bus_block_desc(struct ecore_hwfn *p_hwfn, +static const struct dbg_bus_block *get_dbg_bus_block_desc(struct ecore_hwfn *p_hwfn, enum block_id block_id) { struct dbg_tools_data *dev_data = &p_hwfn->dbg_info; - return (struct dbg_bus_block *)&dbg_bus_blocks[block_id * MAX_CHIP_IDS + dev_data->chip_id]; + return (const struct dbg_bus_block *)&dbg_bus_blocks[block_id * MAX_CHIP_IDS + dev_data->chip_id]; } /* Returns OSAL_NULL for signature line, latency line and non-existing lines */ -static struct dbg_bus_line* get_dbg_bus_line_desc(struct ecore_hwfn *p_hwfn, +static const struct dbg_bus_line *get_dbg_bus_line_desc(struct ecore_hwfn *p_hwfn, enum block_id block_id) { struct dbg_tools_data *dev_data = &p_hwfn->dbg_info; struct dbg_bus_block_data *block_bus; - struct dbg_bus_block *block_desc; + const struct dbg_bus_block *block_desc; + u32 index; block_bus = &dev_data->bus.blocks[block_id]; block_desc = get_dbg_bus_block_desc(p_hwfn, block_id); @@ -1940,7 +1941,9 @@ static struct dbg_bus_line* get_dbg_bus_line_desc(struct ecore_hwfn *p_hwfn, block_bus->line_num >= NUM_DBG_LINES(block_desc)) return OSAL_NULL; - return (struct dbg_bus_line *)&dbg_bus_lines[block_desc->lines_offset + block_bus->line_num - NUM_EXTRA_DBG_LINES(block_desc)]; + index = block_desc->lines_offset + block_bus->line_num - NUM_EXTRA_DBG_LINES(block_desc); + + return (const struct dbg_bus_line *)&dbg_bus_lines[index]; } /* Reads the FW info structure for the specified Storm from the chip, @@ -2729,7 +2732,7 @@ static bool ecore_is_mode_match(struct ecore_hwfn *p_hwfn, u8 tree_val; /* Get next element from modes tree buffer */ - tree_val = ((u8 *)s_dbg_arrays[BIN_BUF_DBG_MODE_TREE].ptr)[(*modes_buf_offset)++]; + tree_val = ((const u8 *)s_dbg_arrays[BIN_BUF_DBG_MODE_TREE].ptr)[(*modes_buf_offset)++]; switch (tree_val) { case INIT_MODE_OP_NOT: @@ -3989,7 +3992,7 @@ static u32 ecore_grc_dump_static_debug(struct ecore_hwfn *p_hwfn, /* Dump all static debug lines for each relevant block */ for (block_id = 0; block_id < MAX_BLOCK_ID; block_id++) { struct block_defs *block = s_block_defs[block_id]; - struct dbg_bus_block *block_desc; + const struct dbg_bus_block *block_desc; u32 block_dwords; if (block->dbg_client_id[dev_data->chip_id] == MAX_DBG_BUS_CLIENTS) @@ -4893,12 +4896,12 @@ static u32 ecore_fw_asserts_dump(struct ecore_hwfn *p_hwfn, enum dbg_status ecore_dbg_set_bin_ptr(const u8 * const bin_ptr) { - struct bin_buffer_hdr *buf_array = (struct bin_buffer_hdr *)bin_ptr; + const struct bin_buffer_hdr *buf_array = (const struct bin_buffer_hdr *)bin_ptr; u8 buf_id; /* convert binary data to debug arrays */ for (buf_id = 0; buf_id < MAX_BIN_DBG_BUFFER_TYPE; buf_id++) { - s_dbg_arrays[buf_id].ptr = (u32 *)(bin_ptr + buf_array[buf_id].offset); + s_dbg_arrays[buf_id].ptr = (const u32 *)(bin_ptr + buf_array[buf_id].offset); s_dbg_arrays[buf_id].size_in_dwords = BYTES_TO_DWORDS(buf_array[buf_id].length); } @@ -5113,7 +5116,7 @@ enum dbg_status ecore_dbg_bus_enable_block(struct ecore_hwfn *p_hwfn, struct dbg_tools_data *dev_data = &p_hwfn->dbg_info; struct block_defs *block = s_block_defs[block_id]; struct dbg_bus_block_data *block_bus; - struct dbg_bus_block *block_desc; + const struct dbg_bus_block *block_desc; block_bus = &dev_data->bus.blocks[block_id]; block_desc = get_dbg_bus_block_desc(p_hwfn, block_id); @@ -5574,7 +5577,7 @@ static enum dbg_status ecore_config_dbg_block_framing_mode(struct ecore_hwfn *p_ u32 block_id; if (!bus->hw_dwords && bus->num_enabled_blocks) { - struct dbg_bus_line *line_desc; + const struct dbg_bus_line *line_desc; u8 hw_dwords; /* Choose either 4 HW dwords (128-bit mode) or 8 HW dwords diff --git a/sys/dev/qlnx/qlnxe/ecore_init_ops.c b/sys/dev/qlnx/qlnxe/ecore_init_ops.c index 94c6b2964092..bb3929a3e127 100644 --- a/sys/dev/qlnx/qlnxe/ecore_init_ops.c +++ b/sys/dev/qlnx/qlnxe/ecore_init_ops.c @@ -242,7 +242,7 @@ static void ecore_init_fill(struct ecore_hwfn *p_hwfn, static enum _ecore_status_t ecore_init_cmd_array(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, - struct init_write_op *cmd, + const struct init_write_op *cmd, bool b_must_dmae, bool b_can_dmae) { @@ -253,14 +253,14 @@ static enum _ecore_status_t ecore_init_cmd_array(struct ecore_hwfn *p_hwfn, u32 offset, output_len, input_len, max_size; #endif struct ecore_dev *p_dev = p_hwfn->p_dev; - union init_array_hdr *hdr; + const union init_array_hdr *hdr; const u32 *array_data; enum _ecore_status_t rc = ECORE_SUCCESS; u32 size; array_data = p_dev->fw_data->arr_data; - hdr = (union init_array_hdr *) (array_data + + hdr = (const union init_array_hdr *) (array_data + dmae_array_offset); data = OSAL_LE32_TO_CPU(hdr->raw.data); switch (GET_FIELD(data, INIT_ARRAY_RAW_HDR_TYPE)) { @@ -326,7 +326,7 @@ static enum _ecore_status_t ecore_init_cmd_array(struct ecore_hwfn *p_hwfn, /* init_ops write command */ static enum _ecore_status_t ecore_init_cmd_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, - struct init_write_op *p_cmd, + const struct init_write_op *p_cmd, bool b_can_dmae) { u32 data = OSAL_LE32_TO_CPU(p_cmd->data); @@ -387,7 +387,7 @@ static OSAL_INLINE bool comp_or(u32 val, u32 expected_val) /* init_ops read/poll commands */ static void ecore_init_cmd_rd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, - struct init_read_op *cmd) + const struct init_read_op *cmd) { bool (*comp_check)(u32 val, u32 expected_val); u32 delay = ECORE_INIT_POLL_PERIOD_US, val; @@ -442,7 +442,7 @@ static void ecore_init_cmd_rd(struct ecore_hwfn *p_hwfn, /* init_ops callbacks entry point */ static enum _ecore_status_t ecore_init_cmd_cb(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, - struct init_callback_op *p_cmd) + const struct init_callback_op *p_cmd) { enum _ecore_status_t rc; @@ -486,7 +486,7 @@ static u8 ecore_init_cmd_mode_match(struct ecore_hwfn *p_hwfn, } static u32 ecore_init_cmd_mode(struct ecore_hwfn *p_hwfn, - struct init_if_mode_op *p_cmd, int modes) + const struct init_if_mode_op *p_cmd, int modes) { u16 offset = OSAL_LE16_TO_CPU(p_cmd->modes_buf_offset); @@ -497,7 +497,7 @@ static u32 ecore_init_cmd_mode(struct ecore_hwfn *p_hwfn, INIT_IF_MODE_OP_CMD_OFFSET); } -static u32 ecore_init_cmd_phase(struct init_if_phase_op *p_cmd, +static u32 ecore_init_cmd_phase(const struct init_if_phase_op *p_cmd, u32 phase, u32 phase_id) { u32 data = OSAL_LE32_TO_CPU(p_cmd->phase_data); @@ -519,7 +519,7 @@ enum _ecore_status_t ecore_init_run(struct ecore_hwfn *p_hwfn, { struct ecore_dev *p_dev = p_hwfn->p_dev; u32 cmd_num, num_init_ops; - union init_op *init_ops; + const union init_op *init_ops; bool b_dmae = false; enum _ecore_status_t rc = ECORE_SUCCESS; @@ -536,7 +536,7 @@ enum _ecore_status_t ecore_init_run(struct ecore_hwfn *p_hwfn, #endif for (cmd_num = 0; cmd_num < num_init_ops; cmd_num++) { - union init_op *cmd = &init_ops[cmd_num]; + const union init_op *cmd = &init_ops[cmd_num]; u32 data = OSAL_LE32_TO_CPU(cmd->raw.op_data); switch (GET_FIELD(data, INIT_CALLBACK_OP_OP)) { @@ -661,9 +661,9 @@ enum _ecore_status_t ecore_init_fw_data(struct ecore_dev *p_dev, len = buf_hdr[BIN_BUF_INIT_CMD].length; fw->init_ops_size = len / sizeof(struct init_raw_op); #else - fw->init_ops = (union init_op *)init_ops; - fw->arr_data = (u32 *)init_val; - fw->modes_tree_buf = (u8 *)modes_tree_buf; + fw->init_ops = (const union init_op *)init_ops; + fw->arr_data = (const u32 *)init_val; + fw->modes_tree_buf = (const u8 *)modes_tree_buf; fw->init_ops_size = init_ops_size; #endif diff --git a/sys/modules/qlnx/qlnxe/Makefile b/sys/modules/qlnx/qlnxe/Makefile index b033e4a623b5..c0971e443ffd 100644 --- a/sys/modules/qlnx/qlnxe/Makefile +++ b/sys/modules/qlnx/qlnxe/Makefile @@ -90,5 +90,4 @@ CFLAGS += -DCONFIG_ECORE_IWARP CFLAGS += -DCONFIG_ECORE_RDMA CFLAGS += -DQLNX_ENABLE_IWARP -CWARNFLAGS+= -Wno-cast-qual CWARNFLAGS.ecore_ll2.c+= ${NO_WUNUSED_BUT_SET_VARIABLE} From nobody Sat Jul 1 17:10: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 4Qtdwk2QYkz4l3Pt; Sat, 1 Jul 2023 17:10: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 4Qtdwk1yFKz3hP6; Sat, 1 Jul 2023 17:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h8jqwlOZB87R7XakbCGSYHpxRNueG39yLcTr2qHQnWo=; b=unmDMvahvoW1Ffhu9v+7WXBXDZWJq9Cvncqx4WxjLx4V0EgehX6Pfefr9QBxV4ju3Sm/Qc 4sHnKbQu60fpRFlYZBMZvgiijn/1mJodJlor2aWlwvXwTbV0rdxo4X8+vaIlz36Xcrrk6h vT2MEifjtdVqU+hL2SJ2JPgqwTTHB26Yd7+8LyLpDEAKHIY1CUWhckOQyKvjICbXsL3sqY teS3r8vv78X3RN+VQSst6el+r+RQMwke2AFQ+0HGYIZT5k+4ZpzRcOJHapbxbguBKWnbES b/00pZxntXfwF5KgaMXw4LiZQ56RyyiO5SdmSQzw9E48VBXMQshZhkJ56sQYdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h8jqwlOZB87R7XakbCGSYHpxRNueG39yLcTr2qHQnWo=; b=Offh/+JvOmrvOuWvQNj/8amh2Wwh2PYhVXuqe4SVT/G3EkMjSVUK/g0ZZtOdErGzSoLREe VZGU/JD6BwLEz8dB7ZPyMvGkxb+uXhqX5KlQswvmuBY9Giz+49qlrB13yK+Q0s9BfDQC+d E1cpDgpFnE6n5+rEulikZrHXtBNNB7W42N7SDBsJw0dmuyQx+vNSIPhmGgLwsqowgUp+mV C4tgspYj6txL1jKUh7o/u5LmxLNnE1IqrYZhw2Fs7nW7eyPMaaVcBaFoYSSUw5GkOexNK1 JsAVB8w0qXIbKTnUoXC/9QiNgmNePnOebKHWwDQoOWu46RNePedEA6AdQTqL6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231414; a=rsa-sha256; cv=none; b=ut7AjjWYdXjr9xiaIzYJyaSJU+NqdQdkF8JkCp6ekj1OuqwgPHkSdU74RTLq42qPDlmorS Vu3OEBqLB+wp82kOyQmyUqnaAt5PnYtHUHtIFob5MOca9w7G/bCaM9dfXrRbNiOq93N0A8 K5tmGdeHWZh/+lGmAsFN9C5HH8sCxTfkj8OQx9m8z60dznp7dba5yre5q5D6SvegwD0CGq cVksQQIoxERjS+fTJ51B5onXFyIo7lqcEdFSO960CZ+jKt+hrBLt3S0sOyDGoAQtYeZosq MxD78+4kwhXWp/BhrdD3HRsQupiWse5pZxUI5+/ok/Yqj5qCQlrX2wcMb4GTRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtdwk0xzXzZ2P; Sat, 1 Jul 2023 17:10: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 361HAEeJ044927; Sat, 1 Jul 2023 17:10:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HAEeX044919; Sat, 1 Jul 2023 17:10:14 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:10:14 GMT Message-Id: <202307011710.361HAEeX044919@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: 99e5ffe1ba40 - main - qlnxe: Move sriov includes to qlnx_os.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99e5ffe1ba4001f4b893d12ab746cb4472b42757 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=99e5ffe1ba4001f4b893d12ab746cb4472b42757 commit 99e5ffe1ba4001f4b893d12ab746cb4472b42757 Author: Mark O'Donovan AuthorDate: 2023-07-01 17:06:50 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:06:56 +0000 qlnxe: Move sriov includes to qlnx_os.c SRIOV is being enabled in ecore.h but by then the qlnx_os.h header has been processed and not included the relevant headers Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/779 --- sys/dev/qlnx/qlnxe/qlnx_os.c | 6 ++++++ sys/dev/qlnx/qlnxe/qlnx_os.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index bbd4c0fe7e8c..0b5dba75300b 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -68,6 +68,12 @@ __FBSDID("$FreeBSD$"); #include "qlnx_rdma.h" #endif /* #ifdef QLNX_ENABLE_IWARP */ +#ifdef CONFIG_ECORE_SRIOV +#include +#include +#include +#endif /* #ifdef CONFIG_ECORE_SRIOV */ + #include /* diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.h b/sys/dev/qlnx/qlnxe/qlnx_os.h index f7111f5e3f4b..34678d808b5d 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.h +++ b/sys/dev/qlnx/qlnxe/qlnx_os.h @@ -90,12 +90,6 @@ #include #include -#ifdef CONFIG_ECORE_SRIOV -#include -#include -#include -#endif /* #ifdef CONFIG_ECORE_SRIOV */ - static __inline int qlnx_ms_to_hz(int ms) { int qlnx_hz; From nobody Sat Jul 1 17:10: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 4Qtdwl4DP0z4l3Mp; Sat, 1 Jul 2023 17:10: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 4Qtdwl2YmMz3hfT; Sat, 1 Jul 2023 17:10:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdQsYrNAeQj8104TYf12bTYM9hI1OxGbFrKa4a2DNCA=; b=WX7LCRejKqhWxc87bHIeeGZFL2PyOr4sBmXFMlq7z/gRcWTbHUpVhdg4tNXdGLAz8nBUFx IGqgua+qZMPvLcPGqncHqL+ifMVarxtVxH0yFNhnrhJwArt3mfa5pyL5EcAVI8X2Fyqp3G HePTfX7n6kHVfrk/1/xSxLUit2oIkW8ToqI9KYYRRv+FEpaBxx1tYWuI19qmDHrRfiIiCy Uen6EZT46rbgbI39MpKqNORajIsD854n1VgkXnYLnrxprWNmA9nBgKUlr6+UIZNnyqMHTl FmJB4WLux5VbAAIlPiLLbxH5eK3OBhWQBWUtxv6APShYQh3OPsVC1pwcpY182Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qdQsYrNAeQj8104TYf12bTYM9hI1OxGbFrKa4a2DNCA=; b=AfYUYop0XudOLxqRr8qPxIRkBEdL4q7RybNapbg1oTPgQrpzPSm9zL3T7rt1MbsHMxJa7V Uz7YtpjlhSZ9XUs6f/97BSo4pkpkCS4PFbwx6jLimMQD5AYHl1BsXzrLixEzQGkrkFxBC3 fNX1JLeNVeQUZvxyRio64NruWQkz/EA8nopE/l0o0xv9mXJEojysf6xPMQJtP/rZ1STCjc mf/M4nlB0h9zs2IeQQ53ustEtSAgJa0peLfDVlKB1Bux2DQnaRXKvDlRbAoAFR0hgYOaFd QFfnwWZsUQbLAYl9ohFu1keWT1rbJBUA4Uyz5L6qEMosVaEZFgUDEE3l3OzCQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231415; a=rsa-sha256; cv=none; b=ufOAppnQvfo0uAfMnnn2iCbwx6rZ1GMLWJOMwhjUvq+uPBpCXxLjGmetccuYUezaMf6rc6 FYsAzWIOF2KlVuWgYWsWv8Se3cqEF+iApLgcjepAjD+hKOjvzafQn3qxvx5IOxNi1U3bvi fTwdX5+zmpQvAVgU/3+glBLflGwmCpLVsJT6eaZv5+oBKJPHmtdAIjMivqdDRGmqYFwL5m GsyJl/5q+gxFTzt/qEWJ3EDHYucJ+bzqaIUF+WpvZA/tlwtNTRguiclmpvvTucMBEmDDCX rILquxPWi4OHhSClz6sP05YUnbqHI5RYw2TlVa4IRxl7qECBo+GpK5+skoRPXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtdwl1d54zZ3t; Sat, 1 Jul 2023 17:10: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 361HAFnn045592; Sat, 1 Jul 2023 17:10:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HAFtp045585; Sat, 1 Jul 2023 17:10:15 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:10:15 GMT Message-Id: <202307011710.361HAFtp045585@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: c1be7151d543 - main - qlnxe: Fix too many args in call to internal_ram_wr() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c1be7151d5433718821a2b61245eaf99157daa9a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c1be7151d5433718821a2b61245eaf99157daa9a commit c1be7151d5433718821a2b61245eaf99157daa9a Author: Mark O'Donovan AuthorDate: 2023-07-01 17:06:50 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:06:56 +0000 qlnxe: Fix too many args in call to internal_ram_wr() internal_ram_wr() only takes 3 args when ECORE_CONFIG_DIRECT_HWFN is defined Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/779 --- sys/dev/qlnx/qlnxe/qlnx_os.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 0b5dba75300b..3c788f5c0fb7 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -6602,8 +6602,13 @@ qlnx_update_rx_prod(struct ecore_hwfn *p_hwfn, struct qlnx_rx_queue *rxq) */ wmb(); - internal_ram_wr(p_hwfn, rxq->hw_rxq_prod_addr, +#ifdef ECORE_CONFIG_DIRECT_HWFN + internal_ram_wr(p_hwfn, rxq->hw_rxq_prod_addr, sizeof(rx_prods), &rx_prods.data32); +#else + internal_ram_wr(rxq->hw_rxq_prod_addr, + sizeof(rx_prods), &rx_prods.data32); +#endif /* mmiowb is needed to synchronize doorbell writes from more than one * processor. It guarantees that the write arrives to the device before From nobody Sat Jul 1 17: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 4Qtdwm4lnGz4l3Mq; Sat, 1 Jul 2023 17:10: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 4Qtdwm3BLfz3hjD; Sat, 1 Jul 2023 17:10:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C9NPNvhJIXk94dGYxE9cQF6BHsfTXVt8+TgJ1eyNXOQ=; b=Jb0Yt956eMvSIFYHVW4XW9hFUMpHigP70qE8iUh1HfUrvfmLPuQQ0j4S1yOdfwtp0huG/5 sSs+Vj7853fi54aqUDXLUZMn866jVkVMNSwMPy3yBw1Wsw++nikPZXcFhOkWswO/9eDL3p xNdeOPap7JKTdSa0YNc9v4nzH00GB98qb8kYoNYWZgen2J5v1gT7W4KVYDKLqPiQnZqRAj fJWy5LA7sO3sNX+c9kQEKAcMPB39xaY2kQeEwd3pe6xNhngTZ7lcxKvbahVfknmtDSQLMg lJgCdz/AwswYkReLo+mpylfzrlNUcoWiYL761n5DDc8e8NFZqNE1f7O0i9Gthw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C9NPNvhJIXk94dGYxE9cQF6BHsfTXVt8+TgJ1eyNXOQ=; b=OPcVaI7YzbERbfH0LN9qr+lZ045RgOE3VDwXDednMpquOlZHWbV2PyXY+nlVWlqMceskp0 hSidActXBOWt84cZ8V7Bh6ElsX1MHXr/n4JIT65C84u4GpZSug8RXopH1iFxb8sbm4iEH0 I2HTbIZ5cQ/WqAYuUX3Ht4sN5FGKxAovo4meFfM4YqTBqrTxP8Jjh2ZsU1wfdvvDr1d2dg CJO+/T3GqIIBUZ1+fBnIazPZqTWhPsIJHKieePYqom5lbEfnLIUXuTpGLGXWaX6qaUrlkb YG/o2CkLfIvzAjTxik/TGVcQvpsRu23OP0t4v/0VGAW4mFW5pWzvJdEc53cvfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231416; a=rsa-sha256; cv=none; b=orl5IPPkq+E+lRSaJcdGMvY7pi7B/rlEN7tzMNm8gNxho/Xdp+OZIgc50mZx1wPI+wioRv JpaSUBaZ5GWpsdOOxR6uSW0dbFKea8h59xFT8xvO/752a8ZNp0ZdiZtygx4PShl7SUuY3P pjmhtYm35fNrSxFcGOx4ovsRUM+0LpXPg7BxhomvDJ3YrmnqSDiGY7nqPcxT77Ba05Sbq7 RxQt04+xgQcJ6wg0M1pFYGuIMPVSv2e6fJa9zNaJfuP0HmvRCNuVDHKlR1L47gROL8vSV6 3xL0t+SsCeEeyldT7gS9luPXh5kvYPoaqZXx10FBpb05+C/XTCykeILJjgPJAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtdwm24TBzZ3v; Sat, 1 Jul 2023 17:10: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 361HAGpN046218; Sat, 1 Jul 2023 17: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 361HAGto046211; Sat, 1 Jul 2023 17:10:16 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:10:16 GMT Message-Id: <202307011710.361HAGto046211@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: b75c387a668e - main - qlnxe: Remove #ifdef ECORE_PACKAGE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b75c387a668e3c508d1cdc6e2aa7135aff1b7311 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b75c387a668e3c508d1cdc6e2aa7135aff1b7311 commit b75c387a668e3c508d1cdc6e2aa7135aff1b7311 Author: Mark O'Donovan AuthorDate: 2023-07-01 17:06:50 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:06:57 +0000 qlnxe: Remove #ifdef ECORE_PACKAGE I do not know why this is here but it blocks compilation. Removing it makes the builtin option the same as the module build Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/779 --- sys/dev/qlnx/qlnxe/bcm_osal.h | 3 --- sys/modules/qlnx/qlnxe/Makefile | 1 - 2 files changed, 4 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/bcm_osal.h b/sys/dev/qlnx/qlnxe/bcm_osal.h index 07b0fe47ea36..3f7bb5234942 100644 --- a/sys/dev/qlnx/qlnxe/bcm_osal.h +++ b/sys/dev/qlnx/qlnxe/bcm_osal.h @@ -93,7 +93,6 @@ extern int qlnx_pf_vf_msg(void *p_hwfn, uint16_t relative_vf_id); extern void qlnx_vf_flr_update(void *p_hwfn); #define nothing do {} while(0) -#ifdef ECORE_PACKAGE /* Memory Types */ #define u8 uint8_t @@ -542,6 +541,4 @@ OSAL_CRC8(u8 * cdu_crc8_table, u8 * data_to_crc, int data_to_crc_len, u8 init_va #define OSAL_VF_FLR_UPDATE(p_hwfn) qlnx_vf_flr_update(p_hwfn) #define OSAL_IOV_VF_VPORT_STOP(p_hwfn, vf) -#endif /* #ifdef ECORE_PACKAGE */ - #endif /* #ifdef __BCM_OSAL_ECORE_PACKAGE */ diff --git a/sys/modules/qlnx/qlnxe/Makefile b/sys/modules/qlnx/qlnxe/Makefile index c0971e443ffd..d682192d18fc 100644 --- a/sys/modules/qlnx/qlnxe/Makefile +++ b/sys/modules/qlnx/qlnxe/Makefile @@ -65,7 +65,6 @@ SRCS+= ${LINUXKPI_GENSRCS} .include #CFLAGS += -DQLNX_DEBUG -CFLAGS += -DECORE_PACKAGE CFLAGS += -DCONFIG_ECORE_L2 CFLAGS += -DECORE_CONFIG_DIRECT_HWFN From nobody Sat Jul 1 17:10: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 4Qtdwn4Q5kz4l3WW; Sat, 1 Jul 2023 17: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 4Qtdwn3ZXPz3hbB; Sat, 1 Jul 2023 17: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=1688231417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+Ww9Ml5OW33/NcPalqXBPXU3181SvA6dHYg4cSXZo0=; b=TqSvqcMqdDY+jIPs/+6jg6eHgROOhpNFvmts3SmwxBanhEadqOTc0CDdjnqT3RrgdVkA/d 9jrOh1qe9Gy5g85VuzFGzzsR4FefUrXcUXggTyXx/IEBg8K8q09rqdz7qyoPk4f1vRanyw Oe4wOEHZQUJMKLS3nefCsDwr216TgCIlHYXo0Z1GID50phT8MS93zDqcll5L243hMx/AvD rOGMunuq/88MtBR1n/JFPwTquObTIjB/xgdtQY5LWflIWtffHLO+62kiUgPmEr3HmgvKMr Zj4tVsOBeNaDss24qv4qGqXbNKuNM6IVVkWlHR+LJLoJAFQIHNlEze9Fvhr8uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+Ww9Ml5OW33/NcPalqXBPXU3181SvA6dHYg4cSXZo0=; b=durCcheqlZCQ5EZWSdbmABLrUyqLnuDewxYfQF+aqRl+oCDomufUL5ECA/HQkMQmaca9bf BHUKRzW9IlFClNNbBNSq3J1VvfE+5SiHUbwCH85wRLmtITPvpiJBbOFV+QdsacQoVLgEP2 IX/wtThZyJe2fC4I6nQzivZjkM9PaeqP/LAUR1Em/KG7TJ/cDMQnaGDLfQtc4PN8Q0Tdoq R+K7EzdLC8435DPNq0RmGlFOCoetapZ43MXe5kdBAGoyygXuu/RN0PImFcZj59/pCP8d4Q t6HzUARgcmDsnaqTpGbiMGxHhLIkMYD/OBB/4N1kWmbD0IE9EmNMTZ1hmCjnGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231417; a=rsa-sha256; cv=none; b=fzA1i/ruS+B6xqkn89quEGbW/0JMUuNROSe6ESOcaLnBCNOODY+wSdlFKA2CLjhS4tTFqc chnbItq9y2GPIUuvIN8hs/ZleR+H1R9OKAksh8Ubx+Bdb8M8+Zj6Na5X55z3RPKFpJPJca HPjH3CtRC48ez7Dh/9biEkIY8ObWUiujNMwSpspUZ4/4P+pCOAB/Zcub2EfyjRKSvzK8yM o0s2C6DrilwwamfPhqH0D2zJI2ynG3gKL53cddWQfOeCp0ZMjPnunfa0BLZ5uBToByoocC TghH7wD2J5gh72UuVOeQtHZ/znn+UPgVIolGIXlAg+7wOyx7YltWJTRZnvfR6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtdwn2RlzzZ2Q; Sat, 1 Jul 2023 17: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 361HAHj6046815; Sat, 1 Jul 2023 17:10:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HAHs7046809; Sat, 1 Jul 2023 17:10:17 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:10:17 GMT Message-Id: <202307011710.361HAHs7046809@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: dc58675cfb18 - main - qlnxe: Fix unused but set variable warning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: dc58675cfb18b1fcde4cdad95eae546c0d5f35cb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dc58675cfb18b1fcde4cdad95eae546c0d5f35cb commit dc58675cfb18b1fcde4cdad95eae546c0d5f35cb Author: Mark O'Donovan AuthorDate: 2023-07-01 17:06:51 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:06:58 +0000 qlnxe: Fix unused but set variable warning Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/779 --- sys/dev/qlnx/qlnxe/bcm_osal.h | 4 ++-- sys/modules/qlnx/qlnxe/Makefile | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/bcm_osal.h b/sys/dev/qlnx/qlnxe/bcm_osal.h index 3f7bb5234942..1cf4b8d06ff1 100644 --- a/sys/dev/qlnx/qlnxe/bcm_osal.h +++ b/sys/dev/qlnx/qlnxe/bcm_osal.h @@ -480,8 +480,8 @@ qlnx_test_and_change_bit(long bit, volatile unsigned long *var) #define OSAL_TEST_AND_FLIP_BIT qlnx_test_and_change_bit #define OSAL_TEST_AND_CLEAR_BIT test_and_clear_bit #define OSAL_MEMCMP memcmp -#define OSAL_SPIN_LOCK_IRQSAVE(x,y) {y=0; mtx_lock(x);} -#define OSAL_SPIN_UNLOCK_IRQSAVE(x,y) {y= 0; mtx_unlock(x);} +#define OSAL_SPIN_LOCK_IRQSAVE(x, y) { (void)y; mtx_lock(x); } +#define OSAL_SPIN_UNLOCK_IRQSAVE(x, y) { (void)y; mtx_unlock(x); } static inline u32 OSAL_CRC32(u32 crc, u8 *ptr, u32 length) diff --git a/sys/modules/qlnx/qlnxe/Makefile b/sys/modules/qlnx/qlnxe/Makefile index d682192d18fc..42dbfc14bdf5 100644 --- a/sys/modules/qlnx/qlnxe/Makefile +++ b/sys/modules/qlnx/qlnxe/Makefile @@ -89,4 +89,3 @@ CFLAGS += -DCONFIG_ECORE_IWARP CFLAGS += -DCONFIG_ECORE_RDMA CFLAGS += -DQLNX_ENABLE_IWARP -CWARNFLAGS.ecore_ll2.c+= ${NO_WUNUSED_BUT_SET_VARIABLE} From nobody Sat Jul 1 17: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 4Qtdwp6Q9Gz4l3bv; Sat, 1 Jul 2023 17: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 4Qtdwp4zNyz3hlp; Sat, 1 Jul 2023 17: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=1688231418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wKjECQCU33rDLbalafsdHyhLAZxO+bwTS++vk/c01k4=; b=wotBEX9CFiutk3a2KVJ+oLmn73fy+V4ouoVLzg0aflGvT743GXidUy9Xai/dJkAy7CE4rW WVlSiOzgMmM7tE8TdXRUrxKnYDIr9/NWrUQP6zm4oczc9WAzCgb7I+5/TIEUp6Tt/0Ro+x hDIRaRBnpcI22ynkiq9sIgQ6B60JMZ7cs53M7sl73yGkoyn72CPRAwqsP1FssbqI5Kwagt d+n9aeaFwK0Gbzww9X5CNsYaEdVIoRh7ZZefugfhCqAb2H/s4KspTAlH1QvyEWXFuE9s0I ZvvTuXK1eDfdnu00YNOc5gPQQthui9ZyAOF/p8o+/v2VPDq8Tx31SfHeF0w0RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wKjECQCU33rDLbalafsdHyhLAZxO+bwTS++vk/c01k4=; b=b90ifVtKAF63Ar+GIEaeVz67R8ytHDVEmUuLox46ZuXA1fLEhBKuH/1ypC6+wQLaFX92Y7 FsDst9+LGRrHwrdKyOnlvwmNv91N4oWdkSGEDa7emahetruXOFXjdGt2BSbQLKGBd2dTGO 1ir43Gb5bpjVuS+0BT62WZKQziM3ltwtZn4OtIzU9lHAjqz+Sl0jM+LmaLpejStg0Bukzt 4fj5PJzoCuPpdFAvLMk4MIG3cB6PNyomdh5vXgKf5C5J+Z57q3xnAtN9Lb4d+4sNgvbV9X WBXGga3Vz8nNWc+kLda3ZAGQfwcEAb+sxrYn6JmH8mK/VAsAhd3A9vuBSRyCow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231418; a=rsa-sha256; cv=none; b=nQ5SKh6WbMMQuSAskkACZG1KL4Vl8RAKcCyQUUalW8aIXrP4M3FBLLzw0VTzXUsoXW2GSg cyw5I4KWhU+fKVJoDQP8I0sgg+n6YAkIumtESec7YtSzfg5nktZfsrOQPJh8OHxNF2XY6n y3Zz3PVCTuq6Kk0AGgV4K8jopkTvkQmQAf0+yOs1KESShWyAx2qoxJJuzNSuwhaXdQ9jWF uF1KbrgRcadsjC1ZE/xHmb+zsOHzI3/yoBd7OlkLoNI64g27WVpeJp4Z/S9VEAgS4swuOz lQ42TQ9sqAMNBQVMWfb2km7Puas4eQ3FERHPOL5x6dXCfT/bWnOpotNponlGtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtdwp37kqzYbF; Sat, 1 Jul 2023 17: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 361HAIwH047184; Sat, 1 Jul 2023 17: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 361HAIak047183; Sat, 1 Jul 2023 17:10:18 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:10:18 GMT Message-Id: <202307011710.361HAIak047183@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: e4017d9b6913 - main - qlnxe: Fix building as in-kernel component List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e4017d9b6913257b1ca6735ab1159f805419d2ec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e4017d9b6913257b1ca6735ab1159f805419d2ec commit e4017d9b6913257b1ca6735ab1159f805419d2ec Author: Mark O'Donovan AuthorDate: 2023-07-01 17:06:51 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:06:59 +0000 qlnxe: Fix building as in-kernel component Add some extra files for building the driver as part of the kernel. Change some #defines to match those used when building as a module. PR: 268354 Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/779 --- sys/conf/files.amd64 | 16 ++++++++++++++++ sys/dev/qlnx/qlnxe/ecore.h | 5 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index dd80c357a502..37e069da5918 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -297,6 +297,22 @@ dev/qlnx/qlnxe/ecore_sp_commands.c optional qlnxe pci \ compile-with "${LINUXKPI_C}" dev/qlnx/qlnxe/ecore_spq.c optional qlnxe pci \ compile-with "${LINUXKPI_C}" +dev/qlnx/qlnxe/ecore_sriov.c optional qlnxe pci \ + compile-with "${LINUXKPI_C}" +dev/qlnx/qlnxe/ecore_vf.c optional qlnxe pci \ + compile-with "${LINUXKPI_C}" +dev/qlnx/qlnxe/ecore_ll2.c optional qlnxe pci \ + compile-with "${LINUXKPI_C}" +dev/qlnx/qlnxe/ecore_iwarp.c optional qlnxe pci \ + compile-with "${LINUXKPI_C}" +dev/qlnx/qlnxe/ecore_rdma.c optional qlnxe pci \ + compile-with "${LINUXKPI_C}" +dev/qlnx/qlnxe/ecore_roce.c optional qlnxe pci \ + compile-with "${LINUXKPI_C}" +dev/qlnx/qlnxe/ecore_ooo.c optional qlnxe pci \ + compile-with "${LINUXKPI_C}" +dev/qlnx/qlnxe/qlnx_rdma.c optional qlnxe pci \ + compile-with "${LINUXKPI_C}" dev/qlnx/qlnxe/qlnx_ioctl.c optional qlnxe pci \ compile-with "${LINUXKPI_C}" dev/qlnx/qlnxe/qlnx_os.c optional qlnxe pci \ diff --git a/sys/dev/qlnx/qlnxe/ecore.h b/sys/dev/qlnx/qlnxe/ecore.h index b83e777dac8e..3169e9cda6df 100644 --- a/sys/dev/qlnx/qlnxe/ecore.h +++ b/sys/dev/qlnx/qlnxe/ecore.h @@ -94,9 +94,10 @@ enum ecore_nvm_cmd { #define CONFIG_ECORE_SRIOV #define CONFIG_ECORE_ROCE #define CONFIG_ECORE_IWARP -#define CONFIG_ECORE_FCOE -#define CONFIG_ECORE_ISCSI #define CONFIG_ECORE_LL2 +#define CONFIG_ECORE_RDMA +#define ECORE_CONFIG_DIRECT_HWFN +#define QLNX_ENABLE_IWARP #endif #endif From nobody Sat Jul 1 17: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 4Qtdwr4gJFz4l3dk; Sat, 1 Jul 2023 17: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 4Qtdwq6Wy1z3hgl; Sat, 1 Jul 2023 17: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=1688231419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a2cqUdZ6dhQ7i9XC7L+p/o2WvnENGfLyZx1zne8d0dk=; b=uknjocmZPxuLjWah3/xJtvgZO1KZ4IHVBZyIYQHZRFeCIAdRlgzjhMnLmtcSr3CDsupHyz g8S8DzUiK/KaOMW7GmpS/RWbzZqaHIuqwJpsSanyIYsoWKgW9o51Mnn8NFZr46Oz5nkaUR 72LfxaGng93pKFaMCdl1M4drdUaHQCbkE7xef12S/V+L4c8tV6jtmgnKbyIWcJzU229CvY xILp2eRe2OheWY0kVW09+1fs/mTsi54kFDQ2BMazXvS7WvxuzGFpSGmlAonlvKIYA2mHOX z7yJ5QeEEtv1lOg4UqpZt0FgE7BeceyiIWQv27AKTY9zt/lGd6hYstE2MED+jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a2cqUdZ6dhQ7i9XC7L+p/o2WvnENGfLyZx1zne8d0dk=; b=bVtyOfpcTLdUNsmPHEFRv6QssPKhQcAcGbvQWcmr4MNmEWHOs0uYc3DzuPtk/UPf3ZiQgF b9QUhLZnjxBUBD1L640TRveZ9K7CiXwhzJMUHE+QnTfY7+CLQvo3nRvrFcVYriiMtwv0D8 +oB6f2B0k30Ng0TCwMety+giuC8QooNM7eBEdalFUC4kmnX8gmwNbZ9KsjYDcU+KK/oZFf 1PaHi9Rw2uEFYXwzLIJXi/jIUt47Jk1CZ6c5eRnUUZ93vnLFVBmTL/b/Qd4jsa9GEFjs9Y XDjTpp12OVkPTYZ0CxFRzs7nFZKbPkZ47wiLb2psi+leJDLb8APTnbGo21+12g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231419; a=rsa-sha256; cv=none; b=wJZIpkOX3OVNPWbkCX0yrGrFQ0UuyjkNODMLladg9zZtWwZcaLWi09Nf94YLabhhc02FJV BPJ8gB3TTJddHz3cPw18OHyhiHYJ8LVPzocJo1YwOH3vv4k/bctqjwXMJQXb39GbH/C02C L4VFyUTvqYmtylj0haaYMmM+s64ei5ROX/H58XUlIcOUmB9aqiRwU7FmvFnZovvM1hUdoh PthpjqNVoNbef0aWdm/72fu37ZmVMvvs2+tskDsIZbODY3R20DTCf1E7NT4jzOX6sR3JYi kALkBXW0LlVZmoKKceugYS7vzNxZkXYo/CLWrpwmPDVg/ZsprAwC1qruUnmNFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtdwq42LvzZ2R; Sat, 1 Jul 2023 17: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 361HAJUp047203; Sat, 1 Jul 2023 17: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 361HAJnO047202; Sat, 1 Jul 2023 17:10:19 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:10:19 GMT Message-Id: <202307011710.361HAJnO047202@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: b0d3d44dfe63 - main - qlnxe: add driver to amd64 NOTES List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b0d3d44dfe63fe9b0d0b38f6b30be588eed21781 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b0d3d44dfe63fe9b0d0b38f6b30be588eed21781 commit b0d3d44dfe63fe9b0d0b38f6b30be588eed21781 Author: Mark O'Donovan AuthorDate: 2023-07-01 17:06:51 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:06:59 +0000 qlnxe: add driver to amd64 NOTES Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/779 --- sys/amd64/conf/NOTES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index 3ae61c8ac922..9744bbc38dbf 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -301,6 +301,7 @@ device cpufreq # qlxgb: QLogic 3200 and 8200 series 10 Gigabit Ethernet & CNA Adapter # qlxgbe: QLogic 8300 series 10 Gigabit Ethernet & CNA Adapter # qlxge: QLogic 8100 series 10 Gigabit Ethernet & CNA Adapter +# qlnxe: Cavium QLogic 41000/45000 series 10/25/40/100 Gigabit Ethernet & CNA Adapter # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters # vmx: VMware VMXNET3 Ethernet (BSD open source) # wpi: Intel 3945ABG Wireless LAN controller @@ -325,6 +326,7 @@ device nfe # nVidia nForce MCP on-board Ethernet device qlxgb # QLogic 3200/8200 Ethernet device qlxgbe # QLogic 8300 Ethernet device qlxge # QLogic 8100 Ethernet +device qlnxe # QLogic 41000/45000 Ethernet device sfxge # Solarflare SFC9000 10Gb Ethernet device vmx # VMware VMXNET3 Ethernet device wpi # Intel 3945ABG wireless NICs. From nobody Sat Jul 1 17: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 4Qtdws1810z4l3dm; Sat, 1 Jul 2023 17: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 4Qtdwr6mZXz3hv4; Sat, 1 Jul 2023 17: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=1688231421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6cP+aBHmqGBfmsd8dHYBIhvEuPFAj9Dp3Vfywu4cwE=; b=E7ruINytuhDIirIHPrUAA6gFxLth7S6CtdI+KT74+Zc4Nnm+n10gTawRqTSCFSFXpvYHVf xWaSB93lXoXY2fSy2dbjIo4V0CKh6CdO5Vv3huTMREccsOvu+b0TViDWXFp4XXBYhNx179 sxbeS2sz28KH0KAPkJByDKv+NmrIO0IfY+gWMIoNBMaCIKM6iVxLG12YgDVtswT5L6N8v4 X/m15gTlubtiBgrj/jTjm+XvzRg/uiL/bPjBmVJ5TuEsObdo0CIjuKyTa8oH2K7oCFA4DH C50LFzGMlAYscIj8yQ7anJfbZQ9WbWEeQQfCGlQF+5yoFCFxFRwzTOAVfUTJdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m6cP+aBHmqGBfmsd8dHYBIhvEuPFAj9Dp3Vfywu4cwE=; b=ikf9yufbTMDMKRZMojVhXDDsY8bzyMDAKDIZqbbMd9eJ+W+1krcU/q08qIhwN0JUb57ZE3 5/3MlQnKaPJ8+SaOVBRq+JV+fFyo2T//1paG08eJLUzKSGphosbd8x5362ZRuRyzQqEaCS uF3GrJYTev1Ck7IfvmAfsD3C42NEzHddf1ETdTsPahL/jatTn5FCDxX/SxrERnmEy7OdnK ELnL/X7PvlJVN1irAzcihDWt4Qn/HFDiSSrtcoopSOxiWaqBnv1EqX6E7kiMCwGhBySenI +iUerwX28GLYTnCfrRpKd0hpqZIrVsoVMGT5F7ZRicOaEf2iuXlFw2zP7F+t3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231421; a=rsa-sha256; cv=none; b=mcQ9OtwxjJ1tzJg2LdYfVUWKc0Bwy/gGL6H6mr5EFqXVgPuLCfdiJQT7UO3iJzk8xS3xVy NZwxw3+3rAiRhMfMV0AqjUNghcWEQsl3z/0LrMwJXdCtZSo0281VfToEw+Sk+guQg6yQwZ Y5DO/9mqqTJUZ4pd2QVDOnaCnoqPP5mBPNAJfg5jED1lSzCqkJg/lKWDQ8uYtLlmEwT4TH jKWiUFPpPupCIqVnsjvA6wUgDr+Kul/Qr5+KYgrt/7BxJdAJVOo58E9jDTgOpCU9Mbi2op iu4vtsNoVcqSyrP3L0M1scCdhA/pwJJkPTa2vu3T0Zpkwkn0Rivof0FVG8AFfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtdwr4qmdzZ3w; Sat, 1 Jul 2023 17: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 361HAK9w047222; Sat, 1 Jul 2023 17: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 361HAKDZ047221; Sat, 1 Jul 2023 17:10:20 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:10:20 GMT Message-Id: <202307011710.361HAKDZ047221@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: 6f9388d50588 - main - qlnxe: remove unused variable from ecore_ll2.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f9388d50588e99dc6abb29aade52dc8e6d44d98 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6f9388d50588e99dc6abb29aade52dc8e6d44d98 commit 6f9388d50588e99dc6abb29aade52dc8e6d44d98 Author: Mark O'Donovan AuthorDate: 2023-07-01 17:06:51 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:07:00 +0000 qlnxe: remove unused variable from ecore_ll2.c Signed-off-by: Mark O'Donovan Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/779 --- sys/dev/qlnx/qlnxe/ecore_ll2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/ecore_ll2.c b/sys/dev/qlnx/qlnxe/ecore_ll2.c index fdc630af1116..89360a6552ab 100644 --- a/sys/dev/qlnx/qlnxe/ecore_ll2.c +++ b/sys/dev/qlnx/qlnxe/ecore_ll2.c @@ -542,7 +542,7 @@ ecore_ll2_lb_rxq_handler(struct ecore_hwfn *p_hwfn, struct ecore_ll2_rx_queue *p_rx = &p_ll2_conn->rx_queue; u16 packet_length = 0, parse_flags = 0, vlan = 0; struct ecore_ll2_rx_packet *p_pkt = OSAL_NULL; - u32 num_ooo_add_to_peninsula = 0, cid; + u32 cid; union core_rx_cqe_union *cqe = OSAL_NULL; u16 cq_new_idx = 0, cq_old_idx = 0; struct ecore_ooo_buffer *p_buffer; @@ -669,7 +669,6 @@ ecore_ll2_lb_rxq_handler(struct ecore_hwfn *p_hwfn, iscsi_ooo->ooo_isle); break; case TCP_EVENT_ADD_PEN: - num_ooo_add_to_peninsula++; ecore_ooo_put_ready_buffer(p_hwfn->p_ooo_info, p_buffer, true); break; From nobody Sat Jul 1 17:14: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 4Qtf2D0Wk6z4l5lx; Sat, 1 Jul 2023 17:15: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 4Qtf2D03rrz3mXJ; Sat, 1 Jul 2023 17:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en/IkIhQ7N7nLxqOuhfrXesLGnyHet0g8PR1sFXUozM=; b=rg1y8MZM2K0Dohn4cUdIDLxZlTUAWeqB7cg2UWr9W22CJbTIGG/fdLiU45SkQmWVFTxgpL TkAwDNm2P48bvtSAO8BIUQzVNMs4l4d1p1drtV10V0aCxWgKF6IdIuqO4z93kEupucz1Nu 1NDwP3XOke8d/SGXIhCJRpfKKr5EaeXkmiZnNOOttujRUVS9Y8Bp9XGZwOPBepq8weyFR8 aqe12x9XFl4tpIHm7ZCt+D5W7L0IH1jazkbtJJasCl3YRKwlFUwmyjzZ/uYXHhQIRNU21b 9Nd9Sycrgz9V09B7MlP6nZePPnJTBOHIpJZuoNdAK9HBXzXEkEbjLGqKco020g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en/IkIhQ7N7nLxqOuhfrXesLGnyHet0g8PR1sFXUozM=; b=WQMP1eTv4epSubd7UVaY/dzPZ0iWEk4ZZNGbFPSJtvgesnI3myUHVUblKWuxeSz+mrLRzq KhHecjQ+VskHsNGlRHlEP75N/hXqWoghryElzY0PTo9CiQWtJijA2osr9zAdte0N5ewB9l OosDtKtIJIb5RI3lRfWsCiEhkq77Y+lNr8N5VdZDMr6z34ZnUtRkWx3B0Ff3/VCpdTwygY OsCFAQ917yVbGNoxAjLoFdk/ICmsImtzt7etnFMABOAe/cxg9XmQfHM3k3WDnSYbhObgrN DRRSC+BHud09IyiiXXhRXw0ZRtx+xSv2qbeQjtMARrhzc0dhUCMYgWQg70R+Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231700; a=rsa-sha256; cv=none; b=EvsolZA/zzwVJ8nJ0nFkXYXoCNY/PruS28Ot7s4gUsFP41+b6TCltgamNz/Keuzwo1wzQY s5UfuVjVUy7Gy8jEgr2nDH1HB5cmV7FB54MpmymgDszW1DMJww0Dk7SIQZpUJJ1Tnz3ilS t+63Fx4hcDzQcAgTd1P7RcVwWuygXUVTd/H93CmqBv7cR4GI6utqhYGa6+DKgMfgTw7d7h YOvobyTkjZ26Rv1cGvrScCZZitj7gpDp6kktOgpbry9HawB9iZaLCtEdmVO1UQ2xBjds4+ gnsDQ7128ObqEcBD1osRdxzzyeUO/lT5DAaK1Atrxb7TzoSSHlNs3NPIHYXHhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf2C62R4zZ3J; Sat, 1 Jul 2023 17:14: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 361HExA1054369; Sat, 1 Jul 2023 17:14:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HExJt054368; Sat, 1 Jul 2023 17:14:59 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:14:59 GMT Message-Id: <202307011714.361HExJt054368@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: d3eb9d3db3aa - main - bios: Don't keep sending BIO_FLUSH after first ENOTSUPP. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d3eb9d3db3aa36df13f96c48bff8acdf626464c5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d3eb9d3db3aa36df13f96c48bff8acdf626464c5 commit d3eb9d3db3aa36df13f96c48bff8acdf626464c5 Author: santhoshkumar-mani AuthorDate: 2023-07-01 17:11:57 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:14:49 +0000 bios: Don't keep sending BIO_FLUSH after first ENOTSUPP. When a storage device reports that it does not support cache flush, the GEOM disk layer by default returns ENOTSUPP in response to a BIO_FLUSH command. On AWS, local volumes do not advertise themselves as having write-cache enabled. When they are selected for L3 on all HDD nodes, the L3 subsystem may inadvertently kick these L3 devices if a BIO_FLUSH command fails with an ENOTSUPP return code. The fix is to make GEOM disk return success (0) when this condition occurs and add a sysctl to make this error handling config-driven Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/710 --- sys/geom/geom_disk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index 90fe0216dd8b..a000dfe6c4f2 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -71,6 +71,7 @@ struct g_disk_softc { char led[64]; uint32_t state; struct mtx done_mtx; + bool flush_notsup_succeed; }; static g_access_t g_disk_access; @@ -539,7 +540,7 @@ g_disk_start(struct bio *bp) g_trace(G_T_BIO, "g_disk_flushcache(%s)", bp->bio_to->name); if (!(dp->d_flags & DISKFLAG_CANFLUSHCACHE)) { - error = EOPNOTSUPP; + error = (sc->flush_notsup_succeed) ? 0 : EOPNOTSUPP; break; } /*FALLTHROUGH*/ @@ -760,6 +761,10 @@ g_disk_create(void *arg, int flag) SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "flags", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, dp, 0, g_disk_sysctl_flags, "A", "Report disk flags"); + SYSCTL_ADD_BOOL(&sc->sysctl_ctx, + SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "flush_notsup_succeed", + CTLFLAG_RWTUN, &sc->flush_notsup_succeed, sizeof(sc->flush_notsup_succeed), + "Do not return EOPNOTSUPP if there is no cache to flush"); } pp->private = sc; dp->d_geom = gp; From nobody Sat Jul 1 17:17: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 4Qtf5J4SBKz4l71N; Sat, 1 Jul 2023 17:17: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 4Qtf5J3Y51z3nN7; Sat, 1 Jul 2023 17:17:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGiDF3gO6pMImG/rW0WBf8xx3g3tMx1Tlj5eigOdgtA=; b=m4jRBvJCOcClUHPw7lGeWL4QTPhhSUyCnOWy8/MiRULOuTa/7lb1x5bJr8TuEB8W6OYFOd OBi9ivN6uongfl8uP1M4+ZsH2RAU6iolu2Lz54OqYiQtVDFwM/43H88Pnt0TZgRIopFMUC v2zC6xTi+9Ebp/P0SgJDcRZIaFChMMXcUS0i9KuBaMeIku8LxM2U66ImUJ7aRiOMYJhthV ftilq7DPgz2AhQGpTLfkZks/2FzeiVjlQL7O4vJgl0acLfyulCKlcxGNhVzN/CJhLrcdOB YDcu9Ik6QoqWeVbROSHVH8Xir7Q7Nb2Lye2qEjzFSJUrmBWDzNYToHAdP2EiaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688231860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QGiDF3gO6pMImG/rW0WBf8xx3g3tMx1Tlj5eigOdgtA=; b=nFCUces0O5FcnybM3jLSSP3VTBXn1Hm5A7xkautLv7/mTjYzoi34p6GsI9vzei9cIZWTCI Mll2e8a+eRW8A86NtsP6EzBPCpZ139h+otEcFpcYwsM3F44Y8AM7j7BiBp1Mtql0Dvif3G 9y0Gs5Hubl9tgLUz8WSaUGWv67wUg458yeDbtTNvAQVZ6UwhGioUr3nc7T3E6rZCrnUsxR RiMxfrqlztpjIIMgOcvANWmgKxnfpKl4hmj0ExmcEKPjdJu0sgJvpCI1nHcdjyFK0w9Ckq H0+GO8bco9vpheyFbeaN957uMB8JfDNkRNptJIvfN7IDzIdlBmBCdK/5AVpHrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688231860; a=rsa-sha256; cv=none; b=ax+zX7uFj9vVCxdDTbD/OGjttmVIeWoQcSOc2MduQPfjRGRhLe+tvlHLK1Z9RfgZqUAMJR lWGy3ag8QzM+h91UjdV4ViVUuIfAUDeqW0TX32piR7DyMRGfsBvmtUtC82An6xGPLRJGh8 BbOzgDh9aZWeayPEcOs5Lfxv9g9ufvHEIqlA9KHm/kvu5MovRUId3O/BNVrE+j/rQrXtDb mK9W+aWHwSxA14wArZWb0/vf8gHp4ffg9iATsgi6McodYk61F3D7hVlCbPuZYOf+DN+m8s IMwpEqcsXRaPKCMevN29MB7eFAB1TgLHqV7USJZEeOfsy4WL7rILb2J8iY7RxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf5J2cYnzZ4Z; Sat, 1 Jul 2023 17:17: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 361HHefN054742; Sat, 1 Jul 2023 17:17:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HHeAD054741; Sat, 1 Jul 2023 17:17:40 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:17:40 GMT Message-Id: <202307011717.361HHeAD054741@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: 3bf9e84f0875 - main - Stand: Silence undefined symbols check command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3bf9e84f0875a40e2bcffd87e65861de0424e154 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3bf9e84f0875a40e2bcffd87e65861de0424e154 commit 3bf9e84f0875a40e2bcffd87e65861de0424e154 Author: VexedUXR AuthorDate: 2023-07-01 17:16:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:16:58 +0000 Stand: Silence undefined symbols check command No need to print this... Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/786 --- stand/efi/boot1/Makefile | 2 +- stand/efi/loader/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index 9ae86b36989e..04c573137e92 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -93,7 +93,7 @@ DPADD+= ${LDSCRIPT} CLEANFILES+= ${BOOT1}.efi ${BOOT1}.efi: ${PROG} - if ${NM} ${.ALLSRC} | grep ' U '; then \ + @if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ exit 1; \ fi diff --git a/stand/efi/loader/Makefile b/stand/efi/loader/Makefile index 2de55a29813f..cf0800c5b28d 100644 --- a/stand/efi/loader/Makefile +++ b/stand/efi/loader/Makefile @@ -110,7 +110,7 @@ LDFLAGS+= -Wl,--no-dynamic-linker CLEANFILES+= ${LOADER}.efi ${LOADER}.efi: ${PROG} - if ${NM} ${.ALLSRC} | grep ' U '; then \ + @if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ exit 1; \ fi From nobody Sat Jul 1 17:20: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 4Qtf8n0Lzkz4l8N3; Sat, 1 Jul 2023 17:20: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 4Qtf8m6dzrz3ntg; Sat, 1 Jul 2023 17:20:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dr+FdpJPOG3eZr0ExLfpU9EqioM71ftfZAg6PaSB9Fg=; b=K3twj/1gqRm5m+T4Ya3z1Id5itw+TW7kIMzBiXZUXRH+Bp/lDA95CisRM7ZDgehqK/gkaZ hQcAIUfyl3SLcvn9M6q/Nvi8D5R/+sG2gr6gQxWssRx3BxijNsl0g9+JEaH0MsiR0r/+Te wRbFl8MILZGpyPSj69OVXqR9KWDRHLVgYE4nFjm8/teRR4p4+NlKJBUoN5ZQZLLHj1JQBY 5e02SIdW7E202fGWzkFcdPc27OFEc/KPiqHb+UDM0xeuUQDfZRn0weY/x+F4DnK3A0EQ+5 UJYf0AH5m8xS98Ustx4IbCN2lMMie1IvZYjBcdSSASqAjw6D9zT29qWDSD6QrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dr+FdpJPOG3eZr0ExLfpU9EqioM71ftfZAg6PaSB9Fg=; b=JJ2KYci/hCNds0GAIVu81ha4lI4lYv5P6oUf/euECijG1ITK+BQPU5xxA+gLTxkDzwjEep 40z+GHDSZlruQkUbYVFZt0gCNDbIrkBZyyo899FcyDbPIebxDQ8OEdACNqRZdOS7bhB7n5 PFE2tOFuVvXwCw6CM61BQM7rzAyC0ygBa+YhAyq59Vt/CaXLRTt8KIK5VnMcTlvA3sJeiA FQAnN21u698fENvXUd2/UfgBUTbE/aVGNhfjirLxYGpgkpddHMx/5O9pd/kPRE6qgCvqmY m08XeR7pBEu8AGSJlEq9z+IJvAJ/FDTkhKba+w2gz5bRZIdLDjrNNJdHYEuLCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232040; a=rsa-sha256; cv=none; b=Zj1+6e/i3uWoTfA4HR6bZR1g/hDNp+iCH8GJ5fIo+6aryDWrg7hmE5h6zWv7syw0hOm+DI 97GoM3KeGlwDc8WpsvzDsLEBMWCP03SIvyHS08NcRrs1vNP9s9odhVrrrFuYwu8pWP+/vb bOOHD7M+kwaZ/05W6MeX/zd2nEVnXCzv/C866ykXFs39gbpMNFJAWYV7uVJYWI/L7zRO39 WLPpzaLHlYygJ4sS8lC2wvav9k+BY7tIj8vSU8bj9klihCTZuP6+QhjyPj0lZAGK5kUAAu B3lbXerQ/BQ9i/RlAnjMHy0kXHvPiKZOna+AcGwDHwAfad0yzH07xQ1JYB3uig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8m5jRCzZ6Y; Sat, 1 Jul 2023 17:20: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 361HKeId066249; Sat, 1 Jul 2023 17:20:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKe8D066248; Sat, 1 Jul 2023 17:20:40 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:40 GMT Message-Id: <202307011720.361HKe8D066248@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: 32c3d315ed79 - main - superio(4): Document supported Nuvoton and Winbond chips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 32c3d315ed79f9e75b85f052b058777877d65c6c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=32c3d315ed79f9e75b85f052b058777877d65c6c commit 32c3d315ed79f9e75b85f052b058777877d65c6c Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:43 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:48 +0000 superio(4): Document supported Nuvoton and Winbond chips Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- share/man/man4/superio.4 | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/share/man/man4/superio.4 b/share/man/man4/superio.4 index 9f28f930d0d7..548b93b713f8 100644 --- a/share/man/man4/superio.4 +++ b/share/man/man4/superio.4 @@ -101,13 +101,39 @@ controllers and a bus driver for supported devices in those controllers. The .Nm driver supports a multitude of Super I/O controllers produced by Nuvoton, -formerly known as Winbond, and ITE. As well as some produced by Fintek, namely: +formerly known as Winbond, and ITE. Namely: .Bl -bullet -compact .It -F81803 +Fintek F81803 .It -F81865 +Fintek F81865 +.It +Nuvoton NCT5104D/NCT6102D/NCT6106D rev. A and B+ +.It +Nuvoton NCT6775 +.It +Nuvoton NCT6776 +.It +Nuvoton NCT6779 +.It +Nuvoton NCT6791 +.It +Nuvoton NCT6792 +.It +Nuvoton NCT6793 +.It +Nuvoton NCT6795 +.It +Winbond 83627HF/F/HG/G/S/THF/EHF/DHG/UHG/DHG-P +.It +Winbond 83637HF +.It +Winbond 83667HG/HG-B +.It +Winbond 83687THF +.It +Winbond 83697HF/UG .El .Sh SEE ALSO From nobody Sat Jul 1 17:20: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 4Qtf8p1WYcz4l8NC; Sat, 1 Jul 2023 17:20: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 4Qtf8p0fWmz3nvF; Sat, 1 Jul 2023 17:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGTYLbkN+Ym8vINLckH1PMnQv8sGeuhYyku6+x0+ppU=; b=KBQfi3hED6h7JodakQ7J/Ad6xhAJj8RaS66dOzm58TcYH73vfps48mzJVPXcJoHNhdkQmV FieV+zkFhBhoUVLv3NIKTsGDGeNTEc0ta7cOlDEyIM2IxxsAmP6yCSaz+AROcAWvk6YkZj SL+8KbetC02Ayo4j2BN9Yq8oXS+0erg9wSqE7rr2mgMyKUaTaAnpJ6/9fPBVfVfCWm/Afl ojuwhUsNCxndVPbwcDh2ZCWRS3MPKHcYFlhD82DgOWu4UBGa5Avs9KygkIooNblrjq7jj5 hb7zpn9l6PLlBuFSbU8avg57fWg9DxtiD11YC2KRdS9Pkg9qUqeJLcqb7bCPnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGTYLbkN+Ym8vINLckH1PMnQv8sGeuhYyku6+x0+ppU=; b=v8ZGdMBkMEG2RaIxbd+M/4+8I8Sivsxre/C3TACiN9rz3PeKxrXsDe17Qs9aVXCaBB5LWC nViBu3wfLsmPb9et9HmkmKrrRPh5ZFFhr3oWNRSG50F5+dMSaTPin/EtwCOlKEsbdRM7Xu TnWXw4sfAbCxsH+yvT1OUYM2pMdBvD7Yv6U2W56JPqEDWlX3p6hpQI2IG/MSMAQ/kyp41T lJ1RrQm7iBdUPsMzJtAWLg3tNStJYSbHgxMhq2rpWof4JfVy+HkOy5rp2ew4BuEGG6BEoE gTUAvEoAen+5LTyGumRFX+cBq8wRqPH2o7D+QDV+IiOiL65rvMSuRqVn7MMnFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232042; a=rsa-sha256; cv=none; b=UC5L1y6ReNL0gyLpm2AINay3LQV0DzkJD40kh+yX0G2vTnL9LLTgYaP8fVheopA3nzarJv ZfnNHItUS79hpxwZjxh40Smz9xgiUJ0o+e0PHrCBHwAUE8yfMzzEoLfZxO357bcjuJIH+I OhENPOCMpX2Sfc3+plAuRQmaYoN1eXDONNz+fz2orQOjJHoebc7V69Xu9TZ9QwO8U+EhPZ qnu9D1crCIH1O7i4ugZyuzo266HUgSbuD6Jl2Qj9Wl1ntGxixHU2yhh1Ypk7EITNUoSPkZ 1iVGPeqFnqUqe32HfTMW6JpotSZwzyxUWA1P9vPX8lffHTCthLUh6etwBZs7uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8n6s5gzYwb; Sat, 1 Jul 2023 17:20: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 361HKfbm066268; Sat, 1 Jul 2023 17:20:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKfFc066267; Sat, 1 Jul 2023 17:20:41 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:41 GMT Message-Id: <202307011720.361HKfFc066267@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: 93f899bed57f - main - nctgpio(4): Document supported Nuvoton chips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 93f899bed57f2c30ffc27a8ce82eef15fe930100 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=93f899bed57f2c30ffc27a8ce82eef15fe930100 commit 93f899bed57f2c30ffc27a8ce82eef15fe930100 Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:48 +0000 nctgpio(4): Document supported Nuvoton chips Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- share/man/man4/nctgpio.4 | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/share/man/man4/nctgpio.4 b/share/man/man4/nctgpio.4 new file mode 100644 index 000000000000..54a0bdc2df2b --- /dev/null +++ b/share/man/man4/nctgpio.4 @@ -0,0 +1,45 @@ +.\" $FreeBSD$ +.\" +.Dd Jan 11, 2021 +.Dt NCTGPIO 4 +.Os +.Sh NAME +.Nm nctgpio +.Nd GPIO controller on Nuvoton and Winbond Super I/O +.Sh SYNOPSIS +.Cd "device gpio" +.Cd "device nctgpio" +.Cd "device superio" +.Sh DESCRIPTION +The +.Nm +is a driver for GPIO controller that can be found in Nuvoton and Winbond Super I/O chips. +.Pp +The +.Nm +driver supports the following chips: +.Pp +.Bl -bullet -compact +.It +Nuvoton NCT5104D +.It +Nuvoton NCT5104D (PC-Engines APU) +.It +Nuvoton NCT5104D (PC-Engines APU3) +.El + +.Sh SEE ALSO +.Xr gpio 3 , +.Xr gpio 4 , +.Xr gpioctl 8 +.Sh HISTORY +The driver first appeared in +.Fx 11.0 . +And the +manual page first appeared in +.Fx 13.0 . +.Sh AUTHORS +The driver was initially written by +.An Daniel Wyatt Aq Mt daniel@dewyatt.com . +This man page was written by +.An Stéphane Rochoy Aq Mt stephane.rochoy@stormshield.eu . From nobody Sat Jul 1 17:20: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 4Qtf8q2BQpz4l8ZR; Sat, 1 Jul 2023 17:20: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 4Qtf8q1WBVz3pGj; Sat, 1 Jul 2023 17:20:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uE1hYWo3BkGFsR6TrHWoGFAHQWOeaWqibzJOvQx/O/c=; b=AWGhFllmboANObVYsNSowf8rb2iNDB7g5AsXh4Z3a9hNoTA1XD+cvvTK1j7K3OUxOwpMGR qvCoFasos/le490ab1EgDaQtweIIIIGbU6GxOfRNz1dOcokBlESO8vjtmgCTI/WORYwTyF 3F05MvtVLsNWbwMK+locpO/QIXKbyvGtKVD9oYp2t+nR4wqzjMKOu+Y7tGzQ/rpFY+j3F8 IRRW4Oc5twdm9elVsTHpVqW89MoUlzBiZ+0IqTkC3ofveuxkuksgArLrj0+TTPrN4bSAdN 5XUw/5/7d2mZcsQNwH8UbMWdSpvnpcassxyWR3gsUW9faGcq8rUaRbpIuVtdvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uE1hYWo3BkGFsR6TrHWoGFAHQWOeaWqibzJOvQx/O/c=; b=HXRnW1bgTcx6j5LP3/kB9X96t/P6nAnEinGr8lYLIEUAo1JQC1WFSw7cYQWx5Xi3ob908I 9f+YwkJa5y352CnsMXFKu1mHfrv3NWVtVIFDf8XiB+guJPhZGC2+8YeRv+UUOEfbVnXVer EPHRHvdNHJbHkdkzRcv5zOCPtR64cSS6OeOF2zvZJHwE2I8Tym6m3j9NFwWq7YViXm3JyW YdtTR8768UZMRmojW9mpDzhAH+SrjtC6lfRXnk406GLXGTPl48bvGCy/9d91gsbLNBh7+M YKq5OYLt1Mmq+jS0NfjiOvG1vtRMPRYhGDqCNvoKgCTiV2q7p4slIgev/9ohuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232043; a=rsa-sha256; cv=none; b=C+ZeDc3r6dSQSZ4jnMPB+grEwZTE235Lcho+l/Zt6HA65SeOk1w8iLRgb+cSU3rpsprYJ4 Uk7oueTogltLIQkYiYhUyy1JDLfc27Fw0RmQLziH2eUF0j1i5gSfxF+ECSaN+zWYeYFE50 f7HPZhniDQacUWoNk6yR+ghlBEcQ2+74O3Ub7LTI15koodQsdEvyiI+e5V2NL6iJqf1O7f 1BFtuWQ0kZKnG9oABftDSoXbWwo+qAbBGJvgkUoJjG4TTFd1Q3iyonqaKP4r6lPQUOIznB aHDXpksUkqohBvyWZLmIhL0plCo5nowCl4DovfloF23lwZeg4eLnf9D5zAwcFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8q0TNtzYsY; Sat, 1 Jul 2023 17:20: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 361HKh7o066290; Sat, 1 Jul 2023 17:20:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKgt1066289; Sat, 1 Jul 2023 17:20:42 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:42 GMT Message-Id: <202307011720.361HKgt1066289@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: 26a0a4035e51 - main - superio: Add superio_ldn_read and superio_ldn_write List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 26a0a4035e517d633b96cbcfe6b75bddec553ec3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=26a0a4035e517d633b96cbcfe6b75bddec553ec3 commit 26a0a4035e517d633b96cbcfe6b75bddec553ec3 Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:49 +0000 superio: Add superio_ldn_read and superio_ldn_write Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- sys/dev/superio/superio.c | 38 ++++++++++++++++++++++++++------------ sys/dev/superio/superio.h | 2 ++ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c index 6f2e44450681..1e4782277c0e 100644 --- a/sys/dev/superio/superio.c +++ b/sys/dev/superio/superio.c @@ -564,7 +564,7 @@ superio_detect(device_t dev, bool claim, struct siosc *sc) sc->vendor == SUPERIO_VENDOR_FINTEK, ("Only ITE, Nuvoton and Fintek SuperIO-s are supported")); sc->ldn_reg = 0x07; - sc->enable_reg = 0x30; + sc->enable_reg = 0x30; /* FIXME enable_reg not used by nctgpio(4). */ sc->current_ldn = 0xff; /* no device should have this */ if (superio_table[i].descr != NULL) { @@ -877,30 +877,44 @@ superio_revid(device_t dev) return (sc->revid); } +uint8_t +superio_ldn_read(device_t dev, uint8_t ldn, uint8_t reg) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + uint8_t v; + + sio_conf_enter(sc); + v = sio_ldn_read(sc, ldn, reg); + sio_conf_exit(sc); + return (v); +} + uint8_t superio_read(device_t dev, uint8_t reg) { - device_t sio_dev = device_get_parent(dev); - struct siosc *sc = device_get_softc(sio_dev); struct superio_devinfo *dinfo = device_get_ivars(dev); - uint8_t v; + + return (superio_ldn_read(dev, dinfo->ldn, reg)); +} + +void +superio_ldn_write(device_t dev, uint8_t ldn, uint8_t reg, uint8_t val) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); sio_conf_enter(sc); - v = sio_ldn_read(sc, dinfo->ldn, reg); + sio_ldn_write(sc, ldn, reg, val); sio_conf_exit(sc); - return (v); } void superio_write(device_t dev, uint8_t reg, uint8_t val) { - device_t sio_dev = device_get_parent(dev); - struct siosc *sc = device_get_softc(sio_dev); struct superio_devinfo *dinfo = device_get_ivars(dev); - sio_conf_enter(sc); - sio_ldn_write(sc, dinfo->ldn, reg, val); - sio_conf_exit(sc); + return (superio_ldn_write(dev, dinfo->ldn, reg, val)); } bool @@ -915,7 +929,7 @@ superio_dev_enabled(device_t dev, uint8_t mask) if (sc->vendor == SUPERIO_VENDOR_ITE && dinfo->ldn == 7) return (true); - v = superio_read(dev, sc->enable_reg); + v = superio_read(dev, sc->enable_reg); /* FIXME enable_reg not used by nctgpio(4). */ return ((v & mask) != 0); } diff --git a/sys/dev/superio/superio.h b/sys/dev/superio/superio.h index 993f95fc9fbb..997bcb2c6efd 100644 --- a/sys/dev/superio/superio.h +++ b/sys/dev/superio/superio.h @@ -50,7 +50,9 @@ superio_vendor_t superio_vendor(device_t dev); uint16_t superio_devid(device_t dev); uint8_t superio_revid(device_t dev); uint8_t superio_read(device_t dev, uint8_t reg); +uint8_t superio_ldn_read(device_t dev, uint8_t ldn, uint8_t reg); void superio_write(device_t dev, uint8_t reg, uint8_t val); +void superio_ldn_write(device_t dev, uint8_t ldn, uint8_t reg, uint8_t val); bool superio_dev_enabled(device_t dev, uint8_t mask); void superio_dev_enable(device_t dev, uint8_t mask); void superio_dev_disable(device_t dev, uint8_t mask); From nobody Sat Jul 1 17:20: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 4Qtf8s1F1xz4l8Wn; Sat, 1 Jul 2023 17:20: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 4Qtf8r2VjRz3pBs; Sat, 1 Jul 2023 17:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJK2B5ZjOg6ol7x7gQXMHha6cYpy2Pa+cAKKnrLbopI=; b=DrA9TWid/55WVHx5YZ2YNg5JppVjQ5L/TgbNbreXbvbW9w7LBaXwo8EYTrJOWBEDIKVVon qTH1AV0gwWFIwNjDdeHnnj67OGmLCGX9LgoU0nMcWpEukkfq1vvgm+4PFLxuWNMx0z7GKr 0esS+U0IMqCMCeDfV3wfABFMgJ6FfzAIIXhmhVpL3mj5vyS4cJlCtVuv+ZxpjFpUeqJ5Zd ZOnT0d6KTOicSFzMoDkPz7xGRQs6cPbWLDOj+rFhhvUqrR6m7qK9akKzZa1dALgnwwwohS eGlfDDiSoL2oJN03lCKG2I9eIPo8evheA3IZTWwioDXmFbtneoEBmtWt5LJK0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJK2B5ZjOg6ol7x7gQXMHha6cYpy2Pa+cAKKnrLbopI=; b=LzkViluyf/GAQsNoupEW4YxvRWQUo8cZsAcaXnx4Ff+XHaN2eLyz9Zv643qmhy2nZD3ZmX Y51ReG4481VYtgMBaefZv532E9IicW7yjOsZxHnj/OujyPeTIeXKP5qF6lbUKB9QcK7yrN kOw9YE2sUJlGIxzvPdsgLbAKInTbsXnBsqPZOMOROWeEEXLu3pd7yeu0vEpMyiGcc/VZtB DKs0Hf7C7vtXCN4rxeJWRpUjFRbM0xyt/EbyR1v7bSyDYQSpijc9C5QHlTg6hl26w/g6pV 3gRiTUVU+moPPo7MLgLSql38pXZTknYjkp2hRNE2gYm6ePsqlZNEVyOQgf5J8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232044; a=rsa-sha256; cv=none; b=s4iB5jShTdeMNTDlAqueI/9OFdrWNZgZfbYsUGft9N2OvZsUrKnXbhpFyq0AsEgFwUAw4a nNX/ydRBCsMkmlbCw1dvh/l9z21lRe0ryB0iDuKceeoGh7imVKgJn4Iil8xlFsrDZYWQIM MOdj/JfgGc29xz6rUTHmbRFPMwqTTo5KTGM2e6oFdEHOXrRBHTa7rJZvMlp+BlfSW19HbG HbHmmXap/k9tLUm22wDra7bPj/XcTTv+J9MbS7eMSbgc1g9pxx+MJUSEV50gy9GN4VnGgl Q3B6u3baMqb6YgeMbJFagDp+mA5lNdN2CeJECvWCzYLenga66b/Oy4+lSDzEOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8r1YyXzZ3P; Sat, 1 Jul 2023 17:20: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 361HKiZ8066313; Sat, 1 Jul 2023 17:20:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKi5A066312; Sat, 1 Jul 2023 17:20:44 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:44 GMT Message-Id: <202307011720.361HKi5A066312@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: c94b4d460e43 - main - sysctl: Document formats for uint8_t and uint16_t in sysctl(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c94b4d460e43069ebca1ff9f218af45e175a5373 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c94b4d460e43069ebca1ff9f218af45e175a5373 commit c94b4d460e43069ebca1ff9f218af45e175a5373 Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:50 +0000 sysctl: Document formats for uint8_t and uint16_t in sysctl(9) Was missing from c3220d0b6d72a1ed0ccfa188f0dfceef74421ab9. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- share/man/man9/sysctl.9 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index f2b1159e71a8..61783a7fbb65 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -577,6 +577,10 @@ Current formats: node .It Cm A .Li "char *" +.It Cm C +.Li "int8_t" +.It Cm CU +.Li "uint8_t" .It Cm I .Li "int" .It Cm IK Ns Op Ar n @@ -593,6 +597,10 @@ gives milliKelvin .Li "quad_t" .It Cm QU .Li "u_quad_t" +.It Cm S +.Li "int16_t" +.It Cm SU +.Li "uint16_t" .It Cm "S,TYPE" .Li "struct TYPE" structures From nobody Sat Jul 1 17:20: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 4Qtf8s4mYFz4l8Wr; Sat, 1 Jul 2023 17:20: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 4Qtf8s3R8fz3pL2; Sat, 1 Jul 2023 17:20:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuisOGvfDIqH5BdKHHquiCZDjtVCxROL8HGU98w/tvo=; b=sYQGlvxKccnQKfXr9yKkuU5D59zUCAtlULfH+xg2/jMh4AmGpMqehl0hbzvFIq+FCz+kos FxhAi/L+UfDQhaF3xIuz0L/tRMEulD3aAV8v+wc1qkry1KaUoGMfEbGYW0ygq0FNpm0YZw mNQhhqv2FF22TLfLXQ2Wo7ThBRgWtO3T5JThrxhCE5imMVxDTemu8HFzxgG5u+FiZLtOsZ x1EFZRtckjx2B5WuvH27QqqeJi/nBXfz8gekMze7OwB+/humGKCPs4jlAkEfQ2Ganksb70 5L3B7/V1oB7CB+wYEhN+OE90TEHTeJ2qjAv63xVFRh9YLbjjapBlzXOH9YGeBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GuisOGvfDIqH5BdKHHquiCZDjtVCxROL8HGU98w/tvo=; b=m//IKUaG1d1yDcMQnd89oTIFDc1cl5vr+ja70jUgmrPVTTR9TTvXxw0DysfxxqY/++QJLX Re03q0gfGLXe/E1owCHrM7yyOUa7BWyIvuuHlLGbZebMpbcSywIZKMeZ1YBJmggLMwXFbk axiNyd7l+/bWWvPQ0r1b1NLxPXuMF2i2LawNRBTV1Ea6zM90Pm4zKtsCVtm4MgIckPRYvX cev0AqxEiJrSoumhYexmVL2pHFFZVTSWCsmzgUjHN+d6WNl570++3nKFH9FNjSBDU8YG05 zotqqWRP7tG+LIHdXIK8TR3r20e03K8v0S5BikZazafNVDVQcexghyvjAdRPdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232045; a=rsa-sha256; cv=none; b=BwLTvXuYdq/gKTsd8hl1ImtutvhmmEm6bYL80EiLaNKlRXwOiNNNPLEDw8M4nl+GPeGasI 4WCHa+EvMQmImaDFMkzuDdkCFVbuB5OUqp+Bi+DSFZkCGfqFXk/eMKqsC9YUPTqItgkHnH COALjsEdBA6T2n0/yA5ZxIR1WzXq8Lxjpwi1WM2wsDp14rdTqAjAOMzCmHkXlx+9lYCtww lOGMkPRQJo4JplGGaCEeE7xRGNA/rbsMmha0MwEV/BDD6t4Q2+ohLilRqrhCnaPfT1wW5l ZtalPnZ3VLCBuol9mn4IBGg0evXwOlGb3GnrVMtikUQqOUG+n01E/3V/RQ7VMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8s2LyhzYwc; Sat, 1 Jul 2023 17:20: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 361HKjnZ066332; Sat, 1 Jul 2023 17:20:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKjra066331; Sat, 1 Jul 2023 17:20:45 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:45 GMT Message-Id: <202307011720.361HKjra066331@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: a0bcfa78313b - main - superio: Handle conflicting devid via prefer/extid List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a0bcfa78313b429a958149e045f4069b2ed8c984 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a0bcfa78313b429a958149e045f4069b2ed8c984 commit a0bcfa78313b429a958149e045f4069b2ed8c984 Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:51 +0000 superio: Handle conflicting devid via prefer/extid Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- sys/dev/superio/superio.c | 20 ++++++++++++++++++++ sys/dev/superio/superio.h | 1 + 2 files changed, 21 insertions(+) diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c index 1e4782277c0e..6db2b0685c1c 100644 --- a/sys/dev/superio/superio.c +++ b/sys/dev/superio/superio.c @@ -93,6 +93,7 @@ struct siosc { superio_vendor_t vendor; uint16_t devid; uint8_t revid; + int extid; uint8_t current_ldn; uint8_t ldn_reg; uint8_t enable_reg; @@ -292,6 +293,7 @@ static const struct { superio_vendor_t vendor; uint16_t devid; uint16_t mask; + int extid; /* Extra ID: used to handle conflicting devid. */ const char *descr; const struct sio_device *devices; } superio_table[] = { @@ -483,6 +485,7 @@ superio_detect(device_t dev, bool claim, struct siosc *sc) int error; int rid; int i, m; + int prefer; error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &port, &count); if (error != 0) @@ -507,6 +510,11 @@ superio_detect(device_t dev, bool claim, struct siosc *sc) return (ENXIO); } + prefer = 0; + resource_int_value(device_get_name(dev), device_get_unit(dev), "prefer", &prefer); + if (bootverbose && prefer > 0) + device_printf(dev, "prefer extid %d\n", prefer); + for (m = 0; methods_table[m] != NULL; m++) { methods_table[m]->enter(res, port); if (methods_table[m]->vendor == SUPERIO_VENDOR_ITE) { @@ -533,6 +541,8 @@ superio_detect(device_t dev, bool claim, struct siosc *sc) continue; if ((superio_table[i].devid & ~mask) != (devid & ~mask)) continue; + if (prefer > 0 && prefer != superio_table[i].extid) + continue; break; } @@ -558,6 +568,7 @@ superio_detect(device_t dev, bool claim, struct siosc *sc) sc->io_port = port; sc->devid = devid; sc->revid = revid; + sc->extid = superio_table[i].extid; KASSERT(sc->vendor == SUPERIO_VENDOR_ITE || sc->vendor == SUPERIO_VENDOR_NUVOTON || @@ -877,6 +888,15 @@ superio_revid(device_t dev) return (sc->revid); } +int +superio_extid(device_t dev) +{ + device_t sio_dev = device_get_parent(dev); + struct siosc *sc = device_get_softc(sio_dev); + + return (sc->extid); +} + uint8_t superio_ldn_read(device_t dev, uint8_t ldn, uint8_t reg) { diff --git a/sys/dev/superio/superio.h b/sys/dev/superio/superio.h index 997bcb2c6efd..b12df6ef8a82 100644 --- a/sys/dev/superio/superio.h +++ b/sys/dev/superio/superio.h @@ -49,6 +49,7 @@ typedef enum superio_dev_type { superio_vendor_t superio_vendor(device_t dev); uint16_t superio_devid(device_t dev); uint8_t superio_revid(device_t dev); +int superio_extid(device_t dev); uint8_t superio_read(device_t dev, uint8_t reg); uint8_t superio_ldn_read(device_t dev, uint8_t ldn, uint8_t reg); void superio_write(device_t dev, uint8_t reg, uint8_t val); From nobody Sat Jul 1 17:20: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 4Qtf8t4xYYz4l8TS; Sat, 1 Jul 2023 17:20: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 4Qtf8t4RxGz3pQN; Sat, 1 Jul 2023 17:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3sAM+SpRv5bmiWRU0s+Gv1+UKC0L9LIcSZTT345gWDU=; b=wuHAgU8Z96c5dl4r76mnZNV/wroF4ljBMpsgXcs/hM5PzPWhV9PiV/jKWhlMk/tsy2geeB AAsFoIccQm74q5yKr3Y3VJYGUGRrwyl6vFJ5L8NQN/ydpOAO1/03Dn37Ojq0twEoncANcv sY5nDsNeb3H1Kffz7XjQ3DSrQEL/9eXy1T6wrQDnG4WeddA+T+YcGLw2ami2QhVtMupeMT fgFw25ymq94Tz9duHLFQ2UX6i15C7uD+3wXjIY6Vwg08IWYtVaUDftGChIeHkFEuh00i8Q vAG59Tt8J22kxq+/wLNn/4Y0IaxfPOp2CIpJv6qxbeDvGAsxFUUsjQmCSrwXEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3sAM+SpRv5bmiWRU0s+Gv1+UKC0L9LIcSZTT345gWDU=; b=W3sIj1KVPmLmtl1NKIZh4AO4b3bl+dAzrMPXOZ56AabHN4bBwtv9LFlmrU9gu/U/LH4byD BCsM47gfg8PwdyTesZaOqUotndeFQPFlc2UO//z3t+VldXESLCs/oUzOGHE+NRsUA/D+h9 5TA7piSugX9e2agP/+IiRnvF5EpH1vJbITRXSONUylsrx3b4GgVMHxl0NlXE4Hrg7k9B2s eqcU2cZyQVh2OVQdg+77ZFvV2o4rBAfrP18vt6DyilOMCzOHdd2Nz1oeuzLrDikL5xl9XO QWgGqXQqFrwaNeCoAfZD4O473CwJhwPaiCG0+/GKLVyp3hQWVBdCYYrx6VvbSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232046; a=rsa-sha256; cv=none; b=WOFcDPvnfzVaUMSQWxgAH5daVDTuD9PXMzT//PkM0em7ObLPfml6pTZfS+SQvW21xhh+jJ +kLp8g/fbTe0i452buZY7mSTcyHcA2799hf2SE8BwuQklLMl+FrfhNzyVRloIdLxKUHNny p2jelDuGrLEV0mZjbFc9OM6IyGUL0EiASBJs0KR7DUBJcBujlzlVi2X5ZP1WUCpkkIVlPx CGouJeuNlrrVmXl9M5G5BOWUFJ2sSz/lCVc5M9dwntlaGzC8EL8TxoAun9QPBpQNLHXtIw tB0SAnlxy2XGBXWTbm0K7OEns4pq4ENbTfNiCoe8TF7k078mSwu9nPToFCFajQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8t3K1rzYwd; Sat, 1 Jul 2023 17:20: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 361HKkoK066351; Sat, 1 Jul 2023 17:20:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKkA7066350; Sat, 1 Jul 2023 17:20:46 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:46 GMT Message-Id: <202307011720.361HKkA7066350@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: 7f8d2ed03bc6 - main - superio+nctgpio: Prepare to support some new (weird) chips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7f8d2ed03bc670393d7a8322b0681f46ead745e7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7f8d2ed03bc670393d7a8322b0681f46ead745e7 commit 7f8d2ed03bc670393d7a8322b0681f46ead745e7 Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:51 +0000 superio+nctgpio: Prepare to support some new (weird) chips - Increase verbosity to direct i/o code path (iores != 0) - Fix pin inversion configuration - Allow forcing the use of indirect access channel via hint.gpio.0.flags=2 - Document the PREFER_INDIRECT_CHANNEL tunable in nctgpio(4) Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- sys/dev/nctgpio/nctgpio.c | 705 ++++++++++++++++++++++++++++++---------------- 1 file changed, 465 insertions(+), 240 deletions(-) diff --git a/sys/dev/nctgpio/nctgpio.c b/sys/dev/nctgpio/nctgpio.c index 56f37da45bc3..607a5f3e56cf 100644 --- a/sys/dev/nctgpio/nctgpio.c +++ b/sys/dev/nctgpio/nctgpio.c @@ -29,7 +29,6 @@ /* * Nuvoton GPIO driver. - * */ #include @@ -51,39 +50,36 @@ #include "gpio_if.h" -/* Logical Device Numbers. */ -#define NCT_LDN_GPIO 0x07 -#define NCT_LDN_GPIO_MODE 0x0f - -/* Logical Device 7 */ -#define NCT_LD7_GPIO0_IOR 0xe0 -#define NCT_LD7_GPIO0_DAT 0xe1 -#define NCT_LD7_GPIO0_INV 0xe2 -#define NCT_LD7_GPIO0_DST 0xe3 -#define NCT_LD7_GPIO1_IOR 0xe4 -#define NCT_LD7_GPIO1_DAT 0xe5 -#define NCT_LD7_GPIO1_INV 0xe6 -#define NCT_LD7_GPIO1_DST 0xe7 - -/* Logical Device F */ -#define NCT_LDF_GPIO0_OUTCFG 0xe0 -#define NCT_LDF_GPIO1_OUTCFG 0xe1 +#define NCT_PPOD_LDN 0xf /* LDN used to select Push-Pull/Open-Drain */ -/* Direct I/O port access. */ -#define NCT_IO_GSR 0 -#define NCT_IO_IOR 1 -#define NCT_IO_DAT 2 -#define NCT_IO_INV 3 +/* Direct access through GPIO register table */ +#define NCT_IO_GSR 0 /* Group Select */ +#define NCT_IO_IOR 1 /* I/O */ +#define NCT_IO_DAT 2 /* Data */ +#define NCT_IO_INV 3 /* Inversion */ +#define NCT_IO_DST 4 /* Status */ -#define NCT_MAX_PIN 15 -#define NCT_IS_VALID_PIN(_p) ((_p) >= 0 && (_p) <= NCT_MAX_PIN) +#define NCT_MAX_GROUP 9 +#define NCT_MAX_PIN 75 -#define NCT_PIN_BIT(_p) (1 << ((_p) & 7)) +#define NCT_PIN_IS_VALID(_sc, _p) ((_p) < (_sc)->npins) +#define NCT_PIN_GROUP(_sc, _p) ((_sc)->pinmap[(_p)].group) +#define NCT_PIN_GRPNUM(_sc, _p) ((_sc)->pinmap[(_p)].grpnum) +#define NCT_PIN_BIT(_sc, _p) ((_sc)->pinmap[(_p)].bit) +#define NCT_PIN_BITMASK(_p) (1 << ((_p) & 7)) #define NCT_GPIO_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ GPIO_PIN_OPENDRAIN | GPIO_PIN_PUSHPULL | \ GPIO_PIN_INVIN | GPIO_PIN_INVOUT) +#define NCT_PREFER_INDIRECT_CHANNEL 2 + +#define NCT_VERBOSE_PRINTF(dev, ...) \ + do { \ + if (__predict_false(bootverbose)) \ + device_printf(dev, __VA_ARGS__); \ + } while (0) + /* * Note that the values are important. * They match actual register offsets. @@ -94,25 +90,43 @@ typedef enum { REG_INV = 2, } reg_t; +struct nct_gpio_group { + uint32_t caps; + uint8_t enable_ldn; + uint8_t enable_reg; + uint8_t enable_mask; + uint8_t data_ldn; + uint8_t iobase; + uint8_t ppod_reg; /* Push-Pull/Open-Drain */ + uint8_t grpnum; + uint8_t pinbits[8]; + uint8_t npins; +}; + struct nct_softc { device_t dev; - device_t dev_f; device_t busdev; struct mtx mtx; struct resource *iores; int iorid; int curgrp; struct { - /* direction, 1: pin is input */ - uint8_t ior[2]; - /* output value */ - uint8_t out[2]; - /* whether out is valid */ - uint8_t out_known[2]; - /* inversion, 1: pin is inverted */ - uint8_t inv[2]; - } cache; - struct gpio_pin pins[NCT_MAX_PIN + 1]; + uint8_t ior[NCT_MAX_GROUP + 1]; /* direction, 1: input 0: output */ + uint8_t out[NCT_MAX_GROUP + 1]; /* output value */ + uint8_t out_known[NCT_MAX_GROUP + 1]; /* whether out is valid */ + uint8_t inv[NCT_MAX_GROUP + 1]; /* inversion, 1: inverted */ + } cache; + struct gpio_pin pins[NCT_MAX_PIN + 1]; + struct nct_device *nctdevp; + int npins; /* Total number of pins */ + + /* Lookup tables */ + struct { + struct nct_gpio_group *group; + uint8_t grpnum; + uint8_t bit; + } pinmap[NCT_MAX_PIN+1]; + struct nct_gpio_group *grpmap[NCT_MAX_GROUP+1]; }; #define GPIO_LOCK_INIT(_sc) mtx_init(&(_sc)->mtx, \ @@ -123,93 +137,204 @@ struct nct_softc { #define GPIO_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED) #define GPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_NOTOWNED) -struct nuvoton_vendor_device_id { - uint16_t chip_id; - const char * descr; -} nct_devs[] = { +#define GET_BIT(v, b) (((v) >> (b)) & 1) + +/* + * For most devices there are several GPIO devices, we attach only to one of + * them and use the rest without attaching. + */ +struct nct_device { + uint16_t devid; + int extid; + const char *descr; + int ngroups; + struct nct_gpio_group groups[NCT_MAX_GROUP + 1]; +} nct_devices[] = { { - .chip_id = 0x1061, - .descr = "Nuvoton NCT5104D", + .devid = 0x1061, + .descr = "GPIO on Nuvoton NCT5104D", + .ngroups = 2, + .groups = { + { + .grpnum = 0, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x07, + .ppod_reg = 0xe0, + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 1, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x07, + .ppod_reg = 0xe1, + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe4, + }, + }, }, { - .chip_id = 0xc452, - .descr = "Nuvoton NCT5104D (PC-Engines APU)", + .devid = 0xc452, + .descr = "GPIO on Nuvoton NCT5104D (PC-Engines APU)", + .ngroups = 2, + .groups = { + { + .grpnum = 0, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x07, + .ppod_reg = 0xe0, + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 1, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x07, + .ppod_reg = 0xe1, + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe4, + }, + }, }, { - .chip_id = 0xc453, - .descr = "Nuvoton NCT5104D (PC-Engines APU3)", + .devid = 0xc453, + .descr = "GPIO on Nuvoton NCT5104D (PC-Engines APU3)", + .ngroups = 2, + .groups = { + { + .grpnum = 0, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x07, + .ppod_reg = 0xe0, + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 1, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x07, + .ppod_reg = 0xe1, + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe4, + }, + }, }, }; -static void -nct_io_set_group(struct nct_softc *sc, int group) +static const char * +io2str(uint8_t ioport) { + switch (ioport) { + case NCT_IO_GSR: return ("grpsel"); + case NCT_IO_IOR: return ("io"); + case NCT_IO_DAT: return ("data"); + case NCT_IO_INV: return ("inv"); + case NCT_IO_DST: return ("status"); + default: return ("?"); + } +} +static void +nct_io_set_group(struct nct_softc *sc, uint8_t grpnum) +{ GPIO_ASSERT_LOCKED(sc); - if (group != sc->curgrp) { - bus_write_1(sc->iores, NCT_IO_GSR, group); - sc->curgrp = group; - } + + if (grpnum == sc->curgrp) + return; + + NCT_VERBOSE_PRINTF(sc->dev, "write %s 0x%x ioport %d\n", + io2str(NCT_IO_GSR), grpnum, NCT_IO_GSR); + bus_write_1(sc->iores, NCT_IO_GSR, grpnum); + sc->curgrp = grpnum; } static uint8_t -nct_io_read(struct nct_softc *sc, int group, uint8_t reg) +nct_io_read(struct nct_softc *sc, uint8_t grpnum, uint8_t reg) { - nct_io_set_group(sc, group); - return (bus_read_1(sc->iores, reg)); + uint8_t val; + + nct_io_set_group(sc, grpnum); + + val = bus_read_1(sc->iores, reg); + NCT_VERBOSE_PRINTF(sc->dev, "read %s 0x%x ioport %d\n", + io2str(reg), val, reg); + return (val); } static void -nct_io_write(struct nct_softc *sc, int group, uint8_t reg, uint8_t val) +nct_io_write(struct nct_softc *sc, uint8_t grpnum, uint8_t reg, uint8_t val) { - nct_io_set_group(sc, group); - return (bus_write_1(sc->iores, reg, val)); + nct_io_set_group(sc, grpnum); + + NCT_VERBOSE_PRINTF(sc->dev, "write %s 0x%x ioport %d\n", + io2str(reg), val, reg); + bus_write_1(sc->iores, reg, val); } static uint8_t -nct_get_ioreg(struct nct_softc *sc, reg_t reg, int group) +nct_get_ioreg(struct nct_softc *sc, reg_t reg, uint8_t grpnum) { - uint8_t ioreg; + uint8_t iobase; if (sc->iores != NULL) - ioreg = NCT_IO_IOR + reg; - else if (group == 0) - ioreg = NCT_LD7_GPIO0_IOR + reg; + iobase = NCT_IO_IOR; else - ioreg = NCT_LD7_GPIO1_IOR + reg; - return (ioreg); + iobase = sc->grpmap[grpnum]->iobase; + return (iobase + reg); } -static uint8_t -nct_read_reg(struct nct_softc *sc, reg_t reg, int group) +static const char * +reg2str(reg_t reg) { - uint8_t ioreg; - uint8_t val; - - ioreg = nct_get_ioreg(sc, reg, group); - if (sc->iores != NULL) - val = nct_io_read(sc, group, ioreg); - else - val = superio_read(sc->dev, ioreg); - - return (val); + switch (reg) { + case REG_IOR: return ("io"); + case REG_DAT: return ("data"); + case REG_INV: return ("inv"); + default: return ("?"); + } } -#define GET_BIT(v, b) (((v) >> (b)) & 1) -static bool -nct_get_pin_reg(struct nct_softc *sc, reg_t reg, uint32_t pin_num) +static uint8_t +nct_read_reg(struct nct_softc *sc, reg_t reg, uint8_t grpnum) { - uint8_t bit; - uint8_t group; - uint8_t val; + struct nct_gpio_group *gp; + uint8_t ioreg; + uint8_t val; - KASSERT(NCT_IS_VALID_PIN(pin_num), ("%s: invalid pin number %d", - __func__, pin_num)); + ioreg = nct_get_ioreg(sc, reg, grpnum); - group = pin_num >> 3; - bit = pin_num & 7; - val = nct_read_reg(sc, reg, group); - return (GET_BIT(val, bit)); + if (sc->iores != NULL) + return (nct_io_read(sc, grpnum, ioreg)); + + gp = sc->grpmap[grpnum]; + val = superio_ldn_read(sc->dev, gp->data_ldn, ioreg); + NCT_VERBOSE_PRINTF(sc->dev, "read %s 0x%x from group GPIO%u ioreg 0x%x\n", + reg2str(reg), val, grpnum, ioreg); + return (val); } static int @@ -219,25 +344,33 @@ nct_get_pin_cache(struct nct_softc *sc, uint32_t pin_num, uint8_t *cache) uint8_t group; uint8_t val; - KASSERT(NCT_IS_VALID_PIN(pin_num), ("%s: invalid pin number %d", + KASSERT(NCT_PIN_IS_VALID(sc, pin_num), ("%s: invalid pin number %d", __func__, pin_num)); - group = pin_num >> 3; - bit = pin_num & 7; - val = cache[group]; + group = NCT_PIN_GRPNUM(sc, pin_num); + bit = NCT_PIN_BIT(sc, pin_num); + val = cache[group]; return (GET_BIT(val, bit)); } static void -nct_write_reg(struct nct_softc *sc, reg_t reg, int group, uint8_t val) +nct_write_reg(struct nct_softc *sc, reg_t reg, uint8_t grpnum, uint8_t val) { - uint8_t ioreg; + struct nct_gpio_group *gp; + uint8_t ioreg; - ioreg = nct_get_ioreg(sc, reg, group); - if (sc->iores != NULL) - nct_io_write(sc, group, ioreg, val); - else - superio_write(sc->dev, ioreg, val); + ioreg = nct_get_ioreg(sc, reg, grpnum); + + if (sc->iores != NULL) { + nct_io_write(sc, grpnum, ioreg, val); + return; + } + + gp = sc->grpmap[grpnum]; + superio_ldn_write(sc->dev, gp->data_ldn, ioreg, val); + + NCT_VERBOSE_PRINTF(sc->dev, "write %s 0x%x to group GPIO%u ioreg 0x%x\n", + reg2str(reg), val, grpnum, ioreg); } static void @@ -249,14 +382,14 @@ nct_set_pin_reg(struct nct_softc *sc, reg_t reg, uint32_t pin_num, bool val) uint8_t group; uint8_t mask; - KASSERT(NCT_IS_VALID_PIN(pin_num), + KASSERT(NCT_PIN_IS_VALID(sc, pin_num), ("%s: invalid pin number %d", __func__, pin_num)); KASSERT(reg == REG_IOR || reg == REG_INV, ("%s: unsupported register %d", __func__, reg)); - group = pin_num >> 3; - bit = pin_num & 7; - mask = (uint8_t)1 << bit; + group = NCT_PIN_GRPNUM(sc, pin_num); + bit = NCT_PIN_BIT(sc, pin_num); + mask = (uint8_t)1 << bit; bitval = (uint8_t)val << bit; if (reg == REG_IOR) @@ -317,8 +450,9 @@ nct_write_pin(struct nct_softc *sc, uint32_t pin_num, bool val) uint8_t group; KASSERT(!nct_pin_is_input(sc, pin_num), ("attempt to write input pin")); - group = pin_num >> 3; - bit = pin_num & 7; + group = NCT_PIN_GRPNUM(sc, pin_num); + bit = NCT_PIN_BIT(sc, pin_num); + if (GET_BIT(sc->cache.out_known[group], bit) && GET_BIT(sc->cache.out[group], bit) == val) { /* The pin is already in requested state. */ @@ -332,6 +466,35 @@ nct_write_pin(struct nct_softc *sc, uint32_t pin_num, bool val) nct_write_reg(sc, REG_DAT, group, sc->cache.out[group]); } +static bool +nct_get_pin_reg(struct nct_softc *sc, reg_t reg, uint32_t pin_num) +{ + uint8_t bit; + uint8_t group; + uint8_t val; + bool b; + + KASSERT(NCT_PIN_IS_VALID(sc, pin_num), ("%s: invalid pin number %d", + __func__, pin_num)); + + group = NCT_PIN_GRPNUM(sc, pin_num); + bit = NCT_PIN_BIT(sc, pin_num); + val = nct_read_reg(sc, reg, group); + b = GET_BIT(val, bit); + + if (__predict_false(bootverbose)) { + if (nct_pin_is_input(sc, pin_num)) + NCT_VERBOSE_PRINTF(sc->dev, "read %d from input pin %u\n", + b, pin_num, group, bit); + else + NCT_VERBOSE_PRINTF(sc->dev, + "read %d from output pin %u, cache miss\n", + b, pin_num, group, bit); + } + + return (b); +} + /* * NB: state of an input pin cannot be cached, of course. * For an output we can either take the value from the cache if it's valid @@ -342,15 +505,24 @@ nct_read_pin(struct nct_softc *sc, uint32_t pin_num) { uint8_t bit; uint8_t group; - bool val; + bool val; - if (nct_pin_is_input(sc, pin_num)) + if (nct_pin_is_input(sc, pin_num)) { return (nct_get_pin_reg(sc, REG_DAT, pin_num)); + } - group = pin_num >> 3; - bit = pin_num & 7; - if (GET_BIT(sc->cache.out_known[group], bit)) - return (GET_BIT(sc->cache.out[group], bit)); + group = NCT_PIN_GRPNUM(sc, pin_num); + bit = NCT_PIN_BIT(sc, pin_num); + + if (GET_BIT(sc->cache.out_known[group], bit)) { + val = GET_BIT(sc->cache.out[group], bit); + + NCT_VERBOSE_PRINTF(sc->dev, + "read %d from output pin %u, cache hit\n", + val, pin_num, group, bit); + + return (val); + } val = nct_get_pin_reg(sc, REG_DAT, pin_num); sc->cache.out_known[group] |= 1 << bit; @@ -362,14 +534,11 @@ nct_read_pin(struct nct_softc *sc, uint32_t pin_num) } static uint8_t -nct_outcfg_addr(uint32_t pin_num) +nct_ppod_reg(struct nct_softc *sc, uint32_t pin_num) { - KASSERT(NCT_IS_VALID_PIN(pin_num), ("%s: invalid pin number %d", - __func__, pin_num)); - if ((pin_num >> 3) == 0) - return (NCT_LDF_GPIO0_OUTCFG); - else - return (NCT_LDF_GPIO1_OUTCFG); + uint8_t group = NCT_PIN_GRPNUM(sc, pin_num); + + return (sc->grpmap[group]->ppod_reg); } /* @@ -383,10 +552,10 @@ nct_set_pin_opendrain(struct nct_softc *sc, uint32_t pin_num) uint8_t reg; uint8_t outcfg; - reg = nct_outcfg_addr(pin_num); - outcfg = superio_read(sc->dev_f, reg); - outcfg |= NCT_PIN_BIT(pin_num); - superio_write(sc->dev_f, reg, outcfg); + reg = nct_ppod_reg(sc, pin_num); + outcfg = superio_ldn_read(sc->dev, NCT_PPOD_LDN, reg); + outcfg |= NCT_PIN_BITMASK(pin_num); + superio_ldn_write(sc->dev, 0xf, reg, outcfg); } static void @@ -395,10 +564,10 @@ nct_set_pin_pushpull(struct nct_softc *sc, uint32_t pin_num) uint8_t reg; uint8_t outcfg; - reg = nct_outcfg_addr(pin_num); - outcfg = superio_read(sc->dev_f, reg); - outcfg &= ~NCT_PIN_BIT(pin_num); - superio_write(sc->dev_f, reg, outcfg); + reg = nct_ppod_reg(sc, pin_num); + outcfg = superio_ldn_read(sc->dev, NCT_PPOD_LDN, reg); + outcfg &= ~NCT_PIN_BITMASK(pin_num); + superio_ldn_write(sc->dev, 0xf, reg, outcfg); } static bool @@ -407,94 +576,156 @@ nct_pin_is_opendrain(struct nct_softc *sc, uint32_t pin_num) uint8_t reg; uint8_t outcfg; - reg = nct_outcfg_addr(pin_num); - outcfg = superio_read(sc->dev_f, reg); - return (outcfg & NCT_PIN_BIT(pin_num)); + reg = nct_ppod_reg(sc, pin_num); + outcfg = superio_ldn_read(sc->dev, NCT_PPOD_LDN, reg); + return (outcfg & NCT_PIN_BITMASK(pin_num)); +} + +static struct nct_device * +nct_lookup_device(device_t dev) +{ + struct nct_device *nctdevp; + uint16_t devid; + int i, extid; + + devid = superio_devid(dev); + extid = superio_extid(dev); + for (i = 0, nctdevp = nct_devices; i < nitems(nct_devices); i++, nctdevp++) { + if (devid == nctdevp->devid && nctdevp->extid == extid) + return (nctdevp); + } + return (NULL); } static int nct_probe(device_t dev) { - int j; - uint16_t chipid; + struct nct_device *nctdevp; + uint8_t ldn; - if (superio_vendor(dev) != SUPERIO_VENDOR_NUVOTON) + ldn = superio_get_ldn(dev); + + if (superio_vendor(dev) != SUPERIO_VENDOR_NUVOTON) { + NCT_VERBOSE_PRINTF(dev, "ldn 0x%x not a Nuvoton device\n", ldn); return (ENXIO); - if (superio_get_type(dev) != SUPERIO_DEV_GPIO) + } + if (superio_get_type(dev) != SUPERIO_DEV_GPIO) { + NCT_VERBOSE_PRINTF(dev, "ldn 0x%x not a GPIO device\n", ldn); return (ENXIO); + } - /* - * There are several GPIO devices, we attach only to one of them - * and use the rest without attaching. - */ - if (superio_get_ldn(dev) != NCT_LDN_GPIO) + nctdevp = nct_lookup_device(dev); + if (nctdevp == NULL) { + NCT_VERBOSE_PRINTF(dev, "ldn 0x%x not supported\n", ldn); return (ENXIO); - - chipid = superio_devid(dev); - for (j = 0; j < nitems(nct_devs); j++) { - if (chipid == nct_devs[j].chip_id) { - device_set_desc(dev, "Nuvoton GPIO controller"); - return (BUS_PROBE_DEFAULT); - } } - return (ENXIO); + device_set_desc(dev, nctdevp->descr); + return (BUS_PROBE_DEFAULT); } static int nct_attach(device_t dev) { struct nct_softc *sc; - device_t dev_8; - uint16_t iobase; - int err; - int i; - - sc = device_get_softc(dev); - sc->dev = dev; - sc->dev_f = superio_find_dev(device_get_parent(dev), SUPERIO_DEV_GPIO, - NCT_LDN_GPIO_MODE); - if (sc->dev_f == NULL) { - device_printf(dev, "failed to find LDN F\n"); - return (ENXIO); - } - - /* - * As strange as it may seem, I/O port base is configured in the - * Logical Device 8 which is primarily used for WDT, but also plays - * a role in GPIO configuration. - */ - iobase = 0; - dev_8 = superio_find_dev(device_get_parent(dev), SUPERIO_DEV_WDT, 8); - if (dev_8 != NULL) - iobase = superio_get_iobase(dev_8); - if (iobase != 0 && iobase != 0xffff) { - sc->curgrp = -1; - sc->iorid = 0; - err = bus_set_resource(dev, SYS_RES_IOPORT, sc->iorid, - iobase, 7); - if (err == 0) { - sc->iores = bus_alloc_resource_any(dev, SYS_RES_IOPORT, - &sc->iorid, RF_ACTIVE); - if (sc->iores == NULL) { - device_printf(dev, "can't map i/o space, " - "iobase=0x%04x\n", iobase); + struct nct_gpio_group *gp; + uint32_t pin_num; + uint8_t v; + int flags, i, g; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->nctdevp = nct_lookup_device(dev); + + flags = 0; + (void)resource_int_value(device_get_name(dev), device_get_unit(dev), "flags", &flags); + + if ((flags & NCT_PREFER_INDIRECT_CHANNEL) == 0) { + uint16_t iobase; + device_t dev_8; + + /* + * As strange as it may seem, I/O port base is configured in the + * Logical Device 8 which is primarily used for WDT, but also plays + * a role in GPIO configuration. + */ + iobase = 0; + dev_8 = superio_find_dev(device_get_parent(dev), SUPERIO_DEV_WDT, 8); + if (dev_8 != NULL) + iobase = superio_get_iobase(dev_8); + if (iobase != 0 && iobase != 0xffff) { + int err; + + NCT_VERBOSE_PRINTF(dev, "iobase %#x\n", iobase); + sc->curgrp = -1; + sc->iorid = 0; + err = bus_set_resource(dev, SYS_RES_IOPORT, sc->iorid, + iobase, 7); + if (err == 0) { + sc->iores = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &sc->iorid, RF_ACTIVE); + if (sc->iores == NULL) { + device_printf(dev, "can't map i/o space, " + "iobase=%#x\n", iobase); + } + } else { + device_printf(dev, + "failed to set io port resource at %#x\n", iobase); } - } else { - device_printf(dev, - "failed to set io port resource at 0x%x\n", iobase); } } - - /* Enable gpio0 and gpio1. */ - superio_dev_enable(dev, 0x03); + NCT_VERBOSE_PRINTF(dev, "iores %p %s channel\n", + sc->iores, (sc->iores ? "direct" : "indirect")); + + /* Enable GPIO groups */ + for (g = 0, gp = sc->nctdevp->groups; g < sc->nctdevp->ngroups; g++, gp++) { + NCT_VERBOSE_PRINTF(dev, + "GPIO%d: %d pins, enable with mask 0x%x via ldn 0x%x reg 0x%x\n", + gp->grpnum, gp->npins, gp->enable_mask, gp->enable_ldn, + gp->enable_reg); + v = superio_ldn_read(dev, gp->enable_ldn, gp->enable_reg); + v |= gp->enable_mask; + superio_ldn_write(dev, gp->enable_ldn, gp->enable_reg, v); + } GPIO_LOCK_INIT(sc); GPIO_LOCK(sc); - sc->cache.inv[0] = nct_read_reg(sc, REG_INV, 0); - sc->cache.inv[1] = nct_read_reg(sc, REG_INV, 1); - sc->cache.ior[0] = nct_read_reg(sc, REG_IOR, 0); - sc->cache.ior[1] = nct_read_reg(sc, REG_IOR, 1); + pin_num = 0; + sc->npins = 0; + for (g = 0, gp = sc->nctdevp->groups; g < sc->nctdevp->ngroups; g++, gp++) { + sc->npins += gp->npins; + for (i = 0; i < gp->npins; i++, pin_num++) { + struct gpio_pin *pin; + + sc->pinmap[pin_num].group = gp; + sc->pinmap[pin_num].grpnum = gp->grpnum; + sc->pinmap[pin_num].bit = gp->pinbits[i]; + + sc->grpmap[gp->grpnum] = gp; + + pin = &sc->pins[pin_num]; + pin->gp_pin = pin_num; + pin->gp_caps = gp->caps; + pin->gp_flags = 0; + + snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%u%u", + gp->grpnum, gp->pinbits[i]); + + if (nct_pin_is_input(sc, pin_num)) + pin->gp_flags |= GPIO_PIN_INPUT; + else + pin->gp_flags |= GPIO_PIN_OUTPUT; + + if (nct_pin_is_opendrain(sc, pin_num)) + pin->gp_flags |= GPIO_PIN_OPENDRAIN; + else + pin->gp_flags |= GPIO_PIN_PUSHPULL; + + if (nct_pin_is_inverted(sc, pin_num)) + pin->gp_flags |= (GPIO_PIN_INVIN | GPIO_PIN_INVOUT); + } + } + NCT_VERBOSE_PRINTF(dev, "%d pins available\n", sc->npins); /* * Caching input values is meaningless as an input can be changed at any @@ -514,39 +745,18 @@ nct_attach(device_t dev) * | 1 | 1 | 1 | * |-----+-----------+---------| */ - sc->cache.out[0] = nct_read_reg(sc, REG_DAT, 0); - sc->cache.out[1] = nct_read_reg(sc, REG_DAT, 1); - sc->cache.out_known[0] = ~sc->cache.ior[0]; - sc->cache.out_known[1] = ~sc->cache.ior[1]; - - for (i = 0; i <= NCT_MAX_PIN; i++) { - struct gpio_pin *pin; - - pin = &sc->pins[i]; - pin->gp_pin = i; - pin->gp_caps = NCT_GPIO_CAPS; - pin->gp_flags = 0; - - snprintf(pin->gp_name, GPIOMAXNAME, "GPIO%02o", i); - pin->gp_name[GPIOMAXNAME - 1] = '\0'; - - if (nct_pin_is_input(sc, i)) - pin->gp_flags |= GPIO_PIN_INPUT; - else - pin->gp_flags |= GPIO_PIN_OUTPUT; - - if (nct_pin_is_opendrain(sc, i)) - pin->gp_flags |= GPIO_PIN_OPENDRAIN; - else - pin->gp_flags |= GPIO_PIN_PUSHPULL; - - if (nct_pin_is_inverted(sc, i)) - pin->gp_flags |= (GPIO_PIN_INVIN | GPIO_PIN_INVOUT); + for (g = 0, gp = sc->nctdevp->groups; g < sc->nctdevp->ngroups; g++, gp++) { + sc->cache.inv[gp->grpnum] = nct_read_reg(sc, REG_INV, gp->grpnum); + sc->cache.ior[gp->grpnum] = nct_read_reg(sc, REG_IOR, gp->grpnum); + sc->cache.out[gp->grpnum] = nct_read_reg(sc, REG_DAT, gp->grpnum); + sc->cache.out_known[gp->grpnum] = ~sc->cache.ior[gp->grpnum]; } + GPIO_UNLOCK(sc); sc->busdev = gpiobus_attach_bus(dev); if (sc->busdev == NULL) { + device_printf(dev, "failed to attach to gpiobus\n"); GPIO_LOCK_DESTROY(sc); return (ENXIO); } @@ -581,10 +791,12 @@ nct_gpio_get_bus(device_t dev) } static int -nct_gpio_pin_max(device_t dev, int *npins) +nct_gpio_pin_max(device_t dev, int *maxpin) { - *npins = NCT_MAX_PIN; + struct nct_softc *sc; + sc = device_get_softc(dev); + *maxpin = sc->npins - 1; return (0); } @@ -593,10 +805,11 @@ nct_gpio_pin_set(device_t dev, uint32_t pin_num, uint32_t pin_value) { struct nct_softc *sc; - if (!NCT_IS_VALID_PIN(pin_num)) + sc = device_get_softc(dev); + + if (!NCT_PIN_IS_VALID(sc, pin_num)) return (EINVAL); - sc = device_get_softc(dev); GPIO_LOCK(sc); if ((sc->pins[pin_num].gp_flags & GPIO_PIN_OUTPUT) == 0) { GPIO_UNLOCK(sc); @@ -613,10 +826,11 @@ nct_gpio_pin_get(device_t dev, uint32_t pin_num, uint32_t *pin_value) { struct nct_softc *sc; - if (!NCT_IS_VALID_PIN(pin_num)) + sc = device_get_softc(dev); + + if (!NCT_PIN_IS_VALID(sc, pin_num)) return (EINVAL); - sc = device_get_softc(dev); GPIO_ASSERT_UNLOCKED(sc); GPIO_LOCK(sc); *pin_value = nct_read_pin(sc, pin_num); @@ -630,10 +844,11 @@ nct_gpio_pin_toggle(device_t dev, uint32_t pin_num) { struct nct_softc *sc; - if (!NCT_IS_VALID_PIN(pin_num)) + sc = device_get_softc(dev); + + if (!NCT_PIN_IS_VALID(sc, pin_num)) return (EINVAL); - sc = device_get_softc(dev); GPIO_ASSERT_UNLOCKED(sc); GPIO_LOCK(sc); if ((sc->pins[pin_num].gp_flags & GPIO_PIN_OUTPUT) == 0) { @@ -655,10 +870,11 @@ nct_gpio_pin_getcaps(device_t dev, uint32_t pin_num, uint32_t *caps) { struct nct_softc *sc; - if (!NCT_IS_VALID_PIN(pin_num)) + sc = device_get_softc(dev); + + if (!NCT_PIN_IS_VALID(sc, pin_num)) return (EINVAL); - sc = device_get_softc(dev); GPIO_ASSERT_UNLOCKED(sc); GPIO_LOCK(sc); *caps = sc->pins[pin_num].gp_caps; @@ -672,10 +888,11 @@ nct_gpio_pin_getflags(device_t dev, uint32_t pin_num, uint32_t *flags) { struct nct_softc *sc; - if (!NCT_IS_VALID_PIN(pin_num)) + sc = device_get_softc(dev); + + if (!NCT_PIN_IS_VALID(sc, pin_num)) return (EINVAL); - sc = device_get_softc(dev); GPIO_ASSERT_UNLOCKED(sc); GPIO_LOCK(sc); *flags = sc->pins[pin_num].gp_flags; @@ -689,10 +906,11 @@ nct_gpio_pin_getname(device_t dev, uint32_t pin_num, char *name) { struct nct_softc *sc; - if (!NCT_IS_VALID_PIN(pin_num)) + sc = device_get_softc(dev); + + if (!NCT_PIN_IS_VALID(sc, pin_num)) return (EINVAL); - sc = device_get_softc(dev); GPIO_ASSERT_UNLOCKED(sc); GPIO_LOCK(sc); memcpy(name, sc->pins[pin_num].gp_name, GPIOMAXNAME); @@ -707,10 +925,11 @@ nct_gpio_pin_setflags(device_t dev, uint32_t pin_num, uint32_t flags) struct nct_softc *sc; struct gpio_pin *pin; - if (!NCT_IS_VALID_PIN(pin_num)) + sc = device_get_softc(dev); + + if (!NCT_PIN_IS_VALID(sc, pin_num)) return (EINVAL); - sc = device_get_softc(dev); pin = &sc->pins[pin_num]; if ((flags & pin->gp_caps) != flags) return (EINVAL); @@ -730,17 +949,24 @@ nct_gpio_pin_setflags(device_t dev, uint32_t pin_num, uint32_t flags) GPIO_ASSERT_UNLOCKED(sc); GPIO_LOCK(sc); *** 29 LINES SKIPPED *** From nobody Sat Jul 1 17:20: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 4Qtf8v5LN2z4l8GL; Sat, 1 Jul 2023 17:20: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 4Qtf8v4dS2z3pWR; Sat, 1 Jul 2023 17:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pkx00Y8QVjJ76E/Wz+r/NqjujaAwjPOm5ewBuWTgMAg=; b=XDZ1l+GaTvbM7D8movF6FK4epknkZREeoRNxX1srWxXzqXa8jGwkkAa79WqQbNvxr/frkI eXT76abvEXLx6JEL/xehqwwMlNnZCt0EzC/KI4Zx834ywzzir4DB2FaxCZo6nXMv7hZxhd AhDWLI+68qO0ejiDFgafZUKyfpunG1soVmK00Mo+VR+/ats0dZ4lgXY4iQ0wzGUs2F2343 8QLP41G98JiMcBLkuUgia9FNBkyV2jsxgjjQXvTz2POnbhcak+nXkYSOP3Q6w1t5VMW+Bo LUp4Elovm0kngW8U2uSKUWFHEoBiLEvEqH9+sKXa1XzhDPo8dc3BPHhOsG36NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pkx00Y8QVjJ76E/Wz+r/NqjujaAwjPOm5ewBuWTgMAg=; b=iu7Dq89axTWyVuZqpR7scBHcXiIyXtpdrQIkfyzK5amkIUyXkYCXfeMx6y3VYz2Hy5EjsF 2dYpMr4yN623ru4tA8EbHyz4XlF2G1aNBmol4vnL+4YdMd51wPY0zqi23Vljdpd1rSgpYu DPIRPeY8WSVeI7P4ZDRAqQwk2Ix2lxfPR2Ajmk9XtN6gzFSs5enJFWpKSDE+0qtECFplEj apJdR7f8/A54SVx9mYta/A2Ep6StvGtxn+ULeepZMhoDkUFj/AtvghRH8LiYgySSWNfDoP 1YySsV7EPv0Bq320ZuA0DgfIZgHHKUtlxAL9yqnA6xP7g03pu3raXIW9aY21pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232047; a=rsa-sha256; cv=none; b=fls4j2sKfS9IFQbw0vY8Rbj9IDwVm7ruO8PF7YSSqlq7thPpDtgcRddArMCkPZuaAiNKf+ YBS2N3VFkOr9DRpvCmWu548LFYBDkwQGQ/1jwC6QWhoe645XXNxmhKUqgR3TOTl0vpA9XA teUh3j4Vv7ToMuqXkTFlUTx+zT4/AjShOhxpOMsFlszFwlcbdtvoj5ZvddCFjaeaUOQb8n nyOqSzX4KjyqSI6JX9JeFoyl4p85jAguNkqD8N4yz9LV7SVp/C6a7B4CShDHfuvY5iqKJS WlvRydfHZrz6Aapq0SzSBTTZFhZviApYcc5AEYr0lcF65RH/Waa81RY82sZJCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8v3j4GzZ3S; Sat, 1 Jul 2023 17:20: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 361HKlgw066370; Sat, 1 Jul 2023 17:20:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKlH0066369; Sat, 1 Jul 2023 17:20:47 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:47 GMT Message-Id: <202307011720.361HKlH0066369@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: 8e6ea10c3122 - main - superio+nctgpio: Add support for new (weird) chips List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8e6ea10c31220b5f56dbd966a0ee7163d46d30d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8e6ea10c31220b5f56dbd966a0ee7163d46d30d1 commit 8e6ea10c31220b5f56dbd966a0ee7163d46d30d1 Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:52 +0000 superio+nctgpio: Add support for new (weird) chips Add support for the following chips: - Nuvoton NCT5585D - Nuvoton NCT6796D-E - Nuvoton NCT6779 - Nuvoton NCT6116D - and Winbond 83627DHG Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- share/man/man4/nctgpio.4 | 16 +- share/man/man4/superio.4 | 6 + sys/dev/nctgpio/nctgpio.c | 511 +++++++++++++++++++++++++++++++++++++++++++++- sys/dev/superio/superio.c | 46 ++++- 4 files changed, 570 insertions(+), 9 deletions(-) diff --git a/share/man/man4/nctgpio.4 b/share/man/man4/nctgpio.4 index 54a0bdc2df2b..ff565319089c 100644 --- a/share/man/man4/nctgpio.4 +++ b/share/man/man4/nctgpio.4 @@ -1,11 +1,11 @@ .\" $FreeBSD$ .\" -.Dd Jan 11, 2021 +.Dd Apr 18, 2023 .Dt NCTGPIO 4 .Os .Sh NAME .Nm nctgpio -.Nd GPIO controller on Nuvoton and Winbond Super I/O +.Nd GPIO controller on Nuvoton and Winbond Super I/Os .Sh SYNOPSIS .Cd "device gpio" .Cd "device nctgpio" @@ -26,6 +26,16 @@ Nuvoton NCT5104D Nuvoton NCT5104D (PC-Engines APU) .It Nuvoton NCT5104D (PC-Engines APU3) +.It +Nuvoton NCT5585D +.It +Nuvoton NCT6116D +.It +Nuvoton NCT6779 +.It +Nuvoton NCT6796D-E +.It +Winbond 83627DHG .El .Sh SEE ALSO @@ -37,7 +47,7 @@ The driver first appeared in .Fx 11.0 . And the manual page first appeared in -.Fx 13.0 . +.Fx 14.0 . .Sh AUTHORS The driver was initially written by .An Daniel Wyatt Aq Mt daniel@dewyatt.com . diff --git a/share/man/man4/superio.4 b/share/man/man4/superio.4 index 548b93b713f8..2608f5331b05 100644 --- a/share/man/man4/superio.4 +++ b/share/man/man4/superio.4 @@ -111,6 +111,10 @@ Fintek F81865 .It Nuvoton NCT5104D/NCT6102D/NCT6106D rev. A and B+ .It +Nuvoton NCT5585D +.It +Nuvoton NCT6116D +.It Nuvoton NCT6775 .It Nuvoton NCT6776 @@ -125,6 +129,8 @@ Nuvoton NCT6793 .It Nuvoton NCT6795 .It +Nuvoton NCT6796D-E +.It Winbond 83627HF/F/HG/G/S/THF/EHF/DHG/UHG/DHG-P .It Winbond 83637HF diff --git a/sys/dev/nctgpio/nctgpio.c b/sys/dev/nctgpio/nctgpio.c index 607a5f3e56cf..fc3de033968f 100644 --- a/sys/dev/nctgpio/nctgpio.c +++ b/sys/dev/nctgpio/nctgpio.c @@ -150,6 +150,73 @@ struct nct_device { int ngroups; struct nct_gpio_group groups[NCT_MAX_GROUP + 1]; } nct_devices[] = { + { + .devid = 0xa025, + .descr = "GPIO on Winbond 83627DHG IC ver. 5", + .ngroups = 5, + .groups = { + { + .grpnum = 2, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x09, + .ppod_reg = 0xe0, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe3, + }, + { + .grpnum = 3, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf0, + }, + { + .grpnum = 4, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x04, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf4, + }, + { + .grpnum = 5, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x08, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 6, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf4, + }, + }, + }, { .devid = 0x1061, .descr = "GPIO on Nuvoton NCT5104D", @@ -182,7 +249,7 @@ struct nct_device { }, }, { - .devid = 0xc452, + .devid = 0xc452, /* FIXME Conflict with Nuvoton NCT6106D. See NetBSD's nct_match. */ .descr = "GPIO on Nuvoton NCT5104D (PC-Engines APU)", .ngroups = 2, .groups = { @@ -243,6 +310,445 @@ struct nct_device { }, }, }, + { + .devid = 0xd42a, + .extid = 1, + .descr = "GPIO on Nuvoton NCT6796D-E", + .ngroups = 10, + .groups = { + { + .grpnum = 0, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x08, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x08, + .ppod_reg = 0xe0, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 1, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x08, + .enable_reg = 0x30, + .enable_mask = 0x80, + .data_ldn = 0x08, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf0, + }, + { + .grpnum = 2, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 3, + .pinbits = { 0, 1, 2, 3, 4, 5, 6 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 7, + .iobase = 0xe4, + }, + { + .grpnum = 4, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x04, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf0, /* FIXME Page 344 say "F0~F2, E8", + not "F0~F3". */ + }, + { + .grpnum = 5, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x08, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf4, + }, + { + .grpnum = 6, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf4, + }, + { + .grpnum = 7, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 8, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x04, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe4, + }, + { + .grpnum = 9, + .pinbits = { 0, 1, 2, 3 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x08, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 4, + .iobase = 0xe8, + }, + }, + }, + { + .devid = 0xd42a, + .extid = 2, + .descr = "GPIO on Nuvoton NCT5585D", + .ngroups = 6, + .groups = { + { + .grpnum = 2, + .pinbits = { 0, 1, 2, 3, 4, 5, 6 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x09, + .ppod_reg = 0xe1, + .caps = NCT_GPIO_CAPS, + .npins = 7, + .iobase = 0xe0, + }, + { + .grpnum = 3, + .pinbits = { 1, 2, 3 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x09, + .ppod_reg = 0xe2, + .caps = NCT_GPIO_CAPS, + .npins = 3, + .iobase = 0xe4, + }, + { + .grpnum = 5, + .pinbits = { 0, 2, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x08, + .data_ldn = 0x09, + .ppod_reg = 0xe4, + .caps = NCT_GPIO_CAPS, + .npins = 4, + .iobase = 0xf4, + }, + { + .grpnum = 7, + .pinbits = { 4 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x07, + .ppod_reg = 0xe6, + .caps = NCT_GPIO_CAPS, + .npins = 1, + .iobase = 0xe0, + }, + { + .grpnum = 8, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x04, + .data_ldn = 0x07, + .ppod_reg = 0xe7, + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe4, + }, + { + .grpnum = 9, + .pinbits = { 0, 2 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x08, + .data_ldn = 0x07, + .ppod_reg = 0xea, + .caps = NCT_GPIO_CAPS, + .npins = 2, + .iobase = 0xe8, + }, + }, + }, + { + .devid = 0xc562, + .descr = "GPIO on Nuvoton NCT6779D", + .ngroups = 9, + .groups = { + { + .grpnum = 0, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x08, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x08, + .ppod_reg = 0xe0, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 1, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x08, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf0, + }, + { + .grpnum = 2, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 3, + .pinbits = { 0, 1, 2, 3, 4, 5, 6 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 7, + .iobase = 0xe4, + }, + { + .grpnum = 4, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x04, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf0, + }, + { + .grpnum = 5, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x08, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf4, + }, + { + .grpnum = 6, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf4, + }, + { + .grpnum = 7, + .pinbits = { 0, 1, 2, 3, 4, 5, 6 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 7, + .iobase = 0xe0, + }, + { + .grpnum = 8, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x04, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe4, + }, + }, + }, + { + .devid = 0xd282, + .descr = "GPIO on Nuvoton NCT6112D/NCT6114D/NCT6116D", + .ngroups = 2, + .groups = { + { + .grpnum = 0, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x07, + .ppod_reg = 0xe0, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe0, + }, + { + .grpnum = 1, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x02, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe4, + }, + { + .grpnum = 2, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x04, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xe8, + }, + { + .grpnum = 3, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x08, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xec, + }, + { + .grpnum = 4, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x10, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf0, + }, + { + .grpnum = 5, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x20, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf4, + }, + { + .grpnum = 6, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x40, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf8, + }, + { + .grpnum = 7, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x07, + .enable_reg = 0x30, + .enable_mask = 0x80, + .data_ldn = 0x07, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xfc, + }, + { + .grpnum = 8, + .pinbits = { 0, 1, 2, 3, 4, 5, 6, 7 }, + .enable_ldn = 0x09, + .enable_reg = 0x30, + .enable_mask = 0x01, + .data_ldn = 0x09, + .ppod_reg = 0xe1, /* FIXME Need to check for this group. */ + .caps = NCT_GPIO_CAPS, + .npins = 8, + .iobase = 0xf0, + }, + }, + }, }; static const char * @@ -533,6 +1039,7 @@ nct_read_pin(struct nct_softc *sc, uint32_t pin_num) return (val); } +/* FIXME Incorret for NCT5585D and probably other chips. */ static uint8_t nct_ppod_reg(struct nct_softc *sc, uint32_t pin_num) { @@ -659,7 +1166,7 @@ nct_attach(device_t dev) sc->curgrp = -1; sc->iorid = 0; err = bus_set_resource(dev, SYS_RES_IOPORT, sc->iorid, - iobase, 7); + iobase, 7); /* FIXME NCT6796D-E have 8 registers according to table 18.3. */ if (err == 0) { sc->iores = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->iorid, RF_ACTIVE); diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c index 6db2b0685c1c..2d40d9ef43b7 100644 --- a/sys/dev/superio/superio.c +++ b/sys/dev/superio/superio.c @@ -271,6 +271,12 @@ const struct sio_device ite_devices[] = { { .type = SUPERIO_DEV_NONE }, }; +const struct sio_device w83627_devices[] = { + { .ldn = 8, .type = SUPERIO_DEV_WDT }, + { .ldn = 9, .type = SUPERIO_DEV_GPIO }, + { .type = SUPERIO_DEV_NONE }, +}; + const struct sio_device nvt_devices[] = { { .ldn = 8, .type = SUPERIO_DEV_WDT }, { .type = SUPERIO_DEV_NONE }, @@ -283,6 +289,23 @@ const struct sio_device nct5104_devices[] = { { .type = SUPERIO_DEV_NONE }, }; +const struct sio_device nct5585_devices[] = { + { .ldn = 9, .type = SUPERIO_DEV_GPIO }, + { .type = SUPERIO_DEV_NONE }, +}; + +const struct sio_device nct611x_devices[] = { + { .ldn = 0x7, .type = SUPERIO_DEV_GPIO }, + { .ldn = 0x8, .type = SUPERIO_DEV_WDT }, + { .type = SUPERIO_DEV_NONE }, +}; + +const struct sio_device nct67xx_devices[] = { + { .ldn = 0x8, .type = SUPERIO_DEV_WDT }, + { .ldn = 0x9, .type = SUPERIO_DEV_GPIO }, + { .type = SUPERIO_DEV_NONE }, +}; + const struct sio_device fintek_devices[] = { { .ldn = 6, .type = SUPERIO_DEV_GPIO }, { .ldn = 7, .type = SUPERIO_DEV_WDT }, @@ -381,7 +404,7 @@ static const struct { { .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xa000, .mask = 0xff, .descr = "Winbond 83627DHG", - .devices = nvt_devices, + .devices = w83627_devices, }, { .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xa200, .mask = 0xff, @@ -419,9 +442,19 @@ static const struct { .devices = nct5104_devices, }, { - .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc500, .mask = 0xff, - .descr = "Nuvoton NCT6779", - .devices = nvt_devices, + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc500, .mask = 0xff, + .descr = "Nuvoton NCT6779D", + .devices = nct67xx_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xd42a, .extid = 1, + .descr = "Nuvoton NCT6796D-E", + .devices = nct67xx_devices, + }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xd42a, .extid = 2, + .descr = "Nuvoton NCT5585D", + .devices = nct5585_devices, }, { .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xc800, .mask = 0xff, @@ -438,6 +471,11 @@ static const struct { .descr = "Nuvoton NCT6793", .devices = nvt_devices, }, + { + .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xd200, .mask = 0xff, + .descr = "Nuvoton NCT6112D/NCT6114D/NCT6116D", + .devices = nct611x_devices, + }, { .vendor = SUPERIO_VENDOR_NUVOTON, .devid = 0xd300, .mask = 0xff, .descr = "Nuvoton NCT6795", From nobody Sat Jul 1 17:20: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 4Qtf8x2mxTz4l8b5; Sat, 1 Jul 2023 17:20: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 4Qtf8w5bRvz3pjJ; Sat, 1 Jul 2023 17:20:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APXt5VC2baXj7TkS2atcuHhHxPDLIMjCNsXHTRNxw9w=; b=TeDYLZvwiriEdT/pzh+wEyIHsg1cGhe8+xmdw5Z7pdSO0rdWmjad7UVeoqivAcIvQWczzr DQ9I/IP5XbNrd6gZvVSriRR42gowprlnzo7QBkdoGxqbPNiKqrdpsygx0St24dVuaYhZ4N xCZZ9jiAry1Opk6SaUbunnYBgWt6GjADTiiqPk/QjPKnCq5W1hV9cz2T63y/BQiygb+81W PjUUt+ZaavnE9/NxTi4wZjHnctNhxgZR4dsLdwlQgZm6/H0xshyxX8UE0/Mzc95K40xg3x //TCr3jMpLr+hwa2Qo7SmXAtnKN7IRtCeUPvBdL4siukK+l/g4AgP4l6x1oB/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APXt5VC2baXj7TkS2atcuHhHxPDLIMjCNsXHTRNxw9w=; b=xu3dY1wtRludXHOXuAXCuMWFP1Tg0Fk74iFWtXU38CyDLhvYCVAz4I3AEwUQyl9etuJXxd O1IuuiZ7Oykzqv+D9yovdfudgu63JJEO0+5JQohQhpHdvYfanRyZVCcp2uluaMAJXUqVkF cMcNK5SiK3Ncjq1LtwCwVL9BFhm5lglUrX6nKmxVZf1p8CC1PBOvoUM+yDlaV6PPMIpzfK xODhwLuM7Aw4g4Jt0vPrd2BLMhBdXA9hpB2duXY4ymnFZzeTj1k6fhn1VbV7k5kAPbijXM U7QSD49bb92nmtiXc1xhjtZx0F1tyU4kjA9OznIW65NCG0gDcG5OWpjLdQ9IKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232048; a=rsa-sha256; cv=none; b=NseqXL5XOydltxaD5BTAVswx3CZgOmnpy7q8Jd5iQSs3J+j50TBsAZBwAe9xls/6JzWL+L vPEJYwOpxXeh062Tx+szLYuPMNZXohPnu+nlGD/DaYLTb2FV2Wx7cNl41OPSRyOXAKCZbW DWJXxO4MCU4I3+/sint3rBoGo3iGt5VECJG5Rt79kJhfPP+8uNK5ed78vrTHS7CT6qxO1y eVK4nIA5B2yqw1CVlgnOojmz5Uq2A7/TEk5zFO5I5+5Ql5F+sY2/85GAfsdeqGK+Fivpyb Bwm0kGqmv/YxhaYb9hzDoNA8tP+BliQG++HxFZJ+A4MSn87er/2grOV7F42q4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8w4hydzZ4l; Sat, 1 Jul 2023 17:20: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 361HKmiG066389; Sat, 1 Jul 2023 17:20:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKmB3066388; Sat, 1 Jul 2023 17:20:48 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:48 GMT Message-Id: <202307011720.361HKmB3066388@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: 350b7c3570aa - main - superio+ncthwm: Add hardware monitoring 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 350b7c3570aa6c87c537e54f706f1866f93a4142 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=350b7c3570aa6c87c537e54f706f1866f93a4142 commit 350b7c3570aa6c87c537e54f706f1866f93a4142 Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:53 +0000 superio+ncthwm: Add hardware monitoring support Add support for the following chips: - Nuvoton NCT6779D - Nuvoton NCT6796D-E Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- share/man/man4/ncthwm.4 | 53 +++++++++ sys/conf/files.amd64 | 1 + sys/dev/ncthwm/ncthwm.c | 261 ++++++++++++++++++++++++++++++++++++++++++++ sys/dev/superio/superio.c | 1 + sys/modules/Makefile | 2 + sys/modules/ncthwm/Makefile | 8 ++ 6 files changed, 326 insertions(+) diff --git a/share/man/man4/ncthwm.4 b/share/man/man4/ncthwm.4 new file mode 100644 index 000000000000..5a9265f5a6da --- /dev/null +++ b/share/man/man4/ncthwm.4 @@ -0,0 +1,53 @@ +.\" $FreeBSD$ +.\" +.Dd Apr 18, 2023 +.Dt NCTHWM 4 +.Os +.Sh NAME +.Nm ncthwm +.Nd Hardware monitoring controller on Nuvoton Super I/Os +.Sh SYNOPSIS +.Cd "device ncthwm" +.Cd "device superio" +.Sh DESCRIPTION +The +.Nm +is a driver for hardware monitoring controller that can be found in Nuvoton +Super I/O chips. It expose fan speed via +.Xr sysctl 8 . + +.Pp +The +.Nm +driver supports the following chips: +.Pp +.Bl -bullet -compact +.It +Nuvoton NCT6779 +.It +Nuvoton NCT6796D-E +.El + +.Sh SYSCTL VARIABLES +These variables are available as read-only +.Xr sysctl 8 +variables: +.Bl -tag -width indent +.It Va dev.ncthwm.0.CPUFAN +CPU fan speed in RPM. +.It Va dev.ncthwm.0.SYSFAN +System fan speed in RPM. +.It Va dev.ncthwm.0.AUXFAN0 +AUX0 fan speed in RPM. +.It Va dev.ncthwm.0.AUXFAN1 +AUX1 fan speed in RPM. +.It Va dev.ncthwm.0.AUXFAN2 +AUX2 fan speed in RPM. +.El + +.Sh HISTORY +The driver first appeared in +.Fx 14.0 . +.Sh AUTHORS +The driver was initially written by +.An Stéphane Rochoy Aq Mt stephane.rochoy@stormshield.eu . diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 37e069da5918..77fdf2ca411f 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -239,6 +239,7 @@ dev/ixl/i40e_adminq.c optional ixl pci \ dev/ixl/i40e_dcb.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/nctgpio/nctgpio.c optional nctgpio +dev/ncthwm/ncthwm.c optional ncthwm superio dev/nfe/if_nfe.c optional nfe pci dev/ntb/if_ntb/if_ntb.c optional if_ntb dev/ntb/ntb_transport.c optional ntb_transport | if_ntb diff --git a/sys/dev/ncthwm/ncthwm.c b/sys/dev/ncthwm/ncthwm.c new file mode 100644 index 000000000000..b62dff68f171 --- /dev/null +++ b/sys/dev/ncthwm/ncthwm.c @@ -0,0 +1,261 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2016-2022 Stormshield + * + * 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#define NCTHWM_FAN_MAX 5 + +#define NCTHWM_BANK_SELECT 0x4e +#define NCTHWM_VENDOR_ID 0x4f + +#define NCTHWM_VERBOSE_PRINTF(dev, ...) \ + do { \ + if (__predict_false(bootverbose)) \ + device_printf(dev, __VA_ARGS__); \ + } while (0) + +struct ncthwm_softc { + device_t dev; + struct ncthwm_device *nctdevp; + struct resource *iores; + int iorid; +}; + +struct ncthwm_fan_info +{ + const char *name; + uint8_t low_byte_offset; + uint8_t high_byte_offset; +}; + +struct ncthwm_device { + uint16_t devid; + const char *descr; + uint8_t base_offset; + uint8_t fan_bank; + uint8_t fan_count; + struct ncthwm_fan_info fan_info[NCTHWM_FAN_MAX]; +} ncthwm_devices[] = { + { + .devid = 0xc562, + .descr = "HWM on Nuvoton NCT6779D", + .base_offset = 5, + .fan_bank = 4, + .fan_count = 5, + .fan_info = { + { .name = "SYSFAN", .low_byte_offset = 0xc1, .high_byte_offset = 0xc0 }, + { .name = "CPUFAN", .low_byte_offset = 0xc3, .high_byte_offset = 0xc2 }, + { .name = "AUXFAN0", .low_byte_offset = 0xc5, .high_byte_offset = 0xc4 }, + { .name = "AUXFAN1", .low_byte_offset = 0xc7, .high_byte_offset = 0xc6 }, + { .name = "AUXFAN2", .low_byte_offset = 0xc9, .high_byte_offset = 0xc8 }, + }, + }, { + .devid = 0xd42a, + .descr = "HWM on Nuvoton NCT6796D-E", + .base_offset = 5, + .fan_bank = 4, + .fan_count = 5, + .fan_info = { + { .name = "SYSFAN", .low_byte_offset = 0xc1, .high_byte_offset = 0xc0 }, + { .name = "CPUFAN", .low_byte_offset = 0xc3, .high_byte_offset = 0xc2 }, + { .name = "AUXFAN0", .low_byte_offset = 0xc5, .high_byte_offset = 0xc4 }, + { .name = "AUXFAN1", .low_byte_offset = 0xc7, .high_byte_offset = 0xc6 }, + { .name = "AUXFAN2", .low_byte_offset = 0xc9, .high_byte_offset = 0xc8 }, + }, + } +}; + +static struct ncthwm_device * +ncthwm_lookup_device(device_t dev) +{ + int i; + uint16_t devid; + + devid = superio_devid(dev); + for (i = 0; i < nitems(ncthwm_devices); i++) { + if (devid == ncthwm_devices[i].devid) + return (ncthwm_devices + i); + } + return (NULL); +} + +static void +ncthwm_write(struct ncthwm_softc *sc, uint8_t reg, uint8_t val) +{ + bus_write_1(sc->iores, 0, reg); + bus_write_1(sc->iores, 1, val); +} + +static uint8_t +ncthwm_read(struct ncthwm_softc *sc, uint8_t reg) +{ + bus_write_1(sc->iores, 0, reg); + return (bus_read_1(sc->iores, 1)); +} + +static int +ncthwm_query_fan_speed(SYSCTL_HANDLER_ARGS) +{ + struct ncthwm_softc *sc; + struct ncthwm_fan_info *fan; + uint16_t val; + + sc = arg1; + if (sc == NULL) + return (EINVAL); + + KASSERT(sc->nctdevp != NULL, ("Unreachable")); + + if (sc->nctdevp->fan_count <= arg2) + return (EINVAL); + fan = &sc->nctdevp->fan_info[arg2]; + + KASSERT(sc->iores != NULL, ("Unreachable")); + + ncthwm_write(sc, NCTHWM_BANK_SELECT, sc->nctdevp->fan_bank); + val = ncthwm_read(sc, fan->high_byte_offset) << 8; + val |= ncthwm_read(sc, fan->low_byte_offset); + + NCTHWM_VERBOSE_PRINTF(sc->dev, "%s: read %u from bank %u offset 0x%x-0x%x\n", + fan->name, val, sc->nctdevp->fan_bank, fan->high_byte_offset, fan->low_byte_offset); + + return (sysctl_handle_int(oidp, &val, 0, req)); +} + +static int +ncthwm_probe(device_t dev) +{ + struct ncthwm_device *nctdevp; + uint8_t ldn; + + ldn = superio_get_ldn(dev); + + if (superio_vendor(dev) != SUPERIO_VENDOR_NUVOTON) { + NCTHWM_VERBOSE_PRINTF(dev, "ldn 0x%x not a Nuvoton device\n", ldn); + return (ENXIO); + } + if (superio_get_type(dev) != SUPERIO_DEV_HWM) { + NCTHWM_VERBOSE_PRINTF(dev, "ldn 0x%x not a HWM device\n", ldn); + return (ENXIO); + } + + nctdevp = ncthwm_lookup_device(dev); + if (nctdevp == NULL) { + NCTHWM_VERBOSE_PRINTF(dev, "ldn 0x%x not supported\n", ldn); + return (ENXIO); + } + device_set_desc(dev, nctdevp->descr); + return (BUS_PROBE_DEFAULT); +} + +static int +ncthwm_attach(device_t dev) +{ + struct ncthwm_softc *sc; + int i; + uint16_t iobase; + + sc = device_get_softc(dev); + sc->dev = dev; + + sc->nctdevp = ncthwm_lookup_device(dev); + if (sc->nctdevp == NULL) { + device_printf(dev, "device not supported\n"); + return (ENXIO); + } + + iobase = superio_get_iobase(dev) + sc->nctdevp->base_offset; + sc->iorid = 0; + if (bus_set_resource(dev, SYS_RES_IOPORT, sc->iorid, iobase, 2) != 0) { + device_printf(dev, "failed to set I/O port resource at 0x%x\n", iobase); + return (ENXIO); + } + sc->iores = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &sc->iorid, RF_ACTIVE); + if (sc->iores == NULL) { + device_printf(dev, "can't map I/O space at 0x%x\n", iobase); + return (ENXIO); + } + NCTHWM_VERBOSE_PRINTF(dev, "iobase 0x%x iores %p\n", iobase, sc->iores); + + /* Register FAN sysctl */ + for (i = 0; i < sc->nctdevp->fan_count; i++) { + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + sc->nctdevp->fan_info[i].name, + CTLTYPE_U16 | CTLFLAG_RD, sc, i, + ncthwm_query_fan_speed, "SU", "Fan speed in RPM"); + } + + return (0); +} + +static int +ncthwm_detach(device_t dev) +{ + struct ncthwm_softc *sc = device_get_softc(dev); + + if (sc->iores) + bus_release_resource(dev, SYS_RES_IOPORT, sc->iorid, sc->iores); + + return (0); +} + +static device_method_t ncthwm_methods[] = { + /* Methods from the device interface */ + DEVMETHOD(device_probe, ncthwm_probe), + DEVMETHOD(device_attach, ncthwm_attach), + DEVMETHOD(device_detach, ncthwm_detach), + + /* Terminate method list */ + { 0, 0 } +}; + +static driver_t ncthwm_driver = { + "ncthwm", + ncthwm_methods, + sizeof (struct ncthwm_softc) +}; + +DRIVER_MODULE(ncthwm, superio, ncthwm_driver, NULL, NULL); +MODULE_DEPEND(ncthwm, superio, 1, 1, 1); +MODULE_VERSION(ncthwm, 1); diff --git a/sys/dev/superio/superio.c b/sys/dev/superio/superio.c index 2d40d9ef43b7..4d1e9ef60974 100644 --- a/sys/dev/superio/superio.c +++ b/sys/dev/superio/superio.c @@ -303,6 +303,7 @@ const struct sio_device nct611x_devices[] = { const struct sio_device nct67xx_devices[] = { { .ldn = 0x8, .type = SUPERIO_DEV_WDT }, { .ldn = 0x9, .type = SUPERIO_DEV_GPIO }, + { .ldn = 0xb, .type = SUPERIO_DEV_HWM }, { .type = SUPERIO_DEV_NONE }, }; diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 54c98491228f..20945548604f 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -275,6 +275,7 @@ SUBDIR= \ mxge \ my \ ${_nctgpio} \ + ${_ncthwm} \ ${_neta} \ netlink \ ${_netgraph} \ @@ -726,6 +727,7 @@ _lio= lio _mana= mana _mgb= mgb _nctgpio= nctgpio +_ncthwm= ncthwm _ntb= ntb _ocs_fc= ocs_fc _p2sb= p2sb diff --git a/sys/modules/ncthwm/Makefile b/sys/modules/ncthwm/Makefile new file mode 100644 index 000000000000..e04beccf1861 --- /dev/null +++ b/sys/modules/ncthwm/Makefile @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/dev/ncthwm +KMOD= ncthwm +SRCS= ncthwm.c +SRCS+= device_if.h bus_if.h isa_if.h opt_platform.h + +.include From nobody Sat Jul 1 17:20: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 4Qtf8y0xclz4l8X6; Sat, 1 Jul 2023 17:20: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 4Qtf8x6cN9z3pTX; Sat, 1 Jul 2023 17:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRRjMDlYChW/YW593gRE53QcXcZ9me/ZgPqd6Jh4cVk=; b=o6HIQoC3d/gA1JicSRGa2kWhhju1Q9UzogFi3M56SS97VW595Qd+IUqYD7YAcSEWQ7O7X6 HoU2ZzuybhCu1D/WOWoNlRTNL5Cg0rl27a6xPgjkNkN6e6UTdpGALEp9l7tCWC/ehkXxBW PqLGpEwV6De4CH3dLi6I+VKxYHLhkws9/XOM4lfTkk0DRnnfnzDpKI2qhO+J0zClEjDwhK ylbBpgq6Tb6X5P52Kd6ugiHLDDascaki3DMnWKIlveIer1I/H+Kv9Sf/CSCEj0Lkq/282T laVuUk8kmNYXrfngFNoi7QKga+1Ug7E4c7rx8G3QNIMCkEnodkcwbck0fMDxjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688232049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRRjMDlYChW/YW593gRE53QcXcZ9me/ZgPqd6Jh4cVk=; b=fsK7AdV/+FW026jR4C1GwojAskeRSU641xsIs0AzuTDXxwUWTB91TWM+qjDIjiaDE7PY0T i1/mOWAhYAHm6aJMigZjsHTC6TO2HKdMayqutlaTUhXOwdBoeHt4r6kW8H/dhgUGuh0m+l Uc1zkJzi/XwclYT8wi1dgKT+NzI/1LyO3TjTzKz0C/dEcl+VlGsX5jJb/9j5t37NaKkfjP N0gbKK0hdxUEYE1ZMAe94r9fxdvjtlHA6m1zJ/VicC/6VqDs6jd5Evy+t2buvqQwTmbmjN mxy+6do4NS1PV84ZuX2iVm87U8YSjk0ZyfWH3KcRJ418YwMGNqds4AmW+BjTNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688232049; a=rsa-sha256; cv=none; b=dyOCdIuJKayIlp25EZyFIcoufKz7E5IoVFixMF31E5hqLjAg1tVcUItaUDU8M3pgqvXOYU UC8a/+hJezAHOoKHiywhCQsz4B6ny6AFG/zkhwAaK+7B4fj8KAzXIrqTRGpQ/HC4bjh/kx IpyEa7NdiQ0tgxXb2VfGm3o7J/sNLDhuNGEFY8xRh+Pyzmy70RXsz0GvpecOGsIYmSpidm cGXDTfymFbq29h0OJQs9wzhzIznN0TLj1JX/SOMBYeTpeqEBXgCX6BTWYNR3bhYwW+qzws +Y430HRW+Iah5U80u+rpEuh1cWMIHoLYEqBKYZPgdRQO63OoYAkl+Ix8r9WWOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtf8x5jDpzZJ3; Sat, 1 Jul 2023 17:20: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 361HKnx6066414; Sat, 1 Jul 2023 17:20:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361HKn4o066413; Sat, 1 Jul 2023 17:20:49 GMT (envelope-from git) Date: Sat, 1 Jul 2023 17:20:49 GMT Message-Id: <202307011720.361HKn4o066413@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: f03a7e52769e - main - nctgpio: Populate the cache earlier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f03a7e52769e7d5cf706021d4b21953e5bd945a4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f03a7e52769e7d5cf706021d4b21953e5bd945a4 commit f03a7e52769e7d5cf706021d4b21953e5bd945a4 Author: Stéphane Rochoy AuthorDate: 2023-07-01 17:19:44 +0000 Commit: Warner Losh CommitDate: 2023-07-01 17:19:54 +0000 nctgpio: Populate the cache earlier Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/719 --- sys/dev/nctgpio/nctgpio.c | 53 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/sys/dev/nctgpio/nctgpio.c b/sys/dev/nctgpio/nctgpio.c index fc3de033968f..07208e0fbd90 100644 --- a/sys/dev/nctgpio/nctgpio.c +++ b/sys/dev/nctgpio/nctgpio.c @@ -1200,6 +1200,32 @@ nct_attach(device_t dev) pin_num = 0; sc->npins = 0; for (g = 0, gp = sc->nctdevp->groups; g < sc->nctdevp->ngroups; g++, gp++) { + + sc->grpmap[gp->grpnum] = gp; + + /* + * Caching input values is meaningless as an input can be changed at any + * time by an external agent. But outputs are controlled by this + * driver, so it can cache their state. Also, the hardware remembers + * the output state of a pin when the pin is switched to input mode and + * then back to output mode. So, the cache stays valid. + * The only problem is with pins that are in input mode at the attach + * time. For them the output state is not known until it is set by the + * driver for the first time. + * 'out' and 'out_known' bits form a tri-state output cache: + * |-----+-----------+---------| + * | out | out_known | cache | + * |-----+-----------+---------| + * | X | 0 | invalid | + * | 0 | 1 | 0 | + * | 1 | 1 | 1 | + * |-----+-----------+---------| + */ + sc->cache.inv[gp->grpnum] = nct_read_reg(sc, REG_INV, gp->grpnum); + sc->cache.ior[gp->grpnum] = nct_read_reg(sc, REG_IOR, gp->grpnum); + sc->cache.out[gp->grpnum] = nct_read_reg(sc, REG_DAT, gp->grpnum); + sc->cache.out_known[gp->grpnum] = ~sc->cache.ior[gp->grpnum]; + sc->npins += gp->npins; for (i = 0; i < gp->npins; i++, pin_num++) { struct gpio_pin *pin; @@ -1208,8 +1234,6 @@ nct_attach(device_t dev) sc->pinmap[pin_num].grpnum = gp->grpnum; sc->pinmap[pin_num].bit = gp->pinbits[i]; - sc->grpmap[gp->grpnum] = gp; - pin = &sc->pins[pin_num]; pin->gp_pin = pin_num; pin->gp_caps = gp->caps; @@ -1234,31 +1258,6 @@ nct_attach(device_t dev) } NCT_VERBOSE_PRINTF(dev, "%d pins available\n", sc->npins); - /* - * Caching input values is meaningless as an input can be changed at any - * time by an external agent. But outputs are controlled by this - * driver, so it can cache their state. Also, the hardware remembers - * the output state of a pin when the pin is switched to input mode and - * then back to output mode. So, the cache stays valid. - * The only problem is with pins that are in input mode at the attach - * time. For them the output state is not known until it is set by the - * driver for the first time. - * 'out' and 'out_known' bits form a tri-state output cache: - * |-----+-----------+---------| - * | out | out_known | cache | - * |-----+-----------+---------| - * | X | 0 | invalid | - * | 0 | 1 | 0 | - * | 1 | 1 | 1 | - * |-----+-----------+---------| - */ - for (g = 0, gp = sc->nctdevp->groups; g < sc->nctdevp->ngroups; g++, gp++) { - sc->cache.inv[gp->grpnum] = nct_read_reg(sc, REG_INV, gp->grpnum); - sc->cache.ior[gp->grpnum] = nct_read_reg(sc, REG_IOR, gp->grpnum); - sc->cache.out[gp->grpnum] = nct_read_reg(sc, REG_DAT, gp->grpnum); - sc->cache.out_known[gp->grpnum] = ~sc->cache.ior[gp->grpnum]; - } - GPIO_UNLOCK(sc); sc->busdev = gpiobus_attach_bus(dev); From nobody Sat Jul 1 18:32: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 4QtgmC2gfzz4kdXQ; Sat, 1 Jul 2023 18:32:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtgmC288Dz4Frv; Sat, 1 Jul 2023 18:32:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688236379; 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=EXoRJGMrAcl9bwV3EUq4L2R/zv8KTnEte43NqbnUmkI=; b=abJ1ijIJvmu0gb8hU66K71c6st9r6T9i4+Ywpaz23tyVbK2ZyC75d+jhaxGf06T4xy5kXj Pzuc59uprnDmsyQXAuv7Wq0aSNzfiemxlkW3lZ9qIDD+6GnvF5XWOg765excMsOKY5huq5 0u+V/kKQK1CBvoJVeiHkjhCIuPviNE0CkfG1uD9LBJBvAncRd6babIwGl3U267clqSJaGY +N27j4k622XtrgIp3wC0jTgMzVl63QCu6KS1RUEd7CT9btk8FssonDD+qnsCBt/wp84hij SRWXQ88HUtaMJNDjFUvhpr3xWGvvMCnzU66Rw8HJPvN+aJ2JxkS1OpPAy7EiGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688236379; 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=EXoRJGMrAcl9bwV3EUq4L2R/zv8KTnEte43NqbnUmkI=; b=NBdQdNbfT4QPnfhgjharsU9GSvVNt/zVTTkNZePg5NkRW+dMPvis5Ly2MPhw0Wkpp19S+P VYBL/9+4XgyhgHP9v29Vg6v77CswZ4TlE3ilLfstDaZIXaC57yAfKxn3WWHdQlHzJFD6f3 BhuG336A2k5XU+8LsldHRgsS8pv/M6O22tJyQVdryBCRwu0AkR1wIrG2gPZzHNgJGK9vx/ lsJZS+GOFTanB5wyORcb91JwvIH3md1/Iw+aGlHBdgfvOnWxqXJqzAmJn9i90hcoxijz2z o+mwa+RoSdno0CjlQpnJo0XLYrh13gjy8/QynI2cdlCkBWVfVWcuva9luXIMiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688236379; a=rsa-sha256; cv=none; b=uiZz+llFc7wGuU19irk+7qfRxEXCMsDDTuIBY5S+CXGa2DLFlVP5KxkfUDZIEHTIhFUJm/ wTvaWIE2MtQZGCZ7URE8Hh1UFNc7v2dUceNM++P6ltuDd8N7M8Y+sJ+o2RQZWb6V8A4O49 q4ScfZsFk9Jum3x3PlVLdfyws3sk8RJB241tDi1iVpWysUMuQoZdIZNPsjvBeh6iUrUkzC O9o/hvZt3dpya33k8Q42gMI508zL29MyrQkNZPgCNGUgXBKslAy1DOFSNj3XmJLBuHlwae OEFGCNHVOfnQUykbWmkG2XbybMCqUvsHW5X96v+gBKH2B7RHoeJvxVwJRlPUeQ== Received: from [IPV6:2601:648:8680:16b0:c9ec:28ca:43a:64ef] (unknown [IPv6:2601:648:8680:16b0:c9ec:28ca:43a:64ef]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QtgmB5Bw7z19BD; Sat, 1 Jul 2023 18:32:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Sat, 1 Jul 2023 11:32:56 -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 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: git: 56f3f2d2491e - main - libsecureboot: avoid set but not used errors Content-Language: en-US To: "Simon J. Gerraty" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202306300652.35U6qpgP027126@gitrepo.freebsd.org> <2512b2e6-8b57-995f-6901-a1e00a4e9238@FreeBSD.org> <63110.1688159069@kaos.jnpr.net> From: John Baldwin In-Reply-To: <63110.1688159069@kaos.jnpr.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 6/30/23 2:04 PM, Simon J. Gerraty wrote: > John Baldwin wrote: >>> --- >>> lib/libsecureboot/openpgp/opgp_sig.c | 22 ++++++++++++---------- >>> lib/libsecureboot/vets.c | 7 +++++-- >>> 2 files changed, 17 insertions(+), 12 deletions(-) >>> >>> diff --git a/lib/libsecureboot/openpgp/opgp_sig.c b/lib/libsecureboot/openpgp/opgp_sig.c >>> index eec3469e3457..7f4e6fb98fd1 100644 >>> --- a/lib/libsecureboot/openpgp/opgp_sig.c >>> +++ b/lib/libsecureboot/openpgp/opgp_sig.c >>> @@ -464,20 +464,22 @@ verify_asc(const char *sigfile, int flags) >>> size_t n; >>> unsigned char *fdata, *sdata; >>> size_t fbytes, sbytes; >>> - >>> + >>> + fdata = NULL; >>> if ((sdata = read_file(sigfile, &sbytes))) { >>> n = strlcpy(pbuf, sigfile, sizeof(pbuf)); >>> - if ((cp = strrchr(pbuf, '.'))) >>> - *cp = '\0'; >>> - if ((fdata = read_file(pbuf, &fbytes))) { >>> - if (openpgp_verify(pbuf, fdata, fbytes, sdata, >>> - sbytes, flags)) { >>> - free(fdata); >>> - fdata = NULL; >>> + if (n < sizeof(pbuf)) { >>> + if ((cp = strrchr(pbuf, '.'))) >>> + *cp = '\0'; >>> + if ((fdata = read_file(pbuf, &fbytes))) { >>> + if (openpgp_verify(pbuf, fdata, fbytes, sdata, >>> + sbytes, flags)) { >>> + free(fdata); >>> + fdata = NULL; >>> + } >>> } >>> } >>> - } else >>> - fdata = NULL; >>> + } >>> free(sdata); >>> return (fdata); >> >> Most of this change seems to be avoiding reading the "real" file >> if the filename from the signature file was too long to fit into >> pbuf which I think is a different change? > > This is all just levels of paranoia. > strlcpy will truncate the data anyway, but if the buf isn't big enough > to hold the name, someone is playing games and we don't want to play along. Oh that's fine, just didn't seem related to the warning described in the commit log is all. :) >>> diff --git a/lib/libsecureboot/vets.c b/lib/libsecureboot/vets.c >>> index 4375dfa76a89..12191097ff8c 100644 >>> --- a/lib/libsecureboot/vets.c >>> +++ b/lib/libsecureboot/vets.c >>> @@ -241,11 +241,14 @@ x509_cn_get(br_x509_certificate *xc, char *buf, size_t len) >>> mc.vtable->start_cert(&mc.vtable, xc->data_len); >>> mc.vtable->append(&mc.vtable, xc->data, xc->data_len); >>> mc.vtable->end_cert(&mc.vtable); >>> - /* we don' actually care about cert status - just its name */ >>> + /* we don't actually care about cert status - just its name */ >>> err = mc.vtable->end_chain(&mc.vtable); >> >> For cases like this I've removed the variable and used a (void) cast instead to indicate >> that the return value is intentionally unused. > > Right, but I actually want err, so it can be seen in a debugger easily. > It was at least useful when first getting this stuff to work. I'm actually surprised you could see err in the debugger at all in that case since the compiler probably elides it (and associated debug info) entirely. However, one thing you can do is to step inside the function and then use 'finish' which will print the return value after completing the function. If you've just stepped over the function you can also check the relevant register to see the return value (e.g. eax/rax on x86). I think the most recent GDB even has a patch now (possibly controlled by an off by default knob) to print the return value from functions when you are stepping similar to the behavior you get with 'finish'. -- John Baldwin From nobody Sat Jul 1 18:40: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 4QtgwY4ZV5z4kjPw; Sat, 1 Jul 2023 18:40: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 4QtgwY47rXz4JKN; Sat, 1 Jul 2023 18:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688236813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AGhaIKUFJD43BbzrabW4k4nRYLNSDjS3QlC3rtAR+dQ=; b=olDVP4MN/cEH7fR696v4wy6HZE8GgCzQFwoIoT/WDAsBJDBbP9BmnCdn38bgNN/wHnMAPo ePVUSw1Mox/EjvdEjL0MDjBirIiRCHGd6AlP+XIzQIIGVC7H1O5yh9+ieKYjpGObaSydKA 3JpsLZlw/eZ/u0vaDvLqq97pobVntCEkc2LPH6HSfLmbrTJwcMEahzbq7VPQHDayA3+jBa NLkeUoksVdJ6WoQMxOxWU+kxkU7dXH4kIz3/BeMtwn83LTuRjgJ+h6uoAHY9s69f/A/37L q9ZBnSxStFUZB++UhDkLPnAkqz1fT0gp7Rkoq2DJv0t4PzVGkBK7Bk6bBo6kjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688236813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AGhaIKUFJD43BbzrabW4k4nRYLNSDjS3QlC3rtAR+dQ=; b=qnnJT0t+3YB25kMDKjWMJ0FvEN5kejdSfvtpNELZWxQikXhHLdCm1KG7Ao0GLBs7qn0B1P b5jaoLUxDcO2tj3c5KB2Z/Z+T/WLAYnSRbHgkLW1CKBCEZeDFjnAx6a+DKJBUpD2ehN9Pz qAIdlpghFHu6MG1MGHzd+kCCw79TVoGEumKr4h2oLAI5fKL66f4kljGlyisoIYE3IbYAut KGdALn9SG4MA1YcqbDfAXOdSUB2FFfOu5TeEPsuoo4TBLJlMDmdzw5amYUOXQdtoxsHwgW V0C1L3ER90HXlqIrc+3tHis22kpKfaeqBYmGfy8UlDTPLCVvYlh23n+XfW41Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688236813; a=rsa-sha256; cv=none; b=IxXp8QrBItpMgZ/dsFuUIsSTTk5C9WGGmO77FBBkH7VwEz6OJqjYdcStbiFwCAAUQ9UF+F 88M9IQ1e2lK24FNkIhW1R4RrvVCTGtfYCofJBqOJYsQUlsPxf5HZBXFHUeM1bOaRo/4B3r /I2Ypx5qnJsNPIkRkQ4VWNfFFswx+kuRHye2vMQc8TR5ejrq1vTBB0luJ+4ioAcEf/VVZm 5B9ZrCIu9qfurvdpzdh3Z9cjAcvxBr3ChQIAU9A0t/ZSVLrQKETpj93B9WE3cTynPb9fT5 PozaWyNgKTflfxG4FtD/zhdejQ/4FG6tNttrTtFw0rFOYq5RGKI6ljY4OPQkWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtgwY3DRbzbvb; Sat, 1 Jul 2023 18:40: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 361IeDLq093919; Sat, 1 Jul 2023 18:40:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361IeDFQ093910; Sat, 1 Jul 2023 18:40:13 GMT (envelope-from git) Date: Sat, 1 Jul 2023 18:40:13 GMT Message-Id: <202307011840.361IeDFQ093910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 2cab2d43b83b - main - syscalls: fix modspecific_t stack content leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cab2d43b83bddd44ecc1f267afb5e2725975ac7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=2cab2d43b83bddd44ecc1f267afb5e2725975ac7 commit 2cab2d43b83bddd44ecc1f267afb5e2725975ac7 Author: Ka Ho Ng AuthorDate: 2023-06-27 19:33:46 +0000 Commit: Ka Ho Ng CommitDate: 2023-07-01 18:38:11 +0000 syscalls: fix modspecific_t stack content leak Zero-initialize the whole modspecific_t so that there would not be kernel stack content leak in the unused part. Sponsored by: Juniper Networks, Inc. MFC after: 1 days Differential Revision: https://reviews.freebsd.org/D40815 --- sys/kern/kern_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c index a6e515fc0ce8..234e51cfd280 100644 --- a/sys/kern/kern_syscalls.c +++ b/sys/kern/kern_syscalls.c @@ -173,7 +173,7 @@ kern_syscall_module_handler(struct sysent *sysents, struct module *mod, int what, void *arg) { struct syscall_module_data *data = arg; - modspecific_t ms; + modspecific_t ms = { 0 }; int error; switch (what) { From nobody Sat Jul 1 18:42: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 4QtgzW3QpBz4kkPB; Sat, 1 Jul 2023 18:42: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 4QtgzW1bX5z4L3h; Sat, 1 Jul 2023 18:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688236967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YENblSDn6LccMqUIQ2LPlzsy5M27H6K742rpM+QmqEA=; b=UjDS2gXwgn54icVZV6e2GSdqtIhjAARvC+rR2jExwqoN90z5n+M/NX0v+nJSLoIF/kS8Kr hKCiH/26vcDIHiK62snudROv2VickjUsUn1IKHCcoYJCAb49IHQidReTvoTnLZzlYSuZcM GSYrwmBElnA/nBPGAvB2urYgb4neRM6keg0+4FwwzrKpYEFMQtSoFQMq1Uw+Y5edoHuNCH BXoWITi0rcWAIZ7oVTK6WxcMMVYrdzuO0BtbOuYy7pzUi5IfVOXn2xQpls69GNJNOwpNGs Pu94BmmPYixlY2B7ZXFgSjL7U57XKFHAd3HaGYSkErJXXOnpgjRg0lmaZ9Po2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688236967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YENblSDn6LccMqUIQ2LPlzsy5M27H6K742rpM+QmqEA=; b=yAwuNjvad5aGGydRg6zhn64EiXu1ZKTOQBBEXiiX3Yxk7FjUHnNDVudW8+GgbC8pN5RHo1 wiF24Omu136krUsB7izKBl4QpcU7IM9gMJZaI370eJc5Kt6HskvuXPh68KAqxMQhW7XIyI kRL1pYZ8m7nbhUpvFkDmQx66ZhkpIGBTABCGdQrDyZoURPi+Pp3Pffjxa5QInYrlaar5zP KSwKL3QrhJgrZqb6Emvwi76MDq0lmKzemsdPvBJ2vFOyL6d3JbDbbUlPsxNibbsKtNRaKx 2YDaQd8SjKCb4LDQhQJdqBQ1Nx0Eodiq/QyguRjwnsFlY8ZFb4oAMQoDnzDzfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688236967; a=rsa-sha256; cv=none; b=N27iI60AOIvCQzzw+q03P3nEAb7PIFnGD3I4PSgOGTIQfWw1zMbP0rvOvbGQMYqqmNfUND yn2LeQe4Vd3f42IWB7wdtVcGGMC2I9PmYzCivlCnmqisRiSSd7MtD+/0U6Jb1ZC0tcSkgc /5tAe3us8QHCCYpNPhLrE4IE2rnR6SmSzfPcX+BsS6tEUKrbmm5Vw59qxqhL3JUw1i1X5Q mVQUuzNkDbGx7AT8WWycus1I0ScZsPcnQeYSdsBUGjobee/khas+NwMJNucsG9tWZ/Qlem 21GC3BAoXdwL+uwlJGsGPh5OKvTEsoCXoPQPSoRcojdoYzdrMN/Q19/uhVS/oQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtgzW0gwZzccS; Sat, 1 Jul 2023 18:42: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 361Iglrj003419; Sat, 1 Jul 2023 18:42:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361Igkdb003418; Sat, 1 Jul 2023 18:42:46 GMT (envelope-from git) Date: Sat, 1 Jul 2023 18:42:46 GMT Message-Id: <202307011842.361Igkdb003418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 3fe7f9a357be - stable/13 - SYSCALL_MODULE(9): fix references to modfind(2) and modstat(2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3fe7f9a357be6b665f0f19613dac1ff1fa451389 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=3fe7f9a357be6b665f0f19613dac1ff1fa451389 commit 3fe7f9a357be6b665f0f19613dac1ff1fa451389 Author: Ka Ho Ng AuthorDate: 2023-06-15 19:37:53 +0000 Commit: Ka Ho Ng CommitDate: 2023-07-01 18:42:34 +0000 SYSCALL_MODULE(9): fix references to modfind(2) and modstat(2) Sponsored by: Juniper Networks, Inc. Reviewed by: delphij MFC after: 1 week (cherry picked from commit 9f135336f5057ae5a3f54fd9b1aa517cff0f9d3b) --- share/man/man9/SYSCALL_MODULE.9 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man9/SYSCALL_MODULE.9 b/share/man/man9/SYSCALL_MODULE.9 index aec57a89e9b3..cd4eeb65724d 100644 --- a/share/man/man9/SYSCALL_MODULE.9 +++ b/share/man/man9/SYSCALL_MODULE.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2015 +.Dd June 15, 2023 .Dt SYSCALL_MODULE 9 .Os .Sh NAME @@ -78,10 +78,10 @@ event handler when it is called. .El .Pp The syscall number assigned to the module can be retrieved using the -.Xr modstat 3 +.Xr modstat 2 and -.Xr modfind 3 -library functions in libc. +.Xr modfind 2 +system calls. The MACRO .Fn SYSCALL_MODULE_HELPER includes From nobody Sat Jul 1 18:43: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 4Qth0L3PH7z4klGL; Sat, 1 Jul 2023 18:43: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 4Qth0L2XM7z4LZK; Sat, 1 Jul 2023 18:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688237010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9zLfgEySOGMNrDBCiOIGEqz9MICnjhHSgxIUxWugeyk=; b=GQU3vE0iTvCfXRAW4ujnzNe8UKR8f4xAzgSdvuznA4SM0obfB2Wc7TT0JM5+E9Oksgce++ 9kRZ/lnjmlicCPt2Uofs2nj/iB/48vJoP1jJp7VLfUCYlabWWhpH8wiE0u2omC5/ENE5Ty LqiT7SlNRO1ANinm2cOKAxIBJZf8ZFcZObVKegG9//veQhPzhWjbtf7hpbvp1cWT/6s+KJ ZtPQvxTblocK0b/lcve+gomzK3Y3K/X5TuW2z6ayzu7obo4U3eKQPDx2LKV0NIYJXGJ64p offLuayZThiHKtL4WZbXeygfCOM9Ub9Yqw5WAQEOGq+ura0FpegJqemFzNE1Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688237010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9zLfgEySOGMNrDBCiOIGEqz9MICnjhHSgxIUxWugeyk=; b=xlr9QkFA2Qf4ZQAzaJuARAODySD51eHwSj0VYevvUQ+6GFc2dXwrWyBK1Ei4lW++90mnI9 MMlhiDpaAZKK8NAg6GxafqU9IXgHHspsPTyvy8GBn+nH9sOMCcF9xNg1PsGplMpgys96Mi LF4OApernTe7vg3eY1VhMGDbdq0vrqKrkfGNtXjlT0G9fXkNwwCSKFuLzf3l+BfxHwegzA uyTstN8EaDKGOXrIf/2rOZYu7ce1/5DS0FiM44Y1ZF9KILbxqKesawjWPkgM/Wn5iQYpJe 7AmFwDRsFweyyWL4MGTRHDUtxlcdO7AtgNgWgK4apDCh4D8Fk8Cxc9Oj0rmxeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688237010; a=rsa-sha256; cv=none; b=KvI0urfzEU1cQacHDCHJuUN0ZXYpGdIed9QL5iK7Sy3XEXNzpXF3NdRqqBLVInFTBTcBhi Y8htsZpbpczL+pILhECgV6YS4hjganbgDG49Fmre7qtyxXCjyAwBA3pVM29xz4TnWIag7X TcT3dGBCcwv7JpxbOAo60yn54VSgaDq9pCVJPX4M0Ow8yPIZqm/33+t9jOmunwDrX0Pm1r UDOZ/pxAAXWN9idB/WkMngeRjRMlzSatnBtN0+4kTyC/5j+KE2irZPj0eoZfnH6S6p/Cb7 bmHy2x5Tneoi3DkhG8pnuXoZ/G2duD8i7Xg0hCzJtWbVCIKZNJuciMvkG//WuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qth0L1cXczcWy; Sat, 1 Jul 2023 18:43:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 361IhUKw003612; Sat, 1 Jul 2023 18:43:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361IhUqx003611; Sat, 1 Jul 2023 18:43:30 GMT (envelope-from git) Date: Sat, 1 Jul 2023 18:43:30 GMT Message-Id: <202307011843.361IhUqx003611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: 593211cc71ad - stable/12 - SYSCALL_MODULE(9): fix references to modfind(2) and modstat(2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 593211cc71adef3a0691a0bcb8afc5d7f6199d82 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=593211cc71adef3a0691a0bcb8afc5d7f6199d82 commit 593211cc71adef3a0691a0bcb8afc5d7f6199d82 Author: Ka Ho Ng AuthorDate: 2023-06-15 19:37:53 +0000 Commit: Ka Ho Ng CommitDate: 2023-07-01 18:43:15 +0000 SYSCALL_MODULE(9): fix references to modfind(2) and modstat(2) Sponsored by: Juniper Networks, Inc. Reviewed by: delphij MFC after: 1 week (cherry picked from commit 9f135336f5057ae5a3f54fd9b1aa517cff0f9d3b) --- share/man/man9/SYSCALL_MODULE.9 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man9/SYSCALL_MODULE.9 b/share/man/man9/SYSCALL_MODULE.9 index aec57a89e9b3..cd4eeb65724d 100644 --- a/share/man/man9/SYSCALL_MODULE.9 +++ b/share/man/man9/SYSCALL_MODULE.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2015 +.Dd June 15, 2023 .Dt SYSCALL_MODULE 9 .Os .Sh NAME @@ -78,10 +78,10 @@ event handler when it is called. .El .Pp The syscall number assigned to the module can be retrieved using the -.Xr modstat 3 +.Xr modstat 2 and -.Xr modfind 3 -library functions in libc. +.Xr modfind 2 +system calls. The MACRO .Fn SYSCALL_MODULE_HELPER includes From nobody Sat Jul 1 19:23: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 4QthtJ3yqgz4l9H3; Sat, 1 Jul 2023 19:23: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 4QthtJ3R0Rz4YxK; Sat, 1 Jul 2023 19:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688239400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tIH9DLnFUiOLHbBj45p03AGaBe9QUYs2J2omQgZ4C3A=; b=EvW3j6hNOEHTNH5FeBs8CCnI91awnQrYBa/m5d9XYB03TJ6R0zwuiySeX9l6LKJdn+oZTI toxD/DRyFZcwthgOmAGmmRKEAZyn11IPE5waahK5DIGItyYmfegxZS5rmzNz+Mda+PRD16 2+x6+gYHjmbVLMJ6yAS6NE6q8Qtkp9XYKU7Vj7TA4CtWjkm3CoOOwcRljNYYDZpRibCyQG bRt0hcaWHYmUiTz9+G9I7XGhoxdPaQwglXzDpxTU8xFszNf7kELrCSbqBqFB5TjTyWtodz pv8p1v5kI8EpM8EHC7ICXA6d+Mn9AyMqKGWr1FoCQRsREzOSe+7CASbKnAR0HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688239400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tIH9DLnFUiOLHbBj45p03AGaBe9QUYs2J2omQgZ4C3A=; b=JnKGCojMg1IuM8oXpU+a4h4aw7ly7KAQ8fPrvSifQ4ptdD1DZXrlG+I05rld/yOa0QHuCH zMAoMmNZOxpe9z3AUSdfW8AsegHVRBMQVkjYvyDBGL3VC3vw2N4oV1cTeeHEkkmFNbpkrU StXNfD2Jg8rDPnDHqtIjYOcpij1HHkNAAEIpUWiHcL8UsZLYVTTTX8AceII+FLlmWgY5Ep giyRCHAL+W3oATeYkxAQXqzUd0HAs+75YiXAkAo8msYJfNU37qWcYyNW/Di8wyfM8hmWn7 XD/qvr2DsYAA6BN0pY8bcaFn9X9XhYXo8I4c8jjfP3sJ2EQjqaJPpYLuhMrAYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688239400; a=rsa-sha256; cv=none; b=PXsRhsBVYq0d3wDQ2Xof51pw8XGc4DnUq6iw5mntBjj3tpshFTcwMerDYfY52asR79O1UW rGrSjaLyUYEDRACTxaZc/RBC2G2oOmpdsrzrgB8duPxMgRokjHwCKXUSjyhr0KvLT7Ku1E ZWsLIpvVrI7dovdkp4K4u8kvPAKOSyDynDQd9LIqQ9stQOL5BjtHBTYj+PxfYfx+28YdJ8 Idmm+HbS9CiNsChEvMwlMK1UQyyho9DJjQsZl/UO7Ot+k1aSA2ogM3aF4J+Q2mCTye3pKK Nrlm1cswMDPSvu/jatfUXqtWY7iTv1rN/KwUtkoxQbhfDpIaebyOuhABkXM3fQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QthtJ2RQYzd0J; Sat, 1 Jul 2023 19:23: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 361JNKFj070308; Sat, 1 Jul 2023 19:23:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361JNKf8070307; Sat, 1 Jul 2023 19:23:20 GMT (envelope-from git) Date: Sat, 1 Jul 2023 19:23:20 GMT Message-Id: <202307011923.361JNKf8070307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ec41a96daaa6 - main - sys: Switch the kernel's C standard from C99 to GNU99. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec41a96daaa6e401bc0d4ba71d9cf37a1d79fc86 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ec41a96daaa6e401bc0d4ba71d9cf37a1d79fc86 commit ec41a96daaa6e401bc0d4ba71d9cf37a1d79fc86 Author: John Baldwin AuthorDate: 2023-07-01 19:21:13 +0000 Commit: John Baldwin CommitDate: 2023-07-01 19:21:13 +0000 sys: Switch the kernel's C standard from C99 to GNU99. This matches the default used in userland, and the kernel already depends on various GNU extensions to standard C that are supported by both clang and GCC. This should be a no-op for clang, but for GCC it enables some GNU extensions that aren't otherwise enabled. It also enables GCC for i386 to avoid the need for a floatundidf intrinsic in libkern. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40646 --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 9e977a6e4a01..51bbfcbaa617 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -278,7 +278,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ .PHONY: ${PHONY_NOTMAIN} .NOTMAIN: ${PHONY_NOTMAIN} -CSTD= c99 +CSTD= gnu99 .if ${CSTD} == "k&r" CFLAGS+= -traditional From nobody Sat Jul 1 19:23: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 4QthtK5QVRz4l9Vw; Sat, 1 Jul 2023 19:23: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 4QthtK4Ns9z4Yq6; Sat, 1 Jul 2023 19:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688239401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3NhKtZLYVse1ovsjRE2Yh3n+P21m1ZuojUk7zHQLAG0=; b=SZkft5VtJWu/uo5oCsKhat/z1rwbOIllIXN2O1Zp2jXvHEf6LUpnMkNqfk0Z21lycAk+10 ovKHcbGHGXXZu3TezGwvsqh9db2gannnYphYcqo1Gx2KEkWsDLBXxkA1AemRpBmEJzjTqt atU0WJjXUVvkggpuFycO1RdiCeJoF1Ph3km+YR1WeLp/qxHCYwV6Qv11n21n1dzF7C+urQ KY5K0qmaTG1ZBP+Qrk2zhkLlmu6IRn4cvW8/rAI20bI1Svv0W4EuI+25ryaXu7Uu+xhmUu SXN5q6F8TyQqWVTMA61umMawBmbunVxMv6+cBp5VTkDB6Fqmt9ZKcdoza8UZHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688239401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3NhKtZLYVse1ovsjRE2Yh3n+P21m1ZuojUk7zHQLAG0=; b=UGoM1Q6EvALUwEa3OS8y6EwPr5xeS5FUGLHDiDTKnncJqrp4v/OFDKRJjwOK3uCYSbEtJY EL7zYWAR5/hdIt2m6FHFDboXGN5fjBvDnEEfIFdjiH4/fFfRozsGLl4lWsmAedkBpSu8eU gJOIMdK11IcUeLbc61UkaXYLymF/4GZ3ViVNZie24Oqs3y/LI1LhGk6iwfRx2nJDMc8q+U /CJO0l6cPA4SEoMdjjEav8Z9H5zJ/vbGzbVFNWiZqkl8uJ/da/mzmVAUdyPHhArhe3djgg Q2HOgjD8Mbd64xBfrG1LZWd52AsgU9Zd+AFkUGZ9SiM2Uwww8M1EFRJIRZ5Vmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688239401; a=rsa-sha256; cv=none; b=cD2FT9qQwUPOt2POyrUQlQdtfshkfiabrKeC16gN+UN2cbyqB1MWBzGFLsW4xjSwOrQDya pW5Ea4g/Eue6Lm1yfZnpSm8N6Rn44zFMOdY/cgPre+5sMsknjgQbwpmaql2uvSe63hrVhY wYc5BGHbd39ptx1jtwQCP4QIyVZEkFtD1BXcCfDjyW5TiC1u381i+P/tNNfGwAaUEHdHc7 qHPI4ocQG0jCU00/wtG8uLFeRgrecfIX2hZoymrRv4Z0ZwtBYkozWBiyJE5kyXYmagkaZt NbqgF/RqOImdr2PaxWlidsByeLpbDZZiqcX83LwDLD394tOQqaEV4wBPAcAiwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QthtK3MxszdJ5; Sat, 1 Jul 2023 19:23: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 361JNL9L070334; Sat, 1 Jul 2023 19:23:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361JNLn6070333; Sat, 1 Jul 2023 19:23:21 GMT (envelope-from git) Date: Sat, 1 Jul 2023 19:23:21 GMT Message-Id: <202307011923.361JNLn6070333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: cc4f247fb946 - main - sys: Add [u]divmoddi4 intrinsics on i386. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc4f247fb9468bbece5286557ab2d6810704aaf3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cc4f247fb9468bbece5286557ab2d6810704aaf3 commit cc4f247fb9468bbece5286557ab2d6810704aaf3 Author: John Baldwin AuthorDate: 2023-07-01 19:22:44 +0000 Commit: John Baldwin CommitDate: 2023-07-01 19:22:44 +0000 sys: Add [u]divmoddi4 intrinsics on i386. GCC 12 uses these in several places when building the i386 kernel. They are very similar to [u]divdiv3 except that they return both the quotient and the remainder. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40817 --- sys/conf/files.i386 | 2 ++ sys/libkern/divmoddi4.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/libkern/quad.h | 2 ++ sys/libkern/udivmoddi4.c | 46 +++++++++++++++++++++++++++++++++++++ 4 files changed, 110 insertions(+) diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index f0aa4007d8d3..cd1aeb4850b7 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -140,6 +140,7 @@ isa/vga_isa.c optional vga kern/imgact_aout.c optional compat_aout kern/subr_sfbuf.c standard libkern/divdi3.c standard +libkern/divmoddi4.c standard libkern/ffsll.c standard libkern/flsll.c standard libkern/memcmp.c standard @@ -149,6 +150,7 @@ libkern/qdivrem.c standard libkern/strlen.c standard libkern/ucmpdi2.c standard libkern/udivdi3.c standard +libkern/udivmoddi4.c standard libkern/umoddi3.c standard # # x86 real mode BIOS support, required by dpms/pci/vesa diff --git a/sys/libkern/divmoddi4.c b/sys/libkern/divmoddi4.c new file mode 100644 index 000000000000..e5bd81a90ad7 --- /dev/null +++ b/sys/libkern/divmoddi4.c @@ -0,0 +1,60 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This software was developed by the Computer Systems Engineering group + * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and + * contributed to Berkeley. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 + +/* + * Divide two signed quads. + * ??? if -1/2 should produce -1 on this machine, this code is wrong + */ +quad_t +__divmoddi4(quad_t a, quad_t b, quad_t *rem) +{ + u_quad_t ua, ub, uq, urem; + int neg; + + if (a < 0) + ua = -(u_quad_t)a, neg = 1; + else + ua = a, neg = 0; + if (b < 0) + ub = -(u_quad_t)b, neg ^= 1; + else + ub = b; + uq = __qdivrem(ua, ub, &urem); + if (rem != 0) + *rem = urem; + return (neg ? -uq : uq); +} diff --git a/sys/libkern/quad.h b/sys/libkern/quad.h index 452f331661b3..e6be1c7bde15 100644 --- a/sys/libkern/quad.h +++ b/sys/libkern/quad.h @@ -105,10 +105,12 @@ quad_t __ashldi3(quad_t, qshift_t); quad_t __ashrdi3(quad_t, qshift_t); int __cmpdi2(quad_t a, quad_t b); quad_t __divdi3(quad_t a, quad_t b); +quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); quad_t __lshrdi3(quad_t, qshift_t); quad_t __moddi3(quad_t a, quad_t b); u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); u_quad_t __udivdi3(u_quad_t a, u_quad_t b); +u_quad_t __udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *rem); u_quad_t __umoddi3(u_quad_t a, u_quad_t b); int __ucmpdi2(u_quad_t a, u_quad_t b); diff --git a/sys/libkern/udivmoddi4.c b/sys/libkern/udivmoddi4.c new file mode 100644 index 000000000000..bb9b06917e2e --- /dev/null +++ b/sys/libkern/udivmoddi4.c @@ -0,0 +1,46 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This software was developed by the Computer Systems Engineering group + * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and + * contributed to Berkeley. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 + +/* + * Divide two unsigned quads. + */ +u_quad_t +__udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *rem) +{ + + return (__qdivrem(a, b, rem)); +} From nobody Sat Jul 1 19:23: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 4QthtL6xZHz4l9Ky; Sat, 1 Jul 2023 19:23: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 4QthtL5j6Jz4Z8H; Sat, 1 Jul 2023 19:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688239402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APsa0pt/73LgrbwwKwCg01qR0K4PkfdS1PGZMaakaHA=; b=F6pWYMCB8aAu3bd0+LIyqk1e6ydCHYbE/TqdwIindrjwV5I4bF4FjH32XE5J5u2ITa0yuv IjJk2a6trgHKYFtYdu5d9qxFSHSyFAQuyYPYLFVRz57QIE8WgVpoaMQQTj6ZQRnYS6dtn6 XKK4YMvWg/2Cj+oG/kL/pLCu/7ScIOTVsvfGIIbRLoEJQh34ZZGNltPKfI9RTSNEbV2Ee+ aehAL5pSiTpFUSKI5Mh6Hd7WSjiFPjc6EPG5mt2Bb1izxb3xcdXMIvPuNs+gW0jhTrCRdS mnk+4LcOuJUkARS5Iprw48DhvNLOrrI89ktjB2ake0TJS8oEUhMLo2IzFYL3ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688239402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=APsa0pt/73LgrbwwKwCg01qR0K4PkfdS1PGZMaakaHA=; b=JMhaddVwzyMsfCcQMvLsWvjL7CN4imA9CE/Rh0ExyK4P0V5MlMR5dL5Xhn3GFPQ7uk/1wM P8I0KruEsPko7JTl2C/p/vgoQ6AOrzDPDtt+iA+RVfgW2JWx3JAJbYfMiGuqq4vmWoZ/Qe EjkqhIqa9RAJdQ9IlI8zNu45I4etzEWj9AL+uNfxUdOHUGriOb2I3nDSc78I0LKQu1zr6e 4b1WMnypPddTMq0NyHPN9vpLkYxkHOsRZ2ZpxBcdFEdtqLqumcfFT1dBt9fGglK+PcdEYG GJ3o9HkN81hESxwyC2EQwN3EeeEvsqTQ8GnXqgL5Iw8Z6WHw0S+PtA4O7cSyow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688239402; a=rsa-sha256; cv=none; b=AN25p/FmfRii19g0DKF1CRnB138ju2nEE5j4YV/XZoZ80HJcbGhaOBuaVf9VsD8AZD6ST1 E1ytZ/QzLIRz7e5EweBpZ0dlnS1sOJUBaDjbgBps5KcY8TtRO6lJR6HWSsWgvVAnISPo7E RT+Mwz9NlOQTHMdtrxceZuqBIbszrE/Xy1YkmOYbs+UTLy3jyHKR/L5e5AlSvNbuOlpKsj alQjvQGBDtFZkhthAg3sgEvxy4fokDNgbdOCCp6cJFOtPJLyE4XYwzFD6dzpQqzTwCJ/th dtZSEPVkYiyzAisr9yrFPqD3kXKaoQ6Ka32sNtHL1gFXj2L57q9keUSt8AKCyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QthtL4MCdzdTS; Sat, 1 Jul 2023 19:23: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 361JNM4F070355; Sat, 1 Jul 2023 19:23:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361JNMtJ070354; Sat, 1 Jul 2023 19:23:22 GMT (envelope-from git) Date: Sat, 1 Jul 2023 19:23:22 GMT Message-Id: <202307011923.361JNMtJ070354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: da3096a92d2c - main - rdrand_rng: Build with -fPIC on i386 when using GCC. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da3096a92d2c1c06b25613444d9b369475d50321 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=da3096a92d2c1c06b25613444d9b369475d50321 commit da3096a92d2c1c06b25613444d9b369475d50321 Author: John Baldwin AuthorDate: 2023-07-01 19:23:00 +0000 Commit: John Baldwin CommitDate: 2023-07-01 19:23:00 +0000 rdrand_rng: Build with -fPIC on i386 when using GCC. ld.bfd requires an R_386_PLT32 relocation for calls to ifuncs rather than R_386_PC32. (lld permits R_386_PC32.) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40811 --- sys/modules/rdrand_rng/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/modules/rdrand_rng/Makefile b/sys/modules/rdrand_rng/Makefile index 7f14c080a260..3fdecd64f78f 100644 --- a/sys/modules/rdrand_rng/Makefile +++ b/sys/modules/rdrand_rng/Makefile @@ -8,4 +8,9 @@ SRCS+= bus_if.h device_if.h CFLAGS+= -I${SRCTOP}/sys +# ld.bfd doesn't support ifuncs invoked non-PIC +.if ${MACHINE_CPUARCH} == "i386" +CFLAGS.gcc= -fPIC +.endif + .include From nobody Sat Jul 1 19:43: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 4QtjKw1pCxz4jtMT for ; Sat, 1 Jul 2023 19:43:48 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtjKv4CWQz3DZd for ; Sat, 1 Jul 2023 19:43:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-31409e8c145so3514716f8f.2 for ; Sat, 01 Jul 2023 12:43:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688240626; x=1690832626; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iK15JT/WGb4JCb3/+Fp1zNnXJ6h8q517LJdmaDZanaA=; b=KUTn0Sx/CG80RoRVvIaVOtPbm9E6HK1mDZgIu3I4Ho6MInTqtKxs+ZcxCaCmAHP6Di oepmiT1pbFVeLjVHFGwH+pnLdSpQcRD6N3AvXJRtV8Ki9Gtn6WZnnPV4YFCUkCmXMPzh BCF+caugwFBOOTzGaLcebrD2eIHSMyzkAwZ+fEGEdlPoeJzkEu6vGEdVgvDsv3vxWTtY GKf+KrBwxZhpFPIX9j2yid6LnGuchtcOnm54qQQJA1ef478+uQnuqLNX/Y2QKlQ9vwdk rt5fIc4lcyoUowVHgufb1jck6TrVWEDSNCm2USZTPCJUUcrG5YRY2tswRnJw8Nana9BZ q/2g== X-Gm-Message-State: ABy/qLZClfcuQLxLNbPH/z1TyiTgBVc0TzCMKSkYezP2jnVoZfxfeY3e H1EPafJ/wb0pb03nDSw4d6Q+3Q== X-Google-Smtp-Source: APBJJlHj+Vf8naupj8SND45xlyCnhRc31N7y59Vt8NIAhUlOmwBHEnnbpWQQhf1Iaj6Gr0KT2SmNag== X-Received: by 2002:adf:e510:0:b0:314:2881:a331 with SMTP id j16-20020adfe510000000b003142881a331mr2518127wrm.40.1688240626130; Sat, 01 Jul 2023 12:43:46 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id c8-20020adfed88000000b0031433443265sm28657wro.53.2023.07.01.12.43.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jul 2023 12:43:44 -0700 (PDT) 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 \(3731.600.7\)) Subject: Re: git: da3096a92d2c - main - rdrand_rng: Build with -fPIC on i386 when using GCC. From: Jessica Clarke In-Reply-To: <202307011923.361JNMtJ070354@gitrepo.freebsd.org> Date: Sat, 1 Jul 2023 20:43:33 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <43225A5D-CBC7-4F1E-9B28-78A5A703FB56@freebsd.org> References: <202307011923.361JNMtJ070354@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4QtjKv4CWQz3DZd X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 1 Jul 2023, at 20:23, John Baldwin wrote: >=20 > The branch main has been updated by jhb: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dda3096a92d2c1c06b25613444d9b3694= 75d50321 >=20 > commit da3096a92d2c1c06b25613444d9b369475d50321 > Author: John Baldwin > AuthorDate: 2023-07-01 19:23:00 +0000 > Commit: John Baldwin > CommitDate: 2023-07-01 19:23:00 +0000 >=20 > rdrand_rng: Build with -fPIC on i386 when using GCC. >=20 > ld.bfd requires an R_386_PLT32 relocation for calls to ifuncs > rather than R_386_PC32. (lld permits R_386_PC32.) That=E2=80=99s odd and doesn=E2=80=99t quite seem a sufficient = explanation on its own? PDEs can have IFUNCs just fine today, so why is it different for kernel modules here? Jess > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D40811 > --- > sys/modules/rdrand_rng/Makefile | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/sys/modules/rdrand_rng/Makefile = b/sys/modules/rdrand_rng/Makefile > index 7f14c080a260..3fdecd64f78f 100644 > --- a/sys/modules/rdrand_rng/Makefile > +++ b/sys/modules/rdrand_rng/Makefile > @@ -8,4 +8,9 @@ SRCS+=3D bus_if.h device_if.h >=20 > CFLAGS+=3D -I${SRCTOP}/sys >=20 > +# ld.bfd doesn't support ifuncs invoked non-PIC > +.if ${MACHINE_CPUARCH} =3D=3D "i386" > +CFLAGS.gcc=3D -fPIC > +.endif > + > .include From nobody Sat Jul 1 19:59: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 4Qtjhp2DKPz4kZ0P for ; Sat, 1 Jul 2023 20:00:10 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qtjhp0ZRxz3Hvd for ; Sat, 1 Jul 2023 20:00:10 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3128fcd58f3so3573006f8f.1 for ; Sat, 01 Jul 2023 13:00:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688241608; x=1690833608; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WjOBGcvN7uLGYIsIzQM90wyU9wS60bsdrmB500pET1o=; b=Bpy2gJdJbXF1eRKtl/1P3Qy1zZh5hygH1qqKSAc1wqKx7rMNHoQOZvhj5bf0J+GTKm C2RR2XvDsUl/T9xWwpf4/2sJGwNYtnJq8rA/vxUMJDJQMNEo3H4mk1h/yTYg/g+EBrJ9 t06OppIZoLHA1mtgw8J8WLAAAg6Dv70AOr7XdiqU5vKy+628nLw9683CPdVFyDFQ29zE fRhW8VmtclWefRfddMjVD3XiR8xeBb2CAS+s/+pid466jgzzlPrhrjGFehtCzURGmt+i ZoOmARmGPliPslC1D7u8F+TxfxK6hq61fTkkXH2jChap6UyG3Mhpw2GBzzkpv+Z8B8a+ CIgA== X-Gm-Message-State: ABy/qLYKFzi/CcCZFqlg5p6e3oLhIUiQkq6tmIwXMCjNP8plfKDe6mDd 4zTzasEyqloBZuleBGAMkRwcEQ== X-Google-Smtp-Source: APBJJlEM9RD+N0QOjySa6PDGnHm1DozieK6Q3Dws49pD3dl7lpFNmyVh+DDZV9lxW8No7PiB6p3Zdg== X-Received: by 2002:adf:cd8c:0:b0:314:31ca:7d1f with SMTP id q12-20020adfcd8c000000b0031431ca7d1fmr738699wrj.20.1688241607832; Sat, 01 Jul 2023 13:00:07 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id e17-20020a5d5951000000b00313f61889ecsm15421278wri.66.2023.07.01.13.00.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jul 2023 13:00:07 -0700 (PDT) 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 \(3731.600.7\)) Subject: Re: git: cc4f247fb946 - main - sys: Add [u]divmoddi4 intrinsics on i386. From: Jessica Clarke In-Reply-To: <202307011923.361JNLn6070333@gitrepo.freebsd.org> Date: Sat, 1 Jul 2023 20:59:55 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202307011923.361JNLn6070333@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4Qtjhp0ZRxz3Hvd X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 1 Jul 2023, at 20:23, John Baldwin wrote: >=20 > The branch main has been updated by jhb: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dcc4f247fb9468bbece5286557ab2d681= 0704aaf3 >=20 > commit cc4f247fb9468bbece5286557ab2d6810704aaf3 > Author: John Baldwin > AuthorDate: 2023-07-01 19:22:44 +0000 > Commit: John Baldwin > CommitDate: 2023-07-01 19:22:44 +0000 >=20 > sys: Add [u]divmoddi4 intrinsics on i386. >=20 > GCC 12 uses these in several places when building the i386 kernel. > They are very similar to [u]divdiv3 except that they return both > the quotient and the remainder. >=20 > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D40817 > --- > sys/conf/files.i386 | 2 ++ > sys/libkern/divmoddi4.c | 60 = ++++++++++++++++++++++++++++++++++++++++++++++++ > sys/libkern/quad.h | 2 ++ > sys/libkern/udivmoddi4.c | 46 +++++++++++++++++++++++++++++++++++++ > 4 files changed, 110 insertions(+) >=20 > diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 > index f0aa4007d8d3..cd1aeb4850b7 100644 > --- a/sys/conf/files.i386 > +++ b/sys/conf/files.i386 > @@ -140,6 +140,7 @@ isa/vga_isa.c optional vga > kern/imgact_aout.c optional compat_aout > kern/subr_sfbuf.c standard > libkern/divdi3.c standard > +libkern/divmoddi4.c standard > libkern/ffsll.c standard > libkern/flsll.c standard > libkern/memcmp.c standard > @@ -149,6 +150,7 @@ libkern/qdivrem.c standard > libkern/strlen.c standard > libkern/ucmpdi2.c standard > libkern/udivdi3.c standard > +libkern/udivmoddi4.c standard > libkern/umoddi3.c standard > # > # x86 real mode BIOS support, required by dpms/pci/vesa > diff --git a/sys/libkern/divmoddi4.c b/sys/libkern/divmoddi4.c > new file mode 100644 > index 000000000000..e5bd81a90ad7 > --- /dev/null > +++ b/sys/libkern/divmoddi4.c > @@ -0,0 +1,60 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + * > + * Copyright (c) 1992, 1993 > + * The Regents of the University of California. All rights reserved. > + * > + * This software was developed by the Computer Systems Engineering = group > + * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and > + * contributed to Berkeley. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * 3. Neither the name of the University nor the names of its = contributors > + * may be used to endorse or promote products derived from this = software > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 > + > +/* > + * Divide two signed quads. > + * ??? if -1/2 should produce -1 on this machine, this code is wrong > + */ > +quad_t > +__divmoddi4(quad_t a, quad_t b, quad_t *rem) > +{ > + u_quad_t ua, ub, uq, urem; > + int neg; > + > + if (a < 0) > + ua =3D -(u_quad_t)a, neg =3D 1; > + else > + ua =3D a, neg =3D 0; > + if (b < 0) > + ub =3D -(u_quad_t)b, neg ^=3D 1; I believe you need separate negq and negr so that only negq is flipped here. Consider the four cases: +3 / +2: q =3D +1, r =3D 1 +3 / -2: q =3D -1, r =3D 1 -3 / +2: q =3D -1, r =3D -1 -3 / -2: q =3D +1, r =3D -1 At least, that=E2=80=99s what I wrote when I added __[u]divmoddi4 back = in 2019 for Debian GNU/kFreeBSD, my reading of the C spec agrees with that and so do my tests (putting the above four into godbolt.org). Jess > + else > + ub =3D b; > + uq =3D __qdivrem(ua, ub, &urem); > + if (rem !=3D 0) > + *rem =3D urem; > + return (neg ? -uq : uq); > +} > diff --git a/sys/libkern/quad.h b/sys/libkern/quad.h > index 452f331661b3..e6be1c7bde15 100644 > --- a/sys/libkern/quad.h > +++ b/sys/libkern/quad.h > @@ -105,10 +105,12 @@ quad_t __ashldi3(quad_t, qshift_t); > quad_t __ashrdi3(quad_t, qshift_t); > int __cmpdi2(quad_t a, quad_t b); > quad_t __divdi3(quad_t a, quad_t b); > +quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); > quad_t __lshrdi3(quad_t, qshift_t); > quad_t __moddi3(quad_t a, quad_t b); > u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); > u_quad_t __udivdi3(u_quad_t a, u_quad_t b); > +u_quad_t __udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *rem); > u_quad_t __umoddi3(u_quad_t a, u_quad_t b); > int __ucmpdi2(u_quad_t a, u_quad_t b); >=20 > diff --git a/sys/libkern/udivmoddi4.c b/sys/libkern/udivmoddi4.c > new file mode 100644 > index 000000000000..bb9b06917e2e > --- /dev/null > +++ b/sys/libkern/udivmoddi4.c > @@ -0,0 +1,46 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + * > + * Copyright (c) 1992, 1993 > + * The Regents of the University of California. All rights reserved. > + * > + * This software was developed by the Computer Systems Engineering = group > + * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and > + * contributed to Berkeley. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * 3. Neither the name of the University nor the names of its = contributors > + * may be used to endorse or promote products derived from this = software > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 > + > +/* > + * Divide two unsigned quads. > + */ > +u_quad_t > +__udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *rem) > +{ > + > + return (__qdivrem(a, b, rem)); > +} From nobody Sat Jul 1 21:00: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 4Qtl2N5Wclz4lCW0; Sat, 1 Jul 2023 21:00: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 4Qtl2N55FLz3s0n; Sat, 1 Jul 2023 21:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688245228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GaF33NITaxOgzyCVpYl2xpqkEYuy9tW+oxPi7afpVc0=; b=joCVzfJGV4ChyPr8FOP3S25tiM46inQoS6JvS770F5Vy/sDOjjqYW0TvsGPnyHuQzusyhX LrvPKwXIxBYsvcW0gDbsJJ3VFQi6HvQR1lfjegYEN2/CzeztueDLTYGFvImHL6q4irZYyC 49w9KGdCXayMegMIBtVx7ttGGwxp+rs3KzD58jEL0PA7b+4WMgrAi9sWxzFFohansO7bqT xfg/EZp63IOcQSs3XebhxhwaSaVeCiS8TI8LYtkx024sz6H1bRFOkWAxOzzAFoXxrbu2c9 DHZ0gHSo/ipDu/PLMt4eYg0auJQ+2G8PX7iZp20hjo//fGazUNaBZa99Wf+RXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688245228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GaF33NITaxOgzyCVpYl2xpqkEYuy9tW+oxPi7afpVc0=; b=gdcPcPB51Gvvv5pvCJXRm1/qCCt4djNVQ2tvy+LD5PRY7P/NM36Nu8Jd4hrmRLU7469QzV taOTDPy0f08p6HeUUxXRSLBfFpND+yuGcWShumf62z7tr71nnQ1/vxhZwqTOsGIMbo1Acc gh6wqkSpXBexibPerJFd3cSsYeCCxzix6v8WoHW0pSy7qdNnOd9zOmkUmxFWXNE2TGy7eg aO8GBfCq8G9bdEs0gFrhl7IbhYf0uqna9ZQD52RXbPWj9Qqs+sqz1NvIlcDohSAZN9RPED QYAe4Sh8CdY/d6jQuglEsFf7egW0BTCefIu1GgukNkmHmNNevkCNH5LnPKGhUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688245228; a=rsa-sha256; cv=none; b=qiLE1qYCzP3czTn/Wr7fk8ntgfQobTKAZdkorXTOC2lXvQ9kaKgKHfjhIeFFPdKMO7x8Hu bqVQ1tPLygc3jzueMFjvJ8X2W20YnL36CczT3VDjpbkPoKNpJ+w+SY/niZau4J6yDSQvmj gIm3aTQGPgYogzMXT+6XLMX6HFiDtiWTXib8FOSo0CFb4Q5m4cLLkANE5ogamQaBCM/4KG zHXJsRQmgRQRPOnksSbkwwtd8UyMT7Eoyn1Viyf7yjVXbfTQTVWmBVxJM9rItH9/EIldfu QpnSczftZ9Vt8rdS4C+SXXoTez73IfqNL+apzqFGUj7D/QeEe6NrS/vPVJ1PYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtl2N4BkfzgVt; Sat, 1 Jul 2023 21:00: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 361L0SIs028839; Sat, 1 Jul 2023 21:00:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361L0SN5028838; Sat, 1 Jul 2023 21:00:28 GMT (envelope-from git) Date: Sat, 1 Jul 2023 21:00:28 GMT Message-Id: <202307012100.361L0SN5028838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 5de9420ad540 - main - Create correct engines debug directory after OpenSSL 3.0.9 merge List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 5de9420ad540b5a13c8d397b19f0d12f54fb5dfc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5de9420ad540b5a13c8d397b19f0d12f54fb5dfc commit 5de9420ad540b5a13c8d397b19f0d12f54fb5dfc Author: Dimitry Andric AuthorDate: 2023-07-01 20:59:23 +0000 Commit: Dimitry Andric CommitDate: 2023-07-01 20:59:23 +0000 Create correct engines debug directory after OpenSSL 3.0.9 merge PR: 271656 Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9") --- etc/mtree/BSD.debug.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist index 7cc3ee4d77ac..147bfc7d1af8 100644 --- a/etc/mtree/BSD.debug.dist +++ b/etc/mtree/BSD.debug.dist @@ -36,7 +36,7 @@ .. .. .. - engines + engines-3 .. i18n .. From nobody Sat Jul 1 21:19: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 4QtlS54bKyz4lPGJ; Sat, 1 Jul 2023 21:19:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QtlS51nDXz3xpW; Sat, 1 Jul 2023 21:19:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688246357; 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=QXuTMKvQ8dSv5/FR7CcYTXIh45ZMVPi9984Thy8OVCA=; b=CK9XaR0bg7hdvXU6pz0XvpDaKsvTMjIL6/uK48T0z5HWuh+8LbSDUL4Xs4qTxevZY1xJOA PAM75KjLruAJYHIUQeinIkJVqQ7kZUU24vu8l737suzM4MsNJkG7biZ6q7NvgrsG0JcPo2 cUpb/UnPmyNAFys8TzyuDmLuf45nuqrGG7UiTdXMNeoS5s+87YY0MErD6f270A9RDQ3l/f SlfB6uDqUvh2/l0MaDIPc+j7TnbokRoWjvXqQnIz/AJ6jF4Ej4BsZJqkCGxqomkCdqJJEv Q5m1LEQer8uspQ55AAURZJ4HlsGQvAmhVHO1bYpdjAiqJkt0imJhBALTu/qYng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688246357; 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=QXuTMKvQ8dSv5/FR7CcYTXIh45ZMVPi9984Thy8OVCA=; b=hqHCbx/h+CZUnUphZ3e41f2zR+rcxEU3sbNuq+FPAZPyxBckuNZo/WhAQY4zCe0sSNHKF5 g9ENNlHs62EH4LKeDOG5eo3u65+EEyYJQoLCek7kiPd6y4TZ6cu5kSzwHpUQBS1k01cTb7 jGZdShjasM5RQOjKdAUR379GtAEv1DQwGZkeSatHYd3GVxxY2EajSDLpCQCwIw3m0MZ3UV v2FoT17qONcKfgLVP7agEwhHHp8GmbY3FKM55ECNnQscpATPwrmbGhxguPLLavZ9y1aohq 45LCi8AkPIFuixeH0/ZGXDqzpfTAG+det8Hrrf3rL6RpNcaRLJgbgqeQlw6i6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688246357; a=rsa-sha256; cv=none; b=d3npU3fN7SGyHdV2gN1ehOS2rklSxIj4/ow1s7+bMhm6WfVkm3RrHz3otrKgIY4fc5Xaai g0342m7bI49Xm/6UhbNqvDO1bfxAgyKxxlMjQ17ZnWXGxlZnzS8OBs3wEWAupKPY/0n+LO MjS1TEf5Hec9S9UBBOPNTAd+twPfe5Q8Nc7t7hLMQHfJYOteY/tiIEnzcushEI+XzbsjuD VMYHVwKKU1FClH3DhBkGZ0s2iGlIR5dp8dzM8Srw+MDKfXvWOptsHA3Gp99n9GnciUeWXo rtQ/wab7+lG+wW9ojIzV4RqtGbHCNkuDNGEN9C+XCYNoYwJ2QjX8trm5Nzdv5Q== Received: from [IPV6:2601:648:8680:16b0:9018:f799:cdac:ccb1] (unknown [IPv6:2601:648:8680:16b0:9018:f799:cdac:ccb1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QtlS450LFz1CGn; Sat, 1 Jul 2023 21:19:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Sat, 1 Jul 2023 14:19:15 -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 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202307011923.361JNMtJ070354@gitrepo.freebsd.org> <43225A5D-CBC7-4F1E-9B28-78A5A703FB56@freebsd.org> From: John Baldwin Subject: Re: git: da3096a92d2c - main - rdrand_rng: Build with -fPIC on i386 when using GCC. In-Reply-To: <43225A5D-CBC7-4F1E-9B28-78A5A703FB56@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 7/1/23 12:43 PM, Jessica Clarke wrote: > On 1 Jul 2023, at 20:23, John Baldwin wrote: >> >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=da3096a92d2c1c06b25613444d9b369475d50321 >> >> commit da3096a92d2c1c06b25613444d9b369475d50321 >> Author: John Baldwin >> AuthorDate: 2023-07-01 19:23:00 +0000 >> Commit: John Baldwin >> CommitDate: 2023-07-01 19:23:00 +0000 >> >> rdrand_rng: Build with -fPIC on i386 when using GCC. >> >> ld.bfd requires an R_386_PLT32 relocation for calls to ifuncs >> rather than R_386_PC32. (lld permits R_386_PC32.) > > That’s odd and doesn’t quite seem a sufficient explanation on its own? > PDEs can have IFUNCs just fine today, so why is it different for kernel > modules here? I don't know. I sort of assumed this was related to the fact that we have custom weirdness for how ifuncs work with amd64 kernel modules (though I guess that shouldn't matter for i386 since I think that's due to amd64 not using DSOs for modules?). What I do know is that ld.bfd failed to link and said it wanted -fPIC. It's also been a while since I first wrote this commit and log message and I don't recall the details of how I had come to that conclusion. Searching now I did come across this bug report for binutils which might suggest that this might actually be a difference in the assembler behavior: https://sourceware.org/bugzilla/show_bug.cgi?id=27169 -- John Baldwin From nobody Sat Jul 1 21:44: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 4Qtm0j030yz4jvnM; Sat, 1 Jul 2023 21:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qtm0h6Kh6z45sh; Sat, 1 Jul 2023 21:44:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688247844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8n4/zVOk2YdRgFiAIn0VIYp6ZWA3QDWASxCAQ/GmE8=; b=miOVOvVFmfQ8L4mv1UvB2UW2N57fC+9JTWeMywoEbK0mhpPobGjLR5fglW2rYr15tFAsYf 0E+7rZSd6eCQZOlkPWpODbH73nFrkZtUhB11Eiz0Xftj+3v372MfjBEVuGxCAf0yRutBIl b6waidnugoVVscMo0orO9H46zTFe8/G0P/AjO992pZYtOJmKp1OSGND9H4WDDO8a4uK6rH +HhaNU0wWZyh0P5LsWSpymsPnKbPy/0cok3g1d1qNM0gmUXFRC3Y0fUBnY0UJuaIh+//4w Z6t2WrnnnvEIhLd1oRWk8ClgAOZvYu6UrrIwsm2ZwMs5fU6mjTxzvTBJMG+mlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688247844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V8n4/zVOk2YdRgFiAIn0VIYp6ZWA3QDWASxCAQ/GmE8=; b=B/OV9BVVfOZdQ9u93c4zQtm1pk1Y22GhUnb2+ZgpvUpV0Kkn667GyIF8gcVttfsnowZ0Cu wiuypoYCJ6NNJfv5RvlRj6cAXahbgIGhs0+K9fE/kUNkHq2h5rYjv3uyijnFxwE1Qn2pfu mZvQLI6fkaxfXu+oxZvG8fp01EUp2AqeWB28qDZ5qRxiUS3ZWeACH/ewPtNPQYB188EA53 gLjxkYN5ihrQ/TlYclNaKMeev0hdSYEi6kmo4/DhQFDnRMM3t2Je9CzGGE0HNOs23iBdQf IIDqgLJ6BmBxtLkz3ZUBJMQWwzZpq1AaZCISdS6NFijn/56tcT7XNa+kqBSoGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688247844; a=rsa-sha256; cv=none; b=ZqTjE45FDk7bMgukoBM5mchVWKESj2mbgiiCJQQa2c75D7zV+XCTURXSt5BCIhQiFqnox8 tzfk+jTP4GzIgFulrimPhw9hfWX3nUo/xCRI2Y3QrdWORXhr71BQqiSYiiXKV9WcMTRuxL hP8obsgaNmVNOP9vCphqbH0kDPL1Xjm9A7Xn21adgnwF3kywfUGqJra0mEbU4NNo7A+2fa 9tsDhsFpaHqoIS9iXqDS6FJflcjigQRxWupLY14YVEajtr8Ds4CQ+PvjbGxAuP8XUMkPv0 CEP5KoivKr8CmV2vPpHNTDM63jWy6ok38FP0siIxMP1wHYFFkKag61KtxI0pWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtm0h5NZgzhmf; Sat, 1 Jul 2023 21:44: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 361Li45t001612; Sat, 1 Jul 2023 21:44:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361Li4DX001611; Sat, 1 Jul 2023 21:44:04 GMT (envelope-from git) Date: Sat, 1 Jul 2023 21:44:04 GMT Message-Id: <202307012144.361Li4DX001611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: df11fb9bf042 - main - divmoddi4: Handle negative remainders. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df11fb9bf0421ad11cfbc8834ca393a1a0c2748d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=df11fb9bf0421ad11cfbc8834ca393a1a0c2748d commit df11fb9bf0421ad11cfbc8834ca393a1a0c2748d Author: John Baldwin AuthorDate: 2023-07-01 21:43:41 +0000 Commit: John Baldwin CommitDate: 2023-07-01 21:43:41 +0000 divmoddi4: Handle negative remainders. The sign of the remainder matches the sign of the numerator in C. Reported by: jrtc27 Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D40832 --- sys/libkern/divmoddi4.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/libkern/divmoddi4.c b/sys/libkern/divmoddi4.c index e5bd81a90ad7..7c0a6a690f24 100644 --- a/sys/libkern/divmoddi4.c +++ b/sys/libkern/divmoddi4.c @@ -43,18 +43,18 @@ quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem) { u_quad_t ua, ub, uq, urem; - int neg; + int negq, negr; if (a < 0) - ua = -(u_quad_t)a, neg = 1; + ua = -(u_quad_t)a, negq = 1, negr = 1; else - ua = a, neg = 0; + ua = a, negq = 0, negr = 0; if (b < 0) - ub = -(u_quad_t)b, neg ^= 1; + ub = -(u_quad_t)b, negq ^= 1; else ub = b; uq = __qdivrem(ua, ub, &urem); if (rem != 0) - *rem = urem; - return (neg ? -uq : uq); + *rem = negr ? -urem : urem; + return (negq ? -uq : uq); } From nobody Sat Jul 1 21:44: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 4Qtm0k0RFFz4jw1w; Sat, 1 Jul 2023 21:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qtm0j71X8z45t4; Sat, 1 Jul 2023 21:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688247846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J2S4m9exmOs0Bmrxkf7+Y8VlKnA9l0/FlTG1enYMV7M=; b=V0G6woT3KrpL0s9wZ2KHkeMjILx1EH56SWTjl/IAK5EkiQ5YpcXRH/NlICqsmmsXrfa2gZ yFJMj3nYEIaiUZrpnkpd8ZPbxkc0yerVEM2AZqBJ9E4e1GXo1k+vsUJWaIkyX1xgCETWve aOSEbxLTfo3C5cu4vKSQTiRYFqgFzhrfMGUTLyVudsAWkSLA7btA0ZkBnaNDTDVBIxc468 5L+2VHZ8dcND/iC0fddLgFnf0swMubWKp54yia0w76GFATnqQBxMDjWPvHNnFLdsg3APpT WGk3kn/v1Wwb3TMbYVZ0FWcbsOXHBsNci3KDCPJh8Ee255oYtR2FIZXriW4Uhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688247846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J2S4m9exmOs0Bmrxkf7+Y8VlKnA9l0/FlTG1enYMV7M=; b=SJvDEIh7NRA8Y4H3wLJcXu3uhgRFLpwEzBqACBRAltG3HAYjc/+T700u8FAR0I2pGnaQFB Xcoy9D127/OpYkRp8k0DztforFZsxAEQhqohNp4+YkGvh9FFeM1zkLF4THZMjWvjkB2k1d ejB43EF7nyqaDL2EbBZRctn2csmrWQHXUpznThnm2J8ICgXKnZPIfTLhMx1R5yg6irlUId boJ+CmdZ1RP3o0YqdRA8JwzVpDy1Rpr3ozU5qq74KTMNNUzlNwRS1mR5QjI9E+VhnEcEsC GiuBwJNIS8YQJTqleXZKfo4XTssnxY6S8RNsXNgnHj5HlZg4nsaMD4ANd/qRlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688247846; a=rsa-sha256; cv=none; b=rj79w50ey1/6uexACmkKy8/vAwBbbrkM0D4s78mR4Eg4and8xg65zqX7SXQBHWCwNb9+1f vhmkk6IjfNkqL0FdW0SO0nBy/bRu+fMIN2Ldlal7n0fCVyw65P0I/hmOLPsOu62vMiuqsc k5N8y6ox2HBZvakYhJ+yupn2cCDKPTJzdFbecge+RsdpBa77mAS9i55kdWTG1WBsVDR5Ul D8/l+/kIDWf36Goxp9YPqNU/NSDm2rt6PqNdpAlxFunChKkDuAMpY1mD6c/ZVy5r3OcsEb N0J7kuURmY1DAfMhGTAtbvpPmqDbAcgVZXRjqWvXBt9Rd8RcYQsfwfwb6mdGFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qtm0j61yVzhmg; Sat, 1 Jul 2023 21:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 361Li5qx001631; Sat, 1 Jul 2023 21:44:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361Li5io001630; Sat, 1 Jul 2023 21:44:05 GMT (envelope-from git) Date: Sat, 1 Jul 2023 21:44:05 GMT Message-Id: <202307012144.361Li5io001630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 84deca4d8ca2 - main - libkern: Trim OBE comment from divmoddi routines. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84deca4d8ca2e188b233a45d503443b17088c788 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=84deca4d8ca2e188b233a45d503443b17088c788 commit 84deca4d8ca2e188b233a45d503443b17088c788 Author: John Baldwin AuthorDate: 2023-07-01 21:43:53 +0000 Commit: John Baldwin CommitDate: 2023-07-01 21:43:53 +0000 libkern: Trim OBE comment from divmoddi routines. -1/2 is defined to be 0 in modern C. Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D40833 --- sys/libkern/divdi3.c | 1 - sys/libkern/divmoddi4.c | 1 - sys/libkern/moddi3.c | 3 --- 3 files changed, 5 deletions(-) diff --git a/sys/libkern/divdi3.c b/sys/libkern/divdi3.c index 11c34ed72fa0..8e04a81abdba 100644 --- a/sys/libkern/divdi3.c +++ b/sys/libkern/divdi3.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); /* * Divide two signed quads. - * ??? if -1/2 should produce -1 on this machine, this code is wrong */ quad_t __divdi3(quad_t a, quad_t b) diff --git a/sys/libkern/divmoddi4.c b/sys/libkern/divmoddi4.c index 7c0a6a690f24..af0013532882 100644 --- a/sys/libkern/divmoddi4.c +++ b/sys/libkern/divmoddi4.c @@ -37,7 +37,6 @@ /* * Divide two signed quads. - * ??? if -1/2 should produce -1 on this machine, this code is wrong */ quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem) diff --git a/sys/libkern/moddi3.c b/sys/libkern/moddi3.c index 0e93b7d9f6eb..0dbff4bdce89 100644 --- a/sys/libkern/moddi3.c +++ b/sys/libkern/moddi3.c @@ -40,9 +40,6 @@ __FBSDID("$FreeBSD$"); /* * Return remainder after dividing two signed quads. - * - * XXX - * If -1/2 should produce -1 on this machine, this code is wrong. */ quad_t __moddi3(quad_t a, quad_t b) From nobody Sat Jul 1 22:59: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 4QtngZ3ZKrz4lDWq; Sat, 1 Jul 2023 22:59: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 4QtngZ2lBmz3DNh; Sat, 1 Jul 2023 22:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688252362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cdrmacf2b2Y7NPToJJJQzb+tzafsIwX5OQtWWia6pTY=; b=taRGyKB0Z9XlZh4UNcB8zcj04S4Di83uYzudWinculrcVlCYuryhx7aKtkvpl0C1/pyF55 6PXJ7nXc/X8MxNJyjaiuAesWiRtI05e94U9PhsZBHcOGCZAwa5JQc4uQCgiKfOabjExfKc 1RXLv1jnC0wBz85aD8+uWBsO46gmvdzmHsj+Wcni3Tjg5OH66zTGJ8JvDjQrf/LGSvtwj5 GNMDGQMdNaFe0TmhNsqaRnxLFA/JgDmjroTcZOnDROD6sSTW4csUW9+HoV1uj1FI7umR46 /tL5epTF1mFdHOANTZGLwbOhZFHmMxnoUbnTo7drFngYX+Y/SCCiw23fZjLDQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688252362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cdrmacf2b2Y7NPToJJJQzb+tzafsIwX5OQtWWia6pTY=; b=vXkdo2tQTvSghajDRuXZhRvuPAv5OeIad6EMVPosfTVfshdYxzx6ELFxeMg9a2IZxVDEsW FKwWzLZvc0utGKAQGNxIEffNpS9VcwJcsx18/ROkcRlsRPQ1Vgd3AAx37oThbSjftKKTfn eoOjeCxKkY94QxJBFucyJG4RinP9s1VLZFm8kBQn7Yz1tH/mgkP7sPi8FVii4Ci0xrhpmg 5WRJsns4v5kSNHsy9IxOZVgqVPmclsA6uagpB56xUi1++IF6QTSiYEWFe6pqvJdPNYi2XN Xa1uxdfhtyAs89QYpL9bLCsTLabz5xeph1XtUSBSBgf2ziWo1Ju+dEcx3AlI9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688252362; a=rsa-sha256; cv=none; b=gT90ku1rcIUVCrm3eCeI7aB7ZKeluv/xQVA0jvWEAVvw/eI5xc9KkMvoX/GRCstya15NWQ TQxlf/DsXlnTKwr0p3GpfgCqAVdh3oS99Yp5fu5WuMjbo2dwOlEJaE4nhGMbFpqdtnBhcQ SP430EKh224roxXMcErWQr9trzAXm0TcVYaPRnSMYyMuaw1BoDt2SKuTGrUdzpzlqDXfkG 0oOqyTO29og95TYQUfJGMmJwJzZtKtJzzmBOb/gce2eSGaYzTw2ExrCQnumt8KxGWuCS8r rrveaXbuMzudwD6sKhgpukDRFY5fb6fYRRnH2T/uSlfO9tLsWwcG4GQaE4LjVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QtngZ1q0FzkRw; Sat, 1 Jul 2023 22:59: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 361MxM85017091; Sat, 1 Jul 2023 22:59:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 361MxM4i017090; Sat, 1 Jul 2023 22:59:22 GMT (envelope-from git) Date: Sat, 1 Jul 2023 22:59:22 GMT Message-Id: <202307012259.361MxM4i017090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 005aa1743b42 - main - modules: bzero the modspecific_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 005aa1743b42b52fbd49b9d5ec44816902b6ee9f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=005aa1743b42b52fbd49b9d5ec44816902b6ee9f commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f Author: Ka Ho Ng AuthorDate: 2023-07-01 19:41:53 +0000 Commit: Ka Ho Ng CommitDate: 2023-07-01 22:58:46 +0000 modules: bzero the modspecific_t Per https://reviews.llvm.org/D68115, only the first field is zero-initialized, meanwhile other fields are undef. The pattern can be observed on clang as well, that when -ftrivial-auto-var-init=pattern is specified 0xaa is filled for non-active fields, otherwise they are zero-initialized. Technically both are acceptable when using clang. However it would be good to simply bzero the modspecific_t in such case to be strict to the standard. MFC with: 2cab2d43b83b MFC after: 1 day Sponsored by: Juniper Networks, Inc. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D40830 --- sys/kern/kern_syscalls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c index 234e51cfd280..0b51edf5e985 100644 --- a/sys/kern/kern_syscalls.c +++ b/sys/kern/kern_syscalls.c @@ -173,9 +173,10 @@ kern_syscall_module_handler(struct sysent *sysents, struct module *mod, int what, void *arg) { struct syscall_module_data *data = arg; - modspecific_t ms = { 0 }; + modspecific_t ms; int error; + bzero(&ms, sizeof(ms)); switch (what) { case MOD_LOAD: error = kern_syscall_register(sysents, data->offset, From nobody Sat Jul 1 23:13: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 4Qtnzw16TTz4lMQq; Sat, 1 Jul 2023 23:13:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qtnzv54BRz3HWr; Sat, 1 Jul 2023 23:13:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 361NDGFC088967 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 2 Jul 2023 02:13:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 361NDGFC088967 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 361NDGGw088966; Sun, 2 Jul 2023 02:13:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 2 Jul 2023 02:13:16 +0300 From: Konstantin Belousov To: Ka Ho Ng Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 005aa1743b42 - main - modules: bzero the modspecific_t Message-ID: References: <202307012259.361MxM4i017090@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 Content-Disposition: inline In-Reply-To: <202307012259.361MxM4i017090@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4Qtnzv54BRz3HWr X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, Jul 01, 2023 at 10:59:22PM +0000, Ka Ho Ng wrote: > The branch main has been updated by khng: > > URL: https://cgit.FreeBSD.org/src/commit/?id=005aa1743b42b52fbd49b9d5ec44816902b6ee9f > > commit 005aa1743b42b52fbd49b9d5ec44816902b6ee9f > Author: Ka Ho Ng > AuthorDate: 2023-07-01 19:41:53 +0000 > Commit: Ka Ho Ng > CommitDate: 2023-07-01 22:58:46 +0000 > > modules: bzero the modspecific_t > > Per https://reviews.llvm.org/D68115, only the first field is > zero-initialized, meanwhile other fields are undef. This is not true. > > The pattern can be observed on clang as well, that when > -ftrivial-auto-var-init=pattern is specified 0xaa is filled for > non-active fields, otherwise they are zero-initialized. What are non-active fields? All fields with implicit initializers "shall be initialized implicitly the same as objects that have static storage duration." I do not think this is required for padding. > Technically both are acceptable when using clang. However it > would be good to simply bzero the modspecific_t in such case to > be strict to the standard. > > MFC with: 2cab2d43b83b > MFC after: 1 day Min MFC period is 3 days. > Sponsored by: Juniper Networks, Inc. > Reviewed by: delphij > Differential Revision: https://reviews.freebsd.org/D40830 > --- > sys/kern/kern_syscalls.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sys/kern/kern_syscalls.c b/sys/kern/kern_syscalls.c > index 234e51cfd280..0b51edf5e985 100644 > --- a/sys/kern/kern_syscalls.c > +++ b/sys/kern/kern_syscalls.c > @@ -173,9 +173,10 @@ kern_syscall_module_handler(struct sysent *sysents, struct module *mod, > int what, void *arg) > { > struct syscall_module_data *data = arg; > - modspecific_t ms = { 0 }; > + modspecific_t ms; > int error; > > + bzero(&ms, sizeof(ms)); > switch (what) { > case MOD_LOAD: > error = kern_syscall_register(sysents, data->offset,