From nobody Sun Apr 16 00:27: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 4PzWGR35TMz45NVd; Sun, 16 Apr 2023 00:27: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 4PzWGR1yq8z4FFT; Sun, 16 Apr 2023 00:27:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681604831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7OwjAAAS2SL+1vrsuWAsLmYyAkhuhcOCDpYYEZET4XU=; b=C6RH6VuhUURVqFbVZwQiIN/94u0g4nWPhalMMyWdQEMVVy4bKPys3KUBEDXqFrQz3paohh 4uSU+ecR3PPJ74j4mFJbGQzx2s34+5QfCegkjmhmVgxSNd8a39aeLzcVUG7dnrppjYbTLC HxAkdzBZw0WrDV+H5JWP82HblI8FHd59VbjVYhgl8xvdLzq4b9MN3AQcGZh15V4J4TgFlt OCcn2tkzNp/eiJbhCa33jTILpr6o8SRD3Q04/v+SrB2EYpbklWP86AsmecMQjGOTU3q7Kz daM/D9gBsUprPxdMg1iSlN3Go3ccyvXas0wLuu0udDyVo9PF2XmaQExwHO4ofQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681604831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7OwjAAAS2SL+1vrsuWAsLmYyAkhuhcOCDpYYEZET4XU=; b=r9tERIC4emjEPfMUC4SBo5feuca1gezWf47E1ZcHW+pRjBMRI0dmtRrVZp0ITCU0U2uwoj tyI98EsLPy7p21CoIwByEqZR53JmZw3kX0QWiIGuZW2/WQdLxaoT8/ZtGTWpT/0ITdDuUB fDjWGqg3yWDg8BMUvpZtQvoE1GT0gRimz0hRECQrqoFW0dCXu4Toj5CG9RzXgxyt0YyKKB 1XUhdL68Dv8Z25a1hEV/4+vapKGOCeYPlDiT2vH2+OeF4WGbulxWFa2qSpODQQTZmP0BDP pEz/EPgDdxleq3G0gjLaVjijFcj75b2/LptcRTdgkQA2rkF5aHZaONS9dBpnhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681604831; a=rsa-sha256; cv=none; b=AWouEfu0tC2cSi02z+vf5VYGcrK3WsrMu/zWK6ZLlTxtD4GZfHJhhE94zt166ujQe8SBQ3 W6pXYP+/VWuqu5OX4uFtttSyR50cZ0FcXPMbkrjPI4ynd/ChZ4sKY2ViLxrFfYgsZY9XuS JuAfzMIp6hmaa2WkORzH2h6Eu55im+saFd+vuXEOJDARE3hxUKlYJM7Jl+3r44jsRexHIY vbG/jFGE+o1J3w1LQupRQ7UkPLoQP/+M+AW0M06OmMlXSjnNalrTktdWqm/i1I3XWypxyB Qwb66zp6wQzDdVq/uW3UpFw+pqQ33y/+WGQhaMBz8WWV+Wh8u97BQDl8rQ7HbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzWGR12VszRlM; Sun, 16 Apr 2023 00:27: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 33G0RBLx083687; Sun, 16 Apr 2023 00:27:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G0RBCC083686; Sun, 16 Apr 2023 00:27:11 GMT (envelope-from git) Date: Sun, 16 Apr 2023 00:27:11 GMT Message-Id: <202304160027.33G0RBCC083686@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: 757fc6666b87 - main - cam: Include stdbool.h for userland List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 757fc6666b876bb4cdbbc6fab735faa228d15489 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=757fc6666b876bb4cdbbc6fab735faa228d15489 commit 757fc6666b876bb4cdbbc6fab735faa228d15489 Author: Warner Losh AuthorDate: 2023-04-16 00:25:00 +0000 Commit: Warner Losh CommitDate: 2023-04-16 00:25:22 +0000 cam: Include stdbool.h for userland Sponsored by: Netflix --- sys/cam/cam.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/cam/cam.h b/sys/cam/cam.h index 6bec8b46f417..721ab6b7d865 100644 --- a/sys/cam/cam.h +++ b/sys/cam/cam.h @@ -38,6 +38,9 @@ #endif #include +#ifndef _KERNEL +#include +#endif typedef u_int path_id_t; typedef u_int target_id_t; From nobody Sun Apr 16 00:27: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 4PzWGT3jHDz45N36; Sun, 16 Apr 2023 00:27: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 4PzWGS2q9sz4FPp; Sun, 16 Apr 2023 00:27:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681604832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1whr6VIFfVoKwBkItFZP7KjFNGgkZtbHY1fHnf9txs=; b=PvjQuwAHq9gwb4c4+OsyRvieErYvgcj2HoJPkCa1Iwh+p6M7gAlJj0Hv9qDEE8TVDTdl4D SYohrP+j98eHgG1s8IsrxBigWBLNjq8OGxbgeh9CCUTOof5RvKWjgN2QlYr7XwD2uCyYMB x8xw/tvLSvL5+O38ywlaCv6yrMtAPwaiKkc1f21cTqU3LBZqr9ZH8VVWdR+HO2o2vKJBUg ihmRlFB8R45MAY+YjHizfgti0k5VSRVl9qZHNk+u6x6olQr1/bzWNApBrj0uitru0kiJni ryIjXXvjCG5Fu0IOmDroO/VQHHe0zDT/bMMhEBRxPj+C+x5EXxCw4KnJ8iCYCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681604832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1whr6VIFfVoKwBkItFZP7KjFNGgkZtbHY1fHnf9txs=; b=ylk5KfbbU9xJw+Y72CNTG7BVEOuO6V+cjkWmpHffaud6h7X8XZgY51ab32vOmf/zg/UjMQ +MFUDiADmN89F0rCbcQEC973W7qwPs3MT3sapCLyTStZ1gQJy2YRYnbsc85HK1zbzyx5to pztK4EJGn8bACcng20JkCmskWcL+jc7LkitwOb3H+rF7QxSN08BA9RQ6XaghdMkPgbuXnr rIbF0Vk6ucuIZ17fhedZtjKOw56+CcVoOUQDcOJhvr+fYpkZ26ahrZu+92qRtuI6tm3SDt c2w0zHMxHxmYgTqzha42MG47RKTVEGlK5+DJeeJn4ZDZrMbp0T6ZFLOvUE0u9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681604832; a=rsa-sha256; cv=none; b=FkckezBFRvkrS1CaVAO/p0L/vqssddHHQAvthc/dLrm2tqBo0EcWVM5Ai3gQDyaPxo4guT S9OPYH2KRLed5aFV4gWeqtJ0DeBS69Er7M2rrjA0CtqaIyKNqzmsL1DEp0tC6osU56LSHu QgV/TXtE7RETXBxgmDkq/KUrsiqvFdy8nFjXVIBievGO8an91EUYa+qUlkEzrr+epD4qmY s1IY+AfCFUuw02eETcwM+NWguHhXb8hLVqlJn9Xo7R+lgu64BjRm1MUikwRtjdUv1Rh03K fi7fdrrC2VMNO65lTTbrbf/8KHI2dxwFy8HxZgQ8aibKYqKA3PqFL5eSB/aZ4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzWGS1v5vzRfr; Sun, 16 Apr 2023 00:27: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 33G0RCF9083706; Sun, 16 Apr 2023 00:27:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G0RC1X083705; Sun, 16 Apr 2023 00:27:12 GMT (envelope-from git) Date: Sun, 16 Apr 2023 00:27:12 GMT Message-Id: <202304160027.33G0RC1X083705@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: 214909d6698d - main - Revert "cam: fix up world compilation after previous" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 214909d6698da52cb8a2c4c0c591264aeb58b4c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=214909d6698da52cb8a2c4c0c591264aeb58b4c0 commit 214909d6698da52cb8a2c4c0c591264aeb58b4c0 Author: Warner Losh AuthorDate: 2023-04-16 00:25:55 +0000 Commit: Warner Losh CommitDate: 2023-04-16 00:25:55 +0000 Revert "cam: fix up world compilation after previous" This reverts commit 1d35493e4661. It was the wrong fix. 757fc6666b87 has the proper fix to include stdbool for userland. Sponsored by: Netflix --- sys/cam/cam_ccb.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 07ccb262023d..a6b12b6a3584 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -1516,13 +1516,11 @@ cam_ccb_status(union ccb *ccb) return ((cam_status)(ccb->ccb_h.status & CAM_STATUS_MASK)); } -#ifdef _KERNEL static inline bool cam_ccb_success(union ccb *ccb) { return (cam_ccb_status(ccb) == CAM_REQ_CMP); } -#endif void cam_calc_geometry(struct ccb_calc_geometry *ccg, int extended); From nobody Sun Apr 16 02:40: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 4PzZDJ2YCgz45bYl; Sun, 16 Apr 2023 02:40: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 4PzZDJ1DGQz3QyQ; Sun, 16 Apr 2023 02:40:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681612832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYUtE5lXHeREZYba6faeEOsnqha4oUykxVzlFxcD7AQ=; b=X+/17sVKK4N9szWogVbHiKaQkXBckuWD+SDZ209qe2duhRKm0p2AdLz+H4Kap2TIgk1c/E DooqXKA0xc+HXseFGcRCjw0WKeVM1rv8fyKVS/mGMR0gHRaYtyIz4kX/iBqsbd0Zxn+VEE /7irFSlO6RA/j3x+DpgYGMaKYovvbffP/aYPsAOuD4NWI6jQU9YiN/Eq5K/8VabWi15Q6i LyBqEz7S+Qa/+uOp7GYHHd03X9HD396WvLOs2KIF7g5DtDO+V487W0U2yrKvr9pirqA4Ap D+NdkbmPfzKt6gUvGBLfi67R8xNueXZgUPwYF0ZBGn2PdMS3oIgaRl1zxg6EBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681612832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYUtE5lXHeREZYba6faeEOsnqha4oUykxVzlFxcD7AQ=; b=oy8+chXxaXeq6cC0zmViVHoidzxfKyeuurduY4cNmoPdnfcRUP2V+vhNnb4Oxzn9Ok6HG4 fPqitq51aczlId+xiKiN9SC7VLXAarqj2FDdc2EMdxqbUpidK5FpxFopjzKLzOEISjKMom nLdJCr0qbDGfrxkt79d0Y4Y1tk7qLewuPxj1Fm3nKgkli0PliFH3mnhBEFawXsxYm8SXCW WCE+/EQHBXAYGCxNa/c6O33yIsxfmzXSvapK4emv+lseH9pQaROf1oc4l+0PfVEFMK81UD xPCKLrO7q3ukEcaEAzweeny1oqzlcoXvw7znNbgIyyS0mTwXQ33l/+6Q/Sbl+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681612832; a=rsa-sha256; cv=none; b=xc/Qi3fBdB8zwumS998/wbc2X7j92+HTQqmGCB+/6ofAO6yr2RJEbY6PIGB/5PHD+FEo7H cLtzOVF9Vsmyj8xtnrVlcyFjPVJab/23oqfG+w6OJ28UECBNjTwiaovGS+bEq3IgHpShfu m/c21rx7tDJs8eRuQhOQDNDjde+Sxq+vaEVIrm2YKWUWMo2aKDjapMDzAoM9ATcSDDh+oB l5HggcLDXpATAVve6daDoeibIkoEH47VnFfGJA+G6T7x3/+RZ13D96odMQo0KW1gHVMqXo wAYwhyznCoZiB86KISjDio6sGqrYzYsp/UmUfAU4cZR+k/+QMT1mFagOoZW00w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzZDJ05z5zWC3; Sun, 16 Apr 2023 02:40: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 33G2eVOc005732; Sun, 16 Apr 2023 02:40:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G2eVmI005731; Sun, 16 Apr 2023 02:40:31 GMT (envelope-from git) Date: Sun, 16 Apr 2023 02:40:31 GMT Message-Id: <202304160240.33G2eVmI005731@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: d7584aa09fcf - main - loader: lua: unload the kernel when changing BEs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c commit d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c Author: Cyrus Rahman AuthorDate: 2023-04-16 02:27:53 +0000 Commit: Kyle Evans CommitDate: 2023-04-16 02:39:52 +0000 loader: lua: unload the kernel when changing BEs Usually the kernel is loaded later, but there are circumstances where it could have been loaded earlier than changing BEs. Unload anything that is already there so that we know we're using artifacts from the proper environment. PR: 265471 Reviewed by: kevans MFC after: 3 days --- stand/lua/menu.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 400dbf3d469b..4a326cb54bb9 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -58,6 +58,9 @@ local function bootenvSet(env) loader.setenv("vfs.root.mountfrom", env) loader.setenv("currdev", env .. ":") config.reload() + if loader.getenv("kernelname") ~= nil then + loader.perform("unload") + end end local function multiUserPrompt() From nobody Sun Apr 16 02:40: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 4PzZDK5sCdz45bQx; Sun, 16 Apr 2023 02:40: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 4PzZDK3Ypjz3R2G; Sun, 16 Apr 2023 02:40:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681612833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTJh6RpSGor4Kk2kK8QVxzqgy22/LMG5jeo1yN6uE0o=; b=MAf6amiKnt8K8068hDw3Pq43Pa2Jh0HcseSNPLWXroymFOeQKhkjJ2W7ANPfQijd4PMi9H GfYsqXWviRBAkk8BuGlKufeXw9eqTUcI5YrvaT3FG3HJiB/Hh3xX5OfM/i+TkNkFGwerN/ 1I/41AGwGMvOp+2Koow85DjtytYcQBhCuvEHE8RqnkSTCbKJ09HiS0IuNRDEkm6rle6SaN Z2WCIfYivLqFfkXj/PU8Pjm9P7fTapu1cbaDbuQ0N7Exz3yNuLXH5QrQkzEBxJgODBSKtv eMVNZT1iryLeaufinAL/9aebGXxyg21WHiU7J1dMKwFWUXyhNQuy8yMH8p7xOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681612833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTJh6RpSGor4Kk2kK8QVxzqgy22/LMG5jeo1yN6uE0o=; b=hr0Oq6pdiKTxSa9tQzWPvkF9cqx/HD8hkJJEQMcRoozNe1lMnrarvN++ttj+9+8uKRc1L0 VKlZAF9h5XKgET2sDwl7fyR/og5n2bWPTPjqvVEMXDPmWhbK1Wiaw4kS9ltHnnUwFnBQfQ Y4TfDcsHRkxysH0uyIzoyMWwIMXsIHGatOMzMleDVxpQMrJy77NAvDKb0G9t/ZMSe+J/8L uS7vO4bkUq4AF8JwXPFMl1aE2AWGVuY/aOuzChBBWyoyvnWzB+D5RvFr7OUVLiVQNM+VMz D5lNvfYvjqxQMk5w8LSrmVYm9lIE+1UUqpmoAtGRiri/lrHsfQGdcW6i/W4epA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681612833; a=rsa-sha256; cv=none; b=YcI5AM6TvUQZmkxRPbs+qOEcEzKcbi9hlYTM1t5QgdjBF7h7uvC1XW2UWELLTqywFGn5xf OI8PjLkHSLLQA1Q3GIab4SIo0q+chAaXUGY/OsA11GVV7oxRpIZhQlpKaQRyWKR1EET70e Ked2moSs3gCf3TnODfemnw+3ybS34NJtLvgHzc2z6k7/y381k88ZMOAjkTBVlh+eesBS3X dNsFknt2eET6uwrq3p4k6Mjrdn1vsd+Ze5R7mcPHFK9WolaoOJor2SU/8X+hoGUvWnNoHg dPmuYTIde/DAuh9/AiwYwZDvCgFNYzgTr12JifkQN0Ek/MlhIkq/8bS9i+cjRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzZDK0YzdzVxh; Sun, 16 Apr 2023 02:40: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 33G2eWSM005753; Sun, 16 Apr 2023 02:40:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G2eWJU005752; Sun, 16 Apr 2023 02:40:32 GMT (envelope-from git) Date: Sun, 16 Apr 2023 02:40:32 GMT Message-Id: <202304160240.33G2eWJU005752@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: 0ab68e9272b5 - main - loader: lua: disable autoboot timer after password entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ab68e9272b573becdb42edf2b4419cb7ab04707 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0ab68e9272b573becdb42edf2b4419cb7ab04707 commit 0ab68e9272b573becdb42edf2b4419cb7ab04707 Author: Cyrus Rahman AuthorDate: 2023-04-16 02:30:41 +0000 Commit: Kyle Evans CommitDate: 2023-04-16 02:39:56 +0000 loader: lua: disable autoboot timer after password entry In the lua loader, if one sets a password in loader.conf, the autoboot_delay timer will start before the menu is displayed. One can interrupt the autoboot and bring up the menu by entering a keyboard character before the timer expires. If this is done a prompt for the password is displayed. Entering the password will bring up the menu, but the timer will again start and another keyboard character must be entered or autoboot will abort the menu and boot the system. PR: 265472 Reviewed by: kevans MFC after: 3 days --- stand/lua/password.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/lua/password.lua b/stand/lua/password.lua index 8edd4edd7ec3..3aea8e80bae6 100644 --- a/stand/lua/password.lua +++ b/stand/lua/password.lua @@ -135,6 +135,7 @@ function password.check() local pwd = loader.getenv("password") if pwd ~= nil then core.autoboot() + loader.setenv("autoboot_delay", "NO") -- The autoboot sequence was interrupted, so we'll need to -- prompt for a password. Put the screen back into a known -- good state, otherwise we're drawing back a couple lines From nobody Sun Apr 16 02:53: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 4PzZW66xN1z45cFV; Sun, 16 Apr 2023 02:53:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PzZW62vSWz46Kh; Sun, 16 Apr 2023 02:53:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681613602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dql0xB4mJngmYk1zzyF+jQ9w6TFlNYal2kFygFxlXno=; b=In/m8iK+SLbMU0kJl4lL0QotIZhkjEMx3h6QF/DfNsmbKqSZprJR07VK4w/Skw8oVPOeFW 5TG2CS2ZEN42KHdJTVvzetHpBJ6hPLFGzNPgJgyE1T1hyUwtIHmEmjhnhGN1TLHiyYej+q RBX2AZ1PSyi102sMHEQ1M/xcm/DPi1J2mpi3ERrDauobLqvZCp4aSs7cc9ucw6VPfsIq45 IMBh8ghrdC4vprokRltX32OCvwH1erKSwqoPYzutYsGJbbpwGYJe+4kxNWfRkgZ9pLYv6H vyYYQXTiyKcLQePIh+8XYtFx0WmSlsFluwMIccgOoOVcdOWawzXZbOpYjJ6FxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681613602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dql0xB4mJngmYk1zzyF+jQ9w6TFlNYal2kFygFxlXno=; b=bO7OBp6UFvvLAJVaLY00MF2H+zeiTKSYhjPrG8Y1vsW1OBtdlulF+JHPqPJsLyf/6GFqS9 o+EjTU99RLHteRUjrXdTPILW8VLpUfWSo9YVG5T/5lwj7JJqhevOIt44SYLQyOMq6uRhrp /ET8jLh/0AiXxacmzKc0WVqhlhHX6e0ydruIy/GRAFSQZCibas3l8E0jqCIVOSb4oJS1Bs 98txZEdcfwcn2vId3SZgaq7gyRMANxPdlHkTIWqwrjMn+cBRBxWTs7SAaQV/pMQrWhvGU3 n2j3OO3KQMrujKjBiCBH1zZ4+AY10nz6xHLvI1xRBUiiivfcKWaxRCIgYTo4Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681613602; a=rsa-sha256; cv=none; b=ZCAh9wDUUEjoJoxdNoxFDhqKB0GGPkl7ndj5JiL5e8dJ8PCmvatTQxRKCeAw0pcpvF+Bt8 ZHbwuybXeqPHM8X9I2cpfPC+G91l/8DP6Y8fQ63kH1uk6Y0AkZfg2PEdHok7MyozIfRYFa vEZLyv9RdyotyqIv3qdhT+WH29P7r4wwF9hb+l77QifJG6xpS2XvnSmbvcFobrjw+VL56S gUkiqx0Hx5++0VDCJK6b29JiR0Evjs3b2RrRcc135Y0es+qyoM9yG4ECGzt1MlNaEMqSFz GvgSEbyzb+hwT2jXAZlbsYdQh/TT7PsavFdISuVS2Gnu94yKK6CT2TH15eEmYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzZW61wLhzWVS; Sun, 16 Apr 2023 02:53: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 33G2rMfa029524; Sun, 16 Apr 2023 02:53:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G2rMtd029523; Sun, 16 Apr 2023 02:53:22 GMT (envelope-from git) Date: Sun, 16 Apr 2023 02:53:22 GMT Message-Id: <202304160253.33G2rMtd029523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Simon J. Gerraty" Subject: git: c1ca6b7ba3de - stable/13 - Merge bearssl-20220418 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: c1ca6b7ba3de3a9a50f1c53cba79e321fab37990 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c1ca6b7ba3de3a9a50f1c53cba79e321fab37990 commit c1ca6b7ba3de3a9a50f1c53cba79e321fab37990 Author: Simon J. Gerraty AuthorDate: 2022-04-18 21:47:09 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-16 02:50:10 +0000 Merge bearssl-20220418 Main change is a callback for checking validity period of certificates. Merge commit 'f6acb9b9f81c96ae7c9592bee1bb89c4357cc3e5' Add -DHAVE_BR_X509_TIME_CHECK to libsecureboot/Makefile.inc (cherry picked from commit cc9e6590773dba57440750c124173ed531349a06) --- contrib/bearssl/.gitignore | 6 + contrib/bearssl/T0Comp.exe | Bin 72704 -> 73216 bytes contrib/bearssl/flist | 459 +++++++++++++++ contrib/bearssl/inc/bearssl_ec.h | 2 +- contrib/bearssl/inc/bearssl_hash.h | 4 +- contrib/bearssl/inc/bearssl_ssl.h | 8 +- contrib/bearssl/inc/bearssl_x509.h | 83 ++- contrib/bearssl/src/config.h | 22 +- contrib/bearssl/src/ec/ec_c25519_m64.c | 4 - contrib/bearssl/src/ec/ec_p256_m15.c | 22 +- contrib/bearssl/src/ec/ec_p256_m31.c | 22 +- contrib/bearssl/src/ec/ec_p256_m62.c | 2 +- contrib/bearssl/src/ec/ec_p256_m64.c | 67 ++- contrib/bearssl/src/ec/ec_prime_i15.c | 10 +- contrib/bearssl/src/ec/ec_prime_i31.c | 13 +- contrib/bearssl/src/inner.h | 26 +- contrib/bearssl/src/rand/sysrng.c | 88 ++- contrib/bearssl/src/rsa/rsa_i15_keygen.c | 6 +- contrib/bearssl/src/rsa/rsa_i15_modulus.c | 2 +- contrib/bearssl/src/rsa/rsa_i31_keygen_inner.c | 6 +- contrib/bearssl/src/rsa/rsa_i31_modulus.c | 2 +- contrib/bearssl/src/ssl/ssl_engine.c | 15 + contrib/bearssl/src/ssl/ssl_rec_cbc.c | 2 +- contrib/bearssl/src/x509/asn1.t0 | 2 +- contrib/bearssl/src/x509/skey_decoder.c | 2 +- contrib/bearssl/src/x509/skey_decoder.t0 | 2 +- contrib/bearssl/src/x509/x509_minimal.c | 751 +++++++++++++------------ contrib/bearssl/src/x509/x509_minimal.t0 | 80 ++- contrib/bearssl/test/test_crypto.c | 4 +- contrib/bearssl/test/test_x509.c | 210 ++++--- contrib/bearssl/tools/sslio.c | 2 +- lib/libsecureboot/Makefile.inc | 2 + lib/libsecureboot/vets.c | 2 +- 33 files changed, 1358 insertions(+), 570 deletions(-) diff --git a/contrib/bearssl/.gitignore b/contrib/bearssl/.gitignore new file mode 100644 index 000000000000..7da362eddc00 --- /dev/null +++ b/contrib/bearssl/.gitignore @@ -0,0 +1,6 @@ +/build/ +/libbearssl.a +/brssl +/testcrypto +/testspeed +/testx509 diff --git a/contrib/bearssl/T0Comp.exe b/contrib/bearssl/T0Comp.exe index 67eba109800e..de2364d69e07 100755 Binary files a/contrib/bearssl/T0Comp.exe and b/contrib/bearssl/T0Comp.exe differ diff --git a/contrib/bearssl/flist b/contrib/bearssl/flist new file mode 100644 index 000000000000..9751ad231065 --- /dev/null +++ b/contrib/bearssl/flist @@ -0,0 +1,459 @@ +T0/BlobWriter.cs +T0/CPU.cs +T0/CodeElement.cs +T0/CodeElementJump.cs +T0/CodeElementUInt.cs +T0/CodeElementUIntExpr.cs +T0/CodeElementUIntInt.cs +T0/CodeElementUIntUInt.cs +T0/ConstData.cs +T0/Opcode.cs +T0/OpcodeCall.cs +T0/OpcodeConst.cs +T0/OpcodeGetLocal.cs +T0/OpcodeJump.cs +T0/OpcodeJumpIf.cs +T0/OpcodeJumpIfNot.cs +T0/OpcodeJumpUncond.cs +T0/OpcodePutLocal.cs +T0/OpcodeRet.cs +T0/SType.cs +T0/T0Comp.cs +T0/TPointerBase.cs +T0/TPointerBlob.cs +T0/TPointerExpr.cs +T0/TPointerNull.cs +T0/TPointerXT.cs +T0/TValue.cs +T0/Word.cs +T0/WordBuilder.cs +T0/WordData.cs +T0/WordInterpreted.cs +T0/WordNative.cs +T0/kern.t0 +conf/Unix.mk +conf/Unix32.mk +conf/UnixClang.mk +conf/Win.mk +conf/samd20.mk +inc/bearssl.h +inc/bearssl_aead.h +inc/bearssl_block.h +inc/bearssl_ec.h +inc/bearssl_hash.h +inc/bearssl_hmac.h +inc/bearssl_kdf.h +inc/bearssl_pem.h +inc/bearssl_prf.h +inc/bearssl_rand.h +inc/bearssl_rsa.h +inc/bearssl_ssl.h +inc/bearssl_x509.h +mk/Defaults.mk +mk/NMake.mk +mk/Rules.mk +mk/SingleUnix.mk +mk/mkT0.cmd +mk/mkT0.sh +mk/mkrules.sh +samples/README.txt +samples/cert-ee-ec+rsa.pem +samples/cert-ee-ec.pem +samples/cert-ee-rsa.pem +samples/cert-ica-ec.pem +samples/cert-ica-rsa.pem +samples/cert-root-ec.pem +samples/cert-root-rsa.pem +samples/chain-ec+rsa.h +samples/chain-ec.h +samples/chain-rsa.h +samples/client_basic.c +samples/custom_profile.c +samples/key-ec.h +samples/key-ee-ec.pem +samples/key-ee-rsa.pem +samples/key-ica-ec.pem +samples/key-ica-rsa.pem +samples/key-root-ec.pem +samples/key-root-rsa.pem +samples/key-rsa.h +samples/server_basic.c +src/aead/ccm.c +src/aead/eax.c +src/aead/gcm.c +src/codec/ccopy.c +src/codec/dec16be.c +src/codec/dec16le.c +src/codec/dec32be.c +src/codec/dec32le.c +src/codec/dec64be.c +src/codec/dec64le.c +src/codec/enc16be.c +src/codec/enc16le.c +src/codec/enc32be.c +src/codec/enc32le.c +src/codec/enc64be.c +src/codec/enc64le.c +src/codec/pemdec.c +src/codec/pemdec.t0 +src/codec/pemenc.c +src/config.h +src/ec/ec_all_m15.c +src/ec/ec_all_m31.c +src/ec/ec_c25519_i15.c +src/ec/ec_c25519_i31.c +src/ec/ec_c25519_m15.c +src/ec/ec_c25519_m31.c +src/ec/ec_c25519_m62.c +src/ec/ec_c25519_m64.c +src/ec/ec_curve25519.c +src/ec/ec_default.c +src/ec/ec_keygen.c +src/ec/ec_p256_m15.c +src/ec/ec_p256_m31.c +src/ec/ec_p256_m62.c +src/ec/ec_p256_m64.c +src/ec/ec_prime_i15.c +src/ec/ec_prime_i31.c +src/ec/ec_pubkey.c +src/ec/ec_secp256r1.c +src/ec/ec_secp384r1.c +src/ec/ec_secp521r1.c +src/ec/ecdsa_atr.c +src/ec/ecdsa_default_sign_asn1.c +src/ec/ecdsa_default_sign_raw.c +src/ec/ecdsa_default_vrfy_asn1.c +src/ec/ecdsa_default_vrfy_raw.c +src/ec/ecdsa_i15_bits.c +src/ec/ecdsa_i15_sign_asn1.c +src/ec/ecdsa_i15_sign_raw.c +src/ec/ecdsa_i15_vrfy_asn1.c +src/ec/ecdsa_i15_vrfy_raw.c +src/ec/ecdsa_i31_bits.c +src/ec/ecdsa_i31_sign_asn1.c +src/ec/ecdsa_i31_sign_raw.c +src/ec/ecdsa_i31_vrfy_asn1.c +src/ec/ecdsa_i31_vrfy_raw.c +src/ec/ecdsa_rta.c +src/hash/dig_oid.c +src/hash/dig_size.c +src/hash/ghash_ctmul.c +src/hash/ghash_ctmul32.c +src/hash/ghash_ctmul64.c +src/hash/ghash_pclmul.c +src/hash/ghash_pwr8.c +src/hash/md5.c +src/hash/md5sha1.c +src/hash/mgf1.c +src/hash/multihash.c +src/hash/sha1.c +src/hash/sha2big.c +src/hash/sha2small.c +src/inner.h +src/int/i15_add.c +src/int/i15_bitlen.c +src/int/i15_decmod.c +src/int/i15_decode.c +src/int/i15_decred.c +src/int/i15_encode.c +src/int/i15_fmont.c +src/int/i15_iszero.c +src/int/i15_moddiv.c +src/int/i15_modpow.c +src/int/i15_modpow2.c +src/int/i15_montmul.c +src/int/i15_mulacc.c +src/int/i15_muladd.c +src/int/i15_ninv15.c +src/int/i15_reduce.c +src/int/i15_rshift.c +src/int/i15_sub.c +src/int/i15_tmont.c +src/int/i31_add.c +src/int/i31_bitlen.c +src/int/i31_decmod.c +src/int/i31_decode.c +src/int/i31_decred.c +src/int/i31_encode.c +src/int/i31_fmont.c +src/int/i31_iszero.c +src/int/i31_moddiv.c +src/int/i31_modpow.c +src/int/i31_modpow2.c +src/int/i31_montmul.c +src/int/i31_mulacc.c +src/int/i31_muladd.c +src/int/i31_ninv31.c +src/int/i31_reduce.c +src/int/i31_rshift.c +src/int/i31_sub.c +src/int/i31_tmont.c +src/int/i32_add.c +src/int/i32_bitlen.c +src/int/i32_decmod.c +src/int/i32_decode.c +src/int/i32_decred.c +src/int/i32_div32.c +src/int/i32_encode.c +src/int/i32_fmont.c +src/int/i32_iszero.c +src/int/i32_modpow.c +src/int/i32_montmul.c +src/int/i32_mulacc.c +src/int/i32_muladd.c +src/int/i32_ninv32.c +src/int/i32_reduce.c +src/int/i32_sub.c +src/int/i32_tmont.c +src/int/i62_modpow2.c +src/kdf/hkdf.c +src/kdf/shake.c +src/mac/hmac.c +src/mac/hmac_ct.c +src/rand/aesctr_drbg.c +src/rand/hmac_drbg.c +src/rand/sysrng.c +src/rsa/rsa_default_keygen.c +src/rsa/rsa_default_modulus.c +src/rsa/rsa_default_oaep_decrypt.c +src/rsa/rsa_default_oaep_encrypt.c +src/rsa/rsa_default_pkcs1_sign.c +src/rsa/rsa_default_pkcs1_vrfy.c +src/rsa/rsa_default_priv.c +src/rsa/rsa_default_privexp.c +src/rsa/rsa_default_pss_sign.c +src/rsa/rsa_default_pss_vrfy.c +src/rsa/rsa_default_pub.c +src/rsa/rsa_default_pubexp.c +src/rsa/rsa_i15_keygen.c +src/rsa/rsa_i15_modulus.c +src/rsa/rsa_i15_oaep_decrypt.c +src/rsa/rsa_i15_oaep_encrypt.c +src/rsa/rsa_i15_pkcs1_sign.c +src/rsa/rsa_i15_pkcs1_vrfy.c +src/rsa/rsa_i15_priv.c +src/rsa/rsa_i15_privexp.c +src/rsa/rsa_i15_pss_sign.c +src/rsa/rsa_i15_pss_vrfy.c +src/rsa/rsa_i15_pub.c +src/rsa/rsa_i15_pubexp.c +src/rsa/rsa_i31_keygen.c +src/rsa/rsa_i31_keygen_inner.c +src/rsa/rsa_i31_modulus.c +src/rsa/rsa_i31_oaep_decrypt.c +src/rsa/rsa_i31_oaep_encrypt.c +src/rsa/rsa_i31_pkcs1_sign.c +src/rsa/rsa_i31_pkcs1_vrfy.c +src/rsa/rsa_i31_priv.c +src/rsa/rsa_i31_privexp.c +src/rsa/rsa_i31_pss_sign.c +src/rsa/rsa_i31_pss_vrfy.c +src/rsa/rsa_i31_pub.c +src/rsa/rsa_i31_pubexp.c +src/rsa/rsa_i32_oaep_decrypt.c +src/rsa/rsa_i32_oaep_encrypt.c +src/rsa/rsa_i32_pkcs1_sign.c +src/rsa/rsa_i32_pkcs1_vrfy.c +src/rsa/rsa_i32_priv.c +src/rsa/rsa_i32_pss_sign.c +src/rsa/rsa_i32_pss_vrfy.c +src/rsa/rsa_i32_pub.c +src/rsa/rsa_i62_keygen.c +src/rsa/rsa_i62_oaep_decrypt.c +src/rsa/rsa_i62_oaep_encrypt.c +src/rsa/rsa_i62_pkcs1_sign.c +src/rsa/rsa_i62_pkcs1_vrfy.c +src/rsa/rsa_i62_priv.c +src/rsa/rsa_i62_pss_sign.c +src/rsa/rsa_i62_pss_vrfy.c +src/rsa/rsa_i62_pub.c +src/rsa/rsa_oaep_pad.c +src/rsa/rsa_oaep_unpad.c +src/rsa/rsa_pkcs1_sig_pad.c +src/rsa/rsa_pkcs1_sig_unpad.c +src/rsa/rsa_pss_sig_pad.c +src/rsa/rsa_pss_sig_unpad.c +src/rsa/rsa_ssl_decrypt.c +src/settings.c +src/ssl/prf.c +src/ssl/prf_md5sha1.c +src/ssl/prf_sha256.c +src/ssl/prf_sha384.c +src/ssl/ssl_ccert_single_ec.c +src/ssl/ssl_ccert_single_rsa.c +src/ssl/ssl_client.c +src/ssl/ssl_client_default_rsapub.c +src/ssl/ssl_client_full.c +src/ssl/ssl_engine.c +src/ssl/ssl_engine_default_aescbc.c +src/ssl/ssl_engine_default_aesccm.c +src/ssl/ssl_engine_default_aesgcm.c +src/ssl/ssl_engine_default_chapol.c +src/ssl/ssl_engine_default_descbc.c +src/ssl/ssl_engine_default_ec.c +src/ssl/ssl_engine_default_ecdsa.c +src/ssl/ssl_engine_default_rsavrfy.c +src/ssl/ssl_hashes.c +src/ssl/ssl_hs_client.c +src/ssl/ssl_hs_client.t0 +src/ssl/ssl_hs_common.t0 +src/ssl/ssl_hs_server.c +src/ssl/ssl_hs_server.t0 +src/ssl/ssl_io.c +src/ssl/ssl_keyexport.c +src/ssl/ssl_lru.c +src/ssl/ssl_rec_cbc.c +src/ssl/ssl_rec_ccm.c +src/ssl/ssl_rec_chapol.c +src/ssl/ssl_rec_gcm.c +src/ssl/ssl_scert_single_ec.c +src/ssl/ssl_scert_single_rsa.c +src/ssl/ssl_server.c +src/ssl/ssl_server_full_ec.c +src/ssl/ssl_server_full_rsa.c +src/ssl/ssl_server_mine2c.c +src/ssl/ssl_server_mine2g.c +src/ssl/ssl_server_minf2c.c +src/ssl/ssl_server_minf2g.c +src/ssl/ssl_server_minr2g.c +src/ssl/ssl_server_minu2g.c +src/ssl/ssl_server_minv2g.c +src/symcipher/aes_big_cbcdec.c +src/symcipher/aes_big_cbcenc.c +src/symcipher/aes_big_ctr.c +src/symcipher/aes_big_ctrcbc.c +src/symcipher/aes_big_dec.c +src/symcipher/aes_big_enc.c +src/symcipher/aes_common.c +src/symcipher/aes_ct.c +src/symcipher/aes_ct64.c +src/symcipher/aes_ct64_cbcdec.c +src/symcipher/aes_ct64_cbcenc.c +src/symcipher/aes_ct64_ctr.c +src/symcipher/aes_ct64_ctrcbc.c +src/symcipher/aes_ct64_dec.c +src/symcipher/aes_ct64_enc.c +src/symcipher/aes_ct_cbcdec.c +src/symcipher/aes_ct_cbcenc.c +src/symcipher/aes_ct_ctr.c +src/symcipher/aes_ct_ctrcbc.c +src/symcipher/aes_ct_dec.c +src/symcipher/aes_ct_enc.c +src/symcipher/aes_pwr8.c +src/symcipher/aes_pwr8_cbcdec.c +src/symcipher/aes_pwr8_cbcenc.c +src/symcipher/aes_pwr8_ctr.c +src/symcipher/aes_pwr8_ctrcbc.c +src/symcipher/aes_small_cbcdec.c +src/symcipher/aes_small_cbcenc.c +src/symcipher/aes_small_ctr.c +src/symcipher/aes_small_ctrcbc.c +src/symcipher/aes_small_dec.c +src/symcipher/aes_small_enc.c +src/symcipher/aes_x86ni.c +src/symcipher/aes_x86ni_cbcdec.c +src/symcipher/aes_x86ni_cbcenc.c +src/symcipher/aes_x86ni_ctr.c +src/symcipher/aes_x86ni_ctrcbc.c +src/symcipher/chacha20_ct.c +src/symcipher/chacha20_sse2.c +src/symcipher/des_ct.c +src/symcipher/des_ct_cbcdec.c +src/symcipher/des_ct_cbcenc.c +src/symcipher/des_support.c +src/symcipher/des_tab.c +src/symcipher/des_tab_cbcdec.c +src/symcipher/des_tab_cbcenc.c +src/symcipher/poly1305_ctmul.c +src/symcipher/poly1305_ctmul32.c +src/symcipher/poly1305_ctmulq.c +src/symcipher/poly1305_i15.c +src/x509/asn1.t0 +src/x509/asn1enc.c +src/x509/encode_ec_pk8der.c +src/x509/encode_ec_rawder.c +src/x509/encode_rsa_pk8der.c +src/x509/encode_rsa_rawder.c +src/x509/skey_decoder.c +src/x509/skey_decoder.t0 +src/x509/x509_decoder.c +src/x509/x509_decoder.t0 +src/x509/x509_knownkey.c +src/x509/x509_minimal.c +src/x509/x509_minimal.t0 +src/x509/x509_minimal_full.c +test/test_crypto.c +test/test_math.c +test/test_speed.c +test/test_x509.c +test/x509/alltests.txt +test/x509/dn-ee.der +test/x509/dn-ica1.der +test/x509/dn-ica2.der +test/x509/dn-root-new.der +test/x509/dn-root.der +test/x509/ee-badsig1.crt +test/x509/ee-badsig2.crt +test/x509/ee-cp1.crt +test/x509/ee-cp2.crt +test/x509/ee-cp3.crt +test/x509/ee-cp4.crt +test/x509/ee-dates.crt +test/x509/ee-md5.crt +test/x509/ee-names.crt +test/x509/ee-names2.crt +test/x509/ee-names3.crt +test/x509/ee-names4.crt +test/x509/ee-p256-sha1.crt +test/x509/ee-p256-sha224.crt +test/x509/ee-p256-sha256.crt +test/x509/ee-p256-sha384.crt +test/x509/ee-p256-sha512.crt +test/x509/ee-p256.crt +test/x509/ee-p384.crt +test/x509/ee-p521.crt +test/x509/ee-sha1.crt +test/x509/ee-sha224.crt +test/x509/ee-sha384.crt +test/x509/ee-sha512.crt +test/x509/ee-trailing.crt +test/x509/ee.crt +test/x509/ica1-1016.crt +test/x509/ica1-1017.crt +test/x509/ica1-4096.crt +test/x509/ica1-p256.crt +test/x509/ica1-p384.crt +test/x509/ica1-p521.crt +test/x509/ica1.crt +test/x509/ica2-1016.crt +test/x509/ica2-1017.crt +test/x509/ica2-4096.crt +test/x509/ica2-notCA.crt +test/x509/ica2-p256.crt +test/x509/ica2-p384.crt +test/x509/ica2-p521.crt +test/x509/ica2.crt +test/x509/junk.crt +test/x509/names.crt +test/x509/root-p256.crt +test/x509/root-p384.crt +test/x509/root-p521.crt +test/x509/root.crt +tools/brssl.c +tools/brssl.h +tools/certs.c +tools/chain.c +tools/client.c +tools/errors.c +tools/files.c +tools/impl.c +tools/keys.c +tools/names.c +tools/server.c +tools/skey.c +tools/sslio.c +tools/ta.c +tools/twrch.c +tools/vector.c +tools/verify.c +tools/xmem.c diff --git a/contrib/bearssl/inc/bearssl_ec.h b/contrib/bearssl/inc/bearssl_ec.h index f954309eb6c1..acd3a2bf5a55 100644 --- a/contrib/bearssl/inc/bearssl_ec.h +++ b/contrib/bearssl/inc/bearssl_ec.h @@ -108,7 +108,7 @@ extern "C" { * * - The multipliers (integers) MUST be lower than the subgroup order. * If this property is not met, then the result is indeterminate, - * but an error value is not ncessearily returned. + * but an error value is not necessarily returned. * * * ## ECDSA diff --git a/contrib/bearssl/inc/bearssl_hash.h b/contrib/bearssl/inc/bearssl_hash.h index 3b15ba7ca487..ca4fa26cc4aa 100644 --- a/contrib/bearssl/inc/bearssl_hash.h +++ b/contrib/bearssl/inc/bearssl_hash.h @@ -724,7 +724,7 @@ void br_sha256_update(br_sha256_context *ctx, const void *data, size_t len); */ void br_sha256_out(const br_sha256_context *ctx, void *out); -#if BR_DOXYGEN_IGNORE +#ifdef BR_DOXYGEN_IGNORE /** * \brief Save SHA-256 running state. * @@ -742,7 +742,7 @@ uint64_t br_sha256_state(const br_sha256_context *ctx, void *out); #define br_sha256_state br_sha224_state #endif -#if BR_DOXYGEN_IGNORE +#ifdef BR_DOXYGEN_IGNORE /** * \brief Restore SHA-256 running state. * diff --git a/contrib/bearssl/inc/bearssl_ssl.h b/contrib/bearssl/inc/bearssl_ssl.h index 8c8c86bdb50a..e91df4755690 100644 --- a/contrib/bearssl/inc/bearssl_ssl.h +++ b/contrib/bearssl/inc/bearssl_ssl.h @@ -1250,8 +1250,8 @@ static inline void br_ssl_engine_set_versions(br_ssl_engine_context *cc, unsigned version_min, unsigned version_max) { - cc->version_min = version_min; - cc->version_max = version_max; + cc->version_min = (uint16_t)version_min; + cc->version_max = (uint16_t)version_max; } /** @@ -1324,7 +1324,7 @@ br_ssl_engine_set_protocol_names(br_ssl_engine_context *ctx, const char **names, size_t num) { ctx->protocol_names = names; - ctx->protocol_names_num = num; + ctx->protocol_names_num = (uint16_t)num; } /** @@ -2102,7 +2102,7 @@ void br_ssl_engine_sendapp_ack(br_ssl_engine_context *cc, size_t len); /** * \brief Get buffer for received application data. * - * If the engine has received application data from the peer, hen this + * If the engine has received application data from the peer, then this * call returns a pointer to the buffer from where such data shall be * read, and its length is written in `*len`. Otherwise, `*len` is set * to 0 and `NULL` is returned. diff --git a/contrib/bearssl/inc/bearssl_x509.h b/contrib/bearssl/inc/bearssl_x509.h index 49d2fba0d5bc..7668e1de53a2 100644 --- a/contrib/bearssl/inc/bearssl_x509.h +++ b/contrib/bearssl/inc/bearssl_x509.h @@ -625,6 +625,52 @@ typedef struct { } br_name_element; +/** + * \brief Callback for validity date checks. + * + * The function receives as parameter an arbitrary user-provided context, + * and the notBefore and notAfter dates specified in an X.509 certificate, + * both expressed as a number of days and a number of seconds: + * + * - Days are counted in a proleptic Gregorian calendar since + * January 1st, 0 AD. Year "0 AD" is the one that preceded "1 AD"; + * it is also traditionally known as "1 BC". + * + * - Seconds are counted since midnight, from 0 to 86400 (a count of + * 86400 is possible only if a leap second happened). + * + * Each date and time is understood in the UTC time zone. The "Unix + * Epoch" (January 1st, 1970, 00:00 UTC) corresponds to days=719528 and + * seconds=0; the "Windows Epoch" (January 1st, 1601, 00:00 UTC) is + * days=584754, seconds=0. + * + * This function must return -1 if the current date is strictly before + * the "notBefore" time, or +1 if the current date is strictly after the + * "notAfter" time. If neither condition holds, then the function returns + * 0, which means that the current date falls within the validity range of + * the certificate. If the function returns a value distinct from -1, 0 + * and +1, then this is interpreted as an unavailability of the current + * time, which normally ends the validation process with a + * `BR_ERR_X509_TIME_UNKNOWN` error. + * + * During path validation, this callback will be invoked for each + * considered X.509 certificate. Validation fails if any of the calls + * returns a non-zero value. + * + * The context value is an abritrary pointer set by the caller when + * configuring this callback. + * + * \param tctx context pointer. + * \param not_before_days notBefore date (days since Jan 1st, 0 AD). + * \param not_before_seconds notBefore time (seconds, at most 86400). + * \param not_after_days notAfter date (days since Jan 1st, 0 AD). + * \param not_after_seconds notAfter time (seconds, at most 86400). + * \return -1, 0 or +1. + */ +typedef int (*br_x509_time_check)(void *tctx, + uint32_t not_before_days, uint32_t not_before_seconds, + uint32_t not_after_days, uint32_t not_after_seconds); + /** * \brief The "minimal" X.509 engine structure. * @@ -647,8 +693,8 @@ typedef struct { uint32_t *rp; const unsigned char *ip; } cpu; - uint32_t dp_stack[32]; - uint32_t rp_stack[32]; + uint32_t dp_stack[31]; + uint32_t rp_stack[31]; int err; /* Server name to match with the SAN / CN of the EE certificate. */ @@ -723,6 +769,12 @@ typedef struct { br_name_element *name_elts; size_t num_name_elts; + /* + * Callback function (and context) to get the current date. + */ + void *itime_ctx; + br_x509_time_check itime; + /* * Public key cryptography implementations (signature verification). */ @@ -853,7 +905,10 @@ void br_x509_minimal_init_full(br_x509_minimal_context *ctx, * - Seconds are counted since midnight, from 0 to 86400 (a count of * 86400 is possible only if a leap second happened). * - * The validation date and time is understood in the UTC time zone. + * The validation date and time is understood in the UTC time zone. The + * "Unix Epoch" (January 1st, 1970, 00:00 UTC) corresponds to days=719528 + * and seconds=0; the "Windows Epoch" (January 1st, 1601, 00:00 UTC) is + * days=584754, seconds=0. * * If the validation date and time are not explicitly set, but BearSSL * was compiled with support for the system clock on the underlying @@ -871,6 +926,28 @@ br_x509_minimal_set_time(br_x509_minimal_context *ctx, { ctx->days = days; ctx->seconds = seconds; + ctx->itime = 0; +} + +/** + * \brief Set the validity range callback function for the X.509 + * "minimal" engine. + * + * The provided function will be invoked to check whether the validation + * date is within the validity range for a given X.509 certificate; a + * call will be issued for each considered certificate. The provided + * context pointer (itime_ctx) will be passed as first parameter to the + * callback. + * + * \param tctx context for callback invocation. + * \param cb callback function. + */ +static inline void +br_x509_minimal_set_time_callback(br_x509_minimal_context *ctx, + void *itime_ctx, br_x509_time_check itime) +{ + ctx->itime_ctx = itime_ctx; + ctx->itime = itime; } /** diff --git a/contrib/bearssl/src/config.h b/contrib/bearssl/src/config.h index 8ea4d8af8d61..94627a23c038 100644 --- a/contrib/bearssl/src/config.h +++ b/contrib/bearssl/src/config.h @@ -109,9 +109,27 @@ #define BR_RDRAND 1 */ +/* + * When BR_USE_GETENTROPY is enabled, the SSL engine will use the + * getentropy() function to obtain quality randomness for seeding its + * internal PRNG. On Linux and FreeBSD, getentropy() is implemented by + * the standard library with the system call getrandom(); on OpenBSD, + * getentropy() is the system call, and there is no getrandom() wrapper, + * hence the use of the getentropy() function for maximum portability. + * + * If the getentropy() call fails, and BR_USE_URANDOM is not explicitly + * disabled, then /dev/urandom will be used as a fallback mechanism. On + * FreeBSD and OpenBSD, this does not change much, since /dev/urandom + * will block if not enough entropy has been obtained since last boot. + * On Linux, /dev/urandom might not block, which can be troublesome in + * early boot stages, which is why getentropy() is preferred. + * +#define BR_USE_GETENTROPY 1 + */ + /* * When BR_USE_URANDOM is enabled, the SSL engine will use /dev/urandom - * to automatically obtain quality randomness for seedings its internal + * to automatically obtain quality randomness for seeding its internal * PRNG. * #define BR_USE_URANDOM 1 @@ -120,7 +138,7 @@ /* * When BR_USE_WIN32_RAND is enabled, the SSL engine will use the Win32 * (CryptoAPI) functions (CryptAcquireContext(), CryptGenRandom()...) to - * automatically obtain quality randomness for seedings its internal PRNG. + * automatically obtain quality randomness for seeding its internal PRNG. * * Note: if both BR_USE_URANDOM and BR_USE_WIN32_RAND are defined, the * former takes precedence. diff --git a/contrib/bearssl/src/ec/ec_c25519_m64.c b/contrib/bearssl/src/ec/ec_c25519_m64.c index 7e7f12f7e3ad..df4883467d4a 100644 --- a/contrib/bearssl/src/ec/ec_c25519_m64.c +++ b/contrib/bearssl/src/ec/ec_c25519_m64.c @@ -158,10 +158,6 @@ f255_add(uint64_t *d, const uint64_t *a, const uint64_t *b) /* * Subtraction. - * On input, limbs must fit on 60 bits each. On output, result is - * partially reduced, with max value 2^255+19456; moreover, all - * limbs will fit on 51 bits, except the low limb, which may have - * value up to 2^51+19455. */ static inline void f255_sub(uint64_t *d, const uint64_t *a, const uint64_t *b) diff --git a/contrib/bearssl/src/ec/ec_p256_m15.c b/contrib/bearssl/src/ec/ec_p256_m15.c index 8d68d1d21bdb..05800d87f46a 100644 --- a/contrib/bearssl/src/ec/ec_p256_m15.c +++ b/contrib/bearssl/src/ec/ec_p256_m15.c @@ -2039,12 +2039,13 @@ api_mul(unsigned char *G, size_t Glen, p256_jacobian P; (void)curve; + if (Glen != 65) { + return 0; + } r = p256_decode(&P, G, Glen); p256_mul(&P, x, xlen); - if (Glen >= 65) { - p256_to_affine(&P); - p256_encode(G, &P); - } + p256_to_affine(&P); + p256_encode(G, &P); return r; } @@ -2059,16 +2060,6 @@ api_mulgen(unsigned char *R, p256_to_affine(&P); p256_encode(R, &P); return 65; - - /* - const unsigned char *G; - size_t Glen; - - G = api_generator(curve, &Glen); - memcpy(R, G, Glen); - api_mul(R, Glen, x, xlen, curve); - return Glen; - */ } static uint32_t @@ -2081,6 +2072,9 @@ api_muladd(unsigned char *A, const unsigned char *B, size_t len, int i; (void)curve; + if (len != 65) { + return 0; + } r = p256_decode(&P, A, len); p256_mul(&P, x, xlen); if (B == NULL) { diff --git a/contrib/bearssl/src/ec/ec_p256_m31.c b/contrib/bearssl/src/ec/ec_p256_m31.c index d57ef7b097ff..b185937e1606 100644 --- a/contrib/bearssl/src/ec/ec_p256_m31.c +++ b/contrib/bearssl/src/ec/ec_p256_m31.c @@ -1384,12 +1384,13 @@ api_mul(unsigned char *G, size_t Glen, p256_jacobian P; (void)curve; + if (Glen != 65) { + return 0; + } r = p256_decode(&P, G, Glen); p256_mul(&P, x, xlen); - if (Glen >= 65) { - p256_to_affine(&P); - p256_encode(G, &P); - } + p256_to_affine(&P); + p256_encode(G, &P); return r; } @@ -1404,16 +1405,6 @@ api_mulgen(unsigned char *R, p256_to_affine(&P); p256_encode(R, &P); return 65; - - /* - const unsigned char *G; - size_t Glen; - - G = api_generator(curve, &Glen); - memcpy(R, G, Glen); - api_mul(R, Glen, x, xlen, curve); - return Glen; - */ } static uint32_t @@ -1426,6 +1417,9 @@ api_muladd(unsigned char *A, const unsigned char *B, size_t len, int i; (void)curve; + if (len != 65) { + return 0; + } r = p256_decode(&P, A, len); p256_mul(&P, x, xlen); if (B == NULL) { diff --git a/contrib/bearssl/src/ec/ec_p256_m62.c b/contrib/bearssl/src/ec/ec_p256_m62.c index 3bcb95b5b19b..a4317905204d 100644 --- a/contrib/bearssl/src/ec/ec_p256_m62.c +++ b/contrib/bearssl/src/ec/ec_p256_m62.c @@ -580,7 +580,7 @@ f256_final_reduce(uint64_t *a) w = t[2] - cc; t[2] = w & MASK52; cc = w >> 63; - w = t[3] - BIT(36); + w = t[3] - BIT(36) - cc; t[3] = w & MASK52; cc = w >> 63; t[4] -= cc; diff --git a/contrib/bearssl/src/ec/ec_p256_m64.c b/contrib/bearssl/src/ec/ec_p256_m64.c index 5a7ea177408b..71a527c36955 100644 --- a/contrib/bearssl/src/ec/ec_p256_m64.c +++ b/contrib/bearssl/src/ec/ec_p256_m64.c @@ -99,6 +99,9 @@ f256_add(uint64_t *d, const uint64_t *a, const uint64_t *b) unsigned __int128 w; uint64_t t; + /* + * Do the addition, with an extra carry in t. + */ w = (unsigned __int128)a[0] + b[0]; d[0] = (uint64_t)w; w = (unsigned __int128)a[1] + b[1] + (w >> 64); @@ -110,7 +113,7 @@ f256_add(uint64_t *d, const uint64_t *a, const uint64_t *b) t = (uint64_t)(w >> 64); /* - * 2^256 = 2^224 - 2^192 - 2^96 + 1 in the field. + * Fold carry t, using: 2^256 = 2^224 - 2^192 - 2^96 + 1 mod p. */ w = (unsigned __int128)d[0] + t; d[0] = (uint64_t)w; @@ -119,8 +122,22 @@ f256_add(uint64_t *d, const uint64_t *a, const uint64_t *b) /* Here, carry "w >> 64" can only be 0 or -1 */ w = (unsigned __int128)d[2] - ((w >> 64) & 1); d[2] = (uint64_t)w; - /* Again, carry is 0 or -1 */ - d[3] += (uint64_t)(w >> 64) + (t << 32) - t; + /* Again, carry is 0 or -1. But there can be carry only if t = 1, + in which case the addition of (t << 32) - t is positive. */ + w = (unsigned __int128)d[3] - ((w >> 64) & 1) + (t << 32) - t; + d[3] = (uint64_t)w; + t = (uint64_t)(w >> 64); + + /* + * There can be an extra carry here, which we must fold again. + */ + w = (unsigned __int128)d[0] + t; + d[0] = (uint64_t)w; + w = (unsigned __int128)d[1] + (w >> 64) - (t << 32); + d[1] = (uint64_t)w; + w = (unsigned __int128)d[2] - ((w >> 64) & 1); + d[2] = (uint64_t)w; + d[3] += (t << 32) - t - (uint64_t)((w >> 64) & 1); #elif BR_UMUL128 @@ -140,6 +157,15 @@ f256_add(uint64_t *d, const uint64_t *a, const uint64_t *b) cc = _addcarry_u64(cc, d[0], 0, &d[0]); cc = _addcarry_u64(cc, d[1], -(t << 32), &d[1]); cc = _addcarry_u64(cc, d[2], -t, &d[2]); + cc = _addcarry_u64(cc, d[3], (t << 32) - (t << 1), &d[3]); + + /* + * We have to do it again if there still is a carry. + */ + t = cc; + cc = _addcarry_u64(cc, d[0], 0, &d[0]); + cc = _addcarry_u64(cc, d[1], -(t << 32), &d[1]); + cc = _addcarry_u64(cc, d[2], -t, &d[2]); (void)_addcarry_u64(cc, d[3], (t << 32) - (t << 1), &d[3]); #endif @@ -167,6 +193,7 @@ f256_sub(uint64_t *d, const uint64_t *a, const uint64_t *b) t = (uint64_t)(w >> 64) & 1; /* + * If there is a borrow (t = 1), then we must add the modulus * p = 2^256 - 2^224 + 2^192 + 2^96 - 1. */ w = (unsigned __int128)d[0] - t; @@ -177,6 +204,20 @@ f256_sub(uint64_t *d, const uint64_t *a, const uint64_t *b) w = (unsigned __int128)d[2] + (w >> 64); d[2] = (uint64_t)w; /* Again, carry is 0 or +1 */ + w = (unsigned __int128)d[3] + (w >> 64) - (t << 32) + t; + d[3] = (uint64_t)w; + t = (uint64_t)(w >> 64) & 1; + + /* + * There may be again a borrow, in which case we must add the + * modulus again. + */ + w = (unsigned __int128)d[0] - t; + d[0] = (uint64_t)w; + w = (unsigned __int128)d[1] + (t << 32) - ((w >> 64) & 1); + d[1] = (uint64_t)w; + w = (unsigned __int128)d[2] + (w >> 64); + d[2] = (uint64_t)w; d[3] += (uint64_t)(w >> 64) - (t << 32) + t; #elif BR_UMUL128 @@ -190,13 +231,23 @@ f256_sub(uint64_t *d, const uint64_t *a, const uint64_t *b) *** 1822 LINES SKIPPED *** From nobody Sun Apr 16 03:51: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 4Pzbp23DYxz45jKw; Sun, 16 Apr 2023 03:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pzbp22pb3z46F1; Sun, 16 Apr 2023 03:51:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681617082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BQwLPjT+n2pSbG8pRRuGvxOWmVv4b4eINaqKKUu2e3M=; b=N0TUiBt67hLBc/hd2KMd7bF24eFdZMJFGDMr80q3W/VpNINok10NLxQ32u+931eivuJxQk EtsKvs0YzoXwK96PwbstrcW3Abn+c6sjdBwbSt940HNFVGDpsVHPMHMmbONKL7wz1fE097 hBM5MYPh5dmoXfiF5jNE/Jp/jjdfy+H14V/t8yBV2EteIVaC61bplG5Gcnq08wEhIf0zpm YstSOHLDawlIoN2vpwTGCnGlbdp8eQ5ULJ9DkDLIBzkv8jPOYPj9FHwuQfL1fpVSfWNaeZ o+iIZlpRPolVKkUSiXX3GPzCAlYoVcsSUcx//ibZF5b1aW2zeugzKthIX9AeDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681617082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BQwLPjT+n2pSbG8pRRuGvxOWmVv4b4eINaqKKUu2e3M=; b=T5Suuzfbv40ZavwVsT0dfShZIEPOX//1zIGtXCkHFpNG28Ijmlg54wPMz8jcFvwh9QI695 C3AMolRysQ3z2VDJ1HvGqB/52OOcBHcC2wRacvAs12WJLRL+71i56hTO6TzDttidnLN/3B RwjR48l3zjn/LCRYd3RJrnUQ3tglqhohz1oIHS0a0SKCtiUUsZUWmeAYO/4YdASQMHQx+f Hl3SJxB5iWJiPl8mf/W9/8XWyCAGf4v1e52y/K9YWrMSg4z4KtCkNKJa+XvW2BLu0i/tQ0 gBTlH4NnEbZVe2Xqfhxck0FxtHHXEOqlmRHfagTrVKQi72NV0I7wgjxyKPxogw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681617082; a=rsa-sha256; cv=none; b=FofGnQ1wkBycOoYylarKCQqZeMyIfzqoNvcv2BpdjPvUCDl/1Swfs8uwkn+bsTgVWfG5lI oPL+2+8bf0g25JMnxSJIyH30zuLiLumf00S1dGdvEW9iam6/He2BsUk7jlCp51qtqmwDOX q3cLMjOI6gFzZlbkt5Mp8Q1Jq+8kw6lIzer8riXvotnerMZkgzu+FEF2ukVbDN9wmqr8+t KMoBOBBPH7omIlqmQLhesfDgLzuQf1lP+q4ZA0VSmvH7SjmhV2xQvi+1NfoNi4MGmTan+n qaQJ0QDh+mAvAIwMlnSlvOH3RE7L/Hlb5zKTABgWFDU8sci0WP4dCXE3iTyrbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pzbp21vJRzXwt; Sun, 16 Apr 2023 03:51: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 33G3pMQJ026614; Sun, 16 Apr 2023 03:51:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G3pM4a026613; Sun, 16 Apr 2023 03:51:22 GMT (envelope-from git) Date: Sun, 16 Apr 2023 03:51:22 GMT Message-Id: <202304160351.33G3pM4a026613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: b1a00c2b1368 - main - Quiet compiler warnings for fget_noref and fdget_noref List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b1a00c2b136841b84b8ffdc703a1afeee5d0e268 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=b1a00c2b136841b84b8ffdc703a1afeee5d0e268 commit b1a00c2b136841b84b8ffdc703a1afeee5d0e268 Author: Stephen J. Kiernan AuthorDate: 2023-04-16 03:50:54 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-16 03:50:54 +0000 Quiet compiler warnings for fget_noref and fdget_noref Summary: Typecasting both parts of the comparison to u_int quiets compiler warnings about signed/unsigned comparison and takes care of positive and negative numbers for the file descriptor in a single comparison. Obtained from: Juniper Netwowrks, Inc. Reviewers: mjg Subscribers: imp Differential Revision: https://reviews.freebsd.org/D39593 --- sys/sys/filedesc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index ffea8d7e0195..578b84696663 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -303,7 +303,7 @@ fget_noref(struct filedesc *fdp, int fd) FILEDESC_LOCK_ASSERT(fdp); - if (__predict_false((u_int)fd >= fdp->fd_nfiles)) + if (__predict_false((u_int)fd >= (u_int)fdp->fd_nfiles)) return (NULL); return (fdp->fd_ofiles[fd].fde_file); @@ -316,7 +316,7 @@ fdeget_noref(struct filedesc *fdp, int fd) FILEDESC_LOCK_ASSERT(fdp); - if (__predict_false((u_int)fd >= fdp->fd_nfiles)) + if (__predict_false((u_int)fd >= (u_int)fdp->fd_nfiles)) return (NULL); fde = &fdp->fd_ofiles[fd]; From nobody Sun Apr 16 09:17: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 4Pzl2K55dpz44ytb; Sun, 16 Apr 2023 09:17: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 4Pzl2K0Vhsz3P03; Sun, 16 Apr 2023 09:17:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681636649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kXjl7aTjqxQVTxXaS5yYYhaOFNBhT90akPTcVuDxGXk=; b=BmrmnqG/QfQD9EehBsjpl290DqMePwqs6usH4rLfByreakCix6EtarU2o0ZAf1Q3v2R9ex MNwSxf15cMa+iXO7LpbEg23ftsTk9xJZEaR6jzclbwdCqoxJSPuojBPive1UYghL/EvMZY xwP4uo7EGj+qPAbgI6rwHeZhQ4KVNs8yfD5OAEUT8GjiOna5gBzI0+OmFsjDoZNPCI2kJf OAjHxIzj7p11BaQPROu9fCcU1gD02VAMj3Mc11V2t9TZBwIVM4BM6DDwp01xCqJqjsXbpI 7xVgRvuxL6IP8j9RkAvlx0izA2ADvDpegG+SbrPSK8veR79ebGbfBeJvAAwwvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681636649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kXjl7aTjqxQVTxXaS5yYYhaOFNBhT90akPTcVuDxGXk=; b=twnfLLV2aa1kCxxxJC2JvN67E+45eGFqC/MosNk9zfKklaPp7dia2C3nYQkwQIxoiZqQjz ExsYGZcQ9byN31zBI5wnhj+3RUcg3UajRrFH4fmh2nnHApH/cr+M1PH9EsXSYHtKqGs9DJ mkVOHvdtdRacgYwhPAhYkNzODhXdBWFUzIjHEjfE1SG7GxR/cAqA5Co+nvi2KemSBajFGB 6HnY7T6RUQf8pf58WYpxstAgr8lmsgbqnda6UHcwPSn1NLfbCc9308poeyP630Jc14EzU6 tvBGnJGaPHqnN0oa9FqYjbRwgJjizVkrqKquaCCA2dpo+8QBYG/do8XonXgzBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681636649; a=rsa-sha256; cv=none; b=lhF97hX8qK3XN3wmY9pBOhjhyq7dHe8G0GXrv6etn2lTSR4LTpSUrHc1ErB7/v2IhXq8fW cGsezQAYQ2vL2SAomkv8jW3NrLDH8DTwMh1pFBSAgzwv0e3reLZD/kOsEp+l5A51NLVNgF 9ZYQ/ToKe5H1X4TC45KGLqsk5PhLtYDWmRcMNjBYutikqSUtI1VdfO1XoSeVaAdzq+XUpc 6UFDEQv5ZETWcIREnimbC7eXh7BrY38jXWiY34rluca36cYw1dp4uHcoq/TBdKqwXPChpD 4fibKc6z9UR+xPEoFXDIuPnx0jm5yPNYr4p+1zLqM7A7K57WMjWejNNYEZlUGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pzl2J6hRGzj0N; Sun, 16 Apr 2023 09:17: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 33G9HSVB057500; Sun, 16 Apr 2023 09:17:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G9HShS057499; Sun, 16 Apr 2023 09:17:28 GMT (envelope-from git) Date: Sun, 16 Apr 2023 09:17:28 GMT Message-Id: <202304160917.33G9HShS057499@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 991360ba4970 - main - grdc.6: Add an ENVIRONMENT section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 991360ba49707b84889e5bfce49dfbf383088171 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=991360ba49707b84889e5bfce49dfbf383088171 commit 991360ba49707b84889e5bfce49dfbf383088171 Author: Gordon Bergling AuthorDate: 2023-04-16 09:17:06 +0000 Commit: Gordon Bergling CommitDate: 2023-04-16 09:17:06 +0000 grdc.6: Add an ENVIRONMENT section - Add an ENVIRONMENT section Obtained from: OpenBSD MFC after: 5 days --- usr.bin/grdc/grdc.6 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.bin/grdc/grdc.6 b/usr.bin/grdc/grdc.6 index 5226a6b2a9c7..269b8984ec3e 100644 --- a/usr.bin/grdc/grdc.6 +++ b/usr.bin/grdc/grdc.6 @@ -26,6 +26,18 @@ The optional flag tells grdc to output the time in a 12-hour format. In this curses mode implementation, the scrolling option has trouble keeping up. +.Sh ENVIRONMENT +.Bl -tag -width Ds +.It Ev TZ +The time zone to use for displaying the time. +It is normally specified as a pathname relative to +.Pa /usr/share/zoneinfo , +though see +.Xr tzset 3 +for more information. +If this variable is not set, the time zone is determined based on +.Pa /etc/localtime . +.El .Sh AUTHORS .An -nosplit .An Amos Shapir , From nobody Sun Apr 16 09:28: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 4PzlHb0311z450CR; Sun, 16 Apr 2023 09:28: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 4PzlHZ5cn3z3kbK; Sun, 16 Apr 2023 09:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681637338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B136H5OjUTpW9PwHSzzSUlwwHAfyW2/9Jl/1mMYwYUI=; b=ZwjQ0tAhdxiG+pDYsLQXLD+cE5q/1God3O6hKBmQHTK9ZAY+3Jrcmm8xjqAf1hAXD3omKB 6pW7l8WcLVc0zgW8q859hKBqHM/juwPZmQBw98ciHAPa/qt2GEKAweWu1iOeUrPTp75Bhm ddVaK+GtrPVxW/whZfgRLYblN4/utC4H2MSJsP8kWIdJvnXgQ5+yvBwjEcIjdum0f1SLlg 8E5Mr/EIFp8GOnhYls8jROPfxmYmIqUVNqk4TW09aB8WcwHjnSTZMgQYO/SxhvQ2h6RKtu YeXxS/3tk7Y4bJ8zorMMvs41ALh/TIUEKU+4LOUNtFApoCLO/jMWyl9vJ1rwtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681637338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B136H5OjUTpW9PwHSzzSUlwwHAfyW2/9Jl/1mMYwYUI=; b=jxhsX1G5va0TGM7J7SI74485Jj5ekKn11Pt28ulAAyeZiDji0Z4aEtikxaMr+z48Nq6VHy 4kGkQuZsBPHTh443NQ/Ag466vA3LxJ4joa0HQPGlGMivYzCxwEgh3/za77z8ic8J9gbcDv RLTtpfjF2Vy01Wh5LYJtVOsgkptA/ejlKBnov1hNo9dUkj/bum7xiv9oC1YF5/9ByBzxrv vlHob2oliRqQLqb+KgcV2fGJ5lWjwCDsbAJxjwZtD1++shJxIF5pj90eATJ+BLJZHoal1G 1gimQ5Ql1w5V8Kh3WFwim3W8FZQaLJsLv95pIV2xBJObxKyfOZYz2qsY/crCgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681637338; a=rsa-sha256; cv=none; b=EKKxpx708dfETQseP0WZrK1W6JnjxOGuyqPmntAuDXMjpOrQbWPxY2ucePxWkL3++1z4BO EgXAw/udBRp+TF/picTirEuWMj+Q30INpM6obRbMkTK6nHAM720TSuqI0RMTQIse1bZ2Fc TywOTfM5q9oBekukJIP9f+g3KioOKdzrRBdg70T36+zu5lS70AC2rZJNFoo3s6xdkxsvUx h6oNhh104O7c1vnyPoBJ8m1bf51hkOodv0jrlk3XXZ7aohLoPnXRT5NpVF3r077j4bA3OY OOpv4lg3rZ79Lwah6x+/GA0ulZ53nb/1gOOHLVpQYmBlNHGJU/6ZSmOLHMEo0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzlHZ4WTMzjDT; Sun, 16 Apr 2023 09:28: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 33G9SwUH073933; Sun, 16 Apr 2023 09:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G9SwVm073932; Sun, 16 Apr 2023 09:28:58 GMT (envelope-from git) Date: Sun, 16 Apr 2023 09:28:58 GMT Message-Id: <202304160928.33G9SwVm073932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 389449887c64 - stable/13 - Merge commit 'd84e570b54961e8874bbd8de25635eb96be0977e' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 389449887c6426def0510c5861e0af9973f1ed08 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=389449887c6426def0510c5861e0af9973f1ed08 commit 389449887c6426def0510c5861e0af9973f1ed08 Author: Simon J. Gerraty AuthorDate: 2023-02-21 06:13:27 +0000 Commit: Gordon Bergling CommitDate: 2023-04-16 07:27:42 +0000 Merge commit 'd84e570b54961e8874bbd8de25635eb96be0977e' This unbreaks the build for WITH_BEARSSL=1 on stable/13. (cherry picked from commit 9c474dc51b0b09ff81339caee6772e454dd470e4) --- contrib/bearssl/flist | 459 ---------------------------- contrib/bearssl/inc/bearssl.h | 13 + contrib/bearssl/src/rsa/rsa_i62_keygen.c | 4 +- contrib/bearssl/src/rsa/rsa_pss_sig_unpad.c | 2 +- 4 files changed, 16 insertions(+), 462 deletions(-) diff --git a/contrib/bearssl/flist b/contrib/bearssl/flist deleted file mode 100644 index 9751ad231065..000000000000 --- a/contrib/bearssl/flist +++ /dev/null @@ -1,459 +0,0 @@ -T0/BlobWriter.cs -T0/CPU.cs -T0/CodeElement.cs -T0/CodeElementJump.cs -T0/CodeElementUInt.cs -T0/CodeElementUIntExpr.cs -T0/CodeElementUIntInt.cs -T0/CodeElementUIntUInt.cs -T0/ConstData.cs -T0/Opcode.cs -T0/OpcodeCall.cs -T0/OpcodeConst.cs -T0/OpcodeGetLocal.cs -T0/OpcodeJump.cs -T0/OpcodeJumpIf.cs -T0/OpcodeJumpIfNot.cs -T0/OpcodeJumpUncond.cs -T0/OpcodePutLocal.cs -T0/OpcodeRet.cs -T0/SType.cs -T0/T0Comp.cs -T0/TPointerBase.cs -T0/TPointerBlob.cs -T0/TPointerExpr.cs -T0/TPointerNull.cs -T0/TPointerXT.cs -T0/TValue.cs -T0/Word.cs -T0/WordBuilder.cs -T0/WordData.cs -T0/WordInterpreted.cs -T0/WordNative.cs -T0/kern.t0 -conf/Unix.mk -conf/Unix32.mk -conf/UnixClang.mk -conf/Win.mk -conf/samd20.mk -inc/bearssl.h -inc/bearssl_aead.h -inc/bearssl_block.h -inc/bearssl_ec.h -inc/bearssl_hash.h -inc/bearssl_hmac.h -inc/bearssl_kdf.h -inc/bearssl_pem.h -inc/bearssl_prf.h -inc/bearssl_rand.h -inc/bearssl_rsa.h -inc/bearssl_ssl.h -inc/bearssl_x509.h -mk/Defaults.mk -mk/NMake.mk -mk/Rules.mk -mk/SingleUnix.mk -mk/mkT0.cmd -mk/mkT0.sh -mk/mkrules.sh -samples/README.txt -samples/cert-ee-ec+rsa.pem -samples/cert-ee-ec.pem -samples/cert-ee-rsa.pem -samples/cert-ica-ec.pem -samples/cert-ica-rsa.pem -samples/cert-root-ec.pem -samples/cert-root-rsa.pem -samples/chain-ec+rsa.h -samples/chain-ec.h -samples/chain-rsa.h -samples/client_basic.c -samples/custom_profile.c -samples/key-ec.h -samples/key-ee-ec.pem -samples/key-ee-rsa.pem -samples/key-ica-ec.pem -samples/key-ica-rsa.pem -samples/key-root-ec.pem -samples/key-root-rsa.pem -samples/key-rsa.h -samples/server_basic.c -src/aead/ccm.c -src/aead/eax.c -src/aead/gcm.c -src/codec/ccopy.c -src/codec/dec16be.c -src/codec/dec16le.c -src/codec/dec32be.c -src/codec/dec32le.c -src/codec/dec64be.c -src/codec/dec64le.c -src/codec/enc16be.c -src/codec/enc16le.c -src/codec/enc32be.c -src/codec/enc32le.c -src/codec/enc64be.c -src/codec/enc64le.c -src/codec/pemdec.c -src/codec/pemdec.t0 -src/codec/pemenc.c -src/config.h -src/ec/ec_all_m15.c -src/ec/ec_all_m31.c -src/ec/ec_c25519_i15.c -src/ec/ec_c25519_i31.c -src/ec/ec_c25519_m15.c -src/ec/ec_c25519_m31.c -src/ec/ec_c25519_m62.c -src/ec/ec_c25519_m64.c -src/ec/ec_curve25519.c -src/ec/ec_default.c -src/ec/ec_keygen.c -src/ec/ec_p256_m15.c -src/ec/ec_p256_m31.c -src/ec/ec_p256_m62.c -src/ec/ec_p256_m64.c -src/ec/ec_prime_i15.c -src/ec/ec_prime_i31.c -src/ec/ec_pubkey.c -src/ec/ec_secp256r1.c -src/ec/ec_secp384r1.c -src/ec/ec_secp521r1.c -src/ec/ecdsa_atr.c -src/ec/ecdsa_default_sign_asn1.c -src/ec/ecdsa_default_sign_raw.c -src/ec/ecdsa_default_vrfy_asn1.c -src/ec/ecdsa_default_vrfy_raw.c -src/ec/ecdsa_i15_bits.c -src/ec/ecdsa_i15_sign_asn1.c -src/ec/ecdsa_i15_sign_raw.c -src/ec/ecdsa_i15_vrfy_asn1.c -src/ec/ecdsa_i15_vrfy_raw.c -src/ec/ecdsa_i31_bits.c -src/ec/ecdsa_i31_sign_asn1.c -src/ec/ecdsa_i31_sign_raw.c -src/ec/ecdsa_i31_vrfy_asn1.c -src/ec/ecdsa_i31_vrfy_raw.c -src/ec/ecdsa_rta.c -src/hash/dig_oid.c -src/hash/dig_size.c -src/hash/ghash_ctmul.c -src/hash/ghash_ctmul32.c -src/hash/ghash_ctmul64.c -src/hash/ghash_pclmul.c -src/hash/ghash_pwr8.c -src/hash/md5.c -src/hash/md5sha1.c -src/hash/mgf1.c -src/hash/multihash.c -src/hash/sha1.c -src/hash/sha2big.c -src/hash/sha2small.c -src/inner.h -src/int/i15_add.c -src/int/i15_bitlen.c -src/int/i15_decmod.c -src/int/i15_decode.c -src/int/i15_decred.c -src/int/i15_encode.c -src/int/i15_fmont.c -src/int/i15_iszero.c -src/int/i15_moddiv.c -src/int/i15_modpow.c -src/int/i15_modpow2.c -src/int/i15_montmul.c -src/int/i15_mulacc.c -src/int/i15_muladd.c -src/int/i15_ninv15.c -src/int/i15_reduce.c -src/int/i15_rshift.c -src/int/i15_sub.c -src/int/i15_tmont.c -src/int/i31_add.c -src/int/i31_bitlen.c -src/int/i31_decmod.c -src/int/i31_decode.c -src/int/i31_decred.c -src/int/i31_encode.c -src/int/i31_fmont.c -src/int/i31_iszero.c -src/int/i31_moddiv.c -src/int/i31_modpow.c -src/int/i31_modpow2.c -src/int/i31_montmul.c -src/int/i31_mulacc.c -src/int/i31_muladd.c -src/int/i31_ninv31.c -src/int/i31_reduce.c -src/int/i31_rshift.c -src/int/i31_sub.c -src/int/i31_tmont.c -src/int/i32_add.c -src/int/i32_bitlen.c -src/int/i32_decmod.c -src/int/i32_decode.c -src/int/i32_decred.c -src/int/i32_div32.c -src/int/i32_encode.c -src/int/i32_fmont.c -src/int/i32_iszero.c -src/int/i32_modpow.c -src/int/i32_montmul.c -src/int/i32_mulacc.c -src/int/i32_muladd.c -src/int/i32_ninv32.c -src/int/i32_reduce.c -src/int/i32_sub.c -src/int/i32_tmont.c -src/int/i62_modpow2.c -src/kdf/hkdf.c -src/kdf/shake.c -src/mac/hmac.c -src/mac/hmac_ct.c -src/rand/aesctr_drbg.c -src/rand/hmac_drbg.c -src/rand/sysrng.c -src/rsa/rsa_default_keygen.c -src/rsa/rsa_default_modulus.c -src/rsa/rsa_default_oaep_decrypt.c -src/rsa/rsa_default_oaep_encrypt.c -src/rsa/rsa_default_pkcs1_sign.c -src/rsa/rsa_default_pkcs1_vrfy.c -src/rsa/rsa_default_priv.c -src/rsa/rsa_default_privexp.c -src/rsa/rsa_default_pss_sign.c -src/rsa/rsa_default_pss_vrfy.c -src/rsa/rsa_default_pub.c -src/rsa/rsa_default_pubexp.c -src/rsa/rsa_i15_keygen.c -src/rsa/rsa_i15_modulus.c -src/rsa/rsa_i15_oaep_decrypt.c -src/rsa/rsa_i15_oaep_encrypt.c -src/rsa/rsa_i15_pkcs1_sign.c -src/rsa/rsa_i15_pkcs1_vrfy.c -src/rsa/rsa_i15_priv.c -src/rsa/rsa_i15_privexp.c -src/rsa/rsa_i15_pss_sign.c -src/rsa/rsa_i15_pss_vrfy.c -src/rsa/rsa_i15_pub.c -src/rsa/rsa_i15_pubexp.c -src/rsa/rsa_i31_keygen.c -src/rsa/rsa_i31_keygen_inner.c -src/rsa/rsa_i31_modulus.c -src/rsa/rsa_i31_oaep_decrypt.c -src/rsa/rsa_i31_oaep_encrypt.c -src/rsa/rsa_i31_pkcs1_sign.c -src/rsa/rsa_i31_pkcs1_vrfy.c -src/rsa/rsa_i31_priv.c -src/rsa/rsa_i31_privexp.c -src/rsa/rsa_i31_pss_sign.c -src/rsa/rsa_i31_pss_vrfy.c -src/rsa/rsa_i31_pub.c -src/rsa/rsa_i31_pubexp.c -src/rsa/rsa_i32_oaep_decrypt.c -src/rsa/rsa_i32_oaep_encrypt.c -src/rsa/rsa_i32_pkcs1_sign.c -src/rsa/rsa_i32_pkcs1_vrfy.c -src/rsa/rsa_i32_priv.c -src/rsa/rsa_i32_pss_sign.c -src/rsa/rsa_i32_pss_vrfy.c -src/rsa/rsa_i32_pub.c -src/rsa/rsa_i62_keygen.c -src/rsa/rsa_i62_oaep_decrypt.c -src/rsa/rsa_i62_oaep_encrypt.c -src/rsa/rsa_i62_pkcs1_sign.c -src/rsa/rsa_i62_pkcs1_vrfy.c -src/rsa/rsa_i62_priv.c -src/rsa/rsa_i62_pss_sign.c -src/rsa/rsa_i62_pss_vrfy.c -src/rsa/rsa_i62_pub.c -src/rsa/rsa_oaep_pad.c -src/rsa/rsa_oaep_unpad.c -src/rsa/rsa_pkcs1_sig_pad.c -src/rsa/rsa_pkcs1_sig_unpad.c -src/rsa/rsa_pss_sig_pad.c -src/rsa/rsa_pss_sig_unpad.c -src/rsa/rsa_ssl_decrypt.c -src/settings.c -src/ssl/prf.c -src/ssl/prf_md5sha1.c -src/ssl/prf_sha256.c -src/ssl/prf_sha384.c -src/ssl/ssl_ccert_single_ec.c -src/ssl/ssl_ccert_single_rsa.c -src/ssl/ssl_client.c -src/ssl/ssl_client_default_rsapub.c -src/ssl/ssl_client_full.c -src/ssl/ssl_engine.c -src/ssl/ssl_engine_default_aescbc.c -src/ssl/ssl_engine_default_aesccm.c -src/ssl/ssl_engine_default_aesgcm.c -src/ssl/ssl_engine_default_chapol.c -src/ssl/ssl_engine_default_descbc.c -src/ssl/ssl_engine_default_ec.c -src/ssl/ssl_engine_default_ecdsa.c -src/ssl/ssl_engine_default_rsavrfy.c -src/ssl/ssl_hashes.c -src/ssl/ssl_hs_client.c -src/ssl/ssl_hs_client.t0 -src/ssl/ssl_hs_common.t0 -src/ssl/ssl_hs_server.c -src/ssl/ssl_hs_server.t0 -src/ssl/ssl_io.c -src/ssl/ssl_keyexport.c -src/ssl/ssl_lru.c -src/ssl/ssl_rec_cbc.c -src/ssl/ssl_rec_ccm.c -src/ssl/ssl_rec_chapol.c -src/ssl/ssl_rec_gcm.c -src/ssl/ssl_scert_single_ec.c -src/ssl/ssl_scert_single_rsa.c -src/ssl/ssl_server.c -src/ssl/ssl_server_full_ec.c -src/ssl/ssl_server_full_rsa.c -src/ssl/ssl_server_mine2c.c -src/ssl/ssl_server_mine2g.c -src/ssl/ssl_server_minf2c.c -src/ssl/ssl_server_minf2g.c -src/ssl/ssl_server_minr2g.c -src/ssl/ssl_server_minu2g.c -src/ssl/ssl_server_minv2g.c -src/symcipher/aes_big_cbcdec.c -src/symcipher/aes_big_cbcenc.c -src/symcipher/aes_big_ctr.c -src/symcipher/aes_big_ctrcbc.c -src/symcipher/aes_big_dec.c -src/symcipher/aes_big_enc.c -src/symcipher/aes_common.c -src/symcipher/aes_ct.c -src/symcipher/aes_ct64.c -src/symcipher/aes_ct64_cbcdec.c -src/symcipher/aes_ct64_cbcenc.c -src/symcipher/aes_ct64_ctr.c -src/symcipher/aes_ct64_ctrcbc.c -src/symcipher/aes_ct64_dec.c -src/symcipher/aes_ct64_enc.c -src/symcipher/aes_ct_cbcdec.c -src/symcipher/aes_ct_cbcenc.c -src/symcipher/aes_ct_ctr.c -src/symcipher/aes_ct_ctrcbc.c -src/symcipher/aes_ct_dec.c -src/symcipher/aes_ct_enc.c -src/symcipher/aes_pwr8.c -src/symcipher/aes_pwr8_cbcdec.c -src/symcipher/aes_pwr8_cbcenc.c -src/symcipher/aes_pwr8_ctr.c -src/symcipher/aes_pwr8_ctrcbc.c -src/symcipher/aes_small_cbcdec.c -src/symcipher/aes_small_cbcenc.c -src/symcipher/aes_small_ctr.c -src/symcipher/aes_small_ctrcbc.c -src/symcipher/aes_small_dec.c -src/symcipher/aes_small_enc.c -src/symcipher/aes_x86ni.c -src/symcipher/aes_x86ni_cbcdec.c -src/symcipher/aes_x86ni_cbcenc.c -src/symcipher/aes_x86ni_ctr.c -src/symcipher/aes_x86ni_ctrcbc.c -src/symcipher/chacha20_ct.c -src/symcipher/chacha20_sse2.c -src/symcipher/des_ct.c -src/symcipher/des_ct_cbcdec.c -src/symcipher/des_ct_cbcenc.c -src/symcipher/des_support.c -src/symcipher/des_tab.c -src/symcipher/des_tab_cbcdec.c -src/symcipher/des_tab_cbcenc.c -src/symcipher/poly1305_ctmul.c -src/symcipher/poly1305_ctmul32.c -src/symcipher/poly1305_ctmulq.c -src/symcipher/poly1305_i15.c -src/x509/asn1.t0 -src/x509/asn1enc.c -src/x509/encode_ec_pk8der.c -src/x509/encode_ec_rawder.c -src/x509/encode_rsa_pk8der.c -src/x509/encode_rsa_rawder.c -src/x509/skey_decoder.c -src/x509/skey_decoder.t0 -src/x509/x509_decoder.c -src/x509/x509_decoder.t0 -src/x509/x509_knownkey.c -src/x509/x509_minimal.c -src/x509/x509_minimal.t0 -src/x509/x509_minimal_full.c -test/test_crypto.c -test/test_math.c -test/test_speed.c -test/test_x509.c -test/x509/alltests.txt -test/x509/dn-ee.der -test/x509/dn-ica1.der -test/x509/dn-ica2.der -test/x509/dn-root-new.der -test/x509/dn-root.der -test/x509/ee-badsig1.crt -test/x509/ee-badsig2.crt -test/x509/ee-cp1.crt -test/x509/ee-cp2.crt -test/x509/ee-cp3.crt -test/x509/ee-cp4.crt -test/x509/ee-dates.crt -test/x509/ee-md5.crt -test/x509/ee-names.crt -test/x509/ee-names2.crt -test/x509/ee-names3.crt -test/x509/ee-names4.crt -test/x509/ee-p256-sha1.crt -test/x509/ee-p256-sha224.crt -test/x509/ee-p256-sha256.crt -test/x509/ee-p256-sha384.crt -test/x509/ee-p256-sha512.crt -test/x509/ee-p256.crt -test/x509/ee-p384.crt -test/x509/ee-p521.crt -test/x509/ee-sha1.crt -test/x509/ee-sha224.crt -test/x509/ee-sha384.crt -test/x509/ee-sha512.crt -test/x509/ee-trailing.crt -test/x509/ee.crt -test/x509/ica1-1016.crt -test/x509/ica1-1017.crt -test/x509/ica1-4096.crt -test/x509/ica1-p256.crt -test/x509/ica1-p384.crt -test/x509/ica1-p521.crt -test/x509/ica1.crt -test/x509/ica2-1016.crt -test/x509/ica2-1017.crt -test/x509/ica2-4096.crt -test/x509/ica2-notCA.crt -test/x509/ica2-p256.crt -test/x509/ica2-p384.crt -test/x509/ica2-p521.crt -test/x509/ica2.crt -test/x509/junk.crt -test/x509/names.crt -test/x509/root-p256.crt -test/x509/root-p384.crt -test/x509/root-p521.crt -test/x509/root.crt -tools/brssl.c -tools/brssl.h -tools/certs.c -tools/chain.c -tools/client.c -tools/errors.c -tools/files.c -tools/impl.c -tools/keys.c -tools/names.c -tools/server.c -tools/skey.c -tools/sslio.c -tools/ta.c -tools/twrch.c -tools/vector.c -tools/verify.c -tools/xmem.c diff --git a/contrib/bearssl/inc/bearssl.h b/contrib/bearssl/inc/bearssl.h index 4f4797cf7937..310edb258d8d 100644 --- a/contrib/bearssl/inc/bearssl.h +++ b/contrib/bearssl/inc/bearssl.h @@ -137,6 +137,10 @@ #include "bearssl_x509.h" #include "bearssl_pem.h" +#ifdef __cplusplus +extern "C" { +#endif + /** \brief Type for a configuration option. * * A "configuration option" is a value that is selected when the BearSSL @@ -167,4 +171,13 @@ typedef struct { */ const br_config_option *br_get_config(void); +/* ======================================================================= */ + +/** \brief Version feature: support for time callback. */ +#define BR_FEATURE_X509_TIME_CALLBACK 1 + +#ifdef __cplusplus +} +#endif + #endif diff --git a/contrib/bearssl/src/rsa/rsa_i62_keygen.c b/contrib/bearssl/src/rsa/rsa_i62_keygen.c index 8f55c3759082..992fe97e6ff1 100644 --- a/contrib/bearssl/src/rsa/rsa_i62_keygen.c +++ b/contrib/bearssl/src/rsa/rsa_i62_keygen.c @@ -40,7 +40,7 @@ br_rsa_i62_keygen(const br_prng_class **rng, /* see bearssl_rsa.h */ br_rsa_keygen -br_rsa_i62_keygen_get() +br_rsa_i62_keygen_get(void) { return &br_rsa_i62_keygen; } @@ -49,7 +49,7 @@ br_rsa_i62_keygen_get() /* see bearssl_rsa.h */ br_rsa_keygen -br_rsa_i62_keygen_get() +br_rsa_i62_keygen_get(void) { return 0; } diff --git a/contrib/bearssl/src/rsa/rsa_pss_sig_unpad.c b/contrib/bearssl/src/rsa/rsa_pss_sig_unpad.c index a9f8ca3ac10f..0c6ae9990a09 100644 --- a/contrib/bearssl/src/rsa/rsa_pss_sig_unpad.c +++ b/contrib/bearssl/src/rsa/rsa_pss_sig_unpad.c @@ -114,7 +114,7 @@ br_rsa_pss_sig_unpad(const br_hash_class *hf_data, * in the string. */ for (u = 0; u < hash_len; u ++) { - r |= tmp[u] ^ x[(xlen - salt_len - 1) + u]; + r |= tmp[u] ^ x[(xlen - hash_len - 1) + u]; } return EQ0(r); From nobody Sun Apr 16 09:46: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 4Pzlgh23Swz45267; Sun, 16 Apr 2023 09:46:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pzlgg4XXwz40xh; Sun, 16 Apr 2023 09:46:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681638383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TymRvoTQ+8er/rVPUhMRoFTDwRk76LnNV/VIXIM+i3Y=; b=I29Xxoxojq2jxrUm8ReDcFWN1Y6wxzoBZDzRocSKj0dWnQjoDwi8A0by2TGbP4TUxLUKDp MUemReoAspRWgruak+2U8POSgoqjMK0kwWaTKFqddIyo/i5HhQsrheKrEkmOsMAwdodzp6 uGO93L7SZrABSuLr54n3vikc8oOUOjx13A1qO5HwHH+k6/8VzRdU5NjBLWqW73Y1pC0Ls0 2hOPcGdLE9MVftT6LEdi2Jx8yMwr8n5trKk1gT8IExPLiwq2DLtH9H44CfStZk/VVc/CD+ FZv/RLbCmuvTFukE/7SOU3N7brJxYGFL7j8z1cAPd5Gm29md9NucejwoIhJUTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681638383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TymRvoTQ+8er/rVPUhMRoFTDwRk76LnNV/VIXIM+i3Y=; b=jIJfGje4CKWp0HJ7BVXLKe0bVxrLi3PQIqAoUXLqq9f0WgM0TzomCve1sM/VcVMPOEhKtj IvD++ORE565+XIxt3BhNYX7tvbzS6OrN+mbQNZbPO//Tf6sBsUJ+BhpfR+5cxHMe1QYU7M ieE1fzrMZdF7+n54qZyuOsB9m4R8123j1cqw2EewAcdO93IFv0lVtqxbQf+aFqOw2bNtuQ Zm0eqQDiB1DaCOhomZBvT/NhdhDyHtR0tpyMin1ihCF1ki8+uEhbP93dzDbHfGUBPH6JPz 2pPKgQHjFkh3LfrX+ipXJwgXDmzMjxbqtYyQc+a2ad4l0EdUw1Q1jjjRZoeTDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681638383; a=rsa-sha256; cv=none; b=Y9POtj/1NT5VS2Z1KEB+njNMDziDIxc3XDtpMMXGc0VWrGZtiK5YSQMwpUoBWiYJaz/E1N dR2/rcfKqjmMqRg2iVEhx26mTzHbBCAIpsuLgg+lZ0pK76wJwoUGJ6WBGqdTXW1IIPXFSi 6q3Q0tu58B0GqTRhghCfPXJKOLIOutuU0ubKJ6nvhkxutSkUZhxyYCopxwqJzV1PmGWT1m 3S64sKF2kWtRkALQ/El7Zr1LnqMZ5EBJkxVtFTG1vFQ0ptJ5EiiIQFsEIbkP9hbxwy6kfa VacYA+Kt4WKNgBU697hBTHtkMjjmwldoxB5YpWqlLxA9i4GWtVTGLL5FDkvN+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 4Pzlgg3fRLzhwR; Sun, 16 Apr 2023 09:46: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 33G9kNtX006240; Sun, 16 Apr 2023 09:46:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33G9kNBb006239; Sun, 16 Apr 2023 09:46:23 GMT (envelope-from git) Date: Sun, 16 Apr 2023 09:46:23 GMT Message-Id: <202304160946.33G9kNBb006239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 82a036d86aca - main - morse.6: Mention to standards in the 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82a036d86acaac75b1ff6d4f8b767bbb117694f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=82a036d86acaac75b1ff6d4f8b767bbb117694f1 commit 82a036d86acaac75b1ff6d4f8b767bbb117694f1 Author: Gordon Bergling AuthorDate: 2023-04-16 09:46:09 +0000 Commit: Gordon Bergling CommitDate: 2023-04-16 09:46:09 +0000 morse.6: Mention to standards in the SEE ALSO section Mention ITU-T Recommendation F.1 and ITU-R M.1677-1 in the SEE ALSO section. Obtained from: OpenBSD MFC after: 5 days --- usr.bin/morse/morse.6 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/usr.bin/morse/morse.6 b/usr.bin/morse/morse.6 index bf339563589b..d2ce30eddb82 100644 --- a/usr.bin/morse/morse.6 +++ b/usr.bin/morse/morse.6 @@ -29,7 +29,7 @@ .\" @(#)bcd.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd January 5, 2018 +.Dd April 16, 2023 .Dt MORSE 6 .Os .Sh NAME @@ -178,6 +178,17 @@ device file .El .Sh SEE ALSO .Xr speaker 4 +.Rs +.%I ITU-T Recommendation F.1 +.%R "Operational provisions for the international public telegram service" +.%O Division B, I. Morse code +.Re +.Rs +.%I ITU-R M.1677-1 +.%R International Morse code +.%D 2009 +.%U https://www.itu.int/rec/R-REC-M.1677-1-200910-I/ +.Re .Sh HISTORY Sound support for .Nm @@ -191,7 +202,7 @@ Ability to key an external device added by Farnsworth support for .Nm added by -.An Stephen Cravey (N5UUU). +.An Stephen Cravey (N5UUU) . .Sh BUGS Only understands a few European characters (German and French), From nobody Sun Apr 16 10:48: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 4Pzn3p4drSz456fj; Sun, 16 Apr 2023 10:48: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 4Pzn3p45T4z3hp9; Sun, 16 Apr 2023 10:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681642134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Es71LE1jIvGdBDqPr2+5eBeFruOfGY3u6ClDkXTDOxc=; b=BA5/1YvPpQ/2gy9axZCnA/0EoXK67IWZF4aazAlgpTpFarjcghbL2sXm3Qu3afCY5Vd8GK uadbDr5P/UVbDlqvcFIuRtkJ6EIlfJPMLWvbFP/EjeQWgbVwWnVz3gzmbO2mKvVT+28U+M Yy6Qq3IefRw6N56dqUJMKSGvDrhbPFssvxBJvlL7wyt7kMeIn5RhLjLQSls0NRVdcoTQWj caQNDbFGmxEBxQkDSAbCwZiSibmTprD9tt+qC7wsVEZKjKGIfTvmX3AYf8Lu4Stumt/EJ/ F6qstzOqzNY0mkUoEzFUPNWRH/zwfTvzyqZivUSwc9PORuVGyRqLK4vqgDfJoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681642134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Es71LE1jIvGdBDqPr2+5eBeFruOfGY3u6ClDkXTDOxc=; b=SwInbmLMJ4gonqamGuref+1Sm63A65xbJOr2j3FyIaoSTpBUC85L8nUtzUOgPnnqUnxGmI hlUYKBIUnDl7FIGJsATAk91p214tzX9ij5lJMBFa7K/QDhV5caToPRKqnI2tcONxkrPvOU JsJlC72GK/D48z5yRIJD73vMwEVepIQM8TQIKz0SB64YEqtgngFAojsvmcR4KGD8/EeoI7 9ntfgpYrIwoMxfvtKxjBBrweHc2ofP1HXFysf6p5+0J1eZ6IS81dZtn74CYf9gRorF6aeH RMPIHfeJ/Iz1lAyM1N6BTTYw+fVTp3t69zO6gsU06xSMN/tVtbt3R/f+eqZmww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681642134; a=rsa-sha256; cv=none; b=Q4KnrGyThaeRqkglXCTpll2mT0uMxa5UBw6iGHJfBe4I2H8jvOw09rugKbdonkhxhzV9Vf BnSx4/ipxly6cNZXcXhHEdF+GTCMWYYXqDlr5wPkK/hywq7XXitVx1aC4VSl66TcnDxqse Lg4laz54ciBfOzphTWodwPksXJeDLLyeJU2ql23zXGvaq8NjU9onvfjjLR233WcOuBWcvM v/j2x1ePfBMjaKeW1KuIiZjRPU5XIiKojHDNE6XC1Z3J5BamRQ15tIHv9HFBFq9pJIiz8Q 52by/exLpvkL1E3+PRARMbJTdpuwb58nF7wdN3PcTEuzhTQl5cy9ryRsjdBIRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pzn3p37Pdzkw0; Sun, 16 Apr 2023 10:48: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 33GAms0M004912; Sun, 16 Apr 2023 10:48:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GAms1X004911; Sun, 16 Apr 2023 10:48:54 GMT (envelope-from git) Date: Sun, 16 Apr 2023 10:48:54 GMT Message-Id: <202304161048.33GAms1X004911@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: 77f0e198d913 - main - procctl: add state flags to PROC_REAP_GETPIDS reports List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 77f0e198d9134b6ca2650d3a84d7db2d786ec0c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=77f0e198d9134b6ca2650d3a84d7db2d786ec0c0 commit 77f0e198d9134b6ca2650d3a84d7db2d786ec0c0 Author: Val Packett AuthorDate: 2023-04-15 17:59:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:48:20 +0000 procctl: add state flags to PROC_REAP_GETPIDS reports For a process supervisor using the reaper API to track process subtrees, it is very useful to know the state of the processes on the list. Sponsored by: https://www.patreon.com/valpackett Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39585 --- lib/libc/sys/procctl.2 | 10 ++++++++-- sys/kern/kern_procctl.c | 6 ++++++ sys/sys/procctl.h | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/procctl.2 b/lib/libc/sys/procctl.2 index 97509d0fbf06..052fcb37fb9d 100644 --- a/lib/libc/sys/procctl.2 +++ b/lib/libc/sys/procctl.2 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2021 +.Dd April 15, 2023 .Dt PROCCTL 2 .Os .Sh NAME @@ -302,7 +302,7 @@ of the process. The .Fa pi_flags field returns the following flags, further describing the descendant: -.Bl -tag -width REAPER_PIDINFO_REAPER +.Bl -tag -width REAPER_PIDINFO_EXITING .It Dv REAPER_PIDINFO_VALID Set to indicate that the .Vt procctl_reaper_pidinfo @@ -320,6 +320,12 @@ field identifies the direct child of the reaper. .It Dv REAPER_PIDINFO_REAPER The reported process is itself a reaper. The descendants of the subordinate reaper are not reported. +.It Dv REAPER_PIDINFO_ZOMBIE +The reported process is in the zombie state, ready to be reaped. +.It Dv REAPER_PIDINFO_STOPPED +The reported process is stopped by a SIGSTOP/SIGTSTP signal. +.It Dv REAPER_PIDINFO_EXITING +The reported process is in the process of exiting (but not yet a zombie). .El .It Dv PROC_REAP_KILL Request to deliver a signal to some subset of the descendants of the reaper. diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 9d48b04dde48..a4f675c2938e 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -234,6 +234,12 @@ reap_getpids(struct thread *td, struct proc *p, void *data) pip->pi_flags |= REAPER_PIDINFO_CHILD; if ((p2->p_treeflag & P_TREE_REAPER) != 0) pip->pi_flags |= REAPER_PIDINFO_REAPER; + if ((p2->p_flag & P_STOPPED) != 0) + pip->pi_flags |= REAPER_PIDINFO_STOPPED; + if (p2->p_state == PRS_ZOMBIE) + pip->pi_flags |= REAPER_PIDINFO_ZOMBIE; + else if ((p2->p_flag & P_WEXIT) != 0) + pip->pi_flags |= REAPER_PIDINFO_EXITING; i++; } sx_sunlock(&proctree_lock); diff --git a/sys/sys/procctl.h b/sys/sys/procctl.h index 0fcb62e94bb9..2d4b19325bbf 100644 --- a/sys/sys/procctl.h +++ b/sys/sys/procctl.h @@ -102,6 +102,9 @@ struct procctl_reaper_pidinfo { #define REAPER_PIDINFO_VALID 0x00000001 #define REAPER_PIDINFO_CHILD 0x00000002 #define REAPER_PIDINFO_REAPER 0x00000004 +#define REAPER_PIDINFO_ZOMBIE 0x00000008 +#define REAPER_PIDINFO_STOPPED 0x00000010 +#define REAPER_PIDINFO_EXITING 0x00000020 struct procctl_reaper_pids { u_int rp_count; From nobody Sun Apr 16 10:57: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 4PznFw46hbz457g3; Sun, 16 Apr 2023 10:57: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 4PznFw3Qnhz3qLg; Sun, 16 Apr 2023 10:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681642660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjDxOvUp4f9Z/sF2tLat6cv2EIM0cdwDodDxU598VVU=; b=WZyyrSR8BSPt3CJZzu0YlJNf3XPMmVVs1+UHWiONOuEpPyXtlRpPdWXgKvWTYWtin6l71P Um6HolADwixg83r3s5feWbF9P1HSadqwMcyrtkCfbMHQX5e3300OR0gYs0+BGZHYASVDVI VY0TdiuQypqsrMWUO/bdrJjiTVZ1deEcA7WJXBEbkjHinuBagLndvaCN5LIERXdqIQHQ9m WQEZvk7tQjEX+1jDizosxutjkMmhyHr808WrOch8HlrVjoS4WaEWw/RlAd1GDMyyV9yrXl 2vq5SXI3R2LADbv1O0jrvINNslfinJPQFf2MspOKG620GjdFM24cIppMbOikWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681642660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjDxOvUp4f9Z/sF2tLat6cv2EIM0cdwDodDxU598VVU=; b=OI+oCour8qymq0dvCW4lhgkBBFoWDaXQnJGcXJro29PJ9IUjLRSerKfcMjaM9HSYxMHwT1 EYXMkc7Oy2i9cPb8uBf0YPr+TFewv9EpBW1MiIjAahAFKHodKS2Fs6Ir5H51n+VgAPJl1F JW6h+LU+mn0pZvLbQmvkOrTEk7aiGMazi2+Ryev5Jx/bPJlTUTnFgJ5xqQsXfOQzGOqiiy Y0n66TsBPdsNEi6syfpir0lju/1pLrAARknznTe46TYZb64NViS6uyoJzHZ6esDJCioqWS Jz3t2NV/oxy44C1a9piRTzIVPcb+dgr4+FAiPfcfUqEeIq8xrRPVMOhZCGU+mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681642660; a=rsa-sha256; cv=none; b=FjhZOcCb+Jm2CUgK/ct8SwhcWtFqFTtAqZF0lF3spo+PGgyjg8kLDiQFRLix58eohACnBD tgb9PcY0Jn5CttCc/aHsXirGrcsvml7Zqupx47QPeRv3M2qvjQ6GBFlzgj015KqYWQFXe7 L3tEmNBn1em5+djStSdDicRBazDrVFKm9TNjrMUOmyl6V1btq5cMX/nTnELyN+GqLn4f4p 4yKcHVPqSR7DUqEe+nyhR4t+GpYrrsRjCTCCirX3K7v7hksqkZzJc4SRzv70n7pWdS8Vta nxcks87xUNc4llOY5yXdErCyj9SWLxKmMbPBtuTvbaFTLf2+fXYzc9c4AQE7GQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznFw2D4DzktK; Sun, 16 Apr 2023 10:57: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 33GAveSj021511; Sun, 16 Apr 2023 10:57:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GAvenn021510; Sun, 16 Apr 2023 10:57:40 GMT (envelope-from git) Date: Sun, 16 Apr 2023 10:57:40 GMT Message-Id: <202304161057.33GAvenn021510@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: 074babfb2812 - stable/13 - DEBUG_VFS_LOCKS: use witness if available List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 074babfb2812c12caf99e3286f0a6c688ecf45bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=074babfb2812c12caf99e3286f0a6c688ecf45bf commit 074babfb2812c12caf99e3286f0a6c688ecf45bf Author: Konstantin Belousov AuthorDate: 2023-04-08 06:15:00 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:45:58 +0000 DEBUG_VFS_LOCKS: use witness if available (cherry picked from commit 7b6fe2428a97921e8df882d0a24b87094c37b468) --- sys/kern/vfs_lookup.c | 1 + sys/kern/vfs_subr.c | 16 +++++++++++++--- sys/sys/vnode.h | 1 + 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 3ded2180ac82..b7ce93f3702d 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -161,6 +161,7 @@ nameiinit(void *dummy __unused) UMA_ALIGN_PTR, 0); vfs_vector_op_register(&crossmp_vnodeops); getnewvnode("crossmp", NULL, &crossmp_vnodeops, &vp_crossmp); + vp_crossmp->v_irflag |= VIRF_CROSSMP; } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nameiinit, NULL); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 67f707dd9edb..c4d8ceac7e2b 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -5526,14 +5526,18 @@ assert_vi_unlocked(struct vnode *vp, const char *str) void assert_vop_locked(struct vnode *vp, const char *str) { - int locked; - if (KERNEL_PANICKED() || vp == NULL) return; - locked = VOP_ISLOCKED(vp); +#ifdef WITNESS + if ((vp->v_irflag & VIRF_CROSSMP) == 0) + witness_assert(&vp->v_vnlock->lock_object, LA_LOCKED, + __FILE__, __LINE__); +#else + int locked = VOP_ISLOCKED(vp); if (locked == 0 || locked == LK_EXCLOTHER) vfs_badlock("is not locked but should be", str, vp); +#endif } void @@ -5542,8 +5546,14 @@ assert_vop_unlocked(struct vnode *vp, const char *str) if (KERNEL_PANICKED() || vp == NULL) return; +#ifdef WITNESS + if ((vp->v_irflag & VIRF_CROSSMP) == 0) + witness_assert(&vp->v_vnlock->lock_object, LA_UNLOCKED, + __FILE__, __LINE__); +#else if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) vfs_badlock("is locked but should not be", str, vp); +#endif } void diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 2011f429141c..37cafdb0d5ae 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -248,6 +248,7 @@ struct xvnode { #define VIRF_PGREAD 0x0002 /* Direct reads from the page cache are permitted, never cleared once set */ #define VIRF_MOUNTPOINT 0x0004 /* This vnode is mounted on */ +#define VIRF_CROSSMP 0x0010 /* Cross-mp vnode, no locking */ #define VI_TEXT_REF 0x0001 /* Text ref grabbed use ref */ #define VI_MOUNT 0x0002 /* Mount in progress */ From nobody Sun Apr 16 10:57: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 4PznFy4Krdz457ZB; Sun, 16 Apr 2023 10:57: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 4PznFx484sz3qBG; Sun, 16 Apr 2023 10:57:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681642661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7WgI7X7w1QDfGmPgqJ7ZILn9RDUqUY8c8YJrlVbnWi4=; b=cZe2ljYC9/CtnFhSIi1umOveAQrRC6VkOfFQys6KaGnY+JDSeRu/gaWexbk0nOPYAwsuI2 Zeqbed+iyau3Gbo0kueU2/zbecRlatP5BKKljV/0LSjoM63oEMl8UqgLSOkeMaSSNUuv/M ywAbDCoF32+2JYD3wFiqLhvukNC8bfhHdUIzz6K1oyHZ5XkBa29CxP7zfsQ9o4NF5QhuV/ BrJslhKnPos/t5ZuFFUaOKeussXvoW07CBQepnWe2nyj14yn3B3J7qyN9vjmVcEfVp+5uB 1EBHxuhHb7fzGlXDv866cSWvCvjz0Y+deYOkC/rOf9dLaVz9XMMkGlfvFGjlMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681642661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7WgI7X7w1QDfGmPgqJ7ZILn9RDUqUY8c8YJrlVbnWi4=; b=adgr0m4kcQAZI77EMdmonM4bgQLmAnx43OdUzB5f9SsrzcymsbL+7tQyuh7YttXwH+Z9Za 7iZuezDDLzwL2k7M/W5z3bk5e8cDl9Ac1o5mhZLHdJ6HkSXgxbstYirQDkOiCSp9II3ugt tptMlZhJpDt98El5C68nxjsj5ZoC8FNwG/mU3mguZo8BgiBPUGniiKjy0qX2xY5f8mPyxA timUjH36oH1Rbnsb3ViTGDM1cWh91huoD4lV2t5lupT8dK1wmvajjy+XxJ0O4bM0CW7B2E ceCzIHwjQqP3vnMfVjnFLwrokZPQY23mvRDuV0qZp1emciqGjak1s/ievBFKjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681642661; a=rsa-sha256; cv=none; b=a3K4t0stN8E66tngNte+fTo8SvsQmyapURLcRn9emMouOIW5HDH/NqYITRyaiD2CZfBMV0 1VGFlsoYyibSNw8B4bPZR0O4PZLThFsupItXyZEPP/B7pTGMhgqV15nurgcjYVPpWJsNcF KfqisU51cNf39RzoMoAgqctsaK6gXVSGgaOOL1fgNH+L0okQ6ntIW8wlLHYBpo/C6FLSE6 q/izXqTCgofKftkjrZWksDXoesF1g3gOz5wuYprCc4A8d0Yx6r0MaoqydFa1/7p2+5diT8 /0KUjJfK0dHrATQdbsn/F5gRsXSzcLEN9iWuuU/oxaIcNGTWmE34EnGnhF7qow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznFx2vG4zl7F; Sun, 16 Apr 2023 10:57: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 33GAvfNS021536; Sun, 16 Apr 2023 10:57:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GAvfWV021535; Sun, 16 Apr 2023 10:57:41 GMT (envelope-from git) Date: Sun, 16 Apr 2023 10:57:41 GMT Message-Id: <202304161057.33GAvfWV021535@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: 41959beeae1f - stable/13 - Add witness_is_owned(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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 41959beeae1f463ab0421510cb28f6d77e57a61a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=41959beeae1f463ab0421510cb28f6d77e57a61a commit 41959beeae1f463ab0421510cb28f6d77e57a61a Author: Konstantin Belousov AuthorDate: 2023-04-10 15:54:58 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:45:58 +0000 Add witness_is_owned(9) (cherry picked from commit 75fc6f86c38807f1fb305c065c6affcf7617b029) --- sys/kern/subr_witness.c | 58 ++++++++++++++++++++++++++++++++++++++++--------- sys/sys/lock.h | 1 + 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index c849a191bf16..fe2e11c3bea5 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -2425,6 +2425,32 @@ witness_restore(struct lock_object *lock, const char *file, int line) instance->li_line = line; } +static bool +witness_find_instance(const struct lock_object *lock, + struct lock_instance **instance) +{ +#ifdef INVARIANT_SUPPORT + struct lock_class *class; + + if (lock->lo_witness == NULL || witness_watch < 1 || KERNEL_PANICKED()) + return (false); + class = LOCK_CLASS(lock); + if ((class->lc_flags & LC_SLEEPLOCK) != 0) { + *instance = find_instance(curthread->td_sleeplocks, lock); + return (true); + } else if ((class->lc_flags & LC_SPINLOCK) != 0) { + *instance = find_instance(PCPU_GET(spinlocks), lock); + return (true); + } else { + kassert_panic("Lock (%s) %s is not sleep or spin!", + class->lc_name, lock->lo_name); + return (false); + } +#else + return (false); +#endif +} + void witness_assert(const struct lock_object *lock, int flags, const char *file, int line) @@ -2433,18 +2459,9 @@ witness_assert(const struct lock_object *lock, int flags, const char *file, struct lock_instance *instance; struct lock_class *class; - if (lock->lo_witness == NULL || witness_watch < 1 || KERNEL_PANICKED()) + if (!witness_find_instance(lock, &instance)) return; class = LOCK_CLASS(lock); - if ((class->lc_flags & LC_SLEEPLOCK) != 0) - instance = find_instance(curthread->td_sleeplocks, lock); - else if ((class->lc_flags & LC_SPINLOCK) != 0) - instance = find_instance(PCPU_GET(spinlocks), lock); - else { - kassert_panic("Lock (%s) %s is not sleep or spin!", - class->lc_name, lock->lo_name); - return; - } switch (flags) { case LA_UNLOCKED: if (instance != NULL) @@ -2497,6 +2514,27 @@ witness_assert(const struct lock_object *lock, int flags, const char *file, #endif /* INVARIANT_SUPPORT */ } +/* + * Checks the ownership of the lock by curthread, consulting the witness list. + * Returns: + * 0 if witness is disabled or did not work + * -1 if not owned + * 1 if owned + */ +int +witness_is_owned(const struct lock_object *lock) +{ +#ifdef INVARIANT_SUPPORT + struct lock_instance *instance; + + if (!witness_find_instance(lock, &instance)) + return (0); + return (instance == NULL ? -1 : 1); +#else + return (0); +#endif +} + static void witness_setflag(struct lock_object *lock, int flag, int set) { diff --git a/sys/sys/lock.h b/sys/sys/lock.h index 2db38f9df89a..4031f20946c0 100644 --- a/sys/sys/lock.h +++ b/sys/sys/lock.h @@ -237,6 +237,7 @@ int witness_list_locks(struct lock_list_entry **, int (*)(const char *, ...)); int witness_warn(int, struct lock_object *, const char *, ...); void witness_assert(const struct lock_object *, int, const char *, int); +int witness_is_owned(const struct lock_object *lock); void witness_display_spinlock(struct lock_object *, struct thread *, int (*)(const char *, ...)); int witness_line(struct lock_object *); From nobody Sun Apr 16 10:57: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 4PznFz0jNRz457lC; Sun, 16 Apr 2023 10:57: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 4PznFy5KPLz3q7r; Sun, 16 Apr 2023 10:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681642662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7OnZXK0Ehd0KMwz6zvEDibDt68n1rN2GVP5QOpMJvUc=; b=mpqMLM0hq5FDRHElmUD2oXRB4E65yVxtLOOR2ORLwCXYXOImn7gG7sprs98i5skdmsAiKZ troWvLxnI2iH4FwYQvO4kvHgK/kNPXSVBoHQ/aJHKka9koW/N8VsjqglC5rpB5Z+hYg91i lblnblKuAtQRdQV2MGizu1prdj79TIbfcTjLhgsNZHzdCCSmjgeCXJur90qa7q4XjHSr0u V2ozzM6tWJyZbhpHqcfvB0n+r+coicW+RjB3rDP6MzL4sgaS0/4SXhskKZqtET1bFO/51W keeimkKJ315ZTz8zoQNddnon8jFOnsjiUslp41MovZhttSz0FsPe4MGr44FiYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681642662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7OnZXK0Ehd0KMwz6zvEDibDt68n1rN2GVP5QOpMJvUc=; b=XdCy4M0rckoD65Tc16jQ6LsxAKh/N+lRD2xglVlHv7KXIggT7Ctib2sw+3xGnkLvzKn2Kz FaXFDcZ3DRw75rs2SuI7AbT8M/J6EaLpVBX2mFbGfr4KFEhBFkQWo52ITxZSn4BVTyIMI/ rJGT2xyNgJK9wE2dVb0jFPHVVGDwfvdyt1SRKtVt0a77kHpjo3oOwS42Oi0ws0ycDKQIIT X54sq8TZ+mQOLkckc0+wCRTACAzEu9UFHxEx2+znDfPgyPuZJx8HlQV+jI4yfxZqHHqNqA iDcvD7dMGGGr9AuX+cXISUnDqcNraT8/tirzH8w7ifF0JTf78/q+0Q2JHeqDYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681642662; a=rsa-sha256; cv=none; b=HsaU1K5wFKGBXbIKS306EQNMcjSqJL5D5MoV8AQrHR00uoO9TXHiubiEVOAKgkMX1ckwYd Af6QR3eiA9e5nvStEIH//0BxXINwrTuvvW3JLS7BQCaEx9LvOMDL7YsnqNZpLk2jQCp2KD lg+qLNlOQ6vHuED38kMtkcItf5Fstv7yZ1Vzzw6alUyxiN+UtJGquDnno5URa8ZLmx20BD qM/sZkKecSm/gyc5qR+zeieXJIM8EwRueLmdlVRkKFLXxotq1VOm38h+S4TCaKfyIAXWhR KXAFQKT1VIXoOwdeQPu1FtrXu/saNEVbcA68fcq/c4paHdo7n/GSeQ4h/4by8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznFy43Whzl7G; Sun, 16 Apr 2023 10:57: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 33GAvgX9021555; Sun, 16 Apr 2023 10:57:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GAvg7B021554; Sun, 16 Apr 2023 10:57:42 GMT (envelope-from git) Date: Sun, 16 Apr 2023 10:57:42 GMT Message-Id: <202304161057.33GAvg7B021554@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: 99da9d65a5e0 - stable/13 - DEBUG_VFS_LOCKS: restore diagnostic for the witness use case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 99da9d65a5e0db8f6563fee7fc576c1de4f84363 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=99da9d65a5e0db8f6563fee7fc576c1de4f84363 commit 99da9d65a5e0db8f6563fee7fc576c1de4f84363 Author: Konstantin Belousov AuthorDate: 2023-04-10 08:52:43 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:45:58 +0000 DEBUG_VFS_LOCKS: restore diagnostic for the witness use case (cherry picked from commit c53e990b8d0444b5ad59ddb18742a71434e30ee2) --- sys/kern/vfs_subr.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index c4d8ceac7e2b..7ebd63447caa 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -5530,14 +5530,13 @@ assert_vop_locked(struct vnode *vp, const char *str) return; #ifdef WITNESS - if ((vp->v_irflag & VIRF_CROSSMP) == 0) - witness_assert(&vp->v_vnlock->lock_object, LA_LOCKED, - __FILE__, __LINE__); + if ((vp->v_irflag & VIRF_CROSSMP) == 0 && + witness_is_owned(&vp->v_vnlock->lock_object) == -1) #else int locked = VOP_ISLOCKED(vp); if (locked == 0 || locked == LK_EXCLOTHER) - vfs_badlock("is not locked but should be", str, vp); #endif + vfs_badlock("is not locked but should be", str, vp); } void @@ -5547,13 +5546,12 @@ assert_vop_unlocked(struct vnode *vp, const char *str) return; #ifdef WITNESS - if ((vp->v_irflag & VIRF_CROSSMP) == 0) - witness_assert(&vp->v_vnlock->lock_object, LA_UNLOCKED, - __FILE__, __LINE__); + if ((vp->v_irflag & VIRF_CROSSMP) == 0 && + witness_is_owned(&vp->v_vnlock->lock_object) == 1) #else if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE) - vfs_badlock("is locked but should not be", str, vp); #endif + vfs_badlock("is locked but should not be", str, vp); } void From nobody Sun Apr 16 11:10: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 4PznXg4spKz457kT; Sun, 16 Apr 2023 11:10: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 4PznXg4Rx1z41Qm; Sun, 16 Apr 2023 11:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FWI2hF3ufRx8eQLp653Qz7OSczwaq7ySNbgLzwMQHGo=; b=ln0dW8Ec+QtYOkl/FJSNOu1HGstm/qB2kMBKtF04957IzaUrgDvXG3bOURuON6NUrEvkj4 YLcPLwTnENF2uC1cuw5wQD7DwroSz9Oiu+/YKZbnfCEiV+b/lcWaaN5dMJKfUmf7pm2wRo o5hx5fQaso+GMS/FLUIDCZc/UZtnOD6ujXaOTpmAHnVHyN8uYx6I6IS2mnnzX2oXi3bSuD kJxda11+RqIV7P1BLg1X0nU+4J1hg2iE0yKZr0tw4+3RedyUynq0ydLBJVoFRxnu0//IyP XMctVI/cR4xP/bJIFueKln1YO603kyD+pQkcA+hbdeit5dGzFXDpkwqPAWXkIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FWI2hF3ufRx8eQLp653Qz7OSczwaq7ySNbgLzwMQHGo=; b=Q4wrXOTbW7J2uRqLKldPaYf/lmB9NxpmHICdPJoxWlQomPirl94jjr9shX2kkll9NeWgmQ DeH1ukqurkITREVMyUBFNFQblSnfEl7LeCSctQUH6hNAoIZJlL/DVuPLsKHlLn3ockvQmM XwXFqdN277ggpncVjivvWp8fslw2NHJK988YaMlQSC+Bb8RsQqkVpP0y/Wo2hwdpUTfdCj LNZkMqGD/Hn/W5WDCWK54YWAn/Kas44MCAKQsd0RC6CtgyIMZefPp5MsZT2FWrxtKLqKOF w+JvczafZ4SLF9YFeS0c7qo+RKHCJdwmIN9xnwThddKYTyctB2OwusFEicpndQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681643427; a=rsa-sha256; cv=none; b=J5j3qUrMEEy87m6jJH3RVPxNDCDb65SNUDutozYKnCpkiFI+hqMsSVnhvZ8MoPPM2Qsu0T q73u+3Pm62+oV1aF6Bh8DMrq1+BKWNUjD1CrctTtf82UU+dciNBjshBNjHIi+yO2Fv9gyH j/ho5mv6hjXFytPd+tA/NMKkWvGggX0VoIgtAgpbX0qoDWq6BBEvkhIe4RgGHoEU/X3lZ6 hMIiDc2/GvNQOAe1z7esIEukZuPkHY107VHXKfZXmN5DymYE12O/R1ichD8+JGzObc0Hc/ /AI6FUF/bykyhSw+vM2SXUbDgqvpb5j0Y/Ib97zGgJxJIWSx1LsQNeVlWM2XCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznXg3VTyzlXq; Sun, 16 Apr 2023 11:10: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 33GBARU8047972; Sun, 16 Apr 2023 11:10:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GBARdl047971; Sun, 16 Apr 2023 11:10:27 GMT (envelope-from git) Date: Sun, 16 Apr 2023 11:10:27 GMT Message-Id: <202304161110.33GBARdl047971@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: fcfa6bf40d99 - stable/13 - Add kqueue1() 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fcfa6bf40d99fa28ff4feb461a6e90e4d1643819 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fcfa6bf40d99fa28ff4feb461a6e90e4d1643819 commit fcfa6bf40d99fa28ff4feb461a6e90e4d1643819 Author: Konstantin Belousov AuthorDate: 2023-03-25 23:39:02 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:59:43 +0000 Add kqueue1() syscall (cherry picked from commit 61194e9852e641d1533cd04a5679d6042ff975d3) --- sys/kern/kern_event.c | 13 +++++++++++++ sys/kern/syscalls.master | 5 +++++ sys/sys/event.h | 3 +++ 3 files changed, 21 insertions(+) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 90a725b6e0f0..29485f3a39db 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1058,6 +1058,19 @@ sys_kqueue(struct thread *td, struct kqueue_args *uap) return (kern_kqueue(td, 0, NULL)); } +int +sys_kqueue1(struct thread *td, struct kqueue1_args *uap) +{ + int flags; + + if ((uap->flags & ~(KQUEUE_CLOEXEC)) != 0) + return (EINVAL); + flags = 0; + if ((uap->flags & KQUEUE_CLOEXEC) != 0) + flags |= O_CLOEXEC; + return (kern_kqueue(td, flags, NULL)); +} + static void kqueue_init(struct kqueue *kq) { diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 5b46ee6c2839..7705cab0da77 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -3283,6 +3283,11 @@ u_int flags, ); } +583 AUE_KQUEUE STD|CAPENABLED { + int kqueue1( + u_int flags + ); + } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master diff --git a/sys/sys/event.h b/sys/sys/event.h index b6704f4b4b50..1220ee5343e7 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -216,6 +216,9 @@ struct kevent32_freebsd11 { #define NOTE_NSECONDS 0x00000008 /* data is nanoseconds */ #define NOTE_ABSTIME 0x00000010 /* timeout is absolute */ +/* Flags for kqueue1(2) */ +#define KQUEUE_CLOEXEC 0x00000001 /* close on exec */ + struct knote; SLIST_HEAD(klist, knote); struct kqueue; From nobody Sun Apr 16 11:10:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PznXj0rxVz458Zg; Sun, 16 Apr 2023 11:10: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 4PznXh52p0z41n2; Sun, 16 Apr 2023 11:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6cDooFyGOpBXCw1tGHyDiteh2yVCd4R+c+FtM5KRSu8=; b=adyT8slp63TlCDZwOng+c7bLPgvMSpKGW5GyFlCOLWDRMIbP2IOWJ025OPvb68K4g6TaLA RcQWy7LXanWOo+xyGhEegbI06in+Fzo93HNrIhvsRp2UgnrpnH32nZcQV2ubULHi2hUHMR jEp0K3M+yritX/lQLl8jB0FPvwzG5/szTl4RE9pzs44uoQxxvSo+EumVC9nWBszDf4PO6B s24in1A4L9okSQw6xQlhpNNUiTiKiAImoAtTJ7PjcYVoXkd3blqk85rg4FikADNl5YDhcZ j8yvHHq0TFaWQ9zmyZ9NFkO30tJy7cjhNLOTzMVODy3G2T25V7SyApFnXF8TDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643428; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6cDooFyGOpBXCw1tGHyDiteh2yVCd4R+c+FtM5KRSu8=; b=JJa9J9rToebMGnTKR4WetAOB9UKLMEdfrNMMqnZMe/Vd8lbNVL5ZhrreOq9lm8HEB7N2Xr x8AJ2bCqGUvzJg+mSzhYagEdXXYwolFgFaacjnwY/uO3+nGBa33cSZN+L4zaUDtJ1b6OMj pU+c4cGXwHEUQ7arP704++pNurGKrqkAqPbMIyJ+Y3qc4pXERVc9azw2USIbf8V5Mfd2DV X/87CiXi5sKbUj4dAmyb5HHKdJy8RRinTLUxiro7MwmvN2tjxT9z4/bA8u6dixS8MyC939 /H7XrUybMsd9mop+a3iFrzubG1Wz5szOu+PRGX2KMEFThi6I379Qy5biU9PdyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681643428; a=rsa-sha256; cv=none; b=Zdpb4mwRuF/IQEhxEIXxPIGWLsi17UICIrW1fw9gN7HcgAqDCaDgNLCZTkDhbgFDc+2p5M 6CEXwy5kZRV5cubDHjGVeBJu3SmIyYpMR2JC08miL0Y7WaNhxQw/aiT5AHp6Y/lhldEkgv vCNwr4k+bdB/8tbbxxINfzhbZ1Jt/m9nCd0VhH6J7Jn9m+DeC2FX6/QslMdZ47vVuFxN9g 0dXnL/kNjrmtsirh+9NXqkJXer2g93S07S3WRNb55oHIW6TGjcb/gOBg5SaRftjtrdun/g N6apR898y/T7aJtIMA/cHO5L6JAewBS9v8fEvBANQBA0ttu+TqqnK7RHK2ma8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznXh48hKzlK2; Sun, 16 Apr 2023 11:10:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33GBASTb047991; Sun, 16 Apr 2023 11:10:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GBASYH047990; Sun, 16 Apr 2023 11:10:28 GMT (envelope-from git) Date: Sun, 16 Apr 2023 11:10:28 GMT Message-Id: <202304161110.33GBASYH047990@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: 35c8860cc4de - stable/13 - kqueue1(2): export the symbol from libc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 35c8860cc4deaf8055fa526f348c7e7cbfa73432 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=35c8860cc4deaf8055fa526f348c7e7cbfa73432 commit 35c8860cc4deaf8055fa526f348c7e7cbfa73432 Author: Konstantin Belousov AuthorDate: 2023-03-25 23:40:39 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:59:43 +0000 kqueue1(2): export the symbol from libc (cherry picked from commit 375732cc6e462ca160654886f0411d2950768a8b) --- lib/libc/sys/Symbol.map | 1 + sys/sys/event.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 9150f835ae0c..503e4e5ca657 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -418,6 +418,7 @@ FBSD_1.6 { FBSD_1.7 { _Fork; + kqueue1; swapoff; }; diff --git a/sys/sys/event.h b/sys/sys/event.h index 1220ee5343e7..36e965f853fc 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -360,6 +360,7 @@ struct timespec; __BEGIN_DECLS int kqueue(void); +int kqueue1(unsigned flags); int kevent(int kq, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); From nobody Sun Apr 16 11:10: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 4PznXj74gmz457kZ; Sun, 16 Apr 2023 11:10: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 4PznXj6FYrz41nQ; Sun, 16 Apr 2023 11:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dIe0Qpw05FiffQP3OMFvmS9OPO+rJngHG8K4VYTDM/o=; b=pkt47oLkYMktUjnfVVZqCCqWSctQMSL4xs1eLgf1LHaxqNzf2zPYDOBVWHaTcL4JqWOeWx QgEnOMohKV6lOe/lfTqUIUoulktDBIJp2TMTEuOL5MranQ4MUsRnGQr++RFOfEKLFn2wHK Fi8P96LVDMnaY5USIe85n/tlK6+AOaARHRPuBBjLANBCHy76qAwZTQL7Na4vb65ZY6ulJS opP3SOBx8HKXi52/qDoPfjpKaLMrp+wZa6oD77nYOB4xBfOKd0hXOEgw1BqbBBKriuvE3m sz3WXY6191cBDVETD8OXGgtr0iSW8jSJaHw4IghZ2s5phfueHe79d1W6pWz8sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dIe0Qpw05FiffQP3OMFvmS9OPO+rJngHG8K4VYTDM/o=; b=GvZIE6Wp7YHgWTMM1f1f+7KFH1P8MK7l3sHXKaGppI065TcmbpWdZLlA85d1+VQyx02URH 0Jz2q7xSmGodOjtMlA5h6COYs8ukWFPnmNRiVniD+DL9cwRcBv6nA+OJc7tOPd50pi14H/ AGbaFaZPZGmM2YC4WerVBFrn7vXgFiFcTHooBcvnngHsZUnpJUZR6lcXMF/ojYzNanssXc SSt3N96MPGC6/PhsH46OT0M8lW82YdIU760MwObXl6kkXzo4dSReiEvyBs2ZU7bg6MASl6 mDEpNVt6Z0Nsz+wDjTS4wLzFgfKVah9NRJrzg4Ej9lzXS1UG2obEodcNx+EgUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681643429; a=rsa-sha256; cv=none; b=hFTkUYPG7POVFeRaz6D1CkpxUtwfDqXWAyDzLQRHCdGNCAQU6YIRc7lYadMh4wpPhjS33E IxanLFj1uU/USi+EGsIrXzxgftd+CS5GyQuCifL8MDRT8TwOG6iMeTSDaIE08XLNnI0NH5 XLK9OdqzCC4hDuT/usOBVmPl9o7wg+9I0N2vnjdjgYu0rrJHbQq7DBjZFWlhVhkJV4njXp rLIOfG8/bXY4L0TgUHyCw3JmnHaQ0NJa9PpJfuDENUal5vzSuQOuGogulDnHJ8E3WniPTu nNcHCzWIXOY2qagqMPAVili42I6HeakLChsFl0mCA3relexS5Kg5DkN26OyM9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznXj5Lzmzl81; Sun, 16 Apr 2023 11:10: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 33GBATL4048010; Sun, 16 Apr 2023 11:10:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GBATG6048009; Sun, 16 Apr 2023 11:10:29 GMT (envelope-from git) Date: Sun, 16 Apr 2023 11:10:29 GMT Message-Id: <202304161110.33GBATG6048009@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: 78182897b6a2 - stable/13 - kqueue1(2): document List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 78182897b6a238161466c29dd8941bfc147f0b79 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=78182897b6a238161466c29dd8941bfc147f0b79 commit 78182897b6a238161466c29dd8941bfc147f0b79 Author: Konstantin Belousov AuthorDate: 2023-03-25 23:41:21 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:59:43 +0000 kqueue1(2): document (cherry picked from commit f2ec444be523d3d00808ff82a7c690c75defe953) --- lib/libc/sys/Makefile.inc | 1 + lib/libc/sys/kqueue.2 | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 6f663158d840..4152d01a0f3d 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -430,6 +430,7 @@ MLINKS+=jail.2 jail_attach.2 \ jail.2 jail_set.2 MLINKS+=kldunload.2 kldunloadf.2 MLINKS+=kqueue.2 kevent.2 \ + kqueue.2 kqueue1.2 \ kqueue.2 EV_SET.3 MLINKS+=link.2 linkat.2 MLINKS+=madvise.2 posix_madvise.2 diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index 863136c9928f..dbe0dad532c0 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 14, 2022 +.Dd March 26, 2023 .Dt KQUEUE 2 .Os .Sh NAME @@ -38,6 +38,8 @@ .Ft int .Fn kqueue "void" .Ft int +.Fn kqueue1 "u_int flags" +.Ft int .Fo kevent .Fa "int kq" .Fa "const struct kevent *changelist" @@ -90,6 +92,22 @@ flag, then the descriptor table is shared, which will allow sharing of the kqueue between two processes. .Pp The +.Fn kqueue1 +system call also creates a new kernel event queue, and additionally takes +the +.Fa flags +argument, which is a bitwise-inclusive OR of the following flags: +.Bl -tag -width "KQUEUE_CLOEXEC" +.It Fa KQUEUE_CLOEXEC +The returned file descriptor is automatically closed on +.Xr execve 2 +.El +The +.Ql fd = kqueue() +call is equivalent to +.Ql fd = kqueue1(0) . +.Pp +The .Fn kevent system call is used to register events with the queue, and return any pending From nobody Sun Apr 16 11: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 4PznXl0z5bz458V3; Sun, 16 Apr 2023 11:10: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 4PznXl07Bvz41v7; Sun, 16 Apr 2023 11:10:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZR+wrsz+3gWS5yExK9Uvbyr0HnjtXa78nZgK7vOgwoA=; b=Zh+c7NuKHUkGfgiUAM40Pi9/v3ehx22WVQYLLFlBgXC2bvUknf7L++enwcTN4q3QlfAA4s bjRbkVkQ+YscWDGJq2Q2wKDZtDmWb+xyu3XmpmqYWmm9iIgej5tqB2dwwnVJ0bvJzLtqHd Xei8q1Y0fNrbusoHyse7WXGK7j2wL6LQt28Vp/245MnCwzcMN/18FF8kybOgIf6iE/KvJg Y7Lw/VpzL0jEWFINoTsABnnR9p5sqV3uGYsNlZqfmVG0HwzoCt7jPkiuTjVt63t206aW0W ob2dOWjiKiGVxYEtzPBVQv8dxIYUHCBlbVQnuQdIebRfcyXHJUp25nrgUmFC0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZR+wrsz+3gWS5yExK9Uvbyr0HnjtXa78nZgK7vOgwoA=; b=POFW6Xxb7PDnIAytRaC4GY+wST44XwLTwUYZ9VqBpzP13p4Gzc9rDcqv6iCid6iNHI8wHe Q8g0ksTD3pm+3gQsqAokq1EOFGk+m9tcSvy9H5dgSjr1EJH2OnFWQ0g0mOEiLO9CnYSoFi Q7Hr6WzmxSr79V3XiI7cYIbsTKePGszT0U0df+TQJy7xWMhFJzjfa2LEpmHj9GXdmSB3Px z4O5cZxZWo0vCkqSnFybddq5eGGbYU4GDBEayglJItiu8ZQRgLY24G5+DUGD1Jk/ZsvABO XAy00SSdQdTWAroGTG03Qg/VTbGRXsUrtZbtscWeJOs19RKGMHWsB+lIDciMNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681643431; a=rsa-sha256; cv=none; b=xZ5Ir6kIFddXpXkHL8KtbvEep4h+PrJI3OluByut25+r5reUm8zThXLuNKJB57/LYKeYjA PtuhjZ8RwswHKucZp7uCs2vDfYNfo9L+Co+e9CF7EG7keXMogWps5/K5onNp1Hmr4ylfIu 20Q7tTkB3H+kUX5sb23PRA84XD2zgGtuoOCCpJZw1NL1+mAfJq2UbnVgnUYVauVWpnX8Sv r+8NwW4/hAieZv91sI9myimRZX+cwY+VxPb6beeSf4qU+2QgDc+RQ/b7FCaR5h8A0Qbifc WIchWkiz4Si/3ye4zRrCF3FIsWAJMC84NkfaIWA9DNtT1KbySo6+hZ/o8lGAEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznXk6JggzlYY; Sun, 16 Apr 2023 11: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 33GBAUgP048031; Sun, 16 Apr 2023 11: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 33GBAUaY048029; Sun, 16 Apr 2023 11:10:30 GMT (envelope-from git) Date: Sun, 16 Apr 2023 11:10:30 GMT Message-Id: <202304161110.33GBAUaY048029@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: e6aa3c8db0e5 - stable/13 - Rename kqueue1(2) to kqueuex(2) to avoid compat issues with NetBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e6aa3c8db0e5e537f939f451bde10a33a9d8feab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e6aa3c8db0e5e537f939f451bde10a33a9d8feab commit e6aa3c8db0e5e537f939f451bde10a33a9d8feab Author: Konstantin Belousov AuthorDate: 2023-03-31 22:27:00 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:59:44 +0000 Rename kqueue1(2) to kqueuex(2) to avoid compat issues with NetBSD (cherry picked from commit dac310248826c37b60306c1b25fb94c35802196d) --- lib/libc/sys/Makefile.inc | 2 +- lib/libc/sys/Symbol.map | 2 +- lib/libc/sys/kqueue.2 | 6 +++--- sys/kern/kern_event.c | 2 +- sys/kern/syscalls.master | 2 +- sys/sys/event.h | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 4152d01a0f3d..23ab196c5f46 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -430,7 +430,7 @@ MLINKS+=jail.2 jail_attach.2 \ jail.2 jail_set.2 MLINKS+=kldunload.2 kldunloadf.2 MLINKS+=kqueue.2 kevent.2 \ - kqueue.2 kqueue1.2 \ + kqueue.2 kqueuex.2 \ kqueue.2 EV_SET.3 MLINKS+=link.2 linkat.2 MLINKS+=madvise.2 posix_madvise.2 diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index 503e4e5ca657..6b81c92dbe93 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -418,7 +418,7 @@ FBSD_1.6 { FBSD_1.7 { _Fork; - kqueue1; + kqueuex; swapoff; }; diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index dbe0dad532c0..2996b0f02109 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -38,7 +38,7 @@ .Ft int .Fn kqueue "void" .Ft int -.Fn kqueue1 "u_int flags" +.Fn kqueuex "u_int flags" .Ft int .Fo kevent .Fa "int kq" @@ -92,7 +92,7 @@ flag, then the descriptor table is shared, which will allow sharing of the kqueue between two processes. .Pp The -.Fn kqueue1 +.Fn kqueuex system call also creates a new kernel event queue, and additionally takes the .Fa flags @@ -105,7 +105,7 @@ The returned file descriptor is automatically closed on The .Ql fd = kqueue() call is equivalent to -.Ql fd = kqueue1(0) . +.Ql fd = kqueuex(0) . .Pp The .Fn kevent diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 29485f3a39db..f580ed10eb8d 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1059,7 +1059,7 @@ sys_kqueue(struct thread *td, struct kqueue_args *uap) } int -sys_kqueue1(struct thread *td, struct kqueue1_args *uap) +sys_kqueuex(struct thread *td, struct kqueuex_args *uap) { int flags; diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 7705cab0da77..f4e8e071b42a 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -3284,7 +3284,7 @@ ); } 583 AUE_KQUEUE STD|CAPENABLED { - int kqueue1( + int kqueuex( u_int flags ); } diff --git a/sys/sys/event.h b/sys/sys/event.h index 36e965f853fc..f204ab8fe0b5 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -216,7 +216,7 @@ struct kevent32_freebsd11 { #define NOTE_NSECONDS 0x00000008 /* data is nanoseconds */ #define NOTE_ABSTIME 0x00000010 /* timeout is absolute */ -/* Flags for kqueue1(2) */ +/* Flags for kqueuex(2) */ #define KQUEUE_CLOEXEC 0x00000001 /* close on exec */ struct knote; @@ -360,7 +360,7 @@ struct timespec; __BEGIN_DECLS int kqueue(void); -int kqueue1(unsigned flags); +int kqueuex(unsigned flags); int kevent(int kq, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); From nobody Sun Apr 16 11:10: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 4PznXm20NXz458NQ; Sun, 16 Apr 2023 11:10: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 4PznXm14Tkz422p; Sun, 16 Apr 2023 11:10:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zpES5DwGzSIxKzexRkDd/CgjisXLBjJhfDzxYOdPExg=; b=hkePprhbPk1n0JTe+i/3LyzxdemyjtQpwVwcG4Ap9yXKpw41kl9xcfoTcacl273JIANb3d GGumvP4EM0Rarc0k15k+OR2VyGQt1ewFYC7KI14nJkeUOqISvHyr6XlP0fg2gj97CqGU0V jqTqryG5XBXaTXzRgCRLbmRyElUcp2uIgGsZG/CwyEdrzb8wyOsRCQn9eFlUAjwbad/f1z G+FiG0clJRHSvPeZtgBxEHEnma9MfRtOcEKe2RkdIfu8z3adTtan3bLf6ivzSoQq3B1rEy c8xmPaTPtAlZHZLF+HOEGmk4qSwiHckSe9KQxHdeWftIQtS5Fodg+ATux6Opyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zpES5DwGzSIxKzexRkDd/CgjisXLBjJhfDzxYOdPExg=; b=clTkK3S9+1BZw4ThUvWdmqfYydGofGJscsb8WuQF4xeVhhSA1Q0yj+yUc2UeJaKuLeQIKm tZmK9BxDU/rtNRxFafNROM2MdCXMkmTQTn2nEbNAKSRVFmGqJRuyieamseIs5N1my9rUvc 7ZLCsMSOOf+2UJE94Qrg3jBpQOTtpQ2b48CbZIQMdC+HJ2K4NEkFDfmZxwBe0szbpt+w/4 QndOVH1gouFPYzqS/DXbphk0XJ59AEnAvIR6h1RoF91Ium4cP87VmPHIIqxc5Up+FCdnSX YYiDBJRDgN0+o3AOkSGhmCU7NMNHlLqXTAfhC3M+6o5NrgtJj3173qqUcpN8bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681643432; a=rsa-sha256; cv=none; b=KKqwInSd5G6k2WtsNXTMjCQx9ytQO85OBONtuOrm6AshUwUmX3kVaDEy98ylUYXqlz54Wf wRL/ZHevg7sfuTm1Qa21ES03hkg6kaxrCf50/9URhZ5zy6R2KZmoaN/gnSBP/IGI1BrTS4 vbnZTjDADC9stBiSZ/M/hSNNM0WcT5ZObFKc1d4lj5g/TASclux5BQODIg5pZauMMpcXzG N5+n4zvMQmDLJ/5PBS66w1r+5rIkQeBwR7YOFZmJPIQL0hhroBlrCrG8Wf5dUlrVYR8wGR zR86Ql80NQGhs2my+vmnLFK3Isy3Yt0zNBH52HEsXMABBEFFFKVyEKHkRx8HAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznXm070LzlYZ; Sun, 16 Apr 2023 11:10: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 33GBAVRu048055; Sun, 16 Apr 2023 11:10:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GBAVAr048054; Sun, 16 Apr 2023 11:10:31 GMT (envelope-from git) Date: Sun, 16 Apr 2023 11:10:31 GMT Message-Id: <202304161110.33GBAVAr048054@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: b50b224df47f - stable/13 - Change kqueue1() to be compatible with NetBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: b50b224df47f9bf5a9b194e95908d5aa760ae791 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b50b224df47f9bf5a9b194e95908d5aa760ae791 commit b50b224df47f9bf5a9b194e95908d5aa760ae791 Author: Konstantin Belousov AuthorDate: 2023-03-31 22:31:41 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:59:44 +0000 Change kqueue1() to be compatible with NetBSD (cherry picked from commit 54579376c05e7a039cde5f424c641fa29348835f) --- lib/libc/gen/Makefile.inc | 1 + lib/libc/gen/Symbol.map | 1 + lib/libc/gen/kqueue1.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++ lib/libc/sys/kqueue.2 | 8 ++++++++ sys/sys/event.h | 1 + 5 files changed, 63 insertions(+) diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc index 22573d8ec36c..ae8a6bec08de 100644 --- a/lib/libc/gen/Makefile.inc +++ b/lib/libc/gen/Makefile.inc @@ -97,6 +97,7 @@ SRCS+= __getosreldate.c \ isinf.c \ isnan.c \ jrand48.c \ + kqueue1.c \ lcong48.c \ libc_dlopen.c \ lockf.c \ diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 0a20a41d0e20..84432432f4e6 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -436,6 +436,7 @@ FBSD_1.6 { }; FBSD_1.7 { + kqueue1; posix_spawn_file_actions_addchdir_np; posix_spawn_file_actions_addclosefrom_np; posix_spawn_file_actions_addfchdir_np; diff --git a/lib/libc/gen/kqueue1.c b/lib/libc/gen/kqueue1.c new file mode 100644 index 000000000000..b27a8f63019e --- /dev/null +++ b/lib/libc/gen/kqueue1.c @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2023 The FreeBSD Foundation + * + * This software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include + +/* + * Provide some NetBSD compatibility. They support a set of O_* + * flags, we only carry O_CLOEXEC, and accept but ignore O_NONBLOCK. + */ +int +kqueue1(int openflags) +{ + u_int flags; + + if ((openflags & ~(O_CLOEXEC | O_NONBLOCK)) != 0) { + errno = EINVAL; + return (-1); + } + + flags = 0; + if ((openflags & O_CLOEXEC) != 0) + flags |= KQUEUE_CLOEXEC; + return (kqueuex(flags)); +} diff --git a/lib/libc/sys/kqueue.2 b/lib/libc/sys/kqueue.2 index 2996b0f02109..2d2b990102c2 100644 --- a/lib/libc/sys/kqueue.2 +++ b/lib/libc/sys/kqueue.2 @@ -107,6 +107,14 @@ The call is equivalent to .Ql fd = kqueuex(0) . .Pp +For compatibility with +.Nx , +the +.Fn kqueue1 +function is provided, which accepts the +.Dv O_CLOEXEC +flag with the expected semantic. +.Pp The .Fn kevent system call diff --git a/sys/sys/event.h b/sys/sys/event.h index f204ab8fe0b5..1141a22b8109 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -361,6 +361,7 @@ struct timespec; __BEGIN_DECLS int kqueue(void); int kqueuex(unsigned flags); +int kqueue1(int flags); int kevent(int kq, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); From nobody Sun Apr 16 11:10: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 4PznXn5NPyz458Zp; Sun, 16 Apr 2023 11:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PznXn2Gvxz41yB; Sun, 16 Apr 2023 11:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I047CXeGHGkxxpBv4I6lLtr7Et+oEV9bKHOunCTF/pQ=; b=ooBFvTa4MIFE2DpMO7fueEhiU1mbz90hU/xiXV/7I2mZBuRqwwzAHyU/hNSv4s0pGcFIC9 HVR/9+ywClxG2kv9mQP9U5jTbOta6l16Wrrm1P1UPCA1XsL4G7yL7JzGLbDGt2IUM4WH8U jX4pnPojzXMtja81KIxPGBbdDg/d9HzMFkiXe0pyZRfYiMiGGNUae+TYCDxVDkERghoRMM lMPnhCMopyIgmhMHu3D3fVAbXVkm24mUhRK7Zbji5zzjUIS+ty6DiG4qiDcMi3/SqjITtM UzcTfZnDXDtf8FvCW9W4LebYIqksZBM42gDlTsvM/9OW9pMs/7S71yk/vBusaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I047CXeGHGkxxpBv4I6lLtr7Et+oEV9bKHOunCTF/pQ=; b=hTUwUdHfh5Lz4FUjNLZAtkGPVU1jyFe/jsBE+QbOXpN1WfrVlya7OcIRjqx/IYanbBz3FF t5L8KoAOlH4D9oWn+Olp9lGWppaIQBTbNZicSwJyy5nVHPccbjEKY5tefuOQO/HziG1qNX fzXK1uQHzRTtNUy3Z+UjFEXqoduzHvI0g0MOP0iUIuTceKxFbCuPAs+5E8KsGlqiiff6Dj qH16H3/fv6w/Ecinm19KnBMgCr0f9rogkdKmPOl/CnISV+ojOpbVqWYxY4h7jqunxSaMal 7/KuOOxXqP1CDiUwSOm5G1IKseyaf8sLrJaGD8/RVhFILKqJhcWiY1Df/SkdDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681643433; a=rsa-sha256; cv=none; b=BjPgCppj8LzS1xAwb5FN/EgHA942/mlZYT5NcOBwdT3Szlqb7Rt+Gqzq6vOvLVmtwDJsiE S1RQB1LZzuTkhSTCSWMIz+qc9Kem1emQgN76ZesmytTACY+6DNI1NcrPWjIbb/J9kaWRMT 9uEGvGrZcR17heIj8bj5Y55zqFv8EBPV5SrowEiDKIx/1NhBx8hbgqkB3y4qhUJnn/c+uh 54kgCCgRsauCoRtrQsvA2PoEeUUsx2FtftOPUl5DPCuJpLolxZZw19Yv5t8wN9ykF7CL1o mrHguavPisTosQkQxjSGCilTq2R0C8LkTr6TeDNFK7qW6/LW1ejBik7Sxy9D4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznXn13zFzlHp; Sun, 16 Apr 2023 11:10: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 33GBAXHw048074; Sun, 16 Apr 2023 11:10:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GBAXCN048073; Sun, 16 Apr 2023 11:10:33 GMT (envelope-from git) Date: Sun, 16 Apr 2023 11:10:33 GMT Message-Id: <202304161110.33GBAXCN048073@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: 166804038038 - stable/13 - Regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 16680403803806b37b730990eee6f08d11c46995 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=16680403803806b37b730990eee6f08d11c46995 commit 16680403803806b37b730990eee6f08d11c46995 Author: Konstantin Belousov AuthorDate: 2023-04-04 13:24:11 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 10:59:44 +0000 Regen --- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- sys/kern/init_sysent.c | 1 + sys/kern/syscalls.c | 1 + sys/kern/systrace_args.c | 22 ++++++++++++++++++++++ sys/sys/syscall.h | 3 ++- sys/sys/syscall.mk | 3 ++- sys/sys/sysproto.h | 5 +++++ 7 files changed, 34 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 0b6b0a6a5d57..b683e366c864 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -607,7 +607,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(rctl_remove_rule_args), .sy_call = (sy_call_t *)sys_rctl_remove_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 529 = rctl_remove_rule */ #ifdef PAD64_REQUIRED { .sy_narg = AS(freebsd32_posix_fallocate_args), .sy_call = (sy_call_t *)freebsd32_posix_fallocate, .sy_auevent = AUE_POSIX_FALLOCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ - { .sy_narg = AS(freebsd32_posix_fadvise_args), .sy_call = (sy_call_t *)freebsd32_posix_fadvise, .sy_auevent = AUE_POSIX_FADVISE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ + { .sy_narg = AS(freebsd32_posix_fadvise_args), .sy_call = (sy_call_t *)freebsd32_posix_fadvise, .sy_auevent = AUE_POSIX_FADVISE, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ { .sy_narg = AS(freebsd32_wait6_args), .sy_call = (sy_call_t *)freebsd32_wait6, .sy_auevent = AUE_WAIT6, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ #else { .sy_narg = AS(freebsd32_posix_fallocate_args), .sy_call = (sy_call_t *)freebsd32_posix_fallocate, .sy_auevent = AUE_POSIX_FALLOCATE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 091b146417bc..05e51fdac863 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -638,4 +638,5 @@ struct sysent sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 580 = fspacectl */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sched_getcpu, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 581 = sched_getcpu */ { .sy_narg = AS(swapoff_args), .sy_call = (sy_call_t *)sys_swapoff, .sy_auevent = AUE_SWAPOFF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 582 = swapoff */ + { .sy_narg = AS(kqueuex_args), .sy_call = (sy_call_t *)sys_kqueuex, .sy_auevent = AUE_KQUEUE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 583 = kqueuex */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 985afba8c17c..72251162d837 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -589,4 +589,5 @@ const char *syscallnames[] = { "#580", /* 580 = fspacectl */ "sched_getcpu", /* 581 = sched_getcpu */ "swapoff", /* 582 = swapoff */ + "kqueuex", /* 583 = kqueuex */ }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index fa3c4ed20f2c..78a76358b43b 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -3412,6 +3412,13 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } + /* kqueuex */ + case 583: { + struct kqueuex_args *p = params; + uarg[0] = p->flags; /* u_int */ + *n_args = 1; + break; + } default: *n_args = 0; break; @@ -9117,6 +9124,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* kqueuex */ + case 583: + switch (ndx) { + case 0: + p = "u_int"; + break; + default: + break; + }; + break; default: break; }; @@ -11070,6 +11087,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* kqueuex */ + case 583: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 253d53ad71fa..d80bf9b5930e 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -519,4 +519,5 @@ #define SYS_aio_readv 579 #define SYS_sched_getcpu 581 #define SYS_swapoff 582 -#define SYS_MAXSYSCALL 583 +#define SYS_kqueuex 583 +#define SYS_MAXSYSCALL 584 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 134cc6a52188..54911eb44b55 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -424,4 +424,5 @@ MIASM = \ aio_writev.o \ aio_readv.o \ sched_getcpu.o \ - swapoff.o + swapoff.o \ + kqueuex.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 700f33dc5155..57d264798c71 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -1854,6 +1854,9 @@ struct swapoff_args { char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; char flags_l_[PADL_(u_int)]; u_int flags; char flags_r_[PADR_(u_int)]; }; +struct kqueuex_args { + char flags_l_[PADL_(u_int)]; u_int flags; char flags_r_[PADR_(u_int)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2250,6 +2253,7 @@ int sys_aio_writev(struct thread *, struct aio_writev_args *); int sys_aio_readv(struct thread *, struct aio_readv_args *); int sys_sched_getcpu(struct thread *, struct sched_getcpu_args *); int sys_swapoff(struct thread *, struct swapoff_args *); +int sys_kqueuex(struct thread *, struct kqueuex_args *); #ifdef COMPAT_43 @@ -3196,6 +3200,7 @@ int freebsd12_closefrom(struct thread *, struct freebsd12_closefrom_args *); #define SYS_AUE_aio_readv AUE_AIO_READV #define SYS_AUE_sched_getcpu AUE_NULL #define SYS_AUE_swapoff AUE_SWAPOFF +#define SYS_AUE_kqueuex AUE_KQUEUE #undef PAD_ #undef PADL_ From nobody Sun Apr 16 11:12: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 4PznZV4Bbsz458VQ; Sun, 16 Apr 2023 11:12: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 4PznZV2LTqz440D; Sun, 16 Apr 2023 11:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=il9pVjZXB3gWLw9f63pVKsoou6VDVqaN+lHNhMUlad8=; b=I0HqhK5SW23zgVtQpOAP49ofNOpYrJPcI5rVRaH5HPLzmLDBijw7fR5WQLOIqC/TW+j3Ja 3FOEXHrDZg1bGFo5QEeFhpfwc+8uDEm1Lo5U2xoEdzE6MUKcwU2YYPGWvVXm5xHtPldvZk ogPl5txD4JC8zp+6peJPehkewRdujyF4nxScaYjx5d6b5+NoVu342R4bUU51nhGEatKaRM A3AXj0cuJcztgQgCG9dWOoKD+HGxt/n5h6+63p/X0+VzRYJrV02Y/pXF0ifenBJKjtTvJY XzFFdhOdghiGgYKDatvhhLhLb9IT9azb4hl95RBXOZvjoDf9Tp799wANZueBoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=il9pVjZXB3gWLw9f63pVKsoou6VDVqaN+lHNhMUlad8=; b=fHHFosvWhoUImyWsrP7Cig3z7iqr08MtEFa6rCUEJSRvbitmZtjEPm0QZ6sdPiJuICrQAq SiklBLypi9OkQpE6kU7JzQZBe270xbtprxOT2t0KPkxiLvdM1nez3fVbKhig9fXjj+iyN4 1RSlK7kWt3saKo4FQKPWh7vPKqcg1CjQwCmLQ2kJJki+BEwE2u/w0YPm3vRGKEtTgxWpzj EHyrHs2Sa9AzU+Go2LQdcQt6kUFI42IVE6/ZbcLL2p5Kcz8PLIEbGzRDTcpIeNyMBwJrIg OOF9HOyqcc35T6QTiCtZyp+VTJ8b8EGhRqS7o4JvQpV/iQB52zZwdg5tP2aWXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681643522; a=rsa-sha256; cv=none; b=x9yr6qbMYoYwVEUT9znT4xfz2hhrUZiWdhRj8mtOFoRHHM46uQngE7jux4rpzN8nb+p2Bt hzT2SE5+VlsDMyltfpCUzWSXWMM3LI3keNrt6Bo5LOH228cjhcGNw/I87Z7/a+XW6AIveL k1x38ewR194IAdx2vg2f1z0P5xjXiJsa84KIGIkHThsCnZM/DMhjK5Sudc2ok1hyWUUxeq SMp8QUmqUJRHpayS123G0Vwb5KFI5Y4vkwdkmnbACt26oEtRW7ekQjv9xD/ToaMpb7T/Bi lwGvxEmGsD8g2DjkbnXy8dUb0gpK9hCw/WRumX4Zbah4LY0/DkvI1KVU6CwdXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznZV1QWyzlZC; Sun, 16 Apr 2023 11:12: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 33GBC2x5054536; Sun, 16 Apr 2023 11:12:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GBC2Ak054535; Sun, 16 Apr 2023 11:12:02 GMT (envelope-from git) Date: Sun, 16 Apr 2023 11:12:02 GMT Message-Id: <202304161112.33GBC2Ak054535@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: ad481562ab09 - stable/13 - pkru.3: fix markup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: ad481562ab09d61613b6e86c1352c3397f9d6b19 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ad481562ab09d61613b6e86c1352c3397f9d6b19 commit ad481562ab09d61613b6e86c1352c3397f9d6b19 Author: Konstantin Belousov AuthorDate: 2023-04-14 23:29:45 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 11:11:35 +0000 pkru.3: fix markup (cherry picked from commit dcc19c6701ea789ac109a132df032c61feacf9ea) --- lib/libc/x86/sys/pkru.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/x86/sys/pkru.3 b/lib/libc/x86/sys/pkru.3 index fc9a7ba8ca86..47e324f21f4c 100644 --- a/lib/libc/x86/sys/pkru.3 +++ b/lib/libc/x86/sys/pkru.3 @@ -150,13 +150,13 @@ flag. The .Fn x86_pkru_get_perm function returns access rights for the key specified by the -.Fn keyidx +.Fa keyidx argument. If the value pointed to by .Fa access is zero after the call, no read or write permissions is granted for mappings which are assigned the key -.Fn keyidx . +.Fa keyidx . If .Fa access is not zero, read access is permitted. From nobody Sun Apr 16 11:12: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 4PznZW4vZtz458Pq; Sun, 16 Apr 2023 11:12: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 4PznZW3DtFz44Hk; Sun, 16 Apr 2023 11:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUHd7UHbKTWSLNL7nYtN94UgOFXbhKfuCEJ2A1JllGc=; b=Qd1AqpI9/AWfp4IQIPVGjjd1Sq9tVDJ5pKo+PodBYNIgZGE+UYYaw4yFc1h4UJXWqC9JPJ 4CiBZmcksa/JgUGoB/GoBSy5DijDMvTBLLwZKglF5JPj1NbI9kqlnGlompDKfKML72VaPm 7ZQlKYtfNZvVH6yrEc5VnyJ3LCWsbjYSwdcmfBDapvXlGl+EaWwr6HGB/F89US+CP+NXMX vjTP4vi9wOJSsrKcT0iTsS5hXzlLkjSM/SxzLYc/Wq18lXrUVv7yVGgUC/iMb+sjpN/SgB +3XD00hTXZN7gm1ThrOhU9nJFd/VCTpNDBcDM9avtk/QaePnn7ivEB+CoW5Ziw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681643523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aUHd7UHbKTWSLNL7nYtN94UgOFXbhKfuCEJ2A1JllGc=; b=i/Y8yQRVDC4T5FVlv2zcrB1ov27Tmb0t/X1zQTUxOreTwUdA3kvghBougz1CwHu8XPcrHV ZomnPNL6qlNpVaM+khuzqK2gpBXnwkeWO5Vtq2Nfqhu2tdDx7ZO5LwpMF91YKBFcTXLeGo EB3lWfc2s8S0tMYoCD911DJ6hRlkK/8XKTUWrjfVO2JgkYnTWvp7Zh+DOnk4F6PjrVRSkK UTbbrpM7LcBBT+FQXSFGjdpzztQruKxKLbPGWKHibglEMcx/zgpyMC68amMW03fqmmI8qv 5q7YaPhYo95O4E+PCaCvHI/6vDGLSqBtzJX9krZlTu00Nlz3142HysH+tHFYJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681643523; a=rsa-sha256; cv=none; b=Et32I+pYNCIrzuWj+yvB9uyG13exjwwVuXVJaJzDR1dt/sOm4UEK+7yyxwjQyGAoi/Wp12 VNYCwj+o5SSAn75oqWwuq9jiODNwBKEdX3qGeEz5obOLhfkLJtiMPuUuzILuENw/YyT4tO dl3HJM0rNWdQtNmKL9VeVYujgQufxCtkPo9HZKz77soUTnHP6DXFnngiwAoP+RIBWu7piH RbRtGu53l3psCUBwADrc0Hk+Zv3HgM0IvXSb55xKa1NeBJ9OjSM7Csn287HEF/1sAmzvXF 0rpNRNky72t3NEvVo28YI7xVSEV5cg95fcWPlhvPa2WNCc45/uy2BW0yD/dd2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PznZW2LsGzlqx; Sun, 16 Apr 2023 11:12: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 33GBC3Z1054558; Sun, 16 Apr 2023 11:12:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GBC3Em054557; Sun, 16 Apr 2023 11:12:03 GMT (envelope-from git) Date: Sun, 16 Apr 2023 11:12:03 GMT Message-Id: <202304161112.33GBC3Em054557@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: c38df24407d1 - stable/13 - rtld: fixes for handling of the grouped options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c38df24407d1fcafb0c805db919315136a93c95a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c38df24407d1fcafb0c805db919315136a93c95a commit c38df24407d1fcafb0c805db919315136a93c95a Author: Konstantin Belousov AuthorDate: 2023-04-13 04:47:23 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-16 11:11:35 +0000 rtld: fixes for handling of the grouped options (cherry picked from commit 7cdfe51f30965a365e3e7c829396a56e2a7e5141) --- libexec/rtld-elf/rtld.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 8e2cd0dfcb24..30cb4b595b71 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -6078,13 +6078,16 @@ parse_args(char* argv[], int argc, bool *use_pathp, int *fdp, _rtld_error("Both -b and -f specified"); rtld_die(); } + if (j != arglen - 1) { + _rtld_error("Invalid options: %s", arg); + rtld_die(); + } i++; *argv0 = argv[i]; seen_b = true; break; } else if (opt == 'd') { *dir_ignore = true; - break; } else if (opt == 'f') { if (seen_b) { _rtld_error("Both -b and -f specified"); @@ -6099,7 +6102,8 @@ parse_args(char* argv[], int argc, bool *use_pathp, int *fdp, * name but the descriptor is what * will actually be executed). * - * -f must be the last option in, e.g., -abcf. + * -f must be the last option in the + * group, e.g., -abcf . */ if (j != arglen - 1) { _rtld_error("Invalid options: %s", arg); From nobody Sun Apr 16 13:30: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 4PzrfS4d3Qz45MBp; Sun, 16 Apr 2023 13:30: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 4PzrfS4C3Fz3HTB; Sun, 16 Apr 2023 13: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=1681651840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l37eg2lX9JGuu8ofsqoW+Zfi9omohlgZcGYtQR2eCGA=; b=kzCD5Hb17HJ0+QWXabjK4pSE6WaLDhp/oINsQCYnS9MV3EGpOguyjuwXrFhsDm155sxZdm ywQg4gVRtQhPG3w9XsHCoYTBBVGs4wd+LYpGnJBY8BPsPGbxraC7tzY9tmTa+RjntZaWjp sscctkusfqlRk6sIRFPhb9YR0QyKrwt5PU9gF6P5UA4gfllDDgaQfWe89UZ47A8YOPpgyT zCe21sVKBXYYQ6XTIqSwg1grj8xQQ4nLmaOwf6BLsywPnHk2p7pQryrnwhMQv0SlORQud9 gdpd8EIfDQA2MA6C6OEptNH/5kn8otLZu5ia6TWEUlpSW8jxV/WmMt7y/OPibA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681651840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l37eg2lX9JGuu8ofsqoW+Zfi9omohlgZcGYtQR2eCGA=; b=qa8IdbwgkHJR8rwwfAMSKWRmeRsSTkJ2kPTBAB6Xb1X2ikwyQnj5Ga7EZS5AwmKPZmFlvu Ngw8/WcUeBtBpkBS49RdwVn9lVMheBffRmQmQ8wDhC/A3BfWNWYdnvuKeL1pRbe430Y54r picu6DLhJdIXWfCmGGiFe+wLRkfICgvK4DhYZcoz1b6riZTk5QxRX9iRTj+4EZvJjtRTxJ J5O2y+MtWrnhds05RbIHoRS/2x7gUJ7bQkKLbBfuKf+i1Bdwi/fEYQ/Sf8QjjYaLQs8M4Z azN4wigqVFBcEP8EtEPC8ArfiMhBOSbfbeyXReEfwvG/MX3ObTUQnLb0qYRapg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681651840; a=rsa-sha256; cv=none; b=WckKKBztgCpXK3XzIMjIgkWCFOFZbfSPlxWgiJYuKgg7aNS5b4IhlRX81Y01Dftnq0kNQP +aPapsyyruy+IboLTFlfbnQ+y0AklWmByHpvSUXWTGAWtN5/uHVuejCuUZjJC7SA25V8nU 6/wjgPR6xIzj2MD0OwFtpaEhSr4BP4H1H3NP1hm6+u+oVtAJA5U/FRo5w7SBiHQiEQ/DBJ KohkZ3NseBAGlrTYegdOdvWH67oGo93usyE51zngqHbzBJhYWl83dffKBIWhWKXEuHnKDC PnehhFby0FUBlMyFfI7CQ+pwbXpfQclx71urfRaPs115LyykBNdv+ws3/Rh9xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzrfS3HQ6zppx; Sun, 16 Apr 2023 13: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 33GDUe07078837; Sun, 16 Apr 2023 13:30:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GDUenC078836; Sun, 16 Apr 2023 13:30:40 GMT (envelope-from git) Date: Sun, 16 Apr 2023 13:30:40 GMT Message-Id: <202304161330.33GDUenC078836@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: 1305e8a6d02f - stable/13 - llvm-objcopy: link man page as strip.1 when WITH_LLVM_BINUTILS is set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1305e8a6d02fb322f0a4860bf8a0a63e516ea9df Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1305e8a6d02fb322f0a4860bf8a0a63e516ea9df commit 1305e8a6d02fb322f0a4860bf8a0a63e516ea9df Author: Ed Maste AuthorDate: 2023-04-05 15:07:14 +0000 Commit: Ed Maste CommitDate: 2023-04-16 13:28:08 +0000 llvm-objcopy: link man page as strip.1 when WITH_LLVM_BINUTILS is set Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39429 (cherry picked from commit 5cb402cc89c01e0a1f18f8c6a4c7d9cfc10d26ab) --- usr.bin/clang/llvm-objcopy/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/clang/llvm-objcopy/Makefile b/usr.bin/clang/llvm-objcopy/Makefile index 20f5f191b766..1f4b8a3609af 100644 --- a/usr.bin/clang/llvm-objcopy/Makefile +++ b/usr.bin/clang/llvm-objcopy/Makefile @@ -34,7 +34,8 @@ LINKS= ${BINDIR}/llvm-objcopy ${BINDIR}/llvm-strip .if ${MK_LLVM_BINUTILS} != "no" LINKS+= ${BINDIR}/llvm-objcopy ${BINDIR}/objcopy \ ${BINDIR}/llvm-strip ${BINDIR}/strip -MLINKS= llvm-objcopy.1 objcopy.1 +MLINKS= llvm-objcopy.1 objcopy.1 \ + llvm-objcopy.1 strip.1 .endif .include "../llvm.prog.mk" From nobody Sun Apr 16 13: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 4PzrfV182Fz45MKT; Sun, 16 Apr 2023 13: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 4PzrfT5CRyz3HW5; Sun, 16 Apr 2023 13: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=1681651841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZyToIuaAWhi4L/vcvbDhP3sfhENcOl1zP4bZJj8oy9I=; b=ILF/RF146Yx2IbykT3bScZSaFNkl2oyKfzEKlrOcIj2OCN0W4IgdpX9asi3AVSleoJehqQ 0Ulj+UFjXkOmD80eSlQAVNBuhTdLIVSThn5YlWBbUu3iaKp5rAgtRfrye1cB+D3TzJC1kK q5MFFIEtwhJy9rtC6hCZSt+dlrIsMmbEaDiM+D5uV3xp9SbB7fG0G+nbqKGSBGdZH0vCmx x79JVkBjlRtdP2MfTJ4waL2FvRsTkw1UD5TQdLhRid9b8Q/CRWy3R2dxAfHscQe6mBe4j4 MpM5yT0ASbnVwInraigabmR5IuGjryVV3yB/0ZtySmbyPX4rU5aAyKMglMmv0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681651841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZyToIuaAWhi4L/vcvbDhP3sfhENcOl1zP4bZJj8oy9I=; b=ND3ua6ImRnCGZvvA8Q8G1pkudB8B1jqAS54fx6cpCZ4eui/CBxO+3RiJWZWaYOfHk08aKp OOVeZkJ9SAYibr0ruvvnRKO84CWiLJ0pCbmXS/ObL6DgChPoDnZbebQBuRFDb8th/NcaJ/ L9aGzqZvG3/FCHMYPnpIvv1dfSWzctX1e+snkDJcTlAv9MGZFR9XWeAw5KHQIBo9R01cU1 0+F5W0E/OSZcYqYPRrevWctq7YGaljT7rkp+tdQRV5UBmTEipm6LxxzV4WvM0hn0M48eN+ SYpNpgLBqOQ9gxHb5N7UOAv9OzRJCb2JXOH3FQ/OYnBTWvsNrTMH8DivrqapZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681651841; a=rsa-sha256; cv=none; b=fNZSAbr8r5T2CRlqUvKIGVwbDwmKc8NmJ0jcwSzuNEuuMTU62qRIabEfWm9oAkpXH/gWy0 mE4zPYsklr9kZUoLKw8qd0eTrUUfTpkXBUKWRVoGSVvE933K4PyKL5ECQuA8qBISee87Mx qSVz5jRxPWxh+MaBYZuIQNlQn2KETKtLHYBEPQKjcB0QupFsZYMche8QVikZdIn6wDpJAD uU5UkD3Heyg3ZHFT77bODwcFZOoMgqJvokr5TPVg9oucSKSW0CIR3ot/NTcqnB3o92epiY XxZDM0E38Y510qJQzLqBnQn53U2zThL90LsoI7nCOcyo59J07tjOnbYL5d69fA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzrfT4D5wzpZK; Sun, 16 Apr 2023 13: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 33GDUfnC078857; Sun, 16 Apr 2023 13: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 33GDUfQE078856; Sun, 16 Apr 2023 13:30:41 GMT (envelope-from git) Date: Sun, 16 Apr 2023 13:30:41 GMT Message-Id: <202304161330.33GDUfQE078856@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: e0a9723dee9c - stable/13 - fs/cd9660: add header include guards List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e0a9723dee9c1e900047b131c2c30466db4a9c46 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e0a9723dee9c1e900047b131c2c30466db4a9c46 commit e0a9723dee9c1e900047b131c2c30466db4a9c46 Author: Ed Maste AuthorDate: 2023-03-30 16:49:40 +0000 Commit: Ed Maste CommitDate: 2023-04-16 13:28:54 +0000 fs/cd9660: add header include guards Diff reduction against NetBSD files in sys/fs/cd9660/ and OpenBSD files in usr.sbin/makefs/cd9660/. Sponsored by: The FreeBSD Foundation (cherry picked from commit d33cdf16df52050102931ee3b37ce173e449c9c1) --- sys/fs/cd9660/cd9660_rrip.h | 5 +++++ sys/fs/cd9660/iso.h | 5 +++++ sys/fs/cd9660/iso_rrip.h | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/sys/fs/cd9660/cd9660_rrip.h b/sys/fs/cd9660/cd9660_rrip.h index 67ec3c233a0c..0c37f204c530 100644 --- a/sys/fs/cd9660/cd9660_rrip.h +++ b/sys/fs/cd9660/cd9660_rrip.h @@ -37,6 +37,9 @@ * $FreeBSD$ */ +#ifndef _ISOFS_CD9660_CD9660_RRIP_H_ +#define _ISOFS_CD9660_CD9660_RRIP_H_ + typedef struct { char type [ISODCL ( 0, 1)]; u_char length [ISODCL ( 2, 2)]; /* 711 */ @@ -137,3 +140,5 @@ typedef struct { u_char offset [ISODCL ( 12, 19)]; u_char length [ISODCL ( 20, 27)]; } ISO_RRIP_CONT; + +#endif /* _ISOFS_CD9660_CD9660_RRIP_H_ */ diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h index 591bcc4ff755..325bb97a9551 100644 --- a/sys/fs/cd9660/iso.h +++ b/sys/fs/cd9660/iso.h @@ -37,6 +37,9 @@ * $FreeBSD$ */ +#ifndef _ISOFS_CD9660_ISO_H_ +#define _ISOFS_CD9660_ISO_H_ + #define ISODCL(from, to) (to - from + 1) struct iso_volume_descriptor { @@ -365,3 +368,5 @@ isonum_733(const unsigned char *p) * Associated files have a leading '='. */ #define ASSOCCHAR '=' + +#endif /* _ISOFS_CD9660_ISO_H_ */ diff --git a/sys/fs/cd9660/iso_rrip.h b/sys/fs/cd9660/iso_rrip.h index 5ab9103022d1..99c34f971efe 100644 --- a/sys/fs/cd9660/iso_rrip.h +++ b/sys/fs/cd9660/iso_rrip.h @@ -37,6 +37,9 @@ * $FreeBSD$ */ +#ifndef _ISOFS_CD9660_ISO_RRIP_H_ +#define _ISOFS_CD9660_ISO_RRIP_H_ + /* * Analyze function flag (similar to RR field bits) */ @@ -83,3 +86,5 @@ int cd9660_rrip_getsymname(struct iso_directory_record *isodir, int cd9660_rrip_offset(struct iso_directory_record *isodir, struct iso_mnt *imp); #endif /* _KERNEL */ + +#endif /* _ISOFS_CD9660_ISO_RRIP_H_ */ From nobody Sun Apr 16 13:38: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 4PzrqG04vDz45MnW; Sun, 16 Apr 2023 13:38: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 4PzrqF6b8dz3NCh; Sun, 16 Apr 2023 13:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681652297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sb1qfo8d+Mey/XlWejyoe6gAofUPAU914/5cZxOE3E0=; b=RWuIXjHEAChCBJjnHAK1QLKR43fthjhZUvzYKPguYQI4gwOd/iGNRTy535KxT8LbhJGRx4 a3mEnIu73TwA6WLjPgdS7MfV0d/z5HZGwMIu9VaTudTukWt6N/899HiIrKVBOr8XKO82Bk Qv0Gx43fIsdX98uP1JCUjVcdxdI5PLDN1+ao1NOdPWTMdBUXFNjciJxdDkUODj4QeARMWp EGbsB8vHM0y9lYtnXNwOEF02cxaXYXIPO7AvDS9FzYACFfVV8XkaJN1s8FUHXpznlEQLss CMxtyIqfCRsZ+0YGRt5o+zyBFD9DpeE895fI9vmc5EY/qZlXNepRe9+2BFm8Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681652297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sb1qfo8d+Mey/XlWejyoe6gAofUPAU914/5cZxOE3E0=; b=TuGvqr3XbzMoaNLM0IPAsw1FCPGQ9hX6rHH3hi/bapfLhAx4yhrjdADX9j8YA1WGZRanib nsxzZ74/sJ5vNdQORwiunZH35FKeX5XoS7F1mjgqt3y3lSMHacxUfFzvCWWpTOr4oHXT/V qpJb/L6iBHBKc7Lqk6EN2XobAVynsAAtFm1s0xLxvNfmUF16riJyPQghPocDrPHYTIHCMV QdR9L5zaf8lX5v1cscU+aithdWut/afP29j8GAMaUlodfjk8/QFM5bYfFGOqNLnJWIrgZn /M3YDw+Cdky5VYwAUbrMyEzY78aQ8k04XbtGybhmhfhGyMpzHBLbw8Rx5rgcyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681652297; a=rsa-sha256; cv=none; b=tMRUC7aKmdQIpEqySjSYqpTnSUWnZK+tB+qiL6KWDJ4fDOSLupmPeRIgD6Bvi44taW92i9 LwRsFNGjglTr6OXq0TPzZuDGpk6ZNBarLQf/MtIYP7sT8JtsR77T2jxoQy5HamabYZ5Ymv Dj3pDT9dAXq8O45q6tEwykcwb++UKYPhS4FZnYatwyhfgbcMjed4AH4l275O8vwQtC8a9u 30dtAL1GdtbZ5dGemnLLFdi0VmHK9N9RiCE1dKlCCq9fMcbqPGwlx49TmwwVYN1nkxjKGj PPz9Z923kKltU+cRRMGHsUZkurqSQDQmQVLwYIIGp81237R0KHZ9lQWgMdb82w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzrqF5TY4zpw6; Sun, 16 Apr 2023 13:38: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 33GDcH7B086312; Sun, 16 Apr 2023 13:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GDcHgP086311; Sun, 16 Apr 2023 13:38:17 GMT (envelope-from git) Date: Sun, 16 Apr 2023 13:38:17 GMT Message-Id: <202304161338.33GDcHgP086311@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: c753f49f7006 - main - makefs: remove unused cd9660 options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c753f49f7006d28786c29dfbb5f838b494e2146f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c753f49f7006d28786c29dfbb5f838b494e2146f commit c753f49f7006d28786c29dfbb5f838b494e2146f Author: Ed Maste AuthorDate: 2023-03-31 12:52:22 +0000 Commit: Ed Maste CommitDate: 2023-04-16 13:38:02 +0000 makefs: remove unused cd9660 options Makefs defined "follow-symlinks" and "help" options, but they did nothing. Remove them. Obtained from: OpenBSD a8f1645688c2 Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/cd9660.c | 13 ------------- usr.sbin/makefs/cd9660.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index 661eefc832da..4d82a8dc93a1 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -196,7 +196,6 @@ cd9660_set_defaults(iso9660_disk *diskStructure) /* Set up defaults in our own structure */ diskStructure->verbose_level = 0; diskStructure->keep_bad_images = 0; - diskStructure->follow_sym_links = 0; diskStructure->isoLevel = 2; diskStructure->rock_ridge_enabled = 0; @@ -266,10 +265,6 @@ cd9660_prep_opts(fsinfo_t *fsopts) OPT_NUM('v', "verbose", verbose_level, 0, 2, "Turns on verbose output"), - OPT_BOOL('h', "help", displayHelp, - "Show help message"), - OPT_BOOL('S', "follow-symlinks", follow_sym_links, - "Resolve symlinks in pathnames"), OPT_BOOL('R', "rockridge", rock_ridge_enabled, "Enable Rock-Ridge extensions"), OPT_BOOL('C', "chrp-boot", chrp_boot, @@ -491,14 +486,6 @@ cd9660_makefs(const char *image, const char *dir, fsnode *root, assert(dir != NULL); assert(root != NULL); - if (diskStructure->displayHelp) { - /* - * Display help here - probably want to put it in - * a separate function - */ - return; - } - if (diskStructure->verbose_level > 0) printf("%s: image %s directory %s root %p\n", __func__, image, dir, root); diff --git a/usr.sbin/makefs/cd9660.h b/usr.sbin/makefs/cd9660.h index fae2d2077c00..f271e0425517 100644 --- a/usr.sbin/makefs/cd9660.h +++ b/usr.sbin/makefs/cd9660.h @@ -238,9 +238,7 @@ typedef struct _iso9660_disk { int include_padding_areas; - int follow_sym_links; int verbose_level; - int displayHelp; int keep_bad_images; /* SUSP options and variables */ From nobody Sun Apr 16 13:50: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 4Pzs58611lz45P1W; Sun, 16 Apr 2023 13:50: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 4Pzs585RWdz3lYr; Sun, 16 Apr 2023 13:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681653020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AlEC9nrTlam8HCroc8sEYEccjprf6dmdG+e+1jc5mGM=; b=unU2zy1WOwT+lS4tfd89XjXB8vCi4hjmH5d8gj9KR+L6SUN3bFl5IAPiuaDKvfrbV195QP 1Hb4vPHztx0qOz0bLUxUm8skJ325uFnXRxO133PAIpSK2b8H4PdSyojforTHTXgNw6616N ilh9rmerEsuMbHPAR6K4m71BZM4WGvQyCzINHMxHIQYSRIepKAYXHD4orXX4xanWTCyCvR vxu0y4p+kc3Lfk97zVPegnj6sJSXJ7E0E1/ooxIDPlxnMj/4CrIkAqNjl6+c+4lQG6p6Rd 71LNJr2HSPvwXa6nqkIbzt10+WXAfP9EYLttQqCy2aSVDQYpN1holzk5Z+t2HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681653020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AlEC9nrTlam8HCroc8sEYEccjprf6dmdG+e+1jc5mGM=; b=a28eHXD5OMXHdpuxzuFDzyU/TojLjVeqTVyy3Z/X03TXOOAwSgxI4PZndyaORvCtYJcSJQ GC4lRXPVX9Hz6mPi4aUWtw7H9E2SF/3AHWq/VS6P5gLvpaHVT842mhr5NDKU7akcKobxJb f44TRSnPF9Etqk9GGpLEuyVIXmyvbYeRH/p2o3YjCgJuXCwtDFoA9TXjKJqYUqTglCIWlN JPGSkPtRoWDFtET0Xv9e3hbU0EAYlp/8LEybkQULhXIElXqGu6wxc+WUJDpJRsf17FQAat /McDGV4PdeThHgfp0spuv7CCRwJfQGfp8PJOgZBE3WgtccbYiTgrx7gCTWmMeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681653020; a=rsa-sha256; cv=none; b=KS3Odz6gz9zKD0nc0Im/HFe6SgClgUz2l6QN/Dl66az8/4fD1RlCAYlfyl6CP2Qlz9EGqz LDE65gkbpor5UKdjj6Oc+6pHsUC8ZjocxZFKxuJIa7OIc6sbdbB+TJEeOwdYIZIQTJADxK Bb91jEhTy/nwS9Qz3T+/X2wZ2NdEzlGjRbHUFpyqbCktU8Wgc4hfRXkl3nEInL9BoT7kV/ WF3lfEdBERqUzIrHsGosG7iB+0vG5cgXLiNGWF0b5XRi1hzzoHJMs/yMPEjbmIYeC9BEPP rqfxFnnoMCYQpwF2dm08lG+Pp+62NgPDSfIcU8GwiyAnZMhSCX90IWxarpbgNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pzs584TFMzpwj; Sun, 16 Apr 2023 13:50: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 33GDoKmM011120; Sun, 16 Apr 2023 13:50:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GDoKOW011119; Sun, 16 Apr 2023 13:50:20 GMT (envelope-from git) Date: Sun, 16 Apr 2023 13:50:20 GMT Message-Id: <202304161350.33GDoKOW011119@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 3e9d966ce45e - stable/13 - vimage.8: Remove a double word List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3e9d966ce45e3971c295a1dff7435d6b9f1321da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=3e9d966ce45e3971c295a1dff7435d6b9f1321da commit 3e9d966ce45e3971c295a1dff7435d6b9f1321da Author: Gordon Bergling AuthorDate: 2023-04-13 18:22:25 +0000 Commit: Gordon Bergling CommitDate: 2023-04-16 13:50:09 +0000 vimage.8: Remove a double word - s/are are/are/ (cherry picked from commit e0c2f93029850968712a4fb4ab3630579d8812d3) --- tools/tools/vimage/vimage.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/vimage/vimage.8 b/tools/tools/vimage/vimage.8 index accb9d6400bb..8b0d74f69a74 100644 --- a/tools/tools/vimage/vimage.8 +++ b/tools/tools/vimage/vimage.8 @@ -70,7 +70,7 @@ Every process, socket and network interface present in the system is always attached to one, and only one, virtual network stack instance (vnet). During system bootup sequence a default vnet is created to which all the configured interfaces and user processes are initially attached. -Assuming that enough system resources are are available, a user with sufficient +Assuming that enough system resources are available, a user with sufficient privileges can create and manage a hierarchy of subordinated virtual images. The .Nm From nobody Sun Apr 16 18:38: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 4PzzTS1yKvz45ncy; Sun, 16 Apr 2023 18:38: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 4PzzTS17Pdz4LNS; Sun, 16 Apr 2023 18:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681670300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iyJVCB2+fah7emHXiCvYUXU7N1gi+rZJ4wBFke4EikM=; b=B/VwdVnhloIG2ouEJfYcnJNvGkQjtzZZkw41IxKAvkyXV25E+Sz/sllibWHunoZBsvAYtt Tji9nbSdj7KFtPfOzi4SW+OphMgeP9mViJEjfAQFtmCZ4kmMnAvNBzFq+supx8/B9xAkFX mlF1VtH3IVGSfH8NBvr0jPrva21apaTlZpbPFcqK3TTDxWYU4K8F955sV8//EgIcfupeDS WeNIaOkEz5NQC3JihOg0WpZq37agBJ9OsdAsuhN/Rtb7fUNCLJ+qlMax3//QnXXdwf4E74 8nnhaS68tyXaHvY3FoDxK3XzU7M83dk4qicfAFaP/rvCpZGPpkVg6TEliY9PkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681670300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iyJVCB2+fah7emHXiCvYUXU7N1gi+rZJ4wBFke4EikM=; b=kVeb9xCeuHbPikvjkt+OgfgRZEtEV//je+h9+m1QwFbRdzvXYuSYAACcyRQ1JXT4T1WXQa GYLEft/uMpzMlQwbFWCYZajx9wJCti36AqI5hhUzR/eIJ99N7yrDBJL6srglyIbDuMtG3f Wh3tHpie4ritpK9JgleQMIMyBEdZ/HaJYtTxkm8nVxEZ+FsWiTJaDDhAvG4/kz9cq0rFbS YEJKL+jaV5wm9ZK8qrVEmNrICw1UrE5f2COgvu/Oh9nNef5ODdsLDoYXNXJyR4SEwnJB/A NpSe3TvmAFXaoLTdHH5syItTP2scLl/zvFO/0L4pGHBpN3RHSc5hcc02Pmpn3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681670300; a=rsa-sha256; cv=none; b=qEB5cl8iGmqgiQGoRAFQUa4PvFZT/gxihI0/CzwGTCbtGMzb2tiv39w9dNHiIEdS5vzE/V t0G9pnTn2oTECE2F9HY7SpilgJ80lCSMXA1L/rCLzupWTwPuD/Ss6wRGV/OpeH10jCx+MK ctf/7fF+shf/kaGAgNU/gNCI4EM2tipk+NXZdubQ1hb5xyS/+QNTEyx3uSA1p8nnpRgIU8 IPOvDsW6+1Kh8us3uIK2OhuEXSyNQ88bjMcgOXi7nZUG/fSh4broBlpr0BYZR/pf65FYlA 7jSoUtw1lOmJE8A+14w5Z1ROvRxsaPL5XYL3aeAxeWLM7vKE2wYSeZYu/hTImg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzzTS08gKzxsT; Sun, 16 Apr 2023 18:38: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 33GIcJfG079191; Sun, 16 Apr 2023 18:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GIcJiX079190; Sun, 16 Apr 2023 18:38:19 GMT (envelope-from git) Date: Sun, 16 Apr 2023 18:38:19 GMT Message-Id: <202304161838.33GIcJiX079190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 4819e5aeda4e - main - Add new privilege PRIV_KDB_SET_BACKEND List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4819e5aeda4ef1a193a08e29b4099c3c30369a81 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=4819e5aeda4ef1a193a08e29b4099c3c30369a81 commit 4819e5aeda4ef1a193a08e29b4099c3c30369a81 Author: Stephen J. Kiernan AuthorDate: 2023-04-16 03:59:52 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-16 18:37:58 +0000 Add new privilege PRIV_KDB_SET_BACKEND Summary: Check for PRIV_KDB_SET_BACKEND before allowing a thread to change the KDB backend. Obtained from: Juniper Networks, Inc. Reviewers: sjg, emaste Subscribers: imp Differential Revision: https://reviews.freebsd.org/D39538 --- sys/kern/subr_kdb.c | 6 ++++++ sys/sys/priv.h | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index ff981cdfe47c..8aae19b728c8 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -484,6 +485,11 @@ int kdb_dbbe_select(const char *name) { struct kdb_dbbe *be, **iter; + int error; + + error = priv_check(curthread, PRIV_KDB_SET_BACKEND); + if (error) + return (error); SET_FOREACH(iter, kdb_dbbe_set) { be = *iter; diff --git a/sys/sys/priv.h b/sys/sys/priv.h index 20bfc7312ce3..cb4dcecea4aa 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -515,10 +515,15 @@ #define PRIV_KMEM_READ 680 /* Open mem/kmem for reading. */ #define PRIV_KMEM_WRITE 681 /* Open mem/kmem for writing. */ +/* + * Kernel debugger privileges. + */ +#define PRIV_KDB_SET_BACKEND 690 /* Allow setting KDB backend. */ + /* * Track end of privilege list. */ -#define _PRIV_HIGHEST 682 +#define _PRIV_HIGHEST 691 /* * Validate that a named privilege is known by the privilege system. Invalid From nobody Sun Apr 16 19:35: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 4Q00ls4WxSz45rss; Sun, 16 Apr 2023 19:35: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 4Q00lr5FcZz3klb; Sun, 16 Apr 2023 19:35:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681673752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mcjypUnVtkbT64GnycbBSoGzNLZTkGjNaUuep4aoz8w=; b=JJZ5lEvKzvZx1Lj4VU7eruhTOgTBHm61fJxhTqeHRODt/CjhlOAjmUXvk+n+p+IMfLTqNG 8Xbrd3lHybhRRtagHQFpzeHkLjjd4z0nz6ssuCLWuEj7pqvt5wFk/nbtwEB+hxmV2tGNk0 UwA7fDnusWABazEEY3fL3GmOVi68LXY/1AytHOrnDs3LyIMYQq0LZ6PGqZ0pPaQe6u5ZyP rhqvJuM9TVbJN3QhW0iP4DN+0nCBBWftaGNNn4GjbQDEtHlva6WLIi0m90noACbfhWh+Or Ymjn90tTljEUR6asQq9wAzKJlywccpKJRDvvxGf5kOTwAwnZznXk9FkNONtUWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681673752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mcjypUnVtkbT64GnycbBSoGzNLZTkGjNaUuep4aoz8w=; b=frpURZFBKh1BsmPU0REpwgRsQBO88IWIa4V9ZfDGbZaVPEtN58/RTFKA5B7ws6uLGnLhgh 3q3wGkpiXHkFgR8EQ8m5qC96WvCVkxJx1gYSkeJ2XNDdyIkzL5fnaUyIDGQD9zBP5OudGI 69VTC8FrhrCnXlj1SigellAmdqSCYtMJydHa3da9JfZOTdfWifeq3+TbxXa32BRnc9McJC k7KHNs07Cmlk6YScwX9OrsuVHUgrEKcUdBcf2nfHh5wckpSaZD3SoXDimHTKa4X3GnpDcG cu6J2iH6DVybd4190X3V6muxT4VNuAczio7MzDFuL0pI25AbmEcPwxNS+E0zGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681673752; a=rsa-sha256; cv=none; b=hTcLrpfCgIIwG4GDqyIabdNPz4onXZtCQg/UeNVWDGT+HPJ5Wdbcw0xNgBUd4Oz765CMBI bLlnu9PhzthLWFV4R4uc4UUs9GSEMARxbFmedt15qsYEK7qDoub9+YKYt6dJ37cg+oBnuG MgQAA44DiV+eWeULRAiygxaGhIwUPDN5svWqQOKh52es+3RpfyTOejKI7EYFYcOEBYSOMr ioKETQETs2oQlyWEB8Bt1J4hMhH6wb9HLIYxbxvQB30Tv56yTmCDVaRxhQB3ZvvQoa3kp/ PELzVWPOCVzGLlz2zJ3KHxBHariWjQCQBlprzPAgAQqYgb28pryX6LzAXcEAEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q00lr2dYjz10QX; Sun, 16 Apr 2023 19:35: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 33GJZqtj077181; Sun, 16 Apr 2023 19:35:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GJZq3b077180; Sun, 16 Apr 2023 19:35:52 GMT (envelope-from git) Date: Sun, 16 Apr 2023 19:35:52 GMT Message-Id: <202304161935.33GJZq3b077180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 89d197cc991a - main - RELNOTES: Add entries for two new NFS 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89d197cc991acfbb6937be0ce5b9255d14b72160 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=89d197cc991acfbb6937be0ce5b9255d14b72160 commit 89d197cc991acfbb6937be0ce5b9255d14b72160 Author: Rick Macklem AuthorDate: 2023-04-16 19:34:52 +0000 Commit: Rick Macklem CommitDate: 2023-04-16 19:34:52 +0000 RELNOTES: Add entries for two new NFS features --- RELNOTES | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/RELNOTES b/RELNOTES index 9e099e29fe37..b13c0738f70b 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,26 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +896516e54a8c + Add a new "syskrb5" mount option for Kerberized NFSv4.1/4.2 mounts. + Without this patch, a Kerberized NFSv4.1/4.2 mount must provide + a Kerberos credential for the client at mount time. + This patch uses a feature of NFSv4.1/4.2 called SP4_NONE, which + allows the state maintenance operations to be performed by any + authentication mechanism, so that these operations may be done via + AUTH_SYS instead of RPCSEC_GSS (KerberosV). As such, no Kerberos + credential is required at mount time. + See mount_nfs(8). + +330aa8acdec7,ff2f1f691cdb + Adds support for the SP4_MACH_CRED case for the + NFSv4.1/4.2 ExchangeID operation since the Linux + NFSv4.1/4.2 client is now using this for Kerberized mounts. + This change should only affect Kerberized NFSv4.1/4.2 mounts. + The Linux Kerberized NFSv4.1/4.2 mounts currently work without + support for this because Linux will fall back to SP4_NONE, + but there is no guarantee this fallback will work forever. + 7344856e3a6d and many others: Add support so that nfsd(8), nfsuserd(8), mountd(8), gssd(8) and rpc.tlsservd(8) can be run in an appropriately configured From nobody Sun Apr 16 19:45: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 4Q00yw49xWz45sXh; Sun, 16 Apr 2023 19:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q00yw25fSz41LW; Sun, 16 Apr 2023 19:45:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681674328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ENFHbJs+qkjyt3R+uA5Tgky8N9E0JZklECQP9zyyu64=; b=IU+zBvwEW8FaTxy++euzck7uu9bD+QqLY5Wyz9meBlogtkL0SEphh19SaYW3WJzv//lznR u+qcqBnUnYDYZry35u1AhFb3vUUq7XFN8nGVK9ow9Ma7UrmK+a1Y6Dqk68x7Z9T4Et97bt 20QD2eroo5NdgjGduZpH4TzN2uycUg/A09aPuJy+hkpdcaBsz1EZGiqqgxR/9jCUJKxNhL sG+im7yXDJaKRYrWxhOXeUQWCLQ/Mz5m+NEzWRHdeinfFpljeb7chkl4irQw31g8ls1YQW eYtkFFtFey+m8jylzT5ywE0cleCw935vFqSJCgwwuJPucYARqJMyPXQvxMrGkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681674328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ENFHbJs+qkjyt3R+uA5Tgky8N9E0JZklECQP9zyyu64=; b=AIznLjAI0wug9ZbYlB6xLruyRAVMlOHON21SvBxquakrpFxAMUmISPMzHj53rQc5SXjFUk Axs8ugz/UV/rym82AiqFJGbdeFXt4KyikdFugvOu1nmdJ6pKt7JEL4lzG2ewfQz1N3VvfP wA8Od6HJHJg8uckztmB4ILgZ25ZlNveK1JB1YbXhZUyH96nv62kRTKarc1BMBTAg+h5aEd KhA3VLHFe3r0YvtPzYRDw4wTLTolkaG+B+fJqtPT9sJROarT/A9rAHDDiIyVsgkkvOmpom Pnb3eFzQk2R54kPxQWAbl37Y0WV669QRaBJwcxxmIb4b4Kfije0hLn+BPB/eiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681674328; a=rsa-sha256; cv=none; b=Ia+tCnxQJY8PH5xQGSdO+/eCJ7ZeALw5ZtdPwx8KfxEEqX6L91pPPPlqdc2pYOKFt1Lr1q 53Xnjafm8h+5/ATISOWT7v3GqbCEBL0074JhxjF9ClZ7CmV70PrlZ/dnAVqQBTz1BkDbZ6 /zn7HeXyC0+Nu40xs0ZZJDR5+0bswfVdOlruaqbbvD0gnmXn1l7wqj+kdjdx6FMtuHoGND nPW3QqzsbG/L/2E8YJZcxFBCfn+aVVA1kXNm4Yp6Dgy3+MGuh1WKd/3jDKr8h3SXYmsDOg A8h215C5PjlG6LC78N9RBOIMae5clZOlzm+2cwDiYIHrCzqT6ikAoV7HKgOFWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q00yw0wwbz10X1; Sun, 16 Apr 2023 19:45: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 33GJjSX5094052; Sun, 16 Apr 2023 19:45:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GJjSUS094051; Sun, 16 Apr 2023 19:45:28 GMT (envelope-from git) Date: Sun, 16 Apr 2023 19:45:28 GMT Message-Id: <202304161945.33GJjSUS094051@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: e5551216d8e5 - main - makefs: call brelse from bread List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e5551216d8e563043248bc7f3cb1c75b2dbd9791 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e5551216d8e563043248bc7f3cb1c75b2dbd9791 commit e5551216d8e563043248bc7f3cb1c75b2dbd9791 Author: Ed Maste AuthorDate: 2023-03-13 21:00:20 +0000 Commit: Ed Maste CommitDate: 2023-04-16 19:45:17 +0000 makefs: call brelse from bread This matches NetBSD and rationalizes makefs with the kernel API. This reverts commit 370e009188ba90c3290b1479aa06ec98b66e140a. Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Obtained from: NetBSD 0a62dad69f62, 0c4125e1a19f, cb6a5a3575fd Differential Revision: https://reviews.freebsd.org/D39070 --- usr.sbin/makefs/ffs.c | 1 - usr.sbin/makefs/ffs/buf.c | 25 +++++++++++++++---------- usr.sbin/makefs/msdos/msdosfs_vnops.c | 1 - 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index cc0f640e3c9c..17682dea2a4b 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -1002,7 +1002,6 @@ ffs_write_file(union dinode *din, uint32_t ino, void *buf, fsinfo_t *fsopts) errno = bwrite(bp); if (errno != 0) goto bad_ffs_write_file; - brelse(bp); if (!isfile) p += chunk; } diff --git a/usr.sbin/makefs/ffs/buf.c b/usr.sbin/makefs/ffs/buf.c index fe6eaed93d04..3d03e9866b3b 100644 --- a/usr.sbin/makefs/ffs/buf.c +++ b/usr.sbin/makefs/ffs/buf.c @@ -127,26 +127,31 @@ bwrite(struct m_buf *bp) { off_t offset; ssize_t rv; + size_t bytes; + int e; fsinfo_t *fs = bp->b_fs; assert (bp != NULL); offset = (off_t)bp->b_blkno * fs->sectorsize + fs->offset; + bytes = (size_t)bp->b_bcount; if (debug & DEBUG_BUF_BWRITE) - printf("%s: blkno %lld offset %lld bcount %ld\n", __func__, - (long long)bp->b_blkno, (long long) offset, - bp->b_bcount); - if (lseek(bp->b_fs->fd, offset, SEEK_SET) == -1) + printf("%s: blkno %lld offset %lld bcount %zu\n", __func__, + (long long)bp->b_blkno, (long long) offset, bytes); + if (lseek(bp->b_fs->fd, offset, SEEK_SET) == -1) { + brelse(bp); return (errno); - rv = write(bp->b_fs->fd, bp->b_data, bp->b_bcount); + } + rv = write(bp->b_fs->fd, bp->b_data, bytes); + e = errno; if (debug & DEBUG_BUF_BWRITE) printf("%s: write %ld (offset %lld) returned %lld\n", __func__, bp->b_bcount, (long long)offset, (long long)rv); - if (rv == bp->b_bcount) + brelse(bp); + if (rv == (ssize_t)bytes) return (0); - else if (rv == -1) /* write error */ - return (errno); - else /* short write ? */ - return (EAGAIN); + if (rv == -1) /* write error */ + return (e); + return (EAGAIN); } void diff --git a/usr.sbin/makefs/msdos/msdosfs_vnops.c b/usr.sbin/makefs/msdos/msdosfs_vnops.c index c04ed6f742a1..5bc9b495c586 100644 --- a/usr.sbin/makefs/msdos/msdosfs_vnops.c +++ b/usr.sbin/makefs/msdos/msdosfs_vnops.c @@ -500,7 +500,6 @@ msdosfs_wfile(const char *path, struct denode *dep, fsnode *node) cpsize = MIN((nsize - offs), blsize - on); memcpy(bp->b_data + on, dat + offs, cpsize); bwrite(bp); - brelse(bp); offs += cpsize; } From nobody Sun Apr 16 20:47: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 4Q02M25vMcz45wjn; Sun, 16 Apr 2023 20:47:58 +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 4Q02M13p1wz3jgN; Sun, 16 Apr 2023 20:47:57 +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 33GKlmfJ086018 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 16 Apr 2023 23:47:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 33GKlmfJ086018 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 33GKlm1s086016; Sun, 16 Apr 2023 23:47:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 16 Apr 2023 23:47:48 +0300 From: Konstantin Belousov To: "Stephen J. Kiernan" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4819e5aeda4e - main - Add new privilege PRIV_KDB_SET_BACKEND Message-ID: References: <202304161838.33GIcJiX079190@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: <202304161838.33GIcJiX079190@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: 4Q02M13p1wz3jgN 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 Sun, Apr 16, 2023 at 06:38:19PM +0000, Stephen J. Kiernan wrote: > The branch main has been updated by stevek: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4819e5aeda4ef1a193a08e29b4099c3c30369a81 > > commit 4819e5aeda4ef1a193a08e29b4099c3c30369a81 > Author: Stephen J. Kiernan > AuthorDate: 2023-04-16 03:59:52 +0000 > Commit: Stephen J. Kiernan > CommitDate: 2023-04-16 18:37:58 +0000 > > Add new privilege PRIV_KDB_SET_BACKEND > > Summary: > Check for PRIV_KDB_SET_BACKEND before allowing a thread to change > the KDB backend. > > Obtained from: Juniper Networks, Inc. > Reviewers: sjg, emaste > Subscribers: imp > > Differential Revision: https://reviews.freebsd.org/D39538 > --- > sys/kern/subr_kdb.c | 6 ++++++ > sys/sys/priv.h | 7 ++++++- > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c > index ff981cdfe47c..8aae19b728c8 100644 > --- a/sys/kern/subr_kdb.c > +++ b/sys/kern/subr_kdb.c > @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -484,6 +485,11 @@ int > kdb_dbbe_select(const char *name) > { > struct kdb_dbbe *be, **iter; > + int error; > + > + error = priv_check(curthread, PRIV_KDB_SET_BACKEND); priv_check() fails for jailed, or even simply non-root process. kdb_dbbe_select() is called from a random context, e.g. from kdb_alt_break_gdb(), where it inherits whatever thread was running at the moment of break to debugger. In other words, this function no longer works reliably. > + if (error) > + return (error); > > SET_FOREACH(iter, kdb_dbbe_set) { > be = *iter; > diff --git a/sys/sys/priv.h b/sys/sys/priv.h > index 20bfc7312ce3..cb4dcecea4aa 100644 > --- a/sys/sys/priv.h > +++ b/sys/sys/priv.h > @@ -515,10 +515,15 @@ > #define PRIV_KMEM_READ 680 /* Open mem/kmem for reading. */ > #define PRIV_KMEM_WRITE 681 /* Open mem/kmem for writing. */ > > +/* > + * Kernel debugger privileges. > + */ > +#define PRIV_KDB_SET_BACKEND 690 /* Allow setting KDB backend. */ > + > /* > * Track end of privilege list. > */ > -#define _PRIV_HIGHEST 682 > +#define _PRIV_HIGHEST 691 > > /* > * Validate that a named privilege is known by the privilege system. Invalid From nobody Sun Apr 16 23:14: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 4Q05cf4llNz44s8X; Sun, 16 Apr 2023 23:14: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 4Q05cf4HPgz4ZCY; Sun, 16 Apr 2023 23:14:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681686898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=naOD7ZYOwSETM4Ef1cBHlEqKpCumtcbIY+fqptYlV3Y=; b=A7GvzmuviVHVkSFowA852oVEVUznz1Fk8/L5Z+2/IXWHYqb/RO8MRQETZ/jmKPN0W96ru7 oRuUYV0QZ0pBkxIo2ifgWwPNFk0bfQ+DJ1B7mKnw6RH9CBkz1boYJXu/4+25LQFEk7pMvR GatUBhawo5RNADY4t7HDUyGKkgTJ8UzGBFEeZOesRtyq2NOvMBZcvLwfVLPwbXjVBOFdIl gAzbI0FeJz7godQyiEMaFiKbIpaPrbQJFhcCkvJn15I+7lKUivRQeohyIU/G2FK8ErsXMs yTrcHECGrZvqPmC6/IPIOqotEFt4fMuXIQIaaMVr3pCg7LBBtlLEa65f/RRIDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681686898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=naOD7ZYOwSETM4Ef1cBHlEqKpCumtcbIY+fqptYlV3Y=; b=MjS+5Rs1UcQVeySyoKTvmkQIh4OOzbu+Ev01Huc+6TqCnjgUzcvDoZCP2sPMwMYvVMkYxq SOne5UtqkjvOLEqbaLM2YAzaGGz9hGoTZkTvBp3mhstFmIWOsWOsCjt8G3nFJ/IbxDA2A2 tmwLRRoZwQEeHY3LplmdlOataKysS9JFFBZ/HAITIf6Qg10a6rmjjwV5jcxzCbdIdalCUk VVE3BnKpicfKLFV9QBfgyI0MbQPwR81AM+wDI8DQsT3adgT6QIoU/rqwTm+DuOmI08TAUF EYNLhxMZT0G3OZqBb+OB+z9hyiVgcY92K0lSEIvOOf0bJLH65bkW5uwBOrp6UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681686898; a=rsa-sha256; cv=none; b=obn5ZgW+5xSaoQajDFdYPSNtM4WEzWhg2VsDOLhiGCVQgUNcG6wNITfecGBEfF+ktoVD8p kleURFWj3Dhz39EFXUOlQeI8ko/tEXrXkDpM4SGAhof8H4ofyI1TQ2n6dc7EK+SRzH0sDb kyBPtLSwV0VLOFy2pdv1Zgh2ab+gogfa45zYjOgIFOKmx99vMyiPAMlDAF25025EzDptii BazU2zwEfh378QZmmrTx8Fhy0IfFvnYdrMoZBGf826RxL6MfgVmVf/0+xoyY8L/6rC6UD7 e4Sn7qleyDMcFsaswQ+byl51MpaY+vNRnWxx2oIfwhr2kWfvD870GuS2tKmZug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q05cf3MpTz15dv; Sun, 16 Apr 2023 23:14: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 33GNEwGN039915; Sun, 16 Apr 2023 23:14:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GNEwXd039914; Sun, 16 Apr 2023 23:14:58 GMT (envelope-from git) Date: Sun, 16 Apr 2023 23:14:58 GMT Message-Id: <202304162314.33GNEwXd039914@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 6ae8d57652fa - main - mac_veriexec: add mac_priv_grant check for NODEV List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ae8d57652faf3bb8532ed627676c65eecd94a31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=6ae8d57652faf3bb8532ed627676c65eecd94a31 commit 6ae8d57652faf3bb8532ed627676c65eecd94a31 Author: Simon J. Gerraty AuthorDate: 2019-07-29 22:38:16 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-16 23:14:40 +0000 mac_veriexec: add mac_priv_grant check for NODEV Allow other MAC modules to override some veriexec checks. We need two new privileges: PRIV_VERIEXEC_DIRECT process wants to override 'indirect' flag on interpreter PRIV_VERIEXEC_NOVERIFY typically associated with PRIV_VERIEXEC_DIRECT allow override of O_VERIFY We also need to check for PRIV_VERIEXEC_NOVERIFY override for FINGERPRINT_NODEV and FINGERPRINT_NOENTRY. This will only happen if parent had PRIV_VERIEXEC_DIRECT override. This allows for MAC modules to selectively allow some applications to run without verification. Needless to say, this is extremely dangerous and should only be used sparingly and carefully. Obtained from: Juniper Networks, Inc. Reviewers: sjg Subscribers: imp, dab Differential Revision: https://reviews.freebsd.org/D39537 --- sys/security/mac_veriexec/mac_veriexec.c | 16 ++++++++++++++++ sys/security/mac_veriexec/veriexec_fingerprint.c | 23 ++++++++++++++++++++++- sys/sys/priv.h | 8 +++++++- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index e377f61ad21c..b20df7d694ef 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include "mac_veriexec.h" @@ -430,6 +431,18 @@ mac_veriexec_priv_check(struct ucred *cred, int priv) return (0); } +/** + * @internal + * @brief Check if the requested sysctl should be allowed + * + * @param cred credentials to use + * @param oidp sysctl OID + * @param arg1 first sysctl argument + * @param arg2 second sysctl argument + * @param req sysctl request information + * + * @return 0 if the sysctl should be allowed, otherwise an error code. + */ static int mac_veriexec_sysctl_check(struct ucred *cred, struct sysctl_oid *oidp, void *arg1, int arg2, struct sysctl_req *req) @@ -533,6 +546,9 @@ mac_veriexec_check_vp(struct ucred *cred, struct vnode *vp, accmode_t accmode) return (error); break; default: + /* Allow for overriding verification requirement */ + if (mac_priv_grant(cred, PRIV_VERIEXEC_NOVERIFY) == 0) + return (0); /* * Caller wants open to fail unless there is a valid * fingerprint registered. diff --git a/sys/security/mac_veriexec/veriexec_fingerprint.c b/sys/security/mac_veriexec/veriexec_fingerprint.c index 29b5c19eed1e..500842cbd5ab 100644 --- a/sys/security/mac_veriexec/veriexec_fingerprint.c +++ b/sys/security/mac_veriexec/veriexec_fingerprint.c @@ -42,11 +42,14 @@ #include #include #include +#include #include #include #include #include +#include + #include "mac_veriexec.h" #include "mac_veriexec_internal.h" @@ -292,7 +295,8 @@ mac_veriexec_fingerprint_check_image(struct image_params *imgp, case FINGERPRINT_INDIRECT: /* fingerprint ok but need to check for direct execution */ - if (!imgp->interpreted) { + if (!imgp->interpreted && + mac_priv_grant(td->td_ucred, PRIV_VERIEXEC_DIRECT) != 0) { identify_error(imgp, td, "attempted direct execution"); if (prison0.pr_securelevel > 1 || mac_veriexec_in_state(VERIEXEC_STATE_ENFORCE)) @@ -326,6 +330,23 @@ mac_veriexec_fingerprint_check_image(struct image_params *imgp, identify_error(imgp, td, "invalid status field for vnode"); error = EPERM; } + switch (status) { + case FINGERPRINT_NODEV: + case FINGERPRINT_NOENTRY: + /* + * Check if this process has override allowed. + * This will only be true if PRIV_VERIEXEC_DIRECT + * already succeeded. + */ + if (error == EAUTH && + mac_priv_grant(td->td_ucred, PRIV_VERIEXEC_NOVERIFY) == 0) { + error = 0; + } + break; + default: + break; + } + return error; } diff --git a/sys/sys/priv.h b/sys/sys/priv.h index cb4dcecea4aa..6574d8c42599 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -520,10 +520,16 @@ */ #define PRIV_KDB_SET_BACKEND 690 /* Allow setting KDB backend. */ +/* + * veriexec override privileges - very rare! + */ +#define PRIV_VERIEXEC_DIRECT 700 /* Can override 'indirect' */ +#define PRIV_VERIEXEC_NOVERIFY 701 /* Can override O_VERIFY */ + /* * Track end of privilege list. */ -#define _PRIV_HIGHEST 691 +#define _PRIV_HIGHEST 702 /* * Validate that a named privilege is known by the privilege system. Invalid From nobody Sun Apr 16 23:19: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 4Q05jd1xSyz44s8x; Sun, 16 Apr 2023 23:19: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 4Q05jd1TDMz3F27; Sun, 16 Apr 2023 23:19:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681687157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W4DvMVms0a9i3+warptjuI/7MXDbfLOZTw6cwTsXNQY=; b=Uhhs+vqRB5m2gGASxnjwrovHfS/lxK1CekM7n/Sj1OPFpl84Pdzc8SdI7hNPnkgSjZNPRf bdGXJPpB+8OMPGzNFt2IqcBizGenp6QUBDJfFii/BdAq19vAfyycLz5zXSwlSzQVmzCsgk sxNEyzTkeGIwvOPa8SeJou3t2CFl64oIiLN5GZebttEwTyLEV++talbbIKMTtAz2K1UBRe FC+3sXmG9WHQYd1rmmnFUoMzzonY0QBTtyQnoMmbhS6wgk7sHR22qRndDRl9EP+6uVs0Gw 6b3ekRRKtCRWWh+UUlzUHt6nttBGLKQPI8S9VRx5XgG3tlUFynJdzIwttSO4FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681687157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W4DvMVms0a9i3+warptjuI/7MXDbfLOZTw6cwTsXNQY=; b=RBfIon02ESg5/OBPNLT7M6I6h9JMsF/3nZanm9fg+QghRrhqCQ5aOTiWYMIQg4YgpbxhOg zkPO2dvLSnJsOXIsoy/FL0l4boQXIPenkGxD5Th8aW/MVwgTvoNyLHzFnhptglubK4BzOF k6Hcrs6Nzpd0fTaZp3gYL4ffJUfdU7eSDuBRo0y2jXZ5ZOHSd7HHAFGNkk9sdVEuLP/a5X Kmpc0TpHVc7TaWS3n6uy+drtRLCdW0V6XoIiqgAOubi8zQc6A2OfpMeZ5QjvEWH/8fvAko XuUFLMTLJ9CNcnF4bjNTrDmu+ed4D8BIO1vn6rjikrLVvvLBik/ehX4HylntVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681687157; a=rsa-sha256; cv=none; b=astBjSOSLjCOSufC0Mg1kr6qJdW4cDZ+5JgDKtoFupI+Ty9GxoyHuPpH+sRVFSAzs9kw37 V6d35fZ0myGXapcMGRSP0AW4vGJ4VmqAC/l3FqDS7CFFCFXpjMwbXOEND++2nF1+tNgCfF tXyl0QAZlY2ZRO448qScvetE4g9O6vp/XP2P7RMw+l4IbwaIHs1gyMUCxuOimLNwDSNcMS 6qlUaqnfuNSLQIoHgygfU8hgXOG3Rw0gGpZNz4t6Cb0MVYhcKPbeBDraSCNhZmC2HnJROk MNwXQC2MWEKV/MBUvyLj4RXIPE3tl/2WRCBj+4vNqzlWyyrBJr9gl30N+Mzcgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q05jd0Z9Sz15qy; Sun, 16 Apr 2023 23:19: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 33GNJGtX040545; Sun, 16 Apr 2023 23:19:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33GNJGCp040544; Sun, 16 Apr 2023 23:19:16 GMT (envelope-from git) Date: Sun, 16 Apr 2023 23:19:16 GMT Message-Id: <202304162319.33GNJGCp040544@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 8050e0a4299d - main - sys/modules/Makefile: add MAC/veriexec modules into the build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8050e0a4299d83d5ba99981e74f6a12b5c4e3dae Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=8050e0a4299d83d5ba99981e74f6a12b5c4e3dae commit 8050e0a4299d83d5ba99981e74f6a12b5c4e3dae Author: Stephen J. Kiernan AuthorDate: 2023-04-16 23:16:49 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-16 23:18:55 +0000 sys/modules/Makefile: add MAC/veriexec modules into the build Build the MAC/veriexec module and the SHA2, SHA256, SHA384, and SHA512 fingerprint modules. Obtained from: Juniper Networks, Inc. --- sys/modules/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index b59559f4c621..71e0be4cce2c 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -235,6 +235,11 @@ SUBDIR= \ ${_mac_seeotheruids} \ ${_mac_stub} \ ${_mac_test} \ + ${_mac_veriexec} \ + ${_mac_veriexec_sha1} \ + ${_mac_veriexec_sha256} \ + ${_mac_veriexec_sha384} \ + ${_mac_veriexec_sha512} \ ${_malo} \ ${_mana} \ md \ @@ -583,6 +588,11 @@ _mac_priority= mac_priority _mac_seeotheruids= mac_seeotheruids _mac_stub= mac_stub _mac_test= mac_test +_mac_veriexec= mac_veriexec +_mac_veriexec_sha1= mac_veriexec_sha1 +_mac_veriexec_sha256= mac_veriexec_sha256 +_mac_veriexec_sha384= mac_veriexec_sha384 +_mac_veriexec_sha512= mac_veriexec_sha512 .endif .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) From nobody Sun Apr 16 23: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 4Q069k3LZJz44tgT for ; Sun, 16 Apr 2023 23:40:10 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.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 4Q069k0s7wz45Pl for ; Sun, 16 Apr 2023 23:40:10 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-2f27a9c7970so1057801f8f.2 for ; Sun, 16 Apr 2023 16:40:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681688408; x=1684280408; 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=gJ4Zt0aZJ+3x9Omlcbk9FmiVa+8vHy6++pIMfYXLMSQ=; b=Wxcozd9gX/UKDn3C5cbSa8U1WdcnWEf2oRIWkUCkpEBGo32t2yZUX2sE7Oj5BkxFT2 kp4DNEXNuXZuVLBR7/KFl8/YWjRMirQ/PTJa1KvRC+zKN8jujDJ1uUYGh+m7rXb2oNcC LE4HYVRrAw/pj/GIzFquJ3T3nW4HAG5+VqGZoihZOfQ5LIt/4QfkFBi/isEt+EignC7f KaZ01rOHDhJBkG43Wtshp0jEWRjvugQxCuoJO4ht8CccsMEpKT14DXxWJSYi+UOLqCa1 NioGTO39gQE5TIEb4mQOMbxWe9ariM6K0TNgSoKAZD22MBtdXKVjAfXuOibaEzwqoobS J3Wg== X-Gm-Message-State: AAQBX9eyCOHKflki+r1frVyTYsZCzmL8WHte8OaBZVIEDlMgiGvOqHaq NTnaNHGQGEWiTTzcdIkcp3/qJbbcWAr+n6VyCdR0VQ== X-Google-Smtp-Source: AKy350Y9NCh+KqGtKKNM9+NOZbsZ+WKYQjLxpjZJxasei4lahGM5p+lm2j+UkGBVbZbtGE4Uv17uew== X-Received: by 2002:adf:e58d:0:b0:2f4:1953:37af with SMTP id l13-20020adfe58d000000b002f4195337afmr3657533wrm.16.1681688408432; Sun, 16 Apr 2023 16:40:08 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id x4-20020a5d54c4000000b002c3f81c51b6sm8984712wrv.90.2023.04.16.16.40.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Apr 2023 16:40:08 -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 \(3696.120.41.1.1\)) Subject: Re: git: 6ae8d57652fa - main - mac_veriexec: add mac_priv_grant check for NODEV From: Jessica Clarke In-Reply-To: <202304162314.33GNEwXd039914@gitrepo.freebsd.org> Date: Mon, 17 Apr 2023 00:40:07 +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: <202304162314.33GNEwXd039914@gitrepo.freebsd.org> To: "Stephen J. Kiernan" X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q069k0s7wz45Pl 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 17 Apr 2023, at 00:14, Stephen J. Kiernan wrote: >=20 > The branch main has been updated by stevek: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6ae8d57652faf3bb8532ed627676c65e= ecd94a31 >=20 > commit 6ae8d57652faf3bb8532ed627676c65eecd94a31 > Author: Simon J. Gerraty > AuthorDate: 2019-07-29 22:38:16 +0000 > Commit: Stephen J. Kiernan > CommitDate: 2023-04-16 23:14:40 +0000 >=20 > mac_veriexec: add mac_priv_grant check for NODEV >=20 > Allow other MAC modules to override some veriexec checks. >=20 > We need two new privileges: > PRIV_VERIEXEC_DIRECT process wants to override 'indirect' flag > on interpreter > PRIV_VERIEXEC_NOVERIFY typically associated with = PRIV_VERIEXEC_DIRECT > allow override of O_VERIFY >=20 > We also need to check for PRIV_VERIEXEC_NOVERIFY override > for FINGERPRINT_NODEV and FINGERPRINT_NOENTRY. > This will only happen if parent had PRIV_VERIEXEC_DIRECT override. >=20 > This allows for MAC modules to selectively allow some applications = to > run without verification. >=20 > Needless to say, this is extremely dangerous and should only be = used > sparingly and carefully. >=20 > Obtained from: Juniper Networks, Inc. >=20 > Reviewers: sjg > Subscribers: imp, dab >=20 > Differential Revision: https://reviews.freebsd.org/D39537 Hi Steve, I see you=E2=80=99ve made a bunch of commits over the past few days that = suffer from not following the proper commit message formatting outlined in the Committer=E2=80=99s Guide and templated in tools/tools/git/hooks/prepare-commit-msg; can you please take care and do so in future? Jess > --- > sys/security/mac_veriexec/mac_veriexec.c | 16 ++++++++++++++++ > sys/security/mac_veriexec/veriexec_fingerprint.c | 23 = ++++++++++++++++++++++- > sys/sys/priv.h | 8 +++++++- > 3 files changed, 45 insertions(+), 2 deletions(-) >=20 > diff --git a/sys/security/mac_veriexec/mac_veriexec.c = b/sys/security/mac_veriexec/mac_veriexec.c > index e377f61ad21c..b20df7d694ef 100644 > --- a/sys/security/mac_veriexec/mac_veriexec.c > +++ b/sys/security/mac_veriexec/mac_veriexec.c > @@ -51,6 +51,7 @@ > #include > #include > #include > +#include > #include >=20 > #include "mac_veriexec.h" > @@ -430,6 +431,18 @@ mac_veriexec_priv_check(struct ucred *cred, int = priv) > return (0); > } >=20 > +/** > + * @internal > + * @brief Check if the requested sysctl should be allowed > + * > + * @param cred credentials to use > + * @param oidp sysctl OID > + * @param arg1 first sysctl argument > + * @param arg2 second sysctl argument > + * @param req sysctl request information > + * > + * @return 0 if the sysctl should be allowed, otherwise an error = code. > + */ > static int > mac_veriexec_sysctl_check(struct ucred *cred, struct sysctl_oid *oidp, > void *arg1, int arg2, struct sysctl_req *req) > @@ -533,6 +546,9 @@ mac_veriexec_check_vp(struct ucred *cred, struct = vnode *vp, accmode_t accmode) > return (error); > break; > default: > + /* Allow for overriding verification requirement = */ > + if (mac_priv_grant(cred, PRIV_VERIEXEC_NOVERIFY) = =3D=3D 0) > + return (0); > /* > * Caller wants open to fail unless there is a = valid > * fingerprint registered. > diff --git a/sys/security/mac_veriexec/veriexec_fingerprint.c = b/sys/security/mac_veriexec/veriexec_fingerprint.c > index 29b5c19eed1e..500842cbd5ab 100644 > --- a/sys/security/mac_veriexec/veriexec_fingerprint.c > +++ b/sys/security/mac_veriexec/veriexec_fingerprint.c > @@ -42,11 +42,14 @@ > #include > #include =20 > #include > +#include > #include > #include > #include > #include >=20 > +#include > + > #include "mac_veriexec.h" > #include "mac_veriexec_internal.h" >=20 > @@ -292,7 +295,8 @@ mac_veriexec_fingerprint_check_image(struct = image_params *imgp, >=20 > case FINGERPRINT_INDIRECT: /* fingerprint ok but need to check > for direct execution */ > - if (!imgp->interpreted) { > + if (!imgp->interpreted && > + mac_priv_grant(td->td_ucred, PRIV_VERIEXEC_DIRECT) = !=3D 0) { > identify_error(imgp, td, "attempted direct = execution"); > if (prison0.pr_securelevel > 1 || > = mac_veriexec_in_state(VERIEXEC_STATE_ENFORCE)) > @@ -326,6 +330,23 @@ mac_veriexec_fingerprint_check_image(struct = image_params *imgp, > identify_error(imgp, td, "invalid status field for = vnode"); > error =3D EPERM; > } > + switch (status) { > + case FINGERPRINT_NODEV: > + case FINGERPRINT_NOENTRY: > + /* > + * Check if this process has override allowed. > + * This will only be true if PRIV_VERIEXEC_DIRECT > + * already succeeded. > + */ > + if (error =3D=3D EAUTH && > + mac_priv_grant(td->td_ucred, PRIV_VERIEXEC_NOVERIFY) = =3D=3D 0) { > + error =3D 0; > + } > + break; > + default: > + break; > + } > + > return error;=20 > } >=20 > diff --git a/sys/sys/priv.h b/sys/sys/priv.h > index cb4dcecea4aa..6574d8c42599 100644 > --- a/sys/sys/priv.h > +++ b/sys/sys/priv.h > @@ -520,10 +520,16 @@ > */ > #define PRIV_KDB_SET_BACKEND 690 /* Allow setting KDB = backend. */ >=20 > +/* > + * veriexec override privileges - very rare! > + */ > +#define PRIV_VERIEXEC_DIRECT 700 /* Can override = 'indirect' */ > +#define PRIV_VERIEXEC_NOVERIFY 701 /* Can override O_VERIFY = */ > + > /* > * Track end of privilege list. > */ > -#define _PRIV_HIGHEST 691 > +#define _PRIV_HIGHEST 702 >=20 > /* > * Validate that a named privilege is known by the privilege system. = Invalid From nobody Mon Apr 17 00:25: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 4Q07BN4ty6z44xV7; Mon, 17 Apr 2023 00:25: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 4Q07BN3b5Kz4QdP; Mon, 17 Apr 2023 00:25:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681691148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fh6mZTb4mokGHcBDd8T5P841MLCk9ylFVtRSlkwkuCA=; b=mP1KLKtzbFMwl18TuenIzgLr5c1BK7n0N5IDD5tBWk7gw67ubWXCyTabFl1+VBe4R00p+k nKxH77ogd2lAVeHW/nSRclijuklKcnhTQsAqFsdgvvBHJg1fBlVaxW1SVUmuPwhnw+OE1w kXaDzy/nOKU2SpLpwDn7H6dgMsCpVDecy86DUOQCZGg/ttkZsFVcSFREtCs/jbVDAhjJ7W /fT0V5hMVbf9ZjWy0S/UuPAWWW2/AX6SNOyqXPjOaPuWMXEvcK8l9gT50b+/i8OEdu7ivg fk2kMO/mLKicvayePvf/X5fStHQftqiUkLcQWm8n/7gTG+K3YF2RNXo+vnpLTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681691148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fh6mZTb4mokGHcBDd8T5P841MLCk9ylFVtRSlkwkuCA=; b=C0TUlJ6as7T6IljmQ4NBCPHNjWGnHHtQi39ss9a+hrtUrkWbdWSWYDmbCB5HJzRSdXaPRO 3tY/Cicvw2EeZR27MOv4gesVe1zthwmWjboINmqEGmLOLClKcSOVETGlqLknTDOdb816MR r8SV2Gxpq3xRr8hFgBBbxHqSJ17QGB2yLRbtWuh7kYLSDQK7EFe4OvL3Gcz0mgHJE0lEUw toz61I+BIUvrqbTTazan68j8HlH6+KcI/3FzAvTY9XifLWDPpzDsfq16Ju47dN9MlI/UQZ 4naVav048L0W1oAAY/t8KKvfjUvBtpU9K+3cTxU0oZKQHRGRcVcgZsktJYfxwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681691148; a=rsa-sha256; cv=none; b=OUUinn2AyREyPnkVbN1P1HJMsUCbyXKQt8xopCg87dM8euR43hxt790ChthRiR9EzpNUaA Uoxa1lFBG2UuLJgRewbE6VQVgMxmXG78ObkGgaPZPnx3Jr+chQhtz7lVAlabcrDcVCo4SD 7Bf0v1b5K1SL6o5VK0INUIUAHZ2+PJCakcEZwIG9+ti32ZBqUNTCaAd49NjMCOMzOQnfUD qoWusEwaO1nJJOjO4Sp1jt/zyBzhUcay5MovTrgzOhmZUTF7jowDz0U+JwkcC3tzpQh4dh 2eiB5ifvXm/cf7j2vkC8W68T5v25Gal5ATzFPKnEhZ7Wh7G/kWEUcHwszlHavQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q07BN2hGZz17Yb; Mon, 17 Apr 2023 00:25: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 33H0PmDU054486; Mon, 17 Apr 2023 00:25:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H0Pmg1054485; Mon, 17 Apr 2023 00:25:48 GMT (envelope-from git) Date: Mon, 17 Apr 2023 00:25:48 GMT Message-Id: <202304170025.33H0Pmg1054485@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 2e6a433811fb - main - veriexec: allow sha512 fingerprint in manifest parser List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e6a433811fb09e644d8105d4654bcce27f84905 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=2e6a433811fb09e644d8105d4654bcce27f84905 commit 2e6a433811fb09e644d8105d4654bcce27f84905 Author: Stephen J. Kiernan AuthorDate: 2023-04-16 23:25:27 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-16 23:25:27 +0000 veriexec: allow sha512 fingerprint in manifest parser MAC/veriexec already supports SHA512 fingerprints, therefore the veriexec program should also. Reviewed by: sjg --- sbin/veriexec/manifest_parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/veriexec/manifest_parser.y b/sbin/veriexec/manifest_parser.y index 5889650f824b..5e024d97f0dc 100644 --- a/sbin/veriexec/manifest_parser.y +++ b/sbin/veriexec/manifest_parser.y @@ -56,6 +56,7 @@ static struct verified_exec_params *params = &oparams; # define SHA_DIGEST_LENGTH br_sha1_SIZE # define SHA256_DIGEST_LENGTH br_sha256_SIZE # define SHA384_DIGEST_LENGTH br_sha384_SIZE +# define SHA512_DIGEST_LENGTH br_sha512_SIZE #endif static int fmode; @@ -72,9 +73,8 @@ struct fingerprint_type { static const struct fingerprint_type fingerprint_table[] = { { "sha1", SHA_DIGEST_LENGTH }, { "sha256", SHA256_DIGEST_LENGTH }, -#if MAXFINGERPRINTLEN > 32 { "sha384", SHA384_DIGEST_LENGTH }, -#endif + { "sha512", SHA512_DIGEST_LENGTH }, { NULL, 0 } }; From nobody Mon Apr 17 00:25: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 4Q07BQ0dm8z44xN4; Mon, 17 Apr 2023 00:25: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 4Q07BP4WDlz4Qv5; Mon, 17 Apr 2023 00:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681691149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LI03ZEFjy56V2pSBVaDEWDKxsGIX/r+rb9jUVXuIElg=; b=XWBPZu1b0SMLckBwuJonWG6yFWMzKgvAvH2/x/IfyKrzuDRcVVj4OdixhgzHv82nPsfbjk zCADx+sQG/k3GJGwZpARerwIi+XxQRYnAEjMgb51EgiFFcBXZilTKWroxKUJZvF2jHEfx8 KaIui5NmKDXSa/0B0Jm2cjhmEEgVECsDggileti8pveIjoGeRdHbDlT9UbcCtXMRa6L4o+ 8Cus8jNO46B+u3hWAbxaBi5rfRHGozbqNHSrISTdxp3j1WXKIaO+TTS1UDLn5F4GaFZoMi TV7spdVcsWCMaa6uzeweo7G14utTtPhu+uiCuG248vPSLhmvytSGGPlRIyS10w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681691149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LI03ZEFjy56V2pSBVaDEWDKxsGIX/r+rb9jUVXuIElg=; b=vVSKIlTr8EftN/H62H29l2Eq3iwj/18aupWXvbrmCreqzxUr3NX8oMmW7/9xwOPU8vu1KB Xi5p30yaReEmYl+rLtsuv1fKxXD5xNFAccKlDjtZ6EwwQ94SwMCaxY0qepZqrh473lnMPq OAP7bJ6Dt+V+E82HWMXydInkT48sx1u+/iow+v6GH31kNEdvBxdUUirl0cWl5ZV6smOMxW iUEWm7rSxrEO/GeXMuxq0Uy74mv9bR2pbKNCaIP3LY1GgaG+9kQjYqwir0+Ao8eINZlWou V/3hvfAcwU10ld1FJZgs8OgZKybhXgIZcmfzRoDwFQtNJvU5BgIru7iodE2OHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681691149; a=rsa-sha256; cv=none; b=H09WqsekfgMgFmRIL0uozzg5GIzCZMJ5KbaXNRZfukMXnnLPhpmAuXgExtjrJRr7fs08Rp ZTYmZiyf5H4qPZsIpf2DHozbRq7tZAvwOZ+/OGIeSvf2yOcQ/x3ffVkpaMmhhWEbrIcPcw QEVdiExhkYlXmTllkExAJEpajSHdFStXd4Fxr90oY3jRfSO7lUMmqaAzs11PPFYZiWiTFh 75gRn0/R8IwZ0Ds0HgtaWpABrODAH5a58AxZxFyaCAhGxw3ZWKns9DDRks4KiUwNPRGt4b kRdDvdmJrXQVi+AbahUsz8v7TC7YXE3RQv37KNuVD1V3opaEhJ4wEx79LLNNew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q07BP3bSKz17QQ; Mon, 17 Apr 2023 00:25: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 33H0PnGP054505; Mon, 17 Apr 2023 00:25:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H0PnOg054504; Mon, 17 Apr 2023 00:25:49 GMT (envelope-from git) Date: Mon, 17 Apr 2023 00:25:49 GMT Message-Id: <202304170025.33H0PnOg054504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 894bcc876da9 - main - sys/modules/Makefile: conditionally add MAC/veriexec modules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 894bcc876da9390a02789dba31ab5ec5ec90bc33 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=894bcc876da9390a02789dba31ab5ec5ec90bc33 commit 894bcc876da9390a02789dba31ab5ec5ec90bc33 Author: Stephen J. Kiernan AuthorDate: 2023-04-16 23:36:07 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 00:24:54 +0000 sys/modules/Makefile: conditionally add MAC/veriexec modules Only build MAC/veriexec modules when MK_VERIEXEC is yes or we are building all modules. Add VERIEXEC knob to kernel __DEFAULT_NO_OPTIONS Reviewed by: sjg Obtained from: Juniper Networks, Inc. --- sys/conf/kern.opts.mk | 3 ++- sys/modules/Makefile | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 35ce97fae633..53992a31d07c 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -62,7 +62,8 @@ __DEFAULT_NO_OPTIONS = \ INIT_ALL_ZERO \ KERNEL_RETPOLINE \ RATELIMIT \ - REPRODUCIBLE_BUILD + REPRODUCIBLE_BUILD \ + VERIEXEC # Some options are totally broken on some architectures. We disable # them. If you need to enable them on an experimental basis, you diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 71e0be4cce2c..df47f5bf4652 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -588,12 +588,14 @@ _mac_priority= mac_priority _mac_seeotheruids= mac_seeotheruids _mac_stub= mac_stub _mac_test= mac_test +.if ${MK_VERIEXEC} != "no" || defined(ALL_MODULES) _mac_veriexec= mac_veriexec _mac_veriexec_sha1= mac_veriexec_sha1 _mac_veriexec_sha256= mac_veriexec_sha256 _mac_veriexec_sha384= mac_veriexec_sha384 _mac_veriexec_sha512= mac_veriexec_sha512 .endif +.endif .if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES) _netgraph= netgraph From nobody Mon Apr 17 01: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 4Q083c61n0z450Jh; Mon, 17 Apr 2023 01: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 4Q083c5chxz4Ft2; Mon, 17 Apr 2023 01: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=1681693500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HFipGSDAVxPMkkMt6uOivpEIjsbrRFoMDozqne/wrc=; b=g+0V+DiHK+eFQdfi/vaMGjUSmh0j3Tog1eJMDBxLS5vms9qGmhaHObPrcXa1aerLa5tdD0 A5/SlR5BoUrTVZiFBjrHIuZnOdJddGb4XdzYUyJc75+9HBuS0sRx5HgwcjgTF8wKe/b7MW v73SyG2mjfjbOCT+/Sh4QfdjruyB8I+DW6h3/hXtM7aZ3zSR4MTS8SB2nVvP5SihUGlGy/ C8eHImdHthilFbO7bqI43n4ChMKz5OQBPxXavdGyYPTII51qaWhakWn/lPxiHThLCqB3RW LB8rNgbYNkVrMGGD0Axoz86IL5FLgfhLYHzbp0yjmxo8GLmUQLCrUxmhDQ7PXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681693500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6HFipGSDAVxPMkkMt6uOivpEIjsbrRFoMDozqne/wrc=; b=wLPODpVrI3bopKtKivLWv4hMPrVUB7GZ1w2lsp3nP3T4HeF7tqfUXMH49Lh9OjDfftdEOo Fb6thFVJAdjBMw1pNwqcggUMNN9XDSPS8ExT8g1Wl/2qsEZHjvo2V+YJxPnhSTJf0wV2Yg 5ijjSIuBCJn0Ub0uRkLUkIQv0rIQxa86MDFbYa699QYpgn8iNkEO2uIn2OwpB1i2u2GIDO fqjqXcick42nLfmNQ5T1WGpRxRWIFB7enkHwSkme8+rL2SINegO2GuLyDzM3S6jeL4Krkl ZQkXwREnhyBnBz4j+Ok/l5ou8FfAYDx3aU7T18MFDQhGuwMbdN0N5Ik8RpARRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681693500; a=rsa-sha256; cv=none; b=lceWMId+PqVWgbwfmG5cN4aiDOxJFtFZv1Hx815DsefIFTN8vQO8BRCksgmUI1N7/fJZV2 /wxAfbqzFXH7ehGA5fFLBCTxlIJeH5frgRfF9vlRi6IbI9edgIR+XtloOv3zeesRA6OISH 9AsKenFGb9VOGVknuhkXRh/TNFncylfjw/WpCG+0vBlZgKNRgqOJeffOAMX4mze5HeGBuh A7JhJ1Ps5SB/kaNRUqmN0ttTN92I9w0kqQpyiT8LDe21aOGpPTXMxDnQVPA/hi8S7vphtk QFy0GIjHoGzwB2FoQ0xIOVfc/azYbmGNsPotyg3GW8kM3BATGjqbCN+kBr/qRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q083c4gsxz18Pr; Mon, 17 Apr 2023 01: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 33H150Kc020429; Mon, 17 Apr 2023 01: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 33H150a7020428; Mon, 17 Apr 2023 01:05:00 GMT (envelope-from git) Date: Mon, 17 Apr 2023 01:05:00 GMT Message-Id: <202304170105.33H150a7020428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 1c7ac0c23bc1 - main - veriexec: fix use of getopt List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c7ac0c23bc12cc7cd5776fa28ebe0582e1bccec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=1c7ac0c23bc12cc7cd5776fa28ebe0582e1bccec commit 1c7ac0c23bc12cc7cd5776fa28ebe0582e1bccec Author: Stephen J. Kiernan AuthorDate: 2023-04-17 00:59:37 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 01:02:04 +0000 veriexec: fix use of getopt getopt(3) returns int type not char. Using char triggers the -Wtautological-constant-out-of-range-compare warning with clang. Change the type of the variable used for holding the return value of getopt(3) to int to match the prototype and eliminate the warning. MFC after: 1 week --- sbin/veriexec/veriexec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/veriexec/veriexec.c b/sbin/veriexec/veriexec.c index 407100ab48f1..815aaae5e81b 100644 --- a/sbin/veriexec/veriexec.c +++ b/sbin/veriexec/veriexec.c @@ -140,8 +140,7 @@ main(int argc, char *argv[]) { long long converted_int; uint32_t state; - char c; - int x; + int c, x; if (argc < 2) return (veriexec_usage()); From nobody Mon Apr 17 01:17: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 4Q08L72klGz451PP; Mon, 17 Apr 2023 01: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 4Q08L65wP4z3Lj4; Mon, 17 Apr 2023 01:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681694254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vYNIR/0kkPIvjo1p9eYqPLAoXSlnOTdiAwyLKM4/ht0=; b=tnnogBLf0eoVsh+7vrr4HQJ5u4GcvGuCLkSz4KhiRSUcsVxQNC0EpJCAeU+Mvu5D2/hroh ujehpFkn1ZmI80oFJ55rlWPVkuqBsNk5ewrlyYdJhN/6gGK0cH5+KQ14TTqr2vLBY9LEVI lwZF+AmggyfKNCFYOJwax23RFk+gvrdqK+cq+CImg/s7/Js2+FaTl/7ixI28IezUqaWLy5 0FvDvNGwaXRHU+OReYswvaF6onF56KcwXqOWVVjY678FthqfQ3Pc/h13I8elVJ4h4wCOPy Oglh5jANJ3YGOr5MDzn96QNYE+sGghCkoPogLhFAbt6AjhwOgo0UTFa+ScW9Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681694254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vYNIR/0kkPIvjo1p9eYqPLAoXSlnOTdiAwyLKM4/ht0=; b=ZrptfqhTjFO3HMbNpzA9fWrWm47Mz0pXnSg2CSEve7yrzog2Ahs8PFSyPfdS2yfb24a+5T Py/RLeECUHbywC4MLdr7ipGji+I746fprn8JkwhfhxR9CmNPezzZ9FTobOn7J/K/jKbNvI OKHoNTb8w6zJ9qk4//R64dpN1ScQB258FVXl1+F7s+mM9HvKp/FTk7WtB2rX6egJRF2Cov tO+Zp9jRl/CNgarxj7MiRlDy/DKlYoi32e6gVTXA4YVr6RdR94PYnWty7YeoJimAJuRPsS RHe68WwdD3iciYZaXD/Uh/TPMTHqglk9YlIVdzxaK0RcQ/0GEhDpbhzflppMsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681694254; a=rsa-sha256; cv=none; b=ZEwkgMRfOzjIiBRBX+AwwccruvVMbTuOV71k7b6IV+roqccpiLVrGgChWM+sBCCjBo9eRK RzuGayoRdCLB9eoggF//XfQUSibAFS/TXcbBv1mKfFnxUbbfvT+JxRiX6cJS7685t9H6pW UTFDi5cXzw1Hqt34/if/w+unWdUu+Nasuzhi9Ibi4CBG6B9lJoU/QU7IjOZzH2P0fWI3Yj 0Hi7Kj/HFZT6TwF7vDmsUQnE/OUrFfD7obHb+HJuJYegzisNZDc0SJDzY47mnj5hv4Oipm TIYD/vVeBatxCCkSTceIvlv4RZqnKDW9sn0zWq6UHtivCO7r1AgC5dRCDeqQ7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q08L64zyqz18gy; Mon, 17 Apr 2023 01:17: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 33H1HY9m037215; Mon, 17 Apr 2023 01:17:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H1HY3N037214; Mon, 17 Apr 2023 01:17:34 GMT (envelope-from git) Date: Mon, 17 Apr 2023 01:17:34 GMT Message-Id: <202304170117.33H1HY3N037214@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: a3d015bbf1ed - main - Update dirdeps.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a3d015bbf1eda630e5a5516f757627cdc23cd203 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d015bbf1eda630e5a5516f757627cdc23cd203 commit a3d015bbf1eda630e5a5516f757627cdc23cd203 Author: Simon J. Gerraty AuthorDate: 2023-04-17 01:17:26 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-17 01:17:26 +0000 Update dirdeps.mk Fix handling of local.dirdeps-missing.mk we need to reset DEP_RELDIR and DIRDEPS just as if including a Makefile.depend* Also fix a typo in DIRDEP_LOADAVG_REPORT and improve debug output. Reviewed by: stevek --- share/mk/dirdeps.mk | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk index ee31e47c76c5..b213ddc28fb7 100644 --- a/share/mk/dirdeps.mk +++ b/share/mk/dirdeps.mk @@ -1,6 +1,8 @@ -# $Id: dirdeps.mk,v 1.151 2022/01/28 01:13:14 sjg Exp $ +# $Id: dirdeps.mk,v 1.155 2023/04/15 05:46:19 sjg Exp $ -# Copyright (c) 2010-2022, Simon J. Gerraty +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2010-2023, Simon J. Gerraty # Copyright (c) 2010-2018, Juniper Networks, Inc. # All rights reserved. # @@ -179,7 +181,7 @@ _DIRDEP_USE_LEVEL?= 0 _CURDIR ?= ${.CURDIR} _OBJDIR ?= ${.OBJDIR} -.if ${MAKEFILE:T} == ${.PARSEFILE} && empty(DIRDEPS) && ${.TARGETS:Uall:M*/*} != "" +.if ${MAKEFILE:T} == ${.PARSEFILE} && empty(DIRDEPS) && ${.TARGETS:Uall:M*[/.]*} != "" # This little trick let's us do # # mk -f dirdeps.mk some/dir.${TARGET_SPEC} @@ -401,7 +403,7 @@ DIRDEP_LOADAVG_LAST = 0 # Note: expr(1) will exit 1 if the expression evaluates to 0 # hence the || true DIRDEP_LOADAVG_REPORT = \ - test -z "${"${expr ${now_utc} - ${DIRDEP_LOADAVG_INTEVAL:U60} - ${DIRDEP_LOADAVG_LAST} || true:L:sh:N-*}":?yes${DIRDEP_LOADAVG_LAST::=${now_utc}}:}" || \ + test -z "${"${expr ${now_utc} - ${DIRDEP_LOADAVG_INTERVAL:U60} - ${DIRDEP_LOADAVG_LAST} || true:L:sh:N-*}":?yes${DIRDEP_LOADAVG_LAST::=${now_utc}}:}" || \ echo "${TRACER}`${DIRDEP_LOADAVG_CMD}`" # we suppress SUBDIR when visiting the leaves @@ -577,7 +579,7 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP ${"${DEBUG_DIRDEPS:Nno}":?DEBUG_DIRDEPS='${DEBUG_DIRDEPS}':} \ ${.MAKEFLAGS:tW:S,-D ,-D,g:tw:M*WITH*} \ ${.MAKEFLAGS:tW:S,-d ,-d,g:tw:M-d*} \ - 3>&1 1>&2 | sed 's,${SRCTOP},_{SRCTOP},g;s,_{,$${,g' >> ${.TARGET}.new && \ + 3>&1 1>&2 | sed 's,${SRCTOP},_{SRCTOP},g;s,_{SRCTOP}/_{SRCTOP},_{SRCTOP},g;s,_{,$${,g' >> ${.TARGET}.new && \ mv ${.TARGET}.new ${.TARGET} .endif @@ -788,8 +790,9 @@ ${_this_dir}.$m: ${_build_dirs:M*.$m:N${_this_dir}.$m} .if !target(_dirdeps_checked.$d) # once only _dirdeps_checked.$d: +_dr := ${d:S,^${SRCTOP}/,,} .if ${_debug_search} -.info checking ${d:S,^${SRCTOP}/,,} +.info checking ${_dr} .endif # Note: _build_all_dirs is fully qualifed so d:R is always the directory .if exists(${d:R}) @@ -822,10 +825,16 @@ DEP_RELDIR := ${_m:H:S,^${SRCTOP}/,,} # and reset this DIRDEPS = .if ${_debug_reldir} && ${_qm} != ${_m} -.info loading ${_m} for ${d:E} +.info loading ${_m:S,${SRCTOP}/,,} for ${_dr} .endif .include <${_m}> .else +# set these as if we found Makefile.depend* +DEP_RELDIR := ${_dr:R} +DIRDEPS = +.if ${_debug_reldir} +.info loading local.dirdeps-missing.mk for ${_dr} +.endif .-include .endif .endif From nobody Mon Apr 17 01:23: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 4Q08Sb0L8Jz451lv; Mon, 17 Apr 2023 01:23: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 4Q08SZ1hsdz3lfG; Mon, 17 Apr 2023 01:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681694590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gR4JbnhMyzx6ThSeusiyjxXvnm5IGelC6kGUBRRDvT8=; b=J++jVD4MZ26yCEnCi7qQV5PmMU+64d91FZuPPqGcSnXy+J6V3HxXSXgmgWUO9Bx63+aG72 1Zy0MoxtFTNQBFD/R4yRYfgQcKzfBtPALdQisJ7qwPs+Mk9t4jR79zhCg/YavlRCSklGF0 6Wy79n8ISatWx738BiG6b39E8rbHTGaPZjz18fUn+AIE/IKeETsSmHZsD/58Tj3pUnFuRb 3I6Uzg7Ieb7YUbGnyfIldWzY0F4Ca0v2mzWGyA6nDso2MuLZkLFxvOT8U/XQd/gNp1Kh7G 3DsYB98kQn5FkEBc/URH1SiF6mehlOsf9uS+rArNFIXTSPdiAvQtbahA4DaTlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681694590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gR4JbnhMyzx6ThSeusiyjxXvnm5IGelC6kGUBRRDvT8=; b=bhEhaQH2K7Sur2zVFjMYHD8hJcEsANRpBmGiasP+AkypZkhUKaj1HRdg0kqxgabO/xe9o/ ixlodoQ6siPVxJvkyvjllbY//lBCf/TL/D8OHQYXtC5rqM5BPg+u84UbJALj/Q2uh3D0fI BPC6kLG+pMR/9mHoFMFus1NcLGGBKH9oC2SF90LhIGSZPDeg86CoKe/wAlHdaSkpc0+7zk P8SWVlXTcPVkMSwBCLp1IOEL5y0S/DopKAaRTeSmVhiD0FmW+vwRDw/pQyDD+2mDWg/JXk NJlP8znBbtxkj15V2oGYtyB1tu8D/iWqhF8IA4Q6RQ5X1KiXiX6QozX7X6J67Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681694590; a=rsa-sha256; cv=none; b=Y8EL+JJ2PkB6byVRwF7v5eG5J6X9OHPxIG44he9vlhWJfH64Avkr+PCbjQGJRV3Bni3Fnd oPIz62XvjGgh1SXx7SFZu25m3gteOhGnS0EUd7Nau2MP1DB+t4sstsv0CTb1Y4eYU3egCZ rXvRDRsoII0Sk1TsceDPhYXfx7XWwaGE9nwEHSOHuP7tnpeePLF2hInlGAqAjXuVScJWqq dq7h02AAO5TY+1QGxyP2+QdLEcR8m3lpQxUg47D5QDv/UMtyjL10VaEsOjI3CGIGahZG/0 oKr31QlJkEKSLzRZncIBHgyY+KaPfzVlRYLAobmG4ng2nwop5wE+WWdC3soVHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q08SZ0lCsz18w9; Mon, 17 Apr 2023 01:23: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 33H1NAcD052949; Mon, 17 Apr 2023 01:23:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H1NAN7052948; Mon, 17 Apr 2023 01:23:10 GMT (envelope-from git) Date: Mon, 17 Apr 2023 01:23:10 GMT Message-Id: <202304170123.33H1NAN7052948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 88a3358ea417 - main - veriexec: Add SPDX-License-Identifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88a3358ea417802f523bf54d65441685fcd33246 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=88a3358ea417802f523bf54d65441685fcd33246 commit 88a3358ea417802f523bf54d65441685fcd33246 Author: Stephen J. Kiernan AuthorDate: 2023-04-17 01:21:21 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 01:23:00 +0000 veriexec: Add SPDX-License-Identifier --- lib/libveriexec/libveriexec.h | 4 ++-- lib/libveriexec/veriexec_check.c | 4 ++-- sbin/veriexec/veriexec.c | 2 ++ sbin/veriexec/veriexec.h | 2 ++ sys/security/mac_veriexec/mac_veriexec.c | 4 ++-- sys/security/mac_veriexec/mac_veriexec.h | 4 ++-- sys/security/mac_veriexec/mac_veriexec_internal.h | 4 ++-- sys/security/mac_veriexec/mac_veriexec_sha1.c | 4 ++-- sys/security/mac_veriexec/mac_veriexec_sha256.c | 4 ++-- sys/security/mac_veriexec/mac_veriexec_sha384.c | 4 ++-- sys/security/mac_veriexec/mac_veriexec_sha512.c | 4 ++-- sys/security/mac_veriexec/veriexec_fingerprint.c | 4 ++-- sys/security/mac_veriexec/veriexec_metadata.c | 4 ++-- 13 files changed, 26 insertions(+), 22 deletions(-) diff --git a/lib/libveriexec/libveriexec.h b/lib/libveriexec/libveriexec.h index 9bfc3f7fd841..42d2c964a174 100644 --- a/lib/libveriexec/libveriexec.h +++ b/lib/libveriexec/libveriexec.h @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, Juniper Networks, Inc. * All rights reserved. diff --git a/lib/libveriexec/veriexec_check.c b/lib/libveriexec/veriexec_check.c index 60fd02cbe872..98fec427987d 100644 --- a/lib/libveriexec/veriexec_check.c +++ b/lib/libveriexec/veriexec_check.c @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, Juniper Networks, Inc. * All rights reserved. diff --git a/sbin/veriexec/veriexec.c b/sbin/veriexec/veriexec.c index 815aaae5e81b..e30aabe55faf 100644 --- a/sbin/veriexec/veriexec.c +++ b/sbin/veriexec/veriexec.c @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2018, Juniper Networks, Inc. * * Redistribution and use in source and binary forms, with or without diff --git a/sbin/veriexec/veriexec.h b/sbin/veriexec/veriexec.h index b06025f47e90..293dfc7214d7 100644 --- a/sbin/veriexec/veriexec.h +++ b/sbin/veriexec/veriexec.h @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2018, Juniper Networks, Inc. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index b20df7d694ef..52202f87f666 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, 2019 Juniper Networks, Inc. * All rights reserved. diff --git a/sys/security/mac_veriexec/mac_veriexec.h b/sys/security/mac_veriexec/mac_veriexec.h index e3d4edff1a8b..db5a13bbd06c 100644 --- a/sys/security/mac_veriexec/mac_veriexec.h +++ b/sys/security/mac_veriexec/mac_veriexec.h @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, 2019, Juniper Networks, Inc. * All rights reserved. diff --git a/sys/security/mac_veriexec/mac_veriexec_internal.h b/sys/security/mac_veriexec/mac_veriexec_internal.h index 8af9639004cb..6fc963a12393 100644 --- a/sys/security/mac_veriexec/mac_veriexec_internal.h +++ b/sys/security/mac_veriexec/mac_veriexec_internal.h @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, 2019, Juniper Networks, Inc. * All rights reserved. diff --git a/sys/security/mac_veriexec/mac_veriexec_sha1.c b/sys/security/mac_veriexec/mac_veriexec_sha1.c index a4e7484b7b70..a21ecf74c557 100644 --- a/sys/security/mac_veriexec/mac_veriexec_sha1.c +++ b/sys/security/mac_veriexec/mac_veriexec_sha1.c @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, Juniper Networks, Inc. * All rights reserved. diff --git a/sys/security/mac_veriexec/mac_veriexec_sha256.c b/sys/security/mac_veriexec/mac_veriexec_sha256.c index 730c39f91915..f4bc9d471215 100644 --- a/sys/security/mac_veriexec/mac_veriexec_sha256.c +++ b/sys/security/mac_veriexec/mac_veriexec_sha256.c @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, Juniper Networks, Inc. * All rights reserved. diff --git a/sys/security/mac_veriexec/mac_veriexec_sha384.c b/sys/security/mac_veriexec/mac_veriexec_sha384.c index 7456348e3693..c77f0dd67678 100644 --- a/sys/security/mac_veriexec/mac_veriexec_sha384.c +++ b/sys/security/mac_veriexec/mac_veriexec_sha384.c @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, Juniper Networks, Inc. * All rights reserved. diff --git a/sys/security/mac_veriexec/mac_veriexec_sha512.c b/sys/security/mac_veriexec/mac_veriexec_sha512.c index 2e30b1234fbf..ffa783d3d38a 100644 --- a/sys/security/mac_veriexec/mac_veriexec_sha512.c +++ b/sys/security/mac_veriexec/mac_veriexec_sha512.c @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, Juniper Networks, Inc. * All rights reserved. diff --git a/sys/security/mac_veriexec/veriexec_fingerprint.c b/sys/security/mac_veriexec/veriexec_fingerprint.c index 500842cbd5ab..d3e7a989782a 100644 --- a/sys/security/mac_veriexec/veriexec_fingerprint.c +++ b/sys/security/mac_veriexec/veriexec_fingerprint.c @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, Juniper Networks, Inc. * All rights reserved. diff --git a/sys/security/mac_veriexec/veriexec_metadata.c b/sys/security/mac_veriexec/veriexec_metadata.c index 91232747c19d..b5bfe70410d1 100644 --- a/sys/security/mac_veriexec/veriexec_metadata.c +++ b/sys/security/mac_veriexec/veriexec_metadata.c @@ -1,5 +1,5 @@ -/* - * $FreeBSD$ +/*- + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012, 2013, 2015, 2016, 2019, Juniper Networks, Inc. * All rights reserved. From nobody Mon Apr 17 01:40: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 4Q08s769Kgz452b2; Mon, 17 Apr 2023 01:40: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 4Q08s754yNz4JcX; Mon, 17 Apr 2023 01:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681695659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XzapMNNvM7jtzMLwA0StARII/aVtQlTLJX+Thu7BrWo=; b=ow9iCqjFIABrtQ+RAWOrXp8XaAQopu3pyJOFtIM/oXFbdHHHfgF7cVlUOB+RmQjPTMgaGu l4GvOWSytuUuYwFaXz7Gqa1hSsVAeOitAJLs+EqsPylgX+9sdOfQK4eeaxnI0tMOacZPjU IowVdQ5/XO6X2QP2Y6rriSJRqdOYMDBOjy61O5Mj5571Fm3tAvbj8r1B7oSwhTRFZEpWBT fvZ+pKcOOeg2MTIX/+mP7ZjiC2vntdf+K4it7aoQQZMu7UsvVuqnclhGRrXuTke8j63hGk bPL1hwdoila3y7yuikrcVI1prcgVaZmc5WT+Q2BQkNRIRDDuulOiF9dSxZ7Q9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681695659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XzapMNNvM7jtzMLwA0StARII/aVtQlTLJX+Thu7BrWo=; b=AKC+14Aa0WQ9xh5xzdeZ6Zt89SpUdxPTL0fKJsxJEjOO/dG0fS81jriBvpDPVRiVpm5uzR QyDYq6aDK1X7XwXV3HDlVW9j5FdJ3dqMqsRawIR36AobeIaIeFOB6mqwpN0tCQXJ2kAf1N ERjiHigUWlHu/19W8ZQXBJvXjSPUJ/l/Evl0cxQ4TRNK3IDdjy/vjrKWL09uVegSY6m66Y q2biZ8ArJvtNAyn/0zG8pb4p0lPMBGW5Ke6ZkfvLVeqay9K6d1S6bZ0yG0sIyuKzxlQ+3B GB6XeDXvHp47VjbWF347PzbGtQk0iwA7qR4vKb4KcBcTSV35Y3iVKyDZuMXELA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681695659; a=rsa-sha256; cv=none; b=NaPhZZCE0mHv7o2YHGQoUU1NGCO4bL/OYU0ELq0A75rnvP5sGJaZGukVBzIf3P5E92TPQC 15relkLulZR14zgu9a+un9i1/3vqux13JkdZsZSGpEwPDLCcNYgHspKowxNsPNLtJDSTKi jMJtjuwJOVkFTyrTor7sE141U3uzfpKhbsSm8gWyFx+owcng6LhVLUV4/hXUC8HdU53fMj 9P6z4QnSn46q30g3pNIQY1e0A9575erDJHeVi1njGRBrkKBkwquZl2OWkoDvEPmXWbT5XP o1fWPgKiCqcwDt0uVaqZzfiKRVENXTKkywZ02OIoAfB0bDtwf8e+DDr1W24+7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q08s749PSz19NB; Mon, 17 Apr 2023 01:40: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 33H1exdG078121; Mon, 17 Apr 2023 01:40:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H1exhm078120; Mon, 17 Apr 2023 01:40:59 GMT (envelope-from git) Date: Mon, 17 Apr 2023 01:40:59 GMT Message-Id: <202304170140.33H1exhm078120@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: bf7aa99a55a7 - main - Update meta mode makefiles List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: bf7aa99a55a7692da6e55864098fd085392542b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=bf7aa99a55a7692da6e55864098fd085392542b0 commit bf7aa99a55a7692da6e55864098fd085392542b0 Author: Simon J. Gerraty AuthorDate: 2023-04-17 01:40:53 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-17 01:40:53 +0000 Update meta mode makefiles meta2deps - add checks to detect truncated/corrupted filemon data (only known to happen on Linux hosts), to ensure we do not auto update dependencies based on incomplete data. meta.stage.mk adds STAGE_SHLIB_LINKS_FILTER and STAGE_LINK_AS_* We also allow for hosts where egrep is deprecated for grep -E Reviewed by: stevek --- share/mk/dirdeps-options.mk | 9 +++++++- share/mk/gendirdeps.mk | 8 ++++--- share/mk/meta.autodep.mk | 5 ++--- share/mk/meta.stage.mk | 21 ++++++++++-------- share/mk/meta2deps.py | 52 ++++++++++++++++++++++++++++++++++++++----- share/mk/meta2deps.sh | 54 ++++++++++++++++++++++++++++++++++++++------- 6 files changed, 119 insertions(+), 30 deletions(-) diff --git a/share/mk/dirdeps-options.mk b/share/mk/dirdeps-options.mk index b31d2033ae98..9a97615bbeb8 100644 --- a/share/mk/dirdeps-options.mk +++ b/share/mk/dirdeps-options.mk @@ -1,4 +1,4 @@ -# $Id: dirdeps-options.mk,v 1.20 2022/03/17 20:11:36 sjg Exp $ +# $Id: dirdeps-options.mk,v 1.21 2022/09/06 22:18:45 sjg Exp $ # # @(#) Copyright (c) 2018-2022, Simon J. Gerraty # @@ -42,6 +42,13 @@ # so we qualify MK_FOO with .${TARGET_SPEC} and each component # TARGET_SPEC_VAR (in reverse order) before using MK_FOO. # +# Because Makefile.depend.options are processed at both level 0 (when +# computing DIRDEPS to build) and higher (when updating +# Makefile.depend* after successful build), it is important that +# all references to TARGET_SPEC_VARs should use the syntax +# ${DEP_${TARGET_SPEC_VAR}:U${TARGET_SPEC_VAR}} to ensure correct +# behavior. +# # This should have been set by Makefile.depend.options # before including us diff --git a/share/mk/gendirdeps.mk b/share/mk/gendirdeps.mk index 6d26b3d308b1..1ff2036237ed 100644 --- a/share/mk/gendirdeps.mk +++ b/share/mk/gendirdeps.mk @@ -1,5 +1,4 @@ -# $FreeBSD$ -# $Id: gendirdeps.mk,v 1.46 2020/08/19 17:51:53 sjg Exp $ +# $Id: gendirdeps.mk,v 1.48 2022/09/09 17:44:29 sjg Exp $ # Copyright (c) 2011-2020, Simon J. Gerraty # Copyright (c) 2010-2018, Juniper Networks, Inc. @@ -89,7 +88,7 @@ META_FILES := ${META_FILES:T:O:u} # they should all be absolute paths SKIP_GENDIRDEPS ?= .if !empty(SKIP_GENDIRDEPS) -_skip_gendirdeps = egrep -v '^(${SKIP_GENDIRDEPS:O:u:ts|})' | +_skip_gendirdeps = ${EGREP:Uegrep} -v '^(${SKIP_GENDIRDEPS:O:u:ts|})' | .else _skip_gendirdeps = .endif @@ -340,6 +339,8 @@ CAT_DEPEND ?= .depend .PHONY: ${_DEPENDFILE} .endif +# set this to 'no' and we will not capture any +# local depends LOCAL_DEPENDS_GUARD ?= _{.MAKE.LEVEL} > 0 # 'cat .depend' should suffice, but if we are mixing build modes @@ -352,6 +353,7 @@ ${_DEPENDFILE}: .NOMETA ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m): echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ ${_include_src_dirdeps} \ echo '.include '; \ + [ "${LOCAL_DEPENDS_GUARD:[1]:tl}" != no ] || exit 0; \ echo; \ echo '.if ${LOCAL_DEPENDS_GUARD}'; \ echo '# local dependencies - needed for -jN in clean tree'; \ diff --git a/share/mk/meta.autodep.mk b/share/mk/meta.autodep.mk index 842554beea45..cd08ac3b3520 100644 --- a/share/mk/meta.autodep.mk +++ b/share/mk/meta.autodep.mk @@ -1,5 +1,4 @@ -# $FreeBSD$ -# $Id: meta.autodep.mk,v 1.55 2021/12/13 08:12:01 sjg Exp $ +# $Id: meta.autodep.mk,v 1.56 2022/09/09 17:44:29 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -175,7 +174,7 @@ DEPEND_SUFFIXES += .c .h .cpp .hpp .cxx .hxx .cc .hh .endif .depend: .NOMETA $${.MAKE.META.CREATED} ${_this} @echo "Updating $@: ${.OODATE:T:[1..8]}" - @egrep -i '^R .*\.(${DEPEND_SUFFIXES:tl:O:u:S,^.,,:ts|})$$' /dev/null ${.MAKE.META.FILES:T:O:u:${META_FILE_FILTER:ts:}:M*o.meta} | \ + @${EGREP:Uegrep} -i '^R .*\.(${DEPEND_SUFFIXES:tl:O:u:S,^.,,:ts|})$$' /dev/null ${.MAKE.META.FILES:T:O:u:${META_FILE_FILTER:ts:}:M*o.meta} | \ sed -e 's, \./, ,${OBJDIR_REFS:O:u:@d@;s, $d/, ,@};/\//d' \ -e 's,^\([^/][^/]*\).meta...[0-9]* ,\1: ,' | \ sort -u | \ diff --git a/share/mk/meta.stage.mk b/share/mk/meta.stage.mk index 9f54f3b1f9c5..168e46d22a82 100644 --- a/share/mk/meta.stage.mk +++ b/share/mk/meta.stage.mk @@ -1,5 +1,4 @@ -# $FreeBSD$ -# $Id: meta.stage.mk,v 1.60 2020/08/19 17:51:53 sjg Exp $ +# $Id: meta.stage.mk,v 1.67 2023/04/17 01:22:10 sjg Exp $ # # @(#) Copyright (c) 2011-2017, Simon J. Gerraty # @@ -31,8 +30,11 @@ _dirdep ?= ${RELDIR} CLEANFILES+= .dirdep # this allows us to trace dependencies back to their src dir -.dirdep: .NOPATH +.dirdep: .NOPATH +.if !commands(.dirdep) +.dirdep: @echo '${_dirdep}' > $@ +.endif .if defined(NO_POSIX_SHELL) || ${type printf:L:sh:Mbuiltin} == "" _stage_file_basename = `basename $$f` @@ -64,7 +66,7 @@ GENDIRDEPS_FILTER += Nnot-empty-is-important \ LN_CP_SCRIPT = LnCp() { \ rm -f $$2 2> /dev/null; \ { [ -z "$$mode" ] && ${LN:Uln} $$1 $$2 2> /dev/null; } || \ - cp -p $$1 $$2; } + cp -p $$1 $$2 2> /dev/null || cp $$1 $$2; } # a staging conflict should cause an error # a warning is handy when bootstapping different options. @@ -171,7 +173,7 @@ stage_libs: .dirdep .if !defined(NO_SHLIB_LINKS) .if !empty(SHLIB_LINKS) @${STAGE_LINKS_SCRIPT}; StageLinks -s ${STAGE_LIBDIR:${STAGE_DIR_FILTER}} \ - ${SHLIB_LINKS:@t@${STAGE_LIBS:T:M$t.*} $t@} + ${SHLIB_LINKS:@t@${STAGE_LIBS:T:M$t.*:${STAGE_SHLIB_LINKS_FILTER:U}} $t@} .elif !empty(SHLIB_LINK) && !empty(SHLIB_NAME) @${STAGE_LINKS_SCRIPT}; StageLinks -s ${STAGE_LIBDIR:${STAGE_DIR_FILTER}} ${SHLIB_NAME} ${SHLIB_LINK} .endif @@ -262,7 +264,8 @@ CLEANFILES += ${STAGE_AS_SETS:@s@stage*$s@} # sometimes things need to be renamed as they are staged # each ${file} will be staged as ${STAGE_AS_${file:T}} # one could achieve the same with SYMLINKS -# stage_as_and_symlink makes the original name a symlink to the new name +# stage_as_and_symlink makes the original name (or ${STAGE_LINK_AS_${name}}) +# a symlink to the new name # it is the same as using stage_as and stage_symlinks but ensures # both operations happen together .for s in ${STAGE_AS_SETS:O:u} @@ -292,7 +295,7 @@ STAGE_AS_AND_SYMLINK.$s ?= ${.ALLSRC:N.dirdep:Nstage_*} stage_as_and_symlink: stage_as_and_symlink.$s stage_as_and_symlink.$s: .dirdep @${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS_AND_SYMLINK.$s:O:@f@$f ${STAGE_AS_${f:tA}:U${STAGE_AS_${f:T}:U${f:T}}}@} - @${STAGE_LINKS_SCRIPT}; StageLinks -s ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS_AND_SYMLINK.$s:O:@f@${STAGE_AS_${f:tA}:U${STAGE_AS_${f:T}:U${f:T}}} $f@} + @${STAGE_LINKS_SCRIPT}; StageLinks -s ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS_AND_SYMLINK.$s:O:@f@${STAGE_AS_${f:tA}:U${STAGE_AS_${f:T}:U${f:T}}} ${STAGE_LINK_AS_${f}:U$f}@} @touch $@ .endif .endif @@ -304,7 +307,7 @@ CLEANFILES += ${STAGE_TARGETS} stage_incs stage_includes # this lot also only makes sense the first time... .if !target(__${.PARSEFILE}__) -__${.PARSEFILE}__: +__${.PARSEFILE}__: .NOTMAIN # stage_*links usually needs to follow any others. # for non-jobs mode the order here matters @@ -351,7 +354,7 @@ all: stale_staged # get a list of paths that we have previously staged to those same dirs # anything in the 2nd list but not the first is stale - remove it. stale_staged: staging .NOMETA - @egrep '^[WL] .*${STAGE_OBJTOP}' /dev/null ${.MAKE.META.FILES:M*stage_*} | \ + @${EGREP:Uegrep} '^[WL] .*${STAGE_OBJTOP}' /dev/null ${.MAKE.META.FILES:M*stage_*} | \ sed "/\.dirdep/d;s,.* '*\(${STAGE_OBJTOP}/[^ '][^ ']*\).*,\1," | \ sort > ${.TARGET}.staged1 @grep -l '${_dirdep}' /dev/null ${_STAGED_DIRS:M${STAGE_OBJTOP}*:O:u:@d@$d/*.dirdep@} | \ diff --git a/share/mk/meta2deps.py b/share/mk/meta2deps.py index 1bcf1baedaaa..d7820ec71b5b 100755 --- a/share/mk/meta2deps.py +++ b/share/mk/meta2deps.py @@ -37,8 +37,7 @@ We only pay attention to a subset of the information in the """ RCSid: - $FreeBSD$ - $Id: meta2deps.py,v 1.40 2021/12/13 19:32:46 sjg Exp $ + $Id: meta2deps.py,v 1.45 2023/01/18 01:35:24 sjg Exp $ Copyright (c) 2011-2020, Simon J. Gerraty Copyright (c) 2011-2017, Juniper Networks, Inc. @@ -67,7 +66,10 @@ RCSid: """ -import os, re, sys +import os +import re +import sys +import stat def resolve(path, cwd, last_dir=None, debug=0, debug_out=sys.stderr): """ @@ -245,6 +247,7 @@ class MetaFile: self.curdir = conf.get('CURDIR') self.reldir = conf.get('RELDIR') self.dpdeps = conf.get('DPDEPS') + self.pids = {} self.line = 0 if not self.conf: @@ -445,12 +448,13 @@ class MetaFile: pid_cwd = {} pid_last_dir = {} last_pid = 0 + eof_token = False self.line = 0 if self.curdir: self.seenit(self.curdir) # we ignore this - interesting = 'CEFLRV' + interesting = '#CEFLRVX' for line in f: self.line += 1 # ignore anything we don't care about @@ -477,6 +481,12 @@ class MetaFile: print("%s: CWD=%s" % (self.name, cwd), file=self.debug_out) continue + if w[0] == '#': + # check the file has not been truncated + if line.find('Bye') > 0: + eof_token = True + continue + pid = int(w[1]) if pid != last_pid: if last_pid: @@ -506,6 +516,13 @@ class MetaFile: print("cwd=", cwd, file=self.debug_out) continue + if w[0] == 'X': + try: + del self.pids[pid] + except KeyError: + pass + continue + if w[2] in self.seen: if self.debug > 2: print("seen:", w[2], file=self.debug_out) @@ -519,11 +536,34 @@ class MetaFile: continue elif w[0] in 'ERWS': path = w[2] - if path == '.': + if w[0] == 'E': + self.pids[pid] = path + elif path == '.': continue self.parse_path(path, cwd, w[0], w) - assert(version > 0) + if version == 0: + raise AssertionError('missing filemon data') + if not eof_token: + raise AssertionError('truncated filemon data') + + setid_pids = [] + # self.pids should be empty! + for pid,path in self.pids.items(): + try: + # no guarantee that path is still valid + if os.stat(path).st_mode & (stat.S_ISUID|stat.S_ISGID): + # we do not expect anything after Exec + setid_pids.append(pid) + continue + except: + # we do not care why the above fails, + # we do not want to miss the ERROR below. + pass + print("ERROR: missing eXit for {} pid {}".format(path, pid)) + for pid in setid_pids: + del self.pids[pid] + assert(len(self.pids) == 0) if not file: f.close() diff --git a/share/mk/meta2deps.sh b/share/mk/meta2deps.sh index 4767b83f4343..56367e0105f4 100755 --- a/share/mk/meta2deps.sh +++ b/share/mk/meta2deps.sh @@ -49,8 +49,10 @@ # The output, is a set of absolute paths with "SB" like: #.nf # +# $SB/obj-i386/bsd/gnu/lib/csu +# $SB/obj-i386/bsd/gnu/lib/libgcc # $SB/obj-i386/bsd/include -# $SB/obj-i386/bsd/lib/csu/i386 +# $SB/obj-i386/bsd/lib/csu/i386-elf # $SB/obj-i386/bsd/lib/libc # $SB/src/bsd/include # $SB/src/bsd/sys/i386/include @@ -75,8 +77,7 @@ # RCSid: -# $FreeBSD$ -# $Id: meta2deps.sh,v 1.14 2020/10/02 03:11:17 sjg Exp $ +# $Id: meta2deps.sh,v 1.20 2023/01/18 01:35:24 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -138,6 +139,13 @@ add_list() { eval "$name=\"$list\"" } +# some Linux systems have deprecated egrep in favor of grep -E +# but not everyone supports that +case "`echo bmake | egrep 'a|b' 2>&1`" in +bmake) ;; +*) egrep() { grep -E "$@"; } +esac + _excludes_f() { egrep -v "$EXCLUDES" } @@ -240,8 +248,8 @@ meta2deps() { ;; *) cat /dev/null "$@";; esac 2> /dev/null | - sed -e 's,^CWD,C C,;/^[CREFLMV] /!d' -e "s,',,g" | - $_excludes | ( version=no + sed -e 's,^CWD,C C,;/^[#CREFLMVX] /!d' -e "s,',,g" | + $_excludes | ( version=no epids= xpids= eof_token=no while read op pid path junk do : op=$op pid=$pid path=$path @@ -259,10 +267,15 @@ meta2deps() { *) ;; esac version=0 + case "$eof_token" in + no) ;; # ignore + 0) error "truncated filemon data";; + esac + eof_token=0 continue ;; $pid,$pid) ;; - *) + [1-9]*) case "$lpid" in "") ;; *) eval ldir_$lpid=$ldir;; @@ -272,8 +285,9 @@ meta2deps() { ;; esac + : op=$op path=$path case "$op,$path" in - V,*) version=$path; continue;; + V,*) version=$pid; continue;; W,*srcrel|*.dirdep) continue;; C,*) case "$path" in @@ -289,7 +303,18 @@ meta2deps() { eval cwd_$path=$cwd ldir_$path=$ldir continue ;; + \#,bye) eof_token=1; continue;; + \#*) continue;; *) dir=${path%/*} + case "$op" in + E) # setid apps get no tracing so we won't see eXit + case `'ls' -l $path 2> /dev/null | sed 's, .*,,'` in + *s*) ;; + *) epids="$epids $pid";; + esac + ;; + X) xpids="$xpids $pid"; continue;; + esac case "$path" in $src_re|$obj_re) ;; /*/stage/*) ;; @@ -379,9 +404,22 @@ meta2deps() { echo $dir;; esac done > $tf.dirdep + : version=$version case "$version" in 0) error "no filemon data";; - esac ) || exit 1 + esac + : eof_token=$eof_token + case "$eof_token" in + 0) error "truncated filemon data";; + esac + for p in $epids + do + : p=$p + case " $xpids " in + *" $p "*) ;; + *) error "missing eXit for pid $p";; + esac + done ) || exit 1 _nl=echo for f in $tf.dirdep $tf.qual $tf.srcdep do From nobody Mon Apr 17 04:50: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 4Q0F4K1rdxz45KVT; Mon, 17 Apr 2023 04:50:57 +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 4Q0F4J3cDsz4c9W; Mon, 17 Apr 2023 04:50:56 +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 33GMmwot030164; Sun, 16 Apr 2023 21:50:55 -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=SpCLAdJrB06014+qrlQFPp5AtpnLJJANXzuKmlfIAcY=; b=xpvbUyg7FCEcWIxHy3iVi+GcUM5IZ5vuK1+qHX620K4sslnGTq3FiGC0BSI/Ec1umoOq yI34yTEITIOVrUBF6DpSFlD43DR8Bunj+Leto4lR+mjwwWhznXLxswEo3QBiaq6IyRWl YEsERS6kg17arsoNTWzyjiwWnmu2DLRFhxHJvcu8qMjtDYtxH8CYT5VCZssGxNaaIpaB oofbWAs+o1eK7SQkOnrlAIuhEXTVNJ0z7QD3PQrhkZAQmv5qSWwFmKh2cYLnWaL3ajJN AZE6t+yhZY3pB6YBYqqrbCMULFkXLMmiX2+0gmz27LXXx9BMczd+7aVAPjmNLhwCWJIh JQ== Received: from dm4pr02cu002.outbound.protection.outlook.com (mail-centralusazlp17013031.outbound.protection.outlook.com [40.93.13.31]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 3pyu20acap-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 16 Apr 2023 21:50:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JPrzuLx8+ILHoff+f2oCoHH1UuPiSttX9e2C6yLF0WrkyqjqjhN93GMgW6ldMKhb/DFjvI2vDJEvunUc+Fn8c2IhaArMDM1p8WNoUQapbrcoysKP0V9b1kBdjwNP/fl5UwOdhPIPz8INBBYEGgqFKdNEreeVJ2tjSZGR9ZtdGMpvvp2M+SUBW5zP/P1YqIpwbcxjq8QBhQZKaRQLiFNLAs/QQVcNHVqp3mq13I8H7N6DqtJg1Lhhj8hrmUqJu5nO40u7qsGFD3k4qHrWRo1LwH6BTnp6ur/K4UCSgMP9fbTH11tHWl7Vw7KX+1cMN0AZeCL8/iP2YiRSHbT6XDF1Pw== 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=SpCLAdJrB06014+qrlQFPp5AtpnLJJANXzuKmlfIAcY=; b=T19z604Y4buskXZUBxKFvVNt1fIRqpb4Sp13/P0p7HNjDojA6cLQLD/txd3tCwt4awIblpUWhpkNdZaP+M+l/4GwLyyZ7U5K9YPdjDnTdFkOpyteFeG8GWS4EdQAwb8UJG9RcsKZBjCj6Mq7zkjZHou7HIGvkZVliJ9gzMV8yzjBmdHVJIeXO+vrPUxQ5s/XTZfW3qD4aaniVTYl84JPN7r6cOp/tooRDj3mRoYJl43nCIUI/EkLygs+DIQ0zy6/7slre7u5Lhx81ATUpcf61RfQwShko9C3ws2bBtfI0rZICR5JiT1jHP9IkHm7dIAoXyllO/34jDj0g5dGLUBkMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.15) 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=SpCLAdJrB06014+qrlQFPp5AtpnLJJANXzuKmlfIAcY=; b=ZZ+RCCd6DWTF35hcFJS138DVneg7DuKO2j2HwYhKLStx/i9qvtmrAAyRTLgLiiFP8fGfMWJhFGFrt4Hgc/QuxQEl4SAFYyW1hlMcr+Xl21yr8M11+Ir8Z/fT5cu1ejkN9uYqFQPJv8enYIVCeovHcRhtmPIIq0Wnc12zXWCxCZw= Received: from BN9PR03CA0486.namprd03.prod.outlook.com (2603:10b6:408:130::11) by DM6PR05MB4425.namprd05.prod.outlook.com (2603:10b6:5:95::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Mon, 17 Apr 2023 04:50:52 +0000 Received: from BN8NAM12FT025.eop-nam12.prod.protection.outlook.com (2603:10b6:408:130:cafe::bf) by BN9PR03CA0486.outlook.office365.com (2603:10b6:408:130::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.46 via Frontend Transport; Mon, 17 Apr 2023 04:50:52 +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 BN8NAM12FT025.mail.protection.outlook.com (10.13.183.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.19 via Frontend Transport; Mon, 17 Apr 2023 04:50:51 +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.7; Sun, 16 Apr 2023 23:50:51 -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.7 via Frontend Transport; Sun, 16 Apr 2023 23:50:51 -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 33H4ooOn027798; Sun, 16 Apr 2023 21:50:50 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id C80E384E82; Sun, 16 Apr 2023 21:50:27 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id C6F6184E81; Sun, 16 Apr 2023 21:50:27 -0700 (PDT) To: Konstantin Belousov CC: "Stephen J. Kiernan" , , , , Subject: Re: git: 4819e5aeda4e - main - Add new privilege PRIV_KDB_SET_BACKEND In-Reply-To: References: <202304161838.33GIcJiX079190@gitrepo.freebsd.org> Comments: In-reply-to: Konstantin Belousov message dated "Sun, 16 Apr 2023 23:47:48 +0300." 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: <10953.1681707027.1@kaos.jnpr.net> Content-Transfer-Encoding: quoted-printable Date: Sun, 16 Apr 2023 21:50:27 -0700 Message-ID: <11356.1681707027@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM12FT025:EE_|DM6PR05MB4425:EE_ X-MS-Office365-Filtering-Correlation-Id: c9cd3512-d5ca-4052-8f0a-08db3eff523c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g0SFbv3YSv4FkXM0vpWxjZRLtPVeixSD3NL18EHKmd5GotcYhB2MC8pO1jySe86O6gMhI8ht7fFD9LQ6qoKyO2daf76rTuvdpLzpaS7dNilXGfy55nFkAONLN3vbUYmwY7yXvEhstSkgvhiHyGbivIPhWpvMwoB4REtvHQzALJk/CStDsA06UWmNrWSBo2lQojngyl5+Y9wn4Sdvx3Xo+ve+98J9oLF3GGBb3qTWnTLTML2Yk7dVSOJt3xK6NI3d/xZqiANx0JHypPa2QZ43ZMzxfjC8ibRJIUryf3A/YfErkTF5GVTAkTSPBZMe0N3pBiOdw6Ay9OlnKiK8cqR/gQCED3xxEAink6TeXLgsEHtqikxIYicfarpE0FAPSTExQKWGFjEN9q5WNHQCyQklmknJxkxLw6SXlUFu8gMntDIRq88yg8prc5vtS49yyMUnlTTuDWi2iREByaFLihibuL1KDLOXFYmRnNHq4j0/uOZahOzR9ldWr3DMlmdpurVdeVwJbEDLjE7HWT2ovEjfjtC0ddYcJacvdDNt3UsuXr6gTJ4ADbFQXr21ROaVtoXyK+1ml+oAfqnCgM2bf3fWUXK2Tp07jHQvZkl7eAY39+6aQwpmkg4DQgTwYcLwtVZZnWmSPwxm3xRRZSHP5NeD65HTqlAFkgEY+oFMq9UBoRjmAWikes6shlbxTGdH+ILy8FpKsDcymk4BEbEkgAeJngyunxxKWrFmbdQOAGJKe+k= 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)(39860400002)(346002)(136003)(376002)(396003)(451199021)(36840700001)(40470700004)(46966006)(40460700003)(82310400005)(2906002)(5660300002)(8936002)(8676002)(356005)(41300700001)(81166007)(55016003)(40480700001)(86362001)(478600001)(54906003)(7126003)(36860700001)(26005)(9686003)(107886003)(186003)(6266002)(7696005)(336012)(6916009)(4326008)(70206006)(70586007)(82740400003)(316002)(83380400001)(47076005)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2023 04:50:51.8934 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9cd3512-d5ca-4052-8f0a-08db3eff523c 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: BN8NAM12FT025.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB4425 X-Proofpoint-GUID: ubwBVJiVSbgAyeTGOO01BOMYtH4pzkKK X-Proofpoint-ORIG-GUID: ubwBVJiVSbgAyeTGOO01BOMYtH4pzkKK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-17_02,2023-04-14_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 adultscore=0 mlxscore=0 impostorscore=0 clxscore=1011 mlxlogscore=670 phishscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304170043 X-Rspamd-Queue-Id: 4Q0F4J3cDsz4c9W 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 Konstantin Belousov wrote: > > @@ -484,6 +485,11 @@ int > > kdb_dbbe_select(const char *name) > > { > > struct kdb_dbbe *be, **iter; > > + int error; > > + > > + error =3D priv_check(curthread, PRIV_KDB_SET_BACKEND); > priv_check() fails for jailed, or even simply non-root process. > kdb_dbbe_select() is called from a random context, e.g. from > kdb_alt_break_gdb(), where it inherits whatever thread was running > at the moment of break to debugger. That sounds like a bug? > In other words, this function no longer works reliably. > = > > + if (error) > > + return (error); > > > > SET_FOREACH(iter, kdb_dbbe_set) { > > be =3D *iter; > > diff --git a/sys/sys/priv.h b/sys/sys/priv.h > > index 20bfc7312ce3..cb4dcecea4aa 100644 > > --- a/sys/sys/priv.h > > +++ b/sys/sys/priv.h > > @@ -515,10 +515,15 @@ > > #define PRIV_KMEM_READ 680 /* Open mem/kmem for rea= ding. */ > > #define PRIV_KMEM_WRITE 681 /* Open mem/kmem for wri= ting. */ > > > > +/* > > + * Kernel debugger privileges. > > + */ > > +#define PRIV_KDB_SET_BACKEND 690 /* Allow setting KDB bac= kend. */ > > + > > /* > > * Track end of privilege list. > > */ > > -#define _PRIV_HIGHEST 682 > > +#define _PRIV_HIGHEST 691 > > > > /* > > * Validate that a named privilege is known by the privilege system. = Invalid From nobody Mon Apr 17 05:25: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 4Q0FrJ73JCz45MFl; Mon, 17 Apr 2023 05:25:36 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0FrJ6Bthz4L5C; Mon, 17 Apr 2023 05:25:36 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681709136; 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=KjnyNeX28c9m/sGLP7YisU6z+TzYhva/CmkgyfyQOYA=; b=MErdF0m7Ev2rWkKz7B9uvxY/Ru/r9dnp9nFVRjQo0AoBCYpDYQuKF7ULepZ/t/TTR4SwI9 mfhuOui0kKKS3RFLekUZak3iRfSyPnaiHzmOSkatc/hkRyldqovHVoQmfPEkrqdysytpcw amK/n9JpdlfQbiaqsJqUVeRxCZqMPhsX8R1wxzxN4DwTK62T8FMGeUThOxDzYfPJCNCVJS jD9yuOI00/c3Zis7xlpGkgMRrM5ktAbby1PhRzp1dAVnioNSuo+HUt2od0fTWY2UOp6PXn gEXUbrkm4M7LJ2faWaf7KNO6JRqgVX+VebyYLlC092u6Krix8mr2FhcODVkPDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681709136; 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=KjnyNeX28c9m/sGLP7YisU6z+TzYhva/CmkgyfyQOYA=; b=iLbS6DCR/tiXvN4X+PqR3DQYGJD7132+dQiG8P8Az4RkHJ7emHHEFIyfKUoBtdMEy/EH/2 t4EMilt6MfXCx1Wa7J8AsT7MlAnoxhEXtduYai8SwVkACwgM43fi7Ps9a5Nihxx3tZPNF+ ya33UqPd398gToC5ljuTpsao/Ez6TP/ruS31VYSnNPqlxaiW7ca4GAMfWttZW5P+DTRiF1 op/6NX7077ZeLCrmsvbBO0iIZoJ+LpFLsDBSlMZLgy9KAd6vSuvXdsuWieo8jh8lFB1q9R zad/s4eK6KUfo/6i8ucPEQwcuowkAJf+XY4aJNnM0L+P2RPiBXa0Rhw9I6N2Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681709136; a=rsa-sha256; cv=none; b=Tdi4v/MuNWTbB7sRWMNcOdesmHhw0BIYJwnwvRIgBeNUI8yYkFcfMcpb+i7MNljhDY7/6g tdu7Jx9qbGL1o8JCsC6fsBoYHm9r5zwCg1fH/wDajPKK/3DVQwG5/R9RAm8SZJqGRYT096 JZcM2wd/7UJr93YQMOsfU+S1KZDqR3cq9Q9N0SaHucq//i412hLg/ZEJRT8N/XVWRWSPy9 uEp1LMLfFGuVj5zYua2e4yWnZWMUf7AGH9ox/AjqOFyrhLOHAmF+cAZMnooRN41WbmO8Kb CmycAi5wlufyez4Dk6N6dvrSOY7ke0u1Qr9JV2b4n8+kPWNvBbz8DuIfgB5RuA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id CC50B16973; Mon, 17 Apr 2023 05:25:36 +0000 (UTC) Date: Mon, 17 Apr 2023 05:25:36 +0000 From: Alexey Dokuchaev To: "Stephen J. Kiernan" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1c7ac0c23bc1 - main - veriexec: fix use of getopt Message-ID: References: <202304170105.33H150a7020428@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: <202304170105.33H150a7020428@gitrepo.freebsd.org> X-ThisMailContainsUnwantedMimeParts: N On Mon, Apr 17, 2023 at 01:05:00AM +0000, Stephen J. Kiernan wrote: > commit 1c7ac0c23bc12cc7cd5776fa28ebe0582e1bccec > > veriexec: fix use of getopt > > getopt(3) returns int type not char. Using char triggers the > -Wtautological-constant-out-of-range-compare warning with clang. Not just that, depending on the usage (e.g. if there is == -1 check), it could be broken on machines where char is unsigned by default. This is one of those things I could never understand: getopt(3) is said to return `int' by the standard and the manpage, but people keep assigning it to `char' (go figure). ./danfe From nobody Mon Apr 17 05:47: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 4Q0GL22Kf2z45NZT; Mon, 17 Apr 2023 05:47:54 +0000 (UTC) (envelope-from danfe@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 4Q0GL13YRzz3nsc; Mon, 17 Apr 2023 05:47:53 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681710473; 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=Fqnpl7Uy+D+BSApORnbCs9h6NlnYcs5t8mgVDEbB8vU=; b=jdhaglz8CIIQj3kHMsf8lBo/nYzFqZ2Nh4PRJn2YGd1zMz8tTMl+ZcIMA8KljaoPmbV5Y2 ibSDR/UY2ozSaEn70Yio6D5ILEwJTxDIPbaZ877mbIeeGaAFAN4caUCZtsc1TRwdc1uhfg rV63BEpbtCy5uuNayByIWgx/8nLFf6m94tpfejISB2vK7olF2lUY+8ofNNYB7ssnW7lHZw 5SGcW5rNX0bKJaQij1N4TkRbknQuNbWmInOPIOEBnWIVbOowH7GGUhiqCIubATQPLqvfgx T5VYsT18Lk1Ik4VlSj14vHpyYoMRVEI+UM1giMFOHzvvdZte2l2Gt7Zf4HQpHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681710473; 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=Fqnpl7Uy+D+BSApORnbCs9h6NlnYcs5t8mgVDEbB8vU=; b=JjvIoP42pmJR8FWsX9asc37wLnC0NNQXZ8OgCatVTK045++T3ByQPhcmdnPzX9Z8xpNZ98 5/XzRV/a6lO5yRfwrU7xF3qgOen/6dAKWORVlFKJL4EY0rgIfAv6E++y0WbxejGOiCI4yG rEYm0hZrIa3G/cbgi7TC1dVFwCBtWJ3N0yqAf0pVzLKUxQX/49cwFJpdOzFGbTPJf2yl+T y+WP9/MG5jWCWmC4Zzk61CgIMdzE4/cpF8LazOjowTXPYXt3MAiD4wdOU7AYmEl3AnvXkB P7ROkvgATzYS0zn0wS457AtldkuAwPeSikhGL32hM3I148xX9Y0xdb0PKrq3Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681710473; a=rsa-sha256; cv=none; b=WjLTMSamA/pIkCWiv29hPLV/MEFv+k3o5/sK5M4VqVz2rO52Nq5f/Nw/hUy4TIlLGKgudx zBgvbekzNjhObHljgtbKbuZbb+qSEd9CZ/o4VTytZXux1iBAqLcXMpW1fPam6Do/YPVKUa RHk4/lhNddKipyN575Njz5buzZEsbt3Ek4Em0KyaWXec38zz74EC608MONOZIfwCjlu/vz tFZ8mdKo5ikbsiqS776FJiskNnWT+NL2J4wC++GlFRy47xYESyNZaC12PdgLCq1AxQmU2Q 7DhVxrwSMmMW4lu85ThQv/e1iMlc8rlKU7pl5x+ns37ntFVLGALgFyC3i7bdzQ== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 460FD2D10; Mon, 17 Apr 2023 05:47:53 +0000 (UTC) Date: Mon, 17 Apr 2023 05:47:53 +0000 From: Alexey Dokuchaev To: Jessica Clarke Cc: "Stephen J. Kiernan" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 6ae8d57652fa - main - mac_veriexec: add mac_priv_grant check for NODEV Message-ID: References: <202304162314.33GNEwXd039914@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: X-ThisMailContainsUnwantedMimeParts: N Jessica, Please don't overquote: you complain about commit log, but included the commit diff in you reply. Why? This is quote annoying on slow networks and could cost people some cash on metered connection. On Mon, Apr 17, 2023 at 12:40:07AM +0100, Jessica Clarke wrote: > ... > Hi Steve, > I see you've made a bunch of commits over the past few days that suffer > from not following the proper commit message formatting outlined in the > Committer's Guide What's exactly wrong with them? They appear more elaborate and detailed than usual, I like this. ./danfe From nobody Mon Apr 17 06:19: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 4Q0H1x2nLTz45Qdn; Mon, 17 Apr 2023 06:19: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 4Q0H1x28c0z3GFq; Mon, 17 Apr 2023 06:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cZna1/vJ0lPY7cemX/TrMT1//rUqCNIP8MIzXzaekPE=; b=XdAT2UMS+ssANaHipdHOi7e07TUi5MqfNOdaUBWlOfMkozBMWigPG87SfObLzAgjqRAiBN u28dLZPnHfYUgru5/h4CM69wtupPHBZorj0RS7AdQOJwURmDkgmJo4iTb4zBs9A7vgwuK1 c5EIEgXNaA8htSkbmUfzOuJkwFjo55DGa3jmSp1kaTLPMOXYggjpZg2cHThXRwYG3dGn6L dOoxKf4MjwXjQwdh6mSKFpN7MGKK6Gmw1483HhKwOVKA+wEOOi+J43PgB7vIK7QcYaKRKY hQ36Th5kLULHp3zIfqb0U++7osKlm5vtRXmFTmaVT9yKYt+AdIZlQWlb03afzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cZna1/vJ0lPY7cemX/TrMT1//rUqCNIP8MIzXzaekPE=; b=MrhCdf+e+RkoJsfwWBV0nL73krLNwLdUhzthR60p25J/1nkKiSs+uLb+VEqhkfpUd/TBWG E1IOrFkpoQqr3D9K7ub1QE8HFWh1bHuZk72u/xfaAP3yiVTMVsk5Gv9c0n6yvr9WlMAPEX ZpwlGEM3+l/xlhV+x2K1ZxK5NwEfv7mWVT94qVpN02i/VPjIsvmslUhUwqS29ZdAFvfk2N SZNOXaMnKrVBs7qauNM/mBriJAcNrVAXfauaScP1r1tvV6SN6paMZ4z/vxHnBmW16oGaru qvLKfnH0E685QjHmfYFzbMzonJl214uW6msUNf8lXwfcqJxSw4FrE8OH8daOxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712341; a=rsa-sha256; cv=none; b=KfLHuW3ocQkFjQOmcHTaVsRiR2gNdFfXXHdfWAb03wBxyIz9YyMvsOEBZBNqQQeO2a5Lnq lZ14T/SeJJyW3IyJE+51yEQ+81ZiPxx0cay+E/kYJWJyKQ0XoGPffxpXmmsnwhDNEjkfHj DkiL34zuxlknVIAyzIanv4xy+fr2lGIjd96tDh/DIGLg2VMhHoOb5bExNyZ5ulVRPMj+IY O+atiXvo4xwdnNyeEIYQZ7MJ7U2ZQFzVGli6Y13xKoEVZvT7Uto5g1tKn1yEAPCD90d0Mg vHqEjJ+MRMQwgTGuKIlXHQWvbBVHuGEscJkedTRzkeEcSYivdd82Qz/Nd7G/tQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H1x1FGYzJNs; Mon, 17 Apr 2023 06:19: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 33H6J1IR030685; Mon, 17 Apr 2023 06:19:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6J1PU030684; Mon, 17 Apr 2023 06:19:01 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:19:01 GMT Message-Id: <202304170619.33H6J1PU030684@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7124e665dac9 - stable/13 - powerpc: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7124e665dac97258d5df4764ad81eb0563212a65 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7124e665dac97258d5df4764ad81eb0563212a65 commit 7124e665dac97258d5df4764ad81eb0563212a65 Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:17:48 +0000 powerpc: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions Use them when possible, instead of separated flags. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit dc1c5138c3255cc9004a3842001ed6c5db8f4ea3) --- sys/powerpc/powermac/powermac_thermal.c | 2 +- sys/powerpc/powerpc/platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/powermac/powermac_thermal.c b/sys/powerpc/powermac/powermac_thermal.c index 2b1c383ded10..03dbb998559f 100644 --- a/sys/powerpc/powermac/powermac_thermal.c +++ b/sys/powerpc/powermac/powermac_thermal.c @@ -61,7 +61,7 @@ static struct kproc_desc pmac_therm_kp = { SYSINIT(pmac_therm_setup, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, kproc_start, &pmac_therm_kp); -SYSCTL_INT(_machdep, OID_AUTO, manage_fans, CTLFLAG_RW | CTLFLAG_TUN, +SYSCTL_INT(_machdep, OID_AUTO, manage_fans, CTLFLAG_RWTUN, &enable_pmac_thermal, 1, "Enable automatic fan management"); static MALLOC_DEFINE(M_PMACTHERM, "pmactherm", "Powermac Thermal Management"); diff --git a/sys/powerpc/powerpc/platform.c b/sys/powerpc/powerpc/platform.c index 6f8f0361d11f..b9513c8f4e0c 100644 --- a/sys/powerpc/powerpc/platform.c +++ b/sys/powerpc/powerpc/platform.c @@ -68,7 +68,7 @@ static struct kobj_ops plat_kernel_kops; static struct platform_kobj plat_kernel_obj; static char plat_name[64] = ""; -SYSCTL_STRING(_hw, OID_AUTO, platform, CTLFLAG_RD | CTLFLAG_TUN, +SYSCTL_STRING(_hw, OID_AUTO, platform, CTLFLAG_RDTUN, plat_name, 0, "Platform currently in use"); static struct mem_affinity mem_info[VM_PHYSSEG_MAX + 1]; From nobody Mon Apr 17 06:19: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 4Q0H1y5Hcpz45QCK; Mon, 17 Apr 2023 06:19: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 4Q0H1y38djz3G3X; Mon, 17 Apr 2023 06:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KiudUFt1aaB2dkcESjTV/S1BxykevX9ClbrK8dLxOAM=; b=rQUZ3HupQPVxiswoXa28yQHLW6CbG6skkZRfQC3tbt0i18l7Sek4XnIZToLjiDA2y2sKBm FQ2reLIET4B8SyWijfDM/Nj1YNcaSg1lDGNrC6PzBviUyBDPmEqpHiiaN/+k5zfamAI9/P mzuSzVougIO0tMyvU3njdFHhHH/s1LGg6h5jshzPwQXezotlCgagxh364WQzpWmVpZXEi1 Jx7Jex8tlcAhkiAmHf7bAtGazpaakOdsxADAn7o03AekUBBfhXBmakc6WyFPDdQnsdoC18 67WoS/P3ji56494BUAUnf73uHnYEjCWkCdhs+QROLJt+LN7eNjtagLLw8Ouy2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KiudUFt1aaB2dkcESjTV/S1BxykevX9ClbrK8dLxOAM=; b=iaZmNJsD6tRNgvPIiwU1Q0cUCLaHzG748SyCqJ5UmP7W/ZAScucDc/1L2QTNfNgMG9GiIY AM2jIdnUDpdXxL1yTDdP1TIINlYEYrTfF97WP/YFWbEN469k9ljNzv5184DdkrdhulIbDX 8FhbYRvvKtv9RnYdjpjmQWPsgYnFyBL/Nuxoe7hch9vLvvV39tyfYIjt5nf3Vq/NSR/P5j DFXmxLkTAx5q2m+a4zThgCkagc2UDKWszt1Cu1jVdj8cMpdDxI3oAZ4tC3Xf3QHt3/F4tX ZbbaLKxwRQsz0lHwyqsbfJEXbOf4xDQ+SsJAQKI7D360deyLb9ae9JAl/iuPPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712342; a=rsa-sha256; cv=none; b=GWXFPOdFAjGxDLN0zdRfN/SrdMXnkcv6faCpJ+lOSwPhP+CUaVWJF5y/9tilHx0NnyQ7bf fyPDjjupM6huUYl4hN/6nOWagygDsM+BY8pJtnkRJVlYdY0h0ZdfBwOYzGmYG49OCZEaZa a7hTVM7hYTikqWToehpHw45S5v2g6QilT59AjM2+ZTT7zfGqQdxFS6vmmNEZmZh+g9wCCG Dn86j/Jn2JK3Ue4KTwWMBAHGSmGZuovlk2PRWXKKRTKqvzmviXChnMI4DACeBU4RMvCzGc I8MF6W/Pu0vcesZb09s2tPgPqM8gK5mGfv0m30vU5kYQQAW/3cbLEsVMYMp/7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H1y29lTzJHm; Mon, 17 Apr 2023 06:19: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 33H6J2Ha030704; Mon, 17 Apr 2023 06:19:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6J2Bh030703; Mon, 17 Apr 2023 06:19:02 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:19:02 GMT Message-Id: <202304170619.33H6J2Bh030703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 09f9dad4654a - stable/13 - cam iosched: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 09f9dad4654af6821f8d9e70d35a8cc78d1305fe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=09f9dad4654af6821f8d9e70d35a8cc78d1305fe commit 09f9dad4654af6821f8d9e70d35a8cc78d1305fe Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:17:49 +0000 cam iosched: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions Use them when possible, instead of separated flags. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit 69cb72b8728ba605d6cc8758480eca3fc6fd2ed6) --- sys/cam/cam_iosched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 50b6db88cebd..59feb68898d4 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -71,7 +71,7 @@ static MALLOC_DEFINE(M_CAMSCHED, "CAM I/O Scheduler", #ifdef CAM_IOSCHED_DYNAMIC static bool do_dynamic_iosched = 1; -SYSCTL_BOOL(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RD | CTLFLAG_TUN, +SYSCTL_BOOL(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RDTUN, &do_dynamic_iosched, 1, "Enable Dynamic I/O scheduler optimizations."); @@ -96,7 +96,7 @@ SYSCTL_BOOL(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RD | CTLFLAG_TUN, * Note: See computation of EMA and EMVAR for acceptable ranges of alpha. */ static int alpha_bits = 9; -SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RW | CTLFLAG_TUN, +SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RWTUN, &alpha_bits, 1, "Bits in EMA's alpha."); From nobody Mon Apr 17 06:19: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 4Q0H1z4r6bz45QFw; Mon, 17 Apr 2023 06:19: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 4Q0H1z3lqbz3G69; Mon, 17 Apr 2023 06:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eqDy04TxdQ/yO5+Zd1PKDrtcsmhCu/CrOuH9fpFgfx0=; b=Z0+wrkDde07Dm5VGcKvIkbO6Phg3JFqP4Y0fSe+R927uyGZ7Zf9xgXshx0/QGOzZcv1pBr 3a3dVMCkdsj4QjQiMLNP6yk+1zcTDhwjYAaSZhGIxT9z8b6Pqqo/zDQCE+xL9amFQjKgdl BxiNGruKkCaB5rPVUB8KIB/bv6ppC3lOzDiEBcTYT2qiFTCNcua5B0GQYkWITjPO9X/Rgl uuFVF2jzzRCuemjmX0GNo5OakntxNXjm5EDZCYJYwfuApGIRb53Gf2aYQe24sVd5ndHX76 3wBn2oeF22mtCjaWW9VCPc90H36v8PrPUlAlLB6ssuzB9OQSavDAYxSuCv7jxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eqDy04TxdQ/yO5+Zd1PKDrtcsmhCu/CrOuH9fpFgfx0=; b=cJmjXbHK6iDs04EXyobkkHKrw2noqGO7lKiCZjV87wqu720e2536neryBorktIYIs8cUH/ 6kzTWPLFjDd4XhgBNysnRy6VroGCuzRuT/uDNu1gjm4UeGnqLdOKXIxmBNQpPFr+aJcHaQ jyimABL55tcdV6VOO7Tb1rw4f4g2KiPSfPL+Iaw74eKTCvwkgCFuae9X86+H43kdL5Lb3/ Rh2hOk2KXpDEgXBEr+hZmlKPZ1mJMLPLj2BwTNACSS695l0H0OP6bYNVKbq95ZqtR3CPcz LiKBqbfItp1Me6Z0QbwvFmMVcdhHOQ+XnfABMCOHiHd2G8lBXp4e9FYnZrIoQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712343; a=rsa-sha256; cv=none; b=jRUIhJD1WffrpCSO8kWU+BfMznmhoNRbyrtpXYjwxtjqYTMEGtp3a3XmEBeQ6M/d3GcZ/L B50klJRVa100ZlYvnsGe6tf1OpBsQvdnuCavvNMIS9V8rXlrm8Fo6Fr8sqFV8bsAW5qNXV /UTX9CAazLPNDfxpN4wgB8EDXpwwCVBxFF2b/uJjeejQCybB6ON3p8aOhkiyT/Uw1zTzFi RyFnK2NHCCiNQkrgW8913PnYIQr8JoNqI/NsLoXh75hqpTLdqpvvbMhiTw1wo5nLNf4a6c mhSf3YgvfENVa8A0vPP1Ny8AdVpnslVchfAbBJEgTZ/HacIk//51Nmm/pB2HIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H1z2npNzJft; Mon, 17 Apr 2023 06:19: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 33H6J3aV030723; Mon, 17 Apr 2023 06:19:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6J36Z030722; Mon, 17 Apr 2023 06:19:03 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:19:03 GMT Message-Id: <202304170619.33H6J36Z030722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 60d6ed9cb8b3 - stable/13 - ice(4): Use the existing CTLFLAG_RWTUN flag definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 60d6ed9cb8b3823030e625de3eb8b640ab92b983 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=60d6ed9cb8b3823030e625de3eb8b640ab92b983 commit 60d6ed9cb8b3823030e625de3eb8b640ab92b983 Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:17:49 +0000 ice(4): Use the existing CTLFLAG_RWTUN flag definition Use it when possible, instead of separated flags. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit 5ff8018108278d06e024676c539e9f60f8189e83) --- sys/dev/ice/ice_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 0c047b574bf2..880f43e3598f 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -5852,7 +5852,7 @@ ice_add_debug_tunables(struct ice_softc *sc) debug_list = SYSCTL_CHILDREN(sc->debug_sysctls); SYSCTL_ADD_U64(ctx, debug_list, OID_AUTO, "debug_mask", - ICE_CTLFLAG_DEBUG | CTLFLAG_RW | CTLFLAG_TUN, + ICE_CTLFLAG_DEBUG | CTLFLAG_RWTUN, &sc->hw.debug_mask, 0, ICE_SYSCTL_DEBUG_MASK_HELP); From nobody Mon Apr 17 06:19: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 4Q0H220hpLz45QCN; Mon, 17 Apr 2023 06:19: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 4Q0H2106mtz3GHS; Mon, 17 Apr 2023 06:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjIU5N1dAni5VIDMfqeqkGq6qMt7Hw5fhdNcNJf2Gcs=; b=SmVwECiQr3z4HDmUnjUEsCukmjIw5jBNvyC9IOszybdF++z8hbgvq0W3I/0/+TAkChl0hO 5gjEGscP9yfJNemyhro+qbGXCs3NT/u9u7fkSr4AiYVsu8yIhESBhb2sJaeYBgRiJG/3TX DJGxt8WSOc0BaIy3jHuWb7+za5mnk+46GaQjXQATPQQQ7fwM1dooZOedApy9GTcsyRZFQW 1JJAibZRcy5SxE3sga/QOP8e745geSseVeO0tikXzO6Gr6ck3SO1u8XEyyHjNOO1ECNgm7 7FyC82QFmAz6rqDkPEL/TQOUL7zKrg5o7u7jjVGO46TXsKyycCyTm/MzKejXwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjIU5N1dAni5VIDMfqeqkGq6qMt7Hw5fhdNcNJf2Gcs=; b=TPYGZl9/FLwFB3XxBSD9tRqxHTGwXZ8VJMaql/1k6QDH0PpTQlru9T6NePLPyn/why/aZm rbJQBGx1AGqYflMJfKlJKUp+BZOKD4tIOmZ3bSfnRgHEbtW7hDBl0VfgjCpdHUP1pLLoQ/ wJSgyDPjJ+Yb2trIA73BOyJQ4QFXhm0C5xVDF46H0MGUfnVf+ZFYUPYoWXE5tcGCcafj+c GT2kar0BoRgNX8tFNGVRvD+h02kXZ0dv00H6SsirKayZGAhe/1D1b4nmsxqAnITdmluClu DrZGY8GHuNkq38pNu6Gpc8a0SmYBvJIq5AvDLEELBf7aAi3BtAIzieNV60nWPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712345; a=rsa-sha256; cv=none; b=WPnFkHgQ8POeKnQ14HY8Kh1PW9lVBsoXAdEbz7AS7osx6rksN6d4Q1jFBc3UqxN2OvNj0H JP/AnVl9tFm/jVHLuEPTtNmFs8QiRrlzosUItOeeLXjrT4efXAWexFi/j0VK58vWeaSuo7 IlhPicJBZVOMkmz9cwNEuoHmG07itGvibiTqqFDigh4WbvYUBoOL7k1f8OI8zhPL8XepuU j7tSJ92mzAkY4W7p/N6jz+pHt6eNBE2GOO31iXJoN9Cwchq/fp2e0cgzOAFLq/hIZ/F5FO m8BNqLtRKQQBWLXc164Lb1o0ocVpk9krLeURYerrxzpE3niPX6mr3hX9NTeUfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H2046PmzJNt; Mon, 17 Apr 2023 06:19: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 33H6J4Dw030742; Mon, 17 Apr 2023 06:19:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6J4WG030741; Mon, 17 Apr 2023 06:19:04 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:19:04 GMT Message-Id: <202304170619.33H6J4WG030741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f500ecbeae7e - stable/13 - bxe(4): Use CTLFLAG_RDTUN flag definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f500ecbeae7ee62d1994155ff819cf8b59c5509e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f500ecbeae7ee62d1994155ff819cf8b59c5509e commit f500ecbeae7ee62d1994155ff819cf8b59c5509e Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:17:49 +0000 bxe(4): Use CTLFLAG_RDTUN flag definition sysctl variables rx_budget and max_aggregation_size are read-only loader tunable. Mark them with CTLFLAG_RD flag. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit 8bd9afe9e1821368f4bb0d39c8c6703bf5007fd1) --- sys/dev/bxe/bxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 3b5fb46ed599..31c8207d246b 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -285,12 +285,12 @@ SYSCTL_INT(_hw_bxe, OID_AUTO, hc_tx_ticks, CTLFLAG_RDTUN, /* Maximum number of Rx packets to process at a time */ static int bxe_rx_budget = 0xffffffff; -SYSCTL_INT(_hw_bxe, OID_AUTO, rx_budget, CTLFLAG_TUN, +SYSCTL_INT(_hw_bxe, OID_AUTO, rx_budget, CTLFLAG_RDTUN, &bxe_rx_budget, 0, "Rx processing budget"); /* Maximum LRO aggregation size */ static int bxe_max_aggregation_size = 0; -SYSCTL_INT(_hw_bxe, OID_AUTO, max_aggregation_size, CTLFLAG_TUN, +SYSCTL_INT(_hw_bxe, OID_AUTO, max_aggregation_size, CTLFLAG_RDTUN, &bxe_max_aggregation_size, 0, "max aggregation size"); /* PCI MRRS: -1 (Auto), 0 (128B), 1 (256B), 2 (512B), 3 (1KB) */ From nobody Mon Apr 17 06:19: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 4Q0H2232Fgz45QlY; Mon, 17 Apr 2023 06:19: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 4Q0H215rBSz3GVQ; Mon, 17 Apr 2023 06:19:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpEdBJph3+GWnmltrkgAdUNkdHVxx03qSL1z8rU6wIM=; b=w5RMb8iVlHjfqNY/cEn2Jr1iQCBB+7nwjjAjnl0O5drztIwTf+7SDpAXXRtmkyQpy/JKQa Vv8hvr1xKQXvsy8bCvS57s2s1rqazSIRFmTSUbGPwwcirzPTMcfEN5WkcYRf853zv3mWh+ z/eUlHeOTfRQk7/zlCx0E/n76pqrLEfFpf4TLdeY7zfXgIKbqcRaMD0t8efeOScplBI5et IK3fYxetpSorhPqF28A0ePrk6ltl0gXMqT/KzUJv/QM8cIVkLlB2/3rsURTW0CvSwq6TEi AjvCmAQhL9FPIL6lOiGM/q5fK3/Plf0yo8hIMGc58fbCL951ADE1a3n9CfmHeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpEdBJph3+GWnmltrkgAdUNkdHVxx03qSL1z8rU6wIM=; b=SzWpLCS6vlAj8vY0ranQBQ6XdhNZPKWl9LA7YwRkG1Saa2rHhSTvEl3z3FEb9xgOqVFYCU fDlzsYKvFM6UtsUR4rniUvCjR4LUgqCZKGBwY4s89DHW51DoJBNTRFByV3m96fXR83ToHx 1JgBf4OYNYNbsWXylcjOYZPAce5Kb1vAqkXq93ZiZsawEQ0ywv8m8Z2Y/AxVwxAdDKdDyh yOl92mEZacQy1+tI+VdUUY21R+xvvX1LvNYVwVU7iu//GthxGryA/SiPn2RVKg3Mm6tkYk guVW3L9hli0b5xh0CtD6kwlPrCqaqACJJmMPnNNyJKE7Wv51AWFb0oy1bmCtkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712345; a=rsa-sha256; cv=none; b=JboDEiyoaTtfO+u8vPqVjCPMoay/o4na7EmOn4jUpaqhWRLSRFIlbKT+izZmax4qevdFxq MXUj6/10LE8EMORDnhH+Qdr0xvG/fSY31VieQMoBKMJDgyNJ/+fHjmNFSbLwaE5WVr9oXE nedSY8ZirqEDFPoC//PikUEUgPOwjufXHVJi5IdwVx9g7P7uszqsoSHrMcHkA45+q04oAk IXOhqZGGbGD0z9ipYTAd3Wxu5iGbZPEUnADzFFgyBzv5/07lSTNgnpnQKNiz/xOoSs1B4B bnKNhp7zXfyfJEKRusOPs1wZKoLmPaupiX06gp+/13fFiaGn0tgGQt2jBqnc/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H214hb3zJd3; Mon, 17 Apr 2023 06:19:05 +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 33H6J5WZ030767; Mon, 17 Apr 2023 06:19:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6J5iB030766; Mon, 17 Apr 2023 06:19:05 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:19:05 GMT Message-Id: <202304170619.33H6J5iB030766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 07bd2fc4022c - stable/13 - iicbus(4): Use the existing CTLFLAG_RWTUN flag definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 07bd2fc4022cc7da8c764b25d29aaf98d7a1647f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=07bd2fc4022cc7da8c764b25d29aaf98d7a1647f commit 07bd2fc4022cc7da8c764b25d29aaf98d7a1647f Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:17:49 +0000 iicbus(4): Use the existing CTLFLAG_RWTUN flag definition Use it when possible, instead of separated flags. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit deac4c7f0753841de8da4d7f37d7e49620b3bbb4) --- sys/dev/iicbus/iicbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c index b16a2bdba332..9d6f49de0582 100644 --- a/sys/dev/iicbus/iicbus.c +++ b/sys/dev/iicbus/iicbus.c @@ -325,7 +325,7 @@ iicbus_init_frequency(device_t dev, u_int bus_freq) */ SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "frequency", CTLFLAG_RW | CTLFLAG_TUN, &sc->bus_freq, + OID_AUTO, "frequency", CTLFLAG_RWTUN, &sc->bus_freq, sc->bus_freq, "Bus frequency in Hz"); } From nobody Mon Apr 17 06:24: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 4Q0H8W1FPJz45R6w; Mon, 17 Apr 2023 06:24: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 4Q0H8W0r9pz3hN4; Mon, 17 Apr 2023 06:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpPAgaXhky8HGPfDubTnMjCTP3EsxoIrV3Hft1patmM=; b=UYLE9wD+KsT2tJtzAHj+mpowAgoXh+VfS9BfILg6ugrV+OgBDI3NYVZLX+9aAVAEOP4+Xm /FZfyXTOHtymD8BOu0cDLWn9PJaaEl6bi1Vqa95GA7ZKGEoVTkWHvF4eQo6g4pE4rFNiHW Qog93Ojv5pJTtPlsp0lflsvP78t8oM7gTQ0Nad4lj3ZcUzztRiC2fKvXa+hsyaZE0whvLf zpS1phmLVKJwK2DckIlekN/ck/Gq73JgZI0o8fLeeTimyAhHBUfBqmfP8hfaRycyXD1Vo1 Z9xK3E7Pnf82C+IEgJ6qjo8ims/PHgWIG1j83MzANoPJ4bni3j3DDe/0ebf3bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DpPAgaXhky8HGPfDubTnMjCTP3EsxoIrV3Hft1patmM=; b=C9N29FCcApjwKCMCSjO87noRhvkwLXo7gMqxzOBhqABfqgXyEiqCBvy/JBtwaTX7BQEcLC iB792O69+vEr+70Oq7qhtRTuNjibN/q6hqm3pgl4SeKmqBFHNaBZHBVuIkp9huW5psBovq 3e/InRodWr+v7ffpnioWNiSYkrOJkpVLOCmY3aCoiY+Le9MqWPYyUMQKTdMJeUAPUkOyq0 Bs9FX46yI90q4g6lpMkZbx91zbULAoWk2qggUCGFSE89MTa5ffwPMAg30OJpuCMrqO2VZg DJn1y+ilqR+Akpf9xXJLibq/tNy1NlW/nlrzG0DOwuCZjOzegvANoQyipyrOuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712683; a=rsa-sha256; cv=none; b=TPw4s871jbu3JJqCvWiufnly21J6sd6H/42NB+sYa6Qyt/Z8X7Jif3pTFFmzMCh6xKp0qp L33RGiyS6w/oo2DtqDSLsQ0WKLjA5BEMuLveVpM6xJLGZYCUjrWDKshNdJubSammoaGTUr 2QKbsl2e5pPawylFos78jbmpvx6NWUIqtDdOoasGEOSCbDz9no2Au7NACRnlfi5Il0XYsd 1IiXqXB7XeGeF7rztPD6ZNOwovpv2euvE9jwigr3sQBrPhBV519pN0IfrwYtQFusqNZ0O/ lFH0zTQCpDYvevndgSk/1r4GTPI/dZbyS3QIS2u0LhtwUoEh9HQ/k6ogTDO0zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H8V6sdWzJPk; Mon, 17 Apr 2023 06:24: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 33H6OgfO046079; Mon, 17 Apr 2023 06:24:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6Og1E046078; Mon, 17 Apr 2023 06:24:42 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:24:42 GMT Message-Id: <202304170624.33H6Og1E046078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f0274efa336b - stable/12 - powerpc: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f0274efa336b59bcadf733537250de0c8a935b08 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f0274efa336b59bcadf733537250de0c8a935b08 commit f0274efa336b59bcadf733537250de0c8a935b08 Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:22:55 +0000 powerpc: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions Use them when possible, instead of separated flags. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit dc1c5138c3255cc9004a3842001ed6c5db8f4ea3) (cherry picked from commit 7124e665dac97258d5df4764ad81eb0563212a65) --- sys/powerpc/powermac/powermac_thermal.c | 2 +- sys/powerpc/powerpc/platform.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/powermac/powermac_thermal.c b/sys/powerpc/powermac/powermac_thermal.c index 1a5db378daf8..2db5ec436d3b 100644 --- a/sys/powerpc/powermac/powermac_thermal.c +++ b/sys/powerpc/powermac/powermac_thermal.c @@ -61,7 +61,7 @@ static struct kproc_desc pmac_therm_kp = { SYSINIT(pmac_therm_setup, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, kproc_start, &pmac_therm_kp); -SYSCTL_INT(_machdep, OID_AUTO, manage_fans, CTLFLAG_RW | CTLFLAG_TUN, +SYSCTL_INT(_machdep, OID_AUTO, manage_fans, CTLFLAG_RWTUN, &enable_pmac_thermal, 1, "Enable automatic fan management"); static MALLOC_DEFINE(M_PMACTHERM, "pmactherm", "Powermac Thermal Management"); diff --git a/sys/powerpc/powerpc/platform.c b/sys/powerpc/powerpc/platform.c index 252978f47a31..5c1bf2dd8057 100644 --- a/sys/powerpc/powerpc/platform.c +++ b/sys/powerpc/powerpc/platform.c @@ -64,7 +64,7 @@ static struct kobj_ops plat_kernel_kops; static struct platform_kobj plat_kernel_obj; static char plat_name[64] = ""; -SYSCTL_STRING(_hw, OID_AUTO, platform, CTLFLAG_RD | CTLFLAG_TUN, +SYSCTL_STRING(_hw, OID_AUTO, platform, CTLFLAG_RDTUN, plat_name, 0, "Platform currently in use"); static struct mem_region pregions[PHYS_AVAIL_SZ]; From nobody Mon Apr 17 06:24: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 4Q0H8X2lKcz45R39; Mon, 17 Apr 2023 06:24: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 4Q0H8X1LvPz3hQQ; Mon, 17 Apr 2023 06:24:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XqGHAaEXyQ8bM4yFPNyX8PsFEeh+UaJbQ6vDhqA3OBc=; b=Jk2F7e16ENElvShCMuyvrCpmYYExMsnr3MKUQ3LEnqNjw4VtlADmcLd29lGRKazlkyYabW vFtA19FBvweGssrSkwI28CQf50f8n6iqrv0lLtoDK2Bk/5YSItox3HKTzevaQbE2JZ0zd1 bEh5K3pTXJ0ZJ4PPKTuheCgD/xA2iN3Z80ytp26bmVaie/sdzFoRHVXK8uGGpi5+85qyr6 r2G/VaBBCgBFcy2tbBql+Mt6JQimHztCT00sD3dA4qG0OPD2AoizY22KR75AHRJz0vZC3+ vafByciLn92pZvkV/Il4kw9hrxnUHB9OS48T6mdccpw8EPteFe5xY4rx3eX0kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XqGHAaEXyQ8bM4yFPNyX8PsFEeh+UaJbQ6vDhqA3OBc=; b=K3lMJxYHvGS6/DPrJQe/DHEn75/D2yOo26ii22LLGwThLMNehG+i1osbNcMSbazxYBB7NO IEpjPRJ8Jb0E4sOhqQ68VcdUWAbYxupiF3RzDw9c7/gV5T4OEcqp2VZeJ6NTalCSWtwz27 mZ1IkN/2keLJeZgn9vIJMPCs2cZusxI7XMDlPVsZPXZ1U1hufD2PyWL9GNG7mymNevOweI e7UlibrdIRCTBclBk+J/17klvIxCUY2tA6M5gwGtTA981jk/dxGKZhXCTyQ9Y6VE7CPMpq UVIvZSrYTpX/rWTLLqTZISTKHWj/Br1mgxX2Dv51Ej3fkf7NEcaVFBJ7ARrRFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712684; a=rsa-sha256; cv=none; b=vnGSkgC2QZdVJZ16XYBO6yBHgriwjt/mN09mm+3oXALAPeCpognpTWvlUudpTpoYWYZ2p3 moqQt0ZpaQW2nA9ttosNxcGxSGY9aof7Iv3XGnkMBuYubfPIz1OuviSIcb0hRQoJZxyyKX PMqcNai+EGMXvnNZIiUCAeVmXQZArTO4FQijxbEjO50y/mskv4VigPln0TLvwH/t1mDyww lPAwZA1v0JraaAtecHXa4ZNSNswSDD748IeaOJWy3eWYAKTj+SpjORz2a5MzUvQ946qFfn VtGOzmg6pD9pEBJmKK4Du65qyrldKcQY4g/OBMApD4llWm2qoHIjRbz273Tfzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H8X0PGXzJkm; Mon, 17 Apr 2023 06:24: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 33H6Ohgc046098; Mon, 17 Apr 2023 06:24:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6OhGn046097; Mon, 17 Apr 2023 06:24:43 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:24:43 GMT Message-Id: <202304170624.33H6OhGn046097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 1fa6add28785 - stable/12 - cam iosched: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1fa6add28785b44c91a332f69191af789b9f26b4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1fa6add28785b44c91a332f69191af789b9f26b4 commit 1fa6add28785b44c91a332f69191af789b9f26b4 Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:22:55 +0000 cam iosched: Use the existing CTLFLAG_RDTUN and CTLFLAG_RWTUN flag definitions Use them when possible, instead of separated flags. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit 69cb72b8728ba605d6cc8758480eca3fc6fd2ed6) (cherry picked from commit 09f9dad4654af6821f8d9e70d35a8cc78d1305fe) --- sys/cam/cam_iosched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c index 0b4d89468804..470fdd42ade6 100644 --- a/sys/cam/cam_iosched.c +++ b/sys/cam/cam_iosched.c @@ -71,7 +71,7 @@ static MALLOC_DEFINE(M_CAMSCHED, "CAM I/O Scheduler", #ifdef CAM_IOSCHED_DYNAMIC static bool do_dynamic_iosched = 1; -SYSCTL_BOOL(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RD | CTLFLAG_TUN, +SYSCTL_BOOL(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RDTUN, &do_dynamic_iosched, 1, "Enable Dynamic I/O scheduler optimizations."); @@ -96,7 +96,7 @@ SYSCTL_BOOL(_kern_cam, OID_AUTO, do_dynamic_iosched, CTLFLAG_RD | CTLFLAG_TUN, * Note: See computation of EMA and EMVAR for acceptable ranges of alpha. */ static int alpha_bits = 9; -SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RW | CTLFLAG_TUN, +SYSCTL_INT(_kern_cam, OID_AUTO, iosched_alpha_bits, CTLFLAG_RWTUN, &alpha_bits, 1, "Bits in EMA's alpha."); From nobody Mon Apr 17 06:24: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 4Q0H8Y42Gzz45R37; Mon, 17 Apr 2023 06:24: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 4Q0H8Y2Nqqz3hQp; Mon, 17 Apr 2023 06:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpggkTm8RWr+9iHcQbOPiuECaA92aP8rMv8y/CWHkLw=; b=Favk1P60cEl51J6DxXZcZ31Vfl1nQOqNYVhfFCply5RzI5mrwXu5vTRpFDH7/K2z3FXYXg zTc1ITXOIR0T38XQHHNrWJfIQ7sgvzgVYu4vzcWxCpLiO+GaN1clRUtgf2fk+pgErwhGPs 4T0ZtNNc1zF43CvKjLf9ieL8bB03aq7wYro/qy+96LMnpqaHQl5oKdAYX26akWZXCsTU96 rvJ6Tc4O6CEA69lQuYTi/up+N7iOmrzbstr+eDdd02/Zl9vDlp1Tweriky56uq0zLwityi NUkfZ/SB7Cyx/yphbedgxDQJh73OSdcuWu1JMsYRDoK3/u6MX3IQ6P8bjNeu0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpggkTm8RWr+9iHcQbOPiuECaA92aP8rMv8y/CWHkLw=; b=Hi7uwOWKglQhxtfw6YQ80w0lAWeqOut26GoqYq1rxyIkgDa/MG8XDHu9HNx66/EuN6F2VO KyQ1rd/e6jTkj66ruvicsi4xv4ZH9mh1CkYjKKE4EERiB73NAvKea99lo92K5X0RVXnJvt T2Ta51UNdQFXyYgN+KxD9/Wr34GGKyUWndilUH8X4u8pzOnze4a/JI5xfALGBduEaaDLL2 6Mnoyzo/8Yf2n+1ys9fOkN6xcgFs/iujjPsHNk6xcwYioUI3hSK5s+0NUqTMqYSX8VvYJB H4tHk7ft/knFMnQssuZB65JPLACi9dVIWcBMO7045RenUC8bNnijm9GcQwvRog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712685; a=rsa-sha256; cv=none; b=WtPsZtiS1nRcujxgXAkm4zgdpZHQ5ISgSk/yD6szBO33U9Y7aqLmrg1seZ21e7UKw5D2QQ 2i1jbMn1zxWajftpMOj184OEWFj152oherQgR8CkWJgo5Fhg/82K/7APXHEeJdFZv8mmWy UlaYHUWE2uWAoviw9UaCou3DDSFQnyiy2VgZtExbZXLk65cI4g/imiMTW7iOXkJC16zJQU vHQePF2HB+Q28510BxgXml1XDCgxlxrzuRrvLHX59+25vjCQaK8kMyxdbo4iZok2MndX6j y3GYiD7BqVmi2XtN+UsJj0mPm+XRc1g4Bh1rYF/73V+e28XCNGEf/c+D3zZXWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H8Y0wfKzJCq; Mon, 17 Apr 2023 06:24: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 33H6OjK5046123; Mon, 17 Apr 2023 06:24:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6Ojo1046122; Mon, 17 Apr 2023 06:24:45 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:24:45 GMT Message-Id: <202304170624.33H6Ojo1046122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5813a7c0e7c2 - stable/12 - ice(4): Use the existing CTLFLAG_RWTUN flag definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5813a7c0e7c2adf31fa10b1295a3f423b991134d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5813a7c0e7c2adf31fa10b1295a3f423b991134d commit 5813a7c0e7c2adf31fa10b1295a3f423b991134d Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:22:55 +0000 ice(4): Use the existing CTLFLAG_RWTUN flag definition Use it when possible, instead of separated flags. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit 5ff8018108278d06e024676c539e9f60f8189e83) (cherry picked from commit 60d6ed9cb8b3823030e625de3eb8b640ab92b983) --- sys/dev/ice/ice_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index f562b3b55b63..29759600b93b 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -5611,7 +5611,7 @@ ice_add_debug_tunables(struct ice_softc *sc) debug_list = SYSCTL_CHILDREN(sc->debug_sysctls); SYSCTL_ADD_U64(ctx, debug_list, OID_AUTO, "debug_mask", - ICE_CTLFLAG_DEBUG | CTLFLAG_RW | CTLFLAG_TUN, + ICE_CTLFLAG_DEBUG | CTLFLAG_RWTUN, &sc->hw.debug_mask, 0, "Debug message enable/disable mask"); From nobody Mon Apr 17 06:24: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 4Q0H8Z3sM4z45Qkh; Mon, 17 Apr 2023 06:24: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 4Q0H8Z2xHPz3hLg; Mon, 17 Apr 2023 06:24:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ffzyAJZly1wVczMhVjyUzQmZFNYz8voF7kUQgCMfgAA=; b=PNWOoTGhOZc1IhkqUUYUVA8EuL2kPJ+UGoeW/5unddwo3ACEa1PNpjSs0iFayEQVLrLvyg CCG4d3gdBYneY9tQSpkpPSSsu8HvEbO9QwBtLFy7XXQP9z6JvlDKMztgyCJzzGQOTVe1x9 CW+LX/B9kBku8LfdsHzY3Eylqa54cnwJyGOkxKEdarxLHhBslrkwQqeflq1U+bm+4VB1ba URso52els4jrSO+6GTpY0jBtd8sD21HmHZQTMPy4gekYeaNkmNexB9KNQGxKrjsgsIZxhQ Qc8hSdjdHLMDpp1ejJkDYJx/q7c4EFHKe4hQGIZ0mkB1EH/t2+uBz/seLM4EnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ffzyAJZly1wVczMhVjyUzQmZFNYz8voF7kUQgCMfgAA=; b=rza8KHOdiMvZtqphXxkNhPk4dkD4MDFX9t90Eb7U1Td4KkTukqpKNEkOpSQCi81a9Bix0Z eRE6C0NcwHYPZvmXVHLKHRNdXxqQG/Xw9AtHkgfVU/y0oIbWJREcwhyIvPtP3Kx9188cCF HsMSQeTUfSkNuBLzRa09njhy/2QJnxBdB0/97MvCE4J36JV//na6Zee+1+aMWc/v03ocMr 5ucvxlwVKFyG0KqIGdPrOJV5Oza6/4jcC2dC5l3k/nBLTFWH0Hka2yyeS+k0F31BQDnIPy uShn9Sp3zV1ro49BnxtHjK137/D17BLWWVlnL+xT45A8+NNxo2RqPhBHmmxuFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712686; a=rsa-sha256; cv=none; b=uKk91ZTwEEObrbX2ktisrMXFvD+kN/84wItnqyScfjw7OpIBY/EeiyTlSgtcBK4eBQEPMH /+ZDShDXv2ux0rdZ3aulLHg56I7zfPjUlXKPC4Eb9mcEczY+7Ulawq6eBhZOCk2LBIgbG1 j7eHDrgwW7csUrp4zHXJgTO6OJrsUKt+toFMGY3cgh73fdPvvknwP0V4G6kEyD7vvdPft/ tHPA7vIJp4a+4bb/yyqeqC0f3p1F7ZyMTD0tKCV+9VhUGbyrHtdO9B5yimyiw+abyntZGG ZjWeYPFoGy4SrDuqcBI3IcOpGkn+uKx3gsx3RDBvvOV07WEIO1nWqpBWlr1/cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H8Z1nt3zJm4; Mon, 17 Apr 2023 06:24: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 33H6Oka7046144; Mon, 17 Apr 2023 06:24:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6OkKa046143; Mon, 17 Apr 2023 06:24:46 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:24:46 GMT Message-Id: <202304170624.33H6OkKa046143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f6954802a8c8 - stable/12 - bxe(4): Use CTLFLAG_RDTUN flag definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f6954802a8c8f635d519c694851636ad16327f8d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f6954802a8c8f635d519c694851636ad16327f8d commit f6954802a8c8f635d519c694851636ad16327f8d Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:22:55 +0000 bxe(4): Use CTLFLAG_RDTUN flag definition sysctl variables rx_budget and max_aggregation_size are read-only loader tunable. Mark them with CTLFLAG_RD flag. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit 8bd9afe9e1821368f4bb0d39c8c6703bf5007fd1) (cherry picked from commit f500ecbeae7ee62d1994155ff819cf8b59c5509e) --- sys/dev/bxe/bxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 8c61c5f34bd1..82851a804017 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -292,12 +292,12 @@ SYSCTL_INT(_hw_bxe, OID_AUTO, hc_tx_ticks, CTLFLAG_RDTUN, /* Maximum number of Rx packets to process at a time */ static int bxe_rx_budget = 0xffffffff; -SYSCTL_INT(_hw_bxe, OID_AUTO, rx_budget, CTLFLAG_TUN, +SYSCTL_INT(_hw_bxe, OID_AUTO, rx_budget, CTLFLAG_RDTUN, &bxe_rx_budget, 0, "Rx processing budget"); /* Maximum LRO aggregation size */ static int bxe_max_aggregation_size = 0; -SYSCTL_INT(_hw_bxe, OID_AUTO, max_aggregation_size, CTLFLAG_TUN, +SYSCTL_INT(_hw_bxe, OID_AUTO, max_aggregation_size, CTLFLAG_RDTUN, &bxe_max_aggregation_size, 0, "max aggregation size"); /* PCI MRRS: -1 (Auto), 0 (128B), 1 (256B), 2 (512B), 3 (1KB) */ From nobody Mon Apr 17 06:24: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 4Q0H8b592cz45QbV; Mon, 17 Apr 2023 06:24: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 4Q0H8b3w1Yz3hcn; Mon, 17 Apr 2023 06:24:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCTnCftfON8j2mmoF1nbJ3AancSryCCcxls25u+R6VY=; b=Zc2PPJgeqx5odWV6VMIjypN6ae1dIqj+d3hUTBujkvuhoXQohrCTPLjEvH2LiMhiKG8ge1 w0KRpGIN35JB8ghm9A5LlzHUg4tZDSpH8BEZ2ZCy+nhm/cU/+4sqB9ezCUtZf6ZU+wrZYD cuz9dxlHQNHPyfp1oG3AQDvjHPZPVV9i8jaOvppdr2W/PaaRiKI6Bl/MR5InREHShGEtKN glCr+w1n2Qpz7OSDcjHjix1eWm3HOAspAWTJODWbQ6tZSZhhOmxUB/m+QvNdTBF/haHXDB e/T8DvXhFc8NcRBZkAV1WaJbH1wC2fTpHzcpU9Cjsjd6iB8Neq0OA8B3lpqc7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681712687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCTnCftfON8j2mmoF1nbJ3AancSryCCcxls25u+R6VY=; b=vWHm9timUcYjiA1ayABISsCllAReDs3sAl5XpdN6WS0575aOOrIXk9/tCzQthfk6FP+aXq H0AumlUuUeN9QuhxFgRsPu3YYUrGjH0a/I0rTS3+6z1TPiLmU6mPF8sdf+kOGLYcS11We9 2ubjZzj+65UEWChOYfNcLpNfLMtY8ZElsup3Yi8usQczy0b7YhkasSK1y6VFji+ZgpP6Kg PJDQcSo0wmOA1Cyv+RM4yP9TbCYTuAm1mBw7uf/KZEfrF16fD7UgCRoK2yoMETGo7Fm+R4 bOpFUCshles/rpdzgXXxln1ld/SBFaPjGEUisHsP1/aIcRKzkLWNUZA+g3THog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681712687; a=rsa-sha256; cv=none; b=ByCbBUSdr43vAuGjS5CJWIdkq/GZ6oyB7pB0E2AmfMOs861BW6MQR2dxJVvGyBYCcT6CNb Z/p2fvFKw6JugN8QifvjGLVQcJK8Qa2dOoDeupEccG475qYeoQxNHfJkB1pDAttHzvs+/t YOthhZVikSHHyZNMjPPWcphtVbJfP+OkUjNrRzgkH8nNGslzXWm3CYGWEvEjtBp6soI4C3 6csAOuETjO/P/hIFQBu6AcaeEIG34cEnV5UaSmwtwwiiI9gPytpd3ZsSyNbBBgvlbZGpRf aeVZBzbAWAe4dnktiIp2Ve2AHGm4CgdN6vN645BJpzhsHiQGl+WBhv57dK+J5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0H8b2xylzJm5; Mon, 17 Apr 2023 06:24: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 33H6OlgZ046163; Mon, 17 Apr 2023 06:24:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H6OlX9046162; Mon, 17 Apr 2023 06:24:47 GMT (envelope-from git) Date: Mon, 17 Apr 2023 06:24:47 GMT Message-Id: <202304170624.33H6OlX9046162@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ae9a69acb145 - stable/12 - iicbus(4): Use the existing CTLFLAG_RWTUN flag definition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ae9a69acb1457b6db64fb9e8f93bbdb69461adbb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ae9a69acb1457b6db64fb9e8f93bbdb69461adbb commit ae9a69acb1457b6db64fb9e8f93bbdb69461adbb Author: Zhenlei Huang AuthorDate: 2023-04-12 04:20:38 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 06:22:55 +0000 iicbus(4): Use the existing CTLFLAG_RWTUN flag definition Use it when possible, instead of separated flags. No functional change intended. Reviewed by: hselasky, erj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39466 (cherry picked from commit deac4c7f0753841de8da4d7f37d7e49620b3bbb4) (cherry picked from commit 07bd2fc4022cc7da8c764b25d29aaf98d7a1647f) --- sys/dev/iicbus/iicbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c index b16a2bdba332..9d6f49de0582 100644 --- a/sys/dev/iicbus/iicbus.c +++ b/sys/dev/iicbus/iicbus.c @@ -325,7 +325,7 @@ iicbus_init_frequency(device_t dev, u_int bus_freq) */ SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "frequency", CTLFLAG_RW | CTLFLAG_TUN, &sc->bus_freq, + OID_AUTO, "frequency", CTLFLAG_RWTUN, &sc->bus_freq, sc->bus_freq, "Bus frequency in Hz"); } From nobody Mon Apr 17 06:30: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 4Q0HH53G6Bz45RD2 for ; Mon, 17 Apr 2023 06:30:25 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 4Q0HH46TF2z3sS3 for ; Mon, 17 Apr 2023 06:30:24 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3f0a80b683fso13139005e9.3 for ; Sun, 16 Apr 2023 23:30:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681713022; x=1684305022; 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=GpIjOYiQzE4p4FflA/ogL1vLMvWmX7sajFph8kCDuQ8=; b=bhB0tV+0yvimGwIVVQ1Mk/QYENdliOkiI9XrkAOhGhTe1fO8GT8JhjSqXV31HaI0ES UdDCd81YWUWWWzrUFmGVGo1Whrt3Fh0nKHnUvFlv87sbcmRHxekthIPndp8A791S/ZTT Wjs3Hm1eTTwJw9p+w0dnHIqZ2SW2tkjMlCj53Ve4v+cUEWpRmpVSUqX3Z2PS3QPA62h8 x0Vx0z+mZEHkM7CJSQj8qi02UCeDwt2vUFUfx6SYqT8V0t+BcD9AfZrqWzmx9pNywWIW GoFyQ8u9gAFn9Dcqu0LgVOdz0sczXm4UsAaEST8sZTkS7n1+YvsvGOJt3h4iYYVEYjNF RWnQ== X-Gm-Message-State: AAQBX9fCZCBeNVFbgUxU0tpxPUTxQXqCT1af77vx9wpYo8hErpXGN1JI DcL+TtUlKE7TOse+/fhdrEFjRg== X-Google-Smtp-Source: AKy350bCJB8XZOC/XAduEyRQmPjHMO0eNgVqzJNnoFskxzX+XcLfjkFaVU0/lVIkgYGryabeylHauA== X-Received: by 2002:a5d:658a:0:b0:2f0:bab2:dc3c with SMTP id q10-20020a5d658a000000b002f0bab2dc3cmr4556449wru.27.1681713022732; Sun, 16 Apr 2023 23:30:22 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id p14-20020a05600c468e00b003f16ed11cf5sm5187701wmo.37.2023.04.16.23.30.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Apr 2023 23:30:22 -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 \(3696.120.41.1.1\)) Subject: Re: git: 6ae8d57652fa - main - mac_veriexec: add mac_priv_grant check for NODEV From: Jessica Clarke In-Reply-To: Date: Mon, 17 Apr 2023 07:30:21 +0100 Cc: "Stephen J. Kiernan" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <8180B6AE-D70B-443D-80BA-1667E4642854@freebsd.org> References: <202304162314.33GNEwXd039914@gitrepo.freebsd.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q0HH46TF2z3sS3 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 17 Apr 2023, at 06:47, Alexey Dokuchaev wrote: >=20 > Jessica, >=20 > Please don't overquote: you complain about commit log, but included = the > commit diff in you reply. Why? This is quote annoying on slow = networks > and could cost people some cash on metered connection. Seriously? I=E2=80=99m hardly the only one to do that sometimes, and = there=E2=80=99s no rule that I know of against it. I only trim when things get unwieldy, but I=E2=80=99m not going to trim for a +45/-2 diff. My whole email was = 7 KiB *including* headers, with the commit diff being about half that, and it=E2=80=99s 2023. This is quite an outrageous complaint to make in my = opinion and I question why you=E2=80=99re going after me rather than anyone = else, especially when it=E2=80=99s about 3-4 KiB. Your complaint is already = about 5% of that, and this response is about 15%, so between them that=E2=80=99s = 20% of the complained-about amount exchanged again. That=E2=80=99s how tiny the = amount of data you=E2=80=99re complaining about is. > On Mon, Apr 17, 2023 at 12:40:07AM +0100, Jessica Clarke wrote: >> ... >> Hi Steve, >> I see you've made a bunch of commits over the past few days that = suffer >> from not following the proper commit message formatting outlined in = the >> Committer's Guide >=20 > What's exactly wrong with them? They appear more elaborate and = detailed > than usual, I like this. * The trailers shouldn=E2=80=99t have blank lines between them * It=E2=80=99s Reviewed by, not Reviewers * Subscribers isn=E2=80=99t a thing * Some had Summary: as the first line of the body These are all just a case of taking Phabricator=E2=80=99s auto-generated = commit message and pushing that without taking the time to turn it into a message appropriate for FreeBSD. Jess From nobody Mon Apr 17 06:53: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 4Q0HpJ3hZrz45SlX; Mon, 17 Apr 2023 06:54:00 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0HpJ3540z4PYw; Mon, 17 Apr 2023 06:54:00 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681714440; 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=Qk1uScGEC8F8NELDxqqwD2lSCrjzbhR3aTojJ5PEtr8=; b=MPnG7EhDmgCETqEhULcfb4MRjKYzL79dO9hlBnerhvYV2A+h0DCeoDuAUJKTOTA0hiE9c4 ZHfLqzHhNqq9Zz5p7ueO6rEqmJdMYbP/NvVp1EMrU8JoEnk4tJmB6BUan6BQtfCFR3dU1f Sc74jS1mljFw87AO5OShokzEuc2rzghoNx288TXuhrFrC29TqS4fqBQlVpgMlmv4oKjtjJ 2OQg+9H0LGZbT1cwnwJEJHEl7ryYxJmjQSGNxjCzf5DyzgUzG9tr3C+tPcp0tyRF4cdScK NzfpZA8S92D9UM43osnqJzKHCIXVZHy1EefU3ectNWIZBC/FHmH/ErChEwFXxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681714440; 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=Qk1uScGEC8F8NELDxqqwD2lSCrjzbhR3aTojJ5PEtr8=; b=H4gUZfYQILLBPv+eQjq2e3bqmSMKKv+CaO3U1RWpTSFQ8vcITx2IA9kY8a7X7uUtAJyCke Ol3/6FftK1xEONwuNCRSHUgB/kay/KlZltv18MTiahno5pCE34WU2sqeJ02OHmlyWhqIji LJ0kLgmAdL01Tc069QGuNpKPq5nFL5Qh7ln4sXG4DdKZmc7v3ybCjp2xCLnIEAjCz15/UK GO+tt+8htGQ/24jsRO4/34ksaAFooyIepfuOpcIy74WC0NldCShKq6ne1MRTkb1SQDGwpp hVyjCSPRbJFsfx1rdtUyGNUOJ7MqPkd8ur4yPBv9h4edyrntIMSODM8in7+DxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681714440; a=rsa-sha256; cv=none; b=c8W7hr40Vqyzi+qx0JG5pAY7NLoLb9qyj6qtU43DrPd3B0QoH41SaXswkRIHbcykgf30lI HsHdHXCFt5yMm9FuQ/E3zPH7c4/kt2QPgSTe+RT0iKfQfOgjnFyeldTU7exYB5ZBtWS2hZ crBEvhz4d7aHbY7Y2FADaZlKKfcBUcvDDkh4tTBk+hyKSNw90DCQ4VQj1FmT92j8F2OLZ3 crVeQ6uaUU73yAuLcUSOOzy0Lf58mxiA0I6jWzNbxs4hcCOWB3PwwUbFxBULen0QaaGkOw Wo8UaDvJWLHHmoCfHNbzJzaR6dflllGQp4ezwWhWkj4Sj8wMPpYzlrrft+r6jw== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2E4343049; Mon, 17 Apr 2023 06:53:40 +0000 (UTC) Date: Mon, 17 Apr 2023 06:53:40 +0000 From: Alexey Dokuchaev To: Jessica Clarke Cc: "Stephen J. Kiernan" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 6ae8d57652fa - main - mac_veriexec: add mac_priv_grant check for NODEV Message-ID: References: <202304162314.33GNEwXd039914@gitrepo.freebsd.org> <8180B6AE-D70B-443D-80BA-1667E4642854@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: <8180B6AE-D70B-443D-80BA-1667E4642854@freebsd.org> X-ThisMailContainsUnwantedMimeParts: N On Mon, Apr 17, 2023 at 07:30:21AM +0100, Jessica Clarke wrote: > On 17 Apr 2023, at 06:47, Alexey Dokuchaev wrote: > > Jessica, > > > > Please don't overquote: you complain about commit log, but included the > > commit diff in you reply. Why? This is quote annoying on slow networks > > and could cost people some cash on metered connection. > > Seriously? Yes. > I'm hardly the only one to do that sometimes, and there's no rule that > I know of against it. Sadly, you're not the only one; people do it all the times these days. That rule is part of the netiquette since, IDK, 80's I guess? > This is quite an outrageous complaint to make in my opinion and I > question why you're going after me rather than anyone else IMHO there's nothing outrageous about it and I've asked other people to not overquote before. But okay, next time I'll make sure not to bug you again if you take this so hard. > These are all just a case of taking Phabricator's auto-generated > commit message and pushing that without taking the time to turn it > into a message appropriate for FreeBSD. I see; I thought there was something wrong with the commit log itself, not the accompanying metadata. ./danfe From nobody Mon Apr 17 08:33: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 4Q0L1v1bjJz45ZGM for ; Mon, 17 Apr 2023 08:34:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 4Q0L1t5qQ4z3Q8n for ; Mon, 17 Apr 2023 08:34:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-50672fbf83eso13676699a12.0 for ; Mon, 17 Apr 2023 01:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1681720448; x=1684312448; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Fs1Ym0hV2Z4+ufMXi99d9K+j5Xyr/qv/i2MSqJc27jA=; b=SoUL/0YAKdBViY1uI5PhhGqXUh1jmEyVgqEu8J4dENzvG7p3vQa4lhtBXqzSJNqIXN 45FyWsBS0EGbze//aqMvRloLQksPYGWaEqkKUOSIFXbpeSHoR88nS2qh9UyrYtvUTu9y G2jWEMzzVSy8Nh+cG9ist/R/0hL/YRqcvN9tSV/1e+J2dqCbMPRxwdx1fciXaTfnzu3g oR3I5DuB2GD8zZcZxdzndcRstD6lwLXejS8iZjCUUwur7Wn0mvLDj4ll65KOhKxfUujV c1sMdGkum7cURZmoOytCT7rcIfOhU/oQQCaHDjMzDdIXx2IM2f6SnqMJJX0ypN93bW04 iewA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681720448; x=1684312448; 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=Fs1Ym0hV2Z4+ufMXi99d9K+j5Xyr/qv/i2MSqJc27jA=; b=U6CH9uuTDsc7o8B0A7tW5FJF4X1e1K0BvcmLpUPjcLgBRdOSjMmo9Qcvh2wgMoBUPs LUo5FDRrFG0M5RyVBdGaIO63cdCSaDzDk8k5zKEqlqlYFZLT0KDIyvzGpJ9JN7Gr08+6 Mwq5rW5luN9VjUX+2cVeHTg/eiGIbrk9BnOGHxuy7SNjakZdx+nSqAHEPFRUvU7GixMo QwcN0RiYcjen9Llor+RVQBMJdeLuKVr1fzXbuLGaFK44TvvTxveZ+OHMiuZJHVEHra60 ZVNK5iY5QDsFO0J6qSl4k9W/yGekAmIIa68r40pyFPVxhmN4x5iuAboHYKkR6iFEHRVc /QAQ== X-Gm-Message-State: AAQBX9dmS4j/qeq0WfOQb5n7Wy8SyPf+cRG6QbeFndEmIM91KxvJSmB5 8XI2HYf2wCutDVQZqHOQybL1cSTX2aOMdt1cEgvZ1w== X-Google-Smtp-Source: AKy350ZjDRhXZM0u8q+IgSqDJ2+0ZB/Cbtcm+aWq1As6bnUQylnp6g1tzOyZP/JQJSlPdAMuxc/1R2L6FItnv9tXq2s= X-Received: by 2002:a05:6402:35c3:b0:506:7c85:f470 with SMTP id z3-20020a05640235c300b005067c85f470mr6562479edc.3.1681720448481; Mon, 17 Apr 2023 01:34:08 -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: <202304162314.33GNEwXd039914@gitrepo.freebsd.org> <8180B6AE-D70B-443D-80BA-1667E4642854@freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 17 Apr 2023 02:33:57 -0600 Message-ID: Subject: Re: git: 6ae8d57652fa - main - mac_veriexec: add mac_priv_grant check for NODEV To: Alexey Dokuchaev Cc: Jessica Clarke , "Stephen J. Kiernan" , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000f18efb05f9840d8f" X-Rspamd-Queue-Id: 4Q0L1t5qQ4z3Q8n X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.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 --000000000000f18efb05f9840d8f Content-Type: text/plain; charset="UTF-8" On Mon, Apr 17, 2023, 12:54 AM Alexey Dokuchaev wrote: > On Mon, Apr 17, 2023 at 07:30:21AM +0100, Jessica Clarke wrote: > > On 17 Apr 2023, at 06:47, Alexey Dokuchaev wrote: > > > Jessica, > > > > > > Please don't overquote: you complain about commit log, but included the > > > commit diff in you reply. Why? This is quote annoying on slow > networks > > > and could cost people some cash on metered connection. > > > > Seriously? > > Yes. > > > I'm hardly the only one to do that sometimes, and there's no rule that > > I know of against it. > > Sadly, you're not the only one; people do it all the times these days. > That rule is part of the netiquette since, IDK, 80's I guess? > > > This is quite an outrageous complaint to make in my opinion and I > > question why you're going after me rather than anyone else > > IMHO there's nothing outrageous about it and I've asked other people to > not overquote before. But okay, next time I'll make sure not to bug you > again if you take this so hard. > She's right. Nobody cares about over quoting any.orr until it gets ridiculous. Warner > These are all just a case of taking Phabricator's auto-generated > > commit message and pushing that without taking the time to turn it > > into a message appropriate for FreeBSD. > > I see; I thought there was something wrong with the commit log itself, > not the accompanying metadata. > > ./danfe > --000000000000f18efb05f9840d8f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Apr 17, 2023, 12:54 AM Alexey Dokuchaev <danfe@freebsd.org> wrote:
On Mon, Apr 17, 2023 at 07:30:21AM +0100, = Jessica Clarke wrote:
> On 17 Apr 2023, at 06:47, Alexey Dokuchaev wrote:
> > Jessica,
> >
> > Please don't overquote: you complain about commit log, but in= cluded the
> > commit diff in you reply.=C2=A0 Why?=C2=A0 This is quote annoying= on slow networks
> > and could cost people some cash on metered connection.
>
> Seriously?

Yes.

> I'm hardly the only one to do that sometimes, and there's no r= ule that
> I know of against it.

Sadly, you're not the only one; people do it all the times these days.<= br> That rule is part of the netiquette since, IDK, 80's I guess?

> This is quite an outrageous complaint to make in my opinion and I
> question why you're going after me rather than anyone else

IMHO there's nothing outrageous about it and I've asked other peopl= e to
not overquote before.=C2=A0 But okay, next time I'll make sure not to b= ug you
again if you take this so hard.

She's right. Nobody cares about over quo= ting any.orr until it gets ridiculous.=C2=A0

Warner

> These are all just a case of taking Phabricator's auto-generated > commit message and pushing that without taking the time to turn it
> into a message appropriate for FreeBSD.

I see; I thought there was something wrong with the commit log itself,
not the accompanying metadata.

./danfe
--000000000000f18efb05f9840d8f-- From nobody Mon Apr 17 09:25:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0M8v2brqz45dXr; Mon, 17 Apr 2023 09:25: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 4Q0M8v210fz3s8J; Mon, 17 Apr 2023 09:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681723519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AWvlFZIfnDApP0kI74N1RBjD8w9QaH4lbtjjV8CNs1w=; b=MSD2yZJRNHx3+mSLKDi3jiped5dDgoszrgAj01UGGGzKHW2Ik7Vhxx6MdpP6POxL7zLEhI M1WqOtOPL0pqwLj/ZCgpdD7xUHox+Ln1Eh/i72spwGQ+UjKaeEtjgsqp8uVXoXWTqLwaQi TpOzmM/iGzArlqSS49elx0tUGwl+LCZp2zKPiMmuAZHFukI644Ve6YajrvtLwZlBGy3h+C AT0YBGvL/83791NWxXlIVRfZiOfWhcGmbF11sCozA7pJeNeDaAcllgFVSg28Q1CYlW5/2O DrNj9Cq0O0YChEXr5Bgv7M4j0sEuYrnZVhTQDPdDKVKv3t2KsU8tHYWVQdjYUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681723519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AWvlFZIfnDApP0kI74N1RBjD8w9QaH4lbtjjV8CNs1w=; b=TGabNAgxHDVz72T8C7GRHFkHesQBvVcuj8+14ba6YOYsVc5ZUbtzzUO/5HOqFXXEF5amWi hhfz5Gd+U0tVqQXsR5GPmKZQWUpngQchw05ybBOka4QbCkepCGCAA1TCt5VqXqdVZQV2qq I2RH0LHAfDs2O497FZarWm1NG7SxssmKjFS2zYuFGxl7wrRoJZ3DBZWkdCunu12gtP9YJH aQaE32HkLNYR+MKUIlTPmvCZFfaYIvGidqWj3Fmtfmpuxlq5Mrgc/erODr1vHTYIY7aeha zKVGlYMjnW+SF7QAQ5cfxYQ4E3PDrGR9sFKV2ks2KiwRCEUUR56XVB4vXoxqig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681723519; a=rsa-sha256; cv=none; b=s+A4ghaMiWb+r7Z7aOr43GdhmKQ2qhK2SNZEBkEhTKzHx5q6xPP+7wFftwdwg5Fp9YH27A bmF8k1R6r6MOe/jHJPq0MqDrL0UysPpYTlEXGfHVuwT2pHgeGYsZ4LzZeYlFXyPzmnkxI0 gsibodiJupvOTEff/HzpuqHuV3Vc7tn15Beykc8uwE4PIV69C/QLFJuMUK0NutOxzpupmm 8ZTBW7RLLvdWzB/cJU190IU7ESWFDTCVo0Bib+fxqQHO7DA99+f8rpevFfjKODKg8PRw0I fvNu9Jw1/rVuWug4r7OGi9gaU6G/CgVbsl0ViwGdl//0xVdyaq2p8eJeqvabDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0M8v1108zNq5; Mon, 17 Apr 2023 09:25: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 33H9PJi7042115; Mon, 17 Apr 2023 09:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H9PJoS042114; Mon, 17 Apr 2023 09:25:19 GMT (envelope-from git) Date: Mon, 17 Apr 2023 09:25:19 GMT Message-Id: <202304170925.33H9PJoS042114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: e0bb19992556 - main - zfs: cherry-pick openzfs/zfs@c71fe7164 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0bb199925565a3770733afd1a4d8bb2d4d0ce31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=e0bb199925565a3770733afd1a4d8bb2d4d0ce31 commit e0bb199925565a3770733afd1a4d8bb2d4d0ce31 Author: Pawel Jakub Dawidek AuthorDate: 2023-04-17 09:19:49 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2023-04-17 09:19:49 +0000 zfs: cherry-pick openzfs/zfs@c71fe7164 Fix data corruption when cloning embedded blocks Don't overwrite blk_phys_birth, as for embedded blocks it is part of the payload. Reviewed-by: Richard Yao Reviewed-by: Brian Behlendorf Signed-off-by: Pawel Jakub Dawidek Issue #13392 Closes #14739 Approved by: oshogbo, mm --- sys/contrib/openzfs/module/zfs/dmu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/module/zfs/dmu.c b/sys/contrib/openzfs/module/zfs/dmu.c index ce985d833f58..cda1472a77aa 100644 --- a/sys/contrib/openzfs/module/zfs/dmu.c +++ b/sys/contrib/openzfs/module/zfs/dmu.c @@ -2312,8 +2312,10 @@ dmu_brt_clone(objset_t *os, uint64_t object, uint64_t offset, uint64_t length, dl->dr_overridden_by.blk_phys_birth = 0; } else { dl->dr_overridden_by.blk_birth = dr->dr_txg; - dl->dr_overridden_by.blk_phys_birth = - BP_PHYSICAL_BIRTH(bp); + if (!BP_IS_EMBEDDED(bp)) { + dl->dr_overridden_by.blk_phys_birth = + BP_PHYSICAL_BIRTH(bp); + } } mutex_exit(&db->db_mtx); From nobody Mon Apr 17 09:25:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0M8w4LnQz45dDY; Mon, 17 Apr 2023 09:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0M8w2pJKz3sF8; Mon, 17 Apr 2023 09:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681723520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTVB55sfuR2W3vFZQvq1We7psXr/sZtSra1YD6vd50U=; b=XlpVgtIAJua1cP6EdlXhUaXzA3O9Pe2FleP0vjbzg4Sp9yh0RNxcEzExpZ80xpJ5lr8Zsx sxGoMK4BmSZn+l9EJLtx5CKEpHW11CYAe6oO5+hEdNmB2WeuFx50+kPXE8lpo6vYq1pZf+ MV6MlAkGXDi9dPTYSQMVEuhlBwH+QaAGCr1GcHhpCjveaTj7qHTGiBrfsTdRwM+ZrExv4U dcl7l6AnCdn5aMOqJnwslpu92UWkAE/KM+Xrhm4cbd6+eJAImlOm4RcrjVhrWy6qMUKA2/ 3h8KNd7UFwA3/SQ2LPE7AxT16Pj0xO35EtHuakUIjhD7wI7bjKlKjm1LaXm4OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681723520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTVB55sfuR2W3vFZQvq1We7psXr/sZtSra1YD6vd50U=; b=dGBZKj0DiJc3pOMSKJ40GCEDcHD/cdFB2ClTDiFuLt5wIMtqmHG9Ac0/B9tXLVBvwTbOdI ez7GeFOKfSeSqWbEXzaBEVr010mD5dY3+uvdG79d9UMYR16Rj+B6Ot7md2jInlrIDkSDiE mATW50lXRW0GBBPcN6a5Os9IdR1EN9+mOKfLA4PhHewRhvz5o+MhxNVCzOPUWBuFi+xAQb qpiTQFix6UdsiLuM/LCHbGhJbk6g0pjnzACPVSSszuFFlXg3PxjgOuUkvayOK6hlElIoRe nZWVcQPfjIdBuY9imewHTQUYkrP3vL7oY1RPl/F53f4TLKmcnFQ0cTPt7R2p9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681723520; a=rsa-sha256; cv=none; b=FZUOLCOFpHTUYmO9SFrVmSmjqbFizky/w6rAHGy2EXDE5d5H56j8HP7/eZ8Rw50XK4SDkb PJ6Z3MRtAFXD8uUJzHraBXtyVMHf7Ncv5+etaVvArvSMSsYOHvW7xVk47aTE+ZauFRnGM+ zK/k74FemnsGlQmZ0QoEO1JeSVkfjYqZUD3NQHnv5h6mDWprxpL9OQ8kR00iw0H81uMOJD BaAib42+ZbF4MvGMTm1+L1AAjuAgXHs8zHPVGoDsnvM2FiYHYFHo+20tJezy0J5gqTbVlh IsO4S1NDevrClrRMm8zv6+JG98WMTlW0CkvsXilD1o+sw1TJX2/tjKjCW93jMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0M8w1SdqzP2m; Mon, 17 Apr 2023 09:25: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 33H9PK8b042144; Mon, 17 Apr 2023 09:25:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H9PKPP042143; Mon, 17 Apr 2023 09:25:20 GMT (envelope-from git) Date: Mon, 17 Apr 2023 09:25:20 GMT Message-Id: <202304170925.33H9PKPP042143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: 1959e122d932 - main - zfs: Merge https://github.com/openzfs/zfs/pull/14739 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1959e122d9328b31a62ff7508e1746df2857b592 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=1959e122d9328b31a62ff7508e1746df2857b592 commit 1959e122d9328b31a62ff7508e1746df2857b592 Author: Pawel Jakub Dawidek AuthorDate: 2023-04-17 09:22:56 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2023-04-17 09:22:56 +0000 zfs: Merge https://github.com/openzfs/zfs/pull/14739 The zfs_log_clone_range() function is never called from the zfs_clone_range_replay() function, so I assumed it is safe to assert that zil_replaying() is never TRUE here. It turns out zil_replaying() also returns TRUE when the sync property is set to disabled. Fix the problem by just returning if zil_replaying() returns TRUE. Reported by: Florian Smeets Signed-off-by: Pawel Jakub Dawidek pawel@dawidek.net Approved by: oshogbo, mm --- sys/contrib/openzfs/module/zfs/zfs_log.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/contrib/openzfs/module/zfs/zfs_log.c b/sys/contrib/openzfs/module/zfs/zfs_log.c index d009c58d8644..50325907b0d1 100644 --- a/sys/contrib/openzfs/module/zfs/zfs_log.c +++ b/sys/contrib/openzfs/module/zfs/zfs_log.c @@ -905,9 +905,7 @@ zfs_log_clone_range(zilog_t *zilog, dmu_tx_t *tx, int txtype, znode_t *zp, uint64_t partlen, max_log_data; size_t i, partnbps; - VERIFY(!zil_replaying(zilog, tx)); - - if (zp->z_unlinked) + if (zil_replaying(zilog, tx) || zp->z_unlinked) return; max_log_data = zil_max_log_data(zilog, sizeof (lr_clone_range_t)); From nobody Mon Apr 17 09:30: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 4Q0MH631mDz45dhk for ; Mon, 17 Apr 2023 09: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 4Q0MH56RnWz43nM; Mon, 17 Apr 2023 09: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=1681723842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BIfdDF86h46ARta2lk89p4wDRq0ZiQmRulOeTC3vrcU=; b=WUMxs4+1XZDsurhYsabc50ENDzJFntMA1cPJZgw6sii9xwCD7VdnAkRLoQSu/bmjbbt/en vPe2yeNXzUvJ1crnCG/00DWkt5Z6HFIUcqVV7+S1DyP6ZbOSU3bN1LnuTqZyYLK2h9F9QG Uu8RQYfPMNvmEmVm3FAfZYx9TPbVuiBaFnK3uNm5QGDEBkZ0VhlwLH5IvSQLkxrb2Ju9MN g4vfovqlWDRtv36p2G/HRHzmfhMwK5K1Q3kzozIR8TTEQPA2XyR82QH0yaGPQnkrKHvQER 6RFqSqnJr9yVr02uVXosvUzJQ4YgyQkFTqtTnoedX5v9c/qAMPhEv5nMk9fsOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681723842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BIfdDF86h46ARta2lk89p4wDRq0ZiQmRulOeTC3vrcU=; b=CGxJwHjzKRduB+tEYbGZgV3HvUXjS0P7x0Zq9hysuriuOzml6i19VOxlmfNxRBIBHkSh74 ZybKwjfgwCmCKBfQ57LG0rZmVdwhJxKDUbZnrRTLoUDYiXbUnaoyI3Uzq6EWWpcwSRoB3N EN8ACCqwkdYwbCmFYEqrNUnEHyOhvhwYRy8G4vjIjzZ0iQSvE6lFcXMQuU8UOkA3b1oSIY Ip2LHq7RFvR1nxfW+sbFOFU0sZTPaW4y1LpuVfQNs0ViKE28O4ME9oNra9di5L2jFtLWQt 56PFhtGxkzX/k/qXBfftqirvGbys3CddjBPM08U0XhrQcaCLtk15TEi/4pjMAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681723842; a=rsa-sha256; cv=none; b=T1y0LPVZ3X9MqHwn4I81bWZZSl6OmpzWY6LDdI0jNppwT5pZy4XnP09E/UUPvBskBNoO7z 6Plp0sD+JF6mR4bCpi8cFN2n/+hJRR42c0hzB12ue+eawBmmQJEZEkxLqIht6S81RviGoD XUHNp0zpU5FkyJ/MnS/OGsLZxZlu8YSrqmL0WpRnS7cPVSjWts8OPPvLYHNGws1ZSf1WTw dh9tNBtxI8OREE9GaZLHVYu64Iv/aXcJEIcTLXHJR0GGXiP0XH67z7TvSsCgRQaEARSoez yjE2pAw4ZBVUQSJKzRMkc0AN1DWjsYq1aOztPsrwD4+3BGVJXNxGwFX6kZiglw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0MH46wLhzP2x; Mon, 17 Apr 2023 09: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 33H9UeCL051991; Mon, 17 Apr 2023 09:30:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33H9UerW051990; Mon, 17 Apr 2023 09:30:40 GMT (envelope-from git) Date: Mon, 17 Apr 2023 09:30:40 GMT Message-Id: <202304170930.33H9UerW051990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 92e0d9d183ce..33003ecc93ef - vendor/openzfs/zfs-2.1-release - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/zfs-2.1-release X-Git-Reftype: branch X-Git-Commit: 33003ecc93ef532e41255a6f91c585b26f871ec0 X-Git-Oldrev: 92e0d9d183ce6752cd52f7277c8321d81df9ffee X-Git-Newrev: 33003ecc93ef532e41255a6f91c585b26f871ec0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openzfs/zfs-2.1-release has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=92e0d9d183ce..33003ecc93ef 5161e5d8a40e Allow mounting snapshots in .zfs/snapshot as a regular user e45a981f6d12 Avoid a null pointer dereference in zfs_mount() on FreeBSD 8473829d1f1f initramfs: Make mountpoint=none work 57159a519b88 Fix a race condition in dsl_dataset_sync() when activating features 083239575a2a Partially revert eee9362a7 aa256549d130 Move dmu_buf_rele() after dsl_dataset_sync_done() 704374282848 Revert zfeature_active() to static 41fb4e071c65 rpm: add support for openEuler df18a443969a Set DEFAULT_INIT_SHELL to /sbin/openrc-run for Gentoo and Alpine fce0f7aff4a6 autoconf: add support for openEuler 82e311709568 Optimize microzaps 2098a0031802 Remove atomics from zh_refcount eb68e3cd5655 Micro-optimize zrl_remove() 04a6ae05850b Switch dnode stats to wmsums edaa250bb3b0 Remove few pointer dereferences in dbuf_read() c8d36e219233 Pack zrlock_t by 8 bytes fd0893cf1ff3 Introduce minimal ZIL block commit delay b644a45bd4cd Prefetch on deadlists merge 9d2e5c14b2f9 System-wide speculative prefetch limit. 231a37c4c0fd Optimize the is_l2cacheable functions 6281b5c4882f Add missing increment to dsl_deadlist_move_bpobj() 576d34cb1124 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs 050be02c02f1 initramfs: fix zpool get argument order 0a4e41d0fadb Ubuntu 22.04 integration: GitHub workflows 1d2aea771170 Workaround GitHub Action failure 4f6e0ca117aa Update workflows 4b3133e671b9 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() a5c469c5f380 Fix for mountpoint=legacy 345f8beb5835 QAT: Fix uninitialized seed in QAT compression 48f376b0c51f Improve arc_read() error reporting 5219a2691e3b FreeBSD: Remove extra arc_reduce_target_size() call bd9a9a4e1ad3 zed: mark disks as REMOVED when they are removed 43d63ab2d4c1 zed: post a udev change event from spa_vdev_attach() dedd8243fc8c zed: add hotplug support for spare vdevs aa7258ced0dd Update vdev state for spare vdev 59f187563937 linux 6.3 compat: add another bdev_io_acct case 374f86b5c9ec Add more ANSI colors to libzfs 433b9a89c48e Colorize zpool iostat output 3da577280a13 Add colored output to zfs list 164d184ed9d1 Additional limits on hole reporting 777c98ee524f Use setproctitle to report progress of zfs send 0e30635f9c0b zfs_main.c: fix unused variable error with GCC c63b47e4dac9 Fix console progress reporting for recursive send a164143dfd31 Linux 6.2 compat: META a69765ea5b56 Add Linux kmemleak support to ZTS fc2c0256c55a ZTS: Log test name to /dev/kmsg on Linux 3d9f37026d65 Fix "Add colored output to zfs list" e202d3b8673d linux 6.3 compat: needs REQ_PREFLUSH | REQ_OP_WRITE 07cc8ae46ac2 Removed Python 2 and Python 3.5- support 33003ecc93ef Tag zfs-2.1.10 From nobody Mon Apr 17 09:49: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 4Q0Mhb3XbFz45fRX for ; Mon, 17 Apr 2023 09:49:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (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 4Q0MhZ6gMHz3P9K; Mon, 17 Apr 2023 09:49:18 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oi1-x235.google.com with SMTP id a7so2643584oiw.7; Mon, 17 Apr 2023 02:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681724958; x=1684316958; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=igz7ifDNNd9gaKoeiAQ9j3LNrH1ELDLYX2xrCPBKUhQ=; b=Zj2GQmcSooyWCuGks3SbuB6nJzC0wh3um6TMwII31kzZPhP5UFYObch84V2q+8N7i3 NteiKfQKA+efLr8bqQD8GHsRGhhTaiwsdpPAFjAhvk/Ix/oRKm/AGRxEidl9R7Cb2Wr7 A3Beo5zVZi32WLxf+xKOmrXnrRP7ENARdl4szULvZk7E1LaAVm3gXc1zRS5qs2pKpVsU h4n3uy0cfG+41efGoUn4YvuULj86ehtu4Lgjg222Qw92vsBC0OEZuHHYrclKLMcpKDac fMapGzpWRX1JORzUyvYbEP40ZtHctdoQW2KCMF6FNLS64p3rrMfujYVSFZky9efP2+ST hRIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681724958; x=1684316958; 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=igz7ifDNNd9gaKoeiAQ9j3LNrH1ELDLYX2xrCPBKUhQ=; b=P6CUk+k6/40JWEfRToZOE7MweN2wxy9prCiKprGLb2M8A5QsitofdFmg6R4IKJyiZF JzuVTAx//fGUVQMTuoCZHsl9nsrM+ouMpbDN2wbBOkKi3NtQpDD6RJIn+QWxwanf2Tge lyYIKhsHXMy2jDbP73NrjHpEwWLfm1CsFcOjQh8S5haaapXGAXXg4lYWCdLhVnLDII3B ONh2Vbu8hlCyScs0WzR1yzpVt4Lpj+jVv/Re67HGVq+km17mCbzLHHMD6ZmhPTRxjC+C yfBXkbwfBKPs/b7usoG4xYjjuOqGRQwzjWPM+UlNXKpKTNF/rdRmHWwTP0Dg7a/9B7q9 Vz5w== X-Gm-Message-State: AAQBX9c5iLYOT8TlUrNAdyVsRmmdzC9yKAV31QzW1mIu+TM74FyNF84U cEkJHEfdrpLA1rUm9nIQGWDMykQtv1UwBzZUnsqZ/mZ4 X-Google-Smtp-Source: AKy350b1eyZuENvN0pA8tD9+Q5eFLiPo4wksPKlNnslGhVK+s+2Ko+FxHp+jdEUNs54JWBz76rh8E3sY/Magq58CD7c= X-Received: by 2002:aca:f30b:0:b0:38e:c90:a745 with SMTP id r11-20020acaf30b000000b0038e0c90a745mr399774oih.4.1681724957957; Mon, 17 Apr 2023 02:49:17 -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:46:0:b0:49c:b071:b1e3 with HTTP; Mon, 17 Apr 2023 02:49:17 -0700 (PDT) In-Reply-To: <202304170930.33H9UerW051990@gitrepo.freebsd.org> References: <202304170930.33H9UerW051990@gitrepo.freebsd.org> From: Mateusz Guzik Date: Mon, 17 Apr 2023 11:49:17 +0200 Message-ID: Subject: Re: git: 92e0d9d183ce..33003ecc93ef - vendor/openzfs/zfs-2.1-release - vendor branch updated To: Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Q0MhZ6gMHz3P9K X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This introduces data corruption from 4b3133e671b9 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() https://github.com/openzfs/zfs/issues/14753#issuecomment-1510734027 On 4/17/23, Martin Matuska wrote: > The branch vendor/openzfs/zfs-2.1-release has been updated by mm: > > URL: https://cgit.FreeBSD.org/src/log/?id=92e0d9d183ce..33003ecc93ef > > 5161e5d8a40e Allow mounting snapshots in .zfs/snapshot as a regular user > e45a981f6d12 Avoid a null pointer dereference in zfs_mount() on FreeBSD > 8473829d1f1f initramfs: Make mountpoint=none work > 57159a519b88 Fix a race condition in dsl_dataset_sync() when activating > features > 083239575a2a Partially revert eee9362a7 > aa256549d130 Move dmu_buf_rele() after dsl_dataset_sync_done() > 704374282848 Revert zfeature_active() to static > 41fb4e071c65 rpm: add support for openEuler > df18a443969a Set DEFAULT_INIT_SHELL to /sbin/openrc-run for Gentoo and > Alpine > fce0f7aff4a6 autoconf: add support for openEuler > 82e311709568 Optimize microzaps > 2098a0031802 Remove atomics from zh_refcount > eb68e3cd5655 Micro-optimize zrl_remove() > 04a6ae05850b Switch dnode stats to wmsums > edaa250bb3b0 Remove few pointer dereferences in dbuf_read() > c8d36e219233 Pack zrlock_t by 8 bytes > fd0893cf1ff3 Introduce minimal ZIL block commit delay > b644a45bd4cd Prefetch on deadlists merge > 9d2e5c14b2f9 System-wide speculative prefetch limit. > 231a37c4c0fd Optimize the is_l2cacheable functions > 6281b5c4882f Add missing increment to dsl_deadlist_move_bpobj() > 576d34cb1124 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs > 050be02c02f1 initramfs: fix zpool get argument order > 0a4e41d0fadb Ubuntu 22.04 integration: GitHub workflows > 1d2aea771170 Workaround GitHub Action failure > 4f6e0ca117aa Update workflows > 4b3133e671b9 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() > a5c469c5f380 Fix for mountpoint=legacy > 345f8beb5835 QAT: Fix uninitialized seed in QAT compression > 48f376b0c51f Improve arc_read() error reporting > 5219a2691e3b FreeBSD: Remove extra arc_reduce_target_size() call > bd9a9a4e1ad3 zed: mark disks as REMOVED when they are removed > 43d63ab2d4c1 zed: post a udev change event from spa_vdev_attach() > dedd8243fc8c zed: add hotplug support for spare vdevs > aa7258ced0dd Update vdev state for spare vdev > 59f187563937 linux 6.3 compat: add another bdev_io_acct case > 374f86b5c9ec Add more ANSI colors to libzfs > 433b9a89c48e Colorize zpool iostat output > 3da577280a13 Add colored output to zfs list > 164d184ed9d1 Additional limits on hole reporting > 777c98ee524f Use setproctitle to report progress of zfs send > 0e30635f9c0b zfs_main.c: fix unused variable error with GCC > c63b47e4dac9 Fix console progress reporting for recursive send > a164143dfd31 Linux 6.2 compat: META > a69765ea5b56 Add Linux kmemleak support to ZTS > fc2c0256c55a ZTS: Log test name to /dev/kmsg on Linux > 3d9f37026d65 Fix "Add colored output to zfs list" > e202d3b8673d linux 6.3 compat: needs REQ_PREFLUSH | REQ_OP_WRITE > 07cc8ae46ac2 Removed Python 2 and Python 3.5- support > 33003ecc93ef Tag zfs-2.1.10 > -- Mateusz Guzik From nobody Mon Apr 17 09:50: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 4Q0Mjb6Zk1z45fST for ; Mon, 17 Apr 2023 09:50:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) (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 4Q0MjZ36Mqz3QdN; Mon, 17 Apr 2023 09:50:10 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=CJPpu6VD; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2607:f8b0:4864:20::22c as permitted sender) smtp.mailfrom=mjguzik@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-oi1-x22c.google.com with SMTP id d1so6186907oiw.13; Mon, 17 Apr 2023 02:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681725009; x=1684317009; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iFP7orM8n99xfN7D1u62BDIB9avV4TZsaEWMmbCDhdM=; b=CJPpu6VDjHAkcMy6g5o4icWR2idpFpn4/shOma5NfmVwWhrYv3PmH4NjS+oc+Fqua8 6FgycF1SuRl8EFml9EiykI9anQifcyovR1Uqmhs6wc23YG+nbDn9uPgz5v2hiGQEvkh4 8fY4EwuV2oRXgZqIzGAE46AtuFsUSNplmTGFGaBtq6ZPOfp2FX1qxtUa6yN2M7AWxW1c VCMXEoILwCQL3xvCHs3OhD2uygJYzRO1RfeB2SM2hDyxtexsRnDaxBchmjXdyGfxwN60 X4ViJ3PVui9//Nhlos6uaNMyvQHY04n1QNVnAKr1meL88bQF7SA1Gf07GBAGCg7bgssl bv+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681725009; x=1684317009; 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=iFP7orM8n99xfN7D1u62BDIB9avV4TZsaEWMmbCDhdM=; b=dEIA8DrzUd+vaR2PWcYHM8Qd0qyFsGf2spxRVou5hY293AoQYZmoK++ipvdoZZNGTt MfNdr6nF7Rg4ev10/uIeVHpcJG8Xw94K3DDBZCcQq6NAlAywvNX+4vk+8885Rlp3xkVZ 906THgLAuWt9TqUEGzMjXlUJt2y6dyjm3zXeVj1sp54xPXMT1CT7SYv2N3cyTX7Dqd5g xIX+Bxu5y5mcw4QzQTpUckc1TF6eJU/KC0qn+HTgImAvjWqY39V5SbIrEfTM19P840UD 3jXurn7l7Q9DZx54EH7aA6/OW127CdtBHXgM8kTk7X1evklBT//dEB4pCc9/uKakTpp5 acHA== X-Gm-Message-State: AAQBX9f51Yi+5tCfq7D9m2ewzHHu32XZEGQx/Cwuv7CsUfgG8y/7EvEv J1w3SiXd0zfHXKU33qTQMTUVFKCY4E9M6iPWUMb24FhU X-Google-Smtp-Source: AKy350ZYkzgcVk+QZgnOl117Yt4Etfho5ctUNSQHHSBRVM/4tmAJr0uFcv+N8O+g7swBWgqjie9laFV9rfK7Yp/lF88= X-Received: by 2002:aca:a8c1:0:b0:38c:c1b8:d98c with SMTP id r184-20020acaa8c1000000b0038cc1b8d98cmr1080227oie.4.1681725008274; Mon, 17 Apr 2023 02:50:08 -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:46:0:b0:49c:b071:b1e3 with HTTP; Mon, 17 Apr 2023 02:50:07 -0700 (PDT) In-Reply-To: References: <202304170930.33H9UerW051990@gitrepo.freebsd.org> From: Mateusz Guzik Date: Mon, 17 Apr 2023 11:50:07 +0200 Message-ID: Subject: Re: git: 92e0d9d183ce..33003ecc93ef - vendor/openzfs/zfs-2.1-release - vendor branch updated To: Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-3.55 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.55)[-0.551]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::22c:from]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4Q0MjZ36Mqz3QdN X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 4/17/23, Mateusz Guzik wrote: > This introduces data corruption from 4b3133e671b9 > ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() > > https://github.com/openzfs/zfs/issues/14753#issuecomment-1510734027 > to my reading they are going to respin the release DO NOT MERGE > On 4/17/23, Martin Matuska wrote: >> The branch vendor/openzfs/zfs-2.1-release has been updated by mm: >> >> URL: https://cgit.FreeBSD.org/src/log/?id=92e0d9d183ce..33003ecc93ef >> >> 5161e5d8a40e Allow mounting snapshots in .zfs/snapshot as a regular user >> e45a981f6d12 Avoid a null pointer dereference in zfs_mount() on FreeBSD >> 8473829d1f1f initramfs: Make mountpoint=none work >> 57159a519b88 Fix a race condition in dsl_dataset_sync() when activating >> features >> 083239575a2a Partially revert eee9362a7 >> aa256549d130 Move dmu_buf_rele() after dsl_dataset_sync_done() >> 704374282848 Revert zfeature_active() to static >> 41fb4e071c65 rpm: add support for openEuler >> df18a443969a Set DEFAULT_INIT_SHELL to /sbin/openrc-run for Gentoo and >> Alpine >> fce0f7aff4a6 autoconf: add support for openEuler >> 82e311709568 Optimize microzaps >> 2098a0031802 Remove atomics from zh_refcount >> eb68e3cd5655 Micro-optimize zrl_remove() >> 04a6ae05850b Switch dnode stats to wmsums >> edaa250bb3b0 Remove few pointer dereferences in dbuf_read() >> c8d36e219233 Pack zrlock_t by 8 bytes >> fd0893cf1ff3 Introduce minimal ZIL block commit delay >> b644a45bd4cd Prefetch on deadlists merge >> 9d2e5c14b2f9 System-wide speculative prefetch limit. >> 231a37c4c0fd Optimize the is_l2cacheable functions >> 6281b5c4882f Add missing increment to dsl_deadlist_move_bpobj() >> 576d34cb1124 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs >> 050be02c02f1 initramfs: fix zpool get argument order >> 0a4e41d0fadb Ubuntu 22.04 integration: GitHub workflows >> 1d2aea771170 Workaround GitHub Action failure >> 4f6e0ca117aa Update workflows >> 4b3133e671b9 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() >> a5c469c5f380 Fix for mountpoint=legacy >> 345f8beb5835 QAT: Fix uninitialized seed in QAT compression >> 48f376b0c51f Improve arc_read() error reporting >> 5219a2691e3b FreeBSD: Remove extra arc_reduce_target_size() call >> bd9a9a4e1ad3 zed: mark disks as REMOVED when they are removed >> 43d63ab2d4c1 zed: post a udev change event from spa_vdev_attach() >> dedd8243fc8c zed: add hotplug support for spare vdevs >> aa7258ced0dd Update vdev state for spare vdev >> 59f187563937 linux 6.3 compat: add another bdev_io_acct case >> 374f86b5c9ec Add more ANSI colors to libzfs >> 433b9a89c48e Colorize zpool iostat output >> 3da577280a13 Add colored output to zfs list >> 164d184ed9d1 Additional limits on hole reporting >> 777c98ee524f Use setproctitle to report progress of zfs send >> 0e30635f9c0b zfs_main.c: fix unused variable error with GCC >> c63b47e4dac9 Fix console progress reporting for recursive send >> a164143dfd31 Linux 6.2 compat: META >> a69765ea5b56 Add Linux kmemleak support to ZTS >> fc2c0256c55a ZTS: Log test name to /dev/kmsg on Linux >> 3d9f37026d65 Fix "Add colored output to zfs list" >> e202d3b8673d linux 6.3 compat: needs REQ_PREFLUSH | REQ_OP_WRITE >> 07cc8ae46ac2 Removed Python 2 and Python 3.5- support >> 33003ecc93ef Tag zfs-2.1.10 >> > -- Mateusz Guzik From nobody Mon Apr 17 10:26: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 4Q0NWQ3V3Qz45htX; Mon, 17 Apr 2023 10:26: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 4Q0NWQ1wCKz3KGV; Mon, 17 Apr 2023 10:26:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681727186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uLWlhArsoTHgW10tQtZgLJCIN4O8Om7pL7Pz72JICoQ=; b=uAgmHwTxPUZR5xUbmMjBC3lCqPOh9QVygvobqtADDjydz+sZWYt1WgDnwIcU0TCyWVE42C Nhu/Zbh83GB+cCXvCytHY//grg4Ik0lSKHi9DWNFa4P38VUULAUL0IHKO7wUJ1H8tz/TL4 mk08YJbmAgb6A3gTQQOj7XoW7BxUarUuR2C3Zr/ReDJK5TuCaFUj/zPLCywuTYeeh861l6 ZcfId6hkTUMPdZd4l+PF2gkj1aVhVaJrHeS9vfhM6YctIsbUqW5yXBTadCkjWmLVCY5Ecb EtTERW297QrYzb3WNVjw9UMFXi3+oC5geENpGlfnD1FNQ3x+z3zLdsZrkWBESg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681727186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uLWlhArsoTHgW10tQtZgLJCIN4O8Om7pL7Pz72JICoQ=; b=YuGguPHn/uc7/XUrKLHiZUHMnXUKmL/dt9Qtt80tgdg2wm9oGpUwQbhJIwxZRzDRSCqUmo eFbwaqMrZnf1kTNsl0fFHeHngG/Id/5c8cvNPXChIw6d6EccukKZ5JH0bctdAosyfEFJDg 87BLdgsvtp4BGhj7TnnRZb3hC7nUG+OiCczoR/mcji/xzaApMi/bHjhkAGA/TdRAAMd/ul 5ti9gT+9hpzUA3ZXVLrXU4jBnqw3+/6YHdlBPN6O98Jaeuwmc+gMP8UrHZ787xbgN0PXx8 phmEHcjnOaeszQvwDm6dpBmlqPYl0OSxEEDuVb5z8pW839OXSFNV85ws/M6wGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681727186; a=rsa-sha256; cv=none; b=bTprZBROHrtpxRsHtki5+81ISOSunwyVQq1/G9qYVnCnNnTUNptbGgUR8N0pdkBt3hPJQF lndjT4GwSO+PX1MJw/SJvu/8MWWoqeeobhSepqDcopfAVapGTDGT44G5YUWYJU5sdqCSxp RE/CRnGBXvC+5QKxdKJDN18bHEMAJVGeI0RKmsyrkZbUqyP542i5b76qK1au6O6ULj/Zst oFl0TGI5fbT5XLHiAboyRB4ZsHpAf5cPmWYWa6nXWv3+2n2/oLs8F5VtMhmlYCRUapgmo2 1qt5FkeFiyuWsylxEvmqdR+tof5+LVjE7f7N9bewDrJphUB6rvb83ciic8ND2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0NWQ0ywVzQXG; Mon, 17 Apr 2023 10:26: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 33HAQQcT042245; Mon, 17 Apr 2023 10:26:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HAQQSi042244; Mon, 17 Apr 2023 10:26:26 GMT (envelope-from git) Date: Mon, 17 Apr 2023 10:26:26 GMT Message-Id: <202304171026.33HAQQSi042244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: a7acce349198 - main - vnet: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7acce3491987c116e607697a4906807f4ea1c10 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a7acce3491987c116e607697a4906807f4ea1c10 commit a7acce3491987c116e607697a4906807f4ea1c10 Author: Zhenlei Huang AuthorDate: 2023-04-17 10:24:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 10:24:35 +0000 vnet: Fix a typo in a source code comment - s/form/from/ MFC after: 3 days --- sys/net/vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/vnet.c b/sys/net/vnet.c index b064e8e864ff..7ae030560301 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -245,7 +245,7 @@ vnet_alloc(void) /* * Allocate storage for virtualized global variables and copy in - * initial values form our 'master' copy. + * initial values from our 'master' copy. */ vnet->vnet_data_mem = malloc(VNET_SIZE, M_VNET_DATA, M_WAITOK); memcpy(vnet->vnet_data_mem, (void *)VNET_START, VNET_BYTES); From nobody Mon Apr 17 10:26: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 4Q0NWS5rc8z45htZ; Mon, 17 Apr 2023 10:26: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 4Q0NWR3xtXz3K3T; Mon, 17 Apr 2023 10:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681727187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzQk7O9VckMQB2KhTp7TNoicXiApJyq9K1Td/Y+CEqk=; b=mYIFoBJ5z3L54sekd88IlSIvUQtewbrmIh9IVchGC9dxscpMmVl687+lqiM/R8eoY6wZcO ujgFlLndRH/6IvgHpD+ltiUILt121DWRXOCKdg3W7baI9XrIkbYIlxyjo503tus6IXjcMG t8pL8C7I2PnXQXuGMs+/wePdEU8ePrpfWnDzG8RVqDeJjUT4a1BcCApboVhWp2NpHQ/QbV s4O6CMORdR1nN7SGgnCXETqYltG8uQ2e9vKeb5IewJE+VxNGbP3tKmJq6yvod1m40HZV9r N+hqB/UwW2Sw+ufGEpdKhGZkRNfQkKKCJyz0TCKZF3V1AV6eojZxyekW0SBMVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681727187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rzQk7O9VckMQB2KhTp7TNoicXiApJyq9K1Td/Y+CEqk=; b=Ex2jLzXVeTQVDFf9qFHCEq5SFotq2JSJr8fkhTBQYUfjfIuhea1fRlKSWNvZEsu8KD7uv3 wvGVxtcZqdPaU1Uhpay5+AH/d3m3b996Fn+wOA3VC6bRt0ZzlWcO9hEHcTLtVcmhpJ83u+ V03Fyq2bTQvcZbPB2TKVqiNEnI70L9d6aHU1gicJkyS0rtpP0pw2KA2mw1iMojwr3+vlIS MF2bDXLMITdA0iKhsDJ2sgFBHZJ0VlmJgOwYAUoobhObshJO5X+APLzDLFqJTNK4LeKREO 4S/TkQIhD2POuGKCrZZgpkWSUOaB1ns+vK+Xs/cX4B1w7D+lwzkt2O5WoZDfuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681727187; a=rsa-sha256; cv=none; b=oTN3DrVfiFyOHugg4pp1jEQBToKlmPBYGGmR2i3In3hsWRH0A4IS9zVrvtP1MyQ2Vu8Bh8 QSA18SoOaTiyl8+/G1AEApc8A14U1OmZqXYoNzNrpobIMlDQlMFba4DrFPz602vRD2l/vL +0WSMV0a0buPFOUCwINl0u+TTgIu6KC0QA8Lb26zjNr1GY3W0YBbKJWzrvF300GQDwdh6t 8+cPmEUSzELacnbVk8FkJ5VyaGTyZFFEryDEGMNiW8N8iNhOeHqP6ooTgk3xHNVcUBiffK Rkp4L5IVwI+Vl0rZbh+2f2y8SzVktObYmJScO3JE5dEHbcH4EgDEwegOl05h4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0NWR1rRjzQXH; Mon, 17 Apr 2023 10:26: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 33HAQRj1042269; Mon, 17 Apr 2023 10:26:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HAQRkg042268; Mon, 17 Apr 2023 10:26:27 GMT (envelope-from git) Date: Mon, 17 Apr 2023 10:26:27 GMT Message-Id: <202304171026.33HAQRkg042268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 401f03445e4a - main - lagg(4): Correctly define some sysctl 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 401f03445e4aa42960e337604560593c7096e589 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=401f03445e4aa42960e337604560593c7096e589 commit 401f03445e4aa42960e337604560593c7096e589 Author: Zhenlei Huang AuthorDate: 2023-04-17 10:24:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 10:24:35 +0000 lagg(4): Correctly define some sysctl variables 939a050ad96c virtualized lagg(4), but the corresponding sysctl of some virtualized global variables are not marked with CTLFLAG_VNET. A try to operate on those variables via sysctl will effectively go to the 'master' copies and the virtualized ones are not read or set accordingly. As a side effect, on updating the 'master' copy, the virtualized global variables of newly created vnets will have correct values. PR: 270705 Reviewed by: kp Fixes: 939a050ad96c Virtualize lagg(4) cloner MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39467 --- sys/net/if_lagg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index c07deb3217fa..1b90d1220722 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -276,22 +276,22 @@ SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW | CTLFLAG_VNET, /* Default value for using flowid */ VNET_DEFINE_STATIC(int, def_use_flowid) = 0; #define V_def_use_flowid VNET(def_use_flowid) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RWTUN, - &VNET_NAME(def_use_flowid), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_use_flowid), 0, "Default setting for using flow id for load sharing"); /* Default value for using numa */ VNET_DEFINE_STATIC(int, def_use_numa) = 1; #define V_def_use_numa VNET(def_use_numa) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_numa, CTLFLAG_RWTUN, - &VNET_NAME(def_use_numa), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_numa, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_use_numa), 0, "Use numa to steer flows"); /* Default value for flowid shift */ VNET_DEFINE_STATIC(int, def_flowid_shift) = 16; #define V_def_flowid_shift VNET(def_flowid_shift) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RWTUN, - &VNET_NAME(def_flowid_shift), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_flowid_shift), 0, "Default setting for flowid shift for load sharing"); static void From nobody Mon Apr 17 10:39: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 4Q0NpS4Cq1z45jD4; Mon, 17 Apr 2023 10:39: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 4Q0NpR3p1xz3vSQ; Mon, 17 Apr 2023 10:39:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681727967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sHnVJuOPIlGbWeDfjqADbxjOCKgudd6Lwf2CZ+fxnME=; b=HzI02XDhgG3zsSnYaelIMgfwBqb5+h3ujFUbGDJLQKEHnMDAoEcVM/F5DUWUgfhRISNGkd JIKFrxNprobkq315Kr+oEkzktoHtPwQqaaZAgRw15h1mx19LpdhzDnscC+QS0BxDdx2o+m 6xd1Wn+NtF2HOOBXe7oUjh5SVASzhH3JYu2sxv8OWl/vABxmy3qmtUFEQDlNADxyVNYsdx HCgDZD+QcSTvV90y173t2m2GGch4qAdp/cgYVT1uhJor9ABvd3DwsazR547ZuzG1yxZxTv vC5Uz9x9HwwGfikyK3KtinkuM32rMMrCnv7IBh0aFP+ixlBuXAM5PTturNgHKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681727967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sHnVJuOPIlGbWeDfjqADbxjOCKgudd6Lwf2CZ+fxnME=; b=W7tonFkMxsjNIaGZZ86eWjdS1DC07QTwmq/9AqjEIzU8MZ2rLMu7EG5RPMRY/4/ZRyAy20 qjfbP+cKa8UbUpHRpe7102+Zu0XMGkGyF2/A5u/ZKgVmnknKLzfPUkRSX5UvwlCSRRaop0 +pKUBp5vmwYraSpod9rAJxf7cJp71NiJ5XPNlj1BdcZ1oFjjExZ4Hvl8dn7ExSbCAoQLeA 703dlE6oG4hbN8f8vDvLtzp89haFcoQtwc7Jk1IT0ppg0O+4TqO++Zs/JJ3p3sKadkuj12 Bx82S4eQwcHaUHwD8twGPGxKWenIQ9y+nomn4oyiuvhavN926gnH/LukXIY2uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681727967; a=rsa-sha256; cv=none; b=Vr2/8Q+Pzr540uTE4AuNpIREjWJb8sWN9hLbTR++ENoi+udbc7YTi5od9SlQe6Nr6slUEm bc54Y3i5tDYx8tkKe5xGFWFC3w9TeUowXioRZvXcCbqtlD5WuF5gCm0wHPjP39137Nd2vh YvTW7CVpo+r/Z+MgSLxZnnV0xZDG0HCiXNTc5aKhR2t6fzvjxGosYNnhVE8xQiIMGmCx+k Ce87/qXOU2V7pI2QSssUD3TQvXs1jrnTaAcOiJQBmdLg2+L8YPwNFPzFviboxi234Yoydt +9gkmzd8bqR/cKUGMBvIi5bIozAgC0CIs6cTOfkMtE23YbMb6fLmhalcSz86JQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0NpR2hn8zQDC; Mon, 17 Apr 2023 10:39: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 33HAdRJK058798; Mon, 17 Apr 2023 10:39:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HAdR0k058797; Mon, 17 Apr 2023 10:39:27 GMT (envelope-from git) Date: Mon, 17 Apr 2023 10:39:27 GMT Message-Id: <202304171039.33HAdR0k058797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pawel Jakub Dawidek Subject: git: 068913e4ba3d - main - zfs: Add vfs.zfs.bclone_enabled sysctl. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pjd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 068913e4ba3dd9b3067056e832cefc5ed264b5cc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pjd: URL: https://cgit.FreeBSD.org/src/commit/?id=068913e4ba3dd9b3067056e832cefc5ed264b5cc commit 068913e4ba3dd9b3067056e832cefc5ed264b5cc Author: Pawel Jakub Dawidek AuthorDate: 2023-04-17 10:38:30 +0000 Commit: Pawel Jakub Dawidek CommitDate: 2023-04-17 10:38:30 +0000 zfs: Add vfs.zfs.bclone_enabled sysctl. Keep block cloning disabled by default for now, but allow to enable and use it after setting vfs.zfs.bclone_enabled to 1, so people can easily try it. Approved by: oshogbo Reviewed by: mm, oshogbo Differential Revision: https://reviews.freebsd.org/D39613 --- sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h | 1 + sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 4 ++++ sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 8 ++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h b/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h index f765d38dbac8..5948e44daab1 100644 --- a/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h +++ b/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_vfsops_os.h @@ -287,6 +287,7 @@ typedef struct zfid_long { extern uint_t zfs_fsyncer_key; extern int zfs_super_owner; +extern int zfs_bclone_enabled; extern void zfs_init(void); extern void zfs_fini(void); diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c index 30851f5273a2..b63899ddede0 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c @@ -89,6 +89,10 @@ int zfs_debug_level; SYSCTL_INT(_vfs_zfs, OID_AUTO, debug, CTLFLAG_RWTUN, &zfs_debug_level, 0, "Debug level"); +int zfs_bclone_enabled; +SYSCTL_INT(_vfs_zfs, OID_AUTO, bclone_enabled, CTLFLAG_RWTUN, + &zfs_bclone_enabled, 0, "Enable block cloning"); + struct zfs_jailparam { int mount_snapshot; }; diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 7b5fe8a3abe0..5079d0afa9e4 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -6214,7 +6214,6 @@ zfs_deallocate(struct vop_deallocate_args *ap) } #endif -#if 0 #ifndef _SYS_SYSPROTO_H_ struct vop_copy_file_range_args { struct vnode *a_invp; @@ -6245,6 +6244,11 @@ zfs_freebsd_copy_file_range(struct vop_copy_file_range_args *ap) int error; uint64_t len = *ap->a_lenp; + if (!zfs_bclone_enabled) { + mp = NULL; + goto bad_write_fallback; + } + /* * TODO: If offset/length is not aligned to recordsize, use * vn_generic_copy_file_range() on this fragment. @@ -6310,7 +6314,6 @@ bad_write_fallback: ap->a_incred, ap->a_outcred, ap->a_fsizetd); return (error); } -#endif struct vop_vector zfs_vnodeops; struct vop_vector zfs_fifoops; @@ -6375,6 +6378,7 @@ struct vop_vector zfs_vnodeops = { #if __FreeBSD_version >= 1400043 .vop_add_writecount = vop_stdadd_writecount_nomsync, #endif + .vop_copy_file_range = zfs_freebsd_copy_file_range, }; VFS_VOP_VECTOR_REGISTER(zfs_vnodeops); From nobody Mon Apr 17 10:46:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0NyF2hKFz45k1Y; Mon, 17 Apr 2023 10:46:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0NyD39TNz48vF; Mon, 17 Apr 2023 10:46:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681728372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ygxs/ckdUszbuodrZ5Flb/hce+9JO/Vj7BJBxN5HqR4=; b=kNavN/LvZ7/+Ss86dpp+sjTE8EyyMe/ZAiwf3llNQIw+xXjhZ5hP1BVM4F0A+jF2Ylwn9x P/9adtTVMcWarqCt6t4Sra2ix49sveV/FrpkRahpl52zyl+MadweENaypH83j6yuVFaIiO KAcxMqERRSZVcgFET5JrlA8ZRu/H5qQ7wOQUBMSrVML6sONF8KmWlR4djUdFNO2RN3u75F 6RsfAB3O9GJwD76Ru7MzcQ5dt/p9zlZOeyj6YdmHdVmkz6z/OKkHUINJNvuZkJXSidbSKY bvdjFCr9sptzmV4uJt/7N6YktPQNt8ghCi1LxaqUj7EXPmJsdGPrCH2QYfc0mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681728372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ygxs/ckdUszbuodrZ5Flb/hce+9JO/Vj7BJBxN5HqR4=; b=KYhx6AmSMP0wz5M77IuHXJJ3QJ73R2cL7hOT6CcsLb64GE+rxS8L68FmHRsJKe+wvkaetm dUraiJAiHRus5gjCr+35jjoxiSM+UMphAynWL/l4zStpS1607A72H50A6iNhD5VpiqOllF olRKlO4koVEbTN2R1eAsQd67p6gdRL9eERhKEo51EVWkvk1UN2iMeTE8B/noPf6E1m4msO OsnfTnYX9O2vctOAhYmrUOUf3fcU88q3f/IcQl/N/ZGj/HcM6mWHy63/dMeMgZSU4ab7kN z8R79CMTzZ40jqT6MJGBHZ95Ceckt8kArezzubwmNGU3Hp3h6x8RlGIw5XxJpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681728372; a=rsa-sha256; cv=none; b=qx2Qxd7ajHkXdoirPsupFL7n5X5SWpl32fSKb1oUaFtTpiuXV8S3svKsMnjkAVfU6cuJ5f dfCywxyX301cjr8DN1A4D5Jx3GcoHyjhEOA6WxDDRsQAJ/5hgDiNVUvKqr+RAu5fRC2aV7 86bLnaD1ns0nt2tmK8GCMX3TB8Cts1nPFVUdttq7ELmDBcRcao4ezsSL61FkDXPMWaIjyq 3w7owtnACJ3cAUeJmEeddgBd6EIOMvT2+l6jZv87FbM96VavK2lgamPxB+fVMUchrmLikj fhLbK4qeiw2OWMeYNOCbkQMcWyouyqdCMI22/NL/MpdkQ8RjA2TiVTiopsiVKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0NyD2HF0zR9L; Mon, 17 Apr 2023 10:46: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 33HAkCM3075110; Mon, 17 Apr 2023 10:46:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HAkCur075109; Mon, 17 Apr 2023 10:46:12 GMT (envelope-from git) Date: Mon, 17 Apr 2023 10:46:12 GMT Message-Id: <202304171046.33HAkCur075109@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: b8da3b62a574 - main - tests: add ktest modules to 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: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8da3b62a57464d7be1b95b1bdae83f592209f74 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=b8da3b62a57464d7be1b95b1bdae83f592209f74 commit b8da3b62a57464d7be1b95b1bdae83f592209f74 Author: Alexander V. Chernikov AuthorDate: 2023-04-17 10:45:47 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-17 10:46:05 +0000 tests: add ktest modules to build MFC after: 2 weeks --- sys/modules/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index df47f5bf4652..a98f67d9ec22 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -653,6 +653,7 @@ _mpr= mpr .endif .if ${MK_TESTS} != "no" || defined(ALL_MODULES) +SUBDIR+= ktest SUBDIR+= tests .endif From nobody Mon Apr 17 11:39: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 4Q0Q7N3ZDzz45mWK; Mon, 17 Apr 2023 11:39:12 +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 4Q0Q7N09n6z4PqL; Mon, 17 Apr 2023 11:39:11 +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 33HBd4FV007174 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 17 Apr 2023 14:39:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 33HBd4FV007174 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 33HBd3qs007173; Mon, 17 Apr 2023 14:39:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 17 Apr 2023 14:39:03 +0300 From: Konstantin Belousov To: "Simon J. Gerraty" Cc: "Stephen J. Kiernan" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4819e5aeda4e - main - Add new privilege PRIV_KDB_SET_BACKEND Message-ID: References: <202304161838.33GIcJiX079190@gitrepo.freebsd.org> <11356.1681707027@kaos.jnpr.net> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: 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: <11356.1681707027@kaos.jnpr.net> 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: 4Q0Q7N09n6z4PqL 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 Sun, Apr 16, 2023 at 09:50:27PM -0700, Simon J. Gerraty wrote: > Konstantin Belousov wrote: > > > @@ -484,6 +485,11 @@ int > > > kdb_dbbe_select(const char *name) > > > { > > > struct kdb_dbbe *be, **iter; > > > + int error; > > > + > > > + error = priv_check(curthread, PRIV_KDB_SET_BACKEND); > > priv_check() fails for jailed, or even simply non-root process. > > kdb_dbbe_select() is called from a random context, e.g. from > > kdb_alt_break_gdb(), where it inherits whatever thread was running > > at the moment of break to debugger. > > That sounds like a bug? Definitely. > > > In other words, this function no longer works reliably. > > > > > + if (error) > > > + return (error); > > > > > > SET_FOREACH(iter, kdb_dbbe_set) { > > > be = *iter; > > > diff --git a/sys/sys/priv.h b/sys/sys/priv.h > > > index 20bfc7312ce3..cb4dcecea4aa 100644 > > > --- a/sys/sys/priv.h > > > +++ b/sys/sys/priv.h > > > @@ -515,10 +515,15 @@ > > > #define PRIV_KMEM_READ 680 /* Open mem/kmem for reading. */ > > > #define PRIV_KMEM_WRITE 681 /* Open mem/kmem for writing. */ > > > > > > +/* > > > + * Kernel debugger privileges. > > > + */ > > > +#define PRIV_KDB_SET_BACKEND 690 /* Allow setting KDB backend. */ > > > + > > > /* > > > * Track end of privilege list. > > > */ > > > -#define _PRIV_HIGHEST 682 > > > +#define _PRIV_HIGHEST 691 > > > > > > /* > > > * Validate that a named privilege is known by the privilege system. Invalid From nobody Mon Apr 17 12:05: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 4Q0Qjf1hp8z45p79; Mon, 17 Apr 2023 12:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0Qjf1C15z47YB; Mon, 17 Apr 2023 12:05:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681733126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oisgp8yitI44nRaxF5ZcqSPT8QkOtW/U45IUTOtnCiQ=; b=nU7XJpIkXAC7ITSA9fGRmQnPXbfv3bb4PxFS/aOxgLp/xb6QEgLnWaRzRWVhyZ0nWZVEuP nKySde5/7M+q8CGrH3DAkcq/XARdJmYYD/qc8AUvFUMY7+hIXlHIFWgkJB/Iq0yPPJZe2z 6lZ4smnDrL9D6FCvAoEBnpXDoTb4W8XiBxQ0huv/Fcw1WV9QbSyRmq0wGTemodZ1DzGsK6 RoEcLRxDoLlFIKEWJqFfl7+MPA9xTLLHfQvdCrlHvUrk3deRgSuSDhHR24QVQFCDO/ebYa vYGL3AIH02mSLoEYgCFaEJ2TlsRcrJLdvyzOkHJFwIDq31ODyfT95zYzH+Ga4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681733126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oisgp8yitI44nRaxF5ZcqSPT8QkOtW/U45IUTOtnCiQ=; b=O4InTCEmtqT7e9hy5+gQ5f+1E1aku6UnYGtQvye9R17cNYQRyU29tP+g1r4wKFUmmNU9s/ OjtfSfyJnYDrUoNlWRFxBWtn1GNko5mTkErSjDbfwfTNhSkaqeRvKHsI5EbOsk8efq9bTK QiszWIhTIM5ENzUs5SF4g+c4HYz1gBIVu1m1kLaQHs69A7aZ72ZUOaD+9R2JrDbg11HP4D uXQrnjFWQwFeIzBFM7/UdyHRG7STLiMmV/jMM/UJq6jeB/MtRAm/8F59TEa4j75jMpHS7Q MnTMmr+CnXvIN31osK3ioPrUCLkUKgLjpvlKhokk+UrMP+AbhkWBxvF4wnzIhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681733126; a=rsa-sha256; cv=none; b=cDYznrcbtLZnT8zZxUxjbpIkE3+y95XrhlKGOxS1M62LxmiXi4hzBWHfdpC0DXuFNWzEWK QX+tdssj5rez/50shUQtvf4BvwoHKvP+dRUACzgugagddvGfL1ObEDiwMNav2qhAMNP1rr ql8LUwiDjfko49cczOG3ow1vWqlBtmFcxPV+7DgAp+dFzv+QyeO+oTmVn6jfjrKycDHIxx jd3V+/m1FI/Uwir7eh5jCSCh3Mi8nPGatg9Ht8Kogkpnh7g0zYx6VLPgQB39sM/qeOzFEy fpTzo0DB/GCN/6zbQJ88EW5EO1kJ30N1OX+93b/4TnW+wQB/nJwOnWqZQlruhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0Qjf0FRPzSwY; Mon, 17 Apr 2023 12:05: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 33HC5PsF007280; Mon, 17 Apr 2023 12:05:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HC5Pub007279; Mon, 17 Apr 2023 12:05:25 GMT (envelope-from git) Date: Mon, 17 Apr 2023 12:05:25 GMT Message-Id: <202304171205.33HC5Pub007279@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: 9742519b2229 - main - netlink: fix operations with link-local routes/gateways. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9742519b2229c1035f5c81f478e558c951ddd1ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=9742519b2229c1035f5c81f478e558c951ddd1ea commit 9742519b2229c1035f5c81f478e558c951ddd1ea Author: Alexander V. Chernikov AuthorDate: 2023-04-17 12:04:43 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-17 12:04:43 +0000 netlink: fix operations with link-local routes/gateways. MFC after: 3 days --- sys/netlink/route/rt.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index db535cb676e4..cbe9ee001dfd 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -406,6 +406,25 @@ const static struct nlfield_parser nlf_p_rtnh[] = { #undef _OUT NL_DECLARE_PARSER(mpath_parser, struct rtnexthop, nlf_p_rtnh, nla_p_rtnh); +static void +set_scope6(struct sockaddr *sa, struct ifnet *ifp) +{ +#ifdef INET6 + if (sa != NULL && sa->sa_family == AF_INET6 && ifp != NULL) { + struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)sa; + + if (IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr)) + in6_set_unicast_scopeid(&sa6->sin6_addr, ifp->if_index); + } +#endif +} + +static void +post_p_mpath(struct rta_mpath_nh *mpnh) +{ + set_scope6(mpnh->gw, mpnh->ifp); +} + struct rta_mpath { int num_nhops; struct rta_mpath_nh nhops[0]; @@ -432,6 +451,7 @@ nlattr_get_multipath(struct nlattr *nla, struct nl_pstate *npt, const void *arg, mp->num_nhops - 1); return (error); } + post_p_mpath(mpnh); int len = NL_ITEM_ALIGN(rtnh->rtnh_len); data_len -= len; @@ -495,6 +515,13 @@ static const struct nlfield_parser nlf_p_rtmsg[] = { #undef _OUT NL_DECLARE_PARSER(rtm_parser, struct rtmsg, nlf_p_rtmsg, nla_p_rtmsg); +static void +post_p_rtmsg(struct nl_parsed_route *r) +{ + set_scope6(r->rta_dst, r->rta_oif); + set_scope6(r->rta_gw, r->rta_oif); +} + struct netlink_walkargs { struct nl_writer *nw; struct route_nhop_data rnd; @@ -899,6 +926,7 @@ rtnl_handle_newroute(struct nlmsghdr *hdr, struct nlpcb *nlp, error = nl_parse_nlmsg(hdr, &rtm_parser, npt, &attrs); if (error != 0) return (error); + post_p_rtmsg(&attrs); /* Check if we have enough data */ if (attrs.rta_dst == NULL) { @@ -963,6 +991,7 @@ rtnl_handle_delroute(struct nlmsghdr *hdr, struct nlpcb *nlp, error = nl_parse_nlmsg(hdr, &rtm_parser, npt, &attrs); if (error != 0) return (error); + post_p_rtmsg(&attrs); if (attrs.rta_dst == NULL) { NLMSG_REPORT_ERR_MSG(npt, "RTA_DST is not set"); @@ -990,6 +1019,7 @@ rtnl_handle_getroute(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate * error = nl_parse_nlmsg(hdr, &rtm_parser, npt, &attrs); if (error != 0) return (error); + post_p_rtmsg(&attrs); if (attrs.rta_table >= V_rt_numfibs) { NLMSG_REPORT_ERR_MSG(npt, "invalid fib"); From nobody Mon Apr 17 12:22: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 4Q0R5s1cTdz45psJ; Mon, 17 Apr 2023 12:22: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 4Q0R5q1ClVz3Cj7; Mon, 17 Apr 2023 12:22:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681734175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IBya9VDQbZtVmavUEO3wZo12Qtlcml9Ff2DM9gOidNk=; b=ZT5H533yRYYgP0doNZ1P23MzSC/payUqHz5I44S2Jfky60YPsnqdkPWjmnVRVph6xVu/w6 jpwYmQ/wj5X/kajGr4VZq2g1bcXmI0CJOjJ5WxQdnPMY9FADowo4jrwQ+D1858iehLPrhX 59ozEMYl2fw+b953ysR28S0Fr0TaTFMYNGM0sf5adAjtUK2oHLdqD5rAN1iTImtUnXfJ3H p6JklcnPS63p2vwwxxggKc9SrnKoZOu2sbA8zAz9pQxBcFK6In+LCtR7Zz5jx8YelRUWjU G9y9J3fzYgSOhqHXNTLX7EPnwOVEVbiGfdsMKiWB//30l6sLyBipqBfjh1uXlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681734175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IBya9VDQbZtVmavUEO3wZo12Qtlcml9Ff2DM9gOidNk=; b=ttRKNTJXccT6q4KecefdczsTsmZ2hoFYzqq3dpITglwFfMTynTSgiMMHDa8GhKU9xb5+9U /DNpjDBNidudF5aBrPATtxWDM7BrTJBXn73GZwVvxPCzHbXJ9D3XEy4j5u9/BgexjorGTy 7PZBpllXPDMFvbTJzvRs45MEPj1fbKkrmGDm1Mv705xhbP6YKdQzDR3VIWe3qRjS6PYIxk AsGytojF32s5ywLynFuAd8Xy/fbBRiWHYcpU+T8yzyYtANR0nUbEu9uUpNGZ+5gQxcVCuz T6MPq6pkUj8ODwQf6i+3Ul6aD3Vv/tpo2uXW3QAqdcoFsHt4Bn6qyd4P67c9QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681734175; a=rsa-sha256; cv=none; b=a3ZuIkrxxhHOj86IzzqGujFwWTlkdug9Bid1juTlacusMLEidwi5FxdLL26Jwt2qeSfVXa sCwjzjFiSMBk81z9/Hm0xT4oKITlfWyW72KsU25c2NbmsMKuo3nY7/z/YdK3FAD1absXNP sCj1yNzDbpelE5be1aWLPjAOsZKDixDtdxOpPiwMvEu9tYjzD0dEx1uJN7bFMVTUnptYxs 56bq4ugJBCS2B39mP48y17V0O4RlMSn+Pccp+Ieha/WSVRard3fXHuKO7EcVA1+cBN4v0c leh4caGagBB+e0YqRRZYlaAk/PrFKs1zJcrcuxAiDtMGRLToDxiN3JA6O/6XBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0R5q0J7mzSsZ; Mon, 17 Apr 2023 12:22: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 33HCMsZh039741; Mon, 17 Apr 2023 12:22:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HCMswq039740; Mon, 17 Apr 2023 12:22:54 GMT (envelope-from git) Date: Mon, 17 Apr 2023 12:22:54 GMT Message-Id: <202304171222.33HCMswq039740@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: 10854bf51747 - main - makefs: use unsigned and %u for rock_ridge_move_count List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 10854bf51747c172e45e365995ccf42aef2ab470 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=10854bf51747c172e45e365995ccf42aef2ab470 commit 10854bf51747c172e45e365995ccf42aef2ab470 Author: Ed Maste AuthorDate: 2023-04-10 22:53:53 +0000 Commit: Ed Maste CommitDate: 2023-04-17 12:21:28 +0000 makefs: use unsigned and %u for rock_ridge_move_count For diff reduction against NetBSD's makefs. Based on NetBSD git mirror commit 00991aee8248. With this change our makefs cd9660 support should be in sync up to NetBSD commit bdae6c9dc792 ("makefs(8): Nix trailing whitespace."). Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/cd9660.c | 2 +- usr.sbin/makefs/cd9660.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index 4d82a8dc93a1..0c9be8274643 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -1255,7 +1255,7 @@ cd9660_rrip_move_directory(iso9660_disk *diskStructure, cd9660node *dir) return NULL; diskStructure->rock_ridge_move_count++; - snprintf(newname, sizeof(newname), "%08i", + snprintf(newname, sizeof(newname), "%08u", diskStructure->rock_ridge_move_count); /* Point to old parent */ diff --git a/usr.sbin/makefs/cd9660.h b/usr.sbin/makefs/cd9660.h index f271e0425517..4cd8cd471672 100644 --- a/usr.sbin/makefs/cd9660.h +++ b/usr.sbin/makefs/cd9660.h @@ -249,7 +249,7 @@ typedef struct _iso9660_disk { int rock_ridge_enabled; /* Other Rock Ridge Variables */ char *rock_ridge_renamed_dir_name; - int rock_ridge_move_count; + unsigned rock_ridge_move_count; cd9660node *rr_moved_dir; int archimedes_enabled; From nobody Mon Apr 17 12:22: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 4Q0R5t2CxQz45qDZ; Mon, 17 Apr 2023 12:22: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 4Q0R5r1ggHz3Cwy; Mon, 17 Apr 2023 12:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681734176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yecgwMYUBnAaTKhgM/9jIqnYr76EGprjNBQrqFwXH7Q=; b=tAFdNKA3cupyOgstGhUNE5kundVP7agqChY0b5yg28L1NKbVz2cJP4s4R+3TKMqjxPq6Ve sDKHt0gecOel6UpNzCpPy2Gez6KT2wbLl60tEkuc/zxqiTg2A371B5OENQn1FnqLGOkDNz L0H4bc+W3/xYIt+48fcOCtDBQQOVSOu6Adk4rP5aJe2jHA+wuoBp+HpJ6FuAe0ZGt5JBL+ 3841UPTLe04MuJLgs6DXbjU+I+jmYhtO8UrTdc4Ig2PgTaEt44mdJ7esqLON387qOdYtnA ER6LosfniEVfYzMhDpa23Tjg3najZ383lUvQFWZqTIJO71k0goF00lsvJhuq0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681734176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yecgwMYUBnAaTKhgM/9jIqnYr76EGprjNBQrqFwXH7Q=; b=HeOdpA6dQCFJGO9rhkpgweZJ46WVXGoANVCXC+nQ2VlPNoKTaIKmLgWNSP5smMsa30XCDJ BAlrbQrDZ7hyt+IY/Tekthp6taOpBrzeBfzJth2Ijaa22C3sHWEmlSxalstCFX2dg9zWvc W4IITMw8/rmDICeiZLviAoPrPdjs3rVREmVupumP/f1Bhhs8RHVZk3kFLCZonFJarBvMUN 5h4cudVzTHJGTT1ImQvNAdH7Lk9I6rDl2ia8qyUMAgVyHSgyC5nAPT6ecsfomlr9KOFiDl iLVUZ0uFMgqH966Yfq0N6uzOSkSYY14Mg2bgcosukpOX0cLXzoJg3fBbx0AoKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681734176; a=rsa-sha256; cv=none; b=j2/wZ/NQeHIGKT63XUKNaDB1yWVmG+7OfUOh5lJjBnrtTScsRDv6vzNk7BVJ+0B/Qi7jtZ bRd4RO06pgT7E2RaD87E874OGz9ivKuAZL6z30ZHSDgE0hNCs6ooOhdKDJtFbzzC8iwzg9 kn8nZMBWBmtoIAznNjtqocxiJspvVDp/AK5Tm5wxX+DFwwFvRJTs84+UrSrvizWhKXJekw Ei+dc7mYmU0/zimMaZTBXKubZOEINFPcRrOh7Eo3sSITu0cT2fMf14IgKJR1RR0YfTuCzs GXeY4LTNKlR89M56UBPUb2dV/1j2IkJScDCFVbElrYqsxiSa+6Vdn0+FvwTLFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0R5r0n69zThx; Mon, 17 Apr 2023 12:22: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 33HCMuPj039761; Mon, 17 Apr 2023 12:22:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HCMuIY039760; Mon, 17 Apr 2023 12:22:56 GMT (envelope-from git) Date: Mon, 17 Apr 2023 12:22:56 GMT Message-Id: <202304171222.33HCMuIY039760@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: 79ead0849707 - main - makefs: remove 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79ead0849707396cb2de0bab7e354fb099ea344e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=79ead0849707396cb2de0bab7e354fb099ea344e commit 79ead0849707396cb2de0bab7e354fb099ea344e Author: Ed Maste AuthorDate: 2023-04-17 12:12:27 +0000 Commit: Ed Maste CommitDate: 2023-04-17 12:22:12 +0000 makefs: remove unused variable Reported by: Clang Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/cd9660/cd9660_write.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/makefs/cd9660/cd9660_write.c b/usr.sbin/makefs/cd9660/cd9660_write.c index 6716c2f98704..95038320a059 100644 --- a/usr.sbin/makefs/cd9660/cd9660_write.c +++ b/usr.sbin/makefs/cd9660/cd9660_write.c @@ -429,7 +429,6 @@ cd9660_copy_file(iso9660_disk *diskStructure, FILE *fd, off_t start_sector, { FILE *rf; int bytes_read; - off_t sector = start_sector; int buf_size = diskStructure->sectorSize; char *buf; @@ -462,7 +461,6 @@ cd9660_copy_file(iso9660_disk *diskStructure, FILE *fd, off_t start_sector, (void)fclose(rf); return 0; } - sector++; } fclose(rf); From nobody Mon Apr 17 13:13: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 4Q0SCy5Cdhz45sqG; Mon, 17 Apr 2023 13:13: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 4Q0SCy1f3Bz3sGs; Mon, 17 Apr 2023 13:13:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681737198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QVnAVhRB0m88ZDHpQvDk0XTmRYSVzhrf24CQMBnJjEU=; b=O5a4osIvQRZDITJAzsU6UeZkgloAtc+dHxmELeIJQbs0DkVwZ9xIXNKlIXz+Y2DHsKK158 npdw1TtwUs0xxfkevRUIua82areM5nCCE++MP8Pf03sCqViOL44nZqy5xAz4k6XO1JUd7G ZJjTP4Ex0/0CdpAACyR+sa1voGDDash57/venDW3uVzGojr7F7ztABgkqN8ZmlhGG64o1j PAr20V7ELNbHoyuodRI7KmfaGrYnlUxPEixlBii9A/lfyq/1rU76RDSawHfKqFKz/uWAvj R5a3CjJVIMrbaSYEs/TMDMnrysVQDKVkoGG3jyCDQEv6wTkUMVxh+CZ+WcA1Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681737198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QVnAVhRB0m88ZDHpQvDk0XTmRYSVzhrf24CQMBnJjEU=; b=KysUQ4Fkix19XPKhlUNJ7QF1ohkE+iO4hWOLQyzji6lhqDpdaOvOw3Qmi/E2Fd/bnUlamq l+D9L1PZdycvvxuYXPFk3/2cSGPlpPucw9XDkR3OPlN1IPvNO+ZVWC0DLb2jkAsoHIalI7 VJ72f9TvX75cjD+mQXS2P+JIDF5DsPDMKpyI87ifE9E40vyo8DJ4JJvMNpIX2HHmUartpx IocxF5u6JwvboJMGa6wGyuCfSrubuGxbuvWyioaa3jRaj8XR6L3pzuqEalUtYIcy/7DrG5 VqZkFkrjKtP5nU/9XG4yuDHEkVujX8kHwz38eC9RE358yJ/nmwjZ/sh7gKZBbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681737198; a=rsa-sha256; cv=none; b=D551agYJ6FgET1Ahhw8ji02gBD9zqNytdE/nU7PLpUYcj/ruXQKI7sYuhn1RnZCm938YS/ c5y1XG88hCHhx5sZ5Jn8qzv6qoEVutjdFf6FC+ranbwmZvuNzKm7dgJ6qqLdjy2ZwBAveN B0BR24f5Agb3QCyuxaBXEaf6r7vLEEuQNt6HQNsmkMbCtSp/sielmPpA4BvbnHsR2+p/8+ cYpcSkKLJrzzJbl/VIawYxb9KujH2OKPPwmalNqXOmdQWuxbzT8Hs0yE2N/AWI4mD5EFqB 9snpEzdQjMucYVucxyhzZOW6kWIN1+IPfFHQPEgTjoaHyI6VtfAFQ2OUiSs+ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0SCy0cXLzW8x; Mon, 17 Apr 2023 13:13: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 33HDDHvl023342; Mon, 17 Apr 2023 13:13:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HDDHuQ023341; Mon, 17 Apr 2023 13:13:17 GMT (envelope-from git) Date: Mon, 17 Apr 2023 13:13:17 GMT Message-Id: <202304171313.33HDDHuQ023341@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: 46529cb99040 - stable/13 - awk: errror on printf format strings lacking conversion specifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 46529cb990402ed46f5f3555aecc41091ef63f41 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=46529cb990402ed46f5f3555aecc41091ef63f41 commit 46529cb990402ed46f5f3555aecc41091ef63f41 Author: Ed Maste AuthorDate: 2023-04-14 14:49:05 +0000 Commit: Ed Maste CommitDate: 2023-04-17 13:13:10 +0000 awk: errror on printf format strings lacking conversion specifier Reported by: phk Reviewed by: imp, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39573 (cherry picked from commit 5dbd073b045c8e98730c025a4acf2279be26c33e) --- contrib/one-true-awk/run.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c index 117fb0748bd8..b81dafba35e6 100644 --- a/contrib/one-true-awk/run.c +++ b/contrib/one-true-awk/run.c @@ -912,6 +912,9 @@ int format(char **pbuf, int *pbufsize, const char *s, Node *a) /* printf-like co case 'c': flag = 'c'; break; + case '\0': + FATAL("missing printf conversion specifier"); + break; default: WARNING("weird printf conversion %s", fmt); flag = '?'; From nobody Mon Apr 17 13:13:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0SDj3QmHz45stF; Mon, 17 Apr 2023 13:13: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 4Q0SDj31rQz3t7R; Mon, 17 Apr 2023 13:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681737237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oEnwOjn3Nov2ZiWjfRWzkcYGQqGvKDfXG4G7MgMfKmI=; b=sOCwhVpvS227MBzJW5dyXPu9H7JfnxNpaUwybnkZQitTGaJjQxB7oLH2zQA4gOavWkxQYK YEnQRCFK5dFcRzCEW1xzbu55v6HEv+hseXri+066I3A93aOhsDqsYhgDz434pDZC7FbIXc ShoDHAiaCV2YRnfSlI61SdM1HUa10Aj1y/4+oQ2wD2KPIYmT+/0LKtrnTfyCWxtFZtxTiV QZ3j9PtE5r7fXNRd0mzQLNmwvirfsJg1NC5BzSh8nuL3/ABC198LjngQItEGqe0jXwfxDd s8LS4RxtfpniG1LZn5Yim+FPURAk2/Ict2LMoDZL+xnuuNsvsA1irwdqPVzhKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681737237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oEnwOjn3Nov2ZiWjfRWzkcYGQqGvKDfXG4G7MgMfKmI=; b=Qf29QKUKSKNuJYequvDR0Q1xX29VqHfTKLgk1HexAlLJCcqHtHZkPBx61zmedRNgJBSo8d G7oPldZWn96Fh5oFHeuTz19blrge5iprD9TdjlHNnKKpfT8/qtbPFl9IsEWvGDb9tlyhGV 6yMrYwYiu0eYYZ+3rWME5T1O6g4Cal2wJQY53k3zrWVE0honWNgjmED99J4UE1sRExIzxc e79x834k+s9nuYqa6oM50oW1WTzTDzbA3TSBpxoR7HVmAwqQ3IH+ltQkLexWoB57A1kilY o+PWsv2pW7D0dcj7dkg6OtHwUVPaII61Kh4qASCjQsC0spCaiyJJ7olUb/K2fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681737237; a=rsa-sha256; cv=none; b=YqsUsJHr+EbjCOBRkbds38TT1XCr3TGPmX2NshFXayymwSIS5XidkBiF1Av7g3HEsaHrO2 DwjVOYNqA8u5EASACW65tPUOJJUs7h/aiyXSGhMkGXm2ipCchAvBBWQDdyEDtAbt94tnbg lBUQ9sXIHUFHjAjAdAN8odQuQbhBTxvBJiQgGioj6EETb209KMW94gUFLVRGNCTx0n1urU GCbSed3zcssZhoef0OaL1lCXBOqnImh//+/hm2Z2cr4c052CQYR5S/2MaVOqKz/zHHrk8S DdRMg2PzTe7lwR6glrvRAuuMOuMB9uXsE+XKlamU4h3N+KerYn7KRWbKcS6ZVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0SDj27KbzWNw; Mon, 17 Apr 2023 13:13:57 +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 33HDDvSR023520; Mon, 17 Apr 2023 13:13:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HDDvoj023519; Mon, 17 Apr 2023 13:13:57 GMT (envelope-from git) Date: Mon, 17 Apr 2023 13:13:57 GMT Message-Id: <202304171313.33HDDvoj023519@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: 40399b2a4a8a - stable/12 - awk: errror on printf format strings lacking conversion specifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 40399b2a4a8a1a2bceb7ab484b53aa20f7189ed9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=40399b2a4a8a1a2bceb7ab484b53aa20f7189ed9 commit 40399b2a4a8a1a2bceb7ab484b53aa20f7189ed9 Author: Ed Maste AuthorDate: 2023-04-14 14:49:05 +0000 Commit: Ed Maste CommitDate: 2023-04-17 13:13:45 +0000 awk: errror on printf format strings lacking conversion specifier Reported by: phk Reviewed by: imp, markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39573 (cherry picked from commit 5dbd073b045c8e98730c025a4acf2279be26c33e) (cherry picked from commit 46529cb990402ed46f5f3555aecc41091ef63f41) --- contrib/one-true-awk/run.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/one-true-awk/run.c b/contrib/one-true-awk/run.c index 117fb0748bd8..b81dafba35e6 100644 --- a/contrib/one-true-awk/run.c +++ b/contrib/one-true-awk/run.c @@ -912,6 +912,9 @@ int format(char **pbuf, int *pbufsize, const char *s, Node *a) /* printf-like co case 'c': flag = 'c'; break; + case '\0': + FATAL("missing printf conversion specifier"); + break; default: WARNING("weird printf conversion %s", fmt); flag = '?'; From nobody Mon Apr 17 13:38: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 4Q0SmZ4HD7z45v6P; Mon, 17 Apr 2023 13:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0SmZ3fSPz3Ptp; Mon, 17 Apr 2023 13:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681738686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dW+O1cp8gj1wRUg95CwTxAq4oRvI3EQ4f4ckMarfpKo=; b=vIPIVis8WaftR8pUk3Ih4GB6eznbKn34MPnK6Wr1gL+T8gUB7hEcZvKdFtGleQRMpe3Kd3 P36HI4xwgMnTKYnveycfSBWco+y5NeHZMcbdML420b46OTArrtXRBcwvlz7XswjfkJIP+G VTBN6h/+1QcVhFsIOZ2AcVi+TTRLNYDYj/UB0w0nFYHYWr0RsI+vgN0Mb8lchOHCpOUGWL +OfMWD5MS3Jq+nBn7Sf7DrKgbF48hVjgCDDfOB//Ge6CF/lLFh90YZqTsOmLolqrTcre5j 2jp7kzN/SSIsqNm7jukWexhBqvtZU1U6LBYd6OMd/HAZ/XpCVtg4uClaHxugeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681738686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dW+O1cp8gj1wRUg95CwTxAq4oRvI3EQ4f4ckMarfpKo=; b=I+UBBLmBHjNjhBdzMwv2x1vxtPKON2Fi2vA4skCOEroXsJWw46TZjH9AFjlYPYCedGiMSp mK4uFIdk+ZzK7A6WE0VHadHZ1DvmiWclsxApzb5iTze/QzEnzbUKpgOgNVaYM+sbrgZF/i 0bl4C08CMBprPvnOk6NHhYzDODg/F121Sd88AYX9a6p7acAx0C0fcwPCNeHX6l8CElm4DJ MFTyU3Anz1d58T9YyTJvSCcnIVHtWAc6mzIRgfhTvccO6/d7zfQMXIM8njaa/etkY4MKUg MRC4mlbyMEeIEdqdB31/s2TfkjY8mTIl1r0SXnPoMQgGV8/OzuYs1g0/flosmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681738686; a=rsa-sha256; cv=none; b=iYwwVSoNBSSBJkTbmqoDa6r5k38n9X03Sdx/iZNBl4fceRfL8UiHrVMvyr31nKbkP1Lw+S +Y1Iu/yrLlNWS4VP7JduYBNCmmzMIUN8g/Flm0Z5vMuEQGBN2usIzD7629vPotaQNxjNjl blwiGDxfOf/MsGLulrfB1Zwss3rqPegeKUCgSciWbVXEjTIq5c7BBeZ1b28d/mEyczeNKT 1JZBrWTljYQXwqxWbK7wwAtWO8UgD6DZnkP1Y3U/PK8MiEt7wP3I8z4lmrwcm/6sk1OFl3 GciFzc/3O/cMnH4NEm3m1jdPii5H5xuEGn9kywTUUwYBnVc0UlC3/D/6eol//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 4Q0SmZ2XSPzWfN; Mon, 17 Apr 2023 13:38: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 33HDc6Yf056015; Mon, 17 Apr 2023 13:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HDc63P056014; Mon, 17 Apr 2023 13:38:06 GMT (envelope-from git) Date: Mon, 17 Apr 2023 13:38:06 GMT Message-Id: <202304171338.33HDc63P056014@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: da048bd318b3 - stable/13 - ofw: fix memory leak in ofwbus_attach() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da048bd318b3d144de0d4ad9596963d978a75e0f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=da048bd318b3d144de0d4ad9596963d978a75e0f commit da048bd318b3d144de0d4ad9596963d978a75e0f Author: Christos Margiolis AuthorDate: 2023-04-10 15:31:46 +0000 Commit: Mark Johnston CommitDate: 2023-04-17 13:34:02 +0000 ofw: fix memory leak in ofwbus_attach() PR: 269509 Reported by: Jaroslaw Pelczar Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38903 (cherry picked from commit 38594ff9c0c9568b5082ba3273103904a6afd38e) --- sys/dev/ofw/ofwbus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index 2a28a928e15e..6ea5be694af6 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -175,6 +175,7 @@ ofwbus_attach(device_t dev) if (ofw_bus_gen_setup_devinfo(&obd, node) != 0) continue; simplebus_add_device(dev, node, 0, NULL, -1, NULL); + ofw_bus_gen_destroy_devinfo(&obd); } return (bus_generic_attach(dev)); } From nobody Mon Apr 17 13:47: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 4Q0Sz948zwz45vnL; Mon, 17 Apr 2023 13:47: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 4Q0Sz927DKz3tLp; Mon, 17 Apr 2023 13:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681739237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=exZ7sge0w+mkW6mo1reHENvNqcW3WDzeQizG52LqGNU=; b=KD8icd+GQBx/n3+ft/6uSrOniCIecyzjGT+w3I3rR8qqcF/KWsqoxuEYmJtDF04ZGzNNnm trii/5JwSuZ8IS7PbAYy1HxVpVB4lJ8HI4mteTc/ez7WLxu/D8QYubV9pEtc8/56c6Rnk7 KcpYi+F0nj8fBNXpieij94MB3dy8PtAa9ko3hH+LPTBU6Y9mTE1A+aGphWIiYhDrVy4iSu nJ9XlO6KSn/1eRaaLjT0ULdXxy9OMipAFzki2RTBuMf2TLFqReXNInT5356uBM2Fmef806 83PifCbq+Qc1WVKqSNI/kIzlOVeozaCIhLFl9sLhhDL9VW8pA3kN4nFmIEF2ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681739237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=exZ7sge0w+mkW6mo1reHENvNqcW3WDzeQizG52LqGNU=; b=HwC8RjDL3RfX+8DKXAwxmI7Wrk01e3orZia8vkuw8K6P4SfbPTt8maTFIuvR1H21d3rT4e slI0V96zKOyys1e5z4BvNmjAf/EZYz4oAge+X0muMVSCEcVgBwcUR9XUL6EHK8WMnl+i2h bJETng4OpRprTMJj5hI0OFN7On8+bZSevhZLTnVQL7u5qefg7m8S24LwaBQZV02Vv2m9rY t6GskF3x6KwnBHWWElY4QfuNIji2JxOU7pGtEsifKDZtK9eRuw9171N6StlLXHttOsNI7+ oi0YYSeAK5zEXzFGkavw0Apz2haxiOv8QIo6t1t7r1FOhjTO6sIYFNDRUtBtAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681739237; a=rsa-sha256; cv=none; b=xphjdgikSpgnXQTccKg1Ru6Drl147gLmrPNXmO6Cv4GOWm+qkCPxHk8UUBPkmLr8zm7lhw 4xyUNjk9ozAZnPORprSbUk57KdxGF9K7SGhw6B/UC19+Wv0DRgvo8+eqZ9y7Ra4mZkWqzi m5ie6R0hU5845aCzHQ071XaB+LRb2wTiP80wpriDvFLyPjZL0eitPGxF2tobXkDL0mBZGc or1CEEYwtwIC+umsDvHmI2soHIsD1dDL0fxpBXq2+V9/NX6uLj/IAdYqVkqIa0Vq7hVNFb mYThqb7eOfxOD8i7f2BCutrZ57vkSO47J3hggJQwvT98NU11bcKKVLdFIvB52Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0Sz90Bd9zX5D; Mon, 17 Apr 2023 13:47: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 33HDlGix072178; Mon, 17 Apr 2023 13:47:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HDlGdx072177; Mon, 17 Apr 2023 13:47:16 GMT (envelope-from git) Date: Mon, 17 Apr 2023 13:47:16 GMT Message-Id: <202304171347.33HDlGdx072177@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: f656a96020e8 - main - tests: make ktest build on ppc. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f656a96020e83d1aa6d3b69f7885fc9e2cd684c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f656a96020e83d1aa6d3b69f7885fc9e2cd684c9 commit f656a96020e83d1aa6d3b69f7885fc9e2cd684c9 Author: Alexander V. Chernikov AuthorDate: 2023-04-17 13:46:44 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-17 13:47:07 +0000 tests: make ktest build on ppc. MFC after: 2 weeks --- sys/tests/ktest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/tests/ktest.c b/sys/tests/ktest.c index fcb40130bcef..495fedf95dde 100644 --- a/sys/tests/ktest.c +++ b/sys/tests/ktest.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include From nobody Mon Apr 17 13:50: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 4Q0T2J4PxWz45w5q; Mon, 17 Apr 2023 13:50: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 4Q0T2J27C5z3xcP; Mon, 17 Apr 2023 13:50:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681739400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Bg9z9wt/Xb+vuMchvkaz9Z6TvoHTownS7JjjaJvxlc=; b=jQBPb5h7DxNSc/7kh+yk6FrQbvj0UBqkMo4CegqF9THT+K4nHRmPPaUYi54oLss6OD/jxz iVhO4E+tUULwIXvgIk7KayUXrMlsksOEOEIuaLUseYHFqlk7eQkjzNB8iGzIW78CUePG+8 z4rOwmSKyta91VoiqCP+M7o+lpJGN540mi1y+kb4JpT98LBjOtLVmURRfiuw5x4IKLmbC/ PvN0izokrESHNV5kUkAx0OIMNyoEEuVXJ1XN35+YcrfNywH0wEZcbxNBpclzdVFhuo8IXf RBkVjhxpN6mOS/5bqXr+OAxbMBgWwOVCmDbJRQz0a0WiRGkWHAf1uz/8T1QE+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681739400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8Bg9z9wt/Xb+vuMchvkaz9Z6TvoHTownS7JjjaJvxlc=; b=nTTkk39ZWeoW4Cj84SOYWwhjbXdJSOL9ge0nAH+/v/fvLec1U/OYtvK9lZLc/xSvZEHCcA v/BPWbOeP1i3Dc7b8QX3EWRLMokrDzP2FbcNEXvcbo0L62bCsvkFBojN11SzmIr9urOPJg s2zk8O4ltp1oKTdsBVn92xt4ZWAMGSaYrd36IdaaILTPKQZQdiQIn8Oabh/shmbjjm18CU EyunKOmuIS9aJObKc4Ah3Liv5URBoLW+0+VH0n214/wtflCF51dOOLJdFBZ+7QTyiyQajt bTJLlN9WuHphHG/q+Zhe/fzBWCDm7ghhlZxX7Tf/4hvHIuE6Wd/7SQC/swoZkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681739400; a=rsa-sha256; cv=none; b=TpqjhCcd5aEyjRNqelK+sXZzD/aDNiSmQ3uOasOxEbe83khr/A8JJ0a8ysp4rzGub6Vb86 Uou2enbGqTmcTLcgZiYtW1zOLD1p5tPaLm0gClnxRObeCot7pfA23VqeUaKTRcBDrQhHdf mbphX4ddkEpFKOWItMxZQtGafDX+eK15DDMBDHAZNCoQNbFhWS5wbJqb+iknwAbZBJdYh9 YJKrp7vUJ05/QWEF3zgVA9fUVp72LDdxH3TgK+mvUg5NvmNIUGECkP7gB1nOuGCjv/QBjY bIaj/yt5tuzn+zMaSAoaP76HYkNZe4LaurNYdEZsn5UHYuzB5bqeB8nOtaWXwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0T2J0ywLzWdM; Mon, 17 Apr 2023 13:50: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 33HDo0SO072728; Mon, 17 Apr 2023 13:50:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HDo0A8072708; Mon, 17 Apr 2023 13:50:00 GMT (envelope-from git) Date: Mon, 17 Apr 2023 13:50:00 GMT Message-Id: <202304171350.33HDo0A8072708@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: d95fbf4e1a12 - main - riscv: save the thread pointer in both modes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d95fbf4e1a12565908b04b442263fe60c9e890b4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d95fbf4e1a12565908b04b442263fe60c9e890b4 commit d95fbf4e1a12565908b04b442263fe60c9e890b4 Author: Mark Johnston AuthorDate: 2023-04-17 13:44:44 +0000 Commit: Mark Johnston CommitDate: 2023-04-17 13:49:52 +0000 riscv: save the thread pointer in both modes The contents of frame->tf_tp are uninitialized if accessed by DTrace (in probe context), resulting in a panic when trying to access the memory pointed to by tp. This saves the thread pointer to the trap frame when handling both userland and kernel exceptions. Reviewed by: markj, mhorne MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39582 --- sys/riscv/riscv/exception.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/riscv/riscv/exception.S b/sys/riscv/riscv/exception.S index cf06c364de46..a68e7938e537 100644 --- a/sys/riscv/riscv/exception.S +++ b/sys/riscv/riscv/exception.S @@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$"); /* Load our pcpu */ sd tp, (TF_TP)(sp) ld tp, (TF_SIZE)(sp) +.else + sd tp, (TF_TP)(sp) .endif sd t0, (TF_T + 0 * 8)(sp) From nobody Mon Apr 17 14:44: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 4Q0VFP2qsJz44lBS for ; Mon, 17 Apr 2023 14:44: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 4Q0VFP1c84z4Mwq; Mon, 17 Apr 2023 14:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681742681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1JdQcAoa5fl+B3U/BqRkqiPY1ULVAn5Xdn2VBBHNKU=; b=AoAH7GoyEuUhZthoy+FA6xEEiqQSB1F5e3Fm9hmlrTlK5pef5MBrB1Mr//bJEHdbEhLfq9 tHIhlKzDMDOevfDsT/DTC7lc/XlDz4qfKM+CWnnI/M2MdJ6hADk65F+ogtrElcH5Sz5gr0 06Sox8IshzzMTaP7I8PSnMvQbCtsO3F9+o6dGuoBorSQRX66hFrZIOy1Rnu3LkNJgX3qBN Pv0g8Al8UnJyTfCYaSsk6DbqOSLHHRWl8ctHzmW/Zwtga6q8BwPoWrmqITbcgR3cAssjEh JlJ4QrGF7g3UUE1ex/e918PlnglnJtkNdZHDEgMPsB49undnPIcwBqmuLUhHtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681742681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z1JdQcAoa5fl+B3U/BqRkqiPY1ULVAn5Xdn2VBBHNKU=; b=lrXHK10MFkUmaY05ly2qQxrc41QEHKyhpRLVCgjC2LLSHv8rsUfpoxgj2XJrh9SR4yrAKn YSG1giGKP5S5U1A3IaFRnUNWZ4Mr5Tmzhbpw+Gycaom6Rwf9V/4vLlNqaZrN/OvVzWxhqO dkrzJ5N+5yAuTx+MfdD3ch1GbWSFRN7fZ1nddSRhVjLzZnQ4xDBiBXLXnzbGaib0Tp/dIh qeKxg1SSUlrhoSj5ISJhcQ7aPipCVToVOesPoh9plFYyKyHSOVvAq2w9Fp+8xU4nS9EOX7 l7CITvGMx/dyPKNwqBsa9J4voL8X9JzjFLIF3K8c0/gIBj1ak04L70/UoHOZbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681742681; a=rsa-sha256; cv=none; b=bTGnhEwYOkHoc84gDc6HtYJNW7W+Vl1td4Dz/BzDewDQvcuvIn10VV7DFR0b7lqJzVwTI3 Z26LkKvWmVHZaIZv8WkREPUlBuUV5VvZ/3e6GUikLqLNyItkpt+1hClwsfEBVcRn+OPqV3 66v/6HbCHDfzJWROa0oiixLhhcgXdneFhanjEmXhwbV2uYBaahVwHhvO4m0oc3ZTJPoVFK zCJyBDlLjeWzUZSbWZIkF/WGFIfEBAhsOTq8mfCIHTZ2ye5xlXFszgwEq9bkVTJubnnaQs hBMbWrZjrARXXCM/v/7SvYJNN1XezZVfIjBfRQQD/enUn6surO6XBYlkly5iwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0VFP0Yh1zXgB; Mon, 17 Apr 2023 14:44: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 33HEie2w070705; Mon, 17 Apr 2023 14:44:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HEie3U070704; Mon, 17 Apr 2023 14:44:40 GMT (envelope-from git) Date: Mon, 17 Apr 2023 14:44:40 GMT Message-Id: <202304171444.33HEie3U070704@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: c013c3ddbfff - Create tag vendor/sqlite3/sqlite-3410200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/sqlite3/sqlite-3410200 X-Git-Reftype: annotated tag X-Git-Commit: c013c3ddbfff696bfe5be055cfc2e21c53bfe8bb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/sqlite3/sqlite-3410200 has been created by cy: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/sqlite3/sqlite-3410200 tag vendor/sqlite3/sqlite-3410200 Tagger: Cy Schubert TaggerDate: 2023-04-17 14:12:23 +0000 Tag sqlite3 3.41.2 commit 853a43f7c79218855a6e45a25a00b942972e3fa1 Author: Cy Schubert AuthorDate: 2023-04-17 14:10:51 +0000 Commit: Cy Schubert CommitDate: 2023-04-17 14:10:51 +0000 sqlite3: Vendor import of sqlite3 3.41.2 Release notes at https://www.sqlite.org/releaselog/3_41_2.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz From nobody Mon Apr 17 14:44: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 4Q0VFP2m2Lz44kpW for ; Mon, 17 Apr 2023 14:44: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 4Q0VFP1JfTz4NBZ; Mon, 17 Apr 2023 14:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681742681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1z0kL7RL9Q9qlFdDJKyrUkeW/DLVUIADQICXXKIWc0=; b=MCPPa8SxebF98SZ0m8YkxS9PdN8BKiGS++0tfnH07Fd09ZiDjLRaasdmqtqNMxzJ9CD8Ku tAaqFofmYFX9f4iUXWTUSvrsKpozFKFlz5NWr7TtAPTS1sS+9yAE6DRlYzxcz79fYEgAXD vfrO+PPYDy0Ipfh3A6/SVFa9gBcRkKJC/YxCzw6Q06kh4QElHFdMEf65243BjVylI4GNSt 8se+oDsA/porCnBHknMQbIKBfJnLOySFB5iUUHmxU8xWc94NCHjHfpL6Iv+PSWudHY7LfQ lA7ARrV8PIf25yn9oYVyKzgKUbCB9WGK9faJt5+/ElHKvjPvWoxYzN6UAi7IVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681742681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1z0kL7RL9Q9qlFdDJKyrUkeW/DLVUIADQICXXKIWc0=; b=eipd8ezrls7kQZoDW8piSwaoxoXEYxm99/oldxDip1PWFc14wvCP4t7X7+QsSHkuGmmile 5I8dzdnS9Bya7s0AGgyEt4tmxIpOPRFIy7r4g2W3h43/iC8LARgeQ6fEWZzKYl6uev7lvo o3MlLGxaaCJLp4zeNdDswjMTccsNpKpDQKqXovKrNP60uWB4dZujx7BoZVsPr7+eApRDZo QZvbrpSaY9YBcQLFw2wdpq1VF6dKGqsd71SvHuRM1x8ZDU80vn3cXsjCuurGj8Ek2MVcxm fFltQy0hTUQPDUoI8aZQ0jnpU0P9oZfkjQQMy8xpw5bTElbGmnsT+Oep+d0a6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681742681; a=rsa-sha256; cv=none; b=M60HUDRpjskRGEz15D7tgwwp/L49kTXRNpfeOu5+Z5NgZbBrG/kD6RvkT2KrklsggfyJnJ uYCzj0lAAytK/q6xF84Yx8YfTy95ofZe0J8lpZTG5UkQOpEBB5q8d6ijDVbc0QzPk0jATc 3fCXJ/NuxJW561r14pE+6GojLyF0SezSF9jshwR2R9lPnDSQHBiKDyeeP0tEgUqlkPrg5P 3yoGxHq82fh8ux8RC4gv3zae4Gc5ows2MRuRByvOWA2FnT5qssXptqtyS0yLV9di6Urszh sn/A2dj2ye08JyO8AhhGlTGf82VoM3//jtxZYyDVLlRWJjr9r64lPAFtvZhejw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0VFP07J2zYfs; Mon, 17 Apr 2023 14:44: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 33HEiems070686; Mon, 17 Apr 2023 14:44:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HEiec8070685; Mon, 17 Apr 2023 14:44:40 GMT (envelope-from git) Date: Mon, 17 Apr 2023 14:44:40 GMT Message-Id: <202304171444.33HEiec8070685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Cy Schubert Subject: git: 615bd3eb2a22..853a43f7c792 - vendor/sqlite3 - 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/sqlite3 X-Git-Reftype: branch X-Git-Commit: 853a43f7c79218855a6e45a25a00b942972e3fa1 X-Git-Oldrev: 615bd3eb2a2225e83e14d5b2a82649430889483c X-Git-Newrev: 853a43f7c79218855a6e45a25a00b942972e3fa1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/sqlite3 has been updated by cy: URL: https://cgit.FreeBSD.org/src/log/?id=615bd3eb2a22..853a43f7c792 853a43f7c792 sqlite3: Vendor import of sqlite3 3.41.2 From nobody Mon Apr 17 14:57: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 4Q0VX947Gzz44mYV; Mon, 17 Apr 2023 14:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0VX93j4Tz3kwb; Mon, 17 Apr 2023 14:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681743449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=98bgPN+bJmLhnP3z2JqbR7QAVWQSb6xcOgfFKH/gDA0=; b=lUosIb5VKi9HyJ/nOfg7t69DyGKm6HjIY9cO7CHnf9ZkgD6sccnKOA3wjG9SZ/j3eCwn2v J+LRmLMBkQapKtIVEt0Oit/sqhcw2MEVDRi4qW7p6CYrwBl152/cUE2ncQ+bou+CvxVHWv rHk2/z28+L3pkhSyVoCaiYMNsyHch8O88qyy708PK17ucwsdd/xre0ZpUofKLsiv4suhFl rDV1eJf3B36k3iXHSAe+Zo3eIgNIe3uR7u8Xamdtp9v+9XOuTSAnfPjzNmgm2pt3FEPtU4 pAW2znA5Wm6OwxPWn/EX+WXOeUKZzK3YgSDympQNZVny7A9fwun/zcD7FsEAIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681743449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=98bgPN+bJmLhnP3z2JqbR7QAVWQSb6xcOgfFKH/gDA0=; b=W4tl/4iX+wEQFpAJHwOdwMnPhzekCQtWMvakNyYl+mWzGKe0sF4t90XS3ayYFcVEl3AYXg UroesqbiUBUPCKHyhHMWmmPD10kZSNTzUUoIQXwQlItydNNaj8w+7NAkiQSQGv2K0PHL5W yE5CxcZd3WbZVDyd5FtaB3w2lfLbSMW2R2fNYz4/InloDBIQUwupT0K2/SzVR3TnqLqr11 bNMyyoKQQhqfCSrkCcTu4tCXvWj7d6EzFGn1d46tNWa6joXieddA4XWiTUOt2dlcETj6lJ c6prgQ8ML44ifFG8IonfXyheDE+G2CESsObxI7htHVmftd883Wgmgki5ANLhgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681743449; a=rsa-sha256; cv=none; b=poFRNSX25Pft7R24JKNLRhuYb/gZk5NiDl7oZ5jC4DXqcsMgJVMmBIq4aT+ngJ/Qzwfu19 URhTaRXbb38eCKbcMmJSnSyDvpGRZYIFMdTK0glZTumxg6IUthxHYGon8iP2hoTWA33ydu BGMHe368rp4tCxtvQiN7b1TGZ6uuBQBAI5aAzb68A/muYvuL/Iz47bkr3dmHMbjt/Dq+KT sZdAjbu759UIlJujXOv+kyy0ZjFaG+gBjpat72HLqRNJjXXO/Sl6C4zyWdoQQAlJmjUe42 a8zuL958wZqfK95qY89jO4KQyyGQBg+amjG+xw1zcEcws43ApIughot4uKIUnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0VX92nrHzYjY; Mon, 17 Apr 2023 14:57: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 33HEvT4M087527; Mon, 17 Apr 2023 14:57:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HEvTUr087526; Mon, 17 Apr 2023 14:57:29 GMT (envelope-from git) Date: Mon, 17 Apr 2023 14:57:29 GMT Message-Id: <202304171457.33HEvTUr087526@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: 4654ba28fb8b - main - release: Remove "All Rights Reserved" from FreeBSD Foundation copyrights List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4654ba28fb8b0a7d74366120cc1967791b46ac3a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4654ba28fb8b0a7d74366120cc1967791b46ac3a commit 4654ba28fb8b0a7d74366120cc1967791b46ac3a Author: Ed Maste AuthorDate: 2023-04-17 14:56:59 +0000 Commit: Ed Maste CommitDate: 2023-04-17 14:56:59 +0000 release: Remove "All Rights Reserved" from FreeBSD Foundation copyrights --- release/scripts/mk-vmimage.sh | 1 - release/tools/arm.subr | 1 - 2 files changed, 2 deletions(-) diff --git a/release/scripts/mk-vmimage.sh b/release/scripts/mk-vmimage.sh index bcf77ffd8f0f..c03374e0c790 100755 --- a/release/scripts/mk-vmimage.sh +++ b/release/scripts/mk-vmimage.sh @@ -1,7 +1,6 @@ #!/bin/sh #- # Copyright (c) 2014, 2015 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Glen Barber under sponsorship # from the FreeBSD Foundation. diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 9fa76db8b2af..a5d101c0c4fd 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -1,7 +1,6 @@ #!/bin/sh #- # Copyright (c) 2015-2017 The FreeBSD Foundation -# All rights reserved. # # Portions of this software were developed by Glen Barber # under sponsorship from the FreeBSD Foundation. From nobody Mon Apr 17 15:47: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 4Q0WfG4ckTz44pr6; Mon, 17 Apr 2023 15:47: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 4Q0WfG3kCFz49Sc; Mon, 17 Apr 2023 15:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2MWiioKvyUgiwVLakEag+e7QQIZjm962U8xfXuGtdFc=; b=GKAAZ5mYH+G3Ro8XzV5wkp1uIMSyL5uwccJ4REJ3YWBjbtEmM3MDJEvEY+zFO1XPC1LGbA xEL3mcQSW5m+ZzrHm+QWt8zrbNoxOWMqPkFICmj4FdcM1t7N30y+g6V25WA1AaeXqFbw1T dYrzfrtHY9xIwespmY7lJX2q+I79F/sL7+S+avbk85XA6iDDFhEDK9Z/mdvZHhKTOkqx0m N8TEEBFukUz8sqTq43qffIjMXlB/nHvJzAGKojZCCibVePY64knUJIgOTYM8Z4fhU7EiJL wEiYIseQ9ktshGPccBcPbqmdrygPGkk9khg4r1AB51qjjXnv7Y+ff8pNsFAStQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2MWiioKvyUgiwVLakEag+e7QQIZjm962U8xfXuGtdFc=; b=qJn+yV38bZv8R9wT3UrWBd5i31l3/uGgMzR9QP4QN1jvuIH2ToifALYnN16xbrq01TjEZF QIsZkzTgfuy4bNs+AqbIEWJln3n2JbW0I3A4+OaqbWrtOLql2hrO9t9iJbz9F8GK/cydps 2wFKbf0zpMO8A6EkW3BrcUqDOIbUajkLkDrGGM8VutbaKcVm3p5uz5g/HJ1OwYaa1aL6Nv 9dNEz4gdcYflWWNWetnsfCUp7L75YDlzDKUJJCnRyKz/0eJOr+0SLDJK37ByCtEClPdc1z RtERciGCGDJNt0UAY8NsIfNmOKuiTp9TkJ9boCsyNisqwKNAynQv+trZhhLGzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681746470; a=rsa-sha256; cv=none; b=WnP6TQF94wlf5Db/N2iYdH5IXshdtTHpOx4SShWa0gD8r01I7/fuiUROLmEWMBCns1Zo// 13v1OPsqbrAlgDb68P5qBsDaWCRvSXa4nfsICkEKeS0ZgFSCVKWZBEIAXe8gDimGBoXgkY 5mMsIe8tGW5R5UFSkj2t8hnjgdKbMuKg97eTV/fHIoBq1oLx+oSjwypYKYfUwF3xyMxo36 MGMY1DB8dC85JzsVxWKo8NlA5h5A12PzMAr9rGbj/VphkpyxUaeZ+w3w35p8KPgXUu8u7U f0IJsqQIfwt/mva08uA6UoKnc7veagTju4dIj4pPln4y+Rt2k10/UIzGTzTisg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0WfG2n49zbL3; Mon, 17 Apr 2023 15:47: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 33HFlogd070448; Mon, 17 Apr 2023 15:47:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HFloTH070447; Mon, 17 Apr 2023 15:47:50 GMT (envelope-from git) Date: Mon, 17 Apr 2023 15:47:50 GMT Message-Id: <202304171547.33HFloTH070447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 8512d82ea070 - main - veriexec: Additional functionality for MAC/veriexec List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8512d82ea0700df1c31232a0fe4c777d95600de3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=8512d82ea0700df1c31232a0fe4c777d95600de3 commit 8512d82ea0700df1c31232a0fe4c777d95600de3 Author: Steve Kiernan AuthorDate: 2023-04-02 19:33:10 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 15:47:32 +0000 veriexec: Additional functionality for MAC/veriexec Ensure veriexec opens the file before doing any read operations. When the MAC_VERIEXEC_CHECK_PATH_SYSCALL syscall is requested, veriexec needs to open the file before calling mac_veriexec_check_vp. This is to ensure any set up is done by the file system. Most file systems do not explicitly need an open, but some (e.g. virtfs) require initialization of access tokens (file identifiers, etc.) before doing any read or write operations. The evaluate_fingerprint() function needs to ensure it has an open file for reading in order to evaluate the fingerprint. The ideal solution is to have a hook after the VOP_OPEN call in vn_open. For now, we open the file for reading, envaluate the fingerprint, and close the file. While this leaves a potential hole that could possibly be taken advantage of by a dedicated aversary, this code path is not typically visited often in our use cases, as we primarily encounter verified mounts and not individual files. This should be considered a temporary workaround until discussions about the post-open hook have concluded and the hook becomes available. Add MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL and MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL to mac_veriexec_syscall so we can fetch and check label contents in an unconstrained manner. Add a check for PRIV_VERIEXEC_CONTROL to do ioctl on /dev/veriexec Make it clear that trusted process cannot be debugged. Attempts to debug a trusted process already fail, but the failure path is very obscure. Add an explicit check for VERIEXEC_TRUSTED in mac_veriexec_proc_check_debug. We need mac_veriexec_priv_check to not block PRIV_KMEM_WRITE if mac_priv_gant() says it is ok. Reviewed by: sjg Obtained from: Juniper Networks, Inc. --- lib/libveriexec/Makefile | 4 +- lib/libveriexec/libveriexec.h | 8 + lib/libveriexec/veriexec_get.c | 184 ++++++++++++++++++++++ sys/dev/veriexec/veriexec_ioctl.h | 5 +- sys/dev/veriexec/verified_exec.c | 2 +- sys/security/mac_veriexec/mac_veriexec.c | 100 +++++++++++- sys/security/mac_veriexec/mac_veriexec.h | 27 +++- sys/security/mac_veriexec/mac_veriexec_internal.h | 6 +- sys/security/mac_veriexec/veriexec_metadata.c | 43 ++--- sys/sys/priv.h | 3 +- 10 files changed, 343 insertions(+), 39 deletions(-) diff --git a/lib/libveriexec/Makefile b/lib/libveriexec/Makefile index 2c68faf3356f..84e2b8329967 100644 --- a/lib/libveriexec/Makefile +++ b/lib/libveriexec/Makefile @@ -8,7 +8,9 @@ INCS= libveriexec.h WARNS?= 2 -SRCS= veriexec_check.c +SRCS= \ + veriexec_check.c \ + veriexec_get.c .include diff --git a/lib/libveriexec/libveriexec.h b/lib/libveriexec/libveriexec.h index 42d2c964a174..d186db0ab8d9 100644 --- a/lib/libveriexec/libveriexec.h +++ b/lib/libveriexec/libveriexec.h @@ -29,9 +29,17 @@ #ifndef __LIBVERIEXEC_H__ #define __LIBVERIEXEC_H__ +struct mac_veriexec_syscall_params; + int veriexec_check_fd_mode(int, unsigned int); int veriexec_check_path_mode(const char *, unsigned int); int veriexec_check_fd(int); int veriexec_check_path(const char *); +int veriexec_get_pid_params(pid_t, struct mac_veriexec_syscall_params *); +int veriexec_get_path_params(const char *, + struct mac_veriexec_syscall_params *); +int veriexec_check_pid_label(pid_t, const char *); + +#define HAVE_VERIEXEC_CHECK_PID_LABEL 1 #endif /* __LIBVERIEXEC_H__ */ diff --git a/lib/libveriexec/veriexec_get.c b/lib/libveriexec/veriexec_get.c new file mode 100644 index 000000000000..46df6eecf76e --- /dev/null +++ b/lib/libveriexec/veriexec_get.c @@ -0,0 +1,184 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2021-2023, Juniper Networks, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include + +#include +#include + +#include + +/** + * @brief get veriexec params for a process + * + * @return + * @li 0 if successful + */ +int +veriexec_get_pid_params(pid_t pid, + struct mac_veriexec_syscall_params *params) +{ + struct mac_veriexec_syscall_params_args args; + + if (params == NULL) + return EINVAL; + + args.u.pid = pid; + args.params = params; + return mac_syscall(MAC_VERIEXEC_NAME, + MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL, &args); +} + +/** + * @brief get veriexec params for a process + * + * @return + * @li 0 if successful + */ +int +veriexec_get_path_params(const char *file, + struct mac_veriexec_syscall_params *params) +{ + struct mac_veriexec_syscall_params_args args; + + if (file == NULL || params == NULL) + return EINVAL; + + args.u.filename = file; + args.params = params; + return mac_syscall(MAC_VERIEXEC_NAME, + MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL, &args); +} + +/** + * @brief check if label contains what we want + * + * @return + * @li 0 if no + * @li 1 if yes + */ +int +veriexec_check_pid_label(pid_t pid, const char *want) +{ + struct mac_veriexec_syscall_params params; + char *cp; + size_t n; + + if (want != NULL && + veriexec_get_pid_params(pid, ¶ms) == 0) { + /* Does label contain [,][,] ? */ + if (params.labellen > 0 && + (cp = strstr(params.label, want)) != NULL) { + if (cp == params.label || cp[-1] == ',') { + n = strlen(want); + if (cp[n] == '\0' || cp[n] == ',') + return 1; /* yes */ + } + } + } + return 0; /* no */ +} + +#ifdef UNIT_TEST +#include +#include +#include + +static char * +hash2hex(char *type, unsigned char *digest) +{ + static char buf[2*MAXFINGERPRINTLEN+1]; + size_t n; + int i; + + if (strcmp(type, "SHA1") == 0) { + n = 20; + } else if (strcmp(type, "SHA256") == 0) { + n = 32; + } else if (strcmp(type, "SHA384") == 0) { + n = 48; + } + for (i = 0; i < n; i++) { + sprintf(&buf[2*i], "%02x", (unsigned)digest[i]); + } + return buf; +} + +int +main(int argc, char *argv[]) +{ + struct mac_veriexec_syscall_params params; + pid_t pid; + char *want = NULL; + int pflag = 0; + int error; + int c; + + while ((c = getopt(argc, argv, "pw:")) != -1) { + switch (c) { + case 'p': + pflag = 1; + break; + case 'w': + want = optarg; + break; + default: + break; + } + } + for (; optind < argc; optind++) { + + if (pflag) { + pid = atoi(argv[optind]); + if (want) { + error = veriexec_check_pid_label(pid, want); + printf("pid=%d want='%s': %d\n", + pid, want, error); + continue; + } + error = veriexec_get_pid_params(pid, ¶ms); + } else { + error = veriexec_get_path_params(argv[optind], ¶ms); + } + if (error) { + err(2, "%s, error=%d", argv[optind], error); + } + + printf("arg=%s, type=%s, flags=%u, label='%s', fingerprint='%s'\n", + argv[optind], params.fp_type, (unsigned)params.flags, + params.label, + hash2hex(params.fp_type, params.fingerprint)); + } + return 0; +} +#endif diff --git a/sys/dev/veriexec/veriexec_ioctl.h b/sys/dev/veriexec/veriexec_ioctl.h index 2fcccbb3c175..1409ebb9f40f 100644 --- a/sys/dev/veriexec/veriexec_ioctl.h +++ b/sys/dev/veriexec/veriexec_ioctl.h @@ -1,7 +1,7 @@ /* * $FreeBSD$ * - * Copyright (c) 2011-2013, 2015, 2019, Juniper Networks, Inc. + * Copyright (c) 2011-2023, Juniper Networks, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,11 +34,8 @@ #ifndef _DEV_VERIEXEC_VERIEXEC_IOCTL_H #define _DEV_VERIEXEC_VERIEXEC_IOCTL_H -#include #include -#define VERIEXEC_FPTYPELEN 16 - struct verified_exec_params { unsigned char flags; char fp_type[VERIEXEC_FPTYPELEN]; /* type of fingerprint */ diff --git a/sys/dev/veriexec/verified_exec.c b/sys/dev/veriexec/verified_exec.c index 1cb3cd75dbbe..c00aa49c2f6c 100644 --- a/sys/dev/veriexec/verified_exec.c +++ b/sys/dev/veriexec/verified_exec.c @@ -99,7 +99,7 @@ verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, * * MAC/veriexec will grant kmem write privs to "trusted" processes. */ - error = priv_check(td, PRIV_KMEM_WRITE); + error = priv_check(td, PRIV_VERIEXEC_CONTROL); if (error) return (error); diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index 52202f87f666..bae8c2b9055c 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2011, 2012, 2013, 2015, 2016, 2019 Juniper Networks, Inc. + * Copyright (c) 2011-2023 Juniper Networks, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -330,7 +330,10 @@ mac_veriexec_proc_check_debug(struct ucred *cred, struct proc *p) if (error != 0) return (0); - return ((flags & VERIEXEC_NOTRACE) ? EACCES : 0); + error = (flags & (VERIEXEC_NOTRACE|VERIEXEC_TRUSTED)) ? EACCES : 0; + MAC_VERIEXEC_DBG(4, "%s flags=%#x error=%d", __func__, flags, error); + + return (error); } /** @@ -406,6 +409,9 @@ mac_veriexec_kld_check_load(struct ucred *cred, struct vnode *vp, * - PRIV_KMEM_WRITE\n * Check if writes to /dev/mem and /dev/kmem are allowed\n * (Only trusted processes are allowed) + * - PRIV_VERIEXEC_CONTROL\n + * Check if manipulating veriexec is allowed\n + * (only trusted processes are allowed) * * @param cred credentials to use * @param priv privilege to check @@ -415,20 +421,30 @@ mac_veriexec_kld_check_load(struct ucred *cred, struct vnode *vp, static int mac_veriexec_priv_check(struct ucred *cred, int priv) { + int error; /* If we are not enforcing veriexec, nothing for us to check */ if ((mac_veriexec_state & VERIEXEC_STATE_ENFORCE) == 0) return (0); + error = 0; switch (priv) { case PRIV_KMEM_WRITE: - if (!mac_veriexec_proc_is_trusted(cred, curproc)) - return (EPERM); + case PRIV_VERIEXEC_CONTROL: + /* + * Do not allow writing to memory or manipulating veriexec, + * unless trusted + */ + if (mac_veriexec_proc_is_trusted(cred, curproc) == 0 && + mac_priv_grant(cred, priv) != 0) + error = EPERM; + MAC_VERIEXEC_DBG(4, "%s priv=%d error=%d", __func__, priv, + error); break; default: break; } - return (0); + return (error); } /** @@ -812,7 +828,24 @@ mac_veriexec_syscall(struct thread *td, int call, void *arg) cap_rights_t rights; struct vattr va; struct file *fp; - int error; + struct mac_veriexec_syscall_params_args pargs; + struct mac_veriexec_syscall_params result; + struct mac_veriexec_file_info *ip; + struct proc *proc; + struct vnode *textvp; + int error, flags, proc_locked; + + nd.ni_vp = NULL; + proc_locked = 0; + textvp = NULL; + switch (call) { + case MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL: + case MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL: + error = copyin(arg, &pargs, sizeof(pargs)); + if (error) + return error; + break; + } switch (call) { case MAC_VERIEXEC_CHECK_FD_SYSCALL: @@ -863,18 +896,69 @@ cleanup_file: NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | LOCKSHARED | AUDITVNODE1, UIO_USERSPACE, arg); - error = namei(&nd); + flags = FREAD; + error = vn_open(&nd, &flags, 0, NULL); if (error != 0) break; NDFREE_PNBUF(&nd); /* Check the fingerprint status of the vnode */ error = mac_veriexec_check_vp(td->td_ucred, nd.ni_vp, VVERIFY); - vput(nd.ni_vp); + /* nd.ni_vp cleaned up below */ + break; + case MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL: + if (pargs.u.pid == 0 || pargs.u.pid == curproc->p_pid) { + proc = curproc; + } else { + proc = pfind(pargs.u.pid); + if (proc == NULL) + return (EINVAL); + proc_locked = 1; + } + textvp = proc->p_textvp; + /* FALLTHROUGH */ + case MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL: + if (textvp == NULL) { + /* Look up the path to get the vnode */ + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, pargs.u.filename); + flags = FREAD; + error = vn_open(&nd, &flags, 0, NULL); + if (error != 0) + break; + + NDFREE_PNBUF(&nd); + textvp = nd.ni_vp; + } + error = VOP_GETATTR(textvp, &va, curproc->p_ucred); + if (proc_locked) + PROC_UNLOCK(proc); + if (error != 0) + break; + + error = mac_veriexec_metadata_get_file_info(va.va_fsid, + va.va_fileid, va.va_gen, NULL, &ip, FALSE); + if (error != 0) + break; + + result.flags = ip->flags; + strlcpy(result.fp_type, ip->ops->type, sizeof(result.fp_type)); + result.labellen = ip->labellen; + if (ip->labellen > 0) + strlcpy(result.label, ip->label, sizeof(result.label)); + result.label[result.labellen] = '\0'; + memcpy(result.fingerprint, ip->fingerprint, + ip->ops->digest_len); + + error = copyout(&result, pargs.params, sizeof(result)); break; default: error = EOPNOTSUPP; } + if (nd.ni_vp != NULL) { + VOP_UNLOCK(nd.ni_vp); + vn_close(nd.ni_vp, FREAD, td->td_ucred, td); + } return (error); } diff --git a/sys/security/mac_veriexec/mac_veriexec.h b/sys/security/mac_veriexec/mac_veriexec.h index db5a13bbd06c..e4d336ce4ff4 100644 --- a/sys/security/mac_veriexec/mac_veriexec.h +++ b/sys/security/mac_veriexec/mac_veriexec.h @@ -29,6 +29,8 @@ #ifndef _SECURITY_MAC_VERIEXEC_H #define _SECURITY_MAC_VERIEXEC_H +#include + #ifdef _KERNEL #include #include @@ -42,8 +44,12 @@ #define MAC_VERIEXEC_NAME "mac_veriexec" /* MAC/veriexec syscalls */ -#define MAC_VERIEXEC_CHECK_FD_SYSCALL 1 -#define MAC_VERIEXEC_CHECK_PATH_SYSCALL 2 +#define MAC_VERIEXEC_CHECK_FD_SYSCALL 1 +#define MAC_VERIEXEC_CHECK_PATH_SYSCALL 2 +#define MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL 3 +#define MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL 4 + +#define VERIEXEC_FPTYPELEN 16 /* hash name */ /** * Enough room for the largest signature... @@ -68,6 +74,23 @@ match signature */ #define VERIEXEC_STATE_LOCKED (1<<3) /**< Do not allow further changes */ +/* for MAC_VERIEXEC_GET_PARAMS_*_SYSCALL */ +struct mac_veriexec_syscall_params { + char fp_type[VERIEXEC_FPTYPELEN]; + unsigned char fingerprint[MAXFINGERPRINTLEN]; + char label[MAXLABELLEN]; + size_t labellen; + unsigned char flags; +}; + +struct mac_veriexec_syscall_params_args { + union { + pid_t pid; + const char *filename; + } u; /* input only */ + struct mac_veriexec_syscall_params *params; /* result */ +}; + #ifdef _KERNEL /** * Version of the MAC/veriexec module diff --git a/sys/security/mac_veriexec/mac_veriexec_internal.h b/sys/security/mac_veriexec/mac_veriexec_internal.h index 6fc963a12393..e69f34df892e 100644 --- a/sys/security/mac_veriexec/mac_veriexec_internal.h +++ b/sys/security/mac_veriexec/mac_veriexec_internal.h @@ -78,9 +78,9 @@ int mac_veriexec_metadata_get_executable_flags(struct ucred *cred, struct proc *p, int *flags, int check_files); int mac_veriexec_metadata_get_file_flags(dev_t fsid, long fileid, unsigned long gen, int *flags, int check_files); -struct mac_veriexec_file_info * - mac_veriexec_metadata_get_file_info(dev_t fsid, long fileid, - unsigned long gen, int *found_dev, int check_files); +int mac_veriexec_metadata_get_file_info(dev_t fsid, long fileid, + unsigned long gen, int *found_dev, + struct mac_veriexec_file_info **ipp, int check_files); void mac_veriexec_metadata_init(void); void mac_veriexec_metadata_print_db(struct sbuf *sbp); int mac_veriexec_metadata_unmounted(dev_t fsid, struct thread *td); diff --git a/sys/security/mac_veriexec/veriexec_metadata.c b/sys/security/mac_veriexec/veriexec_metadata.c index b5bfe70410d1..9e99f51e7e65 100644 --- a/sys/security/mac_veriexec/veriexec_metadata.c +++ b/sys/security/mac_veriexec/veriexec_metadata.c @@ -231,7 +231,7 @@ mac_veriexec_metadata_has_file(dev_t fsid, long fileid, unsigned long gen) { return (mac_veriexec_metadata_get_file_info(fsid, fileid, gen, NULL, - VERIEXEC_FILES_FIRST) != NULL); + NULL, VERIEXEC_FILES_FIRST) == 0); } /** @@ -438,12 +438,12 @@ mac_veriexec_metadata_get_file_flags(dev_t fsid, long fileid, unsigned long gen, int *flags, int check_files) { struct mac_veriexec_file_info *ip; - int found_dev; + int error; - ip = mac_veriexec_metadata_get_file_info(fsid, fileid, gen, &found_dev, - check_files); - if (ip == NULL) - return (ENOENT); + error = mac_veriexec_metadata_get_file_info(fsid, fileid, gen, NULL, + &ip, check_files); + if (error != 0) + return (error); *flags = ip->flags; return (0); @@ -513,9 +513,9 @@ mac_veriexec_metadata_fetch_fingerprint_status(struct vnode *vp, status = mac_veriexec_get_fingerprint_status(vp); if (status == FINGERPRINT_INVALID || status == FINGERPRINT_NODEV) { found_dev = 0; - ip = mac_veriexec_metadata_get_file_info(vap->va_fsid, - vap->va_fileid, vap->va_gen, &found_dev, check_files); - if (ip == NULL) { + error = mac_veriexec_metadata_get_file_info(vap->va_fsid, + vap->va_fileid, vap->va_gen, &found_dev, &ip, check_files); + if (error != 0) { status = (found_dev) ? FINGERPRINT_NOENTRY : FINGERPRINT_NODEV; VERIEXEC_DEBUG(3, @@ -735,19 +735,20 @@ search: /** * @brief Search the meta-data store for information on the specified file. * - * @param fsid file system identifier to look for - * @param fileid file to look for - * @param gen generation of file + * @param fsid file system identifier to look for + * @param fileid file to look for + * @param gen generation of file * @param found_dev indicator that an entry for the file system was found - * @param check_files if 1, check the files list first, otherwise check the - * exectuables list first + * @param ipp pointer to location to store the info pointer + * @param check_files if 1, check the files list first, otherwise check the + * exectuables list first * * @return A pointer to the meta-data inforation if meta-data exists for * the specified file identifier, otherwise @c NULL */ -struct mac_veriexec_file_info * +int mac_veriexec_metadata_get_file_info(dev_t fsid, long fileid, unsigned long gen, - int *found_dev, int check_files) + int *found_dev, struct mac_veriexec_file_info **ipp, int check_files) { struct veriexec_devhead *search[3]; struct mac_veriexec_file_info *ip; @@ -763,14 +764,18 @@ mac_veriexec_metadata_get_file_info(dev_t fsid, long fileid, unsigned long gen, } search[2] = NULL; - VERIEXEC_DEBUG(3, ("%s: searching for dev %ju, file %lu\n", - __func__, (uintmax_t)fsid, fileid)); + VERIEXEC_DEBUG(3, ("%s: searching for dev %#jx, file %lu.%lu\n", + __func__, (uintmax_t)fsid, fileid, gen)); /* Search for the specified file */ for (ip = NULL, x = 0; ip == NULL && search[x]; x++) ip = get_veriexec_file(search[x], fsid, fileid, gen, found_dev); - return (ip); + if (ipp != NULL) + *ipp = ip; + if (ip == NULL) + return (ENOENT); + return (0); } /** diff --git a/sys/sys/priv.h b/sys/sys/priv.h index 6574d8c42599..fe2de892f97a 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -525,11 +525,12 @@ */ #define PRIV_VERIEXEC_DIRECT 700 /* Can override 'indirect' */ #define PRIV_VERIEXEC_NOVERIFY 701 /* Can override O_VERIFY */ +#define PRIV_VERIEXEC_CONTROL 702 /* Can configure veriexec */ /* * Track end of privilege list. */ -#define _PRIV_HIGHEST 702 +#define _PRIV_HIGHEST 703 /* * Validate that a named privilege is known by the privilege system. Invalid From nobody Mon Apr 17 15:47: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 4Q0WfJ2NrVz44pr9; Mon, 17 Apr 2023 15:47: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 4Q0WfH6nq7z49NF; Mon, 17 Apr 2023 15:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8w72pL5D0gfVLWnahsFt641B9xogEpSuFBbCrMIocnQ=; b=XVaq9U2nMhhNt+L4HGqxcTaMRkth9/ygNIGqzonpI78l0xjtNnFDvXF0XopecnVia2mnkM oizZcVuNNqb4WsqpWGEdoaTMdURcjDaPj3yYeVTPontcF17HKJzkxzbuBcS2Bp48dkicFp sI6QdqiCkHN8q9kqGJc3IZBIB+eOs7RrXfcz0M8NNh9zMS0e972AFL4fKpYHUF2LdSAL5U lc+yifjspSB59VBlhI/cT7aGbxs78+Ql3YkNRB5iUYxrhA/9cfODe6DvUlIEXehnfsFwmT PnrotCXzNE/QlXdsyW9G7tU860NnkY8ydsauXzyTMpurAeC0kkOndJIQyli1xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8w72pL5D0gfVLWnahsFt641B9xogEpSuFBbCrMIocnQ=; b=FIBVNe/wSNA2lcex8ueCL3Uf8pczZOBFfycYKMv1jgiLc5veaSQPfehSLgBUgeYHAFB0nZ I/BG9V4d/UT+KcAd9gwXaU2ELJ83dlDox6l2OGwlK/e/RM4mGZ8qC4hxej8B9aTxDi0kMf IwzzcZVDjvDgIvtpAzP/8sYqbOVYSa5Ld8aG1Ld0V0MyH+GhYah7gM7WaJfQGbsaoKwb4M bPXmWbWU5uPQSTlqW5mg5JcPb/GcyBPG+hdTDRolpftm42sQIMsIbCNI/dE9dIH8+wvBzg ngb8BjvmhP8GGida3MWURueFr1xfBwJR06ZAZIMdNcwm/H1+YqVQrZn17oknog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681746472; a=rsa-sha256; cv=none; b=J3uHpNjGF2WO7Pk/Kv0eGkXt3nH1wyOs7IKxvjLNAbYWcU5RA+qm0/ceoYe2RNo3geDMfi itVVvA7glDpayIjMJd3jl61D0y9dtCtNotSy9L9fA3VBZABn9M9Xxx8yRE9KsG1BD4xGoL 6ca7Ef9RUGKJIwVrqr769iziXMKZk10z0tM7K6yV7QQoDzy/JYK4AvI2jLvrPK27cp38Cs 1fEGuzKwHE+vT7dQiErSAIL5qHJEKTorLRGY59b+l3sH8H2UAtth6Jqg0Ke1h/E+3fm3BR u9K8muTZWBux7ulbQZY4+lploReGb9F9Yq5nzb3bva9ZmrtEkqXkX/mkMK2MDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0WfH39YBzZsN; Mon, 17 Apr 2023 15:47: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 33HFlpg3070475; Mon, 17 Apr 2023 15:47:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HFlpGj070474; Mon, 17 Apr 2023 15:47:51 GMT (envelope-from git) Date: Mon, 17 Apr 2023 15:47:51 GMT Message-Id: <202304171547.33HFlpGj070474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 8c3e263dc1e1 - main - veriexec: mac_veriexec_syscall compat32 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: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c3e263dc1e1deb5e76b794943337404841410ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=8c3e263dc1e1deb5e76b794943337404841410ee commit 8c3e263dc1e1deb5e76b794943337404841410ee Author: Simon J. Gerraty AuthorDate: 2021-12-11 02:32:35 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 15:47:32 +0000 veriexec: mac_veriexec_syscall compat32 support Some 32bit apps may need to be able to use MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL Therefore compat32 support is required. Obtained from: Juniper Networks, Inc. --- sys/security/mac_veriexec/mac_veriexec.c | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index bae8c2b9055c..d61943479ad6 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -50,6 +50,11 @@ #include #include #include +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#endif #include #include #include @@ -805,6 +810,24 @@ mac_veriexec_init(struct mac_policy_conf *mpc __unused) mac_veriexec_ops.mpo_vnode_check_unlink = NULL; } +#ifdef COMPAT_FREEBSD32 +struct mac_veriexec_syscall_params32 { + char fp_type[VERIEXEC_FPTYPELEN]; + unsigned char fingerprint[MAXFINGERPRINTLEN]; + char label[MAXLABELLEN]; + uint32_t labellen; + unsigned char flags; +}; + +struct mac_veriexec_syscall_params_args32 { + union { + pid_t pid; + uint32_t filename; + } u; /* input only */ + uint32_t params; /* result */ +}; +#endif + /** * @internal * @brief MAC policy-specific syscall for mac_veriexec @@ -830,6 +853,10 @@ mac_veriexec_syscall(struct thread *td, int call, void *arg) struct file *fp; struct mac_veriexec_syscall_params_args pargs; struct mac_veriexec_syscall_params result; +#ifdef COMPAT_FREEBSD32 + struct mac_veriexec_syscall_params_args32 pargs32; + struct mac_veriexec_syscall_params32 result32; +#endif struct mac_veriexec_file_info *ip; struct proc *proc; struct vnode *textvp; @@ -841,6 +868,23 @@ mac_veriexec_syscall(struct thread *td, int call, void *arg) switch (call) { case MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL: case MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL: +#ifdef COMPAT_FREEBSD32 + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { + error = copyin(arg, &pargs32, sizeof(pargs32)); + if (error) + return error; + bzero(&pargs, sizeof(pargs)); + switch (call) { + case MAC_VERIEXEC_GET_PARAMS_PID_SYSCALL: + CP(pargs32, pargs, u.pid); + break; + case MAC_VERIEXEC_GET_PARAMS_PATH_SYSCALL: + PTRIN_CP(pargs32, pargs, u.filename); + break; + } + PTRIN_CP(pargs32, pargs, params); + } else +#endif error = copyin(arg, &pargs, sizeof(pargs)); if (error) return error; @@ -941,6 +985,24 @@ cleanup_file: if (error != 0) break; +#ifdef COMPAT_FREEBSD32 + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { + bzero(&result32, sizeof(result32)); + result32.flags = ip->flags; + strlcpy(result32.fp_type, ip->ops->type, sizeof(result32.fp_type)); + result.labellen = ip->labellen; + CP(result, result32, labellen); + if (ip->labellen > 0) + strlcpy(result32.label, ip->label, sizeof(result32.label)); + result32.label[result.labellen] = '\0'; + memcpy(result32.fingerprint, ip->fingerprint, + ip->ops->digest_len); + + error = copyout(&result32, pargs.params, sizeof(result32)); + break; /* yes */ + } +#endif + bzero(&result, sizeof(result)); result.flags = ip->flags; strlcpy(result.fp_type, ip->ops->type, sizeof(result.fp_type)); result.labellen = ip->labellen; From nobody Mon Apr 17 15:47: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 4Q0WfK0dmnz44q6Z; Mon, 17 Apr 2023 15:47: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 4Q0WfJ5frVz49NV; Mon, 17 Apr 2023 15:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=23ihajh21+WkEwK8wV9MaKAnEc0LOYsCstX2QyEIH+U=; b=p8i2ug4VOoRReRRWJZEuNtsYrb2U+vL3Y0GD0aSJ/a5BvC74WmbYbER9fYdLLYgkyyV7io jdAWyIhiv5696Mgpin+HcjOQABd/BhIcpSLUdrxCJ95FoZ3e9UTlGFEWlP5Mr6FLU07unc 91pP6LViG0FoQcVMnw9OZtWk2UQ+gfL2Cqt5FK6+gT1RicYyFhbol7++rDQgK6aI4plZJf Uecmjws8tnOCLs/KmDX4+vN/V/TgZrTIaufd84BvzruIf/J73gxbBU8w8R3HiTCGR8LO/Z 96n1wiF/o6BaWVmiR+FZDJgHtpmXnTg022lOOFNDSsEiKGLEuaimZWYQEk6GHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=23ihajh21+WkEwK8wV9MaKAnEc0LOYsCstX2QyEIH+U=; b=tbHZjm9QhQ99tW0ZFPFyelHdwRIbyHOGotT/ofHjPNtpjKmv1iffqCp/FO1YCuX8qgD794 wHZgmTXTtDOSxWAHchw7IpmRu4MpLsgpIznzT1GX1dPez2D8LeW3y7IRq4pqtfZVIXdJ54 /nhMI1Y36yEpVTpJNoCMlAkI0Zf48ruaGelAjCWOvk6ZhjgWCu0KDkBVqpKUgJzLVHdloT c+GOwcdjvdsCobnvEeFrHi/pUbssT1e1U/7jFmRvDynt7s9urKXPmBT+YG86v3Fn++JPpP 23RX3YJK0l3XRNp7XWxHloUxmcazCPS7sPmpUdE6W7Hqg/uSuWf35Y6wqXd60Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681746472; a=rsa-sha256; cv=none; b=lNGIx1kApBhDSSok0wJQDL7BO7mj9HZcDx+VG3J2lPEMZlazOvVWk50cDU7kyxDtrqvT45 QrhubEqt0TIBCBu47TaMSL17j/eJL4gpvga92dSs8BwB6HxoK9DuVVPlEUBjSzO5ZuR2pB 6GE3Bc0XsTDN4mNDEncBEAZEADEUK9wyIwBSpwhskLF27c+MW1X6Kn3JmJD+bHno1yXCUC 4CR6fWcLwGSs1KVIOgazw77JSpf9q5cQO/wsij+RUVjSaVi8/wT/KqPkabQOy8Kj/QBFv/ jUZbJIceHhdwXmxCzpamBe4lSqkkZ3tX3v7YLENz6Wi/BVJaJ7VpBJmf+wlxcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0WfJ4JqZzbKZ; Mon, 17 Apr 2023 15:47: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 33HFlq1n070495; Mon, 17 Apr 2023 15:47:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HFlqer070494; Mon, 17 Apr 2023 15:47:52 GMT (envelope-from git) Date: Mon, 17 Apr 2023 15:47:52 GMT Message-Id: <202304171547.33HFlqer070494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: d195f39d1dab - main - veriexec: Add option MAC_VERIEXEC_DEBUG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d195f39d1dab1b1b1781ed194e74200cfb5fbaa9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=d195f39d1dab1b1b1781ed194e74200cfb5fbaa9 commit d195f39d1dab1b1b1781ed194e74200cfb5fbaa9 Author: Steve Kiernan AuthorDate: 2023-04-02 19:46:53 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 15:47:32 +0000 veriexec: Add option MAC_VERIEXEC_DEBUG Obtained from: Juniper Networks, Inc. --- sys/security/mac_veriexec/mac_veriexec.c | 4 +--- sys/security/mac_veriexec/mac_veriexec_internal.h | 2 +- sys/security/mac_veriexec/veriexec_metadata.c | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/security/mac_veriexec/mac_veriexec.c b/sys/security/mac_veriexec/mac_veriexec.c index d61943479ad6..57f3b6c307fa 100644 --- a/sys/security/mac_veriexec/mac_veriexec.c +++ b/sys/security/mac_veriexec/mac_veriexec.c @@ -67,7 +67,7 @@ #define SLOT_SET(l, v) \ mac_label_set((l), mac_veriexec_slot, (v)) -#ifdef MAC_DEBUG +#ifdef MAC_VERIEXEC_DEBUG #define MAC_VERIEXEC_DBG(_lvl, _fmt, ...) \ do { \ VERIEXEC_DEBUG((_lvl), (MAC_VERIEXEC_FULLNAME ": " _fmt \ @@ -204,10 +204,8 @@ mac_veriexec_vfs_mounted(void *arg __unused, struct mount *mp, return; SLOT_SET(mp->mnt_label, va.va_fsid); -#ifdef MAC_DEBUG MAC_VERIEXEC_DBG(3, "set fsid to %ju for mount %p", (uintmax_t)va.va_fsid, mp); -#endif } /** diff --git a/sys/security/mac_veriexec/mac_veriexec_internal.h b/sys/security/mac_veriexec/mac_veriexec_internal.h index e69f34df892e..f618ac155a83 100644 --- a/sys/security/mac_veriexec/mac_veriexec_internal.h +++ b/sys/security/mac_veriexec/mac_veriexec_internal.h @@ -41,7 +41,7 @@ #define VERIEXEC_FILES_FIRST 1 -#if defined(VERIFIED_EXEC_DEBUG) || defined(VERIFIED_EXEC_DEBUG_VERBOSE) +#ifdef MAC_VERIEXEC_DEBUG # define VERIEXEC_DEBUG(n, x) if (mac_veriexec_debug > (n)) printf x #else # define VERIEXEC_DEBUG(n, x) diff --git a/sys/security/mac_veriexec/veriexec_metadata.c b/sys/security/mac_veriexec/veriexec_metadata.c index 9e99f51e7e65..4b9cc9b3052f 100644 --- a/sys/security/mac_veriexec/veriexec_metadata.c +++ b/sys/security/mac_veriexec/veriexec_metadata.c @@ -41,6 +41,9 @@ #include #include #include +#ifdef MAC_VERIEXEC_DEBUG +#include +#endif #include #include "mac_veriexec.h" @@ -548,7 +551,7 @@ mac_veriexec_metadata_fetch_fingerprint_status(struct vnode *vp, break; case EAUTH: -#ifdef VERIFIED_EXEC_DEBUG_VERBOSE +#ifdef MAC_VERIEXEC_DEBUG { char have[MAXFINGERPRINTLEN * 2 + 1]; char want[MAXFINGERPRINTLEN * 2 + 1]; From nobody Mon Apr 17 15:47: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 4Q0WfL0rcXz44q6f; Mon, 17 Apr 2023 15:47: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 4Q0WfK6MQpz49Nj; Mon, 17 Apr 2023 15:47:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jvrddt0oVWnfZxDJOrDlUDkZYS2Z1Obv/6tcVneQ7/s=; b=rjkyDyIThzkdqqs5Zhg7mwrNnsqY1fRPZZ18qW6wtTU8KEkEm+6ToJ8OYJ9Zx3mPvuHRfp E878rxSzA8G9wLdojkdTqYDv4ZtqbvWTEi0p7aPYqT0ffEZLwfE/sPzrvUbHoHjU+tbvSN JroO9mNQo2ykJk0meF+p2GKxZuRO+wyRYBQki5XLdTSK7tUlfvF0MLy2Sx9fnmwBx4/68w 7s488sWPoEhr7eAxd4JA+OH7bL07a7YmgMrA+UdteYVVWntn6vsplg9b7a9NjPaMdl2ljv lp95U5R56pbfzWAMAZR4kSRU0/NukLGxcxh9J1jNL6pbcqXalSWE7sO5YL6cLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jvrddt0oVWnfZxDJOrDlUDkZYS2Z1Obv/6tcVneQ7/s=; b=quYNLUvr2UY3dxGLdlUF1GOv8ygTZuwfqt69ZKpDLeeIUJfzt1u3BS8GM+SPjnNuu4FrjO VD+WTsCetmSFX3QeBWq47F6Z/SFqfAKvVtbbU8VjJOvB3flzPXJg5BCUJOSBPnFZgn7SvJ OmCS5h0cRgMYSrQYPxLJXSlyL1YC+ZIJCyUrPl1D9HDRTUKXAvZIgMn+I2+K9QL3dCUfn1 E63mlXCIKYGZe1YsBRSTgEsxZATS0JL3xJvx2X5FvwmUvoQ5NW6ZyQwOjhXmTEtFzTa55s qNDb/U9d/gbsxh6j79f6TeTE0DTyvZ4BceKy/yHxkwgFhYfpiM6p5+fktIzIVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681746473; a=rsa-sha256; cv=none; b=iW1WOL1Y7C8Z0qdhGLyRnpdKVSvYdgbtdxS8ei77CD9Mkghy3tJK/prIurZT4zp7CuRGC0 BWjMab/2KFv+bNQzlCZDdEG+pf9maKXLnRy/PymLul4Vi8y9iEXo6k8CFylVuYWDBo+yce tEo8l3Scu6cJ2AHhVfw7baF1imz1OJgY6wIUWapRXNHGSSrwc+V8Dfsox1kE3IqPz027HH QOt91VvH9YQSEITgMu+wpmI9UcIOEALwFyMB4NyVQ1aYhSO8B+nKhNSkZTK5mjh3ptoSD5 N4MfuvXsMLM1Eq624FirPKmF2I/mmt/23SlfcVnWGZ07pyQV5qCnMsKDKcZNEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0WfK5D5XzbKt; Mon, 17 Apr 2023 15:47: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 33HFlrHL070514; Mon, 17 Apr 2023 15:47:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HFlrpJ070513; Mon, 17 Apr 2023 15:47:53 GMT (envelope-from git) Date: Mon, 17 Apr 2023 15:47:53 GMT Message-Id: <202304171547.33HFlrpJ070513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: bd4742c97079 - main - veriexec: Rename old VERIEXEC_SIGNED_LOAD as VERIEXEC_SIGNED_LOAD32 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd4742c9707964a481dbe088e8c2797fa210e9e1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=bd4742c9707964a481dbe088e8c2797fa210e9e1 commit bd4742c9707964a481dbe088e8c2797fa210e9e1 Author: Steve Kiernan AuthorDate: 2023-04-02 21:58:27 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 15:47:32 +0000 veriexec: Rename old VERIEXEC_SIGNED_LOAD as VERIEXEC_SIGNED_LOAD32 We need to handle old ioctl from old binary. Add some missing ioctls. Obtained from: Juniper Networks, Inc. --- sys/dev/veriexec/veriexec_ioctl.h | 16 +++++++++++++--- sys/dev/veriexec/verified_exec.c | 26 +++++++++++++++++++------- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/sys/dev/veriexec/veriexec_ioctl.h b/sys/dev/veriexec/veriexec_ioctl.h index 1409ebb9f40f..fdb9cbcbe1af 100644 --- a/sys/dev/veriexec/veriexec_ioctl.h +++ b/sys/dev/veriexec/veriexec_ioctl.h @@ -36,6 +36,14 @@ #include +/* for backwards compatability */ +struct verified_exec_params32 { + unsigned char flags; + char fp_type[VERIEXEC_FPTYPELEN]; /* type of fingerprint */ + char file[MAXPATHLEN]; + unsigned char fingerprint[32]; +}; + struct verified_exec_params { unsigned char flags; char fp_type[VERIEXEC_FPTYPELEN]; /* type of fingerprint */ @@ -55,9 +63,11 @@ struct verified_exec_label_params { #define VERIEXEC_DEBUG_ON _IOWR('S', 0x5, int) /* set/get debug level */ #define VERIEXEC_DEBUG_OFF _IO('S', 0x6) /* reset debug */ #define VERIEXEC_GETSTATE _IOR('S', 0x7, int) /* get state */ -#define VERIEXEC_SIGNED_LOAD _IOW('S', 0x8, struct verified_exec_params) -#define VERIEXEC_GETVERSION _IOR('S', 0x9, int) /* get version */ -#define VERIEXEC_LABEL_LOAD _IOW('S', 0xa, struct verified_exec_label_params) +#define VERIEXEC_SIGNED_LOAD32 _IOW('S', 0x8, struct verified_exec_params32) +#define VERIEXEC_VERIFIED_FILD _IOW('S', 0x9, int) /* fd */ +#define VERIEXEC_GETVERSION _IOR('S', 0xa, int) /* get version */ +#define VERIEXEC_LABEL_LOAD _IOW('S', 0xb, struct verified_exec_label_params) +#define VERIEXEC_SIGNED_LOAD _IOW('S', 0xc, struct verified_exec_params) #define _PATH_DEV_VERIEXEC _PATH_DEV "veriexec" diff --git a/sys/dev/veriexec/verified_exec.c b/sys/dev/veriexec/verified_exec.c index c00aa49c2f6c..908b54138212 100644 --- a/sys/dev/veriexec/verified_exec.c +++ b/sys/dev/veriexec/verified_exec.c @@ -1,7 +1,7 @@ /* * $FreeBSD$ * - * Copyright (c) 2011-2013, 2015, 2019 Juniper Networks, Inc. + * Copyright (c) 2011-2023, Juniper Networks, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -69,7 +69,7 @@ verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, struct nameidata nid; struct vattr vattr; struct verified_exec_label_params *lparams; - struct verified_exec_params *params; + struct verified_exec_params *params, params_; int error = 0; /* @@ -104,10 +104,18 @@ verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, return (error); lparams = (struct verified_exec_label_params *)data; - if (cmd == VERIEXEC_LABEL_LOAD) + switch (cmd) { + case VERIEXEC_LABEL_LOAD: params = &lparams->params; - else + break; + case VERIEXEC_SIGNED_LOAD32: + params = ¶ms_; + memcpy(params, data, sizeof(struct verified_exec_params32)); + break; + default: params = (struct verified_exec_params *)data; + break; + } switch (cmd) { case VERIEXEC_ACTIVE: @@ -187,6 +195,13 @@ verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, int flags = FREAD; int override = (cmd != VERIEXEC_LOAD); + if (params->flags & VERIEXEC_LABEL) { + labellen = strnlen(lparams->label, + MAXLABELLEN) + 1; + if (labellen > MAXLABELLEN) + return (EINVAL); + } + /* * Get the attributes for the file name passed * stash the file's device id and inode number @@ -228,9 +243,6 @@ verifiedexecioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, FINGERPRINT_INVALID); VOP_UNLOCK(nid.ni_vp); (void) vn_close(nid.ni_vp, FREAD, td->td_ucred, td); - if (params->flags & VERIEXEC_LABEL) - labellen = strnlen(lparams->label, - sizeof(lparams->label) - 1) + 1; mtx_lock(&ve_mutex); error = mac_veriexec_metadata_add_file( From nobody Mon Apr 17 15:47: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 4Q0WfM5JNpz44q6j; Mon, 17 Apr 2023 15:47: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 4Q0WfM2Srkz49GS; Mon, 17 Apr 2023 15:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lf6sFIMMdA8rKyKRXyx5djUoVNsQA6c/I4GoydCF4vw=; b=u8SRxkrvyI3vUMJTFxBTBiKNg0bTkE3TgVKr0D309a7XqwOXjizO/h0hYAibJCNi6kkolu jBAxjHTisGa6jg8LoUl8A/Dbe/7ljT1su0MthzO9fU/+YPJjiwKYk+uvEgxHNcCSOXPXzR t0zt/BLUNT3MhD9Se+Isv03DmOpx20PEYIJ1KOJwHIPibO5UlM8f3GMVAPNC3mkmYKAqyC CF2fuZPqgk5djeNaQ6pFW/96bVoBusdsVk+71xYdz8RIiNNwUu+NovvDyvi3id7K/0LyxB MIS+F4xJnU2pXZN1Nni8vMufOO46iLHLZDBc5cR66zyesgZu2V8NjoiFk9kx1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lf6sFIMMdA8rKyKRXyx5djUoVNsQA6c/I4GoydCF4vw=; b=QTgjUih1N25OeVGdA1BkDyCwC2jSUvzcg9BadGvjKDkkzGOUEuDo+PVXRogI7zH5Xt1ull MxZmzg6DqMTbLsIER44c34BGW7o41E+/QPcGyktDlvPJoMXD+FhOZ2r2ZYpMquRA1l5NTR D+ySRVG3tJ4IQToIbwgFGKxLsxHmk/raHKUcGaxp/cSJygpMGunG5PQHewq8rihl+/EaF7 hA9YN1q0T+3/pVamQmKbQYSxWaaHxXZF7p1T4W58SlKWM31GNjT/tehE17HjzmH21N6T8H Ts2piKdNoE2QoQQ07fgXCwxRFEaVXoUAci6zGXnqC4iT1FenlFYRj1+ew5r7bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681746475; a=rsa-sha256; cv=none; b=j4MvDQFGtG5ScQmqblITK4SXAOYYDgjz1LymzVxKWo2ulKmIPi1qstZFmMqtZn8PnC8B2J LQZY9SL734kwd1EQmdk5NrjcZi5sX8SfTZGMfo1nm2fGWa5CTgX1USXWp2PnbKqsPqzkYQ M/wz1dRxU1ioZmLqKcoUAUaH84ZIUicLAVY8+63wNvN5aht0yhKh5Td1/6JgWmXN+UN7av hDErP+8jwf4GHS9qGlunKlO+lf//Hr+xJvdA6UloTV5fO9CUjrShc00pKvZlYp4W0nbV2E kKm6jZEz9j8nzxBtx2zk6CJFrOaam4WaBUF9kJG/n698SlBKZAKI+cBTem8jsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0WfL69W6zbKv; Mon, 17 Apr 2023 15:47: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 33HFls4V070536; Mon, 17 Apr 2023 15:47:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HFlsIq070535; Mon, 17 Apr 2023 15:47:54 GMT (envelope-from git) Date: Mon, 17 Apr 2023 15:47:54 GMT Message-Id: <202304171547.33HFlsIq070535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 9bc96108d1f1 - main - libveriexec: add function to check a label based on a 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: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9bc96108d1f11d91f1d51161317c05d9d87dfdc4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=9bc96108d1f11d91f1d51161317c05d9d87dfdc4 commit 9bc96108d1f11d91f1d51161317c05d9d87dfdc4 Author: Steve Kiernan AuthorDate: 2023-04-03 00:09:42 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 15:47:33 +0000 libveriexec: add function to check a label based on a path veriexec_check_path_label() can be used to check if a specified path has a label associated with it that contains the what we want. Obtained from: Juniper Networks, Inc. --- lib/libveriexec/libveriexec.h | 1 + lib/libveriexec/veriexec_get.c | 31 ++++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/libveriexec/libveriexec.h b/lib/libveriexec/libveriexec.h index d186db0ab8d9..2d726e76af01 100644 --- a/lib/libveriexec/libveriexec.h +++ b/lib/libveriexec/libveriexec.h @@ -38,6 +38,7 @@ int veriexec_check_path(const char *); int veriexec_get_pid_params(pid_t, struct mac_veriexec_syscall_params *); int veriexec_get_path_params(const char *, struct mac_veriexec_syscall_params *); +int veriexec_check_path_label(const char *, const char *); int veriexec_check_pid_label(pid_t, const char *); #define HAVE_VERIEXEC_CHECK_PID_LABEL 1 diff --git a/lib/libveriexec/veriexec_get.c b/lib/libveriexec/veriexec_get.c index 46df6eecf76e..59ee6cdba8b0 100644 --- a/lib/libveriexec/veriexec_get.c +++ b/lib/libveriexec/veriexec_get.c @@ -81,7 +81,7 @@ veriexec_get_path_params(const char *file, } /** - * @brief check if label contains what we want + * @brief check if a process has label that contains what we want * * @return * @li 0 if no @@ -109,6 +109,35 @@ veriexec_check_pid_label(pid_t pid, const char *want) return 0; /* no */ } +/** + * @brief check if a path has label that contains what we want + * + * @return + * @li 0 if no + * @li 1 if yes + */ +int +veriexec_check_path_label(const char *file, const char *want) +{ + struct mac_veriexec_syscall_params params; + char *cp; + size_t n; + + if (want != NULL && file != NULL && + veriexec_get_path_params(file, ¶ms) == 0) { + /* Does label contain [,][,] ? */ + if (params.labellen > 0 && + (cp = strstr(params.label, want)) != NULL) { + if (cp == params.label || cp[-1] == ',') { + n = strlen(want); + if (cp[n] == '\0' || cp[n] == ',') + return 1; /* yes */ + } + } + } + return 0; /* no */ +} + #ifdef UNIT_TEST #include #include From nobody Mon Apr 17 15:47: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 4Q0WfN59zxz44q9D; Mon, 17 Apr 2023 15:47: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 4Q0WfN2hdHz49cl; Mon, 17 Apr 2023 15:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qHEniHoqekgUeA+S8W3MK4bX0hE0DnXoqonv8LezODQ=; b=m50FIsUYwQ2oTBuJjUdIn2Jm01Ns4eVKnhzt41UpnZrH5v8UtRRrDpbCYxhA4buEm1UAeu madF+biZDugbPvYqUUzjIttmtj8exFuQ8JI0vDkxm0S9PFZ/dTTbkFiaEndHaDZMP4XK4Y PPVAnsp1lMW/FKhbw4T/0TVtzcvILC2Cg4N9nKYsGCw3qewc0QriMOaDR2TlmOAWJnk3y+ mJ5LYsZTflwTDzFk493j7zLqqsFcd8EkWEA+qzVUIIKofUacRo03to8JwlS8ul0NWh1Sqp MHeouSvpkvMVFkHOyU4y19rmyH6JavNUexvHxjfY7jc7FhFVfKACrlx2RTbWZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681746476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qHEniHoqekgUeA+S8W3MK4bX0hE0DnXoqonv8LezODQ=; b=QgbeIa8FC3VgiK/4KWSvtilTYhoIhtylvgldd8LiF7oO5+kHI3PaFeVLslXdmWJaKliy8a GuzXpCJSWLhfq4BiJA1iQisCuNI6Y3u6OADYAx0RrWAF4rgwnehLxHrCcykhCJmEdpEBvQ dwUOVGJIPlt8T3Djn1f9pmFsztkYFgFYUn8Jq+jtX++TpmK8Mpr6Rhoe32PxmjbjZEbBcU pzq9Cky7SKlJvxdCaq4S/hL9m/fE1YdiRVoZNR1DVeE9d45LWzi0eeJFdSwsQp8tr5nLwL kzJekEQLAIuttIM2r1x6/aNjA6RvMyGYxxRlYplsxGAMyuFYIwhWVAGHFGajPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681746476; a=rsa-sha256; cv=none; b=HA1bCWg+xzBPcTvdMcvR/ByCSNLL4yPvKOyYn/8h7UZY/iKdqXkQ3Yf+5BWVkNwz6ut1/2 eMPv7deuTsL751RRNoTJctlB7wwe3xApONCiXBIiNlA1nUX+YNX71IlCic5RverYfy0rt2 s+p8GhpbGLIeZUxyuRpkQNO9ZGX7n6iSLhPQe/HTdt5ccq4nI2I8ioguw5qNQGwF94iS6F ogepH9PK1NJHI20Qyc5RhGDvTkhSz5R5q8U3+ddvzwbxGcfyYV6oU5gZjsGyupkoGkVqW9 Xrus0OAIGIicvUlpb1upHtakK6IERKsNODAOFiJ4Y/z+Z9B2wHJVR9FaFROTRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0WfM6sRYzbL4; Mon, 17 Apr 2023 15:47: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 33HFltEg070555; Mon, 17 Apr 2023 15:47:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HFltr1070554; Mon, 17 Apr 2023 15:47:55 GMT (envelope-from git) Date: Mon, 17 Apr 2023 15:47:55 GMT Message-Id: <202304171547.33HFltr1070554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 48ffacbc8487 - main - veriexec: Add function to get label associated with a 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: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48ffacbc8487e583794f740ac5d08f5d9a457a20 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=48ffacbc8487e583794f740ac5d08f5d9a457a20 commit 48ffacbc8487e583794f740ac5d08f5d9a457a20 Author: Steve Kiernan AuthorDate: 2023-04-03 00:33:12 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-17 15:47:33 +0000 veriexec: Add function to get label associated with a file Add mac_veriexec_metadata_get_file_label to avoid the need to expose internals to other MAC modules. Obtained from: Juniper Networks, Inc. --- sys/security/mac_veriexec/mac_veriexec.h | 2 ++ sys/security/mac_veriexec/veriexec_metadata.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/sys/security/mac_veriexec/mac_veriexec.h b/sys/security/mac_veriexec/mac_veriexec.h index e4d336ce4ff4..9e30143a8615 100644 --- a/sys/security/mac_veriexec/mac_veriexec.h +++ b/sys/security/mac_veriexec/mac_veriexec.h @@ -178,6 +178,8 @@ int mac_veriexec_metadata_add_file(int file_dev, dev_t fsid, long fileid, unsigned long gen, unsigned char fingerprint[MAXFINGERPRINTLEN], char *label, size_t labellen, int flags, const char *fp_type, int override); +const char *mac_veriexec_metadata_get_file_label(dev_t fsid, long fileid, + unsigned long gen, int check_files); int mac_veriexec_metadata_has_file(dev_t fsid, long fileid, unsigned long gen); int mac_veriexec_proc_is_trusted(struct ucred *cred, struct proc *p); diff --git a/sys/security/mac_veriexec/veriexec_metadata.c b/sys/security/mac_veriexec/veriexec_metadata.c index 4b9cc9b3052f..4ff635335e9f 100644 --- a/sys/security/mac_veriexec/veriexec_metadata.c +++ b/sys/security/mac_veriexec/veriexec_metadata.c @@ -586,6 +586,31 @@ mac_veriexec_metadata_fetch_fingerprint_status(struct vnode *vp, return (error); } +/** + * Return label if we have one + * + * @param fsid file system identifier to look for + * @param fileid file to look for + * @param gen generation of file + * @param check_files look at non-executable files? + * + * @return A pointer to the label or @c NULL + */ +const char * +mac_veriexec_metadata_get_file_label(dev_t fsid, long fileid, + unsigned long gen, int check_files) +{ + struct mac_veriexec_file_info *ip; + int error; + + error = mac_veriexec_metadata_get_file_info(fsid, fileid, gen, NULL, + &ip, check_files); + if (error) + return (NULL); + + return ((ip->flags & VERIEXEC_LABEL) != 0 ? ip->label : NULL); +} + /** * Add a file and its fingerprint to the list of files attached * to the device @p fsid. From nobody Mon Apr 17 15:50: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 4Q0Wk83Zy5z44qCZ; Mon, 17 Apr 2023 15:51:12 +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 4Q0Wk81zntz4JQV; Mon, 17 Apr 2023 15:51:12 +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 33HA7wBj022798; Mon, 17 Apr 2023 08:51:10 -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=uhxmQZuuZuG/7FtJoQCbCorvazWDH2dNFAt0wiHXv/s=; b=bImNb1IIveMWSrESxLCJhjk14NHGtrU5aUtUzDl0xf5qdyEEXXNWiJz3zpW5CWVCgGyw W9DRjv1NH3yoi88Jm13iq9hgSjEpBCJmiiR9Jv/bwDXvu968ZZyXUxMIhF825VIRVRHZ 8MKnWw5OxHySZ8GJX/0e5ZJVFkujqfahY+IcjF5UyWHAaYzEFJTGjWRfxG8+25fyYkDM OalS7igf0A0SZus9Bq/O9fCg0Pt7yFy6MzuuJeFUBbF3w4goVHR+Z8DH2JmiFs1QTzTP P/xnxTHr4QjQ3Mj/50kjqIUiose/2/d5CiIMfhS8zDNrCY9CIMbNGHcnVfsCeK4SYG/B 9Q== Received: from co1pr02cu002.outbound.protection.outlook.com (mail-westus2azlp17010006.outbound.protection.outlook.com [40.93.10.6]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 3q10fxh4fr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Apr 2023 08:51:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=acNhYLiyHgolusf5TLmNr7vbYL5ZlFeFl8d2pZO0b41Bim+cBq63Axu+KnJ4txtBfnPobGAvyvpFM+DIXrH6a3whpJ5wXjF8RTAnLW06CAbhkZDxtlXAaR6II1Mz020aYYnNbpBQLTRctRcFBSUGI/FQ3ZLI+K0A9Y9T9NhqQYmK9hNUeX9mtA0PJCo/VlPsmfWOUmLs9p3K64uRuyOaqQkQH+5h2cUUI/8Ypiya7OpBoCPT2uNmL6K9ChgVvQ2nnrWbPp6UlK4JDAzk4QJP0YE3LQ0dIFDF2rqYuKR3KRefwtfs9FVjWszkMkpedguR0a/5VFA+eUjEze5bWhROOg== 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=uhxmQZuuZuG/7FtJoQCbCorvazWDH2dNFAt0wiHXv/s=; b=JPu85QiJhx66Ws3oJXqXCjfecZvgTM8It4nICLxysP+QIDwoAKzokOTTrxyeD6RYLvvO8kC+luobSGwaWXha32np8zqE2nAQPDiVPXW1xEwP8sCqs3yy08v+IQZwlrW9seHuH5wUjnJMWdbZYXehoAx9WK9KapuuEWd1y8+p+/igoYUarOBVukeOHi3LVl2QysGhnL+d6NFQTQuSE3u0+2tV7huSHKJ7FW0RxuAfsjn8SogHU/565BsSGJiOHrQjAmIRLFb17AaUXXuhPB8iCV/23FdIRPmwPyNyIjwyKBUDPyRMbOdgpf0tjhQ4lHCqdwarOqhhd92PRPvLxpIvFA== 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=uhxmQZuuZuG/7FtJoQCbCorvazWDH2dNFAt0wiHXv/s=; b=Cijcks15RhoLeB9TrklVZXVtOGhGhmNtbuMo/ZcchZEInRhIG3bU9q9k3B9Ngszf1xV2weQmBvszH0SLYFGQkkA2A9wRQ40NPFwubc9kxyetA9egYPwWRYTSZ4X5ivn6WXBmUHaBL8zj8KjJQd96JBKOfsx5xVqhIQqBL4jfiUw= Received: from MW4PR03CA0303.namprd03.prod.outlook.com (2603:10b6:303:dd::8) by BY5PR05MB6787.namprd05.prod.outlook.com (2603:10b6:a03:1f7::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.30; Mon, 17 Apr 2023 15:51:03 +0000 Received: from MW2NAM12FT070.eop-nam12.prod.protection.outlook.com (2603:10b6:303:dd:cafe::95) by MW4PR03CA0303.outlook.office365.com (2603:10b6:303:dd::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.46 via Frontend Transport; Mon, 17 Apr 2023 15:51:03 +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 MW2NAM12FT070.mail.protection.outlook.com (10.13.180.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.20 via Frontend Transport; Mon, 17 Apr 2023 15:51:03 +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.7; Mon, 17 Apr 2023 10:51:02 -0500 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) 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.7; Mon, 17 Apr 2023 10:51:02 -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.7 via Frontend Transport; Mon, 17 Apr 2023 10:51:02 -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 33HFp2TE018018; Mon, 17 Apr 2023 08:51:02 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id F2AAE84DDE; Mon, 17 Apr 2023 08:50:38 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id F15FC8508B; Mon, 17 Apr 2023 08:50:38 -0700 (PDT) To: Warner Losh CC: Alexey Dokuchaev , Jessica Clarke , "Stephen J. Kiernan" , src-committers , "" , "" , Subject: Re: git: 6ae8d57652fa - main - mac_veriexec: add mac_priv_grant check for NODEV In-Reply-To: References: <202304162314.33GNEwXd039914@gitrepo.freebsd.org> <8180B6AE-D70B-443D-80BA-1667E4642854@freebsd.org> Comments: In-reply-to: Warner Losh message dated "Mon, 17 Apr 2023 02:33:57 -0600." 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: <57394.1681746638.1@kaos.jnpr.net> Date: Mon, 17 Apr 2023 08:50:38 -0700 Message-ID: <57786.1681746638@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW2NAM12FT070:EE_|BY5PR05MB6787:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e8274d3-cf62-44e1-378a-08db3f5b8c72 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dmuq71Zhy0QvjoqIgU+YqN1IKT309UVbE6VpyVmLkylII/kv8Ss2+MkKQKsmnD9oKl9pfPLXAuglvlelg4Sme+G0hzF5Bmx87tXg/AaSY/6ODG4t/umaVYzuXk3Xfp8HtZH8pRLuy+47InmqCZq/qWBJ8o61qdHy4D8wjEi7eCLb2wuxG6D+C4okMSUmpbvGXM9uH1/lwMUziKZ5l9NdZ3pU3owKLVf5Re6B070yNH39HsIG91miHljeDP8azYBYL86PauuYmgTner4x/frDGOmS6w8GnAOSHJ0Lo7KATl92D0eggu/H8cscRX+DO1OCs2YsFXDQTOVZaJ/ZqrMYkr17ByUpvFQDNLmKIwVaKZCtev4n9r8eKggIFgwMiiTmqCrJj2HgeJVfsYao9AGdoHAOd4uKXpP+YHFnvc/hkIH/a6bL9alOAIc1fpX+WVecBhKDnjR5VB8fbA4PGnm8DLOpV3tLs/FXD/unlQVmp7QvvydQkJOquiJUGbhHz4Rvm5RtGILltChkuRb0yYqIHlaKIKdIc5+iVM2jmDnjVk2UL8uN3QgNI/f/jXrtGNDPW2fAL3f4prioBXNqgUG6SxYvX8omyHSXqgxuv4uNKF4SFcsud86PdSHN+6ouP+kgyvZ2Vqnz9XeboGN15xmCJ+jk/vHcAvUR86sl3Cznj9KvZrn0mUOf0ZRyDDnnYY2sVTsQ6J5DA9KJLi+bYlKmoWxbgJhqDzU5xwKpwrEQP8c= 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)(39860400002)(136003)(346002)(376002)(396003)(451199021)(40470700004)(46966006)(36840700001)(9686003)(336012)(26005)(54906003)(55016003)(45080400002)(40480700001)(47076005)(186003)(6266002)(7126003)(36860700001)(107886003)(4744005)(40460700003)(7696005)(5660300002)(478600001)(41300700001)(82310400005)(8676002)(316002)(82740400003)(356005)(8936002)(86362001)(81166007)(4326008)(70206006)(70586007)(6916009)(2906002)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2023 15:51:03.3457 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e8274d3-cf62-44e1-378a-08db3f5b8c72 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: MW2NAM12FT070.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR05MB6787 X-Proofpoint-GUID: XDHNvH36_n9Ic4D7-e6Furb6DgFxCNo- X-Proofpoint-ORIG-GUID: XDHNvH36_n9Ic4D7-e6Furb6DgFxCNo- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-17_10,2023-04-17_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=4 priorityscore=1501 suspectscore=0 bulkscore=0 adultscore=0 mlxlogscore=138 phishscore=0 mlxscore=4 impostorscore=0 malwarescore=0 clxscore=1011 spamscore=4 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304170142 X-Rspamd-Queue-Id: 4Q0Wk81zntz4JQV 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 Warner Losh wrote: > She's right. Nobody cares about over quoting any.orr until it gets > ridiculous I blame lousy MUA's like Outlook (and most html based ones too) which make sane editing/quoting so difficult nobody even tries, hence top-posting is a thing. Sadly we have many people today (even here) using MUA's that generally make it impossible to tell what is quoted and what is their contribution (colors do NOT count, for those of us who disable that miss-feature). That makes almost any thread a total waste of bandwith after the first couple of iterations. --sjg From nobody Mon Apr 17 16:03: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 4Q0X012DlJz44r7M; Mon, 17 Apr 2023 16:03: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 4Q0X011gQyz4Z8B; Mon, 17 Apr 2023 16:03:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681747393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opfDKUrMsz3p7xARNLA6YNbT+x+/NtEzvqK4tqTptCE=; b=SQRSkxK7dB+rT5Tda9mXTmRSMDVg7xJ5Cd8lWKuyTVe2unGo0q4oWol3RrrdO6R77b6rBl yI+hGgexKYGKo4fIHfN0EP32CoWYXp3TCmmqoUu04gMue71xA1L4rpFIrV/6DIh2QG5+w0 /drmjkfEqPtUA41i85Gjvvq5GoXYaloDFlprB0WapAjhTkzIkw47Wpuc5i54+V0tNmQDFv qYr5xi4ZCT5Li79b8vZ03/95YRLbAfcCQQeO9dC1xFHCmUpxEc2a4/eY1fJjWHAM9sjvBn Kp7yik5/Eaz0ObL0Xx6wc42id+42q1ldtrZDigtohRlgN/GwGKl/Wi3ZTZWOTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681747393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=opfDKUrMsz3p7xARNLA6YNbT+x+/NtEzvqK4tqTptCE=; b=wC/A6RbPUwIQooAFXHQYvhv9YdWJ+oeAIsz5s2GCfJnSa2AbyzjbS1YSA62hMNOPkJ8zIc qpKs4MfKvEtDCJxHv+2j+PXXrnOyw7lusfhG9ghMuWwGApmbz4KA4d2j9A4iqvdW/6xza5 iJJDXk+VZ6c+8we3l85M1xRZSpK14YruPf906OvD9mc9TmQbnJlkcJwX43lj0DjPgUb9f5 g+3zOJ+9d2JIZhwxiEl0e9gUfhRps0eXtEOPsnS/MPhpR2lM5qWtMvY1N/jGK71SiHWftQ gUR4USFVkI/jRU8QRKD7vM49F6Sa2RCjQxQ0wvhRaunOUQjUjHIrdHLQrTm4fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681747393; a=rsa-sha256; cv=none; b=mVkdTMPJ7++qrNAOyD4jtS1kVhBIM+bwLQLyamUfImsT4xBAL3IofHXgZJyJ7gPCsX8vUU jT5+r8QkEZX2GuW+y5W8lD3J1oaGoenHi5rav/vUBr56AxRhR9t1+9dKGsgf2pjbyu4YFs iu8iMmtKkom/8OuOBJUW7fy9hHi5PeWDvtRKwbDYHZ7HgSwR07MtQZQjHfv3YAEz4qoZgu 9C5C4qeEEr2z3vXQkh+4Hq/wMw7BdWHj4+Gvj4Y7Ww86XKAyHwRdRJ0ZIX1nDjNBrpEMlK qhGl4uNQp46/JHJLUcYo7F5UFcLslFHRiTwss/WrZKuFRmrlK7zCzdpQz+YzAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0X010lzdzbRj; Mon, 17 Apr 2023 16:03: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 33HG3D9c002999; Mon, 17 Apr 2023 16:03:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HG3Cfw002998; Mon, 17 Apr 2023 16:03:12 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:03:12 GMT Message-Id: <202304171603.33HG3Cfw002998@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: e7e621f94d90 - main - sqlite3: Vendor import of sqlite3 3.41.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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e7e621f94d9073d620a4d15f13952f1d40685ece Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e7e621f94d9073d620a4d15f13952f1d40685ece commit e7e621f94d9073d620a4d15f13952f1d40685ece Merge: 48ffacbc8487 853a43f7c792 Author: Cy Schubert AuthorDate: 2023-04-17 16:02:41 +0000 Commit: Cy Schubert CommitDate: 2023-04-17 16:02:41 +0000 sqlite3: Vendor import of sqlite3 3.41.2 Release notes at https://www.sqlite.org/releaselog/3_41_2.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz MFC after: 2 weeks Merge commit '853a43f7c79218855a6e45a25a00b942972e3fa1' contrib/sqlite3/configure | 20 ++-- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 10 +- contrib/sqlite3/sqlite3.c | 209 ++++++++++++++++++++++++++++----------- contrib/sqlite3/sqlite3.h | 6 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 ++-- contrib/sqlite3/tea/configure.ac | 2 +- 8 files changed, 182 insertions(+), 87 deletions(-) From nobody Mon Apr 17 16:09: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 4Q0X7F3Rjwz44rW5; Mon, 17 Apr 2023 16:09: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 4Q0X7F2n2Kz3FWJ; Mon, 17 Apr 2023 16:09:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681747769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rhzv8koXzaVdCX4xcLJIB0Nj8uRTvt4j+OSnKEJZq1c=; b=Ug+6+RZ2vAMVpIo/GsVNK+IaNeOWb+DVth9YycvkJZMYo/Ie35bszA3wFUcf9Qc8i0P8js 7hRMYoW+WaYCCfIfA/JFnpo2BnCwDT0gqxjCvH+U++UzIh70IQckYybGeI34HP+/IAioUg meHa6UwcbW6PA5ZhE4Er2xYWsx8xznhNIuroglWCS/qIfBK63aG73oVlg9idQIFuRuDZCg wFAMeP44NsOwBza14/jkjpauS5jmBv8JfcF9f/te27Xmr7lNDMIPlmv0XY8mo4forNirts 7Hevt063YCj7vJBCq2Y6vEsosQM5n/APmHKjHBQok8Avge4wWivzP8vkgJ0mnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681747769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rhzv8koXzaVdCX4xcLJIB0Nj8uRTvt4j+OSnKEJZq1c=; b=n9KnKfzSex8lqlMvnlvipCr9w8yxx3LW9oSpqRmBYjng56Hh7jkpph4YLvwIv/jGYT2kde 8fo6EtjLAtMaOw5XaQZc2VUnDYkO8vSZlSO1yGd6RwkOBqovjn6mu48pVzGjuBwhz3fZXv 4bPVG/p13GYedyG2m+8XpQCemqGOBqA9Au4iYD09ufCIX+dzH3s+K8mNNB8Hrh4vsTXhCU +JKWzc9p9L1Q6NZ2S7ZoadmzdMOS6ou0AwUuvcGdMOMSerOAvVhlZPCKU0wgoRSRWh07/q oVKzcyfCPbzLqvtWZyTucmv9ROz/C44bNsA570nrvhBDP3yIGRVPpAWatMUeeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681747769; a=rsa-sha256; cv=none; b=EEqn1Nxt8pNRcsLdczrtnhufo9x8UFdP9G4tm4ctF7oWErspWWryP2PAX4kpCsexDMHTTt euXJ6tOVxHZwUdTV9ugkz8tDBtmtcpsTzWvD1AfeEy2/fSNOkpa3ne05ubY6TFaLAh+5XO VvMkTWI6/K9yDogT815ba48MOA08bnNb7zrvogf0muMv+RzXSyNNdBQ8QFQFSWqGoZWZMx BY3KKfuepMVFolMfDwAMbeXu6a/lTSCj7oIFI4QhzQ/Pa9dfmajkxz5DrsJCxH2Pa9e7wD kUhGd3VTO/TMi03fAh0jx0KHVSNQxX+nKAtbkfyg7ququ5evCpc3tHK8Afx9MA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0X7F1tKczbt3; Mon, 17 Apr 2023 16:09: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 33HG9Tda003889; Mon, 17 Apr 2023 16:09:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HG9Tw8003888; Mon, 17 Apr 2023 16:09:29 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:09:29 GMT Message-Id: <202304171609.33HG9Tw8003888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: a540cdca3183 - main - tcp_hpts: use queue(9) STAILQ for the input queue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a540cdca3183da08b2a865d6af30794a79c4a8c2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a540cdca3183da08b2a865d6af30794a79c4a8c2 commit a540cdca3183da08b2a865d6af30794a79c4a8c2 Author: Gleb Smirnoff AuthorDate: 2023-04-17 16:07:23 +0000 Commit: Gleb Smirnoff CommitDate: 2023-04-17 16:07:23 +0000 tcp_hpts: use queue(9) STAILQ for the input queue Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D39574 --- sys/netinet/tcp_hpts.c | 8 +++--- sys/netinet/tcp_lro.c | 22 +++++++--------- sys/netinet/tcp_stacks/bbr.c | 2 +- sys/netinet/tcp_stacks/rack.c | 2 +- sys/netinet/tcp_stacks/rack_bbr_common.c | 6 ++--- sys/netinet/tcp_subr.c | 43 +++++++++++--------------------- sys/netinet/tcp_var.h | 3 +-- 7 files changed, 33 insertions(+), 53 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 644811b44a19..e61547104775 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -92,9 +92,8 @@ __FBSDID("$FreeBSD$"); * * There is a common functions within the rack_bbr_common code * version i.e. ctf_do_queued_segments(). This function - * knows how to take the input queue of packets from - * tp->t_in_pkts and process them digging out - * all the arguments, calling any bpf tap and + * knows how to take the input queue of packets from tp->t_inqueue + * and process them digging out all the arguments, calling any bpf tap and * calling into tfb_do_segment_nounlock(). The common * function (ctf_do_queued_segments()) requires that * you have defined the tfb_do_segment_nounlock() as @@ -1331,7 +1330,8 @@ again: kern_prefetch(tp->t_fb_ptr, &did_prefetch); did_prefetch = 1; } - if ((inp->inp_flags2 & INP_SUPPORTS_MBUFQ) && tp->t_in_pkt) { + if ((inp->inp_flags2 & INP_SUPPORTS_MBUFQ) && + !STAILQ_EMPTY(&tp->t_inqueue)) { error = (*tp->t_fb->tfb_do_queued_segments)(tp, 0); if (error) { /* The input killed the connection */ diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 3ce49171a65c..7cbf535a9263 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1179,18 +1179,14 @@ again: #ifdef TCPHPTS static void -tcp_queue_pkts(struct inpcb *inp, struct tcpcb *tp, struct lro_entry *le) +tcp_queue_pkts(struct tcpcb *tp, struct lro_entry *le) { - INP_WLOCK_ASSERT(inp); - if (tp->t_in_pkt == NULL) { - /* Nothing yet there */ - tp->t_in_pkt = le->m_head; - tp->t_tail_pkt = le->m_last_mbuf; - } else { - /* Already some there */ - tp->t_tail_pkt->m_nextpkt = le->m_head; - tp->t_tail_pkt = le->m_last_mbuf; - } + + INP_WLOCK_ASSERT(tptoinpcb(tp)); + + STAILQ_HEAD(, mbuf) q = { le->m_head, + &STAILQ_NEXT(le->m_last_mbuf, m_stailqpkt) }; + STAILQ_CONCAT(&tp->t_inqueue, &q); le->m_head = NULL; le->m_last_mbuf = NULL; } @@ -1221,7 +1217,7 @@ tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, /* Look at the last mbuf if any in queue */ if (can_append_old_cmp) { - m = tp->t_tail_pkt; + m = STAILQ_LAST(&tp->t_inqueue, mbuf, m_stailqpkt); if (m != NULL && (m->m_flags & M_ACKCMP) != 0) { if (M_TRAILINGSPACE(m) >= sizeof(struct tcp_ackent)) { tcp_lro_log(tp, lc, le, NULL, 23, 0, 0, 0, 0); @@ -1451,7 +1447,7 @@ tcp_lro_flush_tcphpts(struct lro_ctrl *lc, struct lro_entry *le) if (le->m_head != NULL) { counter_u64_add(tcp_inp_lro_direct_queue, 1); tcp_lro_log(tp, lc, le, NULL, 22, 1, inp->inp_flags2, 0, 1); - tcp_queue_pkts(inp, tp, le); + tcp_queue_pkts(tp, le); } if (should_wake) { /* Wakeup */ diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index bce17b57205c..fab85e88a382 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -11600,7 +11600,7 @@ bbr_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, int retval; /* First lets see if we have old packets */ - if (tp->t_in_pkt) { + if (!STAILQ_EMPTY(&tp->t_inqueue)) { if (ctf_do_queued_segments(tp, 1)) { m_freem(m); return; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 7b97a8e9c5d9..c134c059ec89 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -17069,7 +17069,7 @@ rack_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, struct timeval tv; /* First lets see if we have old packets */ - if (tp->t_in_pkt) { + if (!STAILQ_EMPTY(&tp->t_inqueue)) { if (ctf_do_queued_segments(tp, 1)) { m_freem(m); return; diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index 7f5f8817466a..91bf32159004 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -493,10 +493,8 @@ ctf_do_queued_segments(struct tcpcb *tp, int have_pkt) struct mbuf *m; /* First lets see if we have old packets */ - if (tp->t_in_pkt) { - m = tp->t_in_pkt; - tp->t_in_pkt = NULL; - tp->t_tail_pkt = NULL; + if ((m = STAILQ_FIRST(&tp->t_inqueue)) != NULL) { + STAILQ_INIT(&tp->t_inqueue); if (ctf_process_inbound_raw(tp, m, have_pkt)) { /* We lost the tcpcb (maybe a RST came in)? */ return(1); diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 3a6a902c35be..cc879999fe26 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2262,6 +2262,7 @@ tcp_newtcpcb(struct inpcb *inp) #endif TAILQ_INIT(&tp->t_segq); + STAILQ_INIT(&tp->t_inqueue); tp->t_maxseg = #ifdef INET6 isipv6 ? V_tcp_v6mssdflt : @@ -2437,8 +2438,10 @@ tcp_discardcb(struct tcpcb *tp) } } TCPSTATES_DEC(tp->t_state); + if (tp->t_fb->tfb_tcp_fb_fini) (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); + MPASS(STAILQ_EMPTY(&tp->t_inqueue)); /* * If we got enough samples through the srtt filter, @@ -4242,7 +4245,8 @@ tcp_handle_orphaned_packets(struct tcpcb *tp) if (tptoinpcb(tp)->inp_flags2 & INP_MBUF_L_ACKS) return; - if ((tptoinpcb(tp)->inp_flags2 & INP_SUPPORTS_MBUFQ) == 0) { + if ((tptoinpcb(tp)->inp_flags2 & INP_SUPPORTS_MBUFQ) == 0 && + !STAILQ_EMPTY(&tp->t_inqueue)) { /* * It is unsafe to process the packets since a * reset may be lurking in them (its rare but it @@ -4253,44 +4257,27 @@ tcp_handle_orphaned_packets(struct tcpcb *tp) * This new stack does not do any fancy LRO features * so all we can do is toss the packets. */ - m = tp->t_in_pkt; - tp->t_in_pkt = NULL; - tp->t_tail_pkt = NULL; - while (m) { - save = m->m_nextpkt; - m->m_nextpkt = NULL; + m = STAILQ_FIRST(&tp->t_inqueue); + STAILQ_INIT(&tp->t_inqueue); + STAILQ_FOREACH_FROM_SAFE(m, &tp->t_inqueue, m_stailqpkt, save) m_freem(m); - m = save; - } } else { /* * Here we have a stack that does mbuf queuing but * does not support compressed ack's. We must * walk all the mbufs and discard any compressed acks. */ - m = tp->t_in_pkt; - prev = NULL; - while (m) { + STAILQ_FOREACH_SAFE(m, &tp->t_inqueue, m_stailqpkt, save) { if (m->m_flags & M_ACKCMP) { - /* We must toss this packet */ - if (tp->t_tail_pkt == m) - tp->t_tail_pkt = prev; - if (prev) - prev->m_nextpkt = m->m_nextpkt; + if (m == STAILQ_FIRST(&tp->t_inqueue)) + STAILQ_REMOVE_HEAD(&tp->t_inqueue, + m_stailqpkt); else - tp->t_in_pkt = m->m_nextpkt; - m->m_nextpkt = NULL; + STAILQ_REMOVE_AFTER(&tp->t_inqueue, + prev, m_stailqpkt); m_freem(m); - /* move forward */ - if (prev) - m = prev->m_nextpkt; - else - m = tp->t_in_pkt; - } else { - /* this one is ok */ + } else prev = m; - m = m->m_nextpkt; - } } } } diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 9e58c4c3576b..5632e5d8bb41 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -355,8 +355,7 @@ struct tcpcb { int t_segqlen; /* segment reassembly queue length */ uint32_t t_segqmbuflen; /* total reassembly queue byte length */ struct tsegqe_head t_segq; /* segment reassembly queue */ - struct mbuf *t_in_pkt; - struct mbuf *t_tail_pkt; + STAILQ_HEAD(, mbuf) t_inqueue; /* HPTS input queue */ uint32_t snd_ssthresh; /* snd_cwnd size threshold for * for slow start exponential to * linear switch From nobody Mon Apr 17 16:09: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 4Q0X7G5QWpz44rhn; Mon, 17 Apr 2023 16:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0X7G3qgSz3FZ4; Mon, 17 Apr 2023 16:09:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681747770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHDZfdDe6W2TZwYbFz0iiSq/ogsD00OtgS5pMhtEaHI=; b=ALzNQpS7pDx5/PEgvN4TtWt7eW91XAqSvNsK1SzEl0wNRZtxCia7nKgQvuizwvMSXdazvs 1bmoGYiI/ZbujmAU3miSXarJcDbol+BjKmgeEg/8lW08ERH4J6zIC+aBLgmfIYwPIlR3dZ W61hy4vsEkkDMMCzSd/Y3SaxqJbSi8pryqBa6kqOICj5BcrjqbqK0NZzF8fHwlZyoqfi2Z dSzVPUc/R3s19E4Ph7B99jtzz9tAUyRpZXy2HVMauL4FaJjKRaP/DJFm+3FqlmCN1CoqKh Jsmi9ACuyYCoGVMUM15EqPNqtTgFBavEi7N3ondSvC3SxLWN4ITH31oAjeH+Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681747770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHDZfdDe6W2TZwYbFz0iiSq/ogsD00OtgS5pMhtEaHI=; b=GXdxcUfFSyiGeJ+cCuyFRkY2seOZxm90OWggVQp3ctcZOKVh7bLchkV3vpDnEi4wAG76tO q+/9IRnD/XeF2wrGm+cTZKGP6ifqgh6OQegh6XtxUEjV92TyUEguDz8EQJWkIu8FxwlUkW ae1P5kcbmvK4Unuect0FutWUL0zHXQToRuzLd/3H7yyaV4+ZqAHRs4NgCl81G4JDudZzva ukU5WX0hxqxKZ+CoaNhQZWXoGm2+g8EsfHXMvTNU4zflM8kjGkk92WdO7sF7323tynbF6y Kjz7+BJo08yBGUlO4bHZPw7sw7MWf1c1avjlwnXtedsP11bdaDu5oqFV2u+SEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681747770; a=rsa-sha256; cv=none; b=OMxyds9M9aLOh4ghcTQisAe6VfRyZ0IXKfZNBCmY9ciW7pGz2HQEyLtQHGYYJdyL0kvy8W pXsxmg7XMWGx1KsRw+Hp5CG+plCq2ITL2fKYpBEvGIF4xU+ruQQf5zGLvCVbGRv8yYkGVS vl1otkeHc9EYr0r+dr5eLjsjM4vOl60bXUDlIyMy3JjTmKZa5mRFfQWlIVNnlUiMH2Wnqd dE5VCuBlfSJ6/PMpX/yWHdRjrYdx66aMidtU8Hxri4+m7NDNh9uq2b6ypdsfJ4pDq94rSZ g9dfidE6bmpqFTj1U48haDi6EDMXjE9PplGIDVtlLPuTphnbWJXrdCzbQLGeqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0X7G2hvHzbqf; Mon, 17 Apr 2023 16:09: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 33HG9UlT003908; Mon, 17 Apr 2023 16:09:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HG9UOp003907; Mon, 17 Apr 2023 16:09:30 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:09:30 GMT Message-Id: <202304171609.33HG9UOp003907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: a6b55ee6be15 - main - net: replace IFF_KNOWSEPOCH with IFF_NEEDSEPOCH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a6b55ee6be15a41792839095d19b589e25d0f7f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a6b55ee6be15a41792839095d19b589e25d0f7f7 commit a6b55ee6be15a41792839095d19b589e25d0f7f7 Author: Gleb Smirnoff AuthorDate: 2023-04-17 16:08:35 +0000 Commit: Gleb Smirnoff CommitDate: 2023-04-17 16:08:35 +0000 net: replace IFF_KNOWSEPOCH with IFF_NEEDSEPOCH Expect that drivers call into the network stack with the net epoch entered. This has already been the fact since early 2020. The net interrupts, that are marked with INTR_TYPE_NET, were entering epoch since 511d1afb6bf. For the taskqueues there is NET_TASK_INIT() and all drivers that were known back in 2020 we marked with it in 6c3e93cb5a4. However in e87c4940156 we took conservative approach and preferred to opt-in rather than opt-out for the epoch. This change not only reverts e87c4940156 but adds a safety belt to avoid panicing with INVARIANTS if there is a missed driver. With INVARIANTS we will run in_epoch() check, print a warning and enter the net epoch. A driver that prints can be quickly fixed with the IFF_NEEDSEPOCH flag, but better be augmented to properly enter the epoch itself. Note on TCP LRO: it is a backdoor to enter the TCP stack bypassing some layers of net stack, ignoring either old IFF_KNOWSEPOCH or the new IFF_NEEDSEPOCH. But the tcp_lro_flush_all() asserts the presence of network epoch. Indeed, all NIC drivers that support LRO already provide the epoch, either with help of INTR_TYPE_NET or just running NET_EPOCH_ENTER() in their code. Reviewed by: zlei, gallatin, erj Differential Revision: https://reviews.freebsd.org/D39510 --- sys/compat/linux/linux_netlink.c | 2 +- sys/dev/ena/ena.c | 3 +-- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 3 +-- sys/dev/oce/oce_if.c | 2 +- sys/dev/virtio/network/if_vtnet.c | 3 +-- sys/net/if.h | 4 ++-- sys/net/if_epair.c | 1 - sys/net/if_ethersubr.c | 25 ++++++++++++++++++++- sys/net/if_infiniband.c | 26 +++++++++++++++++++++- sys/net/iflib.c | 2 +- sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 ++-- 11 files changed, 59 insertions(+), 16 deletions(-) diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index 0e8188d4cdf6..775a36994d2d 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -312,7 +312,7 @@ rtnl_if_flags_to_linux(unsigned int if_flags) case IFF_ALLMULTI: result |= flag; break; - case IFF_KNOWSEPOCH: + case IFF_NEEDSEPOCH: case IFF_DRV_OACTIVE: case IFF_SIMPLEX: case IFF_LINK0: diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 72846a8bed51..a4762ce9ebb1 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -2393,8 +2393,7 @@ ena_setup_ifnet(device_t pdev, struct ena_adapter *adapter, if_setdev(ifp, pdev); if_setsoftc(ifp, adapter); - if_setflags(ifp, - IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | IFF_KNOWSEPOCH); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); if_setinitfn(ifp, ena_init); if_settransmitfn(ifp, ena_mq_start); if_setqflushfn(ifp, ena_qflush); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 84adef8398bb..ab0cf49c2e8a 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -4526,8 +4526,7 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) if_initname(ifp, "mce", device_get_unit(mdev->pdev->dev.bsddev)); if_setmtu(ifp, ETHERMTU); if_setinitfn(ifp, mlx5e_open); - if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_KNOWSEPOCH); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); if_setioctlfn(ifp, mlx5e_ioctl); if_settransmitfn(ifp, mlx5e_xmit); if_setqflushfn(ifp, if_qflush); diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c index cc8cfc3eaa8c..5d250fcac0bd 100644 --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c @@ -2111,7 +2111,7 @@ oce_attach_ifp(POCE_SOFTC sc) ifmedia_add(&sc->media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(&sc->media, IFM_ETHER | IFM_AUTO); - if_setflags(sc->ifp, IFF_BROADCAST | IFF_MULTICAST | IFF_KNOWSEPOCH); + if_setflags(sc->ifp, IFF_BROADCAST | IFF_MULTICAST); if_setioctlfn(sc->ifp, oce_ioctl); if_setstartfn(sc->ifp, oce_start); if_setinitfn(sc->ifp, oce_init); diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 41eaa6a56086..9ef667e97a54 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1103,8 +1103,7 @@ vtnet_setup_interface(struct vtnet_softc *sc) dev = sc->vtnet_dev; ifp = sc->vtnet_ifp; - if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_KNOWSEPOCH); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); if_setbaudrate(ifp, IF_Gbps(10)); if_setinitfn(ifp, vtnet_init); if_setioctlfn(ifp, vtnet_ioctl); diff --git a/sys/net/if.h b/sys/net/if.h index 888e7d5d7320..da3d25f2b226 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -144,7 +144,7 @@ struct if_data { #define IFF_DEBUG 0x4 /* (n) turn on debugging */ #define IFF_LOOPBACK 0x8 /* (i) is a loopback net */ #define IFF_POINTOPOINT 0x10 /* (i) is a point-to-point link */ -#define IFF_KNOWSEPOCH 0x20 /* (i) calls if_input in net epoch */ +#define IFF_NEEDSEPOCH 0x20 /* (i) calls if_input w/o net epoch */ #define IFF_DRV_RUNNING 0x40 /* (d) resources allocated */ #define IFF_NOARP 0x80 /* (n) no address resolution protocol */ #define IFF_PROMISC 0x100 /* (n) receive all packets */ @@ -179,7 +179,7 @@ struct if_data { #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\ IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_PROMISC|\ - IFF_DYING|IFF_CANTCONFIG|IFF_KNOWSEPOCH) + IFF_DYING|IFF_CANTCONFIG|IFF_NEEDSEPOCH) /* * Values for if_link_state. diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index e9e1a48b3d58..2afbf786c9c8 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -543,7 +543,6 @@ epair_setup_ifp(struct epair_softc *sc, char *name, int unit) ifp->if_dname = epairname; ifp->if_dunit = unit; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_flags |= IFF_KNOWSEPOCH; ifp->if_capabilities = IFCAP_VLAN_MTU; ifp->if_capenable = IFCAP_VLAN_MTU; ifp->if_transmit = epair_transmit; diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 839bae8e9d43..dd5c07acf634 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -56,6 +56,9 @@ #include #include #include +#ifdef KDB +#include +#endif #include #include @@ -813,7 +816,27 @@ ether_input(struct ifnet *ifp, struct mbuf *m) struct mbuf *mn; bool needs_epoch; - needs_epoch = !(ifp->if_flags & IFF_KNOWSEPOCH); + needs_epoch = (ifp->if_flags & IFF_NEEDSEPOCH); +#ifdef INVARIANTS + /* + * This temporary code is here to prevent epoch unaware and unmarked + * drivers to panic the system. Once all drivers are taken care of, + * the whole INVARIANTS block should go away. + */ + if (!needs_epoch && !in_epoch(net_epoch_preempt)) { + static bool printedonce; + + needs_epoch = true; + if (!printedonce) { + printedonce = true; + if_printf(ifp, "called %s w/o net epoch! " + "PLEASE file a bug report.", __func__); +#ifdef KDB + kdb_backtrace(); +#endif + } + } +#endif /* * The drivers are allowed to pass in a chain of packets linked with diff --git a/sys/net/if_infiniband.c b/sys/net/if_infiniband.c index 30f014ee669d..a11b8a8f5c56 100644 --- a/sys/net/if_infiniband.c +++ b/sys/net/if_infiniband.c @@ -25,6 +25,7 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_kbd.h" #include __FBSDID("$FreeBSD$"); @@ -38,6 +39,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef KDB +#include +#endif #include #include @@ -417,7 +421,27 @@ infiniband_input(struct ifnet *ifp, struct mbuf *m) int isr; bool needs_epoch; - needs_epoch = (ifp->if_flags & IFF_KNOWSEPOCH) == 0; + needs_epoch = (ifp->if_flags & IFF_NEEDSEPOCH); +#ifdef INVARIANTS + /* + * This temporary code is here to prevent epoch unaware and unmarked + * drivers to panic the system. Once all drivers are taken care of, + * the whole INVARIANTS block should go away. + */ + if (!needs_epoch && !in_epoch(net_epoch_preempt)) { + static bool printedonce; + + needs_epoch = true; + if (!printedonce) { + printedonce = true; + if_printf(ifp, "called %s w/o net epoch! " + "PLEASE file a bug report.", __func__); +#ifdef KDB + kdb_backtrace(); +#endif + } + } +#endif CURVNET_SET_QUIET(ifp->if_vnet); if (__predict_false(needs_epoch)) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index aa16e5d5492b..d056570d9a99 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -6010,7 +6010,7 @@ iflib_register(if_ctx_t ctx) if_settransmitfn(ifp, iflib_if_transmit); #endif if_setqflushfn(ifp, iflib_if_qflush); - iflags = IFF_MULTICAST | IFF_KNOWSEPOCH; + iflags = IFF_MULTICAST; if ((sctx->isc_flags & IFLIB_PSEUDO) && (sctx->isc_flags & IFLIB_PSEUDO_ETHER) == 0) diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c index 8b2f4724d2fd..fe4581e456d3 100644 --- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -922,8 +922,8 @@ ipoib_intf_alloc(const char *name, struct ib_device *hca) } if_initname(dev, name, priv->unit); if_setflags(dev, IFF_BROADCAST | IFF_MULTICAST); - if (hca->attrs.device_cap_flags & IB_DEVICE_KNOWSEPOCH) - if_setflagbits(dev, IFF_KNOWSEPOCH, 0); + if ((hca->attrs.device_cap_flags & IB_DEVICE_KNOWSEPOCH) == 0) + if_setflagbits(dev, IFF_NEEDSEPOCH, 0); infiniband_ifattach(priv->dev, NULL, priv->broadcastaddr); From nobody Mon Apr 17 16: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 4Q0XWN0PQKz44sZB; Mon, 17 Apr 2023 16: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 4Q0XWM5CLNz41jJ; Mon, 17 Apr 2023 16:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pGd2UgaTkcK19fm39dogaaDXgIR6r9RoaZ0eedPuG58=; b=AlN+SxMBrxZDk3h9COnCfQx91kDpR3MlBpDQ8a1hCGOp176L6omj7VCAb1rboObLZk2rPt 1o1fqtfrbuE3mnOsE6G1HzdKRS4drWPjZD5N6xCOk3pZ1hWpUnzPblix04zdLxSbIfqRQI KvbqfaKY9Kt6v6jnJ7uRoSHioUb/QWS6YH9iZNi/nEBp//La2zGeXyo5YCazviRd/JqEkj ttWmwBNoiQchp24Hos+mZIkRoKcISYMH+MXxYlJdmJMJQ6Bf9LfHFoVXjgZxmLz0a8PmPN 6v2Rk+JKkE8h6NcOCxbP18o2EJ2nNzkMb08dCmbrkWhnSrg2rGx/6ZuVG2btSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pGd2UgaTkcK19fm39dogaaDXgIR6r9RoaZ0eedPuG58=; b=YSRB/34G8+3Z1aLzKFIaCU0dn3fu4lVk08AnHUtN84911L0D6Db0uIT15WkqnkVcUtTujP gPik7R49Ec9zMeh1m2+J7jglXFQbAeejfP2li1IZBGMQUjAn+OLlPuWYwUeg+lYV4XffDe jXiwMmh88DmvLP/U/0zSszRUR+7KaZxJv2vV0uBDOEZMl4sJwqkj63RCpXE5xXoOeY8SR7 sTJdYZloFsYfzkKWA3BWYqQ64tK/ifiCub13WuGgcYgFEHOMvg7yLrKi8rO3gZwHXXFFHD 4815P0F5QmmrgSaFiVRhd5WezbJCvuYXqVLV8W25ggS2H9ZRTuEUENK0OqY8Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681748815; a=rsa-sha256; cv=none; b=MnrsMifMzL9qNWOPnyT9O8NCKi9afZABRstrfwFu5tRjiCP7l6SiU6IrojAHTPiJKLWlPy NWaUynWLu06VkG6nfiCbSBn7FS8O48xU0gRy/FWrqJ0UN/CyaDoJ96iR81hsSMzAN7bUMP i/gz6NBLiWr1k/UeOYe4jrKDvAVhItep3FD0NxOAsGjb5Czfi+OWmhc+bV0r4Dq7Vcly/c fbii5A3fE+Y8TWoT+TQCEb3NnjunPPIGdh3c0Q4lnoAT2O7Y1Y8Sa3nCEhf/Xk+P4tf1Py EHlarIeU25KTJH11EoWY34XU4C4xxK7NBmJvw9bgEjZ2Q+ohbb5XPgnEAHZ26w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0XWM4JT1zcHd; Mon, 17 Apr 2023 16: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 33HGQtbF036543; Mon, 17 Apr 2023 16: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 33HGQtqU036541; Mon, 17 Apr 2023 16:26:55 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:26:55 GMT Message-Id: <202304171626.33HGQtqU036541@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: 2ba84b4bcdd6 - main - Suppress lld 16 errors about undefined symbols in version maps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2ba84b4bcdd6012e8cfbf8a0d060a4438623a638 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2ba84b4bcdd6012e8cfbf8a0d060a4438623a638 commit 2ba84b4bcdd6012e8cfbf8a0d060a4438623a638 Author: Dimitry Andric AuthorDate: 2023-04-17 16:00:20 +0000 Commit: Dimitry Andric CommitDate: 2023-04-17 16:25:52 +0000 Suppress lld 16 errors about undefined symbols in version maps lld >= 16 turned on --no-undefined-version by default, which results in errors whenever symbols are mentioned in version maps, but are not actually defined in the binary. Since we have quite a few instances of symbols that are defined or not, depending on various compile-time settings, suppress this lld check for the time being. MFC after: 1 week --- share/mk/bsd.lib.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index c98dec9045bf..1d4a97134d41 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -262,6 +262,13 @@ SHLIB_NAME_FULL=${SHLIB_NAME} .if !empty(VERSION_MAP) ${SHLIB_NAME_FULL}: ${VERSION_MAP} LDFLAGS+= -Wl,--version-script=${VERSION_MAP} + +# lld >= 16 turned on --no-undefined-version by default, but we have several +# symbols in our version maps that may or may not exist, depending on +# compile-time defines. +.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 160000 +LDFLAGS+= -Wl,--undefined-version +.endif .endif .if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME) From nobody Mon Apr 17 16:26: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 4Q0XWP0MNmz44slf; Mon, 17 Apr 2023 16:26: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 4Q0XWN5hgPz41nS; Mon, 17 Apr 2023 16: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=1681748816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pqTrDFKKy8SJ6Wg3PxBkXxwFRwt4Y1PCiF+nfQRxRJA=; b=wvxu5vAwH2g6+WJ0wG+CIAvQHslqBxdQDofC4f0ZnIsXkFIWwenCQzGD1/FQxr4qGkQnkp LORtInTpWWi6iqr7cD4fM4t1a6x/qjkC2xKafcDS9Ydss9Tf0YNTVX+zU4/Hiz0J8acqp2 FqKNEag/1Sd6hqtNCZJh5iSqUn9Pdk96Y06c+/hqXkpB9upoJY8ICP8I4Nlb3yAT0PIVNI 7H1Noa4zyBPUl6ARiQSqqs7mgkhBarXAxpGcxJU//NbernfL2zIWRscgcdu0A8Ear+J1Ty CMCjZVtevzQdpYTVBm51l1H8pdP02F3YKDd/sBZgT74dF3+/LI5r+d03jlj+nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pqTrDFKKy8SJ6Wg3PxBkXxwFRwt4Y1PCiF+nfQRxRJA=; b=f6zDIyKxy5OCBRiHj/zEm0REu/4EucXQNXb0Z5vTOttWP8wHAsHiaNJMPG4tj21AzChZO7 Au43ViOPMuxP3cedE+CkDFivB/P8VUgMBds3zvylRa1iwkyvmzJRUyD0ePLvoM8qN7P6R1 zX9GgSsehczVszwEZD3/6sv05+AYHyp6gRf+NpqnpBak+DX5CVudnDW8sTnzUYG+DoBjSq C+sFeeAd4qecJtapvwS8U0vIoq2/ros0J1fqa25+f5DvOMuMLjobuGVPsNITI3VxrnDPtI uHNESNE73M9oIN6peDotaYPl8uWKelfXSGjUGuF1HQg1T4PRDQxzOZkcMstsFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681748816; a=rsa-sha256; cv=none; b=qIn20koulAsZqpEFGxZdZYpZor3eiZV2t49rpyX9jnYG4SGutIjtGf8gL5xtVL2QlGYYa6 0dPlvmcsu7mgNfT7xyQh0pNA2Sl0WzLq6bQ+qlRNa0oa2ofuabgc8l3mx/who8Mou57xpx u1JA85ePoaCvJ0WutW1awna580krEG8VpifBXTF108Khl7j1Ho7jWXO2PUY+LhcGl4p6LT cba1KCs+MIEh5T75TpAKMoJlfHSaGrXD3A3gldTFcLn0zyxl349mNPkjIO9KYiNSpW87Kt 2iksygE3eY3zpxqKQakaFBqCLQPXymPf2JTvyo46Dj4lq4KbHMBFAPxm6fBWEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0XWN4nFczcHf; Mon, 17 Apr 2023 16:26: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 33HGQuBd036567; Mon, 17 Apr 2023 16:26:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HGQu2Q036566; Mon, 17 Apr 2023 16:26:56 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:26:56 GMT Message-Id: <202304171626.33HGQu2Q036566@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: b740e02500ca - main - bsnmp: make single bit bitfields unsigned to avoid clang 16 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b740e02500ca248e1096cf745a17d2a8fcc44fed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b740e02500ca248e1096cf745a17d2a8fcc44fed commit b740e02500ca248e1096cf745a17d2a8fcc44fed Author: Dimitry Andric AuthorDate: 2023-04-17 16:11:56 +0000 Commit: Dimitry Andric CommitDate: 2023-04-17 16:26:03 +0000 bsnmp: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in bsnmp's snmpd.h: contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] peer->input.stream = 1; ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the field as a boolean, so make it unsigned. MFC after: 3 days --- contrib/bsnmp/snmpd/snmpd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/bsnmp/snmpd/snmpd.h b/contrib/bsnmp/snmpd/snmpd.h index 48a7b44a04b2..394a4f4736d6 100644 --- a/contrib/bsnmp/snmpd/snmpd.h +++ b/contrib/bsnmp/snmpd/snmpd.h @@ -152,12 +152,12 @@ struct port_input { int fd; /* socket */ void *id; /* evSelect handle */ - int stream : 1; /* stream socket */ - int cred : 1; /* want credentials */ + u_int stream : 1; /* stream socket */ + u_int cred : 1; /* want credentials */ struct sockaddr *peer; /* last received packet */ socklen_t peerlen; - int priv : 1; /* peer is privileged */ + u_int priv : 1; /* peer is privileged */ u_char *buf; /* receive buffer */ size_t buflen; /* buffer length */ From nobody Mon Apr 17 16:26: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 4Q0XWQ3tnyz44sJR; Mon, 17 Apr 2023 16:26: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 4Q0XWQ0Nzqz422l; Mon, 17 Apr 2023 16:26:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4rLDNGFcfBx5/MuDALJBxWS7uTLRVhnOydhRNAK2wWA=; b=LYHQ8cFz7iX8ksoVj6lHOv9Sbb7blLlL4f6R+k45+SaimjkftNTIe7lTGMyUDsbloh0S/R E8s1Ul+AvF035gS6viNSK1+D4C0QJuBPvZq49WtbmdijeTxWD/lD9MPjy/WgxBO/M/Ow3Y 3wcJp63Z3fOX8pbVo8kSqLsvG2fs2KkJk0dhiaPROoSfnpw0fyZoPwp/srXbW8mUXdD7Mf kmOixU2Nb0LwyTjHWXe++my+rT44hc61/NiWmxZPEL9zKREeSBSrGL17ynNyaQoPFVp2t0 IeKFiH6GPOovUxSaZ1UdQvW207C8WdpXIyAjMpH9PtnU/NnKmVy+sbk+JYLihA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4rLDNGFcfBx5/MuDALJBxWS7uTLRVhnOydhRNAK2wWA=; b=Le4OQm7Bo2rEasDOqOPyAtK2KfWu22T0Nmd9BrFlNFxNoJ9fGzdWj+g+N21cTKhPuyGhW0 eroEJEY7+oZcrRMOZIs0+2gxEFBQKFRclcFOI+oujfLgQvvShDuhemIBnzVkEn3F++E6zt QVa0XQ9B6v7Fcf4rL1L1sCAwfqp17rbLUON5xCqYpw7MvloWTlAcpiQ8D8Du/uWg4OQuIc 93VHVSDOOGvCmorY/lye7msORuodTBEsEZpJHEKRmvv8J5sHthOlVgKjuuMeFcyTwwn1sD iypKnW1JC/U4EJyLqlodQ7xJp3okNtAQP1Jptf/5Mq745jCv+dXi2mxJxZCK4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681748818; a=rsa-sha256; cv=none; b=GZIb6oQNkst/3l0BiPeRRnxi69aiNEXlT1Zhnr4INF2Mmv++NeSOMGa9EVcdQ/Pui66c3V HPB6qW9WRyaBtei8osDUYqQvdLwgkRex19c6eza4uydfMEuPaHRSWPZPfglwlZf8vvxmlk 8QtGfHvUnIrqP4gsk9QYpci0ojMxsQ4dfFRRXbApwtpsfH00RgSM7j5WQJGS8Otg2eGRnj ccmDQBL1Ju+X5iUysaOQ5QtSYOxHGMMck20IbcgUj30S1pGRdPA3s99Ne5/HH8yUdGqZkb vbPEvqqkZVnnbTRk2PXH/3aWkmc+7leSSr7PHdMhGBrYu6miLIgyADLSsnkvWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0XWP5QQ4zbp4; Mon, 17 Apr 2023 16:26:57 +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 33HGQvmX036587; Mon, 17 Apr 2023 16:26:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HGQvXv036586; Mon, 17 Apr 2023 16:26:57 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:26:57 GMT Message-Id: <202304171626.33HGQvXv036586@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: 1a3ccb8f1552 - main - libsa: make single bit bitfields unsigned to avoid clang 16 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a3ccb8f1552977e1b264e3b89d1fba8e717dad8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1a3ccb8f1552977e1b264e3b89d1fba8e717dad8 commit 1a3ccb8f1552977e1b264e3b89d1fba8e717dad8 Author: Dimitry Andric AuthorDate: 2023-04-17 16:15:57 +0000 Commit: Dimitry Andric CommitDate: 2023-04-17 16:26:11 +0000 libsa: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in libsa's tftp.c: stand/libsa/tftp.c:382:20: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* very short file */ ^ ~ stand/libsa/tftp.c:432:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* EOF */ ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the field as a boolean, so make it unsigned. MFC after: 3 days --- stand/libsa/tftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libsa/tftp.c b/stand/libsa/tftp.c index 903537b4bbe5..f1e056da3561 100644 --- a/stand/libsa/tftp.c +++ b/stand/libsa/tftp.c @@ -106,8 +106,8 @@ static int is_open = 0; struct tftp_handle { struct iodesc *iodesc; int currblock; /* contents of lastdata */ - int islastblock:1; /* flag */ - int tries:4; /* number of read attempts */ + unsigned int islastblock:1; /* flag */ + unsigned int tries:4; /* number of read attempts */ int validsize; int off; char *path; /* saved for re-requests */ From nobody Mon Apr 17 16:26: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 4Q0XWS45yKz44sll; Mon, 17 Apr 2023 16:27: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 4Q0XWR3KdMz41pP; Mon, 17 Apr 2023 16:26:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+1sNb6KsLy8FzXO0Ip+QPbxZPStleCKSrMme41yy9tw=; b=R4V/4M2lNZ4V00hJsI+1+nKIL//DXok5JHvlQPSD40BQKGEWM5hbRAVUF4XNua7FyB8NWc L8MZRv8Omggq1K1CNNjXhDUucLOrA9zEQ9/sizEWqFHfVhQpta6FmfFvSMVUV+oKFsL2ZH dKxqFuCAelJMI7xlfHl8vx5hRvPcgi4awqu4qYOTRR3EaMyuJSzMziqCvENi9MpswhWmCk uA1HHFYw16hJrSAptYrZOS5cZGISFY8xK5mvAjvAmr3RGxVSJ5s/qdA/9RBNo6ceqx05c3 uVdqtP5FzR6s0xEn8lWpXUs0ySypV1N6uWbrpIvB+Clyf4fOJOaZtR6u85so9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+1sNb6KsLy8FzXO0Ip+QPbxZPStleCKSrMme41yy9tw=; b=yCo/szBcs0zqyW2sF/tX1k/b3oV4V4njODSOzAcgGIjGGL7CJvuKV4lF3B2BIbJvoWbRtu O6sIjP5qFnYTZ4tFKtKA9vtlPJPMoEo27911rsiutLeBgP3IOipDtGgFjwREODlknJ5vyl v9/LnqS0nLdVKx5qdcZnMpkILrQbpWbdvXriWeU3PQuH+jaDa5PQybDzK9BPLVy0xOdJAb BgvSEAY+fyKFoScn7pm/watecAcXnVmuXpMOgq3JjfyCu4OadbXwaSa02z1zG5T0vROFwy /15ViX7LEk4NpuW15oqZ9esEhK+4tZfCVqRjM/LYEfSEIuTw4x2jdUMCfHIVdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681748819; a=rsa-sha256; cv=none; b=PmfcGmwrQ9d/S0wDlZxD5t07Vi5H24lpPqdEHGgNcCeCTgGLgcQU+zLXAOWf1WSkQZW4Q+ hsToN36E1WXBY6izk/9AqYgRIFGDuOoChLFrrfCdte2mhR3bVVqPG3+zsnD+MCV+rzgnO8 a0ldJp2lk4sC24uUwU6wibtjDfGCBIHPe08FsUC/RpHHc2BWdFW2QUSbHPCPiz1pZ/AqiJ 0LP9TAhDS+mQlFQPpYG0DAQ9jrsvHPr+xEwFuDRlM9FQz+m7nwOjK70DFodqpSxI8W0nwg 7QhZKr1sKPD0gUd8rHG5+OSj34AlLGAMtzqJLsXI+c34lSuZq8qcSL6fjPQ8cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0XWQ6PM6zc7l; Mon, 17 Apr 2023 16:26: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 33HGQwOG036606; Mon, 17 Apr 2023 16:26:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HGQwJG036605; Mon, 17 Apr 2023 16:26:58 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:26:58 GMT Message-Id: <202304171626.33HGQwJG036605@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: 67ecab6f50ff - main - libarchive: make single bit bitfields unsigned to avoid clang 16 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67ecab6f50ff29e9bda340be1e9d2acc963c9a2b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=67ecab6f50ff29e9bda340be1e9d2acc963c9a2b commit 67ecab6f50ff29e9bda340be1e9d2acc963c9a2b Author: Dimitry Andric AuthorDate: 2023-04-17 16:20:56 +0000 Commit: Dimitry Andric CommitDate: 2023-04-17 16:26:20 +0000 libarchive: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by various declarations in libarchive: contrib/libarchive/libarchive/archive_write_set_format_7zip.c:1541:13: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] file->dir = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5127:15: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] isoent->dir = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5213:14: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] isoent->dir = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5214:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] isoent->virtual = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7149:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] isoent->virtual = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7435:32: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] iso9660->zisofs.detect_magic = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7495:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] iso9660->zisofs.making = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7496:26: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] iso9660->zisofs.allzero = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7702:28: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] iso9660->zisofs.allzero = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7871:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] zisofs->header_passed = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7894:24: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] zisofs->initialized = 1; ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the fields as booleans, so make them unsigned. This has also been sent upstream. MFC after: 3 days --- .../libarchive/libarchive/archive_write_set_format_7zip.c | 2 +- .../libarchive/archive_write_set_format_iso9660.c | 14 +++++++------- .../libarchive/libarchive/archive_write_set_format_xar.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contrib/libarchive/libarchive/archive_write_set_format_7zip.c b/contrib/libarchive/libarchive/archive_write_set_format_7zip.c index d5ca9a665654..f4b34685d3d0 100644 --- a/contrib/libarchive/libarchive/archive_write_set_format_7zip.c +++ b/contrib/libarchive/libarchive/archive_write_set_format_7zip.c @@ -165,7 +165,7 @@ struct file { mode_t mode; uint32_t crc32; - signed int dir:1; + unsigned int dir:1; }; struct _7zip { diff --git a/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c b/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c index 58b7216a8071..b3e41d4ab997 100644 --- a/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c +++ b/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c @@ -289,12 +289,12 @@ struct isoent { struct extr_rec *current; } extr_rec_list; - signed int virtual:1; + unsigned int virtual:1; /* If set to one, this file type is a directory. * A convenience flag to be used as * "archive_entry_filetype(isoent->file->entry) == AE_IFDIR". */ - signed int dir:1; + unsigned int dir:1; }; struct hardlink { @@ -755,9 +755,9 @@ struct iso9660 { /* Used for making zisofs. */ struct { - signed int detect_magic:1; - signed int making:1; - signed int allzero:1; + unsigned int detect_magic:1; + unsigned int making:1; + unsigned int allzero:1; unsigned char magic_buffer[64]; int magic_cnt; @@ -7802,8 +7802,8 @@ struct zisofs_extract { uint64_t pz_uncompressed_size; size_t uncompressed_buffer_size; - signed int initialized:1; - signed int header_passed:1; + unsigned int initialized:1; + unsigned int header_passed:1; uint32_t pz_offset; unsigned char *block_pointers; diff --git a/contrib/libarchive/libarchive/archive_write_set_format_xar.c b/contrib/libarchive/libarchive/archive_write_set_format_xar.c index d885f5c256d3..9d5e5dd41cbb 100644 --- a/contrib/libarchive/libarchive/archive_write_set_format_xar.c +++ b/contrib/libarchive/libarchive/archive_write_set_format_xar.c @@ -212,8 +212,8 @@ struct file { struct heap_data data; struct archive_string script; - signed int virtual:1; - signed int dir:1; + unsigned int virtual:1; + unsigned int dir:1; }; struct hardlink { From nobody Mon Apr 17 16:26: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 4Q0XWT1WLzz44sZH; Mon, 17 Apr 2023 16:27: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 4Q0XWS22XSz41s9; Mon, 17 Apr 2023 16:27:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=832F9MFd+RXp+lQDP2+ISRE7xwL7ZAIEGPa+cU/YJQE=; b=DFk+Hg0QJb9z0/d+Gz7vel/a+vCxbQFLyYdWH+sRTbMv/THfu3rdApBlPQB0tSaFUZV8z7 djaIVi5wza6wx8nHwfblMBBRiOYr1+KBkRuLd9R6h0JvWKDFRdbJtx9Z4nxXwF/K/Kxx6t GmnhV8sz7qZk9H8RYCsNzUDyjcE+aK/pMY2ivMJj24JnOO+oAURPRR4wtpE4TKYvbXfk9t Orc3gcpj1HrSj12ukCMIX5azTYn2cCbQP6mHPsq6asVFQW1qL+LTs9YAnisJorpcrc3Lyi KYBZchlf8ROg+oaBK41Go/WuiTwCWWAJbsr8sAQFeekqx5XXXo43wgOPKo/pkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681748820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=832F9MFd+RXp+lQDP2+ISRE7xwL7ZAIEGPa+cU/YJQE=; b=tDyAttDKjjozX8dC8v7xJ8q3vQCR3I3kgSM1W6Loz8XfvbHObPm/LbouMyS9G6sIKSW3sh 6spFUgIgQH8+G/kUSszjcaT36pROmfIj8J7n7wYkXR30RUwIw2wYK59vz1ShoZjRPVP2cX vaRPBt8I0efDAyZ4Or1Phz6SwRbMJzT8FGKSVkMeS9P11T9mz3UA0MIzwSkLtylZsA9yK6 xug7vuwSz6YJf7bdiWZx9aDGaU3MR48UoIi7nG1W0mW0dB+f17WEGGNB7BrHxBW7bxdnOw urkT9wvmIvf5UCwJki5XDDNziQKoOH3ZZ1jO/nXWZq5SEHtdGI64x+0uHq27lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681748820; a=rsa-sha256; cv=none; b=I/774WmD6lcleQmxQKxDdOp3933SzKgklmdkXJkKXkBmfJEZegr1KH5NUq8HDM2vwQKPE9 rrO7vFqI6fpCqvj7ZnzvizVN0KSiQzdqyM2d3NcHOYW7M8q9bvWPtIqEwodPOj7PewRifl EZuH0Ew/Mj95wPIocCcxmsXLJDcY9DgqiPVADq71Uu/78qImae1Vu6yLO6sm9xbvcYV4b6 qTseNIz1oiahwJqnaNdn9w+392S/UloQcm+W0L3Wm0XmsxTjs9l8YjRIFrhdUIgSL8oEnV oor8gqmKR6kn7RW94vyfIRRMesL8VjQ/Fj/oD35G0cx5nzzdJoxsauV9itU3hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0XWS10szzbp5; Mon, 17 Apr 2023 16:27: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 33HGQxkP036631; Mon, 17 Apr 2023 16:26:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HGQxK5036630; Mon, 17 Apr 2023 16:26:59 GMT (envelope-from git) Date: Mon, 17 Apr 2023 16:26:59 GMT Message-Id: <202304171626.33HGQxK5036630@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: 458f4722bf97 - main - Suppress lld 16 errors about multiply defined symbols in rescue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 458f4722bf974c7fa7961952fcaee146f5a97708 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=458f4722bf974c7fa7961952fcaee146f5a97708 commit 458f4722bf974c7fa7961952fcaee146f5a97708 Author: Dimitry Andric AuthorDate: 2023-04-17 16:25:30 +0000 Commit: Dimitry Andric CommitDate: 2023-04-17 16:26:27 +0000 Suppress lld 16 errors about multiply defined symbols in rescue lld >= 16 became more strict about multiply defined symbols. Since there are many of those in crunchgen'd programs, turn off the check when linking the rescue binary. MFC after: 1 week --- rescue/rescue/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 2360bf83b781..1f4db1d06b15 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -13,6 +13,12 @@ MK_PIE= no NO_SHARED= yes CRUNCH_BUILDOPTS+= MK_PIE=no NO_SHARED=yes +# lld >= 16 became more strict about multiply defined symbols. Since there are +# many of those in crunchgen'd programs, turn off the check. +.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 160000 +LDFLAGS+= -Wl,--allow-multiple-definition +.endif + PROG= rescue BINDIR?=/rescue From nobody Mon Apr 17 17:03: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 4Q0YL629G7z44vWH; Mon, 17 Apr 2023 17:03: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 4Q0YL61Pcwz49C6; Mon, 17 Apr 2023 17:03:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+URsO8KmmIBuL9BZFtfv8It0YA84st/c8ciy2Hj8XA=; b=P/8bTPBpL44beDwXiO4bg2sMjAjyR0A47m6Cwz0Mcf56lZkK+PEniWFdBR/1yZN1sT8Q37 OvYt5xVP5gtjmsMG15+mVKRYQm/+la940Wy2fKE5KgwU7iIU134GBIaY9XOoxtRYUhaWyW 9+oIwo/ElNJfQuO8YIuEVeTbadtKdAW7+9vjbM0AjrdskJV+6gmM8V5F0y8EzC2dS2gc+k tHsbJsDYl5V7HzlSL2NgYmXgqczRVrofwVuOl6ipieloe64fCqN90S+R1oTSwbYd4DJHvO jV3yNolbHevL8oDYvW5UrrTkoWaGCL3bqhP+s5wmWcbhhcg23kx2DTAhuEJ0SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+URsO8KmmIBuL9BZFtfv8It0YA84st/c8ciy2Hj8XA=; b=LBV0zgNq+kmPOKYoWIYZqt7iKpmfg+5RDuej3UHQMvkPEDAEUyO4OCixN2Vwda2/n5lm0H /t0wZxwxctpDM7SViLiCTs1ckWSn/15py/PNqS2RF3DL4C+FVy4DiibKxA09BnXk3RmKt1 9IkOhPXQF/672oVkek5t2Xh4YcnEd91XX4CG2Ki/1WAlb+gSkL1KN0euy6Lwgk6jHQC5KX SGpdM75QpgR/srDqZlluM/ZjPVIaVaur4zX0tK25yAa1eur0JhjQVcY0SeSPhT8uz6gw74 U1rcuz8kVz0s7q6+6CfCvHJkO59fCMkDHuEbvnHOsEOjZ9GbtYM0hssSLmOcGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751038; a=rsa-sha256; cv=none; b=hfK6txNf6QLLIalxs675dk8FgTKfoCyE5QgT51MK3sZEqouiWHwwuJaTdjdQxQ/xEP/uI6 kZy8+mkFpWGyDlxxDtEA84zmuPSphv/VyI5LIdaynGLEL+FRTmE2hbJo4n7zNaF9GCb83y bV0TsWAFp6vfS78nXnelimdAm3cqGRD3Iz/S7wvrJK7aWGa6MJE23tWHy/or6keD2mvQoJ bhtsgJHwDv05dMlq1So/Szkdq/M37ES2W+yVrsBN9mFZykl2Y/RMOgwPKvv9vaUa8+xZFt rx3S1mr+JGb7K5zP2dusqeF9fqMGU3Escx8CcmPeuzZlampV7mTKfefCDN1Ycg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YL60VQ2zd4c; Mon, 17 Apr 2023 17:03: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 33HH3vxK002489; Mon, 17 Apr 2023 17:03:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH3vlC002488; Mon, 17 Apr 2023 17:03:57 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:03:57 GMT Message-Id: <202304171703.33HH3vlC002488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 0edbab45af5d - stable/13 - arm: add an interrupt rman to nexus List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0edbab45af5d36596b77e7d6da71c3b529b09bc1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0edbab45af5d36596b77e7d6da71c3b529b09bc1 commit 0edbab45af5d36596b77e7d6da71c3b529b09bc1 Author: Mitchell Horne AuthorDate: 2021-12-05 15:27:50 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:02:56 +0000 arm: add an interrupt rman to nexus Allow the nexus bus to own and manage interrupt resources. Currently, interrupt resources on this architecture are managed completely by ofwbus, but it is desirable that system-wide memory and interrupt resources be managed by the top-level bus. This is a pre-requisite to moving this resource management out of ofwbus. Reviewed By: ian, Elliott Mitchell MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D32357 (cherry picked from commit 1d03c3578d05b011dc714ec0735a5783c421530b) --- sys/arm/arm/nexus.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index be84ab82d43f..f2506dfb3cb5 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -77,6 +77,7 @@ struct nexus_device { #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) static struct rman mem_rman; +static struct rman irq_rman; static int nexus_probe(device_t); static int nexus_attach(device_t); @@ -171,6 +172,12 @@ nexus_attach(device_t dev) if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR)) panic("nexus_probe mem_rman"); + irq_rman.rm_start = 0; + irq_rman.rm_end = ~0; + irq_rman.rm_type = RMAN_ARRAY; + irq_rman.rm_descr = "Interrupts"; + if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0)) + panic("nexus_attach irq_rman"); /* * First, deal with the children we know about already @@ -227,6 +234,10 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, flags &= ~RF_ACTIVE; switch (type) { + case SYS_RES_IRQ: + rm = &irq_rman; + break; + case SYS_RES_MEMORY: case SYS_RES_IOPORT: rm = &mem_rman; From nobody Mon Apr 17 17:03: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 4Q0YL734ZKz44vSV; Mon, 17 Apr 2023 17:03: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 4Q0YL72NGWz49FC; Mon, 17 Apr 2023 17:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pg2NuqjPwQs9JKD5qu4e2vNnomRstteH12ZJMpU3OEg=; b=gjfs9rlkdMFL0cBVtianGZfayw/aLDEBBniG6i7uNnoEnIsIm6cc9fSGIweemTR9XFAbjV hKy++khgj0MgiNfgZfizvGSVRCjtma1xxJ2lIMLzo4iKVM/cmz6Q2WPjmWdhtLNknBlOgh pdM7dS8yakmnj5wUWU8FRWFeWgGLzdpjFD8vIM6fifXVwKZXVaS/hkO9QqdrKe3482gWmW epKtmAEcwQYgBQkXZ3/x0JAk8r8W0RyEMYO6tdzvpmrU4IV5dQ3F3ChLaCavTGF3Ghqy4/ pLDLG1eM31Q1SXrXqWk9UzKDKz0im8vI6PI7dP2dtj3FvtjqR2QBCnq1L0WX/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pg2NuqjPwQs9JKD5qu4e2vNnomRstteH12ZJMpU3OEg=; b=WMZVBtLTurSsd9TeVbrQbcZMITjXgOipg5nm9xIyi6aj1DOzqRsGlZbfP3SDPybQOqxavg t3Pq/e/zNMsG+ID+bjfrWTTKoh5xYeMaXP/8f431qL27mjGTrz//AX8wjmCJg+ucXQa2c1 /yyreSRZZ10NO1PjzCy5wthVCuSGaBXy2OBoLbF2ijWoQDU+se5FvH4dIqR1+lemAnNewr 9mfVVCw2MV2qMummJQv/7DgowiJtpSH6LnR/G35azl7PuhzramHQ5RCNhbIIZedsNJHwJn p7OsGm/z9hCNMgCup413c3cHixr7tUNLNeYKsG0eVX49A2xWR10xGMI4MdTBUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751039; a=rsa-sha256; cv=none; b=Z420b2UrFyM5ktFl+Z1KK2Yr4Of0DQRocxkfQ9NMhRZty16KFTcsHZTAQMGHeft9Jf+pdy dMI/uOsU12rSrPB3/EHsAsDOjsuSfmgYSfqEmzpoZHrPVVFbmQUWtCF4ByBgEBQnAHHtzQ a0L4g/oe3v7OewVmRH/pumxbGrLCp6Bpea031zFCuWrLQwVvrwisfQkSinP02Li63V6A2W 7yS7X5IlbYf+VRDvhDtaeMTMgxBszOO2NlN0B5J38mHHpfV6PKL79dXlFOKQSTjbyeBTxu lrK92AnqXeY3MtqUazMgYpHdXnLnsuNqYwx3jBjEHMpIz8BaR66uNYXbwEd50A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YL71MlGzcyx; Mon, 17 Apr 2023 17:03: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 33HH3xPb002508; Mon, 17 Apr 2023 17:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH3x4j002507; Mon, 17 Apr 2023 17:03:59 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:03:59 GMT Message-Id: <202304171703.33HH3x4j002507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 5cdaedd8cc6a - stable/13 - physmem: add ram0 pseudo-driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5cdaedd8cc6a628a7c4c62e6f415b21f2e842235 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5cdaedd8cc6a628a7c4c62e6f415b21f2e842235 commit 5cdaedd8cc6a628a7c4c62e6f415b21f2e842235 Author: Mitchell Horne AuthorDate: 2021-05-27 14:27:40 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:02:56 +0000 physmem: add ram0 pseudo-driver Its purpose is to reserve all I/O space belonging to physical memory from nexus, preventing it from being handed out by bus_alloc_resource() to callers such as xenpv_alloc_physmem(), which looks for the first available free range it can get. This mimics the existing pseudo-driver on x86. If needed, the device can be disabled with hint.ram.0.disabled="1" in /boot/device.hints. Reviewed by: imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D32343 (cherry picked from commit e6cf1a0826c9d7f229e41224ec7b783501636528) --- sys/kern/subr_physmem.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c index 450b891cb8a1..959394e06d4b 100644 --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #ifdef _KERNEL @@ -49,7 +51,9 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include +#include #else #include #include @@ -525,7 +529,6 @@ physmem_init_kernel_globals(void) panic("No memory entries in phys_avail"); Maxmem = atop(phys_avail[nextidx - 1]); } -#endif #ifdef DDB #include @@ -537,3 +540,98 @@ DB_SHOW_COMMAND(physmem, db_show_physmem) } #endif /* DDB */ + +/* + * ram pseudo driver - this reserves I/O space resources corresponding to physical + * memory regions. + */ + +static void +ram_identify(driver_t *driver, device_t parent) +{ + + if (resource_disabled("ram", 0)) + return; + if (BUS_ADD_CHILD(parent, 0, "ram", 0) == NULL) + panic("ram_identify"); +} + +static int +ram_probe(device_t dev) +{ + + device_quiet(dev); + device_set_desc(dev, "System RAM"); + return (BUS_PROBE_SPECIFIC); +} + +static int +ram_attach(device_t dev) +{ + vm_paddr_t avail_list[PHYS_AVAIL_COUNT]; + rman_res_t start, end; + struct region *hwp; + int rid, i; + + rid = 0; + + /* Get the avail list. */ + bzero(avail_list, sizeof(avail_list)); + regions_to_avail(avail_list, EXFLAG_NOALLOC | EXFLAG_NODUMP, + PHYS_AVAIL_COUNT, 0, NULL, NULL); + + /* Reserve all memory regions. */ + for (i = 0; avail_list[i + 1] != 0; i += 2) { + start = avail_list[i]; + end = avail_list[i + 1]; + + if (bootverbose) + device_printf(dev, + "reserving memory region: %jx-%jx\n", + (uintmax_t)start, (uintmax_t)end); + + if (bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, start, end, + end - start, 0) == NULL) + panic("ram_attach: resource %d failed to attach", rid); + rid++; + } + + /* Now, reserve the excluded memory regions. */ + for (i = 0, hwp = exregions; i < excnt; i++, hwp++) { + start = hwp->addr; + end = hwp->addr + hwp->size; + + if (bootverbose) + device_printf(dev, + "reserving excluded region: %jx-%jx\n", + (uintmax_t)start, (uintmax_t)(end - 1)); + + /* + * Best-effort attempt to reserve the range. This may fail, as + * sometimes the excluded ranges provided by the device tree + * will cover or overlap some I/O range. + */ + if (bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, start, end, + end - start, 0) == NULL) { + if (bootverbose) + device_printf(dev, "failed to reserve region\n"); + continue; + } + rid++; + } + + return (0); +} + +static device_method_t ram_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, ram_identify), + DEVMETHOD(device_probe, ram_probe), + DEVMETHOD(device_attach, ram_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(ram, ram_driver, ram_methods, /* no softc */ 1); +DRIVER_MODULE(ram, nexus, ram_driver, 0, 0); +#endif /* _KERNEL */ From nobody Mon Apr 17 17:04: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 4Q0YL82xFJz44v74; Mon, 17 Apr 2023 17:04: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 4Q0YL82lb1z49Lh; Mon, 17 Apr 2023 17:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CfpeK6LP18OTNxWROixea8tuWJh2AfUAd73K2Ez8Y5U=; b=Y2VyJDurdah1QYDacxqHWoExQnewNozzdm8S88/5+D7FhacGLcImZ6xEGpSJ3L4nW/0XDF 74oeP2H/noqrKRg56Lj9MbhScewqgCCsRf+KkvrnFjB5zxB8Kn+ANhNZULBFxVZdCCrAHL 2QX9k8mJNo+3OpRXzXSmWlrYAJfj1daSWL5ZfGGpoK39FLdt1a24s3ss4vxHx/SgYq58L0 lbdOwJ9L5mJ+J8rc4HiEqksPkxCVILFiJLnFQksq8KAq/k8x6N/na+YFtmJDbwi+A+jb5L 8/o2dHFR1D2tZEhhiw3ATJxSUZDV6UoRtMX1wQ5Z7Fu0xVu7Op7Sjx1RULLn/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CfpeK6LP18OTNxWROixea8tuWJh2AfUAd73K2Ez8Y5U=; b=jHNTD7AfRqdcBRlBtB1KHYvRRzbcEd6rgyrJNlzpVxCpXvBR3mWadn1J+zVNby1Q9w6yds Od3pxOLPLD3TRLwdxNoq8fE6UYZueqokf5m7mPRprY4Sz4WHlTTBxSOJHYp9AHFwJLKOzO KrAGK94OWhhXAkMcYwoV2NNOniAalZX2CvT28XNfyd5cHxn5GbkSOfZXC46KuoqFzeyn0u DQs3zIPeZi4PBYWoNittqv3dtBujojTk7igR6coq6jagdhp+rCrm+seBP1us4X9qHNy7jM pKO2tbO9fosON1HgjwgimMVJT71v9XtNx8cEqQ33Ynfsk+vjavOXlErWRLcJeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751040; a=rsa-sha256; cv=none; b=qMIhNDSSRvcff78KELWhlv4wGckkv/PRWfXXMzObcJlTAuuC0pR7CK99tcrClt5/edSXNp 9j4zO59kj2Km7uxsCMgAacViIdVCl0IfCO1KsQlmCYAsLCeG2V65rsolz8x/w1RSAzOlK5 btsINp9ogZphG+nYRMtDCSYLQL0oYEY2Zw6PcKNH9czpZ1aGz+rW098E1aCTaEWeh3yxGQ HVj1l4NuS13H0MLVI4HN81fM/WnUlowLeamjOx7PgPasDVxQYUaVzNcTtNlum3jm76t0ir hkdLPdeSg9zdIrDI7bg8Uzy4Nwg/Xybmkw1TBr0nwM8CQ+E9Tshjck7WkFpaqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YL81s2wzcyy; Mon, 17 Apr 2023 17:04: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 33HH40JR002527; Mon, 17 Apr 2023 17:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH40hJ002526; Mon, 17 Apr 2023 17:04:00 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:04:00 GMT Message-Id: <202304171704.33HH40hJ002526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 9cb88cc937ec - stable/13 - ofwbus: remove handling of resources from ofwbus List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9cb88cc937eca838065538652929ffb9d77624da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=9cb88cc937eca838065538652929ffb9d77624da commit 9cb88cc937eca838065538652929ffb9d77624da Author: Elliott Mitchell AuthorDate: 2023-02-08 20:17:03 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:04:23 +0000 ofwbus: remove handling of resources from ofwbus The architecture nexus should handle allocation and release of memory and interrupts. This is to ensure that system-wide resources such as these are available to all devices, not just children of ofwbus0. On powerpc this moves the ownership of these resources up one level, from ofwbus0 to nexus0. Other architectures already have the required logic in their nexus implementation, so this eliminates the duplication of resources. An implementation of nexus_adjust_resource() is added for arm, arm64, and riscv. As noted by ian@ in the review, resource handling was the main bit of logic distinguishing ofwbus from simplebus. With some attention to detail, it should be possible to merge the two in the future. Co-authored by: mhorne MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D30554 (cherry picked from commit f9bdaab95ec469738fbfc1f0edd3e8c744b7f71f) --- sys/arm/arm/nexus.c | 24 ++++++++++++ sys/arm64/arm64/nexus.c | 24 ++++++++++++ sys/dev/ofw/ofwbus.c | 92 +++++---------------------------------------- sys/powerpc/powerpc/nexus.c | 92 +++++++++++++++++++++++++++++++++++++++++++++ sys/riscv/riscv/nexus.c | 24 ++++++++++++ 5 files changed, 173 insertions(+), 83 deletions(-) diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index f2506dfb3cb5..3991ec91ed0d 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -87,6 +87,8 @@ static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); +static int nexus_adjust_resource(device_t, device_t, int, struct resource *, + rman_res_t, rman_res_t); static bus_space_tag_t nexus_get_bus_tag(device_t, device_t); static bus_dma_tag_t nexus_get_dma_tag(device_t dev, device_t child); #ifdef SMP @@ -126,6 +128,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), @@ -263,6 +266,27 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, return (rv); } +static int +nexus_adjust_resource(device_t bus __unused, device_t child __unused, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + struct rman *rm; + + switch (type) { + case SYS_RES_IRQ: + rm = &irq_rman; + break; + case SYS_RES_MEMORY: + rm = &mem_rman; + break; + default: + return (EINVAL); + } + if (rman_is_region_manager(r, rm) == 0) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); +} + static int nexus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 0775cc820a8c..350ad9d1be76 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -104,6 +104,8 @@ static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); +static int nexus_adjust_resource(device_t, device_t, int, struct resource *, + rman_res_t, rman_res_t); static int nexus_map_resource(device_t, device_t, int, struct resource *, struct resource_map_request *, struct resource_map *); static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, @@ -135,6 +137,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), @@ -273,6 +276,27 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, return (rv); } +static int +nexus_adjust_resource(device_t bus __unused, device_t child __unused, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + struct rman *rm; + + switch (type) { + case SYS_RES_IRQ: + rm = &irq_rman; + break; + case SYS_RES_MEMORY: + rm = &mem_rman; + break; + default: + return (EINVAL); + } + if (rman_is_region_manager(r, rm) == 0) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); +} + static int nexus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index 6ea5be694af6..4432f1704392 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -63,22 +63,14 @@ __FBSDID("$FreeBSD$"); * hang from the Open Firmware root node and adds them as devices to this bus * (except some special nodes which are excluded) so that drivers can be * attached to them. - * */ -struct ofwbus_softc { - struct simplebus_softc simplebus_sc; - struct rman sc_intr_rman; - struct rman sc_mem_rman; -}; - #ifndef __aarch64__ static device_identify_t ofwbus_identify; #endif static device_probe_t ofwbus_probe; static device_attach_t ofwbus_attach; static bus_alloc_resource_t ofwbus_alloc_resource; -static bus_adjust_resource_t ofwbus_adjust_resource; static bus_release_resource_t ofwbus_release_resource; static device_method_t ofwbus_methods[] = { @@ -91,14 +83,14 @@ static device_method_t ofwbus_methods[] = { /* Bus interface */ DEVMETHOD(bus_alloc_resource, ofwbus_alloc_resource), - DEVMETHOD(bus_adjust_resource, ofwbus_adjust_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, ofwbus_release_resource), DEVMETHOD_END }; DEFINE_CLASS_1(ofwbus, ofwbus_driver, ofwbus_methods, - sizeof(struct ofwbus_softc), simplebus_driver); + sizeof(struct simplebus_softc), simplebus_driver); static devclass_t ofwbus_devclass; EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); @@ -134,12 +126,9 @@ ofwbus_probe(device_t dev) static int ofwbus_attach(device_t dev) { - struct ofwbus_softc *sc; phandle_t node; struct ofw_bus_devinfo obd; - sc = device_get_softc(dev); - node = OF_peer(0); /* @@ -153,15 +142,6 @@ ofwbus_attach(device_t dev) * ofw_bus_devinfo from it. Pass node to simplebus_init directly. */ simplebus_init(dev, node); - sc->sc_intr_rman.rm_type = RMAN_ARRAY; - sc->sc_intr_rman.rm_descr = "Interrupts"; - sc->sc_mem_rman.rm_type = RMAN_ARRAY; - sc->sc_mem_rman.rm_descr = "Device Memory"; - if (rman_init(&sc->sc_intr_rman) != 0 || - rman_init(&sc->sc_mem_rman) != 0 || - rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0 || - rman_manage_region(&sc->sc_mem_rman, 0, BUS_SPACE_MAXADDR) != 0) - panic("%s: failed to set up rmans.", __func__); /* * Allow devices to identify. @@ -184,15 +164,12 @@ static struct resource * ofwbus_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { - struct ofwbus_softc *sc; - struct rman *rm; struct resource *rv; struct resource_list_entry *rle; - int isdefault, passthrough; + bool isdefault, passthrough; isdefault = RMAN_IS_DEFAULT_RANGE(start, end); passthrough = (device_get_parent(child) != bus); - sc = device_get_softc(bus); rle = NULL; if (!passthrough && isdefault) { rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), @@ -208,28 +185,11 @@ ofwbus_alloc_resource(device_t bus, device_t child, int type, int *rid, end = ummax(rle->end, start + count - 1); } - switch (type) { - case SYS_RES_IRQ: - rm = &sc->sc_intr_rman; - break; - case SYS_RES_MEMORY: - rm = &sc->sc_mem_rman; - break; - default: - return (NULL); - } - - rv = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, - child); + /* Let nexus handle the allocation. */ + rv = bus_generic_alloc_resource(bus, child, type, rid, start, end, + count, flags); if (rv == NULL) return (NULL); - rman_set_rid(rv, *rid); - - if ((flags & RF_ACTIVE) != 0 && bus_activate_resource(child, type, - *rid, rv) != 0) { - rman_release_resource(rv); - return (NULL); - } if (!passthrough && rle != NULL) { rle->res = rv; @@ -241,42 +201,12 @@ ofwbus_alloc_resource(device_t bus, device_t child, int type, int *rid, return (rv); } -static int -ofwbus_adjust_resource(device_t bus, device_t child __unused, int type, - struct resource *r, rman_res_t start, rman_res_t end) -{ - struct ofwbus_softc *sc; - struct rman *rm; - device_t ofwbus; - - ofwbus = bus; - while (strcmp(device_get_name(device_get_parent(ofwbus)), "root") != 0) - ofwbus = device_get_parent(ofwbus); - sc = device_get_softc(ofwbus); - switch (type) { - case SYS_RES_IRQ: - rm = &sc->sc_intr_rman; - break; - case SYS_RES_MEMORY: - rm = &sc->sc_mem_rman; - break; - default: - return (EINVAL); - } - if (rm == NULL) - return (ENXIO); - if (rman_is_region_manager(r, rm) == 0) - return (EINVAL); - return (rman_adjust_resource(r, start, end)); -} - static int ofwbus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { struct resource_list_entry *rle; - int passthrough; - int error; + bool passthrough; passthrough = (device_get_parent(child) != bus); if (!passthrough) { @@ -287,10 +217,6 @@ ofwbus_release_resource(device_t bus, device_t child, int type, rle->res = NULL; } - if ((rman_get_flags(r) & RF_ACTIVE) != 0) { - error = bus_deactivate_resource(child, type, rid, r); - if (error) - return (error); - } - return (rman_release_resource(r)); + /* Let nexus handle the release. */ + return (bus_generic_release_resource(bus, child, type, rid, r)); } diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c index 1c6bc275ebdd..6edc7f258d39 100644 --- a/sys/powerpc/powerpc/nexus.c +++ b/sys/powerpc/powerpc/nexus.c @@ -63,12 +63,18 @@ __FBSDID("$FreeBSD$"); * mapping. All direct subdevices of nexus are attached by DEVICE_IDENTIFY(). */ +static struct rman intr_rman; +static struct rman mem_rman; + static device_probe_t nexus_probe; static device_attach_t nexus_attach; static bus_setup_intr_t nexus_setup_intr; static bus_teardown_intr_t nexus_teardown_intr; +static bus_alloc_resource_t nexus_alloc_resource; static bus_activate_resource_t nexus_activate_resource; static bus_deactivate_resource_t nexus_deactivate_resource; +static bus_adjust_resource_t nexus_adjust_resource; +static bus_release_resource_t nexus_release_resource; static int nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, struct resource_map_request *argsp, @@ -90,8 +96,11 @@ static device_method_t nexus_methods[] = { /* Bus interface */ DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), + DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), DEVMETHOD(bus_setup_intr, nexus_setup_intr), @@ -128,6 +137,15 @@ static int nexus_attach(device_t dev) { + intr_rman.rm_type = RMAN_ARRAY; + intr_rman.rm_descr = "Interrupts"; + mem_rman.rm_type = RMAN_ARRAY; + mem_rman.rm_descr = "I/O memory addresses"; + if (rman_init(&intr_rman) != 0 || rman_init(&mem_rman) != 0 || + rman_manage_region(&intr_rman, 0, ~0) != 0 || + rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR) != 0) + panic("%s: failed to set up rmans.", __func__); + bus_generic_probe(dev); bus_generic_attach(dev); @@ -215,6 +233,44 @@ nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, return (intr); } +/* + * Allocate a resource on behalf of child. NB: child is usually going to be a + * child of one of our descendants, not a direct child of nexus0. + */ +static struct resource * +nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + struct rman *rm; + struct resource *rv; + + switch (type) { + case SYS_RES_IRQ: + rm = &intr_rman; + break; + case SYS_RES_MEMORY: + rm = &mem_rman; + break; + default: + return (NULL); + } + + rv = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, + child); + if (rv == NULL) + return (NULL); + rman_set_rid(rv, *rid); + + if ((flags & RF_ACTIVE) != 0) { + if (bus_activate_resource(child, type, *rid, rv) != 0) { + rman_release_resource(rv); + return (NULL); + } + } + + return (rv); +} + static int nexus_activate_resource(device_t bus __unused, device_t child __unused, int type, int rid __unused, struct resource *r) @@ -257,6 +313,42 @@ nexus_deactivate_resource(device_t bus __unused, device_t child __unused, return (rman_deactivate_resource(r)); } +static int +nexus_adjust_resource(device_t bus, device_t child __unused, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + struct rman *rm; + + switch (type) { + case SYS_RES_IRQ: + rm = &intr_rman; + break; + case SYS_RES_MEMORY: + rm = &mem_rman; + break; + default: + return (EINVAL); + } + if (rm == NULL) + return (ENXIO); + if (rman_is_region_manager(r, rm) == 0) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); +} + +static int +nexus_release_resource(device_t bus, device_t child, int type, + int rid, struct resource *r) +{ + int error; + + if ((rman_get_flags(r) & RF_ACTIVE) != 0) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); + } + return (rman_release_resource(r)); +} static int nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index 16fe971b6521..9cafb90fd34a 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -85,6 +85,8 @@ static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int nexus_activate_resource(device_t, device_t, int, int, struct resource *); +static int nexus_adjust_resource(device_t, device_t, int, struct resource *, + rman_res_t, rman_res_t); static int nexus_map_resource(device_t, device_t, int, struct resource *, struct resource_map_request *, struct resource_map *); static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, @@ -118,6 +120,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), @@ -265,6 +268,27 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, return (rv); } +static int +nexus_adjust_resource(device_t bus __unused, device_t child __unused, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + struct rman *rm; + + switch (type) { + case SYS_RES_IRQ: + rm = &irq_rman; + break; + case SYS_RES_MEMORY: + rm = &mem_rman; + break; + default: + return (EINVAL); + } + if (rman_is_region_manager(r, rm) == 0) + return (EINVAL); + return (rman_adjust_resource(r, start, end)); +} + static int nexus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) From nobody Mon Apr 17 17:04: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 4Q0YL94Tnzz44vqp; Mon, 17 Apr 2023 17:04: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 4Q0YL941Hrz49j8; Mon, 17 Apr 2023 17:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i0NPWRAD9gLMj4LqfxsJ6ePFvTQbFnjRV4g78hRgha8=; b=t/0adWafhAtmoiKxOsFj3acUa6acrTkqynq4Ex9ZvLBc5ZZIjfyd1p12O8oEb4HS4VEs0e 3hxk2o4kYUcCEBNgufgkKOvrcZ22iWafiUwlf9zgCvbkySXIupkzXzjod8gzwk1Nxfucfk /GDfpQAKDzkpcDOZ5RjuiaQJzL4CCefwp1mBJ5jdOY6PcSgEiRyjRugC8/EhnxqTcfFjZ2 ZBPoUl2dtcw/5VgREeMIp+z7ACWT+q5gZbUlYqYiQy1ZHiOwDf55AH2qFML5zesp2SiShb UFrWZ4jgf16N+r1CFSIGc0mg8AgG7cWkqM8yjYcAATLHwUscYixs2cEfTiBhOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i0NPWRAD9gLMj4LqfxsJ6ePFvTQbFnjRV4g78hRgha8=; b=EXnN8LKtKCPCPPmBAAyanfnlRdN2u45vU6fYLVhyWglXubmZWnHk4ds3RGHblaSPWE+Lex sE+XauXuSSRcUmRGBs84xxm/LsHrFLKKyYZGAUiawwjsOEWLbPDL+AShgzJZE9+/IGzp3+ T7sGw+waPWhvIPtcfHVJKgnlufSEWBwEtj/XEDwNXBGSuEWsCLo9fYm/QnmNkWbCVne+SP sgrMKN6Adt5hSqthANvtJSDZx+1lpfKg3pQ4OgJeHy3McOleu0UQhSimbhxjvvkW2Xsm/n n77pP/6+YyQV1YkipXzTS3bIJczk8+MYTF1ANOLpeA4ClTB34ugWgaXTyjFmwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751041; a=rsa-sha256; cv=none; b=seDW6kzW/DBqzLXWWqTFcNDYs7hLtyMOrTdszOr/I/bBTUIoiKgKtYamBSjtV4AzAzGVFY bKLeK0auSXCRns9+ZhXTW2LiYg9H7Bv/fN5emzhIEB4yZPkYxALkFnumyIMve28X34h4lP N1ih3UDQyYAwuKLP6gKwI0T0jNLfg2uw0pytWh6tY19URbcCWVQVZosj5GktBZ8ZtqYdC0 iMXEkXnweX1uQ+dO9gSkiwLKmUYuT7S+UF5HpNtoeKoky+GHi07BpKPMZ+ky1UtTGJ7Pal 1DtVZXrzkCryxWeeuhK4R7ISDnN8BJ/2GqRmLqvHb0OkE4ehmeoVVrqapdcBkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YL931NlzdLw; Mon, 17 Apr 2023 17:04: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 33HH41Re002555; Mon, 17 Apr 2023 17:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH41AS002554; Mon, 17 Apr 2023 17:04:01 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:04:01 GMT Message-Id: <202304171704.33HH41AS002554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 53ad4781f550 - stable/13 - ofwbus: remove arm64 ifdefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 53ad4781f5503b55db4c86dca7cade7c9cd9c991 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=53ad4781f5503b55db4c86dca7cade7c9cd9c991 commit 53ad4781f5503b55db4c86dca7cade7c9cd9c991 Author: Mitchell Horne AuthorDate: 2023-02-13 17:43:25 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:54:04 +0000 ofwbus: remove arm64 ifdefs Rather than using the DEVICE_IDENTIFY method, let's have other ofwbus-using platforms add ofwbus0 explicitly in nexus, like arm64. This gives them the same flexibility, e.g. if riscv starts supporting ACPI, and cleans up the #ifdefs. We were doing this already on riscv, but adjust the 'order' parameters. Reviewed by: andrew, jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38492 (cherry picked from commit 53d5e65eead0f713c5e256018d46edbec0a96c11) --- sys/arm/arm/nexus.c | 5 ++++- sys/dev/ofw/ofwbus.c | 25 ++----------------------- sys/powerpc/powerpc/nexus.c | 4 ++++ sys/riscv/riscv/nexus.c | 10 +++++++--- 4 files changed, 17 insertions(+), 27 deletions(-) diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index 3991ec91ed0d..c6c511b85fe3 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -182,8 +182,11 @@ nexus_attach(device_t dev) if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0)) panic("nexus_attach irq_rman"); + /* First, add ofwbus0. */ + device_add_child(dev, "ofwbus", 0); + /* - * First, deal with the children we know about already + * Next, deal with the children we know about already. */ bus_generic_probe(dev); bus_generic_attach(dev); diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index 4432f1704392..7660be8cec39 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -62,12 +62,10 @@ __FBSDID("$FreeBSD$"); * The ofwbus (which is a pseudo-bus actually) iterates over the nodes that * hang from the Open Firmware root node and adds them as devices to this bus * (except some special nodes which are excluded) so that drivers can be - * attached to them. + * attached to them. There should be only one ofwbus in the system, added + * directly as a child of nexus0. */ -#ifndef __aarch64__ -static device_identify_t ofwbus_identify; -#endif static device_probe_t ofwbus_probe; static device_attach_t ofwbus_attach; static bus_alloc_resource_t ofwbus_alloc_resource; @@ -75,9 +73,6 @@ static bus_release_resource_t ofwbus_release_resource; static device_method_t ofwbus_methods[] = { /* Device interface */ -#ifndef __aarch64__ - DEVMETHOD(device_identify, ofwbus_identify), -#endif DEVMETHOD(device_probe, ofwbus_probe), DEVMETHOD(device_attach, ofwbus_attach), @@ -96,28 +91,12 @@ EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(ofwbus, 1); -#ifndef __aarch64__ -static void -ofwbus_identify(driver_t *driver, device_t parent) -{ - - /* Check if Open Firmware has been instantiated */ - if (OF_peer(0) == 0) - return; - - if (device_find_child(parent, "ofwbus", -1) == NULL) - BUS_ADD_CHILD(parent, 0, "ofwbus", -1); -} -#endif - static int ofwbus_probe(device_t dev) { -#ifdef __aarch64__ if (OF_peer(0) == 0) return (ENXIO); -#endif device_set_desc(dev, "Open Firmware Device Tree"); return (BUS_PROBE_NOWILDCARD); diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c index 6edc7f258d39..78bcf6363d60 100644 --- a/sys/powerpc/powerpc/nexus.c +++ b/sys/powerpc/powerpc/nexus.c @@ -146,6 +146,10 @@ nexus_attach(device_t dev) rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR) != 0) panic("%s: failed to set up rmans.", __func__); + /* Add ofwbus0. */ + device_add_child(dev, "ofwbus", 0); + + /* Now, probe children. */ bus_generic_probe(dev); bus_generic_attach(dev); diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index 9cafb90fd34a..0333c851af2c 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -165,9 +165,13 @@ nexus_attach(device_t dev) if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0)) panic("nexus_attach irq_rman"); - nexus_add_child(dev, 8, "timer", 0); - nexus_add_child(dev, 9, "rcons", 0); - nexus_add_child(dev, 10, "ofwbus", 0); + /* + * Add direct children of nexus. Devices will be probed and attached + * through ofwbus0. + */ + nexus_add_child(dev, 0, "timer", 0); + nexus_add_child(dev, 1, "rcons", 0); + nexus_add_child(dev, 2, "ofwbus", 0); bus_generic_probe(dev); bus_generic_attach(dev); From nobody Mon Apr 17 17:04: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 4Q0YLC0vyfz44vnB; Mon, 17 Apr 2023 17:04: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 4Q0YLB4tlKz49ck; Mon, 17 Apr 2023 17:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ExgMHSTd8b1B+AnOedURCWlEN3UmVTnAL+ByrPOwDM=; b=LN6rL7z+BwoZfySw0S0LL1pw8YPvrPPbDps0nz3U33k4Q++l5wzNB0dYV1a/BaVZLYqfgo vbt3Qa0fyoxEUJC7ClCY6BWTaQE0ai9Cn2nSdhjI8P+yUMvLQq9bwhV0XrDsViveAePMr3 g5RUCztPKy0CFhouRi80wBHEmK6nFe6mMm/OBCAIPQASkVQeZpt3M39jgbbVI2kJJsA7I1 Tl79cMossQjm1SCzrwRsZCIgsgRxVp5mapU0c6QQsycwqdIfL+O8IMCe6hlnxVoFzjdxgc DEH5GDJCK9ibJllA+w1On8v/SmAFo88K0uTwxMSEGtxTbK0qhnHVMc3LODQcxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ExgMHSTd8b1B+AnOedURCWlEN3UmVTnAL+ByrPOwDM=; b=oPEyTXiVGV3Iuls6nDmHrbI9AZq88K9m0tzESyXLl9zntninz7VOXKf+I1LFvAgqGtKnsm sI/OaNw6HiP64nN7YtfFbxRqQcLrbGOS1I/hTfIkk5QL6JDy6TXrx6n+hTSlRkLZEm74KA WnHBEwwPD20BY6X35KAEq8nVXu5sYP530B4E6J66iqbvAGZkh8/chK3SVp5KhXdlnMUaIg 2jql/KFkPNX0W8fC8GGgxM+BF54MW/RZSgVxZ9lSo/Z7HaS1zCRJBbnR/IqfXAo6v/hM9q D1e3NtZyDTWcLHawPLb34RLbkTmYz3hGhRcPH8VuTmvZzZ/uzbTP/U5wX5jMKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751042; a=rsa-sha256; cv=none; b=I2yAC7vOncIqrIzS4A6GoX+7FMJoUYGVME0CflSdDz88+OLJsnyuWDn8NhpY/fAbU0iCW6 w+Kr4LwAQLOFz2AaJem+S29sLtPvPV9t9Ers0W+nBde5rjl5OTnfXrGKaN1ZXwNLKS2+jY 3z1chNCg8OOBSr5liOu0SRh/c0k3wTB38fZnC+kefZvHs9xFEfD32y1VaAa4J7oeERQcuf vYO/U3s8i6Jr4ZBc3W7QL/JAm+JEun9ap65sn6uqk7wgBfQWaT0SBan7uifPLcj+0LF6V+ El5SrToLZ75kfUBjpA19Umkw7AuHyNkfd6HcjuCr2TWqWyjzns2rRtGhCOP26A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YLB3xW8zd4d; Mon, 17 Apr 2023 17:04: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 33HH42Ce002575; Mon, 17 Apr 2023 17:04:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH42rd002574; Mon, 17 Apr 2023 17:04:02 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:04:02 GMT Message-Id: <202304171704.33HH42rd002574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 19866d1a162f - stable/13 - ofwbus: only allow unit number zero List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 19866d1a162fca492ca5a7776d209d1ea4ae565e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=19866d1a162fca492ca5a7776d209d1ea4ae565e commit 19866d1a162fca492ca5a7776d209d1ea4ae565e Author: Mitchell Horne AuthorDate: 2023-02-13 17:44:03 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:54:04 +0000 ofwbus: only allow unit number zero ofwbus has always been the root of attachment for OFW/FDT platforms. It may have simplebus children, but we expect only one instance of the ofwbus driver, added directly by nexus. We may as well ensure this remains the case. Reviewed by: jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38493 (cherry picked from commit afca197f5240ce2c2c7abfe5c9fbc50ba55f178b) --- sys/dev/ofw/ofwbus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index 7660be8cec39..c97fd41bb683 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -98,6 +98,11 @@ ofwbus_probe(device_t dev) if (OF_peer(0) == 0) return (ENXIO); + /* Only one instance of ofwbus. */ + if (device_get_unit(dev) != 0) + panic("ofwbus added with non-zero unit number: %d\n", + device_get_unit(dev)); + device_set_desc(dev, "Open Firmware Device Tree"); return (BUS_PROBE_NOWILDCARD); } From nobody Mon Apr 17 17:04: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 4Q0YLC75kfz44vss; Mon, 17 Apr 2023 17:04: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 4Q0YLC5w5Dz49jl; Mon, 17 Apr 2023 17:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XAhZj6Nwf2oxY1b7Y1CcJcxiafT2pX1sCg/zUW8P6ik=; b=xEuOhLUBmcqoFyq2oS6XxepyCwUi7r5LkZJhIE9Ml7t8OZSP5iVqLdN5QQ2rTU2BssRn8w D8Fw1s9X6cwC5jxrnNj9a5UbK7bZpAh23XngsY1e2WhE3o3CA7OKg+uECAEfaOaG/1gS5p +xXDF2RsI//sVkhSyMuR2gD26dNtabYZp2Ki8YjV28BbwrMoEbRjf/PCykyFQ8jAvG2mAk H9Hrbj/62oYgwf7AdXkigEeXgnpIr3hgyEXXrcxjIwuRgU9K4VebzHxNLR2mqr1YwLV4uk /fTb6z5uJ518ZNgZib3db4vWKoMBJGhuW1i0pM11ZLHjpgw2rDrRwXsY8sCDVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XAhZj6Nwf2oxY1b7Y1CcJcxiafT2pX1sCg/zUW8P6ik=; b=FjLXWC8T0qJWxLNdG6ZILTrkV8LZnRW7eRkJPhCwiTWH1L1kjW+qyubDDRzFXHSXdaIwFe RV5SxbyxjpRrIn7ZxEiGZzc822MCiSx+8JMkD3VF3i9y/IUcybZKEeSVp/4arQvY4PPLpW DJ+G7eh+Fn7ieNfb2P6lceY3tOLrb+11cio98RmNJb7orS45R/YHAeV//m3aHAb80AYN6c n5TxFn0XNXqEZee5L8d3w4mPxprTUldKJkUNKZud9903uGVZr0ozGB831rWpKcegQ5Xr9P tSqO6fc2lmmVkOwzbOEcwMwxLjIa++GJ/iPbapp93McJ2qKyEuHBYuIcBBclUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751043; a=rsa-sha256; cv=none; b=spVlvgnVAzW6YUDeerCW+IfukwH/DzCJDwKkUF4ERPhnqx/mQOmO64qq3TqOzXgSGPknWy cEAWLyeIBF1qHkx4oH8JlyoDUBfFcKwebUwILTjHgVE+j+PgI+2OiDQ2YArvLArZvKZJm9 GV6t8laIBQRUDoSaNp0myhcv4QQk2yAWXpDDLywS6MIRuQuLz/zAgJ3nIZzGq5XNbZNa9x ggJHHlu8mpbbjU7X7eehGaxfX/B22kB96tclKO+idmnaGRoCbDXfaxHruH8r09SkmRSly3 SyyVslm/ujCZbLPr/30vTAprH3qiatTE+vjz04KVmLP8npeHAilzgzNhM6/nYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YLC4t8Zzd00; Mon, 17 Apr 2023 17:04: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 33HH435Q002594; Mon, 17 Apr 2023 17:04:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH43fD002593; Mon, 17 Apr 2023 17:04:03 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:04:03 GMT Message-Id: <202304171704.33HH43fD002593@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 256af80ed4b3 - stable/13 - x86: nexus code tidy-up List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 256af80ed4b346fa7db412d22c3ac141722d383a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=256af80ed4b346fa7db412d22c3ac141722d383a commit 256af80ed4b346fa7db412d22c3ac141722d383a Author: Mitchell Horne AuthorDate: 2023-02-10 14:52:38 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:54:30 +0000 x86: nexus code tidy-up Make a pass at the various nexus implementations, fixing some very minor style issues, obsolete comments, etc. The method declaration section has become unwieldy in many respects. Attempt to tame it by: - Using generated method typedefs - Grouping methods roughly by category, and then alphabetically. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D38495 (cherry picked from commit 99bd5c1fe32272ce6e8d9b2d575b42dd94593b25) --- sys/x86/x86/nexus.c | 165 ++++++++++++++++++++++++---------------------------- 1 file changed, 76 insertions(+), 89 deletions(-) diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index 2ab891c728c5..fc3cdc3c24f3 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -52,16 +52,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include -#include -#include #include -#include -#include #include #include #include @@ -69,10 +66,13 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include #include #include -#include #include +#include #ifdef DEV_APIC #include "pcib_if.h" @@ -82,7 +82,6 @@ __FBSDID("$FreeBSD$"); #include #include #endif -#include #define ELF_KERN_STR ("elf"__XSTRING(__ELF_WORD_SIZE)" kernel") @@ -92,58 +91,44 @@ static MALLOC_DEFINE(M_NEXUSDEV, "nexusdev", "Nexus device"); struct rman irq_rman, drq_rman, port_rman, mem_rman; -static int nexus_probe(device_t); -static int nexus_attach(device_t); -static int nexus_print_all_resources(device_t dev); -static int nexus_print_child(device_t, device_t); -static device_t nexus_add_child(device_t bus, u_int order, const char *name, - int unit); -static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, - rman_res_t, rman_res_t, rman_res_t, - u_int); -static int nexus_adjust_resource(device_t, device_t, int, struct resource *, - rman_res_t, rman_res_t); +static int nexus_print_all_resources(device_t dev); + +static device_probe_t nexus_probe; +static device_attach_t nexus_attach; + +static bus_add_child_t nexus_add_child; +static bus_print_child_t nexus_print_child; + +static bus_activate_resource_t nexus_activate_resource; +static bus_adjust_resource_t nexus_adjust_resource; +static bus_alloc_resource_t nexus_alloc_resource; +static bus_deactivate_resource_t nexus_deactivate_resource; +static bus_delete_resource_t nexus_delete_resource; +static bus_get_resource_t nexus_get_resource; +static bus_get_resource_list_t nexus_get_reslist; +static bus_map_resource_t nexus_map_resource; +static bus_release_resource_t nexus_release_resource; +static bus_set_resource_t nexus_set_resource; +static bus_unmap_resource_t nexus_unmap_resource; + #ifdef SMP -static int nexus_bind_intr(device_t, device_t, struct resource *, int); +static bus_bind_intr_t nexus_bind_intr; #endif -static int nexus_config_intr(device_t, int, enum intr_trigger, - enum intr_polarity); -static int nexus_describe_intr(device_t dev, device_t child, - struct resource *irq, void *cookie, - const char *descr); -static int nexus_activate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_deactivate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_map_resource(device_t bus, device_t child, int type, - struct resource *r, - struct resource_map_request *argsp, - struct resource_map *map); -static int nexus_unmap_resource(device_t bus, device_t child, int type, - struct resource *r, struct resource_map *map); -static int nexus_release_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_setup_intr(device_t, device_t, struct resource *, int flags, - driver_filter_t filter, void (*)(void *), void *, - void **); -static int nexus_teardown_intr(device_t, device_t, struct resource *, - void *); -static int nexus_suspend_intr(device_t, device_t, struct resource *); -static int nexus_resume_intr(device_t, device_t, struct resource *); -static struct resource_list *nexus_get_reslist(device_t dev, device_t child); -static int nexus_set_resource(device_t, device_t, int, int, - rman_res_t, rman_res_t); -static int nexus_get_resource(device_t, device_t, int, int, - rman_res_t *, rman_res_t *); -static void nexus_delete_resource(device_t, device_t, int, int); -static int nexus_get_cpus(device_t, device_t, enum cpu_sets, size_t, - cpuset_t *); +static bus_config_intr_t nexus_config_intr; +static bus_describe_intr_t nexus_describe_intr; +static bus_resume_intr_t nexus_resume_intr; +static bus_setup_intr_t nexus_setup_intr; +static bus_suspend_intr_t nexus_suspend_intr; +static bus_teardown_intr_t nexus_teardown_intr; + +static bus_get_cpus_t nexus_get_cpus; + #if defined(DEV_APIC) && defined(DEV_PCI) -static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); -static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); -static int nexus_alloc_msix(device_t pcib, device_t dev, int *irq); -static int nexus_release_msix(device_t pcib, device_t dev, int irq); -static int nexus_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); +static pcib_alloc_msi_t nexus_alloc_msi; +static pcib_release_msi_t nexus_release_msi; +static pcib_alloc_msix_t nexus_alloc_msix; +static pcib_release_msix_t nexus_release_msix; +static pcib_map_msi_t nexus_map_msi; #endif static device_method_t nexus_methods[] = { @@ -158,26 +143,26 @@ static device_method_t nexus_methods[] = { /* Bus interface */ DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), + DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_get_resource, nexus_get_resource), + DEVMETHOD(bus_get_resource_list, nexus_get_reslist), + DEVMETHOD(bus_delete_resource, nexus_delete_resource), DEVMETHOD(bus_map_resource, nexus_map_resource), + DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_set_resource, nexus_set_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), - DEVMETHOD(bus_setup_intr, nexus_setup_intr), - DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), - DEVMETHOD(bus_suspend_intr, nexus_suspend_intr), - DEVMETHOD(bus_resume_intr, nexus_resume_intr), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_describe_intr, nexus_describe_intr), - DEVMETHOD(bus_get_resource_list, nexus_get_reslist), - DEVMETHOD(bus_set_resource, nexus_set_resource), - DEVMETHOD(bus_get_resource, nexus_get_resource), - DEVMETHOD(bus_delete_resource, nexus_delete_resource), + DEVMETHOD(bus_resume_intr, nexus_resume_intr), + DEVMETHOD(bus_setup_intr, nexus_setup_intr), + DEVMETHOD(bus_suspend_intr, nexus_suspend_intr), + DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), DEVMETHOD(bus_get_cpus, nexus_get_cpus), /* pcib interface */ @@ -188,7 +173,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(pcib_release_msix, nexus_release_msix), DEVMETHOD(pcib_map_msi, nexus_map_msi), #endif - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, 1); @@ -295,7 +280,7 @@ nexus_attach(device_t dev) if (BUS_ADD_CHILD(dev, 10, "legacy", 0) == NULL) panic("legacy: could not attach"); bus_generic_attach(dev); - return 0; + return (0); } static int @@ -312,7 +297,7 @@ nexus_print_all_resources(device_t dev) retval += resource_list_print_type(rl, "iomem", SYS_RES_MEMORY, "%#jx"); retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%jd"); - return retval; + return (retval); } static int @@ -337,7 +322,7 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) ndev = malloc(sizeof(struct nexus_device), M_NEXUSDEV, M_NOWAIT|M_ZERO); if (!ndev) - return(0); + return (0); resource_list_init(&ndev->nx_resources); child = device_add_child_ordered(bus, order, name, unit); @@ -345,7 +330,7 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) /* should we free this in nexus_child_detached? */ device_set_ivars(child, ndev); - return(child); + return (child); } static struct rman * @@ -368,7 +353,6 @@ nexus_rman(int type) /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. - * (Exceptions include npx.) */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, @@ -389,10 +373,10 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, */ if (RMAN_IS_DEFAULT_RANGE(start, end) && (count == 1)) { if (device_get_parent(child) != bus || ndev == NULL) - return(NULL); + return (NULL); rle = resource_list_find(&ndev->nx_resources, type, *rid); if (rle == NULL) - return(NULL); + return (NULL); start = rle->start; end = rle->end; count = rle->count; @@ -405,17 +389,17 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == NULL) - return 0; + return (0); rman_set_rid(rv, *rid); if (needactivate) { if (bus_activate_resource(child, type, *rid, rv)) { rman_release_resource(rv); - return 0; + return (0); } } - return rv; + return (rv); } static int @@ -557,11 +541,12 @@ static int nexus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { + int error; if (rman_get_flags(r) & RF_ACTIVE) { - int error = bus_deactivate_resource(child, type, rid, r); - if (error) - return error; + error = bus_deactivate_resource(child, type, rid, r); + if (error != 0) + return (error); } return (rman_release_resource(r)); } @@ -591,7 +576,7 @@ nexus_setup_intr(device_t bus, device_t child, struct resource *irq, * We depend here on rman_activate_resource() being idempotent. */ error = rman_activate_resource(irq); - if (error) + if (error != 0) return (error); if (bus_get_domain(child, &domain) != 0) domain = 0; @@ -667,7 +652,7 @@ nexus_set_resource(device_t dev, device_t child, int type, int rid, /* XXX this should return a success/failure indicator */ resource_list_add(rl, type, rid, start, start + count - 1, count); - return(0); + return (0); } static int @@ -680,12 +665,12 @@ nexus_get_resource(device_t dev, device_t child, int type, int rid, rle = resource_list_find(rl, type, rid); if (!rle) - return(ENOENT); + return (ENOENT); if (startp) *startp = rle->start; if (countp) *countp = rle->count; - return(0); + return (0); } static void @@ -795,7 +780,7 @@ ram_attach(device_t dev) /* Retrieve the system memory map from the loader. */ kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) - kmdp = preload_search_by_type(ELF_KERN_STR); + kmdp = preload_search_by_type(ELF_KERN_STR); smapbase = (struct bios_smap *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_SMAP); if (smapbase != NULL) { @@ -858,7 +843,8 @@ static device_method_t ram_methods[] = { DEVMETHOD(device_identify, ram_identify), DEVMETHOD(device_probe, ram_probe), DEVMETHOD(device_attach, ram_attach), - { 0, 0 } + + DEVMETHOD_END }; static driver_t ram_driver = { @@ -890,13 +876,13 @@ sysresource_probe(device_t dev) if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, sysresource_ids)) <= 0) { device_quiet(dev); } - return(result); + return (result); } static int sysresource_attach(device_t dev) { - return(0); + return (0); } static device_method_t sysresource_methods[] = { @@ -907,7 +893,8 @@ static device_method_t sysresource_methods[] = { DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), - { 0, 0 } + + DEVMETHOD_END }; static driver_t sysresource_driver = { From nobody Mon Apr 17 17:04:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0YLF09Qvz44vWY; Mon, 17 Apr 2023 17:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0YLD6p0hz49XK; Mon, 17 Apr 2023 17:04:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xR3WcjUdPzZ86Ed9ysR+jA3dVBineZGUdlovx/X2hxU=; b=LPbA0F7KUj6kkNGtsPF43w5OpdCCYJMNun88BXdFl9o7Y4eQb/UIqW9VX9rU/CsUmQMHEc lFIycYr+CQuLu7evGGaIyNvZp9Cee62kZMd+0c9Pcf3lLI5znk6jxc0o0Cj+vMX+7E+Dve OeeXwnt9g1IlqC9E40HWVoCjPYxsj8NNRTypbf68fGV3kANgFSn6SzHbZVXWGHh33c3N22 x9hayoQ41nmn2r/FPP5k/SVUSsj3EQ2FkRjL0XYt0orvrAYQDgnb+jMZN5NTiDCgu8BWy0 iXEL/7yVvyLN5Zjo7I8YMV8ObYi2xA4zjTo5zVa4QRfNkz8o+hRq5bb0m+mAKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xR3WcjUdPzZ86Ed9ysR+jA3dVBineZGUdlovx/X2hxU=; b=aMIZNAGFh0/WtpewO92DbHlnBR8lNJnTymGDo+Jklo26GdlLEBsII3FRNwCzR8FdAtMp77 Yw06sewXVzWjmAbHHgF9ck3LjXBZVxXnXEP+WZBRYXK+xrYWqNUmE/oK15s4Ymb/BIfyXc C0P7qgzzwDgf+BjIjlVHvoee+zDcc2y69EoazGA5sV9pfGbdn9wHPQELFU79XXnAR5dTFh DfstOLGR5anJFjrw3/hiuUExGLegm5H1QXZHRhY2ZZVr8ccf/Bh2KqbAxMC/TjwEOFXBQO WfW92I9jGuVtKtKyt7l6WqDL9n7ZGN670Qi+0Q875x7fmkCvVbqkvIZsyiN3tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751045; a=rsa-sha256; cv=none; b=rHNwwBxas6Kc9wzburxBU8IK3tyjMVdaciGQMZ3icKyqr68VcwYkz25pHH/jmmHaMgUnzr cTd92oTV5wVzgtif0aVE0tMfTY5KQ7fnkSs8bRmtB8EFYIRB0BTt89Y1Q3EcZ2JpqsnWHC gVPuS17Fp7TuyHxTRobD4JNbnYPTBOsqN7iFq/rX8TeHiMQE2jw5Q4u7coUwGheEzGTNx7 Tda9ByvH8J3Vimuw4Y73Jx0R3gdhA4+wtx4iu0nKVAZ75SNXh5i095j9ppCL0Clzhdc/cT 94uqL02XYII9mGopXUrDbdBQqnDp0Wrf4/Nb9d5cuT0v54xQhesyDfqpxemudg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YLD5rWhzd4f; Mon, 17 Apr 2023 17:04: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 33HH44uC002613; Mon, 17 Apr 2023 17:04:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH44cm002612; Mon, 17 Apr 2023 17:04:04 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:04:04 GMT Message-Id: <202304171704.33HH44cm002612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: c75d7f769541 - stable/13 - riscv: nexus code tidy-up List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c75d7f769541a06a57f84780149a3d599f0ac802 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c75d7f769541a06a57f84780149a3d599f0ac802 commit c75d7f769541a06a57f84780149a3d599f0ac802 Author: Mitchell Horne AuthorDate: 2023-02-06 15:53:09 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:57:35 +0000 riscv: nexus code tidy-up Make a pass at the various nexus implementations, fixing some very minor style issues, obsolete comments, etc. The method declaration section has become unwieldy in many respects. Attempt to tame it by: - Using generated method typedefs - Grouping methods roughly by category, and then alphabetically. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D38495 (cherry picked from commit abe3309e71b94527e937f034dd81ca7d6afdeb67) --- sys/riscv/riscv/nexus.c | 89 ++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 49 deletions(-) diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index 0333c851af2c..38c11b13aff6 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -76,36 +76,28 @@ struct nexus_device { static struct rman mem_rman; static struct rman irq_rman; -static device_probe_t nexus_fdt_probe; -static int nexus_attach(device_t); - -static int nexus_print_child(device_t, device_t); -static device_t nexus_add_child(device_t, u_int, const char *, int); -static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, - rman_res_t, rman_res_t, rman_res_t, u_int); -static int nexus_activate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_adjust_resource(device_t, device_t, int, struct resource *, - rman_res_t, rman_res_t); -static int nexus_map_resource(device_t, device_t, int, struct resource *, - struct resource_map_request *, struct resource_map *); -static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, - enum intr_polarity pol); -static struct resource_list *nexus_get_reslist(device_t, device_t); -static int nexus_set_resource(device_t, device_t, int, int, - rman_res_t, rman_res_t); -static int nexus_deactivate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_release_resource(device_t, device_t, int, int, - struct resource *); - -static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, - int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); -static bus_space_tag_t nexus_get_bus_tag(device_t, device_t); - -static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, - int icells, pcell_t *intr); +static device_probe_t nexus_fdt_probe; +static device_attach_t nexus_attach; + +static bus_add_child_t nexus_add_child; +static bus_print_child_t nexus_print_child; + +static bus_activate_resource_t nexus_activate_resource; +static bus_adjust_resource_t nexus_adjust_resource; +static bus_alloc_resource_t nexus_alloc_resource; +static bus_deactivate_resource_t nexus_deactivate_resource; +static bus_get_resource_list_t nexus_get_reslist; +static bus_map_resource_t nexus_map_resource; +static bus_set_resource_t nexus_set_resource; +static bus_release_resource_t nexus_release_resource; + +static bus_config_intr_t nexus_config_intr; +static bus_setup_intr_t nexus_setup_intr; +static bus_teardown_intr_t nexus_teardown_intr; + +static bus_get_bus_tag_t nexus_get_bus_tag; + +static ofw_bus_map_intr_t nexus_ofw_map_intr; static device_method_t nexus_methods[] = { /* Device interface */ @@ -116,21 +108,22 @@ static device_method_t nexus_methods[] = { DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), /* Bus interface */ - DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_print_child, nexus_print_child), + DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), - DEVMETHOD(bus_map_resource, nexus_map_resource), - DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), + DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_set_resource, nexus_set_resource), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_config_intr, nexus_config_intr), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag), - { 0, 0 } + + DEVMETHOD_END }; static driver_t nexus_fdt_driver = { @@ -139,6 +132,11 @@ static driver_t nexus_fdt_driver = { 1 /* no softc */ }; +static devclass_t nexus_fdt_devclass; + +EARLY_DRIVER_MODULE(nexus_fdt, root, nexus_fdt_driver, nexus_fdt_devclass, + 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST); + static int nexus_fdt_probe(device_t dev) { @@ -203,7 +201,6 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) child = device_add_child_ordered(bus, order, name, unit); - /* should we free this in nexus_child_detached? */ device_set_ivars(child, ndev); return (child); @@ -212,7 +209,6 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. - * (Exceptions include footbridge.) */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, @@ -232,10 +228,10 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, */ if (RMAN_IS_DEFAULT_RANGE(start, end) && (count == 1)) { if (device_get_parent(child) != bus || ndev == NULL) - return(NULL); + return (NULL); rle = resource_list_find(&ndev->nx_resources, type, *rid); if (rle == NULL) - return(NULL); + return (NULL); start = rle->start; end = rle->end; count = rle->count; @@ -301,7 +297,7 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid, if (rman_get_flags(res) & RF_ACTIVE) { error = bus_deactivate_resource(child, type, rid, res); - if (error) + if (error != 0) return (error); } return (rman_release_resource(res)); @@ -326,7 +322,7 @@ nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, /* We depend here on rman_activate_resource() being idempotent. */ error = rman_activate_resource(res); - if (error) + if (error != 0) return (error); error = intr_setup_irq(child, res, filt, intr, arg, flags, cookiep); @@ -403,7 +399,7 @@ nexus_set_resource(device_t dev, device_t child, int type, int rid, /* XXX this should return a success/failure indicator */ resource_list_add(rl, type, rid, start, start + count - 1, count); - return(0); + return (0); } static int @@ -474,11 +470,6 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, return (0); } -static devclass_t nexus_fdt_devclass; - -EARLY_DRIVER_MODULE(nexus_fdt, root, nexus_fdt_driver, nexus_fdt_devclass, - 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_FIRST); - static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, pcell_t *intr) From nobody Mon Apr 17 17:04: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 4Q0YLG28NTz44vnJ; Mon, 17 Apr 2023 17:04: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 4Q0YLG0rL9z49kw; Mon, 17 Apr 2023 17:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zPCXc7xz+KrQK2DZ4gyU5mTGVoS1LswA2A0DvRtSIc=; b=lGCu9VRLFVXxIvmL7vMCIf7o7szBNz06+Yua4HD8EoQ+D5RtNK0oCzdjkwnumoNdZP8kmU 2wL8GvMnafrExghyMmRuT42t4p9N18y2DpKLXrOOhpDsIvVPUV7C2uZt0m/71T16Oy5MSU vbLnor9/CPonwM0clX9d6JL2XM73vZpkLqJmc41Sm3YBNUjaGdJi2fNyKJ1wzupL995BsQ W9jwHq00yUPTNJ+XzPfvVMgf90/9FVRnxRGbHHXzA8p2leDRk98+Fijcjr/bAyOd3AODmo G32Xwiaw2DPLeijH5fP++yiaz3R86+32VWpHLyjpVQJ1FZupw0qQpog69rD8+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zPCXc7xz+KrQK2DZ4gyU5mTGVoS1LswA2A0DvRtSIc=; b=HTnvhY4neIXsaJJbeZ72yJiJw4SaWNW02v+BxewDDC3uI0zOKd+y+SRtu3ANm+5Dmh4eWg WsQwIM+MgTeUmC83rVjTQA95VyLzbA+8/U48M/cnMpVmeJ8iU9DUjO7EpnDjofxxUteR1c ddxlHnDHp/uFWM4s22wvVHXbhCIO7jxSOB7GSYFGjdgC5IEByN2zFBAkgR/Q35NQ5e8rBW t67+ZQf28VLxz/OVQ1OVMF87ztN8CJKyQBbn1t6riXZ8+LswyBjDJP+NCtFV0PSLYvoVXG CmaIBMmmqkGNo4K3igBu0ZotIwJaR5abeAv+Eyh5Mst++vXc1mTkGsWiZejxkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751046; a=rsa-sha256; cv=none; b=W8oSoYJrDqfYtynh9qfu7tZC6lCdqC2/KNxVlWyS08RqSK2hlnLlOMzB4txt2YxIxM6MAa ytNb7VJ2w6rqW8h+rEdm+0Wc1+aMwK8O5rggzLa3iA+Fw7X3+RZR90GHhD5ljlYfLbqDS4 0GEbvJ8imONZj9CWsJZ2S+kOYcaBIS4QcXozYREm/p0AWtdKtG6LgZVRZYgD4nt4RA9X6G J2euhUrvbZn3JzMf2qa4msi/DvN2YcCHSj47O5J8NnK2CDFcQzRV+4pzvHZLr7oDf1oVv/ qOomQImmzBFfzWhepDXZiNoQJ2FJJs1v7lcNaVB1GKujiaSJt0Jk2ZbUk+XM8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YLF6fd3zd7X; Mon, 17 Apr 2023 17:04:05 +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 33HH45sh002632; Mon, 17 Apr 2023 17:04:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH45TD002631; Mon, 17 Apr 2023 17:04:05 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:04:05 GMT Message-Id: <202304171704.33HH45TD002631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: d3d739ffa7a5 - stable/13 - powerpc: nexus code tidy-up List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d3d739ffa7a53530ad81b4c242b9e12743bc8d99 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d3d739ffa7a53530ad81b4c242b9e12743bc8d99 commit d3d739ffa7a53530ad81b4c242b9e12743bc8d99 Author: Mitchell Horne AuthorDate: 2023-02-10 14:37:08 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:57:55 +0000 powerpc: nexus code tidy-up Make a pass at the various nexus implementations, fixing some very minor style issues, obsolete comments, etc. Update the top-level comment to be closer to other nexus implementations. The method declaration section has become unwieldy in many respects. Attempt to tame it by: - Using generated method typedefs - Grouping methods roughly by category, and then alphabetically. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D38495 (cherry picked from commit c514686aa06a08a97df051a75da9ea7964a74fb0) --- sys/powerpc/powerpc/nexus.c | 76 ++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c index 78bcf6363d60..baca759b2071 100644 --- a/sys/powerpc/powerpc/nexus.c +++ b/sys/powerpc/powerpc/nexus.c @@ -32,62 +32,62 @@ * from: FreeBSD: src/sys/i386/i386/nexus.c,v 1.43 2001/02/09 */ +/* + * This code implements a `root nexus' for Power ISA Architecture + * machines. The function of the root nexus is to serve as an + * attachment point for both processors and buses, and to manage + * resources which are common to all of them. In particular, + * this code implements the core resource managers for interrupt + * requests and I/O memory address space. + */ + #include __FBSDID("$FreeBSD$"); -#include #include #include #include -#include #include #include #include -#include #include -#include #include #include -#include -#include -#include - #include +#include #include #include -/* - * The nexus handles root-level resource allocation requests and interrupt - * mapping. All direct subdevices of nexus are attached by DEVICE_IDENTIFY(). - */ +#include +#include +#include static struct rman intr_rman; static struct rman mem_rman; -static device_probe_t nexus_probe; -static device_attach_t nexus_attach; -static bus_setup_intr_t nexus_setup_intr; -static bus_teardown_intr_t nexus_teardown_intr; -static bus_alloc_resource_t nexus_alloc_resource; -static bus_activate_resource_t nexus_activate_resource; +static device_probe_t nexus_probe; +static device_attach_t nexus_attach; + +static bus_activate_resource_t nexus_activate_resource; +static bus_adjust_resource_t nexus_adjust_resource; +static bus_alloc_resource_t nexus_alloc_resource; static bus_deactivate_resource_t nexus_deactivate_resource; -static bus_adjust_resource_t nexus_adjust_resource; -static bus_release_resource_t nexus_release_resource; -static int nexus_map_resource(device_t bus, device_t child, int type, - struct resource *r, - struct resource_map_request *argsp, - struct resource_map *map); -static int nexus_unmap_resource(device_t bus, device_t child, int type, - struct resource *r, struct resource_map *map); - -static bus_space_tag_t nexus_get_bus_tag(device_t, device_t); +static bus_map_resource_t nexus_map_resource; +static bus_release_resource_t nexus_release_resource; +static bus_unmap_resource_t nexus_unmap_resource; + #ifdef SMP -static bus_bind_intr_t nexus_bind_intr; +static bus_bind_intr_t nexus_bind_intr; #endif -static bus_config_intr_t nexus_config_intr; -static ofw_bus_map_intr_t nexus_ofw_map_intr; +static bus_config_intr_t nexus_config_intr; +static bus_setup_intr_t nexus_setup_intr; +static bus_teardown_intr_t nexus_teardown_intr; + +static bus_get_bus_tag_t nexus_get_bus_tag; + +static ofw_bus_map_intr_t nexus_ofw_map_intr; static device_method_t nexus_methods[] = { /* Device interface */ @@ -96,19 +96,19 @@ static device_method_t nexus_methods[] = { /* Bus interface */ DEVMETHOD(bus_add_child, bus_generic_add_child), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_activate_resource, nexus_activate_resource), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_map_resource, nexus_map_resource), + DEVMETHOD(bus_release_resource, nexus_release_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), - DEVMETHOD(bus_setup_intr, nexus_setup_intr), - DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_setup_intr, nexus_setup_intr), + DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag), /* ofw_bus interface */ @@ -225,7 +225,7 @@ nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, { return (powerpc_config_intr(irq, trig, pol)); -} +} static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, From nobody Mon Apr 17 17:04: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 4Q0YLH4BGMz44vSx; Mon, 17 Apr 2023 17:04: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 4Q0YLH1f6mz49Y5; Mon, 17 Apr 2023 17:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ypttONUs3Y+1V2VcFpLS3+TqFPTsd0fCzgd8eyfmBBE=; b=S+OZg2oHzXH3qXYvIyuFoDb1+C3uuE6JVj81jYwQCpQtPEtOLGNgNhDWcIlRGuboEPJEa3 K+42zeJDnCraExi+SRS5mLYYdYrQdjSQ23CE2zjxfAr0SL97btTiSVaGpdNmfCDwN1+N3v JtX4iEicqhRaxvoXfojXnxY3lXYr4H77VJeNGaSnIBTkcJ8yidBN/6m4IvSrZRElKqPfXe p2Y4gs+J4i1bIoaS4wNpFYIGVSyywuc3JhLyHb173CXuXLtidkxvQE47UU1RqPlhjmh4Jz 7r4eHzTBEUZf8jSEjmzQ2tuMHCYetgx+9N0rRr5Z6xLbaKM0yP8K+FgKQE1O+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ypttONUs3Y+1V2VcFpLS3+TqFPTsd0fCzgd8eyfmBBE=; b=QQEu2AtKzNoy27iYUcR6trdiKOI8cEXiRk17/l1bTPOvFebAQXWcJPF4KK2ncVCHXkV2hy /cQoOu1Wjnxz04+eTW0/odeiL29jdAve6wFVoKCVZIb6T6FzG2SYcZ4aLzfoMTzDW9SjUy 7fggLsxUJLVsi5C5ZFiFjrdIBdQNltvlt1JtU6yA6W8P4g9zxP3dNgA6mToyo7aeT/ASlZ l5u69y26outABmbElL1MsSTGDZfoNG108AfwBqJw9yQgE2eEvdcJxXhwo3avTBXegFuten IVdFUxQhEZZiNFMf19TgNPDqasZ46lQu6QfVcWb9d7dWPOErPm34+i5RHqdmRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751047; a=rsa-sha256; cv=none; b=OO1Sregv/6CABaoL+O69Y2toM3/INgGCeEmdgrg6q1Li5syAA9N4lNo4tY1FpOePmlMfyx +p+XMABG6sAnqm9L8iWA/vopMjVII3IbGV2swTkRIhDdzcdwrRjE3wfkhMo+wv/4Fnb1kB Djg0QHioUvTGzUZbsi/Tcjzed6hfEryIullVPchKbouSxJPkUD5Wavo9A7qsqOgjApux3Y sCSEEHCQdqg4rucNGnpfuXnucGWP8I6A/jAANMLGXxxkEvZLjqH8hmrT/dSA1nr7yZ/fUx bCDkvPGnkBQ0CNUbrFMiuJlC7USZk3rKDGOu5qfPTaAL2K02H6XZRzwzkh7GNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YLH0lyRzd9W; Mon, 17 Apr 2023 17:04: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 33HH477G002657; Mon, 17 Apr 2023 17:04:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH47Qk002656; Mon, 17 Apr 2023 17:04:07 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:04:07 GMT Message-Id: <202304171704.33HH47Qk002656@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: e0d675cf5cdf - stable/13 - arm: nexus code tidy-up List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e0d675cf5cdf1438ce6d525ac7d618e1f2a30231 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e0d675cf5cdf1438ce6d525ac7d618e1f2a30231 commit e0d675cf5cdf1438ce6d525ac7d618e1f2a30231 Author: Mitchell Horne AuthorDate: 2023-02-06 15:57:33 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:57:55 +0000 arm: nexus code tidy-up Make a pass at the various nexus implementations, fixing some very minor style issues, obsolete comments, etc. The method declaration section has become unwieldy in many respects. Attempt to tame it by: - Using generated method typedefs - Grouping methods roughly by category, and then alphabetically. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D38495 (cherry picked from commit c650e1949558c1993d7486859ad9804fd582129e) --- sys/arm/arm/nexus.c | 90 +++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 48 deletions(-) diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index c6c511b85fe3..d0894f3823ef 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -45,20 +45,20 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include -#include #include -#include -#include -#include #include #include -#include +#include +#include #include +#include +#include #include @@ -79,37 +79,31 @@ struct nexus_device { static struct rman mem_rman; static struct rman irq_rman; -static int nexus_probe(device_t); -static int nexus_attach(device_t); -static int nexus_print_child(device_t, device_t); -static device_t nexus_add_child(device_t, u_int, const char *, int); -static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, - rman_res_t, rman_res_t, rman_res_t, u_int); -static int nexus_activate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_adjust_resource(device_t, device_t, int, struct resource *, - rman_res_t, rman_res_t); -static bus_space_tag_t nexus_get_bus_tag(device_t, device_t); -static bus_dma_tag_t nexus_get_dma_tag(device_t dev, device_t child); +static device_probe_t nexus_probe; +static device_attach_t nexus_attach; + +static bus_add_child_t nexus_add_child; +static bus_print_child_t nexus_print_child; + +static bus_activate_resource_t nexus_activate_resource; +static bus_adjust_resource_t nexus_adjust_resource; +static bus_alloc_resource_t nexus_alloc_resource; +static bus_deactivate_resource_t nexus_deactivate_resource; +static bus_release_resource_t nexus_release_resource; + #ifdef SMP -static int nexus_bind_intr(device_t, device_t, struct resource *, int); +static bus_bind_intr_t nexus_bind_intr; #endif -static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, - enum intr_polarity pol); -static int nexus_describe_intr(device_t dev, device_t child, - struct resource *irq, void *cookie, const char *descr); -static int nexus_deactivate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_release_resource(device_t, device_t, int, int, - struct resource *); - -static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, - int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); +static bus_config_intr_t nexus_config_intr; +static bus_describe_intr_t nexus_describe_intr; +static bus_setup_intr_t nexus_setup_intr; +static bus_teardown_intr_t nexus_teardown_intr; + +static bus_get_bus_tag_t nexus_get_bus_tag; +static bus_get_dma_tag_t nexus_get_dma_tag; #ifdef FDT -static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, - int icells, pcell_t *intr); +static ofw_bus_map_intr_t nexus_ofw_map_intr; #endif /* @@ -123,27 +117,29 @@ static device_method_t nexus_methods[] = { /* Device interface */ DEVMETHOD(device_probe, nexus_probe), DEVMETHOD(device_attach, nexus_attach), + /* Bus interface */ - DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_print_child, nexus_print_child), + DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), - DEVMETHOD(bus_config_intr, nexus_config_intr), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), +#ifdef SMP + DEVMETHOD(bus_bind_intr, nexus_bind_intr), +#endif + DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_describe_intr, nexus_describe_intr), DEVMETHOD(bus_setup_intr, nexus_setup_intr), DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag), DEVMETHOD(bus_get_dma_tag, nexus_get_dma_tag), - DEVMETHOD(bus_describe_intr, nexus_describe_intr), -#ifdef SMP - DEVMETHOD(bus_bind_intr, nexus_bind_intr), -#endif #ifdef FDT + /* ofw_bus interface */ DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), #endif - { 0, 0 } + DEVMETHOD_END }; static devclass_t nexus_devclass; @@ -218,7 +214,6 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) child = device_add_child_ordered(bus, order, name, unit); - /* should we free this in nexus_child_detached? */ device_set_ivars(child, ndev); return (child); @@ -227,7 +222,6 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. - * (Exceptions include footbridge.) */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, @@ -309,9 +303,9 @@ nexus_get_bus_tag(device_t bus __unused, device_t child __unused) { #ifdef FDT - return(fdtbus_bs_tag); + return (fdtbus_bs_tag); #else - return((void *)1); + return ((void *)1); #endif } @@ -319,7 +313,7 @@ static bus_dma_tag_t nexus_get_dma_tag(device_t dev, device_t child) { - return nexus_dma_tag; + return (nexus_dma_tag); } void @@ -348,7 +342,7 @@ nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, if ((rman_get_flags(res) & RF_SHAREABLE) == 0) flags |= INTR_EXCL; - return(intr_setup_irq(child, res, filt, intr, arg, flags, cookiep)); + return (intr_setup_irq(child, res, filt, intr, arg, flags, cookiep)); } static int From nobody Mon Apr 17 17:04: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 4Q0YLJ3Gdzz44vt4; Mon, 17 Apr 2023 17:04: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 4Q0YLJ2V3hz49YH; Mon, 17 Apr 2023 17:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/fFbDkvtnYvTGoRxS5C2u1QqpvK14Ol7btScAQ4La/o=; b=eOarPNs3uzn5XbEz+DfOViJxbUt1H5M+IQ611+Kz4j9w0hF1WN5BdyTp7y9HEn/hMqVCg/ OACwctS0DWZo5YiDkf6YouXVzDiM2IvyAKelCYaGsM9bPu+r64g5o4EQqGmmJMUBL10d/W Vu0DGlHz5UGab3WTZ+cgBeGTKqZkrbiX/4uaU6Km0PJP84af/dWQc9r7S64V+GFRjuerdw 7Fh6VWJcPNcFVK5z4vAjrg5QTLK52OCmha6Eca+CzTHCY/JlHNZE3pC/5TWItu1AfstJ8F MmWmaR3cT1GIWiMgUYPZgkTY1n0o5BT930sf+MmAPVWCeOqZPgfV2ViE36ezDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681751048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/fFbDkvtnYvTGoRxS5C2u1QqpvK14Ol7btScAQ4La/o=; b=XUWsR50pwkOEG2zmhXj+ZYNywRY14DqIikk2R2cNmSLntE6eCDzxfJSTO8V0TXTwPk2l5x 3Cf/34AczP9wUwwpg9DNi6Wvo0zJiDB5a0rsmMlj4EECVMANNGuz3N2imz33WeEIsgP0Fr sffMNCjxiR7k/3xDu0WeGZHxmqUVNNVA1UEcps+BymrISCbDM0ekhYWUqgQIKBDhqmKvlz 2P9N4HayljOBtbCdp1rgIyv8zchhz2wcapQpxIC/BkCd64NANl61dS9Cnpk5ABrBxqeVtJ PQanssopW9roUYqkJLP5s4s672Sn7m4qZKsha/nR8ruvBY68u/VELILGhUdTng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681751048; a=rsa-sha256; cv=none; b=r6F64Frs/yvnlaZuajsYYn6FwN+pPSaOLZ/9/YdidO4k/vK1N2W5YknDRF/4Suc51Ix4qq 6IB3oumhecbOkO0BEWCUNEJDHrIUfNFDbyZ1iOcMltYtQ/3QHsvrf07N3Z0tBdd8W7PA9Y AORG45Hzi4qvfgDo2YLAWGks729y7ijSeBCE2E2S6p88b6TtGsQOtO6YbU8BTrpk1AI8cf qluoR4jxAxQl7skVImSbX49p4yizjpQBS8Pg4cclBkX2QAozrvOYMvz3BJxmD+qhIyvvMo bZ+2tGR5QEzB3pg8i7DqqW8LTe5cvmQ1w/jzsgyyo+htr/+AfBoJ/J2gxjf/cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0YLJ1Y6hzd7Y; Mon, 17 Apr 2023 17:04: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 33HH48xP002679; Mon, 17 Apr 2023 17:04:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HH48rh002678; Mon, 17 Apr 2023 17:04:08 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:04:08 GMT Message-Id: <202304171704.33HH48rh002678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: 08e65a6bf425 - stable/13 - arm64: nexus code tidy-up List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 08e65a6bf4255f7f399dfa34de02ec04e77af554 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=08e65a6bf4255f7f399dfa34de02ec04e77af554 commit 08e65a6bf4255f7f399dfa34de02ec04e77af554 Author: Mitchell Horne AuthorDate: 2023-02-10 14:26:53 +0000 Commit: Mitchell Horne CommitDate: 2023-04-17 16:59:15 +0000 arm64: nexus code tidy-up Make a pass at the various nexus implementations, fixing some very minor style issues, obsolete comments, etc. The method declaration section has become unwieldy in many respects. Attempt to tame it by: - Using generated method typedefs - Grouping methods roughly by category, and then alphabetically. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D38495 (cherry picked from commit e582d4a2b09e679baae457b50c7270b4a9f501bf) --- sys/arm64/arm64/nexus.c | 96 +++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 52 deletions(-) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 350ad9d1be76..bc7e8e881dab 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -46,21 +46,21 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include -#include #include -#include -#include -#include -#include #include #include -#include +#include #include +#include +#include +#include +#include #ifdef FDT #include @@ -71,7 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include #include "acpi_bus_if.h" -#include "pcib_if.h" #endif extern struct bus_space memmap_bus; @@ -94,63 +93,57 @@ static device_probe_t nexus_fdt_probe; static device_attach_t nexus_fdt_attach; #endif #ifdef DEV_ACPI -static device_probe_t nexus_acpi_probe; -static device_attach_t nexus_acpi_attach; +static device_probe_t nexus_acpi_probe; +static device_attach_t nexus_acpi_attach; #endif -static int nexus_print_child(device_t, device_t); -static device_t nexus_add_child(device_t, u_int, const char *, int); -static struct resource *nexus_alloc_resource(device_t, device_t, int, int *, - rman_res_t, rman_res_t, rman_res_t, u_int); -static int nexus_activate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_adjust_resource(device_t, device_t, int, struct resource *, - rman_res_t, rman_res_t); -static int nexus_map_resource(device_t, device_t, int, struct resource *, - struct resource_map_request *, struct resource_map *); -static int nexus_config_intr(device_t dev, int irq, enum intr_trigger trig, - enum intr_polarity pol); -static struct resource_list *nexus_get_reslist(device_t, device_t); -static int nexus_set_resource(device_t, device_t, int, int, - rman_res_t, rman_res_t); -static int nexus_deactivate_resource(device_t, device_t, int, int, - struct resource *); -static int nexus_release_resource(device_t, device_t, int, int, - struct resource *); - -static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, - int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); -static bus_space_tag_t nexus_get_bus_tag(device_t, device_t); +static bus_add_child_t nexus_add_child; +static bus_print_child_t nexus_print_child; + +static bus_activate_resource_t nexus_activate_resource; +static bus_adjust_resource_t nexus_adjust_resource; +static bus_alloc_resource_t nexus_alloc_resource; +static bus_deactivate_resource_t nexus_deactivate_resource; +static bus_get_resource_list_t nexus_get_reslist; +static bus_map_resource_t nexus_map_resource; +static bus_release_resource_t nexus_release_resource; +static bus_set_resource_t nexus_set_resource; + #ifdef SMP -static int nexus_bind_intr(device_t, device_t, struct resource *, int); +static bus_bind_intr_t nexus_bind_intr; #endif +static bus_config_intr_t nexus_config_intr; +static bus_describe_intr_t nexus_describe_intr; +static bus_setup_intr_t nexus_setup_intr; +static bus_teardown_intr_t nexus_teardown_intr; + +static bus_get_bus_tag_t nexus_get_bus_tag; #ifdef FDT -static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, - int icells, pcell_t *intr); +static ofw_bus_map_intr_t nexus_ofw_map_intr; #endif static device_method_t nexus_methods[] = { /* Bus interface */ - DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_add_child, nexus_add_child), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_activate_resource, nexus_activate_resource), + DEVMETHOD(bus_print_child, nexus_print_child), + DEVMETHOD(bus_activate_resource, nexus_activate_resource), DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), - DEVMETHOD(bus_map_resource, nexus_map_resource), - DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), + DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), DEVMETHOD(bus_get_resource_list, nexus_get_reslist), - DEVMETHOD(bus_set_resource, nexus_set_resource), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_map_resource, nexus_map_resource), DEVMETHOD(bus_release_resource, nexus_release_resource), - DEVMETHOD(bus_setup_intr, nexus_setup_intr), - DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), - DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag), + DEVMETHOD(bus_set_resource, nexus_set_resource), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif - { 0, 0 } + DEVMETHOD(bus_config_intr, nexus_config_intr), + DEVMETHOD(bus_setup_intr, nexus_setup_intr), + DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), + DEVMETHOD(bus_get_bus_tag, nexus_get_bus_tag), + + DEVMETHOD_END }; static driver_t nexus_driver = { @@ -216,7 +209,6 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) /* * Allocate a resource on behalf of child. NB: child is usually going to be a * child of one of our descendants, not a direct child of nexus0. - * (Exceptions include footbridge.) */ static struct resource * nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, @@ -236,10 +228,10 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, */ if (RMAN_IS_DEFAULT_RANGE(start, end) && (count == 1)) { if (device_get_parent(child) != bus || ndev == NULL) - return(NULL); + return (NULL); rle = resource_list_find(&ndev->nx_resources, type, *rid); if (rle == NULL) - return(NULL); + return (NULL); start = rle->start; end = rle->end; count = rle->count; @@ -362,7 +354,7 @@ static bus_space_tag_t nexus_get_bus_tag(device_t bus __unused, device_t child __unused) { - return(&memmap_bus); + return (&memmap_bus); } static int @@ -420,7 +412,7 @@ nexus_set_resource(device_t dev, device_t child, int type, int rid, /* XXX this should return a success/failure indicator */ resource_list_add(rl, type, rid, start, start + count - 1, count); - return(0); + return (0); } static int From nobody Mon Apr 17 17:14: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 4Q0YZH4SBCz44wZy; Mon, 17 Apr 2023 17:14:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) (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 4Q0YZH3rnqz3Dq2; Mon, 17 Apr 2023 17:14:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-187b51ed66fso11081751fac.6; Mon, 17 Apr 2023 10:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681751670; x=1684343670; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Lju+TpXOs5VZPBlUH/Vi27wH+5uDodziFQGE9qqjL3A=; b=fV5ESzrhubbR9F1FnneRJC0TbpUQDOmcaq0wQ/94SMK9mKYqksi7Bxab3QcSl7/rLT KLM2bJ+FvatmHJPAousgxwWt5eVJPDJDugY5KWVb0M1rsEkQsEacZxDUbk0anGtywf7p RVCvvo/6nrDYNHTBcZxYfLUFrD743YeHt1mu/VGzPysqxFgUOfDJgIluvN/0+tXAvukU 8I1QD11zei7YzUYyXOLY1SQYojmgaZNXTrgoHwGDbOW8lWLQlQ12wPfAp71+GycOogwY nFS4NwlwWzIYB+YpbfBbt7ZBoz9gSJ6a0pgWF005Es+peV4iBSSc8jyB1GvGOGN6MbrF OAgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681751670; x=1684343670; 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=Lju+TpXOs5VZPBlUH/Vi27wH+5uDodziFQGE9qqjL3A=; b=ipLGUVM6JQ1gS2O0FR8ugkGvxyoJNERIgdUO8VERqA7+VHztqX84O5nBnj+FiiJ6td QQZ3swIVG8pH1SBEXX1NvIYLfUdBjjseUHkc6YB3JhBAyAGUhOhYT01DcLrNNEsOh5dH MIjXBGs//pmZ7ct/k0SLbSN0ZVWOZuwpgWsyDPC/D+tJRXxXRI9ck7fIGKkMRH9xwm5X pBfRkLvdHvSQjPAllUbb/jZ4MIl6apVwiCxeOm9PBxdOVnZhi45sxaqRQjFTdoqPaniQ GbliUSlCNUs3gSVzv0vDLnTb3TRrm103ncbVgRmLJoEeb5RmpUVoscKcQTp+74Ao4y9B LRzA== X-Gm-Message-State: AAQBX9cZf8Es0Yoq//deh+SfqnDUBf8Vm8eybHGonZfg6+MLWRJGX/BR tz8j0VQO7ZXTCWmyd/nlzfhqTSxj1aOkFBd4tAiMUDyb X-Google-Smtp-Source: AKy350YeqFioLET2vMeF2wCXICKQoN7GCusx3dfj63sPWwDIXWbB2wuVw6N1CZJ0trRctSyujlLMNMMXyaVzk5U3ct0= X-Received: by 2002:a05:6871:7a3:b0:187:7f01:7e75 with SMTP id o35-20020a05687107a300b001877f017e75mr5919873oap.4.1681751670297; Mon, 17 Apr 2023 10:14:30 -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:46:0:b0:49c:b071:b1e3 with HTTP; Mon, 17 Apr 2023 10:14:29 -0700 (PDT) In-Reply-To: <202304171609.33HG9Tw8003888@gitrepo.freebsd.org> References: <202304171609.33HG9Tw8003888@gitrepo.freebsd.org> From: Mateusz Guzik Date: Mon, 17 Apr 2023 19:14:29 +0200 Message-ID: Subject: Re: git: a540cdca3183 - main - tcp_hpts: use queue(9) STAILQ for the input queue To: Gleb Smirnoff 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: 4Q0YZH3rnqz3Dq2 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 this breaks the build /tank/users/mjg/src/freebsd/sys/netinet/tcp_subr.c:2429:10: error: no member named 't_in_pkt' in 'struct tcpcb' if (tp->t_in_pkt) { ~~ ^ /tank/users/mjg/src/freebsd/sys/netinet/tcp_subr.c:2432:11: error: no member named 't_in_pkt' in 'struct tcpcb' m = tp->t_in_pkt; ~~ ^ /tank/users/mjg/src/freebsd/sys/netinet/tcp_subr.c:2433:7: error: no member named 't_in_pkt' in 'struct tcpcb' tp->t_in_pkt = tp->t_tail_pkt = NULL; ~~ ^ /tank/users/mjg/src/freebsd/sys/netinet/tcp_subr.c:2433:22: error: no member named 't_tail_pkt' in 'struct tcpcb' tp->t_in_pkt = tp->t_tail_pkt = NULL; ~~ ^ On 4/17/23, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=a540cdca3183da08b2a865d6af30794a79c4a8c2 > > commit a540cdca3183da08b2a865d6af30794a79c4a8c2 > Author: Gleb Smirnoff > AuthorDate: 2023-04-17 16:07:23 +0000 > Commit: Gleb Smirnoff > CommitDate: 2023-04-17 16:07:23 +0000 > > tcp_hpts: use queue(9) STAILQ for the input queue > > Reviewed by: rrs > Differential Revision: https://reviews.freebsd.org/D39574 > --- > sys/netinet/tcp_hpts.c | 8 +++--- > sys/netinet/tcp_lro.c | 22 +++++++--------- > sys/netinet/tcp_stacks/bbr.c | 2 +- > sys/netinet/tcp_stacks/rack.c | 2 +- > sys/netinet/tcp_stacks/rack_bbr_common.c | 6 ++--- > sys/netinet/tcp_subr.c | 43 > +++++++++++--------------------- > sys/netinet/tcp_var.h | 3 +-- > 7 files changed, 33 insertions(+), 53 deletions(-) > > diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c > index 644811b44a19..e61547104775 100644 > --- a/sys/netinet/tcp_hpts.c > +++ b/sys/netinet/tcp_hpts.c > @@ -92,9 +92,8 @@ __FBSDID("$FreeBSD$"); > * > * There is a common functions within the rack_bbr_common code > * version i.e. ctf_do_queued_segments(). This function > - * knows how to take the input queue of packets from > - * tp->t_in_pkts and process them digging out > - * all the arguments, calling any bpf tap and > + * knows how to take the input queue of packets from tp->t_inqueue > + * and process them digging out all the arguments, calling any bpf tap and > * calling into tfb_do_segment_nounlock(). The common > * function (ctf_do_queued_segments()) requires that > * you have defined the tfb_do_segment_nounlock() as > @@ -1331,7 +1330,8 @@ again: > kern_prefetch(tp->t_fb_ptr, &did_prefetch); > did_prefetch = 1; > } > - if ((inp->inp_flags2 & INP_SUPPORTS_MBUFQ) && tp->t_in_pkt) { > + if ((inp->inp_flags2 & INP_SUPPORTS_MBUFQ) && > + !STAILQ_EMPTY(&tp->t_inqueue)) { > error = (*tp->t_fb->tfb_do_queued_segments)(tp, 0); > if (error) { > /* The input killed the connection */ > diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c > index 3ce49171a65c..7cbf535a9263 100644 > --- a/sys/netinet/tcp_lro.c > +++ b/sys/netinet/tcp_lro.c > @@ -1179,18 +1179,14 @@ again: > > #ifdef TCPHPTS > static void > -tcp_queue_pkts(struct inpcb *inp, struct tcpcb *tp, struct lro_entry *le) > +tcp_queue_pkts(struct tcpcb *tp, struct lro_entry *le) > { > - INP_WLOCK_ASSERT(inp); > - if (tp->t_in_pkt == NULL) { > - /* Nothing yet there */ > - tp->t_in_pkt = le->m_head; > - tp->t_tail_pkt = le->m_last_mbuf; > - } else { > - /* Already some there */ > - tp->t_tail_pkt->m_nextpkt = le->m_head; > - tp->t_tail_pkt = le->m_last_mbuf; > - } > + > + INP_WLOCK_ASSERT(tptoinpcb(tp)); > + > + STAILQ_HEAD(, mbuf) q = { le->m_head, > + &STAILQ_NEXT(le->m_last_mbuf, m_stailqpkt) }; > + STAILQ_CONCAT(&tp->t_inqueue, &q); > le->m_head = NULL; > le->m_last_mbuf = NULL; > } > @@ -1221,7 +1217,7 @@ tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct > lro_entry *le, > > /* Look at the last mbuf if any in queue */ > if (can_append_old_cmp) { > - m = tp->t_tail_pkt; > + m = STAILQ_LAST(&tp->t_inqueue, mbuf, m_stailqpkt); > if (m != NULL && (m->m_flags & M_ACKCMP) != 0) { > if (M_TRAILINGSPACE(m) >= sizeof(struct tcp_ackent)) { > tcp_lro_log(tp, lc, le, NULL, 23, 0, 0, 0, 0); > @@ -1451,7 +1447,7 @@ tcp_lro_flush_tcphpts(struct lro_ctrl *lc, struct > lro_entry *le) > if (le->m_head != NULL) { > counter_u64_add(tcp_inp_lro_direct_queue, 1); > tcp_lro_log(tp, lc, le, NULL, 22, 1, inp->inp_flags2, 0, 1); > - tcp_queue_pkts(inp, tp, le); > + tcp_queue_pkts(tp, le); > } > if (should_wake) { > /* Wakeup */ > diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c > index bce17b57205c..fab85e88a382 100644 > --- a/sys/netinet/tcp_stacks/bbr.c > +++ b/sys/netinet/tcp_stacks/bbr.c > @@ -11600,7 +11600,7 @@ bbr_do_segment(struct tcpcb *tp, struct mbuf *m, > struct tcphdr *th, > int retval; > > /* First lets see if we have old packets */ > - if (tp->t_in_pkt) { > + if (!STAILQ_EMPTY(&tp->t_inqueue)) { > if (ctf_do_queued_segments(tp, 1)) { > m_freem(m); > return; > diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c > index 7b97a8e9c5d9..c134c059ec89 100644 > --- a/sys/netinet/tcp_stacks/rack.c > +++ b/sys/netinet/tcp_stacks/rack.c > @@ -17069,7 +17069,7 @@ rack_do_segment(struct tcpcb *tp, struct mbuf *m, > struct tcphdr *th, > struct timeval tv; > > /* First lets see if we have old packets */ > - if (tp->t_in_pkt) { > + if (!STAILQ_EMPTY(&tp->t_inqueue)) { > if (ctf_do_queued_segments(tp, 1)) { > m_freem(m); > return; > diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c > b/sys/netinet/tcp_stacks/rack_bbr_common.c > index 7f5f8817466a..91bf32159004 100644 > --- a/sys/netinet/tcp_stacks/rack_bbr_common.c > +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c > @@ -493,10 +493,8 @@ ctf_do_queued_segments(struct tcpcb *tp, int have_pkt) > struct mbuf *m; > > /* First lets see if we have old packets */ > - if (tp->t_in_pkt) { > - m = tp->t_in_pkt; > - tp->t_in_pkt = NULL; > - tp->t_tail_pkt = NULL; > + if ((m = STAILQ_FIRST(&tp->t_inqueue)) != NULL) { > + STAILQ_INIT(&tp->t_inqueue); > if (ctf_process_inbound_raw(tp, m, have_pkt)) { > /* We lost the tcpcb (maybe a RST came in)? */ > return(1); > diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c > index 3a6a902c35be..cc879999fe26 100644 > --- a/sys/netinet/tcp_subr.c > +++ b/sys/netinet/tcp_subr.c > @@ -2262,6 +2262,7 @@ tcp_newtcpcb(struct inpcb *inp) > #endif > > TAILQ_INIT(&tp->t_segq); > + STAILQ_INIT(&tp->t_inqueue); > tp->t_maxseg = > #ifdef INET6 > isipv6 ? V_tcp_v6mssdflt : > @@ -2437,8 +2438,10 @@ tcp_discardcb(struct tcpcb *tp) > } > } > TCPSTATES_DEC(tp->t_state); > + > if (tp->t_fb->tfb_tcp_fb_fini) > (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); > + MPASS(STAILQ_EMPTY(&tp->t_inqueue)); > > /* > * If we got enough samples through the srtt filter, > @@ -4242,7 +4245,8 @@ tcp_handle_orphaned_packets(struct tcpcb *tp) > > if (tptoinpcb(tp)->inp_flags2 & INP_MBUF_L_ACKS) > return; > - if ((tptoinpcb(tp)->inp_flags2 & INP_SUPPORTS_MBUFQ) == 0) { > + if ((tptoinpcb(tp)->inp_flags2 & INP_SUPPORTS_MBUFQ) == 0 && > + !STAILQ_EMPTY(&tp->t_inqueue)) { > /* > * It is unsafe to process the packets since a > * reset may be lurking in them (its rare but it > @@ -4253,44 +4257,27 @@ tcp_handle_orphaned_packets(struct tcpcb *tp) > * This new stack does not do any fancy LRO features > * so all we can do is toss the packets. > */ > - m = tp->t_in_pkt; > - tp->t_in_pkt = NULL; > - tp->t_tail_pkt = NULL; > - while (m) { > - save = m->m_nextpkt; > - m->m_nextpkt = NULL; > + m = STAILQ_FIRST(&tp->t_inqueue); > + STAILQ_INIT(&tp->t_inqueue); > + STAILQ_FOREACH_FROM_SAFE(m, &tp->t_inqueue, m_stailqpkt, save) > m_freem(m); > - m = save; > - } > } else { > /* > * Here we have a stack that does mbuf queuing but > * does not support compressed ack's. We must > * walk all the mbufs and discard any compressed acks. > */ > - m = tp->t_in_pkt; > - prev = NULL; > - while (m) { > + STAILQ_FOREACH_SAFE(m, &tp->t_inqueue, m_stailqpkt, save) { > if (m->m_flags & M_ACKCMP) { > - /* We must toss this packet */ > - if (tp->t_tail_pkt == m) > - tp->t_tail_pkt = prev; > - if (prev) > - prev->m_nextpkt = m->m_nextpkt; > + if (m == STAILQ_FIRST(&tp->t_inqueue)) > + STAILQ_REMOVE_HEAD(&tp->t_inqueue, > + m_stailqpkt); > else > - tp->t_in_pkt = m->m_nextpkt; > - m->m_nextpkt = NULL; > + STAILQ_REMOVE_AFTER(&tp->t_inqueue, > + prev, m_stailqpkt); > m_freem(m); > - /* move forward */ > - if (prev) > - m = prev->m_nextpkt; > - else > - m = tp->t_in_pkt; > - } else { > - /* this one is ok */ > + } else > prev = m; > - m = m->m_nextpkt; > - } > } > } > } > diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h > index 9e58c4c3576b..5632e5d8bb41 100644 > --- a/sys/netinet/tcp_var.h > +++ b/sys/netinet/tcp_var.h > @@ -355,8 +355,7 @@ struct tcpcb { > int t_segqlen; /* segment reassembly queue length */ > uint32_t t_segqmbuflen; /* total reassembly queue byte length */ > struct tsegqe_head t_segq; /* segment reassembly queue */ > - struct mbuf *t_in_pkt; > - struct mbuf *t_tail_pkt; > + STAILQ_HEAD(, mbuf) t_inqueue; /* HPTS input queue */ > uint32_t snd_ssthresh; /* snd_cwnd size threshold for > * for slow start exponential to > * linear switch > -- Mateusz Guzik From nobody Mon Apr 17 17:24: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 4Q0Ynn0ld5z44wtl; Mon, 17 Apr 2023 17:24: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 4Q0Ynm6thHz3lxb; Mon, 17 Apr 2023 17:24:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681752269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xnma2LMLacCdFrj9txUNzZ0UngLi7EqGi51wrOAtoZ4=; b=TCokihSiM/wwin9pKGgvmpKnHihAEnSfQ4dRDOlmsU2HGpbeuF16qkPkHd1gQv6Y8W1s+s O3QKBg9Sn4W1rAwlhOnZMdpcMkwXq2LCLROWW0Bnz/oQMUe1oLhhdEslU7asCJTiSdgpiM OCiSJ7/Py6jc+odAfA8FUnWp+WwqLx/eOGbrbRnSRB/loOLHiZFht7/qeMSTgImhN/lxMk EQQ0etyU3YrlGhVqizDBE8KZ71pssSbPDPvFAxghHzoelCNQ/tlRFl4STLJJHRBux5js9e 9oPGFdjQupx6Xv19nm8UNdoAz70HH8/g5U3iCIYyuBg7yPWXkIjGzchlcnHqvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681752269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xnma2LMLacCdFrj9txUNzZ0UngLi7EqGi51wrOAtoZ4=; b=aGj3Q9tW/8D65zBnOW3QKIbieRxP6IyS7XxdU+1tr801+16/F6cUTqpk6ZUn5/RwrzeztX sE16mwUiwE5pvJWlzDNZi58SwN7zQLDfkT/WbUxDFUC7eaoMweh8Nsy1rI1nJgI40ZGTUn dD16Y4JS4E/54DO3XjUuuExoCoHbmz/yCe/f+404YK77vRfUFefkNcryGMpMBjrP9CD37P mBjSK6l1J17XrT6b8/rmjjsPW/NjPDfpryNBCe8m51zw+RVzs8pOv634x2VC1KclPtO4qC +beBhPauDFKdq78uyRSZu9tkE6Vk9I2mUOtkNvo6eBO9gPewwl/5hGDwGdl9gQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681752269; a=rsa-sha256; cv=none; b=p7jLk768HN/xSwS47+Sm3WFfRGwqgSvfw6FhjEZDddCEJ3NJFB8h79rOBtC+8o/Rx6r+ip dl4k03Wf/9LV6YFAk+v/6Q/Rhg/oRpr9cCyvTzvolTsNLr7d7sIfusgW+BFTfz6BG5JFVc gY+9sH3anZZdOo7jDipLDACudC8OSr9VXwZtG3hI5nGNSOlSgoP/yv4rpOGq4IHJvOAvL8 msFkn35AzbtKpnO/ghgzBNYBfOV9n2sMFNRiwk3hkr38YClI68hRtAI8XAvH5ohbyIw17a xZKsV0Z9OmGfo6M2JU2w38SmQOAG3NnjzmJoSx5ovFEws6o2DoT6NhXeeVWeQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0Ynm5phJzdTq; Mon, 17 Apr 2023 17:24: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 33HHOSlb034593; Mon, 17 Apr 2023 17:24:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HHOSjf034592; Mon, 17 Apr 2023 17:24:28 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:24:28 GMT Message-Id: <202304171724.33HHOSjf034592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 3232b1f4a9b4 - main - tcp: fix 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3232b1f4a9b4a23c5e0327144d65b3e5c83e725a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3232b1f4a9b4a23c5e0327144d65b3e5c83e725a commit 3232b1f4a9b4a23c5e0327144d65b3e5c83e725a Author: Gleb Smirnoff AuthorDate: 2023-04-17 17:24:20 +0000 Commit: Gleb Smirnoff CommitDate: 2023-04-17 17:24:20 +0000 tcp: fix build The recent 25685b75375 came in conflict with a540cdca318. Remove the code that cleans up the old style input queue. Note that two lines below we assert that the new style input queue is empty. The TCP stacks that use the queue are supposed to flush it in their tfb_tcp_fb_fini method. --- sys/netinet/tcp_subr.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index cc879999fe26..d88fc48fc021 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2426,17 +2426,6 @@ tcp_discardcb(struct tcpcb *tp) #ifdef TCP_BLACKBOX tcp_log_tcpcbfini(tp); #endif - if (tp->t_in_pkt) { - struct mbuf *m, *n; - - m = tp->t_in_pkt; - tp->t_in_pkt = tp->t_tail_pkt = NULL; - while (m) { - n = m->m_nextpkt; - m_freem(m); - m = n; - } - } TCPSTATES_DEC(tp->t_state); if (tp->t_fb->tfb_tcp_fb_fini) From nobody Mon Apr 17 17:45: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 4Q0ZFc0SX0z44ySW; Mon, 17 Apr 2023 17:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0ZFb6X9Xz4RN6; Mon, 17 Apr 2023 17:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681753507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3VKity4xsoE8I1jzScjLucCQSwydeq4lAyk+TEjFSc=; b=xFlcfz6OojaSWyrKBvhcjTdiAkFGdikG0C5UTRYBj3l4/XjAJl/ZRKCqauVGI4aoMBHkOk i9JlDrAVUgqU2OR2HpmgGyPGFccMkC8XKEtY9lkJNC/G2hISpOTm4dgaE12TzSPMqzr5Q8 a4i+ea3kLoihYNw/FWkv9ytWXgiex/x9D3227dgEUfw6Mz4s5aiCsc3gpOkGGEapy7489d sh7KZhW9vtXgLLbWuP76LFAOXr0kMIppDriSPJVMvLsqZgwYqMBztK3kTdpsAapJkCxrOY aPQduKV05r87nhpIScRA/S/KC2qADQSviWG+Zeq8XDfy/9ZmLt2PKQH1OH0PRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681753507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3VKity4xsoE8I1jzScjLucCQSwydeq4lAyk+TEjFSc=; b=hmUNsZY20SF1bTS1HoZzMQ2dK1YwI6VN3IiRfHs/Ig0+xdldZYpNSFtn3Wnar97gWieFyL IRooKNjU3fuqPh+T45nw0WQeVng/6NcdCsU3XLDvLOdkPgd2GrWl22LL+BneZScGSoQjiE fV8QwbaA84FXnohqlx6cGUr2N6qc398BDND2Uz6cks06sSYbNNduqI+xPQJNdFrQZQ8aFd lfODn1gulQRfjKhKqzyp3LXFbTFL05w1NmBC2hxicSm1ssPShyR7IhmW+vGg3VPGk/JBV3 SRbZckl45oZ16ONWHZFt1+vuk0DPPz3ofvjwLpKVFaaBM/IVJUNTF0ua+wdGdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681753507; a=rsa-sha256; cv=none; b=VwkS5EE7KOowXZmQQS5Qoq53yEUmqbyTIXixaCnRY9XkpfXKqSemDEPE5iQ3HHoX2xpmKw Idsrg4ZL/UK8WnEFLAk2gvU8mjD2hdkVJcOGls5CjjWpOKTxrTI2OivF+1GWLDKI3lvz8e aVfkgyhRCkTizeFMdwORqM2coUone52or5t9pgJZ4pSk+FvPhC+HMnInEQH8RkGOf3GDG6 k22ISlv/3XFUoktIdqOme4X+UilmXh0YwtLQCUQrRAaUCmEqBRY9VpEZ2Jj+WI/cfSrCWs 8OB1waTcrHFqyeOa1gqsgf7keau2txO8YHv8Wnjx0nHb+4IEi4Np3MhCcT/F9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0ZFb5WMSzfCl; Mon, 17 Apr 2023 17:45: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 33HHj7RD067776; Mon, 17 Apr 2023 17:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HHj71R067775; Mon, 17 Apr 2023 17:45:07 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:45:07 GMT Message-Id: <202304171745.33HHj71R067775@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: c4c981c1e60b - main - Move include of site.src.opts.mk to allow more control List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c4c981c1e60b72d25258739c635cacbc88fa1d4c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c4c981c1e60b72d25258739c635cacbc88fa1d4c commit c4c981c1e60b72d25258739c635cacbc88fa1d4c Author: Simon J. Gerraty AuthorDate: 2023-04-17 17:44:37 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-17 17:44:37 +0000 Move include of site.src.opts.mk to allow more control Sometimes a site may have different policy needs, include site.src.opts.mk just before bsd.mkopt.mk to allow more control. Reviewed by: imp --- share/mk/src.opts.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 8032284d964e..f40f35e6e2d9 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -239,8 +239,6 @@ __DEFAULT_DEPENDENT_OPTIONS= \ __DEFAULT_DEPENDENT_OPTIONS+= ${var}_SUPPORT/${var} .endfor -.-include - # # Default behaviour of some options depends on the architecture. Unfortunately # this means that we have to test TARGET_ARCH (the buildworld case) as well @@ -365,6 +363,8 @@ __DEFAULT_NO_OPTIONS+=NETLINK __DEFAULT_NO_OPTIONS+=NETLINK_SUPPORT .endif +.-include + .include # From nobody Mon Apr 17 17:45: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 4Q0ZG94SHLz44yjH; Mon, 17 Apr 2023 17:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0ZG933gWz4SPC; Mon, 17 Apr 2023 17:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681753537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KE6QAFT80q/6nDUh/o8roAtJ8QVO0mYahhfPPS5B62U=; b=GdQxa2fMtQOXpUoNvdzRmHvaesT9VSxv3RUBkAfD9WwiJXnKEsHJXsS3DhwL17dVOB7Ez0 o0YASnSCSIQwKJ4kqj0ACr0D0GAv8qxTgvuWRo38TQSZAPYcMPDABRaZs/bJVS4r4O0Qtn 0ZjvRZ8XXXGbh/eOMP7HB7G6NffuqEs9CEgym56vEpHpltDo8isPdVuzpeoR71RfL5vNMY fpLY68r7jqbthYk6jyWEE4IcAo+njvasTnWSpxWBd71E0MIVZS49pzT6UAysLSKzJ+O12N DkZ44eZRj69dH8Nu55bZXJWArDXwEZ+9TF+M8mOAduW0Mg4fX9u89sq1J1RSPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681753537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KE6QAFT80q/6nDUh/o8roAtJ8QVO0mYahhfPPS5B62U=; b=jRQa8TkqXSU+kac+4pT5/YSB608CohXYlUcti2AKoVd+GvBy01gbX3MTMnd8X87YYw7z6r dHeke2s+grTC1CpysdYKUifrwZ2ZCx8+24KxmPYQ1CvRWJGVDYmsufbH7+9XZiDSl2HQKI SrKkMTYtJcc0whNutlOn4ggw9WUFMsZ1SJGjy/48AUZPHjZtA0lAgxo9i7jN7IP3Ugp/b9 KvFTmydtCmlu6hADhe4GGQCBGYqJQ9JpFcSetcsqHD664RoZ9f7HccxdjdU1qQYmPcQzg3 MA9CEiccJVyrNpsX2DKUDejNlH5GM/zuzo7uv/l1BJ6/Uy323pwYYf2zX/dIMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681753537; a=rsa-sha256; cv=none; b=B4iQnGE5YSz75l4xDy036vLMx3xVwIaSXk85jSsW2bsJs1CruLskLGHr7lCVSa0R+MJ6YG 0dKOjv03llzeM9TTZYODaRfde0/qEVFhhSeinmgxMjMeNPgqWDVMvjkLV2DEOWG6B4637b Ai7F0qnUXLOwa5JRfeWSkfO3zYrwLvXA+VN+Ea3NvW3n10DATnYFGIkQZYASs78dkqD7Yt uoYn0gAKKl7DH758n0zLHhxs8s68DUmozidc2Pote0P/berxGgwkRuju5QW820CJGlNmQm Vu77+3pOgPmkWzhfLXp1TRGQMO1bjmsBOrvDExJlQSzHeMVOgEp4dGnpKE9TSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0ZG923m4zfBC; Mon, 17 Apr 2023 17:45: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 33HHjbbG067987; Mon, 17 Apr 2023 17:45:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HHjbfB067986; Mon, 17 Apr 2023 17:45:37 GMT (envelope-from git) Date: Mon, 17 Apr 2023 17:45:37 GMT Message-Id: <202304171745.33HHjbfB067986@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: 653e8c11f43d - main - Include bsd.linker.mk to get LINKER_TYPE and VERSION in rescue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 653e8c11f43dc6448b8560eb1f6679de2c47e1ed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=653e8c11f43dc6448b8560eb1f6679de2c47e1ed commit 653e8c11f43dc6448b8560eb1f6679de2c47e1ed Author: Dimitry Andric AuthorDate: 2023-04-17 17:43:29 +0000 Commit: Dimitry Andric CommitDate: 2023-04-17 17:45:26 +0000 Include bsd.linker.mk to get LINKER_TYPE and VERSION in rescue To be able to use these make variables, you also have to include bsd.linker.mk, apparently. Fixes: 458f4722bf97 MFC after: 1 week --- rescue/rescue/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index 1f4db1d06b15..ea467b3f1bfe 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -2,6 +2,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/2/93 .include +.include PACKAGE=rescue MAN= From nobody Mon Apr 17 19:43: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 4Q0ctG6ZM4z456Nj; Mon, 17 Apr 2023 19:43: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 4Q0ctG66X0z4MR3; Mon, 17 Apr 2023 19:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681760614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UIXcA3p26OppyIcebus2zY7pVI2e7jzYFtgJyMly12c=; b=OxalSTv3bdc9iZxeZOHA8vN25Pu/uuJYeF505D388M/cxAYhhBOH23cZpZwDqsO1LFx5RI WYC4bWHehq39Kev3MQZOI/EYQsGUi8b2SnxBaXrKIg8SglulZVOYOC0jxHtCa7qAnvOmJi 7x2M+tBaJBmH8c5Nfzf5Q8Ol7Gv6L7orz+qT2HF3Ce8KYbgucpSqGuWin0JKSATf/UlvBg 8d37pqVKAzA3rdnQXO8VXnkDE537DPJ8CtkaV/EC3dxRjjd4Y+XCU6wGu+cnsNZ4/J/wyV 307uVwtHSeUe1vA9WYukllvn9euP81T7bwviFyqmOM1QAEC8t1btfXsZ3lIK2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681760614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UIXcA3p26OppyIcebus2zY7pVI2e7jzYFtgJyMly12c=; b=t/ydD5txLGP+xZa7IznUcn9UlNWbx+uR2NcWYjV71jSnenrZfjpemisbHUFS7trdCjuB99 qwEGPYlsncAkf3OI+agmW7NbjjLOE/LmuNm/lQPPBz7FWpXBYaCJqoUDzI+jhV43yu1MpF asryQW/qjbN9T7q/di+7gEYyN8Urp0dpqBdPNaH5uHTjZFpoj7VNV+IZAeCjbpcDLIxHvR dcWMM6krOW6u08Fq8KwsLdNgAYX1WuWSrvHF6OcUEEy3+c8RGxnQwPujZO5FXxeQD6+qHh ujMKjFXMWhYRqeOfdZMy7N97J88nYxZhgvCWlT30Rwr5Aa6/1FPFbFi7f+yj4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681760614; a=rsa-sha256; cv=none; b=WzxRZtyvxyuK+EcV9uk2bGDgkZ6y3494n+/kmA512yy+1n+PEU01GZRV2ITX26eot8YRdo yuh81Aoff3cZH/qazubU4/X3yLjzddNXIbLn7EvbwUVh3js7F0XWP9gKIqxaqF2VEVrfIL qZ3pRIZJDWNsQW6guvqjd06BWDPou/B/aE4GDudGCCUJGVRdb5grUOAtYA1nIDZ3j8uhma bHeIB8qAmeYacrj0VDfB+8tu526Cnv/IThAZE9g3QPCwyw7k6XMp9w1gEv8vS7AyIdq0Pu 4UNijfKY25KZh5vsWMN+mAtPiMlbgk2nW8I1eIu38MWg0hJ/zNRezDlPFS6tjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0ctG51h5zhNZ; Mon, 17 Apr 2023 19:43: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 33HJhY3r065494; Mon, 17 Apr 2023 19:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HJhYa1065493; Mon, 17 Apr 2023 19:43:34 GMT (envelope-from git) Date: Mon, 17 Apr 2023 19:43:34 GMT Message-Id: <202304171943.33HJhYa1065493@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: 00172f341666 - main - geom: use bool for one-bit wide bit-field List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 00172f341666f2d5535ae6f4630c93593e86a4cb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=00172f341666f2d5535ae6f4630c93593e86a4cb commit 00172f341666f2d5535ae6f4630c93593e86a4cb Author: Ed Maste AuthorDate: 2023-04-17 18:56:51 +0000 Commit: Ed Maste CommitDate: 2023-04-17 19:43:00 +0000 geom: use bool for one-bit wide bit-field A one-bit wide bit-field can take only the values 0 and -1. Clang 16 introduced a warning that "implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1". Fix by using c99 bool. Reported by: Clang, via dim Reviewed by: dim Sponsored by: The FreeBSD Foundation --- sys/geom/part/g_part.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/geom/part/g_part.h b/sys/geom/part/g_part.h index c96cec264b87..4987b7c54c0e 100644 --- a/sys/geom/part/g_part.h +++ b/sys/geom/part/g_part.h @@ -132,10 +132,10 @@ struct g_part_entry { quad_t gpe_start; /* First LBA of partition. */ quad_t gpe_end; /* Last LBA of partition. */ int gpe_index; - int gpe_created:1; /* Entry is newly created. */ - int gpe_deleted:1; /* Entry has been deleted. */ - int gpe_modified:1; /* Entry has been modified. */ - int gpe_internal:1; /* Entry is not a used entry. */ + bool gpe_created:1; /* Entry is newly created. */ + bool gpe_deleted:1; /* Entry has been deleted. */ + bool gpe_modified:1; /* Entry has been modified. */ + bool gpe_internal:1; /* Entry is not a used entry. */ }; /* G_PART table (KOBJ instance). */ @@ -170,12 +170,12 @@ struct g_part_table { uint32_t gpt_heads; int gpt_depth; /* Sub-partitioning level. */ - int gpt_isleaf:1; /* Cannot be sub-partitioned. */ - int gpt_created:1; /* Newly created. */ - int gpt_modified:1; /* Table changes have been made. */ - int gpt_opened:1; /* Permissions obtained. */ - int gpt_fixgeom:1; /* Geometry is fixed. */ - int gpt_corrupt:1; /* Table is corrupt. */ + bool gpt_isleaf:1; /* Cannot be sub-partitioned. */ + bool gpt_created:1; /* Newly created. */ + bool gpt_modified:1; /* Table changes have been made. */ + bool gpt_opened:1; /* Permissions obtained. */ + bool gpt_fixgeom:1; /* Geometry is fixed. */ + bool gpt_corrupt:1; /* Table is corrupt. */ }; struct g_part_entry *g_part_new_entry(struct g_part_table *, int, quad_t, From nobody Mon Apr 17 19:51: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 4Q0d353DfWz456qP; Mon, 17 Apr 2023 19:51: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 4Q0d352j1Jz4ZWL; Mon, 17 Apr 2023 19:51:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681761073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BNePrzkEbvVqXdpZnekNG/G2yo3EpyjzDbgYKz0UOJA=; b=uuurgSsJMUsAUV3JYcOcWyz5sHjq218U4864p678cEoqFQppXKYmllw7NdemzjqvjjrkDW KZbAV3i9KHlxw3cAuUJ0LLPECWFebFaA4IUO0Y02WkIy63blnGN2KQfH2juMgpS7rc4aYH Qd5AK3Itr3dFi8pGsGRIojxQ80Zh+UWTGvdYhs5y9fSh7h3AKCLrUr/z1kAonWaPOT6SJm GHswYkF46KwxRT9SnCQu5SpwwmPgIR6gNwy9TiTTjcczwDFPX2YoZDq8y0+iEvUem6Lj8i vNKxQtBPdno+JNUbfqIatqsObT6r7Fxuj0fQ+Pp5wIdyzA3y3Ykds4OgIy6cNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681761073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BNePrzkEbvVqXdpZnekNG/G2yo3EpyjzDbgYKz0UOJA=; b=EeHmpQ/srgPQcVR1jEANpEXKu20Xdmf8Zfs2k02YMUs373qYuacIqm1AmrtAG0HvYaU2Ko X7Js89gBu9j+o++2hLPAa6PObdb+ORPdVEwXAxWyXuixv1TJkymCHFnxKuwqTLhLii9i7J rn8ePPJTDThUcCSPeH7guIdXc1QC6iLML8m0wb/FqkhTyT5Cz71/MF32J5btM1bkDrRvMb wXW65BSikBiigZ11AjPHz5AFX74HwrknK9T4kc8wEU9+vvP7oLGN1PKrjXeqtYhNNH6cx4 lxoVrQSWLpR5oQ3mJt/CtTT0MCiIXeM7VI/XuuL//k11yXRjgGSV4RVSmsMPUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681761073; a=rsa-sha256; cv=none; b=D1CtFAuUUlRp3jOQf9kUJYNjosRVMI+omu2UsnY/KooxLVoip2l3pHhfqsdiLkcIFPSa03 gVZ47Tqresbfwdt31Z1NLyGGL4c+hoMKi42liyhwiyysaQOApeRffBXRu+7TxvHyxpWLyz qI8TK1wWz8NmrDmY0qc6CUrLT4PLIx+2Z4DjyB2zLXszHSKB1+P3tLSstI8poIbYmsSeK6 SQLyAxau01KZ4/jtLCWjQFrO0pMzDq/Ug3MFVNECNlqmKGfigf8SP7HP5u1JokbCZQENH0 g17CEQBRp/ot1yd9ZXLpj2VKtskWfV02EmMd9o5+Z0qFRG1MmG2DOLxSRoObPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0d351klrzjFD; Mon, 17 Apr 2023 19:51: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 33HJpDFb074917; Mon, 17 Apr 2023 19:51:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HJpDaO074916; Mon, 17 Apr 2023 19:51:13 GMT (envelope-from git) Date: Mon, 17 Apr 2023 19:51:13 GMT Message-Id: <202304171951.33HJpDaO074916@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: b03311cadd3a - main - renice: Avoid segfault if -n flag is given without 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b03311cadd3a6f931e176f97b97bd72be3ef96d4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b03311cadd3a6f931e176f97b97bd72be3ef96d4 commit b03311cadd3a6f931e176f97b97bd72be3ef96d4 Author: Dag-Erling Smørgrav AuthorDate: 2023-04-17 19:49:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-04-17 19:50:19 +0000 renice: Avoid segfault if -n flag is given without argument. Fixes: 65ee0a8495538 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D39623 --- usr.bin/renice/renice.c | 2 +- usr.bin/renice/tests/renice_test.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index 890d7043ebbd..42e93cce240e 100644 --- a/usr.bin/renice/renice.c +++ b/usr.bin/renice/renice.c @@ -94,7 +94,7 @@ main(int argc, char *argv[]) } if (strcmp(*argv, "-n") == 0) { /* may occur only once, prior to priority */ - if (haveprio || incr) + if (haveprio || incr || argc < 2) usage(); incr = true; (void)argc--, argv++; diff --git a/usr.bin/renice/tests/renice_test.sh b/usr.bin/renice/tests/renice_test.sh index 9321e0f327ae..a6e8007ba35d 100644 --- a/usr.bin/renice/tests/renice_test.sh +++ b/usr.bin/renice/tests/renice_test.sh @@ -158,6 +158,11 @@ renice_delim_body() { kill $pid } +atf_test_case renice_incr_noarg +renice_incr_noarg_body() { + atf_check -o empty -e ignore -s exit:1 renice -n +} + atf_init_test_cases() { atf_add_test_case renice_abs_pid atf_add_test_case renice_rel_pid @@ -166,4 +171,5 @@ atf_init_test_cases() { atf_add_test_case renice_abs_user atf_add_test_case renice_rel_user atf_add_test_case renice_delim + atf_add_test_case renice_incr_noarg } From nobody Mon Apr 17 20:22: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 4Q0dkd0KRwz458HX; Mon, 17 Apr 2023 20:22:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0dkc71l6z4DtH; Mon, 17 Apr 2023 20:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681762921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pPzoXLSPOhVM1j5AQQsR+BQZgkJtoTWL3KdOshROf0w=; b=VKQg9loiXGEHkXdhM4uZ+dVx1/Ynvlbf5b+olW/4wZhIivMtAq34fwLyJaIp+CKU4SRAjV tJHmB3kNw33TQRy8RRdY68C9htcVCiem1kFFUhGzHL5nmVMywmA+BbsgqKsICqmk+ZofTE ghHx25Yxxzamhaf7GWuD1yNsIpX4tfdpwW1T7ogY/NQau0sRPNoREeNk6fJKdpweA8iKNi yYb9yBajd7Uy74puYQ489TzQ5EirFoKATvpmq1/1WtP60hz4mHXpofn38t9tXHcytANoBX PfJJZguFr/NDtL7CRyG6Rj507wKXPyP35Rc1rEMkOgix0yeSD1CHDSNV3/pxNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681762921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pPzoXLSPOhVM1j5AQQsR+BQZgkJtoTWL3KdOshROf0w=; b=r3VjDNUbPtpap2okFzLq2LH5N78LpRWdNBVGI4O61iFEp0uMsDBgUDMFAqMtpJQRgOkzdE /PRL2+Ao//Ms1vfSY1SP4vtibgNuD+ogptUucMtLqlsBf4Y90rtkTtpcyut4aG3VwJQztq quMvlyYODTX7HGtXRWsCaFk3yt2QYGXhQZWpzIcLUv4VOPBVrFbw3FqaUtw5VPFHJ7XD4B 86O25uRQoIl9vIGKMlrxb4PSe/nth1NaJqQ9LKzYkV7nj6hBdL8ZYl9MT9SHrK8FuR4U2D QxeN/3OmFGxrm2PGbaockQOdqdeZONpZE2qsYugJRcpZgYIQTvd+86kaxNNRSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681762921; a=rsa-sha256; cv=none; b=DaxU8jT2J8kQpkShHxwu7BoPxxkegjmJqkbKAR/I1jDCD75UndRZIZ/FqfPVuaMy5I8Z2j /KdDQ3PFdpQ8YMr3bcDknXgX/FRpxIzD1H2mlDebRoUn3dnBV6ztWf+uLaflb0KTI5CRzl Tip9+mZBpxus7nyQedeF1d4MnzvXLCySJAzHwS0SSWoHbTjAP8JwJZ1fRN9948vH4opvnZ kfVbnNanAPIYXPFdSQ29NvDbHI+teJMAEm62tpRzsx2MqmBXIjfX5KJff2oZXp2Q1bw1lb JBR0fa9w6H2hrhqiQQcKdnocYDV6jezlYTkNtaaqohPlDPVdP8nG4zMU4ZmaRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0dkc62xtzjKK; Mon, 17 Apr 2023 20:22: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 33HKM0fR030579; Mon, 17 Apr 2023 20:22:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HKM0vg030578; Mon, 17 Apr 2023 20:22:00 GMT (envelope-from git) Date: Mon, 17 Apr 2023 20:22:00 GMT Message-Id: <202304172022.33HKM0vg030578@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: 21ef48af5c0f - main - xargs: improve foundeof check for -E List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 21ef48af5c0f4ed85a5f42855b5a8d58b5431103 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=21ef48af5c0f4ed85a5f42855b5a8d58b5431103 commit 21ef48af5c0f4ed85a5f42855b5a8d58b5431103 Author: Yuri Pankov AuthorDate: 2023-04-17 19:14:33 +0000 Commit: Yuri Pankov CommitDate: 2023-04-17 20:20:03 +0000 xargs: improve foundeof check for -E 4aeb63826e0f got it almost correct (we can't use strcmp() here as current argument isn't guaranteed to be NUL-terminated), but we also need to check that current argument length is equal to that of eofstr. PR: 270867 Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D39583 --- usr.bin/xargs/xargs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 21455e7be26e..cadb0c76cc2f 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -91,6 +91,7 @@ static char echo[] = _PATH_ECHO; static char **av, **bxp, **ep, **endxp, **xp; static char *argp, *bbp, *ebp, *inpline, *p, *replstr; static const char *eofstr; +static long eoflen; static int count, insingle, indouble, oflag, pflag, tflag, Rflag, rval, zflag; static int cnt, Iflag, jfound, Lflag, Sflag, wasquoted, xflag; static int curprocs, maxprocs; @@ -129,6 +130,7 @@ main(int argc, char *argv[]) inpline = replstr = NULL; ep = environ; eofstr = ""; + eoflen = 0; Jflag = nflag = 0; (void)setlocale(LC_ALL, ""); @@ -159,6 +161,7 @@ main(int argc, char *argv[]) switch (ch) { case 'E': eofstr = optarg; + eoflen = strlen(eofstr); break; case 'I': Jflag = 0; @@ -348,8 +351,8 @@ arg1: if (insingle || indouble) { xexit(*av, 1); } arg2: - foundeof = *eofstr != '\0' && - strncmp(argp, eofstr, p - argp) == 0; + foundeof = eoflen != 0 && p - argp == eoflen && + strncmp(argp, eofstr, eoflen) == 0; /* Do not make empty args unless they are quoted */ if ((argp != p || wasquoted) && !foundeof) { From nobody Tue Apr 18 01: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 4Q0mLs6KSyz45TQM; Tue, 18 Apr 2023 01: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 4Q0mLs4nYPz44lM; Tue, 18 Apr 2023 01: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=1681780821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXWN95QngIkZKNZRbctl4xda3AB2MUEclTTpDtDKYcc=; b=iSGe+1Ef4nAFFyerwNfPGh0zNdLJoa/5K67lZoMbIsk8HywJ3WCpZcHiFO7ygfpytUMFpP D+jxWWSNwhr+xfzpaq2exErlTD7RPhWvTe5ISfgeqCi0Y/EkflgoDMgTAhSyumGEeKngUi zYKQOlASuhwf63b+Zfq/J0oLDn+6Pw+BYOGX0aAW2qbhI1Is1O0XEOMgYaeb26o+ibjJZo uH8MWfFKXBx2P7DfvYT1rT3VNObubFjQHzwv7Xk27YQ23VAoMryp2AlTK+9HFhT12z/Ch5 AbyMckV/Jpm6RRpWko7uKnSmlAn+BxIqnARq7qqw5nv8EGIUVTbVAHpBdiSPXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681780821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXWN95QngIkZKNZRbctl4xda3AB2MUEclTTpDtDKYcc=; b=dVj7TDhheawD2Mz4feOAZ0sN8gcbcle5TaY73mK7We3vG1oIZewsDNDFUGDZDMi5K0T1Nq 3mYY6nQK8BHHPkbXexjb54eQcgBiNFln+DBxoDErST54pCpIJDVSZdsA9WCBOg1YP/tvov L8k6gDB3fIBfY1SNxPCK5CDbKTNi/qs8X66jp1cKW9us+qRL0ZSDO1mpzOuQcknxtbUqAF 8CjleZcwCTUUJUaxajpYrE6wi67mwVvcxtasSVm+wP4vX0Gtq3ZA2Azc/UVmqYN2FIw+CA 2vuylyDDLA1O1pfDigVet/IKubH8Vu2enq+9LBey/tKZKHyAJctJOgsWOnE0ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681780821; a=rsa-sha256; cv=none; b=CZXWBeQ4026nzC8NL3EnVH7hGSWhWzdnxZKzhWNbMQbU+nXAKpeseH4YnZWQ2XRyxRRDgB 8LeBDqQZL37lpo4te1UL9NsReQAn15QPOfuPWJv41jisVY3l8VBzyf65frhv+D6pgMNWxb jEDJOIMGw7MhpAWS8xzS4i0dbdR2MLGRPOxnLgfylhuShRiVSqFcckZQHOyYaf+EMUdBUe DneY3g4WQCtyr3RhnBl5BBIxEH8hzvKQTSyu7tN2QN1BGyCuYl4F5GU3tqHgPLH9VkXyVJ jpPpo8vfrOyAbhi4YUBY5D/0admsr8hnceeoLHCOlrNEEGUXP55abRiHx8zojg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0mLs3nyPzrPg; Tue, 18 Apr 2023 01:20: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 33I1KLIZ018867; Tue, 18 Apr 2023 01:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I1KLVw018866; Tue, 18 Apr 2023 01:20:21 GMT (envelope-from git) Date: Tue, 18 Apr 2023 01:20:21 GMT Message-Id: <202304180120.33I1KLVw018866@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: 8b7f6783e69b - stable/13 - tmpfs: MFC: unbreak module build outside of kernel build environment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8b7f6783e69b67f345939f16f0c8d1a50be2f2d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=8b7f6783e69b67f345939f16f0c8d1a50be2f2d1 commit 8b7f6783e69b67f345939f16f0c8d1a50be2f2d1 Author: Eugene Grosbein AuthorDate: 2023-04-15 04:00:03 +0000 Commit: Eugene Grosbein CommitDate: 2023-04-18 01:19:37 +0000 tmpfs: MFC: unbreak module build outside of kernel build environment (cherry picked from commit 5ee1c90e50ce8832c79aa61c8c2bbb71bd097799) --- sys/modules/tmpfs/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/modules/tmpfs/Makefile b/sys/modules/tmpfs/Makefile index 231c1d55fd88..de4921408805 100644 --- a/sys/modules/tmpfs/Makefile +++ b/sys/modules/tmpfs/Makefile @@ -4,6 +4,7 @@ KMOD= tmpfs SRCS= vnode_if.h \ - tmpfs_vnops.c tmpfs_fifoops.c tmpfs_vfsops.c tmpfs_subr.c opt_tmpfs.h + tmpfs_vnops.c tmpfs_fifoops.c tmpfs_vfsops.c tmpfs_subr.c \ + opt_tmpfs.h opt_ddb.h .include From nobody Tue Apr 18 01:35: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 4Q0mhZ2y5Hz45Vfb; Tue, 18 Apr 2023 01:35: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 4Q0mhZ1457z3JyG; Tue, 18 Apr 2023 01:35:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mIpWlQVr9yqEjnMaX1K/vs73/vusDRxAZaN889NIREM=; b=mNOhxLLa10eIKjdn/S1XpE0YdO9dHgC+BulqQDSjbXIJG6VO/z6cixE3zYQx1iJw4WRtZo J068BtpUXubTro+WscS6LuyDqMrBINhhQgAvlJGjpnfQmehVSJhOfTMqpKi6RbHA6y6ZlI 6UZDUq7omuZjzFmrcaK1SIPYjCaMMuotxMg+6Nl5SZeNUxKAIr4CPEbPtzq38gxQa4youI BYzQOH+9q+JwH1iuHGlnJ/aLW//fl7rQ4WxwSIxdZZCeJoo16dlA6LLZCp5V6aLMLzhUgX Noz+JautCvnPna9H9LUqjNDhUWA/K2v6Iyd73qIrd9FatqIuXFje11twzYYOuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mIpWlQVr9yqEjnMaX1K/vs73/vusDRxAZaN889NIREM=; b=I/ZGRwvlT4mVUJ3y46Hj1kn3YiCXcrK0BtiE4/j6X1iG0AyULXMK3m5boTkXq2hqBnkA+6 o1sb4UIZlTLzzEtjjh7vk+K57TsL8o+O7Qr4OWDkOrQJ2yQamjeCzzDc+Cr+tEL4ynX7Fx kxDbOA5rVMwfBBwr8vaUJmaFfFA6GEPEUFYlf/RM3K8JjINcxRToziQJQZLoA0sMYEYiGE DL343GdelrbHuA5GooOwk5drlvQS+qSeQRdpVQ81Pai/B79C45OFRkbwWPvOAnSgyBKY9a bI6V1CHj/yBRTwBWQ9cVJSWP4Z1rejyxsqHwXOl/Fgm4/r8ihOLCDQyAw5XoAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681781742; a=rsa-sha256; cv=none; b=YCfoLRayDqW0xuXA2rXOWlLlda5BzVzF/UIDxwKMff8RDWEuHLpt2mEJvn6GFIQKHWrjvw kEO2vdFXj46Ea/4rBy4WHGnm1tGVVQpj+pFGkTvUsbsvePCOb7rhlCgFagMBgWZ2JgwvcT 9RMyKoDeMQ0U3FcojHiE/quB2nP5BsY1W4Kh+jg7mr7vrZJq0npY0zZIuqlOq1W1Uk5hd5 yOV0palD++FHh8QN8wT/T/qdNMSoShL3HWLFShRPOs1R8hx3/PK4Ebih84810rzLpr6Fqr mayjssez/9ndhRraVwMKbWbBg+cvib3phms9XN39F/SKF26xBcot4lyQe0mTTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0mhZ09gFzsDQ; Tue, 18 Apr 2023 01:35: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 33I1Zf6C042400; Tue, 18 Apr 2023 01:35:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I1ZffK042399; Tue, 18 Apr 2023 01:35:41 GMT (envelope-from git) Date: Tue, 18 Apr 2023 01:35:41 GMT Message-Id: <202304180135.33I1ZffK042399@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: a18c403fbddb - main - unionfs: remove LK_UPGRADE if falling back to the standard lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a18c403fbddb0fa9650f133a026f40ad33751134 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=a18c403fbddb0fa9650f133a026f40ad33751134 commit a18c403fbddb0fa9650f133a026f40ad33751134 Author: Jason A. Harmening AuthorDate: 2023-01-16 21:46:59 +0000 Commit: Jason A. Harmening CommitDate: 2023-04-18 01:31:40 +0000 unionfs: remove LK_UPGRADE if falling back to the standard lock The LK_UPGRADE operation may have temporarily dropped the upper or lower vnode's lock. If the unionfs vnode was reclaimed during that window, its lock field will be reset to no longer point at the upper/lower vnode lock, so the lock operation will use the standard lock stored in v_lock. Remove LK_UPGRADE from the flags in this case to avoid a lockmgr assertion, as this lock has not been previously owned by the calling thread. Reported by: pho Tested by: pho Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D39272 --- sys/fs/unionfs/union_vnops.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 04d788959892..f78e653280a4 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -2010,7 +2010,7 @@ unionfs_lock(struct vop_lock1_args *ap) vdrop(lvp); if (uhold != 0) vdrop(uvp); - return (vop_stdlock(ap)); + goto unionfs_lock_fallback; } } @@ -2043,7 +2043,7 @@ unionfs_lock(struct vop_lock1_args *ap) VOP_UNLOCK(lvp); vdrop(lvp); } - return (vop_stdlock(ap)); + goto unionfs_lock_fallback; } if (error != 0 && lvp != NULLVP) { /* rollback */ @@ -2065,6 +2065,22 @@ unionfs_lock(struct vop_lock1_args *ap) unionfs_lock_null_vnode: ap->a_flags |= LK_INTERLOCK; return (vop_stdlock(ap)); + +unionfs_lock_fallback: + /* + * If we reach this point, we've discovered the unionfs vnode + * has been reclaimed while the upper/lower vnode locks were + * temporarily dropped. Such temporary droppage may happen + * during the course of an LK_UPGRADE operation itself, and in + * that case LK_UPGRADE must be cleared as the unionfs vnode's + * lock has been reset to point to the standard v_lock field, + * which has not previously been held. + */ + if (flags & LK_UPGRADE) { + ap->a_flags &= ~LK_TYPE_MASK; + ap->a_flags |= LK_EXCLUSIVE; + } + return (vop_stdlock(ap)); } static int From nobody Tue Apr 18 01:35: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 4Q0mhb4FdKz45V8T; Tue, 18 Apr 2023 01:35: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 4Q0mhb2TJDz3K6d; Tue, 18 Apr 2023 01:35:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RAK/9ZIrEyVELRYNr1wcyvdr0Pv+KQpFbvtPBL7N0pk=; b=eD02kh48/rF6HPnM7M0xIpNWAbavaFHsJlJn5hvY2y5q44qkq7K2V97/Yv7vq5Dr6kGpCX A+NvgZTDRld2yKI3c64uW/z2hvOueUK9KjsKGBP4jpwp/rvOszEp9ShVE4YBAlywhn9BId nLlhQgk80M1jPtHg8BKD8YlQKV1fR40O6BaP4G9nfvyxRiljZf3wKnEPkh52j3gF7l6EIc 0XyuJyJZYU5C2DGYE9uEzp4u80J+QlRVkAFKTrBdiKJPCenR5bPawRTtVs2cXxujszNa24 yl84AGPDI9qmiVSCTjJvfbC2K8KjYn/x9IbfAuY6mJDFUdnhVgyAnzssIbVRjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RAK/9ZIrEyVELRYNr1wcyvdr0Pv+KQpFbvtPBL7N0pk=; b=yCVS+EQze6kgZC5dtb3jBIzMLbC7xKXWBi7Rvlyk2EzafC+1zEVd4qFj2xv+8/rjX4Dvcj 2eJ54v3cObIDVeembIs1JuRA85rIruRF7f6Ewr8NOqW9kHuRVVbIVMyasaIOSnqsfYOJ7S h0S87Ty5k0dYNmSmTX/8Hv5ts1L9nq8pUgRPGhLAG4wknaHqUsnCZm6/BUaONp1xGpdX5o GbRt1ojZjeNwmSiX4ttRdoT0nxwfzHmLYo+ni1QwJ7/lRQimMpcRWS6NnUUqrvI8GNFaS+ EWoAz7byAn4yHEsETFntd4RQdZ04NkGzcuveUS7cVvmZY1TpArklUKBtQdRJeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681781743; a=rsa-sha256; cv=none; b=uF/V5bCwrFySZqoieldsbigor3BxhcTKXgW98u1szNGnAD72PMHc+0EX552xyA5t9Yk2Wz 4hGTfqm09bhXvxGTbTk7jOvR8oZ+nPMSZhaPD8bOkPfg/DH93qiWYJuhkXtvQmXLLdIvV4 vacORam63YGd8XjigChbKLUGpAKniXvdp4FsMmY/mfvNla8bwec4cDZPYKHnWb/Vc2sTZp 79O2PISyzLyAxa6LE1yStXNYhH+jnPks32xv2Y+ZBmC6E+h588JDtViapEkOhgujcQx2QZ XaJtqzIw2Za9CbJAnWuLZc4gk1jAlBD6j49Q71TrdsKZzUdauq6CY1Lqj96V3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0mhb0rhYzsKC; Tue, 18 Apr 2023 01:35: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 33I1ZhGw042419; Tue, 18 Apr 2023 01:35:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I1Zh18042418; Tue, 18 Apr 2023 01:35:43 GMT (envelope-from git) Date: Tue, 18 Apr 2023 01:35:43 GMT Message-Id: <202304180135.33I1Zh18042418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: a5d82b55fe76 - main - Remove an impossible condition from unionfs_lock() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5d82b55fe76307df5277caa4bb1b7963a405e34 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=a5d82b55fe76307df5277caa4bb1b7963a405e34 commit a5d82b55fe76307df5277caa4bb1b7963a405e34 Author: Jason A. Harmening AuthorDate: 2023-01-16 21:48:11 +0000 Commit: Jason A. Harmening CommitDate: 2023-04-18 01:31:40 +0000 Remove an impossible condition from unionfs_lock() We hold the vnode interlock, so vnode private data cannot suddenly become NULL. Tested by: pho Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D39272 --- sys/fs/unionfs/union_vnops.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index f78e653280a4..a0ff5c140e82 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1982,14 +1982,6 @@ unionfs_lock(struct vop_lock1_args *ap) vholdnz(uvp); uhold = 1; VOP_UNLOCK(uvp); - unp = VTOUNIONFS(vp); - if (unp == NULL) { - /* vnode is released. */ - VI_UNLOCK(vp); - VOP_UNLOCK(lvp); - vdrop(uvp); - return (EBUSY); - } } VI_LOCK_FLAGS(lvp, MTX_DUPOK); flags |= LK_INTERLOCK; From nobody Tue Apr 18 01:35: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 4Q0mhc4J77z45VlB; Tue, 18 Apr 2023 01:35: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 4Q0mhc2ynDz3JrG; Tue, 18 Apr 2023 01:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3bru0cd0qXbf6L8cpXtRthetDqEmVV26Zv0Gm1y4js=; b=FH4jQY9Z8QjMeexihaNCxXURauw52wSnyHK+Yrim9LsT22xHxn4TSY4GS91REL89lZ/CYS nksG/zkJZ0RigA9d0w0dBc50eHncpvDbnPqgpEzbhrlawyw8njX861yKH2Sciorq2L63k6 N1cHELukIF7Kw2vfmTRekMw6rNslNgpKxqSP+44xwDbY2wRIRlAq6L2YYZbXSbLZ395MsN 41H1uiivPCliNveX5S/Jhk6de5IldSqUOTB+f3bOegMxR41tFBgqvNV7b6y2sCmh5HncXj ZOwJxRxdA4y8jb/25bPC0+8ZNu5u1u7mt6ezvIZKl1K72yVjVCWagGu248hkUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3bru0cd0qXbf6L8cpXtRthetDqEmVV26Zv0Gm1y4js=; b=sno9XLdwmRRGY/jGMsuxOI0i7aHpAaAuSq9Ggp0b83UcrSUq75XfLdhOZvoQOV4duiVIK3 uM9m5OmifP3067FSS2Fh4LOrd9OhHjlW7DeU4eXJOug4uTRxNzjklDqcwJH3zbEnzkBHL4 sGVAqQfyoHuEt7OfDoMsKzNqwuIPxavnHe/tMyjK4Qi3nNxbU9CxgBJUmnUPZg+lBuql7C REruZOX2sdH+c3DgembpNNOc9zE4/Dp3udUiIRylpD0DKQ2ABU1LPX/UzTUT3U5ng4ko+a h4k2w77Ad3YMP996YB5jMyp0Yjy2V/hU+WlRB1zaEyqNNj8he+9KJjCWwLlfnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681781744; a=rsa-sha256; cv=none; b=fjiIwaItifhDgmQ+V8cVy4CdM2EYFjdpmlly9G6EuU+EQz95oAghUBYC1s/7yXZJ7bGbiC xdSJEO75Ia6+tvg1DL5hflSVUBmpWPAEHJ8kIKveQm8vmrZ+hdrh+G38HVMBK7gZDHpYy9 mC/J9Ui1gwnfyMq02KxMtF/Uw0u+WzOjzHvdTVmn3fsO6pAnsFhlCZvbFw1BvGDnS0TEAP NX00MBSvEfksvsGVutSB7N1d58LIw/glyLy39JuuvNRCqQdzHtz4Dzy0/323FEjSl/gedt Wa//pamV+pjk4i1m8l1SyP/66U+K77SfUh01cRYz7vWdMjoGXW2f5bdO0Ox9JQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0mhc202bzsKD; Tue, 18 Apr 2023 01:35: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 33I1ZiZ6042440; Tue, 18 Apr 2023 01:35:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I1Zi9l042439; Tue, 18 Apr 2023 01:35:44 GMT (envelope-from git) Date: Tue, 18 Apr 2023 01:35:44 GMT Message-Id: <202304180135.33I1Zi9l042439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: d711884e60bf - main - Remove unionfs_islocked() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d711884e60bf55c9572e1882ed1b4645a4aa1ce6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=d711884e60bf55c9572e1882ed1b4645a4aa1ce6 commit d711884e60bf55c9572e1882ed1b4645a4aa1ce6 Author: Jason A. Harmening AuthorDate: 2023-01-16 21:50:10 +0000 Commit: Jason A. Harmening CommitDate: 2023-04-18 01:31:40 +0000 Remove unionfs_islocked() The implementation is racy; if the unionfs vnode is not in fact locked, vnode private data may be concurrently altered or freed. Instead, simply rely upon the standard implementation to query the v_vnlock field, which is type-stable and will reflect the correct lower/upper vnode configuration for the unionfs node. Tested by: pho Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D39272 --- sys/fs/unionfs/union_vnops.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index a0ff5c140e82..0da5ecb61bb2 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1852,24 +1852,6 @@ unionfs_print(struct vop_print_args *ap) return (0); } -static int -unionfs_islocked(struct vop_islocked_args *ap) -{ - struct unionfs_node *unp; - - KASSERT_UNIONFS_VNODE(ap->a_vp); - - unp = VTOUNIONFS(ap->a_vp); - if (unp == NULL) - return (vop_stdislocked(ap)); - - if (unp->un_uppervp != NULLVP) - return (VOP_ISLOCKED(unp->un_uppervp)); - if (unp->un_lowervp != NULLVP) - return (VOP_ISLOCKED(unp->un_lowervp)); - return (vop_stdislocked(ap)); -} - static int unionfs_get_llt_revlock(struct vnode *vp, int flags) { @@ -2790,7 +2772,7 @@ struct vop_vector unionfs_vnodeops = { .vop_getwritemount = unionfs_getwritemount, .vop_inactive = unionfs_inactive, .vop_need_inactive = vop_stdneed_inactive, - .vop_islocked = unionfs_islocked, + .vop_islocked = vop_stdislocked, .vop_ioctl = unionfs_ioctl, .vop_link = unionfs_link, .vop_listextattr = unionfs_listextattr, From nobody Tue Apr 18 01:35: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 4Q0mhf1Cs4z45VYt; Tue, 18 Apr 2023 01:35: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 4Q0mhd43sVz3K5D; Tue, 18 Apr 2023 01:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qZRXxTbX2nu46NRwPSmMSSM7MnxSkRLd8CD+PGDTlEs=; b=xP2nrNXjSee88yI/yiPRlcS5GcqC5nrmUlQBWBR+aPbr5Dbi4YbePRNV1JMAieX3kyfYVm z8Sh9+JN2WMTDjSh2Im0abzPc4PRgcaBCQzZ3iwPbJcgyneWPKfx1kY9P1o3Ocv4YhZrRl Ek6n1dUDDZK58EnbB0zg+gA399GQyzpRZc4qQfNNGXlA6kFac9ix7/QrSrhX6VbHSyr9pe a8OaFkJlt9AUWsUnS6XPlmUs3fJYeT1B8XeN6eeerjFNJhsjCXjq3H6SfvBCGH7Dnk0d6t iPuOkH17gjoFlBpTTysiy4tvS2KdGKuowqJIVpHvB3yKdmR1ZcB1iZxw0vSC2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qZRXxTbX2nu46NRwPSmMSSM7MnxSkRLd8CD+PGDTlEs=; b=oPZAj6rBFf0DtQOyqyvB64dlfBFpGq3ikF3OtMtoN46L5PogV39rFCb0l+GrmgN8zGwbWt EznaRJN7rTgbGPKLGRDqZMBWQiw7GdDut29reQeru6biGBeedgjxox0JZeoX3HPvRNSNHk +SAnXJjIcD2lkR04OW/zC55F/FKWgr7+pZeP3lFp5d6W6KivLlXfX3tIzocUtwYw5T36fo zMey39e3vE15eFTFK1C/iJc4ViOvxjirp9LaKV8/+utW49sv3No/QMKRDnlB75JlOS3Hup FjlH/5Hlpy1vHpqxE6NkcEfrDkyHXLcg6fqxJ3VrEp9/5/cCMh4Mwr6P6c+QPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681781745; a=rsa-sha256; cv=none; b=PmYnahAbgpzzMcvqH6Ip0+c9/ubogog/WBq2vOf/9kG7W0WBWNfP7yMW2GuqhCO3dIbK9m LpQNgOOTu9ASAG17nlfx+4vR8YDT+QpUXnXVR7oobahbuwQRNb7wMKOOfgz7rdm1HGYV7d qLc1qcSH3ridz9uaDwYobLMKPIKMr3oA/Fg6M/mUSetQw5eci1PD7e5e5kINWJK6GuE4zE m4O9h/jwjx23fMNmxSWYCdVIGVkgWhh7lNxmiCNLHzeQyv81+GZJKJ7fmFuXYI1VthaYGV 8QMnHL1BcghHigqXVrCIRc8SdU8euR1XrlgQch8fO+dCZl3uDtoJC2d+g/5o5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0mhd2vwJzsY6; Tue, 18 Apr 2023 01:35: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 33I1ZjMU042464; Tue, 18 Apr 2023 01:35:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I1Zj6q042463; Tue, 18 Apr 2023 01:35:45 GMT (envelope-from git) Date: Tue, 18 Apr 2023 01:35:45 GMT Message-Id: <202304180135.33I1Zj6q042463@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 93fe61afde72 - main - unionfs_mkdir(): handle dvp reclamation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93fe61afde72e6841251ea43551631c30556032d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=93fe61afde72e6841251ea43551631c30556032d commit 93fe61afde72e6841251ea43551631c30556032d Author: Jason A. Harmening AuthorDate: 2023-01-16 21:50:59 +0000 Commit: Jason A. Harmening CommitDate: 2023-04-18 01:31:40 +0000 unionfs_mkdir(): handle dvp reclamation The underlying VOP_MKDIR() implementation may temporarily drop the parent directory vnode's lock. If the vnode is reclaimed during that window, the unionfs vnode will effectively become unlocked because the its v_vnlock field will be reset. To uphold the locking requirements of VOP_MKDIR() and to avoid triggering various VFS assertions, explicitly re-lock the unionfs vnode before returning in this case. Note that there are almost certainly other cases in which we'll similarly need to handle vnode relocking by the underlying FS; this is the only one that's caused problems in stress testing so far. A more general solution, such as that employed for nullfs in null_bypass(), will likely need to be implemented. Tested by: pho Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D39272 --- sys/fs/unionfs/union_vnops.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 0da5ecb61bb2..6c8086a6c7c5 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1389,6 +1389,7 @@ unionfs_mkdir(struct vop_mkdir_args *ap) { struct unionfs_node *dunp; struct componentname *cnp; + struct vnode *dvp; struct vnode *udvp; struct vnode *uvp; struct vattr va; @@ -1400,17 +1401,19 @@ unionfs_mkdir(struct vop_mkdir_args *ap) KASSERT_UNIONFS_VNODE(ap->a_dvp); error = EROFS; - dunp = VTOUNIONFS(ap->a_dvp); + dvp = ap->a_dvp; + dunp = VTOUNIONFS(dvp); cnp = ap->a_cnp; lkflags = cnp->cn_lkflags; udvp = dunp->un_uppervp; if (udvp != NULLVP) { + vref(udvp); /* check opaque */ if (!(cnp->cn_flags & ISWHITEOUT)) { error = VOP_GETATTR(udvp, &va, cnp->cn_cred); if (error != 0) - return (error); + goto unionfs_mkdir_cleanup; if ((va.va_flags & OPAQUE) != 0) cnp->cn_flags |= ISWHITEOUT; } @@ -1418,13 +1421,35 @@ unionfs_mkdir(struct vop_mkdir_args *ap) if ((error = VOP_MKDIR(udvp, &uvp, cnp, ap->a_vap)) == 0) { VOP_UNLOCK(uvp); cnp->cn_lkflags = LK_EXCLUSIVE; - error = unionfs_nodeget(ap->a_dvp->v_mount, uvp, NULLVP, - ap->a_dvp, ap->a_vpp, cnp); + /* + * The underlying VOP_MKDIR() implementation may have + * temporarily dropped the parent directory vnode lock. + * Because the unionfs vnode ordinarily shares that + * lock, this may allow the unionfs vnode to be reclaimed + * and its lock field reset. In that case, the unionfs + * vnode is effectively no longer locked, and we must + * explicitly lock it before returning in order to meet + * the locking requirements of VOP_MKDIR(). + */ + if (__predict_false(VTOUNIONFS(dvp) == NULL)) { + error = ENOENT; + goto unionfs_mkdir_cleanup; + } + error = unionfs_nodeget(dvp->v_mount, uvp, NULLVP, + dvp, ap->a_vpp, cnp); cnp->cn_lkflags = lkflags; vrele(uvp); } } +unionfs_mkdir_cleanup: + + if (__predict_false(VTOUNIONFS(dvp) == NULL)) { + vput(udvp); + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + } else if (udvp != NULLVP) + vrele(udvp); + UNIONFS_INTERNAL_DEBUG("unionfs_mkdir: leave (%d)\n", error); return (error); From nobody Tue Apr 18 01:35: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 4Q0mhg5ZZQz45Vfv; Tue, 18 Apr 2023 01:35: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 4Q0mhf4mLxz3K5V; Tue, 18 Apr 2023 01:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OBZ54CcvpwvpXB13QMqhWt4laxjJm7ELRWQrGTRrwR4=; b=bWfguBw+gnHIRDnlybqRKYkyQ24Pi9o2GktrkGaYDfZ8D1QvD9bx6OoAyl3R27u+b6qJ6j +THxjpOGmuTBXxbPx+xkjGf4vA1VUsjnd2wIS3oQO64Zqy3B9yJU+PhEKtsE46NxikCFtN Ww+hoK0qRTKT3u1VS4avAqWvQMS/kwz7blbPRO+sdexro6Ilyn8JULZkP/jOSaT9U5E406 rqVP46Rltj8EhiO7Wl58gHNTGRGycKq+YG5Le75Gyn8BvHMKgqz7TNO9Oc8VsNRYHx8Cmw hsSY2+5RwYqtVfC3FyQxQoPZWtCgop/PK1P7Em/RaRQwb4yeOnlXpynaNlucfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681781746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OBZ54CcvpwvpXB13QMqhWt4laxjJm7ELRWQrGTRrwR4=; b=tcQtUT+MIq7gQpjb06lk9/4MVK5mIM3H4suB7BBshR80R8/n8KP8i4l0yCzAiu2CnuHr1b mwYHB71Qd8nFNL7au81t7iuNUCOVae1s6rX8vsZQqkhNLlkZ3ALv3VPhB4lIRV0LI3Yugl 0+ogCzvK3blakl77TVcI5PgkiPrSKYOuYO8kSiNsURN2czp3O9nJ0y238ZaE+WJk+TCOCC 6n+gZjCHkN1cS0k4lHNG9CZaMGUXCqGrXxV2bB4Bhr0W0RloBm1kRKCjCYdR7r7qPqYrFF d02Pj7cwMroNyWTY4w44hthwzStHndxRP40lzxU+kuT0/2UUCHY5pknKaQ+gVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681781746; a=rsa-sha256; cv=none; b=jHNKLM7bZn0tgWBlB33r24ZDbTBTysOdHRYxZnloQa+X2K96+TnD4oAOHGjr2l4GF//Wef IVU4l0KNEo0D9l4jUhlCBwGUaYUqtRGpLg9zVedCZpZ4Wjd8eZSRE6B7r2U1Hs/HYorDln Tc9RBG35hMAdsiHbnlRZbJQZWoRaBWfnR4JnAKGSHn5iQsM5zc4LPDHxsVH1LadjmZzROm Ls1t2wtCSytYYbF28saiZa0ubwXEw1dpYf1nos5Oh7RFWQvLH2WT3bftolHREV2rhIHwSC wil2GdNM2aqlWKihjF5qna7qHnZzGhdy7BfppvpaerAKMQ4m4QP3GLSLcvargA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0mhf3rcBzsVd; Tue, 18 Apr 2023 01:35: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 33I1ZkSQ042483; Tue, 18 Apr 2023 01:35:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I1ZkJs042482; Tue, 18 Apr 2023 01:35:46 GMT (envelope-from git) Date: Tue, 18 Apr 2023 01:35:46 GMT Message-Id: <202304180135.33I1ZkJs042482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 0c01203e4725 - main - vfs_lookup(): re-check v_mountedhere on lock 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: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c01203e472567017da3e525e409c83bd5418a75 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=0c01203e472567017da3e525e409c83bd5418a75 commit 0c01203e472567017da3e525e409c83bd5418a75 Author: Jason A. Harmening AuthorDate: 2023-03-28 18:06:29 +0000 Commit: Jason A. Harmening CommitDate: 2023-04-18 01:31:40 +0000 vfs_lookup(): re-check v_mountedhere on lock upgrade The VV_CROSSLOCK handling logic may need to upgrade the covered vnode lock depending upon the requirements of the filesystem into which vfs_lookup() is walking. This may involve transiently dropping the lock, which can allow the target mount to be unmounted. Tested by: pho Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D39272 --- sys/kern/vfs_lookup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 172aa4b4f576..d9a9cabde177 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1280,6 +1280,9 @@ good: error = ENOENT; goto bad2; } + if (dp->v_mountedhere != mp) { + continue; + } } else crosslkflags &= ~LK_NODDLKTREAT; } From nobody Tue Apr 18 03:21: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 4Q0q2w1Xfpz45cPx; Tue, 18 Apr 2023 03:21: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 4Q0q2w0KfMz4BGw; Tue, 18 Apr 2023 03:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681788104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8DYbPrBTEB9UPOnPGQ0wAe2LPE0YGDlHu89/F2eSMAA=; b=tkvC657Qwq8kZbqkc+LIP6DwB3OD9LbGBiaTzebKP1t3Qly8V+BRvVBywIIeOup+t+rhaE sGhHmavoHCc0yomfRy01+BH+KSCXLQzqVnmgqG1uALmAljaw0528akM9mcYXckk9QJYfrL UVuLgO05Ii0R3aQNf1NN/VlD2HPxzLWjYkhbGlTb2O9pvVu/Lh35q3qWJ4ERYqin4GzpEZ sWwtBfLnCWlWZCSP/iJAdwJew+/NL1W6IESxiqHtUYes6MFsmQrG/SzL6BczAqWrL5G1dP niULShu09XxO3hN6232YoiQTASMX5JUxjVXoO682qoeUOpSgvgrpB3E4Vm+GcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681788104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8DYbPrBTEB9UPOnPGQ0wAe2LPE0YGDlHu89/F2eSMAA=; b=lAcrmTXCly27dg7AnnVJSPNjqVFo8ArE79DwJPI01Fw81fwlqO/t3jCYcvoQ5h6MWCcqcD I5GD/gtnL8/dNKQB4lhWCcnFGDCwE/RJbfnaxqUSfbMPSoKDl28f+OqqKnAr8qU1eNZ6lf m9FE9JXSQAgkwgGeVRS96e3hcXCGXcx96VrrhDYZg/rhRLY5uEuW2W3CB/BDBwWormSWEe AAb/yduK1GqwKNJFYSGal9QUR8bWq5Ire9tuX++/qeZBaCcJO3wm9PnJYmkfHgTri5bYM8 83TAyJSPrzwiu8/5Xx6MB3Coa474FUfsnWB6VYWT+7fwunw3NDkZWck9cQHXig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681788104; a=rsa-sha256; cv=none; b=BRVFKktE5+TxHik8bRimJFBcCFmUUjrkLhg6CuxToRkiehvZanst+dVOV6cGfkBTV+wnjT ykJEjAaCJf1sUaGMEeR4MlufkeqN/IYL0XZKtQWL70Kp6H6He4poO98/BDi5dIO/1gZIqI rSkB8ZxlErQ22O8BL4Vqp8czwOUtaA4i/O/uUtyTeEUtxTfBtiLYhvQBsxFhxX+WajB7wT uriZnEreKRoZVbEbE4L/5puyaeErhRqgGemQubkI/71QKNLA29A8Bpr16oOnFnj7pMoRMQ cocV5w4bobL7aThgGbBwoj9IRsfWNYELf/X4fAANslxZpfFCikGCBGAGBF0xSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0q2v6VXhzw6c; Tue, 18 Apr 2023 03:21: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 33I3Lhju024030; Tue, 18 Apr 2023 03:21:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I3LhxW024029; Tue, 18 Apr 2023 03:21:43 GMT (envelope-from git) Date: Tue, 18 Apr 2023 03:21:43 GMT Message-Id: <202304180321.33I3LhxW024029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: b5c3ade7657a - main - libsa: Update comments about SMBIOS specification List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5c3ade7657a0ebb0c0f829d90919858a39dba94 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=b5c3ade7657a0ebb0c0f829d90919858a39dba94 commit b5c3ade7657a0ebb0c0f829d90919858a39dba94 Author: Stephen J. Kiernan AuthorDate: 2023-04-18 01:36:37 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-18 03:21:04 +0000 libsa: Update comments about SMBIOS specification Summary: Include details from the SMBIOS 3 specification and some additional details for SMBIOS 2.1. Obtained from: Juniper Networks, Inc. Reviewers: jmg, manu Subscribers: imp, dab Differential Revision: https://reviews.freebsd.org/D39635 --- stand/libsa/smbios.c | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index 1bb78faa3b01..257aa15bd5f5 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -43,16 +43,51 @@ __FBSDID("$FreeBSD$"); * * System Management BIOS Reference Specification, v2.6 Final * http://www.dmtf.org/standards/published_documents/DSP0134_2.6.0.pdf + * + * System Management BIOS (SMBIOS) Reference Specification, 3.6.0 + * https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.6.0.pdf */ /* - * 2.1.1 SMBIOS Structure Table Entry Point + * The first quoted paragraph below can also be found in section 2.1.1 SMBIOS + * Structure Table Entry Point of System Management BIOS Reference + * Specification, v2.6 Final + * + * (From System Management BIOS (SMBIOS) Reference Specification, 3.6.0) + * 5.2.1 SMBIOS 2.1 (32-bit) Entry Point + * + * "On non-UEFI systems, the 32-bit SMBIOS Entry Point structure, can be + * located by application software by searching for the anchor-string on + * paragraph (16-byte) boundaries within the physical memory address + * range 000F0000h to 000FFFFFh. This entry point encapsulates an intermediate + * anchor string that is used by some existing DMI browsers. + * + * On UEFI-based systems, the SMBIOS Entry Point structure can be located by + * looking in the EFI Configuration Table for the SMBIOS GUID + * (SMBIOS_TABLE_GUID, {EB9D2D31-2D88-11D3-9A16-0090273FC14D}) and using the + * associated pointer. See section 4.6 of the UEFI Specification for details. + * See section 2.3 of the UEFI Specification for how to report the containing + * memory type. + * + * NOTE While the SMBIOS Major and Minor Versions (offsets 06h and 07h) + * currently duplicate the information that is present in the SMBIOS BCD + * Revision (offset 1Eh), they provide a path for future growth in this + * specification. The BCD Revision, for example, provides only a single digit + * for each of the major and minor version numbers." + * + * 5.2.2 SMBIOS 860 3.0 (64-bit) Entry Point + * + * "On non-UEFI systems, the 64-bit SMBIOS Entry Point structure can be located + * by application software by searching for the anchor-string on paragraph + * (16-byte) boundaries within the physical memory address range 000F0000h to + * 000FFFFFh. * - * "On non-EFI systems, the SMBIOS Entry Point structure, described below, can - * be located by application software by searching for the anchor-string on - * paragraph (16-byte) boundaries within the physical memory address range - * 000F0000h to 000FFFFFh. This entry point encapsulates an intermediate anchor - * string that is used by some existing DMI browsers." + * On UEFI-based systems, the SMBIOS Entry Point structure can be located by + * looking in the EFI Configuration Table for the SMBIOS 3.x GUID + * (SMBIOS3_TABLE_GUID, {F2FD1544-9794-4A2C-992E-E5BBCF20E394}) and using the + * associated pointer. See section 4.6 of the UEFI Specification for details. + * See section 2.3 of the UEFI Specification for how to report the containing + * memory type." */ #define SMBIOS_START 0xf0000 #define SMBIOS_LENGTH 0x10000 From nobody Tue Apr 18 04:11: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 4Q0r7m4YXtz45ftt; Tue, 18 Apr 2023 04:11: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 4Q0r7m2kGhz4JZf; Tue, 18 Apr 2023 04:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681791060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03hvhAt657TZB+kcDWpuap+anoYwM2r7tx4mgm/81/k=; b=cD76kgEbLZZI5zUVcr6jQVRoUPA+SlyCC523iF4FCqBcwbx36RP5058plzUegij25kMOBU vj3+56OWSxm1YLP57L1H4tWseeQ/PGsqvMbOPxDSB/uNM1wcV7UUv4C5QEUig7uOiOASWo Qj23HaWnP6KnqIlQreO3DLcd3wSYVDbgYpeFW64gILZFkDc7aeOHB8BP5+zbE2o7XCWirw 1zosVha/6CE9tDJcRGQuXe8p/W44MlRmJI8XP2ocf0YchtXtlDCc35GF/QG7RTxThZvFbd FZBe3E06vNgXmT9HjJOPWSN3aU+nxZH+rK3JCC5cfb5o+OMEzOFOAHPIRxY+Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681791060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=03hvhAt657TZB+kcDWpuap+anoYwM2r7tx4mgm/81/k=; b=iqK7nyq07sdhmmQ2LJW944M06wi/n+U7Wb0COxQXazsoDcISUZ+7ximE34flzt//fMIdnm XMtibeGFzFosSHOdwXWoIGg8qCA/gLopr9znd0pTDpYLUYjyIE1nTRLaXpMeyZpo/wfJjL 3MemJpq08regD0uWm49HHsj3q/0TL3Lk3EhJf3bndD4VpwZpdOn827DW34jnHcXs0G176R xIax+XhDXbebhtPVrpJL3e+mp+QZxIPbysMuWsV+qMZhyfw+Qb2cxcITxdQH/BCDTUHDhd GmOdpUEUqUaWxB8OxT15iKqP2cYwmnrFAQI72qcVQxKq0U1RQh2/clUj10q1cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681791060; a=rsa-sha256; cv=none; b=I2cXyYqa+FXFNY32q2MnreFMMbDvV9QdCMZeBWM/AEwb2Zq+yuzEiA+elgk1bXYHfKEqal 7RbZadeBH5fei7tGXqzT8onYbKy2jjS6fzRzJ+J0ZPNPIUDSnOH95qA56rH1eQ1/gCarM9 lFr0oH+F+YptUdlOYmbL91KCbcW/BKZTLUCiRqcF12D6LzYt+YEFvOakw6m3PSNTaaDwk1 0d23BmGmCdlH1Zo8X6z17ZOiimUH6kOMtWFZkiCowgNy7ap2bJwJs6nQ3TNhl71BHBjDnf 9s4Dlz/n0dXwNm1Z2h5ISlqNN/W1G6BoRbaOg6GAVU55rbsL+ZQjjAWl+CJupA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0r7m1L8mzwf3; Tue, 18 Apr 2023 04:11: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 33I4B0Ma003382; Tue, 18 Apr 2023 04:11:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I4B0mI003381; Tue, 18 Apr 2023 04:11:00 GMT (envelope-from git) Date: Tue, 18 Apr 2023 04:11:00 GMT Message-Id: <202304180411.33I4B0mI003381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: a545623b612e - stable/13 - kern: remove a double word in a KASSERT in subr_trap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a545623b612ed635420eb69060e2530913f7aa04 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=a545623b612ed635420eb69060e2530913f7aa04 commit a545623b612ed635420eb69060e2530913f7aa04 Author: Gordon Bergling AuthorDate: 2023-04-13 18:03:37 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 04:10:34 +0000 kern: remove a double word in a KASSERT in subr_trap - s/with with/with/ (cherry picked from commit c159f76713d7c1cbfdfc0c81dd91a5483096cf6f) --- sys/kern/subr_trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index be5041fe516f..61db62ae2b08 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -188,7 +188,7 @@ userret(struct thread *td, struct trapframe *frame) KASSERT(0, ("userret: Returning with sleep disabled")); } KASSERT(td->td_pinned == 0 || (td->td_pflags & TDP_CALLCHAIN) != 0, - ("userret: Returning with with pinned thread")); + ("userret: Returning with pinned thread")); KASSERT(td->td_vp_reserved == NULL, ("userret: Returning with preallocated vnode")); KASSERT((td->td_flags & (TDF_SBDRY | TDF_SEINTR | TDF_SERESTART)) == 0, From nobody Tue Apr 18 04:11: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 4Q0r7n5zyxz45fbB; Tue, 18 Apr 2023 04:11: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 4Q0r7n3S8Pz4Jp8; Tue, 18 Apr 2023 04:11:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681791061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/DjHcP2ly/yTPhgDAXY+KGgq3o0lVsUW32SnulExuNU=; b=eDPGIRkeKz8OwJSUTC/Uwby59DCDXTGGjy3TDrQ8lIQXxoueI7MAGpp4v5mpIu1xNuhfZa 4H/AgKdFaJ3A4M3ZHrqgm8iFAi3QqRoLCh+uvMk2wkHPbrbWFTxYsVKGWOTrOaOESJjfa5 qIQ6xU+57jVFNkMbiS/TZt04c2XKP5RwnrQ+mUiGAcwhwyBw0zDD/k8vlZNvt7CzQ1MFJE CbGkYjW9+UW3pC84clnoSo20X6KA9Jt2H+mz9Nx/s51pbxLQdohlf93rFbgQbDrUfhe7Ky vpFdiiRNk/dPSunNORTw+AKJjtsGfPdKXgpAnUyAzgf7huAqD7t7vsKiNGH0jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681791061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/DjHcP2ly/yTPhgDAXY+KGgq3o0lVsUW32SnulExuNU=; b=FUzuS4b2R5DvyNlX2JH0ZbDLi3OC1Q/Nm78Rttm9YCMAywP3+oGobZMuf0DawTHGMFROJB VzbFPS+vSpkPYnNWCGFgu6aQPHomcGe4eIxiVfeNoqqRKCQfQqz/bavAqFwXdNVQvBtLf+ COwhFtJ/tjyX2HTCF561K04/tv96nqSCd10Lv+EH0fOTz6UFmpoE/hC+9Vy4+DqLTZr/SI WVQssjVGHyS75Vy3H/LFlisUVNFxPsht9znHGTdJaVL4n0R86CZyoVxRQY4A5QRjTOGhhS 4F3wjCL+US7KYnu3TChS4HM/7N8KC+yX0HsvC9KEIHeWFdOWtocAVkHb/4pG7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681791061; a=rsa-sha256; cv=none; b=RNHFHdV3SFi4TbvabBBcZ7W9VaVTBZr1NqvqmeiEgE7BqpS/h6UOv3aC6tiQb/T7VpPtL7 I6eEoGBeUxc6/9CVXnm2N29IQAy9G0zY1DadSSgJipNyyVPGtA4ML3JZgHJ+HuE41gVyRT aso1XF3DO6rS+OtGZESf8xYEP0mK1XAWy8LYLjD9F/V6b9cPMt6Rxz3OsK1GHFjJ8xiNFx J3AoLFU/D+dYaeJgF8h7HEA9QSOOtrLndkILj6kAesnFRViJcr5M/IXidKKUYhIIAYWKgz qFRiHadaPunc5MoDuihVUOCZ8QPHiUTYGYFgYSQiUcHr9XEe4RviTrvIRFROUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0r7n2Ynhzx8t; Tue, 18 Apr 2023 04:11: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 33I4B12u003416; Tue, 18 Apr 2023 04:11:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I4B1tW003415; Tue, 18 Apr 2023 04:11:01 GMT (envelope-from git) Date: Tue, 18 Apr 2023 04:11:01 GMT Message-Id: <202304180411.33I4B1tW003415@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 0b5e6fa6cdc1 - stable/13 - arm: Remove a double word in a comment in setjmp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0b5e6fa6cdc19bd3c059d3b2e46fc07621655a48 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=0b5e6fa6cdc19bd3c059d3b2e46fc07621655a48 commit 0b5e6fa6cdc19bd3c059d3b2e46fc07621655a48 Author: Gordon Bergling AuthorDate: 2023-04-13 18:37:25 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 04:10:49 +0000 arm: Remove a double word in a comment in setjmp - s/number number/number/ (cherry picked from commit 26713ad9cf18b6ecd37f862182c84c1e57aee091) --- sys/arm/include/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/include/setjmp.h b/sys/arm/include/setjmp.h index 2090c5d15f40..490df1036e2b 100644 --- a/sys/arm/include/setjmp.h +++ b/sys/arm/include/setjmp.h @@ -44,7 +44,7 @@ * 44-45 d14 (vfp register d14) * 46-47 d15 (vfp register d15) * - * The magic number number identifies the jmp_buf and + * The magic number identifies the jmp_buf and * how the buffer was created as well as providing * a sanity check * From nobody Tue Apr 18 04:11:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0r8N0jHGz45g1s; Tue, 18 Apr 2023 04:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0r8M6sSxz4Knv; Tue, 18 Apr 2023 04:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681791092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DF7y2cHDjfzXrQhdD8pwdyYuDjANWFSaCiW5odYAjM=; b=OH5YtHNUu4ir9tnEqOggURiC0S9vc1mQ+0Fx6WijTyXq/rc8LYGDrsMX9ByNleUsgq7YwP zvRR4tQHs0lDxShgu1YAdd8OXW9BN+rXSgi+1wTF+U9T+OMhaJCBpHb8LWMU4+RqX3KZuT dCQIyeb5j62XD/iUDhLjH9vmxFB6gzrUQDJ0T9upWNUG2xXK3r4DRHjckbkXMYHCPiEhOd SPlvVI1900wGJqMv24pSl5m9gRreN4URu1WX0YIONHTKmd1l3J+Sd1L+EKeisV+c1CVs7r oytUPP6q7+EagW/q1UQcUwG3Jdn5FY5JZM/EKD+tU0FrDV3qlFJEoIN20n0+/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681791092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DF7y2cHDjfzXrQhdD8pwdyYuDjANWFSaCiW5odYAjM=; b=M7MiSM6MN2q5Y2NxCinHGiNNsm+Nt0bCHJi3aU+5/36TGvebWAxyzR/O6XLufHgfjlYXS1 1v6h7pQEOyD2uPefoL3Mn5uRnxqiqX377hdFzV0A89mJE56Z4KAbXEFy4fg3oyxYQjhIfe tncHMHglFigHo8YmQDzILgved95YSDqsCRDOsmfl4hRlVzqDGaGoNZFY//KTXbsJhp/8GT zLcWuG4S1pfIkvr2TkTaq42PC5PIPrufMe/Jgbi4eoF6ckvX0vd8RAsK+hHa9S3mUUcZmD XDxtbFCpB1SLMVbxA8rJKf2emrYnF+Q3accMkmXX5oDCWKRRh3KrDVNuK0LdhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681791092; a=rsa-sha256; cv=none; b=F/a8TT1qTLMGAcu5tlaUP//qpcfO08pPgsIzvnvWn9b6vgozbfx3r+1t/AUJd98zbhmSjE 31+V3qpD4YqGxcVOs2Pp9xK1fs8S/cybc14UwXYuUAGD/54bGJpVqjYX9sDshkBVV12Unm 82ZMp9At3QqtbaOCYA75wsrxqExPD19OoHeKBUHQQPC2IXLNSmMhD9pluISFPTpGaNU8zt PSqQuy7/kG/qPJrgW2vG+C4s95R4i4UNFjScJW6cxHw+GxKVzvYdYsrhkfglWo5bpm+gvA X/LBIWG8ePelu+CcWbxcQVA2w4OxUq3cr0ErZPge0wnaDWXGlef35oZiThmAbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0r8M5wwwzwry; Tue, 18 Apr 2023 04:11: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 33I4BV2r006491; Tue, 18 Apr 2023 04:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I4BVir006490; Tue, 18 Apr 2023 04:11:31 GMT (envelope-from git) Date: Tue, 18 Apr 2023 04:11:31 GMT Message-Id: <202304180411.33I4BVir006490@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: e04514c9aab6 - stable/12 - arm: Remove a double word in a comment in setjmp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e04514c9aab697b470632ca83aa23dcde0e7855f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=e04514c9aab697b470632ca83aa23dcde0e7855f commit e04514c9aab697b470632ca83aa23dcde0e7855f Author: Gordon Bergling AuthorDate: 2023-04-13 18:37:25 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 04:11:19 +0000 arm: Remove a double word in a comment in setjmp - s/number number/number/ (cherry picked from commit 26713ad9cf18b6ecd37f862182c84c1e57aee091) --- sys/arm/include/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/include/setjmp.h b/sys/arm/include/setjmp.h index 2090c5d15f40..490df1036e2b 100644 --- a/sys/arm/include/setjmp.h +++ b/sys/arm/include/setjmp.h @@ -44,7 +44,7 @@ * 44-45 d14 (vfp register d14) * 46-47 d15 (vfp register d15) * - * The magic number number identifies the jmp_buf and + * The magic number identifies the jmp_buf and * how the buffer was created as well as providing * a sanity check * From nobody Tue Apr 18 04:21: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 4Q0rNF0KJnz45glp; Tue, 18 Apr 2023 04:21: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 4Q0rND6CGWz3P5v; Tue, 18 Apr 2023 04:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681791708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s875PnYcJ7BwUDloTMIROCI6Uboj7oRuDG1yR8H0wss=; b=h7CdmKMSUVv3e2nFWSPEmceBcqbEzuRo3V9iIqCyz0YHfFfHJ2dD7ZHm7s7Qil4ezTLGlh SUPfc1F9NYk+Ms5/eC1aZhpb2wGQDVoD5ghMto88w6D2MD1GgTO/knw+YEI2nCAZ4lBGOS Ho5OjZsKD6pJjTL18vNlssHvcN8KREJDgDLQIDs55URvhOpHv2K6+ttQDxKYQBzuLFohZX 5jJCA0vYMk+WGrLCT9imHmdR6QkDMaL2oSXCm2QOco+iJ6ZPrIr9vtXdiErmdwzSfznB1N O7jxb6fQLbtMTV4+rIL12eT8GFYydT7yAYWHdrA/5+zN93qMGBHjK3GG3mHa2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681791708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s875PnYcJ7BwUDloTMIROCI6Uboj7oRuDG1yR8H0wss=; b=MgzuTVGTX0EGYjLqRkh2a8QAy/3vVnLG0MqOi0ZLrKLTO/HnZNsD6+hHTftiRYGAkC+IWy Q4vXoCsvKyqW+B0sRNKs1wSSFNa3F2KJE6sI33yeIfk3sv5Syurz6ZtE5Mq/JxnMt92ReB vSEcb7N2EqEbZYexivacGFSRAgUfoMr3l/fxy2PSjI6bu6bUrpY/heg4VEm+vAeFKtsnFE m8EmtfrefsLFhng341qH+HvI/lIYRWTAwE0JrGBCrq4i/RjrzJW+9x2HsivzP/IiU3BNU9 wkWXa3WiwzR7m44x4o/dFcbTHm6TvPM/JEuVBudtSzwRHU/pWcosVoesENjPzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681791708; a=rsa-sha256; cv=none; b=pBGM2aZzBxWUDZnD9CI4OkYSTsdn35R1axfSYkbKw6ZGD1xht58qwdZ02I9MSGPdzISm41 OTED/o3T/sd4XRL4s1xHth0HhPtrGNcb9xqbvfNMAqcZq8uIYirG6MCxH3fwkUnVvIhFMT +FzJk1pMejMdw7BAQJya7rMwcIZts2RCzsbNSI0l1jZCd8rV1ftTxqRc6Df7gmyFgWwNmu TRb8xnEA0iT0fwq65JW2iL9NNVr346ZB4Bkaksuwb8PZNor8IR1HeIO35jLmWjKT3BKypf A3S9Cx4xPF77vpOyWPbaQe5yNmc3j9OiLm+x/uuEGpP2JSHQAPqsRkJ7f3Rk3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0rND5JN7zxKd; Tue, 18 Apr 2023 04:21: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 33I4LmtQ022564; Tue, 18 Apr 2023 04:21:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I4LmvL022562; Tue, 18 Apr 2023 04:21:48 GMT (envelope-from git) Date: Tue, 18 Apr 2023 04:21:48 GMT Message-Id: <202304180421.33I4LmvL022562@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 76735c743989 - main - flash: Add "n25q64" to mx25l driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76735c74398923a8cfcba405cc568461890bbc4e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=76735c74398923a8cfcba405cc568461890bbc4e commit 76735c74398923a8cfcba405cc568461890bbc4e Author: Stephen J. Kiernan AuthorDate: 2023-04-18 04:17:14 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-18 04:21:17 +0000 flash: Add "n25q64" to mx25l driver This is for 64Mb Micron N25Q serial NOR flash memory Obtained from: Juniper Networks, Inc. --- sys/dev/flash/mx25l.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/flash/mx25l.c b/sys/dev/flash/mx25l.c index b57e9c9f8f77..7c00f3bcc22e 100644 --- a/sys/dev/flash/mx25l.c +++ b/sys/dev/flash/mx25l.c @@ -129,6 +129,7 @@ static struct mx25l_flash_ident flash_devices[] = { { "mx25ll64", 0xc2, 0x2017, 64 * 1024, 128, FL_NONE }, { "mx25ll128", 0xc2, 0x2018, 64 * 1024, 256, FL_ERASE_4K | FL_ERASE_32K }, { "mx25ll256", 0xc2, 0x2019, 64 * 1024, 512, FL_ERASE_4K | FL_ERASE_32K | FL_ENABLE_4B_ADDR }, + { "n25q64", 0x20, 0xba17, 64 * 1024, 128, FL_ERASE_4K }, { "s25fl032", 0x01, 0x0215, 64 * 1024, 64, FL_NONE }, { "s25fl064", 0x01, 0x0216, 64 * 1024, 128, FL_NONE }, { "s25fl128", 0x01, 0x2018, 64 * 1024, 256, FL_NONE }, From nobody Tue Apr 18 04:27: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 4Q0rVN16cRz45gyn; Tue, 18 Apr 2023 04:27: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 4Q0rVN0SnWz3nXs; Tue, 18 Apr 2023 04:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681792028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvUiVenr86o9u9wbC3NuHEvrQngOi6qsTtcQzpCEPLk=; b=icxu3ktfFlXZAaQO7n66TEIALEiPGDhgtRCH1fjmBZqHd11L6I2phEIcK+2Wh8J+m/ZWma k2YoIK6v90UP0QC6llVWJLwdlNpOwglVMeO4fF8xzmuCRmCljBO1/QaxUmxywB2vzrTvsL 0glhAjaEcMmaKCxF24qDswsl6fhLZo/7YD7H7wSfESccMSUWFVIt9jwQcej9DbBScsORUz fTjp4oKH9uXO8LB1Va22JbeJff19HrrD/BdQf8oTJx75mqzJhDTRZj9QeOKa2cqYWRgnP6 b9dtfGYuroeDw1wIINcDjryP4Lkr26fyfe6C0IT+DdPkkKLo+P0aZ6GgFwvrPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681792028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvUiVenr86o9u9wbC3NuHEvrQngOi6qsTtcQzpCEPLk=; b=QfUXzpE4JWaznX1vNFYWi8R2EJAJGCA+j0+bDseAu/4haSXNmHEBX8ee++m93EeqyUtPLp eGN908fzpy42GaQDqct9nqhQXg/Md6vJCxiJipsTQYhKpy6aX4gzdzitEkEah2ZUbOYcfw F3K8/WvUoflZ6yOppisI6hMy/LzIKHxHkgNiaI3MVVVzNPLqtaydGT9jxupdIN0hs385PZ uPhtFh3/fKlxVcU1gtFSyABCcnqVqUMIKlsbhVYXG3XAlFI/7OghUUHi5J0gfK50f4xkmQ oR23acp9sphB+pUetwhrochONa8u0YS8wibsklS4eG1/VkNTtRNJs5TGCP3s5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681792028; a=rsa-sha256; cv=none; b=sFWhLiqH9U9xnoTI7XJ12kk7mdtWqAIhnEKYVUkBOSUdULchdbWUaQ3TviRQzzdkPqXVO6 DFKLRBr/HubEOtM542YHtceYhNpebENLHvh3OzZ9NdA7lkuLj9gtjKhsaSoy+5a4yaald7 foCred7q4xAJMZc9KF9uxBzYQg1JEXQCMxPiqZbNxK+xqkXXgz2bNUzQQ4wuuKVjN51lV1 TlvGk9RM4Alcp3XFh/edkPP+7JeImD09NKzOI0MbnG2dzLq2N8YoIiYTi8hWsoJhk8Ot/A sAqp+2Qh7qyKbvSyJYO0N6CFd0Rhymvq8yc6VsQZIofMk7m0C/iWlztBrPqEUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0rVM6ZYgzxBS; Tue, 18 Apr 2023 04:27: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 33I4R7sv024378; Tue, 18 Apr 2023 04:27:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I4R7kg024377; Tue, 18 Apr 2023 04:27:07 GMT (envelope-from git) Date: Tue, 18 Apr 2023 04:27:07 GMT Message-Id: <202304180427.33I4R7kg024377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: d66465801525 - main - meta: Allow TARGET_SPEC_VARS to be overridden List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d664658015258eaaa50776db7b230669f91c6f9b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=d664658015258eaaa50776db7b230669f91c6f9b commit d664658015258eaaa50776db7b230669f91c6f9b Author: Stephen J. Kiernan AuthorDate: 2023-04-18 04:25:59 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-18 04:25:59 +0000 meta: Allow TARGET_SPEC_VARS to be overridden Reviewed by: sjg Obtained from: Juniper Networks, Inc. --- share/mk/local.meta.sys.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 5e477885e1e2..decbb087870d 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -52,7 +52,7 @@ MACHINE_ARCH:= ${MACHINE_ARCH.${MACHINE}} # now because for universe we want to potentially # build for multiple MACHINE_ARCH per MACHINE # we need more than MACHINE in TARGET_SPEC -TARGET_SPEC_VARS= MACHINE MACHINE_ARCH +TARGET_SPEC_VARS?= MACHINE MACHINE_ARCH # see dirdeps.mk .if ${TARGET_SPEC:Uno:M*,*} != "" _tspec := ${TARGET_SPEC:S/,/ /g} From nobody Tue Apr 18 05:15: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 4Q0sZ03bygz45kkH; Tue, 18 Apr 2023 05:15: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 4Q0sZ02jhPz3mpY; Tue, 18 Apr 2023 05:15:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681794920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=liQrMFUB5W9u9rSwk+cuCDtwRhuhok6wQHv7fgseJpY=; b=hiddqV74E4sSltwCKwl74wpR4JTGL8pz7ZVqw1BdR0pmfaFHt5iHghwzbFOL1dAaO1kTAn 64p0iBxGYqQgI7Zgr/58OGekh+/ChSs6lrM+330X4M/McrbvlvSKqe5GtfpSCSzFP0q+gm O7Qh0W2xjfKai2taREuGH7+gr05f/KPj98RWVWd0QVOh9HbBK1FPtncca/RutLRUvlGiEL dTlcaRmuVnmwN3olKoko38DSEHGm2+j3AxwKbRfLYbE9eavlV/iolyOw4U1LiJzsuiD+xe PPe7xhZUlsYHcuScf+I8HM/xwjsDEmq5na4wvtPta64V3nBik8DwJyPJpdKkAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681794920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=liQrMFUB5W9u9rSwk+cuCDtwRhuhok6wQHv7fgseJpY=; b=MSFL2n+28GXQa4U0PwSypNhirTCp2qR/zk490dELyz5T5lNfMKyZMDCDUA/koUuVktDaWv MQR+q3vfEtGRtk0JmZbxLIPKGrgAHQK7reMBgV3peFI1uqGGFiT/l24zBuujkLLhb0sPRe d05b3pbUj9de7/Eet8HgvnVPb+7c45tTylc2hkksHqzgfbpxot7hTc8m5gaeBsZt6Hubs2 6YGpsVd1umyIR7D5eHnBOIwONE0LCyjW9wW4OJAoI4G/VAU/WH5YCHAbGlNDt3rvmZXNMs bHOxpOxrxoEogBtRXftvKblN6rs8Cz9YKlvKzCFWxs56Okcrva0eXdWCmgp9qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681794920; a=rsa-sha256; cv=none; b=O9QLSk9tfCu4QPi6/3rQWJuzXvahEqqkAHE17t1MQIekHPMZT52Z7kM6k0vdPRqezzOCLF mQvrBEirR7cFOfkS/0cJw9tuE2rsYf1Egf3RpOQBYGi8iICMNoc1Gld/6JuM9x2RHuPD/O nuIcSqEeBiJ94qdwSaIOu/f6DlxYcCghBtw8BswKWerx97X3KQGbkowveSR1kbABrmHk4S 1+2MoLSjw/SvFn4BiK/bmw6WljbGatw9avWgI+HRzBbLct87mfyw+TUxude1TgcDNf4HMp RMp6hE1uiB4eoAV1dmYAWk488IkVOTcp9di/AThyeK3pTAQvRFHYgkGCQaG17A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0sZ01m6lzysV; Tue, 18 Apr 2023 05:15: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 33I5FKE0006762; Tue, 18 Apr 2023 05:15:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I5FKdK006761; Tue, 18 Apr 2023 05:15:20 GMT (envelope-from git) Date: Tue, 18 Apr 2023 05:15:20 GMT Message-Id: <202304180515.33I5FKdK006761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b12ccd0bb1b3 - main - stand: Remove double words in source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b12ccd0bb1b37f32e972bb3e945e4025fe409e2f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=b12ccd0bb1b37f32e972bb3e945e4025fe409e2f commit b12ccd0bb1b37f32e972bb3e945e4025fe409e2f Author: Gordon Bergling AuthorDate: 2023-04-18 05:09:57 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 05:14:44 +0000 stand: Remove double words in source code comments - s/to to/to/ - s/value value/value/ MFC after: 5 days --- stand/i386/boot0/Makefile | 2 +- stand/libsa/zfs/zfsimpl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/i386/boot0/Makefile b/stand/i386/boot0/Makefile index 1453f17751b9..dad078fd6f71 100644 --- a/stand/i386/boot0/Makefile +++ b/stand/i386/boot0/Makefile @@ -36,7 +36,7 @@ BOOT_BOOT0_FLAGS?= 0x8f # 0xb6 (182d) corresponds to 10 seconds. BOOT_BOOT0_TICKS?= 0xb6 -# The base address that we the boot0 code to to run it. Don't change this +# The base address that we the boot0 code to run it. Don't change this # unless you are glutton for punishment. BOOT_BOOT0_ORG?= 0x600 ORG=${BOOT_BOOT0_ORG} diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 76063e76225f..4a285470642e 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -447,7 +447,7 @@ vdev_indirect_mapping_entry(vdev_indirect_mapping_t *vim, uint64_t index) * * It's possible that the given offset will not be in the mapping table * (i.e. no mapping entries contain this offset), in which case, the - * return value value depends on the "next_if_missing" parameter. + * return value depends on the "next_if_missing" parameter. * * If the offset is not found in the table and "next_if_missing" is * B_FALSE, then NULL will always be returned. The behavior is intended From nobody Tue Apr 18 05:15: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 4Q0sZ14h0zz45kw0; Tue, 18 Apr 2023 05:15: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 4Q0sZ13WCSz3mZJ; Tue, 18 Apr 2023 05:15:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681794921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvkEmCahhjvivTrBOC4cCwFnjl4lPIpknhzvZ405c4Y=; b=QQ/uiMyzMhGhpstpToBTo2KIV21jWRJP5hFL1r0M7TlI98r+Hd5l3AuHeJF80DtYx0/zhj BUuZhhEWssWogf2KGTj7YV4sPOujb1zHy+6/plk+Qfu6De4Sh7dU7CBdPV6BXo9k24HevX OMlDeqa++Lq3GuNKxPM7RQJ19wzKJuPy4/Dw8S+yEi2RuIXoZsU99WfsJfzfWwIJBnQ1Vn yiOQgHTEVx4qWWePnNxquKEPpcemJcoRrP58Uz4TJykCCtBIeZYNnmggXL6+u8Bv2OWXkO lJe8X0Snn2qLYRvdm2GuppXT4WTuSKs7dq3TD08PDme49/rWZ+vaBdRtdjZE5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681794921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvkEmCahhjvivTrBOC4cCwFnjl4lPIpknhzvZ405c4Y=; b=Q3xOhzxKGv2Rs3scNnpmxZ4SS+cQjU+B9ks5hxgFGcZJzOkfhFMdkYaGEuM1043bAKmjjt AHcvCHtDWXkgX0paUWOInFQ+pD3i4oKYY0MxthNnqHxVjESqEjPzbuftXzV2hpZAwaXwJQ NSWN2/KEsWIlC5srgPs9y+ItR7zIjcMxB1+aZic75/uSUnJBW6/nlS7yly7iIx2eSBTHk5 B7ddJ8pCrgNnj9/1zh7uLd73e8tQukEReQ6t8M5DM+Z9VRI3feFtq5anIzAJGCVyq8YcTc IfrWsXs+PZhmhvYfLXaQNNUC7HNly15SDiJVVl7YvE8WLkBbm0CpbY/bLK7w5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681794921; a=rsa-sha256; cv=none; b=rAMGz/vyHWyAyDvE9Yg1RNIwBtL1ZKdrSOE3RlLV6sMqZBSgLFNOdyRjfbVdGZUxsint9B qgiYaUuAcR/iT90IKG25eW0Ox4giiZYfajMaE1u75FtTRa8zXhrZX6D88FwxG/VTaInGF8 IavaqHZ86w2APOKriBGx9jxwN78S6J3sDOOM2ySS13u8rBfiukI9bdtSsosy4W46zTM0hk Q+l8ZR5O4gpdEqSmQuiHl8xccx4+mA1K1WxQ1QO9Zs71cHw1NbqL8lm3ES7s/XoA5miKaP jekMsqvUVZMnNYJLimJKTucKP3PuiyeluTvu1TxBilARjqKDJc3E9yp3OnskBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0sZ123CMzySF; Tue, 18 Apr 2023 05:15: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 33I5FLYD006781; Tue, 18 Apr 2023 05:15:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I5FLCt006780; Tue, 18 Apr 2023 05:15:21 GMT (envelope-from git) Date: Tue, 18 Apr 2023 05:15:21 GMT Message-Id: <202304180515.33I5FLCt006780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 93e491481686 - main - net80211: Remove double words in source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93e491481686bb392b36a01e1569069846cf5f7e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=93e491481686bb392b36a01e1569069846cf5f7e commit 93e491481686bb392b36a01e1569069846cf5f7e Author: Gordon Bergling AuthorDate: 2023-04-18 05:11:43 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 05:14:50 +0000 net80211: Remove double words in source code comments - s/we we/we/ MFC after: 5 days --- sys/net80211/ieee80211_node.c | 4 ++-- sys/net80211/ieee80211_proto.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 8a31a4576b3f..2369b1458817 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1674,7 +1674,7 @@ _ieee80211_find_vap_node(struct ieee80211_node_table *nt, /* * Fake up a node; this handles node discovery in adhoc mode. - * Note that for the driver's benefit we we treat this like + * Note that for the driver's benefit we treat this like * an association so the driver has an opportunity to setup * it's private state. */ @@ -1881,7 +1881,7 @@ ieee80211_init_neighbor(struct ieee80211_node *ni, /* * Do node discovery in adhoc mode on receipt of a beacon * or probe response frame. Note that for the driver's - * benefit we we treat this like an association so the + * benefit we treat this like an association so the * driver has an opportunity to setup it's private state. */ struct ieee80211_node * diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index ec94f2cf7275..0e4b24abdec7 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -1683,7 +1683,7 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap) do_aggrmode = 1; /* - * IBSS? Only if we we have WME enabled. + * IBSS? Only if we have WME enabled. */ else if ((vap->iv_opmode == IEEE80211_M_IBSS) && (vap->iv_flags & IEEE80211_F_WME)) From nobody Tue Apr 18 05: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 4Q0sZ25qfLz45l0P; Tue, 18 Apr 2023 05: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 4Q0sZ24KYSz3n50; Tue, 18 Apr 2023 05: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=1681794922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYi7a7UlSfHxVhf7UGQCag/i3wGq02W58xZNKVQCE+k=; b=Sz0UajELKGBabU6sFiusXmAFLCCK2gm25mgxuu7EcOIyr0dpd0VW6Zm+IFjXa67lkw1Ald 6guXf4MLBG9TuhchifZ3YJT4gv3NzGGgWEeHCneYImqK9VDx9Z0I4s3LcirQiPHojUe3OR dONLws+2SCVft8H5ziLnEI8BU0QMSt1cij7BpQVLComP6+U0Qn7Eki0ZujlGpc3fKpc+4y GdTjC/Wevg/m6lDQquwv4rmWa4Wmwry4SNaM8egLKCvwTF/2SVuDC+ZE6TbHFO/ZygtBKi 850aEy0n5S8nePvZ1K1p4J0eG9O6mjxhUCdiIERhQfgrtwX0g2T9zBInMGh+9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681794922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cYi7a7UlSfHxVhf7UGQCag/i3wGq02W58xZNKVQCE+k=; b=Mu+PseLHHOlHtQoI9w0Tr94P3VWSoVIX5yHb4SQzZ4EZfR8bURdaX5Bo+R6RNltDa3L/zV B2fbqNE+lqe5Q9SjqzLsLfr3UBvKMf3aLhV42rtWadf/qzyaVrb/mv8lMntdDbbp8sKUNk mGd0GNmGEt29u6ArrSE3OsaVfMViCWoz42uGHFErJJgBKbUzKOczb5/IZV17QCxv4i7UTY pSv2Hi7vmFmonYqMRqQwS4Dpsgof3WiC5AcAKbyM0SV6Sp3cxPnxHFRyMlKH1p6OICoDfA AoiN6hc2LvNtB4r9ui0FzfP9umBbaLUSHvygOb5RnUhPC8szNSQerOuR5MfXAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681794922; a=rsa-sha256; cv=none; b=VgkuCOCSwHpn4K7E8c2uonPdxa7T/FnEegmLYQ+x7UP/F/vywJ06NIQfCTP3SB19prBzC0 tVWdiF+NaDj4LwBbUm+kCatqZ/6T+C7ww2vFHeUkNh0Dirky8cGKhxb6CF/FYRxHhX2qOI 5xad1WDtFfOVKK6ncHrn5o92BWvmocXesAGfpkAwsyQsFqwxXUWmQy+wQvTO9CPF9Tc3tt hSapfIDFNzqxSaBxiAJdfs4jGb01yl/nKcBj26Qth9MsE6ynnWwbKDC69wfL3JTnlJZPpf n0QLlI0b0q0+nSKSFBmf2HV+W+fY8bjmo6SWTrOoTKtgzf070Bntk6+creRN2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0sZ22mM8zyPG; Tue, 18 Apr 2023 05: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 33I5FMt2006802; Tue, 18 Apr 2023 05: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 33I5FMRV006801; Tue, 18 Apr 2023 05:15:22 GMT (envelope-from git) Date: Tue, 18 Apr 2023 05:15:22 GMT Message-Id: <202304180515.33I5FMRV006801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 1190b82c2294 - main - last(1): Remove double words in source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1190b82c2294762c77099fc52835d5d07b57e7a3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=1190b82c2294762c77099fc52835d5d07b57e7a3 commit 1190b82c2294762c77099fc52835d5d07b57e7a3 Author: Gordon Bergling AuthorDate: 2023-04-18 05:12:45 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 05:14:53 +0000 last(1): Remove double words in source code comments - s/on on/on/ - s/we we/we/ MFC after: 5 days --- usr.bin/last/last.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index 4b6ac33b8df4..28d14dbbaceb 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -287,7 +287,7 @@ doentry(struct utmpx *bp) "crash" : "shutdown"; /* * if we're in snapshot mode, we want to exit if this - * shutdown/reboot appears while we we are tracking the + * shutdown/reboot appears while we are tracking the * active range */ if (snaptime && snapfound) From nobody Tue Apr 18 05:15: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 4Q0sZ36bTWz45kkL; Tue, 18 Apr 2023 05:15: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 4Q0sZ34Ztzz3n5Q; Tue, 18 Apr 2023 05:15:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681794923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nOvjBpFYszG3CCF5r1vsxZChKweamGuV8WFs+TrM8pM=; b=nFUmT9wbM1fubywUVMFu4HBESRReUwFRhAzhxObG8WlRnCC4QClpN6GqI3e4Q+3gtRpRIf MdaoQE/PBqLb7Ef8uhVih87yU15+DYG7WZH5SU8WT7S9PRclcbt/0QU2f2oGqzICy5Xt3c sidJLEWzzcthTfBzIW5P9sXQHD06agKK/c6ieiMk6iGU2VRJ0kB7PgPV8J3+MLEXoRoEQn 1kSu+v4L0+UNmIOXPaJrjKwWQ1SGNQS5pdNP/Auk63D/C2SJYwcfP6ssAfOwMvdLoBNrKh eAynVJb/GFm0DT5jRdJWSeklryuunYuohMNsx5w+BfQJAh3aFKzcBDATJqs8nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681794923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nOvjBpFYszG3CCF5r1vsxZChKweamGuV8WFs+TrM8pM=; b=KqJEKk+/xzDx3cSD4a0U9on7o65lebow5fGjUWPd9cVoQV7j0DYP33LD8ZmNmDkhfza88e LGPsGhNmALaWbYQwza/6OrsUq/mKblQe9fkeGDTl6cjTl4oi66Xc/XBMa1HzWFYK3tVXm0 PA468UNCid7eAq/V415Y0EksbTInObrbPkNTMASAhp1zfIpJoj8dlD0lYNnzVpMWPjPUUN K++prqvmZA5DVCDQm+836dQ+e6O+l87/S3yJinS62r/AJ2Fhk2k6F47kFOhdQrIlk/I/d4 KYZcMcznFL4HpO1XogCbKwR/iDeFBj+aLkWPdu9TxYx0l2K4Popc31yDOjUrLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681794923; a=rsa-sha256; cv=none; b=w/hOT/tTVHko1MXyG0vBdfcn/FFrU5cNdw1lsJFvIeKuYrZ0MEplmZeRg7kCizHJJHUjgW HcdRrrwWh5kl+DWOttNXeo9OPy+tLTGpCjc8ESY2fcxQ7sLtrxEoxAK/bgKkonYfu5QflG 3NOslYzrxwKqX3Fgf7NuqGX7q4VLaPFdF/j2wtbQHkEyh5eyRRVcjS9vtS/LX1zLnN83Vq e2L1fpyev6B0ahGiEMF7wzx1QURB/8x64muFAd/eWUrSmDJkDMjZlMP2p4A95E8PJ89F5o VAo6K7FvAk/JUBvNHqWiCxkisMFDpHZvs+fFv4fsWwNWk8o0xR3JaqfiQZVhyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0sZ33TSZzysW; Tue, 18 Apr 2023 05:15: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 33I5FN8K006826; Tue, 18 Apr 2023 05:15:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I5FNth006825; Tue, 18 Apr 2023 05:15:23 GMT (envelope-from git) Date: Tue, 18 Apr 2023 05:15:23 GMT Message-Id: <202304180515.33I5FNth006825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 105e397eb64e - main - kern_sysctl: Remove double words in source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 105e397eb64ed3f9ecfa4b81e1544cc271e1a416 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=105e397eb64ed3f9ecfa4b81e1544cc271e1a416 commit 105e397eb64ed3f9ecfa4b81e1544cc271e1a416 Author: Gordon Bergling AuthorDate: 2023-04-18 05:13:30 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 05:14:57 +0000 kern_sysctl: Remove double words in source code comments - s/on on/on/ MFC after: 5 days --- sys/kern/kern_sysctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 430fa87ef0eb..32a38c1e402d 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1658,7 +1658,7 @@ sysctl_handle_int(SYSCTL_HANDLER_ARGS) } /* - * Based on on sysctl_handle_int() convert milliseconds into ticks. + * Based on sysctl_handle_int() convert milliseconds into ticks. * Note: this is used by TCP. */ @@ -1889,7 +1889,7 @@ retry: } /* - * Based on on sysctl_handle_64() convert microseconds to a sbintime. + * Based on sysctl_handle_64() convert microseconds to a sbintime. */ int sysctl_usec_to_sbintime(SYSCTL_HANDLER_ARGS) @@ -1909,7 +1909,7 @@ sysctl_usec_to_sbintime(SYSCTL_HANDLER_ARGS) } /* - * Based on on sysctl_handle_64() convert milliseconds to a sbintime. + * Based on sysctl_handle_64() convert milliseconds to a sbintime. */ int sysctl_msec_to_sbintime(SYSCTL_HANDLER_ARGS) From nobody Tue Apr 18 05:31: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 4Q0sw74ysGz45lhH; Tue, 18 Apr 2023 05:31: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 4Q0sw74Nrsz4GG2; Tue, 18 Apr 2023 05:31:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681795863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KUE4+KffOy7Tuine/Whu2EipBAkwN8UyyUHvEnljB7I=; b=QeJGGC2Ikj9BwlGmPHB5sYlDnfZ6bZ5LAZttjvMSxEGcd09cfIy84NO4msqH4KiSi9y4SR ip1ylucl3CIQT72Tm++rXRqDaT2/qj6B+NFMP0RgyBnJvQ5BUx+WRjIswK9dSzzylvOB4Y jUtV/q6NQVu01rfv+E9eex0wP4fXL2ytB8+uKX3Z7ylCIhWA8AyjvadxGTSZvSMDmM58AN zwnmETtFJkjEInT6nXJ+pvej+hx2mlayRFDwi+k1w52PUDKtiHbOXFUGxXQ09H7oHCBs+h gJmHF9eMGGbR55oHrgV2+bPhg2JvqmTU1j3ZhTCSNJqz7u/rbUMEysJJuT05pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681795863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KUE4+KffOy7Tuine/Whu2EipBAkwN8UyyUHvEnljB7I=; b=pgm1YavXQlHuUQE9Gle4O9dodqgXcgRuSzMUsDUo0JNER3Gq3ltszMvxVWRvJeZaA7LSXU 6z9JJGDayZRhMJF4cFWP7NVkiSBjGBuzk4Ys+JfyUDllb8dEoEfAUdTRFlI+Mkxc7V8ajv UMvxR39/Vi3+N7aqz7IWuRkGFl0aThHoyy1PGDS84wrChehIJqPUsnDBLvhb0b9O9+A2q4 fzMrBBF1nhioU9sjD1A5fjuD8QFgrNAMDHDRGBZe+BhFn6ncyVSak7oGW2h7V2qzfHw25i 84svXo3shcFnjf+Fz6474BAtH0FNMGJkeA6FgLkjqsn9Q+Cc2IX/l37vP/0tvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681795863; a=rsa-sha256; cv=none; b=mQtusDuqPnMrV+Ul2CO7hxHGCzuDmAeXC5uM+q9T+OJ9tkYDYcDoaZZyiMWNf9XfLQRSA5 VFkbHapduy5CSfxnHS02fM8AQtBHVwTD5D7pkuM3+IV2yMSgptg1GCFwsufSDLmz1LXKQ3 gIWqv/JTJKTmieH/Y3B+Ot2cN7YGO7ELbqwe6WO55zicgr81QJ6/BnY4kijGK5MDI4ufSM suNTgpyDVX0Yjdpzd5dqLLfvvo36naAAjYxn3KTNaCi7+lOUZn5fqnNBhKGKksS9PaXuE/ 8Be2zDQ4eWMaAv7MCey7JTFC6v9182MWyaI7bPa/CaogfY5YYmBUuPjOPys8pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0sw73Tx1zypR; Tue, 18 Apr 2023 05:31: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 33I5V3dK031747; Tue, 18 Apr 2023 05:31:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I5V3ZF031746; Tue, 18 Apr 2023 05:31:03 GMT (envelope-from git) Date: Tue, 18 Apr 2023 05:31:03 GMT Message-Id: <202304180531.33I5V3ZF031746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 49b6bc83cc4e - main - meta: print some additional variables on build 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: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49b6bc83cc4e735da75abe104d4deb0ed52c4958 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=49b6bc83cc4e735da75abe104d4deb0ed52c4958 commit 49b6bc83cc4e735da75abe104d4deb0ed52c4958 Author: Stephen J. Kiernan AuthorDate: 2023-04-18 04:32:06 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-18 05:30:34 +0000 meta: print some additional variables on build errors. Add CPUTYPE and MACHINE_CPUARCH to the list of variables printed when there are build errors. Protect local.sys.mk from multiple inclusion. Reviewed by: sjg Obtained from: Juniper Networks, Inc. --- share/mk/local.sys.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index 519c72df2383..39605c05e129 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -1,5 +1,8 @@ # $FreeBSD$ +.if !target(_${_this}_) +_${_this}_: .NOTMAIN + .if ${MK_DIRDEPS_BUILD} == "yes" || ${MK_META_MODE} == "yes" # Not in the below list as it may make sense for non-meta mode @@ -21,10 +24,12 @@ MAKE_PRINT_VAR_ON_ERROR+= \ .MAKE \ .OBJDIR \ .TARGETS \ + CPUTYPE \ DESTDIR \ LD_LIBRARY_PATH \ MACHINE \ MACHINE_ARCH \ + MACHINE_CPUARCH \ MAKEOBJDIRPREFIX \ MAKESYSPATH \ MAKE_VERSION \ @@ -87,3 +92,5 @@ META_NOPHONY?= META_COOKIE_RM?= META_COOKIE_TOUCH?= META_DEPS+= ${META_NOPHONY} + +.endif From nobody Tue Apr 18 05:31: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 4Q0swh1bKGz45ly7 for ; Tue, 18 Apr 2023 05:31:32 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 4Q0swg6fvlz4HHH for ; Tue, 18 Apr 2023 05:31:31 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f51.google.com with SMTP id he13so19911337wmb.2 for ; Mon, 17 Apr 2023 22:31:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681795890; x=1684387890; 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=xUNMzdrwRm221s21DD8sSIr+CFurcGhm1ao2TxLNwug=; b=S3DUYdXK5/KlvK13F5Vzf5e8vbUcZVVGCGIzNcnwfX5/QRqn8L+vp51YiugJUFrNu0 24DEJrSdLYRGCKbsPBVtcyg2m1Wb+1DHNeYOA28gzuIAFSs6Jv/ZnkOnPGR304FNxRvV DAlcoOcjiWXISVNbkTQaDBdVXbE61QoYeZJ/zOoa8VacXaN4x6wZ6/MjSKKWfarjtmIu hLAb2hg2a1LL6CYu1dcDWpuitw7IComR0NcEx2cJgI3/fh4SgiMIERkwTc0oWnO69KCR 79mMzjVCl/4BqDSINrqYzVWAMGkFTPTISg20mdGGTLsrQQ6fiFOmc9r8xh/MOCI5+0Eu yCMw== X-Gm-Message-State: AAQBX9dpAztZ1L215yOYl5kvcvI/4hP1xTYwUcTSYGnpSHxBOgjxxrz5 bqSVGbqElGPBjXuCquRMiyMc4Q== X-Google-Smtp-Source: AKy350ZMD64mc2B4R6YNVz97sDQUFjKTV9rqkT/kxEK8rLP3j5gEY0Fb+tPchFl3i/u0QeMxlhHMTA== X-Received: by 2002:a1c:7503:0:b0:3f0:683d:224d with SMTP id o3-20020a1c7503000000b003f0683d224dmr12374920wmc.9.1681795890122; Mon, 17 Apr 2023 22:31:30 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id b7-20020adfde07000000b002f3fcb1869csm12071532wrm.64.2023.04.17.22.31.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2023 22:31:29 -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 \(3696.120.41.1.1\)) Subject: Re: git: b12ccd0bb1b3 - main - stand: Remove double words in source code comments From: Jessica Clarke In-Reply-To: <202304180515.33I5FKdK006761@gitrepo.freebsd.org> Date: Tue, 18 Apr 2023 06:31:28 +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: <5B4D966A-896A-4C77-97CD-1594B9C79B42@freebsd.org> References: <202304180515.33I5FKdK006761@gitrepo.freebsd.org> To: Gordon Bergling X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q0swg6fvlz4HHH 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 18 Apr 2023, at 06:15, Gordon Bergling wrote: >=20 > The branch main has been updated by gbe: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Db12ccd0bb1b37f32e972bb3e945e4025= fe409e2f >=20 > commit b12ccd0bb1b37f32e972bb3e945e4025fe409e2f > Author: Gordon Bergling > AuthorDate: 2023-04-18 05:09:57 +0000 > Commit: Gordon Bergling > CommitDate: 2023-04-18 05:14:44 +0000 >=20 > stand: Remove double words in source code comments >=20 > - s/to to/to/ > - s/value value/value/ >=20 > MFC after: 5 days > --- > stand/i386/boot0/Makefile | 2 +- > stand/libsa/zfs/zfsimpl.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/stand/i386/boot0/Makefile b/stand/i386/boot0/Makefile > index 1453f17751b9..dad078fd6f71 100644 > --- a/stand/i386/boot0/Makefile > +++ b/stand/i386/boot0/Makefile > @@ -36,7 +36,7 @@ BOOT_BOOT0_FLAGS?=3D 0x8f > # 0xb6 (182d) corresponds to 10 seconds. > BOOT_BOOT0_TICKS?=3D 0xb6 >=20 > -# The base address that we the boot0 code to to run it. Don't change = this > +# The base address that we the boot0 code to run it. Don't change = this This was correct and is now incorrect; read as =E2=80=9Cthat we [load] = the boot0 code to in order to run it=E2=80=9D. Jess > # unless you are glutton for punishment. > BOOT_BOOT0_ORG?=3D 0x600 > ORG=3D${BOOT_BOOT0_ORG} > diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c > index 76063e76225f..4a285470642e 100644 > --- a/stand/libsa/zfs/zfsimpl.c > +++ b/stand/libsa/zfs/zfsimpl.c > @@ -447,7 +447,7 @@ = vdev_indirect_mapping_entry(vdev_indirect_mapping_t *vim, uint64_t = index) > * > * It's possible that the given offset will not be in the mapping = table > * (i.e. no mapping entries contain this offset), in which case, the > - * return value value depends on the "next_if_missing" parameter. > + * return value depends on the "next_if_missing" parameter. > * > * If the offset is not found in the table and "next_if_missing" is > * B_FALSE, then NULL will always be returned. The behavior is = intended From nobody Tue Apr 18 05:32: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 4Q0sxN3RFQz45m1W; Tue, 18 Apr 2023 05:32: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 4Q0sxM2Y40z4JM0; Tue, 18 Apr 2023 05:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681795927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QzQi2xYyXkpbiBsDK+mTue+llTNvsKp/XAXG0Zsgl+8=; b=N9nfZ+0sgbxzKKX4dxFkASAZnoYqifgVDA9DL6F53eLV7Vyli/6Di8lezMwOJJO1X/aM5F m8yRXYeiLEGRQ8SMd6QglwwAEXROkQZLupqvYAgXmK/nSkG7ef7mS7T5dkUN9C2fiTrHBo T+fLbGZ9r1gCkgmA7u0adOagj2eENAv3deo3Yqqv2BbzsGCzTe33UZPuUqBqQFvbDYamCh uAkL9riRGySnPH6S4lYtfuXzfaN0q4BLlWlKhE3RZH0zq3hoIP39QCNwWw9IqAHoWuSIfd tkKtx8yBSHFXTb/INxGjiZ1gc0Lg/si4CDfcbZ/I92ncjFfn2Pj2cdMZXIDvAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681795927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QzQi2xYyXkpbiBsDK+mTue+llTNvsKp/XAXG0Zsgl+8=; b=RitwpyUHqf0r49uPgH3EM74nvywcVWe2MD20Rc2Av3idSl/GUFPzBhhq0PiJZRrts+SPSl RBWdwnPjtmOH1aJQW42OWdO2D3fiPffv7MkPyKgb7BgJonXB2unLT4q0RWF7YtbEDyMegY dq6LPVjY7M4k0oCAHmL/Q/bFHRGJ4m7RZzduXS3q4WoKV6Bgl7QG3LsCOtLJ6sE6x8qvmE A9/BmwPUXPDOCQXJLgIK5qMnzmDmpbSsAjEFuZJAEk6dkPwjaM1zTr+csdFQBA1dgir2qw siGbwt7SWTMYvTfz0xxOmdXRasFU0bmSBs4Mn0pXVcspD2iNAPsPfd/Ic+pGgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681795927; a=rsa-sha256; cv=none; b=k+5Bydycsp7Snpxrlzw/TVWtOIVQx1xoByBB0/eu7yIEYxRMl7KDxfV8tyDNlMqVKcoTPZ XG7iQXEPjfI/fdAofhjdYD9rcRP+4ry0yOjPPVOLiTsLiwlwiGaVdLU7gbpmOYQj0d6Ojx YmKsK3okloQ9MXT/P3yDucIajppzhaAEnNtvMx4RUm+DQzBiudq/lAgZRqvXMB+jkvpsKN +FK98v7rHfybCPgS+kQRDhApDcs6O9TRwRk2gT3NyoAerFISgnTSUvq7C1bS13cfhITlhm 2FuioTGh9U+mVgJ/L7VGfmlmx7znYUL8kMO4JQuoxt/T0MQOFusDkG+CeaWxxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0sxM1f9Pzyqc; Tue, 18 Apr 2023 05:32: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 33I5W7pW037891; Tue, 18 Apr 2023 05:32:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I5W7dq037890; Tue, 18 Apr 2023 05:32:07 GMT (envelope-from git) Date: Tue, 18 Apr 2023 05:32:07 GMT Message-Id: <202304180532.33I5W7dq037890@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: d59dd30cf19b - main - renice: Clean up the tests. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d59dd30cf19bb6df5635b3c896c7c4262917a9b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d59dd30cf19bb6df5635b3c896c7c4262917a9b6 commit d59dd30cf19bb6df5635b3c896c7c4262917a9b6 Author: Dag-Erling Smørgrav AuthorDate: 2023-04-18 05:31:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-04-18 05:31:56 +0000 renice: Clean up the tests. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D39629 --- usr.bin/renice/tests/renice_test.sh | 52 ++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/usr.bin/renice/tests/renice_test.sh b/usr.bin/renice/tests/renice_test.sh old mode 100644 new mode 100755 index a6e8007ba35d..79286a0f86bd --- a/usr.bin/renice/tests/renice_test.sh +++ b/usr.bin/renice/tests/renice_test.sh @@ -1,28 +1,7 @@ -#!/bin/sh -#- -# Copyright (c) 2022 Klara, Inc. -# All rights reserved. # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. +# Copyright (c) 2022-2023 Klara, Inc. # -# 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. +# SPDX-License-Identifier: BSD-2-Clause # # Name of user to use for -u tests when running as root. Beware that @@ -33,8 +12,10 @@ _renice() { atf_check -o empty -e ignore -s exit:0 renice "$@" } -# Set a process's nice number to an absolute value atf_test_case renice_abs_pid +renice_abs_pid_head() { + atf_set "descr" "Set a process's nice number to an absolute value" +} renice_abs_pid_body() { local pid nice incr sleep 60 & @@ -46,8 +27,10 @@ renice_abs_pid_body() { kill $pid } -# Change a process's nice number by a relative value atf_test_case renice_rel_pid +renice_rel_pid_head() { + atf_set "descr" "Change a process's nice number by a relative value" +} renice_rel_pid_body() { local pid nice incr sleep 60 & @@ -61,8 +44,10 @@ renice_rel_pid_body() { kill $pid } -# Set a process group's nice number to an absolute value atf_test_case renice_abs_pgid +renice_abs_pgid_head() { + atf_set "descr" "Set a process group's nice number to an absolute value" +} renice_abs_pgid_body() { local pid pgid nice incr # make sure target runs in a different pgrp than ours @@ -75,8 +60,10 @@ renice_abs_pgid_body() { kill $pid } -# Change a process group's nice number by a relative value atf_test_case renice_rel_pgid +renice_rel_pgid_head() { + atf_set "descr" "Change a process group's nice number by a relative value" +} renice_rel_pgid_body() { local pid pgid nice incr # make sure target runs in a different pgrp than ours @@ -90,9 +77,9 @@ renice_rel_pgid_body() { kill $pid } -# Set a user's processes' nice numbers to an absolute value atf_test_case renice_abs_user renice_abs_user_head() { + atf_set "descr" "Set a user's processes' nice numbers to an absolute value" atf_set "require.user" "root" } renice_abs_user_body() { @@ -105,9 +92,9 @@ renice_abs_user_body() { kill $pid } -# Change a user's processes' nice numbers by a relative value atf_test_case renice_rel_user renice_rel_user_head() { + atf_set "descr" "Change a user's processes' nice numbers by a relative value" atf_set "require.user" "root" } renice_rel_user_body() { @@ -121,8 +108,10 @@ renice_rel_user_body() { kill $pid } -# Test various delimiter positions atf_test_case renice_delim +renice_delim_head() { + atf_set "descr" "Test various delimiter positions" +} renice_delim_body() { local pid nice incr sleep 60 & @@ -159,6 +148,9 @@ renice_delim_body() { } atf_test_case renice_incr_noarg +renice_incr_noarg_head() { + atf_set "descr" "Do not segfault if -n is given without an argument" +} renice_incr_noarg_body() { atf_check -o empty -e ignore -s exit:1 renice -n } From nobody Tue Apr 18 06:09: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 4Q0tmm5ppbz45pLY; Tue, 18 Apr 2023 06:09: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 4Q0tmm2JyBz4GKD; Tue, 18 Apr 2023 06:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681798184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B43ql6G+B494HEJxnnPStiB1FMbAmR4wITwNEly1qcM=; b=UnWQbtrVSsLQBWdIHNTdl2ZpCys1uBRc55eC8l+B3eT+mQpOEYtuqnBfaxyjYVKKuDFdqO fL05eUzo9DFmCbVf9AEwdvtv8dAeaqEPakk5KnIbhk/UC2auNaGD/Vvpqa5RTgsQfvT6c5 nH+Z3ZEnx5eo7ITSbD26WFjQEuEFWtLo78XaAgDBK5l9uX/VMTnA6rx1qD967+FpkxWipL ZiwOa/Qge+pN12wZX5sho8C3Y5FnYC7ik3txzKdjEn4hayK7y8FEA8ZeGaa+BiDcrKMoo4 aWBMuq9++rLhgEKp6CxDH8DPeU+CIkVIIJU47CqiZvL2T++hMHk+hLK/YaUPTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681798184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B43ql6G+B494HEJxnnPStiB1FMbAmR4wITwNEly1qcM=; b=N0dm9kbpjcCGt5uAx5zSDH15AX2tm4JdPbSHDqxNjeOC9uuMvBK6NCRf+Yhzd/faO2y3V5 /av3+rNtb5TWJReBl4XX8+fKvnY0P2kEzIMcwG0XpdAV6V7cMq8opuWJIfQOjjSlE9eeBu xxm7psR0pCx5pXBzx+CKxhaWc9WOUrVyIl0n33RqkOw64RSyU+m2Am98VBEG9r1NDtqWMu 5VIl7vYgBLPyvEQ3sYcMV/Kv5qc/5ja5bUvrJqSoO/HAFAdmwk+HDfJMJXsNmyT5jZmEPs 40hxv3/lIKrhIENQexQl4mihk5TiN8500gpJxysqZsbRdx72h/tRT3rbB2rkqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681798184; a=rsa-sha256; cv=none; b=kynp5u76ZPFnvrPj/q1lizN470qnYZSSL8QCEpCzSkGkXTYAVIcOeUmxnFGVEenQGzCoiT ezcpqJvgq9gYuTXFITveNvbbJdnSW0dEo5CWwPNS6l54Eum6AQTafnRbRcFemrPzfy0AaZ 3DIjSAwXFnJRbXMQF1S5m2LMItYV9zRmzTgR23yfjx/ZrxVEd1yiBVh4QDC7arSx03XdhP TPXBIuWF7jmEUEopApAxVV/+uapLCU2lZ0JFQcETIRZI3f/7eIFFZtxctV5iaPmrOBBmf1 ChZbV73/CtzDrzN5DJbz4Y8dHFpQUizhR8xvmPgJMh/8i3yshEZglB+75ReoeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0tmm1C5Tz116B; Tue, 18 Apr 2023 06:09: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 33I69iQN089391; Tue, 18 Apr 2023 06:09:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I69iRq089390; Tue, 18 Apr 2023 06:09:44 GMT (envelope-from git) Date: Tue, 18 Apr 2023 06:09:44 GMT Message-Id: <202304180609.33I69iRq089390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: c3fbd9c6212c - main - Revert "stand: Remove double words in source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3fbd9c6212cad2634f5958ffec0370166ec7204 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=c3fbd9c6212cad2634f5958ffec0370166ec7204 commit c3fbd9c6212cad2634f5958ffec0370166ec7204 Author: Gordon Bergling AuthorDate: 2023-04-18 06:08:35 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 06:08:35 +0000 Revert "stand: Remove double words in source code comments" The sentence, "The base address that we the boot0 code to to run it." is correct. Reported by: jrtc27 This reverts commit b12ccd0bb1b37f32e972bb3e945e4025fe409e2f. --- stand/i386/boot0/Makefile | 2 +- stand/libsa/zfs/zfsimpl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/i386/boot0/Makefile b/stand/i386/boot0/Makefile index dad078fd6f71..1453f17751b9 100644 --- a/stand/i386/boot0/Makefile +++ b/stand/i386/boot0/Makefile @@ -36,7 +36,7 @@ BOOT_BOOT0_FLAGS?= 0x8f # 0xb6 (182d) corresponds to 10 seconds. BOOT_BOOT0_TICKS?= 0xb6 -# The base address that we the boot0 code to run it. Don't change this +# The base address that we the boot0 code to to run it. Don't change this # unless you are glutton for punishment. BOOT_BOOT0_ORG?= 0x600 ORG=${BOOT_BOOT0_ORG} diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 4a285470642e..76063e76225f 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -447,7 +447,7 @@ vdev_indirect_mapping_entry(vdev_indirect_mapping_t *vim, uint64_t index) * * It's possible that the given offset will not be in the mapping table * (i.e. no mapping entries contain this offset), in which case, the - * return value depends on the "next_if_missing" parameter. + * return value value depends on the "next_if_missing" parameter. * * If the offset is not found in the table and "next_if_missing" is * B_FALSE, then NULL will always be returned. The behavior is intended From nobody Tue Apr 18 06:12: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 4Q0trS0gHjz45pMt; Tue, 18 Apr 2023 06:12:56 +0000 (UTC) (envelope-from gbe@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 4Q0trS05cKz4KSQ; Tue, 18 Apr 2023 06:12:56 +0000 (UTC) (envelope-from gbe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681798376; 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=1Gq/g1aZ89YlWxTt9DQ7FA6xKcDQeEIzZNrMdYDTBsA=; b=A6en3I2SLI38P8y3CLTfQeS1OmHcYYsM06D01z3f9DAZBX86EitKvjzSTlGg9ObInQ7pL1 sIN9a8dve8Ba0aIZ+C4CHF4/GgRhbZvDqk4MlAa2TWdsfD8P4d+Qo7MqJcN6jWeCKZvckV Nuvyw3gqKICOBfMyu7udO6WsZsjNDdAKjvxIte/OEvkghrO5YIl25WUksKqWHLemD7chOY izOrfXMKj50v8PQUpO0RRTCuOSBkbNUSTWeEJumEoTUCjCsjHW8F5KfBi08NiL2T+QkNE5 /EdxQLk6fhpryqG4/9CN/jTzo8VkHJFu20c33Zy9JsBKeZaXoX8tR2mvpdLR0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681798376; 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=1Gq/g1aZ89YlWxTt9DQ7FA6xKcDQeEIzZNrMdYDTBsA=; b=JC8gLvohrbiM7KKlGXzz0mNpaoKpdqI6cpIa/PmhzGesBX0ohxvEP8yCaopzx/0N4GUwXH zK8nbAVv33nW0CdZJgqIcxhBlgFwHIinrlfECwCfVZJlLtbzEnqfQot0R7tv2acKkVkGKd c6FfLWmPy2oPVZjs85pGwr9k7t4Xq2ZdV3BFlr+4X+HSea64VQ5+bv+3siPZ6Vd/t9QvY5 XBFr0Gex/dfVqCt4Am6dRwVFBczQa10QQHoi1v3DHV8/Mj8Xrmdm07ZgwxRwIVFpukcEDa WA7AvyAN8Sy+Sy2SNLEJ+0tadElslhIeO8nol7s2LpjU7ZL0ZbmBfvDNpvaOgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681798376; a=rsa-sha256; cv=none; b=AvH/JeAWGaBB1aQ8TNUao4hMaDsHMKhamjMGnPtcLVulOGWD0Ry7KYIXiYQN0vBbvufP+L XpvH/3pxeM8YkHuBlPVjK4fGntLTCost+/+24vnrCH/AWwMv3ArGCCq3ihpZ2nfaWUwiTd NnQRuOGaOzLywmmhyeDobJqANzgAMEpu3fIoagWPBoTrL4Cb9edZpRi1KdCBGVdo/9EhSM t+x0pzlcjDlS0m4U7sVUcEEK7NhFzANiiug7jQH6driopOBU77w58MDt3xJSPkCnu9bPR0 IYqZn4izY79/kurtpvLnmeI7nMOxPba1IsTw/aVARsR5nOoL8P6iOMOJIcwjQg== Received: from localhost (p200300cb8725f51bc4cf95b8c2c1c625.dip0.t-ipconnect.de [IPv6:2003:cb:8725:f51b:c4cf:95b8:c2c1:c625]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q0trR1ZKJzwyB; Tue, 18 Apr 2023 06:12:55 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Tue, 18 Apr 2023 08:12:51 +0200 From: Gordon Bergling To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: b12ccd0bb1b3 - main - stand: Remove double words in source code comments Message-ID: References: <202304180515.33I5FKdK006761@gitrepo.freebsd.org> <5B4D966A-896A-4C77-97CD-1594B9C79B42@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5B4D966A-896A-4C77-97CD-1594B9C79B42@freebsd.org> X-Url: X-Operating-System: FreeBSD 13.2-STABLE amd64 X-Host-Uptime: 8:09AM up 18:53, 3 users, load averages: 0.32, 0.24, 0.18 X-ThisMailContainsUnwantedMimeParts: N Hi Jess, On Tue, Apr 18, 2023 at 06:31:28AM +0100, Jessica Clarke wrote: > On 18 Apr 2023, at 06:15, Gordon Bergling wrote: [...] > > --- a/stand/i386/boot0/Makefile > > +++ b/stand/i386/boot0/Makefile > > @@ -36,7 +36,7 @@ BOOT_BOOT0_FLAGS?= 0x8f > > # 0xb6 (182d) corresponds to 10 seconds. > > BOOT_BOOT0_TICKS?= 0xb6 > > > > -# The base address that we the boot0 code to to run it. Don't change this > > +# The base address that we the boot0 code to run it. Don't change this > > This was correct and is now incorrect; read as “that we [load] the > boot0 code to in order to run it”. > > Jess I just reverted the change. Sorry, not a native speaker on this side and the sentence was a little hard to understand. --Gordon > > # unless you are glutton for punishment. > > BOOT_BOOT0_ORG?= 0x600 > > ORG=${BOOT_BOOT0_ORG} > > diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c > > index 76063e76225f..4a285470642e 100644 > > --- a/stand/libsa/zfs/zfsimpl.c > > +++ b/stand/libsa/zfs/zfsimpl.c > > @@ -447,7 +447,7 @@ vdev_indirect_mapping_entry(vdev_indirect_mapping_t *vim, uint64_t index) > > * > > * It's possible that the given offset will not be in the mapping table > > * (i.e. no mapping entries contain this offset), in which case, the > > - * return value value depends on the "next_if_missing" parameter. > > + * return value depends on the "next_if_missing" parameter. > > * > > * If the offset is not found in the table and "next_if_missing" is > > * B_FALSE, then NULL will always be returned. The behavior is intended From nobody Tue Apr 18 06:59: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 4Q0vtZ23K0z45rfB; Tue, 18 Apr 2023 06:59:50 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0vtZ1GfBz4K3K; Tue, 18 Apr 2023 06:59:50 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681801190; 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=k3rsyi8VqqWV4A+QNUxL4iwEEmAYFPtrU+QoF3TWl8U=; b=lHKAfStzvGYxq6pdOjezUq9IaY7oq6OH/J3pdYPpMESwJEvBEvnmTU92KodadnVjG8nzJt Pud/XTB/aFAks4B6hXZj0MhfwpuLgv/lDjXMnSLaexeZA3eruM73gDsv61WK1dP4zYXYn9 VS9byV3aKBolQpwIvYGUPHBA208dF3zBKLfKjLKqRrpdSjyCl4k/g8NlEcaSoepwP6/UYj OohsRKAXxvUxMY/sQ89vckj/usQKhwkKkAJZgpB4drzJe8COOXB0BtLHeoRLIiNnvpVovs FhX2zIKPSB63ADJw4bz51B7Tm/qk4jESxsWu//aS1Yx3sx32EMLesn7q+yYbCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681801190; 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=k3rsyi8VqqWV4A+QNUxL4iwEEmAYFPtrU+QoF3TWl8U=; b=rEjUkaeIL5zO0hdKv4hNZxkHQsAvRCGV1CfWvwLhSheqKU7nxxfSrn8ZFy9TUi63aQ4h18 24T+Ncx9yLYa0DWcK81/YutBXVQdPUSCOa5ygnjvWA+NDwy9Sbh6J2JvZcYF1paDszq7mv ZqTyMcmMtjnFukE3Nnd+ejQzeJU6NhPIA2MahFnKf4/iO26JRHFUqhqDWY2DYiIqd3S8Sx OyNI9gfivYLz1fXulrAArA58ITvMxZW3MSFUuB5kwp/XciU1eyZ5mxRf52yfz26csJTo8w qJIT1+P/Bnfugew9OjdiApt5MLnRFvJh3Hi7m4t/soibVPVF/uy1YM5c14LrVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681801190; a=rsa-sha256; cv=none; b=v28VLbNvtLDGC/2TxIBo11acbGdpw+8PrTa36hI+JzFLGAE4xZ4+DXyzO3Cv5nG2tV2TXa s3dqwY3PY77l2WCO0N81lG2wuEGczoDr/PS/x/yQigO2CdK3aQZZ0Lwh/dTFGWIrMy8HFL ImtQ86XvMgc8dq0Q382ouHEB7seQjyOi6owMGo7Vr9FEDB+Z2yJLK31uIF6VHFyTo3jBuC Rfknz9nOnOIlmEohToF9jV1g242vyXhxQBbGh+Tuy1HQLMZlwH/9rXumjidm8NSKPEhP1r wkaiOOFS+rSXzF7TIfrD7auUND/eTsrykm4XweKJi9NdIdbCY1jWHYslBTNLjA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 125EF17570; Tue, 18 Apr 2023 06:59:49 +0000 (UTC) Date: Tue, 18 Apr 2023 06:59:49 +0000 From: Alexey Dokuchaev To: Gordon Bergling Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: b12ccd0bb1b3 - main - stand: Remove double words in source code comments Message-ID: References: <202304180515.33I5FKdK006761@gitrepo.freebsd.org> <5B4D966A-896A-4C77-97CD-1594B9C79B42@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: X-ThisMailContainsUnwantedMimeParts: N On Tue, Apr 18, 2023 at 08:12:51AM +0200, Gordon Bergling wrote: > On Tue, Apr 18, 2023 at 06:31:28AM +0100, Jessica Clarke wrote: > > On 18 Apr 2023, at 06:15, Gordon Bergling wrote: > [...] > > > --- a/stand/i386/boot0/Makefile > > > +++ b/stand/i386/boot0/Makefile > > > @@ -36,7 +36,7 @@ BOOT_BOOT0_FLAGS?= 0x8f > > > # 0xb6 (182d) corresponds to 10 seconds. > > > BOOT_BOOT0_TICKS?= 0xb6 > > > > > > -# The base address that we the boot0 code to to run it. Don't change this > > > +# The base address that we the boot0 code to run it. Don't change this > > > > This was correct and is now incorrect; read as "that we [load] the > > boot0 code to in order to run it". > > I just reverted the change. Sorry, not a native speaker on this side > and the sentence was a little hard to understand. This reminds me of the situation with commit 8ca67bf1273 which jrtc27@ pointed out was wrong, so I'd say again that comments like this should be rephrased: these consequent double words make it hard to understand and just begging for someone to try to "fix" it again in the future. ./danfe From nobody Tue Apr 18 07:14:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0wCm4yV2z45tBg; Tue, 18 Apr 2023 07:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0wCm4GLwz3NL1; Tue, 18 Apr 2023 07:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681802084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8CVmDw3W6EOvRogZWQ/W3no1yaBK/O5nFUKcO8zflvA=; b=hVmah1jMSa0yTZVvZpjTGAhzR1+jLWr3qYW+qPIu0J6aUACnPYQGK9eFmJWShhVELWLLgl cG/FgQBxHsQE+XAaM8H0ULa+/NPwRqv1CJJ+Trnpw95OuXotzL14L2n6GjCjF3NDveoc2N 7tgskq9MHOAoUECMOYa1BQy4AccVy3AcoiOL9OV8rklqkaEs35E9TfYvRVZWkFk3xP5kpK zfZpN9L7+FFW/UByWtstIPwlCeTiRhC0cAXXPjHRzkSYJePHS8kvrZGyxgc+kgv3oC5HJC tLDi4P2ExYmpxHst671iV2GKiBRhq2avF3tRiB3PwJkFjdzYb+GV0ULC1outZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681802084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8CVmDw3W6EOvRogZWQ/W3no1yaBK/O5nFUKcO8zflvA=; b=NJ1v7i67pJ5O3b748hJkNrYmOn+yUGHmqWIaUcHpA2UxYjBtxtQ4yzouyyYCli3/4NHglz vyvmvPbCEvWcHR41dEueo0+yHhFQbJMG28Il2Qrs5pI+Kr/pSGSPnK77pMBxjlql2NIDwh Uq+Oj1Np0n5mL5usi3ENa5sjuC8vwIrkSXGowelUJdMfIUqbT1630Yg/oIJwqO/9IZxIdH cRWT5IGcTXJ5jqD3jxR39QVOh9swMgdTRdIAtxo2sFu3uiQpyBVpXv4aqXiKYNpr8tmJQP yUAKz6AxtXrSUdMSCetYrrA9WUj1h6Xra99Hd/9YB5304FJp1sT3364Xe2o9eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681802084; a=rsa-sha256; cv=none; b=wraR3aMG2F/IrWybPZ68ytpSiVoVfuDiN48TtqSBE0wMTG3fYiz2cFaXtwgIJVABQDQ2Bz zdc9uvYpdLbrX2zquhT+433UL8HwwcW1EyMyo2iOSdvlMFaOZDnP3+KIHE9xRnT44N68dw wMj+P2pPyqEaSLHq8lZiVhtmovsSSBhxCCgxRt+60EtEzm9yRH3D59Bl94IHV1OZ15V5u7 GzMr3F9o+iCqMd5Hh8mwOuQqxkFqFdYsAhIoWKLYkKFbfU7vW0nOc5gc2iC7X+nRgWtlr+ FTCNcCfzTCuAt72WXLXp5pfBgwKDETTOZ0nYh9Ijx6b50OdevlyZh50WfnhIUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0wCm3LYgz11sm; Tue, 18 Apr 2023 07:14: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 33I7Ei7h004287; Tue, 18 Apr 2023 07:14:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I7EiCd004286; Tue, 18 Apr 2023 07:14:44 GMT (envelope-from git) Date: Tue, 18 Apr 2023 07:14:44 GMT Message-Id: <202304180714.33I7EiCd004286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: c2a9d23736da - main - mount_nfs.8: Fix a mandoc 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2a9d23736da3593bc7cc883f43d913188d79beb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=c2a9d23736da3593bc7cc883f43d913188d79beb commit c2a9d23736da3593bc7cc883f43d913188d79beb Author: Gordon Bergling AuthorDate: 2023-04-18 07:14:20 +0000 Commit: Gordon Bergling CommitDate: 2023-04-18 07:14:20 +0000 mount_nfs.8: Fix a mandoc warning - sections out of conventional order: Sh IMPLEMENTATION NOTES MFC after: 3 days --- sbin/mount_nfs/mount_nfs.8 | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8 index 5052b1a2d6dd..4f4b8891f67a 100644 --- a/sbin/mount_nfs/mount_nfs.8 +++ b/sbin/mount_nfs/mount_nfs.8 @@ -544,6 +544,26 @@ options should only be used as a last ditch effort at improving performance when mounting servers that do not support TCP mounts. .El .El +.Sh IMPLEMENTATION NOTES +When neither the +.Cm rsize +nor +.Cm wsize +options are specified, the I/O size will be set to the largest value +supported by both the NFS client and server. +The largest value supported by the NFS client is defined by +the tunable +.Cd vfs.maxbcachebuf +which can be set to a power of two up to +.Cd kern.maxphys . +.Pp +The +.Xr nfsstat 1 +command with the +.Ic -m +command line option will show what +.Nm +option settings are actually in use for the mount. .Sh COMPATIBILITY The following command line flags are equivalent to .Fl o @@ -640,26 +660,6 @@ Same as Same as .Fl o Cm nfsv4 .El -.Sh IMPLEMENTATION NOTES -When neither the -.Cm rsize -nor -.Cm wsize -options are specified, the I/O size will be set to the largest value -supported by both the NFS client and server. -The largest value supported by the NFS client is defined by -the tunable -.Cd vfs.maxbcachebuf -which can be set to a power of two up to -.Cd kern.maxphys . -.Pp -The -.Xr nfsstat 1 -command with the -.Ic -m -command line option will show what -.Nm -option settings are actually in use for the mount. .Sh SEE ALSO .Xr nfsstat 1 , .Xr nmount 2 , From nobody Tue Apr 18 07:23: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 4Q0wPv6Jb2z45tq8; Tue, 18 Apr 2023 07:23: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 4Q0wPv5Fczz3ncW; Tue, 18 Apr 2023 07:23:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681802611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r90Y+nph6UomTYz86BHgWO2Cn33WkXL7hSAFJfQvzso=; b=Y5jyhkjyyqu8OqqmLSV3Dnzxr5I3SJobqRimwdyhBvP7kmhtO/K8Vj1RaYCoBrUxmEI3ib TFm2tblpLJDPnTlIYImUUDOywaBbasrTyKzxAohlZ5wnn6DY4Ykkt01sojnCt+24V1WS6U MZf3AjbpUXZ0DOBMgPYVEKJVtAtXEu47WATkQX8M7NK6PMe463qlNV6RcwIgZovG2bJqcr cxltUyqv6qWxY19CpwMmvWMzIcxl9NmRh2NwBE6qdC3SkVB1XWRbYWEFUPBj52sMsWkwuG LqUiH5gAO4VSk7DY9vD1gTK8bCw0wWK+Be8nb1iBwWycizyWFdwsRwQ3dc5dRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681802611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r90Y+nph6UomTYz86BHgWO2Cn33WkXL7hSAFJfQvzso=; b=IvazYfZo9uHYRQ/TfCRmdvkEZbu6rG0Ya2Qaf5CzFgt0xtdd1V/iObO6y3Eao6xarBH6m3 jfd9ZbZ8yIHraacCXo6sjOtV3M+o8O7C1qXyJ6srZ4gB9aporB9afIQxCDx+eeREhIQyIQ HcLbJN/Q0qebAxyuYS4S33p96IZLofnMHxazAB/zTU+5WqVrP1Zmsxhyr3JysVpigLT5SZ I6QIPkuyqECM5jabuLj2tT/cdw4kygzvgPhAaNuEfuw8F1M2V2W105TdIyJ0DrPNYHmQrB tMvap9Zy2ceJQejX+64u8sD1WFD1zYa4gg+r/VLf2i73glyDGs7sP9E2MWm6ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681802611; a=rsa-sha256; cv=none; b=C/M2+EaA+LF/ANcOC4UEXXGePiMlg85HitEiZKFud3rFjBr42bQQgs/paSBNgAFxyrl3kU p1l0fPTtAP6c7/WbWt6zmNUBKAHBJwDqHMOPpMiBReyKu/UMGE5AvNHBdEzDUzDpq4fOuD 5b5j6PWwAQ8v01wMVckSJYWy/fdGCLvbJyVQPZrtcCuAONrnFgOwsz/Sidl4j4coybNhxU lCSNcPMjZhNLUnhcQjk7B+c3lUU4Blq8XN1Xfv92Z1jHEOIgGpbUxlRDW8Z0NYWCzMjgfm DIfWSH5XmrFoupjDkJyYPQIUjtSEj4VUktN5yJ6/58og7izJPaamKlqTsqMLYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0wPv3g5Rz12sQ; Tue, 18 Apr 2023 07:23: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 33I7NVuI021152; Tue, 18 Apr 2023 07:23:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I7NVRC021151; Tue, 18 Apr 2023 07:23:31 GMT (envelope-from git) Date: Tue, 18 Apr 2023 07:23:31 GMT Message-Id: <202304180723.33I7NVRC021151@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: 8011e2cd245e - stable/13 - if_epair: also remove vlan metadata from mbufs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8011e2cd245e64469891a9afe23c32b3fef5e503 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8011e2cd245e64469891a9afe23c32b3fef5e503 commit 8011e2cd245e64469891a9afe23c32b3fef5e503 Author: Kristof Provost AuthorDate: 2023-04-10 11:02:55 +0000 Commit: Kristof Provost CommitDate: 2023-04-18 07:23:15 +0000 if_epair: also remove vlan metadata from mbufs We already remove mbuf tags from packets transitting an if_epair, but we didn't remove vlan metadata. In certain configurations this could lead to unexpected vlan tags turning up on the rx side. PR: 270736 Reviewed by: markj MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39482 (cherry picked from commit c69ae8419734829404bdb47d694d105c85f9835e) --- sys/net/if_epair.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index 2404afe63e0a..662c601b3ad1 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -136,6 +136,8 @@ static struct epair_tasks_t epair_tasks; static void epair_clear_mbuf(struct mbuf *m) { + M_ASSERTPKTHDR(m); + /* Remove any CSUM_SND_TAG as ether_input will barf. */ if (m->m_pkthdr.csum_flags & CSUM_SND_TAG) { m_snd_tag_rele(m->m_pkthdr.snd_tag); @@ -143,6 +145,10 @@ epair_clear_mbuf(struct mbuf *m) m->m_pkthdr.csum_flags &= ~CSUM_SND_TAG; } + /* Clear vlan information. */ + m->m_flags &= ~M_VLANTAG; + m->m_pkthdr.ether_vtag = 0; + m_tag_delete_nonpersistent(m); } From nobody Tue Apr 18 07:23:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q0wPx5SXBz45tS3; Tue, 18 Apr 2023 07:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0wPx2HNBz3njW; Tue, 18 Apr 2023 07:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681802613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ku3UW/8u3eCQu8XgQWSWdVaiJKc12KzjT7OiFUsb7Ms=; b=e0jeZrHjtgTArXxuJKz5imgAcfOXt65iYWyyUHMkT288wxiiTWvytuhpDCUQ0asr5aFWaX 8R/quCpeYWctbPnBKSOBDpLG0CxC12Roxjli5PjigpxcESsochON+4s4DrK83dYngyjnoK OZBlo0Ax4qyUYOBtn6cgrvpmRqDgWPhE+hrKMgh9aQptj4mnp0Hy9csNa6BxEWeto9b34A 7/Wbx8uy9U3h/TN8BMupSNGKTQw0335OzuCXYLXfis6qqxkKi2DcYOvN04n1Yzf+oLxWd/ B5z6tR0INNUViNE8g498KV6MCIZKNfeT02b12dfcLtWmVa5W+NIC09OIIPdm+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681802613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ku3UW/8u3eCQu8XgQWSWdVaiJKc12KzjT7OiFUsb7Ms=; b=t04e9fq0sy1GQ8O2heVOtna1+L1UMuurqOMW8qo5jjCjneBgoC5d8G/gudzwLiPb7JxhjM lfQO3BE8zxXgu4wDnhVRGDrjjBDJkYikFVLhepT9oZVLD4qd4CExrMEYe5/pr1J5x/6bfB tgyRUowRM4FxSvOarFcnbBDpSPL1H9h5eTk5XFmwCtcM49+Pwl7AjHOBedMOQ3GV5J2bkZ QqxXYdxdEjTtw2a9cAnMDVsZFoRCNG59iWtsBiGRcvyrF0MMHJPn67ynf6c3Rr0CFWqcaD WrrhVQ8/3Vxzs+QbL1jL6ylZyO5GJgvygG8Tr8PXGMXfyFhsIAmJJM9BRT2luw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681802613; a=rsa-sha256; cv=none; b=OVhvD+C2+UbDSpIFl+V2KFzLtjknX5Yfn7DxJXMlFPeem+W47k5WyYOcJ1OPEHOtiQszuN 13E6VfoQ03Mg7Z/kJrG0FOmpA8MEpnVtEnmd10gkBdANa6Ahn3YcI77nwCQsRTuNMYbZzU F3wZSo08Npj1lLQ50A1fophsKDW610aArNuYCr69Dtvb73EGntFGDNgGq6snOxOr39/xzZ 5mdO4ov14kiFU/Hxgxj+kLcuOQ8NAuWk9KlmM0ub51pGn2XvgcTVicoCmqQ3C3dx+anGjm 4kLvBhSZGeS3F6V7GXz9rY5LB8NUcVbBQ0dFYLOdIJVOhaq2ab7cCSd29/Ct3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0wPw5XW4z131m; Tue, 18 Apr 2023 07:23: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 33I7NWM5021172; Tue, 18 Apr 2023 07:23:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I7NW7K021171; Tue, 18 Apr 2023 07:23:32 GMT (envelope-from git) Date: Tue, 18 Apr 2023 07:23:32 GMT Message-Id: <202304180723.33I7NW7K021171@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: c79831b38a63 - stable/13 - epair tests: test PCP tagged 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c79831b38a63c5e2b6c20602104f1ccda7075182 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c79831b38a63c5e2b6c20602104f1ccda7075182 commit c79831b38a63c5e2b6c20602104f1ccda7075182 Author: Kristof Provost AuthorDate: 2023-04-10 10:55:10 +0000 Commit: Kristof Provost CommitDate: 2023-04-18 07:23:16 +0000 epair tests: test PCP tagged packets PR: 270736 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39483 (cherry picked from commit d116b8430b90212e308fe9945038c7bd98edf1bc) --- tests/sys/net/Makefile | 1 + tests/sys/net/if_epair_test.sh | 65 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile index cdf31477137e..6ba9b65108b0 100644 --- a/tests/sys/net/Makefile +++ b/tests/sys/net/Makefile @@ -6,6 +6,7 @@ TESTSDIR= ${TESTSBASE}/sys/net BINDIR= ${TESTSDIR} ATF_TESTS_C+= if_epair +ATF_TESTS_SH+= if_epair_test ATF_TESTS_SH+= if_bridge_test TEST_METADATA.if_bridge_test+= required_programs="python" ATF_TESTS_SH+= if_clone_test diff --git a/tests/sys/net/if_epair_test.sh b/tests/sys/net/if_epair_test.sh new file mode 100644 index 000000000000..45b5552fb3c9 --- /dev/null +++ b/tests/sys/net/if_epair_test.sh @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2023 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "pcp" "cleanup" +pcp_head() +{ + atf_set descr 'Test PCP over if_epair. PR#270736' + atf_set require.user root +} + +pcp_body() +{ + vnet_init + + j="if_epair_test_pcp" + + epair=$(vnet_mkepair) + + vnet_mkjail ${j}one ${epair}a + vnet_mkjail ${j}two ${epair}b + + jexec ${j}one ifconfig ${epair}a 192.0.2.1/24 pcp 3 up + jexec ${j}two ifconfig ${epair}b 192.0.2.2/24 up + + atf_check -s exit:0 -o ignore \ + jexec ${j}one ping -c 1 192.0.2.2 + + # Now set a different PCP. This used to lead to double tagging and failed pin. + atf_check -s exit:0 -o ignore \ + jexec ${j}one ping -C5 -c 1 192.0.2.2 +} + +pcp_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "pcp" +} From nobody Tue Apr 18 08:22: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 4Q0xjs687Rz44kG7; Tue, 18 Apr 2023 08:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q0xjs2xHHz4FPx; Tue, 18 Apr 2023 08:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681806145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+0czci5ikA31gFc3+q8IsZN6BgEMVvDbw1DhtQG0vWA=; b=yDEIVRSsR7SCe/rJKcRSUlf8Tb1Piefv/7/JYb5qXirMCVEwQgeq2mtHpYoGxf/ESnIXkQ 4CTBpAg8yP0+x2H6OiQck2zDFU8pPKUimrxhXzqhKdghSPjFWPp7wBuPN0Awp6z/rq3v4E heNzhO/LDoawnUf0tnuMahEmZBI+VREbDHx9Cbtj1kR0/df4JehkFHoiCCAHSkcBgDxe1d 9JnvGW+94FLxzx0M+ncn3h0gKkmWXLE+8Vm/lLZLqLvD+BCduZ2MVf3R18cqkfo+evn8TB X/76vEfgPzi8H1BFODwATiqonxwDYoK96e1Fd0bfH2/WMyHWjRsEgVSEiHCW4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681806145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+0czci5ikA31gFc3+q8IsZN6BgEMVvDbw1DhtQG0vWA=; b=Qsgvu5hbJ9+ISlHhaKHt3JVomsPzt6kf+nFWEKKRkU3bHkSljRwwtUn0K2PiQMSnrzMBlz AlBmq9kufhv2I1/Oz0HXbY0X2A07WSOkuysUijfGUJnCpWNVSewPuCsYsOvdq2LFDfM1Pq xTVfeSNnBZ9WTa2BX6Cun0VVWEWlesbWklIlowIjvjTrfRNXuknyO+Jb1FSsJwP6a/TnbD xyJzyL2GRT0u6cB4bNX77Jytix+BsHO7cg4IISuc1jtTIURB+PNzb2fLCXEdDPU3884Juf SCgMIXJMpGzPNBduQxhdm3xCFIt8ae5k1EgoRNgesJlu+NcKDFXgcRRsTldC9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681806145; a=rsa-sha256; cv=none; b=vEU1onTtXmvzvjeD1JVl0Dyl3E2l7zQ239myoeBe+ngq1CyJWDGeoIifTuoj1OPKI1oxKv kF6JsTsiF1AxqPjsjZH6m6U5Q/eNxqCYHjml4rXjkAPMxAEbYpmLOQKr4OigAliGwGA+Uk 31ZHcvp4ZO6RqlIkTjjnbpAk58sSx/DE3psH18oVhSD+raf/D2G7F8AQYvID+oYG9KFaT7 8NzTno1VjcSyU+S/hmKo2ml1Q/XF4PJxcCtNN9XzIsXAm+7BKw8bbiuY3QX4n3pSwemTT3 YuQT2ayki/m/TkmpnNToV4P9OxQtw5qi3ZnIa9do7YoehTsAvRa7vGp1G4b0aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q0xjs1mwgz14Jj; Tue, 18 Apr 2023 08:22: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 33I8MPSK018563; Tue, 18 Apr 2023 08:22:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33I8MPum018562; Tue, 18 Apr 2023 08:22:25 GMT (envelope-from git) Date: Tue, 18 Apr 2023 08:22:25 GMT Message-Id: <202304180822.33I8MPum018562@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: 56cd7716b63d - main - tcpdump: add missing pf reasons and actions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 56cd7716b63d84190e6308d50717ec8bbbdfe1c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=56cd7716b63d84190e6308d50717ec8bbbdfe1c0 commit 56cd7716b63d84190e6308d50717ec8bbbdfe1c0 Author: Kajetan Staszkiewicz AuthorDate: 2023-04-18 07:33:33 +0000 Commit: Kristof Provost CommitDate: 2023-04-18 07:33:33 +0000 tcpdump: add missing pf reasons and actions Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D39586 --- contrib/tcpdump/print-pflog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/tcpdump/print-pflog.c b/contrib/tcpdump/print-pflog.c index 49994507e728..31f25ded6915 100644 --- a/contrib/tcpdump/print-pflog.c +++ b/contrib/tcpdump/print-pflog.c @@ -57,6 +57,7 @@ static const struct tok pf_reasons[] = { { 12, "12(state-limit)" }, { 13, "13(src-limit)" }, { 14, "14(synproxy)" }, + { 15, "15(map-failed)" }, { 0, NULL } }; @@ -64,6 +65,7 @@ static const struct tok pf_actions[] = { { PF_PASS, "pass" }, { PF_DROP, "block" }, { PF_SCRUB, "scrub" }, + { PF_NOSCRUB, "scrub" }, { PF_NAT, "nat" }, { PF_NONAT, "nat" }, { PF_BINAT, "binat" }, @@ -71,6 +73,8 @@ static const struct tok pf_actions[] = { { PF_RDR, "rdr" }, { PF_NORDR, "rdr" }, { PF_SYNPROXY_DROP, "synproxy-drop" }, + { PF_DEFER, "pfsync-defer" }, + { PF_MATCH, "match" }, { 0, NULL } }; From nobody Tue Apr 18 12:34: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 4Q13JP43Sfz452Yx; Tue, 18 Apr 2023 12:34: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 4Q13JN0qVwz3Q9l; Tue, 18 Apr 2023 12:34:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681821252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V6lmZuP15GI3SqqKppi/lhTc2LwuNNIhTrMtCxWJONM=; b=qbFIzVg8H2X6p3OY2nj0UBpO15c1IJy/F/RLNzgcfDR/+Jhn/c0YtUJSMs9BK9gOhGZ4Tw Dxa6G8bflSbVEUYoXfjlJ36c58a7Kqxr1bLy/HvOKTTokKPxWrNKnuSntDQYlS/y2xDNeg mFWBRh2A7RvEJKc6vPxvoljjKKPpPzQ+/2xr7kFZVCiA9veuoUOBtwtGEk19DKy5NaecCO aZPtPZePmZqjQW3inEgonZlTzyKFcIc6aebBBIys1vXinEs9ID54OX/QG7ry2iivpeuhBz x6/6CKtDbulqO4nFOsHhxgKkeNmaQKbdeaRaqSqOx2OKBOu3KWT7jz2SW8/iUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681821252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V6lmZuP15GI3SqqKppi/lhTc2LwuNNIhTrMtCxWJONM=; b=IWSx+SmEvbGkal8vi9VzJcOvs08BcuZWH8MYwtGJGDJyhUfoC7wqWOJ7Ig9CzrCqUpy8J0 U/zWgufBEnc80daKWUKKM46z6G+Aui1drKkLlKYCxAs5OSWpT/7tMXx4or8H0TOrcdu4b9 48shur4OHKW++ZvQtpMmACoDwgZWWeEk0xwGOqw7MWxQT1/VtVGbfj6FLwAwgIZhpw27ZN /JjXWrBb6edbRQVZm9RMaMYaZAQ1w6qv3Jotz0edDFm36GMjYlKwVJSjNYhqEMLNVNP5tk EPu2dH38OtqDDlq1bGzIxM9C0fdsOtYs6+rnto0bAP0PrVuy7Ge5EI8h1wO9ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681821252; a=rsa-sha256; cv=none; b=P42RLdK9pcrskID+6q1k/CXdloowKJbmaUgMZIh/0uho6Ri+eknExeHrBips6eLsVkkAWk obze6XPLoFncIKOc+2NbHeewslO0VHpjT5N33UkCTMzZGP3fjNODsEVKlf2kQXFBxvI84O 9Z6ym/vx8SshR4EXuHqnyLQ/lHWNjE7Gw5krzEaltakTTtkg4xB1Jv2Z2LX3swYH0GA1P5 CtVmIEVpN4DCkdofWq/XhQ1FU/DkaXIl635UeoYsrFOCMAqMz+STAzbKZ5Jlq/+lUbWdmH CsrxhNBhhPNzW4pOj63RePsklgJZ9dbYuJBxPhtjM1DO42R1VkCZKu31YQjP/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13JM71Ryz1BTS; Tue, 18 Apr 2023 12:34: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 33ICYBAL030060; Tue, 18 Apr 2023 12:34:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ICYBlI030059; Tue, 18 Apr 2023 12:34:11 GMT (envelope-from git) Date: Tue, 18 Apr 2023 12:34:11 GMT Message-Id: <202304181234.33ICYBlI030059@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: 28abf6327751 - main - netlink: sync interface IFLA attributes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 28abf632775176579f2ba3315487c4525bf3ca64 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=28abf632775176579f2ba3315487c4525bf3ca64 commit 28abf632775176579f2ba3315487c4525bf3ca64 Author: Alexander V. Chernikov AuthorDate: 2023-04-18 12:33:48 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-18 12:34:05 +0000 netlink: sync interface IFLA attributes MFC after: 2 weeks --- sys/netlink/route/interface.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/netlink/route/interface.h b/sys/netlink/route/interface.h index 12a8aa718993..ec0e1e246a07 100644 --- a/sys/netlink/route/interface.h +++ b/sys/netlink/route/interface.h @@ -134,6 +134,14 @@ enum { IFLA_ALT_IFNAME, /* Alternative ifname */ IFLA_PERM_ADDRESS, IFLA_PROTO_DOWN_REASON, + IFLA_PARENT_DEV_NAME, + IFLA_PARENT_DEV_BUS_NAME, + IFLA_GRO_MAX_SIZE, + IFLA_TSO_MAX_SEGS, + IFLA_ALLMULTI, + IFLA_DEVLINK_PORT, + IFLA_GSO_IPV4_MAX_SIZE, + IFLA_GRO_IPV4_MAX_SIZE, __IFLA_MAX }; #define IFLA_MAX (__IFLA_MAX - 1) From nobody Tue Apr 18 12:40: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 4Q13RN2qM0z453HL; Tue, 18 Apr 2023 12:40: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 4Q13RN1QKZz3nkG; Tue, 18 Apr 2023 12:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681821616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kLS0L6MQQYfsa7tC8d+FUMXwjuIHOE3ei3S4PH8CBwo=; b=NlYVatBVog08GnOF1zBpHZsdkKyxYs/ki6aMY16v4XjMBCCoY38fe6Wk18/qiW2k+Zimsh AShAH1d14TsUlCWFvzkTlqpzART9RF+h2xrNz6vCJ3zqxuHLwy11vJEPNughRf3x/PODim PSZLXan3TBNELkMmzGVekLiDWPUUjD04alLiEx6kltc0FwmwWNp+jeEsv2HVnMat7ku/Uf LJUDEe7m5izdI0JQ/9AZzczshpB7X8mWCD/5tXhypG2GDrwDozNBXQekV7ubwBchBw8KWw cJVIGu9xiPFTGk5upCJIy/S5JC0Ox2vViuEe3CNGOxF/BqqduhiJ294Hkyxz8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681821616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kLS0L6MQQYfsa7tC8d+FUMXwjuIHOE3ei3S4PH8CBwo=; b=yolkEUgQ8/OyLLLjH3joVumPrC4/jx/Q3pFncA9bGBeYHnbxRITXuu/hgdVp3evZTPb9rV GaZOAkA+Z5lbCUs2hWXnemq8PtZHD5OzIGPfeTuUVLIkJ0urIhUewvvUP6eLfPAADR71qa 6gLi29e6fpJrO9UF1/GeTJ0HWxv/23m/jCaHI2V5jYxslBqsrw6X+90SPV5YnEPDTVbIGf xD7Wus0H4QHSdovBO63NgKngvMQm7HQlZQ2vDV6kMDmJ7+CHFJLI8U3h+8Zk/WgE/OEt1H al4FLXxYxtRRzH3uaSc2yDZJdQESdNdbFlDhXBTXlMWysUfvEheFjGttdzH1DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681821616; a=rsa-sha256; cv=none; b=gNKwydSFF6cYDeZkUxWzqCr+aiyVywaq5Do3M7aiy4P4u0BgrYnWQ7F+aXbHCttL0HFquV 5Vx8jwKPThmT7fUEC8sqAQuEkLLp05TR4X++DzLKOLbXD70gDaEl9iiHvrYnKhgDq2wltv hZfBbdPtafT37ld2xpzRJ3cxEZyGJmFgjeCwZkhyPtMF26iRiQqowBPqktcf+r4vClTpYS JVw1bxlBGa9K/W0MbvzyxiIap0JFcV1QmbV5Ka6HEx4tpCEvfBsWIjylS3XCmeWuaBqkhj JrXEr0Qg08ZZZiXoBMzmzBYPjTUPyZuheprK9OeSeqtJwC4nXx5iWM+LSL3p3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13RN09k0z19rH; Tue, 18 Apr 2023 12:40: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 33ICeF24038557; Tue, 18 Apr 2023 12:40:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ICeF0K038547; Tue, 18 Apr 2023 12:40:15 GMT (envelope-from git) Date: Tue, 18 Apr 2023 12:40:15 GMT Message-Id: <202304181240.33ICeF0K038547@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: 37229fed38c6 - main - tcp: Blackbox logging and tcp accounting together can cause a crash. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37229fed38c68b26a497f4fb189d4b8e35346232 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=37229fed38c68b26a497f4fb189d4b8e35346232 commit 37229fed38c68b26a497f4fb189d4b8e35346232 Author: Randall Stewart AuthorDate: 2023-04-17 17:52:00 +0000 Commit: Randall Stewart CommitDate: 2023-04-17 17:52:00 +0000 tcp: Blackbox logging and tcp accounting together can cause a crash. If you currently turn BB logging on and in combination have TCP Accounting on we can get a crash where we have no NULL check and we run out of memory. Also lets make sure we don't do a divide by 0 in calculating any BB ratios. Reviewed by: tuexen Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D39622 --- sys/netinet/tcp_log_buf.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c index 5a16c7593cfc..c533f8329fbe 100644 --- a/sys/netinet/tcp_log_buf.c +++ b/sys/netinet/tcp_log_buf.c @@ -554,7 +554,10 @@ tcp_log_apply_ratio(struct tcpcb *tp, int ratio) INP_WUNLOCK(inp); return (EOPNOTSUPP); } - ratio_hash_thresh = max(1, UINT32_MAX / ratio); + if (ratio) + ratio_hash_thresh = max(1, UINT32_MAX / ratio); + else + ratio_hash_thresh = 0; TCPID_BUCKET_REF(tlb); INP_WUNLOCK(inp); TCPID_BUCKET_LOCK(tlb); @@ -1438,30 +1441,33 @@ tcp_log_tcpcbfini(struct tcpcb *tp) memset(&log, 0, sizeof(log)); if (tp->t_flags2 & TF2_TCP_ACCOUNTING) { - for (i = 0; itcp_cnt_counters[i]; } lgb = tcp_log_event(tp, NULL, - NULL, - NULL, - TCP_LOG_ACCOUNTING, 0, - 0, &log, false, NULL, NULL, 0, &tv); - lgb->tlb_flex1 = TCP_NUM_CNT_COUNTERS; - lgb->tlb_flex2 = 1; + NULL, + NULL, + TCP_LOG_ACCOUNTING, 0, + 0, &log, false, NULL, NULL, 0, &tv); + if (lgb != NULL) { + lgb->tlb_flex1 = TCP_NUM_CNT_COUNTERS; + lgb->tlb_flex2 = 1; + } else + goto skip_out; for (i = 0; itcp_proc_time[i]; } lgb = tcp_log_event(tp, NULL, - NULL, - NULL, - TCP_LOG_ACCOUNTING, 0, - 0, &log, false, NULL, NULL, 0, &tv); - if (tptoinpcb(tp)->inp_flags2 & INP_MBUF_ACKCMP) + NULL, + NULL, + TCP_LOG_ACCOUNTING, 0, + 0, &log, false, NULL, NULL, 0, &tv); + if (lgb != NULL) { lgb->tlb_flex1 = TCP_NUM_CNT_COUNTERS; - else - lgb->tlb_flex1 = TCP_NUM_PROC_COUNTERS; - lgb->tlb_flex2 = 2; + lgb->tlb_flex2 = 2; + } } +skip_out: log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.cur_del_rate = tp->t_end_info; TCP_LOG_EVENTP(tp, NULL, From nobody Tue Apr 18 13:02: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 4Q13wV4T0rz454cj; Tue, 18 Apr 2023 13:02: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 4Q13wV3xdsz4Kgm; Tue, 18 Apr 2023 13:02:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nGDlN11oP/wQIpGdjQLa6v14tYdTGKP+Gt1uPFQBHqU=; b=mXV4WPyaw4thhrN5bqURomOEZyhZ/NI/4ourUaKcOzlztiCukpHBicFbiBC1eqFhhHxaGh p8l9BzLcFCgFNMk485VfFCsM+onkf9uURiKEAmXHqm64Ukw22wFvhr0Cqg2vFTgmlqzlGK XWq97SpxQvOFdtUE5YtrcVMff752uFx010qmnQTJlT/ftvWy/oIxFAAS6ju5yKgFJQEcRd y4/mT3A+EsHCjUYMODAD0NOC750C14scdgn4C+A3NJ/X0Tx3cgPZfeL6194cfML10d2dbC 4B9ZzywYvdyIEwMtV7KKRPPWdlKnF+3keiuA0jEz98LOYsHLY27SI+v6HIhd/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nGDlN11oP/wQIpGdjQLa6v14tYdTGKP+Gt1uPFQBHqU=; b=vqXhPo+NHE4tJaYs74WzZg7At0RDvO14Tq/RaBf6X8mI2QbXr9KIRubr4hDwakJj//bplL MqDxUL1tWjFdaBN1d5gRFXN/KjBBs8sMaiioaVPiOn41I6mFhLGe/U1s/Shwzb6ePvCqMp cZ45TyPfbr77CmocC8ASukI1v0ZkVHWdp8Vm6KgzO4kUXKawYAaAfPn5dK01RlMi6dEwp6 jY9dgrKoM1wa/zi4Kao36h52M7qWkcBpW3PWE0DNWibeLAkR2s62PX+kZrp94JquyOs1l5 F4cFATr0ys9CQ2NFZMMXB1c+QqcNr8vjoiGOOSSZtHu2uX6G4xx3fXO9TGJNSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822922; a=rsa-sha256; cv=none; b=ueiZ6vvfcDqZKgt8cULfDhuoizZoN4i7U2AnNCg4QT9oNb1RDgDJ5S4Eid18PCSG03Y89q yC00Hi9btBpSz0SZNqZlLAjOGFo7BiwP33pd4LpAJUmtzIeUFf0n1IAJhLhH7DD2/z+mOw cR4SAYKYrIwsg7TnI5AFcI5eGrsxYb8oTrbUOHevGOnQ4U+/jCC77pVcO6Kf/ZRnDvlxX6 VG0dj4/een/sUnMY3JCX/8oBpgPYQoBcCBATJ6HLxCOVq97BkDvUjH8jibssQhrIjbPVeX zQIfCLChBApTzjh4s38VgOYYyhEx829lERpMfwD/51a4YbLNm5vvm7Pl/2/qCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13wV31Lrz1Bm4; Tue, 18 Apr 2023 13:02: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 33ID22uj078974; Tue, 18 Apr 2023 13:02:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID22ab078973; Tue, 18 Apr 2023 13:02:02 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:02 GMT Message-Id: <202304181302.33ID22ab078973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 3bb3e4768ff8 - main - mlx5: Make MLX5_COMP_EQ_SIZE tunable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3bb3e4768ff854b88ba0a7d129edad49f15d7ce3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=3bb3e4768ff854b88ba0a7d129edad49f15d7ce3 commit 3bb3e4768ff854b88ba0a7d129edad49f15d7ce3 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:11:02 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:06 +0000 mlx5: Make MLX5_COMP_EQ_SIZE tunable. When using hardware pacing, this value can be increased, because more SQ's means more EQ events aswell. Make it tunable, hw.mlx5.comp_eq_size . MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/driver.h | 4 ---- sys/dev/mlx5/mlx5_core/mlx5_main.c | 23 ++++++++++++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 16ada325b1be..47ed4a9d73f3 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -805,10 +805,6 @@ struct mlx5_core_dct { u16 uid; }; -enum { - MLX5_COMP_EQ_SIZE = 1024, -}; - enum { MLX5_PTYS_IB = 1 << 0, MLX5_PTYS_EN = 1 << 2, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 6ddeaf64ed89..9e9b7b845528 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -84,6 +84,11 @@ SYSCTL_INT(_hw_mlx5, OID_AUTO, fast_unload_enabled, CTLFLAG_RWTUN, &mlx5_fast_unload_enabled, 0, "Set to enable fast unload. Clear to disable."); +static int mlx5_core_comp_eq_size = 1024; +SYSCTL_INT(_hw_mlx5, OID_AUTO, comp_eq_size, CTLFLAG_RDTUN | CTLFLAG_MPSAFE, + &mlx5_core_comp_eq_size, 0, + "Set default completion EQ size between 1024 and 16384 inclusivly. Value should be power of two."); + static LIST_HEAD(intf_list); static LIST_HEAD(dev_list); static DEFINE_MUTEX(intf_mutex); @@ -178,6 +183,22 @@ static struct mlx5_profile profiles[] = { }, }; +static int +mlx5_core_get_comp_eq_size(void) +{ + int value = mlx5_core_comp_eq_size; + + if (value < 1024) + value = 1024; + else if (value > 16384) + value = 16384; + + /* make value power of two, rounded down */ + while (value & (value - 1)) + value &= (value - 1); + return (value); +} + static void mlx5_set_driver_version(struct mlx5_core_dev *dev) { const size_t driver_ver_sz = @@ -686,7 +707,7 @@ static int alloc_comp_eqs(struct mlx5_core_dev *dev) INIT_LIST_HEAD(&table->comp_eqs_list); ncomp_vec = table->num_comp_vectors; - nent = MLX5_COMP_EQ_SIZE; + nent = mlx5_core_get_comp_eq_size(); for (i = 0; i < ncomp_vec; i++) { eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, dev->priv.numa_node); From nobody Tue Apr 18 13:02:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q13wW63Bwz454g3; Tue, 18 Apr 2023 13:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q13wW5TCWz4Kh7; Tue, 18 Apr 2023 13:02:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+faXFNPD1US2rNVFmWoFVimD1kfXi2PKujgNt+o72Js=; b=Lfu8B8PNAsXbm0WeYu++PZ3TQzjGmFZ0IqRd0oKSduHQfc9lEIJ1MJwfbonEObS6URMk9j LXxDgfsEIHzhZ6sGC42TmwL3wu13czKvsuai01HODG5UnBXO5yk2euo2sixHh6hKouEPyy BSKGabseaTq+lFfWmM2eZKGsWNXVlXvAIcW11SsnH/iaQb+IYowrAZYTRf7zjqdOGmsGU6 HQlPlnvvOPEg+4tAvc8QBBjRYkN+vdBeQdflSFOU1OKUlqNuxRt1lCovZV4lYcUm9NeOz3 zVaM6YowRsvNkyYlIhugG7gHjwkSRmNLRRgU0FXWSMf3P7SI0AKFCrP3HuNLXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+faXFNPD1US2rNVFmWoFVimD1kfXi2PKujgNt+o72Js=; b=lUl3P4CdAItTxPie1Cf4wKDwCYyscCO9JngVRC0z2VuiYx9U2jENlxylol014DhvwbbxbF NdXufIcujCb1aiaf/BXgQcENN44tdwUIXPJVMopHVcnDcOBKHZV4FjIVRl/hWAZGc7i6cu W6ZoHn4oHMAwQYg5r9MGXq4EOxl/sb8kx88Zo1SvK7aFfHi2qLyEwwXVsB+1a94Fjn1Fl4 PfKMPkZHg7UML+bYlwwDFpNleIJ+RL0BTwKCQBnOKHplzyhFmEog1nSijZIG/mSfuW7EL/ YS+xjBHVuoQrnyq0n7levWlZtbrZPo4z3k7ZfssNdNtw7Uc3Vz9M8d8WfhPH4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822923; a=rsa-sha256; cv=none; b=MvhElaXOWcy4koNLeWzabA7akmRYpZC7lfcMEzsetmRBECHbqt+7op5qyLbuUBcL09J47J WYaf80NFYBHwtu0z6e/kkD8pTVujAt121j82KWAsmdNns/UO8S92j699rAqNxW6GIWY058 QYmmesggscwWVxN43mKuH2lcxyWlfBz6mTIdsycuQmd90R0ZXCn4bWvz2uQ6nb3lFYyWbW T8eO8Xo6+nx/zwpd+8uSnfKUIOyasiHR6NmP1BCXHJSKeRMkAb/GJS2r9NUzMoGm3BAfJZ B1Ryz0HB9OikUJ044XyEy5JY2Lt6fH5LhHUxS1t6YbLE2xLVguJx9Wh/4b+Itw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13wW3p3fz1BpV; Tue, 18 Apr 2023 13:02: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 33ID23YA078993; Tue, 18 Apr 2023 13:02:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID23Qe078992; Tue, 18 Apr 2023 13:02:03 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:03 GMT Message-Id: <202304181302.33ID23Qe078992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: b0b87d915145 - main - mlx5: Make mlx5_del_flow_rule() NULL safe. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0b87d9151456e71fd6a14736e132d67114db4aa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=b0b87d9151456e71fd6a14736e132d67114db4aa commit b0b87d9151456e71fd6a14736e132d67114db4aa Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:16:16 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:06 +0000 mlx5: Make mlx5_del_flow_rule() NULL safe. This change factors out repeated NULL checks. No functional change intended. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/fs.h | 2 +- sys/dev/mlx5/mlx5_core/mlx5_eswitch.c | 25 ++--- sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c | 6 +- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 8 +- sys/dev/mlx5/mlx5_en/en.h | 1 - sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 162 ++++++------------------------ sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 10 +- 7 files changed, 51 insertions(+), 163 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index e5ec897fd9f1..7246d8ddbd80 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -158,7 +158,7 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, u32 action, u32 flow_tag, struct mlx5_flow_destination *dest); -void mlx5_del_flow_rule(struct mlx5_flow_rule *fr); +void mlx5_del_flow_rule(struct mlx5_flow_rule **); /*The following API is for sniffer*/ typedef int (*rule_event_fn)(struct mlx5_flow_rule *rule, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c b/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c index 6d3be72427c9..4e0da94483e8 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c @@ -398,9 +398,7 @@ static int esw_del_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) mlx5_mpfs_del_mac(esw->dev, esw_uc->table_index); - if (vaddr->flow_rule) - mlx5_del_flow_rule(vaddr->flow_rule); - vaddr->flow_rule = NULL; + mlx5_del_flow_rule(&vaddr->flow_rule); l2addr_hash_del(esw_uc); return 0; @@ -459,15 +457,12 @@ static int esw_del_mc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) vport, mac, vaddr->flow_rule, esw_mc->refcnt, esw_mc->uplink_rule); - if (vaddr->flow_rule) - mlx5_del_flow_rule(vaddr->flow_rule); - vaddr->flow_rule = NULL; + mlx5_del_flow_rule(&vaddr->flow_rule); if (--esw_mc->refcnt) return 0; - if (esw_mc->uplink_rule) - mlx5_del_flow_rule(esw_mc->uplink_rule); + mlx5_del_flow_rule(&esw_mc->uplink_rule); l2addr_hash_del(esw_mc); return 0; @@ -684,14 +679,8 @@ out: static void esw_vport_cleanup_egress_rules(struct mlx5_eswitch *esw, struct mlx5_vport *vport) { - if (!IS_ERR_OR_NULL(vport->egress.allowed_vlan)) - mlx5_del_flow_rule(vport->egress.allowed_vlan); - - if (!IS_ERR_OR_NULL(vport->egress.drop_rule)) - mlx5_del_flow_rule(vport->egress.drop_rule); - - vport->egress.allowed_vlan = NULL; - vport->egress.drop_rule = NULL; + mlx5_del_flow_rule(&vport->egress.allowed_vlan); + mlx5_del_flow_rule(&vport->egress.drop_rule); } static void esw_vport_disable_egress_acl(struct mlx5_eswitch *esw, @@ -775,9 +764,7 @@ out: static void esw_vport_cleanup_ingress_rules(struct mlx5_eswitch *esw, struct mlx5_vport *vport) { - if (!IS_ERR_OR_NULL(vport->ingress.drop_rule)) - mlx5_del_flow_rule(vport->ingress.drop_rule); - vport->ingress.drop_rule = NULL; + mlx5_del_flow_rule(&vport->ingress.drop_rule); } static void esw_vport_disable_ingress_acl(struct mlx5_eswitch *esw, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c index 415869516a27..e009d403e96c 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c @@ -83,7 +83,7 @@ accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct inpcb *inp) void mlx5e_accel_fs_del_inpcb(struct mlx5_flow_rule *rule) { - mlx5_del_flow_rule(rule); + mlx5_del_flow_rule(&rule); } struct mlx5_flow_rule * @@ -341,7 +341,7 @@ accel_fs_tcp_destroy_table(struct mlx5e_priv *priv, int i) fs_tcp = &priv->fts.accel_tcp; ft = fs_tcp->tables + i; - mlx5_del_flow_rule(fs_tcp->default_rules[i]); + mlx5_del_flow_rule(&fs_tcp->default_rules[i]); accel_fs_tcp_destroy_groups(ft); kfree(ft->g); @@ -394,7 +394,7 @@ mlx5e_accel_fs_tcp_create(struct mlx5e_priv *priv) err_destroy_rules: while (i--) - mlx5_del_flow_rule(priv->fts.accel_tcp.default_rules[i]); + mlx5_del_flow_rule(&priv->fts.accel_tcp.default_rules[i]); i = MLX5E_ACCEL_FS_TCP_NUM_TYPES; err_destroy_tables: diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index bc36b59fd555..b7ff4dd323e2 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -1876,10 +1876,16 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, } EXPORT_SYMBOL(mlx5_add_flow_rule); -void mlx5_del_flow_rule(struct mlx5_flow_rule *dst) +void mlx5_del_flow_rule(struct mlx5_flow_rule **pp) { struct mlx5_flow_namespace *ns; + struct mlx5_flow_rule *dst; + + dst = *pp; + *pp = NULL; + if (IS_ERR_OR_NULL(dst)) + return; ns = get_ns_with_notifiers(&dst->base); if (ns) down_read(&ns->dests_rw_sem); diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index f4a048a6d2ca..e942b3a13462 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -959,7 +959,6 @@ struct mlx5_flow_rule; struct mlx5e_eth_addr_info { u8 addr [ETH_ALEN + 2]; - u32 tt_vec; /* flow table rule per traffic type */ struct mlx5_flow_rule *ft_rule[MLX5E_NUM_TT]; }; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c index aec2bb646644..7f2b80e75cee 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -145,41 +145,17 @@ static void mlx5e_del_eth_addr_from_flow_table(struct mlx5e_priv *priv, struct mlx5e_eth_addr_info *ai) { - if (ai->tt_vec & (1 << MLX5E_TT_IPV6_IPSEC_ESP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6_IPSEC_ESP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4_IPSEC_ESP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4_IPSEC_ESP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV6_IPSEC_AH)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6_IPSEC_AH]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4_IPSEC_AH)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4_IPSEC_AH]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV6_TCP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6_TCP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4_TCP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4_TCP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV6_UDP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6_UDP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4_UDP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4_UDP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV6)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4]); - - if (ai->tt_vec & (1 << MLX5E_TT_ANY)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_ANY]); - - /* ensure the rules are not freed again */ - ai->tt_vec = 0; + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6_IPSEC_ESP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4_IPSEC_ESP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6_IPSEC_AH]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4_IPSEC_AH]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6_TCP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4_TCP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6_UDP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4_UDP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_ANY]); } static int @@ -319,7 +295,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_ANY); } mc_enable = MLX5_MATCH_OUTER_HEADERS; @@ -335,7 +310,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4); } if (tt_vec & BIT(MLX5E_TT_IPV6)) { @@ -348,7 +322,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV6); } MLX5_SET_TO_ONES(fte_match_param, mc, outer_headers.ip_protocol); @@ -364,7 +337,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4_UDP); } if (tt_vec & BIT(MLX5E_TT_IPV6_UDP)) { @@ -377,7 +349,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV6_UDP); } MLX5_SET(fte_match_param, mv, outer_headers.ip_protocol, IPPROTO_TCP); @@ -392,7 +363,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4_TCP); } if (tt_vec & BIT(MLX5E_TT_IPV6_TCP)) { @@ -405,8 +375,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - - ai->tt_vec |= BIT(MLX5E_TT_IPV6_TCP); } MLX5_SET(fte_match_param, mv, outer_headers.ip_protocol, IPPROTO_AH); @@ -421,7 +389,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4_IPSEC_AH); } if (tt_vec & BIT(MLX5E_TT_IPV6_IPSEC_AH)) { @@ -434,7 +401,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV6_IPSEC_AH); } MLX5_SET(fte_match_param, mv, outer_headers.ip_protocol, IPPROTO_ESP); @@ -449,7 +415,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4_IPSEC_ESP); } if (tt_vec & BIT(MLX5E_TT_IPV6_IPSEC_ESP)) { @@ -462,7 +427,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV6_IPSEC_ESP); } return 0; @@ -503,73 +467,17 @@ add_eth_addr_rule_out: static void mlx5e_del_main_vxlan_rules(struct mlx5e_priv *priv) { - struct mlx5_flow_rule **ra = priv->fts.main_vxlan_rule, **r; - - r = &ra[MLX5E_TT_IPV6_IPSEC_ESP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4_IPSEC_ESP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV6_IPSEC_AH]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4_IPSEC_AH]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV6_TCP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4_TCP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV6_UDP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4_UDP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV6]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_ANY]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6_IPSEC_ESP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4_IPSEC_ESP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6_IPSEC_AH]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4_IPSEC_AH]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6_TCP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4_TCP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6_UDP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4_UDP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_ANY]); } static int @@ -857,28 +765,16 @@ mlx5e_del_vlan_rule(struct mlx5e_priv *priv, { switch (rule_type) { case MLX5E_VLAN_RULE_TYPE_UNTAGGED: - if (priv->vlan.untagged_ft_rule) { - mlx5_del_flow_rule(priv->vlan.untagged_ft_rule); - priv->vlan.untagged_ft_rule = NULL; - } + mlx5_del_flow_rule(&priv->vlan.untagged_ft_rule); break; case MLX5E_VLAN_RULE_TYPE_ANY_CTAG_VID: - if (priv->vlan.any_cvlan_ft_rule) { - mlx5_del_flow_rule(priv->vlan.any_cvlan_ft_rule); - priv->vlan.any_cvlan_ft_rule = NULL; - } + mlx5_del_flow_rule(&priv->vlan.any_cvlan_ft_rule); break; case MLX5E_VLAN_RULE_TYPE_ANY_STAG_VID: - if (priv->vlan.any_svlan_ft_rule) { - mlx5_del_flow_rule(priv->vlan.any_svlan_ft_rule); - priv->vlan.any_svlan_ft_rule = NULL; - } + mlx5_del_flow_rule(&priv->vlan.any_svlan_ft_rule); break; case MLX5E_VLAN_RULE_TYPE_MATCH_VID: - if (priv->vlan.active_vlans_ft_rule[vid]) { - mlx5_del_flow_rule(priv->vlan.active_vlans_ft_rule[vid]); - priv->vlan.active_vlans_ft_rule[vid] = NULL; - } + mlx5_del_flow_rule(&priv->vlan.active_vlans_ft_rule[vid]); mlx5e_vport_context_update_vlans(priv); break; default: @@ -1997,7 +1893,7 @@ mlx5e_del_vxlan_rule(struct mlx5e_priv *priv, sa_family_t family, u_int port) } if (el->installed) - mlx5_del_flow_rule(el->vxlan_ft_rule); + mlx5_del_flow_rule(&el->vxlan_ft_rule); TAILQ_REMOVE(&priv->vxlan.head, el, link); kvfree(el); return (0); @@ -2011,7 +1907,7 @@ mlx5e_del_all_vxlan_rules(struct mlx5e_priv *priv) TAILQ_FOREACH(el, &priv->vxlan.head, link) { if (!el->installed) continue; - mlx5_del_flow_rule(el->vxlan_ft_rule); + mlx5_del_flow_rule(&el->vxlan_ft_rule); el->installed = false; } } @@ -2019,7 +1915,7 @@ mlx5e_del_all_vxlan_rules(struct mlx5e_priv *priv) static void mlx5e_del_vxlan_catchall_rule(struct mlx5e_priv *priv) { - mlx5_del_flow_rule(priv->fts.vxlan_catchall_ft_rule); + mlx5_del_flow_rule(&priv->fts.vxlan_catchall_ft_rule); } void diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index b6b610848a1b..75cfd9dd7b7c 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -2074,13 +2074,13 @@ static int mlx5_ib_destroy_flow(struct ib_flow *flow_id) mutex_lock(&dev->flow_db.lock); list_for_each_entry_safe(iter, tmp, &handler->list, list) { - mlx5_del_flow_rule(iter->rule); + mlx5_del_flow_rule(&iter->rule); put_flow_table(dev, iter->prio, true); list_del(&iter->list); kfree(iter); } - mlx5_del_flow_rule(handler->rule); + mlx5_del_flow_rule(&handler->rule); put_flow_table(dev, handler->prio, true); mutex_unlock(&dev->flow_db.lock); @@ -2245,7 +2245,7 @@ static struct mlx5_ib_flow_handler *create_dont_trap_rule(struct mlx5_ib_dev *de handler_dst = create_flow_rule(dev, ft_prio, flow_attr, dst); if (IS_ERR(handler_dst)) { - mlx5_del_flow_rule(handler->rule); + mlx5_del_flow_rule(&handler->rule); ft_prio->refcount--; kfree(handler); handler = handler_dst; @@ -2308,7 +2308,7 @@ static struct mlx5_ib_flow_handler *create_leftovers_rule(struct mlx5_ib_dev *de &leftovers_specs[LEFTOVERS_UC].flow_attr, dst); if (IS_ERR(handler_ucast)) { - mlx5_del_flow_rule(handler->rule); + mlx5_del_flow_rule(&handler->rule); ft_prio->refcount--; kfree(handler); handler = handler_ucast; @@ -2351,7 +2351,7 @@ static struct mlx5_ib_flow_handler *create_sniffer_rule(struct mlx5_ib_dev *dev, return handler_rx; err_tx: - mlx5_del_flow_rule(handler_rx->rule); + mlx5_del_flow_rule(&handler_rx->rule); ft_rx->refcount--; kfree(handler_rx); err: From nobody Tue Apr 18 13:02:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q13wX6RFRz454m7; Tue, 18 Apr 2023 13:02: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 4Q13wX5g7yz4KKq; Tue, 18 Apr 2023 13:02:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=awcyl1wNAV31z9/qbK7b527CtMh+KHIMvH1mB4mB/fA=; b=Y+ey3xDr3/ZgrELiCe3dEMpY+dLbJCrg5HShWr+orTGxrh1RG4HVbNywVjdzRORLIxU9aB JljEOI5u5bGDp1K9MS93YkH5B7HwKczQ2tamg7pzJdQiHr8DgOf0EuI8yqmx/v6ZhVRVIy KyrXP87ya9jqRm16fmAXdLDImKFEvV06AUHVXxOMJWY8wfRztalyPHhGsXgjcJ5hpyyl8V vfDjA54Qt+Ck5HWEjDWRem9Jgxzy6XSFu2bAdaOADM9xpK4Q8HQfRacQYrZNI81U/7K6TB 92sllyVk+6/K7Fwvj1aHvbT9AfsVeuJ0Ns4Zaz9wLnPIV0ZY/EYqosLHOtAusw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=awcyl1wNAV31z9/qbK7b527CtMh+KHIMvH1mB4mB/fA=; b=GbXk2CjFqUNzXhm+KLsiP4p2r3Tc/88v4IoTPxrlkYFoDu5fKM70nWYb2uT7TYmVIX+Fd2 NPElTy0BShaNZWZye6CqhYtAyKF71iWQ3NLN1KVq+DKJrESIPKe7pz2CvmkTR7BrFH5J6M EXIeCqtTyFTCEZjSstEGNTOo1fJRgduYWyEaeYAXL5OW3at6E/TI2vjA5fFkx0/i/P1DSX FJbNKFrQZIBrR4Wzg9Vssh0saaO9Or1uLlVLNoA3PKcEPFcJC/40gB2BuyIRzE3KAojZbD lZeV0Y9i8IGsAFDA69I2w3q9wXwluYYnx6F6oOdKpqn6MmgOFkF7fjhvKSlsTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822924; a=rsa-sha256; cv=none; b=R3TqtxmAEF/3rUaL67YYs87rF4vhJkExI4hKyqmUtdTHX/+WF49DiUYh/nPZ2cW3iwh38A JPOJFPFxTzsqDxCaShuABXnA9H6lt/ZtboralBDQBLqykzNRWNe/T+IV7Ak3z7rrjRatGC 9d1M/EFDg7fxhKHVK1PZ2oNs7D4AsUfuhckNoJBkOIW9pSDJyY3/k9JfTV34ZY+9d+lsPR 6/cVw43zdaHT4od4+gFZ5eAHfeM5uYTL70Ew16VLe+JyiBai/dsNJSa4claywbiE8ucq9H Y73JiRisGLdcxFEtp2SrWTnIy1uUH0OTg2XgctPPBePlxK0HdEhQjg/8uE75hQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13wX4jJfz1CHS; Tue, 18 Apr 2023 13:02: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 33ID2425079014; Tue, 18 Apr 2023 13:02:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID24ac079013; Tue, 18 Apr 2023 13:02:04 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:04 GMT Message-Id: <202304181302.33ID24ac079013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 2f7e9a8a2136 - main - mlx5: Fix duplicate free of default flow rule in error case. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f7e9a8a21367393b613f0f150d49009fa74dd5c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=2f7e9a8a21367393b613f0f150d49009fa74dd5c commit 2f7e9a8a21367393b613f0f150d49009fa74dd5c Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:17:38 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:06 +0000 mlx5: Fix duplicate free of default flow rule in error case. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c index e009d403e96c..2bdf01081650 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c @@ -341,8 +341,6 @@ accel_fs_tcp_destroy_table(struct mlx5e_priv *priv, int i) fs_tcp = &priv->fts.accel_tcp; ft = fs_tcp->tables + i; - mlx5_del_flow_rule(&fs_tcp->default_rules[i]); - accel_fs_tcp_destroy_groups(ft); kfree(ft->g); ft->g = NULL; @@ -358,8 +356,10 @@ mlx5e_accel_fs_tcp_destroy(struct mlx5e_priv *priv) if (!MLX5_CAP_FLOWTABLE_NIC_RX(priv->mdev, ft_field_support.outer_ip_version)) return; - for (i = 0; i < MLX5E_ACCEL_FS_TCP_NUM_TYPES; i++) + for (i = 0; i < MLX5E_ACCEL_FS_TCP_NUM_TYPES; i++) { + mlx5_del_flow_rule(&priv->fts.accel_tcp.default_rules[i]); accel_fs_tcp_destroy_table(priv, i); + } } int From nobody Tue Apr 18 13:02: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 4Q13wZ5vFkz454gM; Tue, 18 Apr 2023 13: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 4Q13wY732Yz4Kng; Tue, 18 Apr 2023 13:02:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aGUhrghGGXdhgO+ByR7Sg+X9uRCbwz3Iky7SkLEukxc=; b=ffiZS4Rr55ilfpXcaYssqg6ivOaC0tqb1JrQgLCpPzXEkJlR5Hg6a2JbYDtjcfLcZR81+L icajYP7Ilr6rn5KFrt0IU93JETgxzMet7vRsxUeSYSCfPhX5WwQsmJTyNm60RHc1zEoVTr ByllpXBjOi1K7LSkxgPnowjmr6wk6gfpLzL1PgtT0j1TjtY+7qU2SAzXTr7WLgXoydgi/E dbgIZw7mrZ2/sHKSHEJXYN/Uux/NCAldP3ylWg1V2gnmL4DKDNQWcMwQrrpf4d0ZfdEKUL Al7y8BWaZgHHY0jGQjfj8dI+UfAgsaO9G+/8pWE9didzCLwQ28enNiqoKC/05Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aGUhrghGGXdhgO+ByR7Sg+X9uRCbwz3Iky7SkLEukxc=; b=YL13xDqag521qscLWNwrsEgrZ2lu9NZjoYgHBE5TFLyAdyUGSHKBMZ1mQKDYkn2wM5SLyz pYht8ZW7MdWpIjTmz3hGSUBVQLvc9BttdTDzU4NVs/DuHRj4qMZuVZRF3wi1lsZNZuF8IP pp4Zw39Q3F7W1UziiBM1TU50C/ieMGGbpdkIQL4vPqSABBK37nC8X6vpM8qjLi/xlvLLR+ FsmUhJDuFskh6KWX8pYIs7JdhXkbJBRz05rBftH6WUsDk/gl3UVhMInq0DehqFYZNpwrLF mkszSc6xsaH9VGccII+ZYqVEbgAO0DPHGxWldKlRBp8tTkeI4y5BL9DpMYp/nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822926; a=rsa-sha256; cv=none; b=h8RP4KecoQ/JNdf0g5PCqmB4YRydGBJY/Ru75lYOKbto4ZsPksyBrVIRpJ2yWCtCHBTg+H Hqxj2RvToJXH+2POr1JMi2I5vkm02IIuZ2T0znU4+UST1QrTk6H/Yl/geqACa1hrwyoy2E gcM6NC5ylMkqh7aedO3XAGlffC5LIhE00JxIRvNN1Oc1w16Lut3uh4atjBldJymNq1SrGC y8NflNH/MrgNOSgdc1JzykzpAjP/dHdwo6AzazfMHUJKsLcRpyRODlIo23D5hnOKIitbJC rLikLfmyD03L5I60lkIcSMZgPa+S+63Rm2gUgJ53qLKGl/0hHylYhxVhYDDn9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13wY5gv1z1Bm6; Tue, 18 Apr 2023 13:02:05 +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 33ID25I8079047; Tue, 18 Apr 2023 13:02:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID25Wv079046; Tue, 18 Apr 2023 13:02:05 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:05 GMT Message-Id: <202304181302.33ID25Wv079046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 273bfac08ff8 - main - mlx5: Implement mlx5_core_modify_cq_by_mask(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 273bfac08ff838786c8b48bc7d3d7180b5f6a3be Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=273bfac08ff838786c8b48bc7d3d7180b5f6a3be commit 273bfac08ff838786c8b48bc7d3d7180b5f6a3be Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:21:28 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:06 +0000 mlx5: Implement mlx5_core_modify_cq_by_mask(). Implement one CQ modify function supporting all firmware versions, instead of having more variants of CQ modify. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/cq.h | 5 +++++ sys/dev/mlx5/mlx5_core/mlx5_cq.c | 44 +++++++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/sys/dev/mlx5/cq.h b/sys/dev/mlx5/cq.h index d5e167498fd2..ffa98c38bee9 100644 --- a/sys/dev/mlx5/cq.h +++ b/sys/dev/mlx5/cq.h @@ -86,6 +86,7 @@ enum { MLX5_CQ_MODIFY_PERIOD = 1 << 0, MLX5_CQ_MODIFY_COUNT = 1 << 1, MLX5_CQ_MODIFY_OVERRUN = 1 << 2, + MLX5_CQ_MODIFY_EQN = 1 << 3, MLX5_CQ_MODIFY_PERIOD_MODE = 1 << 4, }; @@ -169,6 +170,10 @@ int mlx5_core_modify_cq_moderation_mode(struct mlx5_core_dev *dev, u16 cq_period, u16 cq_max_count, u8 cq_mode); +int mlx5_core_modify_cq_by_mask(struct mlx5_core_dev *, + struct mlx5_core_cq *, u32 mask, + u16 cq_period, u16 cq_max_count, + u8 cq_mode, u8 cq_eqn); int mlx5_debug_cq_add(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_cq.c b/sys/dev/mlx5/mlx5_core/mlx5_cq.c index 8f873bde6073..e849663528b2 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_cq.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_cq.c @@ -219,18 +219,9 @@ int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev, u16 cq_period, u16 cq_max_count) { - u32 in[MLX5_ST_SZ_DW(modify_cq_in)] = {0}; - void *cqc; - - MLX5_SET(modify_cq_in, in, cqn, cq->cqn); - cqc = MLX5_ADDR_OF(modify_cq_in, in, cq_context); - MLX5_SET(cqc, cqc, cq_period, cq_period); - MLX5_SET(cqc, cqc, cq_max_count, cq_max_count); - MLX5_SET(modify_cq_in, in, - modify_field_select_resize_field_select.modify_field_select.modify_field_select, - MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT); - - return mlx5_core_modify_cq(dev, cq, in, sizeof(in)); + return (mlx5_core_modify_cq_by_mask(dev, cq, + MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT, + cq_period, cq_max_count, 0, 0)); } int mlx5_core_modify_cq_moderation_mode(struct mlx5_core_dev *dev, @@ -239,19 +230,34 @@ int mlx5_core_modify_cq_moderation_mode(struct mlx5_core_dev *dev, u16 cq_max_count, u8 cq_mode) { - u32 in[MLX5_ST_SZ_DW(modify_cq_in)] = {0}; + return (mlx5_core_modify_cq_by_mask(dev, cq, + MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT | MLX5_CQ_MODIFY_PERIOD_MODE, + cq_period, cq_max_count, cq_mode, 0)); +} + +int +mlx5_core_modify_cq_by_mask(struct mlx5_core_dev *dev, + struct mlx5_core_cq *cq, u32 mask, + u16 cq_period, u16 cq_max_count, u8 cq_mode, u8 cq_eqn) +{ + u32 in[MLX5_ST_SZ_DW(modify_cq_in)] = {}; void *cqc; MLX5_SET(modify_cq_in, in, cqn, cq->cqn); cqc = MLX5_ADDR_OF(modify_cq_in, in, cq_context); - MLX5_SET(cqc, cqc, cq_period, cq_period); - MLX5_SET(cqc, cqc, cq_max_count, cq_max_count); - MLX5_SET(cqc, cqc, cq_period_mode, cq_mode); + if (mask & MLX5_CQ_MODIFY_PERIOD) + MLX5_SET(cqc, cqc, cq_period, cq_period); + if (mask & MLX5_CQ_MODIFY_COUNT) + MLX5_SET(cqc, cqc, cq_max_count, cq_max_count); + if (mask & MLX5_CQ_MODIFY_PERIOD_MODE) + MLX5_SET(cqc, cqc, cq_period_mode, cq_mode); + if (mask & MLX5_CQ_MODIFY_EQN) + MLX5_SET(cqc, cqc, c_eqn, cq_eqn); + MLX5_SET(modify_cq_in, in, - modify_field_select_resize_field_select.modify_field_select.modify_field_select, - MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT | MLX5_CQ_MODIFY_PERIOD_MODE); + modify_field_select_resize_field_select.modify_field_select.modify_field_select, mask); - return mlx5_core_modify_cq(dev, cq, in, sizeof(in)); + return (mlx5_core_modify_cq(dev, cq, in, sizeof(in))); } int mlx5_init_cq_table(struct mlx5_core_dev *dev) From nobody Tue Apr 18 13: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 4Q13wc0DW8z454xV; Tue, 18 Apr 2023 13:02: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 4Q13wb03pVz4Kfr; Tue, 18 Apr 2023 13:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVN7EOvaW65x6raKcFxaSi0uIrAJk0FXmQ/ke62u/20=; b=uUhtgNjreW9IxD1DM3rsNMeqNUV8rul7HkgBhtW/bgpkxKcQASN8RGJOjhmvLs97YgCbBD fO/KFHXNmZztTG4+x6yoVJg6zPsJTAZsiaIil4RQmvf5voJsC1hZWuK1gjiHK5SoqG2Nh3 cp4/j7GZzrf0ulRy/59wg9IQ0BvlfDvg+aPWGgMEtIHLbW8nz/PunK6TI3BxhqOASjIz8Z uy3YQid+BRnhoyTu1QR+PRkpfjp/FM8FSqx1MYaGqYVbLoJ0vzzjEMojbDpAsCstyVd9Wr 3tDyNYsnRmb5z19+BLAthc2p3B0A5+QobsvqZDe2SMA8kVTHaRkLQhHh2Ik9FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVN7EOvaW65x6raKcFxaSi0uIrAJk0FXmQ/ke62u/20=; b=o7ado2Cj2pkAGexdTOV8R2T/4zX+9t4kyximDxkdRUQL+iRfsNIBUeJ1JpzrSKqikqiSWZ 48HewUa7WWhtkCfMwQSVOzsb0zv5KAlquApim0yL7T3Igp1oLKkvS9MoR8aIIX5xx8vWKb viBpXihniym216iY+ZbaCtv8o4Go6UjdximvUisdbQRVS3l9JqzvZQnvSdq5755iP5Ae6d 5S+syKrJN3SjB5HoN9au7dAtGdPHQXpI9xeTEkNbw3FFW4m4JbPbpPpJ+7fesT7knY1pff E1ex4atKyDxNxaM9kcB23hh81cy+ntnVaCe0OSi0hbi+EoeWPGtLRFXLDh1iOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822927; a=rsa-sha256; cv=none; b=J0OcKuF/FaNML9LNHfg60jBCRLtNAns4uKIURyTjazRFFTpWKNeLmp/h10Iz5mSHiqn/Ec VSq/Y+eTlREcMSiVp1CaCPkAzuyVCDHy23dBCFoysHGQaJ6ejwGANBAkmZ+JzWwM01ZqKs oq6XmbazIHZvngeXPaKkJkuOqJ6pAXjO+iH+Rt8s1tUECPMnnHBF6bFl1PQwVKhGaKPejn 2qUPPnZeqyU0beiPRa/NYqDvYcTT8ujxChk12xe+CpHZSsdaIcwFtIH4mWteJD0p+ogxj9 B/gkUPS6kFLwxcp/E45eLeOaTxlG1+EpVwEg819bkvMLS6ae/rwaltvkXM87Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13wZ6CMdz1C3d; Tue, 18 Apr 2023 13:02: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 33ID26Il079066; Tue, 18 Apr 2023 13:02:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID26XJ079065; Tue, 18 Apr 2023 13:02:06 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:06 GMT Message-Id: <202304181302.33ID26XJ079065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 95bf70a4bf79 - main - mlx5: Don't give zero number of pages to the firmware. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95bf70a4bf7982091bb59200bc2db2cb5cd840d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=95bf70a4bf7982091bb59200bc2db2cb5cd840d7 commit 95bf70a4bf7982091bb59200bc2db2cb5cd840d7 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:22:41 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:06 +0000 mlx5: Don't give zero number of pages to the firmware. Can happen when using virtual mlx5_core functions, VFs. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c b/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c index d298da67057a..730c7ee8bee9 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c @@ -509,7 +509,10 @@ int mlx5_satisfy_startup_pages(struct mlx5_core_dev *dev, int boot) mlx5_core_dbg(dev, "requested %d %s pages for func_id 0x%x\n", npages, boot ? "boot" : "init", func_id); - return give_pages(dev, func_id, npages, 0); + if (npages > 0) + return give_pages(dev, func_id, npages, 0); + else + return 0; } enum { From nobody Tue Apr 18 13:02: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 4Q13wc6wjSz454v6; Tue, 18 Apr 2023 13:02: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 4Q13wc1F4pz4KcT; Tue, 18 Apr 2023 13:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEdgCvQWTaQ77qSCs6G5Ck8idW2URfVtHr72H+NWAj0=; b=fhIT9sdjHGTW7GZ50NKcqWiJkIpYCImj2HqtU7FPWHtoCYFPPeOqXco4SjhwUkwEc8KjVX qoj2Vw4vaWV6kN6o2rSGoRc6RFoijMipXx6+w5Qik5VVx8fkIbrXQBK2oKM66d4q5cTWqQ 7wQKZ5tUM/tdD7glMlizHtUBhLJPcxvAIzGh1Aww8V5rbjL3ITvDZrqtffctx7JjAmUx+D tIMi8pPELYR76feiE3u0mgMZhj3UA+fZdlib7FR0GAo94UdoYttPds5it10RbFVs9EXyMc FMliDxHi8aDb+KCt9HhPhFQJS4A+RbDnvjkGj+Q9jwckQq4oa8ZoveuO8FiA8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xEdgCvQWTaQ77qSCs6G5Ck8idW2URfVtHr72H+NWAj0=; b=AtPfxTwhlhgXHt2LYQB+1D2gvPPI3VKcacwhS2ZjJIDSk2lMsKrSZOwYvlic1+c4+wRYDs 1oxH0OauMIVSsAOlBCRMyE9eSz1Q2vNmvu4dqRKGMckedG4i1afPzg4mZ+GOiu2/b7fb/3 AEVrgNGs8VaCV2XJ/3API8Q+Beyala54aYr7HQmuviomoBC8vYNdN1iNddPKNMkf/G4TEB pwa0LHvUDnvaGTc7qnzAE2Nkyn2pKAP8WVqoJKtY/3tILTGr75oe7bhKO3ZVhYJl8OGxx1 HiZ7jpTLXMpYWqNII+PK+R8VyynnMNs+ZAI63rckBWoOAXfsoE1mPr88SHfO3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822928; a=rsa-sha256; cv=none; b=tlYFSA2ZU5A9xYcX+TxWsaYY5kr+5x8DOCzZPAxjsI0EQwpL/XXy/MN54CsEhSbniaBmM5 LmlKyXH2f8skaVQ777b5+LsiFudIyTH8vnxfgV4zsH9yLZynSoMuGqDc1AT5uoHJYMVtih lDjJ08uYpS1k8rx8jGsfq34IfWHAepuNpQNQIedDVaUV3p3UwUcQ3fgpJLGuhtHQYgOIeD D+Vo9HhDhobIQ9JwHmKAkxtqi91cwHMHEbAWdjjlGK7BnidR1QFPyNcT0q5PXC949vW4Uv dXJuCBoIZYDr+SDH7bFM11RTnP7S24l/Bp72WtLyCkYvUg3WOgfw+sVhx9LUow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13wc07T9z1CFK; Tue, 18 Apr 2023 13:02: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 33ID27Jo079085; Tue, 18 Apr 2023 13:02:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID27mT079084; Tue, 18 Apr 2023 13:02:07 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:07 GMT Message-Id: <202304181302.33ID27mT079084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: aa7bbdabde89 - main - mlx5: Implement diagostic counters as sysctl(8) 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa7bbdabde890676d54a22eeec3af9b7681d19b7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=aa7bbdabde890676d54a22eeec3af9b7681d19b7 commit aa7bbdabde890676d54a22eeec3af9b7681d19b7 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:38:59 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:07 +0000 mlx5: Implement diagostic counters as sysctl(8) nodes. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/conf/files | 2 + sys/dev/mlx5/driver.h | 22 ++ sys/dev/mlx5/mlx5_core/diag_cnt.h | 43 +++ sys/dev/mlx5/mlx5_core/mlx5_diag_cnt.c | 579 +++++++++++++++++++++++++++++++++ sys/dev/mlx5/mlx5_core/mlx5_main.c | 14 +- sys/dev/mlx5/mlx5_ifc.h | 36 ++ sys/modules/mlx5/Makefile | 1 + 7 files changed, 696 insertions(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 4e981a135b0c..e94652462a17 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4896,6 +4896,8 @@ dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_diag_cnt.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_diagnostics.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 47ed4a9d73f3..12e6de958371 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013-2019, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2022 NVIDIA corporation & affiliates. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -652,6 +653,26 @@ struct mlx5_special_contexts { int resd_lkey; }; +struct mlx5_diag_cnt_id { + u16 id; + bool enabled; +}; + +struct mlx5_diag_cnt { +#define DIAG_LOCK(dc) mutex_lock(&(dc)->lock) +#define DIAG_UNLOCK(dc) mutex_unlock(&(dc)->lock) + struct mutex lock; + struct sysctl_ctx_list sysctl_ctx; + struct mlx5_diag_cnt_id *cnt_id; + u16 num_of_samples; + u16 sample_index; + u8 num_cnt_id; + u8 log_num_of_samples; + u8 log_sample_period; + u8 flag; + u8 ready; +}; + struct mlx5_flow_root_namespace; struct mlx5_core_dev { struct pci_dev *pdev; @@ -681,6 +702,7 @@ struct mlx5_core_dev { struct mlx5_priv priv; struct mlx5_profile *profile; atomic_t num_qps; + struct mlx5_diag_cnt diag_cnt; u32 vsc_addr; u32 issi; struct mlx5_special_contexts special_contexts; diff --git a/sys/dev/mlx5/mlx5_core/diag_cnt.h b/sys/dev/mlx5/mlx5_core/diag_cnt.h new file mode 100644 index 000000000000..25c460b19382 --- /dev/null +++ b/sys/dev/mlx5/mlx5_core/diag_cnt.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2018, Mellanox Technologies, Ltd. + * + * 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 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 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 __MLX5_DIAG_CNT_H__ +#define __MLX5_DIAG_CNT_H__ + +#include +#include + +#define MLX5_DIAG_CNT_SUPPORTED(mdev) \ + (MLX5_CAP_GEN(mdev, debug) && \ + MLX5_CAP_GEN(mdev, num_of_diagnostic_counters)) + +int mlx5_diag_cnt_init(struct mlx5_core_dev *); +void mlx5_diag_cnt_cleanup(struct mlx5_core_dev *); + +int mlx5_diag_query_params(struct mlx5_core_dev *); +int mlx5_diag_set_params(struct mlx5_core_dev *); +int mlx5_diag_query_counters(struct mlx5_core_dev *, u8 * *out_buffer); + +#endif /* __MLX5_DIAG_CNT_H__ */ diff --git a/sys/dev/mlx5/mlx5_core/mlx5_diag_cnt.c b/sys/dev/mlx5/mlx5_core/mlx5_diag_cnt.c new file mode 100644 index 000000000000..83f8bf2b148f --- /dev/null +++ b/sys/dev/mlx5/mlx5_core/mlx5_diag_cnt.c @@ -0,0 +1,579 @@ +/*- + * Copyright (c) 2018, Mellanox Technologies, Ltd. + * + * 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 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 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 + +static int get_supported_cnt_ids(struct mlx5_core_dev *dev); +static int enable_cnt_id(struct mlx5_core_dev *dev, u16 id); +static void reset_cnt_id(struct mlx5_core_dev *dev); +static void reset_params(struct mlx5_diag_cnt *diag_cnt); + +static int +mlx5_sysctl_counter_id(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + uint16_t *ptr; + size_t max; + size_t num; + size_t x; + int err; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + max = MLX5_CAP_GEN(dev, num_of_diagnostic_counters); + + ptr = kmalloc(sizeof(ptr[0]) * max, GFP_KERNEL); + + DIAG_LOCK(diag_cnt); + + for (x = num = 0; x != max; x++) { + if (diag_cnt->cnt_id[x].enabled) + ptr[num++] = diag_cnt->cnt_id[x].id; + } + + err = SYSCTL_OUT(req, ptr, sizeof(ptr[0]) * num); + if (err || !req->newptr) + goto done; + + num = req->newlen / sizeof(ptr[0]); + if (num > max) { + err = ENOMEM; + goto done; + } + + err = SYSCTL_IN(req, ptr, sizeof(ptr[0]) * num); + + reset_cnt_id(dev); + + for (x = 0; x != num; x++) { + err = enable_cnt_id(dev, ptr[x]); + if (err) + goto done; + } + + diag_cnt->num_cnt_id = num; +done: + kfree(ptr); + + if (err != 0 && req->newptr != NULL) + reset_cnt_id(dev); + + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +#define NUM_OF_DIAG_PARAMS 5 + +static int +mlx5_sysctl_params(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + uint32_t temp[NUM_OF_DIAG_PARAMS]; + int err; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + DIAG_LOCK(diag_cnt); + + temp[0] = diag_cnt->log_num_of_samples; + temp[1] = diag_cnt->log_sample_period; + temp[2] = diag_cnt->flag; + temp[3] = diag_cnt->num_of_samples; + temp[4] = diag_cnt->sample_index; + + err = SYSCTL_OUT(req, temp, sizeof(temp)); + if (err || !req->newptr) + goto done; + + err = SYSCTL_IN(req, temp, sizeof(temp)); + if (err) + goto done; + + reset_params(&dev->diag_cnt); + + if (temp[0] > MLX5_CAP_DEBUG(dev, log_max_samples) || + (1U << (MLX5_CAP_DEBUG(dev, log_max_samples) - temp[0])) < + diag_cnt->num_cnt_id) { + err = ERANGE; + goto done; + } else if (temp[1] < MLX5_CAP_DEBUG(dev, log_min_sample_period)) { + err = ERANGE; + goto done; + } else if (temp[2] >= 0x100) { + err = ERANGE; + goto done; + } else if (temp[3] > (1U << diag_cnt->log_num_of_samples)) { + err = ERANGE; + goto done; + } else if (temp[4] > (1U << diag_cnt->log_num_of_samples)) { + err = ERANGE; + goto done; + } + + diag_cnt->log_num_of_samples = temp[0]; + diag_cnt->log_sample_period = temp[1]; + diag_cnt->flag = temp[2]; + diag_cnt->num_of_samples = temp[3]; + diag_cnt->sample_index = temp[4]; +done: + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +static void +decode_cnt_buffer(u32 num_of_samples, u8 *out, struct sbuf *sbuf) +{ + void *cnt; + u64 temp; + u32 i; + + for (i = 0; i != num_of_samples; i++) { + cnt = MLX5_ADDR_OF(query_diagnostic_counters_out, + out, diag_counter[i]); + temp = MLX5_GET(diagnostic_cntr_struct, cnt, counter_value_h); + temp = (temp << 32) | + MLX5_GET(diagnostic_cntr_struct, cnt, counter_value_l); + sbuf_printf(sbuf, + "0x%04x,0x%04x,0x%08x,0x%016llx\n", + MLX5_GET(diagnostic_cntr_struct, cnt, counter_id), + MLX5_GET(diagnostic_cntr_struct, cnt, sample_id), + MLX5_GET(diagnostic_cntr_struct, cnt, time_stamp_31_0), + (unsigned long long)temp); + } +} + +static int +mlx5_sysctl_dump_set(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + uint8_t temp; + int err; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + DIAG_LOCK(diag_cnt); + + err = SYSCTL_OUT(req, &diag_cnt->ready, sizeof(diag_cnt->ready)); + if (err || !req->newptr) + goto done; + + err = SYSCTL_IN(req, &temp, sizeof(temp)); + if (err) + goto done; + + diag_cnt->ready = (temp != 0); + if (diag_cnt->ready != 0) + err = -mlx5_diag_set_params(dev); +done: + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +static int +mlx5_sysctl_dump_get(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + struct sbuf sbuf; + u8 *out; + int err; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + err = sysctl_wire_old_buffer(req, 0); + if (err != 0) + return (err); + + DIAG_LOCK(diag_cnt); + + sbuf_new_for_sysctl(&sbuf, NULL, 65536, req); + + if (diag_cnt->ready != 0) { + err = -mlx5_diag_query_counters(dev, &out); + if (err) { + sbuf_printf(&sbuf, "\nCould not query counters: %d\n", err); + } else { + sbuf_printf(&sbuf, "\n"); + decode_cnt_buffer(diag_cnt->num_of_samples * + diag_cnt->num_cnt_id, out, &sbuf); + kfree(out); + } + } else { + sbuf_printf(&sbuf, "\nDump was not set.\n"); + } + + err = sbuf_finish(&sbuf); + + sbuf_delete(&sbuf); + + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +static int +mlx5_sysctl_cap_read(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + struct sbuf sbuf; + int err; + u32 i; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + err = sysctl_wire_old_buffer(req, 0); + if (err != 0) + return (err); + + DIAG_LOCK(diag_cnt); + + sbuf_new_for_sysctl(&sbuf, NULL, 8192, req); + + sbuf_printf(&sbuf, "\n"); + + /* print cap */ + sbuf_printf(&sbuf, "log_max_samples=%d\n", + MLX5_CAP_DEBUG(dev, log_max_samples)); + sbuf_printf(&sbuf, "log_min_sample_period=%d\n", + MLX5_CAP_DEBUG(dev, log_min_sample_period)); + sbuf_printf(&sbuf, "repetitive=%d\n", + MLX5_CAP_DEBUG(dev, repetitive)); + sbuf_printf(&sbuf, "single=%d\n", + MLX5_CAP_DEBUG(dev, single)); + sbuf_printf(&sbuf, "num_of_diagnostic_counters=%d\n", + MLX5_CAP_GEN(dev, num_of_diagnostic_counters)); + + /* print list of supported counter */ + sbuf_printf(&sbuf, "supported counter id:\n"); + for (i = 0; i != MLX5_CAP_GEN(dev, num_of_diagnostic_counters); i++) + sbuf_printf(&sbuf, "0x%04x,", diag_cnt->cnt_id[i].id); + sbuf_printf(&sbuf, "\n"); + + err = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); + + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +static int +get_supported_cnt_ids(struct mlx5_core_dev *dev) +{ + u32 num_counters = MLX5_CAP_GEN(dev, num_of_diagnostic_counters); + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + u32 i; + + diag_cnt->cnt_id = kzalloc(sizeof(*diag_cnt->cnt_id) * num_counters, + GFP_KERNEL); + if (!diag_cnt->cnt_id) + return (-ENOMEM); + + for (i = 0; i != num_counters; i++) { + diag_cnt->cnt_id[i].id = + MLX5_CAP_DEBUG(dev, diagnostic_counter[i].counter_id); + } + return (0); +} + +static void +reset_cnt_id(struct mlx5_core_dev *dev) +{ + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + u32 i; + + diag_cnt->num_cnt_id = 0; + for (i = 0; i != MLX5_CAP_GEN(dev, num_of_diagnostic_counters); i++) + diag_cnt->cnt_id[i].enabled = false; +} + +static int +enable_cnt_id(struct mlx5_core_dev *dev, u16 id) +{ + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + u32 i; + + for (i = 0; i != MLX5_CAP_GEN(dev, num_of_diagnostic_counters); i++) { + if (diag_cnt->cnt_id[i].id == id) { + if (diag_cnt->cnt_id[i].enabled) + return (EINVAL); + + diag_cnt->cnt_id[i].enabled = true; + break; + } + } + + if (i == MLX5_CAP_GEN(dev, num_of_diagnostic_counters)) + return (ENOENT); + else + return (0); +} + +static void +reset_params(struct mlx5_diag_cnt *diag_cnt) +{ + diag_cnt->log_num_of_samples = 0; + diag_cnt->log_sample_period = 0; + diag_cnt->flag = 0; + diag_cnt->num_of_samples = 0; + diag_cnt->sample_index = 0; +} + +int +mlx5_diag_set_params(struct mlx5_core_dev *dev) +{ + u8 out[MLX5_ST_SZ_BYTES(set_diagnostic_params_out)] = {0}; + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + void *cnt_id; + void *ctx; + u16 in_sz; + int err; + u8 *in; + u32 i; + u32 j; + + if (!diag_cnt->num_cnt_id) + return (-EINVAL); + + in_sz = MLX5_ST_SZ_BYTES(set_diagnostic_params_in) + + diag_cnt->num_cnt_id * MLX5_ST_SZ_BYTES(counter_id); + in = kzalloc(in_sz, GFP_KERNEL); + if (!in) + return (-ENOMEM); + + MLX5_SET(set_diagnostic_params_in, in, opcode, + MLX5_CMD_OP_SET_DIAGNOSTICS); + + ctx = MLX5_ADDR_OF(set_diagnostic_params_in, in, + diagnostic_params_ctx); + MLX5_SET(diagnostic_params_context, ctx, num_of_counters, + diag_cnt->num_cnt_id); + MLX5_SET(diagnostic_params_context, ctx, log_num_of_samples, + diag_cnt->log_num_of_samples); + + MLX5_SET(diagnostic_params_context, ctx, single, + (diag_cnt->flag >> 7) & 1); + MLX5_SET(diagnostic_params_context, ctx, repetitive, + (diag_cnt->flag >> 6) & 1); + MLX5_SET(diagnostic_params_context, ctx, sync, + (diag_cnt->flag >> 5) & 1); + MLX5_SET(diagnostic_params_context, ctx, clear, + (diag_cnt->flag >> 4) & 1); + MLX5_SET(diagnostic_params_context, ctx, on_demand, + (diag_cnt->flag >> 3) & 1); + MLX5_SET(diagnostic_params_context, ctx, enable, + (diag_cnt->flag >> 2) & 1); + MLX5_SET(diagnostic_params_context, ctx, log_sample_period, + diag_cnt->log_sample_period); + + for (i = j = 0; i != MLX5_CAP_GEN(dev, num_of_diagnostic_counters); i++) { + if (diag_cnt->cnt_id[i].enabled) { + cnt_id = MLX5_ADDR_OF(diagnostic_params_context, + ctx, counter_id[j]); + MLX5_SET(counter_id, cnt_id, counter_id, + diag_cnt->cnt_id[i].id); + j++; + } + } + + err = mlx5_cmd_exec(dev, in, in_sz, out, sizeof(out)); + + kfree(in); + return (err); +} + +/* This function is for debug purpose */ +int +mlx5_diag_query_params(struct mlx5_core_dev *dev) +{ + u8 in[MLX5_ST_SZ_BYTES(query_diagnostic_params_in)] = {0}; + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + void *cnt_id; + u16 out_sz; + void *ctx; + int err; + u8 *out; + u32 i; + + out_sz = MLX5_ST_SZ_BYTES(query_diagnostic_params_out) + + diag_cnt->num_cnt_id * MLX5_ST_SZ_BYTES(counter_id); + + out = kzalloc(out_sz, GFP_KERNEL); + if (!out) + return (-ENOMEM); + + MLX5_SET(query_diagnostic_params_in, in, opcode, + MLX5_CMD_OP_QUERY_DIAGNOSTIC_PARAMS); + err = mlx5_cmd_exec(dev, in, sizeof(in), out, out_sz); + if (err) + goto out; + + ctx = MLX5_ADDR_OF(query_diagnostic_params_out, out, + diagnostic_params_ctx); + mlx5_core_dbg(dev, "single=%x\n", + MLX5_GET(diagnostic_params_context, ctx, single)); + mlx5_core_dbg(dev, "repetitive=%x\n", + MLX5_GET(diagnostic_params_context, ctx, repetitive)); + mlx5_core_dbg(dev, "sync=%x\n", + MLX5_GET(diagnostic_params_context, ctx, sync)); + mlx5_core_dbg(dev, "clear=%x\n", + MLX5_GET(diagnostic_params_context, ctx, clear)); + mlx5_core_dbg(dev, "on_demand=%x\n", + MLX5_GET(diagnostic_params_context, ctx, on_demand)); + mlx5_core_dbg(dev, "enable=%x\n", + MLX5_GET(diagnostic_params_context, ctx, enable)); + mlx5_core_dbg(dev, "log_sample_period=%x\n", + MLX5_GET(diagnostic_params_context, ctx, + log_sample_period)); + + for (i = 0; i != diag_cnt->num_cnt_id; i++) { + cnt_id = MLX5_ADDR_OF(diagnostic_params_context, + ctx, counter_id[i]); + mlx5_core_dbg(dev, "counter_id[%d]=%x\n", i, + MLX5_GET(counter_id, cnt_id, counter_id)); + } +out: + kfree(out); + return (err); +} + +int +mlx5_diag_query_counters(struct mlx5_core_dev *dev, u8 **out_buffer) +{ + u8 in[MLX5_ST_SZ_BYTES(query_diagnostic_counters_in)] = {0}; + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + u16 out_sz; + u8 *out; + int err; + + out_sz = MLX5_ST_SZ_BYTES(query_diagnostic_counters_out) + + diag_cnt->num_of_samples * diag_cnt->num_cnt_id * + MLX5_ST_SZ_BYTES(diagnostic_cntr_struct); + + out = kzalloc(out_sz, GFP_KERNEL); + if (!out) + return (-ENOMEM); + + MLX5_SET(query_diagnostic_counters_in, in, opcode, + MLX5_CMD_OP_QUERY_DIAGNOSTICS); + MLX5_SET(query_diagnostic_counters_in, in, num_of_samples, + diag_cnt->num_of_samples); + MLX5_SET(query_diagnostic_counters_in, in, sample_index, + diag_cnt->sample_index); + + err = mlx5_cmd_exec(dev, in, sizeof(in), out, out_sz); + + if (!err) + *out_buffer = out; + else + kfree(out); + + return (err); +} + +int +mlx5_diag_cnt_init(struct mlx5_core_dev *dev) +{ + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + struct sysctl_oid *diag_cnt_sysctl_node; + int err; + + if (!MLX5_DIAG_CNT_SUPPORTED(dev)) + return (0); + + mutex_init(&diag_cnt->lock); + + /* Build private data */ + err = get_supported_cnt_ids(dev); + if (err) + return (err); + + sysctl_ctx_init(&diag_cnt->sysctl_ctx); + + diag_cnt_sysctl_node = SYSCTL_ADD_NODE(&diag_cnt->sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev->pdev->dev.bsddev)), + OID_AUTO, "diag_cnt", CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + "Diagnostics counters"); + + if (diag_cnt_sysctl_node == NULL) + return (-ENOMEM); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "counter_id", CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_counter_id, "SU", "Selected counter IDs"); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "params", CTLTYPE_U32 | CTLFLAG_RW | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_params, "IU", + "Counter parameters: log_num_of_samples, log_sample_perios, flag, num_of_samples, sample_index"); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "dump_set", CTLTYPE_U8 | CTLFLAG_RW | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_dump_set, "CU", + "Set dump parameters by writing 1 and enable dump_get. Write 0 to disable dump."); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "dump_get", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_dump_get, "A", + "Get dump parameters."); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "cap", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_cap_read, "A", + "Read capabilities."); + + return (0); +} + +void +mlx5_diag_cnt_cleanup(struct mlx5_core_dev *dev) +{ + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + void *ptr; + + if (!MLX5_DIAG_CNT_SUPPORTED(dev)) + return; + + sysctl_ctx_free(&diag_cnt->sysctl_ctx); + + ptr = diag_cnt->cnt_id; + diag_cnt->cnt_id = NULL; + + kfree(ptr); + + reset_params(diag_cnt); +} diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 9e9b7b845528..b258989e601b 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013-2021, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2022 NVIDIA corporation & affiliates. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -50,6 +51,7 @@ #include #include #include +#include #ifdef PCI_IOV #include #include @@ -1209,10 +1211,16 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv, goto err_mpfs; } + err = mlx5_diag_cnt_init(dev); + if (err) { + mlx5_core_err(dev, "diag cnt init failed %d\n", err); + goto err_fpga; + } + err = mlx5_register_device(dev); if (err) { mlx5_core_err(dev, "mlx5_register_device failed %d\n", err); - goto err_fpga; + goto err_diag_cnt; } set_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state); @@ -1221,6 +1229,9 @@ out: mutex_unlock(&dev->intf_state_mutex); return 0; +err_diag_cnt: + mlx5_diag_cnt_cleanup(dev); + err_fpga: mlx5_fpga_device_stop(dev); @@ -1291,6 +1302,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv, mlx5_unregister_device(dev); mlx5_eswitch_cleanup(dev->priv.eswitch); + mlx5_diag_cnt_cleanup(dev); mlx5_fpga_device_stop(dev); mlx5_mpfs_destroy(dev); mlx5_cleanup_fs(dev); diff --git a/sys/dev/mlx5/mlx5_ifc.h b/sys/dev/mlx5/mlx5_ifc.h index 52bd65ccdb45..4336e561ecbb 100644 --- a/sys/dev/mlx5/mlx5_ifc.h +++ b/sys/dev/mlx5/mlx5_ifc.h @@ -216,6 +216,7 @@ enum { MLX5_CMD_OP_DEACTIVATE_TRACER = 0x815, MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN = 0x816, MLX5_CMD_OP_DEALLOC_TRANSPORT_DOMAIN = 0x817, + MLX5_CMD_OP_QUERY_DIAGNOSTIC_PARAMS = 0x819, MLX5_CMD_OP_SET_DIAGNOSTICS = 0x820, MLX5_CMD_OP_QUERY_DIAGNOSTICS = 0x821, MLX5_CMD_OP_QUERY_CONG_STATUS = 0x822, @@ -5337,6 +5338,22 @@ struct mlx5_ifc_dealloc_packet_reformat_context_in_bits { u8 reserved_60[0x20]; }; +struct mlx5_ifc_diagnostic_cntr_struct_bits { + u8 counter_id[0x10]; + u8 sample_id[0x10]; + + u8 time_stamp_31_0[0x20]; + + u8 counter_value_h[0x20]; + + u8 counter_value_l[0x20]; +}; + +enum { + MLX5_DIAGNOSTIC_PARAMS_CONTEXT_ENABLE_ENABLE = 0x1, + MLX5_DIAGNOSTIC_PARAMS_CONTEXT_ENABLE_DISABLE = 0x0, +}; + struct mlx5_ifc_query_cq_out_bits { u8 status[0x8]; u8 reserved_0[0x18]; @@ -7080,6 +7097,25 @@ struct mlx5_ifc_diagnostic_params_context_bits { struct mlx5_ifc_counter_id_bits counter_id[0]; }; +struct mlx5_ifc_query_diagnostic_params_in_bits { + u8 opcode[0x10]; + u8 reserved_at_10[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 reserved_at_40[0x40]; +}; + +struct mlx5_ifc_query_diagnostic_params_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + struct mlx5_ifc_diagnostic_params_context_bits diagnostic_params_ctx; +}; + struct mlx5_ifc_set_diagnostic_params_in_bits { u8 opcode[0x10]; u8 reserved_0[0x10]; diff --git a/sys/modules/mlx5/Makefile b/sys/modules/mlx5/Makefile index 3eb21722f777..263199f3d595 100644 --- a/sys/modules/mlx5/Makefile +++ b/sys/modules/mlx5/Makefile @@ -8,6 +8,7 @@ SRCS= \ mlx5_alloc.c \ mlx5_cmd.c \ mlx5_cq.c \ +mlx5_diag_cnt.c \ mlx5_diagnostics.c \ mlx5_eq.c \ mlx5_eswitch.c \ From nobody Tue Apr 18 13:02: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 4Q13wf0brvz454xX; Tue, 18 Apr 2023 13:02: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 4Q13wd1xvmz4Klb; Tue, 18 Apr 2023 13:02:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Od4CYxsuFfTotJNrGeXRo63nYLJASIjBrwQudPi9uk=; b=NJCYzEQNUPJm4iAybkTn1+dR0O50EWWTs6m0S6ZyWo0F/y/AhROSIjUy+D+fuA1CIraAdz uasxSQZ7eWQkuW6oT+wfiiPbCgXmD21FlbaiOX/DHQnli+NDVYyy/yFj5D6YCsfBVM08bV MKaK+ZGkqHQDeXGDUfSXAWE3JqN2snXS4WlRcWyuPBgJgVGLiZYGWil/sh2s0x0rwmd53W Ci2j/eS851ua/rqr/ljNXJiuKgjZKpFaEByQYNHZFjqC8LFKh5v3VgW4Fsi2/9uxcsw8jl MX5v4oG2KD2Xr3MoQ0AsvSozbbz+6WoMl0Ka2+XyCmODpRsK2zZ2YuNB3UBW8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Od4CYxsuFfTotJNrGeXRo63nYLJASIjBrwQudPi9uk=; b=OXfvIkshGShRHzCsFXBR+ZNg0JmwYpfRsXmYjCpp8jWGbNCjmOO9+q+oYSc8sNyy2s+Nv2 9HhEhQRGtD2stYD/5s4Uo798MGAz314H88BaQ6yZkHthnteEICkrz2sbUyjE6+1cg32mrK L/ewuZsvvyBVheULaYVrH/ozBdj4Qz/nhR32LtyAhUTKdJsyhCXMxJsXA3CwdPoQKGk+En w3qJpt2hGN9OyonypHj4AYeB/UJM1HHv4+BJO5MXPNv81/dSiEw5ahQqDH3xBDy7gvKjrs R7IUdw3FJT2PvXIEzS3z1yUEnctfxIa6008wJO/bHfjiFhUrn1bzJOYJXGHMdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822929; a=rsa-sha256; cv=none; b=aUxfaeiKu6niHfLDeGTRRpOHZteaPmNoUwIpN/OegU/KIsUhedsmxSRTaq3FhgqO6c+kY+ tMpPJidVs06VnblnmeekqLR+muU/lYOyUY0AE+gfm3EA1UuNScsmfMCYAkuwPyAie2ALaQ qldbn2vCs5OLViJZMSS3EI11w+Wrp3SeEy5GcbL+GbX2i6G2gFKTnhDMM2er0U9y/k1VqE Z5a8KrRFJgyHcC13QHpeprZFn7LpWp+MYqNxCwtR9u/lBXc2H1YeObnMsmAu1SgRSZc60Z mnxroV/RLcT/XoTkSypPZc/g/S1RoneuimrNRwz67WakMdg+7AzotVZZXILA7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13wd1141z1BpY; Tue, 18 Apr 2023 13:02: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 33ID29Tg079104; Tue, 18 Apr 2023 13:02:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID29rJ079103; Tue, 18 Apr 2023 13:02:09 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:09 GMT Message-Id: <202304181302.33ID29rJ079103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 80b4ef6d1054 - main - mlx5: Remove unused debugfs node pointers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80b4ef6d10544d30b6cfeddca12ae28d81816201 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=80b4ef6d10544d30b6cfeddca12ae28d81816201 commit 80b4ef6d10544d30b6cfeddca12ae28d81816201 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:40:22 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:07 +0000 mlx5: Remove unused debugfs node pointers. No functional change intended. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/driver.h | 19 +------------------ sys/dev/mlx5/mlx5_ib/mlx5_ib.h | 7 ------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 12e6de958371..ea37d17db895 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -177,7 +177,6 @@ enum { }; struct mlx5_field_desc { - struct dentry *dent; int i; }; @@ -185,7 +184,6 @@ struct mlx5_rsc_debug { struct mlx5_core_dev *dev; void *object; enum dbg_rsc_type type; - struct dentry *root; struct mlx5_field_desc fields[0]; }; @@ -248,12 +246,6 @@ struct mlx5_fw_page { #define mlx5_cmd_msg mlx5_fw_page struct mlx5_cmd_debug { - struct dentry *dbg_root; - struct dentry *dbg_in; - struct dentry *dbg_out; - struct dentry *dbg_outlen; - struct dentry *dbg_status; - struct dentry *dbg_run; void *in_msg; void *out_msg; u8 status; @@ -287,9 +279,6 @@ enum mlx5_cmd_mode { struct mlx5_cmd_stats { u64 sum; u64 n; - struct dentry *root; - struct dentry *avg; - struct dentry *count; /* protect command average calculations */ spinlock_t lock; }; @@ -585,10 +574,7 @@ struct mlx5_priv { /* start: qp staff */ struct mlx5_qp_table qp_table; - struct dentry *qp_debugfs; - struct dentry *eq_debugfs; - struct dentry *cq_debugfs; - struct dentry *cmdif_debugfs; + /* end: qp staff */ /* start: cq staff */ @@ -605,7 +591,6 @@ struct mlx5_priv { struct mutex pgdir_mutex; struct list_head pgdir_list; /* end: alloc staff */ - struct dentry *dbg_root; /* protect mkey key part */ spinlock_t mkey_lock; @@ -897,8 +882,6 @@ static inline struct mlx5_core_dev *pci2mlx5_core_dev(struct pci_dev *pdev) return pci_get_drvdata(pdev); } -extern struct dentry *mlx5_debugfs_root; - static inline u16 fw_rev_maj(struct mlx5_core_dev *dev) { return ioread32be(&dev->iseg->fw_rev) & 0xffff; diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib.h b/sys/dev/mlx5/mlx5_ib/mlx5_ib.h index e39e18dd1b39..8db77bed4546 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib.h +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib.h @@ -594,7 +594,6 @@ struct mlx5_cache_ent { spinlock_t lock; - struct dentry *dir; char name[4]; u32 order; u32 size; @@ -602,11 +601,6 @@ struct mlx5_cache_ent { u32 miss; u32 limit; - struct dentry *fsize; - struct dentry *fcur; - struct dentry *fmiss; - struct dentry *flimit; - struct mlx5_ib_dev *dev; struct work_struct work; struct delayed_work dwork; @@ -617,7 +611,6 @@ struct mlx5_mr_cache { struct workqueue_struct *wq; struct mlx5_cache_ent ent[MAX_MR_CACHE_ENTRIES]; int stopped; - struct dentry *root; unsigned long last_add; }; From nobody Tue Apr 18 13:02: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 4Q13wg1MgHz454xd; Tue, 18 Apr 2023 13:02: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 4Q13wf3fSSz4KtW; Tue, 18 Apr 2023 13:02:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GL8gaRatZTPo0FMfKLs+R3Tn70o961ZSREPOUngidpM=; b=hddjk3GaODOXr/7RWH2vUlqBsx5eA8rYIIMgrs1MkwoNwAh5J1t37C1u6GTw7L9xdqwjJp 8w+E7DJM6l8pxMdVrimaHTapoNCj82D9Zp8xlYIarktPUHSfulsBgHYaXfuw/AgTIq/Bjd bat7HNbeL3CYxZaXhIJ/SODbNzBt8mJ73fc4e4JoGsznYQGc/hVJw9LsWfSHsrtWsHOsq6 IJsvvU/EpWQMSIG6W2VFGrDoSm7oCIjOlEhoIpXAX/NMCgJRyMa6jKVfJCBi8lLbOuCiiK Yjjoo7hjRLxXi6c0G2qEquG+ZH6J5hKVAK0mqlfVZNQVJL2uTKf3WOWHd/xG4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GL8gaRatZTPo0FMfKLs+R3Tn70o961ZSREPOUngidpM=; b=Hekvo2AF4pabI7DjIAj5j/bCLycZl1GJlFa1FZnW88EIwsHKDdP8OPh0PwRfdJqblp9tnJ Nl3VyCQph4W8MHENRCxm4aE8uBIFFXcjDGIcIdHy6tNCI5XBg5r9cezmpbWYhess5224DO 6UJYmBU5kXVMfag4nmurI6jOj5JQpMv7DLA9vnoJzP7ib7F9a4+ADskgWRzngJWd2enfzB gLkMzwsB9sEplzD3U+lR/BW243i+CatWtMVrS0m58wmCcOCFiW7X6cwKjbzGNRQTliJmeb k+f7/ANhqKIPOM/mWnPA8P3pJEB4jSM1HB3eI9KuNamzVFVTtj/Ac58r8iqOFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822930; a=rsa-sha256; cv=none; b=YSnXBIoNXsbYbBxOdS+b9eGTJlHXtgJjrbKWlBGT9Cd87O8MxApSzUOOq3vpPS2PTTWgVV jpHexBIQ7G4uRHyMkTsc9TxVO92OO8WNfku10ol4G6ZfgcAZYRnHKSNgM4fd6mqPbXsJMM JXvEfn3sSCK7VhsT08X9JiG1e9AgZOKHQnuYdUwYZgFFDHNQwdF5K+YNMSv4qmPx9GQ6Ut vvBKI3wtDEQYyoMDkGDh8JUnoj9zsvfz2sP2asG0gHTjKrlrWd5x1X2yPN7hct1gWwRzvX hZMOMAv59Dd9inoT72cyIs3U8QuPvWlPsPGw44scIM8GQ3SlpLAn/o3VVnD4KA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q13wf1xTxz1C3h; Tue, 18 Apr 2023 13:02: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 33ID2Amu079123; Tue, 18 Apr 2023 13:02:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID2Awl079122; Tue, 18 Apr 2023 13:02:10 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:10 GMT Message-Id: <202304181302.33ID2Awl079122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 6bd4bb9bdbad - main - mlx5en(4): Explain why CQE zipping is off. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bd4bb9bdbadb76c5502c7972df9f525b909e2f5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=6bd4bb9bdbadb76c5502c7972df9f525b909e2f5 commit 6bd4bb9bdbadb76c5502c7972df9f525b909e2f5 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:12:32 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:07 +0000 mlx5en(4): Explain why CQE zipping is off. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index ab0cf49c2e8a..7a11bedffb10 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -3873,9 +3873,10 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, priv->params.lro_wqe_sz = MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ; /* - * CQE zipping is currently defaulted to off. when it won't - * anymore we will consider the HW capability: - * "!!MLX5_CAP_GEN(mdev, cqe_compression)" + * CQE zipping is off, because the per-packet 32-bit Toeplitz hash + * is then not supported. The 32-bit Toeplitz hash is needed to + * correctly demultiplex incoming traffic into the expected + * network queues. */ priv->params.cqe_zipping_en = false; From nobody Tue Apr 18 13:02: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 4Q13wh5Sk4z454gn; Tue, 18 Apr 2023 13:02: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 4Q13wg49R2z4Ktm; Tue, 18 Apr 2023 13:02:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dd0CfujlWhX8doKrM2+4mLGXzVnaY805Tb/Q9yCV6EI=; b=UNGR3o7qWyH+35Uds2WA1B8BjQNTTfaqSsge5pKaucoWLvtZ2KIIDBbn4gU/TYtY+cJrtR OU7xM/e0gXOOTJaKWaY/WFVGhWZ+88vYdvdXYO3lsdb0Gj1o9UF+sPHnrIF6MEFDoSwyLb +YAx9ZGbswJixSDUnuqDs9IyIpq1Plcxso5G5kt/HdtLdMeBqkMUa+ooEnXS7r73wUfxhl ++QIOCcBzUqicpzAVo9tN/h+KrzMEED3Egyei6GYmWfy/CquagNSgnXvAJF05awUWda9u1 AHB1TOk7rmYjpac84FHXGzo0h/sjlEhICILQLpGslKBghZ9IDYCKeWQ0Mc5ToA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681822931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dd0CfujlWhX8doKrM2+4mLGXzVnaY805Tb/Q9yCV6EI=; b=p/lJet3edmrDn9klCARKw//XcBDfshRqwkt6E0MwwVfKfColaUsIxzSrUrLlcrIGScNX2b mP2+yG5m0vYPfY+BUFMLBV5xDlZ8F1YmsviiBWAPw4smA0tN3YZRFwGmAPsCPQgh7lGf/v xrIyxI1+5M0uOpPJE2U1bdUfjHmvOSaPcyRvzrGBrrLIm/PUH+447K3P8ONVbHoEK2GelH VjDrBgqKRMu72+pQ9kNaUOU5xyXILbKF4yPHTyhureMyHZ3SOhcOKLIeI3BFn9JoyYv7JJ 22fuJdKhSas5jiAUCAh/2rTs2VbO9dYxmPymy5PcWwE2NnQkG1J4NWUSyzw+/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681822931; a=rsa-sha256; cv=none; b=B8yKSEgmaTtK5d1Mr7UDynsFMiGCORm2t8YLz+9JluVNgF+R6kYQ57mO2YCi7VHQ4nQcST gRyysQuNYBzOawufAKY6w1J7kWYAbR4qYF45/rARiG43ihEBv24EECHh34W74ndVhO0sJB UPDvXUmHyNPL/2R70q6TRyRfgMzqBPPSLF4j7xSSLrsEGUoTBSgroZUhQM9vbajwvbwujS K80Qa1zwy8WQtvBuiOlE7fWifl6aeamdoSjEk6aiz8TlwlASwWIV02tXwpVcFpbj18BXaC NiHDp7Zsvqo3OegLPRDFZ8uP/K+PcY1FCnGYHxmWCzzQ4Gnm/EbPkMW1aV/J+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 4Q13wg34Gyz1C3k; Tue, 18 Apr 2023 13:02: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 33ID2BD7079149; Tue, 18 Apr 2023 13:02:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ID2BmE079148; Tue, 18 Apr 2023 13:02:11 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:02:11 GMT Message-Id: <202304181302.33ID2BmE079148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 1943c40cd655 - main - mlx5en(4): Don't wait for receive queue to fill up with mbufs during open channels. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1943c40cd655b7259b9b21849f328362c97a2657 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=1943c40cd655b7259b9b21849f328362c97a2657 commit 1943c40cd655b7259b9b21849f328362c97a2657 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:42:17 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-18 13:01:07 +0000 mlx5en(4): Don't wait for receive queue to fill up with mbufs during open channels. Failure to get mbufs may be transient. Don't permanently fail to open the channels due to lack of mbufs. This also makes modifying channel parameters faster. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/mlx5_en/en.h | 2 -- sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c | 5 ----- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 26 -------------------------- 3 files changed, 33 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index e942b3a13462..e33ccce5abb1 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -107,7 +107,6 @@ #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_PKTS 0x20 #define MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_USEC 0x10 #define MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_PKTS 0x20 -#define MLX5E_PARAMS_DEFAULT_MIN_RX_WQES 0x80 #define MLX5E_PARAMS_DEFAULT_RX_HASH_LOG_TBL_SZ 0x7 #define MLX5E_CACHELINE_SIZE CACHE_LINE_SIZE #define MLX5E_HW2SW_MTU(hwmtu) \ @@ -676,7 +675,6 @@ struct mlx5e_params { u16 rx_cq_moderation_pkts; u16 tx_cq_moderation_usec; u16 tx_cq_moderation_pkts; - u16 min_rx_wqes; bool hw_lro_en; bool cqe_zipping_en; u32 lro_wqe_sz; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c index 59a8cbc56bbb..9b857f26f6f8 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c @@ -1035,11 +1035,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS) priv->params_ethtool.rx_queue_size = 1 << priv->params.log_rq_size; - /* update least number of RX WQEs */ - priv->params.min_rx_wqes = min( - priv->params_ethtool.rx_queue_size - 1, - MLX5E_PARAMS_DEFAULT_MIN_RX_WQES); - /* restart network interface, if any */ if (was_opened) mlx5e_open_locked(priv->ifp); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 7a11bedffb10..34546174af65 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -1416,23 +1416,6 @@ mlx5e_disable_rq(struct mlx5e_rq *rq) mlx5_core_destroy_rq(mdev, rq->rqn); } -static int -mlx5e_wait_for_min_rx_wqes(struct mlx5e_rq *rq) -{ - struct mlx5e_channel *c = rq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_wq_ll *wq = &rq->wq; - int i; - - for (i = 0; i < 1000; i++) { - if (wq->cur_sz >= priv->params.min_rx_wqes) - return (0); - - msleep(4); - } - return (-ETIMEDOUT); -} - static int mlx5e_open_rq(struct mlx5e_channel *c, struct mlx5e_rq_param *param, @@ -2518,7 +2501,6 @@ mlx5e_open_channels(struct mlx5e_priv *priv) struct mlx5e_channel_param *cparam; int err; int i; - int j; cparam = malloc(sizeof(*cparam), M_MLX5EN, M_WAITOK); @@ -2552,12 +2534,6 @@ mlx5e_open_channels(struct mlx5e_priv *priv) intr_setaffinity(irq, CPU_WHICH_INTRHANDLER, &cpuset); } } - - for (j = 0; j < priv->params.num_channels; j++) { - err = mlx5e_wait_for_min_rx_wqes(&priv->channel[j].rq); - if (err) - goto err_close_channels; - } free(cparam, M_MLX5EN); return (0); @@ -3849,8 +3825,6 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_USEC; priv->params.tx_cq_moderation_pkts = MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_PKTS; - priv->params.min_rx_wqes = - MLX5E_PARAMS_DEFAULT_MIN_RX_WQES; priv->params.rx_hash_log_tbl_sz = (order_base_2(num_comp_vectors) > MLX5E_PARAMS_DEFAULT_RX_HASH_LOG_TBL_SZ) ? From nobody Tue Apr 18 13:30: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 4Q14YS5k0Vz456b6; Tue, 18 Apr 2023 13:30: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 4Q14YS5JWsz443y; Tue, 18 Apr 2023 13:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681824636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Vg7tJ5KlmWcSsKIbqLQpS+9+4O3dIEIr/haLZFst4M=; b=vVDTS6l2/xNuyfbnx/jSMVKKfOXS6w/xWBR/+HW74O041McNuRmhiw+ZjSFpUwI2POva9Y xgHUux3i04IcDDtCU3tIqmAWMtu2WbIksTonXqH4uT6tUh0mLwz3kdmSGGBa1+fE3xS6y5 AYGS2BxHyrP5Bs4nh2xVmR08EXW9f87Iu3pMfVKz1ksynpkQ5duC19DLYRgz75cKw0A4GS RsDPimFwX1niy08TPbXWgsMaC5UFUY10AOgTucH9j50JYKDm7ZctolqIAHvK0gxjE4yfvd sSmkJ5DZ+zZtatQMH1925Gf0T07NDF1pixLd+YVIgFBwBnNajAT6m1S7c1Q/+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681824636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Vg7tJ5KlmWcSsKIbqLQpS+9+4O3dIEIr/haLZFst4M=; b=n6XBQRVt0qQxyN7nUAZXxJxy2mImUCFjE9VbOLks/TCVMfukIEhzsRx7a3oHyw7cvDHNeh 3AomfcB+Hyon/49gStyFEVJMwCxkX6BISg3MNrMmkVrckOULeglsJ3L9DgkhcsQuB4avEz dCRt/ZSpTZvqwkMatMYRgctbSfaPcTQugkYACJAbY32iddWuzO7JFAZKXWNV4Km7mRiQsz Ojfg6z70nACOhE5wr7+Ou2bNOh9tHzKUDnhaEisAmvZcwJ4vnDVNOTaMbxoTljo3B54bGV QtlhB9+mGROfjrtuatb0bO1aOODSZT0GUIJG358hVsB8CaXUOK2f4CaSGdhaKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681824636; a=rsa-sha256; cv=none; b=An8g/aGAbAggQMhbx2cTlsDIVJOa7O7m/zaqTxzdvLd22zB89JBeqba1NvnccccZNhfWq/ aKJdvI7xnf/wFCYFQyrc/4ZtyMhdKbFAjEMiYKWJTE1kVB2OdsBaBHgOCF6HCZ2v14nsqs zBPgCFkqDFl6wJsOOmDUlfk7ya49fXGukl9aD4Q6dH+/n8PVsamje++gq9moSwbeT0mRYp hF+YfdBHqprkC/zS9LkfXEMeOuXYzZgnkxrmaj6pBogahvxLNRuMJsiVGuizOqoKheBcNI /K9ZYtrMLdRYKrfiKTqQGLXlfqzl9YUaMa6PBHt3ca4J5JN4YuBmLjD5pXuXFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q14YS4Kx1z1CSZ; Tue, 18 Apr 2023 13:30: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 33IDUa0P022522; Tue, 18 Apr 2023 13:30:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IDUawT022521; Tue, 18 Apr 2023 13:30:36 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:30:36 GMT Message-Id: <202304181330.33IDUawT022521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: fb499259997c - main - split: Update synopsis and usage; fix examples List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb499259997c0bfd724b7b67578035cd977ef60f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=fb499259997c0bfd724b7b67578035cd977ef60f commit fb499259997c0bfd724b7b67578035cd977ef60f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-04-14 11:50:13 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-04-18 13:30:00 +0000 split: Update synopsis and usage; fix examples - Mark -d as an optional flag - Add a prompt to one of the examples for consistency - Add -d to the usage message Sponsored by: Klara Inc. --- usr.bin/split/split.1 | 12 ++++++------ usr.bin/split/split.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/usr.bin/split/split.1 b/usr.bin/split/split.1 index 4d5f4a1a0753..14ea2eec8dad 100644 --- a/usr.bin/split/split.1 +++ b/usr.bin/split/split.1 @@ -28,7 +28,7 @@ .\" @(#)split.1 8.3 (Berkeley) 4/16/94 .\" $FreeBSD$ .\" -.Dd October 25, 2022 +.Dd April 18, 2023 .Dt SPLIT 1 .Os .Sh NAME @@ -36,12 +36,12 @@ .Nd split a file into pieces .Sh SYNOPSIS .Nm -.Fl d +.Op Fl d .Op Fl l Ar line_count .Op Fl a Ar suffix_length .Op Ar file Op Ar prefix .Nm -.Fl d +.Op Fl d .Fl b Ar byte_count Ns .Oo .Sm off @@ -51,12 +51,12 @@ .Op Fl a Ar suffix_length .Op Ar file Op Ar prefix .Nm -.Fl d +.Op Fl d .Fl n Ar chunk_count .Op Fl a Ar suffix_length .Op Ar file Op Ar prefix .Nm -.Fl d +.Op Fl d .Fl p Ar pattern .Op Fl a Ar suffix_length .Op Ar file Op Ar prefix @@ -186,7 +186,7 @@ $ echo -e "This is 22 bytes long" | split -d -b10 .Pp Split input generating 6 files: .Bd -literal -offset indent -echo -e "This is 22 bytes long" | split -n 6 +$ echo -e "This is 22 bytes long" | split -n 6 .Ed .Pp Split input creating a new file every time a line matches the regular expression diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 091c914ba8f7..5d6cbe138d38 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -395,9 +395,9 @@ static void usage(void) { (void)fprintf(stderr, -"usage: split [-l line_count] [-a suffix_length] [file [prefix]]\n" -" split -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file [prefix]]\n" -" split -n chunk_count [-a suffix_length] [file [prefix]]\n" -" split -p pattern [-a suffix_length] [file [prefix]]\n"); +"usage: split [-d] [-l line_count] [-a suffix_length] [file [prefix]]\n" +" split [-d] -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file [prefix]]\n" +" split [-d] -n chunk_count [-a suffix_length] [file [prefix]]\n" +" split [-d] -p pattern [-a suffix_length] [file [prefix]]\n"); exit(EX_USAGE); } From nobody Tue Apr 18 13:51: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 4Q151k65Dkz4585c; Tue, 18 Apr 2023 13:51: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 4Q151k4thHz3kpq; Tue, 18 Apr 2023 13:51:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681825898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zs+gSYZ2RukywcgMz/6/+t3osPf/rrVUV4CVROyruM8=; b=KaTGQOZyUyLvyTCNNDy8vuRwfP2GOt/YL3DIRQSdNFDUIgrF+Av4G/eym0eMxiBRKY5Pt0 EQzGR7dKxhDs1ttfn9Zzw3BvCnEAA9v2ri0H1zj+7/40CZTQNYRwROT+rPIwO5WfbXqYuD p9+iPsO4zLwQTFLkj9ne5/wh061h+QvsUEfrQfC0csHUDdMcViaCxu/SnVOtaRlPgv+Rae 12QUrOtkmKTd1XsK2fpeNs6RYx/l0Qn/z4OtanUUAIrakkYHu/RZDwK5oOrESQ97xv9FyP avrVxdEVNDtU16oQZGexR3fb67uCewXUGrZEbWZ2OD8KkiiyhxTRLw3UskmY3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681825898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zs+gSYZ2RukywcgMz/6/+t3osPf/rrVUV4CVROyruM8=; b=N9YsBQh4mFwLKks4hfpevsDP+1b6YLLPwjoHFUGOqdepW2ODct+BHftB+C5TS9WeQbhx4r 2TctapDg7Zog8rAJt0XtDIQKVSgcuwdQBoe5H1j/6GlteydtsaNriEKs9KMfJq6IXZuSKC oDiujmjGTfMveN5K7TBKADCKigTu5FWOGRIi4MQzgjkAuUNATzxY8dBUDdaNLr+pm0BBxB mC6M9blMk7dd1i2ODUEwaEhfX2yN7LlD42CvzlR3+kdVVI0eGj0h6OVaE74lHbOwWNKtYB oRrEdpcXgM/UKqE2BSBJTCf8ag1BIKugFdXnURWD7y4L5naPxlzHANVjEzCL2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681825898; a=rsa-sha256; cv=none; b=cO/klCbaMCZWFb8X+hE3zsAeG2GClcnXY7t0I4/XZG/4Z6HbTSXnThTYHfcUQBXZQPgdG2 SE2Fz16cpNmnc/4v1vs0pogAMqQNhp34Gp0nH1dYzZ/guDLECPAZjutlEnVOeSUZDd13+c rQr59x+Hhil4LIN2iEZEVFLJjfvLLEBIv+pErGVX5YfeNpMU+eZ8bDBRZftymoStg5TXiQ 4E7hgRaUBkqrRAd1TcytxjM2xQOXPvwmw4wvJ6MslVUGmEdGdKhxYDsrxE7gDnM+klhcG6 jNy9D5Xv69QtrGaJD9GkRwLAs8Tz74H1iuOT5/pzIlgscOGEW8kM/Wgv85sfjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q151k3mc4zF7H; Tue, 18 Apr 2023 13:51: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 33IDpc1M056907; Tue, 18 Apr 2023 13:51:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IDpcS9056906; Tue, 18 Apr 2023 13:51:38 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:51:38 GMT Message-Id: <202304181351.33IDpcS9056906@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: af94d8cc1716 - main - pf: fix incorrect lock define List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af94d8cc17164e2558fc97abdfbaeb550cd337b6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=af94d8cc17164e2558fc97abdfbaeb550cd337b6 commit af94d8cc17164e2558fc97abdfbaeb550cd337b6 Author: Kristof Provost AuthorDate: 2023-04-18 13:24:24 +0000 Commit: Kristof Provost CommitDate: 2023-04-18 13:51:05 +0000 pf: fix incorrect lock define PF_TABLE_STATS_ASSERT() should be checking pf_table_stats_lock not pf_rules_lock. Fortunately the define is not yet used anywhere so this was harmless. Fix it anyway, in case it does get used. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e2cddb49728c..e9e23d985cfa 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -400,7 +400,7 @@ extern struct mtx_padalign pf_table_stats_lock; #define PF_TABLE_STATS_LOCK() mtx_lock(&pf_table_stats_lock) #define PF_TABLE_STATS_UNLOCK() mtx_unlock(&pf_table_stats_lock) #define PF_TABLE_STATS_OWNED() mtx_owned(&pf_table_stats_lock) -#define PF_TABLE_STATS_ASSERT() mtx_assert(&pf_rules_lock, MA_OWNED) +#define PF_TABLE_STATS_ASSERT() mtx_assert(&pf_table_stats_lock, MA_OWNED) extern struct sx pf_end_lock; From nobody Tue Apr 18 14:10: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 4Q15Rh2zbjz458pH; Tue, 18 Apr 2023 14:10: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 4Q15Rh2TZlz4Fjd; Tue, 18 Apr 2023 14:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681827040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eIT6xjBqklEVlhPDLI+f6eNFPCyyJ4uUoAMhO5k0p2o=; b=pA3gs3yYzV+2ufs5jeF9+8g6uLEvCMZTWzWfhOUsV4I3hqtw8uWGKX3A7+9p1r8m4ShB+/ VPohGPHRtXAB6wEPSp6snrMUDnHNn9Lfgp+t9jvXCqJbo0HnjRFQkYXmr/tpJzHHG6SG8g LLQf1p6GQtAj9YQMjg1rDCislKdKCugHTgi2W0iUFEKQAw0C2daVftep/SF8HGVDykXILQ wk9PQaoKvH3we32nIuIY2tf0/PANAZYS34UIsvy+iimuHm6CCprXsVf+FXZywR12l6kiTn vs495DU4fzpagbANL2dAmeSV5BjSLeoHyqwbKGP7iCiRMyItM0W/Ek3yRUG6Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681827040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eIT6xjBqklEVlhPDLI+f6eNFPCyyJ4uUoAMhO5k0p2o=; b=pizofGnmugH6FpYfijsilOfl0qxeMuOCpi3J0uKE5P9DSOOf6gVi5ksPIfWXDhhlydhb0W WspEdW2OuFB71VTmsr0wynXRD2ZCd4N69FtJHYbvvVpx2y5d6BWzs1eD/wVnKEoijkEDMF 8thiZyH2LWdfQipTUfk8qSX4WjAxM6dksYflZ8r4H5eofk6inudTypMpdpSjuQnpn0CkJe zbqCUyoZpkFG1S6m62mOXxbibK4Se1nw0MFPylw5ppBtvbfBjxXDaWu9fh2cnrG0k68Grd IQxbWIH3mMZXQp+SmPED2sSMhIWtJE01fOWmiknAq5yJck9P3xuUfYysr26TGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681827040; a=rsa-sha256; cv=none; b=IL6GYv8H7FhkD+yN/bMu0P2HSGtjWWDNI3NGwP92j8atsxJBYUl89jFu19duqB+QWPIfbh KsoSDQH0+p884qRHi4k0/QruegCMxuF9E8FqxAiIj/H8s0ukRa0cECJY3PqgdElsDwuei9 g9/3CcxwfC5lWhJddvPpUybUG51S+fhjMcnJSK26N5gl1RBl3IRh//P+lgToZaetxPyFDe ezk+04yZuuXINqOZ0vsqVDq7G7gTZ/aOyU+EsKrUum6tJOmvT8cqwLKZnwG6AKh0B9sUpc Z3kmxBW93auavIAGNsPG45oEwsGJ8vVeE2dfRiqVBZkRXjgBiZZ/5UQUV32hoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q15Rh1LXWzFQQ; Tue, 18 Apr 2023 14:10: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 33IEAeXi088602; Tue, 18 Apr 2023 14:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IEAenT088601; Tue, 18 Apr 2023 14:10:40 GMT (envelope-from git) Date: Tue, 18 Apr 2023 14:10:40 GMT Message-Id: <202304181410.33IEAenT088601@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: 04a036601e10 - main - tests: fix netlink type parsing. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 04a036601e10237ae00655e515aeb78762eb5d1a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=04a036601e10237ae00655e515aeb78762eb5d1a commit 04a036601e10237ae00655e515aeb78762eb5d1a Author: Alexander V. Chernikov AuthorDate: 2023-04-18 14:09:47 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-18 14:09:47 +0000 tests: fix netlink type parsing. Netlink attribute type field is 2 bytes, not one. MFC after: 2 weeks --- tests/atf_python/sys/netlink/attrs.py | 2 +- tests/atf_python/sys/netlink/message.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/atf_python/sys/netlink/attrs.py b/tests/atf_python/sys/netlink/attrs.py index 58fbab7fc8db..9769ef0fc76f 100644 --- a/tests/atf_python/sys/netlink/attrs.py +++ b/tests/atf_python/sys/netlink/attrs.py @@ -21,7 +21,7 @@ class NlAttr(object): @property def nla_type(self): - return self._nla_type & 0x3F + return self._nla_type & 0x3FFF @property def nla_len(self): diff --git a/tests/atf_python/sys/netlink/message.py b/tests/atf_python/sys/netlink/message.py index b6fb2f8e357a..1e2b71775102 100644 --- a/tests/atf_python/sys/netlink/message.py +++ b/tests/atf_python/sys/netlink/message.py @@ -205,7 +205,7 @@ class StdNetlinkMessage(BaseNetlinkMessage): nla_len, len(data) - off ) ) - nla_type = raw_nla_type & 0x3F + nla_type = raw_nla_type & 0x3FFF if nla_type in attr_map: v = attr_map[nla_type] val = v["ad"].cls.from_bytes(data[off:off + nla_len], v["ad"].val) From nobody Tue Apr 18 15:34: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 4Q17Jj2nWCz45G97 for ; Tue, 18 Apr 2023 15:34: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 4Q17Jh1rnbz4NMy; Tue, 18 Apr 2023 15:34:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681832084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSY/mFpNDEwbrBE6v4NQtBkwEp8uWpHoOQKRfbz5iwI=; b=q3S+4gafhckfmYKrGA4Iv62Oi+dz4P3Qm25bMeHzLA5+dkrxsmcsORN4V2xjHVBfeKu79J D/YctSHOeuswv6qHAxm2o55tKK51ygP/Q7595tEyzgx4+kuwAxBTItAjtomq6qUNsLvRY6 IgptqV1WA/c8T1OEwEPmmx0sgNpsk6/AQ2ZThwzdma1TPUFgEzw06eAL2WhpaAitcFgRI5 L+j1NAAGbfMDUMsd4NFGAuG4MxxAlWqG84FIsPrJ8TEPLF86GgWt5DeQ5iuvpRxJbpJW52 1co7G9r4X3NqhUdySE106BsXQ75HXF8DOs/22Rpl9vz4X4WOcdmvxPLEGykhDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681832084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSY/mFpNDEwbrBE6v4NQtBkwEp8uWpHoOQKRfbz5iwI=; b=wWaAwABzXgSbAcNkRPWGUwer3bHkHZgmqJjILXPleG+LVyWB2j5wv0GcoHevZuR7mV/1rG SDpAPYHV6Uk26vT7jUcJQG3hFeizssaST+yLIpJ0qjOaMO5JGJfnbct7N11m2IOkAS5D5D C9LIpJzrxlQspmRaTCE+7xs/CNaILWrI4eajH/FWYn8hi4S+P5AGeAplHsmXakzZ18ai2p tVuAKDMEXgA/16Cm3oQXVAv2mT0aCVxKcQ7FS07it8+yonu0dZ0GAaPQu5uksujQK/5+/t lEWdoyadbBaFVFE5R6bkgVRnUNZRY1j9Koy4a4kfvaP0TSgQB8wslC9Q4BHmtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681832084; a=rsa-sha256; cv=none; b=W2f+Z9m/RqASRU2u/w12muuTKFjtxPj8QoAQuky9V6MfKjm7sf2I0LxFuRdIO+qOwfw2SW Cuq0mMsHM6C2fmzThMntwTsF70FPG+5F32nsCxV+buVh6wW1m9Btm+6lI/U/Tu1mGpdCvy RG+huFvjgiWEfDRIb0Ui2CL9qq64wILfci1s0DDL47bSykN+auADSvtqxjbletO5pswcIj 7BScf+aLJo1/tTcpLRtsOoVxXPYrVS7aEBwW84JFfhVpCB5iiCJYi5I5r2N7VFrWM3uq6a uuTNmXD/kATGAHV69qwdzvc4CJGzLHQnfrzNSLTjHw/qjqyRlcqd/MvqoA6P1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q17Jg46SCzHS6; Tue, 18 Apr 2023 15:34: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 33IFYhNC027253; Tue, 18 Apr 2023 15:34:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IFYhuQ027252; Tue, 18 Apr 2023 15:34:43 GMT (envelope-from git) Date: Tue, 18 Apr 2023 15:34:43 GMT Message-Id: <202304181534.33IFYhuQ027252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Sergio Carlavilla Delgado Subject: git: 87be765a40f2 - internal/admin - Safekeep n_hibma's src bit per his request List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: carlavilla X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: 87be765a40f2b62b7f491664252c82bcc64b9b65 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch internal/admin has been updated by carlavilla: URL: https://cgit.FreeBSD.org/src/commit/?id=87be765a40f2b62b7f491664252c82bcc64b9b65 commit 87be765a40f2b62b7f491664252c82bcc64b9b65 Author: Sergio Carlavilla Delgado AuthorDate: 2023-04-18 15:33:23 +0000 Commit: Sergio Carlavilla Delgado CommitDate: 2023-04-18 15:33:23 +0000 Safekeep n_hibma's src bit per his request Thank you for your years of server as src committer Approved by: core (implicit) --- access | 1 - 1 file changed, 1 deletion(-) diff --git a/access b/access index 8ae3e6282488..52cc5b03a338 100644 --- a/access +++ b/access @@ -124,7 +124,6 @@ mmel mp mr mw -n_hibma devnull netchild ngie np From nobody Tue Apr 18 15:42: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 4Q17Th0Xznz45Gmb; Tue, 18 Apr 2023 15:42: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 4Q17Tg3CH9z4ZMj; Tue, 18 Apr 2023 15:42:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681832551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PNJn6JlmJH3JfMiMLpHm50AomGYlhNh7YSjxM0z6Khk=; b=wg8ss+VW0hwl4SH3GpcFuoKdEkr/nuxTP+tGI56yGRgOmqfytUqJBMG9d2zEwqtJhpWVbc Y5Sk7Df7CmmRAVvbsxTgfgS2Im31wqX01jun4wPvyonC7gP1wzXtSc1uYvsJjonVLYVZl2 Fub0WXERFRO5vvDp3fC68j+le2i3I2q86fG8bJRSC+JDofnIY62T1JDfZN7LeZR2ZdWlOv qV09qx82VSIuIaGug7dcUSFq12nAh7nO8NiBUbqQ4E4LehZV0aUrRXQiR/Syu/DMAwlUXV WJx7H7u0FTgvUMS8kxRjLKYbb6eWOi7CzUrTxhgPg9zykiq5ynZPpp2f7ZW6fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681832551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PNJn6JlmJH3JfMiMLpHm50AomGYlhNh7YSjxM0z6Khk=; b=hNpt5x+Pxyo3W5UtrFmN+FboEfNrAFzyWh3C+3oM5w6X7AE0B5Z5HFLr0CZH5X0gekQzyX SMl1Ene9BDz4MPmNXIMsV57PjNF5VB5iHk3nY1/I5l9vE1MGKATiLxmz5SjNa45EvcWRWa vzJf+obmno9rysq4SC0Zt9mg849Thx36LHc/2hko2xDmsgzCrX1PZoOiaRFofSNpsAhKW6 mVmh7PfXLQMaPv4jnHdq0uWo5Wnr8AFFG/Y7h7cYzAwYqXjWserLRsiOOC6+wv2yQTXuhY RczhcnXty/lzhlEZpIKfLXnf+c0obc82eq/2CfR8jykjb2eTNy7BQ926Ng/w1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681832551; a=rsa-sha256; cv=none; b=spTmtfHjQdtHiDwJl1fnQmVTvW1hWEF1hCSqcW7lltL8buMdeWTAp7m/gnAmCMXHK7dDzx iisPJED3raAZgwqSy0R+RHktOlHlbQPNWb+vMTJmHnFH8yCqUZwwLWr2bVbQbEmL6+HhuS 7fJnLfHsI836rZ5c937jvzUqUFuJps5Qz+/vjh7ciKYMPGcd1/kTZi4jabUNaiAqncXO7B IJ8uOF2rl+KdpGCVifrwyFGkhXzmZlveejpUnMzbf4Q8O05SWA5iOMUS1RN+tKgR3uw8zV KGXqXPlEPM0oTeWha89TC82jpgihSZb+NnMeeqvFl9tPWIhCpCCiNEAaN9RCIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q17Tg1LYgzJ04; Tue, 18 Apr 2023 15:42: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 33IFgVUP043911; Tue, 18 Apr 2023 15:42:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IFgVcT043910; Tue, 18 Apr 2023 15:42:31 GMT (envelope-from git) Date: Tue, 18 Apr 2023 15:42:31 GMT Message-Id: <202304181542.33IFgVcT043910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: fb5ff7384cfd - main - arm64: Use FULLKERNEL instead of .ALLSRC in .bin target List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb5ff7384cfdf48bd850eb9d6691c19f9139698f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=fb5ff7384cfdf48bd850eb9d6691c19f9139698f commit fb5ff7384cfdf48bd850eb9d6691c19f9139698f Author: Steve Kiernan AuthorDate: 2023-01-20 02:07:38 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-18 15:41:57 +0000 arm64: Use FULLKERNEL instead of .ALLSRC in .bin target Using .ALLSRC may get additional arguments that we may not want and could cause the objcopy to fail. Reviewed by: emaste Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39639 --- sys/conf/Makefile.arm64 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index cda063466116..6719404c3291 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -93,8 +93,8 @@ CLEAN+= ${KERNEL_KO}.bin # and the temp file together to make the kernel.bin file. ${KERNEL_KO}.bin: ${FULLKERNEL} @${OBJCOPY} --wildcard --strip-symbol='$$[adtx]*' \ - --output-target=binary ${.ALLSRC} ${.TARGET}.temp - @{ ${NM} ${.ALLSRC} | \ + --output-target=binary ${FULLKERNEL} ${.TARGET}.temp + @{ ${NM} ${FULLKERNEL} | \ ${AWK} -f $S/tools/arm_kernel_boothdr.awk -v hdrtype=v8booti && \ cat ${.TARGET}.temp; \ } > ${.TARGET} From nobody Tue Apr 18 15:58: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 4Q17qm74zTz45Htf; Tue, 18 Apr 2023 15:58: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 4Q17qm69Krz3lGN; Tue, 18 Apr 2023 15:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681833492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n/kIu9/H6ELvRk1XW9axMgfCGklim/YDR20Ol3m0Omk=; b=EbGq+jYUJpARbF5qcMzPCaKnqWusKCIHKBNIN/AvBDyiGgGoc1s7n22PtAUiOZIyfA8A1a +fpugx4LhZZN4j+QdaXuIU2PGUhSzRB2rkYewbYsLZBUZIjqa3In+c7eXTY3RkQAw+vWjH OzpQ126+BIhQyEEwx854h3+Wi5pEIixDdCec206Qg3VUuosyxunG8PmyRLOzC6WWwNkgtN pWpsfTY8t4c7PaNpg2bitIIJBHfd6IaVPVJ71SeBQjmhj6hnVfNgdWqteRo7OMI73gK46W g+xQ0oBeuLzeVMD0/sUb4TAcnWXjncoLirrlU7x6iVT+rpF2y53r5KPLP8PtsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681833492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n/kIu9/H6ELvRk1XW9axMgfCGklim/YDR20Ol3m0Omk=; b=Tx6Jg7e/YNgL7vW6qE4R0hVg0FTLtu3cB+rV6rT0lGbwxfi9eMAkm7gx+W1ISpDPcxUCY1 HkK5lKnFVQ53ed6JZ/A5pfFjEVvaXrtZbwdWEJw+237ELWHkOA6oWvxdXql8dzgLUtpC4Z 9mBYMgdfKHnGW8uU8pAxVVLUM43v8clG8tNrFhqvVybzvxmPixYQxE2KgqYLSemUbBXZhD ZnKu9aVYFTWez6ZxwlY97BnaQQxoUJQRiUWu/cnp24d4pcRu2yTHifdCRVgdmGtRFCb1o3 6o22zzy7nGfsuf0G+CnyxI21g/qHQ+i3sNRR+dR7bYKcvGsc3S32fmbJJA3DSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681833492; a=rsa-sha256; cv=none; b=qj6Bdp9Qy8mkEkjpHw39fdy6tmcX7PontbSpQU4ooN0EHb0kXP63glXc5lY7o7arWf/rWI mvXr1NJQVkTMY7ZqdYyGJycrAuJn0QvaB7YR3zlg0bxNOEmDA2sWj8bmuRJIspSAWXtAjq W0o/0MWSab8BZh8fbC4x45wXeaBSXXcF17zWDbZ6F2WPVLRqqJ1+W6oLjGmR0vIjyWqxeT dXC14WikPmtXBfJbXmmlqtao4e2TvsZRgevvihsati4X9rmyphAfKBhfW1Qfel+iZO7bkw T/QzSIVLXg0HzrE2F0ielEJDNWWiIozjTQAIm9RJgtAW00fY/Z1kez4tYYHbzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q17qm4y9qzHrb; Tue, 18 Apr 2023 15:58: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 33IFwCnX060916; Tue, 18 Apr 2023 15:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IFwCg4060915; Tue, 18 Apr 2023 15:58:12 GMT (envelope-from git) Date: Tue, 18 Apr 2023 15:58:12 GMT Message-Id: <202304181558.33IFwCg4060915@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: 2ad584c5551d - main - tcp: Inconsistent use of hpts_calling 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ad584c5551d4d385742b6c6a46d726a8cfc7c57 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=2ad584c5551d4d385742b6c6a46d726a8cfc7c57 commit 2ad584c5551d4d385742b6c6a46d726a8cfc7c57 Author: Randall Stewart AuthorDate: 2023-04-17 21:10:26 +0000 Commit: Randall Stewart CommitDate: 2023-04-17 21:10:26 +0000 tcp: Inconsistent use of hpts_calling flag Gleb has noticed there were some inconsistency's in the way the inp_hpts_calls flag was being used. One such inconsistency results in a bug when we can't allocate enough sendmap entries to entertain a call to rack_output().. basically a timer won't get started like it should. Also in cleaning this up I find that the "no_output" side of input needs to be adjusted to make sure we don't try to re-pace too quickly outside the hpts assurance of 250useconds. Another thing here is we end up with duplicate calls to tcp_output() which we should not. If packets go from hpts for processing the input side of tcp will call the output side of tcp on the last packet if it is needed. This means that when that occurs a second call to tcp_output would be made that is not needed and if pacing is going on may be harmful. Lets fix all this and explicitly state the contract that hpts is making with transports that care about the flag. Reviewed by: tuexen, glebius Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D39653 --- sys/netinet/tcp_hpts.c | 20 +++++++++++++++----- sys/netinet/tcp_stacks/bbr.c | 9 ++++++--- sys/netinet/tcp_stacks/rack.c | 22 ++++++++++++++++++---- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index e61547104775..2aa4135c7a25 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1330,6 +1330,17 @@ again: kern_prefetch(tp->t_fb_ptr, &did_prefetch); did_prefetch = 1; } + /* + * We set inp_hpts_calls to 1 before any possible output. + * The contract with the transport is that if it cares about + * hpts calling it should clear the flag. That way next time + * it is called it will know it is hpts. + * + * We also only call tfb_do_queued_segments() tcp_output() + * it is expected that if segments are queued and come in that + * the final input mbuf will cause a call to output if it is needed. + */ + inp->inp_hpts_calls = 1; if ((inp->inp_flags2 & INP_SUPPORTS_MBUFQ) && !STAILQ_EMPTY(&tp->t_inqueue)) { error = (*tp->t_fb->tfb_do_queued_segments)(tp, 0); @@ -1337,12 +1348,11 @@ again: /* The input killed the connection */ goto skip_pacing; } + } else { + error = tcp_output(tp); + if (error < 0) + goto skip_pacing; } - inp->inp_hpts_calls = 1; - error = tcp_output(tp); - if (error < 0) - goto skip_pacing; - inp->inp_hpts_calls = 0; if (ninp) { /* * If we have a nxt inp, see if we can diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index fab85e88a382..f5cf362a57dc 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -11581,6 +11581,9 @@ bbr_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, /* Do we have the correct timer running? */ bbr_timer_audit(tp, bbr, lcts, &so->so_snd); } + /* Clear the flag, it may have been cleared by output but we may not have */ + if ((nxt_pkt == 0) && (inp->inp_hpts_calls)) + inp->inp_hpts_calls = 0; /* Do we have a new state */ if (bbr->r_state != tp->t_state) bbr_set_state(tp, bbr, tiwin); @@ -11850,6 +11853,8 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv) memcpy(&bbr->rc_tv, tv, sizeof(struct timeval)); cts = tcp_tv_to_usectick(&bbr->rc_tv); inp = bbr->rc_inp; + hpts_calling = inp->inp_hpts_calls; + inp->inp_hpts_calls = 0; so = inp->inp_socket; sb = &so->so_snd; if (tp->t_nic_ktls_xmit) @@ -11985,7 +11990,7 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv) merged_val = bbr->rc_pacer_started; merged_val <<= 32; merged_val |= bbr->r_ctl.rc_last_delay_val; - bbr_log_pacing_delay_calc(bbr, inp->inp_hpts_calls, + bbr_log_pacing_delay_calc(bbr, hpts_calling, bbr->r_ctl.rc_agg_early, cts, delay_calc, merged_val, bbr->r_agg_early_set, 3); bbr->r_ctl.rc_last_delay_val = 0; @@ -12028,8 +12033,6 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv) * c) We had room to send something. * */ - hpts_calling = inp->inp_hpts_calls; - inp->inp_hpts_calls = 0; if (bbr->r_ctl.rc_hpts_flags & PACE_TMR_MASK) { int retval; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index c134c059ec89..40706d5ebfca 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -16427,6 +16427,8 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb } did_out = 1; } + if (rack->rc_inp->inp_hpts_calls) + rack->rc_inp->inp_hpts_calls = 0; rack_free_trim(rack); #ifdef TCP_ACCOUNTING sched_unpin(); @@ -16525,6 +16527,17 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, (*ts_ptr == TCP_LRO_TS_OPTION))) no_output = 1; } + if ((no_output == 1) && (slot_remaining < tcp_min_hptsi_time)) { + /* + * It is unrealistic to think we can pace in less than + * the minimum granularity of the pacer (def:250usec). So + * if we have less than that time remaining we should go + * ahead and allow output to be "early". We will attempt to + * make up for it in any pacing time we try to apply on + * the outbound packet. + */ + no_output = 0; + } } if (m->m_flags & M_ACKCMP) { /* @@ -16984,6 +16997,9 @@ do_output_now: rack_start_hpts_timer(rack, tp, cts, slot_remaining, 0, 0); rack_free_trim(rack); } + /* Clear the flag, it may have been cleared by output but we may not have */ + if ((nxt_pkt == 0) && (inp->inp_hpts_calls)) + inp->inp_hpts_calls = 0; /* Update any rounds needed */ if (rack_verbose_logging && tcp_bblogging_on(rack->rc_tp)) rack_log_hystart_event(rack, high_seq, 8); @@ -19637,6 +19653,7 @@ rack_output(struct tcpcb *tp) ts_val = get_cyclecount(); #endif hpts_calling = inp->inp_hpts_calls; + rack->rc_inp->inp_hpts_calls = 0; #ifdef TCP_OFFLOAD if (tp->t_flags & TF_TOE) { #ifdef TCP_ACCOUNTING @@ -19759,7 +19776,6 @@ rack_output(struct tcpcb *tp) counter_u64_add(rack_out_size[TCP_MSS_ACCT_INPACE], 1); return (0); } - rack->rc_inp->inp_hpts_calls = 0; /* Finish out both pacing early and late accounting */ if ((rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) && TSTMP_GT(rack->r_ctl.rc_last_output_to, cts)) { @@ -19876,7 +19892,7 @@ again: while (rack->rc_free_cnt < rack_free_cache) { rsm = rack_alloc(rack); if (rsm == NULL) { - if (inp->inp_hpts_calls) + if (hpts_calling) /* Retry in a ms */ slot = (1 * HPTS_USEC_IN_MSEC); so = inp->inp_socket; @@ -19887,8 +19903,6 @@ again: rack->rc_free_cnt++; rsm = NULL; } - if (inp->inp_hpts_calls) - inp->inp_hpts_calls = 0; sack_rxmit = 0; len = 0; rsm = NULL; From nobody Tue Apr 18 16:01: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 4Q17vW738gz45HwY for ; Tue, 18 Apr 2023 16:01: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 4Q17vW6c0Mz3pqR; Tue, 18 Apr 2023 16:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681833687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cmyH8bdAxQIedKRdriOL1Frzy4RNsWacdVR2jyjy7Pc=; b=EZwskINhEvy/WNDDQKltWlaJF7nNgoafzah+seI7olxTOj3qP9kZsX0yVgNDWqUXQwuMGz Ss2OPqH795JHeLI2nFCyWSObIvBW1uEcRc6aXJrwjv/rV2ofuZbpHG9scrTn9wj/cO8Fm+ /2RzjFVbAArnFjFsi4i4189thJsQKPvOgZ0x3UobsIj3dSkIcIWJnngRsqwgHKyXz6XYMq O1dlTCnnqwwPzMpdKmAyekjg9anGfPwdpszYeR6qanfyFF7MCdfGuhcq5q/eJkWy1WP6rf bYbFXLQQDJKX8RxJqwWyW0GtYyE9PFdn8RJqeSL+syyQIwNQRZBJDhPk5YJf5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681833687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cmyH8bdAxQIedKRdriOL1Frzy4RNsWacdVR2jyjy7Pc=; b=vC4A7whCG8T1JNgNItXKpU3lDk00kW6d1bm6Fmoqd0cmgzRM7PUN357YdDQLP89Lv1aBZV D/WDhE2OqaKW86ciMqPXHTsLEoFB/+eo941gjUyHVMcghoa30jBAc/EclZSiqXYDiEXJu0 wNVcNseFT7AealZrXbX1mkAD9+letgT0IdevBfW9VvJOGrCHNLRw2Yj+o+0SKkE/cbZ2G+ i+kDqMqs73ReMxR4jBEJoyBNWyQB3MgYg1X+WZiWqISzxwsWJazI9pN1bF021K1qlEvmsS 6kBIyYM1vKnIdraxM+icKoIXa2IHa88vURMhKhBDofQNPfYJmAYA91bWkUk88Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681833687; a=rsa-sha256; cv=none; b=btg+7hlfzAA+b4laY78Jmilkk4b0mpa2IcXBsSEBJyxTSryUS4w1feJBOaoJSRUtuiC9h7 VKsCiV4+AEMJW+JBWcOUMxAvr+r5uyLhhDrLBxh9o0OQbJjw5oUuzp0y6wSmQQVVFWiFFI pvq7LGVnl5ff0DwSlC5ay0oIZx1CFYBLhUbwag/IJcedJ0m8wiPJyFBHDPzlFkDyaO29CR dfN6RuKMTXD5vJjMqCY1ApGm5BMBi4empRaEPukY5DskhDouYUTGReHuT3qsTuN5+AMOlx Jvavd14FDFv9R9v9GjCm7zDd4P8p6SrP6d4DZRXwYQ2zfE/rWda3ljIRarBCug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q17vW5hrhzJBK; Tue, 18 Apr 2023 16:01: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 33IG1RDS074240; Tue, 18 Apr 2023 16:01:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IG1RH3074239; Tue, 18 Apr 2023 16:01:27 GMT (envelope-from git) Date: Tue, 18 Apr 2023 16:01:27 GMT Message-Id: <202304181601.33IG1RH3074239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Sergio Carlavilla Delgado Subject: git: dd59703ed352 - internal/admin - Safekeep eadler's src bit per his request List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: carlavilla X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: dd59703ed352386ec94242fe8aa2fe9d6fe9e04d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch internal/admin has been updated by carlavilla: URL: https://cgit.FreeBSD.org/src/commit/?id=dd59703ed352386ec94242fe8aa2fe9d6fe9e04d commit dd59703ed352386ec94242fe8aa2fe9d6fe9e04d Author: Sergio Carlavilla Delgado AuthorDate: 2023-04-18 16:00:34 +0000 Commit: Sergio Carlavilla Delgado CommitDate: 2023-04-18 16:00:34 +0000 Safekeep eadler's src bit per his request Thank you for your years of service as src committer Approved by: core (implicit) --- access | 1 - 1 file changed, 1 deletion(-) diff --git a/access b/access index 52cc5b03a338..40e0f4a48ab1 100644 --- a/access +++ b/access @@ -61,7 +61,6 @@ dougm dsl dteske dwmalone dwmalone=freebsd-committers@maths.tcd.ie -eadler emaste erj eugen From nobody Tue Apr 18 17:15: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 4Q19XY3ZwHz45Mx1; Tue, 18 Apr 2023 17:15: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 4Q19XX5rV2z3qTb; Tue, 18 Apr 2023 17:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H4vDwlXOnSkFmuNV88sjPOf79OcsZGeya2xZ6a9C54U=; b=VxCdPZisHQoMexqfXb6L5dibQZFXPYxPJ+WaEgBsanWVwAI1Eosqr0VbV1EQXA0E1EsCgd tA/rMYkRhxeZmrcAFRuxIgThucaDhOFs/qDtx36w+keL6m6xgqRShZNeNDAU+nV+dIafQF /UfVcIu6WOsiknX2cEu8tXSqGqXsKKR9thiTZgFMNWMq0NjHsjhqPg2tCQD7v5cqeDPUo/ b+OU8rFSJ8zn0X8fxybjZmb80/Ok4RIgOzkTE86hhndlXNu6h29jT/N3AuxennpKjfw/pn Pr8OZUp7nVbW5/qnfVZreGlwScinlQTpxoZBXXkUxMpq9HJGHelc/nl5g7JJuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H4vDwlXOnSkFmuNV88sjPOf79OcsZGeya2xZ6a9C54U=; b=HTD5TA71ckeTi+Kh61znDB2ZLD6G4oqTGyz37rxbv2GpzKPU+XcATxJJtXCDcsZ3P0tU3A ItOoDM1TVXSi3LvOqBQQGaNEgTCPeSAxUZH+rkSre8AbMR53Vi5VWvINvWVXmyMyPQ8f6M lqHUYZku4LjebeaVsAm6DUHHLUKA5q9KHzTXBB4uKcjazkoCPLo33OdCtNBToYqHy0Mz+0 e9aDbQAPQU3PZuocJFPFzm+yEbCtzr2e6aCTwltLtDyd/Kq5eyi2SMe9XC2NAh+VzGZA8t x5TDA/d+thhnvXdCVGzmfnE9j3fpGbVk68fcxwNxvTa63xeJQw24glKJ/VaJGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681838108; a=rsa-sha256; cv=none; b=b5ZkUA+BDQ9uhbetBg66EC5yq9gxpoRaHf+8ujJ8HlydnVub0RgYEwwsqNdf3eQqm5/0O5 R65oK0gwVuUe3Jb65OnQ7rSAO/QC0hnlng7TjghaBfNvXQeHSH47yKsjQNzziCbJ3K/j9Z iPjH+XhUURaFsd9QwUT7JcLy+qVPijV7rfU8strERu7gFIMx9t/ALTkmTmNgmRrl2mzd9x jVWxmV/5aW78CVJC2F69Ze21MTL5YGk2+ew+viXiyb5Y35A+nCJqkfrSDs2VGIbxOtLSpo MZ7IugMoqmYcHPfHJN+gB1abgVtahsRQdsIyyx5Xjwiyp6fSTbFjPrDHkgN7Dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q19XX4wcxzL40; Tue, 18 Apr 2023 17:15: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 33IHF86b093473; Tue, 18 Apr 2023 17:15:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IHF8f8093472; Tue, 18 Apr 2023 17:15:08 GMT (envelope-from git) Date: Tue, 18 Apr 2023 17:15:08 GMT Message-Id: <202304181715.33IHF8f8093472@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: 1bc6dcc287fa - main - renice: Factor out common code in tests. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bc6dcc287fa80af74768c4e2b2a1d7511ba1729 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1bc6dcc287fa80af74768c4e2b2a1d7511ba1729 commit 1bc6dcc287fa80af74768c4e2b2a1d7511ba1729 Author: Dag-Erling Smørgrav AuthorDate: 2023-04-18 17:14:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-04-18 17:14:25 +0000 renice: Factor out common code in tests. Furthermore, prefer test -eq (which ignores whitespace) over a strict string equality test when comparing numerical values. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D39650 --- usr.bin/renice/tests/renice_test.sh | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/usr.bin/renice/tests/renice_test.sh b/usr.bin/renice/tests/renice_test.sh index 79286a0f86bd..8a4df7879ad4 100755 --- a/usr.bin/renice/tests/renice_test.sh +++ b/usr.bin/renice/tests/renice_test.sh @@ -12,6 +12,12 @@ _renice() { atf_check -o empty -e ignore -s exit:0 renice "$@" } +atf_check_nice_value() { + local pid=$1 + local nice=$2 + atf_check test "$(ps -o nice= -p $pid)" -eq "$nice" +} + atf_test_case renice_abs_pid renice_abs_pid_head() { atf_set "descr" "Set a process's nice number to an absolute value" @@ -23,7 +29,7 @@ renice_abs_pid_body() { nice="$(ps -o nice= -p $pid)" incr=3 _renice $((nice+incr)) $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) kill $pid } @@ -40,7 +46,7 @@ renice_rel_pid_body() { _renice -n $incr $pid _renice -p -n $incr $pid _renice -n $incr -p $pid - atf_check_equal $((nice+incr+incr+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr+incr+incr)) kill $pid } @@ -56,7 +62,7 @@ renice_abs_pgid_body() { nice="$(ps -o nice= -p $pid)" incr=3 _renice $((nice+incr)) -g $pgid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) kill $pid } @@ -73,7 +79,7 @@ renice_rel_pgid_body() { incr=3 _renice -g -n $incr $pgid _renice -n $incr -g $pgid - atf_check_equal $((nice+incr+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr+incr)) kill $pid } @@ -88,7 +94,7 @@ renice_abs_user_body() { nice="$(ps -o nice= -p $pid)" incr=3 _renice $((nice+incr)) -u $TEST_USER - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) kill $pid } @@ -104,7 +110,7 @@ renice_rel_user_body() { incr=3 _renice -u -n $incr $TEST_USER _renice -n $incr -u $TEST_USER - atf_check_equal $((nice+incr+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr+incr)) kill $pid } @@ -121,29 +127,29 @@ renice_delim_body() { # without -p : $((incr=incr+1)) _renice -- $((nice+incr)) $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice $((nice+incr)) -- $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice $((nice+incr)) $pid -- - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) # with -p : $((incr=incr+1)) _renice -p -- $((nice+incr)) $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice -p $((nice+incr)) -- $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice -p $((nice+incr)) $pid -- - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice $((nice+incr)) -p -- $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice $((nice+incr)) -p $pid -- - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) kill $pid } From nobody Tue Apr 18 17:17: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 4Q19bV6N2Wz45NXs; Tue, 18 Apr 2023 17:17: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 4Q19bV5psCz3vgm; Tue, 18 Apr 2023 17:17:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wh3olQa5Ds4HLOZ4g+V9X+FI3zvXc7MHl3C1upbL0JY=; b=FAeu738MTWGK9ywIpK3QMG3t/pYxmU0Anw9k052FOqo1mHHr9+r+g4s+kEMan9R8nz5auI zC5ZXI68fBvz9tHQynJbQERUta+qyipKsmZFiEFyJh9hNgXITpG7gVWMDJ6I0iu/COmld9 ESJD9L7fPOQ98iJZwM6p2JG4LU2l2sjKBsXss3PmkstEhoXN1P3ZwlpSbIRkXaIojIIqkS GR9lNvvNKjluelvX/1HHrDHVejy3cTnyEvj0VY4ElG0imuCmwRpd6AgLD+q+C/iNkyaYXT J839WolyOtl/yHkwYbX/y/0Wjh5S3XvWyT/6kvk0ZVsqT85XAqcoiOqa9puJdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wh3olQa5Ds4HLOZ4g+V9X+FI3zvXc7MHl3C1upbL0JY=; b=NT3y00223Q9Jal8JV9mD7QM4G8pwfFD7+KtL0+g+3PQvLnkEG6vg8HfkH7b5Y3I8WY0Alf +jJSBmrdAcYBiH+IDAIvrWnv/VWWsGBfMi+fOwcBz+bKZaQqG91BPTyrBcmM1sCgZ/kWuM X8sr0xH6x6R3VF18YV4BNp13hdKAHo/SAw4UtBFuYElFvMxn9ApvexG1XoRFVt3PxhHxWL 9+NhJ0GFwDJzrbi2siHGB6rR80Eo2IPOi0tS0nW3L90/z3O+EOXC21vqKSAkSkfsK7uJXB 6F8finylQot5LLa/OpgHdroKM2r84UuIF3eYER4UaqfAV+uJitZK1f39KSaEYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681838262; a=rsa-sha256; cv=none; b=gn3D8HRSCUF4uXjb0PkcgbzzOyUna1gO88VCqoam8+/IHBVRvtl/GGjY0L+BgWiu/NKk4q 0Kj6rul6xlnKxsCihe7bEy8BOJF5mQSamJeLlQTl6dLANgZuh3hlGef5QkiYAXmgIAZYUh PMtKHbI16YpfWO1GcrpDYRXBhnunjh3rbUs/4zLRpqdHh28bPByDcXlcOKoWklRUedpqRO 73KT7bIvAK4noSztGVrWDwq4r2i+ll66VkGLmesiuiupRb4fOa0Df3OeoH5Frv3AQ9MsVB wAiSorguKAIKz4LmHv46+8ofBhCKpAGGtEHYBUA8kDeYCvclkZ2xiqOruAvgyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q19bV4vMkzKql; Tue, 18 Apr 2023 17:17: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 33IHHg60093913; Tue, 18 Apr 2023 17:17:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IHHgMx093912; Tue, 18 Apr 2023 17:17:42 GMT (envelope-from git) Date: Tue, 18 Apr 2023 17:17:42 GMT Message-Id: <202304181717.33IHHgMx093912@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: bd15d31cef50 - main - mmc(4): Don't call bridge driver for timings not requiring tuning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: bd15d31cef50060d90356384ba7b878d398fc9f3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=bd15d31cef50060d90356384ba7b878d398fc9f3 commit bd15d31cef50060d90356384ba7b878d398fc9f3 Author: Marius Strobl AuthorDate: 2023-04-12 21:46:02 +0000 Commit: Marius Strobl CommitDate: 2023-04-18 17:17:24 +0000 mmc(4): Don't call bridge driver for timings not requiring tuning The original idea behind calling into the bridge driver was to have the logic deciding whether tuning is actually required for a particular bus timing in a given slot as well as doing the sanity checking only on the controller layer which also generally is better suited for these due to say SDHCI_SDR50_NEEDS_TUNING. On another thought, not every such driver should need to check whether tuning is required at all, though, and not everything is SDHCI in the first place. Adjust sdhci{,_fsl_fdt}(4) accordingly, but keep sdhci_generic_tune() a bit cautious still. --- sys/dev/mmc/mmc.c | 9 +++++++++ sys/dev/sdhci/sdhci.c | 6 ++++-- sys/dev/sdhci/sdhci_fsl_fdt.c | 17 +++-------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 5fce6cbf47a1..54caadb2b3c7 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -2237,6 +2237,15 @@ clock: mmcbr_set_clock(dev, max_dtr); mmcbr_update_ios(dev); + /* + * Don't call into the bridge driver for timings definitely + * not requiring tuning. Note that it's up to the upper + * layer to actually execute tuning otherwise. + */ + if (timing <= bus_timing_uhs_sdr25 || + timing == bus_timing_mmc_ddr52) + goto power_class; + if (mmcbr_tune(dev, hs400) != 0) { device_printf(dev, "Card at relative address %d " "failed to execute initial tuning\n", rca); diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index a7283e66df31..69dbd3d7ffd7 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -1492,10 +1492,12 @@ sdhci_generic_tune(device_t brdev __unused, device_t reqdev, bool hs400) case bus_timing_uhs_sdr50: if (slot->opt & SDHCI_SDR50_NEEDS_TUNING) break; - /* FALLTHROUGH */ - default: SDHCI_UNLOCK(slot); return (0); + default: + slot_printf(slot, "Tuning requested but not required.\n"); + SDHCI_UNLOCK(slot); + return (EINVAL); } tune_cmd = slot->tune_cmd; diff --git a/sys/dev/sdhci/sdhci_fsl_fdt.c b/sys/dev/sdhci/sdhci_fsl_fdt.c index 470cbd169303..2c600e1291fe 100644 --- a/sys/dev/sdhci/sdhci_fsl_fdt.c +++ b/sys/dev/sdhci/sdhci_fsl_fdt.c @@ -1199,22 +1199,10 @@ sdhci_fsl_fdt_tune(device_t bus, device_t child, bool hs400) sc = device_get_softc(bus); slot = device_get_ivars(child); - error = 0; - clk_divider = sc->baseclk_hz / slot->clock; - switch (sc->slot.host.ios.timing) { - case bus_timing_mmc_hs400: - return (EINVAL); - case bus_timing_mmc_hs200: - case bus_timing_uhs_ddr50: - case bus_timing_uhs_sdr104: - break; - case bus_timing_uhs_sdr50: - if (slot->opt & SDHCI_SDR50_NEEDS_TUNING) - break; - default: + if (sc->slot.host.ios.timing == bus_timing_uhs_sdr50 && + !(slot->opt & SDHCI_SDR50_NEEDS_TUNING)) return (0); - } /* * For tuning mode SD clock divider must be within 3 to 16. @@ -1222,6 +1210,7 @@ sdhci_fsl_fdt_tune(device_t bus, device_t child, bool hs400) * For that reason we're just bailing if the dividers don't match * that requirement. */ + clk_divider = sc->baseclk_hz / slot->clock; if (clk_divider < 3 || clk_divider > 16) return (ENXIO); From nobody Tue Apr 18 17:17: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 4Q19bX25QPz45NXv; Tue, 18 Apr 2023 17:17: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 4Q19bX0f8zz3vpW; Tue, 18 Apr 2023 17:17:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jkv4yOqCruiU6h8cZcGZTOYCIpg2Th5x7T22EJwigLE=; b=Faa8EFNOiFcbJ4bvNrICWfbu7y/m0QAj859XFW9SBlP3bagrKCfVBKvERW9afdCqFg2B47 shUV6uQGH2uEYdZ8EwT+74vQmES6bR3R+fRoQfkL43UrZmq0MJCzpOXzObW6BPa6kfFPAY DcJN2BqCS3q3wfGvLVZARgp3YNf/ScqdUb4M8YLKkdqH2dRCAes596FupirlJMfqn0WmjZ MZC6onEKg87SddckWU7OtflzzWDmjCbBiVwRGyEBM845BuSpk3CZ7dFvny9fYuT3sYPJje wmL/V7LWxSSN9F+kCnMm8AA2eplmeKoKtWJiXjWKZBrxIBQVYTc5d6KvY0ZSfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jkv4yOqCruiU6h8cZcGZTOYCIpg2Th5x7T22EJwigLE=; b=CCte4Ia4avwg/CGH50Oyar00g5q1DjCvZi/WCcYpPDMSszkfeCyByihAqlfZfDmzy+Rl+Q x2sYJm4JIqggYO/jCMXGDdwDgeDUfqxHarGZTWh1ay2Xm3l6y1+nmEiPCdOKUf5CPN/UF7 vfZaP4ARkcKp8IwT9NPSDASF0X8Viu/9bzF/4v1IrV8hgvUrQdW3QqivnSt5yHv/E66E4v qm/SDSu8jsOAZTATIzXgYO7VLYF/IouEBsSSD4TcAaaQ51Cxa6jw9jHP+wfPKvRNJeb5iy DZoqbB3B3dr0n9L4g+MQazKFEX+uCW2BAz/aXnKoqKzgubkkcSupziGNLjFL0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681838264; a=rsa-sha256; cv=none; b=af3iW609EtJBlmsTd2O+Z5v34otmIZeia9yHMysgPhDipfrltbEGwnJQWMZZ8PP0Xw2Xkc gUiHG1nUFEBOTxP/6sA1x4JlxWotXU++tZkbWKUuDCx6SweZDLoHDWrxbRPL4uvR5bC+da bBjSFkOl48nN9qu/OpEoNzApuhw5we2v39NlcHPHGghu2Fgw6nS/Kea6vRtiWnVGvK/vhW jt2mLFf6eIZ70GWflJIZzFEhm4gpo+9YxOuwiL+EWsXQc283ic2cJc5R6CW0GxOyOhWlR4 FISs3mo9/hhk7nDaxLP2zXsbn0RDEfekAr0M/iP1QxVD/8HlhSRo+dJqkTKJbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q19bW5vrKzL41; Tue, 18 Apr 2023 17:17: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 33IHHhJI093932; Tue, 18 Apr 2023 17:17:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IHHhWC093931; Tue, 18 Apr 2023 17:17:43 GMT (envelope-from git) Date: Tue, 18 Apr 2023 17:17:43 GMT Message-Id: <202304181717.33IHHhWC093931@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: 8defc88c1345 - main - gem(4): Remove onboard-only Sun ERI and remnants of SBus 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: marius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8defc88c1345f4c048a05e6f20f60ed59d204129 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=8defc88c1345f4c048a05e6f20f60ed59d204129 commit 8defc88c1345f4c048a05e6f20f60ed59d204129 Author: Marius Strobl AuthorDate: 2023-04-18 16:39:38 +0000 Commit: Marius Strobl CommitDate: 2023-04-18 17:17:24 +0000 gem(4): Remove onboard-only Sun ERI and remnants of SBus support These bits are obsolete since 58aa35d42975c298ca0adba705c042596303c9f5. This change reverts part of 9ba2b298dfda78b6669281507b314a4c441cd706 as well as effectively bd3d9826d73b780d349c53ee373060bc7b8d0581, i. e. the SBus-related modifications. This also gets rid of a nasty hack required as bus_{read,write}_N(9) doesn't really fit bus_space_subregion(9). --- share/man/man4/gem.4 | 9 +- sys/dev/gem/if_gem.c | 451 ++++++++++++++++++++++------------------------- sys/dev/gem/if_gem_pci.c | 50 +----- sys/dev/gem/if_gemreg.h | 51 +----- sys/dev/gem/if_gemvar.h | 102 +++++------ 5 files changed, 266 insertions(+), 397 deletions(-) diff --git a/share/man/man4/gem.4 b/share/man/man4/gem.4 index 9224920c07dc..90667c19cc4f 100644 --- a/share/man/man4/gem.4 +++ b/share/man/man4/gem.4 @@ -26,12 +26,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2020 +.Dd April 18, 2023 .Dt GEM 4 .Os .Sh NAME .Nm gem -.Nd ERI/GEM/GMAC Ethernet device driver +.Nd GEM/GMAC Ethernet device driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -51,8 +51,7 @@ if_gem_load="YES" The .Nm driver provides support for the GMAC Ethernet hardware found mostly in -the last Apple PowerBooks G3s and most G4-based Apple hardware, as -well as Sun UltraSPARC machines. +the last Apple PowerBooks G3s and most G4-based Apple hardware. .Pp All controllers supported by the .Nm @@ -69,8 +68,6 @@ driver include: .It Apple GMAC .It -Sun ERI 10/100 Mbps Ethernet -.It Sun GEM Gigabit Ethernet .El .Pp diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index 2b0fc24c5d58..a976cb739b63 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -99,8 +99,8 @@ CTASSERT(powerof2(GEM_NTXDESC) && GEM_NTXDESC >= 32 && GEM_NTXDESC <= 8192); #define GEM_CSUM_FEATURES (CSUM_TCP) static int gem_add_rxbuf(struct gem_softc *sc, int idx); -static int gem_bitwait(struct gem_softc *sc, u_int bank, bus_addr_t r, - uint32_t clr, uint32_t set); +static int gem_bitwait(struct gem_softc *sc, bus_addr_t r, uint32_t clr, + uint32_t set); static void gem_cddma_callback(void *xsc, bus_dma_segment_t *segs, int nsegs, int error); static int gem_disable_rx(struct gem_softc *sc); @@ -141,11 +141,6 @@ MODULE_DEPEND(gem, miibus, 1, 1, 1); #define KTR_GEM KTR_SPARE2 #endif -#define GEM_BANK1_BITWAIT(sc, r, clr, set) \ - gem_bitwait((sc), GEM_RES_BANK1, (r), (clr), (set)) -#define GEM_BANK2_BITWAIT(sc, r, clr, set) \ - gem_bitwait((sc), GEM_RES_BANK2, (r), (clr), (set)) - int gem_attach(struct gem_softc *sc) { @@ -273,13 +268,9 @@ gem_attach(struct gem_softc *sc) if ((sc->sc_flags & GEM_SERDES) != 0) goto serdes; - /* Bad things will happen when touching this register on ERI. */ - if (sc->sc_variant != GEM_SUN_ERI) { - GEM_BANK1_WRITE_4(sc, GEM_MII_DATAPATH_MODE, - GEM_MII_DATAPATH_MII); - GEM_BANK1_BARRIER(sc, GEM_MII_DATAPATH_MODE, 4, - BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - } + GEM_WRITE_4(sc, GEM_MII_DATAPATH_MODE, GEM_MII_DATAPATH_MII); + GEM_BARRIER(sc, GEM_MII_DATAPATH_MODE, 4, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); gem_mifinit(sc); @@ -287,23 +278,15 @@ gem_attach(struct gem_softc *sc) * Look for an external PHY. */ error = ENXIO; - v = GEM_BANK1_READ_4(sc, GEM_MIF_CONFIG); + v = GEM_READ_4(sc, GEM_MIF_CONFIG); if ((v & GEM_MIF_CONFIG_MDI1) != 0) { v |= GEM_MIF_CONFIG_PHY_SEL; - GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, v); - GEM_BANK1_BARRIER(sc, GEM_MIF_CONFIG, 4, + GEM_WRITE_4(sc, GEM_MIF_CONFIG, v); + GEM_BARRIER(sc, GEM_MIF_CONFIG, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - switch (sc->sc_variant) { - case GEM_SUN_ERI: - phy = GEM_PHYAD_EXTERNAL; - break; - default: - phy = MII_PHY_ANY; - break; - } error = mii_attach(sc->sc_dev, &sc->sc_miibus, ifp, - gem_mediachange, gem_mediastatus, BMSR_DEFCAPMASK, phy, - MII_OFFSET_ANY, MIIF_DOPAUSE); + gem_mediachange, gem_mediastatus, BMSR_DEFCAPMASK, + MII_PHY_ANY, MII_OFFSET_ANY, MIIF_DOPAUSE); } /* @@ -314,11 +297,10 @@ gem_attach(struct gem_softc *sc) if (error != 0 && ((v & GEM_MIF_CONFIG_MDI0) != 0 || GEM_IS_APPLE(sc))) { v &= ~GEM_MIF_CONFIG_PHY_SEL; - GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, v); - GEM_BANK1_BARRIER(sc, GEM_MIF_CONFIG, 4, + GEM_WRITE_4(sc, GEM_MIF_CONFIG, v); + GEM_BARRIER(sc, GEM_MIF_CONFIG, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); switch (sc->sc_variant) { - case GEM_SUN_ERI: case GEM_APPLE_K2_GMAC: phy = GEM_PHYAD_INTERNAL; break; @@ -339,16 +321,16 @@ gem_attach(struct gem_softc *sc) */ if (error != 0 && sc->sc_variant == GEM_SUN_GEM) { serdes: - GEM_BANK1_WRITE_4(sc, GEM_MII_DATAPATH_MODE, + GEM_WRITE_4(sc, GEM_MII_DATAPATH_MODE, GEM_MII_DATAPATH_SERDES); - GEM_BANK1_BARRIER(sc, GEM_MII_DATAPATH_MODE, 4, + GEM_BARRIER(sc, GEM_MII_DATAPATH_MODE, 4, BUS_SPACE_BARRIER_WRITE); - GEM_BANK1_WRITE_4(sc, GEM_MII_SLINK_CONTROL, + GEM_WRITE_4(sc, GEM_MII_SLINK_CONTROL, GEM_MII_SLINK_LOOPBACK | GEM_MII_SLINK_EN_SYNC_D); - GEM_BANK1_BARRIER(sc, GEM_MII_SLINK_CONTROL, 4, + GEM_BARRIER(sc, GEM_MII_SLINK_CONTROL, 4, BUS_SPACE_BARRIER_WRITE); - GEM_BANK1_WRITE_4(sc, GEM_MII_CONFIG, GEM_MII_CONFIG_ENABLE); - GEM_BANK1_BARRIER(sc, GEM_MII_CONFIG, 4, + GEM_WRITE_4(sc, GEM_MII_CONFIG, GEM_MII_CONFIG_ENABLE); + GEM_BARRIER(sc, GEM_MII_CONFIG, 4, BUS_SPACE_BARRIER_WRITE); sc->sc_flags |= GEM_SERDES; error = mii_attach(sc->sc_dev, &sc->sc_miibus, ifp, @@ -369,10 +351,10 @@ gem_attach(struct gem_softc *sc) /* Get RX FIFO size. */ sc->sc_rxfifosize = 64 * - GEM_BANK1_READ_4(sc, GEM_RX_FIFO_SIZE); + GEM_READ_4(sc, GEM_RX_FIFO_SIZE); /* Get TX FIFO size. */ - v = GEM_BANK1_READ_4(sc, GEM_TX_FIFO_SIZE); + v = GEM_READ_4(sc, GEM_TX_FIFO_SIZE); device_printf(sc->sc_dev, "%ukB RX FIFO, %ukB TX FIFO\n", sc->sc_rxfifosize / 1024, v / 16); @@ -569,29 +551,29 @@ gem_tick(void *arg) * Unload collision and error counters. */ if_inc_counter(ifp, IFCOUNTER_COLLISIONS, - GEM_BANK1_READ_4(sc, GEM_MAC_NORM_COLL_CNT) + - GEM_BANK1_READ_4(sc, GEM_MAC_FIRST_COLL_CNT)); - v = GEM_BANK1_READ_4(sc, GEM_MAC_EXCESS_COLL_CNT) + - GEM_BANK1_READ_4(sc, GEM_MAC_LATE_COLL_CNT); + GEM_READ_4(sc, GEM_MAC_NORM_COLL_CNT) + + GEM_READ_4(sc, GEM_MAC_FIRST_COLL_CNT)); + v = GEM_READ_4(sc, GEM_MAC_EXCESS_COLL_CNT) + + GEM_READ_4(sc, GEM_MAC_LATE_COLL_CNT); if_inc_counter(ifp, IFCOUNTER_COLLISIONS, v); if_inc_counter(ifp, IFCOUNTER_OERRORS, v); if_inc_counter(ifp, IFCOUNTER_IERRORS, - GEM_BANK1_READ_4(sc, GEM_MAC_RX_LEN_ERR_CNT) + - GEM_BANK1_READ_4(sc, GEM_MAC_RX_ALIGN_ERR) + - GEM_BANK1_READ_4(sc, GEM_MAC_RX_CRC_ERR_CNT) + - GEM_BANK1_READ_4(sc, GEM_MAC_RX_CODE_VIOL)); + GEM_READ_4(sc, GEM_MAC_RX_LEN_ERR_CNT) + + GEM_READ_4(sc, GEM_MAC_RX_ALIGN_ERR) + + GEM_READ_4(sc, GEM_MAC_RX_CRC_ERR_CNT) + + GEM_READ_4(sc, GEM_MAC_RX_CODE_VIOL)); /* * Then clear the hardware counters. */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_NORM_COLL_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_FIRST_COLL_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_EXCESS_COLL_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_LATE_COLL_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_LEN_ERR_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_ALIGN_ERR, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_CRC_ERR_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_CODE_VIOL, 0); + GEM_WRITE_4(sc, GEM_MAC_NORM_COLL_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_FIRST_COLL_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_EXCESS_COLL_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_LATE_COLL_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_LEN_ERR_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_ALIGN_ERR, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_CRC_ERR_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_CODE_VIOL, 0); mii_tick(sc->sc_mii); @@ -602,14 +584,13 @@ gem_tick(void *arg) } static int -gem_bitwait(struct gem_softc *sc, u_int bank, bus_addr_t r, uint32_t clr, - uint32_t set) +gem_bitwait(struct gem_softc *sc, bus_addr_t r, uint32_t clr, uint32_t set) { int i; uint32_t reg; for (i = GEM_TRIES; i--; DELAY(100)) { - reg = GEM_BANKN_READ_M(bank, 4, sc, r); + reg = GEM_READ_4(sc, r); if ((reg & clr) == 0 && (reg & set) == set) return (1); } @@ -627,12 +608,10 @@ gem_reset(struct gem_softc *sc) gem_reset_tx(sc); /* Do a full reset. */ - GEM_BANK2_WRITE_4(sc, GEM_RESET, GEM_RESET_RX | GEM_RESET_TX | - (sc->sc_variant == GEM_SUN_ERI ? GEM_ERI_CACHE_LINE_SIZE << - GEM_RESET_CLSZ_SHFT : 0)); - GEM_BANK2_BARRIER(sc, GEM_RESET, 4, + GEM_WRITE_4(sc, GEM_RESET, GEM_RESET_RX | GEM_RESET_TX); + GEM_BARRIER(sc, GEM_RESET, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (!GEM_BANK2_BITWAIT(sc, GEM_RESET, GEM_RESET_RX | GEM_RESET_TX, 0)) + if (!gem_bitwait(sc, GEM_RESET, GEM_RESET_RX | GEM_RESET_TX, 0)) device_printf(sc->sc_dev, "cannot reset device\n"); } @@ -709,31 +688,29 @@ gem_reset_rx(struct gem_softc *sc) * disable DMA first. */ (void)gem_disable_rx(sc); - GEM_BANK1_WRITE_4(sc, GEM_RX_CONFIG, 0); - GEM_BANK1_BARRIER(sc, GEM_RX_CONFIG, 4, + GEM_WRITE_4(sc, GEM_RX_CONFIG, 0); + GEM_BARRIER(sc, GEM_RX_CONFIG, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (!GEM_BANK1_BITWAIT(sc, GEM_RX_CONFIG, GEM_RX_CONFIG_RXDMA_EN, 0)) + if (!gem_bitwait(sc, GEM_RX_CONFIG, GEM_RX_CONFIG_RXDMA_EN, 0)) device_printf(sc->sc_dev, "cannot disable RX DMA\n"); /* Wait 5ms extra. */ DELAY(5000); /* Reset the ERX. */ - GEM_BANK2_WRITE_4(sc, GEM_RESET, GEM_RESET_RX | - (sc->sc_variant == GEM_SUN_ERI ? GEM_ERI_CACHE_LINE_SIZE << - GEM_RESET_CLSZ_SHFT : 0)); - GEM_BANK2_BARRIER(sc, GEM_RESET, 4, + GEM_WRITE_4(sc, GEM_RESET, GEM_RESET_RX); + GEM_BARRIER(sc, GEM_RESET, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (!GEM_BANK2_BITWAIT(sc, GEM_RESET, GEM_RESET_RX, 0)) { + if (!gem_bitwait(sc, GEM_RESET, GEM_RESET_RX, 0)) { device_printf(sc->sc_dev, "cannot reset receiver\n"); return (1); } /* Finally, reset RX MAC. */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_RXRESET, 1); - GEM_BANK1_BARRIER(sc, GEM_MAC_RXRESET, 4, + GEM_WRITE_4(sc, GEM_MAC_RXRESET, 1); + GEM_BARRIER(sc, GEM_MAC_RXRESET, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (!GEM_BANK1_BITWAIT(sc, GEM_MAC_RXRESET, 1, 0)) { + if (!gem_bitwait(sc, GEM_MAC_RXRESET, 1, 0)) { device_printf(sc->sc_dev, "cannot reset RX MAC\n"); return (1); } @@ -764,25 +741,24 @@ gem_reset_rxdma(struct gem_softc *sc) GEM_CDSYNC(sc, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); /* NOTE: we use only 32-bit DMA addresses here. */ - GEM_BANK1_WRITE_4(sc, GEM_RX_RING_PTR_HI, 0); - GEM_BANK1_WRITE_4(sc, GEM_RX_RING_PTR_LO, GEM_CDRXADDR(sc, 0)); - GEM_BANK1_WRITE_4(sc, GEM_RX_KICK, GEM_NRXDESC - 4); - GEM_BANK1_WRITE_4(sc, GEM_RX_CONFIG, + GEM_WRITE_4(sc, GEM_RX_RING_PTR_HI, 0); + GEM_WRITE_4(sc, GEM_RX_RING_PTR_LO, GEM_CDRXADDR(sc, 0)); + GEM_WRITE_4(sc, GEM_RX_KICK, GEM_NRXDESC - 4); + GEM_WRITE_4(sc, GEM_RX_CONFIG, gem_ringsize(GEM_NRXDESC /* XXX */) | ((ETHER_HDR_LEN + sizeof(struct ip)) << GEM_RX_CONFIG_CXM_START_SHFT) | (GEM_THRSH_1024 << GEM_RX_CONFIG_FIFO_THRS_SHIFT) | (ETHER_ALIGN << GEM_RX_CONFIG_FBOFF_SHFT)); - /* Adjusting for the SBus clock probably isn't worth the fuzz. */ - GEM_BANK1_WRITE_4(sc, GEM_RX_BLANKING, + GEM_WRITE_4(sc, GEM_RX_BLANKING, ((6 * (sc->sc_flags & GEM_PCI66) != 0 ? 2 : 1) << GEM_RX_BLANKING_TIME_SHIFT) | 6); - GEM_BANK1_WRITE_4(sc, GEM_RX_PAUSE_THRESH, + GEM_WRITE_4(sc, GEM_RX_PAUSE_THRESH, (3 * sc->sc_rxfifosize / 256) | ((sc->sc_rxfifosize / 256) << 12)); - GEM_BANK1_WRITE_4(sc, GEM_RX_CONFIG, - GEM_BANK1_READ_4(sc, GEM_RX_CONFIG) | GEM_RX_CONFIG_RXDMA_EN); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_MASK, + GEM_WRITE_4(sc, GEM_RX_CONFIG, + GEM_READ_4(sc, GEM_RX_CONFIG) | GEM_RX_CONFIG_RXDMA_EN); + GEM_WRITE_4(sc, GEM_MAC_RX_MASK, GEM_MAC_RX_DONE | GEM_MAC_RX_FRAME_CNT); /* * Clear the RX filter and reprogram it. This will also set the @@ -800,22 +776,20 @@ gem_reset_tx(struct gem_softc *sc) * disable DMA first. */ (void)gem_disable_tx(sc); - GEM_BANK1_WRITE_4(sc, GEM_TX_CONFIG, 0); - GEM_BANK1_BARRIER(sc, GEM_TX_CONFIG, 4, + GEM_WRITE_4(sc, GEM_TX_CONFIG, 0); + GEM_BARRIER(sc, GEM_TX_CONFIG, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (!GEM_BANK1_BITWAIT(sc, GEM_TX_CONFIG, GEM_TX_CONFIG_TXDMA_EN, 0)) + if (!gem_bitwait(sc, GEM_TX_CONFIG, GEM_TX_CONFIG_TXDMA_EN, 0)) device_printf(sc->sc_dev, "cannot disable TX DMA\n"); /* Wait 5ms extra. */ DELAY(5000); /* Finally, reset the ETX. */ - GEM_BANK2_WRITE_4(sc, GEM_RESET, GEM_RESET_TX | - (sc->sc_variant == GEM_SUN_ERI ? GEM_ERI_CACHE_LINE_SIZE << - GEM_RESET_CLSZ_SHFT : 0)); - GEM_BANK2_BARRIER(sc, GEM_RESET, 4, + GEM_WRITE_4(sc, GEM_RESET, GEM_RESET_TX); + GEM_BARRIER(sc, GEM_RESET, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (!GEM_BANK2_BITWAIT(sc, GEM_RESET, GEM_RESET_TX, 0)) { + if (!gem_bitwait(sc, GEM_RESET, GEM_RESET_TX, 0)) { device_printf(sc->sc_dev, "cannot reset transmitter\n"); return (1); } @@ -826,11 +800,11 @@ static int gem_disable_rx(struct gem_softc *sc) { - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_CONFIG, - GEM_BANK1_READ_4(sc, GEM_MAC_RX_CONFIG) & ~GEM_MAC_RX_ENABLE); - GEM_BANK1_BARRIER(sc, GEM_MAC_RX_CONFIG, 4, + GEM_WRITE_4(sc, GEM_MAC_RX_CONFIG, + GEM_READ_4(sc, GEM_MAC_RX_CONFIG) & ~GEM_MAC_RX_ENABLE); + GEM_BARRIER(sc, GEM_MAC_RX_CONFIG, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (GEM_BANK1_BITWAIT(sc, GEM_MAC_RX_CONFIG, GEM_MAC_RX_ENABLE, 0)) + if (gem_bitwait(sc, GEM_MAC_RX_CONFIG, GEM_MAC_RX_ENABLE, 0)) return (1); device_printf(sc->sc_dev, "cannot disable RX MAC\n"); return (0); @@ -840,11 +814,11 @@ static int gem_disable_tx(struct gem_softc *sc) { - GEM_BANK1_WRITE_4(sc, GEM_MAC_TX_CONFIG, - GEM_BANK1_READ_4(sc, GEM_MAC_TX_CONFIG) & ~GEM_MAC_TX_ENABLE); - GEM_BANK1_BARRIER(sc, GEM_MAC_TX_CONFIG, 4, + GEM_WRITE_4(sc, GEM_MAC_TX_CONFIG, + GEM_READ_4(sc, GEM_MAC_TX_CONFIG) & ~GEM_MAC_TX_ENABLE); + GEM_BARRIER(sc, GEM_MAC_TX_CONFIG, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (GEM_BANK1_BITWAIT(sc, GEM_MAC_TX_CONFIG, GEM_MAC_TX_ENABLE, 0)) + if (gem_bitwait(sc, GEM_MAC_TX_CONFIG, GEM_MAC_TX_ENABLE, 0)) return (1); device_printf(sc->sc_dev, "cannot disable TX MAC\n"); return (0); @@ -985,11 +959,11 @@ gem_init_locked(struct gem_softc *sc) /* step 6 & 7. Program Descriptor Ring Base Addresses. */ /* NOTE: we use only 32-bit DMA addresses here. */ - GEM_BANK1_WRITE_4(sc, GEM_TX_RING_PTR_HI, 0); - GEM_BANK1_WRITE_4(sc, GEM_TX_RING_PTR_LO, GEM_CDTXADDR(sc, 0)); + GEM_WRITE_4(sc, GEM_TX_RING_PTR_HI, 0); + GEM_WRITE_4(sc, GEM_TX_RING_PTR_LO, GEM_CDTXADDR(sc, 0)); - GEM_BANK1_WRITE_4(sc, GEM_RX_RING_PTR_HI, 0); - GEM_BANK1_WRITE_4(sc, GEM_RX_RING_PTR_LO, GEM_CDRXADDR(sc, 0)); + GEM_WRITE_4(sc, GEM_RX_RING_PTR_HI, 0); + GEM_WRITE_4(sc, GEM_RX_RING_PTR_LO, GEM_CDRXADDR(sc, 0)); #ifdef GEM_DEBUG CTR3(KTR_GEM, "loading RX ring %lx, TX ring %lx, cddma %lx", GEM_CDRXADDR(sc, 0), GEM_CDTXADDR(sc, 0), sc->sc_cddma); @@ -1004,13 +978,12 @@ gem_init_locked(struct gem_softc *sc) * RX performance. * Enable silicon bug workarounds for the Apple variants. */ - GEM_BANK1_WRITE_4(sc, GEM_CONFIG, + GEM_WRITE_4(sc, GEM_CONFIG, GEM_CONFIG_TXDMA_LIMIT | GEM_CONFIG_RXDMA_LIMIT | - ((sc->sc_flags & GEM_PCI) != 0 ? GEM_CONFIG_BURST_INF : - GEM_CONFIG_BURST_64) | (GEM_IS_APPLE(sc) ? + GEM_CONFIG_BURST_INF | (GEM_IS_APPLE(sc) ? GEM_CONFIG_RONPAULBIT | GEM_CONFIG_BUG2FIX : 0)); - GEM_BANK1_WRITE_4(sc, GEM_INTMASK, + GEM_WRITE_4(sc, GEM_INTMASK, ~(GEM_INTR_TX_INTME | GEM_INTR_TX_EMPTY | GEM_INTR_RX_DONE | GEM_INTR_RX_NOBUF | GEM_INTR_RX_TAG_ERR | GEM_INTR_PERR | GEM_INTR_BERR @@ -1018,16 +991,16 @@ gem_init_locked(struct gem_softc *sc) | GEM_INTR_PCS | GEM_INTR_MIF #endif )); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_MASK, + GEM_WRITE_4(sc, GEM_MAC_RX_MASK, GEM_MAC_RX_DONE | GEM_MAC_RX_FRAME_CNT); - GEM_BANK1_WRITE_4(sc, GEM_MAC_TX_MASK, + GEM_WRITE_4(sc, GEM_MAC_TX_MASK, GEM_MAC_TX_XMIT_DONE | GEM_MAC_TX_DEFER_EXP | GEM_MAC_TX_PEAK_EXP); #ifdef GEM_DEBUG - GEM_BANK1_WRITE_4(sc, GEM_MAC_CONTROL_MASK, + GEM_WRITE_4(sc, GEM_MAC_CONTROL_MASK, ~(GEM_MAC_PAUSED | GEM_MAC_PAUSE | GEM_MAC_RESUME)); #else - GEM_BANK1_WRITE_4(sc, GEM_MAC_CONTROL_MASK, + GEM_WRITE_4(sc, GEM_MAC_CONTROL_MASK, GEM_MAC_PAUSED | GEM_MAC_PAUSE | GEM_MAC_RESUME); #endif @@ -1036,9 +1009,8 @@ gem_init_locked(struct gem_softc *sc) /* Enable DMA. */ v = gem_ringsize(GEM_NTXDESC); /* Set TX FIFO threshold and enable DMA. */ - v |= ((sc->sc_variant == GEM_SUN_ERI ? 0x100 : 0x4ff) << 10) & - GEM_TX_CONFIG_TXFIFO_TH; - GEM_BANK1_WRITE_4(sc, GEM_TX_CONFIG, v | GEM_TX_CONFIG_TXDMA_EN); + v |= (0x4ff << 10) & GEM_TX_CONFIG_TXFIFO_TH; + GEM_WRITE_4(sc, GEM_TX_CONFIG, v | GEM_TX_CONFIG_TXDMA_EN); /* step 10. ERX Configuration */ @@ -1048,13 +1020,12 @@ gem_init_locked(struct gem_softc *sc) v |= ((ETHER_HDR_LEN + sizeof(struct ip)) << GEM_RX_CONFIG_CXM_START_SHFT); /* Set RX FIFO threshold, set first byte offset and enable DMA. */ - GEM_BANK1_WRITE_4(sc, GEM_RX_CONFIG, + GEM_WRITE_4(sc, GEM_RX_CONFIG, v | (GEM_THRSH_1024 << GEM_RX_CONFIG_FIFO_THRS_SHIFT) | (ETHER_ALIGN << GEM_RX_CONFIG_FBOFF_SHFT) | GEM_RX_CONFIG_RXDMA_EN); - /* Adjusting for the SBus clock probably isn't worth the fuzz. */ - GEM_BANK1_WRITE_4(sc, GEM_RX_BLANKING, + GEM_WRITE_4(sc, GEM_RX_BLANKING, ((6 * (sc->sc_flags & GEM_PCI66) != 0 ? 2 : 1) << GEM_RX_BLANKING_TIME_SHIFT) | 6); @@ -1062,14 +1033,14 @@ gem_init_locked(struct gem_softc *sc) * The following value is for an OFF Threshold of about 3/4 full * and an ON Threshold of 1/4 full. */ - GEM_BANK1_WRITE_4(sc, GEM_RX_PAUSE_THRESH, + GEM_WRITE_4(sc, GEM_RX_PAUSE_THRESH, (3 * sc->sc_rxfifosize / 256) | ((sc->sc_rxfifosize / 256) << 12)); /* step 11. Configure Media. */ /* step 12. RX_MAC Configuration Register */ - v = GEM_BANK1_READ_4(sc, GEM_MAC_RX_CONFIG); + v = GEM_READ_4(sc, GEM_MAC_RX_CONFIG); v &= ~GEM_MAC_RX_ENABLE; v |= GEM_MAC_RX_STRIP_CRC; sc->sc_mac_rxcfg = v; @@ -1080,15 +1051,15 @@ gem_init_locked(struct gem_softc *sc) gem_setladrf(sc); /* step 13. TX_MAC Configuration Register */ - v = GEM_BANK1_READ_4(sc, GEM_MAC_TX_CONFIG); + v = GEM_READ_4(sc, GEM_MAC_TX_CONFIG); v |= GEM_MAC_TX_ENABLE; (void)gem_disable_tx(sc); - GEM_BANK1_WRITE_4(sc, GEM_MAC_TX_CONFIG, v); + GEM_WRITE_4(sc, GEM_MAC_TX_CONFIG, v); /* step 14. Issue Transmit Pending command. */ /* step 15. Give the receiver a swift kick. */ - GEM_BANK1_WRITE_4(sc, GEM_RX_KICK, GEM_NRXDESC - 4); + GEM_WRITE_4(sc, GEM_RX_KICK, GEM_NRXDESC - 4); if_setdrvflagbits(ifp, IFF_DRV_RUNNING, 0); if_setdrvflagbits(ifp, 0, IFF_DRV_OACTIVE); @@ -1190,16 +1161,13 @@ gem_load_txmbuf(struct gem_softc *sc, struct mbuf **m_head) CTR6(KTR_GEM, "%s: mapping seg %d (txd %d), len %lx, addr %#lx (%#lx)", __func__, seg, nexttx, txsegs[seg].ds_len, - txsegs[seg].ds_addr, - GEM_DMA_WRITE(sc, txsegs[seg].ds_addr)); + txsegs[seg].ds_addr, htole64(txsegs[seg].ds_addr)); #endif - sc->sc_txdescs[nexttx].gd_addr = - GEM_DMA_WRITE(sc, txsegs[seg].ds_addr); + sc->sc_txdescs[nexttx].gd_addr = htole64(txsegs[seg].ds_addr); KASSERT(txsegs[seg].ds_len < GEM_TD_BUFSIZE, ("%s: segment size too large!", __func__)); flags = txsegs[seg].ds_len & GEM_TD_BUFSIZE; - sc->sc_txdescs[nexttx].gd_flags = - GEM_DMA_WRITE(sc, flags | cflags); + sc->sc_txdescs[nexttx].gd_flags = htole64(flags | cflags); txs->txs_lastdesc = nexttx; } @@ -1209,7 +1177,7 @@ gem_load_txmbuf(struct gem_softc *sc, struct mbuf **m_head) __func__, seg, nexttx); #endif sc->sc_txdescs[txs->txs_lastdesc].gd_flags |= - GEM_DMA_WRITE(sc, GEM_TD_END_OF_PACKET); + htole64(GEM_TD_END_OF_PACKET); /* Lastly set SOP on the first descriptor. */ #ifdef GEM_DEBUG @@ -1219,11 +1187,10 @@ gem_load_txmbuf(struct gem_softc *sc, struct mbuf **m_head) if (++sc->sc_txwin > GEM_NTXSEGS * 2 / 3) { sc->sc_txwin = 0; sc->sc_txdescs[txs->txs_firstdesc].gd_flags |= - GEM_DMA_WRITE(sc, GEM_TD_INTERRUPT_ME | - GEM_TD_START_OF_PACKET); + htole64(GEM_TD_INTERRUPT_ME | GEM_TD_START_OF_PACKET); } else sc->sc_txdescs[txs->txs_firstdesc].gd_flags |= - GEM_DMA_WRITE(sc, GEM_TD_START_OF_PACKET); + htole64(GEM_TD_START_OF_PACKET); /* Sync the DMA map. */ bus_dmamap_sync(sc->sc_tdmatag, txs->txs_dmamap, @@ -1254,69 +1221,69 @@ gem_init_regs(struct gem_softc *sc) /* These registers are not cleared on reset. */ if ((sc->sc_flags & GEM_INITED) == 0) { /* magic values */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_IPG0, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_IPG1, 8); - GEM_BANK1_WRITE_4(sc, GEM_MAC_IPG2, 4); + GEM_WRITE_4(sc, GEM_MAC_IPG0, 0); + GEM_WRITE_4(sc, GEM_MAC_IPG1, 8); + GEM_WRITE_4(sc, GEM_MAC_IPG2, 4); /* min frame length */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_MAC_MIN_FRAME, ETHER_MIN_LEN); + GEM_WRITE_4(sc, GEM_MAC_MAC_MIN_FRAME, ETHER_MIN_LEN); /* max frame length and max burst size */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_MAC_MAX_FRAME, + GEM_WRITE_4(sc, GEM_MAC_MAC_MAX_FRAME, (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN) | (0x2000 << 16)); /* more magic values */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_PREAMBLE_LEN, 0x7); - GEM_BANK1_WRITE_4(sc, GEM_MAC_JAM_SIZE, 0x4); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ATTEMPT_LIMIT, 0x10); - GEM_BANK1_WRITE_4(sc, GEM_MAC_CONTROL_TYPE, 0x8808); + GEM_WRITE_4(sc, GEM_MAC_PREAMBLE_LEN, 0x7); + GEM_WRITE_4(sc, GEM_MAC_JAM_SIZE, 0x4); + GEM_WRITE_4(sc, GEM_MAC_ATTEMPT_LIMIT, 0x10); + GEM_WRITE_4(sc, GEM_MAC_CONTROL_TYPE, 0x8808); /* random number seed */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_RANDOM_SEED, + GEM_WRITE_4(sc, GEM_MAC_RANDOM_SEED, ((laddr[5] << 8) | laddr[4]) & 0x3ff); /* secondary MAC address: 0:0:0:0:0:0 */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR3, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR4, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR5, 0); + GEM_WRITE_4(sc, GEM_MAC_ADDR3, 0); + GEM_WRITE_4(sc, GEM_MAC_ADDR4, 0); + GEM_WRITE_4(sc, GEM_MAC_ADDR5, 0); /* MAC control address: 01:80:c2:00:00:01 */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR6, 0x0001); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR7, 0xc200); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR8, 0x0180); + GEM_WRITE_4(sc, GEM_MAC_ADDR6, 0x0001); + GEM_WRITE_4(sc, GEM_MAC_ADDR7, 0xc200); + GEM_WRITE_4(sc, GEM_MAC_ADDR8, 0x0180); /* MAC filter address: 0:0:0:0:0:0 */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR_FILTER0, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR_FILTER1, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR_FILTER2, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADR_FLT_MASK1_2, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADR_FLT_MASK0, 0); + GEM_WRITE_4(sc, GEM_MAC_ADDR_FILTER0, 0); + GEM_WRITE_4(sc, GEM_MAC_ADDR_FILTER1, 0); + GEM_WRITE_4(sc, GEM_MAC_ADDR_FILTER2, 0); + GEM_WRITE_4(sc, GEM_MAC_ADR_FLT_MASK1_2, 0); + GEM_WRITE_4(sc, GEM_MAC_ADR_FLT_MASK0, 0); sc->sc_flags |= GEM_INITED; } /* Counters need to be zeroed. */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_NORM_COLL_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_FIRST_COLL_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_EXCESS_COLL_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_LATE_COLL_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_DEFER_TMR_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_PEAK_ATTEMPTS, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_FRAME_COUNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_LEN_ERR_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_ALIGN_ERR, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_CRC_ERR_CNT, 0); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_CODE_VIOL, 0); + GEM_WRITE_4(sc, GEM_MAC_NORM_COLL_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_FIRST_COLL_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_EXCESS_COLL_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_LATE_COLL_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_DEFER_TMR_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_PEAK_ATTEMPTS, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_FRAME_COUNT, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_LEN_ERR_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_ALIGN_ERR, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_CRC_ERR_CNT, 0); + GEM_WRITE_4(sc, GEM_MAC_RX_CODE_VIOL, 0); /* Set XOFF PAUSE time. */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_SEND_PAUSE_CMD, 0x1BF0); + GEM_WRITE_4(sc, GEM_MAC_SEND_PAUSE_CMD, 0x1BF0); /* Set the station address. */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR0, (laddr[4] << 8) | laddr[5]); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR1, (laddr[2] << 8) | laddr[3]); - GEM_BANK1_WRITE_4(sc, GEM_MAC_ADDR2, (laddr[0] << 8) | laddr[1]); + GEM_WRITE_4(sc, GEM_MAC_ADDR0, (laddr[4] << 8) | laddr[5]); + GEM_WRITE_4(sc, GEM_MAC_ADDR1, (laddr[2] << 8) | laddr[3]); + GEM_WRITE_4(sc, GEM_MAC_ADDR2, (laddr[0] << 8) | laddr[1]); /* Enable MII outputs. */ - GEM_BANK1_WRITE_4(sc, GEM_MAC_XIF_CONFIG, GEM_MAC_XIF_TX_MII_ENA); + GEM_WRITE_4(sc, GEM_MAC_XIF_CONFIG, GEM_MAC_XIF_TX_MII_ENA); } static void @@ -1344,7 +1311,7 @@ gem_txkick(struct gem_softc *sc) device_get_name(sc->sc_dev), __func__, sc->sc_txnext); #endif GEM_CDSYNC(sc, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - GEM_BANK1_WRITE_4(sc, GEM_TX_KICK, sc->sc_txnext); + GEM_WRITE_4(sc, GEM_TX_KICK, sc->sc_txnext); } static void @@ -1433,10 +1400,10 @@ gem_tint(struct gem_softc *sc) for (i = txs->txs_firstdesc;; i = GEM_NEXTTX(i)) { printf("descriptor %d: ", i); printf("gd_flags: 0x%016llx\t", - (long long)GEM_DMA_READ(sc, + (long long)le64toh( sc->sc_txdescs[i].gd_flags)); printf("gd_addr: 0x%016llx\n", - (long long)GEM_DMA_READ(sc, + (long long)le64toh( sc->sc_txdescs[i].gd_addr)); if (i == txs->txs_lastdesc) break; @@ -1451,7 +1418,7 @@ gem_tint(struct gem_softc *sc) * GEM_TX_COMPLETION points to the last descriptor * processed + 1. */ - txlast = GEM_BANK1_READ_4(sc, GEM_TX_COMPLETION); + txlast = GEM_READ_4(sc, GEM_TX_COMPLETION); #ifdef GEM_DEBUG CTR4(KTR_GEM, "%s: txs->txs_firstdesc = %d, " "txs->txs_lastdesc = %d, txlast = %d", @@ -1492,10 +1459,10 @@ gem_tint(struct gem_softc *sc) #ifdef GEM_DEBUG CTR4(KTR_GEM, "%s: GEM_TX_STATE_MACHINE %x GEM_TX_DATA_PTR %llx " "GEM_TX_COMPLETION %x", - __func__, GEM_BANK1_READ_4(sc, GEM_TX_STATE_MACHINE), - ((long long)GEM_BANK1_READ_4(sc, GEM_TX_DATA_PTR_HI) << 32) | - GEM_BANK1_READ_4(sc, GEM_TX_DATA_PTR_LO), - GEM_BANK1_READ_4(sc, GEM_TX_COMPLETION)); + __func__, GEM_READ_4(sc, GEM_TX_STATE_MACHINE), + ((long long)GEM_READ_4(sc, GEM_TX_DATA_PTR_HI) << 32) | + GEM_READ_4(sc, GEM_TX_DATA_PTR_LO), + GEM_READ_4(sc, GEM_TX_COMPLETION)); #endif if (progress) { @@ -1551,7 +1518,7 @@ gem_rint(struct gem_softc *sc) * Read the completion register once. This limits * how long the following loop can execute. */ - rxcomp = GEM_BANK1_READ_4(sc, GEM_RX_COMPLETION); + rxcomp = GEM_READ_4(sc, GEM_RX_COMPLETION); #ifdef GEM_DEBUG CTR3(KTR_GEM, "%s: sc->sc_rxptr %d, complete %d", __func__, sc->sc_rxptr, rxcomp); @@ -1559,8 +1526,7 @@ gem_rint(struct gem_softc *sc) GEM_CDSYNC(sc, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); for (; sc->sc_rxptr != rxcomp;) { m = sc->sc_rxsoft[sc->sc_rxptr].rxs_mbuf; - rxstat = GEM_DMA_READ(sc, - sc->sc_rxdescs[sc->sc_rxptr].gd_flags); + rxstat = le64toh(sc->sc_rxdescs[sc->sc_rxptr].gd_flags); if (rxstat & GEM_RD_OWN) { #ifdef GEM_RINT_TIMEOUT @@ -1592,10 +1558,10 @@ gem_rint(struct gem_softc *sc) printf(" rxsoft %p descriptor %d: ", &sc->sc_rxsoft[sc->sc_rxptr], sc->sc_rxptr); printf("gd_flags: 0x%016llx\t", - (long long)GEM_DMA_READ(sc, + (long long)le64toh( sc->sc_rxdescs[sc->sc_rxptr].gd_flags)); printf("gd_addr: 0x%016llx\n", - (long long)GEM_DMA_READ(sc, + (long long)le64toh( sc->sc_rxdescs[sc->sc_rxptr].gd_addr)); } #endif @@ -1623,7 +1589,7 @@ gem_rint(struct gem_softc *sc) if ((sc->sc_rxptr % 4) == 0) { GEM_CDSYNC(sc, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - GEM_BANK1_WRITE_4(sc, GEM_RX_KICK, + GEM_WRITE_4(sc, GEM_RX_KICK, (sc->sc_rxptr + GEM_NRXDESC - 4) & GEM_NRXDESC_MASK); } @@ -1650,7 +1616,7 @@ gem_rint(struct gem_softc *sc) #ifdef GEM_DEBUG CTR3(KTR_GEM, "%s: done sc->sc_rxptr %d, complete %d", __func__, - sc->sc_rxptr, GEM_BANK1_READ_4(sc, GEM_RX_COMPLETION)); + sc->sc_rxptr, GEM_READ_4(sc, GEM_RX_COMPLETION)); #endif } @@ -1714,13 +1680,10 @@ gem_eint(struct gem_softc *sc, u_int status) device_printf(sc->sc_dev, "%s: status 0x%x", __func__, status); if ((status & GEM_INTR_BERR) != 0) { - if ((sc->sc_flags & GEM_PCI) != 0) - printf(", PCI bus error 0x%x\n", - GEM_BANK1_READ_4(sc, GEM_PCI_ERROR_STATUS)); - else - printf(", SBus error 0x%x\n", - GEM_BANK1_READ_4(sc, GEM_SBUS_STATUS)); + printf(", PCI bus error 0x%x", + GEM_READ_4(sc, GEM_PCI_ERROR_STATUS)); } + printf("\n"); } void @@ -1730,7 +1693,7 @@ gem_intr(void *v) uint32_t status, status2; GEM_LOCK(sc); - status = GEM_BANK1_READ_4(sc, GEM_STATUS); + status = GEM_READ_4(sc, GEM_STATUS); #ifdef GEM_DEBUG CTR4(KTR_GEM, "%s: %s: cplt %x, status %x", @@ -1742,14 +1705,14 @@ gem_intr(void *v) */ if ((status & GEM_INTR_PCS) != 0) { status2 = - GEM_BANK1_READ_4(sc, GEM_MII_INTERRUP_STATUS) | - GEM_BANK1_READ_4(sc, GEM_MII_INTERRUP_STATUS); + GEM_READ_4(sc, GEM_MII_INTERRUP_STATUS) | + GEM_READ_4(sc, GEM_MII_INTERRUP_STATUS); if ((status2 & GEM_MII_INTERRUP_LINK) != 0) device_printf(sc->sc_dev, "%s: PCS link status changed\n", __func__); } if ((status & GEM_MAC_CONTROL_STATUS) != 0) { - status2 = GEM_BANK1_READ_4(sc, GEM_MAC_CONTROL_STATUS); + status2 = GEM_READ_4(sc, GEM_MAC_CONTROL_STATUS); if ((status2 & GEM_MAC_PAUSED) != 0) device_printf(sc->sc_dev, "%s: PAUSE received (PAUSE time %d slots)\n", @@ -1776,7 +1739,7 @@ gem_intr(void *v) gem_tint(sc); if (__predict_false((status & GEM_INTR_TX_MAC) != 0)) { - status2 = GEM_BANK1_READ_4(sc, GEM_MAC_TX_STATUS); + status2 = GEM_READ_4(sc, GEM_MAC_TX_STATUS); if ((status2 & ~(GEM_MAC_TX_XMIT_DONE | GEM_MAC_TX_DEFER_EXP | GEM_MAC_TX_PEAK_EXP)) != 0) @@ -1790,12 +1753,12 @@ gem_intr(void *v) } } if (__predict_false((status & GEM_INTR_RX_MAC) != 0)) { - status2 = GEM_BANK1_READ_4(sc, GEM_MAC_RX_STATUS); + status2 = GEM_READ_4(sc, GEM_MAC_RX_STATUS); /* - * At least with GEM_SUN_GEM and some GEM_SUN_ERI - * revisions GEM_MAC_RX_OVERFLOW happen often due to a - * silicon bug so handle them silently. Moreover, it's - * likely that the receiver has hung so we reset it. + * At least with GEM_SUN_GEM revisions GEM_MAC_RX_OVERFLOW + * happen often due to a silicon bug so handle them silently. + * Moreover, it's likely that the receiver has hung so we + * reset it. */ if ((status2 & GEM_MAC_RX_OVERFLOW) != 0) { if_inc_counter(sc->sc_ifp, IFCOUNTER_IERRORS, 1); @@ -1818,14 +1781,14 @@ gem_watchdog(struct gem_softc *sc) #ifdef GEM_DEBUG CTR4(KTR_GEM, "%s: GEM_RX_CONFIG %x GEM_MAC_RX_STATUS %x GEM_MAC_RX_CONFIG %x", - __func__, GEM_BANK1_READ_4(sc, GEM_RX_CONFIG), - GEM_BANK1_READ_4(sc, GEM_MAC_RX_STATUS), - GEM_BANK1_READ_4(sc, GEM_MAC_RX_CONFIG)); + __func__, GEM_READ_4(sc, GEM_RX_CONFIG), + GEM_READ_4(sc, GEM_MAC_RX_STATUS), + GEM_READ_4(sc, GEM_MAC_RX_CONFIG)); CTR4(KTR_GEM, "%s: GEM_TX_CONFIG %x GEM_MAC_TX_STATUS %x GEM_MAC_TX_CONFIG %x", - __func__, GEM_BANK1_READ_4(sc, GEM_TX_CONFIG), - GEM_BANK1_READ_4(sc, GEM_MAC_TX_STATUS), - GEM_BANK1_READ_4(sc, GEM_MAC_TX_CONFIG)); + __func__, GEM_READ_4(sc, GEM_TX_CONFIG), + GEM_READ_4(sc, GEM_MAC_TX_STATUS), + GEM_READ_4(sc, GEM_MAC_TX_CONFIG)); #endif if (sc->sc_wdog_timer == 0 || --sc->sc_wdog_timer != 0) @@ -1849,9 +1812,9 @@ gem_mifinit(struct gem_softc *sc) { /* Configure the MIF in frame mode. */ - GEM_BANK1_WRITE_4(sc, GEM_MIF_CONFIG, - GEM_BANK1_READ_4(sc, GEM_MIF_CONFIG) & ~GEM_MIF_CONFIG_BB_ENA); - GEM_BANK1_BARRIER(sc, GEM_MIF_CONFIG, 4, + GEM_WRITE_4(sc, GEM_MIF_CONFIG, + GEM_READ_4(sc, GEM_MIF_CONFIG) & ~GEM_MIF_CONFIG_BB_ENA); + GEM_BARRIER(sc, GEM_MIF_CONFIG, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); } @@ -1905,7 +1868,7 @@ gem_mii_readreg(device_t dev, int phy, int reg) "%s: unhandled register %d\n", __func__, reg); return (0); } - return (GEM_BANK1_READ_4(sc, reg)); + return (GEM_READ_4(sc, reg)); } /* Construct the frame command. */ @@ -1913,12 +1876,12 @@ gem_mii_readreg(device_t dev, int phy, int reg) (phy << GEM_MIF_PHY_SHIFT) | (reg << GEM_MIF_REG_SHIFT); - GEM_BANK1_WRITE_4(sc, GEM_MIF_FRAME, v); - GEM_BANK1_BARRIER(sc, GEM_MIF_FRAME, 4, + GEM_WRITE_4(sc, GEM_MIF_FRAME, v); + GEM_BARRIER(sc, GEM_MIF_FRAME, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); for (n = 0; n < 100; n++) { DELAY(1); - v = GEM_BANK1_READ_4(sc, GEM_MIF_FRAME); + v = GEM_READ_4(sc, GEM_MIF_FRAME); if (v & GEM_MIF_FRAME_TA0) return (v & GEM_MIF_FRAME_DATA); } @@ -1948,28 +1911,28 @@ gem_mii_writereg(device_t dev, int phy, int reg, int val) reg = GEM_MII_CONTROL; if ((val & GEM_MII_CONTROL_RESET) == 0) break; - GEM_BANK1_WRITE_4(sc, GEM_MII_CONTROL, val); - GEM_BANK1_BARRIER(sc, GEM_MII_CONTROL, 4, + GEM_WRITE_4(sc, GEM_MII_CONTROL, val); + GEM_BARRIER(sc, GEM_MII_CONTROL, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); - if (!GEM_BANK1_BITWAIT(sc, GEM_MII_CONTROL, + if (!gem_bitwait(sc, GEM_MII_CONTROL, GEM_MII_CONTROL_RESET, 0)) device_printf(sc->sc_dev, "cannot reset PCS\n"); /* FALLTHROUGH */ case MII_ANAR: - GEM_BANK1_WRITE_4(sc, GEM_MII_CONFIG, 0); - GEM_BANK1_BARRIER(sc, GEM_MII_CONFIG, 4, + GEM_WRITE_4(sc, GEM_MII_CONFIG, 0); + GEM_BARRIER(sc, GEM_MII_CONFIG, 4, BUS_SPACE_BARRIER_WRITE); - GEM_BANK1_WRITE_4(sc, GEM_MII_ANAR, val); - GEM_BANK1_BARRIER(sc, GEM_MII_ANAR, 4, + GEM_WRITE_4(sc, GEM_MII_ANAR, val); + GEM_BARRIER(sc, GEM_MII_ANAR, 4, BUS_SPACE_BARRIER_WRITE); - GEM_BANK1_WRITE_4(sc, GEM_MII_SLINK_CONTROL, + GEM_WRITE_4(sc, GEM_MII_SLINK_CONTROL, GEM_MII_SLINK_LOOPBACK | GEM_MII_SLINK_EN_SYNC_D); - GEM_BANK1_BARRIER(sc, GEM_MII_SLINK_CONTROL, 4, + GEM_BARRIER(sc, GEM_MII_SLINK_CONTROL, 4, BUS_SPACE_BARRIER_WRITE); - GEM_BANK1_WRITE_4(sc, GEM_MII_CONFIG, + GEM_WRITE_4(sc, GEM_MII_CONFIG, GEM_MII_CONFIG_ENABLE); - GEM_BANK1_BARRIER(sc, GEM_MII_CONFIG, 4, + GEM_BARRIER(sc, GEM_MII_CONFIG, 4, BUS_SPACE_BARRIER_WRITE); return (0); case MII_ANLPAR: @@ -1980,8 +1943,8 @@ gem_mii_writereg(device_t dev, int phy, int reg, int val) "%s: unhandled register %d\n", __func__, reg); return (0); } - GEM_BANK1_WRITE_4(sc, reg, val); - GEM_BANK1_BARRIER(sc, reg, 4, + GEM_WRITE_4(sc, reg, val); + GEM_BARRIER(sc, reg, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); return (0); } @@ -1992,12 +1955,12 @@ gem_mii_writereg(device_t dev, int phy, int reg, int val) (reg << GEM_MIF_REG_SHIFT) | (val & GEM_MIF_FRAME_DATA); - GEM_BANK1_WRITE_4(sc, GEM_MIF_FRAME, v); - GEM_BANK1_BARRIER(sc, GEM_MIF_FRAME, 4, + GEM_WRITE_4(sc, GEM_MIF_FRAME, v); + GEM_BARRIER(sc, GEM_MIF_FRAME, 4, BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); for (n = 0; n < 100; n++) { DELAY(1); - v = GEM_BANK1_READ_4(sc, GEM_MIF_FRAME); + v = GEM_READ_4(sc, GEM_MIF_FRAME); if (v & GEM_MIF_FRAME_TA0) return (1); } @@ -2056,11 +2019,11 @@ gem_mii_statchg(device_t dev) txcfg |= GEM_MAC_TX_CARR_EXTEND; } (void)gem_disable_tx(sc); - GEM_BANK1_WRITE_4(sc, GEM_MAC_TX_CONFIG, txcfg); + GEM_WRITE_4(sc, GEM_MAC_TX_CONFIG, txcfg); (void)gem_disable_rx(sc); - GEM_BANK1_WRITE_4(sc, GEM_MAC_RX_CONFIG, rxcfg); + GEM_WRITE_4(sc, GEM_MAC_RX_CONFIG, rxcfg); - v = GEM_BANK1_READ_4(sc, GEM_MAC_CONTROL_CONFIG) & + v = GEM_READ_4(sc, GEM_MAC_CONTROL_CONFIG) & ~(GEM_MAC_CC_RX_PAUSE | GEM_MAC_CC_TX_PAUSE); if ((IFM_OPTIONS(sc->sc_mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0) @@ -2068,21 +2031,21 @@ gem_mii_statchg(device_t dev) if ((IFM_OPTIONS(sc->sc_mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0) v |= GEM_MAC_CC_TX_PAUSE; - GEM_BANK1_WRITE_4(sc, GEM_MAC_CONTROL_CONFIG, v); + GEM_WRITE_4(sc, GEM_MAC_CONTROL_CONFIG, v); if ((IFM_OPTIONS(sc->sc_mii->mii_media_active) & IFM_FDX) == 0 && gigabit != 0) *** 443 LINES SKIPPED *** From nobody Tue Apr 18 17:17: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 4Q19bY3c9Jz45NQ6; Tue, 18 Apr 2023 17:17: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 4Q19bY1Ksxz3vbQ; Tue, 18 Apr 2023 17:17:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zsklO6TqaPtaJDjJ42ST1MxGrxa8upxnVJwPjES9n2M=; b=ox8ZLFxIpFsZXp7b7BZ55F9aXGHIZ6rfUP8mKLWgmnyWRZhHuzoIh4mQQjPI0PNytNGRjs wi+Oz8uggpAKT69Shu/PNqBDu8Er06J2IaMJMiOgARxWzsP0pYy/5vKeqpf8FH/1lgylXu hDCZQBCnux6pcLUH3gbTSoxYBwnufKbzqHQ65aJVEBxZ//KUICqahXuCGyTtzsNijfMbfs xHUNVYBMQApiPXx4qqJDV/Sz6Kxpjuys0gCN3kHLGrxkiXI0rTAKBnGyvlbB3DxAcZLivX uP4nWB2avV35zefO8syz9iV/V0opq1jnzHSKvkpR/ikmrfAvs8uGlLCt3bRJFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zsklO6TqaPtaJDjJ42ST1MxGrxa8upxnVJwPjES9n2M=; b=Botm5uZd6KX6dODwpVDPIF7bkI62gYxSSzFpPP098X6qFNVnHfRfx0f2yz24jJhz5sUjG9 aojcPx4HPnUL+6WsAFOEkI7Y4t2N+PcImTH19IPaSXZL/gUHKZ0JaCzZ/hGNitEC9QCqcw 1ZT2HNSKT/azW/vsUANeaqXm8UG6pjLTTA6nkinfspgsuQBi2k2qD8rHODJds24RfS/YlR P05WcPbcUAWAzfL2pCUOwpdKgPIl+RVsSwlk+PMgrTx8v8dx1ho188U7H0wznhGiB18rdm krsS7k88VwrK9tbCdmrHAkxV1Pa0LYqW7VzooxMtseqQdg39lwHHAghfwPkw5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681838265; a=rsa-sha256; cv=none; b=Scbw3JEZINTNlJPWJ9lhaMFItmv/SLixbNyTGTNNe11hdJgwIl2LkxSYKs8m5AgEBbKxk8 /wl07s9bFzi6yaSCa6rZf8tjbG3TgpY8p4l45MeyObJym+QBNBpn+zDt6NOa6OJ4sQEEYh vyB/Bhhpks9RtLDkHdg8NzXZSQ06wduod4pF+UjLTxkDyUEnjANWC41qoeI2JdZt3+lX9u 4ZZL5pe4MvwZ3YPWNx30ASXxT8gTy7ehDWXOtPBJdoObu2UcPjt3WUQ44EMyi75Be1JerO y1YV3tU1wdnN++URaAKg+IaxV7R4IGXoyOd4h5GMeKer8/RQH4bCraYW7j8w4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q19bX6XJfzKmd; Tue, 18 Apr 2023 17:17: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 33IHHipE093953; Tue, 18 Apr 2023 17:17:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IHHi68093952; Tue, 18 Apr 2023 17:17:44 GMT (envelope-from git) Date: Tue, 18 Apr 2023 17:17:44 GMT Message-Id: <202304181717.33IHHi68093952@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: a12d60b99ee5 - main - cas.4: Remove remaining sparc64-specific bit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a12d60b99ee5a453e249adc8cf239117f50bd603 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by marius: URL: https://cgit.FreeBSD.org/src/commit/?id=a12d60b99ee5a453e249adc8cf239117f50bd603 commit a12d60b99ee5a453e249adc8cf239117f50bd603 Author: Marius Strobl AuthorDate: 2023-04-18 17:06:51 +0000 Commit: Marius Strobl CommitDate: 2023-04-18 17:17:24 +0000 cas.4: Remove remaining sparc64-specific bit This was missed in 702547720ca01437081fb1b6f9eb281c9541021b. --- share/man/man4/cas.4 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/share/man/man4/cas.4 b/share/man/man4/cas.4 index fa19cc33c2ab..03c3fcd57694 100644 --- a/share/man/man4/cas.4 +++ b/share/man/man4/cas.4 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2020 +.Dd April 18, 2023 .Dt CAS 4 .Os .Sh NAME @@ -50,8 +50,7 @@ if_cas_load="YES" The .Nm driver provides support for the Sun Cassini/Cassini+ and National -Semiconductor DP83065 Saturn Gigabit Ethernet controllers found -on-board in Sun UltraSPARC machines and as add-on cards. +Semiconductor DP83065 Saturn Gigabit Ethernet controllers. .Pp All controllers supported by the .Nm From nobody Tue Apr 18 17:18: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 4Q19c36YFsz45NQP; Tue, 18 Apr 2023 17:18: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 4Q19c364vyz3x27; Tue, 18 Apr 2023 17:18:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/Cz4BqOQHMHsJ8e6//FvR0P3Ab/JPF4otIR1DVWkiw=; b=P6UxPAeciEAmQ26hqdVoIj7ZaVt/x3b+sKC+S2h/2BYIC303J62hkVMJoshi5/YEAkP9GJ cvRwEg3EJEuEAHp72p2Kk2vgL8K5fFkUMqL4XKYNWF5mn3t6MwPXaePLFeZnhHkwSt7/B1 KA8/pWWLiXzkDoRT5gEJR1ixyrHt7Q+GcEEKOV+kfFKWeZ7529qc4gZfYzQhYwmBELSE7M GcgpQ1+iJCAXnK7bcYEJWHB9Ou+wZbDB8fAa42Cmw49wUQcSDm4OJ6NxxGn2ZaQK6TRV0s p7DdGr4zQBplOX1E50+FL/nIP2Qqa8g0yQYIbPjsIign0gIcg6rkNjNDOLdhVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681838291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X/Cz4BqOQHMHsJ8e6//FvR0P3Ab/JPF4otIR1DVWkiw=; b=XIAh4nhTHyEExsciKBTXt6tsAj7DuN/S8BFiO0OYzjg5k7SS8yYjg7JiUunEdeJdQeIApS XTdv48clogj7YBN2B4UrAiJX6XnHk02cmU1Q/cN0fN4VGK//AIERaJwmWVFNVjIbVKgBPU wJGuOV42PFeQCxRgZJScZkEqFbXKBmT6cqFTY3ZOHi5eOnn7sl8pGhg0ySQsxCbRsRrahL gNElDd2j+fkL2oRMKDsVGhRzdOUkjSekCaT4GhkHUI9fUhmOkf6oyYUkZTAy2gT/8RhjRF SDziUZhtLxjdh2F2HJCW9xrz5Qolcsx8XV6l6dW+PSoDGvME2q0J5VUJ6J68bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681838291; a=rsa-sha256; cv=none; b=X8werBAe4+PNU5r/n5sTwVgfAOOchmu09VbP41aiJrXcoOwwV7R5Qf5iER1bKwgtsEwnA2 7FIabViH7MOVSY7lKYn3Rw8fm84E53l5LSZI2LAI7XTDEh3tcgYQVlD5QVCwIAGGAMUc/N gaUJ66Uu8r12U/i7z//nFEzkzR0AIG6If1E4UP2uWQPBR/8p0wxepH65saM9NG7qnuasXD sqNU0a3PTMHI0o9VUxKD2nyjpJYZzhD0yGk65iM135YsUoubcj+NCXEHkn4lwbq17BCK8L h1TZbZdYZ2bYmqls615/paaZcibAdhWwC1ubpRqBhcvN+yMGWRAWHr624DT4Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q19c350h8zL42; Tue, 18 Apr 2023 17:18: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 33IHIBSV094150; Tue, 18 Apr 2023 17:18:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IHIBbu094149; Tue, 18 Apr 2023 17:18:11 GMT (envelope-from git) Date: Tue, 18 Apr 2023 17:18:11 GMT Message-Id: <202304181718.33IHIBbu094149@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 4e8b87afe008 - main - Handle errors if WARNS is not defined. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e8b87afe0085b893b85127f4b05610518d30a67 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=4e8b87afe0085b893b85127f4b05610518d30a67 commit 4e8b87afe0085b893b85127f4b05610518d30a67 Author: Steve Kiernan AuthorDate: 2023-01-16 23:41:20 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-18 17:18:01 +0000 Handle errors if WARNS is not defined. One conditional outside of ifdef WARNS did not protect against an unset WARNS. Default WARNS to 0 in conditional if not defined. Obtained from: Juniper Networks, Inc. --- share/mk/bsd.sys.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 8446b8eeae62..9d24c87d9eea 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -149,7 +149,7 @@ WFORMAT= 1 .if ${WFORMAT} > 0 #CWARNFLAGS+= -Wformat-nonliteral -Wformat-security -Wno-format-extra-args CWARNFLAGS+= -Wformat=2 -Wno-format-extra-args -.if ${WARNS} <= 3 +.if ${WARNS:U0} <= 3 CWARNFLAGS.clang+= -Wno-format-nonliteral .endif # WARNS <= 3 .if ${MK_WERROR} != "no" && ${MK_WERROR.${COMPILER_TYPE}:Uyes} != "no" From nobody Tue Apr 18 17:56: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 4Q1BSg59K1z45QVw; Tue, 18 Apr 2023 17:56:51 +0000 (UTC) (envelope-from jhb@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 4Q1BSf6gsjz3wcZ; Tue, 18 Apr 2023 17:56:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681840610; 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=X0dxTkv0+2mTvKzY3czO1GCp3Q736H5qWDNxRkJSBRA=; b=k6eJes+IGRlqNmQ4WlIXaQrQw/7qEWzh0ntWu3nkjypKVu4copyixhCT7q4kmTLM4g01mB PBXIgjPa5J/2x8ynY3RrvPuRqFR7O/zCKmwGcr6iWaCugM36KM1RsrwRkzs2ehnZXLbIWt AripwXHdW6SUrb9HFQ2pB6Z+mPOY5cPQ0r1y3/zTuGnLsxBqYnavY2q82ubMWo6yMx93Iq f48IpedL69tgPkPsYLD6dzWp46E5b8ErJL6ilmVsewDXfAwpwNZtaG8haFwVOXkl+eCgts DI88x+gZDd5/gfaveAxX00aHBS4+JLcl27Eo0UaIrxuA+YBLCDlx3O/a6oP2Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681840610; 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=X0dxTkv0+2mTvKzY3czO1GCp3Q736H5qWDNxRkJSBRA=; b=BCMtAQ086QO3A4Nr/sxFJFVkcPi6m/UJffSVbTWYxAaPhgknvpr65XshTrgpFxxqNcMgdw GymS1Vk/CN8pzxlIHNf2GJGemu0NnpWvWahnxvOdDEyoqQY7S5IpgazPjdg1PUsbn94Iez ddWsT/iD7yfrB/VqBDfIm9QszX17u1vLdfVapH1/Jg9DOxK87V2a5XzVSW1o2dMf6rNrTp WsOXrJbNmpsRjZwfr7eLl/cMPxBXjG9s02nEyXMREXNsq3hIylei9DmocXJqrhX2ts5VT6 pe9Qao1jlO53CxxLaDq4dvmBSSlmy2aYLnP5rTLZaxg1KNBR5hF7zgPfMdZESg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681840610; a=rsa-sha256; cv=none; b=B8llbGHfvGNSQBqT0xqW/cb65Bjpk157M+HP3f9bMpB5UVoPFioGExO4unidzEq03HLslW MMvhNm+EH2VdQnmn7WaT3B6d2+GPY27GJ/hplJZVnKjlxjH7fklKgiNwnayVAYYAlNANlF yQkVBE54EH2CpPHGky14W0H/Wksh665XS3derr+2H54PMClBTty9JMTDpA0FaqLSQOHEzP N3PgVpwoF8LywR33eoladxDouVWMYwQrp5YVpGwv5+EpkRFPKnszdpam541TuAuKMWcYvc zk181kaJIuK0oJ8dTP3S/IunnJHCrheoaY326uh6hFzGplhUmbTJ4JHONBY1yw== Received: from [IPV6:2601:648:8680:16b0:f507:782d:159f:3068] (unknown [IPv6:2601:648:8680:16b0:f507:782d:159f:3068]) (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 4Q1BSf1QJvz19C2; Tue, 18 Apr 2023 17:56:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 18 Apr 2023 10:56:49 -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.10.0 Subject: Re: git: b12ccd0bb1b3 - main - stand: Remove double words in source code comments Content-Language: en-US To: Alexey Dokuchaev , Gordon Bergling Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202304180515.33I5FKdK006761@gitrepo.freebsd.org> <5B4D966A-896A-4C77-97CD-1594B9C79B42@freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 4/17/23 11:59 PM, Alexey Dokuchaev wrote: > On Tue, Apr 18, 2023 at 08:12:51AM +0200, Gordon Bergling wrote: >> On Tue, Apr 18, 2023 at 06:31:28AM +0100, Jessica Clarke wrote: >>> On 18 Apr 2023, at 06:15, Gordon Bergling wrote: >> [...] >>>> --- a/stand/i386/boot0/Makefile >>>> +++ b/stand/i386/boot0/Makefile >>>> @@ -36,7 +36,7 @@ BOOT_BOOT0_FLAGS?= 0x8f >>>> # 0xb6 (182d) corresponds to 10 seconds. >>>> BOOT_BOOT0_TICKS?= 0xb6 >>>> >>>> -# The base address that we the boot0 code to to run it. Don't change this >>>> +# The base address that we the boot0 code to run it. Don't change this >>> >>> This was correct and is now incorrect; read as "that we [load] the >>> boot0 code to in order to run it". >> >> I just reverted the change. Sorry, not a native speaker on this side >> and the sentence was a little hard to understand. > > This reminds me of the situation with commit 8ca67bf1273 which jrtc27@ > pointed out was wrong, so I'd say again that comments like this should > be rephrased: these consequent double words make it hard to understand > and just begging for someone to try to "fix" it again in the future. Yes, I'll try to reword it. Gordon, your second change here was correct (the double "value") and you should go ahead and re-do that one. -- John Baldwin From nobody Tue Apr 18 18:04: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 4Q1BdK3YjSz45RHj; Tue, 18 Apr 2023 18:04: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 4Q1BdK35vtz45wN; Tue, 18 Apr 2023 18:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681841061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WKxwbSjAOrESi2gqaw890ZifdO5Ek//9u0LS8QjDT8Y=; b=K45e3Bd/Mf1hS1sjf0MYuEWO1phv9T3EQUrZbEpmMeu+6aYhC/fp47oVf9c7Tlp7yqLd50 ggNYiY/C9OI0/clCGs5WN52jHW1twqEwIleV6c93LJX0ec3pcgF0AZmXfOPBNS9vC5AI6R siESS5qA509CJaMaBdzNl/qEehTcvM2R1LyYO3cRPLRkR46eP+L/v8+baEuJSs8I33n/ZY vi34BQKKy1UVTucdDot8ZqeFFj4gVGHSDP+6KOIPCooEDK6mupEpUAaSASXyNIFGKm8KZo 2aw/gsvyBxh+xPKOWiFeJPxgiW+G64+5b84MZQEoyLjYrvWXn4A92U5qHE4osA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681841061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WKxwbSjAOrESi2gqaw890ZifdO5Ek//9u0LS8QjDT8Y=; b=d/DcjLdHrMIPlML0c6sYZQhKd7yhti54tCnVF0VeC4clhBHzHsUuu+tpkI5mYV3nA+Im0V U3oQVtgUunprypGvymPByXGVw3iO1UIvv4PU0bs9vtDAWusPSJpezLdIpVz/3nSd44uygL QZzH5P4XRa7tR2AF91SM0X1QGPB7YKhVy4PSDBzriCkkcOA7XOy5qQv5nsrrxDLTnn+JZ1 JvUg4mrs1KcIyNmiTitlK28MnctqA/gj86kn817nYghRQwj+21Sjoi5zXAghY5gGaHH0TH 4H6IQg3YekKSCz9YQy0fPYoO/WTDepiO0vwIKXOfiQoTtL0Z9bsMYSm/2bkzYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681841061; a=rsa-sha256; cv=none; b=X1iRK0GVmy1M94dNO15jGkoqn8HHoVNvTRgIMzuz6Xzr/MNu+43/wqPOiBHiNwJTV2Ge7P 1mX/TXmFFK0c98TqL6ZS+knDqb5QF8sC1v88l/QE703J+zccN/NLbBfq3vhL2L3Xlk+7Al b4nLt9OPYUdrboHefRoCRbu3+LZIQhQIFP6V2zJqgJFpk/CwWoWiLXDDVUO3ct0aDjO3ae b0I01vM8XG4BLH6fAm9Z0O8JLH/elk7nlrwF4bu2kM9EqhGQqNYl9r/cMJ4dck3va3EpM0 ym2kMyH2z0Xly5weezZQZ3pWu5VS7joa8TyvQHuElaWEFl0xOLaBMBmIXTrj3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1BdK297kzMm0; Tue, 18 Apr 2023 18:04: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 33II4L7V076569; Tue, 18 Apr 2023 18:04:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33II4Lfn076568; Tue, 18 Apr 2023 18:04:21 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:04:21 GMT Message-Id: <202304181804.33II4Lfn076568@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: bd5dc94b998f - main - boot0: Expand the description of BOOT_BOOT0_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=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: bd5dc94b998fe9ea0cd2ce9fcaf8481465b95b27 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bd5dc94b998fe9ea0cd2ce9fcaf8481465b95b27 commit bd5dc94b998fe9ea0cd2ce9fcaf8481465b95b27 Author: John Baldwin AuthorDate: 2023-04-18 18:02:50 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:02:50 +0000 boot0: Expand the description of BOOT_BOOT0_ORG. This really shouldn't even be an option given it is hardcoded as a constant named ORIGIN in the assembly. mbr.S also uses 0x600 and hardcodes it in both the assembly and the Makefile. --- stand/i386/boot0/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stand/i386/boot0/Makefile b/stand/i386/boot0/Makefile index 1453f17751b9..cd645011b8e7 100644 --- a/stand/i386/boot0/Makefile +++ b/stand/i386/boot0/Makefile @@ -36,8 +36,11 @@ BOOT_BOOT0_FLAGS?= 0x8f # 0xb6 (182d) corresponds to 10 seconds. BOOT_BOOT0_TICKS?= 0xb6 -# The base address that we the boot0 code to to run it. Don't change this -# unless you are glutton for punishment. +# The BIOS loads boot0 to the hardcoded address 0x7c00. boot0 copies +# itself to this alternate base address before continuing execution so +# that next level boot blocks can be loaded at the 0x7c00 address they +# expect. Don't change this unless you are glutton for punishment +# (and fix ORIGIN in the source to match). BOOT_BOOT0_ORG?= 0x600 ORG=${BOOT_BOOT0_ORG} From nobody Tue Apr 18 18:06: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 4Q1Bgw2vcgz45RYP; Tue, 18 Apr 2023 18:06: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 4Q1Bgw1jVvz4735; Tue, 18 Apr 2023 18:06:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681841196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9AxW6ttL+ztj7qg78LWieGDIdb2bJ71IDOEjYnOUJo=; b=YuBPB7E4jLgzqRZhwdolqfuwymRUixaFVLvUxGiTmGv9lDq/GTiCKvZRnqSlb2xkijwyEE vlZPOQfrA42geTXS8DvzVdTsvOhzgaz2BmbnG8BkG4096wr8fpuqhe7QI44bb5bu2yVFMc N2m6n3T3IoK1M2SHz7WldRsjD/FFX/u+zor3/MZlN//ju6wtVEpHIY+3+8rygVJWLIP0e1 RVdCFEuFTdYOVGibFApqvknDFja2hqQWNXNahiajP7NZVdGz1qfjAqJRYGty+m4S5Rb72u UXhl4kPQxapsj+NxOf2Vnpv/Y5JXhrdh3brJIqKcpk0lSpmihs7ZyeOX4O6rHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681841196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9AxW6ttL+ztj7qg78LWieGDIdb2bJ71IDOEjYnOUJo=; b=mvLyvGsv6UTxXfRTpazfhcljIQ3/3WgGf49fXZcS4E9+vf3zvOZZZ4hbE6VVJgSo+HkiHq 9jCaZiogk10DWdI6tGCJDE53iXUxh4zBpF9h2XLj0muEPeMOJPOKyLPVYb0fE/Quh2Gvhs 6EVO1m9zhJEz69GS0p2avLbrsBrIQTt2DcOMV4wC9QLhU2HNTA9HLocwsIbXlH0sOPsUl5 ICZ8j0vlntVT7oBQKMpsoV3a1VvHQHMEc/c6casdpo84ePo0CpbzyF07OmxdsKEkxdh00K jYIDzaJi0noMG8GysPiMSKjjhAwi6DvyGTYACDMtXR+QBS7O5mvZYCdnRPhEAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681841196; a=rsa-sha256; cv=none; b=dSlfgJfaaG9QytMCZLIOkjB5PL7DsjkAa8sMHZEzzvFW9MtvbzCJAoC56vvd33yXfUzHBt h9pY1Olz65vBGAyJblGgzUP/X1K5bHkAwo1szJQ7aQFFm3Cyi+8oRzGyKtgThPDhUgBhHC j3e2tg8u1Tdy8zM6h4uYF6PPnvW+JAx2oYg7M1//U8I1FKl2GwgjFT9CiTtOJ3URyhw4p6 UjltOw4LVg4tVx61KV69CgrbLrzUTYYZ6pxhyGGEtwBkBJrQ10lr74Aq274pt488yNPSpI 0lLUvsZVT0CHBQzg8wR5nP5eN9N8qFcrERtFWkqyvlbtqnm67K6Ap0iJahLfpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Bgw0nf6zMZp; Tue, 18 Apr 2023 18:06: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 33II6a5a076979; Tue, 18 Apr 2023 18:06:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33II6aAi076978; Tue, 18 Apr 2023 18:06:36 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:06:36 GMT Message-Id: <202304181806.33II6aAi076978@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: 5e954b9216ed - main - tmpfs: add missing vop_fplookup ops to tmpfs_fifoop_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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e954b9216ed94f66c74ef55622e0a8fe18d805a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5e954b9216ed94f66c74ef55622e0a8fe18d805a commit 5e954b9216ed94f66c74ef55622e0a8fe18d805a Author: Mateusz Guzik AuthorDate: 2023-04-18 18:04:16 +0000 Commit: Mateusz Guzik CommitDate: 2023-04-18 18:06:30 +0000 tmpfs: add missing vop_fplookup ops to tmpfs_fifoop_entries Reported by: gbe PR: 270917 --- sys/fs/tmpfs/tmpfs_fifoops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/tmpfs/tmpfs_fifoops.c b/sys/fs/tmpfs/tmpfs_fifoops.c index ac8b0738c4c7..08a15aa85fc9 100644 --- a/sys/fs/tmpfs/tmpfs_fifoops.c +++ b/sys/fs/tmpfs/tmpfs_fifoops.c @@ -74,5 +74,7 @@ struct vop_vector tmpfs_fifoop_entries = { .vop_pathconf = tmpfs_pathconf, .vop_print = tmpfs_print, .vop_add_writecount = vop_stdadd_writecount_nomsync, + .vop_fplookup_vexec = VOP_EAGAIN, + .vop_fplookup_symlink = VOP_EAGAIN, }; VFS_VOP_VECTOR_REGISTER(tmpfs_fifoop_entries); From nobody Tue Apr 18 18:19: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 4Q1Byp1bBhz45T5d; Tue, 18 Apr 2023 18:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1Byl706qz3PR3; Tue, 18 Apr 2023 18:19:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681841968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2S+exAiy48Nr3Z2xzMdj3n+Pw6ny7yHPiks16B6f3C0=; b=jSCyxJK4z+ZQdFs//oUEUWrYRhRJyXpM7E7M3wmVr0wac5hK39X0OMkYfXVQFjN22cL+4p Futy3I2gjM8jZAeC/SFkcYLOH+MOa69IK5iFVjBm33WUzweH7OqaVgjJBiDtooS1zWYdyl CAq2qecbu2EBGAKROMdDlJs2y1OL655RrXGACLQM8hBbYK6/jsD2JINza0C9YIa3w6geiR 19ELzXsZdteVdxG2uIzrTtt6qoVebrOD9rzUZHYx5t6l9UuqO1Eu+ayWsb9LUvi1CoyNwV Po9bSJgKwwDoHepLhZTb6RorCWdUTRdBP8AzOXpSX+V9dsIGXOm3gvjl3zbzRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681841968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2S+exAiy48Nr3Z2xzMdj3n+Pw6ny7yHPiks16B6f3C0=; b=w0Jg8i30IBgqqXFNE5kviXC/T+vdd7bAICkV+wyLBHCuM5Nmb9ZdAyPou8Hx7kEeMJmwk0 CNBw9Uu8ssxue5ra3G0CqWIXSZQAWaTTIQ9jkfRHr9ecSbKVb+Ij1Ox+SkRENTKc+PBI7n 6yuo5JH6iV/zbjKeS4bxM5JpDpxiD/FuSvS35Lqktql/ibse/0Sa/+KDyZl8Whs+f2BtLj yy5DMG0Pt9qJb8decDAtWv3Ti/w8PgozwUC3nP3TBc9EVObz44yekVX0vyk2Px9gkTNeJI ZKosQuu6CaC7ce5WwaTwJV2L6QrVnkFVCGOGXScaEoLo0S5OEt68hZcVT89kZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681841968; a=rsa-sha256; cv=none; b=UHKc1MQYqxdq9Ief17Pq2QDeOcrVA2lSk91bO8uOMjsrM1PZz4pYp3NAn2J8o36i1w60/I RwxnUPY4rwJ+gPx2t1kScJJDHXyXrptwqK08hjEaIyNODcCuaP/lQzsWoZBFjolZ9X37V1 92O8ifIHXNmKhHNh0we3wc1CRZ9hA4LoeTJm2ipc3srpwHYIxXYeLLpVZF02lnG2bISwns WaT23obEwIEuFKnjILJlwh/ktjssdzEm+4rsKZkQlKnTD36i46b62BCVoi4pvQBZicjoS/ qxhahNktsizBHyZCmZgB2XMCiNfsaiGNDZLa2kdOpYply+F0vv3QIELB+P9hmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Byh5XHjzMn1; Tue, 18 Apr 2023 18:19: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 33IIJOfT097635; Tue, 18 Apr 2023 18:19:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIJOYQ097634; Tue, 18 Apr 2023 18:19:24 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:19:24 GMT Message-Id: <202304181819.33IIJOYQ097634@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: c7f3674fb065 - main - boot0: Drop the BOOT_BOOT0_ORG 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7f3674fb0651753b85f59b2afb7b9098533334d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c7f3674fb0651753b85f59b2afb7b9098533334d commit c7f3674fb0651753b85f59b2afb7b9098533334d Author: John Baldwin AuthorDate: 2023-04-18 18:17:13 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:19:12 +0000 boot0: Drop the BOOT_BOOT0_ORG option. This shouldn't be an option (and I added it in the first place back in 4ae4202e705cf6a12aa3cbb49efb153879a6bc2f and 83f4b92050cbf8913d5c0aac16726c783d8b2d9c). However, unlike the other knobs I added back then, this really shouldn't be a knob since it is hardcoded in the source. --- stand/i386/boot0/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stand/i386/boot0/Makefile b/stand/i386/boot0/Makefile index cd645011b8e7..5e82d7b6ae67 100644 --- a/stand/i386/boot0/Makefile +++ b/stand/i386/boot0/Makefile @@ -39,10 +39,8 @@ BOOT_BOOT0_TICKS?= 0xb6 # The BIOS loads boot0 to the hardcoded address 0x7c00. boot0 copies # itself to this alternate base address before continuing execution so # that next level boot blocks can be loaded at the 0x7c00 address they -# expect. Don't change this unless you are glutton for punishment -# (and fix ORIGIN in the source to match). -BOOT_BOOT0_ORG?= 0x600 -ORG=${BOOT_BOOT0_ORG} +# expect. +ORG= 0x600 # Comm settings for boot0sio. # From nobody Tue Apr 18 18:31: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 4Q1CDZ1JL8z45Tg1; Tue, 18 Apr 2023 18:31: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 4Q1CDY2ZS8z415P; Tue, 18 Apr 2023 18:31:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQtOCRVflj0Em1AZD5T3Nh4/KTCJH4Cf3sN5dnX7xBU=; b=typ1U7xJgXkHUkGb0AnDKC/Zr81Y8HMskoDNfn7Kjk5bsm+cypF8ZWvS+Qg6oMv7C59LL/ Bhwb8tXsICbOSnkE0pASlDySuBkwuCTwj9BVoZ/8LBg6R/OA3fkh+Jk79Fl9A5OeQBbKDP 8LxEWa8E3WFeYQ3jmUMXbBxV7fFhN1dI1nzOpkzzVHA6uSPOOuqR7CPtaWwhiyZi5hwcJV dyGUcS1TxiD2HIs35fHFfsN3992UpUi/jQ4sYy9fyu58voZPk8zaYi3zmOuNoKpYgea5PL Jd1yUl5NnmBca0HoIgcn9kAu0Jwdg133dIVFKW10lSDLtFzQlT+7JTjJAU8QlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQtOCRVflj0Em1AZD5T3Nh4/KTCJH4Cf3sN5dnX7xBU=; b=yb23HqzmhmCE1unliZdPwJK5ZzRxLpEdbCnBMHxv7WfRkzPYdJ4ZeFYdszshOHu4ISJNOB 2FGiBT4VRykTxVOTxn1YpluweqZFFi1XLA9mXtCjiLgHMpOF7helj5+2YNXBkNou7s9c6A qsZo6U3WE5eytlJFMkY95IH9KLKZIkecM0QCfYOn5UiLrlbStmEQqGD8VDkfimyiQWLwLJ Uu96n6qUW938LHu91UayS/qbfYOIIULG4pM2708e0A5+9OzUFxaazW7C5uo7wkKkLWwFAZ fymoQbrwWtn2ZsqF59VmKev1H2gmV0t1BT83x43DiOANK+h6XIWrXYopj5BBlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842685; a=rsa-sha256; cv=none; b=Luimd0GihzI7zHENx4D5hxKxOW3Azo/1Tjl+dIx03Y9uwqVHiR5hQhyWfv7xKFQXvAfb75 iPDQUnJMSFaqap8doV1MGNhnokyOePUJxQYItRpMYOH3vQS1QELIXIKl/QQwhwOWfjUhKJ fVumJ57HQxxwfdiXJ+1EIwaWlJqf8zhcG9WnDSX2cEmNUFj+jppdEIPuGDPlIiLYna6oJS BLQMbbJA6S9HsqLMvMgXWx//VvRfzHVLJODQ19hevToQxzf4oiO7/gQjDmRKRro7q/33Pj b/4sLOqPeGpBrPRGuKoevLOL9XlXyypJFVfOqz2JcYboVvA/uIFwY384zmPZIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDY1h6WzNQd; Tue, 18 Apr 2023 18:31: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 33IIVPuL026496; Tue, 18 Apr 2023 18:31:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVPLd026495; Tue, 18 Apr 2023 18:31:25 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:25 GMT Message-Id: <202304181831.33IIVPLd026495@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: 525438ea7147 - main - sendmail: Silence -Wdeprecated-non-prototype 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 525438ea714724e210fa3a1c041cc05e0b9c2756 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=525438ea714724e210fa3a1c041cc05e0b9c2756 commit 525438ea714724e210fa3a1c041cc05e0b9c2756 Author: John Baldwin AuthorDate: 2023-04-18 18:19:48 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:19:48 +0000 sendmail: Silence -Wdeprecated-non-prototype warnings. These will hopefully be fixed upstream eventually, but silence the warnings until then. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39518 --- bin/rmail/Makefile | 2 ++ lib/libsm/Makefile | 2 ++ lib/libsmdb/Makefile | 2 ++ lib/libsmutil/Makefile | 2 ++ libexec/mail.local/Makefile | 2 ++ libexec/smrsh/Makefile | 2 ++ usr.bin/vacation/Makefile | 2 ++ usr.sbin/editmap/Makefile | 2 ++ usr.sbin/mailstats/Makefile | 2 ++ usr.sbin/makemap/Makefile | 2 ++ usr.sbin/praliases/Makefile | 2 ++ 11 files changed, 22 insertions(+) diff --git a/bin/rmail/Makefile b/bin/rmail/Makefile index 21f3ceb16582..913d9fdc4d82 100644 --- a/bin/rmail/Makefile +++ b/bin/rmail/Makefile @@ -34,3 +34,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/lib/libsm/Makefile b/lib/libsm/Makefile index eed69cecbf0f..7c13939bb6a7 100644 --- a/lib/libsm/Makefile +++ b/lib/libsm/Makefile @@ -42,3 +42,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/lib/libsmdb/Makefile b/lib/libsmdb/Makefile index 893e3d173a08..5dff6b572d1d 100644 --- a/lib/libsmdb/Makefile +++ b/lib/libsmdb/Makefile @@ -24,3 +24,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/lib/libsmutil/Makefile b/lib/libsmutil/Makefile index 7bbd21e21bbb..4274a8470f46 100644 --- a/lib/libsmutil/Makefile +++ b/lib/libsmutil/Makefile @@ -31,3 +31,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/libexec/mail.local/Makefile b/libexec/mail.local/Makefile index a642326228b2..3e6d61d001fc 100644 --- a/libexec/mail.local/Makefile +++ b/libexec/mail.local/Makefile @@ -28,3 +28,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/libexec/smrsh/Makefile b/libexec/smrsh/Makefile index dc4f7c210695..1cc98e1bb488 100644 --- a/libexec/smrsh/Makefile +++ b/libexec/smrsh/Makefile @@ -27,3 +27,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/usr.bin/vacation/Makefile b/usr.bin/vacation/Makefile index ae3372f46fcd..5a99e8a2ac0a 100644 --- a/usr.bin/vacation/Makefile +++ b/usr.bin/vacation/Makefile @@ -26,3 +26,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/usr.sbin/editmap/Makefile b/usr.sbin/editmap/Makefile index 04ce398f2d51..8a490d9cfdc8 100644 --- a/usr.sbin/editmap/Makefile +++ b/usr.sbin/editmap/Makefile @@ -27,3 +27,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/usr.sbin/mailstats/Makefile b/usr.sbin/mailstats/Makefile index b8dd89225551..c0d8bfe3d078 100644 --- a/usr.sbin/mailstats/Makefile +++ b/usr.sbin/mailstats/Makefile @@ -28,3 +28,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/usr.sbin/makemap/Makefile b/usr.sbin/makemap/Makefile index 2477060b7937..ed89eadabbfc 100644 --- a/usr.sbin/makemap/Makefile +++ b/usr.sbin/makemap/Makefile @@ -28,3 +28,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/usr.sbin/praliases/Makefile b/usr.sbin/praliases/Makefile index fbef36565bda..7400ab94430b 100644 --- a/usr.sbin/praliases/Makefile +++ b/usr.sbin/praliases/Makefile @@ -28,3 +28,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} From nobody Tue Apr 18 18:31: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 4Q1CDZ5KJpz45TWr; Tue, 18 Apr 2023 18:31: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 4Q1CDZ42Ttz415c; Tue, 18 Apr 2023 18:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kyofPzCCxHDpYunLb5YS6P4bsU+hHIpWJRybMBRTdow=; b=YV9Zb2N00Bb4FPUoYaHVTITJzNykChomFkWbbKNT9r1O0PvUZqj2cUnsdY39v3/3JsYTHG XBygNPWL12YckFTTBCfEibJ6HO9Rxi9vvcQP9T8JGXSNdIOFkYTc01HMnM7Z5dXdEUAi21 dFUmCJ8T4LAIXslxNbbpzpt2JJlzNAKNnqTQOe6aKK6eb6/yitPxeRA6Sb+P9RqnVhw1T0 fV3CJ0nhXYKsqY1S++d/4D8S2MQ2YQD8u+Wa7U8waXPOM4XksCnbp3RM7NQsJOefsRs5r9 nweyXHuIHpYaPO4Vluy+JmQTer02T+x3aCWG8J93mZZi94yFr1LXSkA09F94xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kyofPzCCxHDpYunLb5YS6P4bsU+hHIpWJRybMBRTdow=; b=tfGqeTpGzOd1U/UakMHIEN7hpbDNuiYhjHcBRotezNshg6ExYIXjmuO6XAYddkNdncEi5n sZXBligH2l7dGDSfu62OXQUidxb8maLDIN2U/zj1lOQYXQeFLYMY9jpZrYqD+w+r3NpI4C DH/sG0+BDaR8H9z29QXDdu81JRglYAkHL1JEj/nYEcbkgP37MoEnV/VMIBSXAUQ4dBWms/ SPKrXnK8PolQzgaSEaM9YhAjpgPFvZFSO9bakLRNEYRevwqlT/vEFgg8WCuJ5I2b116j37 yHYusLemmo99bPsemWWmDEpiDKsH8mebwXT2E1s6dfiy304rNQxpRWyIUGak2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842686; a=rsa-sha256; cv=none; b=e1Oauv/qrr7gwXbzIP0k1MBqcfwVsfmvcdYaOPPEzyMf4qlFvmsA/E7nUbce4tQIJQm2mN IUAFXupJJJ/VnZc+sQheIgMYMTXUXRRyzzK7a9YQotJy4ERr6PauP9k2TTiTzPs9Ri+pYC sYSM5y+ZYfIEGG2uqVkm4lZ++TvZV5mkrhayZ0l1kVdyUZwqypLnOIYa8/wyJ30GQMyLt/ DzYmniFiJl71CDhhlht8iwIdxky/1/YA4SocnKo26a+bgBqwkiltya1TCk8gsb4VSfEigy PJAWN8BRRsaLCAPp7zfhpTGZ1T2NWTkThbQuKFSGlqxzRG4Oee4G45+mD1P/mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDZ2rPVzND8; Tue, 18 Apr 2023 18:31: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 33IIVQOn026516; Tue, 18 Apr 2023 18:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVQRw026515; Tue, 18 Apr 2023 18:31:26 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:26 GMT Message-Id: <202304181831.33IIVQRw026515@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: f6fd5356b3fc - main - smbfs: Use C89 function definition for cf_getopt. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f6fd5356b3fc71467b9e110d683241f25424f97c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f6fd5356b3fc71467b9e110d683241f25424f97c commit f6fd5356b3fc71467b9e110d683241f25424f97c Author: John Baldwin AuthorDate: 2023-04-18 18:20:43 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:20:43 +0000 smbfs: Use C89 function definition for cf_getopt. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39519 --- contrib/smbfs/lib/smb/cfopt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/smbfs/lib/smb/cfopt.c b/contrib/smbfs/lib/smb/cfopt.c index 5328b2ff52fb..55d042d62007 100644 --- a/contrib/smbfs/lib/smb/cfopt.c +++ b/contrib/smbfs/lib/smb/cfopt.c @@ -51,10 +51,7 @@ const char* cf_optarg; /* argument associated with option */ #define EMSG "" int -cf_getopt(nargc, nargv, ostr) - int nargc; - char * const *nargv; - const char *ostr; +cf_getopt(int nargc, char * const *nargv, const char *ostr) { static const char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ From nobody Tue Apr 18 18:31: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 4Q1CDb5cSfz45Trs; Tue, 18 Apr 2023 18:31: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 4Q1CDb4kVyz41PD; Tue, 18 Apr 2023 18:31:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fO3NgbalIPRRAXXlsT6CLzi/PdvpCKQPSn0+dnbgZa0=; b=V21J2SxuhHnpv4mkULymZE/DG4lMk/ktmxvFGMAnd3yci8ffEP2DcscaxuC5xowk7AlTwm gle1RgiVu8SKfU7gllDcpfMckA+HF4oOjJeRJmJs1k4rzuP3fYUWxuGbhfOY8UalPZU88x L1bMd3VCouSAFlSbAoEiZsY2relp4f7cxpTmZA8JdEvQ939RzGj//GQ09b5LO+hEZcH1CN SnwwQPTJE/02ySAVdsuLS5e7wPzXQ5kniPkP8hc3ROeYshMyQ5nI6lTVS7jDfb3IcP+HBr REIr/EoAvq8IEeyrYKFyKQGoEtxblwGt2Lc0wsIPE/XCLHv2tIzeCGT7fMj4eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fO3NgbalIPRRAXXlsT6CLzi/PdvpCKQPSn0+dnbgZa0=; b=w7IPiEoLP0RVyKSXe9jctoZnAZ6p8BK9gB5uGw10KVcMA3c7sk8kJvIjRTXP2pTr58sXlF k/cpp07NGVtO7tK94v/rFvX8nE7syOWHiruuvO89UjxINoBHQ/KRpu4cKJCuzPqeqJg3tT 5YB8aslwKB0OzZxf1QWBf2AC3kXe8sFD+sLqoXBtGoIv0eWY0z/HMERjywU6LwAgxUOBeO 8URlYA6fh+SW9dX7pCB5SESNT7RF6kH3Niyb4lQAAnR2xZPL4VXwClTY0JcdqHDJwq/NEC mA6LNA6/6fQVTCeD7yfm68j+yfeET6CpnJZA+PTtiSpPHbp0HTapgiy2G8EO3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842687; a=rsa-sha256; cv=none; b=lEuiiOG6O+PoAp+EUCKDsu5otKHXdxRcNfpcgp34EFRgUiZd+h0BJzfsvJxoE6KS+u+0vp 3SLgV8YKmoPZgmXICLdvfidsFEjikGyjrL2u6t2ilzKEiXKdQFp3xpZR1m+sNQbA7Ihqpt EUlLpIRHyPLokqoh33JgJ3G/Ms7KkOdSCBwxKIuyqkuQmLOaj+E/QaBqCsRZvHAAD5Q+qL WMISCVpxGVf3WHI/cJ6YkLSw6/LALstgSxp7tz4Tu2OvCQr5q3sqZZGond+2YlpwkTbz4K EmpJWkAI2j0jWLlK6P43YwuYHk1qo4cWtP9jljmI2Isxjlo6GfnMNzj9Y5bQCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDb3YcnzNQf; Tue, 18 Apr 2023 18:31: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 33IIVRBv026535; Tue, 18 Apr 2023 18:31:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVRW3026534; Tue, 18 Apr 2023 18:31:27 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:27 GMT Message-Id: <202304181831.33IIVRW3026534@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: 8b356c888167 - main - bootpd: Use C89 function definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8b356c888167dfc5f5783679d373555053982f02 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8b356c888167dfc5f5783679d373555053982f02 commit 8b356c888167dfc5f5783679d373555053982f02 Author: John Baldwin AuthorDate: 2023-04-18 18:21:15 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:21:15 +0000 bootpd: Use C89 function definitions. Trim a few duplicate (but incomplete) function prototypes as well. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39520 --- libexec/bootpd/bootpd.c | 28 +++----- libexec/bootpd/bootpgw/bootpgw.c | 4 +- libexec/bootpd/dovend.c | 20 ++---- libexec/bootpd/dovend.h | 2 +- libexec/bootpd/dumptab.c | 18 ++---- libexec/bootpd/getether.c | 4 +- libexec/bootpd/getif.c | 7 +- libexec/bootpd/hash.c | 50 ++++----------- libexec/bootpd/hwaddr.c | 21 ++---- libexec/bootpd/lookup.c | 15 ++--- libexec/bootpd/readfile.c | 95 ++++++++-------------------- libexec/bootpd/report.c | 5 +- libexec/bootpd/rtmsg.c | 10 ++- libexec/bootpd/tools/bootpef/bootpef.c | 9 +-- libexec/bootpd/tools/bootptest/bootptest.c | 13 ++-- libexec/bootpd/tools/bootptest/print-bootp.c | 21 ++---- 16 files changed, 93 insertions(+), 229 deletions(-) diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index 42f1cd8c5912..938444127f45 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -170,9 +170,7 @@ char *bootpd_dump = DUMPTAB_FILE; */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { struct timeval *timeout; struct bootp *bp; @@ -593,8 +591,7 @@ usage() /* Signal catchers */ PRIVATE void -catcher(sig) - int sig; +catcher(int sig) { if (sig == SIGHUP) do_readtab = 1; @@ -620,7 +617,7 @@ catcher(sig) * forward the request there.) */ PRIVATE void -handle_request() +handle_request(void) { struct bootp *bp = (struct bootp *) pktbuf; struct host *hp = NULL; @@ -998,7 +995,7 @@ null_file_name: * Process BOOTREPLY packet. */ PRIVATE void -handle_reply() +handle_reply(void) { if (debug) { report(LOG_INFO, "processing boot reply"); @@ -1013,9 +1010,7 @@ handle_reply() * not the originator of this reply packet. */ PRIVATE void -sendreply(forward, dst_override) - int forward; - int32 dst_override; +sendreply(int forward, int32 dst_override) { struct bootp *bp = (struct bootp *) pktbuf; struct in_addr dst; @@ -1131,9 +1126,7 @@ sendreply(forward, dst_override) */ PRIVATE int -chk_access(path, filesize) - char *path; - int32 *filesize; +chk_access(char *path, int32 *filesize) { struct stat st; @@ -1161,9 +1154,7 @@ chk_access(path, filesize) */ PRIVATE void -dovend_cmu(bp, hp) - struct bootp *bp; - struct host *hp; +dovend_cmu(struct bootp *bp, struct host *hp) { struct cmu_vend *vendp; struct in_addr_list *taddr; @@ -1231,10 +1222,7 @@ dovend_cmu(bp, hp) return; \ } while (0) PRIVATE void -dovend_rfc1048(bp, hp, bootsize) - struct bootp *bp; - struct host *hp; - int32 bootsize; +dovend_rfc1048(struct bootp *bp, struct host *hp, int32 bootsize) { int bytesleft, len; byte *vp; diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c index 3c128c03a9a6..c0042ccb1de3 100644 --- a/libexec/bootpd/bootpgw/bootpgw.c +++ b/libexec/bootpd/bootpgw/bootpgw.c @@ -144,9 +144,7 @@ char *hostname; */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { struct timeval *timeout; struct bootp *bp; diff --git a/libexec/bootpd/dovend.c b/libexec/bootpd/dovend.c index 65543a2700c0..a90e63cfa4d9 100644 --- a/libexec/bootpd/dovend.c +++ b/libexec/bootpd/dovend.c @@ -36,10 +36,7 @@ PRIVATE int insert_generic(struct shared_bindata *, byte **, int *); */ int -dovend_rfc1497(hp, buf, len) - struct host *hp; - byte *buf; - int len; +dovend_rfc1497(struct host *hp, byte *buf, int len) { int bytesleft = len; byte *vp = buf; @@ -272,11 +269,7 @@ dovend_rfc1497(hp, buf, len) */ int -insert_ip(tag, iplist, dest, bytesleft) - byte tag; - struct in_addr_list *iplist; - byte **dest; - int *bytesleft; +insert_ip(byte tag, struct in_addr_list *iplist, byte **dest, int *bytesleft) { struct in_addr *addrptr; unsigned addrcount = 1; @@ -315,10 +308,7 @@ insert_ip(tag, iplist, dest, bytesleft) */ static int -insert_generic(gendata, buff, bytesleft) - struct shared_bindata *gendata; - byte **buff; - int *bytesleft; +insert_generic(struct shared_bindata *gendata, byte **buff, int *bytesleft) { byte *srcptr; int length, numbytes; @@ -370,9 +360,7 @@ insert_generic(gendata, buff, bytesleft) */ void -insert_u_long(value, dest) - u_int32 value; - byte **dest; +insert_u_long(u_int32 value, byte **dest) { byte *temp; int n; diff --git a/libexec/bootpd/dovend.h b/libexec/bootpd/dovend.h index ef3b62de7126..77cdfc376fb4 100644 --- a/libexec/bootpd/dovend.h +++ b/libexec/bootpd/dovend.h @@ -2,5 +2,5 @@ /* $FreeBSD$ */ extern int dovend_rfc1497(struct host *hp, u_char *buf, int len); -extern int insert_ip(int, struct in_addr_list *, u_char **, int *); +extern int insert_ip(byte, struct in_addr_list *, byte **, int *); extern void insert_u_long(u_int32, u_char **); diff --git a/libexec/bootpd/dumptab.c b/libexec/bootpd/dumptab.c index daab93f609a6..b7f98a8d3eca 100644 --- a/libexec/bootpd/dumptab.c +++ b/libexec/bootpd/dumptab.c @@ -29,8 +29,7 @@ static void list_ipaddresses(FILE *, struct in_addr_list *); #ifndef DEBUG void -dumptab(filename) - char *filename; +dumptab(char *filename) { report(LOG_INFO, "No dumptab support!"); } @@ -42,8 +41,7 @@ dumptab(filename) */ void -dumptab(filename) - char *filename; +dumptab(char *filename) { int n; struct host *hp; @@ -123,9 +121,7 @@ dumptab(filename) */ static void -dump_host(fp, hp) - FILE *fp; - struct host *hp; +dump_host(FILE *fp, struct host *hp) { /* Print symbols in alphabetical order for reader's convenience. */ if (hp) { @@ -292,9 +288,7 @@ dump_host(fp, hp) static void -dump_generic(fp, generic) - FILE *fp; - struct shared_bindata *generic; +dump_generic(FILE *fp, struct shared_bindata *generic) { u_char *bp = generic->data; u_char *ep = bp + generic->length; @@ -337,9 +331,7 @@ dump_generic(fp, generic) */ static void -list_ipaddresses(fp, ipptr) - FILE *fp; - struct in_addr_list *ipptr; +list_ipaddresses(FILE *fp, struct in_addr_list *ipptr) { unsigned count; struct in_addr *addrptr; diff --git a/libexec/bootpd/getether.c b/libexec/bootpd/getether.c index 56b7c8ed3016..a43536fd83f5 100644 --- a/libexec/bootpd/getether.c +++ b/libexec/bootpd/getether.c @@ -119,9 +119,7 @@ getether(ifname, eap) #include int -getether(ifname, eap) - char *ifname; /* interface name from ifconfig structure */ - char *eap; /* Ether address (output) */ +getether(char *ifname, char *eap) { int fd, rc = -1; int n; diff --git a/libexec/bootpd/getif.c b/libexec/bootpd/getif.c index 225647ea439b..9d7502512cb3 100644 --- a/libexec/bootpd/getif.c +++ b/libexec/bootpd/getif.c @@ -40,9 +40,7 @@ static int nmatch(u_char *ca, u_char *cb); /* Return a pointer to the interface struct for the passed address. */ struct ifreq * -getif(s, addrp) - int s; /* socket file descriptor */ - struct in_addr *addrp; /* destination address on interface */ +getif(int s, struct in_addr *addrp) { int maxmatch; int len, m, incr; @@ -110,8 +108,7 @@ getif(s, addrp) * internet addresses supplied. */ static int -nmatch(ca, cb) - u_char *ca, *cb; /* ptrs to IP address, network order */ +nmatch(u_char *ca, u_char *cb) { u_int m = 0; /* count of matching bits */ u_int n = 4; /* bytes left, then bitmask */ diff --git a/libexec/bootpd/hash.c b/libexec/bootpd/hash.c index 1641a8a092cd..89b113bc6031 100644 --- a/libexec/bootpd/hash.c +++ b/libexec/bootpd/hash.c @@ -69,8 +69,7 @@ PRIVATE void hashi_FreeMembers(hash_member *, hash_freefp); */ hash_tbl * -hash_Init(tablesize) - unsigned tablesize; +hash_Init(unsigned tablesize) { hash_tbl *hashtblptr; unsigned totalsize; @@ -99,9 +98,7 @@ hash_Init(tablesize) */ PRIVATE void -hashi_FreeMembers(bucketptr, free_data) - hash_member *bucketptr; - hash_freefp free_data; +hashi_FreeMembers(hash_member *bucketptr, hash_freefp free_data) { hash_member *nextbucket; while (bucketptr) { @@ -121,9 +118,7 @@ hashi_FreeMembers(bucketptr, free_data) */ void -hash_Reset(hashtable, free_data) - hash_tbl *hashtable; - hash_freefp free_data; +hash_Reset(hash_tbl *hashtable, hash_freefp free_data) { hash_member **bucketptr; unsigned i; @@ -160,9 +155,7 @@ hash_Reset(hashtable, free_data) */ unsigned -hash_HashFunction(string, len) - unsigned char *string; - unsigned len; +hash_HashFunction(unsigned char *string, unsigned len) { unsigned accum; @@ -182,11 +175,8 @@ hash_HashFunction(string, len) */ int -hash_Exists(hashtable, hashcode, compare, key) - hash_tbl *hashtable; - unsigned hashcode; - hash_cmpfp compare; - hash_datum *key; +hash_Exists(hash_tbl *hashtable, unsigned hashcode, hash_cmpfp compare, + hash_datum *key) { hash_member *memberptr; @@ -213,11 +203,8 @@ hash_Exists(hashtable, hashcode, compare, key) */ int -hash_Insert(hashtable, hashcode, compare, key, element) - hash_tbl *hashtable; - unsigned hashcode; - hash_cmpfp compare; - hash_datum *key, *element; +hash_Insert(hash_tbl *hashtable, unsigned hashcode, hash_cmpfp compare, + hash_datum *key, hash_datum *element) { hash_member *temp; @@ -244,12 +231,8 @@ hash_Insert(hashtable, hashcode, compare, key, element) */ int -hash_Delete(hashtable, hashcode, compare, key, free_data) - hash_tbl *hashtable; - unsigned hashcode; - hash_cmpfp compare; - hash_datum *key; - hash_freefp free_data; +hash_Delete(hash_tbl *hashtable, unsigned hashcode, hash_cmpfp compare, + hash_datum *key, hash_freefp free_data) { hash_member *memberptr, *tempptr; hash_member *previous = NULL; @@ -310,11 +293,8 @@ hash_Delete(hashtable, hashcode, compare, key, free_data) */ hash_datum * -hash_Lookup(hashtable, hashcode, compare, key) - hash_tbl *hashtable; - unsigned hashcode; - hash_cmpfp compare; - hash_datum *key; +hash_Lookup(hash_tbl *hashtable, unsigned hashcode, hash_cmpfp compare, + hash_datum *key) { hash_member *memberptr; @@ -335,8 +315,7 @@ hash_Lookup(hashtable, hashcode, compare, key) */ hash_datum * -hash_NextEntry(hashtable) - hash_tbl *hashtable; +hash_NextEntry(hash_tbl *hashtable) { unsigned bucket; hash_member *memberptr; @@ -388,8 +367,7 @@ hash_NextEntry(hashtable) */ hash_datum * -hash_FirstEntry(hashtable) - hash_tbl *hashtable; +hash_FirstEntry(hash_tbl *hashtable) { hashtable->bucketnum = 0; hashtable->member = (hashtable->table)[0]; diff --git a/libexec/bootpd/hwaddr.c b/libexec/bootpd/hwaddr.c index 293c75a6b3be..7e0400014864 100644 --- a/libexec/bootpd/hwaddr.c +++ b/libexec/bootpd/hwaddr.c @@ -81,12 +81,7 @@ int hwinfocnt = sizeof(hwinfolist) / sizeof(hwinfolist[0]); * bound to hardware address 'ha' of length 'len'. */ void -setarp(s, ia, hafamily, haddr, halen) - int s; /* socket fd */ - struct in_addr *ia; /* protocol address */ - int hafamily; /* HW address family */ - u_char *haddr; /* HW address data */ - int halen; +setarp(int s, struct in_addr *ia, int hafamily, u_char *haddr, int halen) { #ifdef SIOCSARP #ifdef WIN_TCP @@ -207,9 +202,7 @@ setarp(s, ia, hafamily, haddr, halen) * Convert a hardware address to an ASCII string. */ char * -haddrtoa(haddr, hlen) - u_char *haddr; - int hlen; +haddrtoa(u_char *haddr, int hlen) { static char haddrbuf[3 * MAXHADDRLEN + 1]; char *bufptr; @@ -286,9 +279,7 @@ static u_char conv802table[256] = }; void -haddr_conv802(addr_in, addr_out, len) - u_char *addr_in, *addr_out; - int len; +haddr_conv802(u_char *addr_in, u_char *addr_out, int len) { u_char *lim; @@ -303,8 +294,7 @@ haddr_conv802(addr_in, addr_out, len) * bit-reverse table above. */ static int -bitrev(n) - int n; +bitrev(int n) { int i, r; @@ -317,7 +307,8 @@ bitrev(n) return r; } -main() +void +main(void) { int i; for (i = 0; i <= 0xFF; i++) { diff --git a/libexec/bootpd/lookup.c b/libexec/bootpd/lookup.c index 391a1d826d6e..0287f71d9075 100644 --- a/libexec/bootpd/lookup.c +++ b/libexec/bootpd/lookup.c @@ -13,7 +13,6 @@ #ifdef ETC_ETHERS #include -extern int ether_hostton(); #endif #include @@ -29,9 +28,7 @@ extern int ether_hostton(); * Return NULL if addr not found. */ u_char * -lookup_hwa(hostname, htype) - char *hostname; - int htype; +lookup_hwa(char *hostname, int htype) { switch (htype) { @@ -65,9 +62,7 @@ lookup_hwa(hostname, htype) * Return non-zero on failure. */ int -lookup_ipa(hostname, result) - char *hostname; - u_int32 *result; +lookup_ipa(char *hostname, u_int32 *result) { struct hostent *hp; hp = gethostbyname(hostname); @@ -85,11 +80,11 @@ lookup_ipa(hostname, result) * XXX - This is OK as a default, but to really make this automatic, * we would need to get the subnet mask from the ether interface. * If this is wrong, specify the correct value in the bootptab. + * + * Both arguments are in network order */ int -lookup_netmask(addr, result) - u_int32 addr; /* both in network order */ - u_int32 *result; +lookup_netmask(u_int32 addr, u_int32 *result) { int32 m, a; diff --git a/libexec/bootpd/readfile.c b/libexec/bootpd/readfile.c index c09639300310..8511dd1bb18f 100644 --- a/libexec/bootpd/readfile.c +++ b/libexec/bootpd/readfile.c @@ -219,7 +219,6 @@ PRIVATE struct htypename htnamemap[] = { * Externals and forward declarations. */ -extern boolean iplookcmp(); boolean nmcmp(hash_datum *, hash_datum *); PRIVATE void @@ -288,7 +287,7 @@ hash_tbl *nmhashtable; * (shared by bootpd and bootpef) */ void -rdtab_init() +rdtab_init(void) { hwhashtable = hash_Init(HASHTABLESIZE); iphashtable = hash_Init(HASHTABLESIZE); @@ -306,8 +305,7 @@ rdtab_init() */ void -readtab(force) - int force; +readtab(int force) { struct host *hp; FILE *fp; @@ -489,10 +487,7 @@ readtab(force) */ PRIVATE void -read_entry(fp, buffer, bufsiz) - FILE *fp; - char *buffer; - unsigned *bufsiz; +read_entry(FILE *fp, char *buffer, unsigned *bufsiz) { int c, length; @@ -629,9 +624,7 @@ read_entry(fp, buffer, bufsiz) */ PRIVATE int -process_entry(host, src) - struct host *host; - char *src; +process_entry(struct host *host, char *src) { int retval; char *msg; @@ -775,9 +768,7 @@ process_entry(host, src) * Obviously, this need a few more comments. . . . */ PRIVATE int -eval_symbol(symbol, hp) - char **symbol; - struct host *hp; +eval_symbol(char **symbol, struct host *hp) { char tmpstr[MAXSTRINGLEN]; byte *tmphaddr; @@ -1149,9 +1140,7 @@ eval_symbol(symbol, hp) */ PRIVATE char * -get_string(src, dest, length) - char **src, *dest; - unsigned *length; +get_string(char **src, char *dest, unsigned *length) { int n, len, quoteflag; @@ -1201,8 +1190,7 @@ get_string(src, dest, length) */ PRIVATE struct shared_string * -get_shared_string(src) - char **src; +get_shared_string(char **src) { char retstring[MAXSTRINGLEN]; struct shared_string *s; @@ -1238,10 +1226,7 @@ get_shared_string(src) */ PRIVATE int -process_generic(src, dest, tagvalue) - char **src; - struct shared_bindata **dest; - u_int tagvalue; +process_generic(char **src, struct shared_bindata **dest, u_int tagvalue) { byte tmpbuf[MAXBUFLEN]; byte *str; @@ -1296,8 +1281,7 @@ process_generic(src, dest, tagvalue) */ PRIVATE boolean -goodname(hostname) - char *hostname; +goodname(char *hostname) { do { if (!isalpha(*hostname++)) { /* First character must be a letter */ @@ -1329,8 +1313,7 @@ goodname(hostname) */ PRIVATE boolean -nullcmp(d1, d2) - hash_datum *d1, *d2; +nullcmp(hash_datum *d1, hash_datum *d2) { return FALSE; } @@ -1342,8 +1325,7 @@ nullcmp(d1, d2) */ boolean -nmcmp(d1, d2) - hash_datum *d1, *d2; +nmcmp(hash_datum *d1, hash_datum *d2) { char *name = (char *) d1; /* XXX - OK? */ struct host *hp = (struct host *) d2; @@ -1365,8 +1347,7 @@ nmcmp(d1, d2) */ PRIVATE boolean -hwinscmp(d1, d2) - hash_datum *d1, *d2; +hwinscmp(hash_datum *d1, hash_datum *d2) { struct host *host1 = (struct host *) d1; struct host *host2 = (struct host *) d2; @@ -1421,9 +1402,7 @@ hwinscmp(d1, d2) * current host entry are inferred from the template entry. */ PRIVATE void -fill_defaults(hp, src) - struct host *hp; - char **src; +fill_defaults(struct host *hp, char **src) { unsigned int tlen, hashcode; struct host *hp2; @@ -1513,8 +1492,7 @@ fill_defaults(hp, src) */ PRIVATE void -adjust(s) - char **s; +adjust(char **s) { char *t; @@ -1538,8 +1516,7 @@ adjust(s) */ PRIVATE void -eat_whitespace(s) - char **s; +eat_whitespace(char **s) { char *t; @@ -1557,8 +1534,7 @@ eat_whitespace(s) */ PRIVATE void -makelower(s) - char *s; +makelower(char *s) { while (*s) { if (isupper(*s)) { @@ -1598,8 +1574,7 @@ makelower(s) */ PRIVATE struct in_addr_list * -get_addresses(src) - char **src; +get_addresses(char **src) { struct in_addr tmpaddrlist[MAXINADDRS]; struct in_addr *address1, *address2; @@ -1655,9 +1630,7 @@ get_addresses(src) */ PRIVATE int -prs_inetaddr(src, result) - char **src; - u_int32 *result; +prs_inetaddr(char **src, u_int32 *result) { char tmpstr[MAXSTRINGLEN]; u_int32 value; @@ -1755,9 +1728,7 @@ prs_inetaddr(src, result) */ PRIVATE byte * -prs_haddr(src, htype) - char **src; - u_int htype; +prs_haddr(char **src, u_int htype) { static byte haddr[MAXHADDRLEN]; byte *hap; @@ -1810,9 +1781,7 @@ prs_haddr(src, htype) */ PRIVATE int -interp_byte(src, retbyte) - char **src; - byte *retbyte; +interp_byte(char **src, byte *retbyte) { int v; @@ -1842,8 +1811,7 @@ interp_byte(src, retbyte) */ PRIVATE u_int32 -get_u_long(src) - char **src; +get_u_long(char **src) { u_int32 value, base; char c; @@ -1891,8 +1859,7 @@ get_u_long(src) */ PRIVATE void -free_host(hmp) - hash_datum *hmp; +free_host(hash_datum *hmp) { struct host *hostptr = (struct host *) hmp; if (hostptr == NULL) @@ -1948,8 +1915,7 @@ free_host(hmp) */ PRIVATE void -del_iplist(iplist) - struct in_addr_list *iplist; +del_iplist(struct in_addr_list *iplist) { if (iplist) { if (!(--(iplist->linkcount))) { @@ -1967,8 +1933,7 @@ del_iplist(iplist) */ PRIVATE void -del_string(stringptr) - struct shared_string *stringptr; +del_string(struct shared_string *stringptr) { if (stringptr) { if (!(--(stringptr->linkcount))) { @@ -1986,8 +1951,7 @@ del_string(stringptr) */ PRIVATE void -del_bindata(dataptr) - struct shared_bindata *dataptr; +del_bindata(struct shared_bindata *dataptr) { if (dataptr) { if (!(--(dataptr->linkcount))) { @@ -2008,8 +1972,7 @@ del_bindata(dataptr) */ PRIVATE char * -smalloc(nbytes) - unsigned nbytes; +smalloc(unsigned nbytes) { char *retvalue; @@ -2033,8 +1996,7 @@ smalloc(nbytes) */ boolean -hwlookcmp(d1, d2) - hash_datum *d1, *d2; +hwlookcmp(hash_datum *d1, hash_datum *d2) { struct host *host1 = (struct host *) d1; struct host *host2 = (struct host *) d2; @@ -2054,8 +2016,7 @@ hwlookcmp(d1, d2) */ boolean -iplookcmp(d1, d2) - hash_datum *d1, *d2; +iplookcmp(hash_datum *d1, hash_datum *d2) { struct host *host1 = (struct host *) d1; struct host *host2 = (struct host *) d2; diff --git a/libexec/bootpd/report.c b/libexec/bootpd/report.c index 290e19e74063..98f24bb2950c 100644 --- a/libexec/bootpd/report.c +++ b/libexec/bootpd/report.c @@ -33,8 +33,7 @@ extern char *progname; static int stderr_only = 1; void -report_init(nolog) - int nolog; +report_init(int nolog) { stderr_only = nolog; #ifdef SYSLOG @@ -120,7 +119,7 @@ report(int priority, const char *fmt,...) * Return pointer to static string which gives full filesystem error message. */ const char * -get_errmsg() +get_errmsg(void) { return strerror(errno); } diff --git a/libexec/bootpd/rtmsg.c b/libexec/bootpd/rtmsg.c index a689a5ac139f..c02735649236 100644 --- a/libexec/bootpd/rtmsg.c +++ b/libexec/bootpd/rtmsg.c @@ -115,10 +115,8 @@ static struct { /* * Set an individual arp entry */ -int bsd_arp_set(ia, eaddr, len) - struct in_addr *ia; - char *eaddr; - int len; +int +bsd_arp_set(struct in_addr *ia, char *eaddr, int len) { struct sockaddr_in *sin = &sin_m; struct sockaddr_dl *sdl; @@ -176,8 +174,8 @@ overwrite: } -static int rtmsg(cmd) - int cmd; +static int +rtmsg(int cmd) { static int seq; int rlen; diff --git a/libexec/bootpd/tools/bootpef/bootpef.c b/libexec/bootpd/tools/bootpef/bootpef.c index 7ed3786d892e..2fb928f3065d 100644 --- a/libexec/bootpd/tools/bootpef/bootpef.c +++ b/libexec/bootpd/tools/bootpef/bootpef.c @@ -100,7 +100,7 @@ char *bootptab = CONFIG_FILE; * Print "usage" message and exit */ static void -usage() +usage(void) { fprintf(stderr, "usage: $s [ -c chdir ] [-d level] [-f configfile] [host...]\n"); @@ -116,9 +116,7 @@ usage() * main server loop is started. */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { struct host *hp; char *stmp; @@ -262,8 +260,7 @@ main(argc, argv) */ static void -mktagfile(hp) - struct host *hp; +mktagfile(struct host *hp) { FILE *fp; int bytesleft, len; diff --git a/libexec/bootpd/tools/bootptest/bootptest.c b/libexec/bootpd/tools/bootptest/bootptest.c index b99ac49a735e..5e7d61fc52b6 100644 --- a/libexec/bootpd/tools/bootptest/bootptest.c +++ b/libexec/bootpd/tools/bootptest/bootptest.c @@ -128,9 +128,7 @@ short secs; /* How long client has waited */ */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { struct bootp *bp; struct servent *sep; @@ -439,8 +437,7 @@ main(argc, argv) } static void -send_request(s) - int s; +send_request(int s) { /* Print the request packet. */ printf("Sending to %s", inet_ntoa(sin_server.sin_addr)); @@ -462,8 +459,7 @@ send_request(s) * Return true if truncated. */ int -printfn(s, ep) - u_char *s, *ep; +printfn(u_char *s, u_char *ep) { u_char c; @@ -493,8 +489,7 @@ printfn(s, ep) * (like inet_ntoa, but ina is a pointer) */ char * -ipaddr_string(ina) - struct in_addr *ina; +ipaddr_string(struct in_addr *ina) { static char b[24]; u_char *p; diff --git a/libexec/bootpd/tools/bootptest/print-bootp.c b/libexec/bootpd/tools/bootptest/print-bootp.c index c7a5a4400b37..5d7670ce1f24 100644 --- a/libexec/bootpd/tools/bootptest/print-bootp.c +++ b/libexec/bootpd/tools/bootptest/print-bootp.c @@ -53,10 +53,7 @@ static void dump_hex(u_char *bp, int len); * Print bootp requests */ void -bootp_print(bp, length, sport, dport) - struct bootp *bp; - int length; - u_short sport, dport; +bootp_print(struct bootp *bp, int length, u_short sport, u_short dport) { static char tstr[] = " [|bootp]"; static unsigned char vm_cmu[4] = VM_CMU; @@ -274,9 +271,7 @@ rfc1048_opts[] = { #define KNOWN_OPTIONS (sizeof(rfc1048_opts) / sizeof(rfc1048_opts[0])) static void -rfc1048_print(bp, length) - u_char *bp; - int length; +rfc1048_print(u_char *bp, int length) *** 36 LINES SKIPPED *** From nobody Tue Apr 18 18:31: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 4Q1CDc6kwyz45TmD; Tue, 18 Apr 2023 18:31: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 4Q1CDc5mTzz41DY; Tue, 18 Apr 2023 18:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ubCuG9gTBBa5ggo1rdW/19uloAZHcoiIR7F5urX3N08=; b=l33DjPlKyjiQtztXIyVkYAmdQX+sncM+FfBBKu2VWtqxcSdALamLeX5dT5gUdj06tSQ+Rz goqIxDNkSnfyBj7gM90hEGr8RGYvgzUa0Srw5zomajHwGNzE/TuLToAbHhtZu1Pqj55cy2 qJiZ1RrTbLejTc7nJrtA/7MF3brAGY0YPNEHRxH0ECv/fOB5EIpOPuu1RAEgRgkXoJ1LZs M79teDP/L8GVy+xRqf2W4vp/JEK0nFxz7db0+Blte1oFWLlPMy0FsfolZgY1m+0Mam3hV7 L8Mqe/nTsNW2MFnv9+Ah8Pa4LZNjpUiiQf03QcxVstR8d4MbSxaxi6rJNP+DrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ubCuG9gTBBa5ggo1rdW/19uloAZHcoiIR7F5urX3N08=; b=XngcrVQSO71YEpy6MawolbdruGfPds5k3i3Cdqf4TRXUHl3aUWZxqWcysRKPdul4C2ioYT dAzxcb4hGlzx9YKs8wFzt7APgezIARyo/v6POpC+7MzNtmR2mIR7FmxkBYv6AxC/HWj6kr wT6S/8FJFSqA6QPoBYwj6WufKxLeriZTBVL4elJG7wR+3sxEcPtA7Bsv2fuSSwdPmYt1vZ JP6GZ/fgbq9JqSNThivobqHeM2oDQdrDRlhrlN6eVD6xQwNOjWbZVZDZGea6CKYhot5xmJ T89ZNWir43J7gdmS+GpjT9+atHXXPJJ9vU4bzBdHzZpOwZvZ3SJasNYypFI3uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842688; a=rsa-sha256; cv=none; b=nr8ukhvFxd4DoTzOQSbEzzG5OtqhkTju+/7sAS3lLdk4pAwOVTgZ0ot9ruJkUWo9qvCntB x0xaO/iTL4+U/2O3BiFNBDP439igV2L9Eyw53umc8+/aajs6BNc5jGwGWb7vwz+w3cUVIn YiF18jkYc8wV22rfZJ3q+ltLx52vhL4vaJAXK/nvq9SGZ0CIov1D4cMHLUtFuys6EmZO+i 9o3FpSvVmW99DOs+Eyh1LarrnVkdqVJuo2e979RHca0pWzk6AFuO/FZlzvnWjp8CC6kouy yvlJk8m+FinNdk4RK3gY5Rw+wOj7zPWRXmHogiut3QPptkNp9XbIA3OfPW5IZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDc4SjczNQg; Tue, 18 Apr 2023 18:31: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 33IIVSQl026554; Tue, 18 Apr 2023 18:31:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVSiF026553; Tue, 18 Apr 2023 18:31:28 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:28 GMT Message-Id: <202304181831.33IIVSiF026553@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: e4253ae822ec - main - rpc.rstatd/rwalld: Use more accurate function pointer types. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e4253ae822ec819a6258b98023c90378b894896a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e4253ae822ec819a6258b98023c90378b894896a commit e4253ae822ec819a6258b98023c90378b894896a Author: John Baldwin AuthorDate: 2023-04-18 18:21:50 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:21:50 +0000 rpc.rstatd/rwalld: Use more accurate function pointer types. Reviewed by: zlei, rmacklem Differential Revision: https://reviews.freebsd.org/D39521 --- libexec/rpc.rstatd/rstat_proc.c | 33 +++++++++++++++++---------------- libexec/rpc.rwalld/rwalld.c | 19 ++++++++++--------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index f0f2ffd65b57..1f1bb7cf4048 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -406,9 +406,10 @@ rstat_service(struct svc_req *rqstp, SVCXPRT *transp) union { int fill; } argument; - char *result; - bool_t (*xdr_argument)(), (*xdr_result)(); - char *(*local)(); + void *result; + xdrproc_t xdr_argument, xdr_result; + typedef void *(svc_cb)(void *arg, struct svc_req *rqstp); + svc_cb *local; switch (rqstp->rq_proc) { case NULLPROC: @@ -416,17 +417,17 @@ rstat_service(struct svc_req *rqstp, SVCXPRT *transp) goto leave; case RSTATPROC_STATS: - xdr_argument = xdr_void; - xdr_result = xdr_statstime; + xdr_argument = (xdrproc_t)xdr_void; + xdr_result = (xdrproc_t)xdr_statstime; switch (rqstp->rq_vers) { case RSTATVERS_ORIG: - local = (char *(*)()) rstatproc_stats_1_svc; + local = (svc_cb *)rstatproc_stats_1_svc; break; case RSTATVERS_SWTCH: - local = (char *(*)()) rstatproc_stats_2_svc; + local = (svc_cb *)rstatproc_stats_2_svc; break; case RSTATVERS_TIME: - local = (char *(*)()) rstatproc_stats_3_svc; + local = (svc_cb *)rstatproc_stats_3_svc; break; default: svcerr_progvers(transp, RSTATVERS_ORIG, RSTATVERS_TIME); @@ -436,17 +437,17 @@ rstat_service(struct svc_req *rqstp, SVCXPRT *transp) break; case RSTATPROC_HAVEDISK: - xdr_argument = xdr_void; - xdr_result = xdr_u_int; + xdr_argument = (xdrproc_t)xdr_void; + xdr_result = (xdrproc_t)xdr_u_int; switch (rqstp->rq_vers) { case RSTATVERS_ORIG: - local = (char *(*)()) rstatproc_havedisk_1_svc; + local = (svc_cb *)rstatproc_havedisk_1_svc; break; case RSTATVERS_SWTCH: - local = (char *(*)()) rstatproc_havedisk_2_svc; + local = (svc_cb *)rstatproc_havedisk_2_svc; break; case RSTATVERS_TIME: - local = (char *(*)()) rstatproc_havedisk_3_svc; + local = (svc_cb *)rstatproc_havedisk_3_svc; break; default: svcerr_progvers(transp, RSTATVERS_ORIG, RSTATVERS_TIME); @@ -460,16 +461,16 @@ rstat_service(struct svc_req *rqstp, SVCXPRT *transp) goto leave; } bzero((char *)&argument, sizeof(argument)); - if (!svc_getargs(transp, (xdrproc_t)xdr_argument, &argument)) { + if (!svc_getargs(transp, xdr_argument, &argument)) { svcerr_decode(transp); goto leave; } result = (*local)(&argument, rqstp); if (result != NULL && - !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) { + !svc_sendreply(transp, xdr_result, result)) { svcerr_systemerr(transp); } - if (!svc_freeargs(transp, (xdrproc_t)xdr_argument, &argument)) + if (!svc_freeargs(transp, xdr_argument, &argument)) errx(1, "unable to free arguments"); leave: if (from_inetd) diff --git a/libexec/rpc.rwalld/rwalld.c b/libexec/rpc.rwalld/rwalld.c index 1261b2301277..adde226cfba8 100644 --- a/libexec/rpc.rwalld/rwalld.c +++ b/libexec/rpc.rwalld/rwalld.c @@ -167,9 +167,10 @@ wallprog_1(struct svc_req *rqstp, SVCXPRT *transp) union { char *wallproc_wall_1_arg; } argument; - char *result; - bool_t (*xdr_argument)(), (*xdr_result)(); - char *(*local)(); + void *result; + xdrproc_t xdr_argument, xdr_result; + typedef void *(svc_cb)(void *arg, struct svc_req *rqstp); + svc_cb *local; switch (rqstp->rq_proc) { case NULLPROC: @@ -177,9 +178,9 @@ wallprog_1(struct svc_req *rqstp, SVCXPRT *transp) goto leave; case WALLPROC_WALL: - xdr_argument = xdr_wrapstring; - xdr_result = xdr_void; - local = (char *(*)()) wallproc_wall_1_svc; + xdr_argument = (xdrproc_t)xdr_wrapstring; + xdr_result = (xdrproc_t)xdr_void; + local = (svc_cb *)wallproc_wall_1_svc; break; default: @@ -187,16 +188,16 @@ wallprog_1(struct svc_req *rqstp, SVCXPRT *transp) goto leave; } bzero(&argument, sizeof(argument)); - if (!svc_getargs(transp, (xdrproc_t)xdr_argument, &argument)) { + if (!svc_getargs(transp, xdr_argument, &argument)) { svcerr_decode(transp); goto leave; } result = (*local)(&argument, rqstp); if (result != NULL && - !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) { + !svc_sendreply(transp, xdr_result, result)) { svcerr_systemerr(transp); } - if (!svc_freeargs(transp, (xdrproc_t)xdr_argument, &argument)) { + if (!svc_freeargs(transp, xdr_argument, &argument)) { syslog(LOG_ERR, "unable to free arguments"); exit(1); } From nobody Tue Apr 18 18:31: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 4Q1CDf0hZkz45TpS; Tue, 18 Apr 2023 18:31:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1CDd60jxz41W0; Tue, 18 Apr 2023 18:31:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zMKAPuDtjgQFQrqhuSo58jWzvGFRKI5oXhO0+JPz/hU=; b=Z/wYyWWtAUQQf8IHrNLrYbKWMfsW9qsjPbnuxCg/rxqZarjSXaHfaSNMmIyZyMHyhl+s5z XRyPIGqgxArsAlPSvYKbHV2f8qbiVJpZcDt22hY6Qw0BHSwhK/HTrKYwL7eun4S2GIwOPp b86UkiBaYsCPCkNryLp3ETTLBYWco0qP8P0pRz12+HQGmIOpXtuwLUQIawR8NrEE8jniC+ Wp6pMe7bvoMJmrRCAe32LkQiC4MDXFv4dbhTZhiPtIKqWyXhVPciIL0zIckDX9Mq/tWb+N yhVkkYhRgTYAGzll8Dse9MHqkTShEiux3q8YIHIO7P/hEqtQuNzBHQZXa09zhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zMKAPuDtjgQFQrqhuSo58jWzvGFRKI5oXhO0+JPz/hU=; b=CGEWQsy0MjcJsgpNcFthOL9zSiOw07hTeI8hCcQd1X4l0n78wAXVQ3Y7hbPxIIK7E93XZU Ls4UFpJJaNUG4TwfytBevICmDUGeQtaRCBpn1vGRUwWoMdTuRJ5+EbuJmSLH8wu+CCQ6tl Y8keTEpoGycjHYhPaw3YtA2JO0+Me7ahtNonkRpQVffV/OUym45Xl3Zjx9URRvJKHYTO5/ 3ObX4UHeWSM7ONTXkmjDvbGOsztU02qY5O1l/qyJWgJ4AyPeAjux7CMPJIUDc73ImZP+nn C2mfs2XzFfVqEqnr8vmCriC+/aA37WPLgxACuZrZKYPo9FNKkoZiOAmd1eH2Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842689; a=rsa-sha256; cv=none; b=SFaxbn6PmKPX39Hr3nGrP/oRbOT9VuhmaVDv08V36bswboKJ8Amz5Eime/Sh8HiBpB83NE tADk/kYpeESvgG9Kg7n9OBJGZWJbE0uO5vVBH44upFdJ3x5Ia1F9pGnnLyYRaBLCKr4KrW L4/rcEvozCfURu/qjYkuhf3gsnVINflik05uVsWc2ZQDUiH5sbjND/WROdUPuCwkPRvLHd xgca0gPAGXbCqV4df8/gItN20SN2dhFjmeHP3Q6NvzuMu1jPjCSIR6G3VKv+0lXql5Oei2 xEPJ8VPfPlUf3RyhrPBBGOtJcIMWMasEsK7mp+f7g18T+rLYVM9J//j9jgRDEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDd4zkxzNGw; Tue, 18 Apr 2023 18:31: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 33IIVTpU026909; Tue, 18 Apr 2023 18:31:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVTZN026897; Tue, 18 Apr 2023 18:31:29 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:29 GMT Message-Id: <202304181831.33IIVTZN026897@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: eae7dd0f221f - main - rbootd: Remove an unnecessary (and incomplete) function prototype. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: eae7dd0f221fe28b3903b46f7c3d1d01d7400939 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eae7dd0f221fe28b3903b46f7c3d1d01d7400939 commit eae7dd0f221fe28b3903b46f7c3d1d01d7400939 Author: John Baldwin AuthorDate: 2023-04-18 18:22:08 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:22:08 +0000 rbootd: Remove an unnecessary (and incomplete) function prototype. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39522 --- libexec/rbootd/rbootd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rbootd/rbootd.c b/libexec/rbootd/rbootd.c index 3bc02ec9cb80..9e1c8e0bda76 100644 --- a/libexec/rbootd/rbootd.c +++ b/libexec/rbootd/rbootd.c @@ -249,7 +249,7 @@ main(int argc, char *argv[]) if (FD_ISSET(fd, &r)) { RMPCONN rconn; - CLIENT *client, *FindClient(); + CLIENT *client; int doread = 1; while (BpfRead(&rconn, doread)) { From nobody Tue Apr 18 18:31:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1CDg5pS3z45TX8; Tue, 18 Apr 2023 18:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1CDg1NMbz41QR; Tue, 18 Apr 2023 18:31:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w3nDgu37y4i75ecUYylNjUHcAFW5/a9m//WckRuNekg=; b=u8XIXu6sf8O8UIi4ZBGSFEtQhibvlgVAb4nMUpqX4gGV05qSlW5OJnz60e6KzSUK4pHVqf 2OpRgF5POdNaD8XNMJAO96g4LROFxYfQi3EhjhAcSC0Q949aVuP2OQZH/oIigJdy8kjEN3 w+yKhD/XoLWF0i1qePiLyBo2stOkTrsvNUdeBKQJAO/47QRZeE8SBMUDxlG3LrUkPmfCnY Ens3duTezjKPiQJFfrjKEMIE1Ob11ahwiI6ACrNcjZKB1cijuzHK1Il344QmXg53gM/Vlb 0xT16cV55s6rYFEtl3gN3J/6Kw2NyuW0t2bzzzXOZPZ/2QIubxWKPPqfsPG5DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w3nDgu37y4i75ecUYylNjUHcAFW5/a9m//WckRuNekg=; b=isulx2xKEXKdSwpZHDjuL/UtgyXcMLDA+I356jSEMZV2AtBhR/YAUMiM8+H+9amZkw1D7r /8QVbH5FQoEgTL+jSyCpXP2R/wGFEs11T1rsTLxlcJM2mdwwCL4jBJgHhZ34b4sJR4Xdmv l71jApFX62fonPc3ouf0U+8ZTfPhUrVux0tjVXgJWRFwHAUXWuxwo5BN1SUMAcondx7fkM IA8KkgxWyF18qFZ/eQrObs9++fWwXzpMZTNPWh5qiGNM1ioYAbMfhvQc+o8CUFmWIyKF0h wtiy1qYP5y7YPjU0btx59/bl189M6L/9yAsLiBKlVLbAsjgcUpdPFh3Gh/qluA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842691; a=rsa-sha256; cv=none; b=tuKBqbZle5xD5LUfFgg+dcJsQO/dErFtt0CS0YDJC3XHxXh60EgPjKC7YHRB34qpKPebOg NIerOrApx2mDMJVfj+vOsr8K5wIVdF3iD/w5lAX6w9poFdV4BKfGJkuH5QUWjnpeu5OlWD rgsiAT6kI9a+lGDDOT9QbMrEBf6IjXsAMLA6YIlgpYIDSrgKKrGOSosFUWLWH1tIq9W+VT tCUN/BEjCpQSdYF3TcbicyFxJsfNKvRUTqal6VuoM5JYM2TpCJGLdy4hEb5FGEtQeEQEBa qbkBitp2TslMtfV+j2qSaCbc2MX7XjGtnSyVoDmgI7yhh5Tv4B0EatiJVwAzqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDf5rtFzMp9; Tue, 18 Apr 2023 18:31: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 33IIVUXd027482; Tue, 18 Apr 2023 18:31:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVUT0027481; Tue, 18 Apr 2023 18:31:30 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:30 GMT Message-Id: <202304181831.33IIVUT0027481@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: 2ac057dd33e8 - main - ipf: Use C89 function definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2ac057dd33e85e3e4ca1095f80bdc00974a1132c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2ac057dd33e85e3e4ca1095f80bdc00974a1132c commit 2ac057dd33e85e3e4ca1095f80bdc00974a1132c Author: John Baldwin AuthorDate: 2023-04-18 18:22:28 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:22:28 +0000 ipf: Use C89 function definitions. Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D39523 --- sbin/ipf/common/genmask.c | 6 ++---- sbin/ipf/common/lexer.c | 3 +-- sbin/ipf/ipf/bpf_filter.c | 18 ++++-------------- sbin/ipf/ipfstat/ipfstat.c | 3 +-- sbin/ipf/ipmon/ipmon.c | 5 +---- sbin/ipf/libipf/mutex_emul.c | 5 +---- sbin/ipf/libipf/poolio.c | 5 +---- sbin/ipf/libipf/var.c | 3 +-- 8 files changed, 12 insertions(+), 36 deletions(-) diff --git a/sbin/ipf/common/genmask.c b/sbin/ipf/common/genmask.c index 5b715cf4c901..a3b912b67ef3 100644 --- a/sbin/ipf/common/genmask.c +++ b/sbin/ipf/common/genmask.c @@ -9,10 +9,8 @@ #include "ipf.h" -int genmask(family, msk, mskp) - int family; - char *msk; - i6addr_t *mskp; +int +genmask(int family, char *msk, i6addr_t *mskp) { char *endptr = 0L; u_32_t addr; diff --git a/sbin/ipf/common/lexer.c b/sbin/ipf/common/lexer.c index 16fbb2272034..12ec3c825dd4 100644 --- a/sbin/ipf/common/lexer.c +++ b/sbin/ipf/common/lexer.c @@ -603,8 +603,7 @@ done: } -static wordtab_t *yyfindkey(key) - char *key; +static wordtab_t *yyfindkey(char *key) { wordtab_t *w; diff --git a/sbin/ipf/ipf/bpf_filter.c b/sbin/ipf/ipf/bpf_filter.c index fbb0138f51d8..64d416feaf36 100644 --- a/sbin/ipf/ipf/bpf_filter.c +++ b/sbin/ipf/ipf/bpf_filter.c @@ -117,9 +117,7 @@ static int m_xhalf(mb_t *, int, int *); } static int -m_xword(m, k, err) - register mb_t *m; - register int k, *err; +m_xword(mb_t *m, int k, int *err) { register int len; register u_char *cp, *np; @@ -153,9 +151,7 @@ m_xword(m, k, err) } static int -m_xhalf(m, k, err) - register mb_t *m; - register int k, *err; +m_xhalf(mb_t *m, int k, int *err) { register int len; register u_char *cp; @@ -185,11 +181,7 @@ m_xhalf(m, k, err) * in all other cases, p is a pointer to a buffer and buflen is its size. */ u_int -bpf_filter(pc, p, wirelen, buflen) - register struct bpf_insn *pc; - register u_char *p; - u_int wirelen; - register u_int buflen; +bpf_filter(struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) { register u_int32 A, X; register int k; @@ -478,9 +470,7 @@ bpf_filter(pc, p, wirelen, buflen) * Otherwise, a bogus program could easily crash the system. */ int -bpf_validate(f, len) - struct bpf_insn *f; - int len; +bpf_validate(struct bpf_insn *f, int len) { u_int i, from; const struct bpf_insn *p; diff --git a/sbin/ipf/ipfstat/ipfstat.c b/sbin/ipf/ipfstat/ipfstat.c index 11b3043f919c..55c876724d4a 100644 --- a/sbin/ipf/ipfstat/ipfstat.c +++ b/sbin/ipf/ipfstat/ipfstat.c @@ -162,8 +162,7 @@ static int sort_dstpt(const void *, const void *); #endif -static void usage(name) - char *name; +static void usage(char *name) { #ifdef USE_INET6 fprintf(stderr, "Usage: %s [-46aAdfghIilnoRsv]\n", name); diff --git a/sbin/ipf/ipmon/ipmon.c b/sbin/ipf/ipmon/ipmon.c index f71a33b1034e..4f07dda27e62 100644 --- a/sbin/ipf/ipmon/ipmon.c +++ b/sbin/ipf/ipmon/ipmon.c @@ -470,10 +470,7 @@ read_log(int fd, int *lenp, char *buf, int bufsize) char * -portlocalname(res, proto, port) - int res; - char *proto; - u_int port; +portlocalname(int res, char *proto, u_int port) { static char pname[8]; char *s; diff --git a/sbin/ipf/libipf/mutex_emul.c b/sbin/ipf/libipf/mutex_emul.c index 3152d2e47013..a7e1c1389901 100644 --- a/sbin/ipf/libipf/mutex_emul.c +++ b/sbin/ipf/libipf/mutex_emul.c @@ -85,10 +85,7 @@ eMmutex_init(eMmutex_t *mtx, char *who, char *file, int line) void -eMmutex_destroy(mtx, file, line) - eMmutex_t *mtx; - char *file; - int line; +eMmutex_destroy(eMmutex_t *mtx, char *file, int line) { if (mutex_debug & 1) fprintf(mutex_file, diff --git a/sbin/ipf/libipf/poolio.c b/sbin/ipf/libipf/poolio.c index 765d37fae350..f12120fd5467 100644 --- a/sbin/ipf/libipf/poolio.c +++ b/sbin/ipf/libipf/poolio.c @@ -28,10 +28,7 @@ pool_open(void) } int -pool_ioctl(iocfunc, cmd, ptr) - ioctlfunc_t iocfunc; - ioctlcmd_t cmd; - void *ptr; +pool_ioctl(ioctlfunc_t iocfunc, ioctlcmd_t cmd, void *ptr) { return (*iocfunc)(poolfd, cmd, ptr); } diff --git a/sbin/ipf/libipf/var.c b/sbin/ipf/libipf/var.c index d3a03b6e46d7..47eb5d1595df 100644 --- a/sbin/ipf/libipf/var.c +++ b/sbin/ipf/libipf/var.c @@ -24,8 +24,7 @@ static variable_t *find_var(char *); static char *expand_string(char *, int); -static variable_t *find_var(name) - char *name; +static variable_t *find_var(char *name) { variable_t *v; From nobody Tue Apr 18 18:31: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 4Q1CDj0bPnz45TkZ; Tue, 18 Apr 2023 18:31: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 4Q1CDh4ZqPz41bX; Tue, 18 Apr 2023 18:31:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NgPtWQvNRsYQ219oD4b33ijchZBvkjCkAcQJT9EUECk=; b=xI0vAaUEEtbUQojkRdXIL/WKYy6DQVTjDYUrc03jR8WxqChBxss5UZbJFK0VBBVi8NCJEx C7vsZ9JujGe4AnLJuMTC5Hglr9WHHPNHkNWQFlWtx5QwrVN85gAuLPUhO/wVzcDhtgHLLO BkBXyXOcySL/9t5rUG2DcHu7F0rSWTdbku5VH1p8vP2qLxF6/NBg8ZD9va7PWUi7gmkmvn q7v2BaIY0gs31rITj/loRc6fPXnSATW8UEGAplbNYKSDV/otJcflG+7zBCrjXyGFdtetZ8 yzfRE486d9FpbioLmheKMdwm5OIU7E9FCpoJLq7SZGPHczJEDsxOHzM+tWtAJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NgPtWQvNRsYQ219oD4b33ijchZBvkjCkAcQJT9EUECk=; b=noZJn04W2WR7QrwrM1gyPTzifPbNdyntUiLhDtCsOTgaKOzp2bM75quO7pNzE4dpeu0EJA 7TNHLKvWjaU0tHYrtNUmcbFuvcbUbiYfyeqLw4h4zwdevBq/n0vDZcW2rMTInPTUqi0x6R EsIgqliniJQB+ZZ0qQk8Rq9gEhY54bftgrNAhoh5F00eYE/syANgciodKGHVn/4ZtcaMLT UZiP2PShsBKq0rDnZSJb+TYK2Vn7mjDPSchjf5c910zxYcpz5vbwwHkT2F2DcBrM49I6ef dmYd0Ft2DTxF+DpjVAc6qv1OBPG/ORwDPHV4JsZMpeji2XLQoBfP8U77725zKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842692; a=rsa-sha256; cv=none; b=d3Q8nortv9ucOHTbhioTsl2vVfh78PhncuVcGUpexYX43skTMBoFrNPePyCjcP3IoOIJEz cPHGB0cXpgFhUzNyfjG/b/Iqpb1hc8XsRuYamfVGVJ9VE5BX62n/CkulzQfYDLf1i2iU3o 9JO9JSgmf5iCGqoQsV/22PRgN9PtKbVaTjfnj/JZvm8WX+mX1bCKpMTckR2xSXOCLevAKY N4kleWMmwsqU0+EwBal5qKoZysWnsA45qhG4zlPP+6KlFaz6nJLSC/xLiGKO9kif9OQPO5 YD0hDo9BrnAYtPm8pEMjqFz4DSq/wHAb3NjylXOewggdO2IUD3h54Rc/Er7OkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDg6KcvzNSc; Tue, 18 Apr 2023 18:31: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 33IIVVfi028015; Tue, 18 Apr 2023 18:31:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVV9K028006; Tue, 18 Apr 2023 18:31:31 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:31 GMT Message-Id: <202304181831.33IIVV9K028006@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: 1bd44215d048 - main - less: Silence -Wdeprecated-non-prototype 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bd44215d048503cb5902f87f7c8d98ff726338f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1bd44215d048503cb5902f87f7c8d98ff726338f commit 1bd44215d048503cb5902f87f7c8d98ff726338f Author: John Baldwin AuthorDate: 2023-04-18 18:26:08 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:26:08 +0000 less: Silence -Wdeprecated-non-prototype warnings. This has an active upstream so will presumably be fixed upstream at some point. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39525 --- usr.bin/less/Makefile | 4 ++-- usr.bin/lessecho/Makefile | 2 ++ usr.bin/lesskey/Makefile | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.bin/less/Makefile b/usr.bin/less/Makefile index ca9d948e1e4f..c55ce3581cbf 100644 --- a/usr.bin/less/Makefile +++ b/usr.bin/less/Makefile @@ -19,7 +19,7 @@ LINKS= ${BINDIR}/less ${BINDIR}/more \ MLINKS= less.1 more.1 CLEANFILES= less.1 -CFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} - .include "Makefile.common" .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/usr.bin/lessecho/Makefile b/usr.bin/lessecho/Makefile index af0a7c1550ab..0d40cc209548 100644 --- a/usr.bin/lessecho/Makefile +++ b/usr.bin/lessecho/Makefile @@ -6,3 +6,5 @@ CLEANFILES= lessecho.1 .include "${SRCTOP}/usr.bin/less/Makefile.common" .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} diff --git a/usr.bin/lesskey/Makefile b/usr.bin/lesskey/Makefile index 4677e7c7e6c7..6809d9dba124 100644 --- a/usr.bin/lesskey/Makefile +++ b/usr.bin/lesskey/Makefile @@ -6,3 +6,5 @@ CLEANFILES= lesskey.1 .include "${SRCTOP}/usr.bin/less/Makefile.common" .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} From nobody Tue Apr 18 18:31: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 4Q1CDl5Jpdz45TgL; Tue, 18 Apr 2023 18:31: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 4Q1CDk6Vf7z41Z3; Tue, 18 Apr 2023 18:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0IVnbY3jfWMu7o86VffEo8qwm0+pofNlmiMCVpmRDE=; b=nUs8/kEnCthgkZfFA3N6kUSn4A3c5gAayvSWZNbuteyyMf3IH9Zbo/sQAK3ZerBejUHNJR 1QdhaZTlEFE+R0/joEzwJH2GXEZEdE0dAcDaDAonuTyqSLujYRluX6dLX+DSnuGkLHoOR4 vYK9FWxtI9qRX3jduSZNXVuF/s4eSYZmKpx7XkfdoeZ0Db5r5GBMVj0EERnRTIl1E3E6YI UD/9irFOJxwP1Fmh8Latiu4NBU43TJeQRxJjJGiX95sTCgV4YSQ1qIwIuvC6Mqdr3mXdAk ag4DOotjIMbyTROx9iprqsJr6UE7935ZQLRbV+Fydv3lO5v3rJzsGKRSOhs0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0IVnbY3jfWMu7o86VffEo8qwm0+pofNlmiMCVpmRDE=; b=GwLwewgb5F34XAQZdd9akYTFY7OO/RQCN0Qd5mbw7rfoWJ222puH1mk9/YKoytUBsuPLre uh7i3p1cyHB697t/TnGASECCVtvHH6AQ/LUpAESfcU5FCcmcHc/2W++GY5LDTuG+mDhoJh Yt/BmSTYXL/kt8HB1RUzdbB+5BDqGkR3SwPIi6ZXvPy7BWNUhth5VXVBPDWUVI3HYsHPEy iUjuLfPWFK+IWZkB7JAj14bU0sr/5yiTIu4e4rf/8IDvvBWK47NB39YFi363hfwcJtVrkE IFKHns96PP3h1RU9zRrMlq2dAnAs8qabN1JjEZQwxGZ5QMWos+9SWBVfpYz7Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842695; a=rsa-sha256; cv=none; b=o3JBENOdTGeflg8uBYtiq5cc6BdnKWPRREx/4ZHtyb9qIE3IiO3lHmmUQKustQ01QAiion NCvMroGEpRHCZoALgUU9vf6sQ8ewqpRiaIDRvsOQOTd+NCaw5PbpjaCpReJbfAPzypp4H+ /4Z2GQd3OwuZPR61VptS14UB658mLi2lWYJZVw2VmXGwf+yGdag9r+hnqe2iYKHNe0bUgX l8OwHMB53XgWpD9E3uv7ZTAkwV5xxzO5pW19S9eRza8XvLJjyxyWghSZUfehSnH1IEAENk rdhzjAzc3+4RyZf7SRpjzd046IprBBL4LD7q5vh+Lcs9h+iRd+KOiE8LIxiqAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDh6zqCzNDC; Tue, 18 Apr 2023 18:31: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 33IIVWuD028332; Tue, 18 Apr 2023 18:31:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVWPe028331; Tue, 18 Apr 2023 18:31:32 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:32 GMT Message-Id: <202304181831.33IIVWPe028331@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: c330a185b7a7 - main - locate: Use C89 function definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c330a185b7a781e3fc805992a618fcf4764825ec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c330a185b7a781e3fc805992a618fcf4764825ec commit c330a185b7a781e3fc805992a618fcf4764825ec Author: John Baldwin AuthorDate: 2023-04-18 18:27:08 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:27:08 +0000 locate: Use C89 function definitions. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39526 --- usr.bin/locate/locate/fastfind.c | 15 +++------------ usr.bin/locate/locate/util.c | 15 +++++---------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/usr.bin/locate/locate/fastfind.c b/usr.bin/locate/locate/fastfind.c index 2300d17cff00..f9c708b59509 100644 --- a/usr.bin/locate/locate/fastfind.c +++ b/usr.bin/locate/locate/fastfind.c @@ -40,9 +40,7 @@ #define _LOCATE_STATISTIC_ void -statistic (fp, path_fcodes) - FILE *fp; /* open database */ - char *path_fcodes; /* for error message */ +statistic (FILE *fp, char *path_fcodes) { long lines, chars, size, size_nbg, big, zwerg, umlaut; u_char *p, *s; @@ -128,11 +126,7 @@ fastfind_mmap_icase #else fastfind_mmap #endif /* FF_ICASE */ -(pathpart, paddr, len, database) - char *pathpart; /* search string */ - caddr_t paddr; /* mmap pointer */ - off_t len; /* length of database */ - char *database; /* for error message */ +(char *pathpart, caddr_t paddr, off_t len, char *database) #else /* MMAP */ @@ -144,10 +138,7 @@ fastfind_icase fastfind #endif /* FF_ICASE */ -(fp, pathpart, database) - FILE *fp; /* open database */ - char *pathpart; /* search string */ - char *database; /* for error message */ +(FILE *fp, char *pathpart, char *database) #endif /* MMAP */ diff --git a/usr.bin/locate/locate/util.c b/usr.bin/locate/locate/util.c index 13f733314a78..545f2097b900 100644 --- a/usr.bin/locate/locate/util.c +++ b/usr.bin/locate/locate/util.c @@ -58,8 +58,7 @@ int check_bigram_char(int); * or the database is obviously not a locate database. */ int -check_bigram_char(ch) - int ch; +check_bigram_char(int ch) { /* legal bigram: 0, ASCII_MIN ... ASCII_MAX */ if (ch == 0 || @@ -138,8 +137,7 @@ colon(char **dbv, char *path, char *dot) static char globfree[100]; char * -patprep(name) - char *name; +patprep(char *name) { char *endmark, *p, *subp; @@ -192,8 +190,7 @@ patprep(name) /* tolower word */ u_char * -tolower_word(word) - u_char *word; +tolower_word(u_char *word) { u_char *p; @@ -215,8 +212,7 @@ tolower_word(word) */ int -getwm(p) - caddr_t p; +getwm(caddr_t p) { union { char buf[INTSIZE]; @@ -252,8 +248,7 @@ getwm(p) */ int -getwf(fp) - FILE *fp; +getwf(FILE *fp) { int word, hword; int i_max = LOCATE_PATH_MAX + OFFSET; From nobody Tue Apr 18 18:31: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 4Q1CDm3r5mz45TmQ; Tue, 18 Apr 2023 18:31: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 4Q1CDl4j3Lz41fZ; Tue, 18 Apr 2023 18:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bqnkr9UI1P4AjCcNXGG5GXE3fyi+4KNraW5xOu72THU=; b=j02SsbxN7jgUvtRwJDZ9+93GLUP9zDP4phdHcyDlhGRAWVLhwLIb9K2Ne+OV7J3AKg327l 8cUeHivEN3Zr7+onx77gbPX1cxGIRyIJ7176qXYRUsm/fDjhfF0rgUz4hEhopqSccZtT9C FSvthGWtaliAxlu+C878qGT4A0tHkdqDKU20koAkQwk3qJ0I2ZmnC/oBD5HkeaCZsoLJIa q5OkVXtk8lAGRP1L1+CUKLfC8+PhVgv30s4pXqkCrWc1gLupvjnxsg0mfyKblp7kxlluVn jSuumWoak99X2E9a6MyCOG1Vdhbb5ehgf9aUYBQZpeNZrE00GeyNxdBDqeyKpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bqnkr9UI1P4AjCcNXGG5GXE3fyi+4KNraW5xOu72THU=; b=St3+GWE0wKBIv/bo2ktakCqm1LWTnhbmIPs+nu4GPFh+68MvGC5k7hZrYNMmb6UblLLxF4 qBcvutITzoOeEPv/+W4Sr0RpxbVgoekroxCNdNdZJt5so/NP6VvDCXDHVzf7huNBzSAT+t JGrUw7LOC/hFBYIvFU5LdU/7asi74M++cP4BW7alrN8FSyirJeQ50DGNaXUt4/D3kbUOLu 0lKQ9UNTpJ1cFsBhw7tZOVh6zmAovU5VaGwJ/ngGMEvxS+kLGuXNrZV3C0LvY8ZnERP61y KsOUTyBvY4tDwqFCpc82M8h/g2cK6+hbKKE232Kk5J6t4lhVDo3DoxHHpBc2AA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842696; a=rsa-sha256; cv=none; b=UmELaik+KWPMSomn7YkPx8/bBF1nbkDpUI4qMlIpnz4Z4edMEoxRSjlCTPGxFMCL0WtDdW y8u4dMWwLQpjoVnzM9Sm2G4NC01YK55FIM8xbq8DzCBIdmip5QbD2LidVVPfkCPFM050GZ nLP7xP5L+d4+ut0dsw4FdWRHudAVL2UAz/G8dotWdaftZwjNUksLIFjW3TQ/BMIR9kMPuD 9TBTrZyUfaoKxnAyMSQIzhVER08gCsxtP4wlX3VvBW3rHmFe6ZlseCsPoPzdPTvFrsSLRE EY/ooC/pgvFZ5fY5aRtm2w4hM05sk3mhx6QjBT65Jd70Oq+Bfe5bxyMISk/sOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDl1gC3zNQj; Tue, 18 Apr 2023 18:31: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 33IIVZFf028377; Tue, 18 Apr 2023 18:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVZBu028376; Tue, 18 Apr 2023 18:31:35 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:35 GMT Message-Id: <202304181831.33IIVZBu028376@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: 11af9d24779f - main - telnet: Use C89 function definitions for two stragglers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 11af9d24779f4000990938ca92cac2424f63ddb6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=11af9d24779f4000990938ca92cac2424f63ddb6 commit 11af9d24779f4000990938ca92cac2424f63ddb6 Author: John Baldwin AuthorDate: 2023-04-18 18:27:47 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:27:47 +0000 telnet: Use C89 function definitions for two stragglers. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39528 --- contrib/telnet/telnet/commands.c | 3 +-- contrib/telnet/telnet/ring.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/contrib/telnet/telnet/commands.c b/contrib/telnet/telnet/commands.c index 6414a120ea92..dbc06a10b9c6 100644 --- a/contrib/telnet/telnet/commands.c +++ b/contrib/telnet/telnet/commands.c @@ -423,8 +423,7 @@ send_docmd(char *name) } static int -send_dontcmd(name) - char *name; +send_dontcmd(char *name) { return(send_tncmd(send_dont, "dont", name)); } diff --git a/contrib/telnet/telnet/ring.c b/contrib/telnet/telnet/ring.c index efae2e18c1b7..138e3c661045 100644 --- a/contrib/telnet/telnet/ring.c +++ b/contrib/telnet/telnet/ring.c @@ -306,9 +306,8 @@ ring_encrypt(Ring *ring, void (*encryptor)(unsigned char *, int)) ring->clearto = ring->supply; } - void -ring_clearto(ring) - Ring *ring; +void +ring_clearto(Ring *ring) { if (!ring_empty(ring)) ring->clearto = ring->supply; From nobody Tue Apr 18 18:31: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 4Q1CDm4GWrz45TXR; Tue, 18 Apr 2023 18:31: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 4Q1CDl49Trz41fV; Tue, 18 Apr 2023 18:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Rid4+BrejhnkRIbPmxvq477nd1Sn7keAngQ7JmtPis=; b=r4hOxTdLwOTrk9ZAVsT7Rg9mH7kxlzme3lkTfr/N9/LyG/7j0zeCqN6KiHlbleDntKxf8p k1k6ep6aVZQEramUCqHtONa2p0LXi9lmhJlohBVQ4juKNWtWOUCpIcaRSWGXHwpNrenC5L GnZ7RMeQsk36Nr6iZHlSM5qb950SnZQeHJkA33AhR0RM89DGLwM9Q2kvy/XZ9CC3E/TbXw bW6uwTmHC9Ei/TFWenF2LrrOGDMP0KFwaSvmDzD/8Yp+jVul6M7+AlP3kzS4oqH+HPevzJ p0Cd4zZzCRWJEQXvypZu52/fKj8Vd0DFOXm58DT+DrzUqYv6QvCk/sAnwIo8GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Rid4+BrejhnkRIbPmxvq477nd1Sn7keAngQ7JmtPis=; b=LFDwU7LorD74F4M20sBStJoyW9YoV05Unb47UhMqrEbr9/ZG5ACbk7g+p+x+89QRVqMzt4 3SVCe7yW7c0TsxRU0UCVet2qdCS8QlsWwqd1sU6kGa/U3SBAtFuKNqNne+UmVMl/MZ0leP j9Tk4JvRzy31925ikQ5PbEdauM5Q0K16qKghBC3T+DU96wG4eEyF5jdM++1qbB7F1o9jyP 6qr6dzhNUZ8kApgyDg+/7VpamcxiG1Gdp9/B3G/iKX30MaowSWY8lNoR3UUTGo7IRIJ0ri KX8lYvkyi/5VFsGnbkwu2hTBOa7lEIEIH9pbSJrk8NsZHcnP4/sLMzc6M9Kf4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842695; a=rsa-sha256; cv=none; b=INEk8IojN93ptl0wCn1SVcqCuShTkUp6QHRwh/+8gYUned9LIGBRIBFnRbbk8GmsbR2gQa KFcDrxwT9rWMmPiuQKFWVxxluyFlt4zktrPBOdlwWBjnD+Q9+BTwPElGTzRux9wvlycMUE kTd1RBzdRTYiEPahOwsOETZYWNsRUTvEswZL5iF7YcPZWQ4IW11TiCy7uktYfTLr4eb65F 18wBB5ohqogVXEGJq6CnupppPEHxqRWClYHIdPnuyJ7+FnHVTTmTH4ITy2j8g+KjLqlsWN vMYzMRrJkkz6yn0OHcHC4R4TMS4keGKGEmSuJnrxNykBryBHid2HYOOh6Hptsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDk16HKzMpD; Tue, 18 Apr 2023 18:31: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 33IIVYNK028351; Tue, 18 Apr 2023 18:31:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVYhn028350; Tue, 18 Apr 2023 18:31:34 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:34 GMT Message-Id: <202304181831.33IIVYhn028350@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: d28a95513e4f - main - mail: Use a C89 function pointer type for command 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d28a95513e4fc1bb11dedba7ea7a8eabf79fbfe4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d28a95513e4fc1bb11dedba7ea7a8eabf79fbfe4 commit d28a95513e4fc1bb11dedba7ea7a8eabf79fbfe4 Author: John Baldwin AuthorDate: 2023-04-18 18:27:29 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:27:29 +0000 mail: Use a C89 function pointer type for command functions. The command function is defined to always take a void *. Functions which accept a pointer to an array of pointers use a local temporary 'argv' assigned from the void *arg. Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D39527 --- usr.bin/mail/cmd1.c | 6 +++--- usr.bin/mail/cmd2.c | 5 +++-- usr.bin/mail/cmd3.c | 26 +++++++++++++++----------- usr.bin/mail/collect.c | 2 +- usr.bin/mail/def.h | 2 +- usr.bin/mail/edit.c | 4 ++-- usr.bin/mail/extern.h | 44 ++++++++++++++++++++++---------------------- usr.bin/mail/lex.c | 2 +- usr.bin/mail/quit.c | 2 +- usr.bin/mail/send.c | 2 +- usr.bin/mail/util.c | 3 ++- 11 files changed, 52 insertions(+), 46 deletions(-) diff --git a/usr.bin/mail/cmd1.c b/usr.bin/mail/cmd1.c index cace03df9aab..0689c1eb0cb5 100644 --- a/usr.bin/mail/cmd1.c +++ b/usr.bin/mail/cmd1.c @@ -211,7 +211,7 @@ printhead(int mesg) * Print out the value of dot. */ int -pdot(void) +pdot(void *arg __unused) { printf("%td\n", dot - &message[0] + 1); return (0); @@ -221,7 +221,7 @@ pdot(void) * Print out all the possible commands. */ int -pcmdlist(void) +pcmdlist(void *arg __unused) { extern const struct cmd cmdtab[]; const struct cmd *cp; @@ -439,7 +439,7 @@ mboxit(void *v) * List the folders the user currently has. */ int -folders(void) +folders(void *arg __unused) { char dirname[PATHSIZE]; char *cmd; diff --git a/usr.bin/mail/cmd2.c b/usr.bin/mail/cmd2.c index 08b7a252b974..2c0f8d55e299 100644 --- a/usr.bin/mail/cmd2.c +++ b/usr.bin/mail/cmd2.c @@ -360,7 +360,7 @@ undeletecmd(void *v) * Interactively dump core on "core" */ int -core(void) +core(void *arg __unused) { int pid; @@ -386,8 +386,9 @@ core(void) * Clobber as many bytes of stack as the user requests. */ int -clobber(char **argv) +clobber(void *arg) { + char **argv = arg; int times; if (argv[0] == 0) diff --git a/usr.bin/mail/cmd3.c b/usr.bin/mail/cmd3.c index 68afbaa56913..2b4a20b96bb5 100644 --- a/usr.bin/mail/cmd3.c +++ b/usr.bin/mail/cmd3.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); * and forking a sh -c */ int -shell(char *str) +shell(void *str) { sig_t sigint = signal(SIGINT, SIG_IGN); char *sh; @@ -74,7 +74,7 @@ shell(char *str) */ /*ARGSUSED*/ int -dosh(char *str __unused) +dosh(void *str __unused) { sig_t sigint = signal(SIGINT, SIG_IGN); char *sh; @@ -146,7 +146,7 @@ overf: */ int -help(void) +help(void *arg __unused) { int c; FILE *f; @@ -530,7 +530,7 @@ diction(const void *a, const void *b) /*ARGSUSED*/ int -null(int e __unused) +null(void *arg __unused) { return (0); } @@ -540,8 +540,9 @@ null(int e __unused) * the current file. */ int -file(char **argv) +file(void *arg) { + char **argv = arg; if (argv[0] == NULL) { newfileinfo(0); @@ -557,8 +558,9 @@ file(char **argv) * Expand file names like echo */ int -echo(char **argv) +echo(void *arg) { + char **argv = arg; char **ap, *cp; for (ap = argv; *ap != NULL; ap++) { @@ -574,7 +576,7 @@ echo(char **argv) } int -Respond(int *msgvec) +Respond(void *msgvec) { if (value("Replyall") == NULL && value("flipr") == NULL) return (doRespond(msgvec)); @@ -625,8 +627,9 @@ doRespond(int msgvec[]) * .mailrc and do some things if sending, others if receiving. */ int -ifcmd(char **argv) +ifcmd(void *arg) { + char **argv = arg; char *cp; if (cond != CANY) { @@ -656,7 +659,7 @@ ifcmd(char **argv) * flip over the conditional flag. */ int -elsecmd(void) +elsecmd(void *arg __unused) { switch (cond) { @@ -684,7 +687,7 @@ elsecmd(void) * End of if statement. Just set cond back to anything. */ int -endifcmd(void) +endifcmd(void *arg __unused) { if (cond == CANY) { @@ -699,8 +702,9 @@ endifcmd(void) * Set the list of alternate names. */ int -alternates(char **namelist) +alternates(void *arg) { + char **namelist = arg; int c; char **ap, **ap2, *cp; diff --git a/usr.bin/mail/collect.c b/usr.bin/mail/collect.c index d56f460a8690..e8249a10f867 100644 --- a/usr.bin/mail/collect.c +++ b/usr.bin/mail/collect.c @@ -199,7 +199,7 @@ cont: /* * Dump core. */ - core(); + core(NULL); break; case '!': /* diff --git a/usr.bin/mail/def.h b/usr.bin/mail/def.h index 02b84478456b..fd41081797c6 100644 --- a/usr.bin/mail/def.h +++ b/usr.bin/mail/def.h @@ -106,7 +106,7 @@ struct message { */ struct cmd { const char *c_name; /* Name of command */ - int (*c_func)(); /* Implementor of the command */ + int (*c_func)(void *); /* Implementor of the command */ short c_argtype; /* Type of arglist (see below) */ short c_msgflag; /* Required flags of messages */ short c_msgmask; /* Relevant flags of messages */ diff --git a/usr.bin/mail/edit.c b/usr.bin/mail/edit.c index e8d6fcb12ccc..bc7f4beb29fb 100644 --- a/usr.bin/mail/edit.c +++ b/usr.bin/mail/edit.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); * Edit a message list. */ int -editor(int *msgvec) +editor(void *msgvec) { return (edit1(msgvec, 'e')); @@ -61,7 +61,7 @@ editor(int *msgvec) * Invoke the visual editor on a message list. */ int -visual(int *msgvec) +visual(void *msgvec) { return (edit1(msgvec, 'v')); diff --git a/usr.bin/mail/extern.h b/usr.bin/mail/extern.h index aa31733dd26a..4f06f77f18a2 100644 --- a/usr.bin/mail/extern.h +++ b/usr.bin/mail/extern.h @@ -75,12 +75,12 @@ char *yanklogin(char *, char *); int Fclose(FILE *); int More(void *); int Pclose(FILE *); -int Respond(int *); +int Respond(void *); int Type(void *); int doRespond(int *); int dorespond(int *); void alter(char *); -int alternates(char **); +int alternates(void *); void announce(void); int append(struct message *, FILE *); int argcount(char **); @@ -90,7 +90,7 @@ void brokpipe(int); int charcount(char *, int); int check(int, int); void clob1(int); -int clobber(char **); +int clobber(void *); void close_all_files(void); int cmatch(char *, char *); void collhup(int); @@ -98,32 +98,32 @@ void collint(int); void collstop(int); void commands(void); int copycmd(void *v); -int core(void); +int core(void *); int count(struct name *); int deletecmd(void *); int delm(int *); int deltype(void *); void demail(void); int diction(const void *, const void *); -int dosh(char *); -int echo(char **); +int dosh(void *); +int echo(void *); int edit1(int *, int); -int editor(int *); +int editor(void *); void edstop(void); -int elsecmd(void); -int endifcmd(void); +int elsecmd(void *); +int endifcmd(void *); int evalcol(int); int execute(char *, int); int exwrite(char *, FILE *, int); void fail(const char *, const char *); -int file(char **); +int file(void *); struct grouphead * findgroup(char *); void findmail(char *, char *, int); int first(int, int); void fixhead(struct header *, struct name *); void fmt(const char *, struct name *, FILE *, int); -int folders(void); +int folders(void *); int forward(char *, FILE *, char *, int); void free_child(int); int from(void *); @@ -139,9 +139,9 @@ void hangup(int); int hash(const char *); void hdrstop(int); int headers(void *); -int help(void); +int help(void *); void holdsigs(void); -int ifcmd(char **); +int ifcmd(void *); int igcomp(const void *, const void *); int igfield(void *); int ignore1(char **, struct ignoretab *, const char *); @@ -178,10 +178,10 @@ int metamess(int, int); int more(void *); int newfileinfo(int); int next(void *); -int null(int); +int null(void *); void parse(char *, struct headline *, char *); -int pcmdlist(void); -int pdot(void); +int pcmdlist(void *); +int pdot(void *); void prepare_child(sigset_t *, int, int); int preserve(void *); void prettyprint(struct name *); @@ -189,9 +189,9 @@ void printgroup(char *); void printhead(int); int puthead(struct header *, FILE *, int); int putline(FILE *, char *, int); -int pversion(int); +int pversion(void *); void quit(void); -int quitcmd(void); +int quitcmd(void *); int readline(FILE *, char *, int); void register_file(FILE *, int, int); void regret(int); @@ -213,16 +213,16 @@ int schdir(void *); int screensize(void); int scroll(void *); int sendmessage(struct message *, FILE *, struct ignoretab *, char *); -int sendmail(char *); +int sendmail(void *); int set(void *); int setfile(char *); void setmsize(int); void setptr(FILE *, off_t); void setscreensize(void); -int shell(char *); +int shell(void *); void sigchild(int); void sort(char **); -int source(char **); +int source(void *); void spreserve(void); void sreset(void); int start_command(char *, sigset_t *, int, int, ...); @@ -245,7 +245,7 @@ void unregister_file(FILE *); int unset(void *); int unstack(void); void vfree(char *); -int visual(int *); +int visual(void *); int wait_child(int); int wait_command(int); int writeback(FILE *); diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c index 77004e52f28c..dfca9edeab8e 100644 --- a/usr.bin/mail/lex.c +++ b/usr.bin/mail/lex.c @@ -672,7 +672,7 @@ newfileinfo(int omsgCount) */ int -pversion(int e __unused) +pversion(void *arg __unused) { printf("Version %s\n", version); diff --git a/usr.bin/mail/quit.c b/usr.bin/mail/quit.c index 7b44f386bd53..e9d93285c65e 100644 --- a/usr.bin/mail/quit.c +++ b/usr.bin/mail/quit.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); * The "quit" command. */ int -quitcmd(void) +quitcmd(void *arg __unused) { /* * If we are sourcing, then return 1 so execute() can handle it. diff --git a/usr.bin/mail/send.c b/usr.bin/mail/send.c index 70bc5261f805..702dbd031216 100644 --- a/usr.bin/mail/send.c +++ b/usr.bin/mail/send.c @@ -268,7 +268,7 @@ mail(struct name *to, struct name *cc, struct name *bcc, struct name *smopts, * the mail routine below. */ int -sendmail(char *str) +sendmail(void *str) { struct header head; diff --git a/usr.bin/mail/util.c b/usr.bin/mail/util.c index 558b47245c77..7187d1b520f9 100644 --- a/usr.bin/mail/util.c +++ b/usr.bin/mail/util.c @@ -265,8 +265,9 @@ static struct sstack sstack[SSTACK_SIZE]; * that they are no longer reading from a tty (in all probability). */ int -source(char **arglist) +source(void *arg) { + char **arglist = arg; FILE *fi; char *cp; From nobody Tue Apr 18 18:31: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 4Q1CDn1FRyz45Tbn; Tue, 18 Apr 2023 18:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1CDm43n4z41lS; Tue, 18 Apr 2023 18:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xS5KoRzVaFqKtYBBTfL8mSSYgnAxJVpGAU3rqO/Uwwo=; b=J6DprnqFbeEvVhwVFfbdLY63TkAFnBn+IbG+zhx+MlDLSOmkLJ0uiTlkysEtd9GZTWOvCT Xu3d7A/TEiXyZz7oI/UmwozKJcl/8OF4gSLXhKk4Oyl60fPjFeFC7uxN2KC8gSHKAZF3A/ A1/B6GWSUDKqDDbBOY/HGo/XAwPP0k0lvN7mHFd4h4OC04M2WQeVzlO4g5gts2lGS6RxnT cI3mAUxlK59KZ9Cg4hMofPkPEScbesMmw/kion0JcrizevaoZLGW6M0umKCyJUW1N9smJM BgfW93WQsEesevQMHDcu6kSlzqbFceCExnPaAC4Vf5HEnGOgM0DANVKxqY07Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xS5KoRzVaFqKtYBBTfL8mSSYgnAxJVpGAU3rqO/Uwwo=; b=ux+rFLhb6JFc3O+lnLwPvb9NUihUc7/ylD7ABGphHn+nHkAl/JvKKtOK3hKymiHXXv3eGj 9UnR+6uxXsfq0XN0cvwK7zyOFvLddWKYHCLP90W1Mi5HNcZ5J6t2fBL2znXIxE+qZncO4e jWBaFfkA9DTSV9hVFr5YMHnag7Ww8B7rPxR/qNqDUVIiizTJmI6S/Vb141mNSncH4UaCh+ 4Tlzi2mC7lxVqCZBRkBpliHOgGVRFHciBtDhVlw1NGNAm5/CvJeT2k4ubLK0ViIkFGaqet ycIY6FDU8VBzVwDfawszqo0XsyWNI4EJlqyvKEDDbUnsvvoqKAoLIyzsd7RkHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842696; a=rsa-sha256; cv=none; b=biuycpFxMMmwYvVhgZvpgyqCOj2lryzGyHb8dD10hItPNrLW/HGB/ByxFgocLgutTyP+zP C0D5XNxyTIi3lZB2PyyPoitsWZolpiJCyYc2JOvHjZm8lhCYJwVVhOaluSYAS4TU3CdtM/ c/CFtMN1qm1cEOmoj3rvXPif5M6+2+4jkrUjHInfqMMd66I5WXd1xhbFL1Mm8XUP3ZlnrU eJPMEJPNuJaeR+vPvLSf7wPeaY0q5BCBTCDzS77wzGopu5EhoxiuVivVOf8FVkRokjNfNh /08fIiBR8jJgdbYG25Z5or4mulr5HCNPpziSHQn8CQ9lj6OGNr9xGgoR3mvNtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDm2n9wzNMg; Tue, 18 Apr 2023 18:31: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 33IIVa0k028399; Tue, 18 Apr 2023 18:31:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVahS028398; Tue, 18 Apr 2023 18:31:36 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:36 GMT Message-Id: <202304181831.33IIVahS028398@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: e93f27e3aeb7 - main - cron: Use C89 function definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: e93f27e3aeb7c0778012b7732bc6376e20f80427 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e93f27e3aeb7c0778012b7732bc6376e20f80427 commit e93f27e3aeb7c0778012b7732bc6376e20f80427 Author: John Baldwin AuthorDate: 2023-04-18 18:28:07 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:28:07 +0000 cron: Use C89 function definitions. Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D39529 --- usr.sbin/cron/cron/cron.c | 17 +++++-------- usr.sbin/cron/cron/database.c | 25 +++++------------- usr.sbin/cron/cron/do_command.c | 8 ++---- usr.sbin/cron/cron/job.c | 6 ++--- usr.sbin/cron/cron/popen.c | 8 ++---- usr.sbin/cron/cron/user.c | 12 +++------ usr.sbin/cron/crontab/crontab.c | 22 ++++++++-------- usr.sbin/cron/lib/entry.c | 37 ++++++--------------------- usr.sbin/cron/lib/env.c | 20 +++++---------- usr.sbin/cron/lib/misc.c | 56 ++++++++++++++--------------------------- 10 files changed, 66 insertions(+), 145 deletions(-) diff --git a/usr.sbin/cron/cron/cron.c b/usr.sbin/cron/cron/cron.c index 460dd58dbd0d..90bae65fd1ee 100644 --- a/usr.sbin/cron/cron/cron.c +++ b/usr.sbin/cron/cron/cron.c @@ -55,7 +55,8 @@ static int dont_daemonize = 0; struct pidfh *pfh; static void -usage() { +usage(void) +{ #if DEBUGGING char **dflags; #endif @@ -98,9 +99,7 @@ open_pidfile(void) } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int runnum; int secres1, secres2; @@ -200,8 +199,7 @@ main(argc, argv) static void -run_reboot_jobs(db) - cron_db *db; +run_reboot_jobs(cron_db *db) { register user *u; register entry *e; @@ -462,8 +460,7 @@ cron_sleep(cron_db *db, int secres) */ static void -cron_clean(db) - cron_db *db; +cron_clean(cron_db *db) { user *u; entry *e; @@ -518,9 +515,7 @@ sighup_handler(int x) static void -parse_args(argc, argv) - int argc; - char *argv[]; +parse_args(int argc, char *argv[]) { int argch; char *endp; diff --git a/usr.sbin/cron/cron/database.c b/usr.sbin/cron/cron/database.c index ce1f916c2042..80b749f8d955 100644 --- a/usr.sbin/cron/cron/database.c +++ b/usr.sbin/cron/cron/database.c @@ -39,8 +39,7 @@ static void process_crontab(char *, char *, char *, void -load_database(old_db) - cron_db *old_db; +load_database(cron_db *old_db) { DIR *dir; struct stat statbuf; @@ -201,9 +200,7 @@ load_database(old_db) void -link_user(db, u) - cron_db *db; - user *u; +link_user(cron_db *db, user *u) { if (db->head == NULL) db->head = u; @@ -216,9 +213,7 @@ link_user(db, u) void -unlink_user(db, u) - cron_db *db; - user *u; +unlink_user(cron_db *db, user *u) { if (u->prev == NULL) db->head = u->next; @@ -233,11 +228,8 @@ unlink_user(db, u) user * -find_user(db, name) - cron_db *db; - char *name; +find_user(cron_db *db, char *name) { - char *env_get(); user *u; for (u = db->head; u != NULL; u = u->next) @@ -248,13 +240,8 @@ find_user(db, name) static void -process_crontab(uname, fname, tabname, statbuf, new_db, old_db) - char *uname; - char *fname; - char *tabname; - struct stat *statbuf; - cron_db *new_db; - cron_db *old_db; +process_crontab(char *uname, char *fname, char *tabname, struct stat *statbuf, + cron_db *new_db, cron_db *old_db) { struct passwd *pw = NULL; int crontab_fd = OK - 1; diff --git a/usr.sbin/cron/cron/do_command.c b/usr.sbin/cron/cron/do_command.c index fcc5a5e3eb2a..13e147e5f3df 100644 --- a/usr.sbin/cron/cron/do_command.c +++ b/usr.sbin/cron/cron/do_command.c @@ -45,9 +45,7 @@ static WAIT_T wait_on_child(PID_T, const char *); extern char *environ; void -do_command(e, u) - entry *e; - user *u; +do_command(entry *e, user *u) { pid_t pid; @@ -86,9 +84,7 @@ do_command(e, u) static void -child_process(e, u) - entry *e; - user *u; +child_process(entry *e, user *u) { int stdin_pipe[2], stdout_pipe[2]; register char *input_data; diff --git a/usr.sbin/cron/cron/job.c b/usr.sbin/cron/cron/job.c index 6d1b1af6e474..7ba7643c2c65 100644 --- a/usr.sbin/cron/cron/job.c +++ b/usr.sbin/cron/cron/job.c @@ -35,9 +35,7 @@ static job *jhead = NULL, *jtail = NULL; void -job_add(e, u) - register entry *e; - register user *u; +job_add(entry *e, user *u) { register job *j; @@ -60,7 +58,7 @@ job_add(e, u) int -job_runqueue() +job_runqueue(void) { register job *j, *jn; register int run = 0; diff --git a/usr.sbin/cron/cron/popen.c b/usr.sbin/cron/cron/popen.c index 44aaa0c990f6..ee8323c49873 100644 --- a/usr.sbin/cron/cron/popen.c +++ b/usr.sbin/cron/cron/popen.c @@ -55,10 +55,7 @@ static PID_T *pids; static int fds; FILE * -cron_popen(program, type, e, pidptr) - char *program, *type; - entry *e; - PID_T *pidptr; +cron_popen(char *program, char *type, entry *e, PID_T *pidptr) { register char *cp; FILE *iop; @@ -226,8 +223,7 @@ pfree: } int -cron_pclose(iop) - FILE *iop; +cron_pclose(FILE *iop) { register int fdes; int omask; diff --git a/usr.sbin/cron/cron/user.c b/usr.sbin/cron/cron/user.c index 16fd61723a86..ce8e08fccf20 100644 --- a/usr.sbin/cron/cron/user.c +++ b/usr.sbin/cron/cron/user.c @@ -29,8 +29,7 @@ static const char rcsid[] = static char *User_name; void -free_user(u) - user *u; +free_user(user *u) { entry *e, *ne; @@ -43,17 +42,14 @@ free_user(u) } static void -log_error(msg) - char *msg; +log_error(char *msg) { log_it(User_name, getpid(), "PARSE", msg); } +/* NULL pw implies syscrontab */ user * -load_user(crontab_fd, pw, name) - int crontab_fd; - struct passwd *pw; /* NULL implies syscrontab */ - char *name; +load_user(int crontab_fd, struct passwd *pw, char *name) { char envstr[MAX_ENVSTR]; FILE *file; diff --git a/usr.sbin/cron/crontab/crontab.c b/usr.sbin/cron/crontab/crontab.c index 53c58403406a..13e8250a1b63 100644 --- a/usr.sbin/cron/crontab/crontab.c +++ b/usr.sbin/cron/crontab/crontab.c @@ -128,9 +128,7 @@ main(int argc, char *argv[]) static void -parse_args(argc, argv) - int argc; - char *argv[]; +parse_args(int argc, char *argv[]) { int argch; char resolved_path[PATH_MAX]; @@ -261,7 +259,8 @@ copy_file(FILE *in, FILE *out) { } static void -list_cmd() { +list_cmd(void) +{ char n[MAX_FNAME]; FILE *f; @@ -282,7 +281,8 @@ list_cmd() { static void -delete_cmd() { +delete_cmd(void) +{ char n[MAX_FNAME]; int ch, first; @@ -308,8 +308,7 @@ delete_cmd() { static void -check_error(msg) - char *msg; +check_error(char *msg) { CheckErrorCount++; fprintf(stderr, "\"%s\":%d: %s\n", Filename, LineNumber-1, msg); @@ -317,7 +316,8 @@ check_error(msg) static void -edit_cmd() { +edit_cmd(void) +{ char n[MAX_FNAME], q[MAX_TEMPSTR], *editor; FILE *f; int t; @@ -502,7 +502,8 @@ edit_cmd() { * -2 on install error */ static int -replace_cmd() { +replace_cmd(void) +{ char n[MAX_FNAME], envstr[MAX_ENVSTR], tn[MAX_FNAME]; FILE *tmp; int ch, eof; @@ -629,7 +630,8 @@ replace_cmd() { static void -poke_daemon() { +poke_daemon(void) +{ #ifdef USE_UTIMES struct timeval tvs[2]; diff --git a/usr.sbin/cron/lib/entry.c b/usr.sbin/cron/lib/entry.c index 2693c9c8d07a..6d8cff847604 100644 --- a/usr.sbin/cron/lib/entry.c +++ b/usr.sbin/cron/lib/entry.c @@ -68,8 +68,7 @@ static char *ecodes[] = void -free_entry(e) - entry *e; +free_entry(entry *e) { #ifdef LOGIN_CAP if (e->class != NULL) @@ -87,11 +86,8 @@ free_entry(e) * otherwise return a pointer to a new entry. */ entry * -load_entry(file, error_func, pw, envp) - FILE *file; - void (*error_func)(char *); - struct passwd *pw; - char **envp; +load_entry(FILE *file, void (*error_func)(char *), struct passwd *pw, + char **envp) { /* this function reads one crontab entry -- the next -- from a file. * it skips any leading blank lines, ignores comments, and returns @@ -517,12 +513,7 @@ load_entry(file, error_func, pw, envp) static char -get_list(bits, low, high, names, ch, file) - bitstr_t *bits; /* one bit per flag, default=FALSE */ - int low, high; /* bounds, impl. offset for bitstr */ - char *names[]; /* NULL or *[] of names for these elements */ - int ch; /* current character being processed */ - FILE *file; /* file being read */ +get_list(bitstr_t *bits, int low, int high, char *names[], int ch, FILE *file) { register int done; @@ -564,12 +555,7 @@ get_list(bits, low, high, names, ch, file) static char -get_range(bits, low, high, names, ch, file) - bitstr_t *bits; /* one bit per flag, default=FALSE */ - int low, high; /* bounds, impl. offset for bitstr */ - char *names[]; /* NULL or names of elements */ - int ch; /* current character being processed */ - FILE *file; /* file being read */ +get_range(bitstr_t *bits, int low, int high, char *names[], int ch, FILE *file) { /* range = number | number "-" number [ "/" number ] */ @@ -651,12 +637,7 @@ get_range(bits, low, high, names, ch, file) static char -get_number(numptr, low, names, ch, file) - int *numptr; /* where does the result go? */ - int low; /* offset applied to result if symbolic enum used */ - char *names[]; /* symbolic names, if any, for enums */ - int ch; /* current character */ - FILE *file; /* source */ +get_number(int *numptr, int low, char *names[], int ch, FILE *file) { char temp[MAX_TEMPSTR], *pc; int len, i, all_digits; @@ -708,11 +689,7 @@ get_number(numptr, low, names, ch, file) static int -set_element(bits, low, high, number) - bitstr_t *bits; /* one bit per flag, default=FALSE */ - int low; - int high; - int number; +set_element(bitstr_t *bits, int low, int high, int number) { Debug(DPARS|DEXT, ("set_element(?,%d,%d,%d)\n", low, high, number)) diff --git a/usr.sbin/cron/lib/env.c b/usr.sbin/cron/lib/env.c index fd358176b124..77fbdf0c2627 100644 --- a/usr.sbin/cron/lib/env.c +++ b/usr.sbin/cron/lib/env.c @@ -25,7 +25,7 @@ static const char rcsid[] = char ** -env_init() +env_init(void) { register char **p = (char **) malloc(sizeof(char *)); @@ -36,8 +36,7 @@ env_init() void -env_free(envp) - char **envp; +env_free(char **envp) { char **p; @@ -49,8 +48,7 @@ env_free(envp) char ** -env_copy(envp) - register char **envp; +env_copy(char **envp) { register int count, i; register char **p; @@ -76,9 +74,7 @@ env_copy(envp) char ** -env_set(envp, envstr) - char **envp; - char *envstr; +env_set(char **envp, char *envstr) { register int count, found; register char **p; @@ -138,9 +134,7 @@ env_set(envp, envstr) * TRUE = was an env setting */ int -load_env(envstr, f) - char *envstr; - FILE *f; +load_env(char *envstr, FILE *f) { long filepos; int fileline; @@ -252,9 +246,7 @@ load_env(envstr, f) char * -env_get(name, envp) - register char *name; - register char **envp; +env_get(char *name, char **envp) { register int len = strlen(name); register char *p, *q; diff --git a/usr.sbin/cron/lib/misc.c b/usr.sbin/cron/lib/misc.c index 6a0b8acbd742..5746bc33ca51 100644 --- a/usr.sbin/cron/lib/misc.c +++ b/usr.sbin/cron/lib/misc.c @@ -51,10 +51,7 @@ static int LogFD = ERR; int -strcmp_until(left, right, until) - char *left; - char *right; - int until; +strcmp_until(char *left, char *right, int until) { register int diff; @@ -77,8 +74,7 @@ strcmp_until(left, right, until) /* strdtb(s) - delete trailing blanks in string 's' and return new length */ int -strdtb(s) - char *s; +strdtb(char *s) { char *x = s; @@ -106,8 +102,7 @@ strdtb(s) int -set_debug_flags(flags) - char *flags; +set_debug_flags(char *flags) { /* debug flags are of the form flag[,flag ...] * @@ -173,7 +168,7 @@ set_debug_flags(flags) void -set_cron_uid() +set_cron_uid(void) { #if defined(BSD) || defined(POSIX) if (seteuid(ROOT_UID) < OK) @@ -186,7 +181,7 @@ set_cron_uid() void -set_cron_cwd() +set_cron_cwd(void) { struct stat sb; @@ -225,8 +220,7 @@ set_cron_cwd() /* get_char(file) : like getc() but increment LineNumber on newlines */ int -get_char(file) - FILE *file; +get_char(FILE *file) { int ch; @@ -240,9 +234,7 @@ get_char(file) /* unget_char(ch, file) : like ungetc but do LineNumber processing */ void -unget_char(ch, file) - int ch; - FILE *file; +unget_char(int ch, FILE *file) { ungetc(ch, file); if (ch == '\n') @@ -257,11 +249,7 @@ unget_char(ch, file) * (4) returns EOF or terminating character, whichever */ int -get_string(string, size, file, terms) - char *string; - int size; - FILE *file; - char *terms; +get_string(char *string, int size, FILE *file, char *terms) { int ch; @@ -282,8 +270,7 @@ get_string(string, size, file, terms) /* skip_comments(file) : read past comment (if any) */ void -skip_comments(file) - FILE *file; +skip_comments(FILE *file) { int ch; @@ -346,8 +333,7 @@ in_file(char *string, FILE *file) * or (neither file exists but user=="root" so it's okay) */ int -allowed(username) - char *username; +allowed(char *username) { FILE *allow, *deny; int isallowed; @@ -471,7 +457,8 @@ log_it(char *username, int xpid, char *event, const char *detail) void -log_close() { +log_close(void) +{ if (LogFD != ERR) { close(LogFD); LogFD = ERR; @@ -484,9 +471,7 @@ log_close() { * (2) it returns a pointer to static storage */ char * -first_word(s, t) - register char *s; /* string we want the first word of */ - register char *t; /* terminators, implicitly including \0 */ +first_word(char *s, char *t) { static char retbuf[2][MAX_TEMPSTR + 1]; /* sure wish C had GC */ static int retsel = 0; @@ -544,9 +529,7 @@ mkprint(register char *dst, register unsigned char *src, register int len) * returns a pointer to malloc'd storage, you must call free yourself. */ char * -mkprints(src, len) - register unsigned char *src; - register unsigned int len; +mkprints(unsigned char *src, unsigned int len) { register char *dst = malloc(len*4 + 1); @@ -562,8 +545,7 @@ mkprints(src, len) * 123456789012345678901234567 */ char * -arpadate(clock) - time_t *clock; +arpadate(time_t *clock) { time_t t = clock ?*clock :time(0L); struct tm *tm = localtime(&t); @@ -588,9 +570,9 @@ arpadate(clock) #ifdef HAVE_SAVED_UIDS static int save_euid; -int swap_uids() { save_euid = geteuid(); return seteuid(getuid()); } -int swap_uids_back() { return seteuid(save_euid); } +int swap_uids(void) { save_euid = geteuid(); return seteuid(getuid()); } +int swap_uids_back(void) { return seteuid(save_euid); } #else /*HAVE_SAVED_UIDS*/ -int swap_uids() { return setreuid(geteuid(), getuid()); } -int swap_uids_back() { return swap_uids(); } +int swap_uids(void) { return setreuid(geteuid(), getuid()); } +int swap_uids_back(void) { return swap_uids(); } #endif /*HAVE_SAVED_UIDS*/ From nobody Tue Apr 18 18:31: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 4Q1CDp0R4Nz45Tgb; Tue, 18 Apr 2023 18:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1CDn5NsYz4205; Tue, 18 Apr 2023 18:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L5LLWyv//wOGdE7RdkHC+inmaYH6lmQ83hNDULG5TlE=; b=RuqsOYk6EepSDDA6ut+i2NJGBGqkDPRt7Ry2i7By7BeMhaYI8pmqbmVrWAD/P+DjT/Uq3E rhl8RGqN/jk/vsa5RQ4JqsEJsJIZh5cWN+IpZ9MZV3fghTQuOo+T31KlTCIT2J9Xor8SwM 52hvMLI9Pr9+/Mu80Ync8RszSzLv7B8IZ6DErjSEPJS0FBK6u6GaPn3qFLSDPDX/BPdMKn mbWdef/KYuucTY5RqbhMWeMBnqvhgaFc09DCRNKjOL3uY7fEab4KGGteYBDcO2H/96fKx6 Nb8seqLSOGHKtRuduDdkqssV1OoPQoZAdqHSdkMqNoKxauHXdKtGrWXL9ZQlNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L5LLWyv//wOGdE7RdkHC+inmaYH6lmQ83hNDULG5TlE=; b=iXMGZ1srYZImOgFzOW0yT1FqMxrCHeDQDeHdNdb4aePvAGsAI+zVTw8Fdx0eVnk66G5dQ+ s2LOk3JKXLH84TbTS2o70zPsnRpANHNJMkRWROdTsX0vLthn4AWZkyxfB/olnpDPQn6V53 6Ca4YyLL/txRWLe3srC2bGAe4DLMheLAbkeKy0HwinELIjmMARXjiSqopSVXQiQWzm3nOp C16iIdnITv+JTyi2H8oeaUGjyNWc92ufl1Wq2u3z7ZHZhe2jw5NubINDv8UpfKb7fLfTFr i6GNh0xnqMyROedIh0QqShU/BG3mDEBPZNJUzN0cUx+ysH8aMj+TfhKqn0YhTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842697; a=rsa-sha256; cv=none; b=QJc17WmlWGD66NuMww2QodRw9yAzhfVhBYZNmvp6bLu8pDA+LpVaX9I4EEuUDfzi9VBP3O wz7hUj278lSo5TTouVstXuGTSjA+i5GRwvvHFocGIap+XvuyMuymtJ8hQwCDdjy+E4lpst Eun4gg0YA29JhJC3unOejr/d258Y7lYNDlspGTtuwu44Bq1uEvCU6ZDE8mN4HXW+NpUkRj khYBz+V8VD9gTS3FVEgRIAuLDCReeRdVnwhwQKzi7t11sKeEHW3wb8SO6VCqWllygeoQcE ArePwkf6Rkeclw83bAJY6uGvhjGYDZ5v/mb6VJEPjjTpwHrKnxmm+WakkjQXWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDn3HY9zNQk; Tue, 18 Apr 2023 18:31: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 33IIVboH028418; Tue, 18 Apr 2023 18:31:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVbgU028417; Tue, 18 Apr 2023 18:31:37 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:37 GMT Message-Id: <202304181831.33IIVbgU028417@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: 2541accb7973 - main - rpc.lockd: Use C89 function definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2541accb79733355bc255c71796a92a219f1cb1f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2541accb79733355bc255c71796a92a219f1cb1f commit 2541accb79733355bc255c71796a92a219f1cb1f Author: John Baldwin AuthorDate: 2023-04-18 18:28:24 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:28:24 +0000 rpc.lockd: Use C89 function definitions. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39530 --- usr.sbin/rpc.lockd/lockd_lock.c | 52 +++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/usr.sbin/rpc.lockd/lockd_lock.c b/usr.sbin/rpc.lockd/lockd_lock.c index 1fc4ce23597a..66ac74bf0cd2 100644 --- a/usr.sbin/rpc.lockd/lockd_lock.c +++ b/usr.sbin/rpc.lockd/lockd_lock.c @@ -235,13 +235,9 @@ debuglog(char const *fmt, ...) } void -dump_static_object(object, size_object, hbuff, size_hbuff, cbuff, size_cbuff) - const unsigned char *object; - const int size_object; - unsigned char *hbuff; - const int size_hbuff; - unsigned char *cbuff; - const int size_cbuff; +dump_static_object(const unsigned char *object, const int size_object, + unsigned char *hbuff, const int size_hbuff, unsigned char *cbuff, + const int size_cbuff) { int i, objectsize; @@ -358,10 +354,8 @@ dump_filelock(const struct file_lock *fl) } void -copy_nlm4_lock_to_nlm4_holder(src, exclusive, dest) - const struct nlm4_lock *src; - const bool_t exclusive; - struct nlm4_holder *dest; +copy_nlm4_lock_to_nlm4_holder(const struct nlm4_lock *src, + const bool_t exclusive, struct nlm4_holder *dest) { dest->exclusive = exclusive; @@ -465,8 +459,8 @@ deallocate_file_lock(struct file_lock *fl) * overlap. */ int -regions_overlap(start1, len1, start2, len2) - const u_int64_t start1, len1, start2, len2; +regions_overlap(const u_int64_t start1, const u_int64_t len1, + const u_int64_t start2, const u_int64_t len2) { u_int64_t d1,d2,d3,d4; enum split_status result; @@ -494,10 +488,9 @@ regions_overlap(start1, len1, start2, len2) * XXX: This DESPERATELY needs a regression test. */ enum split_status -region_compare(starte, lene, startu, lenu, - start1, len1, start2, len2) - const u_int64_t starte, lene, startu, lenu; - u_int64_t *start1, *len1, *start2, *len2; +region_compare(const u_int64_t starte, const u_int64_t lene, + const u_int64_t startu, const u_int64_t lenu, u_int64_t *start1, + u_int64_t *len1, u_int64_t *start2, u_int64_t *len2) { /* * Please pay attention to the sequential exclusions @@ -680,8 +673,7 @@ same_netobj(const netobj *n0, const netobj *n1) * same_filelock_identity: Compares the appropriate bits of a file_lock */ int -same_filelock_identity(fl0, fl1) - const struct file_lock *fl0, *fl1; +same_filelock_identity(const struct file_lock *fl0, const struct file_lock *fl1) { int retval; @@ -919,9 +911,9 @@ delete_nfslock(struct file_lock *fl) } enum split_status -split_nfslock(exist_lock, unlock_lock, left_lock, right_lock) - const struct file_lock *exist_lock, *unlock_lock; - struct file_lock **left_lock, **right_lock; +split_nfslock(const struct file_lock *exist_lock, + const struct file_lock *unlock_lock, struct file_lock **left_lock, + struct file_lock **right_lock) { u_int64_t start1, len1, start2, len2; enum split_status spstatus; @@ -965,11 +957,8 @@ split_nfslock(exist_lock, unlock_lock, left_lock, right_lock) } enum nfslock_status -unlock_nfslock(fl, released_lock, left_lock, right_lock) - const struct file_lock *fl; - struct file_lock **released_lock; - struct file_lock **left_lock; - struct file_lock **right_lock; +unlock_nfslock(const struct file_lock *fl, struct file_lock **released_lock, + struct file_lock **left_lock, struct file_lock **right_lock) { struct file_lock *mfl; /* Matching file lock */ enum nfslock_status retval; @@ -1164,9 +1153,8 @@ unlock_hwlock(const struct file_lock *fl) } enum hwlock_status -test_hwlock(fl, conflicting_fl) - const struct file_lock *fl __unused; - struct file_lock **conflicting_fl __unused; +test_hwlock(const struct file_lock *fl __unused, + struct file_lock **conflicting_fl __unused) { /* @@ -2176,9 +2164,7 @@ notify(const char *hostname, const int state) } void -send_granted(fl, opcode) - struct file_lock *fl; - int opcode __unused; +send_granted(struct file_lock *fl, int opcode __unused) { CLIENT *cli; static char dummy; From nobody Tue Apr 18 18:31: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 4Q1CDp75gJz45Tmb; Tue, 18 Apr 2023 18:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1CDp5mYrz41rt; Tue, 18 Apr 2023 18:31:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rUjjQH8JXQnmXpLAZAoBj514TYhQq2GMipDd5tjT9Y=; b=SiCFygHRUnxDyb1UHevN+KcaM2cNV1O95z/ekY5YBH5UQkEK6LdB+2xF0co/S7RLWqZ2+M ca4xJz64bpHmQ2oOuNstirTIF5w+6yuG0lmxV6/OSh4Jp3MeymzqbrbzDsgQ5AVmvThuic +wxE73ZqzDY4vxue4rXh4EBG5WRSaOWJVxwBxBRqiKCt/sTzasKnpzG8lXSZ4Ibt+LJkBG 71hYbYlG8VTgSOzGIJlt8sGmZWAs7kih/OqEE8z8CxVwWwNxfyUJLpOp84OeW1eo1+qf7T JHGMDJGM3qZeoJqMBkklymMgrbfP7Y5LyfCLX1D9zEtrEipIDAYrnCeYaikjKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rUjjQH8JXQnmXpLAZAoBj514TYhQq2GMipDd5tjT9Y=; b=fV6RHwZpdQDSWTxZ6PdqzLIRBRtalajzWh6B9OGfQRWn2lDSRWxXHNDZ1MtqUwCFCyARDi prv2UWtciVMUzT3hpJvPvA5pzNRG675ovNL/w/gH7FL2jmvjzu3sbFc2A+dQuzOJm+nxJj HJru/o0TyOEA9C2ExWgoJAYpGciLQb3705fVTwnI2pt0rpw10zutgQWDtLz41a6KzTWpGk Gr0OO8ya+tjsUBWceZ4l6+QpJL2q5g6Mr5Us2QxpWZH5A3pnOzv6X9z0+tnf3AtzWFy5zM wwjjeeDuQdBeMQgNuqIDYOOWyzNy1yr9uXBh9weT3G+WieCxPN4sg3WxnBq5UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842698; a=rsa-sha256; cv=none; b=rVAWthmwCsfJqfe1p7R28Sm0l0MDFsYTfeeI5KkhI7x2kryJo9NjieVBAjol4lgEgaPJwf uIyxLdfzt8uhxzTrRZRvT9/qAqXEwxdmZAGEWtKr0C8V+r3g40oeFyOOf3RlQtJhWxOXh5 owJBCSCnPfxMouTgLTw6U7oFYNcZXr1zynzWsdFhD1Y4x0ivs4MaT2S+73BCAhrgY9ZYg3 HchZx/tjEou2pPI6PoWqOJhHh+nfbFKc9cVHClUSgLASAlk/1mXlpQwJfl4r0x4ejgSs6a wNYTVMlLmn+ZoeFZL5SYlhADsiaQMnP/0gL6BIb5uuIIsWGsRoQYOs+5W4RqAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDp4BMyzNQl; Tue, 18 Apr 2023 18:31: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 33IIVcp8028441; Tue, 18 Apr 2023 18:31:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVcob028440; Tue, 18 Apr 2023 18:31:38 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:38 GMT Message-Id: <202304181831.33IIVcob028440@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: 6b06255fbe23 - main - traceroute: Use C89 function definition for one straggler. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 6b06255fbe234e00998e8f57bd26b9c1fd3a3717 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6b06255fbe234e00998e8f57bd26b9c1fd3a3717 commit 6b06255fbe234e00998e8f57bd26b9c1fd3a3717 Author: John Baldwin AuthorDate: 2023-04-18 18:28:41 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:28:41 +0000 traceroute: Use C89 function definition for one straggler. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39531 --- contrib/traceroute/traceroute.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c index e515f8785ba2..48ad8fdc9104 100644 --- a/contrib/traceroute/traceroute.c +++ b/contrib/traceroute/traceroute.c @@ -1347,9 +1347,7 @@ send_probe(int seq, int ttl) #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) int -setpolicy(so, policy) - int so; - char *policy; +setpolicy(int so, char *policy) { char *buf; From nobody Tue Apr 18 18:31: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 4Q1CDr0mYCz45Tgj; Tue, 18 Apr 2023 18:31: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 4Q1CDq6FnGz41sJ; Tue, 18 Apr 2023 18:31:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L887RBjE9vHGnsUujwos0yjwKyBHlc6hME1+fsFUAbU=; b=E3MSLvAUQ4U7sIGm83QAQrLs0nvoQB2d9tjzBBv1gzVnG63fA17qyUxqsUVCtTznDKHZIn NwzqvEIKwve6HWmeymKmCL3xqI5LOLvkmRRRvjNikCmsq4Pub97ZwYBl9xsLzpznHctHe3 fx0B4Pk3ZdKTufjdXGEOiqNgsT9P/HdZ3PL4n5s5FH7iCQDM7B+9uMih0v5A2G3t8oSX/m n5CUs0E8U2aj0vAuL9MbCTeap5NYJLYrluPBSTDUOjv8+EVeFdc/tx58Ime1UHd7SLBpcp DCm4zaLAbNElAzTxfb6SdsQn0E6ZK84rRfwel5gcCAbkReIj6wzdRtEYSeLcMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L887RBjE9vHGnsUujwos0yjwKyBHlc6hME1+fsFUAbU=; b=uPtDPgr5SWHT4vrVKPJ0PuA7dfG7vdhgkA5fyAla/ZRkgkWqWkZC02/VlYPw81KutWz7Ow 0XsiDdiyaCSHg3kMeUwPCymCEWUa4wzSexcKoIwYRobJ5R95TuZBEGuY7Xx8jeaII0hyzw bsUC/OLU0+p0fOOBQBAwz3ld91Sm+nWmudmlCW9je7QZNTX5UQqy9jx1ivUNjD4iMheUSh gNYAKpM92Uam6X4BAYQdISZuVw7N8FuePKuoDsHLGodbQmkhEolSDHrgrEeH65Comz0Chy ICXv7QKkQI4S+epyT+jPtNh0n2OzPkxbpJYgGIAa6BufwM0WKph+zPTY3i+Sbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842699; a=rsa-sha256; cv=none; b=wc+7DGt2MMqwZDqCwBauIIP+Ngs/4+dToLncmPuyd6e3UkL6D8GFL0+4AioTXYZZQSDtvB 6yUfn4/5Pw31v1628T+oRQsG7JFNc8SxirI2WEigyVQRmec7bhJmFqpJXA4HQ7ts2c1AAN qQ8zAtxnP/SgNg72mcjeebmEXdn3vxqZ7RmAuh8rX+e6XZI28iAOAPscKLHsUjAavKFipk JaHVsFIRtULrbEZyKYXzynz7nL+7XiKefW5xexLppbPDoWftPbOlfw46jpNjr6Pj8yQ2H2 wAzxHWynFoD5PC16SQ6//gfz4SjvnOOXn8N2XzDNdP7hts69GCo/u7dtGMfVpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDq57gLzNKL; Tue, 18 Apr 2023 18:31: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 33IIVd2R028460; Tue, 18 Apr 2023 18:31:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVd2e028459; Tue, 18 Apr 2023 18:31:39 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:39 GMT Message-Id: <202304181831.33IIVd2e028459@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: 69b503873858 - main - yp: Use more accurate function pointer types. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 69b50387385884fdc5903e163f3eaa880f394471 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=69b50387385884fdc5903e163f3eaa880f394471 commit 69b50387385884fdc5903e163f3eaa880f394471 Author: John Baldwin AuthorDate: 2023-04-18 18:28:57 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:28:57 +0000 yp: Use more accurate function pointer types. Trim a few duplicate (but incomplete) function prototypes as well. Reviewed by: zlei, imp Differential Revision: https://reviews.freebsd.org/D39532 --- usr.sbin/ypbind/ypbind.c | 34 ++++++++++++++++------------------ usr.sbin/ypserv/common/yplib_host.c | 4 ++-- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index 60d439d32f09..357e35a9a7b6 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -91,10 +91,6 @@ struct _dom_binding { #define WRITEFD ypdb->dom_pipe_fds[1] #define BROADFD broad_domain->dom_pipe_fds[1] -extern bool_t xdr_domainname(), xdr_ypbind_resp(); -extern bool_t xdr_ypreq_key(), xdr_ypresp_val(); -extern bool_t xdr_ypbind_setdom(); - void checkwork(void); void *ypbindproc_null_2_yp(SVCXPRT *, void *, CLIENT *); void *ypbindproc_setdom_2_yp(SVCXPRT *, struct ypbind_setdom *, CLIENT *); @@ -301,21 +297,23 @@ ypbindprog_2(struct svc_req *rqstp, register SVCXPRT *transp) struct ypbind_setdom ypbindproc_setdom_2_arg; } argument; struct authunix_parms *creds; - char *result; - bool_t (*xdr_argument)(), (*xdr_result)(); - char *(*local)(); + void *result; + xdrproc_t xdr_argument, xdr_result; + typedef void *(svc_cb)(SVCXPRT *transp, void *arg, + struct svc_req *rqstp); + svc_cb *local; switch (rqstp->rq_proc) { case YPBINDPROC_NULL: - xdr_argument = xdr_void; - xdr_result = xdr_void; - local = (char *(*)()) ypbindproc_null_2_yp; + xdr_argument = (xdrproc_t)xdr_void; + xdr_result = (xdrproc_t)xdr_void; + local = (svc_cb *)ypbindproc_null_2_yp; break; case YPBINDPROC_DOMAIN: - xdr_argument = xdr_domainname; - xdr_result = xdr_ypbind_resp; - local = (char *(*)()) ypbindproc_domain_2_yp; + xdr_argument = (xdrproc_t)xdr_domainname; + xdr_result = (xdrproc_t)xdr_ypbind_resp; + local = (svc_cb *)ypbindproc_domain_2_yp; break; case YPBINDPROC_SETDOM: @@ -332,9 +330,9 @@ ypbindprog_2(struct svc_req *rqstp, register SVCXPRT *transp) return; } - xdr_argument = xdr_ypbind_setdom; - xdr_result = xdr_void; - local = (char *(*)()) ypbindproc_setdom_2_yp; + xdr_argument = (xdrproc_t)xdr_ypbind_setdom; + xdr_result = (xdrproc_t)xdr_void; + local = (svc_cb *)ypbindproc_setdom_2_yp; break; default: @@ -342,13 +340,13 @@ ypbindprog_2(struct svc_req *rqstp, register SVCXPRT *transp) return; } bzero(&argument, sizeof(argument)); - if (!svc_getargs(transp, (xdrproc_t)xdr_argument, &argument)) { + if (!svc_getargs(transp, xdr_argument, &argument)) { svcerr_decode(transp); return; } result = (*local)(transp, &argument, rqstp); if (result != NULL && - !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) { + !svc_sendreply(transp, xdr_result, result)) { svcerr_systemerr(transp); } return; diff --git a/usr.sbin/ypserv/common/yplib_host.c b/usr.sbin/ypserv/common/yplib_host.c index 05b6e961314a..dfdfda22ffc8 100644 --- a/usr.sbin/ypserv/common/yplib_host.c +++ b/usr.sbin/ypserv/common/yplib_host.c @@ -54,10 +54,10 @@ __FBSDID("$FreeBSD$"); #include "yplib_host.h" +extern bool_t xdr_ypresp_all_seq(XDR *, unsigned long *); + extern int (*ypresp_allfn)(u_long, char *, int, char *, int, void *); extern void *ypresp_data; -extern bool_t xdr_ypreq_key(), xdr_ypresp_val(); -extern bool_t xdr_ypresp_all_seq(); static int _yplib_host_timeout = 10; From nobody Tue Apr 18 18:31: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 4Q1CDs47R0z45Tmj; Tue, 18 Apr 2023 18:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1CDs10x4z422p; Tue, 18 Apr 2023 18:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t0vX2UzGM5XZ2W3xpZu74inhELl0b3G0SnSvRqw5Wwk=; b=W0y6GL1WVlzPfIma2+eZgJCGPgAKo8rfpNeqijKLN2Gsubq6vzg/b6bJtSzk0QWg6xm8wH krmMSWrUl+CJDWwsfIHhHJbK7PEJq8iFVVd7Bw2uInhFe9HkV3zPHCXdp25zykT93mCf5y P2KEtFxT7Ddgb1E4DdHHovYk6z/OPN0Nnmh4u7DuSTVEz+1vEt0MR9J8VLGyaoPF0MhgCz oiiUX2Ju1ar5LHKLzitIWGstKpPqS5Jj21igSOQLhtN2ynQhCg3dBhY+dHiFxzUhBGUmeo 5PYvz1fjhp2Izt7qlwpcUr1L5g2mEE5PnDZ3ib+Q7OXjFqwpQkLkt3komo5Hzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t0vX2UzGM5XZ2W3xpZu74inhELl0b3G0SnSvRqw5Wwk=; b=MjdkdDHukRGKBioOGRbBDj/S0s3edz4WKyr0Xb0Pr4IUxE/SYKkbVZ/fXJQDR98E/RsCc7 /+w5rkl3sgbWjIZx3+AsM2gp3GnGyk7FDb7OwENNDu5tLAjD00OQGqRnJuhGB3TXk87jAq k6jjYbqGPYSCokb13HUvZqmTsaYAl2hbqzIzgxkdAhx0lRKmVj5wSwm649HXsqhKj8uVy/ tOVT1vDWSRfRDnoPh/WwYSd1Rzqa691ksEBO5l0boy/hD0AeFROIppsTvjxxh80Fo+tmdg LAo2/0aJQiFHGDsglLCKeCVNC8D/gF7hluDT3eXa1qgaJK6yHOhJ3stvgKltQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842701; a=rsa-sha256; cv=none; b=FYx2dEfIZN+vB5haRFdey1C6oyv2DebWZioyOhBRb+2QmtvnmSMEHfOawjTcVuM+cuQmLa 6p69f6VQ0BQaWdzKtxC1y7+ShO1oSsWUjucEzQvY9FmxycV3SvhPKFKDCtHsF6kxqCTaVl P+PrfOeQRMZOg7qy5/mk5wZ0t5U5o/+D4C6oUAUHwg2lq5dxq+NCxgx96WIRLTMEDun/r4 5HLgnaIjAmk+wq5nADiyMddF8qieO2RwFQNuTNlyrAY0zvSFpf2yoFeMCVUxYsjWvGAR78 qUhNaY+B5bNsMR70+3n41xc7aF3GRsgWMtmb47qqf7ti7TTZcd4OyytHxZQ3KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDr63y6zNDF; Tue, 18 Apr 2023 18:31: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 33IIVeuD028483; Tue, 18 Apr 2023 18:31:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVewT028482; Tue, 18 Apr 2023 18:31:40 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:40 GMT Message-Id: <202304181831.33IIVewT028482@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: 35a624c54956 - main - keyserv: Use C89 function definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 35a624c54956e5241c555ad5cf71213de02000af Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=35a624c54956e5241c555ad5cf71213de02000af commit 35a624c54956e5241c555ad5cf71213de02000af Author: John Baldwin AuthorDate: 2023-04-18 18:29:27 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:30:51 +0000 keyserv: Use C89 function definitions. Also use more accurate function pointer types, and trim some duplicate (but incomplete) function prototypes. Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D39533 --- usr.sbin/keyserv/crypt_server.c | 9 +---- usr.sbin/keyserv/keyserv.c | 90 ++++++++++++++--------------------------- usr.sbin/keyserv/setkey.c | 87 ++++++++++----------------------------- 3 files changed, 53 insertions(+), 133 deletions(-) diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c index a97c2e1904b3..25f48e978781 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -143,10 +143,7 @@ static void swap_byte(unsigned char *a, unsigned char *b) } /* Dummy _des_crypt function that uses ARCFOUR with a 40 bit key */ -int _arcfour_crypt(buf, len, desp) - char *buf; - int len; - struct desparams *desp; +int _arcfour_crypt(char *buf, int len, struct desparams *desp) { struct arcfour_key arcfourk; @@ -174,9 +171,7 @@ static void *dlhandle; #define LIBCRYPTO "libcrypto.so.2" #endif -void load_des(warn, libpath) - int warn; - char *libpath; +void load_des(int warn, char *libpath) { char dlpath[MAXPATHLEN]; diff --git a/usr.sbin/keyserv/keyserv.c b/usr.sbin/keyserv/keyserv.c index 051521636ce7..7935a72941ae 100644 --- a/usr.sbin/keyserv/keyserv.c +++ b/usr.sbin/keyserv/keyserv.c @@ -83,9 +83,8 @@ static int debugging = 1; static int debugging = 0; #endif -static void keyprogram(); +static void keyprogram(struct svc_req *rqstp, SVCXPRT *transp); static des_block masterkey; -char *getenv(); static char ROOTKEY[] = "/etc/.rootkey"; /* @@ -107,9 +106,7 @@ cryptkeyres *key_decrypt_pk_2_svc_prog( uid_t, cryptkeyarg2 * ); des_block *key_gen_1_svc_prog( void *, struct svc_req * ); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int nflag = 0; int c; @@ -221,8 +218,7 @@ main(argc, argv) * randomize the master key the best we can */ static void -randomize(master) - des_block *master; +randomize(des_block *master) { master->key.low = arc4random(); master->key.high = arc4random(); @@ -234,9 +230,7 @@ randomize(master) * Returns 1 on success. */ static int -getrootkey(master, prompt) - des_block *master; - int prompt; +getrootkey(des_block *master, int prompt) { char *passwd; char name[MAXNETNAMELEN + 1]; @@ -306,8 +300,7 @@ getrootkey(master, prompt) * Procedures to implement RPC service */ char * -strstatus(status) - keystatus status; +strstatus(keystatus status) { switch (status) { case KEY_SUCCESS: @@ -324,9 +317,7 @@ strstatus(status) } keystatus * -key_set_1_svc_prog(uid, key) - uid_t uid; - keybuf key; +key_set_1_svc_prog(uid_t uid, keybuf key) { static keystatus status; @@ -343,9 +334,7 @@ key_set_1_svc_prog(uid, key) } cryptkeyres * -key_encrypt_pk_2_svc_prog(uid, arg) - uid_t uid; - cryptkeyarg2 *arg; +key_encrypt_pk_2_svc_prog(uid_t uid, cryptkeyarg2 *arg) { static cryptkeyres res; @@ -371,9 +360,7 @@ key_encrypt_pk_2_svc_prog(uid, arg) } cryptkeyres * -key_decrypt_pk_2_svc_prog(uid, arg) - uid_t uid; - cryptkeyarg2 *arg; +key_decrypt_pk_2_svc_prog(uid_t uid, cryptkeyarg2 *arg) { static cryptkeyres res; @@ -399,9 +386,7 @@ key_decrypt_pk_2_svc_prog(uid, arg) } keystatus * -key_net_put_2_svc_prog(uid, arg) - uid_t uid; - key_netstarg *arg; +key_net_put_2_svc_prog(uid_t uid, key_netstarg *arg) { static keystatus status; @@ -423,9 +408,7 @@ key_net_put_2_svc_prog(uid, arg) } key_netstres * -key_net_get_2_svc_prog(uid, arg) - uid_t uid; - void *arg; +key_net_get_2_svc_prog(uid_t uid, void *arg) { static key_netstres keynetname; @@ -452,9 +435,7 @@ key_net_get_2_svc_prog(uid, arg) } cryptkeyres * -key_get_conv_2_svc_prog(uid, arg) - uid_t uid; - keybuf arg; +key_get_conv_2_svc_prog(uid_t uid, keybuf arg) { static cryptkeyres res; @@ -480,9 +461,7 @@ key_get_conv_2_svc_prog(uid, arg) cryptkeyres * -key_encrypt_1_svc_prog(uid, arg) - uid_t uid; - cryptkeyarg *arg; +key_encrypt_1_svc_prog(uid_t uid, cryptkeyarg *arg) { static cryptkeyres res; @@ -508,9 +487,7 @@ key_encrypt_1_svc_prog(uid, arg) } cryptkeyres * -key_decrypt_1_svc_prog(uid, arg) - uid_t uid; - cryptkeyarg *arg; +key_decrypt_1_svc_prog(uid_t uid, cryptkeyarg *arg) { static cryptkeyres res; @@ -537,9 +514,7 @@ key_decrypt_1_svc_prog(uid, arg) /* ARGSUSED */ des_block * -key_gen_1_svc_prog(v, s) - void *v; - struct svc_req *s; +key_gen_1_svc_prog(void *v, struct svc_req *s) { struct timeval time; static des_block keygen; @@ -561,9 +536,7 @@ key_gen_1_svc_prog(v, s) } getcredres * -key_getcred_1_svc_prog(uid, name) - uid_t uid; - netnamestr *name; +key_getcred_1_svc_prog(uid_t uid, netnamestr *name) { static getcredres res; static u_int gids[NGROUPS]; @@ -594,9 +567,7 @@ key_getcred_1_svc_prog(uid, name) * RPC boilerplate */ static void -keyprogram(rqstp, transp) - struct svc_req *rqstp; - SVCXPRT *transp; +keyprogram(struct svc_req *rqstp, SVCXPRT *transp) { union { keybuf key_set_1_arg; @@ -613,7 +584,8 @@ keyprogram(rqstp, transp) } argument; char *result; xdrproc_t xdr_argument, xdr_result; - char *(*local) (); + typedef void *(svc_cb)(uid_t uid, void *arg); + svc_cb *local; uid_t uid = -1; int check_auth; @@ -625,49 +597,49 @@ keyprogram(rqstp, transp) case KEY_SET: xdr_argument = (xdrproc_t)xdr_keybuf; xdr_result = (xdrproc_t)xdr_int; - local = (char *(*)()) key_set_1_svc_prog; + local = (svc_cb *)key_set_1_svc_prog; check_auth = 1; break; case KEY_ENCRYPT: xdr_argument = (xdrproc_t)xdr_cryptkeyarg; xdr_result = (xdrproc_t)xdr_cryptkeyres; - local = (char *(*)()) key_encrypt_1_svc_prog; + local = (svc_cb *)key_encrypt_1_svc_prog; check_auth = 1; break; case KEY_DECRYPT: xdr_argument = (xdrproc_t)xdr_cryptkeyarg; xdr_result = (xdrproc_t)xdr_cryptkeyres; - local = (char *(*)()) key_decrypt_1_svc_prog; + local = (svc_cb *)key_decrypt_1_svc_prog; check_auth = 1; break; case KEY_GEN: xdr_argument = (xdrproc_t)xdr_void; xdr_result = (xdrproc_t)xdr_des_block; - local = (char *(*)()) key_gen_1_svc_prog; + local = (svc_cb *)key_gen_1_svc_prog; check_auth = 0; break; case KEY_GETCRED: xdr_argument = (xdrproc_t)xdr_netnamestr; xdr_result = (xdrproc_t)xdr_getcredres; - local = (char *(*)()) key_getcred_1_svc_prog; + local = (svc_cb *)key_getcred_1_svc_prog; check_auth = 0; break; case KEY_ENCRYPT_PK: xdr_argument = (xdrproc_t)xdr_cryptkeyarg2; xdr_result = (xdrproc_t)xdr_cryptkeyres; - local = (char *(*)()) key_encrypt_pk_2_svc_prog; + local = (svc_cb *)key_encrypt_pk_2_svc_prog; check_auth = 1; break; case KEY_DECRYPT_PK: xdr_argument = (xdrproc_t)xdr_cryptkeyarg2; xdr_result = (xdrproc_t)xdr_cryptkeyres; - local = (char *(*)()) key_decrypt_pk_2_svc_prog; + local = (svc_cb *)key_decrypt_pk_2_svc_prog; check_auth = 1; break; @@ -675,21 +647,21 @@ keyprogram(rqstp, transp) case KEY_NET_PUT: xdr_argument = (xdrproc_t)xdr_key_netstarg; xdr_result = (xdrproc_t)xdr_keystatus; - local = (char *(*)()) key_net_put_2_svc_prog; + local = (svc_cb *)key_net_put_2_svc_prog; check_auth = 1; break; case KEY_NET_GET: xdr_argument = (xdrproc_t) xdr_void; xdr_result = (xdrproc_t)xdr_key_netstres; - local = (char *(*)()) key_net_get_2_svc_prog; + local = (svc_cb *)key_net_get_2_svc_prog; check_auth = 1; break; case KEY_GET_CONV: xdr_argument = (xdrproc_t) xdr_keybuf; xdr_result = (xdrproc_t)xdr_cryptkeyres; - local = (char *(*)()) key_get_conv_2_svc_prog; + local = (svc_cb *)key_get_conv_2_svc_prog; check_auth = 1; break; @@ -738,9 +710,7 @@ keyprogram(rqstp, transp) } static int -root_auth(trans, rqstp) - SVCXPRT *trans; - struct svc_req *rqstp; +root_auth(SVCXPRT *trans, struct svc_req *rqstp) { uid_t uid; struct sockaddr *remote; @@ -782,7 +752,7 @@ root_auth(trans, rqstp) } static void -usage() +usage(void) { (void) fprintf(stderr, "usage: keyserv [-n] [-D] [-d] [-v] [-p path]\n"); diff --git a/usr.sbin/keyserv/setkey.c b/usr.sbin/keyserv/setkey.c index a11d04d4babe..d829e68937ef 100644 --- a/usr.sbin/keyserv/setkey.c +++ b/usr.sbin/keyserv/setkey.c @@ -72,7 +72,7 @@ static int nodefaultkeys = 0; * prohibit the nobody key on this machine k (the -d flag) */ void -pk_nodefaultkeys() +pk_nodefaultkeys(void) { nodefaultkeys = 1; } @@ -81,8 +81,7 @@ pk_nodefaultkeys() * Set the modulus for all our Diffie-Hellman operations */ void -setmodulus(modx) - char *modx; +setmodulus(char *modx) { MODULUS = mp_xtom(modx); } @@ -91,9 +90,7 @@ setmodulus(modx) * Set the secretkey key for this uid */ keystatus -pk_setkey(uid, skey) - uid_t uid; - keybuf skey; +pk_setkey(uid_t uid, keybuf skey) { if (!storesecretkey(uid, skey)) { return (KEY_SYSTEMERR); @@ -106,11 +103,7 @@ pk_setkey(uid, skey) * secret key associated with uid. */ keystatus -pk_encrypt(uid, remote_name, remote_key, key) - uid_t uid; - char *remote_name; - netobj *remote_key; - des_block *key; +pk_encrypt(uid_t uid, char *remote_name, netobj *remote_key, des_block *key) { return (pk_crypt(uid, remote_name, remote_key, key, DES_ENCRYPT)); } @@ -120,11 +113,7 @@ pk_encrypt(uid, remote_name, remote_key, key) * secret key associated with uid. */ keystatus -pk_decrypt(uid, remote_name, remote_key, key) - uid_t uid; - char *remote_name; - netobj *remote_key; - des_block *key; +pk_decrypt(uid_t uid, char *remote_name, netobj *remote_key, des_block *key) { return (pk_crypt(uid, remote_name, remote_key, key, DES_DECRYPT)); } @@ -133,9 +122,7 @@ static int store_netname( uid_t, key_netstarg * ); static int fetch_netname( uid_t, key_netstarg * ); keystatus -pk_netput(uid, netstore) - uid_t uid; - key_netstarg *netstore; +pk_netput(uid_t uid, key_netstarg *netstore) { if (!store_netname(uid, netstore)) { return (KEY_SYSTEMERR); @@ -144,9 +131,7 @@ pk_netput(uid, netstore) } keystatus -pk_netget(uid, netstore) - uid_t uid; - key_netstarg *netstore; +pk_netget(uid_t uid, key_netstarg *netstore) { if (!fetch_netname(uid, netstore)) { return (KEY_SYSTEMERR); @@ -159,12 +144,8 @@ pk_netget(uid, netstore) * Do the work of pk_encrypt && pk_decrypt */ static keystatus -pk_crypt(uid, remote_name, remote_key, key, mode) - uid_t uid; - char *remote_name; - netobj *remote_key; - des_block *key; - int mode; +pk_crypt(uid_t uid, char *remote_name, netobj *remote_key, des_block *key, + int mode) { char *xsecret; char xpublic[1024]; @@ -221,10 +202,7 @@ pk_crypt(uid, remote_name, remote_key, key, mode) } keystatus -pk_get_conv_key(uid, xpublic, result) - uid_t uid; - keybuf xpublic; - cryptkeyres *result; +pk_get_conv_key(uid_t uid, keybuf xpublic, cryptkeyres *result) { char *xsecret; char xsecret_hold[1024]; @@ -271,9 +249,7 @@ pk_get_conv_key(uid, xpublic, result) * overwriting the lower order bits by setting parity. */ static void -extractdeskey(ck, deskey) - MINT *ck; - des_block *deskey; +extractdeskey(MINT *ck, des_block *deskey) { MINT *a; short r; @@ -320,9 +296,7 @@ static struct secretkey_netname_list *g_secretkey_netname; * Store the keys and netname for this uid */ static int -store_netname(uid, netstore) - uid_t uid; - key_netstarg *netstore; +store_netname(uid_t uid, key_netstarg *netstore) { struct secretkey_netname_list *new; struct secretkey_netname_list **l; @@ -361,9 +335,7 @@ store_netname(uid, netstore) */ static int -fetch_netname(uid, key_netst) - uid_t uid; - struct key_netstarg *key_netst; +fetch_netname(uid_t uid, struct key_netstarg *key_netst) { struct secretkey_netname_list *l; @@ -389,8 +361,7 @@ fetch_netname(uid, key_netst) } static char * -fetchsecretkey(uid) - uid_t uid; +fetchsecretkey(uid_t uid) { struct secretkey_netname_list *l; @@ -406,9 +377,7 @@ fetchsecretkey(uid) * Store the secretkey for this uid */ static int -storesecretkey(uid, key) - uid_t uid; - keybuf key; +storesecretkey(uid_t uid, keybuf key) { struct secretkey_netname_list *new; struct secretkey_netname_list **l; @@ -437,17 +406,13 @@ storesecretkey(uid, key) } static int -hexdigit(val) - int val; +hexdigit(int val) { return ("0123456789abcdef"[val]); } void -bin2hex(bin, hex, size) - unsigned char *bin; - unsigned char *hex; - int size; +bin2hex(unsigned char *bin, unsigned char *hex, int size) { int i; @@ -458,8 +423,7 @@ bin2hex(bin, hex, size) } static int -hexval(dig) - char dig; +hexval(char dig) { if ('0' <= dig && dig <= '9') { return (dig - '0'); @@ -473,10 +437,7 @@ hexval(dig) } void -hex2bin(hex, bin, size) - unsigned char *hex; - unsigned char *bin; - int size; +hex2bin(unsigned char *hex, unsigned char *bin, int size) { int i; @@ -501,10 +462,7 @@ static struct cachekey_list *g_cachedkeys; * cache result of expensive multiple precision exponential operation */ static void -writecache(pub, sec, deskey) - char *pub; - char *sec; - des_block *deskey; +writecache(char *pub, char *sec, des_block *deskey) { struct cachekey_list *new; @@ -523,10 +481,7 @@ writecache(pub, sec, deskey) * Try to find the common key in the cache */ static int -readcache(pub, sec, deskey) - char *pub; - char *sec; - des_block *deskey; +readcache(char *pub, char *sec, des_block *deskey) { struct cachekey_list *found; register struct cachekey_list **l; From nobody Tue Apr 18 18:31: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 4Q1CDt2Dd0z45Tc2; Tue, 18 Apr 2023 18:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1CDt1Db9z421T; Tue, 18 Apr 2023 18:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vm+TQJmN/xMk7Uj/V+j3uDHZ3KUHsBiyVOJyT8+siWg=; b=llFtkiTdX3NLK/aEde0Ny/imUQfgxGkL6nI0VIygqgRkk/RdbxE8B8DvJDJGjcyVrn816Z aFBOJKX6tNB2RvIv9IvN77Rz1ZVi3cTlxIQtPjEcyul/5F6SHgNHiMzdvUjxcJcqruboi1 FSpWFsijcf6720KkkakQat0p2uVvRBW5xL1ONG3wTUKyUb65Ib0PBVsHAcns3xpvoTxDP6 A83OEr6MINIeAL+HX0KqQzq9AnyI+K/jEgjddbplRCG/C4UDt7kRH1ly5xkHgBAQsjbN3G 5rbqmjKN8LSnlbGKxJOpfoOKUYhE+gQO3D2yXqbYKnOr3CSOuri6kKrFIY9U3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vm+TQJmN/xMk7Uj/V+j3uDHZ3KUHsBiyVOJyT8+siWg=; b=XkYGjJ+luyZV5p/LjMv5uemFa/fFy7A+w5y6EU2cQHmxtlKiCfzqCF2HaT0nM7ow3T1jDP gKXo9jlgkOwgKbaXnmsCRPSJ5b39EA5wkHkZXKQwlzxsIuQTvtvtW2YsPJXWo8d2W9FP8O OXCYQVqkGrcg/QMfFdgQgFp9zLTbkKLEADUrMX+qm82iijLv8b+nuSSmXg7UZpPzGqqR8C Jvs8qVZahUWqyjFBXADYjOMwcmEnq2OOFhjMx7SW6a38XEUpejHSY3OoafgRPAfr7SRHfC Dme6sGIABgkKnBtl5kbGo8VsnDetGejnkr6GZ+Y5CKyC8f+ex4hW7JlztHid7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842702; a=rsa-sha256; cv=none; b=N7g+E5+fLnp5EM+JfO7jnmNQmQudYir7liD8zODr61xk9AYfrKTZ8Dk3Rp8qdzGz2mxJea ZkMIDQPQJfdFnOiEE/30z4XswA4AbWFjikInitqCU8o8PL4e3IosQKi3FzoP3yiSNmdMGe tA3ljK6ASqa1ErAvrFfFeDOGny3jUx/LMBU0bWPIYwrH1e/R1pz7EkCpwYJvPfAVmeBKyo Ca6srHnfkzDiy2O5XC0YjEA557sUSEXZ0YPG97HawBiLtbRciVvRTmhSs7TLtLzINk7/JU Fy8vsaqESnrERNEqePT9RdbpWyp/u5MZmxw/+aEQNmsFOp45lB6AfFTf7R/QCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDs71JvzNKM; Tue, 18 Apr 2023 18:31: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 33IIVfmq028504; Tue, 18 Apr 2023 18:31:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVfjo028503; Tue, 18 Apr 2023 18:31:41 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:41 GMT Message-Id: <202304181831.33IIVfjo028503@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: 274c18c2bde6 - main - pnpinfo: Use C89 function definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 274c18c2bde61f718f4641e9c5698a2d5c0dbc20 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=274c18c2bde61f718f4641e9c5698a2d5c0dbc20 commit 274c18c2bde61f718f4641e9c5698a2d5c0dbc20 Author: John Baldwin AuthorDate: 2023-04-18 18:31:13 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:31:13 +0000 pnpinfo: Use C89 function definitions. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39534 --- contrib/pnpinfo/pnpinfo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/contrib/pnpinfo/pnpinfo.c b/contrib/pnpinfo/pnpinfo.c index 90c273d49364..e13ea0d99f57 100644 --- a/contrib/pnpinfo/pnpinfo.c +++ b/contrib/pnpinfo/pnpinfo.c @@ -110,7 +110,7 @@ DELAY (int i) * Intel May 94." */ void -send_Initiation_LFSR() +send_Initiation_LFSR(void) { int cur, i; @@ -189,8 +189,7 @@ get_resource_info(u_char *buffer, int len) } void -report_dma_info (x) - int x; +report_dma_info(int x) { char *s1=NULL, *s2=NULL, *s3=NULL, *s4=NULL, *s5=NULL; @@ -556,7 +555,7 @@ dump_resdata(u_char *data, int csn) * */ int -isolation_protocol() +isolation_protocol(void) { int csn; u_char data[9]; From nobody Tue Apr 18 18:39: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 4Q1CPY6DLJz45Vfr; Tue, 18 Apr 2023 18:39:13 +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 4Q1CPY44Yrz4JNC; Tue, 18 Apr 2023 18:39:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id ojqTpBMa6uZMSoqERpfvhO; Tue, 18 Apr 2023 18:39:11 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id oqEQpIrbCyAOeoqERpohzC; Tue, 18 Apr 2023 18:39:11 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=643ee3cf a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=dKHAf1wccvYA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=kMQAOnq65MIs5Sg7qTkA: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 B0E3B949; Tue, 18 Apr 2023 11:39:09 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 8522B309; Tue, 18 Apr 2023 11:39:09 -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: John Baldwin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2ac057dd33e8 - main - ipf: Use C89 function definitions. In-reply-to: <202304181831.33IIVUT0027481@gitrepo.freebsd.org> References: <202304181831.33IIVUT0027481@gitrepo.freebsd.org> Comments: In-reply-to John Baldwin message dated "Tue, 18 Apr 2023 18:31:30 +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: Tue, 18 Apr 2023 11:39:09 -0700 Message-Id: <20230418183909.8522B309@slippy.cwsent.com> X-CMAE-Envelope: MS4xfHtUdEI36gaNsx34SD+Z0iCXrIajzwtk0sbFHmFar7s34+n75x7uVXeFv5SCI25tMoWh7BowJ72seB+skcMLqqTrcK5+Xur1MLN2tXOmnneC8/JdfSnJ PKHJpNIjFJQkETAStv6SfGYXV4PUZkIrfVQ07Tex8pDURHDYvFCdnkO5YnJVT2pbaM1Fmu607akJEq84sHCoUSLSBDL3mGjvgRsfu9VnnAOKQcMUK4t17Dzh vo0L2+KuvNifPtUd5j/5Bsl/KPI1fHastMcoQviC9SNcXclIQpcnxzEsIe4n6x4LQESOzfgetIf0/rjWNsKcldbOpLsi6K6aNMhOnGIAxGk= X-Rspamd-Queue-Id: 4Q1CPY44Yrz4JNC 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 <202304181831.33IIVUT0027481@gitrepo.freebsd.org>, John Baldwin writ es: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2ac057dd33e85e3e4ca1095f80bdc009 > 74a1132c > > commit 2ac057dd33e85e3e4ca1095f80bdc00974a1132c > Author: John Baldwin > AuthorDate: 2023-04-18 18:22:28 +0000 > Commit: John Baldwin > CommitDate: 2023-04-18 18:22:28 +0000 > > ipf: Use C89 function definitions. > > Reviewed by: zlei > Differential Revision: https://reviews.freebsd.org/D39523 > --- > sbin/ipf/common/genmask.c | 6 ++---- > sbin/ipf/common/lexer.c | 3 +-- > sbin/ipf/ipf/bpf_filter.c | 18 ++++-------------- > sbin/ipf/ipfstat/ipfstat.c | 3 +-- > sbin/ipf/ipmon/ipmon.c | 5 +---- > sbin/ipf/libipf/mutex_emul.c | 5 +---- > sbin/ipf/libipf/poolio.c | 5 +---- > sbin/ipf/libipf/var.c | 3 +-- > 8 files changed, 12 insertions(+), 36 deletions(-) > > diff --git a/sbin/ipf/common/genmask.c b/sbin/ipf/common/genmask.c > index 5b715cf4c901..a3b912b67ef3 100644 > --- a/sbin/ipf/common/genmask.c > +++ b/sbin/ipf/common/genmask.c > @@ -9,10 +9,8 @@ > #include "ipf.h" > > > -int genmask(family, msk, mskp) > - int family; > - char *msk; > - i6addr_t *mskp; > +int > +genmask(int family, char *msk, i6addr_t *mskp) > { > char *endptr = 0L; > u_32_t addr; > diff --git a/sbin/ipf/common/lexer.c b/sbin/ipf/common/lexer.c > index 16fbb2272034..12ec3c825dd4 100644 > --- a/sbin/ipf/common/lexer.c > +++ b/sbin/ipf/common/lexer.c > @@ -603,8 +603,7 @@ done: > } > > > -static wordtab_t *yyfindkey(key) > - char *key; > +static wordtab_t *yyfindkey(char *key) > { > wordtab_t *w; > > diff --git a/sbin/ipf/ipf/bpf_filter.c b/sbin/ipf/ipf/bpf_filter.c > index fbb0138f51d8..64d416feaf36 100644 > --- a/sbin/ipf/ipf/bpf_filter.c > +++ b/sbin/ipf/ipf/bpf_filter.c > @@ -117,9 +117,7 @@ static int m_xhalf(mb_t *, int, int *); > } > > static int > -m_xword(m, k, err) > - register mb_t *m; > - register int k, *err; > +m_xword(mb_t *m, int k, int *err) > { > register int len; > register u_char *cp, *np; > @@ -153,9 +151,7 @@ m_xword(m, k, err) > } > > static int > -m_xhalf(m, k, err) > - register mb_t *m; > - register int k, *err; > +m_xhalf(mb_t *m, int k, int *err) > { > register int len; > register u_char *cp; > @@ -185,11 +181,7 @@ m_xhalf(m, k, err) > * in all other cases, p is a pointer to a buffer and buflen is its size. > */ > u_int > -bpf_filter(pc, p, wirelen, buflen) > - register struct bpf_insn *pc; > - register u_char *p; > - u_int wirelen; > - register u_int buflen; > +bpf_filter(struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) > { > register u_int32 A, X; > register int k; > @@ -478,9 +470,7 @@ bpf_filter(pc, p, wirelen, buflen) > * Otherwise, a bogus program could easily crash the system. > */ > int > -bpf_validate(f, len) > - struct bpf_insn *f; > - int len; > +bpf_validate(struct bpf_insn *f, int len) > { > u_int i, from; > const struct bpf_insn *p; > diff --git a/sbin/ipf/ipfstat/ipfstat.c b/sbin/ipf/ipfstat/ipfstat.c > index 11b3043f919c..55c876724d4a 100644 > --- a/sbin/ipf/ipfstat/ipfstat.c > +++ b/sbin/ipf/ipfstat/ipfstat.c > @@ -162,8 +162,7 @@ static int sort_dstpt(const void *, const void *); > #endif > > > -static void usage(name) > - char *name; > +static void usage(char *name) > { > #ifdef USE_INET6 > fprintf(stderr, "Usage: %s [-46aAdfghIilnoRsv]\n", name); > diff --git a/sbin/ipf/ipmon/ipmon.c b/sbin/ipf/ipmon/ipmon.c > index f71a33b1034e..4f07dda27e62 100644 > --- a/sbin/ipf/ipmon/ipmon.c > +++ b/sbin/ipf/ipmon/ipmon.c > @@ -470,10 +470,7 @@ read_log(int fd, int *lenp, char *buf, int bufsize) > > > char * > -portlocalname(res, proto, port) > - int res; > - char *proto; > - u_int port; > +portlocalname(int res, char *proto, u_int port) > { > static char pname[8]; > char *s; > diff --git a/sbin/ipf/libipf/mutex_emul.c b/sbin/ipf/libipf/mutex_emul.c > index 3152d2e47013..a7e1c1389901 100644 > --- a/sbin/ipf/libipf/mutex_emul.c > +++ b/sbin/ipf/libipf/mutex_emul.c > @@ -85,10 +85,7 @@ eMmutex_init(eMmutex_t *mtx, char *who, char *file, int li > ne) > > > void > -eMmutex_destroy(mtx, file, line) > - eMmutex_t *mtx; > - char *file; > - int line; > +eMmutex_destroy(eMmutex_t *mtx, char *file, int line) > { > if (mutex_debug & 1) > fprintf(mutex_file, > diff --git a/sbin/ipf/libipf/poolio.c b/sbin/ipf/libipf/poolio.c > index 765d37fae350..f12120fd5467 100644 > --- a/sbin/ipf/libipf/poolio.c > +++ b/sbin/ipf/libipf/poolio.c > @@ -28,10 +28,7 @@ pool_open(void) > } > > int > -pool_ioctl(iocfunc, cmd, ptr) > - ioctlfunc_t iocfunc; > - ioctlcmd_t cmd; > - void *ptr; > +pool_ioctl(ioctlfunc_t iocfunc, ioctlcmd_t cmd, void *ptr) > { > return (*iocfunc)(poolfd, cmd, ptr); > } > diff --git a/sbin/ipf/libipf/var.c b/sbin/ipf/libipf/var.c > index d3a03b6e46d7..47eb5d1595df 100644 > --- a/sbin/ipf/libipf/var.c > +++ b/sbin/ipf/libipf/var.c > @@ -24,8 +24,7 @@ static variable_t *find_var(char *); > static char *expand_string(char *, int); > > > -static variable_t *find_var(name) > - char *name; > +static variable_t *find_var(char *name) > { > variable_t *v; > > Thanks. Looks like I missed some. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue Apr 18 18:49: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 4Q1Cd83DLJz45Vmb; Tue, 18 Apr 2023 18:49: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 4Q1Cd82J28z3Kmw; Tue, 18 Apr 2023 18:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681843756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXGOMESswaXlyct14vb76YY/WLM1x+k507i/ncR/FZk=; b=spJwGzoah8g1wDiK2TmO87njAAQoHawplOo9ZvnN02+C41MwNp5WD9aq1RR/golVWD29lm SPw7jDyCtq9Ppgx8oJjRavWOnEsJOIRxcPOot5mk4NaeuYZKrtkgKpsaEBh6A83OtJM7W/ PhuAMUyIuBtw1/5/UX4TZwx8C7mkEHo09qgD49qEpNSr9jGai1zbQ1pvuwYWLPoJxHOf/O LQhUyFG0zCoNyxIpQA5BeolN70FIBkFLX9QO2epOHeJ7CbmDc6j9dMRoFyYxQ3B3BcMVDn lMpNgVcrRSET3zt5FrQshGDRwB2ehQ04sRvvqOfz7edxJRluicG1pzYDnD8a6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681843756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rXGOMESswaXlyct14vb76YY/WLM1x+k507i/ncR/FZk=; b=ybIrY4sP+ZN38AtZbOcb/WaZJcRJl6J2Mhwjs43LGKJzCpRHJhm+IcaGYRActCUz0V7FJY bTbBzaZD5FoVWtXH6MIRuNBfLy9jsHBgH6oOVdRBPM5rIjOYhZ5JLv6eAGoSCrO2DNB9H6 Sv/C7ql7hobtCVJ8pcASHSnsXXog1QzR2GKoSUydJdC+x9qs3JVeCBfHhkcfmsI1RQM4iB QqJcv+qCJp2H0Q2dhjlh2rPYyek1TV+jzl4ekgzmvfdDG17uab2yoh7WXyu03ezpBhxYN1 7HewhG5jUPiFsy8f3wYztm2FKlLi2PSN3XdrKgVG7GY6UdtPK/k5K4hlTh4aBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681843756; a=rsa-sha256; cv=none; b=nv5wUuX14flqmddR7VOHDL7lWu/JmgyWGi9QR3O9Y2OJVModjaooNRauPHxRBSTMksM2vk tq6Cxu4UNP6tuXWH5wBu+KiJY5KNI05hOOci81iSq12ApxTSOrAqkkTpRKJgU6m9cweETf 3W0Sz7mJo6Q0oeRHWlU6Mdjk/h9sKdd4osmumPT06RspFdVsx0gAbSSnH/jsE6iViA8nGV 2R70EQLMA5DHKmtuQ/WzNxrxHYsR7XUSfn9M71FkK42ymkGO0WYCfxFn4TUniMwCR7YjPk vSnSI2WltbZnjmXa7uTKzxqjic0iJWbC8MG7+XSsH1FdPB3flMUOehaNBOJiOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Cd81M0JzNm8; Tue, 18 Apr 2023 18:49: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 33IInG1R047329; Tue, 18 Apr 2023 18:49:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IInGjI047328; Tue, 18 Apr 2023 18:49:16 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:49:16 GMT Message-Id: <202304181849.33IInGjI047328@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: 21d56b796634 - main - loader.efi: Fix some arm64 PE metadata List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 21d56b796634bda628b149c717461bf88c23677d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=21d56b796634bda628b149c717461bf88c23677d commit 21d56b796634bda628b149c717461bf88c23677d Author: Mark Johnston AuthorDate: 2023-04-18 18:32:04 +0000 Commit: Mark Johnston CommitDate: 2023-04-18 18:36:24 +0000 loader.efi: Fix some arm64 PE metadata - Mark the file as an executable in the COFF header. - Provide separate .text and .data sections. - Provide sane file and section alignment values. These values are the defaults defined in the PE specification. - Set appropriate characteristics for each of .text and .data. This is required for the MS devkit to load our UEFI image. Obtained from: OpenBSD via allanjude MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D37765 --- stand/efi/loader/arch/arm64/ldscript.arm64 | 5 +++- stand/efi/loader/arch/arm64/start.S | 46 ++++++++++++++++-------------- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/stand/efi/loader/arch/arm64/ldscript.arm64 b/stand/efi/loader/arch/arm64/ldscript.arm64 index d0ed320a319c..c10448f4180e 100644 --- a/stand/efi/loader/arch/arm64/ldscript.arm64 +++ b/stand/efi/loader/arch/arm64/ldscript.arm64 @@ -16,7 +16,9 @@ SECTIONS *(.gnu.warning) *(.plt) } =0xD4200000 - . = ALIGN(16); + . = ALIGN(4096); + _etext = .; + __data_start = .; .data : { *(.rodata .rodata.* .gnu.linkonce.r.*) *(.rodata1) @@ -78,6 +80,7 @@ SECTIONS . = ALIGN(16); .dynsym : { *(.dynsym) } _edata = .; + __data_size = . - __data_start; /* Unused sections */ .interp : { *(.interp) } diff --git a/stand/efi/loader/arch/arm64/start.S b/stand/efi/loader/arch/arm64/start.S index 675d4e153f36..0b8537fed30e 100644 --- a/stand/efi/loader/arch/arm64/start.S +++ b/stand/efi/loader/arch/arm64/start.S @@ -34,11 +34,14 @@ #define IMAGE_FILE_MACHINE_ARM64 0xaa64 +#define IMAGE_FILE_EXECUTABLE 0x0002 + #define IMAGE_SCN_CNT_CODE 0x00000020 #define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 #define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 #define IMAGE_SCN_MEM_EXECUTE 0x20000000 #define IMAGE_SCN_MEM_READ 0x40000000 +#define IMAGE_SCN_MEM_WRITE 0x80000000 .section .peheader,"a" efi_start: @@ -60,22 +63,22 @@ coff_head: .long 0 /* No symbol table */ .long 0 /* No symbols */ .short section_table - optional_header /* Optional header size */ - .short 0 /* Characteristics TODO: Fill in */ + .short IMAGE_FILE_EXECUTABLE /* Characteristics */ optional_header: .short 0x020b /* PE32+ (64-bit addressing) */ .byte 0 /* Major linker version */ .byte 0 /* Minor linker version */ - .long _edata - _end_header /* Code size */ - .long 0 /* No initialized data */ + .long _etext - _end_header /* Code size */ + .long __data_size /* Initialized data size */ .long 0 /* No uninitialized data */ .long _start - efi_start /* Entry point */ .long _end_header - efi_start /* Start of code */ optional_windows_header: .quad 0 /* Image base */ - .long 32 /* Section Alignment */ - .long 8 /* File alignment */ + .long 4096 /* Section Alignment */ + .long 512 /* File alignment */ .short 0 /* Major OS version */ .short 0 /* Minor OS version */ .short 0 /* Major image version */ @@ -104,36 +107,37 @@ optional_windows_header: .quad 0 section_table: - /* We need a .reloc section for EFI */ - .ascii ".reloc" + .ascii ".text" + .byte 0 .byte 0 .byte 0 /* Pad to 8 bytes */ - .long 0 /* Virtual size */ - .long 0 /* Virtual address */ - .long 0 /* Size of raw data */ - .long 0 /* Pointer to raw data */ + .long _etext - _end_header /* Virtual size */ + .long _end_header - efi_start /* Virtual address */ + .long _etext - _end_header /* Size of raw data */ + .long _end_header - efi_start /* Pointer to raw data */ .long 0 /* Pointer to relocations */ .long 0 /* Pointer to line numbers */ .short 0 /* Number of relocations */ .short 0 /* Number of line numbers */ - .long (IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | \ - IMAGE_SCN_MEM_DISCARDABLE) /* Characteristics */ + .long (IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | \ + IMAGE_SCN_MEM_READ) /* Characteristics */ - /* The contents of the loader */ - .ascii ".text" + .ascii ".data" .byte 0 .byte 0 .byte 0 /* Pad to 8 bytes */ - .long _edata - _end_header /* Virtual size */ - .long _end_header - efi_start /* Virtual address */ - .long _edata - _end_header /* Size of raw data */ - .long _end_header - efi_start /* Pointer to raw data */ + .long __data_size /* Virtual size */ + .long __data_start - efi_start /* Virtual address */ + .long __data_size /* Size of raw data */ + .long __data_start - efi_start /* Pointer to raw data */ .long 0 /* Pointer to relocations */ .long 0 /* Pointer to line numbers */ .short 0 /* Number of relocations */ .short 0 /* Number of line numbers */ - .long (IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | \ - IMAGE_SCN_MEM_READ) /* Characteristics */ + .long (IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | \ + IMAGE_SCN_MEM_WRITE) /* Characteristics */ + + .align 12 _end_header: .text From nobody Tue Apr 18 19:37: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 4Q1DhK4zHBz45ZCt; Tue, 18 Apr 2023 19:37: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 4Q1DhK4Nshz3H6k; Tue, 18 Apr 2023 19:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681846625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pREfN7qKeXVHEoSHSyffkzcdpF0RU68otgKUfWxkjXw=; b=VT+PBp32P+IxBE+7lEIkXoO8gVbY2/QqxyGivA7HIVZCyXBoKhLCNvu5P24T54BzN26Vpb pQ3pNd1zq7XAH29IwlTow4tdKdhp4zvLJ1RkO1xNmjAamueNOEIHyAXCdbBrwEi403WHai eQ+KOVilbXF8fQBgwnrqrOUdQgSutcZAAjFGzx6nzYp80bmy9dE7N8qKApDH8AeBIJxD/p FFrkMe0vCD4d1meMBJqNpV2nK3PsdonglRIj+9XFUnpxIzcbDq+JoR8n+fRLDnZXyOYFEh S3HTrPHSLdZl4Y7cwtILOtQd/IyAFwAWwjz9miVF6HC/Yy7XGbBU1PE4oFUBqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681846625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pREfN7qKeXVHEoSHSyffkzcdpF0RU68otgKUfWxkjXw=; b=b017tGd1s3+BDl9BnWFq9XnMbLWe4I+hnwZt+P9z+5ujpkoVOVNblcsHP5snHRaA00DBBE 6FybdGnLRXowMx3YF/4MjT5TRFq5KCmej2Zz1RuTg2/qr4he/InlYU2KM397BM+1c5qNpD I5iuNZIqiJi0bpFF9vWp4kMUlVHUUP4wtKtDhvJYH8gXngnKOlml/AUmef14kFr5AdUVow zPhZVC/LVlZUD5ruLHmAMlIVC+Ha+fzEeQFb5QENxXd48q6cgxnC8G4NkIM/PGtViotOV4 /SiB2sLRtREGUrWWfpC7qNo0bBnJRBJSWboaYOLJq5Kgg22OXs1Jc7Dbkotsqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681846625; a=rsa-sha256; cv=none; b=KHWfmSdnDkaVDHOU3Nv2XITZYwPC4FOHsORmcr11uY+iXt1F9oW6SkJNgpsKhX1tevGg5d 9SQ/wkyz7HLfrj7BaPPAJJLQLpUaY1Y1ivog4HwMCNq2mwf5FrsdO9NImJ01VHyhAujOek BFrXCEF6MC5IFi/7RuI2IArwCCTC6tcTZXeFNzPlstYNToH5ha9jUaBwKcd6U19LXtIdLd 05DUDijV/YgK3BV9xBgoMifo5vlxJ3IXqCMg+N8kVGZ50q39b3KoNZhaicHrhighQ3b2Vr d+rLEeWlGHsmhMgWukQ3s503wPv1lf9P4cwShh9Pb09SIOrnwt4KHw9tvrJcxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1DhK31NpzPg3; Tue, 18 Apr 2023 19:37:05 +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 33IJb5Qs029521; Tue, 18 Apr 2023 19:37:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IJb5fl029520; Tue, 18 Apr 2023 19:37:05 GMT (envelope-from git) Date: Tue, 18 Apr 2023 19:37:05 GMT Message-Id: <202304181937.33IJb5fl029520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 8deb442cf7ab - main - mac: Honor order when registering MAC modules. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8deb442cf7ab2b1097a9186c895017a737d84370 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=8deb442cf7ab2b1097a9186c895017a737d84370 commit 8deb442cf7ab2b1097a9186c895017a737d84370 Author: Steve Kiernan AuthorDate: 2023-04-02 22:17:17 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-18 19:36:27 +0000 mac: Honor order when registering MAC modules. Ensure MAC modules are inserted in order that they are registered. Reviewed by: markj Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39589 --- sys/security/mac/mac_framework.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index 8fc67f6c1b85..5231783ab454 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -519,7 +519,8 @@ mac_policy_fastpath_unregister(struct mac_policy_conf *mpc) static int mac_policy_register(struct mac_policy_conf *mpc) { - struct mac_policy_conf *tmpc; + struct mac_policy_list_head *mpc_list; + struct mac_policy_conf *last_mpc, *tmpc; int error, slot, static_entry; error = 0; @@ -539,19 +540,14 @@ mac_policy_register(struct mac_policy_conf *mpc) static_entry = (!mac_late && !(mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_UNLOADOK)); - if (static_entry) { - LIST_FOREACH(tmpc, &mac_static_policy_list, mpc_list) { - if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) { - error = EEXIST; - goto out; - } - } - } else { - LIST_FOREACH(tmpc, &mac_policy_list, mpc_list) { - if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) { - error = EEXIST; - goto out; - } + mpc_list = (static_entry) ? &mac_static_policy_list : + &mac_policy_list; + last_mpc = NULL; + LIST_FOREACH(tmpc, mpc_list, mpc_list) { + last_mpc = tmpc; + if (strcmp(tmpc->mpc_name, mpc->mpc_name) == 0) { + error = EEXIST; + goto out; } } if (mpc->mpc_field_off != NULL) { @@ -567,16 +563,14 @@ mac_policy_register(struct mac_policy_conf *mpc) mpc->mpc_runtime_flags |= MPC_RUNTIME_FLAG_REGISTERED; /* - * If we're loading a MAC module after the framework has initialized, - * it has to go into the dynamic list. If we're loading it before - * we've finished initializing, it can go into the static list with - * weaker locker requirements. + * Some modules may depend on the operations of its dependencies. + * Inserting modules in order of registration ensures operations + * that work on the module list retain dependency order. */ - if (static_entry) - LIST_INSERT_HEAD(&mac_static_policy_list, mpc, mpc_list); + if (last_mpc == NULL) + LIST_INSERT_HEAD(mpc_list, mpc, mpc_list); else - LIST_INSERT_HEAD(&mac_policy_list, mpc, mpc_list); - + LIST_INSERT_AFTER(last_mpc, mpc, mpc_list); /* * Per-policy initialization. Currently, this takes place under the * exclusive lock, so policies must not sleep in their init method. From nobody Tue Apr 18 19:53:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1F3l3pThz45bBl; Tue, 18 Apr 2023 19:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1F3l3MnQz43HT; Tue, 18 Apr 2023 19:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847635; h=from:from:reply-to:subject:subject: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/OZWsA8k+Fcnbf8R06OhIjK/vXKgpmGiLd6LAPmqNI=; b=CM9wkwvYWUid9jzCO7TITO9hCrXYf3Sweeu9t+7vN2xVH09RVjAdFB5mraIC/lcNFiTZsw 5A2z7Jq+u6Gzn5rMTovwQ560jBoBRtanoA6Xl15aVfODi4KKWmyW6iv6/TwR6xAnD13Q/n sFyNfSnwY+CYP02Of+10eDgRIFQv4yQg3X4CIRk+ruFQJh5ZXrd/9ER7Pp8n5FGicXSoMP XxN0bVAtLLadQ2GC8u/muvcL03iCkGzg3C7g+3vg9f0P8gID6Tje+GscGKVsSBFu8Hcbu2 hgL+Ygrqdgd5tL8m06TlEss6k4W+2t7pmPIIhnqTu64P86ns+BXCDZDryHgM6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847635; h=from:from:reply-to:subject:subject: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/OZWsA8k+Fcnbf8R06OhIjK/vXKgpmGiLd6LAPmqNI=; b=gyJ0+QYmBYopkz8UYJW2VDOpq+hDiyW5+L5glJudCtNu6CfIIiRvKYsxK3Vwt/HeHCsd82 FKwI2FQ10TRvLBuYwq+YOuR6HK0+cD+CVqazocAINmmwjf9zIULntViAV8tFcxfdHbgdOJ zkXHZQ1Z5SfFToirO230YmkCG3EdoplMrd32nUTbYI1REaJTNL52PFNflmJ4KUJU7YhOSq 8c0CwQiDaOqYVjDToStdiimyFl7z5ok1tPxOwzrO9Tn1yk+2Jejho+KLnOkDbZA8jqRYs+ y/wLpzxtg6Rt2LTN1OxLvOVtrqps9AMcm7RrzW6+aMWoWt6lZnfM0YFvjaCoLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681847635; a=rsa-sha256; cv=none; b=oYgDTE8WTqRG8sZ0RwCmvbzrWRYoTuugdJdo5OkHSxVGOxVaFVjefg+vPsgWVKi88mJPSW ldaudvwyylwcL5dGwTkTGPYXinxpHfKM8KgwHJUs9QuiH+UJUH+yyQVOVbYsePA5uiAASu Mx0BZKQK6yEfHCy7kwliD0N4edm1VY0LY93+RTigvJRLA50hy9jfW38XgpPw2824mHcXO4 mUCOgeSHyHMkQu8/nYALkr7eEBxYy+Ae769FooUKsZP59mrOG90iDo0zzXb1t/7NhHLdgY V/Rg/DCECHWmNBAgJXUC6fU8kLS6c0LJ+AzWVTOFUlCzHEgAHMY5S5mP+PHQow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1F3l2RWtzQR8; Tue, 18 Apr 2023 19:53: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 33IJrtOi061693; Tue, 18 Apr 2023 19:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IJrtOT061692; Tue, 18 Apr 2023 19:53:55 GMT (envelope-from git) Date: Tue, 18 Apr 2023 19:53:55 GMT Message-Id: <202304181953.33IJrtOT061692@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: 87cc8c6be050 - main - ee: Drop P_() macro used for pre-C89 compatibility. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 87cc8c6be050febeb2288465abcdc1c15bb30571 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=87cc8c6be050febeb2288465abcdc1c15bb30571 commit 87cc8c6be050febeb2288465abcdc1c15bb30571 Author: John Baldwin AuthorDate: 2023-04-18 19:52:44 +0000 Commit: John Baldwin CommitDate: 2023-04-18 19:52:44 +0000 ee: Drop P_() macro used for pre-C89 compatibility. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39669 --- contrib/ee/ee.c | 182 +++++++++++++++++++++++++++----------------------------- 1 file changed, 88 insertions(+), 94 deletions(-) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 5706dba1a20f..3a422c922b2e 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -219,12 +219,6 @@ WINDOW *text_win; WINDOW *help_win; WINDOW *info_win; -#if defined(__STDC__) || defined(__cplusplus) -#define P_(s) s -#else -#define P_(s) () -#endif - /* | The following structure allows menu items to be flexibly declared. @@ -247,98 +241,98 @@ WINDOW *info_win; struct menu_entries { char *item_string; - int (*procedure)P_((struct menu_entries *)); + int (*procedure)(struct menu_entries *); struct menu_entries *ptr_argument; - int (*iprocedure)P_((int)); - void (*nprocedure)P_((void)); + int (*iprocedure)(int); + void (*nprocedure)(void); int argument; }; -int main P_((int argc, char *argv[])); -unsigned char *resiz_line P_((int factor, struct text *rline, int rpos)); -void insert P_((int character)); -void delete P_((int disp)); -void scanline P_((unsigned char *pos)); -int tabshift P_((int temp_int)); -int out_char P_((WINDOW *window, int character, int column)); -int len_char P_((int character, int column)); -void draw_line P_((int vertical, int horiz, unsigned char *ptr, int t_pos, int length)); -void insert_line P_((int disp)); -struct text *txtalloc P_((void)); -struct files *name_alloc P_((void)); -unsigned char *next_word P_((unsigned char *string)); -void prev_word P_((void)); -void control P_((void)); -void emacs_control P_((void)); -void bottom P_((void)); -void top P_((void)); -void nextline P_((void)); -void prevline P_((void)); -void left P_((int disp)); -void right P_((int disp)); -void find_pos P_((void)); -void up P_((void)); -void down P_((void)); -void function_key P_((void)); -void print_buffer P_((void)); -void command_prompt P_((void)); -void command P_((char *cmd_str1)); -int scan P_((char *line, int offset, int column)); -char *get_string P_((char *prompt, int advance)); -int compare P_((char *string1, char *string2, int sensitive)); -void goto_line P_((char *cmd_str)); -void midscreen P_((int line, unsigned char *pnt)); -void get_options P_((int numargs, char *arguments[])); -void check_fp P_((void)); -void get_file P_((char *file_name)); -void get_line P_((int length, unsigned char *in_string, int *append)); -void draw_screen P_((void)); -void finish P_((void)); -int quit P_((int noverify)); -void edit_abort P_((int arg)); -void delete_text P_((void)); -int write_file P_((char *file_name, int warn_if_exists)); -int search P_((int display_message)); -void search_prompt P_((void)); -void del_char P_((void)); -void undel_char P_((void)); -void del_word P_((void)); -void undel_word P_((void)); -void del_line P_((void)); -void undel_line P_((void)); -void adv_word P_((void)); -void move_rel P_((int direction, int lines)); -void eol P_((void)); -void bol P_((void)); -void adv_line P_((void)); -void sh_command P_((char *string)); -void set_up_term P_((void)); -void resize_check P_((void)); -int menu_op P_((struct menu_entries *)); -void paint_menu P_((struct menu_entries menu_list[], int max_width, int max_height, int list_size, int top_offset, WINDOW *menu_win, int off_start, int vert_size)); -void help P_((void)); -void paint_info_win P_((void)); -void no_info_window P_((void)); -void create_info_window P_((void)); -int file_op P_((int arg)); -void shell_op P_((void)); -void leave_op P_((void)); -void redraw P_((void)); -int Blank_Line P_((struct text *test_line)); -void Format P_((void)); -void ee_init P_((void)); -void dump_ee_conf P_((void)); -void echo_string P_((char *string)); -void spell_op P_((void)); -void ispell_op P_((void)); -int first_word_len P_((struct text *test_line)); -void Auto_Format P_((void)); -void modes_op P_((void)); -char *is_in_string P_((char *string, char *substring)); -char *resolve_name P_((char *name)); -int restrict_mode P_((void)); -int unique_test P_((char *string, char *list[])); -void strings_init P_((void)); +int main(int argc, char *argv[]); +unsigned char *resiz_line(int factor, struct text *rline, int rpos); +void insert(int character); +void delete(int disp); +void scanline(unsigned char *pos); +int tabshift(int temp_int); +int out_char(WINDOW *window, int character, int column); +int len_char(int character, int column); +void draw_line(int vertical, int horiz, unsigned char *ptr, int t_pos, int length); +void insert_line(int disp); +struct text *txtalloc(void); +struct files *name_alloc(void); +unsigned char *next_word(unsigned char *string); +void prev_word(void); +void control(void); +void emacs_control(void); +void bottom(void); +void top(void); +void nextline(void); +void prevline(void); +void left(int disp); +void right(int disp); +void find_pos(void); +void up(void); +void down(void); +void function_key(void); +void print_buffer(void); +void command_prompt(void); +void command(char *cmd_str1); +int scan(char *line, int offset, int column); +char *get_string(char *prompt, int advance); +int compare(char *string1, char *string2, int sensitive); +void goto_line(char *cmd_str); +void midscreen(int line, unsigned char *pnt); +void get_options(int numargs, char *arguments[]); +void check_fp(void); +void get_file(char *file_name); +void get_line(int length, unsigned char *in_string, int *append); +void draw_screen(void); +void finish(void); +int quit(int noverify); +void edit_abort(int arg); +void delete_text(void); +int write_file(char *file_name, int warn_if_exists); +int search(int display_message); +void search_prompt(void); +void del_char(void); +void undel_char(void); +void del_word(void); +void undel_word(void); +void del_line(void); +void undel_line(void); +void adv_word(void); +void move_rel(int direction, int lines); +void eol(void); +void bol(void); +void adv_line(void); +void sh_command(char *string); +void set_up_term(void); +void resize_check(void); +int menu_op(struct menu_entries *); +void paint_menu(struct menu_entries menu_list[], int max_width, int max_height, int list_size, int top_offset, WINDOW *menu_win, int off_start, int vert_size); +void help(void); +void paint_info_win(void); +void no_info_window(void); +void create_info_window(void); +int file_op(int arg); +void shell_op(void); +void leave_op(void); +void redraw(void); +int Blank_Line(struct text *test_line); +void Format(void); +void ee_init(void); +void dump_ee_conf(void); +void echo_string(char *string); +void spell_op(void); +void ispell_op(void); +int first_word_len(struct text *test_line); +void Auto_Format(void); +void modes_op(void); +char *is_in_string(char *string, char *substring); +char *resolve_name(char *name); +int restrict_mode(void); +int unique_test(char *string, char *list[]); +void strings_init(void); #undef P_ /* From nobody Tue Apr 18 19:53:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1F3n1W4rz45bSs; Tue, 18 Apr 2023 19:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1F3m5s28z43Q1; Tue, 18 Apr 2023 19:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kpEvv82d3laPy2h3IlxnS/JlFLSsP0PqEsnWLOkZmOk=; b=EYosfY+6CbTKt0uVl7+0UOe1/AS44FpHsuEsxZH71QEYGo6qMwmaA2avH7ABAdHS8n5JHm zMU9+eDASOzJTHD+pm0Ammq3ejj2d/EzteLyZXCMsnlVUXjuocZS0j+QtgPM0KjXY3mU9v UJDMGcoF9P4zQasKqzCeqYxOLJvfmSAo0ZGECSR9o1bTygFOj2Gyp4QY6HJSrf51pGoxa6 mR7Bmdf6hXpXEeVgT+pdIjMQeiAWmSLHvM9+gS9TTMOVqVVr5uZsffIE2XaIw/+JYYxEsj o+wDQLC5vRgPm6vM5J4moOqld5RJhe0O7xsS+Lrnfii++vRhPGmqR+RBBrT/og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kpEvv82d3laPy2h3IlxnS/JlFLSsP0PqEsnWLOkZmOk=; b=yhvTlkFbqztQgNF/RvYefsfPY9bwUlaymK53//H5iTHbaiteaVN1XFQTLBL8YNxRYa92Ei /gU6q16ORdFAzwkT3pyYKpHKP29a0PnYJo5Y2e+gDNRpb2Q8iQvoBVbXxk/UGbFrEVY5Rj bxcTHH/j+FJcrsF/k/Gu8iqoPEtZHVKuOXd8vZcGB2ZIW4l6y2TQwG6OviWA78jiu8kdzW +hqAwfir0h4brr463p73T9wvtF+4AFnPk91Sewd23CdRj7RjMaC980mJyp+BxhbFZ2KUbZ mhUunVoHXlIYs2dRn81t6IQM6GXMz6G9LPmyQrRwJxAiXL8y6cBL2Ph/Ip1pTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681847636; a=rsa-sha256; cv=none; b=PaNd5GNA24BTxGlmaONWtkFN3rtYPwngA6I3aAitHavAP/j9j5NsGyup4r/v5jyK0YaJRW 6KEHm0/N1wkGJCvXjatdgTZ4UdwJJQBfcoboLqMBxT0yIvV3fTE000hFKPkAhRTQChThPt CNC42BUAQCj/j/LM94YrJIFV6lc9OMC+TcJsfpb25t4pXvBGd1jRHqK950WbHGO7o1kVtV Czzn3EEJX3zPZVblXWyf1cyFNYTag0bbZ5DlAT4MLX8NFMXzgK6fSFngW4GLM2xoSxiLsh 19WGowKgHI81k6hRhYGt/MMJuvADwiyg6qdAH3E/8WfwAMSQxRJJ89OYsNNTOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1F3m37SgzQP9; Tue, 18 Apr 2023 19:53: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 33IJru4V061715; Tue, 18 Apr 2023 19:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IJru8X061714; Tue, 18 Apr 2023 19:53:56 GMT (envelope-from git) Date: Tue, 18 Apr 2023 19:53:56 GMT Message-Id: <202304181953.33IJru8X061714@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: 215927f5353a - main - ee: Remove function prototype for main. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 215927f5353a52a10dccf828115a017af959a72d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=215927f5353a52a10dccf828115a017af959a72d commit 215927f5353a52a10dccf828115a017af959a72d Author: John Baldwin AuthorDate: 2023-04-18 19:53:05 +0000 Commit: John Baldwin CommitDate: 2023-04-18 19:53:05 +0000 ee: Remove function prototype for main. --- contrib/ee/ee.c | 1 - 1 file changed, 1 deletion(-) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 3a422c922b2e..7f900df0c36b 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -248,7 +248,6 @@ struct menu_entries { int argument; }; -int main(int argc, char *argv[]); unsigned char *resiz_line(int factor, struct text *rline, int rpos); void insert(int character); void delete(int disp); From nobody Tue Apr 18 19:53:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1F3p1ycVz45bWL; Tue, 18 Apr 2023 19:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1F3n5n7pz43W0; Tue, 18 Apr 2023 19:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dwNAk2ohoVuzMkpiRYqWwNAzpLU598xSuU4lG+z6Xuw=; b=ds2+8lSnQGPdy5OUdihCQ3kjtyBE2LDBHKLE6Kv85wEXikok7pWx2gC3VlZKptjd9ed3xK bYTvjO6Qv8K44KtsjB1ZBTIWqYk9Nnz+BqN88i0taflSFlw7WOkIUMlAt7woN28coxPkZA RIns6+9LfMJ9GXjppbbecTGedZpxbtHoiBdTCJDF9SIU5WnipuGXooHyk3SStWX9f4IOkg VQmysmRgaygQTdtZ4mJgwiKksW3pT9wODjZtw/VuegSIqKSD9RxHyoajoUKJOrAFJkXMXu QdbH/R7bKXQ2uW1GIWWj7wRh6kwgl6d4HXtbovqIhp8kQ9bGTz0Ew5K+RxuLag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dwNAk2ohoVuzMkpiRYqWwNAzpLU598xSuU4lG+z6Xuw=; b=iDGhQf3u/Kgv89h3Ou/beW6beFyMdoI/BMLhVeZrO9VZFFw++kgTZa4VuU6gmowG7ZqkOW x01D65/QW1EQwcRnkHZHW0xvpwDTz8dEAHkAaXP7vSR2qldyAB2BqxeYSnl4LHR/VCTQce qhJqlGQfJZAVxzJrmqwagFF/jYUepcmMTCPbzBNX2sQ2iHztHp0j2Vbb5IZ0QwdvZ8DlRv azY0mymdIDJ8IJn8XoCWbBYZa4FDxcSwoz/x62U/0nZoBJyyhP0BklK2jvxMiNU9k8Oyc9 GunhdOnyhzTWojZgnoRk2G4RjzUsScVIUSBF81AihYh4VCeW4MrbG23NEx/P2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681847637; a=rsa-sha256; cv=none; b=KmJuFxVb5EVO7sxvK3jJRAH8mxHt9OtSVQO2mlylZnIZzULEHYxBT3qormjf/uF2/DCtLa vRVYCrovE2Ibf4mJNW1HReUkL+KRvDP9MebLwZKZ9623l8Xv3PvGZgs7xALlBWClCD7rfJ qIwf3efImV6prmhg1ZOMY5EmCMqnAMf+pjjOG0id5j3RuAEB0U8BxY14YMKgOqCK78nWz0 cm9TizjX0Yz8niSO6v1Ikd2I1mDvrIxBjaYS7a7Pqn24+krTfAceypwt7deBmBivKuBfaH Ksog8yfmRrH1l0EXAvIQ/l3Glc3UFRToQeUy4VCVWbSL7G11LmMedbBGDEvKvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1F3n3xpjzQ13; Tue, 18 Apr 2023 19:53:57 +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 33IJrv7q061739; Tue, 18 Apr 2023 19:53:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IJrvIR061738; Tue, 18 Apr 2023 19:53:57 GMT (envelope-from git) Date: Tue, 18 Apr 2023 19:53:57 GMT Message-Id: <202304181953.33IJrvIR061738@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: 91517e3b8186 - main - ee: Use C89 function definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 91517e3b8186d8fc161884fea27871f312ca8bea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=91517e3b8186d8fc161884fea27871f312ca8bea commit 91517e3b8186d8fc161884fea27871f312ca8bea Author: John Baldwin AuthorDate: 2023-04-18 19:53:20 +0000 Commit: John Baldwin CommitDate: 2023-04-18 19:53:20 +0000 ee: Use C89 function definitions. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39670 --- contrib/ee/ee.c | 301 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 149 insertions(+), 152 deletions(-) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 7f900df0c36b..397817fbfc0a 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -537,10 +537,9 @@ FILE *fopen(); /* declaration for open function */ #endif /* HAS_STDLIB */ #endif /* __STDC__ */ +/* beginning of main program */ int -main(argc, argv) /* beginning of main program */ -int argc; -char *argv[]; +main(int argc, char *argv[]) { int counter; @@ -668,11 +667,9 @@ char *argv[]; return(0); } +/* resize the line to length + factor*/ unsigned char * -resiz_line(factor, rline, rpos) /* resize the line to length + factor*/ -int factor; /* resize factor */ -struct text *rline; /* position in line */ -int rpos; +resiz_line(int factor, struct text *rline, int rpos) { unsigned char *rpoint; int resiz_var; @@ -684,9 +681,9 @@ int rpos; return(rpoint); } +/* insert character into line */ void -insert(character) /* insert character into line */ -int character; /* new character */ +insert(int character) { int counter; int value; @@ -769,9 +766,9 @@ int character; /* new character */ draw_line(scr_vert, scr_horz, point, position, curr_line->line_length); } +/* delete character */ void -delete(disp) /* delete character */ -int disp; +delete(int disp) { unsigned char *tp; unsigned char *temp2; @@ -876,9 +873,9 @@ int disp; formatted = FALSE; } +/* find the proper horizontal position for the pointer */ void -scanline(pos) /* find the proper horizontal position for the pointer */ -unsigned char *pos; +scanline(unsigned char *pos) { int temp; unsigned char *ptr; @@ -916,9 +913,9 @@ unsigned char *pos; } } +/* give the number of spaces to shift */ int -tabshift(temp_int) /* give the number of spaces to shift */ -int temp_int; +tabshift(int temp_int) { int leftover; @@ -929,11 +926,9 @@ int temp_int; return (9 - leftover); } +/* output non-printing character */ int -out_char(window, character, column) /* output non-printing character */ -WINDOW *window; -int character; -int column; +out_char(WINDOW *window, int character, int column) { int i1, i2; char *string; @@ -978,10 +973,9 @@ int column; return(strlen(string)); } +/* return the length of the character */ int -len_char(character, column) /* return the length of the character */ -int character; -int column; /* the column must be known to provide spacing for tabs */ +len_char(int character, int column) { int length; @@ -1001,13 +995,9 @@ int column; /* the column must be known to provide spacing for tabs */ return(length); } +/* redraw line from current position */ void -draw_line(vertical, horiz, ptr, t_pos, length) /* redraw line from current position */ -int vertical; /* current vertical position on screen */ -int horiz; /* current horizontal position on screen */ -unsigned char *ptr; /* pointer to line */ -int t_pos; /* current position (offset in bytes) from bol */ -int length; /* length (in bytes) of line */ +draw_line(int vertical, int horiz, unsigned char *ptr, int t_pos, int length) { int d; /* partial length of special or tab char to display */ unsigned char *temp; /* temporary pointer to position in line */ @@ -1058,9 +1048,9 @@ int length; /* length (in bytes) of line */ wmove(text_win, vertical, (horiz - horiz_offset)); } +/* insert new line */ void -insert_line(disp) /* insert new line */ -int disp; +insert_line(int disp) { int temp_pos; int temp_pos2; @@ -1135,18 +1125,23 @@ int disp; } } -struct text *txtalloc() /* allocate space for line structure */ +/* allocate space for line structure */ +struct text * +txtalloc(void) { return((struct text *) malloc(sizeof( struct text))); } -struct files *name_alloc() /* allocate space for file name list node */ +/* allocate space for file name list node */ +struct files * +name_alloc(void) { return((struct files *) malloc(sizeof( struct files))); } -unsigned char *next_word(string) /* move to next word in string */ -unsigned char *string; +/* move to next word in string */ +unsigned char * +next_word(unsigned char *string) { while ((*string != '\0') && ((*string != 32) && (*string != 9))) string++; @@ -1155,8 +1150,9 @@ unsigned char *string; return(string); } +/* move to start of previous word in text */ void -prev_word() /* move to start of previous word in text */ +prev_word(void) { if (position != 1) { @@ -1176,8 +1172,9 @@ prev_word() /* move to start of previous word in text */ left(TRUE); } +/* use control for commands */ void -control() /* use control for commands */ +control(void) { char *string; @@ -1255,7 +1252,7 @@ control() /* use control for commands */ */ void -emacs_control() +emacs_control(void) { char *string; @@ -1328,8 +1325,9 @@ emacs_control() } } +/* go to bottom of file */ void -bottom() /* go to bottom of file */ +bottom(void) { while (curr_line->next_line != NULL) { @@ -1344,8 +1342,9 @@ bottom() /* go to bottom of file */ scr_pos = scr_horz; } +/* go to top of file */ void -top() /* go to top of file */ +top(void) { while (curr_line->prev_line != NULL) { @@ -1360,8 +1359,9 @@ top() /* go to top of file */ scr_pos = scr_horz; } +/* move pointers to start of next line */ void -nextline() /* move pointers to start of next line */ +nextline(void) { curr_line = curr_line->next_line; absolute_lin++; @@ -1379,8 +1379,9 @@ nextline() /* move pointers to start of next line */ scr_vert++; } +/* move pointers to start of previous line*/ void -prevline() /* move pointers to start of previous line*/ +prevline(void) { curr_line = curr_line->prev_line; absolute_lin--; @@ -1400,9 +1401,9 @@ prevline() /* move pointers to start of previous line*/ } } +/* move left one character */ void -left(disp) /* move left one character */ -int disp; +left(int disp) { if (point != curr_line->line) /* if not at begin of line */ { @@ -1435,9 +1436,9 @@ int disp; } } +/* move right one character */ void -right(disp) /* move right one character */ -int disp; +right(int disp) { if (position < curr_line->line_length) { @@ -1475,8 +1476,9 @@ int disp; } } +/* move to the same column as on other line */ void -find_pos() /* move to the same column as on other line */ +find_pos(void) { scr_horz = 0; position = 1; @@ -1511,8 +1513,9 @@ find_pos() /* move to the same column as on other line */ wmove(text_win, scr_vert, (scr_horz - horiz_offset)); } +/* move up one line */ void -up() /* move up one line */ +up(void) { if (curr_line->prev_line != NULL) { @@ -1522,8 +1525,9 @@ up() /* move up one line */ } } +/* move down one line */ void -down() /* move down one line */ +down(void) { if (curr_line->next_line != NULL) { @@ -1532,8 +1536,9 @@ down() /* move down one line */ } } +/* process function key */ void -function_key() /* process function key */ +function_key(void) { if (in == KEY_LEFT) left(TRUE); @@ -1638,7 +1643,7 @@ function_key() /* process function key */ } void -print_buffer() +print_buffer(void) { char buffer[256]; @@ -1651,7 +1656,7 @@ print_buffer() } void -command_prompt() +command_prompt(void) { char *cmd_str; int result; @@ -1686,9 +1691,9 @@ command_prompt() free(cmd_str); } +/* process commands from keyboard */ void -command(cmd_str1) /* process commands from keyboard */ -char *cmd_str1; +command(char *cmd_str1) { char *cmd_str2 = NULL; char *cmd_str = cmd_str1; @@ -1840,11 +1845,9 @@ char *cmd_str1; free(cmd_str2); } +/* determine horizontal position for get_string */ int -scan(line, offset, column) /* determine horizontal position for get_string */ -char *line; -int offset; -int column; +scan(char *line, int offset, int column) { char *stemp; int i; @@ -1862,10 +1865,9 @@ int column; return(j); } +/* read string from input on command line */ char * -get_string(prompt, advance) /* read string from input on command line */ -char *prompt; /* string containing user prompt message */ -int advance; /* if true, skip leading spaces and tabs */ +get_string(char *prompt, int advance) { char *string; char *tmp_string; @@ -1943,11 +1945,9 @@ int advance; /* if true, skip leading spaces and tabs */ return(string); } +/* compare two strings */ int -compare(string1, string2, sensitive) /* compare two strings */ -char *string1; -char *string2; -int sensitive; +compare(char *string1, char *string2, int sensitive) { char *strng1; char *strng2; @@ -1982,8 +1982,7 @@ int sensitive; } void -goto_line(cmd_str) -char *cmd_str; +goto_line(char *cmd_str) { int number; int i; @@ -2039,10 +2038,9 @@ char *cmd_str; wmove(text_win, scr_vert, (scr_horz - horiz_offset)); } +/* put current line in middle of screen */ void -midscreen(line, pnt) /* put current line in middle of screen */ -int line; -unsigned char *pnt; +midscreen(int line, unsigned char *pnt) { struct text *mid_line; int i; @@ -2060,10 +2058,9 @@ unsigned char *pnt; wmove(text_win, scr_vert, (scr_horz - horiz_offset)); } +/* get arguments from command line */ void -get_options(numargs, arguments) /* get arguments from command line */ -int numargs; -char *arguments[]; +get_options(int numargs, char *arguments[]) { char *buff; int count; @@ -2152,8 +2149,9 @@ char *arguments[]; } } +/* open or close files according to flags */ void -check_fp() /* open or close files according to flags */ +check_fp(void) { int line_num; int temp; @@ -2234,9 +2232,9 @@ check_fp() /* open or close files according to flags */ wrefresh(text_win); } +/* read specified file into current buffer */ void -get_file(file_name) /* read specified file into current buffer */ -char *file_name; +get_file(char *file_name) { int can_read; /* file has at least one character */ int length; /* length of line read by read */ @@ -2302,11 +2300,9 @@ char *file_name; } } +/* read string and split into lines */ void -get_line(length, in_string, append) /* read string and split into lines */ -int length; /* length of string read by read */ -unsigned char *in_string; /* string read by read */ -int *append; /* TRUE if must append more text to end of current line */ +get_line(int length, unsigned char *in_string, int *append) { unsigned char *str1; unsigned char *str2; @@ -2393,8 +2389,9 @@ draw_screen() /* redraw the screen from current postion */ wmove(text_win, scr_vert, (scr_horz - horiz_offset)); } +/* prepare to exit edit session */ void -finish() /* prepare to exit edit session */ +finish(void) { char *file_name = in_file_name; @@ -2430,9 +2427,9 @@ finish() /* prepare to exit edit session */ } } +/* exit editor */ int -quit(noverify) /* exit editor */ -int noverify; +quit(int noverify) { char *ans; @@ -2468,8 +2465,7 @@ int noverify; } void -edit_abort(arg) -int arg; +edit_abort(int arg) { wrefresh(com_win); resetty(); @@ -2479,7 +2475,7 @@ int arg; } void -delete_text() +delete_text(void) { while (curr_line->next_line != NULL) curr_line = curr_line->next_line; @@ -2500,9 +2496,7 @@ delete_text() } int -write_file(file_name, warn_if_exists) -char *file_name; -int warn_if_exists; +write_file(char *file_name, int warn_if_exists) { char cr; char *tmp_point; @@ -2575,9 +2569,9 @@ int warn_if_exists; return(FALSE); } +/* search for string in srch_str */ int -search(display_message) /* search for string in srch_str */ -int display_message; +search(int display_message) { int lines_moved; int iter; @@ -2689,8 +2683,9 @@ int display_message; return(found); } +/* prompt and read search string (srch_str) */ void -search_prompt() /* prompt and read search string (srch_str) */ +search_prompt(void) { if (srch_str != NULL) free(srch_str); @@ -2710,8 +2705,9 @@ search_prompt() /* prompt and read search string (srch_str) */ search(TRUE); } +/* delete current character */ void -del_char() /* delete current character */ +del_char(void) { in = 8; /* backspace */ if (position < curr_line->line_length) /* if not end of line */ @@ -2734,8 +2730,9 @@ del_char() /* delete current character */ } } +/* undelete last deleted character */ void -undel_char() /* undelete last deleted character */ +undel_char(void) { if (d_char[0] == '\n') /* insert line if last del_char deleted eol */ insert_line(TRUE); @@ -2751,8 +2748,9 @@ undel_char() /* undelete last deleted character */ } } +/* delete word in front of cursor */ void -del_word() /* delete word in front of cursor */ +del_word(void) { int tposit; int difference; @@ -2805,8 +2803,9 @@ del_word() /* delete word in front of cursor */ formatted = FALSE; } +/* undelete last deleted word */ void -undel_word() /* undelete last deleted word */ +undel_word(void) { int temp; int tposit; @@ -2867,8 +2866,9 @@ undel_word() /* undelete last deleted word */ draw_line(scr_vert, scr_horz, point, position, curr_line->line_length); } +/* delete from cursor to end of line */ void -del_line() /* delete from cursor to end of line */ +del_line(void) { unsigned char *dl1; unsigned char *dl2; @@ -2900,8 +2900,9 @@ del_line() /* delete from cursor to end of line */ text_changes = TRUE; } +/* undelete last deleted line */ void -undel_line() /* undelete last deleted line */ +undel_line(void) { unsigned char *ud1; unsigned char *ud2; @@ -2928,8 +2929,9 @@ undel_line() /* undelete last deleted line */ draw_line(scr_vert, scr_horz,point,position,curr_line->line_length); } +/* advance to next word */ void -adv_word() /* advance to next word */ +adv_word(void) { while ((position < curr_line->line_length) && ((*point != 32) && (*point != 9))) right(TRUE); @@ -2937,10 +2939,9 @@ while ((position < curr_line->line_length) && ((*point == 32) || (*point == 9))) right(TRUE); } +/* move relative to current line */ void -move_rel(direction, lines) /* move relative to current line */ -int direction; -int lines; +move_rel(int direction, int lines) { int i; char *tmp; @@ -3005,8 +3006,9 @@ int lines; wmove(text_win, scr_vert, (scr_horz - horiz_offset)); } +/* go to end of line */ void -eol() /* go to end of line */ +eol(void) { if (position < curr_line->line_length) { @@ -3021,8 +3023,9 @@ eol() /* go to end of line */ } } +/* move to beginning of line */ void -bol() /* move to beginning of line */ +bol(void) { if (point != curr_line->line) { @@ -3036,8 +3039,9 @@ bol() /* move to beginning of line */ } } +/* advance to beginning of next line */ void -adv_line() /* advance to beginning of next line */ +adv_line(void) { if ((point != curr_line->line) || (scr_pos > 0)) { @@ -3053,7 +3057,7 @@ adv_line() /* advance to beginning of next line */ } void -from_top() +from_top(void) { struct text *tmpline = first_line; int x = 1; @@ -3066,9 +3070,9 @@ from_top() absolute_lin = x; } +/* execute shell command */ void -sh_command(string) /* execute shell command */ -char *string; /* string containing user command */ +sh_command(char *string) { char *temp_point; char *last_slash; @@ -3263,8 +3267,9 @@ char *string; /* string containing user command */ redraw(); } +/* set up the terminal for operating with ae */ void -set_up_term() /* set up the terminal for operating with ae */ +set_up_term(void) { if (!curses_initialized) { @@ -3319,7 +3324,7 @@ set_up_term() /* set up the terminal for operating with ae */ } void -resize_check() +resize_check(void) { if ((LINES == local_LINES) && (COLS == local_COLS)) return; @@ -3337,8 +3342,7 @@ resize_check() static char item_alpha[] = "abcdefghijklmnopqrstuvwxyz0123456789 "; int -menu_op(menu_list) -struct menu_entries menu_list[]; +menu_op(struct menu_entries menu_list[]) { WINDOW *temp_win; int max_width, max_height; @@ -3552,12 +3556,9 @@ struct menu_entries menu_list[]; } void -paint_menu(menu_list, max_width, max_height, list_size, top_offset, menu_win, - off_start, vert_size) -struct menu_entries menu_list[]; -int max_width, max_height, list_size, top_offset; -WINDOW *menu_win; -int off_start, vert_size; +paint_menu(struct menu_entries menu_list[], int max_width, int max_height, + int list_size, int top_offset, WINDOW *menu_win, int off_start, + int vert_size) { int counter, temp_int; @@ -3655,7 +3656,7 @@ int off_start, vert_size; } void -help() +help(void) { int counter; @@ -3684,7 +3685,7 @@ help() } void -paint_info_win() +paint_info_win(void) { int counter; @@ -3711,7 +3712,7 @@ paint_info_win() } void -no_info_window() +no_info_window(void) { if (!info_window) return; @@ -3729,7 +3730,7 @@ no_info_window() } void -create_info_window() +create_info_window(void) { if (info_window) return; @@ -3751,8 +3752,7 @@ create_info_window() } int -file_op(arg) -int arg; +file_op(int arg) { char *string; int flag; @@ -3825,7 +3825,7 @@ int arg; } void -shell_op() +shell_op(void) { char *string; @@ -3838,7 +3838,7 @@ shell_op() } void -leave_op() +leave_op(void) { if (text_changes) { @@ -3849,7 +3849,7 @@ leave_op() } void -redraw() +redraw(void) { if (info_window) { @@ -3866,9 +3866,9 @@ redraw() | block of text with blank lines before and after the block). */ +/* test if line has any non-space characters */ int -Blank_Line(test_line) /* test if line has any non-space characters */ -struct text *test_line; +Blank_Line(struct text *test_line) { unsigned char *line; int length; @@ -3899,8 +3899,9 @@ struct text *test_line; return(TRUE); } +/* format the paragraph according to set margins */ void -Format() /* format the paragraph according to set margins */ +Format(void) { int string_count; int offset; @@ -4127,8 +4128,9 @@ unsigned char *init_name[3] = { ".init.ee" }; +/* check for init file and read it if it exists */ void -ee_init() /* check for init file and read it if it exists */ +ee_init(void) { FILE *init_file; unsigned char *string; @@ -4252,7 +4254,7 @@ ee_init() /* check for init file and read it if it exists */ */ void -dump_ee_conf() +dump_ee_conf(void) { FILE *init_file; FILE *old_init_file = NULL; @@ -4351,9 +4353,9 @@ dump_ee_conf() } } +/* echo the given string */ void -echo_string(string) /* echo the given string */ -char *string; +echo_string(char *string) { char *temp; int Counter; @@ -4403,8 +4405,9 @@ char *string; fflush(stdout); } +/* check spelling of words in the editor */ void -spell_op() /* check spelling of words in the editor */ +spell_op(void) { if (restrict_mode()) { @@ -4424,7 +4427,7 @@ spell_op() /* check spelling of words in the editor */ } void -ispell_op() +ispell_op(void) { char template[128], *name; char string[256]; @@ -4456,8 +4459,7 @@ ispell_op() } int -first_word_len(test_line) -struct text *test_line; +first_word_len(struct text *test_line) { int counter; unsigned char *pnt; @@ -4492,8 +4494,9 @@ struct text *test_line; return(counter); } +/* format the paragraph according to set margins */ void -Auto_Format() /* format the paragraph according to set margins */ +Auto_Format(void) { int string_count; int offset; @@ -4753,7 +4756,7 @@ Auto_Format() /* format the paragraph according to set margins */ } void -modes_op() +modes_op(void) { int ret_value; int counter; @@ -4852,10 +4855,9 @@ modes_op() while (ret_value != 0); } +/* a strchr() look-alike for systems without strchr() */ char * -is_in_string(string, substring) /* a strchr() look-alike for systems without - strchr() */ -char * string, *substring; +is_in_string(char *string, char *substring) { char *full, *sub; @@ -4877,8 +4879,7 @@ char * string, *substring; */ char * -resolve_name(name) -char *name; +resolve_name(char *name) { char long_buffer[1024]; char short_buffer[128]; @@ -5001,7 +5002,7 @@ char *name; } int -restrict_mode() +restrict_mode(void) { if (!restricted) return(FALSE); @@ -5021,9 +5022,7 @@ restrict_mode() */ int -unique_test(string, list) -char *string; -char *list[]; +unique_test(char *string, char *list[]) { int counter; int num_match; @@ -5049,9 +5048,7 @@ char *list[]; */ char * -catgetlocal(number, string) -int number; -char *string; +catgetlocal(int number, char *string) { char *temp1; char *temp2; @@ -5075,7 +5072,7 @@ char *string; */ void -strings_init() +strings_init(void) { int counter; From nobody Tue Apr 18 19:53:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1F3q232wz45bWQ; Tue, 18 Apr 2023 19:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1F3p5Mkhz43FR; Tue, 18 Apr 2023 19:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VbL9s5Oj9747N2Q+ggjLVV5Dxq1Nz8ineq12whixoME=; b=GsUDZy4SsoH9xQTq4LqNw4x3U5hZnRdhczON4yMdXvYoMcvwC1on5sDO3OddQaU3kJrkXC cl5cJJCPdyfZNycG6TFr6GEVBWhh+I/nm82M5WG9g6ADgUcQ67JW8cHO3a10AJ8HJ67YLF 0XIosxbpAhHPyuRG/VK7SBOIfOd6SO36/ZKpUcoWw5Lyg0D+y01/SfP+YjWBzBGWfidQad ccVP1hTm3lRvnI/lMfu+OQ9GHl3J0oEpWZUc0+OF6vrKcRUBuTFi3fpKHNaCMh9FwcZh9I Szcmzx3U0+jIrTKRJ5vUB4OSpOWm/S/nPB0hZk4XEbZ+ejJLvyWBzn9X6538rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VbL9s5Oj9747N2Q+ggjLVV5Dxq1Nz8ineq12whixoME=; b=MxNeWITpZo+MEO8coAiwOxLIeO2UvExNznwtQPBwvYZ3FY2DgTikbO5XitSNX9tToX/Sr7 bDawCg9xUCAt4earxl27WGHitrI9bf7rKdDVq0FS/A3swzAA2AJo4Ie06OtmP4CtK/unsZ bhk2Qb6OCq9/mCtRBO+/klcyHmhqutUOTvVVnJ9YJMH2tjW9Vo74xGTbxfi2Y7zGExsYP5 djx03Wk3W5ie/K5HFy8wbCEyflptXSoyAcuyW4sTPbX82VWMjoHLjiw9I8GOGxMTOpLri3 vWbWPptW6R77pzJ653n75H/VmuVLiJCw+69CM5T9wo+CDGbvD0YsTu4Y2N64bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681847638; a=rsa-sha256; cv=none; b=dIV0fqzCyCEMMsa9r4nDZFqS8o4NYQQcj5mQp1Ed36GkSR04bEHaR6Jz0Fu5Jl3ZHuG4it v1xmnnaqQhNo78hWWFiUHdaC9H+ndNncz4SMSB2xwDmZgtlYOQgXDUlQzTXfnCgDqK1hjX tu3ifetQoFiTQGTuMpZaLHb0w0YVUu6/8VovdBTYbusSjt8+30c6Pszq2El0bZnjQlGwJz bjzWZ3NbVJOxg3g4vvPIGEHY8dpXjYcw6cWCz4h2efeNS0uCPE7LyQJinpiqSr0TPBzNI5 HvlYgw6UHTmPDutjC00y+0TPTAZld/XwgXCluNKsxzT1tqZheq3iTwfHGJteMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1F3p4RZKzQBm; Tue, 18 Apr 2023 19:53: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 33IJrwwN061758; Tue, 18 Apr 2023 19:53:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IJrwrg061757; Tue, 18 Apr 2023 19:53:58 GMT (envelope-from git) Date: Tue, 18 Apr 2023 19:53:58 GMT Message-Id: <202304181953.33IJrwrg061757@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: 9d8537e3de10 - main - ee: Remove two 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: 9d8537e3de106fafefac4946825b304eed96c43a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9d8537e3de106fafefac4946825b304eed96c43a commit 9d8537e3de106fafefac4946825b304eed96c43a Author: John Baldwin AuthorDate: 2023-04-18 19:53:32 +0000 Commit: John Baldwin CommitDate: 2023-04-18 19:53:32 +0000 ee: Remove two set but unused variables. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39671 --- contrib/ee/ee.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 397817fbfc0a..21523ece9c70 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -1951,12 +1951,10 @@ compare(char *string1, char *string2, int sensitive) { char *strng1; char *strng2; - int tmp; int equal; strng1 = string1; strng2 = string2; - tmp = 0; if ((strng1 == NULL) || (strng2 == NULL) || (*strng1 == '\0') || (*strng2 == '\0')) return(FALSE); equal = TRUE; @@ -1976,7 +1974,6 @@ compare(char *string1, char *string2, int sensitive) strng2++; if ((*strng1 == '\0') || (*strng2 == '\0') || (*strng1 == ' ') || (*strng2 == ' ')) break; - tmp++; } return(equal); } @@ -3353,7 +3350,6 @@ menu_op(struct menu_entries menu_list[]) int temp; int list_size; int top_offset; /* offset from top where menu items start */ - int vert_pos; /* vertical position */ int vert_size; /* vertical size for menu list item display */ int off_start = 1; /* offset from start of menu items to start display */ @@ -3423,7 +3419,6 @@ menu_op(struct menu_entries menu_list[]) paint_menu(menu_list, max_width, max_height, list_size, top_offset, temp_win, off_start, vert_size); counter = 1; - vert_pos = 0; do { if (off_start > 2) From nobody Tue Apr 18 21:31: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 4Q1HDJ3ZHPz45hg9; Tue, 18 Apr 2023 21:31: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 4Q1HDJ2zdbz3F53; Tue, 18 Apr 2023 21:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681853488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnSlTXocrraoeBwivl6Tp0v48sUv8STw9OBtSXNIv5E=; b=g4L1JOTwlgPkAVb5UaGJ56rJ0jE2BlqHw/ek8CDB8r0hxg3sIKtyQ2v+lhNDs0pu8/ue2u Veov9unqbNnc5Bq1t8oLgFLVaAC8VqBCW9+4sZRJRT6kD0hcotmPf+uYu3e2svBcRRYynh 6HzX4DtPRORfYJymL2HFrd0OHcKScsbBSmcOZJdUZhVko89n6sLQqAj8XQnUy4LPZlZuJJ tkRkVyocaqF2zimlX+vwC1NkZ81eRvB88YXJA4ldC3slSj08R5oHgDGt3NbFcg7GyY52Yt GX/1qB77AFL79esvtQD45XvJxrItCD/nLqYN77iHbCDQSi468Aq55YXUtj6rBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681853488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnSlTXocrraoeBwivl6Tp0v48sUv8STw9OBtSXNIv5E=; b=yEmJXSKG2iIGYbHjTR75SSccMpCwa8PL05/D1od5OlZCz50KL+eDE719ECAaelkawfF69y RWBIW6wZ4pXV54pqVdtK7Sf4n62yqNskS4MW3ffwe08rihB3CnP3vHaH+Xv1Bkz76MiO/H QrpN5nV6Tqjd6qPggpOfyGbdBYAxE4CJgcDVCkLqDifpTtIdpMwvGOpWYOb4XK05dBIRJl iBU/wAxkTZn/ichamxViKMQ2bbTSbP49INTAn9ly3qVUp8oi3pYnXbqC3LZ0gAfwvuRXvB AH+UREHbnbLKHJGKsku1Oypt31vr9rJfTrmi0n7MolS4ZI79hxd3K67KOXmv4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681853488; a=rsa-sha256; cv=none; b=THye3erUzFTBGnh/hoisONdYfgMYvDuO5woMljHQoR4Ig+MYVqCvyPZeP+7YZ6OKDPra0H LMiX7qTu1+Yg/AJJut1DoHPPX/NBWFzGXIZl2gH/DwofUT2VpZebB32mcp9kOdZR1tmM5F NLnBeronaYnsq3nbIz/6NgMt1O6TF2uk045mCwz7Y4Jc3FlJvpNFI2sgdCLhDJcHTT50Dm xCRMtdw6h65QQgjXlxu1pXT6Horr68WqwzMIiUqsturQ0TLNkW2zhFcBipIi3JjKECCqtH WSINY8+gLCLbyUgId68vgPOp9h2aEJ6iCHv+bSF7pTfFPiNz+cxsPgbEShm9rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1HDJ24PvzSj3; Tue, 18 Apr 2023 21:31: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 33ILVSv4020218; Tue, 18 Apr 2023 21:31:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33ILVSoG020217; Tue, 18 Apr 2023 21:31:28 GMT (envelope-from git) Date: Tue, 18 Apr 2023 21:31:28 GMT Message-Id: <202304182131.33ILVSoG020217@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: 238271f4a66b - main - stand: Add a snarky note about the upstream ZFS situation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=238271f4a66bd06b8b9a232a82f3ee0882e4cbb9 commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9 Author: Warner Losh AuthorDate: 2023-04-18 21:29:45 +0000 Commit: Warner Losh CommitDate: 2023-04-18 21:31:17 +0000 stand: Add a snarky note about the upstream ZFS situation The latest import of openzfs broke the hacks that we used to omit the special registers being used on arm64. Add snarky note documenting this situation since it's a mess now since the hack was only partially undone, leaving behind a mess. Sponsored by: Netflix --- stand/libsa/zfs/Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index f4cecdbc3085..7660f4ab7baf 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -19,6 +19,7 @@ ZSTD_SRC+= zstd_common.c ZSTD_SRC+= zstd_ddict.c zstd_decompress.c zstd_decompress_block.c ZSTD_SRC+= zstd_double_fast.c zstd_fast.c zstd_lazy.c zstd_ldm.c +# This is completely bogus: We should be able to omit this code completely. .if ${MACHINE_ARCH} == "aarch64" ZFS_SRC_AS = b3_aarch64_sse2.S b3_aarch64_sse41.S .endif @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+= -DSKEIN_LOOP=111 # To find blake3_impl.c in OpenZFS tree for our somehat ugly blake3_impl_hack.c # that's needed until the necessary tweaks can be upstreamed. +# XXX the last import gutted all this since upstream changes broke this hack. CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include CWARNFLAGS.zfs.c+= ${NO_WDANGLING_POINTER} +# Needing to remove the -mgeneral-regs-only is a red flag that this is not quite +# right. But it's needed at the moment due to the muddled upstream. b3_aarch64_sse2.o: b3_aarch64_sse2.S ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ -o ${.TARGET} From nobody Tue Apr 18 21:34: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 4Q1HHk4LS5z45j8b for ; Tue, 18 Apr 2023 21:34:26 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.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 4Q1HHk0qPDz3KKF for ; Tue, 18 Apr 2023 21:34:26 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f53.google.com with SMTP id l31-20020a05600c1d1f00b003f1718d89b2so546011wms.0 for ; Tue, 18 Apr 2023 14:34:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681853664; x=1684445664; 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=m6lAgvOzX5265iXA1GkGN2dvdnie4vGhZIHARtwVTEs=; b=aGK7pLz8Smeoq9+NDmGK9ahP3sPs+0xL+FXJPUP0FAoGBx3vyXLRAjdsxMoAjYIVs3 1+8uTCY78Iv4DDhiLEnE821YHoMmnQ5QcXSCiNoU0cBMmufWbA58QoK3wLRzZrSG8e5v c/NWvsl0tJ9REL41bP3HVix5ojxMjhWMhr7n+x5PNCYzkNVrMtEMgyBeic8yCLhtpEQ8 XY+ibcqVsxWfUif29MK/RAOsK2rMWyKzYOo+C7vbu095zvtLTv99fOjOISY3DZQkZXIT kbBcutrQ0814Y5tgB8V18yzMd57C0V01guOE7dp6jNeTghLiMTiQne5PerrH4tDa/N+T /RYg== X-Gm-Message-State: AAQBX9eNpyh5Vezl/ldcy9BEK4iGPH+UbWY0DZtQBb+F+Hsex3mtbKsH ogH0I232/cDdJ/aoTiff2cM7Ig== X-Google-Smtp-Source: AKy350aM70ECwDSU+v3kx+A5Da0EMi2gGpbaCU6h0f1ZQI1aT5Qf/w2yJpGJCbKp0Wsk3MvneOAOQA== X-Received: by 2002:a05:600c:378b:b0:3f1:7aff:e14a with SMTP id o11-20020a05600c378b00b003f17affe14amr2121273wmr.39.1681853664549; Tue, 18 Apr 2023 14:34:24 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id k14-20020a5d66ce000000b002f103ca90cdsm14099326wrw.101.2023.04.18.14.34.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2023 14:34:24 -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 \(3696.120.41.1.1\)) Subject: Re: git: 238271f4a66b - main - stand: Add a snarky note about the upstream ZFS situation From: Jessica Clarke In-Reply-To: <202304182131.33ILVSoG020217@gitrepo.freebsd.org> Date: Tue, 18 Apr 2023 22:34:23 +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: <202304182131.33ILVSoG020217@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q1HHk0qPDz3KKF 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 18 Apr 2023, at 22:31, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D238271f4a66bd06b8b9a232a82f3ee08= 82e4cbb9 >=20 > commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9 > Author: Warner Losh > AuthorDate: 2023-04-18 21:29:45 +0000 > Commit: Warner Losh > CommitDate: 2023-04-18 21:31:17 +0000 >=20 > stand: Add a snarky note about the upstream ZFS situation >=20 > The latest import of openzfs broke the hacks that we used to omit = the > special registers being used on arm64. Add snarky note documenting = this > situation since it's a mess now since the hack was only partially > undone, leaving behind a mess. >=20 > Sponsored by: Netflix > --- > stand/libsa/zfs/Makefile.inc | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/stand/libsa/zfs/Makefile.inc = b/stand/libsa/zfs/Makefile.inc > index f4cecdbc3085..7660f4ab7baf 100644 > --- a/stand/libsa/zfs/Makefile.inc > +++ b/stand/libsa/zfs/Makefile.inc > @@ -19,6 +19,7 @@ ZSTD_SRC+=3D zstd_common.c > ZSTD_SRC+=3D zstd_ddict.c zstd_decompress.c zstd_decompress_block.c > ZSTD_SRC+=3D zstd_double_fast.c zstd_fast.c zstd_lazy.c zstd_ldm.c >=20 > +# This is completely bogus: We should be able to omit this code = completely. > .if ${MACHINE_ARCH} =3D=3D "aarch64" > ZFS_SRC_AS =3D b3_aarch64_sse2.S b3_aarch64_sse41.S > .endif > @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+=3D -DSKEIN_LOOP=3D111 >=20 > # To find blake3_impl.c in OpenZFS tree for our somehat ugly = blake3_impl_hack.c > # that's needed until the necessary tweaks can be upstreamed. > +# XXX the last import gutted all this since upstream changes broke = this hack. > CFLAGS.blake3_impl_hack.c+=3D -I${OZFS}/module/icp/algs/blake3 = -I${OZFS}/module/icp/include >=20 > CWARNFLAGS.zfs.c+=3D ${NO_WDANGLING_POINTER} >=20 > +# Needing to remove the -mgeneral-regs-only is a red flag that this = is not quite > +# right. But it's needed at the moment due to the muddled upstream. This one isn=E2=80=99t bogus? The file is deliberately using NEON so = needs access to floating-point registers, which LLVM (mostly) enforces for the assembler, unlike GNU as. Jess > b3_aarch64_sse2.o: b3_aarch64_sse2.S > ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ > -o ${.TARGET} From nobody Tue Apr 18 22:49: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 4Q1Jz62kqHz45p1d for ; Tue, 18 Apr 2023 22:50:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (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 4Q1Jz60HhNz3KSG for ; Tue, 18 Apr 2023 22:50:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-94eee951c70so273346766b.3 for ; Tue, 18 Apr 2023 15:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1681858208; x=1684450208; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Wq9w/l4DaUpd84iLmwFjxLrL4ATpMql6Uvgo19amebM=; b=I03tJQALgXKyswVxkylDoeo3LElbgzX44Rhd/t5sLdfLduRgncVdcyjiW7Y8gpjFcB SVmdg3jIBeU/pmaMlsUZ7HidBx8M1p+G+BNyW/4nHtymR/56ip7kOBvz7AE3nak1uB6J ES0DlqJg7+HHRnkDUiTlPzwa1M7pJjK8tTiQSFgOTqYZ40yEXt7IIu5BCF5sTaXbyIAv bHCquWPfAL9Q0cK0sE/bKbD0es9QK9VqGq7eBFffTfKn1pjGyTTGQEHYrM+AzgLR6Q6k pdSbUed7Ozdvan0NpJTmv+wHufEiM/OVcLImXRzytema4A1SxxO+xRMCTJaG0i3IiIYB adfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681858208; x=1684450208; 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=Wq9w/l4DaUpd84iLmwFjxLrL4ATpMql6Uvgo19amebM=; b=TNIJ8MF1j/TL6TYKCPzW2EoYvi77XpVBIjfbctCk0ZrctNwonCo9NL9r9so03Yopca qyiDf/ylmXR6n9JmN+01lETGahUlHUMnUlfBS55QjvK+G37v5gIWpMfn8jWUGkf9DwCV Cm9SIpVlKNxBx0rrrR+IkFy9v+jSgY1A3SC7Vse6XBX57BavjSuKMoxUBW1/bp0q/2AY kLZtrEPO1N6diEXhxgcw9aBAYgB5kMR5BG1UHO1tQ1tu7BU3/3OaO+44YpheQniVcp9x 4DF5Rrc3Pjnu0g7plh10QlovKadE9zmXjw+9By/vT2BIHEp8pw3YsZCP7Lgln0MB0xA1 a/Xg== X-Gm-Message-State: AAQBX9fZC3avRAiwCZuLu5A8c4KoX4EdO4PNglIvYQCgTas7ESsY4ATi 9/q7M1jp1PTWwsWjNOBfQC7lYuU1pANLS1k1VXN+M1lySA2kvr+b X-Google-Smtp-Source: AKy350ZN/9wANmI9IqUljNoTPif10nTh5DV1CFf3qVdP0zHXp1ULv3E/vvVjamMsKGGqaX6mD19oib2fdNVQslMbGkI= X-Received: by 2002:aa7:da44:0:b0:506:b8ca:e07e with SMTP id w4-20020aa7da44000000b00506b8cae07emr3721174eds.11.1681858208449; Tue, 18 Apr 2023 15:50:08 -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: <202304182131.33ILVSoG020217@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 18 Apr 2023 16:49:57 -0600 Message-ID: Subject: Re: git: 238271f4a66b - main - stand: Add a snarky note about the upstream ZFS situation To: Jessica Clarke Cc: Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="00000000000013f2fd05f9a421fb" X-Rspamd-Queue-Id: 4Q1Jz60HhNz3KSG X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.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 --00000000000013f2fd05f9a421fb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 18, 2023, 3:34 PM Jessica Clarke wrote: > On 18 Apr 2023, at 22:31, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D238271f4a66bd06b8b9a232a82f3ee0= 882e4cbb9 > > > > commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9 > > Author: Warner Losh > > AuthorDate: 2023-04-18 21:29:45 +0000 > > Commit: Warner Losh > > CommitDate: 2023-04-18 21:31:17 +0000 > > > > stand: Add a snarky note about the upstream ZFS situation > > > > The latest import of openzfs broke the hacks that we used to omit th= e > > special registers being used on arm64. Add snarky note documenting > this > > situation since it's a mess now since the hack was only partially > > undone, leaving behind a mess. > > > > Sponsored by: Netflix > > --- > > stand/libsa/zfs/Makefile.inc | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.in= c > > index f4cecdbc3085..7660f4ab7baf 100644 > > --- a/stand/libsa/zfs/Makefile.inc > > +++ b/stand/libsa/zfs/Makefile.inc > > @@ -19,6 +19,7 @@ ZSTD_SRC+=3D zstd_common.c > > ZSTD_SRC+=3D zstd_ddict.c zstd_decompress.c zstd_decompress_block.c > > ZSTD_SRC+=3D zstd_double_fast.c zstd_fast.c zstd_lazy.c zstd_ldm.c > > > > +# This is completely bogus: We should be able to omit this code > completely. > > .if ${MACHINE_ARCH} =3D=3D "aarch64" > > ZFS_SRC_AS =3D b3_aarch64_sse2.S b3_aarch64_sse41.S > > .endif > > @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+=3D -DSKEIN_LOOP=3D111 > > > > # To find blake3_impl.c in OpenZFS tree for our somehat ugly > blake3_impl_hack.c > > # that's needed until the necessary tweaks can be upstreamed. > > +# XXX the last import gutted all this since upstream changes broke thi= s > hack. > > CFLAGS.blake3_impl_hack.c+=3D -I${OZFS}/module/icp/algs/blake3 > -I${OZFS}/module/icp/include > > > > CWARNFLAGS.zfs.c+=3D ${NO_WDANGLING_POINTER} > > > > +# Needing to remove the -mgeneral-regs-only is a red flag that this is > not quite > > +# right. But it's needed at the moment due to the muddled upstream. > > This one isn=E2=80=99t bogus? The file is deliberately using NEON so need= s > access to floating-point registers, which LLVM (mostly) enforces for > the assembler, unlike GNU as. > No. It's bogus because we should not be using it at all. The generic implementation is fast enough for the boot loader and we have a blanket policy against using extra register sets. The change wasn't discussed before hand and what's really needed are upstream changes to be able to omit it entirely. Warner Jess > > > b3_aarch64_sse2.o: b3_aarch64_sse2.S > > ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ > > -o ${.TARGET} > > --00000000000013f2fd05f9a421fb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Apr 18, 2023, 3:34 PM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 18 Apr 2023, at 22:31, Warner Losh <i= mp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D238271f4a66bd06b8b9a232a82f3ee= 0882e4cbb9
>
> commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2023-04-18 21:29:45 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-04-18 21:31:17 +0000
>
>=C2=A0 =C2=A0 stand: Add a snarky note about the upstream ZFS situation=
>
>=C2=A0 =C2=A0 The latest import of openzfs broke the hacks that we used= to omit the
>=C2=A0 =C2=A0 special registers being used on arm64. Add snarky note do= cumenting this
>=C2=A0 =C2=A0 situation since it's a mess now since the hack was on= ly partially
>=C2=A0 =C2=A0 undone, leaving behind a mess.
>
>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Net= flix
> ---
> stand/libsa/zfs/Makefile.inc | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.i= nc
> index f4cecdbc3085..7660f4ab7baf 100644
> --- a/stand/libsa/zfs/Makefile.inc
> +++ b/stand/libsa/zfs/Makefile.inc
> @@ -19,6 +19,7 @@ ZSTD_SRC+=3D=C2=A0 zstd_common.c
> ZSTD_SRC+=3D=C2=A0 =C2=A0 zstd_ddict.c zstd_decompress.c zstd_decompre= ss_block.c
> ZSTD_SRC+=3D=C2=A0 =C2=A0 zstd_double_fast.c zstd_fast.c zstd_lazy.c z= std_ldm.c
>
> +# This is completely bogus: We should be able to omit this code compl= etely.
> .if ${MACHINE_ARCH} =3D=3D "aarch64"
> ZFS_SRC_AS =3D=C2=A0 b3_aarch64_sse2.S b3_aarch64_sse41.S
> .endif
> @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+=3D=C2=A0 =C2=A0 -DSKEIN_LOOP= =3D111
>
> # To find blake3_impl.c in OpenZFS tree for our somehat ugly blake3_im= pl_hack.c
> # that's needed until the necessary tweaks can be upstreamed.
> +# XXX the last import gutted all this since upstream changes broke th= is hack.
> CFLAGS.blake3_impl_hack.c+=3D -I${OZFS}/module/icp/algs/blake3 -I${OZF= S}/module/icp/include
>
> CWARNFLAGS.zfs.c+=3D ${NO_WDANGLING_POINTER}
>
> +# Needing to remove the -mgeneral-regs-only is a red flag that this i= s not quite
> +# right. But it's needed at the moment due to the muddled upstrea= m.

This one isn=E2=80=99t bogus? The file is deliberately using NEON so needs<= br> access to floating-point registers, which LLVM (mostly) enforces for
the assembler, unlike GNU as.

No. It's bogus because we should not be us= ing it at all. The generic implementation is fast enough for the boot loade= r and we have a blanket policy against using extra register sets. The chang= e wasn't discussed before hand and what's really needed are upstrea= m changes to be able to omit it entirely.

=
Warner

Jess

> b3_aarch64_sse2.o: b3_aarch64_sse2.S
>=C2=A0 =C2=A0 =C2=A0 =C2=A0${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WE= RROR} ${.IMPSRC} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-o ${.TARGET}

--00000000000013f2fd05f9a421fb-- From nobody Tue Apr 18 22:52:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1K1T3w3Wz45p6j for ; Tue, 18 Apr 2023 22:52:13 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.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 4Q1K1T1KVmz3NpL for ; Tue, 18 Apr 2023 22:52:13 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f53.google.com with SMTP id eo4-20020a05600c82c400b003f05a99a841so572984wmb.3 for ; Tue, 18 Apr 2023 15:52:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681858331; x=1684450331; 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=gCqE6VVTTG3SN1hQYBlut/Oz9k5iaNfKiQp/K8YgVQg=; b=l+nULWLSQx2mFpPwB31fdqGzts+CY5hLDq8nkhW1MgTGg8Jq7yhmaEMTAZrsZoE7+j 9ri2Hw1b+FlAobSO3b0esae5E3yzuAz9CASomuTCW842nt3vX6MOj0D0l4MhDRN0grvt +dWbLVqg8vZNeX2ni9nhI9o1QLCLhItquwPEfrqZNZzLndr3LSptEYcr2ueG4JipMwbR DenmMlHYi+ObdP+fVgkyUqV0dy7U40kBeIdJ36dgjpAUWs6AC+ZGJDi7IXRYXd+CX4QF CEDvKH2QrwrYJomdvAqKHrtEAg+lzLQ3Y7QwcYMsVptluiaBwrvIfE8JifTXSpSoj5OL VJVA== X-Gm-Message-State: AAQBX9cz8HgW0av/M1Q/ScL9EJNUdXZRFAbBzJQw1cNgJ/2znc9tNKNU Da94N2Do/dFgRbATyo+oUXPPjAZfTQcSwp/Jbo9PPg== X-Google-Smtp-Source: AKy350b9wu0iw+5IH3oxa1IW5CTcl5TpmSu5q6Ur/8Y0VbeKNAOPSpQSdRESO7Y+9WyXUvSfMNSLTg== X-Received: by 2002:a1c:cc1a:0:b0:3ef:6b97:f0c3 with SMTP id h26-20020a1ccc1a000000b003ef6b97f0c3mr15980962wmb.15.1681858330926; Tue, 18 Apr 2023 15:52:10 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id z14-20020adff1ce000000b002f28de9f73bsm14086585wro.55.2023.04.18.15.52.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2023 15:52:10 -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 \(3696.120.41.1.1\)) Subject: Re: git: 238271f4a66b - main - stand: Add a snarky note about the upstream ZFS situation From: Jessica Clarke In-Reply-To: Date: Tue, 18 Apr 2023 23:52:09 +0100 Cc: Warner Losh , src-committers , "" , "" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202304182131.33ILVSoG020217@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q1K1T1KVmz3NpL 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 18 Apr 2023, at 23:49, Warner Losh wrote: >=20 >=20 >=20 > On Tue, Apr 18, 2023, 3:34 PM Jessica Clarke = wrote: >> On 18 Apr 2023, at 22:31, Warner Losh wrote: >> >=20 >> > The branch main has been updated by imp: >> >=20 >> > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D238271f4a66bd06b8b9a232a82f3ee08= 82e4cbb9 >> >=20 >> > commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9 >> > Author: Warner Losh >> > AuthorDate: 2023-04-18 21:29:45 +0000 >> > Commit: Warner Losh >> > CommitDate: 2023-04-18 21:31:17 +0000 >> >=20 >> > stand: Add a snarky note about the upstream ZFS situation >> >=20 >> > The latest import of openzfs broke the hacks that we used to = omit the >> > special registers being used on arm64. Add snarky note = documenting this >> > situation since it's a mess now since the hack was only = partially >> > undone, leaving behind a mess. >> >=20 >> > Sponsored by: Netflix >> > --- >> > stand/libsa/zfs/Makefile.inc | 4 ++++ >> > 1 file changed, 4 insertions(+) >> >=20 >> > diff --git a/stand/libsa/zfs/Makefile.inc = b/stand/libsa/zfs/Makefile.inc >> > index f4cecdbc3085..7660f4ab7baf 100644 >> > --- a/stand/libsa/zfs/Makefile.inc >> > +++ b/stand/libsa/zfs/Makefile.inc >> > @@ -19,6 +19,7 @@ ZSTD_SRC+=3D zstd_common.c >> > ZSTD_SRC+=3D zstd_ddict.c zstd_decompress.c = zstd_decompress_block.c >> > ZSTD_SRC+=3D zstd_double_fast.c zstd_fast.c zstd_lazy.c = zstd_ldm.c >> >=20 >> > +# This is completely bogus: We should be able to omit this code = completely. >> > .if ${MACHINE_ARCH} =3D=3D "aarch64" >> > ZFS_SRC_AS =3D b3_aarch64_sse2.S b3_aarch64_sse41.S >> > .endif >> > @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+=3D -DSKEIN_LOOP=3D111 >> >=20 >> > # To find blake3_impl.c in OpenZFS tree for our somehat ugly = blake3_impl_hack.c >> > # that's needed until the necessary tweaks can be upstreamed. >> > +# XXX the last import gutted all this since upstream changes broke = this hack. >> > CFLAGS.blake3_impl_hack.c+=3D -I${OZFS}/module/icp/algs/blake3 = -I${OZFS}/module/icp/include >> >=20 >> > CWARNFLAGS.zfs.c+=3D ${NO_WDANGLING_POINTER} >> >=20 >> > +# Needing to remove the -mgeneral-regs-only is a red flag that = this is not quite >> > +# right. But it's needed at the moment due to the muddled = upstream. >>=20 >> This one isn=E2=80=99t bogus? The file is deliberately using NEON so = needs >> access to floating-point registers, which LLVM (mostly) enforces for >> the assembler, unlike GNU as. >=20 > No. It's bogus because we should not be using it at all. The generic = implementation is fast enough for the boot loader and we have a blanket = policy against using extra register sets. The change wasn't discussed = before hand and what's really needed are upstream changes to be able to = omit it entirely. Oh I see, I misunderstood the point the comment was making. Thanks, Jess > > b3_aarch64_sse2.o: b3_aarch64_sse2.S > > ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ > > -o ${.TARGET} From nobody Tue Apr 18 23:07: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 4Q1KLy3LX1z45pd0 for ; Tue, 18 Apr 2023 23:07:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1KLx4QgHz40VK for ; Tue, 18 Apr 2023 23:07:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-506b8c6bc07so1179402a12.2 for ; Tue, 18 Apr 2023 16:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1681859239; x=1684451239; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mA992dh3pj8mJ5oEZQtvuyp0IzCsqdtI3ZWKnX98gEg=; b=JI5MMF8tLP5l9ZkQdIX77wbO0TSJRH8Sl4nujuySdKu00+SmVOoGUPUAHZGzl0uJS1 vChnPjD3E1CW0CISu6BygxHzQNqzZki8h0pi118W7qwwvBid48r9p7TsfckPKqTpmnSk Rwu2Oofe8GFhKfWtZ0OxOVWPtRIA4ws9LIIDyfTZowN1B0ZBA6QHymyrB3nbXcgzxmeE ULyyzCOjO10Gz/qMKFTdcQUfWXzV5XOapo6+OuqvDVox+pUW5DiBNX7SCrF6TzgDt51f kg0ztMAvuEskAntjEjuHcR1C5G+u8RJWaSNqn2IRH+ziHOeLOFynbMvycd9Qwh2v4Ub0 dRkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681859239; x=1684451239; 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=mA992dh3pj8mJ5oEZQtvuyp0IzCsqdtI3ZWKnX98gEg=; b=B5Di1voldO+g8oJjEZA2E55j18p9fR5nqh4Sgz241OfAExqvl7IGGahTL/C/xFkXIY cvvh6/dE8Fketv4W0aL3Vw5Mt7gy2gggRihwHfkGEXjz95FPIIqaD8sxujhnwCZ5tbUy JdgPWFgSBX4tW9JjzCG7lbcMB5LT/kiTj59VkDDgGDEXOozwSh9XyIQ5w8YtCdgEuhmX B5Oh+jPqsG2tWrzlIXy+17+UKKOKsUWhY5FujjyAVNsI823cdK96cuAzbSNRD/NbZr1E Qie+lycBwxJCA21PbeJuBmagns9jYKeRmXulhWHYCyupgYdWaUAG0e0whAEKpBr6WCih DYhA== X-Gm-Message-State: AAQBX9elXMLmsQaDzeBSJQL7yCIJXFxFAvehgcXvzdQBL6o5qKQZF5gD xViwus3SNtw8DPmHB3eMBOgWF2IgX8XOyF/LzDNCvQ== X-Google-Smtp-Source: AKy350bW4hnHbrUnOg0IdbbLrvv4GDOsD1kLU7+e8iQM5KeRGEPp2GVS/O3TYRMTMrIrbH7eJ/bcPz/IodQTd+zspZU= X-Received: by 2002:aa7:dccf:0:b0:506:843f:2f27 with SMTP id w15-20020aa7dccf000000b00506843f2f27mr3683383edu.11.1681859238753; Tue, 18 Apr 2023 16:07:18 -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: <202304182131.33ILVSoG020217@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 18 Apr 2023 17:07:07 -0600 Message-ID: Subject: Re: git: 238271f4a66b - main - stand: Add a snarky note about the upstream ZFS situation To: Jessica Clarke Cc: Warner Losh , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000007d0ba505f9a45e9e" X-Rspamd-Queue-Id: 4Q1KLx4QgHz40VK X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.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 --0000000000007d0ba505f9a45e9e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 18, 2023 at 4:52=E2=80=AFPM Jessica Clarke = wrote: > On 18 Apr 2023, at 23:49, Warner Losh wrote: > > > > > > > > On Tue, Apr 18, 2023, 3:34 PM Jessica Clarke wrote= : > >> On 18 Apr 2023, at 22:31, Warner Losh wrote: > >> > > >> > The branch main has been updated by imp: > >> > > >> > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D238271f4a66bd06b8b9a232a82f3ee0= 882e4cbb9 > >> > > >> > commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9 > >> > Author: Warner Losh > >> > AuthorDate: 2023-04-18 21:29:45 +0000 > >> > Commit: Warner Losh > >> > CommitDate: 2023-04-18 21:31:17 +0000 > >> > > >> > stand: Add a snarky note about the upstream ZFS situation > >> > > >> > The latest import of openzfs broke the hacks that we used to omit > the > >> > special registers being used on arm64. Add snarky note documentin= g > this > >> > situation since it's a mess now since the hack was only partially > >> > undone, leaving behind a mess. > >> > > >> > Sponsored by: Netflix > >> > --- > >> > stand/libsa/zfs/Makefile.inc | 4 ++++ > >> > 1 file changed, 4 insertions(+) > >> > > >> > diff --git a/stand/libsa/zfs/Makefile.inc > b/stand/libsa/zfs/Makefile.inc > >> > index f4cecdbc3085..7660f4ab7baf 100644 > >> > --- a/stand/libsa/zfs/Makefile.inc > >> > +++ b/stand/libsa/zfs/Makefile.inc > >> > @@ -19,6 +19,7 @@ ZSTD_SRC+=3D zstd_common.c > >> > ZSTD_SRC+=3D zstd_ddict.c zstd_decompress.c zstd_decompress_block= .c > >> > ZSTD_SRC+=3D zstd_double_fast.c zstd_fast.c zstd_lazy.c zstd_ldm.= c > >> > > >> > +# This is completely bogus: We should be able to omit this code > completely. > >> > .if ${MACHINE_ARCH} =3D=3D "aarch64" > >> > ZFS_SRC_AS =3D b3_aarch64_sse2.S b3_aarch64_sse41.S > >> > .endif > >> > @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+=3D -DSKEIN_LOOP=3D111 > >> > > >> > # To find blake3_impl.c in OpenZFS tree for our somehat ugly > blake3_impl_hack.c > >> > # that's needed until the necessary tweaks can be upstreamed. > >> > +# XXX the last import gutted all this since upstream changes broke > this hack. > >> > CFLAGS.blake3_impl_hack.c+=3D -I${OZFS}/module/icp/algs/blake3 > -I${OZFS}/module/icp/include > >> > > >> > CWARNFLAGS.zfs.c+=3D ${NO_WDANGLING_POINTER} > >> > > >> > +# Needing to remove the -mgeneral-regs-only is a red flag that this > is not quite > >> > +# right. But it's needed at the moment due to the muddled upstream. > >> > >> This one isn=E2=80=99t bogus? The file is deliberately using NEON so n= eeds > >> access to floating-point registers, which LLVM (mostly) enforces for > >> the assembler, unlike GNU as. > > > > No. It's bogus because we should not be using it at all. The generic > implementation is fast enough for the boot loader and we have a blanket > policy against using extra register sets. The change wasn't discussed > before hand and what's really needed are upstream changes to be able to > omit it entirely. > > Oh I see, I misunderstood the point the comment was making. > It's also the third or fourth time that I've had to sort this, or similar, issues out in the boot loader (after spending a week or two initially to enable the OpenZFS import), so I'm a little frustrated by the situation. Warner > Thanks, > Jess > > > > b3_aarch64_sse2.o: b3_aarch64_sse2.S > > > ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ > > > -o ${.TARGET} > > --0000000000007d0ba505f9a45e9e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Apr 18, 2023 at 4:52=E2=80=AF= PM Jessica Clarke <jrtc27@freebsd.= org> wrote:
On 18 Apr 2023, at 23:49, Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Tue, Apr 18, 2023, 3:34 PM Jessica Clarke <jrtc27@freebsd.org> wrote:
>> On 18 Apr 2023, at 22:31, Warner Losh <imp@FreeBSD.org> wrot= e:
>> >
>> > The branch main has been updated by imp:
>> >
>> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D238271f4a66bd06b8b9a232a82f3ee08= 82e4cbb9
>> >
>> > commit 238271f4a66bd06b8b9a232a82f3ee0882e4cbb9
>> > Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > AuthorDate: 2023-04-18 21:29:45 +0000
>> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>= ;
>> > CommitDate: 2023-04-18 21:31:17 +0000
>> >
>> >=C2=A0 =C2=A0 stand: Add a snarky note about the upstream ZFS = situation
>> >
>> >=C2=A0 =C2=A0 The latest import of openzfs broke the hacks tha= t we used to omit the
>> >=C2=A0 =C2=A0 special registers being used on arm64. Add snark= y note documenting this
>> >=C2=A0 =C2=A0 situation since it's a mess now since the ha= ck was only partially
>> >=C2=A0 =C2=A0 undone, leaving behind a mess.
>> >
>> >=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0Netflix
>> > ---
>> > stand/libsa/zfs/Makefile.inc | 4 ++++
>> > 1 file changed, 4 insertions(+)
>> >
>> > diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/M= akefile.inc
>> > index f4cecdbc3085..7660f4ab7baf 100644
>> > --- a/stand/libsa/zfs/Makefile.inc
>> > +++ b/stand/libsa/zfs/Makefile.inc
>> > @@ -19,6 +19,7 @@ ZSTD_SRC+=3D=C2=A0 zstd_common.c
>> > ZSTD_SRC+=3D=C2=A0 =C2=A0 zstd_ddict.c zstd_decompress.c zstd= _decompress_block.c
>> > ZSTD_SRC+=3D=C2=A0 =C2=A0 zstd_double_fast.c zstd_fast.c zstd= _lazy.c zstd_ldm.c
>> >
>> > +# This is completely bogus: We should be able to omit this c= ode completely.
>> > .if ${MACHINE_ARCH} =3D=3D "aarch64"
>> > ZFS_SRC_AS =3D=C2=A0 b3_aarch64_sse2.S b3_aarch64_sse41.S
>> > .endif
>> > @@ -90,10 +91,13 @@ CFLAGS.skein_block.c+=3D=C2=A0 =C2=A0 -DS= KEIN_LOOP=3D111
>> >
>> > # To find blake3_impl.c in OpenZFS tree for our somehat ugly = blake3_impl_hack.c
>> > # that's needed until the necessary tweaks can be upstrea= med.
>> > +# XXX the last import gutted all this since upstream changes= broke this hack.
>> > CFLAGS.blake3_impl_hack.c+=3D -I${OZFS}/module/icp/algs/blake= 3 -I${OZFS}/module/icp/include
>> >
>> > CWARNFLAGS.zfs.c+=3D ${NO_WDANGLING_POINTER}
>> >
>> > +# Needing to remove the -mgeneral-regs-only is a red flag th= at this is not quite
>> > +# right. But it's needed at the moment due to the muddle= d upstream.
>>
>> This one isn=E2=80=99t bogus? The file is deliberately using NEON = so needs
>> access to floating-point registers, which LLVM (mostly) enforces f= or
>> the assembler, unlike GNU as.
>
> No. It's bogus because we should not be using it at all. The gener= ic implementation is fast enough for the boot loader and we have a blanket = policy against using extra register sets. The change wasn't discussed b= efore hand and what's really needed are upstream changes to be able to = omit it entirely.

Oh I see, I misunderstood the point the comment was making.

It's also the third or fourth time that I've h= ad to sort this, or similar, issues out in the boot loader (after spending = a week or two initially to enable the OpenZFS import), so I'm a little = frustrated by the situation.

Warner
=C2= =A0
Thanks,
Jess

> > b3_aarch64_sse2.o: b3_aarch64_sse2.S
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0${CC} -c ${CFLAGS:N-mgeneral-regs-only}= ${WERROR} ${.IMPSRC} \
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-o ${.TARGET}

--0000000000007d0ba505f9a45e9e-- From nobody Tue Apr 18 23:13: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 4Q1KVb71FJz45qLJ; Tue, 18 Apr 2023 23:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1KVb51dPz4DYH; Tue, 18 Apr 2023 23:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681859639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJ84XZr2qWYH1W1x4W4Vd1qi4Ehdj0qPSq53U82zJKE=; b=YEBducK9l4vsyWKPPfxvRh3eGZ7oGsQgx8wgWoomhLR4yo6NdJJYr8A0vt07JTXhvq7K/a exojV7t6Sgg6sdcknOroklx1ubVYpZ8Q55QEFCM8CcNgtCEkstu/xA8Tbu6g4/tqiGsXVP JRbT3PItIwqySC10Wat7gr1shpZrgLFGW+Vzha1xGoM1r7IvVNZvvjYSGyi/WpVV7xqYDb t4jczlhXjuQho/CYzT7OtcqOQ+oYKuKxxV7JYGZcfKmJj6qf2AW/wngPH/XYic52/HB0Ri vhF9DBz/8hRYw9jzsVHNxSB2b3pjCX7ergnWBOPkE/wPHuh2VxkeopW1BJqQqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681859639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AJ84XZr2qWYH1W1x4W4Vd1qi4Ehdj0qPSq53U82zJKE=; b=kVfD7bG56duNTtr0NARokgXElwhZPXCy49WOg59q8YdYu9XvPMHlf4PwSH8wOCDPiin1Is yV2NL+LIVfLqtbT4eE6z6GyYU6ovEO3Vzdp21J00kJppKBUdwCTzSunZIzN0bllxgCpOwG wmZ6iVxxXT7eotY10HhqlcP8jyq953ctEdVEK5iT4kYsymrLR6NK1VkRWl3EAzKeFbVtbB KRyfqOTQ8ArwBm6q2VQJwFpgFUcd9ZNw2MJduh9sqKR4TZv/T3f+MSVamjo210RMQ4g+qB eyGwQtDCgaMcldkBr0yfQJbvesZGmUnk+wunNNL5rMuzmR3RyuuTy2NjvpBbow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681859639; a=rsa-sha256; cv=none; b=c9CIoU7VWbDi1GIU1RDu2IFBV8kVx5l6usUXtM0W15/8twsy8L6yxAZlXrir5hjRDNQlsT P5lyjy/HUERTtSgyHt0TKKIktgfXGc0TDAGuPilcV+d4iRk1TFUXL3Yu6TuBLVtiIl7O3m KTHEgfha2wKlDakDrWgZ0fmUpFczDAK9OglF8vbNLi/0h0zjTDkhU/YoUAyGKaOYdCsqWT XJBhBPcQuBbScpMCUU0O610qFUcP5Nx6aeE9td6xko6PIvbW3NCSX3OyrGPncAL7v3SE09 1Ytw9NkDmmssfR9jfxN0TL36eQUF3I6KcuZOB76iwimqdVTWIX/6aZfIg8tA6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1KVb46Q9zWrS; Tue, 18 Apr 2023 23:13: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 33INDx3P095370; Tue, 18 Apr 2023 23:13:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33INDxJW095369; Tue, 18 Apr 2023 23:13:59 GMT (envelope-from git) Date: Tue, 18 Apr 2023 23:13:59 GMT Message-Id: <202304182313.33INDxJW095369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 7636973c68f1 - main - Add `chdb' command to fsdb(8) to set direct block numbers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7636973c68f15419a71bc8e4253b2fbae3258025 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=7636973c68f15419a71bc8e4253b2fbae3258025 commit 7636973c68f15419a71bc8e4253b2fbae3258025 Author: Kirk McKusick AuthorDate: 2023-04-18 05:42:32 +0000 Commit: Kirk McKusick CommitDate: 2023-04-18 23:13:26 +0000 Add `chdb' command to fsdb(8) to set direct block numbers. Add the ability to set direct blocks numbers in inodes so that manual corrections can be made. No checking of the values is attempted so accidental or deliberate bad values can be set. Submitted by: Chuck Silvers MFC after: 1 week --- sbin/fsdb/fsdb.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index a7d3a439b6b3..887a77dbb8cb 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -161,6 +161,7 @@ CMDFUNC(chatime); /* Change atime */ CMDFUNC(chinum); /* Change inode # of dirent */ CMDFUNC(chname); /* Change dirname of dirent */ CMDFUNC(chsize); /* Change size */ +CMDFUNC(chdb); /* Change direct block pointer */ struct cmdtable cmds[] = { { "help", "Print out help", 1, 1, FL_RO, helpfn }, @@ -195,6 +196,7 @@ struct cmdtable cmds[] = { { "mtime", "Change mtime of current inode to MTIME", 2, 2, FL_WR, chmtime }, { "ctime", "Change ctime of current inode to CTIME", 2, 2, FL_WR, chctime }, { "atime", "Change atime of current inode to ATIME", 2, 2, FL_WR, chatime }, + { "chdb", "Change db pointer N of current inode to BLKNO", 3, 3, FL_WR, chdb }, { "quit", "Exit", 1, 1, FL_RO, quit }, { "q", "Exit", 1, 1, FL_RO, quit }, { "exit", "Exit", 1, 1, FL_RO, quit }, @@ -1046,6 +1048,36 @@ CMDFUNCSTART(chsize) return rval; } +CMDFUNC(chdb) +{ + unsigned int idx; + daddr_t bno; + char *cp; + + if (!checkactive()) + return 1; + + idx = strtoull(argv[1], &cp, 0); + if (cp == argv[1] || *cp != '\0') { + warnx("bad pointer idx `%s'", argv[1]); + return 1; + } + bno = strtoll(argv[2], &cp, 0); + if (cp == argv[2] || *cp != '\0') { + warnx("bad block number `%s'", argv[2]); + return 1; + } + if (idx >= UFS_NDADDR) { + warnx("pointer index %d is out of range", idx); + return 1; + } + + DIP_SET(curinode, di_db[idx], bno); + inodirty(&curip); + printactive(0); + return 0; +} + CMDFUNCSTART(linkcount) { int rval = 1; From nobody Tue Apr 18 23:14:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1KVd2Gjjz45qFf; Tue, 18 Apr 2023 23:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1KVd01B4z4Dp3; Tue, 18 Apr 2023 23:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681859641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJRtmDdJD+dthwNGHQ7EX9y9DTn8PVAc2I0uFv7UT7I=; b=QdxbcPDdrs0zXFQzPG0wEzguA6lCaT24qKIl1/6qGwr9FT+mDnOtgtcm2LkKuycJaIGmDH bbe32GA3qRiwKa9eyoyFZHMz0cY2n8i/xJeAbhv0DI6dsAwK92vd27gX8nL/Hx1xOECv6J a75E3X/JO4+RWRmeoGZtCKd4C/0BZQHwFJp38pFhVlE1mU8qVpdCUh5a38tFNcZfn31wNU gmMZXEPTlMP/SD5I2JgfdeT4nAA2YVdPzzb4jisqiKcy0EqySTzmJym4KKP937UiBwR5Pk ECZCJTZn1OIcukZ9AoAlZ1aV2bHYx607Dcpga9jWvHijFmAIEbM86EhOEBd6QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681859641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vJRtmDdJD+dthwNGHQ7EX9y9DTn8PVAc2I0uFv7UT7I=; b=uyYRahxlXAZtdafmu8TkZkJNSmJCSXxKwaJM68zQH89dtYpTev8DAIJEN90W78XTGbmBT+ mQZCWIiYYJV5bMUPNRkvt9fxGU3PlRHbKss48zdYTPTlmjVlRyeJ1qs1Hgj2c8GRZX0cnm 5Z6x/ELW2oIi90iIFIwLCnd76pWPtFFzKKSz9kPchfyW3uBSKC8MmZv47woXuD82vdUYBh HMDWJ+kTaZqsreH+F7XUBm3JUcT7NLtfD43a/I+5MFHVDYRhncApS+ma6QrSv/gAMkgBHk jCRj38VzFAutmQLmeOvaAZdgrZQeDSoWTgJQkbHV+TT3iUwrGEsrBZFTYd29Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681859641; a=rsa-sha256; cv=none; b=IduRckJFAaztwrrdjMLasUFKi0u24fNz0hwyShwfBdu7uHpaq85HmgcKj4TP/s1P2BPkQN zJpOifos4gjRgb73eKcJk4KdradzXIHUcpHaZpVrjpaELtCjvFNBpiwqROC73i4BYywjZU EiJJAvmQXzyi3ZToGG2oh/arKbp0vNLxEMw3cOT8BwsmpZkbsVWUeh6jqKEH51t671iNsa C/itJa8X4qkPtA4DOi0hjtG90rnJL07M0F31fS1hrJrUheNeA2ObUx2Ru+4lgVrf6RAXLz 8t2/+DtVaEbqOskqeUBYgyjKdhYK52COlJ9YDEaaNAsHpJJnwKBf4CyLsb0pxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1KVc50gGzWhq; Tue, 18 Apr 2023 23:14: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 33INE0ID095389; Tue, 18 Apr 2023 23:14:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33INE0eh095388; Tue, 18 Apr 2023 23:14:00 GMT (envelope-from git) Date: Tue, 18 Apr 2023 23:14:00 GMT Message-Id: <202304182314.33INE0eh095388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 18746531a881 - main - Bug fixes for fsck_ffs(8). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18746531a881356ed24b6ef2fdc9e50707642163 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=18746531a881356ed24b6ef2fdc9e50707642163 commit 18746531a881356ed24b6ef2fdc9e50707642163 Author: Kirk McKusick AuthorDate: 2023-04-18 06:03:30 +0000 Commit: Kirk McKusick CommitDate: 2023-04-18 23:13:26 +0000 Bug fixes for fsck_ffs(8). Increment a reference count when returning a zero'ed out buffer after a failed read. Zero out a structure before using it. Only dirty a buffer that has been modified. Submitted by: Chuck Silvers Sponsored by: Netflix MFC after: 1 week --- sbin/fsck_ffs/fsutil.c | 4 +++- sbin/fsck_ffs/inode.c | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index d58527231240..2b915d28aa26 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -320,8 +320,10 @@ getdatablk(ufs2_daddr_t blkno, long size, int type) * Skip check for inodes because chkrange() considers * metadata areas invalid to write data. */ - if (type != BT_INODES && chkrange(blkno, size / sblock.fs_fsize)) + if (type != BT_INODES && chkrange(blkno, size / sblock.fs_fsize)) { + failedbuf.b_refcnt++; return (&failedbuf); + } bhdp = &bufhashhd[HASH(blkno)]; LIST_FOREACH(bp, bhdp, b_hash) if (bp->b_bno == fsbtodb(&sblock, blkno)) { diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index a46fea0607a0..37b0f9ebc1b1 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -747,6 +747,7 @@ snapremove(ino_t inum) bzero(&snaplist[i - 1], sizeof(struct inode)); snapcnt--; } + memset(&idesc, 0, sizeof(struct inodesc)); idesc.id_type = SNAP; idesc.id_func = snapclean; idesc.id_number = inum; @@ -767,14 +768,15 @@ snapclean(struct inodesc *idesc) if (blkno == 0) return (KEEPON); - bp = idesc->id_bp; dp = idesc->id_dp; if (blkno == BLK_NOCOPY || blkno == BLK_SNAP) { - if (idesc->id_lbn < UFS_NDADDR) + if (idesc->id_lbn < UFS_NDADDR) { DIP_SET(dp, di_db[idesc->id_lbn], 0); - else + } else { + bp = idesc->id_bp; IBLK_SET(bp, bp->b_index, 0); - dirty(bp); + dirty(bp); + } } return (KEEPON); } From nobody Tue Apr 18 23:14:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1KVf1l5zz45qFg; Tue, 18 Apr 2023 23:14: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 4Q1KVd6dZ1z4F3p; Tue, 18 Apr 2023 23:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681859642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nQPNjIt6vTejxu9pCC/8gxoOp5mT9oLW4A731wZU4Sg=; b=ULY8hg6rzmcVB6oYgPzQ0XBrNymUUAT+NIezm/9fXyxCn85i2z+sugcMle0ae6UytorBxV 6f/RH31WMSQFHAVUzt29SEczxrLUyYMjkg8LrEt/6b44fubedwqWqNbZWXAJzz+J5vFmaG sUlq3CE+TgLzwro6R4PiPe875/hWlIsFE1tUJkr+xQM+Fc4ktdq+Ag286AE4GWVdwUks7M 2qPf8ZyT9eqfLQ+JjyQJbEKLWov8id9TOh6wFU5qUU688TbpgChT8+kGQhTt35VdFn5ucP PTIeKVwSdzrp6rK4M216om6k1tBA7X6HMyMmuArYvf4LDVGVz0WrHQtzqQ3hwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681859642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nQPNjIt6vTejxu9pCC/8gxoOp5mT9oLW4A731wZU4Sg=; b=ODWVnzAfCzVdErf075o0Sg6sIrnn8ZGVT+phCjf7lyVnm4rL/yZFslLT0YHhgDSSVkSV5M NrOrcuBFXKziHRm0btb5Z9lpPDnf7eJA+sSWIjePYIvF63CXxg6v57JAw8qkl4wUh12FF/ 8p4gsTp4kNM+vXKG9yzSyCy3j/inoC6YAq79iZfs2Dpth2pUEp5cszflWB9kRx2mgXLn9E fuC/qb3TYI9Y6Zzr2Z4wvGetpU1mMdezGKDSrKX8MumOIm4zolbsXZLmar+B1h4zS8/BoC rD/7Nz4XMLdme1JU03Dpwyf5A73B3N4r1SKm/TWAPBWg95ssMUEh1TAsllvUlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681859642; a=rsa-sha256; cv=none; b=GpeuJ8NJcVC5cBdH4Rqgl1JE4rRdlLJwlL5cXd4Xy0baC+IpXHKXaRq6LrGOo7nmAtADSD 1cdUtN9jdFQkMeJ8IUurlZl7yq3oa3OuyYQ4GryC614BhYhsi//gY6WyHs5b8NEE+4VDMV t4Dk6nMl2SN1t0dYOUE3zCj4/7kyjjYWjolohpsGiLoazLTySQ3l2TVnSwYnAGJ/RZ12hW 2ubdyb9VNSZ0wg1wD+GVE7SMJTAh1snRuqq1G1BKONCzfKSvz+5WFzgagrGAGRj4VkMQz9 t8KbJWib69K8xbVyh3LDC4j/rqsH9zdkP+kLLfIwVRb7CmYnFYdn3POC4zTWFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1KVd5fzDzX2Q; Tue, 18 Apr 2023 23:14: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 33INE1cu095408; Tue, 18 Apr 2023 23:14:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33INE1qg095407; Tue, 18 Apr 2023 23:14:01 GMT (envelope-from git) Date: Tue, 18 Apr 2023 23:14:01 GMT Message-Id: <202304182314.33INE1qg095407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: da86e7a20dc4 - main - Skip Pass 5 in fsck_ffs(8) when corrupt cylinder groups remain unfixed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da86e7a20dc4a4b17e8d9e7630ed9b675cf71702 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=da86e7a20dc4a4b17e8d9e7630ed9b675cf71702 commit da86e7a20dc4a4b17e8d9e7630ed9b675cf71702 Author: Kirk McKusick AuthorDate: 2023-04-18 23:10:49 +0000 Commit: Kirk McKusick CommitDate: 2023-04-18 23:13:26 +0000 Skip Pass 5 in fsck_ffs(8) when corrupt cylinder groups remain unfixed. Pass 1 of fsck_ffs checks the integrity of all the cylinder groups. If any are found to have been corrupted it offers to rebuild them. Pass 5 then makes a second pass over the cylinder groups to validate their block and inode maps. Pass 5 assumes that the cylinder groups are not corrupted and can segment fault if they are corrupted. Rather than rerunning the corruption checks a second time in pass 5, this fix keeps track whether any corrupt cylinder groups were found but not fixed in pass 1 either due to running with the -n flag or by explicitly answering `no' when asked whether to fix a corrupted cylinder group. If any corrupted cylinder groups remain after pass 1, fsck_ffs will decline to run pass 5. Instead it marks the filesystem as unclean so that fsck_ffs will need to be run again before the filesystem can be mounted. This patch cleans up and documents the return value from check_cgmagic(). It also renames the variable / parameter "rebuildcg" to "rebuiltcg". This parameter describes whether the cylinder group has been rebuilt rather than whether it should be rebuilt. Reported by: Chuck Silvers Reviewed by: Chuck Silvers MFC after: 1 week --- sbin/fsck_ffs/fsck.h | 3 ++- sbin/fsck_ffs/fsutil.c | 8 ++++++-- sbin/fsck_ffs/globs.c | 2 ++ sbin/fsck_ffs/inode.c | 4 ++-- sbin/fsck_ffs/main.c | 9 +++++++-- sbin/fsck_ffs/pass1.c | 30 +++++++++++++++++------------- 6 files changed, 36 insertions(+), 20 deletions(-) diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index 43e826e13b77..95dccf0d672d 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -346,6 +346,7 @@ extern off_t bflag; /* location of alternate super block */ extern int bkgrdflag; /* use a snapshot to run on an active system */ extern char *blockmap; /* ptr to primary blk allocation map */ extern char *cdevname; /* name of device being checked */ +extern int cgheader_corrupt; /* one or more CG headers are corrupt */ extern char ckclean; /* only do work if not cleanly unmounted */ extern int ckhashadd; /* check hashes to be added */ extern char *copybuf; /* buffer to copy snapshot blocks */ @@ -493,7 +494,7 @@ int ftypeok(union dinode *dp); void getblk(struct bufarea *bp, ufs2_daddr_t blk, long size); struct bufarea *getdatablk(ufs2_daddr_t blkno, long size, int type); struct inoinfo *getinoinfo(ino_t inumber); -union dinode *getnextinode(ino_t inumber, int rebuildcg); +union dinode *getnextinode(ino_t inumber, int rebuiltcg); void getpathname(char *namebuf, ino_t curdir, ino_t ino); void ginode(ino_t, struct inode *); void gjournal_check(const char *filesys); diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index 2b915d28aa26..1df52b7cfdc9 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -988,6 +988,10 @@ blzero(int fd, ufs2_daddr_t blk, long size) /* * Verify cylinder group's magic number and other parameters. If the * test fails, offer an option to rebuild the whole cylinder group. + * + * Return 1 if the cylinder group is good or if repair is requested + * and is completed successfully. Return 0 if it is bad or if a repair + * has been requested but is not completed successfully. */ #undef CHK #define CHK(lhs, op, rhs, fmt) \ @@ -1080,7 +1084,7 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild) if (!reply("REBUILD CYLINDER GROUP")) { printf("YOU WILL NEED TO RERUN FSCK.\n"); rerun = 1; - return (1); + return (0); } /* * Zero out the cylinder group and then initialize critical fields. @@ -1123,7 +1127,7 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild) } cgp->cg_ckhash = calculate_crc32c(~0L, (void *)cgp, sblock.fs_cgsize); cgdirty(cgbp); - return (0); + return (1); } /* diff --git a/sbin/fsck_ffs/globs.c b/sbin/fsck_ffs/globs.c index 306944fa95b9..bce499754301 100644 --- a/sbin/fsck_ffs/globs.c +++ b/sbin/fsck_ffs/globs.c @@ -110,6 +110,7 @@ ino_t lfdir; /* lost & found directory inode number */ const char *lfname; /* lost & found directory name */ int lfmode; /* lost & found directory creation mode */ ufs2_daddr_t n_blks; /* number of blocks in use */ +int cgheader_corrupt; /* one or more CG headers are corrupt */ ino_t n_files; /* number of files in use */ volatile sig_atomic_t got_siginfo; /* received a SIGINFO */ volatile sig_atomic_t got_sigalarm; /* received a SIGALRM */ @@ -164,6 +165,7 @@ fsckinit(void) lfmode = 0700; n_blks = 0; n_files = 0; + cgheader_corrupt = 0; got_siginfo = 0; got_sigalarm = 0; bzero(&zino.dp1, sizeof(struct ufs1_dinode)); diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index 37b0f9ebc1b1..2d563f617a56 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -510,7 +510,7 @@ static ino_t nextinum, lastvalidinum; static long readcount, readpercg, fullcnt, inobufsize, partialcnt, partialsize; union dinode * -getnextinode(ino_t inumber, int rebuildcg) +getnextinode(ino_t inumber, int rebuiltcg) { int j; long size; @@ -569,7 +569,7 @@ getnextinode(ino_t inumber, int rebuildcg) dirty(&inobuf); } } - if (rebuildcg && (char *)dp == inobuf.b_un.b_buf) { + if (rebuiltcg && (char *)dp == inobuf.b_un.b_buf) { /* * Try to determine if we have reached the end of the * allocated inodes. diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index f7d995a54d1b..2bd61dda7030 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -490,8 +490,13 @@ checkfilesys(char *filesys) if (preen == 0) printf("** Phase 5 - Check Cyl groups\n"); snapflush(std_checkblkavail); - pass5(); - IOstats("Pass5"); + if (cgheader_corrupt) { + printf("PHASE 5 SKIPPED DUE TO CORRUPT CYLINDER GROUP " + "HEADER(S)\n"); + } else { + pass5(); + IOstats("Pass5"); + } /* * print out summary statistics diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c index afe9f7f2b789..55233e0bc4f4 100644 --- a/sbin/fsck_ffs/pass1.c +++ b/sbin/fsck_ffs/pass1.c @@ -56,7 +56,7 @@ static ufs2_daddr_t badblk; static ufs2_daddr_t dupblk; static ino_t lastino; /* last inode in use */ -static int checkinode(ino_t inumber, struct inodesc *, int rebuildcg); +static int checkinode(ino_t inumber, struct inodesc *, int rebuiltcg); void pass1(void) @@ -68,7 +68,7 @@ pass1(void) ino_t inumber, inosused, mininos; ufs2_daddr_t i, cgd; u_int8_t *cp; - int c, rebuildcg; + int c, rebuiltcg; badblk = dupblk = lastino = 0; @@ -99,10 +99,14 @@ pass1(void) inumber = c * sblock.fs_ipg; cgbp = cglookup(c); cgp = cgbp->b_un.b_cg; - rebuildcg = 0; - if (!check_cgmagic(c, cgbp, 1)) - rebuildcg = 1; - if (!rebuildcg && sblock.fs_magic == FS_UFS2_MAGIC) { + rebuiltcg = 0; + if (!check_cgmagic(c, cgbp, 0)) { + if (!check_cgmagic(c, cgbp, 1)) + cgheader_corrupt = 1; + else + rebuiltcg = 1; + } + if (!rebuiltcg && sblock.fs_magic == FS_UFS2_MAGIC) { inosused = cgp->cg_initediblk; if (inosused > sblock.fs_ipg) { pfatal("Too many initialized inodes (%ju > %d) " @@ -132,7 +136,7 @@ pass1(void) * to find the inodes that are really in use, and then * read only those inodes in from disk. */ - if ((preen || inoopt) && usedsoftdep && !rebuildcg) { + if ((preen || inoopt) && usedsoftdep && !rebuiltcg) { cp = &cg_inosused(cgp)[(inosused - 1) / CHAR_BIT]; for ( ; inosused != 0; cp--) { if (*cp == 0) { @@ -169,7 +173,7 @@ pass1(void) setinodebuf(c, inosused); for (i = 0; i < inosused; i++, inumber++) { if (inumber < UFS_ROOTINO) { - (void)getnextinode(inumber, rebuildcg); + (void)getnextinode(inumber, rebuiltcg); continue; } /* @@ -178,7 +182,7 @@ pass1(void) * We always keep trying until we get to the minimum * valid number for this cylinder group. */ - if (checkinode(inumber, &idesc, rebuildcg) == 0 && + if (checkinode(inumber, &idesc, rebuiltcg) == 0 && i > cgp->cg_initediblk) break; } @@ -189,7 +193,7 @@ pass1(void) * fewer in use. */ mininos = roundup(inosused + INOPB(&sblock), INOPB(&sblock)); - if (inoopt && !preen && !rebuildcg && + if (inoopt && !preen && !rebuiltcg && sblock.fs_magic == FS_UFS2_MAGIC && cgp->cg_initediblk > 2 * INOPB(&sblock) && mininos < cgp->cg_initediblk) { @@ -209,7 +213,7 @@ pass1(void) inosused = 0; else inosused = lastino - (c * sblock.fs_ipg); - if (rebuildcg && inosused > cgp->cg_initediblk && + if (rebuiltcg && inosused > cgp->cg_initediblk && sblock.fs_magic == FS_UFS2_MAGIC) { cgp->cg_initediblk = roundup(inosused, INOPB(&sblock)); pwarn("CYLINDER GROUP %d: FOUND %d VALID INODES\n", c, @@ -242,7 +246,7 @@ pass1(void) } static int -checkinode(ino_t inumber, struct inodesc *idesc, int rebuildcg) +checkinode(ino_t inumber, struct inodesc *idesc, int rebuiltcg) { struct inode ip; union dinode *dp; @@ -252,7 +256,7 @@ checkinode(ino_t inumber, struct inodesc *idesc, int rebuildcg) intmax_t size, fixsize; int j, ret, offset; - if ((dp = getnextinode(inumber, rebuildcg)) == NULL) { + if ((dp = getnextinode(inumber, rebuiltcg)) == NULL) { pfatal("INVALID INODE"); goto unknown; } From nobody Tue Apr 18 23:22: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 4Q1Kgz0l8zz45qhQ; Tue, 18 Apr 2023 23:22: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 4Q1Kgy1fW4z4Sxb; Tue, 18 Apr 2023 23:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681860126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TT4UZeRtuQqencAy+e5FVwMWjCEhUFZMrKsN11QH9Zs=; b=JHxzOEVkCAx61TPMYat9AvK6b+Kxt8+pU6y0hSDTFXLDwONtofanTwUCfUW9gGYRqua4Gy k3zu0olgaWXAl0porR3RUj+WjCloapQtbbXMuK8jK9OX3VDXwJPqKyV+fwYuN2fOJJZzp6 +xwusP9bfSshvwvQGKOj+BaKNExCUQHhfZpAhVcWulwujllbNQ5F5weUj0KA6kojI/DaRR 3RUG3RHzO4FnIRYk+MPmR9ztSPPV1tsHRt5UGv2T5PI1tcQ8mB55kgtHXONpjQ9L/2rOlg DsmBoAq0sDoEDb13INvyxHRXhIFxo4JxJJ7uwsqxxpRy5SlY3poWXpf2lq/fSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681860126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TT4UZeRtuQqencAy+e5FVwMWjCEhUFZMrKsN11QH9Zs=; b=r1zAluekCFAFz1d654yNar6sGf2PVvhNLKrXjQafATs/fCe4PstmXiMTKWQ19WlYKTTReg MY/JbBuS7oAgV77RyCi2wCD6OcRX2sT4PMBBvcV1vbo1BRZPup87c1tqKMfXTzxYEhyBOn YsZgqJrhAtj45dN5DlcXE7tyG293k8TfvLmXqekD5ddNIkdRQ56XfrYZwV2UVFDFcoiI2t ignh0EksEbLjqZIEx5E8CnvZdJvIQO5rKbBG59ikrHY5NW39tYSQHqjI0dPMRSzKmS6ycr 43My97JqB4Byn2yJfQpFozms3vg1tXKMxThejlUU/raozOYtH+PE1DuQgclS8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681860126; a=rsa-sha256; cv=none; b=qsH1HxGtUqKu+BBctz1qTKgk/z5LzBFLWJiMAOer26kaL1ceh12VTRppi3lWA97uffNd26 ikdhVeePoTaCthjo+01jpZfVdiznBQlCIis+sXZtfyVpk6QAtTa/mH6jmoanwyDydBzr3o H43fdWFyyclV+FO+MsZvFGALKhcHFn2eotNcLEFKRSatNB+iRnEgVYxWxaOSpoMlAXuI4W 2giNTwboFwMI6T0fJv9uRkBWh49h8dnbwwl3zhNQj5Ed0cndClq8/uyGCGtWT+XmZY+xOF 6x3lONqcr18MdXhfleTIw8pWT9rUaQSngPRbLdVzTkBgLvuBT4Gnb5YTcxOEfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Kgy0lrXzWrw; Tue, 18 Apr 2023 23:22: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 33INM6YT011416; Tue, 18 Apr 2023 23:22:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33INM6n9011415; Tue, 18 Apr 2023 23:22:06 GMT (envelope-from git) Date: Tue, 18 Apr 2023 23:22:06 GMT Message-Id: <202304182322.33INM6n9011415@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: d8a096621bcf - main - sync_vnode(): add assert to check vn_start_write() correctness List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d8a096621bcf4539d0920eb0711d19fcb30c0576 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d8a096621bcf4539d0920eb0711d19fcb30c0576 commit d8a096621bcf4539d0920eb0711d19fcb30c0576 Author: Konstantin Belousov AuthorDate: 2023-04-15 19:41:44 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-18 23:21:40 +0000 sync_vnode(): add assert to check vn_start_write() correctness Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 60d3a71667a1..475467da3c34 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2659,6 +2659,9 @@ sync_vnode(struct synclist *slp, struct bufobj **bo, struct thread *td) mtx_lock(&sync_mtx); return (*bo == LIST_FIRST(slp)); } + MPASSERT(mp == NULL || (curthread->td_pflags & TDP_IGNSUSP) != 0 || + (mp->mnt_kern_flag & MNTK_SUSPENDED) == 0, mp, + ("suspended mp syncing vp %p", vp)); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); (void) VOP_FSYNC(vp, MNT_LAZY, td); VOP_UNLOCK(vp); From nobody Tue Apr 18 23:22: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 4Q1Kgz6NN8z45qms; Tue, 18 Apr 2023 23:22: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 4Q1Kgz2Xttz4TCl; Tue, 18 Apr 2023 23:22:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681860127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y8KlPfbh/XiyiNIivue+CH9QvB0qPLVkTU8rtxEY6WM=; b=tMsn3htntBUxAXMa199RkDDwkJIuXZT4retV1xVNKYk8s+DyT4Z15SJuKkdA8hhWT/SlLj ZIaAeNjzxY3FliEE4/wyPfb+qOGmFtDNw4W3vs09UB9+SghKqpJ7V1BsXpiVPNfquFSzNf n/r6BsvIEXbuTd4xAmfh+Wm7KfFrI/SXm6Arbs+fivKO+ZfbEIdxxeMDGxeQiGIvkXX6Zy fTeRob6UdNjNvej9txZnOobRrr3awSEvSx9EmfW2z4Sknux35wEnbQ+RDaN/xGaoSbGCkj Mjbx8aH6UkZfdJUgkp0RLzvRMUlA4ktgsrK4WcmG0wA0C1QQyhMZTHN4/q0IyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681860127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y8KlPfbh/XiyiNIivue+CH9QvB0qPLVkTU8rtxEY6WM=; b=lK3y0Xslo/qcENmEEPDVMgv3Jo1dGb3QW0+kBJFjWYAWBYaeBEcy4lfLKDjxLagOtNSSNA etsc4odbFcV223VAZvpIciBZbVbxyTniKOT6Z7E47WhAxsoTRNGWVe6IZD87PSgHE//csZ j1G+c4v2mAN4EOTw4tObE/J1m4OLNVeBo6GsruGAtVQYMziZRmFsf36dny+1Zgjw8DvwfU e8JoO5KahucpW/Mpgel7OEXEMD3cztgwOZNh/v+sNUvVD/TAKUCyR8B34J+zHdvKjS63q0 TInNXrREQe1+rfB4GAVn4KQmbAFUefNT6x8rXkYmO5jHx1AkFJQZHyJzFb149Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681860127; a=rsa-sha256; cv=none; b=jBt+rHPfIoaT3onHvouIVRYwBkYktyHruxazjZhxIcJE3H2w/MIImU9zP0wrpJ0ike6IGE 9zdL2t2sCi7pkC0PZXb3jkd/Yqojw2fXzl96WviVUNr8HMgENBRNy2lOadZIYhN6HqpzQZ qphwsuLSnBU8YhONJZYrrL2O3E54gz9bx7U8DjvYuGACSnF6cfdZyM4rQKLLv94cTFlV8g LfqZcND17tlL+0w3cOSApd2si9w6wrMI9uNCVFb9wDYJulF8iRw5/VQFAQt5yLQCLHwk27 LdZ6SAXeJDi4tJ5R31nPs/TsADt2+R+vtbyTtYVOrFvcuzmt3SUtXK60CPinkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Kgz1g7yzWjJ; Tue, 18 Apr 2023 23:22: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 33INM7qO011436; Tue, 18 Apr 2023 23:22:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33INM7t3011435; Tue, 18 Apr 2023 23:22:07 GMT (envelope-from git) Date: Tue, 18 Apr 2023 23:22:07 GMT Message-Id: <202304182322.33INM7t3011435@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: 7aeea73e3078 - main - syncer vnode: add VOP_GETWRITEMOUNT() definition explicitly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7aeea73e30789c8987fbfa52cde93bab577bbc09 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7aeea73e30789c8987fbfa52cde93bab577bbc09 commit 7aeea73e30789c8987fbfa52cde93bab577bbc09 Author: Konstantin Belousov AuthorDate: 2023-04-16 17:04:53 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-18 23:21:40 +0000 syncer vnode: add VOP_GETWRITEMOUNT() definition explicitly Since syncer vnode vector does not provide a fallback to the default one, its VOP_GETWRITEMOUNT() implementation implicitly returned EOPNOTSUPP, which means that syncer ignored suspension. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_subr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 475467da3c34..eac6fa0ddb6a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4986,6 +4986,7 @@ static struct vop_vector sync_vnodeops = { .vop_bypass = VOP_EOPNOTSUPP, .vop_close = sync_close, .vop_fsync = sync_fsync, + .vop_getwritemount = vop_stdgetwritemount, .vop_inactive = sync_inactive, .vop_need_inactive = vop_stdneed_inactive, .vop_reclaim = sync_reclaim, From nobody Tue Apr 18 23:22: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 4Q1Khw3kLcz45qr9; Tue, 18 Apr 2023 23:22: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 4Q1Khw37Yhz4Vrw; Tue, 18 Apr 2023 23:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681860176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gy+TYwjoEvK4SNaEiBAaStSSisPhq9x1xabtx1yS+50=; b=Nmk0BrBqI/VfmR08tBugriAz0kH6Am/0YYf6rACQoK+vmqfMu0kBFjqUzYDhHNwtXPXBHV ljhg5AtTQn9vrdlOrdoGw+s+DU04Jw7/GQ06sGR2+grhGPg9jMmaYidjtrb9pwNauQL3ma 1NNDALUmtq1XxeOMPz//WdW0LoWt5RhcFUpR+127U1mK9iMvszVYpphsm124KkpRcc3a9N 7h4Fi5MYmS8qBhQoprj5lNa6fNq5fiNf205JjDxFLa5KKkwcjDv1GZyAH1Eay6x4CWkQbb eSlZOU787gng+hLk+Nz8zhp9c8iKm2ryAUup2xJR+gQTdO6ZFbUDSGCvOl8Mhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681860176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gy+TYwjoEvK4SNaEiBAaStSSisPhq9x1xabtx1yS+50=; b=Sh7RnuhToG57lSeWXBoSMzCItLiYzV+grFy1zMQ01yxX92UgBsjnpl96aRd1cWp8zBkmGy qwYkHSVajlI2CHQbLjofHP7y19mjRiQk2u5YJO6R/Xls/6ktApGiGszEGApNt9IDvFDeTn DMf88glRjFRu2XeeJdxJSXxcL4C2HLDa1DUgdEofjnqs1Omct04X9uepNkTBTi3l3LSciF Vl5lFFQ6inHBUJEsuyrZqU6YOwDyhSIwMHMLHoANj92d7prF6c/0F9zmfDx1MjlkfvuiFx PtPKfkqLpUYGY+gQoi+TAniOYb8aUdXfhxI0fEgXEt4P66y5S5qCBKwsKQtLvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681860176; a=rsa-sha256; cv=none; b=PyOQmwy/djCD7dlnaIGpeJJTdAp+qPQgyWUuqz0YxZ1C/uLhqLCXGz9s9XfsCdUM5k/uIx HzDof1xob/+bJNFSEJOuKYSohqE1Btz09oWA2VW2bCe0g0LPCkxM6b7SkOo4hxj5XOP22V A2vu4MzNxTxdwHi4QqknpzaLQM4k3zlJCLB+hSCk9ZcHaKAVymqrtttXP1dayn+DJtS0FT yuaQhUP4JpPjMbmos+62UVtCbbLpMZwJFDNI89YA9bu/eO8lt1dzNSuQFpIY4q9fwJMWRl NTPQmadZZJyWK7y0cCmltUGO81NhEH9DKrB1PAVYSKZyVtel2XiEsblgqemy8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Khw2FkzzXDg; Tue, 18 Apr 2023 23:22: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 33INMuAc011695; Tue, 18 Apr 2023 23:22:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33INMuNL011694; Tue, 18 Apr 2023 23:22:56 GMT (envelope-from git) Date: Tue, 18 Apr 2023 23:22:56 GMT Message-Id: <202304182322.33INMuNL011694@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: 93ca6ff2958c - main - umtx: allow to configure minimal timeout (in nanoseconds) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 93ca6ff2958cace3b7b883ed797ea6539881a6a2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=93ca6ff2958cace3b7b883ed797ea6539881a6a2 commit 93ca6ff2958cace3b7b883ed797ea6539881a6a2 Author: Konstantin Belousov AuthorDate: 2023-04-15 17:46:12 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-18 23:22:28 +0000 umtx: allow to configure minimal timeout (in nanoseconds) PR: 270785 Reviewed by: markj, mav Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39584 --- lib/libc/sys/_umtx_op.2 | 11 +++++++++++ lib/libthr/libthr.3 | 6 ++++++ lib/libthr/thread/thr_init.c | 11 +++++++++++ sys/kern/kern_thread.c | 4 ++-- sys/kern/kern_umtx.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ sys/sys/proc.h | 1 + sys/sys/umtx.h | 2 ++ 7 files changed, 78 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/_umtx_op.2 b/lib/libc/sys/_umtx_op.2 index f4a908b85017..93078a765495 100644 --- a/lib/libc/sys/_umtx_op.2 +++ b/lib/libc/sys/_umtx_op.2 @@ -1270,6 +1270,17 @@ in which case list processing is continued. See .Sx ROBUST UMUTEXES subsection for details. +.It Dv UMTX_OP_GET_MIN_TIMEOUT +Writes out the current value of minimal umtx operations timeout, +in nanoseconds, into the long integer variable pointed to by +.Fa uaddr1 . +.It Dv UMTX_OP_SET_MIN_TIMEOUT +Set the minimal amount of time, in nanoseconds, the thread is required +to sleep for umtx operations specifying a timeout using absolute clocks. +The value is taken from the +.Fa val +argument of the call. +Zero means no minimum. .El .Pp The diff --git a/lib/libthr/libthr.3 b/lib/libthr/libthr.3 index 3018a6f20b86..0477ac0647a8 100644 --- a/lib/libthr/libthr.3 +++ b/lib/libthr/libthr.3 @@ -196,6 +196,12 @@ The integer value of the variable specifies how often blocked threads are inserted at the head of the sleep queue, instead of its tail. Bigger values reduce the frequency of the FIFO discipline. The value must be between 0 and 255. +.It Dv LIBPTHREAD_UMTX_MIN_TIMEOUT +The minimal amount of time, in nanoseconds, the thread is required to sleep +for pthread operations specifying a timeout. +If the operation requests a timeout less than the value provided, +it is silently increased to the value. +The value of zero means no minimum (default). .Pp .El The following diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 1c4867cb8185..6010dd4c0451 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -522,6 +522,17 @@ init_private(void) if (env) _thr_queuefifo = atoi(env); TAILQ_INIT(&_thr_atfork_list); + env = getenv("LIBPTHREAD_UMTX_MIN_TIMEOUT"); + if (env) { + char *endptr; + long mint; + + mint = strtol(env, &endptr, 0); + if (*endptr == '\0' && mint >= 0) { + _umtx_op(NULL, UMTX_OP_SET_MIN_TIMEOUT, + mint, NULL, NULL); + } + } } init_once = 1; } diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index ad54783dd4a9..0e432d6978e6 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -101,7 +101,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x3c8, "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x3e0, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4c8, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4d0, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ @@ -121,7 +121,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x270, "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x284, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x310, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x318, "struct proc KBI p_emuldata"); #endif diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 86d644c835c7..92c7de6f2a2c 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -700,6 +700,19 @@ umtx_abs_timeout_init2(struct umtx_abs_timeout *timo, (umtxtime->_flags & UMTX_ABSTIME) != 0, &umtxtime->_timeout); } +static void +umtx_abs_timeout_enforce_min(sbintime_t *sbt) +{ + sbintime_t when, mint; + + mint = curproc->p_umtx_min_timeout; + if (__predict_false(mint != 0)) { + when = sbinuptime() + mint; + if (*sbt < when) + *sbt = when; + } +} + static int umtx_abs_timeout_getsbt(struct umtx_abs_timeout *timo, sbintime_t *sbt, int *flags) @@ -739,6 +752,7 @@ umtx_abs_timeout_getsbt(struct umtx_abs_timeout *timo, sbintime_t *sbt, return (0); } *sbt = bttosbt(bt); + umtx_abs_timeout_enforce_min(sbt); /* * Check if the absolute time should be aligned to @@ -4594,6 +4608,33 @@ __umtx_op_robust_lists(struct thread *td, struct _umtx_op_args *uap, return (0); } +static int +__umtx_op_get_min_timeout(struct thread *td, struct _umtx_op_args *uap, + const struct umtx_copyops *ops) +{ + long val; + int error, val1; + + val = sbttons(td->td_proc->p_umtx_min_timeout); + if (ops->compat32) { + val1 = (int)val; + error = copyout(&val1, uap->uaddr1, sizeof(val1)); + } else { + error = copyout(&val, uap->uaddr1, sizeof(val)); + } + return (error); +} + +static int +__umtx_op_set_min_timeout(struct thread *td, struct _umtx_op_args *uap, + const struct umtx_copyops *ops) +{ + if (uap->val < 0) + return (EINVAL); + td->td_proc->p_umtx_min_timeout = nstosbt(uap->val); + return (0); +} + #if defined(__i386__) || defined(__amd64__) /* * Provide the standard 32-bit definitions for x86, since native/compat32 use a @@ -4816,6 +4857,8 @@ static const _umtx_op_func op_table[] = { [UMTX_OP_SEM2_WAKE] = __umtx_op_sem2_wake, [UMTX_OP_SHM] = __umtx_op_shm, [UMTX_OP_ROBUST_LISTS] = __umtx_op_robust_lists, + [UMTX_OP_GET_MIN_TIMEOUT] = __umtx_op_get_min_timeout, + [UMTX_OP_SET_MIN_TIMEOUT] = __umtx_op_set_min_timeout, }; static const struct umtx_copyops umtx_native_ops = { @@ -4990,6 +5033,8 @@ umtx_exec(struct proc *p) umtx_thread_cleanup(td); td->td_rb_list = td->td_rbp_list = td->td_rb_inact = 0; } + + p->p_umtx_min_timeout = 0; } /* diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 172e716d8785..1292315990b3 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -741,6 +741,7 @@ struct proc { uint64_t p_elf_flags; /* (x) ELF flags */ void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for non ELF binaries. */ + sbintime_t p_umtx_min_timeout; /* End area that is copied on creation. */ #define p_endcopy p_xexit diff --git a/sys/sys/umtx.h b/sys/sys/umtx.h index 82a8e0e4b0f0..ddd3bd387099 100644 --- a/sys/sys/umtx.h +++ b/sys/sys/umtx.h @@ -103,6 +103,8 @@ #define UMTX_OP_SEM2_WAKE 24 #define UMTX_OP_SHM 25 #define UMTX_OP_ROBUST_LISTS 26 +#define UMTX_OP_GET_MIN_TIMEOUT 27 +#define UMTX_OP_SET_MIN_TIMEOUT 28 /* * Flags for ops; the double-underbar convention must be maintained for future From nobody Tue Apr 18 23:22: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 4Q1Khy22Ndz45qrD; Tue, 18 Apr 2023 23:22: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 4Q1Khx6bnKz4W2w; Tue, 18 Apr 2023 23:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681860178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30eL+RwY8wc5We9DPqPhqvHfIUfQZ3/tvLdB+jJBahc=; b=lqOos5NjO+OOHoBRpZlgWg2SJNN1ujg4UHO38INpYzZEtJFmnOeqVbVvuIb/BZgOTlMrwT MJJ9Pf6reVQg+934xQlU6kuasffyVfls9FYrBLZ77p1ic/5y78YwwQlVdFoz/X9xzjDSDu b88UWdCMHS0miGG6DGi2S+cwBu+DfDrYSD9kU5RAAImP7TVwsz17uA53fwawox0EM6wCCr fbmIuF/fFHlUlEX5V1VzyhgZfJ9SHlFXaxp//TXbofupsJNvuyfP0emHINcev5KKA1Wo5r relefdCfNZpWfNYBrDbWGO2XH1yg2IBSOUcXyuT19YVwBHlbH2wnrSkZ+faISw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681860177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=30eL+RwY8wc5We9DPqPhqvHfIUfQZ3/tvLdB+jJBahc=; b=jplXnY7clZpN3I/Uaprygz0U/H8ojrDAFW5HJ/QBOMHhaiLmHyBIIEWUst7gxuAoL4v2uH WAnYYDbf4sHwmy4mORwuPEqHxm/IM92eSkNxheSzffrQbBJ23fihZdCTRtyTw0Jha+tdtp /sQjFRgir5sNtMUPAjooYW6+iIDEU4VAxd8XQdTKXvcUNJI926MagQRrgbC5b4as8Z6Yns +WnA5fr6VQB4/5ZOTuCt1pdj2TKuIBUTRukGu5Y7gPqRrIWcQtiFrHrVWsN4AzBkTvsSTN UNI7a6SKWOxxtAVF20mY7ypp6H3UlNCUaKBmsmGx9j6WjILQo41kdNCksQYHFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681860177; a=rsa-sha256; cv=none; b=b+cRm7wqnOZRe261g5hTi6smLm5nkt5Cm0L+XEJYXrfzLazaAZgXeBtb1fCRnMIePyV22u KFsE8m70oVLK3+5Fgv8Ry0IWBi0f9QXmKbni4VIe8HOULd+ac2PQVF39kWVJqj2d36QM8s 0HwfNDIF7+HssSkEe/kog59GlKSuqucVxtVIPjooLzjOC4HVAPvlOUmVD8ul81jlHeUr/m K/ALmfGdEBkXZp5ztcxSzzb2eT2dRlfoxQNcHlwnVWZYUvuDqGtY+uO56iAMePGVhER69P a9Cb5yhOWq+O85vU4jyBEnCDZEsPHjQyypGizhxCCtQoryzXzAdFle9PZrFhAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Khx3RVxzXCs; Tue, 18 Apr 2023 23:22:57 +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 33INMvnS011716; Tue, 18 Apr 2023 23:22:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33INMvuQ011715; Tue, 18 Apr 2023 23:22:57 GMT (envelope-from git) Date: Tue, 18 Apr 2023 23:22:57 GMT Message-Id: <202304182322.33INMvuQ011715@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: 617a11eab633 - main - x86: initialize use_xsave 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 617a11eab6337693eae9d160453adf1943ab6a37 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=617a11eab6337693eae9d160453adf1943ab6a37 commit 617a11eab6337693eae9d160453adf1943ab6a37 Author: Konstantin Belousov AuthorDate: 2023-04-18 15:50:26 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-18 23:22:28 +0000 x86: initialize use_xsave once The explanation from https://reviews.freebsd.org/D39637 by stevek: The "use_xsave" variable is a global and that is only supposed to be initialized early before scheduling gets started. However, with the way the ifuncs for "fpusave" and "fpurestore" are implemented, the value could be changed at runtime when scheduling is active if "use_xsave" was set to 0 by the tunable. This leaves a window of opportunity where "use_xsave" gets re-initialized to 1 and a context switch could occur with a thread that was not set up to be able to use xsave functionality. This can lead to an "privileged instruction fault". The fix is to protect "use_xsave" from being initialized more than once. Reported and reviewed by: stevek Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39660 --- sys/amd64/amd64/fpu.c | 16 ---------------- sys/amd64/amd64/machdep.c | 5 +++++ sys/i386/i386/machdep.c | 6 ++++++ sys/i386/i386/npx.c | 14 -------------- 4 files changed, 11 insertions(+), 30 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 64974a7210a9..a3421cf0d496 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -238,22 +238,8 @@ fpurestore_fxrstor(void *addr) fxrstor((char *)addr); } -static void -init_xsave(void) -{ - - if (use_xsave) - return; - if ((cpu_feature2 & CPUID2_XSAVE) == 0) - return; - use_xsave = 1; - TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); -} - DEFINE_IFUNC(, void, fpusave, (void *)) { - - init_xsave(); if (!use_xsave) return (fpusave_fxsave); if ((cpu_stdext_feature & CPUID_EXTSTATE_XSAVEOPT) != 0) { @@ -266,8 +252,6 @@ DEFINE_IFUNC(, void, fpusave, (void *)) DEFINE_IFUNC(, void, fpurestore, (void *)) { - - init_xsave(); if (!use_xsave) return (fpurestore_fxrstor); return ((cpu_stdext_feature & CPUID_STDEXT_NFPUSG) != 0 ? diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 480db1ed2c31..29a0bd6f9db4 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1345,6 +1345,11 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) &pmap_pcid_invlpg_workaround_uena); cpu_init_small_core(); + if ((cpu_feature2 & CPUID2_XSAVE) != 0) { + use_xsave = 1; + TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); + } + link_elf_ireloc(kmdp); /* diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index d59e95ed1a99..1003dbe539c2 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1545,6 +1545,11 @@ init386(int first) i386_kdb_init(); } + if (cpu_fxsr && (cpu_feature2 & CPUID2_XSAVE) != 0) { + use_xsave = 1; + TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); + } + kmdp = preload_search_by_type("elf kernel"); link_elf_ireloc(kmdp); @@ -1565,6 +1570,7 @@ init386(int first) msgbufinit(msgbufp, msgbufsize); npxinit(true); + /* * Set up thread0 pcb after npxinit calculated pcb + fpu save * area size. Zero out the extended state header in fpu save diff --git a/sys/i386/i386/npx.c b/sys/i386/i386/npx.c index 3d4f2f2a60c8..91967b4be843 100644 --- a/sys/i386/i386/npx.c +++ b/sys/i386/i386/npx.c @@ -320,22 +320,8 @@ fpusave_fnsave(union savefpu *addr) fnsave((char *)addr); } -static void -init_xsave(void) -{ - - if (use_xsave) - return; - if (!cpu_fxsr || (cpu_feature2 & CPUID2_XSAVE) == 0) - return; - use_xsave = 1; - TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); -} - DEFINE_IFUNC(, void, fpusave, (union savefpu *)) { - - init_xsave(); if (use_xsave) return ((cpu_stdext_feature & CPUID_EXTSTATE_XSAVEOPT) != 0 ? fpusave_xsaveopt : fpusave_xsave); From nobody Wed Apr 19 00:15: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 4Q1Lsw3cblz45tsv; Wed, 19 Apr 2023 00:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1Lsv5P2mz3ksg; Wed, 19 Apr 2023 00:15:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681863348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvWHolsPpiFKWnrqSrXdpm6JmZo8NGiEihRyR/NuJHg=; b=d6mS7v1sdGJUdKnDDOE1i605ytAnLDaCSxJOcrXVASoEq0v71kZd71QYWHAlQQW8X984Yq mdP+M4VJb2J/AL0LXJ5MheMaGi4GD27nE2V23c/jNHhmFf8ggDy0jAyyGZ1PHvpyBS4np+ qUgsVf8tt3ocPdPCaUdoQvPAquYmov2jrBi4R7AWtk5PDBGXNYpybTzwy7/ZR5wqH/8CXT PcZhQ7xFn9he31c2dCjka+ThcH3Mpzfx69G6DtUiwPHVxWj6JkBbgTK0ixtxCUUqH2qLYo L/vClHxQqsJSxXxnexy22oY6MCl4L2gl5yeFTD2lAsSPCpyiFOD5gPKjBY+MxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681863348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VvWHolsPpiFKWnrqSrXdpm6JmZo8NGiEihRyR/NuJHg=; b=c9zb0TnQhRsUIyboviByNlDEcWUrZLz0h9jqlseXedhQY8aur38WdNLjEG+31/x6111YRd Uhdl94Vvmp0kV4tvJCL4lrLpOE8/L3ffUpaVc+DAdD+w5TXOcmpN/mB4QGsqWx2ZDiJMlU GVPAODOk0VJC86AlGe6pu60LxIjEtLG6WdOd5d4LDism3tYNnWf+gnLK6lXpLphQ6uweEz hgdRDQBfDFDGLftgHOrSmqKi5tBd3I2MWCVs5Iw2/oOV/0G0x0pL9jJF7MYP9tt/sUmv6h mNUF70zZnheB58ZH5Pc3pwuQ8SUSfeUkqK2FfWylayePIjOm6JhqYk5FeaOwKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681863348; a=rsa-sha256; cv=none; b=B3dc6r02DcoLl0d9DCFqhCK9j/qsZZ63ohs4GT1M7d2+4HUzcspwS+FNFlHm32vSHG25mj Z/V605uZQXUevpaul+s5HdEHrQOlDs5VOHRz6jJK980GjvQi4MAvSmyleOtmvu1SDOZUzX a21EW2M3DsMTDpOs0iZAE+6P8eBHcMZeD2JhJ7vRh8woDRCgIQ7C+8yGY82X46Q71svVON ALG6AB3rWZIphIJxx5IEAMrojuK+u4OD0+WswIzOaLQD3MI/aaxzgv4LSgWU9+jywa4tft HYrZAYRXf5Q7HdXnGDmfXDe25oMg5smwbEw9zULSQ2G1gnoO/nWPs9HcjeSc4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Lst4d83zY54; Wed, 19 Apr 2023 00:15: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 33J0Fkfd094202; Wed, 19 Apr 2023 00:15:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33J0FkXV094201; Wed, 19 Apr 2023 00:15:46 GMT (envelope-from git) Date: Wed, 19 Apr 2023 00:15:46 GMT Message-Id: <202304190015.33J0FkXV094201@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: d9a427479501 - main - Update/fix Makefile.depend for userland List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d9a42747950146bf03cda7f6e25d219253f8a57a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d9a42747950146bf03cda7f6e25d219253f8a57a commit d9a42747950146bf03cda7f6e25d219253f8a57a Author: Simon J. Gerraty AuthorDate: 2023-04-19 00:14:23 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-19 00:14:23 +0000 Update/fix Makefile.depend for userland --- bin/cat/Makefile.depend | 5 ++- bin/chflags/Makefile.depend | 1 - bin/chio/Makefile.depend | 1 - bin/chmod/Makefile.depend | 1 - bin/cp/Makefile.depend | 1 - bin/csh/Makefile.depend | 4 +-- bin/date/Makefile.depend | 1 - bin/dd/Makefile.depend | 3 +- bin/df/Makefile.depend | 3 +- bin/domainname/Makefile.depend | 1 - bin/echo/Makefile.depend | 2 +- bin/ed/Makefile.depend | 2 -- bin/expr/Makefile.depend | 1 - bin/getfacl/Makefile.depend | 1 - bin/hostname/Makefile.depend | 1 - bin/kenv/Makefile.depend | 1 - bin/kill/Makefile.depend | 1 - bin/ln/Makefile.depend | 1 - bin/ls/Makefile.depend | 1 + bin/mkdir/Makefile.depend | 1 - bin/mv/Makefile.depend | 1 - bin/pax/Makefile.depend | 1 - bin/pkill/Makefile.depend | 2 -- bin/ps/Makefile.depend | 5 +-- bin/pwait/Makefile.depend | 1 - bin/pwd/Makefile.depend | 1 - bin/realpath/Makefile.depend | 1 - bin/rm/Makefile.depend | 1 - bin/rmail/Makefile.depend | 1 - bin/rmdir/Makefile.depend | 1 - bin/setfacl/Makefile.depend | 1 - bin/sh/Makefile.depend | 4 +-- bin/sleep/Makefile.depend | 2 +- bin/stty/Makefile.depend | 1 - bin/sync/Makefile.depend | 1 - bin/test/Makefile.depend | 1 - bin/uuidgen/Makefile.depend | 4 ++- cddl/lib/libavl/Makefile.depend | 2 ++ cddl/lib/libctf/Makefile.depend | 1 + cddl/lib/libdtrace/Makefile.depend | 3 +- cddl/lib/libicp/Makefile.depend | 0 cddl/lib/libicp_rescue/Makefile.depend | 0 cddl/lib/libnvpair/Makefile.depend | 2 +- cddl/lib/libspl/Makefile.depend | 0 cddl/lib/libtpool/Makefile.depend | 0 cddl/lib/libuutil/Makefile.depend | 2 ++ cddl/lib/libzfs/Makefile.depend | 2 ++ cddl/lib/libzfs_core/Makefile.depend | 3 +- cddl/lib/libzfsbootenv/Makefile.depend | 0 cddl/lib/libzpool/Makefile.depend | 3 +- cddl/lib/libzutil/Makefile.depend | 0 cddl/sbin/zfs/Makefile.depend | 11 +++---- cddl/sbin/zpool/Makefile.depend | 10 ++---- cddl/usr.bin/ctfconvert/Makefile.depend | 3 +- cddl/usr.bin/ctfdump/Makefile.depend | 1 - cddl/usr.bin/ctfmerge/Makefile.depend | 2 +- cddl/usr.bin/zinject/Makefile.depend | 9 ++---- cddl/usr.bin/ztest/Makefile.depend | 9 ++---- cddl/usr.sbin/dtrace/Makefile.depend | 8 +---- cddl/usr.sbin/lockstat/Makefile.depend | 8 ----- cddl/usr.sbin/plockstat/Makefile.depend | 8 ----- cddl/usr.sbin/zdb/Makefile.depend | 13 ++------ cddl/usr.sbin/zfsd/Makefile.depend | 7 +--- cddl/usr.sbin/zhack/Makefile.depend | 15 ++------- gnu/lib/libdialog/Makefile.depend | 3 +- gnu/usr.bin/dialog/Makefile.depend | 4 +-- gnu/usr.bin/diff3/Makefile.depend | 1 - include/Makefile.depend | 1 + kerberos5/lib/libgssapi_ntlm/Makefile.depend | 1 - kerberos5/lib/libgssapi_spnego/Makefile.depend | 1 - kerberos5/lib/libheimipcs/Makefile.depend | 1 - kerberos5/lib/libkadm5srv/Makefile.depend | 1 - kerberos5/libexec/digest-service/Makefile.depend | 6 ---- kerberos5/libexec/hprop/Makefile.depend | 6 ---- kerberos5/libexec/hpropd/Makefile.depend | 6 ---- kerberos5/libexec/ipropd-master/Makefile.depend | 10 ------ kerberos5/libexec/ipropd-slave/Makefile.depend | 10 ------ kerberos5/libexec/kadmind/Makefile.depend | 6 ---- kerberos5/libexec/kcm/Makefile.depend | 8 ----- kerberos5/libexec/kdc/Makefile.depend | 5 --- kerberos5/libexec/kdigest/Makefile.depend | 9 ------ kerberos5/libexec/kfd/Makefile.depend | 9 ------ kerberos5/libexec/kimpersonate/Makefile.depend | 8 ----- kerberos5/libexec/kpasswdd/Makefile.depend | 9 ------ kerberos5/tools/asn1_compile/Makefile.depend | 1 - kerberos5/tools/make-roken/Makefile.depend | 1 - kerberos5/tools/slc/Makefile.depend | 1 - kerberos5/usr.bin/hxtool/Makefile.depend | 5 --- kerberos5/usr.bin/kadmin/Makefile.depend | 7 ---- kerberos5/usr.bin/kcc/Makefile.depend | 9 ------ kerberos5/usr.bin/kdestroy/Makefile.depend | 8 ----- kerberos5/usr.bin/kf/Makefile.depend | 9 ------ kerberos5/usr.bin/kgetcred/Makefile.depend | 8 ----- kerberos5/usr.bin/kinit/Makefile.depend | 8 ----- kerberos5/usr.bin/kpasswd/Makefile.depend | 9 ------ kerberos5/usr.bin/ksu/Makefile.depend | 7 ---- kerberos5/usr.bin/string2key/Makefile.depend | 5 --- kerberos5/usr.bin/verify_krb5_conf/Makefile.depend | 5 --- kerberos5/usr.sbin/iprop-log/Makefile.depend | 11 ------- kerberos5/usr.sbin/kstash/Makefile.depend | 6 ---- kerberos5/usr.sbin/ktutil/Makefile.depend | 9 ------ lib/atf/libatf-c++/Makefile.depend | 1 - lib/geom/cache/Makefile.depend | 2 -- lib/geom/concat/Makefile.depend | 2 -- lib/geom/eli/Makefile.depend | 2 -- lib/geom/journal/Makefile.depend | 2 -- lib/geom/label/Makefile.depend | 2 -- lib/geom/mirror/Makefile.depend | 2 -- lib/geom/mountver/Makefile.depend | 2 -- lib/geom/multipath/Makefile.depend | 2 -- lib/geom/nop/Makefile.depend | 2 -- lib/geom/part/Makefile.depend | 2 -- lib/geom/raid/Makefile.depend | 2 -- lib/geom/raid3/Makefile.depend | 2 -- lib/geom/shsec/Makefile.depend | 2 -- lib/geom/stripe/Makefile.depend | 2 -- lib/geom/virstor/Makefile.depend | 2 -- lib/lib9p/Makefile.depend | 0 lib/libalias/modules/dummy/Makefile.depend | 1 - lib/libalias/modules/ftp/Makefile.depend | 1 - lib/libalias/modules/irc/Makefile.depend | 1 - lib/libalias/modules/nbt/Makefile.depend | 1 - lib/libalias/modules/pptp/Makefile.depend | 1 - lib/libalias/modules/skinny/Makefile.depend | 1 - lib/libalias/modules/smedia/Makefile.depend | 1 - lib/libauditd/Makefile.depend | 1 - lib/libbe/Makefile.depend | 4 +-- lib/libbsddialog/Makefile.depend | 0 lib/libcasper/services/Makefile.depend | 0 .../services/cap_dns/tests/Makefile.depend | 10 ------ .../services/cap_grp/tests/Makefile.depend | 9 ------ lib/libcasper/services/cap_net/Makefile.depend | 0 lib/libcasper/services/cap_netdb/Makefile.depend | 0 .../services/cap_pwd/tests/Makefile.depend | 9 ------ .../services/cap_sysctl/tests/Makefile.depend | 9 ------ lib/libdl/Makefile.depend | 1 - lib/libdpv/Makefile.depend | 3 +- lib/libdwarf/Makefile.depend | 1 + lib/libedit/Makefile.depend | 2 +- lib/libexpat/Makefile.depend | 1 + lib/libiconv_modules/BIG5/Makefile.depend | 1 - lib/libiconv_modules/DECHanyu/Makefile.depend | 1 - lib/libiconv_modules/EUC/Makefile.depend | 1 - lib/libiconv_modules/EUCTW/Makefile.depend | 1 - lib/libiconv_modules/GBK2K/Makefile.depend | 1 - lib/libiconv_modules/HZ/Makefile.depend | 1 - lib/libiconv_modules/ISO2022/Makefile.depend | 1 - lib/libiconv_modules/JOHAB/Makefile.depend | 1 - lib/libiconv_modules/MSKanji/Makefile.depend | 1 - lib/libiconv_modules/UES/Makefile.depend | 1 - lib/libiconv_modules/UTF1632/Makefile.depend | 1 - lib/libiconv_modules/UTF7/Makefile.depend | 1 - lib/libiconv_modules/UTF8/Makefile.depend | 1 - lib/libiconv_modules/VIQR/Makefile.depend | 1 - lib/libiconv_modules/ZW/Makefile.depend | 1 - lib/libiconv_modules/iconv_none/Makefile.depend | 1 - lib/libiconv_modules/iconv_std/Makefile.depend | 1 - lib/libiconv_modules/mapper_646/Makefile.depend | 1 - lib/libiconv_modules/mapper_none/Makefile.depend | 1 - .../mapper_parallel/Makefile.depend | 1 - lib/libiconv_modules/mapper_serial/Makefile.depend | 1 - lib/libiconv_modules/mapper_std/Makefile.depend | 1 - lib/libiconv_modules/mapper_zone/Makefile.depend | 1 - lib/libifconfig/Makefile.depend | 1 + lib/libiscsiutil/Makefile.depend | 0 lib/libkiconv/Makefile.depend | 1 - lib/liblzma/Makefile.depend | 1 + lib/libmilter/Makefile.depend | 1 + lib/libmixer/Makefile.depend | 0 lib/libpam/modules/pam_chroot/Makefile.depend | 1 - lib/libpam/modules/pam_deny/Makefile.depend | 1 - lib/libpam/modules/pam_echo/Makefile.depend | 1 - lib/libpam/modules/pam_exec/Makefile.depend | 1 - lib/libpam/modules/pam_ftpusers/Makefile.depend | 1 - lib/libpam/modules/pam_group/Makefile.depend | 1 - lib/libpam/modules/pam_guest/Makefile.depend | 1 - lib/libpam/modules/pam_krb5/Makefile.depend | 1 - lib/libpam/modules/pam_ksu/Makefile.depend | 1 - lib/libpam/modules/pam_lastlog/Makefile.depend | 1 - .../modules/pam_login_access/Makefile.depend | 1 - lib/libpam/modules/pam_nologin/Makefile.depend | 1 - lib/libpam/modules/pam_passwdqc/Makefile.depend | 1 - lib/libpam/modules/pam_permit/Makefile.depend | 1 - lib/libpam/modules/pam_radius/Makefile.depend | 1 - lib/libpam/modules/pam_rhosts/Makefile.depend | 1 - lib/libpam/modules/pam_rootok/Makefile.depend | 1 - lib/libpam/modules/pam_securetty/Makefile.depend | 1 - lib/libpam/modules/pam_self/Makefile.depend | 1 - lib/libpam/modules/pam_ssh/Makefile.depend | 1 - lib/libpam/modules/pam_tacplus/Makefile.depend | 1 - lib/libpathconv/Makefile.depend | 1 - lib/libpfctl/Makefile.depend | 0 lib/libpjdlog/Makefile.depend | 1 - lib/libpmc/Makefile.depend | 1 + lib/libproc/Makefile.depend | 1 + lib/libprocstat/zfs/Makefile.depend | 3 -- lib/libregex/Makefile.depend | 0 lib/librpcsec_gss/Makefile.depend | 1 - lib/librt/Makefile.depend | 1 - lib/libsmb/Makefile.depend | 1 - lib/libsmutil/Makefile.depend.options | 0 lib/libssp/Makefile.depend | 0 lib/libstats/Makefile.depend | 0 lib/libstdbuf/Makefile.depend | 1 - lib/libsysdecode/Makefile.depend | 37 ++++++++++++---------- lib/libthr/Makefile.depend | 1 + lib/libunbound/Makefile.depend | 1 - lib/libvmmapi/Makefile.depend | 2 ++ lib/libxo/Makefile.depend | 9 ++---- lib/libxo/encoder/csv/Makefile.depend | 0 lib/libxo/libxo/Makefile.depend | 0 lib/ncurses/form/Makefile.depend | 3 +- lib/ncurses/menu/Makefile.depend | 3 +- lib/ncurses/ncurses/Makefile.depend | 3 +- lib/ncurses/panel/Makefile.depend | 3 +- lib/ncurses/tinfo/Makefile.depend | 3 +- libexec/atf/atf-check/Makefile.depend | 1 - libexec/atf/atf-sh/Makefile.depend | 1 - libexec/atrun/Makefile.depend | 1 - libexec/bootpd/Makefile.depend | 1 - libexec/bootpd/bootpgw/Makefile.depend | 1 - libexec/bootpd/tools/bootpef/Makefile.depend | 1 - libexec/bootpd/tools/bootptest/Makefile.depend | 1 - libexec/comsat/Makefile.depend | 1 - libexec/dma/dma-mbox-create/Makefile.depend | 3 +- libexec/dma/dmagent/Makefile.depend | 1 - libexec/fingerd/Makefile.depend | 1 - libexec/ftpd/Makefile.depend | 1 - libexec/getty/Makefile.depend | 1 - libexec/mail.local/Makefile.depend | 1 - libexec/mknetid/Makefile.depend | 1 - libexec/pppoed/Makefile.depend | 1 - libexec/rbootd/Makefile.depend | 1 - libexec/revnetgroup/Makefile.depend | 1 - libexec/rpc.rquotad/Makefile.depend | 1 - libexec/rpc.rstatd/Makefile.depend | 2 -- libexec/rpc.rusersd/Makefile.depend | 1 - libexec/rpc.rwalld/Makefile.depend | 1 - libexec/rpc.sprayd/Makefile.depend | 1 - libexec/rtld-elf/Makefile.depend | 1 + libexec/smrsh/Makefile.depend | 1 - libexec/talkd/Makefile.depend | 1 - libexec/tcpd/Makefile.depend | 1 - libexec/tftp-proxy/Makefile.depend | 3 +- libexec/ulog-helper/Makefile.depend | 2 -- libexec/ypxfr/Makefile.depend | 1 - rescue/rescue/Makefile.depend | 29 +++++++++-------- sbin/adjkerntz/Makefile.depend | 1 - sbin/bsdlabel/Makefile.depend | 3 -- sbin/camcontrol/Makefile.depend | 1 - sbin/ccdconfig/Makefile.depend | 3 -- sbin/clri/Makefile.depend | 2 +- sbin/comcontrol/Makefile.depend | 1 - sbin/conscontrol/Makefile.depend | 1 - sbin/ddb/Makefile.depend | 2 -- sbin/decryptcore/Makefile.depend | 4 +-- sbin/devd/Makefile.depend | 3 +- sbin/devfs/Makefile.depend | 1 - sbin/dhclient/Makefile.depend | 1 - sbin/dmesg/Makefile.depend | 2 -- sbin/dump/Makefile.depend | 2 +- sbin/dumpfs/Makefile.depend | 1 - sbin/dumpon/Makefile.depend | 1 - sbin/etherswitchcfg/Makefile.depend | 1 - sbin/fdisk/Makefile.depend | 3 -- sbin/ffsinfo/Makefile.depend | 1 - sbin/fsck/Makefile.depend | 1 - sbin/fsck_ffs/Makefile.depend | 1 - sbin/fsck_msdosfs/Makefile.depend | 2 +- sbin/fsdb/Makefile.depend | 2 -- sbin/fsirand/Makefile.depend | 2 +- sbin/gbde/Makefile.depend | 3 -- sbin/ggate/ggatec/Makefile.depend | 3 -- sbin/ggate/ggated/Makefile.depend | 1 - sbin/ggate/ggatel/Makefile.depend | 3 -- sbin/growfs/Makefile.depend | 1 - sbin/gvinum/Makefile.depend | 6 +--- sbin/hastctl/Makefile.depend | 2 +- sbin/hastd/Makefile.depend | 4 +-- sbin/ifconfig/Makefile.depend | 5 +-- sbin/init/Makefile.depend | 1 - sbin/ipf/ipf/Makefile.depend | 2 -- sbin/ipf/ipfs/Makefile.depend | 2 -- sbin/ipf/ipfstat/Makefile.depend | 5 ++- sbin/ipf/ipmon/Makefile.depend | 2 -- sbin/ipf/ipnat/Makefile.depend | 2 -- sbin/ipf/ippool/Makefile.depend | 2 -- sbin/ipfw/Makefile.depend | 2 +- sbin/kldconfig/Makefile.depend | 1 - sbin/kldload/Makefile.depend | 1 - sbin/kldstat/Makefile.depend | 1 - sbin/kldunload/Makefile.depend | 1 - sbin/ldconfig/Makefile.depend | 1 - sbin/md5/Makefile.depend | 2 +- sbin/mdconfig/Makefile.depend | 3 -- sbin/mdmfs/Makefile.depend | 1 - sbin/mknod/Makefile.depend | 1 - sbin/mksnap_ffs/Makefile.depend | 1 - sbin/mount/Makefile.depend | 2 +- sbin/mount_cd9660/Makefile.depend | 1 - sbin/mount_fusefs/Makefile.depend | 1 - sbin/mount_msdosfs/Makefile.depend | 1 - sbin/mount_nfs/Makefile.depend | 1 - sbin/mount_nullfs/Makefile.depend | 1 - sbin/mount_udf/Makefile.depend | 1 - sbin/mount_unionfs/Makefile.depend | 1 - sbin/natd/Makefile.depend | 1 - sbin/newfs/Makefile.depend | 1 - sbin/newfs_msdos/Makefile.depend | 1 - sbin/nfsiod/Makefile.depend | 1 - sbin/nos-tun/Makefile.depend | 1 - sbin/nvmecontrol/Makefile.depend | 2 +- sbin/pfctl/Makefile.depend | 3 +- sbin/pflogd/Makefile.depend | 2 +- sbin/ping/Makefile.depend | 2 +- sbin/quotacheck/Makefile.depend | 2 +- sbin/rcorder/Makefile.depend | 1 - sbin/reboot/Makefile.depend | 1 - sbin/recoverdisk/Makefile.depend | 2 +- sbin/restore/Makefile.depend | 1 - sbin/route/Makefile.depend | 1 - sbin/routed/Makefile.depend | 1 - sbin/routed/rtquery/Makefile.depend | 1 - sbin/savecore/Makefile.depend | 5 ++- sbin/setkey/Makefile.depend | 3 -- sbin/shutdown/Makefile.depend | 1 - sbin/swapon/Makefile.depend | 1 - sbin/sysctl/Makefile.depend | 1 - sbin/tunefs/Makefile.depend | 1 - sbin/umount/Makefile.depend | 1 - sbin/zfsbootcfg/Makefile.depend | 16 +--------- secure/libexec/sftp-server/Makefile.depend | 4 --- secure/libexec/ssh-keysign/Makefile.depend | 4 --- secure/libexec/ssh-pkcs11-helper/Makefile.depend | 4 --- secure/usr.bin/openssl/Makefile.depend | 2 +- secure/usr.bin/scp/Makefile.depend | 4 --- secure/usr.bin/sftp/Makefile.depend | 5 --- secure/usr.bin/ssh-add/Makefile.depend | 4 --- secure/usr.bin/ssh-agent/Makefile.depend | 4 --- secure/usr.bin/ssh-keygen/Makefile.depend | 4 --- secure/usr.bin/ssh-keyscan/Makefile.depend | 4 --- secure/usr.bin/ssh/Makefile.depend | 6 ---- secure/usr.sbin/sshd/Makefile.depend | 6 ---- share/examples/Makefile.depend | 1 - share/i18n/csmapper/APPLE/Makefile.depend | 1 - share/i18n/csmapper/AST/Makefile.depend | 1 - share/i18n/csmapper/BIG5/Makefile.depend | 1 - share/i18n/csmapper/CNS/Makefile.depend | 1 - share/i18n/csmapper/CP/Makefile.depend | 1 - share/i18n/csmapper/EBCDIC/Makefile.depend | 1 - share/i18n/csmapper/GB/Makefile.depend | 1 - share/i18n/csmapper/GEORGIAN/Makefile.depend | 1 - share/i18n/csmapper/ISO-8859/Makefile.depend | 1 - share/i18n/csmapper/JIS/Makefile.depend | 1 - share/i18n/csmapper/KAZAKH/Makefile.depend | 1 - share/i18n/csmapper/KOI/Makefile.depend | 1 - share/i18n/csmapper/KS/Makefile.depend | 1 - share/i18n/csmapper/MISC/Makefile.depend | 1 - share/i18n/csmapper/Makefile.depend | 1 - share/i18n/csmapper/TCVN/Makefile.depend | 1 - share/i18n/esdb/APPLE/Makefile.depend | 1 - share/i18n/esdb/AST/Makefile.depend | 1 - share/i18n/esdb/BIG5/Makefile.depend | 1 - share/i18n/esdb/CP/Makefile.depend | 1 - share/i18n/esdb/DEC/Makefile.depend | 1 - share/i18n/esdb/EBCDIC/Makefile.depend | 1 - share/i18n/esdb/EUC/Makefile.depend | 1 - share/i18n/esdb/GB/Makefile.depend | 1 - share/i18n/esdb/GEORGIAN/Makefile.depend | 1 - share/i18n/esdb/ISO-2022/Makefile.depend | 1 - share/i18n/esdb/ISO-8859/Makefile.depend | 1 - share/i18n/esdb/ISO646/Makefile.depend | 1 - share/i18n/esdb/KAZAKH/Makefile.depend | 1 - share/i18n/esdb/KOI/Makefile.depend | 1 - share/i18n/esdb/MISC/Makefile.depend | 1 - share/i18n/esdb/Makefile.depend | 1 - share/i18n/esdb/TCVN/Makefile.depend | 1 - share/i18n/esdb/UTF/Makefile.depend | 1 - share/syscons/scrnmaps/Makefile.depend | 6 +--- share/zoneinfo/Makefile.depend | 1 + stand/efi/boot1/Makefile.depend | 4 --- stand/efi/loader_4th/Makefile.depend | 0 stand/ficl32/Makefile.depend | 2 +- stand/i386/libi386/Makefile.depend | 4 +-- stand/i386/loader/Makefile.depend | 8 ++--- stand/i386/pxeldr/Makefile.depend | 6 ++-- stand/i386/pxeldr/Makefile.depend.options | 0 stand/libsa32/Makefile.depend | 1 - stand/userboot/test/Makefile.depend | 1 - stand/userboot/userboot/Makefile.depend | 3 -- targets/pseudo/userland/lib/Makefile.depend | 22 ++++++++++--- targets/pseudo/userland/misc/Makefile.depend | 9 +++++- usr.bin/apply/Makefile.depend | 1 - usr.bin/ar/Makefile.depend | 7 ---- usr.bin/asa/Makefile.depend | 1 - usr.bin/at/Makefile.depend | 1 - usr.bin/awk/Makefile.depend | 2 +- usr.bin/awk/tests/Makefile.depend | 0 usr.bin/awk/tests/bugs-fixed/Makefile.depend | 0 usr.bin/awk/tests/netbsd/Makefile.depend | 0 usr.bin/banner/Makefile.depend | 1 - usr.bin/basename/Makefile.depend | 2 +- usr.bin/bc/Makefile.depend | 2 -- usr.bin/biff/Makefile.depend | 1 - usr.bin/bintrans/Makefile.depend | 1 - usr.bin/bluetooth/bthost/Makefile.depend | 1 - usr.bin/bluetooth/btsockstat/Makefile.depend | 2 -- usr.bin/bluetooth/rfcomm_sppd/Makefile.depend | 1 - usr.bin/brandelf/Makefile.depend | 1 - usr.bin/bsdcat/Makefile.depend | 7 ---- usr.bin/bsdiff/bsdiff/Makefile.depend | 1 - usr.bin/bsdiff/bspatch/Makefile.depend | 1 - usr.bin/bzip2/Makefile.depend | 1 - usr.bin/bzip2recover/Makefile.depend | 1 - usr.bin/c89/Makefile.depend | 1 - usr.bin/c99/Makefile.depend | 1 - usr.bin/calendar/Makefile.depend | 2 +- usr.bin/cap_mkdb/Makefile.depend | 1 - usr.bin/chat/Makefile.depend | 1 - usr.bin/chkey/Makefile.depend | 1 - usr.bin/cksum/Makefile.depend | 1 - usr.bin/cmp/Makefile.depend | 3 +- usr.bin/col/Makefile.depend | 2 +- usr.bin/colrm/Makefile.depend | 1 - usr.bin/column/Makefile.depend | 1 - usr.bin/comm/Makefile.depend | 1 - usr.bin/compile_et/Makefile.depend | 2 -- usr.bin/compress/Makefile.depend | 1 - usr.bin/cpio/Makefile.depend | 7 ---- usr.bin/cpuset/Makefile.depend | 2 +- usr.bin/csplit/Makefile.depend | 1 - usr.bin/ctags/Makefile.depend | 1 - usr.bin/ctlstat/Makefile.depend | 3 +- usr.bin/cut/Makefile.depend | 1 - usr.bin/dc/Makefile.depend | 3 +- usr.bin/dirname/Makefile.depend | 2 +- usr.bin/dpv/Makefile.depend | 4 +-- usr.bin/drill/Makefile.depend | 2 -- usr.bin/dtc/Makefile.depend | 1 - usr.bin/du/Makefile.depend | 1 - usr.bin/ee/Makefile.depend | 4 +-- usr.bin/elfdump/Makefile.depend | 2 +- usr.bin/enigma/Makefile.depend | 1 - usr.bin/env/Makefile.depend | 2 +- usr.bin/expand/Makefile.depend | 1 - usr.bin/false/Makefile.depend | 1 - usr.bin/fetch/Makefile.depend | 3 -- usr.bin/file/Makefile.depend | 2 -- usr.bin/file2c/Makefile.depend | 1 - usr.bin/find/Makefile.depend | 1 - usr.bin/finger/Makefile.depend | 1 - usr.bin/fmt/Makefile.depend | 1 - usr.bin/fold/Makefile.depend | 1 - usr.bin/from/Makefile.depend | 1 - usr.bin/fstat/Makefile.depend | 5 +-- usr.bin/fsync/Makefile.depend | 1 - usr.bin/ftp/Makefile.depend | 3 +- usr.bin/gcore/Makefile.depend | 1 - usr.bin/gencat/Makefile.depend | 1 - usr.bin/getaddrinfo/Makefile.depend | 2 +- usr.bin/getconf/Makefile.depend | 1 - usr.bin/getent/Makefile.depend | 1 - usr.bin/getopt/Makefile.depend | 2 +- usr.bin/gprof/Makefile.depend | 1 - usr.bin/grep/Makefile.depend | 1 + usr.bin/gzip/Makefile.depend | 1 - usr.bin/head/Makefile.depend | 2 +- usr.bin/hexdump/Makefile.depend | 2 +- usr.bin/host/Makefile.depend | 2 -- usr.bin/iconv/Makefile.depend | 2 +- usr.bin/id/Makefile.depend | 1 - usr.bin/ident/Makefile.depend | 3 +- usr.bin/indent/Makefile.depend | 3 +- usr.bin/ipcrm/Makefile.depend | 2 -- usr.bin/ipcs/Makefile.depend | 2 -- usr.bin/iscsictl/Makefile.depend | 3 +- usr.bin/join/Makefile.depend | 1 - usr.bin/jot/Makefile.depend | 2 +- usr.bin/kdump/Makefile.depend | 1 - usr.bin/keylogin/Makefile.depend | 1 - usr.bin/keylogout/Makefile.depend | 1 - usr.bin/killall/Makefile.depend | 1 - usr.bin/ktrace/Makefile.depend | 1 - usr.bin/ktrdump/Makefile.depend | 3 +- usr.bin/lam/Makefile.depend | 2 +- usr.bin/last/Makefile.depend | 3 +- usr.bin/lastcomm/Makefile.depend | 1 - usr.bin/ldd/Makefile.depend | 2 +- usr.bin/leave/Makefile.depend | 1 - usr.bin/less/Makefile.depend | 3 +- usr.bin/lessecho/Makefile.depend | 1 - usr.bin/lesskey/Makefile.depend | 1 - usr.bin/lex/lib/Makefile.depend | 1 + usr.bin/limits/Makefile.depend | 1 - usr.bin/locale/Makefile.depend | 2 +- usr.bin/localedef/Makefile.depend | 1 - usr.bin/locate/bigram/Makefile.depend | 2 +- usr.bin/locate/code/Makefile.depend | 1 - usr.bin/locate/locate/Makefile.depend | 1 - usr.bin/lock/Makefile.depend | 3 +- usr.bin/lockf/Makefile.depend | 1 - usr.bin/logger/Makefile.depend | 4 ++- usr.bin/logins/Makefile.depend | 1 - usr.bin/logname/Makefile.depend | 2 +- usr.bin/look/Makefile.depend | 1 - usr.bin/lsvfs/Makefile.depend | 1 - usr.bin/lzmainfo/Makefile.depend | 2 -- usr.bin/m4/Makefile.depend | 3 -- usr.bin/mail/Makefile.depend | 1 - usr.bin/mandoc/Makefile.depend | 1 - usr.bin/mesg/Makefile.depend | 1 - usr.bin/ministat/Makefile.depend | 2 +- usr.bin/mkcsmapper/Makefile.depend | 1 - usr.bin/mkesdb/Makefile.depend | 1 - usr.bin/mkfifo/Makefile.depend | 1 - usr.bin/mkimg/Makefile.depend | 1 - usr.bin/mkstr/Makefile.depend | 1 - usr.bin/mktemp/Makefile.depend | 1 - usr.bin/mkuzip/Makefile.depend | 2 +- usr.bin/msgs/Makefile.depend | 3 +- usr.bin/mt/Makefile.depend | 2 -- usr.bin/nc/Makefile.depend | 3 +- usr.bin/ncal/Makefile.depend | 3 +- usr.bin/netstat/Makefile.depend | 4 +-- usr.bin/newgrp/Makefile.depend | 1 - usr.bin/newkey/Makefile.depend | 1 - usr.bin/nfsstat/Makefile.depend | 3 +- usr.bin/nice/Makefile.depend | 1 - usr.bin/nl/Makefile.depend | 1 - usr.bin/nohup/Makefile.depend | 1 - usr.bin/passwd/Makefile.depend | 1 - usr.bin/paste/Makefile.depend | 1 - usr.bin/patch/Makefile.depend | 1 - usr.bin/pathchk/Makefile.depend | 1 - usr.bin/perror/Makefile.depend | 1 - usr.bin/pr/Makefile.depend | 1 - usr.bin/printenv/Makefile.depend | 2 +- usr.bin/printf/Makefile.depend | 1 - usr.bin/proccontrol/Makefile.depend | 1 - usr.bin/procstat/Makefile.depend | 5 +-- usr.bin/protect/Makefile.depend | 1 - usr.bin/quota/Makefile.depend | 1 - usr.bin/rctl/Makefile.depend | 1 - usr.bin/renice/Makefile.depend | 1 - usr.bin/resizewin/Makefile.depend | 1 - usr.bin/rev/Makefile.depend | 1 - usr.bin/revoke/Makefile.depend | 1 - usr.bin/rpcgen/Makefile.depend | 1 - usr.bin/rpcinfo/Makefile.depend | 1 - usr.bin/rs/Makefile.depend | 4 ++- usr.bin/rup/Makefile.depend | 1 - usr.bin/ruptime/Makefile.depend | 1 - usr.bin/rusers/Makefile.depend | 1 - usr.bin/rwall/Makefile.depend | 1 - usr.bin/rwho/Makefile.depend | 3 +- usr.bin/script/Makefile.depend | 1 - usr.bin/sdiff/Makefile.depend | 1 - usr.bin/sed/Makefile.depend | 1 - usr.bin/seq/Makefile.depend | 1 - usr.bin/showmount/Makefile.depend | 1 - usr.bin/smbutil/Makefile.depend | 2 -- usr.bin/sockstat/Makefile.depend | 8 ++++- usr.bin/soelim/Makefile.depend | 1 - usr.bin/split/Makefile.depend | 1 - usr.bin/stat/Makefile.depend | 1 - usr.bin/stdbuf/Makefile.depend | 1 - usr.bin/systat/Makefile.depend | 7 ++-- usr.bin/tabs/Makefile.depend | 3 +- usr.bin/tail/Makefile.depend | 2 +- usr.bin/talk/Makefile.depend | 4 +-- usr.bin/tar/Makefile.depend | 7 ---- usr.bin/tcopy/Makefile.depend | 1 - usr.bin/tee/Makefile.depend | 2 +- usr.bin/telnet/Makefile.depend | 5 +-- usr.bin/tftp/Makefile.depend | 2 -- usr.bin/time/Makefile.depend | 1 - usr.bin/tip/tip/Makefile.depend | 1 - usr.bin/top/Makefile.depend | 6 ++-- usr.bin/touch/Makefile.depend | 1 - usr.bin/tr/Makefile.depend | 2 +- usr.bin/true/Makefile.depend | 1 - usr.bin/truncate/Makefile.depend | 1 - usr.bin/truss/Makefile.depend | 1 - usr.bin/tsort/Makefile.depend | 1 - usr.bin/tty/Makefile.depend | 1 - usr.bin/ul/Makefile.depend | 3 +- usr.bin/uname/Makefile.depend | 1 - usr.bin/unexpand/Makefile.depend | 1 - usr.bin/unifdef/Makefile.depend | 1 - usr.bin/uniq/Makefile.depend | 3 +- usr.bin/units/Makefile.depend | 4 +-- usr.bin/unvis/Makefile.depend | 1 - usr.bin/unzip/Makefile.depend | 7 ---- usr.bin/usbhidaction/Makefile.depend | 1 - usr.bin/usbhidctl/Makefile.depend | 1 - usr.bin/users/Makefile.depend | 3 +- usr.bin/vacation/Makefile.depend | 1 - usr.bin/vgrind/Makefile.depend | 1 - usr.bin/vi/Makefile.depend | 4 +-- usr.bin/vi/catalog/Makefile.depend | 5 +++ usr.bin/vis/Makefile.depend | 1 - usr.bin/vmstat/Makefile.depend | 4 +-- usr.bin/vtfontcvt/Makefile.depend | 1 - usr.bin/w/Makefile.depend | 4 +-- usr.bin/wall/Makefile.depend | 1 - usr.bin/wc/Makefile.depend | 4 +-- usr.bin/what/Makefile.depend | 1 - usr.bin/whereis/Makefile.depend | 1 - usr.bin/which/Makefile.depend | 1 - usr.bin/who/Makefile.depend | 1 - usr.bin/whois/Makefile.depend | 1 - usr.bin/write/Makefile.depend | 2 +- usr.bin/xargs/Makefile.depend | 1 - usr.bin/xinstall/Makefile.depend | 1 - usr.bin/xo/Makefile.depend | 3 +- usr.bin/xstr/Makefile.depend | 1 - usr.bin/xz/Makefile.depend | 2 -- usr.bin/xzdec/Makefile.depend | 2 -- usr.bin/yacc/Makefile.depend | 1 - usr.bin/yes/Makefile.depend | 2 +- usr.bin/ypcat/Makefile.depend | 1 - usr.bin/ypmatch/Makefile.depend | 1 - usr.bin/ypwhich/Makefile.depend | 1 - usr.bin/zstd/Makefile.depend | 2 -- usr.sbin/ac/Makefile.depend | 1 - usr.sbin/accton/Makefile.depend | 1 - usr.sbin/acpi/acpiconf/Makefile.depend | 1 - usr.sbin/acpi/acpidb/Makefile.depend | 1 - usr.sbin/acpi/acpidump/Makefile.depend | 1 - usr.sbin/acpi/iasl/Makefile.depend | 1 - usr.sbin/apm/Makefile.depend | 1 - usr.sbin/arp/Makefile.depend | 4 +-- usr.sbin/audit/Makefile.depend | 1 - usr.sbin/auditd/Makefile.depend | 1 - usr.sbin/auditdistd/Makefile.depend | 2 -- usr.sbin/auditreduce/Makefile.depend | 1 - usr.sbin/authpf/Makefile.depend | 3 +- usr.sbin/autofs/Makefile.depend | 1 - usr.sbin/bhyve/Makefile.depend | 5 +-- usr.sbin/bhyvectl/Makefile.depend | 1 - usr.sbin/bhyveload/Makefile.depend | 2 -- usr.sbin/binmiscctl/Makefile.depend | 1 - usr.sbin/blacklistctl/Makefile.depend | 2 -- usr.sbin/blacklistd/Makefile.depend | 2 -- usr.sbin/bluetooth/ath3kfw/Makefile.depend | 2 -- usr.sbin/bluetooth/bcmfw/Makefile.depend | 1 - usr.sbin/bluetooth/bthidcontrol/Makefile.depend | 1 - usr.sbin/bluetooth/bthidd/Makefile.depend | 1 - usr.sbin/bluetooth/btpand/Makefile.depend | 1 - usr.sbin/bluetooth/hccontrol/Makefile.depend | 1 - usr.sbin/bluetooth/hcsecd/Makefile.depend | 1 - usr.sbin/bluetooth/iwmbtfw/Makefile.depend | 0 usr.sbin/bluetooth/l2control/Makefile.depend | 1 - usr.sbin/bluetooth/l2ping/Makefile.depend | 1 - usr.sbin/bluetooth/rfcomm_pppd/Makefile.depend | 1 - usr.sbin/bluetooth/sdpcontrol/Makefile.depend | 1 - usr.sbin/bluetooth/sdpd/Makefile.depend | 1 - usr.sbin/boot0cfg/Makefile.depend | 3 -- usr.sbin/bootparamd/bootparamd/Makefile.depend | 1 - usr.sbin/bootparamd/callbootd/Makefile.depend | 1 - usr.sbin/bsdinstall/distextract/Makefile.depend | 13 +------- usr.sbin/bsdinstall/distfetch/Makefile.depend | 8 ++--- usr.sbin/bsdinstall/partedit/Makefile.depend | 8 ++--- usr.sbin/bsnmpd/bsnmpd/Makefile.depend | 2 -- usr.sbin/bsnmpd/gensnmptree/Makefile.depend | 1 - usr.sbin/bsnmpd/modules/snmp_hast/Makefile.depend | 3 +- .../bsnmpd/modules/snmp_hostres/Makefile.depend | 2 +- usr.sbin/bsnmpd/modules/snmp_lm75/Makefile.depend | 2 +- usr.sbin/bsnmpd/modules/snmp_pf/Makefile.depend | 4 ++- .../bsnmpd/modules/snmp_target/Makefile.depend | 2 +- usr.sbin/bsnmpd/modules/snmp_usm/Makefile.depend | 2 +- usr.sbin/bsnmpd/modules/snmp_vacm/Makefile.depend | 2 +- usr.sbin/bsnmpd/modules/snmp_wlan/Makefile.depend | 2 +- usr.sbin/bsnmpd/tools/bsnmptools/Makefile.depend | 2 -- usr.sbin/btxld/Makefile.depend | 1 - usr.sbin/camdd/Makefile.depend | 2 -- usr.sbin/cdcontrol/Makefile.depend | 2 -- usr.sbin/chkgrp/Makefile.depend | 1 - usr.sbin/chown/Makefile.depend | 1 - usr.sbin/chroot/Makefile.depend | 1 - usr.sbin/ckdist/Makefile.depend | 1 - usr.sbin/clear_locks/Makefile.depend | 1 - usr.sbin/config/Makefile.depend | 6 ++-- usr.sbin/cpucontrol/Makefile.depend | 1 - usr.sbin/cron/cron/Makefile.depend | 1 - usr.sbin/cron/crontab/Makefile.depend | 1 - usr.sbin/crunch/crunchgen/Makefile.depend | 1 - usr.sbin/crunch/crunchide/Makefile.depend | 1 - usr.sbin/ctladm/Makefile.depend | 2 +- usr.sbin/ctld/Makefile.depend | 6 ++-- usr.sbin/cxgbetool/Makefile.depend | 2 +- usr.sbin/daemon/Makefile.depend | 1 - usr.sbin/dconschat/Makefile.depend | 2 -- usr.sbin/devctl/Makefile.depend | 1 - usr.sbin/devinfo/Makefile.depend | 2 +- usr.sbin/diskinfo/Makefile.depend | 1 - usr.sbin/dumpcis/Makefile.depend | 1 - usr.sbin/editmap/Makefile.depend | 1 - usr.sbin/edquota/Makefile.depend | 1 - usr.sbin/efidp/Makefile.depend | 2 +- usr.sbin/efivar/Makefile.depend | 2 +- usr.sbin/extattr/Makefile.depend | 1 - usr.sbin/extattrctl/Makefile.depend | 1 - usr.sbin/fdcontrol/Makefile.depend | 1 - usr.sbin/fdformat/Makefile.depend | 1 - usr.sbin/fdread/Makefile.depend | 1 - usr.sbin/fdwrite/Makefile.depend | 1 - usr.sbin/fifolog/fifolog_create/Makefile.depend | 1 - usr.sbin/fifolog/fifolog_reader/Makefile.depend | 1 - usr.sbin/fifolog/fifolog_writer/Makefile.depend | 1 - usr.sbin/flowctl/Makefile.depend | 1 - usr.sbin/fstyp/Makefile.depend | 10 +----- usr.sbin/ftp-proxy/Makefile.depend | 5 +-- usr.sbin/fwcontrol/Makefile.depend | 1 - usr.sbin/getfmac/Makefile.depend | 1 - usr.sbin/getpmac/Makefile.depend | 1 - usr.sbin/gpioctl/Makefile.depend | 1 - usr.sbin/gssd/Makefile.depend | 4 --- usr.sbin/gstat/Makefile.depend | 7 ++-- usr.sbin/hyperv/tools/kvp/Makefile.depend | 1 - usr.sbin/hyperv/tools/vss/Makefile.depend | 1 - usr.sbin/i2c/Makefile.depend | 1 - usr.sbin/ifmcstat/Makefile.depend | 1 - usr.sbin/iostat/Makefile.depend | 2 -- usr.sbin/iovctl/Makefile.depend | 1 - usr.sbin/ip6addrctl/Makefile.depend | 1 - usr.sbin/ipfwpcap/Makefile.depend | 2 +- usr.sbin/iscsid/Makefile.depend | 5 +-- usr.sbin/jail/Makefile.depend | 3 -- usr.sbin/jexec/Makefile.depend | 1 - usr.sbin/jls/Makefile.depend | 4 +-- usr.sbin/kbdcontrol/Makefile.depend | 2 -- usr.sbin/kbdmap/Makefile.depend | 2 +- usr.sbin/keyserv/Makefile.depend | 1 - usr.sbin/kldxref/Makefile.depend | 1 - usr.sbin/lastlogin/Makefile.depend | 2 +- usr.sbin/lpr/chkprintcap/Makefile.depend | 1 - usr.sbin/lpr/filters.ru/koi2855/Makefile.depend | 1 - usr.sbin/lpr/filters.ru/koi2alt/Makefile.depend | 1 - usr.sbin/lpr/filters/Makefile.depend | 1 - usr.sbin/lpr/lpc/Makefile.depend | 2 -- usr.sbin/lpr/lpd/Makefile.depend | 1 - usr.sbin/lpr/lpq/Makefile.depend | 1 - usr.sbin/lpr/lpr/Makefile.depend | 1 - usr.sbin/lpr/lprm/Makefile.depend | 1 - usr.sbin/lpr/lptest/Makefile.depend | 1 - usr.sbin/lpr/pac/Makefile.depend | 1 - usr.sbin/lptcontrol/Makefile.depend | 1 - usr.sbin/mailstats/Makefile.depend | 1 - usr.sbin/mailwrapper/Makefile.depend | 1 - usr.sbin/makemap/Makefile.depend | 1 - usr.sbin/memcontrol/Makefile.depend | 1 - usr.sbin/mfiutil/Makefile.depend | 1 - usr.sbin/mixer/Makefile.depend | 2 +- usr.sbin/mld6query/Makefile.depend | 1 - usr.sbin/mlx5tool/Makefile.depend | 0 usr.sbin/mlxcontrol/Makefile.depend | 1 - usr.sbin/mount_smbfs/Makefile.depend | 2 -- usr.sbin/mountd/Makefile.depend | 1 - usr.sbin/moused/Makefile.depend | 1 - usr.sbin/mpsutil/Makefile.depend | 1 - usr.sbin/mptable/Makefile.depend | 1 - usr.sbin/mptutil/Makefile.depend | 2 -- usr.sbin/mtest/Makefile.depend | 1 - usr.sbin/ndp/Makefile.depend | 2 +- usr.sbin/newsyslog/Makefile.depend | 2 +- usr.sbin/nfscbd/Makefile.depend | 1 - usr.sbin/nfsd/Makefile.depend | 1 - usr.sbin/nfsdumpstate/Makefile.depend | 1 - usr.sbin/nfsrevoke/Makefile.depend | 1 - usr.sbin/nfsuserd/Makefile.depend | 2 +- usr.sbin/ngctl/Makefile.depend | 1 - usr.sbin/nghook/Makefile.depend | 1 - usr.sbin/nmtree/Makefile.depend | 1 - usr.sbin/nologin/Makefile.depend | 1 - usr.sbin/nscd/Makefile.depend | 1 - usr.sbin/ntp/libntp/Makefile.depend | 1 + usr.sbin/ntp/ntpd/Makefile.depend | 1 + usr.sbin/ntp/ntpdate/Makefile.depend | 1 + usr.sbin/ntp/ntpdc/Makefile.depend | 2 +- usr.sbin/ntp/ntpq/Makefile.depend | 2 +- usr.sbin/ntp/ntptime/Makefile.depend | 1 - usr.sbin/pciconf/Makefile.depend | 1 - usr.sbin/pkg/Makefile.depend | 10 ++---- usr.sbin/pmcannotate/Makefile.depend | 1 - usr.sbin/pmccontrol/Makefile.depend | 4 ++- usr.sbin/pmcstat/Makefile.depend | 6 ++-- usr.sbin/pmcstudy/Makefile.depend | 1 - usr.sbin/portsnap/make_index/Makefile.depend | 1 - usr.sbin/powerd/Makefile.depend | 1 - usr.sbin/ppp/Makefile.depend | 1 - usr.sbin/pppctl/Makefile.depend | 2 -- usr.sbin/praliases/Makefile.depend | 1 - usr.sbin/praudit/Makefile.depend | 1 - .../prometheus_sysctl_exporter/Makefile.depend | 1 - usr.sbin/pstat/Makefile.depend | 2 -- usr.sbin/pw/Makefile.depend | 2 -- usr.sbin/pwd_mkdb/Makefile.depend | 1 - usr.sbin/quot/Makefile.depend | 2 +- usr.sbin/quotaon/Makefile.depend | 1 - usr.sbin/rarpd/Makefile.depend | 1 - usr.sbin/repquota/Makefile.depend | 1 - usr.sbin/rip6query/Makefile.depend | 1 - usr.sbin/rmt/Makefile.depend | 1 - usr.sbin/route6d/Makefile.depend | 1 - usr.sbin/rpc.lockd/Makefile.depend | 1 - usr.sbin/rpc.statd/Makefile.depend | 1 - usr.sbin/rpc.umntall/Makefile.depend | 1 - usr.sbin/rpc.yppasswdd/Makefile.depend | 1 - usr.sbin/rpc.ypupdated/Makefile.depend | 1 - usr.sbin/rpc.ypxfrd/Makefile.depend | 1 - usr.sbin/rrenumd/Makefile.depend | 3 -- usr.sbin/rtadvctl/Makefile.depend | 1 - usr.sbin/rtadvd/Makefile.depend | 1 - usr.sbin/rtprio/Makefile.depend | 1 - usr.sbin/rwhod/Makefile.depend | 3 +- usr.sbin/sa/Makefile.depend | 1 - usr.sbin/sendmail/Makefile.depend | 1 - usr.sbin/services_mkdb/Makefile.depend | 1 - usr.sbin/sesutil/Makefile.depend | 4 +-- usr.sbin/setfib/Makefile.depend | 1 - usr.sbin/setfmac/Makefile.depend | 1 - usr.sbin/setpmac/Makefile.depend | 1 - usr.sbin/smbmsg/Makefile.depend | 1 - usr.sbin/snapinfo/Makefile.depend | 1 - usr.sbin/spray/Makefile.depend | 1 - usr.sbin/syslogd/Makefile.depend | 1 - usr.sbin/tcpdchk/Makefile.depend | 1 - usr.sbin/tcpdmatch/Makefile.depend | 1 - usr.sbin/tcpdrop/Makefile.depend | 1 - usr.sbin/tcpdump/tcpdump/Makefile.depend | 5 --- usr.sbin/traceroute/Makefile.depend | 1 - usr.sbin/traceroute6/Makefile.depend | 4 ++- usr.sbin/tzsetup/Makefile.depend | 2 +- usr.sbin/uathload/Makefile.depend | 1 - usr.sbin/uefisign/Makefile.depend | 3 +- usr.sbin/ugidfw/Makefile.depend | 1 - usr.sbin/uhsoctl/Makefile.depend | 1 - usr.sbin/unbound/anchor/Makefile.depend | 1 - usr.sbin/unbound/checkconf/Makefile.depend | 3 -- usr.sbin/unbound/control/Makefile.depend | 1 - usr.sbin/unbound/daemon/Makefile.depend | 1 - usr.sbin/usbconfig/Makefile.depend | 2 -- usr.sbin/usbdump/Makefile.depend | 1 - usr.sbin/utx/Makefile.depend | 1 - usr.sbin/vidcontrol/Makefile.depend | 1 - usr.sbin/vipw/Makefile.depend | 1 - usr.sbin/wake/Makefile.depend | 1 - usr.sbin/watch/Makefile.depend | 3 +- usr.sbin/watchdogd/Makefile.depend | 1 - usr.sbin/wlandebug/Makefile.depend | 2 +- usr.sbin/wpa/Makefile.depend | 0 usr.sbin/wpa/hostapd/Makefile.depend | 13 +++++++- usr.sbin/wpa/hostapd_cli/Makefile.depend | 5 ++- usr.sbin/wpa/src/ap/Makefile.depend | 0 usr.sbin/wpa/src/common/Makefile.depend | 0 usr.sbin/wpa/src/crypto/Makefile.depend | 0 usr.sbin/wpa/src/drivers/Makefile.depend | 0 usr.sbin/wpa/src/eap_common/Makefile.depend | 0 usr.sbin/wpa/src/eap_peer/Makefile.depend | 0 usr.sbin/wpa/src/eap_server/Makefile.depend | 0 usr.sbin/wpa/src/eapol_auth/Makefile.depend | 0 usr.sbin/wpa/src/eapol_supp/Makefile.depend | 0 usr.sbin/wpa/src/l2_packet/Makefile.depend | 0 usr.sbin/wpa/src/radius/Makefile.depend | 0 usr.sbin/wpa/src/rsn_supp/Makefile.depend | 0 usr.sbin/wpa/src/tls/Makefile.depend | 0 usr.sbin/wpa/src/utils/Makefile.depend | 0 usr.sbin/wpa/src/wps/Makefile.depend | 0 usr.sbin/wpa/wpa_cli/Makefile.depend | 16 +++++++++- usr.sbin/wpa/wpa_passphrase/Makefile.depend | 5 ++- usr.sbin/wpa/wpa_supplicant/Makefile.depend | 13 +++++++- usr.sbin/yp_mkdb/Makefile.depend | 1 - usr.sbin/ypbind/Makefile.depend | 1 - usr.sbin/ypldap/Makefile.depend | 3 +- usr.sbin/yppoll/Makefile.depend | 1 - usr.sbin/yppush/Makefile.depend | 1 - usr.sbin/ypset/Makefile.depend | 1 - usr.sbin/zonectl/Makefile.depend | 1 - 879 files changed, 409 insertions(+), 1444 deletions(-) diff --git a/bin/cat/Makefile.depend b/bin/cat/Makefile.depend index 6cfaab1c3644..7dfbe9638dcb 100644 --- a/bin/cat/Makefile.depend +++ b/bin/cat/Makefile.depend @@ -2,11 +2,14 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcapsicum \ + lib/libcasper/libcasper \ + lib/libcasper/services/cap_fileargs \ + lib/libcasper/services/cap_net \ lib/libcompiler_rt \ diff --git a/bin/chflags/Makefile.depend b/bin/chflags/Makefile.depend index 6cfaab1c3644..8d409f5263ac 100644 --- a/bin/chflags/Makefile.depend +++ b/bin/chflags/Makefile.depend @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/bin/chio/Makefile.depend b/bin/chio/Makefile.depend index 6cfaab1c3644..8d409f5263ac 100644 --- a/bin/chio/Makefile.depend +++ b/bin/chio/Makefile.depend @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/bin/chmod/Makefile.depend b/bin/chmod/Makefile.depend index 6cfaab1c3644..8d409f5263ac 100644 --- a/bin/chmod/Makefile.depend +++ b/bin/chmod/Makefile.depend @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/bin/cp/Makefile.depend b/bin/cp/Makefile.depend index 6cfaab1c3644..8d409f5263ac 100644 --- a/bin/cp/Makefile.depend +++ b/bin/cp/Makefile.depend @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/bin/csh/Makefile.depend b/bin/csh/Makefile.depend index 05f33d1d7799..f82118793993 100644 --- a/bin/csh/Makefile.depend +++ b/bin/csh/Makefile.depend @@ -2,7 +2,7 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ + bin/csh.host \ include \ include/arpa \ include/xlocale \ @@ -10,7 +10,7 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libcrypt \ - lib/ncurses/ncursesw \ + lib/ncurses/tinfo \ .include diff --git a/bin/date/Makefile.depend b/bin/date/Makefile.depend index 6cfaab1c3644..8d409f5263ac 100644 --- a/bin/date/Makefile.depend +++ b/bin/date/Makefile.depend *** 13219 LINES SKIPPED *** From nobody Wed Apr 19 03:15: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 4Q1Qsq0HQzz44rWF; Wed, 19 Apr 2023 03:15: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 4Q1Qsp6jKSz4543; Wed, 19 Apr 2023 03:15:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XvRZE0U8b8WdrtehvILRcllgogGZkIq9mK3a8XJgPwQ=; b=X0qt62ImacOeJGGFfBSaRJyFXwaD8qzaz8ZvMtPH9nWhu4iE3tx3TUX5WNj4b+TffSGRhc Dj6/gMBwg+iw8+PCca3QZ0jZdkqFJCur5FODiydrDwO/QPfD3AyrFMD6erjEMb6TktQ1Kf yhjR+7thIp0fqMmmDqU9wwC5wOcHFMDgFeNbK0aT2pQg1Ub+6yrsY6Fs81JNM8YkTmgVvf veG5XqCRA3TzEUN2XO3pRjfr/0I7hjZS4lNhjN4MrjuUJQg47/RObeTNqSOGtfOwda9eeb blNYzqsEBvcloz09cIwgGk81zfOLjNDRlHbqsnJgLDB3XwLx00faY+retRAVVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XvRZE0U8b8WdrtehvILRcllgogGZkIq9mK3a8XJgPwQ=; b=Gr9+tWx1WU3Ey5oCuW7AbCokvf5fbgHehBq8h6Q0kYbrnw53Xu9t8jI/6+uhV+XRoZqL8s bp+xINVsZ7ODmBghRB4Cv6kzkCaPe+C9STqOrIddSoAefgn3wTN5hRxtvhaB0vGjNfXI6h ZmpGi5iZ6MprIVsEuxXpKMkDkp3Y1EO41uYLtSgXo6KfPrq5izZklFhzoOwZy8M1QCeNeb rkY+S8iQrZitV2jHoQucOtSpRGxarFvcoqEtQMFBAbOOYdiEbNIdHcoQyolfDgXus2GVbq DLfC1RtBrNADzJsWYEiZ5QKjSaxlM9kwktnukenddfP6H9Pbj77sxqcvqDRu5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681874158; a=rsa-sha256; cv=none; b=tj7JpnZO1SOcqJyZF/Vs6yv2UmduUfTbM5cdCu2b6xfw5VaT18tnRjnGe3JyfgCxm5xyUC rVXDrkfCzFbOmq/tJ7VaitZTL8YhwWXWm5EwVqUgTxf/j+IEk1xJnNUI7aBUTpwUT9gfDS qh1SFHshloNB2zHXvoydPrHuJU5njG7p2YYmNvUvwQ+APTNHzaiVJnGtH7vfV3K/VKcFBv zgLDrdtbX8DazwTewlKOU4B3xPXWDFjVplhl3reyHObIF6Bvmsl59Sba4Ig6CQB6wI8iPk zQrMVYqOMm5y4uSxnqLhZtDHb1aMoLN8lq7/74GGOHL18bspWHbGW/pMMpoRcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Qsp5dt9zf5N; Wed, 19 Apr 2023 03:15: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 33J3Fw80091299; Wed, 19 Apr 2023 03:15:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33J3FwEc091298; Wed, 19 Apr 2023 03:15:58 GMT (envelope-from git) Date: Wed, 19 Apr 2023 03:15:58 GMT Message-Id: <202304190315.33J3FwEc091298@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: 9eaf82f27c4f - main - dirdeps.mk guard against inclusion from Makefile.depend.options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9eaf82f27c4fb368385ff759a2195bd92c369684 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9eaf82f27c4fb368385ff759a2195bd92c369684 commit 9eaf82f27c4fb368385ff759a2195bd92c369684 Author: Simon J. Gerraty AuthorDate: 2023-04-19 03:15:25 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-19 03:15:25 +0000 dirdeps.mk guard against inclusion from Makefile.depend.options A typo in Makefile.depend.options including dirdeps.mk rather than dirdeps-options.mk can result in infinite recursion - don't let that happen. Reviewed by: stevek --- share/mk/dirdeps.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk index b213ddc28fb7..90ef5f55c790 100644 --- a/share/mk/dirdeps.mk +++ b/share/mk/dirdeps.mk @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.155 2023/04/15 05:46:19 sjg Exp $ +# $Id: dirdeps.mk,v 1.156 2023/04/18 18:39:09 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # @@ -349,6 +349,10 @@ BUILD_DIRDEPS ?= yes DIRDEPS_CACHE ?= ${_OBJDIR:tA}/dirdeps.cache${_TARGETS:U${.TARGETS}:Nall:O:u:ts-:S,/,_,g:S,^,.,:N.} .endif +# sanity check: Makefile.depend.options should *not* include us +.if ${.INCLUDEDFROMFILE:U:M${.MAKE.DEPENDFILE_PREFIX}.options} != "" +.error ${DEP_RELDIR}/${.MAKE.DEPENDFILE_PREFIX}.options: should include dirdeps-options.mk +.endif # pickup customizations # as below you can use !target(_DIRDEP_USE) to protect things From nobody Wed Apr 19 03:17: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 4Q1Qw22hftz44rcq; Wed, 19 Apr 2023 03:17: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 4Q1Qw166p4z47dX; Wed, 19 Apr 2023 03:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5qTjDZyv+LAEa4CiSaLutpYbeQg2EiebUvLGpoCCwMk=; b=iJaWKsjlA1ydM4dF5u3lv+1jJI3xlQ4BMgrK/oVUGGoultoeF2hLCnu0EIFzLGlkBM35Ua wnnhE47kKUFjYQVVUMUCvxcICBnXo+1SixgGkXfE9sn56jXfZR5Phu4FvIO1ipgoTcT0wZ DsVi1mcgkRnehjvly6GQprc0ybJikGOlz1HjPoXpSYFgvAAlo6gL5xjxO4d2xiVQozagS3 rOVye1MpNIItdzTTupB60zvfDRRXRMtIzsvS4Kx0zNChxGG2irhJO3bv5N7ezbh202117V z6sSr/yaCwd3mNylrahEp4qJMfx99IQiPToEHO/kG306DvuId84g1LyIaWpNRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5qTjDZyv+LAEa4CiSaLutpYbeQg2EiebUvLGpoCCwMk=; b=dWbUCCdbqKaAD9qNi5/Pxq5L1hzkZHJHXpQgqvlrCm1/L8UnmQEDA9o0agoOSpwFf4k1GL IbOQt/yTxoeklfdRqosK5r74dj5EoUauPl5vp0+HrA4t4PeLdo9rR4ugdx74dtYEMsUkIc RvCGMAyqFsN/ckhRQJaPH8Qqybi3DftVJRz22I1DnpQcZEUUM9JtviZjR2PWNY5Qzujzd3 0wsQrCCOAB9iixpI7i7YGbPy5aYxlUPaNRup35SUI0/Se0k5CN+WtUy/3JB0gj+sm707CT K07a7FTzHH//XbxljzXnbLKENRfRhoGgkWfepK8oftGIajKgdcLDhwYoQa11FQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681874273; a=rsa-sha256; cv=none; b=UkZvEkrP1O56+mxNP145o0cwPNjgP4TAInYJzB+AwNL6To467l47iRv/xaS6lwclgQQVGq +D9LCrUrk4FzRIdTa8RIcGipZuH+fM96xr5dsyCzDIMOkxRaeSzuLh+Uif/p2n5VH/YR5F olI4aWbYtb+Ah5aWmlzVEn/Ucth8ZG5tKU0c6d3GF9Mn+2xtYIIooSsooQMSXPgX8iq9Kk xDtBMKV9qeMXh1/U135FUuzTDLhbEp/kfnw1safpcJS5Mcq75MKgaSPhEFnGAbjUGht5xt ib0mOxgQeaQyORWBE6eZ/jUK6xFdQqVbnE9KKflIHjOAhMEly9mFvzBzpg3USQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Qw14Sm4zdtQ; Wed, 19 Apr 2023 03:17: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 33J3HrIB091635; Wed, 19 Apr 2023 03:17:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33J3HrvH091634; Wed, 19 Apr 2023 03:17:53 GMT (envelope-from git) Date: Wed, 19 Apr 2023 03:17:53 GMT Message-Id: <202304190317.33J3HrvH091634@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: 3743a7be4f37 - main - Just ensure all target exists List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3743a7be4f37c0794f4e14a6fff0e67385341d54 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3743a7be4f37c0794f4e14a6fff0e67385341d54 commit 3743a7be4f37c0794f4e14a6fff0e67385341d54 Author: Simon J. Gerraty AuthorDate: 2023-04-19 03:17:22 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-19 03:17:22 +0000 Just ensure all target exists --- targets/pseudo/Makefile.inc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/targets/pseudo/Makefile.inc b/targets/pseudo/Makefile.inc index 40f3828ec7d4..e5dd42ae26ae 100644 --- a/targets/pseudo/Makefile.inc +++ b/targets/pseudo/Makefile.inc @@ -5,9 +5,4 @@ UPDATE_DEPENDFILE= no -.if !target(all) all: - @echo Done! -.endif - - From nobody Wed Apr 19 03: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 4Q1Qy70W5Pz44rmW; Wed, 19 Apr 2023 03: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 4Q1Qy66xJQz4Db3; Wed, 19 Apr 2023 03: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=1681874383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByDstx967/ebmpm+HHzBrjStWMEzobDXdrzsZLQYXhY=; b=L5TIHAIlIH6u42quvJ0E7cOnQoXKgVtZ2a55bGjxW8XXLWK1hglngIZ6W/lKtMJfa/YYEq IGRaCSLJNi3z8qsXAaQMvvKbQmUzZ6LO1pLNKBg8JQUrrxT5kEvqn8CIk8A2LDldowtyTa jySEgL4yhcYIJFniqUtcWICbd3kUtmITsBbNJ2qidR2OjVC87VgwGUyuezqFEZvHUq+wnA fHuJ5PEHtTbPQCePEa2sfEe1fitWEHX8OQS7xSlAfl0Ju2NpXcu2kXxt6d+mfgmljMdH3K s5k3fSh/rpBz3vQLckCLxpogP0JpkcFmfx5NyVl6c7hX18MPfRXSeYJVJZ/jfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByDstx967/ebmpm+HHzBrjStWMEzobDXdrzsZLQYXhY=; b=wd3KlaU3iSrnZ/XQc/LvApzGu4x94maj7SL1cK/vc5hzCCUcz+vfWFTcl90qOUphpz3O9y 1hl/k20A0RlBwaNXo09IPccVh3xR9fmkyOqQT0N23SPlbjb9208zXc1sko/DlwgTs+ECZg y+eyNIA8oEK/GFe6JgRPHzg0LMBcVyTk/59H4K5MSljT5hJhTEcDf1mLrKcM9nuVFHob3W CFg0wsSi2Ep43myomQfquUcatFy6vC7EYYoxFl9h+oTiFO3TiMJRWFs1Q32SYUDFFTk6CN IXyo2XPr6+DsIQ5aXponqVS7JbK8oyYX34VEFTPrYET+1VIKl5DSU1vVUKy1zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681874383; a=rsa-sha256; cv=none; b=WwEaD9MLLaPtdvCI6lg+6Cw+3sY7VY3mIuG8Ws7aj/XQwt8us+R0XwpU5P1/Z/LMLO650C 6qoy6U5gXk1AWaOmABqhkvxTKNDBTcMxgMRl84xai2Jy9w5JauE/qvKGk731JyylNzr03e 3CkXQzCRJG86xbJf4KgDhAcpif3tafBsN5cMVMdVIbpgmUAvZ9PSpCsylmiMms6ovCSj3i CVuLUpIchSlQhu7aAZQNymOjuKnSQpopDIyh8JfU/9jjAPfTDfNE4a5ISFxLBtvqeday+x WFWxvoxixBbqxtc3tdcGA9Xi/Kx+y7L0Ooc3t3+STG6tT35wZEuzbla7ZIT/vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Qy65zVzzf5P; Wed, 19 Apr 2023 03: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 33J3Jg4t091972; Wed, 19 Apr 2023 03: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 33J3JgTk091971; Wed, 19 Apr 2023 03:19:42 GMT (envelope-from git) Date: Wed, 19 Apr 2023 03:19:42 GMT Message-Id: <202304190319.33J3JgTk091971@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: cb05ce69c2b2 - main - Ensure the stage_* targets we use exist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb05ce69c2b28fa35c7e4ef6d735cc259b2cc296 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cb05ce69c2b28fa35c7e4ef6d735cc259b2cc296 commit cb05ce69c2b28fa35c7e4ef6d735cc259b2cc296 Author: Simon J. Gerraty AuthorDate: 2023-04-19 03:19:11 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-19 03:19:11 +0000 Ensure the stage_* targets we use exist --- share/mk/bsd.confs.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk index eb87ba49caa9..d203087c67dc 100644 --- a/share/mk/bsd.confs.mk +++ b/share/mk/bsd.confs.mk @@ -135,8 +135,10 @@ _${group}INS_${cnf:T}: ${cnf} .if ${MK_STAGING} != "no" . if !empty(STAGE_SETS) buildconfig: stage_files +stage_files: . if !empty(STAGE_AS_SETS) buildconfig: stage_as +stage_as: . endif . endif .endif From nobody Wed Apr 19 03:22: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 4Q1R1c2Jyqz44rwt; Wed, 19 Apr 2023 03:22: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 4Q1R1b5nWzz4KJM; Wed, 19 Apr 2023 03:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wf8Mm9HFUgUm9cHzIjwEYUXYCdhhDGAqYC6xht2yDs=; b=JOLxRAlHVJym/+kCcGhxY27BwXbWfMttylFetNxUt3I12w/tiv+8/7h9pZchnb26fzZGHJ GnEia4mSKJTdofqWCgMVDHaVk7mz9KzNsCJ+e0HUl8h7/puCFA1kmPRkdXnTx55G2dNAcf MZ4FJ8C5AjEkl36FGTeNoWf5094XCfhV+L6IXmScu7KE4qIfSuoLLFNG2Ioxmj/uHtNjZx tqUjS3D9F4zOdm6XFwRXxtUuzSkmKHZQad1GDay1HrqGuRB8LqBYxIzkH1OxRC43S5C4mp U40AG6EEGKKETMIFNw/GxjHw/9DlTZSS0f6wRWBcpaIcqzeAm8bEgZBQ6dUTdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wf8Mm9HFUgUm9cHzIjwEYUXYCdhhDGAqYC6xht2yDs=; b=UwifRiBGLs11wBGZ/jSpSE/nDkiY2QSjMtUEcjQeZ5c1bsNuRM8moYhP28wyPJ5qB1z2OW P4inLyi0ri/80JC392UO+qcFllGhgkgnpCMEguMT7YJ59ice/zxABRToSnpf3ZqUPsWSgb CgI4KpoPpXYrUX74hXlyJnZnzKwL7sM7MX1AjboJP6sL6EVWiy3kTf4dGGfNUQqdnpW684 lCqWDyIKGIVlPW7X2C8bArMnhsc4MLr+//BqShxBf3BH2U3UFxFjaHoy5gEMxUU3AaEFJD DPaDW3wSiMw5nHHTvc7baoh4sEvNianjstWsiywRxDooCg9k/+j/84ORKmupEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681874563; a=rsa-sha256; cv=none; b=qHi4lW/B5dg3oZMMG2lSYmdv7J8s4+Vik7D97dglbaxnI+Juspd64i+ooRuJDi6TM7IT7M M2gG5g4DpYYyYDRPKwMPUy7uD++VmHDB2LFXwltHos5sbgxv9sYkK5KsqHe0d4XSASgaKs ZJ9MW+SwhkmsFNya8sySaGxjWyuVOU82eX2F4ka97fcrKC5qZghjGNLNFJ+4Ei10+6HSP8 KNJ9fWehkrKkp/1S+Vi71rXg5R8P2LNXIbF2gKg8fundFVtAoDe8EohFtGuA2jrIt3/kMH pBTGTcQ6Zm0HIfpkIyHOPaklzjDXcecftypzi1WGLALjBuMB80jo3Bre8cr5nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1R1b4trVzdmb; Wed, 19 Apr 2023 03:22: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 33J3Mh7d007904; Wed, 19 Apr 2023 03:22:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33J3MhvV007903; Wed, 19 Apr 2023 03:22:43 GMT (envelope-from git) Date: Wed, 19 Apr 2023 03:22:43 GMT Message-Id: <202304190322.33J3MhvV007903@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: 5ef0969e6247 - main - Handle libs that create linker scripts as libs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5ef0969e6247bf79230a04a0134a649e67305165 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5ef0969e6247bf79230a04a0134a649e67305165 commit 5ef0969e6247bf79230a04a0134a649e67305165 Author: Simon J. Gerraty AuthorDate: 2023-04-19 03:22:13 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-19 03:22:13 +0000 Handle libs that create linker scripts as libs Eg ncurses creates libncursesw.ald This is the only example so far, but if we are staging handle it. Reviewed by: stevek --- share/mk/bsd.sys.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 9d24c87d9eea..19f92d8f9d5d 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -437,6 +437,14 @@ STAGE_AS_${SHLIB_LINK:R}.ld:= ${SHLIB_LINK} NO_SHLIB_LINKS= .endif +.if defined(STATIC_LDSCRIPT) && target(lib${LIB}.ald) +STAGE_AS_SETS+= ald +STAGE_DIR.ald = ${STAGE_LIBDIR} +STAGE_AS.ald+= lib${LIB}.ald +STAGE_AS_lib${LIB}.ald = lib${LIB}.a +stage_as.ald: lib${LIB}.ald +.endif + .if target(stage_files.shlib) stage_libs: ${_LIBS} .if defined(DEBUG_FLAGS) && target(${SHLIB_NAME}.symbols) From nobody Wed Apr 19 03:25:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1R4f2Zj0z44s9v; Wed, 19 Apr 2023 03:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1R4f1dpDz4PY1; Wed, 19 Apr 2023 03:25:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1LheHhLQabhjJGeDba1Dg8OgwPjMFboYdoY63oW9l0=; b=ymxhEWC0sapGh6b0HTGFUSMmOpOlQyBOu+I9aXyFx0VHsjTlggyYaPtD3IXHeTePJfPZoH 27Fosld4Syo//mrf8p4r55LhvQnxvZIYP/PY7U3QhSJz2oTk3IdSLz4hmlTO2ldnxvzfpn c3J5nkPU/Bv8mMxnOrICibTQKZQb3kBEG8/imtOhxHIllUILdzGTJrTtcTYh8gfEIJzye+ BSY11xLUYb2PQvxDZFyYfwPKHBprliDspBpWS63Oevb+yI14O5i+M7m7LsQ9MIqPLDm5Zw 9ar2n8gdtZSLYgaHtmh33FKENLihYDDLWnZB57oiAlQZ2tNB/id0OsjZ/7z9gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1LheHhLQabhjJGeDba1Dg8OgwPjMFboYdoY63oW9l0=; b=RzClqFyvoeB8Rl0J+5W7Yjb6ZSn70Lb4F4XIUZOFp2h4CXw2HAZ9Fylao2b/UqOHLlj7lK Wo9zkD3cG26AMqiXiliD6C5FXV/PW5q95HJk2aHV8G1s1QMCHJQzeQVzrrtw6zkgiASnT0 jiJbGgteMSqjpTZmCcxfPJC0ihlrkFB66nscYOuUVfvRcYAAxsvYr29WEVevDsXtHD88X1 I/2kMmivERqAbsW/YQsgRKDgcJCTLGCizl+3HXLoLl8xh9GrlhdMXdyaBH2RNNGaXeKWoC sruHtgQOvbKddFiBzkpIvRJ/H5RxYsbUiRtdRZpvTRBZJpzFsenhcLxNNNG/JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681874722; a=rsa-sha256; cv=none; b=j/LbtjmlMyOTD4WPluxN/0RrAthL7EKPTRn6NstcrYKGoLxq5DhKB+b/2KABEB5CYGSTE1 wWhaVPE9VCyVZ643EKZO6N1/qoasXIhOLTZ0aFgCTtkDdZxsDcazmNxHBP0PpdasoTgq4i cXai7e5eAzsChFPezmObczHrY1VS9pBjNh+nZ2rbJW47/6gzKQNXz4zb4E6E0iRR+DlMT0 OCs4Qi3YSjpM+FWfeZn2z686xgZf7K1wPlNAtvyahgMbxLzpUp7QG2cXDBRPCPPqupq7IL ME2r0uqGkZAxraf/0YxDSE1V1HyYJkicreEL//jRmIWyArQs8raK/LzzR3w43A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1R4f0bprzf3Z; Wed, 19 Apr 2023 03:25: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 33J3PLOm008336; Wed, 19 Apr 2023 03:25:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33J3PLr1008335; Wed, 19 Apr 2023 03:25:21 GMT (envelope-from git) Date: Wed, 19 Apr 2023 03:25:21 GMT Message-Id: <202304190325.33J3PLr1008335@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: 901efd8bb9b9 - main - Avoid staging conflict for examples/pf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 901efd8bb9b9efe34085abc2d5ab36d21378b1dd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=901efd8bb9b9efe34085abc2d5ab36d21378b1dd commit 901efd8bb9b9efe34085abc2d5ab36d21378b1dd Author: Simon J. Gerraty AuthorDate: 2023-04-19 03:23:23 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-19 03:23:23 +0000 Avoid staging conflict for examples/pf If we are staging, let examples/pf stage its bits. --- share/examples/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/examples/Makefile b/share/examples/Makefile index 7179f1bff1a4..7384cb61c0a5 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -215,6 +215,7 @@ SE_PERFMON= \ .if ${MK_PF} != "no" SE_DIRS+= pf +.if ${MK_STAGING} == "no" SE_PF= \ ackpri \ faq-example1 \ @@ -227,6 +228,7 @@ SE_PF= \ queue4 \ spamd .endif +.endif SE_DIRS+= ppi SE_PPI= \ From nobody Wed Apr 19 03:29:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1R9K0fxjz44s0d; Wed, 19 Apr 2023 03:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1R9J6H60z3HRs; Wed, 19 Apr 2023 03:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bUCnt9R2iGYjh8p7SlXLZwT/oPoj1RXXYluWB28I4LI=; b=ce+v+RPYZCnuYYH7aNxBuqMM0Ut5rsdXa2843n8ncAzz/oQCZdjhENyEXdBQxi1dp/005f xLRov97eglWHWSMe//dmjNbDdO3QlPQxaEI8Jr665dv8xG9P1SpjNK5lWBj/dXKd6vmLvl goFDRPrUsQDaO/xaMDHJ8v1++zbf1GvhLzQDA50L2RQNlfkaXnFXv5DeCeZR4CfTYTjhK4 S/3b8xDA4IB0It91xkTQiANzJe2bume1HqQ+w4i6l9e3mWWJWaDjppRxIkuwTX0qj2RrFJ UTSMBT0f1BT9LNjUcAHGChaPFmZDXeazrqno/QYV6uSXNnyouyTcWgLrXsrQtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681874965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bUCnt9R2iGYjh8p7SlXLZwT/oPoj1RXXYluWB28I4LI=; b=MkBy9TBd+uIYWZy3GRvLh/M/Qmz1T5eJ0MlRsfWZA/j7Qjse/JuLQFeMSC8J0ksqZL485u x1wQ+qT3LFUYgmfJyjFrP5JfHlTkFWFgflC1aFrMj5+eqFDElnZe6k1dzppaQ2zWILI/eX APN/MS54lDc4xSjiwBTcmzW85ayfJ6hxzEmdzgq1Y8O/xXLcglK7ULA4Kbx6ndDGHFrMOh 06va/4BZh6e7vELjYtKTPAGvxAY0KzUKAY2iocs0ZVIpqTYIZ6tSOKRN4AI3DFIi2x9yGR Ro4ipq/MuGUwy4lgtPveC6QP2JTnMXdpmZFLXxIGfYZvl2J33UKY7oATyS67Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681874965; a=rsa-sha256; cv=none; b=Crr+poezhlTP/vlKtTbTuxRoZ2gTVrhg7naqaL96C4qFk/udBPpJ4Hih1CWZ7DReXlfiJi K8bKWIduDy9eLaOBDBwCGPH0oJ90/uhJGF+g0D5eksJ0KUUp12Ys+Cu3ztzWSkAmMi631y YPHK+Pqd5yKQcdf85IgHKfhT7yfH8jycS3t7eTQCHC5XvjWJquNGb9cBlEa6CWkSbwxNWT /KCihWU2USY9dAhJD+QusYYYWBiNOBpmDdX08dRb9rtLAytBjJD0tq+fbbnM+g72cKDtDn bdmUrzzkk4zvHvPdD2/3puHVMsEzaZV8uf8e1iuoPbotilO1uAGAhTcNud+3Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1R9J4b2Nzf3b; Wed, 19 Apr 2023 03:29: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 33J3TOg3008942; Wed, 19 Apr 2023 03:29:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33J3TOV3008941; Wed, 19 Apr 2023 03:29:24 GMT (envelope-from git) Date: Wed, 19 Apr 2023 03:29:24 GMT Message-Id: <202304190329.33J3TOV3008941@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: a6bd50f712bb - main - Avoid breaking crunchgen with meta stats List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: a6bd50f712bb6e99dae3c2dda2f4c3742d7cf8e2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a6bd50f712bb6e99dae3c2dda2f4c3742d7cf8e2 commit a6bd50f712bb6e99dae3c2dda2f4c3742d7cf8e2 Author: Simon J. Gerraty AuthorDate: 2023-04-19 03:25:33 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-19 03:25:33 +0000 Avoid breaking crunchgen with meta stats When using DIRDEPS_BUILD we normally get stats as each dir finishes. This upsets crunchen, so keep quiet when _RECURSING_CRUNCH is defined --- share/mk/local.autodep.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/mk/local.autodep.mk b/share/mk/local.autodep.mk index 6c2b560b1f45..b7660fad142c 100644 --- a/share/mk/local.autodep.mk +++ b/share/mk/local.autodep.mk @@ -29,3 +29,8 @@ CLEANFILES+= .depend @${CXX} -E ${CXXFLAGS} ${.IMPSRC} | grep -v '^[[:space:]]*$$' .-include + +.ifdef _RECURSING_CRUNCH +# crunchgen does not want to see our stats +_reldir_finish: .NOTMAIN +.endif From nobody Wed Apr 19 05:29: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 4Q1TrW22X7z4500p; Wed, 19 Apr 2023 05:30:03 +0000 (UTC) (envelope-from kevans@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 4Q1TrW18BFz3Pxb; Wed, 19 Apr 2023 05:30:03 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681882203; 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=WM5uTmN4cwWtfzgLPX5jxplWgTi/P2R1GaPoCwkWUx8=; b=R2WbPCv0HORxcx5pfOaAeG6fyKD9JamScOiWlBVlZgkCOEVYdMpChIjX+iU7A1iAotpd8m eQUGwpppUeYd/K4ZMWcn3lxmKWs2r6SKtAGd4l6d25hlPAK48W7EuMgmpyHP5hWDqwkIiz RVHZW2pDY4IndqBWIFGXWvPHzWlPxk5X2KFXXP/7cWAtk4dQ6XpHpN1xOBeWi1r7+KJMGj z9NPw88+xh6rFY9WO/ckK40F9TxT6ArXtR4++1C8eZGf1Wnu37zIepoKeJ/d3cqqzb3QPr BXcFn8nY14kpUQgISQ8OOZvoKR35q95Sx0WmET9E+y5Z1tjABZKIdob6lmPykg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681882203; 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=WM5uTmN4cwWtfzgLPX5jxplWgTi/P2R1GaPoCwkWUx8=; b=kK5PGj3zfVIu5J3Rj/1pJSOx87/ES/kI1d+OniBSROiUuFaq7PeZHSITOtAMSJOl9Ipe91 X33hm3e9mci+WplXXOE0uz9n6fv2PAW4VXJIUbsdnXOzzadl8yeIuyawgmfeyo9BeT4gmC 5jDrGTFay/rNa/+1mXTEth2bzFFM0/6D+fj0KlgEqrHiO6shNb5fiiaRjsSqRsOLJkRvhm 5XyvBJXTDHeU8IUIb3TcPqlAvCSOirl9T8Gi5Wg5/Ae2vOPN6d1VpUmIGybO7amdFT8YcW /Uq2JNPDcRuoOMRj60AhwM7LzHizvMN36dcPoqAztj5/GRrsP2darqp570Z+aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681882203; a=rsa-sha256; cv=none; b=B7wrigwzwloJeOKt1vFZd2RX9ZoXgfhTRgbAlYhO4bL74cRj62XYiF5y9FXGP4w1Ew7wou uyru4v0jQPphPf3u/BHo/SgNRx6SyIkr7z5HOn8ikuYhR8Ap4aqLOz3TeagwuAAg32jI30 ngome1uGoMV8uoBJ8ZDtYfac88S4Vv7myQLVQRWlCEVBZAJkwbjhaAlJOqkWo4wwu3BcV8 p1SFULYWDw4AFwI4GqXSLLsrx/daYT7jEtHmlS9kR4+Zr/tz9aK/y1h3ArIEAHBGvsaMXs mJbLmqax8oO9b3tEMShwJvYLHlHR0O1HGWNL8sk7IMn8+nAuRzSGXE4jeOQmYw== Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q1TrW007yz1M0D; Wed, 19 Apr 2023 05:30:02 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f48.google.com with SMTP id m16so20071126qvx.9; Tue, 18 Apr 2023 22:30:02 -0700 (PDT) X-Gm-Message-State: AAQBX9eG35K/0Hj6vN09/TNrQFyQq6jiIOYHTCO6afq0PVYUerv3mDLA 4ZW6yo2xPWsh5EEVmZkLcLsrJyvcsMsuyCFjGXY= X-Google-Smtp-Source: AKy350bYTE1epwi6cYlveTfXJ67zgqP2n4sBHOCKPwMMnuPaRk9xxYd4hx2m3zsIT3mMvvpJLyh2HAK5WidRcfdS3W8= X-Received: by 2002:ad4:4bb4:0:b0:5a5:c0d:b620 with SMTP id i20-20020ad44bb4000000b005a50c0db620mr2921293qvw.1.1681882202156; Tue, 18 Apr 2023 22:30:02 -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: <202210271354.29RDsUoH077155@gitrepo.freebsd.org> In-Reply-To: <202210271354.29RDsUoH077155@gitrepo.freebsd.org> From: Kyle Evans Date: Wed, 19 Apr 2023 00:29:51 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 9729f076e4d9 - main - arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final) To: Wei Hu , Souradeep Chakrabarti Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Thu, Oct 27, 2022 at 8:54=E2=80=AFAM Wei Hu wrote: > > The branch main has been updated by whu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D9729f076e4d93c5a37e78d427b= fe0f1ab99bbcc6 > > commit 9729f076e4d93c5a37e78d427bfe0f1ab99bbcc6 > Author: Souradeep Chakrabarti > AuthorDate: 2022-10-27 13:46:08 +0000 > Commit: Wei Hu > CommitDate: 2022-10-27 13:53:22 +0000 > > arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final) > > This is the last part for ARM64 Hyper-V enablement. This includes > commone files and make file changes to enable the ARM64 FreeBSD > guest on Hyper-V. With this patch, it should be able to build > the ARM64 image and install it on Hyper-V. > Hi, First off- thanks for doing this work! I can't seem to boot a -CURRENT image under Hyper-V on a Volterra machine, seemingly due to vmbus. It stalls right after "vmbus: the irq 18" but before emitting a version number, I have some other comments here... > [... snip ...] > diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c > index b0cd750b26c8..f370f2a75b99 100644 > --- a/sys/dev/hyperv/vmbus/vmbus.c > +++ b/sys/dev/hyperv/vmbus/vmbus.c > [... snip ...] > @@ -107,7 +113,7 @@ static uint32_t vmbus_get_vcpu_id= _method(device_t bus, > device_t dev, int cpu); > static struct taskqueue *vmbus_get_eventtq_method(device_= t, device_t, > int); > -#ifdef EARLY_AP_STARTUP > +#if defined(EARLY_AP_STARTUP) || defined(__aarch64__) > static void vmbus_intrhook(void *); > #endif > My gut reaction to this is that this is a red flag. EARLY_AP_STARTUP implies characteristics that aarch64 doesn't exhibit; it's hard to see why this conditional is OK, or whether it's testing EARLY_AP_STARTUP as a bad way to write __i386__ || __amd64__. > [... snip ...] > @@ -760,7 +736,7 @@ vmbus_synic_setup(void *xsc) > > if (hyperv_features & CPUID_HV_MSR_VP_INDEX) { > /* Save virtual processor id. */ > - VMBUS_PCPU_GET(sc, vcpuid, cpu) =3D rdmsr(MSR_HV_VP_INDEX= ); > + VMBUS_PCPU_GET(sc, vcpuid, cpu) =3D RDMSR(MSR_HV_VP_INDEX= ); > } else { > /* Set virtual processor id to 0 for compatibility. */ > VMBUS_PCPU_GET(sc, vcpuid, cpu) =3D 0; This one, vmbus_synic_setup(), is invoked via vmbus_intrhook -> vmbus_doattach -> smp_rendezvous. On !EARLY_AP_STARTUP (e.g., aarch64), SMP isn't functional in intrhooks and smp_rendezvous() will just call vmbus_synic_setup() on the boot AP. There's nothing that will initialize the pcpu data on every other AP, AFAICT. That said, the !EARLY_AP_STARTUP path is also wrong. Quoting lines that weren't in this e-mail from vmbus_attach(): 1527 #else /* !EARLY_AP_STARTUP */ 1528 /* 1529 * If the system has already booted and thread 1530 * scheduling is possible indicated by the global 1531 * cold set to zero, we just call the driver 1532 * initialization directly. 1533 */ 1534 if (!cold) 1535 vmbus_doattach(vmbus_sc); 1536 #endif /* EARLY_AP_STARTUP and aarch64 */ The two immediate issues I see is that in a device_attach, SMP won't be started. It's also going to be before SI_SUB_CONFIGURE, so `cold` will never be 0 here -- this is effectively dead code, and if it weren't dead code it would suffer the same problem as above where other APs aren't started yet so we won't set their pcpu data. This is OK, though, because then we have this sysinit later on that does the same thing for !EARLY_AP_STARTUP && !__aarch64__`, but that should really just be `!EARLY_AP_STARTUP` as aarch64 also needs to invoke vmbus_doattach() at SI_SUB_SMP (much later than SI_SUB_DRIVERS). Thanks, Kyle Evans From nobody Wed Apr 19 07:27: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 4Q1XRq03gPz456Ch; Wed, 19 Apr 2023 07:27: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 4Q1XRn6SN5z3Qxh; Wed, 19 Apr 2023 07:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681889237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OjJDrE8xeoXl2KjGOloROSiJGD7LTtCx4n71iokhXMk=; b=heHX1hJIAUH49pct24x5JhdfUCYM/j94C6CR+akDgWUBD0648Sgd6Kxel+VvoYQX9LsEem z5WjgJnAgd8p9Y+qai3icF5vM5JBxLKs7XPcV/GTpBVvGydEALDZ8mwOHArQh4EOAXV2TT OcOUlZ2Q5110SCEcjGOw1oLCkHQefKd0KyHU99QSkvhjz57OfYqHbg83w979qEEI8gE9/n CK/s6ylrajpcRf5W+MRoLwU9fZVK8Z4eWhl0Mb1kYuRY5/aupdHTNQw9gsvsVFvLf8tGvR l91M1RGNzMLrLRfDqieXqpaJlzSOkt27vmOCyJdjfirHJTdiIFOTD4j4LJCqag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681889237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OjJDrE8xeoXl2KjGOloROSiJGD7LTtCx4n71iokhXMk=; b=Xs8r3/EtuuBy3RbssvbrQmopDhEfFHsSlt1QCOYjlTxzv7bakRln403l7TkR+8B6czk7Xk oit1EM7kt5I4Ks9uhwbKAqwj7ilfwKSgwTTgoa1clRXKaAKoRzAy60B4IjcXK4hBJ2VDR2 vjZTu3/UpsGFWpex0aMaVWVeY8juC1qQ3ObSFQKgpMDnPtdIFOKDzzX1cO7W+c4ywwp071 6zTQOGq2JeggL0n3VOqvecr5QWA19nPdXUAPb4Rnrg41l1Kgajc35GNwIxSmIZ62zYoy0E pNQ67UhSK7ZvEqFCxJuKAjdtdTuQRvN9n5fAw6pazdNnNlpa0HfxiVj4U+b1Nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681889237; a=rsa-sha256; cv=none; b=h74Vq9HKf4XBEYs7zPBXvB9uun+qygLeGUn595UgcPASKOryzg2c/hluCb1U/IKno35kX4 08mGZfxcBevljawUGXBUHvGcmI7dsN5aFYQjIL68PVV2jss/RPDBxN8CD6/b1bzyc2FYIr 8mvkAIA8ako48OYTJjPnUlt0kQqIglM0B9b1LMWDJKOUhM8OPiCCo/VHGlx9AC+4xb+PvW 0qYiVKkubxLn/Aq0EMJ5upq0lbpmLePmDnMF8JJqZmb+471AzFDql/JxIY4YWmJeWDO3lK SL0DWCnJvItYcsy/qOJalojKARLYflzYAnoshxq8X9tDulEkcGyQMl0dUCYImg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1XRn5Y0Zzlpn; Wed, 19 Apr 2023 07:27: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 33J7RHLU001252; Wed, 19 Apr 2023 07:27:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33J7RHDQ001251; Wed, 19 Apr 2023 07:27:17 GMT (envelope-from git) Date: Wed, 19 Apr 2023 07:27:17 GMT Message-Id: <202304190727.33J7RHDQ001251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 9c9dfbf25698 - main - stress2: Added comment of fixed problem. Enable test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c9dfbf2569811fa8232411fd0c95e07ea089e98 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=9c9dfbf2569811fa8232411fd0c95e07ea089e98 commit 9c9dfbf2569811fa8232411fd0c95e07ea089e98 Author: Peter Holm AuthorDate: 2023-04-19 07:26:29 +0000 Commit: Peter Holm CommitDate: 2023-04-19 07:26:29 +0000 stress2: Added comment of fixed problem. Enable test --- tools/test/stress2/misc/all.exclude | 1 - tools/test/stress2/misc/pageout.sh | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index c8ec2fdb43bf..6b25a2c4ea11 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -47,7 +47,6 @@ nfs16.sh panic: Failed to register NFS lock locally - error=11 20160608 nullfs28.sh Hang in "mount drain" seen 20220111 oom2.sh Hang in pfault 20180324 overcommit2.sh CAM stuck in vmwait seen 20200112 -pageout.sh panic: handle_written_filepage: not started 20190218 pmc8.sh panic: [pmc,2749] (ri21, rc1) waiting too long for pmc to ... 20210621 rename14.sh https://people.freebsd.org/~pho/stress/log/log0433.txt 20230409 sctp2.sh panic: Queues are not empty when handling SHUTDOWN-COMPLETE 20210211 diff --git a/tools/test/stress2/misc/pageout.sh b/tools/test/stress2/misc/pageout.sh index 2df199f9e6dc..92eb899880ac 100755 --- a/tools/test/stress2/misc/pageout.sh +++ b/tools/test/stress2/misc/pageout.sh @@ -35,6 +35,7 @@ # "panic: ffs_geom_strategy: bad I/O" seen: # https://people.freebsd.org/~pho/stress/log/log0434.txt +# Fixed by: 7aeea73e3078 [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 . ../default.cfg From nobody Wed Apr 19 07:51: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 4Q1Xzq4hwzz457p5; Wed, 19 Apr 2023 07:51: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 4Q1Xzq1lXPz3CPP; Wed, 19 Apr 2023 07:51:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681890695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjFJW1239OVhTSHe34F29+8UMNOguu52hl1viv4dIs4=; b=tbjYsaNtCx951oYDYKLdbYDW+Qffuq98mIxXMFRiSzRNo7eTBUFN+lgXCF/FQU2SDjdv2J OSDGH5CkKkTeO8Fe79veKkynqLVhlQ3V/lKAteGAqBNTR9DftqwjBQPK2JxGoiVl88Bo3w 435CC8qlltjZ2BOxOsALgQ2JRelTBsakYmqnybk5+5TIi2rVI2G+zn4xc5Z1hxhkJk0nbd egMWs560OISWtETFYHWSAjGm01QA2vDPnCazYrVZ0/irWVflT5rmbMJpDo2UMKUNGK0inl 5DGy2H8DDvpop8LDF0EOIjZjGr9qavTvD0vrGYAxq8oB2bERu1vH2hbYIbnoCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681890695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NjFJW1239OVhTSHe34F29+8UMNOguu52hl1viv4dIs4=; b=xAeh0ZlHgSMPpmhWwJ3wqu6lbr80kcH9M41uak9nxxUkp7C6E6e+W7tgdNxPKVDYb4jsEd 4MAuKNekjw+CYI/oBL7g9ZhLNtLxtD1Lh/g/9ylcP0ooAiawXh1bKsadDm4PqPTP5I0k4q vLv2VJp1fYBj2Nix7SAJBLa57JdW4wqeNUFm2wKatfCoTlNgAeHKIx94Vhbje+G+mW17x7 2joLqsEve8/K40llNWcrd4OLVgWUfx8MlRSxr/AwiHi3ydlG1jm9Sn3mB/aIz0YDylVWXT J8OLoV6tw7kR6T01gyM1jKjlytFEAaniE06HPn3XVJN1ilIeeRNMh6C4eJb4qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681890695; a=rsa-sha256; cv=none; b=FDH8OTC7UN8JMj57WZvOo6sjBQ+vmubt1e9FR7AmII3zoRs2EtnhVfLDWXqjNaLoaeFq7w tR6eL9CZLj0LYJG1t7UPsOV5QqiImeGZ++r7/ftUM7XLbLibo1Z5tqb0PpzH60JdPSMZdh z9TxDg8W8jAYL0lm+f7OsNVySE7pc9c43/f5n8K3Yb70/lBLKLn2EqvPmzY+E+UTQyUIRy YLOxubJ3jWiCr5OcqLCgAxGziNcNb/FaDrZiKaZITTQiMm5pQGseEQ9BovfCGHnLytfwWZ 43GbSw7OhkqAZZyKRPMKDzGSfXndvt7V9JgQemn9kVVhlEjgEuv0qv2BZ5eRaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1Xzq0nb7zmJR; Wed, 19 Apr 2023 07:51: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 33J7pZ8Q043986; Wed, 19 Apr 2023 07:51:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33J7pZ4e043985; Wed, 19 Apr 2023 07:51:35 GMT (envelope-from git) Date: Wed, 19 Apr 2023 07:51:35 GMT Message-Id: <202304190751.33J7pZ4e043985@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: 2e6cdfe29355 - main - pf: change pf_rules_lock and pf_ioctl_lock to per-vnet locks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2e6cdfe29355cd81a4e2299d61e6ed57f6798a99 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2e6cdfe29355cd81a4e2299d61e6ed57f6798a99 commit 2e6cdfe29355cd81a4e2299d61e6ed57f6798a99 Author: Kristof Provost AuthorDate: 2023-04-18 14:06:36 +0000 Commit: Kristof Provost CommitDate: 2023-04-19 07:50:52 +0000 pf: change pf_rules_lock and pf_ioctl_lock to per-vnet locks Both pf_rules_lock and pf_ioctl_lock only ever affect one vnet, so there's no point in having these locks affect other vnets. (In fact, the only lock in pf that can affect multiple vnets is pf_end_lock.) That's especially important for the rules lock, because taking the write lock suspends all network traffic until it's released. This will reduce the impact a vnet running pf can have on other vnets, and improve concurrency on machines running multiple pf-enabled vnets. Reviewed by: zlei Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39658 --- sys/net/pfvar.h | 20 +++++++++++--------- sys/netpfil/pf/pf_ioctl.c | 23 +++++++++++++---------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e9e23d985cfa..2f017923afa1 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -385,16 +385,18 @@ extern struct sx pf_config_lock; #define PF_CONFIG_UNLOCK() sx_xunlock(&pf_config_lock) #define PF_CONFIG_ASSERT() sx_assert(&pf_config_lock, SA_XLOCKED) -extern struct rmlock pf_rules_lock; +VNET_DECLARE(struct rmlock, pf_rules_lock); +#define V_pf_rules_lock VNET(pf_rules_lock) + #define PF_RULES_RLOCK_TRACKER struct rm_priotracker _pf_rules_tracker -#define PF_RULES_RLOCK() rm_rlock(&pf_rules_lock, &_pf_rules_tracker) -#define PF_RULES_RUNLOCK() rm_runlock(&pf_rules_lock, &_pf_rules_tracker) -#define PF_RULES_WLOCK() rm_wlock(&pf_rules_lock) -#define PF_RULES_WUNLOCK() rm_wunlock(&pf_rules_lock) -#define PF_RULES_WOWNED() rm_wowned(&pf_rules_lock) -#define PF_RULES_ASSERT() rm_assert(&pf_rules_lock, RA_LOCKED) -#define PF_RULES_RASSERT() rm_assert(&pf_rules_lock, RA_RLOCKED) -#define PF_RULES_WASSERT() rm_assert(&pf_rules_lock, RA_WLOCKED) +#define PF_RULES_RLOCK() rm_rlock(&V_pf_rules_lock, &_pf_rules_tracker) +#define PF_RULES_RUNLOCK() rm_runlock(&V_pf_rules_lock, &_pf_rules_tracker) +#define PF_RULES_WLOCK() rm_wlock(&V_pf_rules_lock) +#define PF_RULES_WUNLOCK() rm_wunlock(&V_pf_rules_lock) +#define PF_RULES_WOWNED() rm_wowned(&V_pf_rules_lock) +#define PF_RULES_ASSERT() rm_assert(&V_pf_rules_lock, RA_LOCKED) +#define PF_RULES_RASSERT() rm_assert(&V_pf_rules_lock, RA_RLOCKED) +#define PF_RULES_WASSERT() rm_assert(&V_pf_rules_lock, RA_WLOCKED) extern struct mtx_padalign pf_table_stats_lock; #define PF_TABLE_STATS_LOCK() mtx_lock(&pf_table_stats_lock) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 5dc0072451a7..c800d2048547 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -277,8 +277,9 @@ VNET_DEFINE(int, pf_vnet_active); int pf_end_threads; struct proc *pf_purge_proc; -struct rmlock pf_rules_lock; -struct sx pf_ioctl_lock; +VNET_DEFINE(struct rmlock, pf_rules_lock); +VNET_DEFINE_STATIC(struct sx, pf_ioctl_lock); +#define V_pf_ioctl_lock VNET(pf_ioctl_lock) struct sx pf_end_lock; /* pfsync */ @@ -2606,7 +2607,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td switch (cmd) { case DIOCSTART: - sx_xlock(&pf_ioctl_lock); + sx_xlock(&V_pf_ioctl_lock); if (V_pf_status.running) error = EEXIST; else { @@ -2622,7 +2623,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td break; case DIOCSTOP: - sx_xlock(&pf_ioctl_lock); + sx_xlock(&V_pf_ioctl_lock); if (!V_pf_status.running) error = ENOENT; else { @@ -5652,8 +5653,8 @@ DIOCCHANGEADDR_error: break; } fail: - if (sx_xlocked(&pf_ioctl_lock)) - sx_xunlock(&pf_ioctl_lock); + if (sx_xlocked(&V_pf_ioctl_lock)) + sx_xunlock(&V_pf_ioctl_lock); CURVNET_RESTORE(); #undef ERROUT_IOCTL @@ -6692,6 +6693,9 @@ pf_load_vnet(void) V_pf_tag_z = uma_zcreate("pf tags", sizeof(struct pf_tagname), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + rm_init_flags(&V_pf_rules_lock, "pf rulesets", RM_RECURSE); + sx_init(&V_pf_ioctl_lock, "pf ioctl"); + pf_init_tagset(&V_pf_tags, &pf_rule_tag_hashsize, PF_RULE_TAG_HASH_SIZE_DEFAULT); #ifdef ALTQ @@ -6710,8 +6714,6 @@ pf_load(void) { int error; - rm_init_flags(&pf_rules_lock, "pf rulesets", RM_RECURSE); - sx_init(&pf_ioctl_lock, "pf ioctl"); sx_init(&pf_end_lock, "pf end thread"); pf_mtag_initialize(); @@ -6815,6 +6817,9 @@ pf_unload_vnet(void) pf_counter_u64_deinit(&V_pf_status.fcounters[i]); for (int i = 0; i < SCNT_MAX; i++) counter_u64_free(V_pf_status.scounters[i]); + + rm_destroy(&V_pf_rules_lock); + sx_destroy(&V_pf_ioctl_lock); } static void @@ -6834,8 +6839,6 @@ pf_unload(void) pfi_cleanup(); - rm_destroy(&pf_rules_lock); - sx_destroy(&pf_ioctl_lock); sx_destroy(&pf_end_lock); } From nobody Wed Apr 19 10:16: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 4Q1cCX6kMXz45H6s; Wed, 19 Apr 2023 10:16: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 4Q1cCX5Lkdz4JM6; Wed, 19 Apr 2023 10:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681899416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1yVppqOyR5kGA0WU+mhnxPtOEiq3u9wOqhuVYPGgtp0=; b=o1BwlNONjSftcJhDQtqf8/+2UqT3RD/kBCgoC91FbvS4HRWCmyrnA1wh6mhZjtVI/utw4I FA+IrTLpYXANjZEn8bgx3fHIUADFyUqEOBVPQVvFByQz4jR0KvQkC2ZC/dCE9UovbmVYPI /OSGIAZq6HS40VjaWWH2eC5Qd4N6a2zsz/LPArnpXW0IW352XEVMVdbFYeqhe1Bh0MnOV2 nWFSPQv7CZF7GPo3KUt2HOCw+Dd4Fhl2EL8KxwN19abNq0uiTQdkAzpJDEdvop/kMNsrd8 2NlxC1540QmPx+4+d5Uj4TBq1OLFJyMVAh/XutRhHVWXmUg5KcHDeLNuFpIJSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681899416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1yVppqOyR5kGA0WU+mhnxPtOEiq3u9wOqhuVYPGgtp0=; b=lppTsxefGCJheldhPafM0egQciu/f+/Nq6ltnLswTzYPBsllQEMjEE4AtMilYy8ulR3nYd 4vFWZiQfgQLP/aJDPivJbxd2Z4Z8ewHGpAgkn7Wpu9YmnWFy57+BYkpAtyBHrVWMSB5Mi5 FsqMQqJnIAGUuWj2/sNJSnMIG8ivFE38ksH/VSVh+Db7Wz66eUauCzlLbHBfk8vOzVcwI5 F5Lvt4pL9n4AEXWKPFDLL/sffeiEpnl0uwPHCM2nH8Hu/T8YZS5hkNfusFUnrvu+WN8P3A 1t42Bv7pNyTQClmeIs9W/HuPZXvmKveCxieabnEmv8t9PZZIfRdH93wpPEk/sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681899416; a=rsa-sha256; cv=none; b=VUz1ffYMrmDIEugU7bkdPCcEFYaX5OXbxt6oLXBjHBHmr9uy2m0GUy7zYP5+VSo+9nuNt9 WccDLfaD44zd6DaAuxEtQP2+qM97anNZGVoD3klxh2HxHtncGEehu9dHyQHxBEW93vAvvh K1khpLBQZnhGpwCvANs7AbB/VKyQmFC0S41URvhnyEEFVSXdc441BPMCj2wDRz0/lPP7fy 0tXDF2FSmRgRXU/lGHgEAlgi81sUeUK4fdeOvxIlN7t5YTASpKYoUZfXdI1KzGMGV3sBdv Fjqs9v3qRg077wmtAONJzKYT30CCvzJPst3WakiHdyXGnwa6tKqEA/QX5L6jjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1cCX4RWqzr2H; Wed, 19 Apr 2023 10:16: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 33JAGuQI081579; Wed, 19 Apr 2023 10:16:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JAGuR9081578; Wed, 19 Apr 2023 10:16:56 GMT (envelope-from git) Date: Wed, 19 Apr 2023 10:16:56 GMT Message-Id: <202304191016.33JAGuR9081578@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: 373b95976bce - main - netstat: document that PCB information can't be read from corefiles List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 373b95976bcefe2c4b582d6707efc65bae23ea44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=373b95976bcefe2c4b582d6707efc65bae23ea44 commit 373b95976bcefe2c4b582d6707efc65bae23ea44 Author: Michael Tuexen AuthorDate: 2023-04-19 10:15:35 +0000 Commit: Michael Tuexen CommitDate: 2023-04-19 10:15:35 +0000 netstat: document that PCB information can't be read from corefiles Reviewed by: glebius, cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D39610 --- usr.bin/netstat/netstat.1 | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index c57e00d11648..b215a792f333 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 February 18, 2023 +.Dd April 19, 2023 .Dt NETSTAT 1 .Os .Sh NAME @@ -41,8 +41,6 @@ .Op Fl -libxo .Op Fl 46AaCLnPRSTWx .Op Fl f Ar protocol_family | Fl p Ar protocol -.Op Fl M Ar core -.Op Fl N Ar system .It Nm Fl i | I Ar interface .Op Fl -libxo .Op Fl 46abdhnW @@ -113,8 +111,6 @@ depending on the options for the information presented. .Nm .Op Fl 46AaCLnRSTWx .Op Fl f Ar protocol_family | Fl p Ar protocol -.Op Fl M Ar core -.Op Fl N Ar system .Ek .Xc Display a list of active sockets @@ -242,14 +238,6 @@ Filter by .Ar protocol . See .Sx GENERAL OPTIONS . -.It Fl M -Use an alternative core. -See -.Sx GENERAL OPTIONS . -.It Fl N -Use an alternative kernel image. -See -.Sx GENERAL OPTIONS . .El .It Xo .Bk -words From nobody Wed Apr 19 11:09: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 4Q1dN55fr1z45Kgr; Wed, 19 Apr 2023 11:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1dN54qKJz3K7j; Wed, 19 Apr 2023 11:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681902565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHOdbofQmQv8Dcz6yqd0cUTiIBmDkUv+z9F6gGGgwgE=; b=ffOuStu8On09loHHm6pF3U9g3xkepsLdFjtLZ1oFA4A/MP3X9oadv6lNIpduK3sUnuai87 +Xl2hPH/5XDBNFOARVZAsAyCXoNzHsLYVlyiADdom7hZQBJEUN3HuFOX/UgoS+FT7mpHWr pb4V9XCXUtegFiipEHshH0tLoutCPQQP1DT+2wVcCOfDeMzdGU57saieEtAd+2nNJdd2eN +XDNSVz/BEn2q+DWT5SlJqKRG9joKbQo/L7HkHS6Q0ZixyRHDdESoG8U4fwElxunoGoZvA GDYoSdFRlWJoCGG/GjgOfNP5V5DoqsnbDxNBBegmmNN79zuaMFcvqY7ERYqLBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681902565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHOdbofQmQv8Dcz6yqd0cUTiIBmDkUv+z9F6gGGgwgE=; b=by3FVmbOY7xtDuQvI1KPWX4bsZHX9inpJ6syBc3CGpahLk8TQYSkyHSksr3VqMSAMeCPaj L6VsKzmxsbH4oZMyuwxPW9roPieUfTGSgQ+a1Yj4aDA18bpEh8Amn5GkW8WM7idQGqhv4w fPFiTfIniL2rtUwwzv3XRtuuHnYzDRzwJxfaNwkZBPGhktdtt1OSkEUqVdz+BOG/6wmky9 MhTw1f9/dTcbv7Ze0b9o598RU7r/UhB4Qum9J64R7tBrmf3nYGWF19rJojppzhybeoRETr va6+noKX2SR7ayErC3N5743KzPsV/X1uEEcTvcbDeZVMilyyRMXSm9lLB6dhTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681902565; a=rsa-sha256; cv=none; b=ak5oIva00HX9b0N8ZJp7Q6RHXXPg06Bb2PRmdG+lCEVAXe/4I03SLO/LiiWzB3Y9cMVyyu 4jU1TeU10nbsOKnBNi2aH9eD2XxWBBQny35OZsj3KFvfusCJJIo6oa6fSwHSQxDdKUN/XO OHUF0YKH7S9QSDDxgdEUoGWhvgnLLgqpR61Pg3IpWSwBNLQioUkZ62jfPzbPsindVtsLP1 dxz0VC3ADqxkCD06F0QoS76A1JCwJdcciZ/mlJ3sTHzRoBoojFmVrJC90aPecvkb+iuLUH bfPWTG7lqOXYjbQa9qk8JTU2WttD6yrNZKhx7wmsETgw6romGOa5Cz03MkEc2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1dN53mLCzrZt; Wed, 19 Apr 2023 11:09: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 33JB9PgB064690; Wed, 19 Apr 2023 11:09:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JB9PBD064689; Wed, 19 Apr 2023 11:09:25 GMT (envelope-from git) Date: Wed, 19 Apr 2023 11:09:25 GMT Message-Id: <202304191109.33JB9PBD064689@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: 960985a209f2 - main - tcp: bbr.c is non-capable of doing ECN and sets an INP flag to fend off ECN however our syncache is not aware of that 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 960985a209f28c3de776003be18c8238e9378d31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=960985a209f28c3de776003be18c8238e9378d31 commit 960985a209f28c3de776003be18c8238e9378d31 Author: Randall Stewart AuthorDate: 2023-04-18 16:21:56 +0000 Commit: Randall Stewart CommitDate: 2023-04-18 16:21:56 +0000 tcp: bbr.c is non-capable of doing ECN and sets an INP flag to fend off ECN however our syncache is not aware of that flag. We need to make the syncache aware of the flag and not do ECN if its set. Note that this is not 100% full proof but the best we can do (i.e. its still possible that you can get in a situation where the peer try's to do ecn). Reviewed by: tuexen, glebius, rscheff Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D39672 --- sys/netinet/tcp_syncache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 96f57b9e0d95..5f4bae92974e 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1724,7 +1724,7 @@ skip_alloc: if (ltflags & TF_NOOPT) sc->sc_flags |= SCF_NOOPT; /* ECN Handshake */ - if (V_tcp_do_ecn) + if (V_tcp_do_ecn && (inp->inp_flags2 & INP_CANNOT_DO_ECN) == 0) sc->sc_flags |= tcp_ecn_syncache_add(tcp_get_flags(th), iptos); if (V_tcp_syncookies) From nobody Wed Apr 19 11:58: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 4Q1fSv349Bz45NST; Wed, 19 Apr 2023 11:58: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 4Q1fSv2dfXz3qdK; Wed, 19 Apr 2023 11:58:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681905519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ehMJSe4TSkCL9iHhMJXXVXADwbzLlNXx5VEPZi4YCc8=; b=PkPsAOM3n0VWazSjz7eQERLDxKodS3KqRYypKrsilMxdNFXVMPfdhyfZRLmSg3GHVFgX8e Oi6Xl7Ok18gbvLaR37HOhVB/J8+6MkdqbHdnAm1ByIEEZicWBiN5kquMObNFJh1K9CfQaW HjJJYq9MOsx0ojbWRgTpekWixXRW1mHFtcOwV0WPzcHM3SKpJBwOzRJa7oIv83jBd4FWey HJdUrYt6owIgd5g14vvHkQXXRG6B6NLFCE/8G+IFvY3EBWlYe23lq15z1Dvcorxm07OIl9 87dOiVDBtMTizLFpk1Rf7LaZOVHyDadzNNdmudmi5Cku9THpEXJ8KRXh7/lcWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681905519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ehMJSe4TSkCL9iHhMJXXVXADwbzLlNXx5VEPZi4YCc8=; b=UQG9j7Y+riP7nW/fGNaI7Xk5dq/wXNBmwFcC4uSGSGuUyDAnjuISZCbOQBibpvmaOmFIUl eiYZcuwPZOHDHENqyCN8Cnwx3bGPeilByvIFFy2sGSxqBFn08ioP+YsDSl8hIChtlm02nU 3CvjQeSWrM65JD8NB2TGQwbKPIF7JfUUr+OA6MibkAA5F/P72m7ZCF3POcM+Woc5pbYJlY G+7BKxIOKuODMnl0NMUKiuM7v+DzwYzn1x9q8a8ThYn9BgPLfL0BF/PDY/6+k74bPlAepp 78t5NAMcJElDKPXTXqHg+CK4h1ryJXBX6vuJASZy+XG4T2qjaqFhZoQ4CtkBiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681905519; a=rsa-sha256; cv=none; b=uquzYhRZFtv+wX17VPLgeuUTiiq6eIndohSKiedR8noqYFFfZCLAwalE2zihCO59I38ySb iKsrhuEZk4sFrN1wnhmaYi2hLcRZrRxfjKWVbGMkM50mvrvs8UdA3aKXUs9G/xEydyu9Kx izXE6NL6rv3Lrih3jykI+cR3YF3VNq7CdNVgM0E5EQhRj/1ltOCvwKFgxqe6vGWEVdZL3c e2ZUNx7cjm+vdF5gHnySym8SLHhw1R/p3DgMMF7xoCAtp1ylbXnq2Pn0DUzITkdpnRICgZ uc6d5RVHnwU56KFGc5nBTR4EfEgvsQlZdH581XjvDNb/NRb7kCV3e+uMmVqtYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1fSv1Rl0ztDN; Wed, 19 Apr 2023 11:58: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 33JBwdcA045744; Wed, 19 Apr 2023 11:58:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JBwdw2045743; Wed, 19 Apr 2023 11:58:39 GMT (envelope-from git) Date: Wed, 19 Apr 2023 11:58:39 GMT Message-Id: <202304191158.33JBwdw2045743@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: 4fee5114c374 - main - tzsetup(8): update paths to zone tab and tzdata source List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 4fee5114c3749f2b12404b89e616d4cb69a01c92 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=4fee5114c3749f2b12404b89e616d4cb69a01c92 commit 4fee5114c3749f2b12404b89e616d4cb69a01c92 Author: Yuri Pankov AuthorDate: 2023-04-19 11:56:58 +0000 Commit: Yuri Pankov CommitDate: 2023-04-19 11:56:58 +0000 tzsetup(8): update paths to zone tab and tzdata source tzsetup now uses zone1970.tab and zoneinfo source is located in contrib/tzdata, update the man page accordingly. While here, drop obsolete Tn macros and insert vertical breaks (mostly before Dl in examples) to improve readability. Reviewed by: pauamma_gundo.com (manpages) Differential Revision: https://reviews.freebsd.org/D39643 --- usr.sbin/tzsetup/tzsetup.8 | 50 ++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/usr.sbin/tzsetup/tzsetup.8 b/usr.sbin/tzsetup/tzsetup.8 index 6ac5749e0aa4..62ac88d4fdc2 100644 --- a/usr.sbin/tzsetup/tzsetup.8 +++ b/usr.sbin/tzsetup/tzsetup.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2009 +.Dd April 18, 2023 .Dt TZSETUP 8 .Os .Sh NAME @@ -46,8 +46,7 @@ default zone. The .Nm utility also determines whether any adjustment is necessary for systems where -the hardware clock does not keep -.Tn UTC . +the hardware clock does not keep UTC. .Pp The following options are available: .Bl -tag -offset indent -width Fl @@ -61,8 +60,7 @@ Reinstall the zoneinfo file installed last time. The name is obtained from .Pa /var/db/zoneinfo . .It Fl s -Skip the initial question about adjusting the clock if not set to -.Tn UTC . +Skip the initial question about adjusting the clock if not set to UTC. .El .Pp It is possible to short-circuit the menu system by specifying the @@ -74,13 +72,9 @@ on the command line; this is intended mainly for pre-configured installation scripts or people who know which zoneinfo they want to install. .Sh TIMEZONE DATABASE The contents of the timezone database are indexed by -.Pa /usr/share/zoneinfo/zone.tab . -This file lists, for each timezone data file, the -.Tn ISO -3166 territory code, approximate geographical coordinates -(in -.Tn ISO -6709 format), +.Pa /usr/share/zoneinfo/zone1970.tab . +This file lists, for each timezone data file, the ISO 3166 territory code, +approximate geographical coordinates (in ISO 6709 format), and location within the territory. .Pp The maintainers of the database maintain the following policies: @@ -91,31 +85,29 @@ At least one zone for every country or inhabited geographical territory. One zone for every distinct, documented timezone history since the beginning of the .Ux -epoch (January 1, 1970, -.Tn GMT ) . +epoch (January 1, 1970, GMT). .It Each zone is named for the most populous city therein. (Where possible, the database includes pre-1970 history for its city.) .El +.Pp The source code to the database -.Pq Pa /usr/src/share/zoneinfo/[a-z]* +.Pq Pa /usr/src/contrib/tzdata/[a-z]* contains many additional comments and documentation references for the historically minded. .Sh FILES -.Bl -tag -width ".Pa /usr/share/zoneinfo/zone.tab" -compact +.Bl -tag -width ".Pa /usr/share/zoneinfo/zone1970.tab" -compact .It Pa /etc/localtime current time zone file .It Pa /etc/wall_cmos_clock see .Xr adjkerntz 8 .It Pa /usr/share/misc/iso3166 -mapping of -.Tn ISO -3166 territory codes to names +mapping of ISO 3166 territory codes to names .It Pa /usr/share/zoneinfo directory for zoneinfo files -.It Pa /usr/share/zoneinfo/zone.tab +.It Pa /usr/share/zoneinfo/zone1970.tab mapping of timezone file to country and location .It Pa /var/db/zoneinfo saved name of the timezone file installed last @@ -123,21 +115,24 @@ saved name of the timezone file installed last .Sh EXAMPLES Normal usage, to select the right zoneinfo file via the dialog-based user interface: -.Dl tzsetup +.Pp +.Dl # tzsetup .Pp Install the file .Pa /usr/share/zoneinfo/Australia/Sydney : -.Dl "tzsetup /usr/share/zoneinfo/Australia/Sydney" .Pp -Install the zoneinfo file for Australia/Sydney, assumed to be located -in +.Dl "# tzsetup /usr/share/zoneinfo/Australia/Sydney" +.Pp +Install the zoneinfo file for Australia/Sydney, assumed to be located in .Pa /usr/share/zoneinfo : -.Dl "tzsetup Australia/Sydney" +.Pp +.Dl "# tzsetup Australia/Sydney" .Pp After a reinstall of the zoneinfo files, you can reinstall the latest installed zoneinfo file (as specified in .Pa /var/db/zoneinfo ) : -.Dl "tzsetup -r" +.Pp +.Dl "# tzsetup -r" .Sh SEE ALSO .Xr date 1 , .Xr adjtime 2 , @@ -159,8 +154,7 @@ Programs which are already running when creates or updates .Pa /etc/localtime will not reflect the updated timezone. -When the system is first configured for a -.Pf non- Tn UTC +When the system is first configured for a non-UTC hardware clock, it is necessary to run .Xr adjkerntz 8 (which normally happens as a part of system startup) in order to update From nobody Wed Apr 19 12:06: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 4Q1fdt3QPdz45NV1; Wed, 19 Apr 2023 12:06: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 4Q1fdt2wzNz3xDt; Wed, 19 Apr 2023 12:06:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681905986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AQiDGYqaknSMW2N4yLaM071GxdLVI+v4lD7Kpy8Qq60=; b=bmS0ulow/XZV/Mg5SBcTIxTusU93ZEjTlIlvmf337v6wpvyQGwjupvjx96N72pASZxLrFx Vv0OCge1JUieCnU/8hXcxhxKoySgS7AJb30ZEh7vbJQ9J663vIQGLKgVTgn0ChInxAXQsh I2c3aMZAqqEdLGfxAZ1lud2P7jcybl6d9k03F67k8TSqKoPFuHRAkxnH7brkxIpKLXb9Di eHtaFb10nXS3ALargMvzE2CkJUwGEzzGJGNvU2+xmdg75wQnEtIeQcjlzj6GnGva4xPPt0 8L/CFMZAAbHEMWvdcVu9dPo612/tWQWRzNv4pZKcu++Jx7wMR/99RmAKAG1Sjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681905986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AQiDGYqaknSMW2N4yLaM071GxdLVI+v4lD7Kpy8Qq60=; b=bwwWHGhT+EYOh4txLdSNuDl76ML9ZmT0XniKM/XYkRYCO4ZKeH/E3WEmrzJaT31n+WYWxH Tgd1IRB3m07KIqSrbaPStDQvTpSTZSSXQmdJEmVhlYXALzE08PMz1HxZBMUM7hMSAh3MSl hK1g2zsJl+HcLmz3rE81rzRiOCnzJIiVnSdMUX7jSH8tLcBh5ce7IyKqr+sQgp4XocPz7g 7DKWkiWjyPC9nVbysFyj9E7LT8/M61ISTkWvM3ASRcde+u3ESSG8rJ52tYRwNFJZ8GdTtx XWhV0QweTPbA6SLzZiaDDIlbCESRt4TlTIP6aXQMxd26nsvEBS+FceVllvdM9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681905986; a=rsa-sha256; cv=none; b=qa1YOmFi4suv/fvvv5p7icAnCekWGFFyWaZlJMmsGYsJA1wN9hzPiUJTM44Y5ivU9gp4Q+ Q+HANG5leLTTypKY471PLGLz9wf4lNHL8AKGScTnSclrYw9sfN6lRd0/suBjo4GCb3bbOS DK31IA7fP3PTP62hjWJIUw4KQn2WJV++lIn55RnWRUfjflQOSFSzDtZgJLVE6/qEZNmGVt Wz2dPw91LA823OpDpL63XnLq+C/JPFGkGd15WEv3knrUiQXe3DhWIZOpUvL36uibjGumt/ HH0kEkJ76bHgfc/7j98NyIQvse0XQJI2Cp35BlfV+st4NkgH6WkUDtyk8IU36A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1fdt1xkhztQs; Wed, 19 Apr 2023 12:06: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 33JC6QDP062381; Wed, 19 Apr 2023 12:06:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JC6Qcp062380; Wed, 19 Apr 2023 12:06:26 GMT (envelope-from git) Date: Wed, 19 Apr 2023 12:06:26 GMT Message-Id: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8dcf3a82c54cb216df3213a013047907636a01da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=8dcf3a82c54cb216df3213a013047907636a01da commit 8dcf3a82c54cb216df3213a013047907636a01da Author: Hans Petter Selasky AuthorDate: 2022-09-08 10:16:43 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-19 12:04:22 +0000 libc: Implement bsort(3) a bitonic type of sorting algorithm. The bsort(3) algorithm works by swapping objects, similarly to qsort(3), and does not require any significant amount of additional memory. The bsort(3) algorithm doesn't suffer from the processing time issues known the plague the qsort(3) family of algorithms, and is bounded by a complexity of O(log2(N) * log2(N) * N), where N is the number of elements in the sorting array. The additional complexity compared to mergesort(3) is a fair tradeoff in situations where no memory may be allocated. The bsort(3) APIs are identical to those of qsort(3), allowing for easy drop-in and testing. The design of the bsort(3) algorithm allows for future parallell CPU execution when sorting arrays. The current version of the bsort(3) algorithm is single threaded. This is possible because fixed areas of the sorting data is compared at a time, and can easily be divided among different CPU's to sort large arrays faster. Reviewed by: gbe@, delphij@, pauamma_gundo.com (manpages) Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D36493 --- include/stdlib.h | 13 +++ lib/libc/stdlib/Makefile.inc | 4 +- lib/libc/stdlib/Symbol.map | 4 + lib/libc/stdlib/bsort.3 | 203 ++++++++++++++++++++++++++++++++ lib/libc/stdlib/bsort.c | 267 +++++++++++++++++++++++++++++++++++++++++++ lib/libc/stdlib/bsort_r.c | 25 ++++ lib/libc/stdlib/bsort_s.c | 5 + 7 files changed, 520 insertions(+), 1 deletion(-) diff --git a/include/stdlib.h b/include/stdlib.h index 730223e7fd77..857092b9053e 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -107,6 +107,10 @@ void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); int mblen(const char *, size_t); size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); +#if __BSD_VISIBLE +void bsort(void *, size_t, size_t, + int (* _Nonnull)(const void *, const void *)); +#endif void qsort(void *, size_t, size_t, int (* _Nonnull)(const void *, const void *)); int rand(void); @@ -300,6 +304,8 @@ int heapsort(void *, size_t, size_t, #ifdef __BLOCKS__ int heapsort_b(void *, size_t, size_t, int (^ _Nonnull)(const void *, const void *)); +void bsort_b(void *, size_t, size_t, + int (^ _Nonnull)(const void *, const void *)); void qsort_b(void *, size_t, size_t, int (^ _Nonnull)(const void *, const void *)); #endif @@ -313,6 +319,8 @@ int mkostemps(char *, int, int); int mkostempsat(int, char *, int, int); void qsort_r(void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); +void bsort_r(void *, size_t, size_t, + int (*)(const void *, const void *, void *), void *); int radixsort(const unsigned char **, int, const unsigned char *, unsigned); void *reallocarray(void *, size_t, size_t) __result_use_check @@ -397,6 +405,11 @@ errno_t qsort_s(void *, rsize_t, rsize_t, int (*)(const void *, const void *, void *), void *); #endif /* __EXT1_VISIBLE */ +#if __BSD_VISIBLE +errno_t bsort_s(void *, rsize_t, rsize_t, + int (*)(const void *, const void *, void *), void *); +#endif /* __BSD_VISIBLE */ + __END_DECLS __NULLABILITY_PRAGMA_POP diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index 964e7ce30594..7503a82a6045 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -11,6 +11,7 @@ MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ hsearch_r.c imaxabs.c imaxdiv.c \ insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \ + bsort.c bsort_r.c bsort_s.c \ merge.c mergesort_b.c ptsname.c qsort.c qsort_r.c qsort_r_compat.c \ qsort_s.c quick_exit.c radixsort.c rand.c \ random.c reallocarray.c reallocf.c realpath.c remque.c \ @@ -36,7 +37,7 @@ MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 \ atoi.3 atol.3 at_quick_exit.3 bsearch.3 \ div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \ hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \ - lsearch.3 memory.3 ptsname.3 qsort.3 \ + lsearch.3 memory.3 ptsname.3 bsort.3 qsort.3 \ quick_exit.3 \ radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 realpath.3 \ set_constraint_handler_s.3 \ @@ -54,6 +55,7 @@ MLINKS+=hcreate.3 hcreate_r.3 hcreate.3 hdestroy_r.3 hcreate.3 hsearch_r.3 MLINKS+=insque.3 remque.3 MLINKS+=lsearch.3 lfind.3 MLINKS+=ptsname.3 grantpt.3 ptsname.3 ptsname_r.3 ptsname.3 unlockpt.3 +MLINKS+=bsort.3 bsort_r.3 bsort.3 bsort_b.3 bsort.3 bsort_s.3 MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 qsort.3 qsort_r.3 \ qsort.3 qsort_s.3 MLINKS+=rand.3 rand_r.3 rand.3 srand.3 diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map index a105f781734d..50583a30ad3d 100644 --- a/lib/libc/stdlib/Symbol.map +++ b/lib/libc/stdlib/Symbol.map @@ -126,6 +126,10 @@ FBSD_1.6 { }; FBSD_1.7 { + bsort; + bsort_b; + bsort_r; + bsort_s; clearenv; qsort_r; secure_getenv; diff --git a/lib/libc/stdlib/bsort.3 b/lib/libc/stdlib/bsort.3 new file mode 100644 index 000000000000..9cc2edc04dd2 --- /dev/null +++ b/lib/libc/stdlib/bsort.3 @@ -0,0 +1,203 @@ +.\" +.\" Copyright (c) 2022 Hans Petter Selasky +.\" +.\" 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$ +.\" +.Dd April 19, 2023 +.Dt BSORT 3 +.Os +.Sh NAME +.Nm bsort , +.Nm bsort_b , +.Nm bsort_r +and +.Nm bsort_s +.Nd sort functions +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In stdlib.h +.Ft void +.Fo bsort +.Fa "void *base" +.Fa "size_t nmemb" +.Fa "size_t size" +.Fa "int \*[lp]*compar\*[rp]\*[lp]const void *, const void *\*[rp]" +.Fc +.Ft void +.Fo bsort_b +.Fa "void *base" +.Fa "size_t nmemb" +.Fa "size_t size" +.Fa "bsort_block compar" +.Fc +.Ft void +.Fo bsort_r +.Fa "void *base" +.Fa "size_t nmemb" +.Fa "size_t size" +.Fa "int \*[lp]*compar\*[rp]\*[lp]const void *, const void *, void *\*[rp]" +.Fa "void *thunk" +.Fc +.Fd #define __STDC_WANT_LIB_EXT1__ 1 +.Ft errno_t +.Fo bsort_s +.Fa "void *base" +.Fa "size_t nmemb" +.Fa "size_t size" +.Fa "int \*[lp]*compar\*[rp]\*[lp]void *, const void *, const void *\*[rp]" +.Fa "void *thunk" +.Fc +.Sh DESCRIPTION +The +.Fn bsort +function is based on so-called in-place bitonic sorting. +Bitonic sorting is suitable for parallel execution, +because the elements in the array to sort are compared in a predefined +sequence not depending on the data. +The complexity of the +.Fn bsort +algorithm is bounded by O(log2(N) * log2(N) * N), where N is the +number of elements in the sorting array. +The +.Fn bsort +function provides a reliable in-place sorting algorithm, +with little memory usage and without the excess processing usage +caveats of other algorithms like +.Xr qsort 3 . +.Pp +The comparison function must return an integer less than, equal to, or +greater than zero if the first argument is considered to be respectively +less than, equal to, or greater than the second. +.Pp +The +.Fn bsort_r +function behaves identically to +.Fn bsort , +except it takes an additional argument, +.Fa thunk , +which is passed unchanged as the last argument to the function +.Fa compar +points to. +This allows the comparison function to access additional +data without using global variables, and thus +.Fn bsort_r +is suitable for use in functions which must be reentrant. +The +.Fn bsort_b +function behaves identically to +.Fn bsort , +except it takes a block, rather than a function pointer. +.Pp +The algorithm implemented by +.Fn bsort , +.Fn bsort_b , +.Fn bsort_r +and +.Fn bsort_s +is +.Em not +stable, that is, if two members compare as equal, their order in +the sorted array is undefined. +.Pp +The +.Fn bsort_s +function behaves the same as +.Fn bsort_r +except if +.Fa size +is greater than +.Dv RSIZE_MAX , +or +.Fa nmemb +is not zero and +.Fa compar +is +.Dv NULL +or +.Fa size +is zero, then the runtime-constraint handler is called, and +.Fn bsort_s +returns an error. +Note the handler is called before +.Fn bsort_s +returns the error, and the handler function might not return. +.Sh RETURN VALUES +The +.Fn bsort , +.Fn bsort_b +and +.Fn bsort_r +functions +return no value. +The +.Fn bsort_s +function returns zero on success, non-zero on error. +.Sh EXAMPLES +A sample program sorting an array of +.Vt int +values in place using +.Fn bsort , +and then prints the sorted array to standard output is: +.Bd -literal +#include +#include + +/* + * Custom comparison function comparing 'int' values through pointers + * passed by bsort(3). + */ +static int +int_compare(const void *p1, const void *p2) +{ + int left = *(const int *)p1; + int right = *(const int *)p2; + + return ((left > right) - (left < right)); +} + +/* + * Sort an array of 'int' values and print it to standard output. + */ +int +main(void) +{ + int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 }; + size_t array_size = sizeof(int_array) / sizeof(int_array[0]); + size_t k; + + bsort(&int_array, array_size, sizeof(int_array[0]), int_compare); + for (k = 0; k < array_size; k++) + printf(" %d", int_array[k]); + puts(""); + return (EXIT_SUCCESS); +} +.Ed +.Sh SEE ALSO +.Xr sort 1 , +.Xr qsort 3 +and +.Xr radixsort 3 +.Sh HISTORY +This implementation was created by Hans Petter Selasky. diff --git a/lib/libc/stdlib/bsort.c b/lib/libc/stdlib/bsort.c new file mode 100644 index 000000000000..0c470654cfe7 --- /dev/null +++ b/lib/libc/stdlib/bsort.c @@ -0,0 +1,267 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2016-2023 Hans Petter Selasky + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include +#include +#include +#include +#include + +#include "libc_private.h" + +/* + * A variant of bitonic sorting + * + * Worst case sorting complexity: log2(N) * log2(N) * N + * Additional memory and stack usage: none + */ + +#if defined(I_AM_BSORT_R) +typedef int cmp_t (const void *, const void *, void *); +#define ARG_PROTO void *arg, +#define ARG_NAME arg , +#define CMP(fn,arg,a,b) (fn)(a, b, arg) +#elif defined(I_AM_BSORT_S) +typedef int cmp_t (const void *, const void *, void *); +#define ARG_PROTO void *arg, +#define ARG_NAME arg , +#define CMP(fn,arg,a,b) (fn)(a, b, arg) +#else +typedef int cmp_t (const void *, const void *); +#define ARG_PROTO +#define ARG_NAME +#define CMP(fn,arg,a,b) (fn)(a, b) +#endif + +static inline void +bsort_swap(char *pa, char *pb, const size_t es) +{ + if (__builtin_constant_p(es) && es == 8) { + uint64_t tmp; + + /* swap */ + tmp = *(uint64_t *)pa; + *(uint64_t *)pa = *(uint64_t *)pb; + *(uint64_t *)pb = tmp; + } else if (__builtin_constant_p(es) && es == 4) { + uint32_t tmp; + + /* swap */ + tmp = *(uint32_t *)pa; + *(uint32_t *)pa = *(uint32_t *)pb; + *(uint32_t *)pb = tmp; + } else if (__builtin_constant_p(es) && es == 2) { + uint16_t tmp; + + /* swap */ + tmp = *(uint16_t *)pa; + *(uint16_t *)pa = *(uint16_t *)pb; + *(uint16_t *)pb = tmp; + } else if (__builtin_constant_p(es) && es == 1) { + uint8_t tmp; + + /* swap */ + tmp = *(uint8_t *)pa; + *(uint8_t *)pa = *(uint8_t *)pb; + *(uint8_t *)pb = tmp; + } else if (es <= 256) { + char tmp[es] __aligned(8); + + /* swap using fast memcpy() */ + memcpy(tmp, pa, es); + memcpy(pa, pb, es); + memcpy(pb, tmp, es); + } else { + /* swap byte-by-byte to avoid huge stack usage */ + for (size_t x = 0; x != es; x++) { + char tmp; + + /* swap */ + tmp = pa[x]; + pa[x] = pb[x]; + pb[x] = tmp; + } + } +} + +/* The following function returns true when the array is completely sorted. */ +static inline bool +bsort_complete(void *ptr, const size_t lim, const size_t es, ARG_PROTO cmp_t *fn) +{ + for (size_t x = 1; x != lim; x++) { + if (CMP(fn, arg, ptr, (char *)ptr + es) > 0) + return (false); + ptr = (char *)ptr + es; + } + return (true); +} + +static inline void +bsort_xform(char *ptr, const size_t n, size_t lim, const size_t es, ARG_PROTO cmp_t *fn) +{ +#define BSORT_TABLE_MAX (1UL << 4) + size_t x, y, z; + unsigned t, u, v; + size_t p[BSORT_TABLE_MAX]; + char *q[BSORT_TABLE_MAX]; + + lim *= es; + x = n; + for (;;) { + /* optimise */ + if (x >= BSORT_TABLE_MAX) + v = BSORT_TABLE_MAX; + else if (x >= 2) + v = x; + else + break; + + /* divide down */ + x /= v; + + /* generate ramp table */ + for (t = 0; t != v; t += 2) { + p[t] = (t * x); + p[t + 1] = (t + 2) * x - 1; + } + + /* bitonic sort */ + for (y = 0; y != n; y += (v * x)) { + for (z = 0; z != x; z++) { + const size_t w = y + z; + + /* p[0] is always zero and is omitted */ + q[0] = ptr + w * es; + + /* insertion sort */ + for (t = 1; t != v; t++) { + q[t] = ptr + (w ^ p[t]) * es; + + /* check for array lengths not power of two */ + if ((size_t)(q[t] - ptr) >= lim) + break; + for (u = t; u != 0 && CMP(fn, arg, q[u - 1], q[u]) > 0; u--) + bsort_swap(q[u - 1], q[u], es); + } + } + } + } +} + +static void +local_bsort(void *ptr, const size_t n, const size_t es, ARG_PROTO cmp_t *fn) +{ + size_t max; + + /* if there are less than 2 elements, then sorting is not needed */ + if (__predict_false(n < 2)) + return; + + /* compute power of two, into max */ + if (sizeof(size_t) <= sizeof(unsigned long)) + max = 1UL << (8 * sizeof(unsigned long) - __builtin_clzl(n) - 1); + else + max = 1ULL << (8 * sizeof(unsigned long long) - __builtin_clzll(n) - 1); + + /* round up power of two, if needed */ + if (!powerof2(n)) + max <<= 1; + + /* optimize common sort scenarios */ + switch (es) { + case 8: + while (!bsort_complete(ptr, n, 8, ARG_NAME fn)) + bsort_xform(ptr, max, n, 8, ARG_NAME fn); + break; + case 4: + while (!bsort_complete(ptr, n, 4, ARG_NAME fn)) + bsort_xform(ptr, max, n, 4, ARG_NAME fn); + break; + case 2: + while (!bsort_complete(ptr, n, 2, ARG_NAME fn)) + bsort_xform(ptr, max, n, 2, ARG_NAME fn); + break; + case 1: + while (!bsort_complete(ptr, n, 1, ARG_NAME fn)) + bsort_xform(ptr, max, n, 1, ARG_NAME fn); + break; + case 0: + /* undefined behaviour */ + break; + default: + while (!bsort_complete(ptr, n, es, ARG_NAME fn)) + bsort_xform(ptr, max, n, es, ARG_NAME fn); + break; + } +} + +#if defined(I_AM_BSORT_R) +void +bsort_r(void *a, size_t n, size_t es, cmp_t *cmp, void *arg) +{ + local_bsort(a, n, es, cmp, arg); +} +#elif defined(I_AM_BSORT_S) +errno_t +bsort_s(void *a, rsize_t n, rsize_t es, cmp_t *cmp, void *arg) +{ + if (n > RSIZE_MAX) { + __throw_constraint_handler_s("bsort_s : n > RSIZE_MAX", EINVAL); + return (EINVAL); + } else if (es > RSIZE_MAX) { + __throw_constraint_handler_s("bsort_s : es > RSIZE_MAX", + EINVAL); + return (EINVAL); + } else if (n != 0) { + if (a == NULL) { + __throw_constraint_handler_s("bsort_s : a == NULL", + EINVAL); + return (EINVAL); + } else if (cmp == NULL) { + __throw_constraint_handler_s("bsort_s : cmp == NULL", + EINVAL); + return (EINVAL); + } else if (es <= 0) { + __throw_constraint_handler_s("bsort_s : es <= 0", + EINVAL); + return (EINVAL); + } + } + + local_bsort(a, n, es, cmp, arg); + return (0); +} +#else +void +bsort(void *a, size_t n, size_t es, cmp_t *cmp) +{ + local_bsort(a, n, es, cmp); +} +#endif diff --git a/lib/libc/stdlib/bsort_r.c b/lib/libc/stdlib/bsort_r.c new file mode 100644 index 000000000000..762f3c5aa1ec --- /dev/null +++ b/lib/libc/stdlib/bsort_r.c @@ -0,0 +1,25 @@ +/* + * This file is in the public domain. + */ +#include "block_abi.h" +#define I_AM_BSORT_R +#include "bsort.c" + +typedef DECLARE_BLOCK(int, bsort_block, const void *, const void *); + +static int +bsort_b_compare(const void *pa, const void *pb, void *arg) +{ + bsort_block compar; + int (*cmp)(void *, const void *, const void *); + + compar = arg; + cmp = (void *)compar->invoke; + return (cmp(compar, pa, pb)); +} + +void +bsort_b(void *base, size_t nel, size_t width, bsort_block compar) +{ + bsort_r(base, nel, width, &bsort_b_compare, compar); +} diff --git a/lib/libc/stdlib/bsort_s.c b/lib/libc/stdlib/bsort_s.c new file mode 100644 index 000000000000..57abde76a257 --- /dev/null +++ b/lib/libc/stdlib/bsort_s.c @@ -0,0 +1,5 @@ +/* + * This file is in the public domain. + */ +#define I_AM_BSORT_S +#include "bsort.c" From nobody Wed Apr 19 12: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 4Q1fxv3BBcz45PdY; Wed, 19 Apr 2023 12:20:19 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1fxv1bGyz4KR7; Wed, 19 Apr 2023 12:20:19 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; none Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1823B5C010A; Wed, 19 Apr 2023 08:20:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 19 Apr 2023 08:20:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1681906818; x=1681993218; bh=w6JdW/TdzFH85QQA1Um5sS7U8Euu/LA7SuV RsNGTp2o=; b=His/+bPl3gV6ED8WjKW5w5kaD2Ja1jSNsicOXMTxqtRdYiwTDoE sOyvdhFT251pIeSQL67wduLH6NpjpDdc8ZLf5Bw+SSAyEqZkpnAHXomsoUeGj5be kfudyXrWfw+k3N1vlVS023mIRtlrI5XTWCSgscuhxAs0MzV44Bel+HVL+576MO2x PnTr2g8OnaCBdVXjOTYMz1n3KRkA7Z2luX5Tmm5YYWv5hkbIrOpbhTX5Mrh60TzQ +5RQXBZvMtEGMzAnTeuBuK718vrDQMvI9vkNZrbsTpon5MMiqCVFwsH/thIlQXOx /llA+8DfO+W6f2+mO/8+Kq9Uswmau568WCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1681906818; x= 1681993218; bh=w6JdW/TdzFH85QQA1Um5sS7U8Euu/LA7SuVRsNGTp2o=; b=B H7e44NKmAPvJz4I8WKzSUbNepstW7ZPfZRRc0sOqDGAHovBHTIfsR41oQ5eyBOap kuMZWvScBFM24uX2HYd5WjlzZ3kVmxC07jx2ICAivwVfkHWnPVJqMO2jS+qs036t 0oipyeMKsmcIQOYDYUsa6nUUGo51p/y/Vs1T5PwvzSQGdAVsITBYm6ljw+BxW38X dPLqwuDjPaCj8ww0re/Hlc+KGqYvAB8E0r5NlDEv6vUja1QdJ8lj8ifuquE9xFeW OABEqyKswx62sH+flGYbbYu/wIMAfl3qddPIXW0TNmVuTWYP+lRm1xdYSt2s1Sle sGUUFKHV5RNL9zQPofN7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedttddgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepjghurhhi uceohihurhhisegrvghtvghrnhdrohhrgheqnecuggftrfgrthhtvghrnhepgeehleevue ehhffggfetteffieffhfduteduteeuvdehvdfhffdvtefhffejjedvnecuffhomhgrihhn pehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhephihurhhisegrvghtvghrnhdrohhrgh X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Apr 2023 08:20:16 -0400 (EDT) Message-ID: <614f21af-0de6-2264-265d-2aab212800a9@aetern.org> Date: Wed, 19 Apr 2023 14:20:13 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Hans Petter Selasky , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> From: Yuri In-Reply-To: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q1fxv1bGyz4KR7 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Hans Petter Selasky wrote: > The branch main has been updated by hselasky: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8dcf3a82c54cb216df3213a013047907636a01da > > commit 8dcf3a82c54cb216df3213a013047907636a01da > Author: Hans Petter Selasky > AuthorDate: 2022-09-08 10:16:43 +0000 > Commit: Hans Petter Selasky > CommitDate: 2023-04-19 12:04:22 +0000 > > libc: Implement bsort(3) a bitonic type of sorting algorithm. > > The bsort(3) algorithm works by swapping objects, similarly to qsort(3), > and does not require any significant amount of additional memory. > > The bsort(3) algorithm doesn't suffer from the processing time issues > known the plague the qsort(3) family of algorithms, and is bounded by > a complexity of O(log2(N) * log2(N) * N), where N is the number of > elements in the sorting array. The additional complexity compared to > mergesort(3) is a fair tradeoff in situations where no memory may > be allocated. > > The bsort(3) APIs are identical to those of qsort(3), allowing for > easy drop-in and testing. > > The design of the bsort(3) algorithm allows for future parallell CPU > execution when sorting arrays. The current version of the bsort(3) > algorithm is single threaded. This is possible because fixed areas > of the sorting data is compared at a time, and can easily be divided > among different CPU's to sort large arrays faster. > > Reviewed by: gbe@, delphij@, pauamma_gundo.com (manpages) > Sponsored by: NVIDIA Networking > Differential Revision: https://reviews.freebsd.org/D36493 > --- > include/stdlib.h | 13 +++ > lib/libc/stdlib/Makefile.inc | 4 +- > lib/libc/stdlib/Symbol.map | 4 + > lib/libc/stdlib/bsort.3 | 203 ++++++++++++++++++++++++++++++++ > lib/libc/stdlib/bsort.c | 267 +++++++++++++++++++++++++++++++++++++++++++ > lib/libc/stdlib/bsort_r.c | 25 ++++ > lib/libc/stdlib/bsort_s.c | 5 + > 7 files changed, 520 insertions(+), 1 deletion(-) > > diff --git a/include/stdlib.h b/include/stdlib.h > index 730223e7fd77..857092b9053e 100644 > --- a/include/stdlib.h > +++ b/include/stdlib.h > @@ -107,6 +107,10 @@ void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); > int mblen(const char *, size_t); > size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); > int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); > +#if __BSD_VISIBLE > +void bsort(void *, size_t, size_t, > + int (* _Nonnull)(const void *, const void *)); > +#endif > void qsort(void *, size_t, size_t, > int (* _Nonnull)(const void *, const void *)); > int rand(void); > @@ -300,6 +304,8 @@ int heapsort(void *, size_t, size_t, > #ifdef __BLOCKS__ > int heapsort_b(void *, size_t, size_t, > int (^ _Nonnull)(const void *, const void *)); > +void bsort_b(void *, size_t, size_t, > + int (^ _Nonnull)(const void *, const void *)); > void qsort_b(void *, size_t, size_t, > int (^ _Nonnull)(const void *, const void *)); > #endif > @@ -313,6 +319,8 @@ int mkostemps(char *, int, int); > int mkostempsat(int, char *, int, int); > void qsort_r(void *, size_t, size_t, > int (*)(const void *, const void *, void *), void *); > +void bsort_r(void *, size_t, size_t, > + int (*)(const void *, const void *, void *), void *); > int radixsort(const unsigned char **, int, const unsigned char *, > unsigned); > void *reallocarray(void *, size_t, size_t) __result_use_check > @@ -397,6 +405,11 @@ errno_t qsort_s(void *, rsize_t, rsize_t, > int (*)(const void *, const void *, void *), void *); > #endif /* __EXT1_VISIBLE */ > > +#if __BSD_VISIBLE > +errno_t bsort_s(void *, rsize_t, rsize_t, > + int (*)(const void *, const void *, void *), void *); > +#endif /* __BSD_VISIBLE */ > + > __END_DECLS > __NULLABILITY_PRAGMA_POP > > diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc > index 964e7ce30594..7503a82a6045 100644 > --- a/lib/libc/stdlib/Makefile.inc > +++ b/lib/libc/stdlib/Makefile.inc > @@ -11,6 +11,7 @@ MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ > getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ > hsearch_r.c imaxabs.c imaxdiv.c \ > insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \ > + bsort.c bsort_r.c bsort_s.c \ > merge.c mergesort_b.c ptsname.c qsort.c qsort_r.c qsort_r_compat.c \ > qsort_s.c quick_exit.c radixsort.c rand.c \ > random.c reallocarray.c reallocf.c realpath.c remque.c \ > @@ -36,7 +37,7 @@ MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 \ > atoi.3 atol.3 at_quick_exit.3 bsearch.3 \ > div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \ > hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \ > - lsearch.3 memory.3 ptsname.3 qsort.3 \ > + lsearch.3 memory.3 ptsname.3 bsort.3 qsort.3 \ > quick_exit.3 \ > radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 realpath.3 \ > set_constraint_handler_s.3 \ > @@ -54,6 +55,7 @@ MLINKS+=hcreate.3 hcreate_r.3 hcreate.3 hdestroy_r.3 hcreate.3 hsearch_r.3 > MLINKS+=insque.3 remque.3 > MLINKS+=lsearch.3 lfind.3 > MLINKS+=ptsname.3 grantpt.3 ptsname.3 ptsname_r.3 ptsname.3 unlockpt.3 > +MLINKS+=bsort.3 bsort_r.3 bsort.3 bsort_b.3 bsort.3 bsort_s.3 > MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 qsort.3 qsort_r.3 \ > qsort.3 qsort_s.3 > MLINKS+=rand.3 rand_r.3 rand.3 srand.3 > diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map > index a105f781734d..50583a30ad3d 100644 > --- a/lib/libc/stdlib/Symbol.map > +++ b/lib/libc/stdlib/Symbol.map > @@ -126,6 +126,10 @@ FBSD_1.6 { > }; > > FBSD_1.7 { > + bsort; > + bsort_b; > + bsort_r; > + bsort_s; > clearenv; > qsort_r; > secure_getenv; > diff --git a/lib/libc/stdlib/bsort.3 b/lib/libc/stdlib/bsort.3 > new file mode 100644 > index 000000000000..9cc2edc04dd2 > --- /dev/null > +++ b/lib/libc/stdlib/bsort.3 > @@ -0,0 +1,203 @@ > +.\" > +.\" Copyright (c) 2022 Hans Petter Selasky > +.\" > +.\" 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$ > +.\" > +.Dd April 19, 2023 > +.Dt BSORT 3 > +.Os > +.Sh NAME > +.Nm bsort , > +.Nm bsort_b , > +.Nm bsort_r > +and > +.Nm bsort_s > +.Nd sort functions mandoc: lib/libc/stdlib/bsort.3:34:1: WARNING: bad NAME section content: text mandoc: lib/libc/stdlib/bsort.3:35:2: WARNING: missing comma before name: Nm bsort_s This should be a list of Nm macros, without any additional content: .Sh NAME .Nm bsort , .Nm bsort_b , .Nm bsort_r , .Nm bsort_s > +.Sh LIBRARY > +.Lb libc > +.Sh SYNOPSIS > +.In stdlib.h > +.Ft void > +.Fo bsort > +.Fa "void *base" > +.Fa "size_t nmemb" > +.Fa "size_t size" > +.Fa "int \*[lp]*compar\*[rp]\*[lp]const void *, const void *\*[rp]" > +.Fc > +.Ft void > +.Fo bsort_b > +.Fa "void *base" > +.Fa "size_t nmemb" > +.Fa "size_t size" > +.Fa "bsort_block compar" > +.Fc > +.Ft void > +.Fo bsort_r > +.Fa "void *base" > +.Fa "size_t nmemb" > +.Fa "size_t size" > +.Fa "int \*[lp]*compar\*[rp]\*[lp]const void *, const void *, void *\*[rp]" > +.Fa "void *thunk" > +.Fc > +.Fd #define __STDC_WANT_LIB_EXT1__ 1 > +.Ft errno_t > +.Fo bsort_s > +.Fa "void *base" > +.Fa "size_t nmemb" > +.Fa "size_t size" > +.Fa "int \*[lp]*compar\*[rp]\*[lp]void *, const void *, const void *\*[rp]" > +.Fa "void *thunk" > +.Fc > +.Sh DESCRIPTION > +The > +.Fn bsort > +function is based on so-called in-place bitonic sorting. > +Bitonic sorting is suitable for parallel execution, > +because the elements in the array to sort are compared in a predefined > +sequence not depending on the data. > +The complexity of the > +.Fn bsort > +algorithm is bounded by O(log2(N) * log2(N) * N), where N is the > +number of elements in the sorting array. > +The > +.Fn bsort > +function provides a reliable in-place sorting algorithm, > +with little memory usage and without the excess processing usage > +caveats of other algorithms like > +.Xr qsort 3 . > +.Pp > +The comparison function must return an integer less than, equal to, or > +greater than zero if the first argument is considered to be respectively > +less than, equal to, or greater than the second. > +.Pp > +The > +.Fn bsort_r > +function behaves identically to > +.Fn bsort , > +except it takes an additional argument, > +.Fa thunk , > +which is passed unchanged as the last argument to the function > +.Fa compar > +points to. > +This allows the comparison function to access additional > +data without using global variables, and thus > +.Fn bsort_r > +is suitable for use in functions which must be reentrant. > +The > +.Fn bsort_b > +function behaves identically to > +.Fn bsort , > +except it takes a block, rather than a function pointer. > +.Pp > +The algorithm implemented by > +.Fn bsort , > +.Fn bsort_b , > +.Fn bsort_r > +and > +.Fn bsort_s > +is > +.Em not > +stable, that is, if two members compare as equal, their order in > +the sorted array is undefined. > +.Pp > +The > +.Fn bsort_s > +function behaves the same as > +.Fn bsort_r > +except if > +.Fa size > +is greater than > +.Dv RSIZE_MAX , > +or > +.Fa nmemb > +is not zero and > +.Fa compar > +is > +.Dv NULL > +or > +.Fa size > +is zero, then the runtime-constraint handler is called, and > +.Fn bsort_s > +returns an error. > +Note the handler is called before > +.Fn bsort_s > +returns the error, and the handler function might not return. > +.Sh RETURN VALUES > +The > +.Fn bsort , > +.Fn bsort_b > +and > +.Fn bsort_r > +functions > +return no value. > +The > +.Fn bsort_s > +function returns zero on success, non-zero on error. > +.Sh EXAMPLES > +A sample program sorting an array of > +.Vt int > +values in place using > +.Fn bsort , > +and then prints the sorted array to standard output is: > +.Bd -literal > +#include > +#include > + > +/* > + * Custom comparison function comparing 'int' values through pointers > + * passed by bsort(3). > + */ > +static int > +int_compare(const void *p1, const void *p2) > +{ > + int left = *(const int *)p1; > + int right = *(const int *)p2; > + > + return ((left > right) - (left < right)); > +} > + > +/* > + * Sort an array of 'int' values and print it to standard output. > + */ > +int > +main(void) > +{ > + int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 }; > + size_t array_size = sizeof(int_array) / sizeof(int_array[0]); > + size_t k; > + > + bsort(&int_array, array_size, sizeof(int_array[0]), int_compare); > + for (k = 0; k < array_size; k++) > + printf(" %d", int_array[k]); > + puts(""); > + return (EXIT_SUCCESS); > +} > +.Ed > +.Sh SEE ALSO > +.Xr sort 1 , > +.Xr qsort 3 > +and > +.Xr radixsort 3 Same for SEE ALSO section: .Sh SEE ALSO .Xr sort 1 , .Xr qsort 3 , .Xr radixsort 3 > +.Sh HISTORY > +This implementation was created by Hans Petter Selasky. > diff --git a/lib/libc/stdlib/bsort.c b/lib/libc/stdlib/bsort.c > new file mode 100644 > index 000000000000..0c470654cfe7 > --- /dev/null > +++ b/lib/libc/stdlib/bsort.c > @@ -0,0 +1,267 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2016-2023 Hans Petter Selasky > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > + > +#include "libc_private.h" > + > +/* > + * A variant of bitonic sorting > + * > + * Worst case sorting complexity: log2(N) * log2(N) * N > + * Additional memory and stack usage: none > + */ > + > +#if defined(I_AM_BSORT_R) > +typedef int cmp_t (const void *, const void *, void *); > +#define ARG_PROTO void *arg, > +#define ARG_NAME arg , > +#define CMP(fn,arg,a,b) (fn)(a, b, arg) > +#elif defined(I_AM_BSORT_S) > +typedef int cmp_t (const void *, const void *, void *); > +#define ARG_PROTO void *arg, > +#define ARG_NAME arg , > +#define CMP(fn,arg,a,b) (fn)(a, b, arg) > +#else > +typedef int cmp_t (const void *, const void *); > +#define ARG_PROTO > +#define ARG_NAME > +#define CMP(fn,arg,a,b) (fn)(a, b) > +#endif > + > +static inline void > +bsort_swap(char *pa, char *pb, const size_t es) > +{ > + if (__builtin_constant_p(es) && es == 8) { > + uint64_t tmp; > + > + /* swap */ > + tmp = *(uint64_t *)pa; > + *(uint64_t *)pa = *(uint64_t *)pb; > + *(uint64_t *)pb = tmp; > + } else if (__builtin_constant_p(es) && es == 4) { > + uint32_t tmp; > + > + /* swap */ > + tmp = *(uint32_t *)pa; > + *(uint32_t *)pa = *(uint32_t *)pb; > + *(uint32_t *)pb = tmp; > + } else if (__builtin_constant_p(es) && es == 2) { > + uint16_t tmp; > + > + /* swap */ > + tmp = *(uint16_t *)pa; > + *(uint16_t *)pa = *(uint16_t *)pb; > + *(uint16_t *)pb = tmp; > + } else if (__builtin_constant_p(es) && es == 1) { > + uint8_t tmp; > + > + /* swap */ > + tmp = *(uint8_t *)pa; > + *(uint8_t *)pa = *(uint8_t *)pb; > + *(uint8_t *)pb = tmp; > + } else if (es <= 256) { > + char tmp[es] __aligned(8); > + > + /* swap using fast memcpy() */ > + memcpy(tmp, pa, es); > + memcpy(pa, pb, es); > + memcpy(pb, tmp, es); > + } else { > + /* swap byte-by-byte to avoid huge stack usage */ > + for (size_t x = 0; x != es; x++) { > + char tmp; > + > + /* swap */ > + tmp = pa[x]; > + pa[x] = pb[x]; > + pb[x] = tmp; > + } > + } > +} > + > +/* The following function returns true when the array is completely sorted. */ > +static inline bool > +bsort_complete(void *ptr, const size_t lim, const size_t es, ARG_PROTO cmp_t *fn) > +{ > + for (size_t x = 1; x != lim; x++) { > + if (CMP(fn, arg, ptr, (char *)ptr + es) > 0) > + return (false); > + ptr = (char *)ptr + es; > + } > + return (true); > +} > + > +static inline void > +bsort_xform(char *ptr, const size_t n, size_t lim, const size_t es, ARG_PROTO cmp_t *fn) > +{ > +#define BSORT_TABLE_MAX (1UL << 4) > + size_t x, y, z; > + unsigned t, u, v; > + size_t p[BSORT_TABLE_MAX]; > + char *q[BSORT_TABLE_MAX]; > + > + lim *= es; > + x = n; > + for (;;) { > + /* optimise */ > + if (x >= BSORT_TABLE_MAX) > + v = BSORT_TABLE_MAX; > + else if (x >= 2) > + v = x; > + else > + break; > + > + /* divide down */ > + x /= v; > + > + /* generate ramp table */ > + for (t = 0; t != v; t += 2) { > + p[t] = (t * x); > + p[t + 1] = (t + 2) * x - 1; > + } > + > + /* bitonic sort */ > + for (y = 0; y != n; y += (v * x)) { > + for (z = 0; z != x; z++) { > + const size_t w = y + z; > + > + /* p[0] is always zero and is omitted */ > + q[0] = ptr + w * es; > + > + /* insertion sort */ > + for (t = 1; t != v; t++) { > + q[t] = ptr + (w ^ p[t]) * es; > + > + /* check for array lengths not power of two */ > + if ((size_t)(q[t] - ptr) >= lim) > + break; > + for (u = t; u != 0 && CMP(fn, arg, q[u - 1], q[u]) > 0; u--) > + bsort_swap(q[u - 1], q[u], es); > + } > + } > + } > + } > +} > + > +static void > +local_bsort(void *ptr, const size_t n, const size_t es, ARG_PROTO cmp_t *fn) > +{ > + size_t max; > + > + /* if there are less than 2 elements, then sorting is not needed */ > + if (__predict_false(n < 2)) > + return; > + > + /* compute power of two, into max */ > + if (sizeof(size_t) <= sizeof(unsigned long)) > + max = 1UL << (8 * sizeof(unsigned long) - __builtin_clzl(n) - 1); > + else > + max = 1ULL << (8 * sizeof(unsigned long long) - __builtin_clzll(n) - 1); > + > + /* round up power of two, if needed */ > + if (!powerof2(n)) > + max <<= 1; > + > + /* optimize common sort scenarios */ > + switch (es) { > + case 8: > + while (!bsort_complete(ptr, n, 8, ARG_NAME fn)) > + bsort_xform(ptr, max, n, 8, ARG_NAME fn); > + break; > + case 4: > + while (!bsort_complete(ptr, n, 4, ARG_NAME fn)) > + bsort_xform(ptr, max, n, 4, ARG_NAME fn); > + break; > + case 2: > + while (!bsort_complete(ptr, n, 2, ARG_NAME fn)) > + bsort_xform(ptr, max, n, 2, ARG_NAME fn); > + break; > + case 1: > + while (!bsort_complete(ptr, n, 1, ARG_NAME fn)) > + bsort_xform(ptr, max, n, 1, ARG_NAME fn); > + break; > + case 0: > + /* undefined behaviour */ > + break; > + default: > + while (!bsort_complete(ptr, n, es, ARG_NAME fn)) > + bsort_xform(ptr, max, n, es, ARG_NAME fn); > + break; > + } > +} > + > +#if defined(I_AM_BSORT_R) > +void > +bsort_r(void *a, size_t n, size_t es, cmp_t *cmp, void *arg) > +{ > + local_bsort(a, n, es, cmp, arg); > +} > +#elif defined(I_AM_BSORT_S) > +errno_t > +bsort_s(void *a, rsize_t n, rsize_t es, cmp_t *cmp, void *arg) > +{ > + if (n > RSIZE_MAX) { > + __throw_constraint_handler_s("bsort_s : n > RSIZE_MAX", EINVAL); > + return (EINVAL); > + } else if (es > RSIZE_MAX) { > + __throw_constraint_handler_s("bsort_s : es > RSIZE_MAX", > + EINVAL); > + return (EINVAL); > + } else if (n != 0) { > + if (a == NULL) { > + __throw_constraint_handler_s("bsort_s : a == NULL", > + EINVAL); > + return (EINVAL); > + } else if (cmp == NULL) { > + __throw_constraint_handler_s("bsort_s : cmp == NULL", > + EINVAL); > + return (EINVAL); > + } else if (es <= 0) { > + __throw_constraint_handler_s("bsort_s : es <= 0", > + EINVAL); > + return (EINVAL); > + } > + } > + > + local_bsort(a, n, es, cmp, arg); > + return (0); > +} > +#else > +void > +bsort(void *a, size_t n, size_t es, cmp_t *cmp) > +{ > + local_bsort(a, n, es, cmp); > +} > +#endif > diff --git a/lib/libc/stdlib/bsort_r.c b/lib/libc/stdlib/bsort_r.c > new file mode 100644 > index 000000000000..762f3c5aa1ec > --- /dev/null > +++ b/lib/libc/stdlib/bsort_r.c > @@ -0,0 +1,25 @@ > +/* > + * This file is in the public domain. > + */ > +#include "block_abi.h" > +#define I_AM_BSORT_R > +#include "bsort.c" > + > +typedef DECLARE_BLOCK(int, bsort_block, const void *, const void *); > + > +static int > +bsort_b_compare(const void *pa, const void *pb, void *arg) > +{ > + bsort_block compar; > + int (*cmp)(void *, const void *, const void *); > + > + compar = arg; > + cmp = (void *)compar->invoke; > + return (cmp(compar, pa, pb)); > +} > + > +void > +bsort_b(void *base, size_t nel, size_t width, bsort_block compar) > +{ > + bsort_r(base, nel, width, &bsort_b_compare, compar); > +} > diff --git a/lib/libc/stdlib/bsort_s.c b/lib/libc/stdlib/bsort_s.c > new file mode 100644 > index 000000000000..57abde76a257 > --- /dev/null > +++ b/lib/libc/stdlib/bsort_s.c > @@ -0,0 +1,5 @@ > +/* > + * This file is in the public domain. > + */ > +#define I_AM_BSORT_S > +#include "bsort.c" From nobody Wed Apr 19 12:27:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1g6B6Lj8z45Q5k; Wed, 19 Apr 2023 12:27: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 4Q1g6B5qLpz3HxN; Wed, 19 Apr 2023 12:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681907250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBNTui6DJzriY7QRL2KupA9baaOW2vUq3Zv/a393cRQ=; b=wpqPI7UBj7/ZYFZT2zglD7BNDo7euYBVoeW6Izr0yy7nIMkoF642kUigf0Toy5xTg1f4Tg 38dLjEaPKfhpuNZjZtQQbziKn8vpioyLMpdAHYMwgJCb2Xf41Q5KvVtdGRNdDMU4AxCL0o si8k5Cc7bZB9ugCoOTFIglarQAfLRKQgYwTE6Gp+YPP5ronQ1qbKOq5tweNTDaybdbcDn4 Ov2whyHXfvJgLHxGWrD83XitxbTh2fsOKNC29WWHziireUGJFDNpvq4whi3NhI2fvQm3fa kZBHTR+YolGqSOZF8s26Ad4vYBXB613+X0Q0bpGa2HHJhD01u9quTzhIKcxkxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681907250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eBNTui6DJzriY7QRL2KupA9baaOW2vUq3Zv/a393cRQ=; b=GsDCNHcvrZuJ2ePXqwPwFulA8e5buUbMewHoWtPd48u5K0YlhG4txB/szgCeZzB/Xv7+B6 0mvS02CLjuVBCeuVivj3+cUxGfycG4VhHNrmxMCSdVAUxS5d+aeUCj4JQnUO3Rc31weMwA yXieMIrsAqEOo9GoW2SEwxrPTk6Vt/xQnL/RBVe9HY2EBAOfsu7SVqpSmBUATdrwGx0RzU nzdf+dIJypRIZjFISDL1eVCw2eFqCv6uOisYrUrKv9uZiyFTlSRNEeKLT6fbuQqfREjThE 2J2v/N9em+q8XE/NIKamlLSLqWvjDKASN22qcYF9K1l4fXunVLYjPfTeyZzoFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681907250; a=rsa-sha256; cv=none; b=DfJLkLDtDJ0//whYTTfGpSlUwpnNnULZO56kJlKnFZFN7G99hDmHsnrXdVS7pKtJgQRxkd uow6IMoyy8jBR3ZmMBSKaurB5wK1hbGlnITLgfNlcFYYGrt5FrFBRfDqUG5ggQjox2HqWW JuW6O/ZTsXmGtgcnBFGuVdhozXyJ/EoZYvOM42fkUCuttW5Hy4JTn3TnUGXjYMhDkrVeVG vL61f2/l4YaQmpM5BDwJuK8fmDiJWizjNlpDbbuI9CTnCMgi42WY/Qnl8+0Vj+Kwo5SCNm xbnZN7A9Nm8EPFwJC5pPufPw1vGtBLfitjwGo+vvqNS+SQoWNbfiJH/nUXWYWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1g6B4kGwztm8; Wed, 19 Apr 2023 12:27: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 33JCRUCn095682; Wed, 19 Apr 2023 12:27:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JCRUJZ095681; Wed, 19 Apr 2023 12:27:30 GMT (envelope-from git) Date: Wed, 19 Apr 2023 12:27:30 GMT Message-Id: <202304191227.33JCRUJZ095681@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: f621b087c007 - main - 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/main X-Git-Reftype: branch X-Git-Commit: f621b087c00776de713944ae6561e44f83e7b541 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f621b087c00776de713944ae6561e44f83e7b541 commit f621b087c00776de713944ae6561e44f83e7b541 Author: Bjoern A. Zeeb AuthorDate: 2023-04-18 19:51:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-19 12:21:40 +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 MFC after: 3 days Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D39673 --- 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 | 6 ------ sys/modules/rtw88/Makefile | 3 --- 9 files changed, 25 insertions(+), 14 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 39e60cb452af..831fe97847a5 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -63,10 +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 - -# GCC warns about set but unused vaf variables -CWARNFLAGS.iwl-debug.c+= ${NO_WUNUSED_BUT_SET_VARIABLE} - .include diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index 930438a04f2c..2df00358821c 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -40,7 +40,4 @@ CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_RTW88_DEBUG #CFLAGS+= -DCONFIG_RTW88_DEBUGFS -# GCC warns about set but unused vaf variables -CWARNFLAGS.debug.c+= ${NO_WUNUSED_BUT_SET_VARIABLE} - .include From nobody Wed Apr 19 13:35: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 4Q1hd12dSfz45yq9; Wed, 19 Apr 2023 13:35: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 4Q1hd11m4lz4W8K; Wed, 19 Apr 2023 13:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681911349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvT7YAsMT0mEYxmLhWPPdVlmECM1UqyABXkXsoPrPJs=; b=B9yQKYEt58UBwn/QTOC13ilbHoq4S9y9HnYZoEY23fEPzKaw9YSLtmCV2H0QrdxiqjnGvt xDISfBLevn8aNwZotwI1/OOYl4nHAWlBTFI8Ng7w1t4l6xXxnXGl3HzeY8urNUi9oh6yfy Bn67j/xbRzo8fZCCPKtN843RaTAclKkMEZQtW53DuTDT28CE85NtwxQO5hzT1uxpw46CBN Sus93qzZ2vM75OF+H8nHQg7ZPVtaj2y0+asWZmXvTejLydSjIhjPL6EkHmTqNHqME3lg3J wRHbdOQWzWFhH5X/t/LTI3ibt5Yc1b2Z4KgC1Niv/NqlHsuw5YVWJ9a100TIOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681911349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uvT7YAsMT0mEYxmLhWPPdVlmECM1UqyABXkXsoPrPJs=; b=JxUbemy9t4IEuT6AFhfrCpMB/7wUdQM76jQ3pIKCsk91OzcTAylA05G9Q4PQ0l7jz2sOAW 4L7fqZTcGC81XM1c3IBtg83B3K7NL/qxKO59p8/KQOVaO2y9hHCe54tVxHQ7IFdae/D/7K 5e99pqc9kB7YKTGyd7mwOYaChZGgneoBeKWP+MY1l/cI9/ABiDIIiGzgAj19yPspYgYKOQ OXrOM4OApjSBVoSo7RcMKVi1xsLXiGKQcosvPoTq44rlfKRna95h896Ho5MywLbnbHK8e9 q355l3LecBiGSwZ2yclD3BIoHH4cfLiXZ2DGxTX/o70MTJp9ntU6Th18PwS9yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681911349; a=rsa-sha256; cv=none; b=m0MXJGAedUP+fGnzhdDQceoftvnBsl95bsKQDim6IuWMKMvsWM4Ae1M123540Mlu5NfXI6 kNwA6ZUuPQqlufWAn7HXuIXBpOJgbi+TIxmSDjeNF42nw6brwmdozHtTBs5dEySZiofz57 N3A4zol76OfQeWuZegE1O3ln3tr1xANhCSb6a8qBhIl9psMN6xnDRd350+IkzYlyWtwilP A7cWB8XG6G7k9HegcDOAky9P9M7xCJRniqha1cU3vgbujmdf22cNyYl229aFxoUsre3Q+t ERTUtSopb27Vtk0hr4o2reTgLOuTATZo8c3oLHaxzttxzjOCyq/NSl2cCnAdHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1hd10kxfzwmj; Wed, 19 Apr 2023 13:35: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 33JDZnht010111; Wed, 19 Apr 2023 13:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JDZnwk010110; Wed, 19 Apr 2023 13:35:49 GMT (envelope-from git) Date: Wed, 19 Apr 2023 13:35:49 GMT Message-Id: <202304191335.33JDZnwk010110@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 7d65a450cdcc - main - bsort.3: Fix warnings as reported by mandoc -W 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d65a450cdcc7cc743f2ecd114ba3428a21c0033 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=7d65a450cdcc7cc743f2ecd114ba3428a21c0033 commit 7d65a450cdcc7cc743f2ecd114ba3428a21c0033 Author: Hans Petter Selasky AuthorDate: 2023-04-19 13:24:35 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-19 13:34:00 +0000 bsort.3: Fix warnings as reported by mandoc -W warning Reported by: Yuri MFC after: 1 week Sponsored by: NVIDIA Networking --- lib/libc/stdlib/bsort.3 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/libc/stdlib/bsort.3 b/lib/libc/stdlib/bsort.3 index 9cc2edc04dd2..d0cadcacccc0 100644 --- a/lib/libc/stdlib/bsort.3 +++ b/lib/libc/stdlib/bsort.3 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2022 Hans Petter Selasky +.\" Copyright (c) 2022-2023 Hans Petter Selasky .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,14 +24,13 @@ .\" .\" $FreeBSD$ .\" -.Dd April 19, 2023 +.Dd April 20, 2023 .Dt BSORT 3 .Os .Sh NAME .Nm bsort , .Nm bsort_b , -.Nm bsort_r -and +.Nm bsort_r , .Nm bsort_s .Nd sort functions .Sh LIBRARY @@ -196,8 +195,7 @@ main(void) .Ed .Sh SEE ALSO .Xr sort 1 , -.Xr qsort 3 -and +.Xr qsort 3 , .Xr radixsort 3 .Sh HISTORY This implementation was created by Hans Petter Selasky. From nobody Wed Apr 19 13:35: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 4Q1hd23lRXz45ynV; Wed, 19 Apr 2023 13:35: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 4Q1hd22sTJz4WND; Wed, 19 Apr 2023 13:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681911350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K+OGjD6cAx32usjbu76bw7lJHob95+Rp0/dYS1uPVJ0=; b=bLoN9X2131xZ/Adod1TNnd3DpEqNf5XT0SORhvQRtkU5Djo816fnbGqOxYkGbGS1RJn808 Em6nhoTGyyG7G1mEzNcJY9by7e3lHQhvYwczdSSafE+EsysU37Ar0FIFS8XHcQ1u8TNudy olMAY5XxMTNpbExjq4KLg9xa0WPCfJtqwNdksPYiaEDCY77D9Sw1mqreXvzo5hkwDz8/qW 7qQkIADZnLcFM2iRZ8sywFyCHj5q8+Al0gIpxwyX65vrvi1O27BULMrjkTX0S04V1fqYVJ BCNlAPLFssc4iYFXkN2CqX1Qbj3m5p80if7FXFeCsKePzKJqXBEYUX8cT6ExUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681911350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K+OGjD6cAx32usjbu76bw7lJHob95+Rp0/dYS1uPVJ0=; b=xvlNXrOMbVlIiJH2dnUPTScu8BNYyHWIvL4Lin22Ehldq8hRxxq+ERhdxypH/ScHxONNYi VxpFLtxxRz2fiCNocvjRQNywdW8wB4As6PSdteZPXavAcb3hqF9Oj/PjYdq3vx2TKbZSuI g9MI+VnXOR69IpsmnK+WC5jNovwEWC203hXUiowMVHKinsYZgi4oYJf/P06wJJJm14eQAq sWriuy+3cBjXP9TvN6BRJ/TGltVq5yXGX44sOGCc2Dws6z8liJm8DuxeKjXfWzCKaO1OOf IAfH+oFWl6mh/CY6VPiuAml2m0HFndxe301bRA5jfZOhIyLr1Dr++WMhg6E0bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681911350; a=rsa-sha256; cv=none; b=Wv6kAww5MWOwUn1Ki3MQYntvANECjQOhbAZM+mBt7l1ij19YH86CyQtWLUtoiM+fVDCKQr Mn3c3xYb7DhhEhypRmW4LoIAv00/14qeEWFSoLwLnaTpgpB1sYpvzaAkuieQre2QThryA6 XEVqmOax6Sat/Q4pjV/29kcgbt1B8wHAZltFZDRyRtC+RvpNNiTK3v0ee9UypPCEf09Fvh gPyPjB33fFfLCljiJkUcILcVeK/xTm0+GjmCdglfk/lEqq/6uIBlo7jfJpSwyhP095Tm3R /Cua8O0fVbKbOigwFns1IHFZgVAYfFbY9J8Cnedr0Vbjamh518g3jaf3wT04hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1hd21gGfzwHc; Wed, 19 Apr 2023 13:35: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 33JDZoLt010134; Wed, 19 Apr 2023 13:35:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JDZoVV010133; Wed, 19 Apr 2023 13:35:50 GMT (envelope-from git) Date: Wed, 19 Apr 2023 13:35:50 GMT Message-Id: <202304191335.33JDZoVV010133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 27bb0d337c0d - main - libc: Add missing object size check to qsort_s(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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27bb0d337c0d82a1a4f310315840236eb239963c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=27bb0d337c0d82a1a4f310315840236eb239963c commit 27bb0d337c0d82a1a4f310315840236eb239963c Author: Hans Petter Selasky AuthorDate: 2023-04-19 10:22:11 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-19 13:35:14 +0000 libc: Add missing object size check to qsort_s(3) When sorting, both the C11 standard (ISO/IEC 9899:2011, K.3.6.3.2) and the ISO/IEC JTC1 SC22 WG14 N1172 standard, does not define objects of zero size as undefined behaviour. However Microsoft's cpp-docs does. Add proper checks for this. Found while working on bsort(3). Reviewed by: kib@ and emaste@ MFC after: 1 week Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D39687 --- lib/libc/stdlib/qsort.3 | 10 +++++++--- lib/libc/stdlib/qsort.c | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3 index 6449849fc490..01689dbafec8 100644 --- a/lib/libc/stdlib/qsort.3 +++ b/lib/libc/stdlib/qsort.3 @@ -32,7 +32,7 @@ .\" @(#)qsort.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 30, 2022 +.Dd April 19, 2023 .Dt QSORT 3 .Os .Sh NAME @@ -260,7 +260,7 @@ The order of arguments to .Fa compar is different .It -if +If .Fa nmemb or .Fa size @@ -270,7 +270,11 @@ or .Fa nmemb is not zero and .Fa compar -is NULL, then the runtime-constraint handler is called, and +is +.Dv NULL +or +.Fa size +is zero, then the runtime-constraint handler is called, and .Fn qsort_s returns an error. Note that the handler is called before diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c index 11a3c5508143..425edd562420 100644 --- a/lib/libc/stdlib/qsort.c +++ b/lib/libc/stdlib/qsort.c @@ -247,6 +247,10 @@ qsort_s(void *a, rsize_t n, rsize_t es, cmp_t *cmp, void *thunk) __throw_constraint_handler_s("qsort_s : cmp == NULL", EINVAL); return (EINVAL); + } else if (es <= 0) { + __throw_constraint_handler_s("qsort_s : es <= 0", + EINVAL); + return (EINVAL); } } From nobody Wed Apr 19 13:39: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 4Q1hj31vzLz4606W; Wed, 19 Apr 2023 13:39:19 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1hj26fsTz4cqy; Wed, 19 Apr 2023 13:39:18 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 963DB2600DD; Wed, 19 Apr 2023 15:39:10 +0200 (CEST) Message-ID: <1fa807d3-f9bb-e6ee-caf1-eeb559fc8be7@freebsd.org> Date: Wed, 19 Apr 2023 15:39:09 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. To: Yuri , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <614f21af-0de6-2264-265d-2aab212800a9@aetern.org> Content-Language: en-US From: Hans Petter Selasky In-Reply-To: <614f21af-0de6-2264-265d-2aab212800a9@aetern.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q1hj26fsTz4cqy X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 14:20, Yuri wrote: > Hans Petter Selasky wrote: >> The branch main has been updated by hselasky: NAME >> +.Nm bsort , >> +.Nm bsort_b , >> +.Nm bsort_r >> +and >> +.Nm bsort_s >> +.Nd sort functions > > mandoc: lib/libc/stdlib/bsort.3:34:1: WARNING: bad NAME section content: > text > mandoc: lib/libc/stdlib/bsort.3:35:2: WARNING: missing comma before > name: Nm bsort_s > > This should be a list of Nm macros, without any additional content: > > .Sh NAME > .Nm bsort , > .Nm bsort_b , > .Nm bsort_r , > .Nm bsort_s > Should be fixed now. See 7d65a450cdcc7cc743f2ecd114ba3428a21c0033 ! --HPS From nobody Wed Apr 19 14:03: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 4Q1jDy5W4dz461kK; Wed, 19 Apr 2023 14:03: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 4Q1jDy1LZnz44GQ; Wed, 19 Apr 2023 14:03:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681913010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMNF875Jn8K4RuGroYfJQQler9Q6cEUfLYnWFpJs4hI=; b=yzRWB3UoU3+i3uhslNPoHDADX9/YcTBBvzMTgoNgErzjMYCc6G9qQFFOS4jLuVSoaLtOsm 9ZyMtNtkHJCPjrxoqEJxRvx9ql5Q33Rx8B98lRvQORknqCobyPxIZsExolFNvONZTVpnGB /s0Z0/Np5eSXluWJ6e4A3XeoccodPXRF1O2Agtn0a9xPAZRdD3PEesOcWmaKtSoqHraJue b4Qw8lPyNjXz+gG2fWtW+BviLtHDzKEuxvQ6+Rzv3nAFVYuiJpxSotNWvrgs8YjHJw+Xl2 MJbRgHjt/EtJx6gU+ywEEGzxtYZhF8ZmI0bXhOnh3tp59zxxrLUCjZilOo3RDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681913010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eMNF875Jn8K4RuGroYfJQQler9Q6cEUfLYnWFpJs4hI=; b=etWpTz2wNRWrF2dXfBsyUNrLkT6sjrn7Yu3LHlou2y6cGVliNT4hKL+PzxNzeasN2etqks Ya/pJzsDCvQtlm5zBq5xSBOOgALbEzdvVLym/Wgv+y49jwQLJAIRTTNPLPi7W8iUbsuZAw Mb+0mHEJVtIVf18mY9YBsVat9Dlach5nQU9CZjgF54iEa6IkMt7rSIwBs9KyS3uiaLiwYm fx+m/gURwDcIwDvfg093HP4HImU7zWJLh0rk6+DHIdpYIjoxMR8REl+KxVuOSH3SYtuGu2 kxJNugW6/WIKWWonxlCJt2TS6/LgMsxysd8wBSJVskLagyjlTAan4mcfK2mEfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681913010; a=rsa-sha256; cv=none; b=b2ju1pUVWtTYBMfY3ZRcK2xhUIpj3QfxLiT9zOFLw/ow4wt2zw97eM3yJof/DCvFKnEjKk KA4nwHYXfr3M1KI7u/ldaJQ9mUP0z6pUNxqunwr9zLI1wNy0QOqQU8C6cuBtaR4MM0Psm4 B4o6jBEPfOY1VDFDlHI81KzcRdiRe7paDMPRy1I/CZ0xldJX/AmKEEBePwZXpqYSjKuxtr flshVb6qv4Gus9WwbnjC1HtLahsP15Ku+cVEmCRCDMqjoexUKJhUO6nyaL+sUFaX/8ArGT A6iplMT8Z0Txw3zMw7ar858vZqL5Hr0kjslAiZEIDViZuQxDcv5rWJpaFteNMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1jDy0QD6zxfd; Wed, 19 Apr 2023 14:03: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 33JE3TY2059965; Wed, 19 Apr 2023 14:03:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JE3T4w059964; Wed, 19 Apr 2023 14:03:29 GMT (envelope-from git) Date: Wed, 19 Apr 2023 14:03:29 GMT Message-Id: <202304191403.33JE3T4w059964@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: 0f1e73b789c8 - stable/13 - netisr: Purge another reference to NETISR_EPAIR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0f1e73b789c8515b63c6f56dc7c787361754844d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0f1e73b789c8515b63c6f56dc7c787361754844d commit 0f1e73b789c8515b63c6f56dc7c787361754844d Author: Mark Johnston AuthorDate: 2023-04-12 14:27:00 +0000 Commit: Mark Johnston CommitDate: 2023-04-19 14:03:08 +0000 netisr: Purge another reference to NETISR_EPAIR Fixes: 03276e338a1b ("netisr: Remove the now-unused NETISR_EPAIR queue index") MFC after: 1 week (cherry picked from commit b4f1582f3b62ca943a6009d7f08c938833bf70d5) --- share/man/man9/netisr.9 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/share/man/man9/netisr.9 b/share/man/man9/netisr.9 index efcb8ed8e7b1..06e394915729 100644 --- a/share/man/man9/netisr.9 +++ b/share/man/man9/netisr.9 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2017 +.Dd April 12, 2023 .Dt NETISR 9 .Os .Sh NAME @@ -220,9 +220,6 @@ Routing socket loopback ARP .It Dv NETISR_IPV6 IPv6 -.It Dv NETISR_EPAIR -.Xr netstat 1 , -.Xr epair 4 .El .Sh AUTHORS This manual page and the From nobody Wed Apr 19 14:03: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 4Q1jDz5RYbz461QL; Wed, 19 Apr 2023 14:03: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 4Q1jDz2FcVz44Lv; Wed, 19 Apr 2023 14:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681913011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IUNIvJUqrWclKzqnTPeTM0fLoSLZorJnHpYH2ysFZSM=; b=hGFSBNoSz0raAgg+WfHCl9pp5LUCp3kz4lWKESOB1+x5+QhGm23cSwD8+In5L0yzTo2cfW qF0NcVEQVxZhCEgUpEuP3yDVN3bQqNb3C7mZpX0+N9P1rTI3j1TxpWLWFrz3sCQ64tqDXE Lx4HUX1zuRJz2ekaES+Zl9B2fXn7Vsh61g9Te6UDcTQqiRVjGRFLR9PVVxubL5L0mnMmDZ kPkPBLKHuSgFv7sD5NDbDN+1jEIzB9Vl8rctLdXutA4UBSRojxAgcXug6UZk7V+YcFIDbu hZyKNVnuCcU+lkUiLyYpsxqxQi5qKc4EufIjDb+5LkL2NEXUvKr5FNX1WDdY5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681913011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IUNIvJUqrWclKzqnTPeTM0fLoSLZorJnHpYH2ysFZSM=; b=okS/ibLaXtijAguzEXeQbZKRcmS1zDqsNtQR+G8bm2Xk0JV+nuW7CMUJXGVleds1L/eMvu mgXY+uagwTtYqT0aeJy5+Gfhq9B4e9rFqYQ1IEbuRUc4x88/YpHu2KJQRESVZrmg0gh2aW OBHE3fOdIkz+lzUMGPkupefhERUYqnxhmT/dBWynCTvBozntFVPftOKWchdeSoucGg3C0s epJNvihNPjSOCoeeHhjbWTg2q8RlvdT3VGCyEgxCf/fqv0djsxejwhF24D4typn/VZoj8k gUovLbBFUge6/7ZAg7FlY2IlfMezIrHUluzDf4EGqFedkHDIL5FMbMxtTs5y+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681913011; a=rsa-sha256; cv=none; b=tqwQ4r1ZdtkCeUDejieiRIRF1svlZxqn8IDcqO+HS6jusYfjsa3gtpw6KjTB/iXoK34Tvb ZZCmkmYzlBkFeuCYoaFm2x9NmlWJrnEKri/VuGUSa/+fcme8KRm3tnx+5QvFfrmQvBW3gM iH1emzNcP4Jr8X8C13HFMGGqRR5E4b0AyZ+A5wugPw22VBPk9OvathUMRvp0FQZi5kbA/p LSL/U7Nn/WynJ607lF0vfuawALmw94k2acBu2XLP2lC/sMd/T5CtKMm5PYjlox1Vim91yI uxy4WTbUS4pDt5r55eeUnwhXe18Cf4Lx37S/6fA0EAQaURjBuy9lBFCDkMdD8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1jDz1KkLzwr3; Wed, 19 Apr 2023 14:03: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 33JE3VCk059984; Wed, 19 Apr 2023 14:03:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JE3Vqn059983; Wed, 19 Apr 2023 14:03:31 GMT (envelope-from git) Date: Wed, 19 Apr 2023 14:03:31 GMT Message-Id: <202304191403.33JE3Vqn059983@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: 90348de64067 - stable/13 - bridge: Try to make the GRAB_OUR_PACKETS macro a bit more readable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 90348de64067b2d006baed7cf5cb83567da2e559 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=90348de64067b2d006baed7cf5cb83567da2e559 commit 90348de64067b2d006baed7cf5cb83567da2e559 Author: Mark Johnston AuthorDate: 2023-04-05 14:37:00 +0000 Commit: Mark Johnston CommitDate: 2023-04-19 14:03:17 +0000 bridge: Try to make the GRAB_OUR_PACKETS macro a bit more readable - Let the compiler use constant folding to eliminate conditionals. - Fix some inconsistent whitespace. No functional change intended. Reviewed by: zlei MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38410 (cherry picked from commit 82bbdde4ebc9deb30d3a05ddec4d76f0a88df881) --- sys/net/if_bridge.c | 49 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 1d1e1cd20bc1..ef01be9c5b49 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -2516,32 +2516,28 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) return (m); } -#if (defined(INET) || defined(INET6)) -# define OR_CARP_CHECK_WE_ARE_DST(iface) \ - || ((iface)->if_carp \ - && (*carp_forus_p)((iface), eh->ether_dhost)) -# define OR_CARP_CHECK_WE_ARE_SRC(iface) \ - || ((iface)->if_carp \ - && (*carp_forus_p)((iface), eh->ether_shost)) +#if defined(INET) || defined(INET6) +#define CARP_CHECK_WE_ARE_DST(iface) \ + ((iface)->if_carp && (*carp_forus_p)((iface), eh->ether_dhost)) +#define CARP_CHECK_WE_ARE_SRC(iface) \ + ((iface)->if_carp && (*carp_forus_p)((iface), eh->ether_shost)) #else -# define OR_CARP_CHECK_WE_ARE_DST(iface) -# define OR_CARP_CHECK_WE_ARE_SRC(iface) +#define CARP_CHECK_WE_ARE_DST(iface) false +#define CARP_CHECK_WE_ARE_SRC(iface) false #endif #ifdef INET6 -# define OR_PFIL_HOOKED_INET6 \ - || PFIL_HOOKED_IN(V_inet6_pfil_head) +#define PFIL_HOOKED_INET6 PFIL_HOOKED_IN(V_inet6_pfil_head) #else -# define OR_PFIL_HOOKED_INET6 +#define PFIL_HOOKED_INET6 false #endif -#define GRAB_OUR_PACKETS(iface) \ - if ((iface)->if_type == IFT_GIF) \ - continue; \ - /* It is destined for us. */ \ - if (memcmp(IF_LLADDR((iface)), eh->ether_dhost, ETHER_ADDR_LEN) == 0 \ - OR_CARP_CHECK_WE_ARE_DST((iface)) \ - ) { \ +#define GRAB_OUR_PACKETS(iface) \ + if ((iface)->if_type == IFT_GIF) \ + continue; \ + /* It is destined for us. */ \ + if (memcmp(IF_LLADDR(iface), eh->ether_dhost, ETHER_ADDR_LEN) == 0 || \ + CARP_CHECK_WE_ARE_DST(iface)) { \ if (bif->bif_flags & IFBIF_LEARNING) { \ error = bridge_rtupdate(sc, eh->ether_shost, \ vlan, bif, 0, IFBAF_DYNAMIC); \ @@ -2560,8 +2556,8 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) if_inc_counter(bifp, IFCOUNTER_IPACKETS, 1); \ if_inc_counter(bifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); \ /* Filter on the physical interface. */ \ - if (V_pfil_local_phys && (PFIL_HOOKED_IN(V_inet_pfil_head) \ - OR_PFIL_HOOKED_INET6)) { \ + if (V_pfil_local_phys && (PFIL_HOOKED_IN(V_inet_pfil_head) || \ + PFIL_HOOKED_INET6)) { \ if (bridge_pfil(&m, NULL, ifp, \ PFIL_IN) != 0 || m == NULL) { \ return (NULL); \ @@ -2573,9 +2569,8 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) } \ \ /* We just received a packet that we sent out. */ \ - if (memcmp(IF_LLADDR((iface)), eh->ether_shost, ETHER_ADDR_LEN) == 0 \ - OR_CARP_CHECK_WE_ARE_SRC((iface)) \ - ) { \ + if (memcmp(IF_LLADDR(iface), eh->ether_shost, ETHER_ADDR_LEN) == 0 || \ + CARP_CHECK_WE_ARE_SRC(iface)) { \ m_freem(m); \ return (NULL); \ } @@ -2599,9 +2594,9 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) GRAB_OUR_PACKETS(bif2->bif_ifp) } -#undef OR_CARP_CHECK_WE_ARE_DST -#undef OR_CARP_CHECK_WE_ARE_SRC -#undef OR_PFIL_HOOKED_INET6 +#undef CARP_CHECK_WE_ARE_DST +#undef CARP_CHECK_WE_ARE_SRC +#undef PFIL_HOOKED_INET6 #undef GRAB_OUR_PACKETS /* Perform the bridge forwarding function. */ From nobody Wed Apr 19 14:35: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 4Q1jyJ1qv3z462yp; Wed, 19 Apr 2023 14:35: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 4Q1jyH6vKDz40Qt; Wed, 19 Apr 2023 14:35:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681914952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbjqB3OXVuZTpwBkVX1/3UbfNMepYppUwq/I8Q4NDvc=; b=i18T6lvc5gqpyue2aSrIG1GqBdwldAXSQ302z+mLS1f72VFoTsNtKqKhfLCqBxOG1A349K veJvQVlEmqCmptTrthhBrQup+FzuA2bswrPNMxScKUAuEIQmwPWcNWKSDQj6HS8rSJF3c+ ynjMTWrUINRGQoucUsBBhz7ZT0A164u4aGsCstuKLGC8XbkJsYECRDFZApLv+C0w34tl0L zNz6dyY0C7/IYWRZV7O6nL76CuMZ0d6nvj7fxWK4TmU9y/A72qeyh9ETzbjuSsqjFrgeEo B/oad0Xjs0HwMPz3O/a42MvjauLowfWO6cGfzebOtuwtOGBgSZC6jnafBP/s0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681914952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jbjqB3OXVuZTpwBkVX1/3UbfNMepYppUwq/I8Q4NDvc=; b=FmNiRdUd2R3TZKUpq5vPfIDUjiY56eWmgYyz8BEyn+alI6ZCZZZ3Lz3Zum4UyXGM35VL0R +vVk+5N4iYctMXRYqb+Rqb6SuA1f0Y5r9b82cAdRcMhp3NL7UAf4APjxO7JlYJ0KiF7b1C FQfqaKWQ4uc6qZ3gOhh1p5xWgG8/N2daqPKRmvegvk743Lx86df9Ah9ghOR9AOUg1KPvXI fWwtiCUOxEd38z54fQh9s524hrOEYrzmt8Nf3p/j43BU7KzqQiTsvmJxG6HO40JatLd0Vf X4thAZyKWtHUZ2n4ok9nC1Tp366UyODJaV7DfnmBFt5TjNYv76FUQhrUysq/Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681914952; a=rsa-sha256; cv=none; b=Z2TDvAX2H4c3vWgpdWu9Roi8Mcu+IcZiIx9nnCp0XOaYsJ8Azr3yI2FJtRATrCmU5gJ0+O 1dDaTc6astpe/gnA/NuyfChMyHBPFCxMV4UUQOAz5SL8fr3G+RIlYN2BMSZOUIQ9AkkjCD 4w9y8lqq2psSIQXn1DS0+9v/zmM4SOma41RGfbeZnE7VdRFOnq3PFBcqdCq29LaAbmI6aO UCFgKGR63g7Okyr4t5+abQ7Xwped4s0A41Mr+DC4lE/+bYINn5WGdapr1BwGZ807E3UFxX Iq3knRclKfstkaVyc9AK0Vqnv4MqIv3KVLRbEWRqW+o0Wm5ZC7htPk5cKYs72g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1jyH5hZtzyNH; Wed, 19 Apr 2023 14:35: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 33JEZpcO008516; Wed, 19 Apr 2023 14:35:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JEZpda008515; Wed, 19 Apr 2023 14:35:51 GMT (envelope-from git) Date: Wed, 19 Apr 2023 14:35:51 GMT Message-Id: <202304191435.33JEZpda008515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 5e2ba9cb6b0b - main - Cirrus update to new freebsd instance version List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e2ba9cb6b0bc097f6ed176894cfee3b5bd405f4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=5e2ba9cb6b0bc097f6ed176894cfee3b5bd405f4 commit 5e2ba9cb6b0bc097f6ed176894cfee3b5bd405f4 Author: QWERTIOX AuthorDate: 2023-04-19 13:01:15 +0000 Commit: Alan Somers CommitDate: 2023-04-19 14:34:28 +0000 Cirrus update to new freebsd instance version MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/718 --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index e16a16838d66..aebad00acef8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -5,7 +5,7 @@ compute_engine_instance: # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images platform: freebsd image_project: freebsd-org-cloud-dev - image: freebsd-13-1-release-amd64 + image: freebsd-13-2-release-amd64 cpu: 8 memory: 8G disk: 40 From nobody Wed Apr 19 15:13: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 4Q1knl2F25z465Jw; Wed, 19 Apr 2023 15:13: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 4Q1knl0hKPz41YH; Wed, 19 Apr 2023 15:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681917211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2L/PMYCD6YakN2rpUfqEKlkOp6nridGpGyx7NnxTZ+Q=; b=w/pxNBpQYyaQr6oUTbPGdJLQtrKK3DhJY9VzYG1UWM6HR2efw318z3XZUYNvGXsgYgbho2 zGCmV4xMrsB83mRRTmBiQdLmMwaHGjHqFRF+k07/qSaD1OkJV3sYeEzWeunH6YtO1XW5Mu JA/IIFfSxa6oZeSwN9N76ClkPRsjFC+iJOH76oZfpFmd3l74AkiNbBUcxByECAJjE3Q/Yk wK1F/wcxXtLrbQTP6uqunTd58YKT3Vub4yiSMv7LFY1gRBidWFGzV3lUctpXii0F4cniPJ q2p9I7xpUJbOPu/V7KLw3GfgiCFBH1zSrN3630jtVq27+giZO0oE1IEbwHAbUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681917211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2L/PMYCD6YakN2rpUfqEKlkOp6nridGpGyx7NnxTZ+Q=; b=NLEtnBRVR6adn3/C7mjliq5Ilcxjlup8NZIEzZ8yCqQTAN9XEkqlAEAWB2SVnRTtL30+Sn flFGksZKH4UZfxAUczIbxlTWEK5caLe8KnFmLFlWyI61b0R8nJFYFbojV6tvtBpfRDOJOv sj6CYJCmcxwGUECHh/Y2gBWOkEyDtTLdD2d3+g8p+nLGKwWlO0MySypW9ghzsHtXR9Umu0 DCvhzP24DopNZvsCQcmawyL2i6iOkWX47BUizSjF/5JWM9XBLhH6jlHwdtcvcQ1u8Mz4Cq Yj3n/Tk5aK6aiFNhNTK9O8v7VHDgBgqBb/GW8DQJlN9RMLrmw1tX0o+0L2BpoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681917211; a=rsa-sha256; cv=none; b=X2LvOBR11rAV454JUTMiAN87C0l3xc1pgG3CrP4RiXGaogPw+BuJKGL+YFNIby6Wns9Qiw FS495Yrf91TUI6bM+Z0iF4L3PiSN9NhbyvE1mYpWR4/jf/kpd/EfmsfYHPZfC/qKd0fgkH 8/ZeGiyUXtVcdHaCA28rwzJwQVclaEU3vEzwNyj3HAUda2efbwGNcmV7zgUHt2BjOpqq1o v+ZDMJrtYDzxyLh5+//nlNK/4bx5XhQEFjrPyCNnj8TngEGh6pEPmfTUIWkCwWyGSESlXd cPhIoLDui+PNkEGtSzqeoNYQFoJx3gyPrWGg2qaG4XnG6zmbewLjvIZuL4SSgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1knk470Sz10S0; Wed, 19 Apr 2023 15:13: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 33JFDTp5075115; Wed, 19 Apr 2023 15:13:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JFDT9j075114; Wed, 19 Apr 2023 15:13:29 GMT (envelope-from git) Date: Wed, 19 Apr 2023 15:13:29 GMT Message-Id: <202304191513.33JFDT9j075114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 409731e7d713 - main - unionfs.5: Use '.An -nosplit' in the AUTHORS 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 409731e7d71358cda3d23d903607614c29680038 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=409731e7d71358cda3d23d903607614c29680038 commit 409731e7d71358cda3d23d903607614c29680038 Author: Gordon Bergling AuthorDate: 2023-04-19 15:11:41 +0000 Commit: Gordon Bergling CommitDate: 2023-04-19 15:11:41 +0000 unionfs.5: Use '.An -nosplit' in the AUTHORS section Use '.An -nosplit' in the AUTHORS section to prevent line breaks. MFC after: 3 days --- share/man/man5/unionfs.5 | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man5/unionfs.5 b/share/man/man5/unionfs.5 index 7d5e16e3ff68..2f781c0899e7 100644 --- a/share/man/man5/unionfs.5 +++ b/share/man/man5/unionfs.5 @@ -69,6 +69,7 @@ The device driver first appeared in .Fx 5.0 . .Sh AUTHORS +.An -nosplit The .Nm device driver was written by Jan-Simon Pendry for From nobody Wed Apr 19 15:18: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 4Q1kvC6RTWz4663y; Wed, 19 Apr 2023 15:18: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 4Q1kvC1Zc7z46gJ; Wed, 19 Apr 2023 15:18:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681917495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WeK+A2GwUNMdVquCm3X2fHEJIuKDAVYP2TdKFNm8uE=; b=avZZovs0qIRwcSmWO5FVUm+HGu4ln9I7fK4YdDhUqZ2ciQPMMpvSZ8G4n0PmrvIcFJEbV6 xN90SouIRZit5nFFKrgiXnl1nCKE6GnR/ZTFqopMcRyB3NktDY1s+V2jvnj8JF99L0HL7m Pe21RiHeF44JbDXLO6uSQz2PQiJNoN5BvzVT9+x7SgnxxUfKWibn4gPLy33FPtjBevEAnk iFa1YGvjzDyhzWAGKZO9ADZebp1p+02YnhuAkcyXgCH/T1d2Dw8sa7PVGmVz7vblqELiee cF95r8FDgxYlIwasHJuAiGHWQCQFm8xhWuFCfDbfQcngr21SeYohV4dHy7quCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681917495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WeK+A2GwUNMdVquCm3X2fHEJIuKDAVYP2TdKFNm8uE=; b=es9CZKEUOlasqVF9ay1/wsexmyt6mwVl0uuHgqxoFvcbqKN+Sja6QYkCTdUKQD0xUOtns4 C1PkTlPFzhlHHxF0j6CLmzXBLeVNR3N4OnV9nxbL7TJB1Ml+Dwvszi3YM4hp+VtQTppHa2 987pqo2+VahxmjWR/0eNOwNlUZb2vnnsBL4dQFN6dWWAqVxgSEh8pywHiJ5wfy4IDei680 dGXu3U8ZAayB2E95RR7CYqRzixfdc6EgiadzcJhihoaxcIsMDKn8NFREOtIBe8kryikMFl PB1wVNG9jpevmti+zFGbPPYvZWLubmlEa2LyyVHRK5gEXaQ3j+BXRuqL2LEXig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681917495; a=rsa-sha256; cv=none; b=KjRrt7GLBBYSgmRpkG7L7Xsj54mDAIYSbY8NF+9+RbBfnH3z50vx1UIJFY3srupbiwWsMV FMzNLb7EmuWZnj2wS38Vlg9oG2AMdM9f94bQAZFh9XcTonBVkMzSdIcduPe/95T45ESrnE LYIBQaa4f9aZe4ur+sf1ahubG8Xr57IuNi63UoW0Q1iqvBJpydrJn1d8Dv0FwZEr8qPklv tS8Kg8uPBz9kEQF9XbcDM8dTX7uUDFMTpIaS1ztk6A5ACtFry1tyuH+thnzrIcghRZxhei PA8+pYozWxpSLLYtgytU+rGlgrqz+sx7g67iyYnUa9cUbZUxLK1zps3s3SA/9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1kvC0Ztgz10SP; Wed, 19 Apr 2023 15:18: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 33JFIEjl075822; Wed, 19 Apr 2023 15:18:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JFIEA7075821; Wed, 19 Apr 2023 15:18:14 GMT (envelope-from git) Date: Wed, 19 Apr 2023 15:18:14 GMT Message-Id: <202304191518.33JFIEA7075821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: ecb2ce3a51e9 - main - libc: Sorting is not needed when there are less than two elements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecb2ce3a51e9b09a57cd42262fc798ae089c0758 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=ecb2ce3a51e9b09a57cd42262fc798ae089c0758 commit ecb2ce3a51e9b09a57cd42262fc798ae089c0758 Author: Hans Petter Selasky AuthorDate: 2023-04-19 10:18:56 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-19 15:17:33 +0000 libc: Sorting is not needed when there are less than two elements If there are less than two elements avoid executing the first sorting loop. No functional change intended. Reviewed by: kib@ MFC after: 1 week Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D39691 --- lib/libc/stdlib/qsort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c index 425edd562420..0d65cd119ea6 100644 --- a/lib/libc/stdlib/qsort.c +++ b/lib/libc/stdlib/qsort.c @@ -114,7 +114,8 @@ local_qsort(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk) int cmp_result; int swap_cnt; - if (__predict_false(n == 0)) + /* if there are less than 2 elements, then sorting is not needed */ + if (__predict_false(n < 2)) return; loop: swap_cnt = 0; From nobody Wed Apr 19 15:46: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 4Q1lX53VC7z467GD; Wed, 19 Apr 2023 15:46:45 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1lX46jTCz3hKQ; Wed, 19 Apr 2023 15:46:44 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 131E43C0199; Wed, 19 Apr 2023 15:46:38 +0000 (UTC) Date: Wed, 19 Apr 2023 15:46:38 +0000 From: Brooks Davis To: Hans Petter Selasky Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Message-ID: References: <202304191206.33JC6Qcp062380@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 Content-Transfer-Encoding: quoted-printable In-Reply-To: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Q1lX46jTCz3hKQ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, Apr 19, 2023 at 12:06:26PM +0000, Hans Petter Selasky wrote: > The branch main has been updated by hselasky: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8dcf3a82c54cb216df3213a013= 047907636a01da >=20 > commit 8dcf3a82c54cb216df3213a013047907636a01da > Author: Hans Petter Selasky > AuthorDate: 2022-09-08 10:16:43 +0000 > Commit: Hans Petter Selasky > CommitDate: 2023-04-19 12:04:22 +0000 >=20 > libc: Implement bsort(3) a bitonic type of sorting algorithm. > =20 > The bsort(3) algorithm works by swapping objects, similarly to qsort(= 3), > and does not require any significant amount of additional memory. > =20 > The bsort(3) algorithm doesn't suffer from the processing time issues > known the plague the qsort(3) family of algorithms, and is bounded by > a complexity of O(log2(N) * log2(N) * N), where N is the number of > elements in the sorting array. The additional complexity compared to > mergesort(3) is a fair tradeoff in situations where no memory may > be allocated. > =20 > The bsort(3) APIs are identical to those of qsort(3), allowing for > easy drop-in and testing. > =20 > The design of the bsort(3) algorithm allows for future parallell CPU > execution when sorting arrays. The current version of the bsort(3) > algorithm is single threaded. This is possible because fixed areas > of the sorting data is compared at a time, and can easily be divided > among different CPU's to sort large arrays faster. > =20 > Reviewed by: gbe@, delphij@, pauamma_gundo.com (manpages) > Sponsored by: NVIDIA Networking > Differential Revision: https://reviews.freebsd.org/D36493 Why was this needed? I'm not really a fan to adding new, non-standard sorts without a clear use case. I understand it has some specific advantages vs qsort, but are we going to use it? Doing so will make our code less portable so we almost certainly can't s/qsort/bsort/. I also note that the swap code is pointlessly slow for size > 256 and should almost certainly use aliasing with matching words like memcpy implementations do. Doing so would make it easier to port this code to CHERI where that is required. -- Brooks From nobody Wed Apr 19 15:50: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 4Q1lc65Jy3z467Qr; Wed, 19 Apr 2023 15:50: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 4Q1lc64yY9z3nS4; Wed, 19 Apr 2023 15:50:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681919414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mg70RNgO8wWzw+lvdYwg7/IqTBv81D3PkNbthJJaCrU=; b=GSgN0hK1GRuGk6GrQcL7Hp/mluwCanjjFbXJfml7aTVvNAz7+jCQFFPJRT7jl1wsrOj7mi qERIiHKrK6VFkpOYy0S6vL8sz1hqIcnS6d7wFMqY61dA4+BKsSXO2svlk4dNnDPk9d/JTe Vy4PsqRdOZrPlfKB+qS17jDzzVz3TGcRYtvC6hftJarjjCO7EhQhlXVnPurdDarfH+tCVC k1g2nte7xbHxChqWQG1++fr3A4f/jWQWuLCi3wh4PrRG0LxzWWjEpPK9NIeNMl8eqWLXUo Fe/pmr/rV4Ajme8Frqk7hk5yRxM/eaQhe5ibMvxp9POk5YJNvJsrBHbDdDDsIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681919414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mg70RNgO8wWzw+lvdYwg7/IqTBv81D3PkNbthJJaCrU=; b=hTLxL0lGKipLN4LAjie5i5J4mUelB3g7hWtF1l5rNoQG4HrW38ceaBLSiqj2qZLMrf94jw K8AB3mKaVqsEgUvYIPgt3JRKEmfg1zFimSn/3g5PQxAfOb6jCFe2nX5MdtceDChN7bdT8P rb7GhIiVWOveBxOraFlKSIgFvhFrVT1cELyfP6aZvxsC6tDInnsEEMLO8So8nA1e2sOE4L lYKowr12Hclszyx2Cf37FZxoNBLoihT9MhaRXKnOwrV6jxe0KW8Yq+CMrndLh1MN6DGwEA gbXuJkp8hGKWXR6u15K7O9MFZALKslJXBIz0f+3pXjOKbzijFH90uAIgKwDqjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681919414; a=rsa-sha256; cv=none; b=ZPS8WkV0w062AiO1UGPqvDiA05XaumOcFyypIL3twP4QPR2UN/VE0+DyY+V9vrH5EQV5v8 QXi0VjrGDtQOkAvlQE8uSR1UYzBOhB6aExllXh9Gri0mMcxaYnSqpCRszSUlSiALuuAGZK ToP6EjIAv5Ixh2ut9EHHKIqwKi6XyD7WX+/x2YsefvceevofpCUudWeM5Mv750w6UX4F7K Iju4xMOwEUQtldO+H7tOF2N77ReoR+UciUxQY46ktg7/p9It574pbbq5+FMffaNi9vh1gC 4AqwNE7g7cyAjVCt4Ht+E+XfOD+9M3EywhYXU670knVkAXgQh0bJHlYWRCHyYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1lc640TJz119v; Wed, 19 Apr 2023 15:50: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 33JFoE7J031256; Wed, 19 Apr 2023 15:50:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JFoE7w031231; Wed, 19 Apr 2023 15:50:14 GMT (envelope-from git) Date: Wed, 19 Apr 2023 15:50:14 GMT Message-Id: <202304191550.33JFoE7w031231@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Salychev Subject: git: 4cd966142822 - main - dpaa2: Avoid dpaa2_cmd race conditions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dsl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cd966142822ce24c12751c863a073a8b7cb9c14 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=4cd966142822ce24c12751c863a073a8b7cb9c14 commit 4cd966142822ce24c12751c863a073a8b7cb9c14 Author: Dmitry Salychev AuthorDate: 2023-04-07 18:10:17 +0000 Commit: Dmitry Salychev CommitDate: 2023-04-19 15:39:05 +0000 dpaa2: Avoid dpaa2_cmd race conditions struct dpaa2_cmd is no longer malloc'ed, but can be allocated on stack and initialized with DPAA2_CMD_INIT() on demand. Drivers stopped caching their DPAA2 command objects (and associated tokens) in the software contexts in order to avoid using them concurrently. Reviewed by: bz Approved by: bz (mentor) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D39509 --- sys/dev/dpaa2/dpaa2_bp.c | 86 ++-- sys/dev/dpaa2/dpaa2_bp.h | 6 - sys/dev/dpaa2/dpaa2_con.c | 77 ++- sys/dev/dpaa2/dpaa2_con.h | 5 - sys/dev/dpaa2/dpaa2_io.c | 98 ++-- sys/dev/dpaa2/dpaa2_io.h | 5 - sys/dev/dpaa2/dpaa2_mac.c | 178 ++++--- sys/dev/dpaa2/dpaa2_mac.h | 6 - sys/dev/dpaa2/dpaa2_mcp.c | 116 ++--- sys/dev/dpaa2/dpaa2_mcp.h | 32 +- sys/dev/dpaa2/dpaa2_ni.c | 1181 +++++++++++++++++++++++++++++++++------------ sys/dev/dpaa2/dpaa2_ni.h | 5 - sys/dev/dpaa2/dpaa2_rc.c | 97 ++-- 13 files changed, 1224 insertions(+), 668 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_bp.c b/sys/dev/dpaa2/dpaa2_bp.c index 78e1ca68cdb1..51f708422257 100644 --- a/sys/dev/dpaa2/dpaa2_bp.c +++ b/sys/dev/dpaa2/dpaa2_bp.c @@ -87,25 +87,42 @@ dpaa2_bp_probe(device_t dev) static int dpaa2_bp_detach(device_t dev) { + device_t pdev = device_get_parent(dev); device_t child = dev; struct dpaa2_bp_softc *sc = device_get_softc(dev); + struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); struct dpaa2_devinfo *dinfo = device_get_ivars(dev); + struct dpaa2_cmd cmd; + uint16_t rc_token, bp_token; + int error; - if (sc->cmd != NULL) { - (void)DPAA2_CMD_BP_DISABLE(dev, child, sc->cmd); - (void)DPAA2_CMD_BP_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, - sc->bp_token)); - (void)DPAA2_CMD_RC_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, - sc->rc_token)); + DPAA2_CMD_INIT(&cmd); - dpaa2_mcp_free_command(sc->cmd); - sc->cmd = NULL; + error = DPAA2_CMD_RC_OPEN(dev, child, &cmd, rcinfo->id, &rc_token); + if (error) { + device_printf(dev, "%s: failed to open DPRC: error=%d\n", + __func__, error); + goto err_exit; } + error = DPAA2_CMD_BP_OPEN(dev, child, &cmd, dinfo->id, &bp_token); + if (error) { + device_printf(dev, "%s: failed to open DPBP: id=%d, error=%d\n", + __func__, dinfo->id, error); + goto close_rc; + } + (void)DPAA2_CMD_BP_DISABLE(dev, child, &cmd); + (void)DPAA2_CMD_BP_CLOSE(dev, child, &cmd); + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); dinfo->portal = NULL; bus_release_resources(sc->dev, dpaa2_bp_spec, sc->res); return (0); + +close_rc: + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); +err_exit: + return (ENXIO); } static int @@ -118,16 +135,17 @@ dpaa2_bp_attach(device_t dev) struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); struct dpaa2_devinfo *dinfo = device_get_ivars(dev); struct dpaa2_devinfo *mcp_dinfo; + struct dpaa2_cmd cmd; + uint16_t rc_token, bp_token; int error; sc->dev = dev; - sc->cmd = NULL; error = bus_alloc_resources(sc->dev, dpaa2_bp_spec, sc->res); if (error) { device_printf(dev, "%s: failed to allocate resources: " "error=%d\n", __func__, error); - return (ENXIO); + goto err_exit; } /* Send commands to MC via allocated portal. */ @@ -135,56 +153,52 @@ dpaa2_bp_attach(device_t dev) mcp_dinfo = device_get_ivars(mcp_dev); dinfo->portal = mcp_dinfo->portal; - /* Allocate a command to send to MC hardware. */ - error = dpaa2_mcp_init_command(&sc->cmd, DPAA2_CMD_DEF); - if (error) { - device_printf(dev, "%s: failed to allocate dpaa2_cmd: " - "error=%d\n", __func__, error); - dpaa2_bp_detach(dev); - return (ENXIO); - } + DPAA2_CMD_INIT(&cmd); - /* Open resource container and DPBP object. */ - error = DPAA2_CMD_RC_OPEN(dev, child, sc->cmd, rcinfo->id, - &sc->rc_token); + error = DPAA2_CMD_RC_OPEN(dev, child, &cmd, rcinfo->id, &rc_token); if (error) { device_printf(dev, "%s: failed to open DPRC: error=%d\n", __func__, error); - dpaa2_bp_detach(dev); - return (ENXIO); + goto detach; } - error = DPAA2_CMD_BP_OPEN(dev, child, sc->cmd, dinfo->id, &sc->bp_token); + error = DPAA2_CMD_BP_OPEN(dev, child, &cmd, dinfo->id, &bp_token); if (error) { device_printf(dev, "%s: failed to open DPBP: id=%d, error=%d\n", __func__, dinfo->id, error); - dpaa2_bp_detach(dev); - return (ENXIO); + goto close_rc; } - /* Prepare DPBP object. */ - error = DPAA2_CMD_BP_RESET(dev, child, sc->cmd); + error = DPAA2_CMD_BP_RESET(dev, child, &cmd); if (error) { device_printf(dev, "%s: failed to reset DPBP: id=%d, error=%d\n", __func__, dinfo->id, error); - dpaa2_bp_detach(dev); - return (ENXIO); + goto close_bp; } - error = DPAA2_CMD_BP_ENABLE(dev, child, sc->cmd); + error = DPAA2_CMD_BP_ENABLE(dev, child, &cmd); if (error) { device_printf(dev, "%s: failed to enable DPBP: id=%d, " "error=%d\n", __func__, dinfo->id, error); - dpaa2_bp_detach(dev); - return (ENXIO); + goto close_bp; } - error = DPAA2_CMD_BP_GET_ATTRIBUTES(dev, child, sc->cmd, &sc->attr); + error = DPAA2_CMD_BP_GET_ATTRIBUTES(dev, child, &cmd, &sc->attr); if (error) { device_printf(dev, "%s: failed to get DPBP attributes: id=%d, " "error=%d\n", __func__, dinfo->id, error); - dpaa2_bp_detach(dev); - return (ENXIO); + goto close_bp; } + (void)DPAA2_CMD_BP_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, bp_token)); + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); return (0); + +close_bp: + (void)DPAA2_CMD_BP_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, bp_token)); +close_rc: + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); +detach: + dpaa2_bp_detach(dev); +err_exit: + return (ENXIO); } static device_method_t dpaa2_bp_methods[] = { diff --git a/sys/dev/dpaa2/dpaa2_bp.h b/sys/dev/dpaa2/dpaa2_bp.h index 3ba7196eb030..d05cb399cc17 100644 --- a/sys/dev/dpaa2/dpaa2_bp.h +++ b/sys/dev/dpaa2/dpaa2_bp.h @@ -60,12 +60,6 @@ struct dpaa2_bp_conf { struct dpaa2_bp_softc { device_t dev; struct dpaa2_bp_attr attr; - - /* Help to send commands to MC. */ - struct dpaa2_cmd *cmd; - uint16_t rc_token; - uint16_t bp_token; - struct resource *res[DPAA2_BP_MAX_RESOURCES]; }; diff --git a/sys/dev/dpaa2/dpaa2_con.c b/sys/dev/dpaa2/dpaa2_con.c index 602497c2c8de..993cdb2fe29d 100644 --- a/sys/dev/dpaa2/dpaa2_con.c +++ b/sys/dev/dpaa2/dpaa2_con.c @@ -101,17 +101,7 @@ dpaa2_con_probe(device_t dev) static int dpaa2_con_detach(device_t dev) { - device_t child = dev; - struct dpaa2_con_softc *sc = device_get_softc(dev); - - DPAA2_CMD_CON_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->con_token)); - DPAA2_CMD_RC_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->rc_token)); - dpaa2_mcp_free_command(sc->cmd); - - sc->cmd = NULL; - sc->con_token = 0; - sc->rc_token = 0; - + /* TBD */ return (0); } @@ -125,6 +115,8 @@ dpaa2_con_attach(device_t dev) struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); struct dpaa2_devinfo *dinfo = device_get_ivars(dev); struct dpaa2_devinfo *mcp_dinfo; + struct dpaa2_cmd cmd; + uint16_t rc_token, con_token; int error; sc->dev = dev; @@ -133,7 +125,7 @@ dpaa2_con_attach(device_t dev) if (error) { device_printf(dev, "%s: failed to allocate resources: " "error=%d\n", __func__, error); - return (ENXIO); + goto err_exit; } /* Obtain MC portal. */ @@ -141,57 +133,48 @@ dpaa2_con_attach(device_t dev) mcp_dinfo = device_get_ivars(mcp_dev); dinfo->portal = mcp_dinfo->portal; - /* Allocate a command to send to MC hardware. */ - error = dpaa2_mcp_init_command(&sc->cmd, DPAA2_CMD_DEF); - if (error) { - device_printf(dev, "Failed to allocate dpaa2_cmd: error=%d\n", - error); - goto err_exit; - } + DPAA2_CMD_INIT(&cmd); - /* Open resource container and DPCON object. */ - error = DPAA2_CMD_RC_OPEN(dev, child, sc->cmd, rcinfo->id, - &sc->rc_token); + error = DPAA2_CMD_RC_OPEN(dev, child, &cmd, rcinfo->id, &rc_token); if (error) { - device_printf(dev, "Failed to open DPRC: error=%d\n", error); - goto err_free_cmd; + device_printf(dev, "%s: failed to open DPRC: error=%d\n", + __func__, error); + goto err_exit; } - error = DPAA2_CMD_CON_OPEN(dev, child, sc->cmd, dinfo->id, - &sc->con_token); + error = DPAA2_CMD_CON_OPEN(dev, child, &cmd, dinfo->id, &con_token); if (error) { - device_printf(dev, "Failed to open DPCON: id=%d, error=%d\n", - dinfo->id, error); - goto err_close_rc; + device_printf(dev, "%s: failed to open DPCON: id=%d, error=%d\n", + __func__, dinfo->id, error); + goto close_rc; } - /* Prepare DPCON object. */ - error = DPAA2_CMD_CON_RESET(dev, child, sc->cmd); + error = DPAA2_CMD_CON_RESET(dev, child, &cmd); if (error) { - device_printf(dev, "Failed to reset DPCON: id=%d, error=%d\n", - dinfo->id, error); - goto err_close_con; + device_printf(dev, "%s: failed to reset DPCON: id=%d, " + "error=%d\n", __func__, dinfo->id, error); + goto close_con; } - error = DPAA2_CMD_CON_GET_ATTRIBUTES(dev, child, sc->cmd, &sc->attr); + error = DPAA2_CMD_CON_GET_ATTRIBUTES(dev, child, &cmd, &sc->attr); if (error) { - device_printf(dev, "Failed to get DPCON attributes: id=%d, " - "error=%d\n", dinfo->id, error); - goto err_close_con; + device_printf(dev, "%s: failed to get DPCON attributes: id=%d, " + "error=%d\n", __func__, dinfo->id, error); + goto close_con; } - /* TODO: Enable debug output via sysctl (to reduce output). */ - if (bootverbose) + if (bootverbose) { device_printf(dev, "chan_id=%d, priorities=%d\n", sc->attr.chan_id, sc->attr.prior_num); + } + (void)DPAA2_CMD_CON_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, con_token)); + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); return (0); - err_close_con: - DPAA2_CMD_CON_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->con_token)); - err_close_rc: - DPAA2_CMD_RC_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->rc_token)); - err_free_cmd: - dpaa2_mcp_free_command(sc->cmd); - err_exit: +close_con: + DPAA2_CMD_CON_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, con_token)); +close_rc: + DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); +err_exit: return (ENXIO); } diff --git a/sys/dev/dpaa2/dpaa2_con.h b/sys/dev/dpaa2/dpaa2_con.h index 82fd50f4eaed..85a492935d46 100644 --- a/sys/dev/dpaa2/dpaa2_con.h +++ b/sys/dev/dpaa2/dpaa2_con.h @@ -58,11 +58,6 @@ struct dpaa2_con_softc { device_t dev; struct resource *res[DPAA2_CON_MAX_RESOURCES]; struct dpaa2_con_attr attr; - - /* Help to send commands to MC. */ - struct dpaa2_cmd *cmd; - uint16_t rc_token; - uint16_t con_token; }; extern struct resource_spec dpaa2_con_spec[]; diff --git a/sys/dev/dpaa2/dpaa2_io.c b/sys/dev/dpaa2/dpaa2_io.c index e2b7992bfdb6..b644516308b2 100644 --- a/sys/dev/dpaa2/dpaa2_io.c +++ b/sys/dev/dpaa2/dpaa2_io.c @@ -127,50 +127,68 @@ dpaa2_io_probe(device_t dev) static int dpaa2_io_detach(device_t dev) { + device_t pdev = device_get_parent(dev); device_t child = dev; struct dpaa2_io_softc *sc = device_get_softc(dev); + struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); struct dpaa2_devinfo *dinfo = device_get_ivars(dev); + struct dpaa2_cmd cmd; + uint16_t rc_token, io_token; int error; + DPAA2_CMD_INIT(&cmd); + /* Tear down interrupt handler and release IRQ resources. */ dpaa2_io_release_irqs(dev); /* Free software portal helper object. */ dpaa2_swp_free_portal(sc->swp); - /* Disable DPIO object. */ - error = DPAA2_CMD_IO_DISABLE(dev, child, dpaa2_mcp_tk(sc->cmd, - sc->io_token)); - if (error && bootverbose) + error = DPAA2_CMD_RC_OPEN(dev, child, &cmd, rcinfo->id, &rc_token); + if (error) { + device_printf(dev, "%s: failed to open DPRC: error=%d\n", + __func__, error); + goto err_exit; + } + error = DPAA2_CMD_IO_OPEN(dev, child, &cmd, dinfo->id, &io_token); + if (error) { + device_printf(dev, "%s: failed to open DPIO: id=%d, error=%d\n", + __func__, dinfo->id, error); + goto close_rc; + } + + error = DPAA2_CMD_IO_DISABLE(dev, child, &cmd); + if (error && bootverbose) { device_printf(dev, "%s: failed to disable DPIO: id=%d, " "error=%d\n", __func__, dinfo->id, error); + } - /* Close control sessions with the DPAA2 objects. */ - DPAA2_CMD_IO_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->io_token)); - DPAA2_CMD_RC_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->rc_token)); - - /* Free pre-allocated MC command. */ - dpaa2_mcp_free_command(sc->cmd); - sc->cmd = NULL; - sc->io_token = 0; - sc->rc_token = 0; + (void)DPAA2_CMD_IO_CLOSE(dev, child, &cmd); + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); /* Unmap memory resources of the portal. */ for (int i = 0; i < MEM_RES_NUM; i++) { - if (sc->res[MEM_RID(i)] == NULL) + if (sc->res[MEM_RID(i)] == NULL) { continue; + } error = bus_unmap_resource(sc->dev, SYS_RES_MEMORY, sc->res[MEM_RID(i)], &sc->map[MEM_RID(i)]); - if (error && bootverbose) + if (error && bootverbose) { device_printf(dev, "%s: failed to unmap memory " "resource: rid=%d, error=%d\n", __func__, MEM_RID(i), error); + } } /* Release allocated resources. */ bus_release_resources(dev, dpaa2_io_spec, sc->res); return (0); + +close_rc: + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); +err_exit: + return (error); } static int @@ -183,6 +201,7 @@ dpaa2_io_attach(device_t dev) struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); struct dpaa2_devinfo *dinfo = device_get_ivars(dev); struct dpaa2_devinfo *mcp_dinfo; + struct dpaa2_cmd cmd; struct resource_map_request req; struct { vm_memattr_t memattr; @@ -192,11 +211,11 @@ dpaa2_io_attach(device_t dev) { VM_MEMATTR_DEVICE, "cache-inhibited part" }, { VM_MEMATTR_DEVICE, "control registers" } }; + uint16_t rc_token, io_token; int error; sc->dev = dev; sc->swp = NULL; - sc->cmd = NULL; sc->intr = NULL; sc->irq_resource = NULL; @@ -215,8 +234,9 @@ dpaa2_io_attach(device_t dev) /* Map memory resources of the portal. */ for (int i = 0; i < MEM_RES_NUM; i++) { - if (sc->res[MEM_RID(i)] == NULL) + if (sc->res[MEM_RID(i)] == NULL) { continue; + } resource_init_map_request(&req); req.memattr = map_args[i].memattr; @@ -229,45 +249,37 @@ dpaa2_io_attach(device_t dev) } } - /* Allocate a command to send to the MC hardware. */ - error = dpaa2_mcp_init_command(&sc->cmd, DPAA2_CMD_DEF); - if (error) { - device_printf(dev, "%s: failed to allocate dpaa2_cmd: " - "error=%d\n", __func__, error); - goto err_exit; - } + DPAA2_CMD_INIT(&cmd); - /* Prepare DPIO object. */ - error = DPAA2_CMD_RC_OPEN(dev, child, sc->cmd, rcinfo->id, - &sc->rc_token); + error = DPAA2_CMD_RC_OPEN(dev, child, &cmd, rcinfo->id, &rc_token); if (error) { device_printf(dev, "%s: failed to open DPRC: error=%d\n", __func__, error); goto err_exit; } - error = DPAA2_CMD_IO_OPEN(dev, child, sc->cmd, dinfo->id, &sc->io_token); + error = DPAA2_CMD_IO_OPEN(dev, child, &cmd, dinfo->id, &io_token); if (error) { device_printf(dev, "%s: failed to open DPIO: id=%d, error=%d\n", __func__, dinfo->id, error); - goto err_exit; + goto close_rc; } - error = DPAA2_CMD_IO_RESET(dev, child, sc->cmd); + error = DPAA2_CMD_IO_RESET(dev, child, &cmd); if (error) { device_printf(dev, "%s: failed to reset DPIO: id=%d, error=%d\n", __func__, dinfo->id, error); - goto err_exit; + goto close_io; } - error = DPAA2_CMD_IO_GET_ATTRIBUTES(dev, child, sc->cmd, &sc->attr); + error = DPAA2_CMD_IO_GET_ATTRIBUTES(dev, child, &cmd, &sc->attr); if (error) { device_printf(dev, "%s: failed to get DPIO attributes: id=%d, " "error=%d\n", __func__, dinfo->id, error); - goto err_exit; + goto close_io; } - error = DPAA2_CMD_IO_ENABLE(dev, child, sc->cmd); + error = DPAA2_CMD_IO_ENABLE(dev, child, &cmd); if (error) { device_printf(dev, "%s: failed to enable DPIO: id=%d, " "error=%d\n", __func__, dinfo->id, error); - goto err_exit; + goto close_io; } /* Prepare descriptor of the QBMan software portal. */ @@ -306,18 +318,23 @@ dpaa2_io_attach(device_t dev) goto err_exit; } -#if 0 - /* TODO: Enable debug output via sysctl (to reduce output). */ - if (bootverbose) + if (bootverbose) { device_printf(dev, "dpio_id=%d, swp_id=%d, chan_mode=%s, " "notif_priors=%d, swp_version=0x%x\n", sc->attr.id, sc->attr.swp_id, sc->attr.chan_mode == DPAA2_IO_LOCAL_CHANNEL ? "local_channel" : "no_channel", sc->attr.priors_num, sc->attr.swp_version); -#endif + } + + (void)DPAA2_CMD_IO_CLOSE(dev, child, &cmd); + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); return (0); +close_io: + (void)DPAA2_CMD_IO_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, io_token)); +close_rc: + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); err_exit: dpaa2_io_detach(dev); return (ENXIO); @@ -354,10 +371,11 @@ dpaa2_io_conf_wq_channel(device_t iodev, struct dpaa2_io_notif_ctx *ctx) struct dpaa2_io_softc *sc = device_get_softc(iodev); /* Enable generation of the CDAN notifications. */ - if (ctx->cdan_en) + if (ctx->cdan_en) { return (dpaa2_swp_conf_wq_channel(sc->swp, ctx->fq_chan_id, DPAA2_WQCHAN_WE_EN | DPAA2_WQCHAN_WE_CTX, ctx->cdan_en, ctx->qman_ctx)); + } return (0); } diff --git a/sys/dev/dpaa2/dpaa2_io.h b/sys/dev/dpaa2/dpaa2_io.h index d02dab8144df..13def050fffb 100644 --- a/sys/dev/dpaa2/dpaa2_io.h +++ b/sys/dev/dpaa2/dpaa2_io.h @@ -92,11 +92,6 @@ struct dpaa2_io_softc { struct dpaa2_swp *swp; struct dpaa2_io_attr attr; - /* Help to send commands to MC. */ - struct dpaa2_cmd *cmd; - uint16_t rc_token; - uint16_t io_token; - struct resource *res[DPAA2_IO_MAX_RESOURCES]; struct resource_map map[DPAA2_IO_MAX_RESOURCES]; diff --git a/sys/dev/dpaa2/dpaa2_mac.c b/sys/dev/dpaa2/dpaa2_mac.c index d6e381c0dd15..990286e53bfa 100644 --- a/sys/dev/dpaa2/dpaa2_mac.c +++ b/sys/dev/dpaa2/dpaa2_mac.c @@ -118,6 +118,8 @@ dpaa2_mac_attach(device_t dev) struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); struct dpaa2_devinfo *dinfo = device_get_ivars(dev); struct dpaa2_devinfo *mcp_dinfo; + struct dpaa2_cmd cmd; + uint16_t rc_token, mac_token; int error; sc->dev = dev; @@ -128,7 +130,7 @@ dpaa2_mac_attach(device_t dev) if (error) { device_printf(dev, "%s: failed to allocate resources: " "error=%d\n", __func__, error); - return (ENXIO); + goto err_exit; } /* Obtain MC portal. */ @@ -136,42 +138,33 @@ dpaa2_mac_attach(device_t dev) mcp_dinfo = device_get_ivars(mcp_dev); dinfo->portal = mcp_dinfo->portal; - /* Allocate a command to send to MC hardware. */ - error = dpaa2_mcp_init_command(&sc->cmd, DPAA2_CMD_DEF); + DPAA2_CMD_INIT(&cmd); + + error = DPAA2_CMD_RC_OPEN(dev, child, &cmd, rcinfo->id, &rc_token); if (error) { - device_printf(dev, "Failed to allocate dpaa2_cmd: error=%d\n", - error); + device_printf(dev, "%s: failed to open DPRC: error=%d\n", + __func__, error); goto err_exit; } - - /* Open resource container and DPMAC object. */ - error = DPAA2_CMD_RC_OPEN(dev, child, sc->cmd, rcinfo->id, - &sc->rc_token); + error = DPAA2_CMD_MAC_OPEN(dev, child, &cmd, dinfo->id, &mac_token); if (error) { - device_printf(dev, "Failed to open DPRC: error=%d\n", error); - goto err_free_cmd; + device_printf(dev, "%s: failed to open DPMAC: id=%d, error=%d\n", + __func__, dinfo->id, error); + goto close_rc; } - error = DPAA2_CMD_MAC_OPEN(dev, child, sc->cmd, dinfo->id, - &sc->mac_token); + + error = DPAA2_CMD_MAC_GET_ATTRIBUTES(dev, child, &cmd, &sc->attr); if (error) { - device_printf(dev, "Failed to open DPMAC: id=%d, error=%d\n", - dinfo->id, error); - goto err_close_rc; + device_printf(dev, "%s: failed to get DPMAC attributes: id=%d, " + "error=%d\n", __func__, dinfo->id, error); + goto close_mac; } - - error = DPAA2_CMD_MAC_GET_ATTRIBUTES(dev, child, sc->cmd, &sc->attr); + error = DPAA2_CMD_MAC_GET_ADDR(dev, child, &cmd, sc->addr); if (error) { - device_printf(dev, "Failed to get DPMAC attributes: id=%d, " - "error=%d\n", dinfo->id, error); - goto err_close_mac; + device_printf(dev, "%s: failed to get physical address: " + "error=%d\n", __func__, error); } - error = DPAA2_CMD_MAC_GET_ADDR(dev, child, sc->cmd, sc->addr); - if (error) - device_printf(dev, "Failed to get physical address: error=%d\n", - error); - /* - * TODO: Enable debug output via sysctl. - */ + if (bootverbose) { device_printf(dev, "ether %6D\n", sc->addr, ":"); device_printf(dev, "max_rate=%d, eth_if=%s, link_type=%s\n", @@ -182,18 +175,19 @@ dpaa2_mac_attach(device_t dev) error = dpaa2_mac_setup_irq(dev); if (error) { - device_printf(dev, "Failed to setup IRQs: error=%d\n", error); - goto err_close_mac; + device_printf(dev, "%s: failed to setup IRQs: error=%d\n", + __func__, error); + goto close_mac; } + (void)DPAA2_CMD_MAC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, mac_token)); + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); return (0); -err_close_mac: - DPAA2_CMD_MAC_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->mac_token)); -err_close_rc: - DPAA2_CMD_RC_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->rc_token)); -err_free_cmd: - dpaa2_mcp_free_command(sc->cmd); +close_mac: + (void)DPAA2_CMD_MAC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, mac_token)); +close_rc: + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); err_exit: return (ENXIO); } @@ -201,17 +195,7 @@ err_exit: static int dpaa2_mac_detach(device_t dev) { - device_t child = dev; - struct dpaa2_mac_softc *sc = device_get_softc(dev); - - DPAA2_CMD_MAC_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->mac_token)); - DPAA2_CMD_RC_CLOSE(dev, child, dpaa2_mcp_tk(sc->cmd, sc->rc_token)); - dpaa2_mcp_free_command(sc->cmd); - - sc->cmd = NULL; - sc->rc_token = 0; - sc->mac_token = 0; - + /* TBD */ return (0); } @@ -221,53 +205,80 @@ dpaa2_mac_detach(device_t dev) static int dpaa2_mac_setup_irq(device_t dev) { + device_t pdev = device_get_parent(dev); device_t child = dev; struct dpaa2_mac_softc *sc = device_get_softc(dev); - struct dpaa2_cmd *cmd = sc->cmd; - uint16_t mac_token = sc->mac_token; + struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); + struct dpaa2_devinfo *dinfo = device_get_ivars(dev); + struct dpaa2_cmd cmd; + uint16_t rc_token, mac_token; uint32_t irq_mask; int error; - /* Configure IRQs. */ error = dpaa2_mac_setup_msi(sc); if (error) { - device_printf(dev, "Failed to allocate MSI\n"); - return (error); + device_printf(dev, "%s: failed to allocate MSI\n", __func__); + goto err_exit; } if ((sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid[0], RF_ACTIVE | RF_SHAREABLE)) == NULL) { - device_printf(dev, "Failed to allocate IRQ resource\n"); - return (ENXIO); + device_printf(dev, "%s: failed to allocate IRQ resource\n", + __func__); + error = ENXIO; + goto err_exit; } if (bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE, NULL, dpaa2_mac_intr, sc, &sc->intr)) { - device_printf(dev, "Failed to setup IRQ resource\n"); - return (ENXIO); + device_printf(dev, "%s: failed to setup IRQ resource\n", + __func__); + error = ENXIO; + goto err_exit; + } + + DPAA2_CMD_INIT(&cmd); + + error = DPAA2_CMD_RC_OPEN(dev, child, &cmd, rcinfo->id, &rc_token); + if (error) { + device_printf(dev, "%s: failed to open DPRC: error=%d\n", + __func__, error); + goto err_exit; + } + error = DPAA2_CMD_MAC_OPEN(dev, child, &cmd, dinfo->id, &mac_token); + if (error) { + device_printf(dev, "%s: failed to open DPMAC: id=%d, error=%d\n", + __func__, dinfo->id, error); + goto close_rc; } - /* Configure DPNI to generate interrupts. */ irq_mask = DPMAC_IRQ_LINK_CFG_REQ | DPMAC_IRQ_LINK_CHANGED | DPMAC_IRQ_LINK_UP_REQ | DPMAC_IRQ_LINK_DOWN_REQ | DPMAC_IRQ_EP_CHANGED; - error = DPAA2_CMD_MAC_SET_IRQ_MASK(dev, child, dpaa2_mcp_tk(cmd, - mac_token), DPMAC_IRQ_INDEX, irq_mask); + error = DPAA2_CMD_MAC_SET_IRQ_MASK(dev, child, &cmd, DPMAC_IRQ_INDEX, + irq_mask); if (error) { - device_printf(dev, "Failed to set IRQ mask\n"); - return (error); + device_printf(dev, "%s: failed to set IRQ mask\n", __func__); + goto close_mac; } - - /* Enable IRQ. */ - error = DPAA2_CMD_MAC_SET_IRQ_ENABLE(dev, child, cmd, DPMAC_IRQ_INDEX, + error = DPAA2_CMD_MAC_SET_IRQ_ENABLE(dev, child, &cmd, DPMAC_IRQ_INDEX, true); if (error) { - device_printf(dev, "Failed to enable IRQ\n"); - return (error); + device_printf(dev, "%s: failed to enable IRQ\n", __func__); + goto close_mac; } + (void)DPAA2_CMD_MAC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, mac_token)); + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); return (0); + +close_mac: + (void)DPAA2_CMD_MAC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, mac_token)); +close_rc: + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); +err_exit: + return (error); } /** @@ -297,15 +308,42 @@ static void dpaa2_mac_intr(void *arg) { struct dpaa2_mac_softc *sc = (struct dpaa2_mac_softc *) arg; - device_t child = sc->dev; + device_t pdev = device_get_parent(sc->dev); + device_t dev = sc->dev; + device_t child = dev; + struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); + struct dpaa2_devinfo *dinfo = device_get_ivars(dev); + struct dpaa2_cmd cmd; uint32_t status = ~0u; /* clear all IRQ status bits */ + uint16_t rc_token, mac_token; int error; - error = DPAA2_CMD_MAC_GET_IRQ_STATUS(sc->dev, child, - dpaa2_mcp_tk(sc->cmd, sc->mac_token), DPMAC_IRQ_INDEX, &status); - if (error) + DPAA2_CMD_INIT(&cmd); + + error = DPAA2_CMD_RC_OPEN(dev, child, &cmd, rcinfo->id, &rc_token); + if (error) { + device_printf(dev, "%s: failed to open DPRC: error=%d\n", + __func__, error); + goto err_exit; + } + error = DPAA2_CMD_MAC_OPEN(dev, child, &cmd, dinfo->id, &mac_token); + if (error) { + device_printf(dev, "%s: failed to open DPMAC: id=%d, error=%d\n", + __func__, dinfo->id, error); + goto close_rc; + } + error = DPAA2_CMD_MAC_GET_IRQ_STATUS(dev, child, &cmd, DPMAC_IRQ_INDEX, + &status); + if (error) { device_printf(sc->dev, "%s: failed to obtain IRQ status: " "error=%d\n", __func__, error); + } + + (void)DPAA2_CMD_MAC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, mac_token)); +close_rc: + (void)DPAA2_CMD_RC_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, rc_token)); +err_exit: + return; } static const char * diff --git a/sys/dev/dpaa2/dpaa2_mac.h b/sys/dev/dpaa2/dpaa2_mac.h index cbdf2d824045..d31513e725c4 100644 --- a/sys/dev/dpaa2/dpaa2_mac.h +++ b/sys/dev/dpaa2/dpaa2_mac.h @@ -108,12 +108,6 @@ struct dpaa2_mac_softc { struct resource *res[DPAA2_MAC_MAX_RESOURCES]; struct dpaa2_mac_attr attr; - /* Help to send commands to MC. */ - struct dpaa2_cmd *cmd; - uint16_t rc_token; - uint16_t mac_token; - - /* Interrupts. */ int irq_rid[DPAA2_MAC_MSI_COUNT]; struct resource *irq_res; void *intr; /* interrupt handle */ diff --git a/sys/dev/dpaa2/dpaa2_mcp.c b/sys/dev/dpaa2/dpaa2_mcp.c index f41d9a7d21b0..9d24463413f3 100644 --- a/sys/dev/dpaa2/dpaa2_mcp.c +++ b/sys/dev/dpaa2/dpaa2_mcp.c @@ -108,54 +108,14 @@ dpaa2_mcp_free_portal(struct dpaa2_mcp *mcp) free(mcp, M_DPAA2_MCP); } -int -dpaa2_mcp_init_command(struct dpaa2_cmd **cmd, uint16_t flags) -{ - const int mflags = flags & DPAA2_CMD_NOWAIT_ALLOC - ? (M_NOWAIT | M_ZERO) : (M_WAITOK | M_ZERO); - struct dpaa2_cmd *c; - struct dpaa2_cmd_header *hdr; - - if (!cmd) - return (DPAA2_CMD_STAT_EINVAL); - - c = malloc(sizeof(struct dpaa2_cmd), M_DPAA2_MCP, mflags); - if (!c) - return (DPAA2_CMD_STAT_NO_MEMORY); - - hdr = (struct dpaa2_cmd_header *) &c->header; - hdr->srcid = 0; - hdr->status = DPAA2_CMD_STAT_OK; - hdr->token = 0; - hdr->cmdid = 0; - hdr->flags_hw = DPAA2_CMD_DEF; - hdr->flags_sw = DPAA2_CMD_DEF; - if (flags & DPAA2_CMD_HIGH_PRIO) - hdr->flags_hw |= DPAA2_HW_FLAG_HIGH_PRIO; - if (flags & DPAA2_CMD_INTR_DIS) - hdr->flags_sw |= DPAA2_SW_FLAG_INTR_DIS; - for (uint32_t i = 0; i < DPAA2_CMD_PARAMS_N; i++) - c->params[i] = 0; - *cmd = c; - - return (0); -} - -void -dpaa2_mcp_free_command(struct dpaa2_cmd *cmd) -{ - if (cmd != NULL) - free(cmd, M_DPAA2_MCP); -} - struct dpaa2_cmd * dpaa2_mcp_tk(struct dpaa2_cmd *cmd, uint16_t token) { struct dpaa2_cmd_header *hdr; - if (cmd != NULL) { - hdr = (struct dpaa2_cmd_header *) &cmd->header; - hdr->token = token; - } + KASSERT(cmd != NULL, ("%s: cmd is NULL", __func__)); + + hdr = (struct dpaa2_cmd_header *) &cmd->header; + hdr->token = token; return (cmd); } @@ -163,15 +123,16 @@ struct dpaa2_cmd * dpaa2_mcp_f(struct dpaa2_cmd *cmd, uint16_t flags) { struct dpaa2_cmd_header *hdr; - if (cmd) { - hdr = (struct dpaa2_cmd_header *) &cmd->header; - hdr->flags_hw = DPAA2_CMD_DEF; - hdr->flags_sw = DPAA2_CMD_DEF; - - if (flags & DPAA2_CMD_HIGH_PRIO) - hdr->flags_hw |= DPAA2_HW_FLAG_HIGH_PRIO; - if (flags & DPAA2_CMD_INTR_DIS) - hdr->flags_sw |= DPAA2_SW_FLAG_INTR_DIS; + KASSERT(cmd != NULL, ("%s: cmd is NULL", __func__)); + + hdr = (struct dpaa2_cmd_header *) &cmd->header; + hdr->flags_hw = DPAA2_CMD_DEF; + hdr->flags_sw = DPAA2_CMD_DEF; + if (flags & DPAA2_CMD_HIGH_PRIO) { + hdr->flags_hw |= DPAA2_HW_FLAG_HIGH_PRIO; + } + if (flags & DPAA2_CMD_INTR_DIS) { + hdr->flags_sw |= DPAA2_SW_FLAG_INTR_DIS; } return (cmd); } @@ -198,7 +159,7 @@ dpaa2_mcp_attach(device_t dev) struct dpaa2_mcp_softc *sc = device_get_softc(dev); struct dpaa2_devinfo *rcinfo = device_get_ivars(pdev); struct dpaa2_devinfo *dinfo = device_get_ivars(dev); - struct dpaa2_cmd *cmd; + struct dpaa2_cmd cmd; struct dpaa2_mcp *portal; struct resource_map_request req; uint16_t rc_token, mcp_token; @@ -240,61 +201,40 @@ dpaa2_mcp_attach(device_t dev) goto err_exit; } - /* Allocate a command to send to MC hardware. */ - error = dpaa2_mcp_init_command(&cmd, DPAA2_CMD_DEF); - if (error) { - device_printf(dev, "%s: failed to allocate dpaa2_cmd: " - "error=%d\n", __func__, error); - goto err_exit; - } + DPAA2_CMD_INIT(&cmd); *** 2640 LINES SKIPPED *** From nobody Wed Apr 19 15:51: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 4Q1ldr5m88z467Kj; Wed, 19 Apr 2023 15:51: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 4Q1ldr50jQz3qmM; Wed, 19 Apr 2023 15:51:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681919504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7RSAGk8E2RmyZOyfhOkBrZdra4GjFqh4fC7PJUAT2rg=; b=Vequ8XTwvAwf7UgDx6T5a38Tv5tx/Ghy3pPg+3Auzl7oOrsamLU8NY/YQMSe+pwmLOvv87 9DoB7mBt7QkNOFnE6wN1/QpwRGQ6QOe6TaegW8s6Rak+YishvcnRIfxreJc6pGe+szXxrL 8BjuNSQqSXj34kNV8WplQICWRAqyPaYU6rMKfIZEghLkF02IZEZWkeM7nZ56qY1WGMORWV qUK1uVZG272pMRrIi5VYWJLUQpdk1iLqCNWrSZWrZqAuk1HywyQ6ilUulrJjryHQJ+Lifx c9TcLWBrJOZ8XEzDV6IxgN0cbZ0qgnrM4oHPODKMt1M9IfCA2XEmwlixnGoHlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681919504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7RSAGk8E2RmyZOyfhOkBrZdra4GjFqh4fC7PJUAT2rg=; b=qpokwf2g7JS6qOOkvnloURkjXIwzb7d/G+bAyerEGnAJYqYg0dcSOGBk6dl9HSTj0acW/n Yvq1/DaHu80yEbGWWahYSx6ck2wNNV90DRiKu1rEHf+1m0bRIdMHgz90Dg2R/Ea9nDnNu2 tREkNdVrtzY8SrL8QNmxKtTl+ENRmR8E66eJWgSn9P+Guy8snKJyNTDpmEFDhZeZFP560B oR48/A26TsDcKdff7/URYPxCIbuK/h19urCtnUet+L6mnYFrjis7Iwb1pFDND7PLxHEOBa QrTILr+nbaCm7p6rsJJ5axbmfP/uxypHKH88O4zehOEPXqvPpOTPjp65b1Ev+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681919504; a=rsa-sha256; cv=none; b=uaasXnsIyiz81Br6HGr/SmT+miA0FsmW+Z8/lOQAev+mNE3zQn8RvhiinGXYTE+Ggwz8zt NO8qglS5wFp/bZik34y0CwT3aGxvTNrgRAFfCqfvHdDX53wuoZtC8pJnPnfpIS7riYThjU UENuLpHTfbotqLZV1zkNmejvuHt7tT8Sxv0s0FEDeuonuIt80LRSzR/n12df+NjD/n8IYh xz6VeBCpv8Oe4cyYe21S6RO1cDxk8BcY4QQ75fiYrLgRDZW3fqwT2PgRDzVvEF4Gs4KPk7 Keli5PwctDlCUMjMCPx3hoh7m8HOX0J9fphfQelYf7ISMljNqPSZCdxBWvzMjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1ldr43Bnz10ds; Wed, 19 Apr 2023 15:51: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 33JFpiEi034053; Wed, 19 Apr 2023 15:51:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JFpikJ034052; Wed, 19 Apr 2023 15:51:44 GMT (envelope-from git) Date: Wed, 19 Apr 2023 15:51:44 GMT Message-Id: <202304191551.33JFpikJ034052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Antoine Brodin Subject: git: 437f05885047 - main - ObsoleteFiles.inc: add more obsolete 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: antoine X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 437f05885047c533cadf15b564729cfd0273d2fe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by antoine: URL: https://cgit.FreeBSD.org/src/commit/?id=437f05885047c533cadf15b564729cfd0273d2fe commit 437f05885047c533cadf15b564729cfd0273d2fe Author: Antoine Brodin AuthorDate: 2023-04-19 15:51:19 +0000 Commit: Antoine Brodin CommitDate: 2023-04-19 15:51:19 +0000 ObsoleteFiles.inc: add more obsolete files --- ObsoleteFiles.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index ca7d0ac0f60f..3b3141d15629 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20230331: libpcap updated to 1.10.3 +OLD_FILES+=usr/include/fmtutils.h + # 20230329: libcasper libraries moved to /lib MOVED_LIBS+=lib/casper/libcap_dns.so.2 MOVED_LIBS+=lib/casper/libcap_fileargs.so.1 @@ -67,6 +70,9 @@ OLD_DIRS+=lib/casper # 20230324: libvmmapi shlib version bumped to 6 OLD_LIBS+=usr/lib/libvmmapi.so.5 +# 20230323: tzdata 2023a imported +OLD_FILES+=usr/share/zoneinfo/posixrules + # 20230320: vcount.9 removed OLD_FILES+=usr/share/man/man9/count_dev.9.gz OLD_FILES+=usr/share/man/man9/vcount.9.gz @@ -83,6 +89,12 @@ OLD_FILES+=usr/tests/bin/pkill/pkill-U_test # 20230309: remove remaining ATM support OLD_FILES+=usr/bin/sscop +OLD_FILES+=usr/include/netgraph/atm/ng_ccatm.h +OLD_FILES+=usr/include/netgraph/atm/ng_sscfu.h +OLD_FILES+=usr/include/netgraph/atm/ng_sscop.h +OLD_FILES+=usr/include/netgraph/atm/ng_uni.h +OLD_FILES+=usr/include/netgraph/atm/ngatmbase.h +OLD_FILES+=usr/include/netgraph/ng_atmllc.h OLD_FILES+=usr/include/netnatm/addr.h OLD_FILES+=usr/include/netnatm/api/atmapi.h OLD_FILES+=usr/include/netnatm/api/ccatm.h @@ -563,6 +575,7 @@ OLD_FILES+=usr/bin/opiepasswd OLD_FILES+=usr/bin/otp-md4 OLD_FILES+=usr/bin/otp-md5 OLD_FILES+=usr/bin/otp-sha1 +OLD_FILES+=usr/include/opie.h OLD_FILES+=usr/lib/libopie.a OLD_FILES+=usr/lib/libopie.so OLD_LIBS+=usr/lib/libopie.so.8 @@ -629,6 +642,9 @@ OLD_FILES+=usr/share/man/man9/knlist_init_rw_reader.9.gz OLD_FILES+=usr/bin/minigzip OLD_FILES+=usr/share/man/man1/minigzip.1.gz +# 20220811: MP_WATCHDOG removed +OLD_FILES+=usr/include/machine/mp_watchdog.h + # 20220811: new iconv encoder trait added OLD_LIBS+=usr/lib/i18n/libBIG5.so.4 OLD_LIBS+=usr/lib/i18n/libDECHanyu.so.4 @@ -1655,6 +1671,7 @@ OLD_FILES+=usr/share/man/man3/efi_set_variables_supported.3.gz OLD_FILES+=usr/share/man/man4/meteor.4.gz # 20211125: Old SCSI drivers removed +OLD_FILES+=usr/include/dev/ic/esp.h OLD_FILES+=usr/share/man/man4/amr.4.gz OLD_FILES+=usr/share/man/man4/esp.4.gz OLD_FILES+=usr/share/man/man4/iir.4.gz @@ -5769,6 +5786,9 @@ OLD_FILES+=usr/share/man/man8/ndiscvt.8.gz OLD_FILES+=usr/share/man/man8/ndisgen.8.gz OLD_FILES+=usr/share/misc/windrv_stub.c +# 20210116: openpromio(4) removed +OLD_FILES+=usr/include/dev/ofw/openpromio.h + # 20210116: if_wl_wavelan.h removed .if ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/machine/if_wl_wavelan.h @@ -5778,6 +5798,7 @@ OLD_FILES+=usr/include/machine/if_wl_wavelan.h OLD_FILES+=usr/include/dev/wi/if_wireg.h OLD_FILES+=usr/include/dev/wi/if_wavelan_ieee.h OLD_FILES+=usr/include/dev/wi/if_wivar.h +OLD_FILES+=usr/include/netgraph/bluetooth/include/ng_bt3c.h OLD_FILES+=usr/sbin/bt3cfw OLD_FILES+=usr/share/man/man4/cmw.4.gz OLD_FILES+=usr/share/man/man4/if_wi.4.gz @@ -6061,7 +6082,11 @@ OLD_DIRS+=usr/lib/clang/11.0.0/lib/freebsd OLD_DIRS+=usr/lib/clang/11.0.0/lib OLD_DIRS+=usr/lib/clang/11.0.0 +# 20201226: Siemens SAB 82532 support removed +OLD_FILES+=usr/include/dev/ic/sab82532.h + # 20201225: PMC for Xscale removed +OLD_FILES+=usr/include/dev/hwpmc/hwpmc_xscale.h OLD_FILES+=usr/share/man/man3/pmc.xscale.3.gz # 20201225: libregex removed From nobody Wed Apr 19 15:53: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 4Q1lgS0clMz467fh; Wed, 19 Apr 2023 15:53: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 4Q1lgR5LGkz3t3X; Wed, 19 Apr 2023 15:53:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681919587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0CHeLhpgwfq+MXVqecMkf1RuZ0M47L7kbg1DFG6mvSM=; b=EP7nUjtSyfFHtNWrUxe+RZcHqc84Nra1vwRTPGr+FKDYEI5u5kysGS0Kr/+G7gW2NFzK9H pI6QAglPv5ZkM0080zURKv9MktQh8WFTS+uZfc0ULBdu1N0DtyeBBDTYq+4GZXLx8EwHXL sE4wFMZa8jORdO1Cx7twJ0kgYKfRjshZ/YReckX29b7rEEVkmaZPaNKLivNG5iNwYDpEC3 R+NDNWYDGgQ8WoIhCxA9ZDMeIv/TsZl26dCz7VdU5Si+tyVnfVQy6xpUd8B1OQWufO8yk3 EWX2d0TEurv6UrT5zIBJEQ14CyaRjP/soA1cOiCdCMDxjttTyGqQKP42ZCKVNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681919587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0CHeLhpgwfq+MXVqecMkf1RuZ0M47L7kbg1DFG6mvSM=; b=uqSO8LYV2ncowHuyidLZycT0a1C5KNdJ/RyW+l09mpf7czwxPSwklmpsHGZa5aXOXi0hM6 LPH/AtAfuSjfodJIJv9/r+Y+0skSad+MEv6Puy2Dtx/ktrzHAEaM++RvN3qBp7H2dD2aq5 TQUm37OP488UmH4KxbA3sK4vOmMY1Vcf6Sta7yFOPRDPMa3pup3rHQK8Snua8NTJny8Ezc jDUnv2A67sDDLObHnlNEVncJoALu4kGQETtcI+t5Gd/3nUqZ7/HyJuVlAIW0VEqiZYt3YO 9wU/zToqCjvyB9gCCQgiTmIR/Y7xBOMh/zcuXacePhWZjHZ/SEQQopydC4+0Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681919587; a=rsa-sha256; cv=none; b=a6r0F5KUOowbCNVGORM3tof9EZvfPejBtXL00GfKlHpWmj1dtobXk2DjsFcnhgBmmWkQG8 JW6i6tFwx9tJ3oUzWoCxGHTujo6yRxTVJx62wLP5BmsORpp/HkS/UqCk5ADUxd0MjMy4wE Kt+KUr9oPhEUo1rhn8vzYiSyivKheHGOuTdaapJ0SRnWB5Pcrj0YU2rrihmYrk8NEgWhdb tEqCQ//Qae9O6mTpux2fclF25DXE8X5t0XLLusHZ0W26bNtE70J7FCQADCbuBoN4UP5vMb 51Wl6LVz3mXtm2VJor3bcl/cFnVnlD1CsGCnxSngWpG03WiEqxxmHhK8JITgrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1lgR4LTpz11VB; Wed, 19 Apr 2023 15:53: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 33JFr7u0040151; Wed, 19 Apr 2023 15:53:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JFr7mp040150; Wed, 19 Apr 2023 15:53:07 GMT (envelope-from git) Date: Wed, 19 Apr 2023 15:53:07 GMT Message-Id: <202304191553.33JFr7mp040150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 12e99b63d2fa - main - ofed: Fix a logic inversion from IfAPI conversion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12e99b63d2fae07fc54e53d9187a3995a2005ec9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=12e99b63d2fae07fc54e53d9187a3995a2005ec9 commit 12e99b63d2fae07fc54e53d9187a3995a2005ec9 Author: Justin Hibbits AuthorDate: 2023-04-19 15:21:32 +0000 Commit: Justin Hibbits CommitDate: 2023-04-19 15:56:25 +0000 ofed: Fix a logic inversion from IfAPI conversion Reported by: bartosz.sobczak_intel.com Fixes: 3e142e07675b ("ofed: Mechanically convert to IfAPI") Sponsored by: Juniper Networks, Inc. --- sys/ofed/include/rdma/ib_addr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ofed/include/rdma/ib_addr.h b/sys/ofed/include/rdma/ib_addr.h index d7930eff66f1..2af055ea8950 100644 --- a/sys/ofed/include/rdma/ib_addr.h +++ b/sys/ofed/include/rdma/ib_addr.h @@ -180,7 +180,7 @@ static inline u16 rdma_vlan_dev_vlan_id(if_t dev) { uint16_t tag; - if (if_gettype(dev) != IFT_ETHER || if_getpcp(dev) == IFNET_PCP_NONE) + if (if_gettype(dev) == IFT_ETHER && if_getpcp(dev) != IFNET_PCP_NONE) return 0x0000; /* prio-tagged traffic */ if (VLAN_TAG(__DECONST(if_t, dev), &tag) != 0) return 0xffff; From nobody Wed Apr 19 16:02: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 4Q1lt90rRFz4684C; Wed, 19 Apr 2023 16:02: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 4Q1lt901Z1z48lj; Wed, 19 Apr 2023 16:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681920145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=poTw6JjEXawvtJOUnBCytYCgHl25wmYjlVxWYGPE7l0=; b=p8mPHRXLYfoZ7q6RHqe2a+jP9mJKEfaQuY9R4fKAmNzHuqWd+BZfesMiUlMt3oUl/WTmBc JgYaxRUFYBKQcvXkgEXiE0btcE5/sSXobcybn5mSTRlx7tvy4uWn5p0fJyTL8grDf8I+4Q Bvj6o2ftWsp5HZCL9FyOXqmGPp1xwBs0euaSQ1DqnoW/1EMXhXO4qOjqP0XKbUFSiyX5BC 9ppa+XezurTm/uXlDvLAeJX5WZFR2E8JV13F1e+a5mIpinHv0a4jPqjzhm0bDTpiPOOG9a btA1DYZYEJTSlswzMvsMTWH+yfo1Ywv+6BfoOYTxOOAVjQP425Coc3wPKHoC9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681920145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=poTw6JjEXawvtJOUnBCytYCgHl25wmYjlVxWYGPE7l0=; b=hPJuB4wt1B0IwBkbgQx8pS3c0tTPZvSh4wtwVL2+hk7BCqC4oz965KVB91P3LtcNQ3wAZe vqmA438bpElpS0m27KcYZbomUUQawMJQwInABz/viHqALTuyPwizCg64tsVNWjBxbHmuVT z8MTiN/xPXaG/gG1cEgH97VqVWA7AOFizJA4mbsQCiOK45rBFA1RS9ISZhn8U/5tU83Lxi BUW9l/fpgLR4+E0v7vxlXAs5lKg25Ov5n3TOp96N4y6Cei+sVFSS/stISs6swuvU2b1ZLy BO1OXH7QQX0c5c6pzp1YqbSQn0In600WsSXu7GRnltQufXPCQ3GhjJqX8BAw5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681920145; a=rsa-sha256; cv=none; b=p8jxtnc0fN4rujNr4hylGIDEqwkU3oDFSrTxeoSQyvpM7dg2bnfmwcJNgDmS4CwOxZoXIJ 1JIZPc3j/cg8621q6XOKCOheJWjunHJAbcOI1m26AQkidbwC+nJtZjaRbPCAlvUQ5ArTKI 9/R1UKOjBeOg+7nXNgJ0URouW5VIXzrcGi8Rj7HyAaln5N2jVWflyBgZC/ttU/hJiEXELw Z3YDkNNBxL5OIteLlzDmi7vcJJDl93+J6MMNuSvCtkobuknr+HloBjgZMCS8ZWYXll4z9d KZPVmjGnA3kpZOHK0RKYLrKcsBhgYUpGqSzvNzGmOA49nIjfkeD4Z7reIm1VCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1lt86CJrz11mM; Wed, 19 Apr 2023 16:02: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 33JG2OnC057026; Wed, 19 Apr 2023 16:02:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JG2OC3057025; Wed, 19 Apr 2023 16:02:24 GMT (envelope-from git) Date: Wed, 19 Apr 2023 16:02:24 GMT Message-Id: <202304191602.33JG2OC3057025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 1a2249ff0bd3 - main - include: add a check-ldirs target List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a2249ff0bd3ce88c50bf64a573874fbe75d6026 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1a2249ff0bd3ce88c50bf64a573874fbe75d6026 commit 1a2249ff0bd3ce88c50bf64a573874fbe75d6026 Author: Brooks Davis AuthorDate: 2023-04-19 15:58:06 +0000 Commit: Brooks Davis CommitDate: 2023-04-19 15:58:06 +0000 include: add a check-ldirs target This target ensures all LDIRS, LSUBDIRS, and LSUBSUBDIRS actually exist. Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D39006 --- include/Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/Makefile b/include/Makefile index 24f2ed6c2a64..20d735394d9d 100644 --- a/include/Makefile +++ b/include/Makefile @@ -486,3 +486,16 @@ HOST_MACHINE_ARCH!= uname -p MACHINE:= ${HOST_MACHINE} MACHINE_ARCH:= ${HOST_MACHINE_ARCH} .endif + +check-ldirs: + missing_dirs=""; \ + for dir in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS}; do \ + if [ ! -d ${SRCTOP}/sys/$$dir ]; then \ + echo "${SRCTOP}/sys/$$dir"; \ + missing_dirs="$$missing_dirs $$dir"; \ + fi; \ + done; \ + if [ -n "$$missing_dirs" ]; then \ + echo "Nonexistant directories:" $$missing_dirs; \ + false; \ + fi From nobody Wed Apr 19 16:02: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 4Q1ltB3v2qz4688Z; Wed, 19 Apr 2023 16:02: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 4Q1ltB14xKz48vs; Wed, 19 Apr 2023 16:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681920146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cb5fqkm1rdZ1WFrLFGQ+k1sh5Gzk4L72zCC8KHPBxq4=; b=HJVamW1Sx1DanW19HzQbB8bfXdBAJXgOKNgUcyxAX1h9shqU4cd2ocgzJqaP/rJNneod4X qhg7KJqXnlnx0Cdiz1STklmUwU2zHN0Tu05/nYltVasWVQe/ZJx1gawvP/N320G+32INtT K9tZTqoGkMiLn0myAh4/wD/01mclcqwX645R7rabmOxiK1WzXT5jWXNvNQLPofEri7ve0T lM4vDPTeO8MSn/F8SzmO0G0CSOTm5iFpX/7j/D/lfLAeSNbylunaW9i0jMFGza1UkXqxNP elCswuf1hgj7T6oNHqDox3QCJU855TToIXkKu85F17Q3rbQSJkN0kKMhtyS/ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681920146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cb5fqkm1rdZ1WFrLFGQ+k1sh5Gzk4L72zCC8KHPBxq4=; b=TM041DlPv+THPE5uFgO5FPLOmD09N6VgSeHyLFN5vEdBGYCr2aSCJwTdhalkQISDsd6dAV 9mdZp2gLr0vBo/JA7LCKcOM/UkQtdV3bGfqacwj/R+/yRAg0CrJbul9SLwyd8t5nj3k360 UcwJ1tmlzbadlox6fIBHoMmvwuEP2N/tQYegFDfG+P6ezMPkM2/P0xykehZmoK+KCnzbgk 7NN/r3FSZXH5RL+/6ijJzbfehQa4Bp6u2A/jQ5w1iyxb+io2jyRDCzbZRtz+M0Ms3aBwRy x9TUK7VZoSXfMQadTFvxbZmHCuQhfHbhImY8hDT+1kDqYiCrpLNB3YB+UNcZrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681920146; a=rsa-sha256; cv=none; b=cWL+Nx/yL8+OAzEVffFaRY/37lE0X9ER6xAKgPiiO6UMzTVXlP8w2UYRmC1fEtkVfLBkGD q++EK80YBrw93anzlRbKW84MJXZmIC/mU4gaHBRn3Q4b8oRbfMG+qwTzCe2QCXoaZpr2Q5 R2KEmzICWNhd58mPFy08HI3yULuGxWiboMcx4v28ffDM9nJ2j6T/VLNayTk0fBR9uJSHP2 KFahFb5UxYKY6xI7Gk2I1nbN6caTmKtgGEBSVbelao9l5aPUFE7I9Wh5TFwnW//dSOXLn0 aqSoJkhx4Vvt7p/6+J2BoxScrbI9mLqBMteQnEY7hPXiCjVnrwxz9tjGa7Xtfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1lt974LNz11QC; Wed, 19 Apr 2023 16:02: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 33JG2Pk9057045; Wed, 19 Apr 2023 16:02:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JG2POc057044; Wed, 19 Apr 2023 16:02:25 GMT (envelope-from git) Date: Wed, 19 Apr 2023 16:02:25 GMT Message-Id: <202304191602.33JG2POc057044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 260b2c51b215 - main - Cirrus-CI: Add blank lines between scripts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 260b2c51b2155874047bb55d1e2abef47f960418 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=260b2c51b2155874047bb55d1e2abef47f960418 commit 260b2c51b2155874047bb55d1e2abef47f960418 Author: Brooks Davis AuthorDate: 2023-04-19 15:58:39 +0000 Commit: Brooks Davis CommitDate: 2023-04-19 15:58:39 +0000 Cirrus-CI: Add blank lines between scripts Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39679 --- .cirrus.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index aebad00acef8..7adcaf041758 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -32,6 +32,7 @@ task: timeout_in: 120m install_script: - sh .cirrus-ci/pkg-install.sh ${TOOLCHAIN_PKG} + setup_script: - uname -a - gpart show @@ -40,15 +41,20 @@ task: - pw useradd user - mkdir -p /usr/obj/$(pwd -P) - chown user:user /usr/obj/$(pwd -P) + script: - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes buildworld buildkernel" + package_script: - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" + package_check_script: - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG" + test_script: - sh .cirrus-ci/pkg-install.sh qemu-nox11 - sh tools/boot/ci-qemu-test.sh + post_script: - df -m - du -m -s /usr/obj From nobody Wed Apr 19 16:02: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 4Q1ltC2rQyz46865; Wed, 19 Apr 2023 16:02: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 4Q1ltC1TMpz49SX; Wed, 19 Apr 2023 16:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681920147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uObU55+oCvpIIK7+y95YhXVnuG667T94XM6peY7Ffg8=; b=G6RM4xBHEp+gzlgN+m5jCSX/QV7KKcitq9P1YF6Uxxt6vgVQQgmGNOnD1SNuy6KslhPEPX bM3siMbJIpqk+qimPPyFbHUqxKL+8Na0LjBwhyqHDkkO82FAfC5yv6SlYJ5jtq3XjSkqkB 0mZWJzLnJ+7HmkDfNCXJNvAhKXuBs8dLIYbrN3mrR5DqEY86Ajrhp5XtcTXrbOgusc8Byn Qee4crZ1reQurpsxp6t9jA3KGH/rS5YKsPJcAc352Z0pnk9bqkelOWdEsCdCs7rDKDaTVw QT9wty5YIGPyP64YrBZpJ337D08mllCnj5DJ9SlHhCWb4fe7cdBLU7TZyEiEGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681920147; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uObU55+oCvpIIK7+y95YhXVnuG667T94XM6peY7Ffg8=; b=vuq87qgcrfPtUCbwrlttSfePv4ikBNdd7DGHC8oj6QZ/Y9DdpX8xu9bxNU1YU4BlEl7HK0 5/q23F5HR6b/pXrjjyvigov6mwQKlwXe2/Qwzkao2na74tRfAnzopLgqKKPQ9VadkQzmc8 SRJU615CmrIfiLfgse1TVoV6NF2dPmC1OxKQpDVa9D8C/g77QondQWZ6Zfw3vh8HpJU3nI tOSoll3jiacGuJTKyhk/8vzVeS5IX/DXZU/ei52UQvgfQ1DMzt8W8ki+RVHcX7CZlUThuS DOwqp7vi6eD6JaiD65wyuxgJuu5YazCWMeLXDF7r9oVZbTA4kO9AB2ao+MVRAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681920147; a=rsa-sha256; cv=none; b=wMhu+djmmJWdmVI6tBK0Jitqdl6EFm8Gxq7i/AVuCc+bJSBnAbXI+yzmfWaVXSEWoH7Qgo G81WDZw8X7prWfT/DSJBd7Ts681AzQHyVyT3AQQ1PwdqJ1ZHKQwYPTUvpvQInO0lqiuesk 3adZb/48T3kdubRzC9KLzpFnmBNO/wyecj6Jf20i3AwLiUoflg0JDE3U6XALqrY85m7znF 4itMfweLs8QeOboP/q0ZZg1ym+zCjSYm3aEyysw938VcSiLHnMo4uZ7uVdXogbxsW1f7Fq 2s6UxaIIQ3QClw6FPfuBb3BA5Q5VeJzfx4Tgq94LEXzVb0dmA4IXF9bI/MUkxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1ltC0S81z11n1; Wed, 19 Apr 2023 16:02: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 33JG2Q8M057064; Wed, 19 Apr 2023 16:02:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JG2QB3057063; Wed, 19 Apr 2023 16:02:26 GMT (envelope-from git) Date: Wed, 19 Apr 2023 16:02:26 GMT Message-Id: <202304191602.33JG2QB3057063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b4373ce309c6 - main - Cirrus-CI: Check that make sysent was run List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4373ce309c6d3671ed40ee66cc3d11d619a2430 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b4373ce309c6d3671ed40ee66cc3d11d619a2430 commit b4373ce309c6d3671ed40ee66cc3d11d619a2430 Author: Brooks Davis AuthorDate: 2023-04-19 15:58:46 +0000 Commit: Brooks Davis CommitDate: 2023-04-19 15:58:46 +0000 Cirrus-CI: Check that make sysent was run Run the `make sysent` target and verify that the repo isn't modified afterwards. This ensures that a pushed branch contains all the required bits after a change to syscall.master. Reviewed by: emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D39680 --- .cirrus.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 7adcaf041758..0898554f5296 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -31,7 +31,7 @@ task: TOOLCHAIN_PKG: amd64-gcc12 timeout_in: 120m install_script: - - sh .cirrus-ci/pkg-install.sh ${TOOLCHAIN_PKG} + - sh .cirrus-ci/pkg-install.sh ${TOOLCHAIN_PKG} git-lite setup_script: - uname -a @@ -55,6 +55,11 @@ task: - sh .cirrus-ci/pkg-install.sh qemu-nox11 - sh tools/boot/ci-qemu-test.sh + make_sysent_script: + # Check that make sysent results were committed if required + - make sysent + - if ! git diff --exit-code; then printf "\n>>> Generated sysent files not updated, run make sysent <<<\n"; false; fi + post_script: - df -m - du -m -s /usr/obj From nobody Wed Apr 19 16:02: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 4Q1ltD2FkCz468Bc; Wed, 19 Apr 2023 16:02: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 4Q1ltD1lmdz49T2; Wed, 19 Apr 2023 16:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681920148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNEL/dh73ppb7wKE5/yZ0WmiyZU7A9OEJb9cui4aOgY=; b=e5T481AYtbLZ7lP4/M8AP6O8Dyu7mmuMi4L17p1eUva+qYHrZBr3Gjd5X1/mmm2xvCKmYJ hcd5s2pJkBPYDOrHG8g07LOgkdzYpR/2GS0pdXex3Ghmgyj6lEt1qKTP1EuE0xNdiq+I0c 5Bg2nuAET8Bv34ZYbTVIPORqKyCRRWCrx8I/Vn5BHLEiCbLZB36JNX1v56k/WV3UAIjf4y O2/OL2qFffUZqjzMQvphZvq3s6ad0n4qQ2C4+SvnaPvXTV5giwJdg5p9V25/cyBNZtVVFv o3ndfKoxizq+7ti9jfKHla+80qJUOHrVjNWWchLwaA6rJWGXEUHHU77qm9K/ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681920148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gNEL/dh73ppb7wKE5/yZ0WmiyZU7A9OEJb9cui4aOgY=; b=EEPNW+k8WjF2Q6qUW8QvCf1bmHNzm/1sQOd7WGOnhNuS3VUQfaD2rQyGcKaLpq4B4pzbn7 nVxlSRowSOCyhofnJ6bwLhsIJkhT+pdLo7X1Kz6rca4w9h4SdrI4dVTpZrW3mRcZAbJNie N67aOavOfeCKUA9kAIE52CH4Tr1cy7efwfgzHXxXZT8piGcp4F3abxJaf3se9BGt1TBEoJ bMPp/xcAiLzkv/yHVWCywxr+0giBEC7k0qiFAEsC4khCq4rtbM4iEVRF237TKf8SxJb3B3 6uu31KB5RluxwDvuejz1beYMg+SZVVkwluaO94OalIrOiFgg9vU43U+RLrQZmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681920148; a=rsa-sha256; cv=none; b=km7Q371gEP/sZPvbUbpd9oM/mFg2kh+FEb/c1BjsX1QBbQ8rl1V6HTFnqmmpDFySTCiCc1 x0x4Q/c2638qmTgixV6u1DuFrCEqT2XRQBNW0epcJdeO4vEoRnAjJm/y5EdLoQW4gJatXH sh8Qw5JVmJ8Zqx1uH+b5aeIlyWMNxSIpThuQTIaeLmGpeMOJgEarMwkv3KQFjZm6/yRZID ivj1o2KoeSjqq49eyQrYm/69I6UDrKYe/inTy2D9sYEHPhgpComk/T25OMTDi2FxZ8a2aG 427R8LOUw5IvNN1PwmapZ2jnNG7PPEKJAbucsYu4iLSHWjVphbD+b/CT4MwoQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1ltD0sl4z114t; Wed, 19 Apr 2023 16:02: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 33JG2SB7057083; Wed, 19 Apr 2023 16:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JG2Sr5057082; Wed, 19 Apr 2023 16:02:28 GMT (envelope-from git) Date: Wed, 19 Apr 2023 16:02:28 GMT Message-Id: <202304191602.33JG2Sr5057082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8cee0c9ae9d8 - main - Cirrus-CI: Run check-ldirs in 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cee0c9ae9d863e599a84ba7fe8764cf1186dfc3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8cee0c9ae9d863e599a84ba7fe8764cf1186dfc3 commit 8cee0c9ae9d863e599a84ba7fe8764cf1186dfc3 Author: Brooks Davis AuthorDate: 2023-04-19 15:58:54 +0000 Commit: Brooks Davis CommitDate: 2023-04-19 15:58:54 +0000 Cirrus-CI: Run check-ldirs in include/ Check that LDIRS defined in include/Makefile actually exist. Reviewed by: emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D39681 --- .cirrus.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 0898554f5296..d53d6ede110e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -60,6 +60,10 @@ task: - make sysent - if ! git diff --exit-code; then printf "\n>>> Generated sysent files not updated, run make sysent <<<\n"; false; fi + include_ldirs_script: + # Check that includes/Makefile refers to existing directories + - if ! make -C include/ check-ldirs; then printf "\n>>> include/Makefile lists nonexistant directories <<<\n"; false; fi + post_script: - df -m - du -m -s /usr/obj From nobody Wed Apr 19 16:51: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 4Q1mzG0GHMz46BX0; Wed, 19 Apr 2023 16:51: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 4Q1mzF42QKz3P2t; Wed, 19 Apr 2023 16:51:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681923113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5p6Up1Yr37X8ywqpLlbNVCVtSIjtZWhXD/g9VDM689o=; b=kF1ayd9/qthOmOqFu1JAqYrpgLQbukNWYK3K3c3I7EP4iXarmA37R2yBjtFT5Hit7q1NqK XVDJwaj9C9hpedTX3tQ7Yb9we/mK416Nobdacb8PMDV8WNjU0bNiJW5OpWxhxeqJAziKNQ LEo+3fAEW1DlDo92lwcAzwxMKnQSyYT0BMkm3J1+WB0bzXMZ6uJSFpBMG1fgzSCN/L3NXD ptGVk4zhQEUXaBB7EAZ8X4RpcMjWGQJ60r+1uxs3tNWCCw2CDUWRsHX4T9lSTLVu5DBtqE TBseY75BnCL6lCiGHcaxolOvBAAvecTHTHgs7aBdMEfboFLuK7/X54Qg7VOtXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681923113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5p6Up1Yr37X8ywqpLlbNVCVtSIjtZWhXD/g9VDM689o=; b=ClL5cSE7M7jVIWazalGwqD7RU8nndyBMmEbdQJ8NHPEVAUyr2b4f1hjFdyKm+1FxD6PVIy da5KOG6khPLwFZdsSR/acJyxWCMacqFgBLQK8r7pJDZVSMmY5gzYIVZskW9Ov9XavlqT2B mV+II6KfjiNx/xbXxsXIBEzVnZCJQzFfo3P7PVU+AdT4+X5vpZBIdlnKQCV6ksAm3E23NE ixxbl/lk4XXAFnbKlcU5ozu6EQ5i9o6zJJE5H/ul0NuDVo9IfpYDCE3a4qc58VmhzqEk82 Va28+EwDba1y8QN8PHvCEXtfWAnZNeVZe9R6Ptn/0aV2WgRfzrRNg2GIP3zBmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681923113; a=rsa-sha256; cv=none; b=PepWuWIqZIT0Xkh0d4IdNvSRB4I5oCBdPNZJu0glvu2mtFCNwCYMhc58GpeVozzpyr3Su3 KkHkqy/g7IFxAXClEupunAO6t9ajzorw1eHDzUCrrk66WmpujUGfWuNa8S8SuKSFB8vDhJ 5PC1xNLjZ/OODLJVSeG6cN9cmLauqPbdiDD1I7f4Xy++ypX+fJdGAqMLKtiKfc0mGSMB07 y9QM0dORceIFokmMsQPiF1n50smEyl3QZ5Vmh4rKfFIlLuU9VxgwlTmkyj5iMF9JvEbQma INPN/3nhRNvy6aY98MBZ6TdYmb+zNZbVSkZ3ALmHp+iZVeS5nEOgH8ZrpIUfOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1mzF37mNz12GC; Wed, 19 Apr 2023 16:51: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 33JGprL4035164; Wed, 19 Apr 2023 16:51:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JGpr7O035163; Wed, 19 Apr 2023 16:51:53 GMT (envelope-from git) Date: Wed, 19 Apr 2023 16:51:53 GMT Message-Id: <202304191651.33JGpr7O035163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 7adf138ba9b9 - main - cxgbe/iw_cxgbe: debug routines to dump STAG (steering tag) 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7adf138ba9b90db5ed0f1e8cd68e787fb63fa760 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=7adf138ba9b90db5ed0f1e8cd68e787fb63fa760 commit 7adf138ba9b90db5ed0f1e8cd68e787fb63fa760 Author: Navdeep Parhar AuthorDate: 2023-04-06 17:52:15 +0000 Commit: Navdeep Parhar CommitDate: 2023-04-19 16:38:14 +0000 cxgbe/iw_cxgbe: debug routines to dump STAG (steering tag) entries. t4_dump_stag to dump hw state for a known STAG. t4_dump_all_stag to dump hw state for all valid STAGs. This routine walks the entire STAG region looking for valid entries and this can take a while for some configurations. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/iw_cxgbe/ev.c | 82 ++++++++++++++++++++++++++++++++++++--- sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h | 2 + 2 files changed, 79 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/iw_cxgbe/ev.c b/sys/dev/cxgbe/iw_cxgbe/ev.c index 7c42354644e0..a1475554c08f 100644 --- a/sys/dev/cxgbe/iw_cxgbe/ev.c +++ b/sys/dev/cxgbe/iw_cxgbe/ev.c @@ -41,6 +41,82 @@ __FBSDID("$FreeBSD$"); #include "iw_cxgbe.h" +static void print_tpte(struct adapter *sc, const u32 stag, + const struct fw_ri_tpte *tpte) +{ + const __be64 *p = (const void *)tpte; + + CH_ERR(sc, "stag idx 0x%x valid %d key 0x%x state %d pdid %d " + "perm 0x%x ps %d len 0x%016llx va 0x%016llx\n", + stag & 0xffffff00, + G_FW_RI_TPTE_VALID(ntohl(tpte->valid_to_pdid)), + G_FW_RI_TPTE_STAGKEY(ntohl(tpte->valid_to_pdid)), + G_FW_RI_TPTE_STAGSTATE(ntohl(tpte->valid_to_pdid)), + G_FW_RI_TPTE_PDID(ntohl(tpte->valid_to_pdid)), + G_FW_RI_TPTE_PERM(ntohl(tpte->locread_to_qpid)), + G_FW_RI_TPTE_PS(ntohl(tpte->locread_to_qpid)), + (long long)(((u64)ntohl(tpte->len_hi) << 32) | ntohl(tpte->len_lo)), + (long long)(((u64)ntohl(tpte->va_hi) << 32) | ntohl(tpte->va_lo_fbo))); + CH_ERR(sc, "stag idx 0x%x: %016llx %016llx %016llx %016llx\n", + stag & 0xffffff00, + (long long)be64_to_cpu(p[0]), (long long)be64_to_cpu(p[1]), + (long long)be64_to_cpu(p[2]), (long long)be64_to_cpu(p[3])); +} + +void t4_dump_stag(struct adapter *sc, const u32 stag) +{ + struct fw_ri_tpte tpte __aligned(sizeof(__be64)) = {0}; + const u32 offset = sc->vres.stag.start + ((stag >> 8) * 32); + + if (offset > sc->vres.stag.start + sc->vres.stag.size - 32) { + CH_ERR(sc, "stag 0x%x is invalid for current configuration.\n", + stag); + return; + } + read_via_memwin(sc, 0, offset, (u32 *)&tpte, 32); + print_tpte(sc, stag, &tpte); +} + +void t4_dump_all_stag(struct adapter *sc) +{ + struct fw_ri_tpte tpte __aligned(sizeof(__be64)) = {0}; + const u32 first = sc->vres.stag.start; + const u32 last = first + sc->vres.stag.size - 32; + u32 offset, i; + + for (i = 0, offset = first; offset <= last; i++, offset += 32) { + tpte.valid_to_pdid = 0; + read_via_memwin(sc, 0, offset, (u32 *)&tpte, 4); + if (tpte.valid_to_pdid != 0) { + read_via_memwin(sc, 0, offset, (u32 *)&tpte, 32); + print_tpte(sc, i << 8, &tpte); + } + } +} + +static void dump_err_cqe(struct c4iw_dev *dev, struct t4_cqe *err_cqe) +{ + struct adapter *sc = dev->rdev.adap; + __be64 *p = (void *)err_cqe; + + CH_ERR(sc, "AE qpid 0x%x opcode %d status 0x%x " + "type %d wrid.hi 0x%x wrid.lo 0x%x\n", + CQE_QPID(err_cqe), CQE_OPCODE(err_cqe), + CQE_STATUS(err_cqe), CQE_TYPE(err_cqe), + CQE_WRID_HI(err_cqe), CQE_WRID_LOW(err_cqe)); + CH_ERR(sc, "%016llx %016llx %016llx %016llx\n", + (long long)be64_to_cpu(p[0]), (long long)be64_to_cpu(p[1]), + (long long)be64_to_cpu(p[2]), (long long)be64_to_cpu(p[3])); + + /* + * Ingress WRITE and READ_RESP errors provide + * the offending stag, so parse and log it. + */ + if (RQ_TYPE(err_cqe) && (CQE_OPCODE(err_cqe) == FW_RI_RDMA_WRITE || + CQE_OPCODE(err_cqe) == FW_RI_READ_RESP)) + t4_dump_stag(sc, CQE_WRID_STAG(err_cqe)); +} + static void post_qp_event(struct c4iw_dev *dev, struct c4iw_cq *chp, struct c4iw_qp *qhp, struct t4_cqe *err_cqe, @@ -58,11 +134,7 @@ static void post_qp_event(struct c4iw_dev *dev, struct c4iw_cq *chp, return; } - printf("AE qpid 0x%x opcode %d status 0x%x " - "type %d wrid.hi 0x%x wrid.lo 0x%x\n", - CQE_QPID(err_cqe), CQE_OPCODE(err_cqe), - CQE_STATUS(err_cqe), CQE_TYPE(err_cqe), - CQE_WRID_HI(err_cqe), CQE_WRID_LOW(err_cqe)); + dump_err_cqe(dev, err_cqe); if (qhp->attr.state == C4IW_QP_STATE_RTS) { attrs.next_state = C4IW_QP_STATE_TERMINATE; diff --git a/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h b/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h index 8e33e2d04597..149393a71c25 100644 --- a/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h +++ b/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h @@ -982,4 +982,6 @@ u32 c4iw_get_qpid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx); void c4iw_put_qpid(struct c4iw_rdev *rdev, u32 qid, struct c4iw_dev_ucontext *uctx); void c4iw_ev_dispatch(struct c4iw_dev *dev, struct t4_cqe *err_cqe); +void t4_dump_stag(struct adapter *sc, const u32 stag); +void t4_dump_all_stag(struct adapter *sc); #endif From nobody Wed Apr 19 16:54:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1n1z30HPz46C38; Wed, 19 Apr 2023 16:54: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 4Q1n1z2RFTz3jRc; Wed, 19 Apr 2023 16:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681923255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ZiVtEBXYM+cKiHZPc2XnfM+5Qo3My2YZQmLXOfAu9Y=; b=h/VjqLMEjeqJDZ6oI8WUz+iPE7GWHVkLv/2LUhEEIH077x1zTJqg3vq5boOZSb9F1YmbPa v7nnhvBfVq3dK0tq+2r1Xu0voNOsU2jF9R3Oo2s6J8LLFxbudglamR2/a+FltjeapRdTRo y8QpwEboOvf9MuTqZTwsSCFf1zghajnxVFy6gmk2j2Y7HVUKfU5WvGr3j4nx3kP0b0HSHt CLTX+SKuGYH+eeyDq5xjMdUR2dJNM4w9SCxaVkorHuUS2MxRDjOR/XpBYWBEmnu5bOWUJE uVUH3dQUKkJp+8E/GJP4nGYtzfcna4yM0iq2Q6+cmxdLjwhQu8RvKyaGSYIywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681923255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ZiVtEBXYM+cKiHZPc2XnfM+5Qo3My2YZQmLXOfAu9Y=; b=Oh7/qSFAvqJP5Xa130ZKyhsrx1Ai6LwAJDPPbOiZOnbvjDRtINIF+IVCd34Qm7zwUCQibZ HwqJZKxtArTx69TOCYGnD1apwEkyWpVw2HXsJ+zSP5G4xSFQHSLIwQZ58BhnrrOcYJtk1w Ukg4qPQ0NeHTjrLs4E8X+/JtlCcYxmSTm0TZsQsbqiJiYJlIP3JylJH8gJJbld3gEhwXKZ y0ViTw0xSoJ5WVspO/XpkzfWv1SqPsUvHoJII6UERJekKp48H5KDCdBhy/4aE8dMJ4gHYF 8bxvSGok9Z84DQ6CWr1hrTOUo/CWxZ2R+HpJn+zT6dWne3yn+B7laHlr5ARw9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681923255; a=rsa-sha256; cv=none; b=KeGs7Xlbi2OJeEONQ0ulRga6MI8U54A2rgwtFISwjoSE4hvXYyO8oZopl/IduBZN0Z9aXf VZKn/R/GaUW4NiwviVDijBSSrm5goW3VnayfD2w8beTuER8TMiCLCpf6hN89WEus/FwVtH ebkITchtbh+XQjT2oK/j80r/pTvhYI79QTUZMkXaByUDjMy7ODbjjCUgYf8OzYr2js+xw6 RCBTbXd0ZChE2fYg2KLqyMbQbux/HUHwrUsSoEp6jXqzQFx7JG+sYHvDZhxKMAam+9cG1i jhop71h1BbkUe6fbK4lZUSxDNXHDHRlUjqsMcuA88mlXgGjUuGyhVvb2BiXROw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1n1z1PnWz12wy; Wed, 19 Apr 2023 16:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33JGsFR4039043; Wed, 19 Apr 2023 16:54:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JGsFaI039042; Wed, 19 Apr 2023 16:54:15 GMT (envelope-from git) Date: Wed, 19 Apr 2023 16:54:15 GMT Message-Id: <202304191654.33JGsFaI039042@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: 303246dcdf44 - main - We have a TCP_LOG_CONNEND log that should come out at the very last log of every connection. This holds some nice stats about why/how the connection ended. Though with the current code it does not come out without accounting due to the placement of the ifdefs. Also we need to make sure the stacks fini has ran before calling in from tcp_subr so we get all logs the stack may make at its ending. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 303246dcdf445e5bcc19c1a2410b2aa47b0e304f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=303246dcdf445e5bcc19c1a2410b2aa47b0e304f commit 303246dcdf445e5bcc19c1a2410b2aa47b0e304f Author: Randall Stewart AuthorDate: 2023-04-19 16:54:25 +0000 Commit: Randall Stewart CommitDate: 2023-04-19 16:54:25 +0000 We have a TCP_LOG_CONNEND log that should come out at the very last log of every connection. This holds some nice stats about why/how the connection ended. Though with the current code it does not come out without accounting due to the placement of the ifdefs. Also we need to make sure the stacks fini has ran before calling in from tcp_subr so we get all logs the stack may make at its ending. Reviewed by: rscheff Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D39693 --- sys/netinet/tcp_log_buf.c | 18 +++++++++--------- sys/netinet/tcp_subr.c | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c index c533f8329fbe..fb8cb4453136 100644 --- a/sys/netinet/tcp_log_buf.c +++ b/sys/netinet/tcp_log_buf.c @@ -1432,11 +1432,11 @@ tcp_log_tcpcbfini(struct tcpcb *tp) INP_WLOCK_ASSERT(tptoinpcb(tp)); -#ifdef TCP_ACCOUNTING if (tp->_t_logstate) { - struct tcp_log_buffer *lgb; union tcp_log_stackspecific log; struct timeval tv; +#ifdef TCP_ACCOUNTING + struct tcp_log_buffer *lgb; int i; memset(&log, 0, sizeof(log)); @@ -1468,15 +1468,15 @@ tcp_log_tcpcbfini(struct tcpcb *tp) } } skip_out: +#endif log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.cur_del_rate = tp->t_end_info; - TCP_LOG_EVENTP(tp, NULL, - NULL, - NULL, - TCP_LOG_CONNEND, 0, - 0, &log, false, &tv); + (void)tcp_log_event(tp, NULL, + NULL, + NULL, + TCP_LOG_CONNEND, 0, + 0, &log, false, NULL, NULL, 0, &tv); } -#endif /* * If we were gathering packets to be automatically dumped, try to do * it now. If this succeeds, the log information in the TCPCB will be @@ -2910,7 +2910,7 @@ tcp_log_sendfile(struct socket *so, off_t offset, size_t nbytes, int flags) continue; } /* If we reach here its a allocated closed end request */ - if ((ent->start == offset) || + if ((ent->start == offset) || ((offset > ent->start) && (offset < ent->end))){ /* Its within this request?? */ fnd = 1; diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index d88fc48fc021..db0c71fdbfff 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2423,13 +2423,13 @@ tcp_discardcb(struct tcpcb *tp) CC_ALGO(tp) = NULL; -#ifdef TCP_BLACKBOX - tcp_log_tcpcbfini(tp); -#endif TCPSTATES_DEC(tp->t_state); if (tp->t_fb->tfb_tcp_fb_fini) (*tp->t_fb->tfb_tcp_fb_fini)(tp, 1); +#ifdef TCP_BLACKBOX + tcp_log_tcpcbfini(tp); +#endif MPASS(STAILQ_EMPTY(&tp->t_inqueue)); /* From nobody Wed Apr 19 17:16: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 4Q1nX56fXwz46DBG; Wed, 19 Apr 2023 17:16: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 4Q1nX5619Pz4Jly; Wed, 19 Apr 2023 17:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681924613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGxG03RlXWiwPo0BOpwo+9UCpNS2dWHfeMbEHH1w0Hk=; b=WNm+v9Y4WrTLo9dEOEgvsyNDRZFYgbiCgYMfOpTCNv+9ypLRaGRaxt31lu/TNG/QkW3fsb 2HIuL6cx9QWGrLK0dmZAmsOWOEG4Vim+g4OZabF/RFekG0xp/dvpRzj5t5vAsYisaUyLDv +B4woFyOkkGGEWVJh1t9RcdMH8dFCLHIxgyKfkCQGbdAa7Rt2phIZoWz9T60EmuYinJUpW hu5gN3dQCwujUFViSheAK0CLy+ujVTymh74+L9aLoyY1PqS4Vrg7i1mNQMkRl02AE4j7qB +YcALUivJMhh6OsdwpW8iSwjClJv8s0CKz2TeVqh4aaJmMplDM6Moa7WvjsJmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681924613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGxG03RlXWiwPo0BOpwo+9UCpNS2dWHfeMbEHH1w0Hk=; b=oyijCIWwzOr9ym/EDCKpsjDd67wlUegIFG6PcNa1fGfIa79bI1wcoIZ108qRFP3OcH4LM4 OcERw/yn5jEdfgcFz+A8t7WMC+xQdvra0+T0gsYY0XxCDt0GVSPdfqxonUSRDZMyL0KDCK Th+I3aTs9FbSEzb3g9PuyenXdn4RBJR7SZns2y6TmX6v/wBN50BzpzONiABn84PJc4ixzX tZdO29oDmZUVL7M0kChQGZnwuZnrKkTAa4rgkw/8IBsa3OTKaKO/gDShCMcDGLkY5sLwUc rZgjm9+0Hszp6sneQs2Hp2i9aRb6x4JAYjAcGJ1CrqraugKoxtL6hM7/p3lGEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681924613; a=rsa-sha256; cv=none; b=vnFLEmJV7udyr17bCicmZabT9bxp06NwM+zclZCBONmP3lm/IXxWOUPhxtVOtrxBYSLJdv NQZ3xlyUcjT0K4Y+zg+WNMKRcAqSKNOj0MKUHF6lWf/2Lc79OiBwg2BnayE8bV6AP+v/+k sfTHOXqAPheEDsIEg1EQjaAHIp+di8sy90K74BhGlqNUfbqAj51rUWZp1ryOsoRq0DoPPD Ei8m8bCSBE91u6Eiu7mtwCj0QSYfEr/Xfe1nKtTTggfn7+sULOSIK3ENnNiVX0uiRqp8lH UwXYCZsyz9oNXCc3YV+JXEWlxBv3KveH7ENV5VoIOaXGX44o0h4XySmOvEyhRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1nX54yXhz12y6; Wed, 19 Apr 2023 17:16: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 33JHGr41073263; Wed, 19 Apr 2023 17:16:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JHGrsx073262; Wed, 19 Apr 2023 17:16:53 GMT (envelope-from git) Date: Wed, 19 Apr 2023 17:16:53 GMT Message-Id: <202304191716.33JHGrsx073262@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: 7a842346c3cd - main - tcp: Rack can crash with the new non-TSO fix.. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7a842346c3cd04dc07235c6af5ce0bec0db90be2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=7a842346c3cd04dc07235c6af5ce0bec0db90be2 commit 7a842346c3cd04dc07235c6af5ce0bec0db90be2 Author: Randall Stewart AuthorDate: 2023-04-19 17:17:04 +0000 Commit: Randall Stewart CommitDate: 2023-04-19 17:17:04 +0000 tcp: Rack can crash with the new non-TSO fix.. Turns out the location of the check to see if we can do output is in the wrong place. We need to jump off to the compressed acks before handling that case since th is NULL in the compressed ack case which is handled differently anyway. Reviewed by: tuexen Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D39690 --- sys/netinet/tcp_stacks/rack.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 40706d5ebfca..a6d5362fafb4 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -16497,6 +16497,15 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, * anything becase a pacing timer is running. */ us_cts = tcp_tv_to_usectick(tv); + if (m->m_flags & M_ACKCMP) { + /* + * All compressed ack's are ack's by definition so + * remove any ack required flag and then do the processing. + */ + rack->rc_ack_required = 0; + return (rack_do_compressed_ack_processing(tp, so, m, nxt_pkt, tv)); + } + thflags = tcp_get_flags(th); if ((rack->rc_always_pace == 1) && (rack->rc_ack_can_sendout_data == 0) && (rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) && @@ -16539,15 +16548,6 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, no_output = 0; } } - if (m->m_flags & M_ACKCMP) { - /* - * All compressed ack's are ack's by definition so - * remove any ack required flag and then do the processing. - */ - rack->rc_ack_required = 0; - return (rack_do_compressed_ack_processing(tp, so, m, nxt_pkt, tv)); - } - thflags = tcp_get_flags(th); /* * If there is a RST or FIN lets dump out the bw * with a FIN the connection may go on but we From nobody Wed Apr 19 17:24: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 4Q1nhm0VS4z46DjT; Wed, 19 Apr 2023 17:24:24 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1nhl42GRz4Wqv; Wed, 19 Apr 2023 17:24:23 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id CDD7E26096F; Wed, 19 Apr 2023 19:24:21 +0200 (CEST) Message-ID: Date: Wed, 19 Apr 2023 19:24:20 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> Content-Language: en-US From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q1nhl42GRz4Wqv X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 17:46, Brooks Davis wrote: > On Wed, Apr 19, 2023 at 12:06:26PM +0000, Hans Petter Selasky wrote: >> The branch main has been updated by hselasky: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=8dcf3a82c54cb216df3213a013047907636a01da >> >> commit 8dcf3a82c54cb216df3213a013047907636a01da >> Author: Hans Petter Selasky >> AuthorDate: 2022-09-08 10:16:43 +0000 >> Commit: Hans Petter Selasky >> CommitDate: 2023-04-19 12:04:22 +0000 >> >> libc: Implement bsort(3) a bitonic type of sorting algorithm. >> >> The bsort(3) algorithm works by swapping objects, similarly to qsort(3), >> and does not require any significant amount of additional memory. >> >> The bsort(3) algorithm doesn't suffer from the processing time issues >> known the plague the qsort(3) family of algorithms, and is bounded by >> a complexity of O(log2(N) * log2(N) * N), where N is the number of >> elements in the sorting array. The additional complexity compared to >> mergesort(3) is a fair tradeoff in situations where no memory may >> be allocated. >> >> The bsort(3) APIs are identical to those of qsort(3), allowing for >> easy drop-in and testing. >> >> The design of the bsort(3) algorithm allows for future parallell CPU >> execution when sorting arrays. The current version of the bsort(3) >> algorithm is single threaded. This is possible because fixed areas >> of the sorting data is compared at a time, and can easily be divided >> among different CPU's to sort large arrays faster. >> >> Reviewed by: gbe@, delphij@, pauamma_gundo.com (manpages) >> Sponsored by: NVIDIA Networking >> Differential Revision: https://reviews.freebsd.org/D36493 > > Why was this needed? I'm not really a fan to adding new, non-standard > sorts without a clear use case. I understand it has some specific > advantages vs qsort, but are we going to use it? Doing so will make our > code less portable so we almost certainly can't s/qsort/bsort/. Hi Brooks, My long term plan is to get bsort() to replace qsort(), but because the two algorithms have different characteristics, then some people may complain it is good for me, but not for you. I want there to be an option besides from qsort(), which does not use malloc() as an integral part of sorting. And is faster than O(N*N) sorting (still the worst case for qsort in FreeBSD). qsort() is frequently used to do all kinds of sorting, and some pointed out that qsort() can technically be any kind of sorting algorithm, but looking around it is not. When I build applications of my own, I always use mergesort(), which depend on malloc(). Having a dependency on a certain memory allocator to get performance is not good. I want to distinguish from qsort() by calling it bsort(). If people use bsort() they know what they get cross-platform. If people use qsort() the output is random basically. It helps very little my application works on FreeBSD, but not Linux, for example. In FreeBSD qsort() is typically used for sorting files up to 16K entries per directory. Even if qsort() can explode in time, probably it's not that important. But when using qsort() for sorting millions of mathematical expressions, for example, doing number analysis, this is unacceptable. I think "C.A.R. Hoare's quicksort" technique is designed for single CPU systemsf only. Even if the best-case average is "N*log2(N)", that amount of processing cannot be split by multiple CPUs. The algorithm is serial as such. The bsort() algorithm is much more NCPU friendly, because it can split the work into fixed size smaller and independent work loads. Otherwise the work load doubles every time you merge two sorted lists. And when the number of lists to merge is fewer than the number of CPUs available, your system runs out of guts basically. > > I also note that the swap code is pointlessly slow for size > 256 and > should almost certainly use aliasing with matching words like memcpy > implementations do. Doing so would make it easier to port this code to > CHERI where that is required. I totally agree about the swap code being pointless. And I tried to look where is memswap(), but it was not there. This kind of swapping is done many places, and we could benefit from having a compiler supported memswap() function. What do you think? --HPS From nobody Wed Apr 19 17:51: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 4Q1pHw6Hkwz46G6M for ; Wed, 19 Apr 2023 17:51:24 +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 4Q1pHv5c4Sz457M for ; Wed, 19 Apr 2023 17:51:23 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f49.google.com with SMTP id v3so113675wml.0 for ; Wed, 19 Apr 2023 10:51:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681926682; x=1684518682; 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=SzR9EmTQGfbgH01iYfbqvQ7WCW5z524LRIG4/JBheV4=; b=iM0bI1p13OPLFH+9LS0o26LnDkk/V6aSFP1SQMby3oplPA8HYHFfBg4ih8OHCjyyCu 6Mh9wbXY679Qf4HoOIY/seonqkY3iLqi8tW+QWU/3MkD33sjHJAfi6G62KuN75hJJ9uE zTVWNlSWr+/9KQv30M8loAkKu5H7NzVHoG8PU51wGpuSnaTbk8EUPebM/fsi1qYbRFQ4 YwD5pWwZVZwbteW/k6/2h0KRTC+efpECmL5FJQhqVX/cDtOrfgrTEqY4Cf0Gme/HWI57 TIZTu+PJN3cdtwOvsosjFCye1TpLI3eSbC85n8G6JwvRXUyF5bGr5Zfa/HtREzq/b/08 6JLg== X-Gm-Message-State: AAQBX9ciSyPYBYT/UgWaGZyH8JWeUAvm7KrCYpTqxYd6pcv580UWClUg 1SIICaZ7VtX6TcZCu16kdJ+U2A== X-Google-Smtp-Source: AKy350ZqTDb6KZvQZeJ4BYv0vDGkfjkkhZDdhj938XwoniXXEdvMi3m1MbWi6LnTTxOt7VtFsVbQEQ== X-Received: by 2002:a7b:cb44:0:b0:3f1:6458:99ba with SMTP id v4-20020a7bcb44000000b003f1645899bamr13080249wmj.29.1681926681997; Wed, 19 Apr 2023 10:51:21 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id h16-20020a05600c315000b003f173a2b2f6sm2919077wmo.12.2023.04.19.10.51.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2023 10:51:21 -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 \(3696.120.41.1.1\)) Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. From: Jessica Clarke In-Reply-To: Date: Wed, 19 Apr 2023 18:51:20 +0100 Cc: Brooks Davis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q1pHv5c4Sz457M 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 19 Apr 2023, at 18:24, Hans Petter Selasky = wrote: >=20 > On 4/19/23 17:46, Brooks Davis wrote: >> On Wed, Apr 19, 2023 at 12:06:26PM +0000, Hans Petter Selasky wrote: >>> The branch main has been updated by hselasky: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D8dcf3a82c54cb216df3213a013047907= 636a01da >>>=20 >>> commit 8dcf3a82c54cb216df3213a013047907636a01da >>> Author: Hans Petter Selasky >>> AuthorDate: 2022-09-08 10:16:43 +0000 >>> Commit: Hans Petter Selasky >>> CommitDate: 2023-04-19 12:04:22 +0000 >>>=20 >>> libc: Implement bsort(3) a bitonic type of sorting algorithm. >>> The bsort(3) algorithm works by swapping objects, similarly = to qsort(3), >>> and does not require any significant amount of additional = memory. >>> The bsort(3) algorithm doesn't suffer from the processing = time issues >>> known the plague the qsort(3) family of algorithms, and is = bounded by >>> a complexity of O(log2(N) * log2(N) * N), where N is the number = of >>> elements in the sorting array. The additional complexity = compared to >>> mergesort(3) is a fair tradeoff in situations where no memory = may >>> be allocated. >>> The bsort(3) APIs are identical to those of qsort(3), = allowing for >>> easy drop-in and testing. >>> The design of the bsort(3) algorithm allows for future = parallell CPU >>> execution when sorting arrays. The current version of the = bsort(3) >>> algorithm is single threaded. This is possible because fixed = areas >>> of the sorting data is compared at a time, and can easily be = divided >>> among different CPU's to sort large arrays faster. >>> Reviewed by: gbe@, delphij@, pauamma_gundo.com = (manpages) >>> Sponsored by: NVIDIA Networking >>> Differential Revision: https://reviews.freebsd.org/D36493 >> Why was this needed? I'm not really a fan to adding new, = non-standard >> sorts without a clear use case. I understand it has some specific >> advantages vs qsort, but are we going to use it? Doing so will make = our >> code less portable so we almost certainly can't s/qsort/bsort/. >=20 > Hi Brooks, >=20 > My long term plan is to get bsort() to replace qsort(), but because = the two algorithms have different characteristics, then some people may = complain it is good for me, but not for you. I want there to be an = option besides from qsort(), which does not use malloc() as an integral = part of sorting. And is faster than O(N*N) sorting (still the worst case = for qsort in FreeBSD). Why not do an adaptive qsort instead like other standard libraries? Also, nothing actually says qsort doesn=E2=80=99t allocate memory; in = fact, glibc=E2=80=99s own documentation states that one should not assume it = is in-place and doesn=E2=80=99t allocate. > qsort() is frequently used to do all kinds of sorting, and some = pointed out that qsort() can technically be any kind of sorting = algorithm, but looking around it is not. Because there are variants that are guaranteed n log n? Which is better than your n log^2 n. > When I build applications of my own, I always use mergesort(), which = depend on malloc(). Having a dependency on a certain memory allocator to = get performance is not good. >=20 > I want to distinguish from qsort() by calling it bsort(). If people = use bsort() they know what they get cross-platform. No they don=E2=80=99t, bsort can mean multiple things. If you want a = specific algorithm, put it in your program, but please don=E2=80=99t, just use a standardised function like qsort. > If people use qsort() the output is random basically. It helps very = little my application works on FreeBSD, but not Linux, for example. No, the output is sorted, which is far from random. And if you need a stable sort you should ask for one. > In FreeBSD qsort() is typically used for sorting files up to 16K = entries per directory. Even if qsort() can explode in time, probably = it's not that important. But when using qsort() for sorting millions of = mathematical expressions, for example, doing number analysis, this is = unacceptable. >=20 > I think "C.A.R. Hoare's quicksort" technique is designed for single = CPU systemsf only. Even if the best-case average is "N*log2(N)", that = amount of processing cannot be split by multiple CPUs. The algorithm is = serial as such. >=20 > The bsort() algorithm is much more NCPU friendly, because it can split = the work into fixed size smaller and independent work loads. Otherwise = the work load doubles every time you merge two sorted lists. And when = the number of lists to merge is fewer than the number of CPUs available, = your system runs out of guts basically. I highly doubt you want a libc sort routine to start spawning threads. That also seems extremely contradictory to your claim about wanting one that doesn=E2=80=99t allocate memory, but creating threads is going to = do much more than just that, and would scream POLA violation to me. >> I also note that the swap code is pointlessly slow for size > 256 and >> should almost certainly use aliasing with matching words like memcpy >> implementations do. Doing so would make it easier to port this code = to >> CHERI where that is required. >=20 > I totally agree about the swap code being pointless. And I tried to = look where is memswap(), but it was not there. This kind of swapping is = done many places, and we could benefit from having a compiler supported = memswap() function. What do you think? We agree: https://github.com/CTSRD-CHERI/cheribsd/issues/207. But the world doesn=E2=80=99t have that in C. We don=E2=80=99t need new non-standard sorting routines in libc. Jess From nobody Wed Apr 19 17:53:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1pLN4mL7z46G70; Wed, 19 Apr 2023 17:53: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 4Q1pLN10sbz49MT; Wed, 19 Apr 2023 17:53:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681926812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXghZQ5CgNlb0DmEeQv+Q6npGaLiBLdyGPH4YO/SyHM=; b=IxLJW13vxDEfjY2rN7FDs6t3uVItOsSd78iJcXI9cg+MMtvcm55VqjAeWadNni7xjNpbT3 kbuwukQvJ+3Jv4249k99mPLVgRGwGNeZNR/hkzzKQkaGY7l6xY52vEiddQJ5JqkQTwjVIJ z4mkhm+iH6vrLzXQPPg0wDaieYS3mHBiQuS0JYvUJHf7JeRYNy2p2MaQpU275w4F4j7kuS eBr+3mTmXvA2eUggAagNj5HSnUjwP0Yp43WVpMMw977ltebqVCRo4MVZQ+heZlO0JgdyXq B/5KBS6LNS+N98xWzvd5pOEMgnGLq8Q/6djap4aja04ELsoWHdMsJBQu7YE35g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681926812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXghZQ5CgNlb0DmEeQv+Q6npGaLiBLdyGPH4YO/SyHM=; b=s2RsKmjULolHjxRC/jlGqqUMWzBkIbrFHoqR1sXDCS6cip1KW7XtLWX0CWoH9TKHe/tiM3 vHj/cOYYr8AYZAWoKux9cIzRoHOlI5rOjJiKBVYjHWwADmqsDnmD2bS13/AcO+EnQhAgNV LZPX+MBB5oUn6SHvoA14uoIEY4/vkxFyxYMZq9n8scrgLtJ2AOe8K0hZ8oQb2QDK56FWLS pxwPQFPaGZbsymfsxlIvbX4qNaAUu6wbC7V8R3ZD7hc2r4WIVRiXnSucLD4creMsS2SKVe VRS4xn0Iro+eG8Fh3FJFljlUK4Q/QqH6GZUvqOMkop5GAwHHPpxlqPZqj2k2+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681926812; a=rsa-sha256; cv=none; b=SsMrN6Z3HRnvPdgFTuSAl2ctCPdpAvuDPVZyRKqYgdJuBaGsTnzRGKf5q52y20+TUhtJYT sVcd+rHBxovMPmg3OXUvljYx5tnzT8pIz6gKOy9ivWeOKu5cJqNnGwvUz2RPsaJsj/N+WM 9npqBW/e20mTih0QogNPxIapJKe2BrsMrQKc7In+Vaf2fDT6ZrmFLAVqS4mpYB3vU1oBP4 p422SBXsMOaZgA4WY/woba1/Xk6xJN67qhHU6ETKyz41NlqDpqs721CeT0R9iLaOlLt3ng JhWEW2XTl1O9KB1bgjsGeRQC3yYzuvJA9nCBagS9WZVIs02cMyjJ218vrZ6tTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1pLN04Pvz14Rh; Wed, 19 Apr 2023 17:53: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 33JHrVH0037630; Wed, 19 Apr 2023 17:53:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JHrVAZ037629; Wed, 19 Apr 2023 17:53:31 GMT (envelope-from git) Date: Wed, 19 Apr 2023 17:53:31 GMT Message-Id: <202304191753.33JHrVAZ037629@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: 45f591e6ed5c - main - libmilter: Silence -Wdeprecated-non-prototype 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45f591e6ed5c4589c1e85561869771ede5fe085a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=45f591e6ed5c4589c1e85561869771ede5fe085a commit 45f591e6ed5c4589c1e85561869771ede5fe085a Author: John Baldwin AuthorDate: 2023-04-19 17:52:51 +0000 Commit: John Baldwin CommitDate: 2023-04-19 17:52:51 +0000 libmilter: Silence -Wdeprecated-non-prototype warnings. Missed this one when tagging other sendmail libraries. Fixes: 525438ea7147 sendmail: Silence -Wdeprecated-non-prototype warnings. --- lib/libmilter/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libmilter/Makefile b/lib/libmilter/Makefile index b3243c2a66cf..6f18d86b8385 100644 --- a/lib/libmilter/Makefile +++ b/lib/libmilter/Makefile @@ -40,3 +40,5 @@ sm_os.h: ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} From nobody Wed Apr 19 17:53: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 4Q1pLQ0wXYz46GCd; Wed, 19 Apr 2023 17:53: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 4Q1pLP36L4z49Yq; Wed, 19 Apr 2023 17:53:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681926813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+U9qfoBYplgFE7JWlibjCzaRW4xUBtovfRr0vsh+KM=; b=rfM4n26sWPK1yTOOL6WkhdKb+09CJJwGJxDZ0fWTxixVUrC24MwV7yCPp8gOJzRPffnJA2 EckZEqM0Fejsc31A2a/twASDOXzVw1Ds6YhZcFFgkvpdYmKi4k+l9hYq/7crD8k6SVGp45 Z+EjPWkLR5RoGqlnEU3ykdUYKtxW3O5nGXn6E+eGjo7o/Ok5MWsmmBYbga0IsdPqonVC44 jFoyMp+SPGR91sNIgW83l7lWY6yN+3XDW7WyfeaJ7Ge72t36kkct9cQrtFJu6oemU8eHEr kfosyi+86M82nDiySFI1a3XeHQSfuyxfU8Q7Spbg7UsLL1SUKqAuE7UwA3priw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681926813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+U9qfoBYplgFE7JWlibjCzaRW4xUBtovfRr0vsh+KM=; b=OViqjCRc0bF41g7xydIhpmfwR8sNh4agVUY+zjxfyauiq/5iELQVij/LiiELD53iu2TIda ZlX3GMiGJ9T6q7VfcO3wGHMbPfeB0F2vkLyrai7pjvwpaLjNAjFq7AmfNz69AqwoMKydSN Q3JDp9EWp3hg1YT71aEUjU8wJeg2Ny3td31i5j/gVAb5CRVGFF0NID5VYu7kDHV9szIsZl zX7HcLoiwH3nJ+JT57M6UO4AhMvrFWK07n6ofjKH0ZPLZVbKJaSJjqi8w4gEI2qOe+bESI GE6W4zb+hRDWoI0vt74J3ehD2JnQuOBHap1w9XtNq5XT1SyQfN1vUminI7laEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681926813; a=rsa-sha256; cv=none; b=R11NLUHU56oFn6ZNC8z79m5s7bvkG7syQmsQXWIUquu7VmhwlOnqBQnEWa8BIYwkLgK5QO d88CeTvbNwYjPZE/qhPaA1bL6hMJuJzfRmadsVZifoCJOT30RPRXm2WTOi9e7UQ3ByCUrB FFSrOmm960OtAZIJL2a31EWFzCUssfYWDOBTm1rdYgqF0ZDUUjkJxSBx2EuJoWCfPomM+B miopyQ8cF/PVIThPdKvOKvtp4L2gDFiCiHiiOTURLq2EIRymlxuCVvfgrbQ8coeluT+3O6 JiqdE5sie87C1G6yUB/GLLfNAqeHb0gHW4LBbr76HmoBN8GxYcukRplkoCohZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1pLP21y1z14Cb; Wed, 19 Apr 2023 17:53: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 33JHrXmf037652; Wed, 19 Apr 2023 17:53:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JHrXNK037651; Wed, 19 Apr 2023 17:53:33 GMT (envelope-from git) Date: Wed, 19 Apr 2023 17:53:33 GMT Message-Id: <202304191753.33JHrXNK037651@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: 010795fc824c - main - libz: Move NO_WDEPRECATED_NON_PROTOTYPE below include of bsd.lib.mk. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 010795fc824c4a763d26a2137c30a61d501f8177 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=010795fc824c4a763d26a2137c30a61d501f8177 commit 010795fc824c4a763d26a2137c30a61d501f8177 Author: John Baldwin AuthorDate: 2023-04-19 17:53:02 +0000 Commit: John Baldwin CommitDate: 2023-04-19 17:53:02 +0000 libz: Move NO_WDEPRECATED_NON_PROTOTYPE below include of bsd.lib.mk. Also add it to CWARNFLAGS rather than CFLAGS. --- lib/libz/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libz/Makefile b/lib/libz/Makefile index 4a6e3c91a828..abc490980deb 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -53,7 +53,6 @@ CFLAGS+= -DUNALIGNED_OK VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map CFLAGS+= -DSYMBOL_VERSIONING -CFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} INCS= zconf.h zlib.h @@ -84,3 +83,5 @@ test: example minigzip PCFILES= zlib.pc .include + +CWARNFLAGS+= ${NO_WDEPRECATED_NON_PROTOTYPE} From nobody Wed Apr 19 17:59: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 4Q1pTc1Z4zz46GZp; Wed, 19 Apr 2023 17:59: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 4Q1pTc0Hq9z4MsT; Wed, 19 Apr 2023 17:59:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681927188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mL/sO6WgaD/SktClszJM8ekJ6m1V24C4zF/IUC0NaYQ=; b=b/YB4xKUtAvR058A0LUsUlNXM2TSGYb+ZYUyYYEaXrMaOrlKxM+y7P3kYEQ+hfeOfVqqbg ZzhgUhOoGi3o7Zp+4IaIIGEnIcc/RP6h71hq2UcrcssMcV1aiyfUHNJn2YB23t3x9tnWfU 0IOlpeHULNDg4u+xnUKczcdg4+kfz8vZAM71oodL3M3WbrBA8CxbYX2I33vOdyXNlXC45d bOAnz6XaFhjZccW2fRV4pb3uS5+xJ+BzirsmBa71hZNkG95NOjXnCUoXZ9ajJOEWg2Zf8J cRilM1rC7qVMq2VmZRcpqcEqSLFqTsTwbYz07QZ0IlM15TYSGx6RWQ5U5Jmwcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681927188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mL/sO6WgaD/SktClszJM8ekJ6m1V24C4zF/IUC0NaYQ=; b=b2eHwh+ET9u9MHDxWGTIzbqxU+l/RBGS9j+M3Qj+mW79Uzmnv76iep6LFIEWTgZmL1l4Qf OvTx4B/RfHe1sym77DfNtp4ztER0p1LYQPYHa3T2m7jNbtGVJRWEK1GoNdLfr/tg1q527i 8cYrmixxN34Da8793yOl1HzWu39p8+/NDYnaKB9AqiFFECVDjtX5vOURbxULFuhL9xiBrh 5yapih6NbJXgFAAAsBtm+jSL57f5Bb1ZuUJ3+Zt8EjGSLuPY7aM9TuMlPSS4hUiPms/AJd o9oGo5d3k2+9+jP9YGnPBW2g+FkIMCu9tHSteJU8qGulGrYrhiabtMvIXCalMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681927188; a=rsa-sha256; cv=none; b=q2dRcWRnDAn51/V1cZevw0fOASK2MoMaRBY6HJlU3P3GChlEoK18/kj55acWGpaHVJLM9v Ql4rw/cPuuQC20ozwYk+hsGqrfhRGeyfDU1YbcTo7HGSnOKqIKfzFACT0EvAzTAQSI8SMR wzUdnCDduIBvp3244NYpe8aXMkTiwqx0ozN06ABTPD7FF9wJIWvu2QkVALVNeBEqyMtuvm 8CQY3X3A7IWji7sxp8uMHOrjnIpA6TwM7DXFq32fUza6r0Lg0PQ1ZjFztt6IAM3KXduaXS GEf7Upl5pZqXZeE0S3OqbF19jHRG0al0rSb76WRymDSJn7U+AFafGCinxH2Xvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1pTb6SzWz14Vj; Wed, 19 Apr 2023 17:59: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 33JHxlGS038549; Wed, 19 Apr 2023 17:59:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JHxlGe038548; Wed, 19 Apr 2023 17:59:47 GMT (envelope-from git) Date: Wed, 19 Apr 2023 17:59:47 GMT Message-Id: <202304191759.33JHxlGe038548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: a50d73d5782a - main - loader: Change version calculation to be more consistent. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a50d73d5782a351ad83e8d1f84d11720a12e70d3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=a50d73d5782a351ad83e8d1f84d11720a12e70d3 commit a50d73d5782a351ad83e8d1f84d11720a12e70d3 Author: Stephen J. Kiernan AuthorDate: 2023-04-17 23:27:54 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-19 17:58:53 +0000 loader: Change version calculation to be more consistent. Use 1000 * major + minor when calculating the version number that gets set in the Ficl environment or lua loader property. This allows for more room if the minor number needs to go above 9. Add loader.version property to lua loader. Reviewed by: imp Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39631 --- stand/common/bootstrap.h | 1 + stand/common/interp_forth.c | 1 - stand/common/newvers.sh | 2 +- stand/liblua/lutils.c | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index 80c1a2352b3c..d62a936e6ff0 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -182,6 +182,7 @@ extern int isapnp_readport; * Version information */ extern char bootprog_info[]; +extern unsigned bootprog_rev; /* * Interpreter information diff --git a/stand/common/interp_forth.c b/stand/common/interp_forth.c index 19f1c75dc191..edf21e53dc18 100644 --- a/stand/common/interp_forth.c +++ b/stand/common/interp_forth.c @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "ficl.h" -extern unsigned bootprog_rev; INTERP_DEFINE("4th"); /* #define BFORTH_DEBUG */ diff --git a/stand/common/newvers.sh b/stand/common/newvers.sh index 714adba6c9cb..1a3ceb91af17 100755 --- a/stand/common/newvers.sh +++ b/stand/common/newvers.sh @@ -57,6 +57,6 @@ fi cat > $tempfile < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 4e8a20a7642a - main - tcp: rack the request level logging is a bit too noisy when doing point 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e8a20a7642a4ffa694fa103ec4aa8da806f36a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=4e8a20a7642a4ffa694fa103ec4aa8da806f36a6 commit 4e8a20a7642a4ffa694fa103ec4aa8da806f36a6 Author: Randall Stewart AuthorDate: 2023-04-19 18:02:12 +0000 Commit: Randall Stewart CommitDate: 2023-04-19 18:02:12 +0000 tcp: rack the request level logging is a bit too noisy when doing point logging. When doing request level BB logging the hybrid_bw_log() does not have proper screening to minimize logging when point level logging is in use. Lets fix it properly so you have to have the proper knobs set to get the more noisy logging. Reviewed by: tuexen Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D39699 --- sys/netinet/tcp_stacks/rack.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index a6d5362fafb4..e0130e7fea2a 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -1978,12 +1978,23 @@ rack_log_hybrid_bw(struct tcp_rack *rack, uint32_t seq, uint64_t cbw, uint64_t t * once per chunk and make up the BBpoint that can be turned on by the client. */ if ((mod == HYBRID_LOG_RATE_CAP) || (mod == HYBRID_LOG_CAP_CALC)) { + /* + * The very noisy two need to only come out when + * we have verbose logging on. + */ if (rack_verbose_logging != 0) do_log = tcp_bblogging_on(rack->rc_tp); else do_log = 0; - } else + } else if (mod != HYBRID_LOG_BW_MEASURE) { + /* + * All other less noisy logs here except the measure which + * also needs to come out on the point and the log. + */ + do_log = tcp_bblogging_on(rack->rc_tp); + } else { do_log = tcp_bblogging_point_on(rack->rc_tp, TCP_BBPOINT_REQ_LEVEL_LOGGING); + } if (do_log) { union tcp_log_stackspecific log; From nobody Wed Apr 19 18:49: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 4Q1qZR6Gwlz46KHQ; Wed, 19 Apr 2023 18:49: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 4Q1qZR5W97z3htG; Wed, 19 Apr 2023 18:49:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681930143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2USHX/g3Chvnmht0ixnubLlJaBBWk3ZoXszsfP4VlqQ=; b=vQTMm8LrQGTPqsCvNPNTRrlfKK09Krut5ZHKNVQiiCxDpEL1KLc2Gsb1DfK1uuCQ6cK6xv HNXho1g07NQOpoEhtcHekHnILWtFb7PxWHI2GTy+HE8UPYlt4pZ0BamaAF8HrOqseBsMVH iiSFOME9CG3Q6n2w+7wePMUreHCAxzaEnVrBVR/s0xr2eDE9etXAko98BpD0ZpGJRR8ZHi 6hpyy6am0/F4+9l0F8ifAhz0t7F7a3Vl5GeSoEMj0iuaetRiMRov2WYs13BUueznmDQEB8 8LaK0a4W7rVY/w8+m5rP8aHkF5i7mPnpxohw4Nkk+R0p/i1ClGN8LKnQs6usCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681930143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2USHX/g3Chvnmht0ixnubLlJaBBWk3ZoXszsfP4VlqQ=; b=u2JDdtXBH8IJ9wxdFpl+kbQlq8J2N9pdcBkK6/uiY8Km/0sf9II3/D+xLG3dWpNg6nV92L 8v9R863d6ZdL7ilVUt51RmSaOBy8VBeHYKO+WW77crwG9fz6wKfgTWRIB61hQ0GSny1muT MCjwd9uwJElDDrsG3SS5t3F8q7l6ssoCnZcNnIB/+33ik+XW6cNR4wkSnbESLd2aF1HxUq h2b6wZ3NJJNh3OeRZtZf2ORoQ1P/pK3Y0G/hNia/626+JbCdnjMiwIOQw45A54hRgqWvqk T/NVz6rxuqvCXXaViTwB5n3C4ilqNa7cUXrlbijJjAYrjiTWlZO8VX8uoMU8VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681930143; a=rsa-sha256; cv=none; b=wPWVre+AL7D3ytiaGe/DtLtY89y/rbqkDSVBT3q3ImeRP3/ZMQVNlNzWMu8QiSFGzNA2xP TehkbYfEO0yQssgoLCXI/O+TDTggfuecN5w36XrxNqHALNYxvE3DaCLf7ZxRaU8t6acluf GQt384GALPdRbMSgixLaDwWBzDlauWDh4YsqwBcKjh2svrGXPlTBMFc59qgm1SNEoeJo52 it4ALhkl0Ec5+WO7bUUu0SPmfn59vqVaS6AP1AilGPSvVVmCXDOK/FLtinwuDGWr+P/jAT A12on+tQmSyrVCLEDi71FLX0mNxaSvNeKWHQnsntAjpCOqPC+ZAX80g7mGRdzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1qZR4Zjyz15Y2; Wed, 19 Apr 2023 18:49: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 33JIn3b6021911; Wed, 19 Apr 2023 18:49:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JIn3Y2021910; Wed, 19 Apr 2023 18:49:03 GMT (envelope-from git) Date: Wed, 19 Apr 2023 18:49:03 GMT Message-Id: <202304191849.33JIn3Y2021910@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: 0e0c47ecd624 - main - vfs cache: fix vfs.cache.stats.* name typos List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0e0c47ecd624da976bf7e1ff391cb4a00c76b200 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0e0c47ecd624da976bf7e1ff391cb4a00c76b200 commit 0e0c47ecd624da976bf7e1ff391cb4a00c76b200 Author: Igor Ostapenko AuthorDate: 2023-04-19 17:12:25 +0000 Commit: Mateusz Guzik CommitDate: 2023-04-19 18:47:38 +0000 vfs cache: fix vfs.cache.stats.* name typos Two vfs.cache.stats names are fixed: - s/.dotdothis/.dotdothits/ - s/.posszaps/.poszaps/ Signed-off-by: Igor Ostapenko [mjg: massaged the header a little bit] --- sys/kern/vfs_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 294f7740dacf..e4977392349f 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -535,10 +535,10 @@ STATNODE_ULONG(count, numcache, "Number of cache entries"); STATNODE_COUNTER(heldvnodes, numcachehv, "Number of namecache entries with vnodes held"); STATNODE_COUNTER(drops, numdrops, "Number of dropped entries due to reaching the limit"); STATNODE_COUNTER(dothits, dothits, "Number of '.' hits"); -STATNODE_COUNTER(dotdothis, dotdothits, "Number of '..' hits"); +STATNODE_COUNTER(dotdothits, dotdothits, "Number of '..' hits"); STATNODE_COUNTER(miss, nummiss, "Number of cache misses"); STATNODE_COUNTER(misszap, nummisszap, "Number of cache misses we do not want to cache"); -STATNODE_COUNTER(posszaps, numposzaps, +STATNODE_COUNTER(poszaps, numposzaps, "Number of cache hits (positive) we do not want to cache"); STATNODE_COUNTER(poshits, numposhits, "Number of cache hits (positive)"); STATNODE_COUNTER(negzaps, numnegzaps, From nobody Wed Apr 19 19: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 4Q1qzW6hTzz46L3v; Wed, 19 Apr 2023 19:07:19 +0000 (UTC) (envelope-from vishwin@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 4Q1qzV56Wwz49Mb; Wed, 19 Apr 2023 19:07:18 +0000 (UTC) (envelope-from vishwin@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681931238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kD50F9kIkBVgwi0ASKPAXw8oSfOKBtHQ+o+aVVRZ4xc=; b=cnwufAQvnghjOAsmnqYx5LAOoEduxtV9A/MraoIeVtFJtpy/ki4aIDSJ546CNn1UgzGzrW S5myxt063+yJul+coLB7+Y9A50H4aby+LvOpYiGbbLB9yFaeDTHaI2k7gBhNZcV9xRF3DM iNo7PHtzgafZ0TnZxEeeTjqYv5QSiLVevumuQ2qRbkl2uxjoDT/palkxpjTfFPLePjVMH4 6fmc8+rkLofpfXduotAkSYYRQvj6IeU8tADgsgYiwKpVyti5lZK4LGquDN7jEJyyOqteq9 /TfJhRJdz1wuRifhfzB5YN/2cdfZLOHK2E4tRSPFh1cHbPh9JQNro8N47AkLIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681931238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kD50F9kIkBVgwi0ASKPAXw8oSfOKBtHQ+o+aVVRZ4xc=; b=juiNMZvVrbpd4jeJMMSqjDNebGCWaW1rXlohS6hVFTk57mfMNZc+dnq0CQVpCJlYgAPaC1 GjbR8AugjUl8zUbq35x68xhSESTCuGm46KyK+ZG4ObP0PwNxqzhynOhatBXh0Pc00p2a2K 3Ihu7NDCvL9Kofq+hwbkL7JNCaLGYkbeEfP5nGqIcPLGia8uBpug/1B49HWXVTXmKCZCwH /DYe7r1GSAPbImuzV2SW9Z3uVLdoRs88Al0nzR3PTswQaHY8rO2muR7d+CsboxF/i3xUtI EKd8YLRMdUV4E3d6hbfaZGbfTtHg3o4SPda0tWnYR8lUMlbGc3J3K8jHEf1YqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681931238; a=rsa-sha256; cv=none; b=EsCvqxhbHC0E/VljZ0+5/weJA3n2JBkwiKjd8FY0haGN+cQpfGPISFODf6jtFHBZUOyAM4 vtxGgzHLohkEKrJXksyl7awmwtEmkH31uw+TVc/rnL01/+62iVDO4eriLM5oKa7jtisBrV chph6WtDYjTwkW2Ect32V7HYsPfjeoqueUbrVkaT1MCLxk9NH6Fy6F0AQqO8a3fj23Dmw/ MNjXvH5VR8AYLIdgd3nxcjNBYF9bAo5zcVQHucj4kOmPvGoSRP7GJYyloJB8M5A+WNHPul jrOPmhJyXbhodLkLdRgg++B+kwTWqZE86r3FbHzX/d1ZgoM/ct3lhyfve3rzzA== Received: from [IPV6:2601:98a:602:da0:1fa8:be6c:38d1:bd] (unknown [IPv6:2601:98a:602:da0:1fa8:be6c:38d1:bd]) (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: vishwin/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q1qzT2ZcXzNLv; Wed, 19 Apr 2023 19:07:17 +0000 (UTC) (envelope-from vishwin@freebsd.org) Message-ID: Date: Wed, 19 Apr 2023 15:07:15 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. To: Hans Petter Selasky , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> Content-Language: en-GB From: Charlie Li Organization: FreeBSD Project In-Reply-To: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------WXLeifDdyhfDecUtGsscvZLl" X-ThisMailContainsUnwantedMimeParts: N This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------WXLeifDdyhfDecUtGsscvZLl Content-Type: multipart/mixed; boundary="------------Yq4HVSZ07ujd62OJ7HtERO4X"; protected-headers="v1" From: Charlie Li To: Hans Petter Selasky , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> In-Reply-To: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> --------------Yq4HVSZ07ujd62OJ7HtERO4X Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SGFucyBQZXR0ZXIgU2VsYXNreSB3cm90ZToNCj4gZGlmZiAtLWdpdCBhL2luY2x1ZGUvc3Rk bGliLmggYi9pbmNsdWRlL3N0ZGxpYi5oDQo+IGluZGV4IDczMDIyM2U3ZmQ3Ny4uODU3MDky YjkwNTNlIDEwMDY0NA0KPiAtLS0gYS9pbmNsdWRlL3N0ZGxpYi5oDQo+ICsrKyBiL2luY2x1 ZGUvc3RkbGliLmgNCj4gQEAgLTEwNyw2ICsxMDcsMTAgQEAgdm9pZAkqbWFsbG9jKHNpemVf dCkgX19tYWxsb2NfbGlrZSBfX3Jlc3VsdF91c2VfY2hlY2sgX19hbGxvY19zaXplKDEpOw0K PiAgIGludAkgbWJsZW4oY29uc3QgY2hhciAqLCBzaXplX3QpOw0KPiAgIHNpemVfdAkgbWJz dG93Y3Mod2NoYXJfdCAqIF9fcmVzdHJpY3QgLCBjb25zdCBjaGFyICogX19yZXN0cmljdCwg c2l6ZV90KTsNCj4gICBpbnQJIG1idG93Yyh3Y2hhcl90ICogX19yZXN0cmljdCwgY29uc3Qg Y2hhciAqIF9fcmVzdHJpY3QsIHNpemVfdCk7DQo+ICsjaWYgX19CU0RfVklTSUJMRQ0KPiAr dm9pZAkgYnNvcnQodm9pZCAqLCBzaXplX3QsIHNpemVfdCwNCj4gKwkgICAgaW50ICgqIF9O b25udWxsKShjb25zdCB2b2lkICosIGNvbnN0IHZvaWQgKikpOw0KPiArI2VuZGlmDQo+ICAg dm9pZAkgcXNvcnQodm9pZCAqLCBzaXplX3QsIHNpemVfdCwNCj4gICAJICAgIGludCAoKiBf Tm9ubnVsbCkoY29uc3Qgdm9pZCAqLCBjb25zdCB2b2lkICopKTsNCj4gICBpbnQJIHJhbmQo dm9pZCk7DQo+IEBAIC0zMDAsNiArMzA0LDggQEAgaW50CSBoZWFwc29ydCh2b2lkICosIHNp emVfdCwgc2l6ZV90LA0KPiAgICNpZmRlZiBfX0JMT0NLU19fDQo+ICAgaW50CSBoZWFwc29y dF9iKHZvaWQgKiwgc2l6ZV90LCBzaXplX3QsDQo+ICAgCSAgICBpbnQgKF4gX05vbm51bGwp KGNvbnN0IHZvaWQgKiwgY29uc3Qgdm9pZCAqKSk7DQo+ICt2b2lkCSBic29ydF9iKHZvaWQg Kiwgc2l6ZV90LCBzaXplX3QsDQo+ICsJICAgIGludCAoXiBfTm9ubnVsbCkoY29uc3Qgdm9p ZCAqLCBjb25zdCB2b2lkICopKTsNCj4gICB2b2lkCSBxc29ydF9iKHZvaWQgKiwgc2l6ZV90 LCBzaXplX3QsDQo+ICAgCSAgICBpbnQgKF4gX05vbm51bGwpKGNvbnN0IHZvaWQgKiwgY29u c3Qgdm9pZCAqKSk7DQo+ICAgI2VuZGlmDQo+IEBAIC0zMTMsNiArMzE5LDggQEAgaW50CSBt a29zdGVtcHMoY2hhciAqLCBpbnQsIGludCk7DQo+ICAgaW50CSBta29zdGVtcHNhdChpbnQs IGNoYXIgKiwgaW50LCBpbnQpOw0KPiAgIHZvaWQJIHFzb3J0X3Iodm9pZCAqLCBzaXplX3Qs IHNpemVfdCwNCj4gICAJICAgIGludCAoKikoY29uc3Qgdm9pZCAqLCBjb25zdCB2b2lkICos IHZvaWQgKiksIHZvaWQgKik7DQo+ICt2b2lkCSBic29ydF9yKHZvaWQgKiwgc2l6ZV90LCBz aXplX3QsDQo+ICsJICAgIGludCAoKikoY29uc3Qgdm9pZCAqLCBjb25zdCB2b2lkICosIHZv aWQgKiksIHZvaWQgKik7DQo+ICAgaW50CSByYWRpeHNvcnQoY29uc3QgdW5zaWduZWQgY2hh ciAqKiwgaW50LCBjb25zdCB1bnNpZ25lZCBjaGFyICosDQo+ICAgCSAgICB1bnNpZ25lZCk7 DQo+ICAgdm9pZAkqcmVhbGxvY2FycmF5KHZvaWQgKiwgc2l6ZV90LCBzaXplX3QpIF9fcmVz dWx0X3VzZV9jaGVjaw0KPiBAQCAtMzk3LDYgKzQwNSwxMSBAQCBlcnJub190CSBxc29ydF9z KHZvaWQgKiwgcnNpemVfdCwgcnNpemVfdCwNCj4gICAgICAgaW50ICgqKShjb25zdCB2b2lk ICosIGNvbnN0IHZvaWQgKiwgdm9pZCAqKSwgdm9pZCAqKTsNCj4gICAjZW5kaWYgLyogX19F WFQxX1ZJU0lCTEUgKi8NCj4gICANCj4gKyNpZiBfX0JTRF9WSVNJQkxFDQo+ICtlcnJub190 CSBic29ydF9zKHZvaWQgKiwgcnNpemVfdCwgcnNpemVfdCwNCj4gKyAgICBpbnQgKCopKGNv bnN0IHZvaWQgKiwgY29uc3Qgdm9pZCAqLCB2b2lkICopLCB2b2lkICopOw0KPiArI2VuZGlm IC8qIF9fQlNEX1ZJU0lCTEUgKi8NCj4gKw0KPiAgIF9fRU5EX0RFQ0xTDQo+ICAgX19OVUxM QUJJTElUWV9QUkFHTUFfUE9QDQo+ICAgDQpUaGlzIGNhdXNlcyBwb3J0cyB0byBmYWlsLCBz byBmYXIgd2l0aCBQeXRob24ncyBjb25maWd1cmUgcGhhc2UgYW5kIGFueSANClB5dGhvbiBw b3J0cyB3aXRoIEMgZXh0ZW5zaW9uczoNCg0KSW4gZmlsZSBpbmNsdWRlZCBmcm9tIC91c3Iv bG9jYWwvaW5jbHVkZS9weXRob24zLjExL1B5dGhvbi5oOjIzOg0KL3Vzci9pbmNsdWRlL3N0 ZGxpYi5oOjQwOToxOiBlcnJvcjogdW5rbm93biB0eXBlIG5hbWUgJ2Vycm5vX3QnDQplcnJu b190ICBic29ydF9zKHZvaWQgKiwgcnNpemVfdCwgcnNpemVfdCwNCl4NCi91c3IvaW5jbHVk ZS9zdGRsaWIuaDo0MDk6MzU6IGVycm9yOiByZWRlZmluaXRpb24gb2YgcGFyYW1ldGVyICdy c2l6ZV90Jw0KZXJybm9fdCAgYnNvcnRfcyh2b2lkICosIHJzaXplX3QsIHJzaXplX3QsDQog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF4NCi91c3IvaW5jbHVkZS9zdGRs aWIuaDo0MDk6MjY6IG5vdGU6IHByZXZpb3VzIGRlY2xhcmF0aW9uIGlzIGhlcmUNCmVycm5v X3QgIGJzb3J0X3Modm9pZCAqLCByc2l6ZV90LCByc2l6ZV90LA0KICAgICAgICAgICAgICAg ICAgICAgICAgICBeDQoyIGVycm9ycyBnZW5lcmF0ZWQuDQoNCi0tIA0KQ2hhcmxpZSBMaQ0K 4oCmbm9wZSwgc3RpbGwgZG9uJ3QgaGF2ZSBhbiBleGl0IGxpbmUuDQoNCg== --------------Yq4HVSZ07ujd62OJ7HtERO4X-- --------------WXLeifDdyhfDecUtGsscvZLl Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEJXd5utNNhpeHcBMx/reFK+KbPocFAmRAO+MFAwAAAAAACgkQ/reFK+KbPock zw/+MQw/5oYk019Qrnp/NfOcP/x3+n7ScygaG46306rAJQ+a4Y3iq6q8jTuc4N5IFrp2Cxsk91Rz T182oCSm6Z3QOHjXXrJtXh4xKYuUHs8YRzM+idusmKgZxkUacJNuoTLDBW7qeXTvsIb92cMLAIi6 nZZorfFOLbQ5eUlpwOLK37Fjv/S+zi2QiFYemmoi8Zmfe1o4btSSxtynCveFAlMBaWgcPVBGdEb+ V9dqkBXsmUVag/dL3id4NHqNTpVQFjkWitWuFYJq5NtKv3Y2BKGzXy2oKU2D6r6xO6t3QC/1b+zz 27bapVXI/mz5AtetvjY/b2W1HosQWX0/TFvYoG3o5XnoITKQ+CdPxsJFZZBtxeQ3/ItlTTHsO62t hUf6BxwZWMaoHF6JQ54ZuCw+sKfQ8da2/fUmhlvfsCQCDBjcyyEA15b4041GzCqv+50b1h4PJI72 14Ay43LAgew6X42l6JqcjM93oL1Dhtpa8q3JN2vSdJvT0lBkfdKuNLo6wUhraLBuxdtWyNJ2yrM8 f/NZ4JMxXECOQb6Z/mCHVhFGfRddekdSq2meAxgEDbuWTMrHF+b9Zsox7bIVQEKHgxkC8gAKcOML vyFQ+giDNkuDRuXenj2rPbgXLqh+Pp+5Wn/G4zM4MZV5mA9snarBp/uHUh/cqynE8iG20sDEHEJu P3Q= =g3Em -----END PGP SIGNATURE----- --------------WXLeifDdyhfDecUtGsscvZLl-- From nobody Wed Apr 19 19:27:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1rQY0knKz46Lwf; Wed, 19 Apr 2023 19:27:17 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1rQX5jvYz3HWY; Wed, 19 Apr 2023 19:27:16 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 339AD2605DB; Wed, 19 Apr 2023 21:27:14 +0200 (CEST) Message-ID: Date: Wed, 19 Apr 2023 21:27:14 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. To: Jessica Clarke Cc: Brooks Davis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> Content-Language: en-US From: Hans Petter Selasky In-Reply-To: <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q1rQX5jvYz3HWY X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 19:51, Jessica Clarke wrote: > On 19 Apr 2023, at 18:24, Hans Petter Selasky wrote: >> >> On 4/19/23 17:46, Brooks Davis wrote: >>> On Wed, Apr 19, 2023 at 12:06:26PM +0000, Hans Petter Selasky wrote: >>>> The branch main has been updated by hselasky: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=8dcf3a82c54cb216df3213a013047907636a01da >>>> >>>> commit 8dcf3a82c54cb216df3213a013047907636a01da >>>> Author: Hans Petter Selasky >>>> AuthorDate: 2022-09-08 10:16:43 +0000 >>>> Commit: Hans Petter Selasky >>>> CommitDate: 2023-04-19 12:04:22 +0000 >>>> >>>> libc: Implement bsort(3) a bitonic type of sorting algorithm. >>>> The bsort(3) algorithm works by swapping objects, similarly to qsort(3), >>>> and does not require any significant amount of additional memory. >>>> The bsort(3) algorithm doesn't suffer from the processing time issues >>>> known the plague the qsort(3) family of algorithms, and is bounded by >>>> a complexity of O(log2(N) * log2(N) * N), where N is the number of >>>> elements in the sorting array. The additional complexity compared to >>>> mergesort(3) is a fair tradeoff in situations where no memory may >>>> be allocated. >>>> The bsort(3) APIs are identical to those of qsort(3), allowing for >>>> easy drop-in and testing. >>>> The design of the bsort(3) algorithm allows for future parallell CPU >>>> execution when sorting arrays. The current version of the bsort(3) >>>> algorithm is single threaded. This is possible because fixed areas >>>> of the sorting data is compared at a time, and can easily be divided >>>> among different CPU's to sort large arrays faster. >>>> Reviewed by: gbe@, delphij@, pauamma_gundo.com (manpages) >>>> Sponsored by: NVIDIA Networking >>>> Differential Revision: https://reviews.freebsd.org/D36493 >>> Why was this needed? I'm not really a fan to adding new, non-standard >>> sorts without a clear use case. I understand it has some specific >>> advantages vs qsort, but are we going to use it? Doing so will make our >>> code less portable so we almost certainly can't s/qsort/bsort/. >> >> Hi Brooks, >> >> My long term plan is to get bsort() to replace qsort(), but because the two algorithms have different characteristics, then some people may complain it is good for me, but not for you. I want there to be an option besides from qsort(), which does not use malloc() as an integral part of sorting. And is faster than O(N*N) sorting (still the worst case for qsort in FreeBSD). > > Why not do an adaptive qsort instead like other standard libraries? > > Also, nothing actually says qsort doesn’t allocate memory; in fact, > glibc’s own documentation states that one should not assume it is > in-place and doesn’t allocate. Hi Jessica, > >> qsort() is frequently used to do all kinds of sorting, and some pointed out that qsort() can technically be any kind of sorting algorithm, but looking around it is not. > > Because there are variants that are guaranteed n log n? Which is better > than your n log^2 n. Only so-called mergesort() algorithms can do sorting in O(N log N) time, from what I know. And it needs to allocate working memory, when the sorting arrays get large. From past experience, malloc() is a problem in the fast path. If only mergesort() could pre-allocate that memory, or have a pointer to pass working memory. What is the point of allocating and freeing memory over and over again, in certain applications, doing frequent sorting. The API is broken. > >> When I build applications of my own, I always use mergesort(), which depend on malloc(). Having a dependency on a certain memory allocator to get performance is not good. >> >> I want to distinguish from qsort() by calling it bsort(). If people use bsort() they know what they get cross-platform. > > No they don’t, bsort can mean multiple things. In the C-code standard domain, can you give examples of different meanings of bsort() which are established? I'm not aware of any such existing usage. > If you want a specific > algorithm, put it in your program, but please don’t, just use a > standardised function like qsort. Sorting is a quite generic thing. Likewise with we support four different ways to make lists. And then after epoch(9) was introduced came another three ways, basically replicas of with different properties (See: sys/contrib/ck/include/ck_queue.h) Personally I think the same about mergesort(), qsort() and bsort(). They are so different and unique ways to sort that we should have all of them in libc. They each serve a purpose. > >> If people use qsort() the output is random basically. It helps very little my application works on FreeBSD, but not Linux, for example. > > No, the output is sorted, which is far from random. And if you need a > stable sort you should ask for one. Let me rephrase: Random with regards to execution time. mergesort() : not for realtime applications (syscalls can sleep when getting working memory) qsort() : usually fast, but not always bsort() : Worst case is "N * log2 N" compared to "N * N" (qsort), and no syscalls are involved. > >> In FreeBSD qsort() is typically used for sorting files up to 16K entries per directory. Even if qsort() can explode in time, probably it's not that important. But when using qsort() for sorting millions of mathematical expressions, for example, doing number analysis, this is unacceptable. >> >> I think "C.A.R. Hoare's quicksort" technique is designed for single CPU systemsf only. Even if the best-case average is "N*log2(N)", that amount of processing cannot be split by multiple CPUs. The algorithm is serial as such. >> >> The bsort() algorithm is much more NCPU friendly, because it can split the work into fixed size smaller and independent work loads. Otherwise the work load doubles every time you merge two sorted lists. And when the number of lists to merge is fewer than the number of CPUs available, your system runs out of guts basically. > > I highly doubt you want a libc sort routine to start spawning threads. Right. I'm thinking more like Grand Dispatch Central, though not that common in FreeBSD, we still have a wiki page: https://wiki.freebsd.org/GrandCentralDispatch bsort() itself doesn't have to create threads to be SMP'ed, but can provide the basic functions for SMP sorting. When sorting records, the clever way to do it, is to make a list of pointers to those records, and sort based on that, swapping pointers first, then records in the end. Technically you could have 4 CPUs go in a tight spin on different parts of the bsort() algorithm, and by use of existing atomic compare and set pointer operations, you could make a fully deterministic sorting algorithm, even if the different CPUs clobber on the same memory locations. This is something I want to explore later. Neither mergesort() nor qsort() can do that. > That also seems extremely contradictory to your claim about wanting one > that doesn’t allocate memory, but creating threads is going to do much > more than just that, and would scream POLA violation to me. See my explanation above. TAILQ_INSERT_TAIL() can also be used in multithreading environments, without having to link to pthreads. > >>> I also note that the swap code is pointlessly slow for size > 256 and >>> should almost certainly use aliasing with matching words like memcpy >>> implementations do. Doing so would make it easier to port this code to >>> CHERI where that is required. >> >> I totally agree about the swap code being pointless. And I tried to look where is memswap(), but it was not there. This kind of swapping is done many places, and we could benefit from having a compiler supported memswap() function. What do you think? > > We agree: https://github.com/CTSRD-CHERI/cheribsd/issues/207. But the > world doesn’t have that in C. Yes, that's a good idea! I'll try to follow that lead. > > We don’t need new non-standard sorting routines in libc. > We don't need English tea either ;-) --HPS From nobody Wed Apr 19 19:46: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 4Q1rrZ3nwvz46NTV; Wed, 19 Apr 2023 19:46: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 4Q1rrY3Jqtz462R; Wed, 19 Apr 2023 19:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681933581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NbfHOj3mB1aYZUGg7kuz+LvXcespWARp/Bwv4KGKHbU=; b=qpe+zXtfKAMBW3vwYTzHBJPu15GDsEXOUjj6WFQX2Eo2zlkx3/GaUqghZbaiLhG8RjKile jD0vmHCH0yCrpAj/Sr4ji9kLpgpfEp+NDYqow/62SYXLgy8SaqbqUUws/3DBctWBnHMbON Pq0vy/to81J1VO2P5hKTqGkE1D6Jh/3utt2YdpvnP5vEeY08PGko2iskk8qLcpu36pc5Uw Oya9LRea5FrPpPKyY0NGv1fecgOnj2cfsr3n85x0emllca1Z7frv9nyG7P2PveUbkT5MaJ LOwjl/diYzvnGTA+io8uywMpn2uRhdbxRFuMgaEw5L5pbfmcgXD31CJHplSgiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681933581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NbfHOj3mB1aYZUGg7kuz+LvXcespWARp/Bwv4KGKHbU=; b=ExkoOB1shAsCTrlQsygvizWKOZeHaoBNqFuaZXvnzFiXMeRIeMFl4E96QKNwO23MG7xxXO 2JzLbp25sExouxV8tXesOniqcYX9GNB7YFa+GVKibC25fZTxMcfU1GCyZsfy0OvmONPQsw ViWNi/bdMZ25ExnCGGAyiWpHuhu3ISlJdU3Cqe+Vf+ux4a4hoF69JTZ1wB2F++y/BSoS5V TbO/k17SDEWqxXR3w+O9YjQWSIUr6T5YZgDNFY0EXu3JPQwKS308YTSJvDIfZ+n9ch0e4/ rZekV1TzDjUpRAc3gsop2O1y07QtEUV7HL5mx7TPmho/LHwDdlS0HvUr0fL7BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681933581; a=rsa-sha256; cv=none; b=G8gFc5/P6qcZSDGBdnx0PJT4uOnX55rSC+I22MvoK+vBkJLMKNG1vi1iLmvWVjj/JlgYwC UTO/nqBea/+znMnEXYFaD8pMVMEieQ2vYRlEChk1DHYDOX3O8Wx4iIOBdfoEg6PlH65f31 8J+RP7w1INK5eFFUwwDhwEDqHf7z7dwe2yIeWI07h+fl2NyBmsEzCxEa5+cR4YsQ9bjZJE 5tAsW9vC8hsOktbfaSRbncuGYuLIHizDN24/p704c3ebsHYr5Ppo0aGnAAQicZhnz6VhjN XamTA2mBtSn1ltsAQPAjR91qMNhFbXn3vL4BvsAGl6oB/og4L1BQnvMHTh+9jA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1rrY2QQqz16bw; Wed, 19 Apr 2023 19:46: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 33JJkLDM020888; Wed, 19 Apr 2023 19:46:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JJkLKT020887; Wed, 19 Apr 2023 19:46:21 GMT (envelope-from git) Date: Wed, 19 Apr 2023 19:46:21 GMT Message-Id: <202304191946.33JJkLKT020887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: ac7506f22fa6 - stable/13 - tty: Default to printing kernel stack traceback only on INVARIANT kernels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/stable/13 X-Git-Reftype: branch X-Git-Commit: ac7506f22fa6420a85327a3831e766706003c36c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ac7506f22fa6420a85327a3831e766706003c36c commit ac7506f22fa6420a85327a3831e766706003c36c Author: Warner Losh AuthorDate: 2023-04-19 19:32:45 +0000 Commit: Warner Losh CommitDate: 2023-04-19 19:44:20 +0000 tty: Default to printing kernel stack traceback only on INVARIANT kernels Change the default from printing a breif kernel thread stack informaton back to omitting it for non-invariant kernels in response to SIGINFO/^T. Full and brief stack support can be selected with the kern.tty_info_kstacks sysctl. MFC After: 2 weeks Sponsored by: Netflix Reviewed by: grembo, jhb Differential Revision: https://reviews.freebsd.org/D35576 (cherry picked from commit b69996d1d5d08fd5009ac325ea8e8154efd01b33) --- sys/kern/tty_info.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/tty_info.c b/sys/kern/tty_info.c index 237aa47a18da..be6de114bdfd 100644 --- a/sys/kern/tty_info.c +++ b/sys/kern/tty_info.c @@ -239,7 +239,11 @@ sbuf_tty_drain(void *a, const char *d, int len) } #ifdef STACK +#ifdef INVARIANTS static int tty_info_kstacks = STACK_SBUF_FMT_COMPACT; +#else +static int tty_info_kstacks = STACK_SBUF_FMT_NONE; +#endif static int sysctl_tty_info_kstacks(SYSCTL_HANDLER_ARGS) From nobody Wed Apr 19 19:49: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 4Q1rw469Lmz46NSD; Wed, 19 Apr 2023 19:49:24 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1rw413k2z4DjK; Wed, 19 Apr 2023 19:49:24 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id BE8DE26010F; Wed, 19 Apr 2023 21:49:22 +0200 (CEST) Message-ID: Date: Wed, 19 Apr 2023 21:49:23 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Charlie Li , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q1rw413k2z4DjK X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 21:07, Charlie Li wrote: > Hans Petter Selasky wrote: > This causes ports to fail, so far with Python's configure phase and any > Python ports with C extensions: > > In file included from /usr/local/include/python3.11/Python.h:23: > /usr/include/stdlib.h:409:1: error: unknown type name 'errno_t' > errno_t  bsort_s(void *, rsize_t, rsize_t, > ^ > /usr/include/stdlib.h:409:35: error: redefinition of parameter 'rsize_t' > errno_t  bsort_s(void *, rsize_t, rsize_t, >                                   ^ > /usr/include/stdlib.h:409:26: note: previous declaration is here > errno_t  bsort_s(void *, rsize_t, rsize_t, >                          ^ > 2 errors generated. > Hi Charlie, The following patch should fix it. I'm just kicking a buildworld to ensure nothing else is broken. Will push this once that is complete. > From ed6a0aaa839086cfe2037989fc8feb3ac864be63 Mon Sep 17 00:00:00 2001 > From: Hans Petter Selasky > Date: Wed, 19 Apr 2023 21:37:29 +0200 > Subject: [PATCH] libc: bsort_s() requires both __BSD_VISIBLE and > __EXT1_VISIBLE > > Fixes build of Python. > > Found by: vishwin@ > MFC after: 1 week > Sponsored by: NVIDIA Networking > Differential Revision: https://reviews.freebsd.org/D36493 > --- > include/stdlib.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/stdlib.h b/include/stdlib.h > index 857092b9053e..3ad28cf68847 100644 > --- a/include/stdlib.h > +++ b/include/stdlib.h > @@ -403,12 +403,12 @@ void ignore_handler_s(const char * __restrict, void * __restrict, errno_t); > /* K.3.6.3.2 */ > errno_t qsort_s(void *, rsize_t, rsize_t, > int (*)(const void *, const void *, void *), void *); > -#endif /* __EXT1_VISIBLE */ > > #if __BSD_VISIBLE > errno_t bsort_s(void *, rsize_t, rsize_t, > int (*)(const void *, const void *, void *), void *); > #endif /* __BSD_VISIBLE */ > +#endif /* __EXT1_VISIBLE */ > > __END_DECLS > __NULLABILITY_PRAGMA_POP > -- > 2.40.0 --HPS From nobody Wed Apr 19 20:06: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 4Q1sJB6133z46PMc; Wed, 19 Apr 2023 20:06:50 +0000 (UTC) (envelope-from kevans@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 4Q1sJB3NtHz3MHr; Wed, 19 Apr 2023 20:06:50 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681934810; 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=tE1F7VLyV332yaTYewuAIqQc38TOFrbYpBsR3dSNsKc=; b=qoc7B4pBtCGTqa5wPJ+cc3K9cLzukbyegS+yDEdfwAIncx2ppT+CMkSPvjZ24Kl+K3b0A4 o5qrmTXjHYHsGZ6tB6jDMvJ1PbXHpahjsQquusHBqk18hvvZFAxWMzcVfL4OnWCd1jjKNv Rzxl7Qb4Sqt34ZhUKADr8MB97GRnEZlVf2RBtHD1/IolAzawftWCqmquMhdl64NxEN0aHi aZD+VgmJzMOdVv1BLLv5E4y/Y/AjmwvJPrIT5AxtvQpIHA5aiJXPa6HqP7FN9GXGQOyroF qtx4CwJCwRR3hM7hRyT4OGN1Zy6RSdzAryAoyh7rYGxfKFSYW25k+1GUAyN0ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681934810; 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=tE1F7VLyV332yaTYewuAIqQc38TOFrbYpBsR3dSNsKc=; b=jQqt7vlXYLPB5QUPi1z3KPTDVrDGTxXGgBB4JtdkGE/M/6EbqsY1g8OIqLFOw6mCQS9xcs YQe90d6gnc7oKt0zYaFFCmTkpltcmlsanDTq7dGj9hT3uEqylyuocuIYYgig0eMSQV9Ue0 X0+q3ZFIemdMI/vjdADD4qVG5eQK2ctJXqOMlhARZYDx9og43oWRTRU+Zw3V0LEQTaf0BF 4/lJ+uj4TEKUfSTNC5zH+MVnekFEiN5veEICeTMSUXbQTYrUYvAJbXG2HTqqm/JWudi16B 8n+ckMAj/1qrbIBh4ltJKJ9hNyfiH5HfBbP18qTSFBgRNO+s0T9hndtd3Ox4FQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681934810; a=rsa-sha256; cv=none; b=guw5pVjljnbcH2qqgdUZ2da9FOOIVUu3n6NaJx+K7kamjgc9KGwPLMOgdEWQuv9hc60wgl O6e0y/07UA3wrdrUmReblMoEHiygdf59Bii7H+z3tmci1S48KVuFeaJqhqLsp4SI4M8Fij SwOUhmVFPLQF4D7TQqQGokCShuRmnFfOnPDjImLOeJzZOe4blOvIVlF5O4IQB3jCZ6TXtk T2xlsNbJdQcoG6F5viajAIJJCchSFy1HMoJ7F4f6Zow3HWKi8h+QmQsemo0QtXj+dqefHI TJOG0EB0/o8ITZOJzz0LlkV/3/RhNhHsiaN8eYFClOBa2VBK3eCa5nfMvSieYQ== Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (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)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q1sJ94CspzQG8; Wed, 19 Apr 2023 20:06:49 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f175.google.com with SMTP id br19so457420qtb.7; Wed, 19 Apr 2023 13:06:49 -0700 (PDT) X-Gm-Message-State: AAQBX9dxQ8jZrRQtPjmCmnc8VHdr9QFlWuWm5j+pSLY94Tt+27yW/GeF OsmFLxFOdVVVlQlce/ZazeE0W1yG+LQvUUYHC2I= X-Google-Smtp-Source: AKy350bxlV0l4AGmYt6GoyCM27k4rOxg5lVz+GKVSj3wp5F4Avfc7e1IeFDg/E4FPjEzHmXGXgoldFK9yJ2Ii92W+xA= X-Received: by 2002:ac8:5c09:0:b0:3dc:3eac:eddb with SMTP id i9-20020ac85c09000000b003dc3eaceddbmr1423293qti.13.1681934809045; Wed, 19 Apr 2023 13:06:49 -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: <202205310005.24V05MTi034088@gitrepo.freebsd.org> In-Reply-To: <202205310005.24V05MTi034088@gitrepo.freebsd.org> From: Kyle Evans Date: Wed, 19 Apr 2023 15:06:38 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: c1e813d12309 - main - hwpmc: Correct selection of Intel fixed counters. To: Alexander Motin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, "Sideropoulos, Alexander" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Mon, May 30, 2022 at 7:05=E2=80=AFPM Alexander Motin w= rote: > > The branch main has been updated by mav: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc1e813d1230915e19a236ec687= cadc1051841e56 > > commit c1e813d1230915e19a236ec687cadc1051841e56 > Author: Alexander Motin > AuthorDate: 2022-05-30 23:46:48 +0000 > Commit: Alexander Motin > CommitDate: 2022-05-31 00:05:15 +0000 > > hwpmc: Correct selection of Intel fixed counters. > > Intel json's use event=3D0 to specify fixed counter number via umask. > Alternatively fixed counters have equivalent programmable event/umask= . > > MFC after: 1 month > --- > sys/dev/hwpmc/hwpmc_core.c | 34 +++++++++++++++++++++++++--------- > 1 file changed, 25 insertions(+), 9 deletions(-) > > diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c > index fce97cbd5b8e..73cfee0b3975 100644 > --- a/sys/dev/hwpmc/hwpmc_core.c > +++ b/sys/dev/hwpmc/hwpmc_core.c > @@ -245,15 +245,31 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, > ev =3D IAP_EVSEL_GET(config); > umask =3D IAP_UMASK_GET(config); > > - /* INST_RETIRED.ANY */ > - if (ev =3D=3D 0xC0 && ri !=3D 0) > - return (EINVAL); > - /* CPU_CLK_UNHALTED.THREAD */ > - if (ev =3D=3D 0x3C && ri !=3D 1) > - return (EINVAL); > - /* CPU_CLK_UNHALTED.REF */ > - if (ev =3D=3D 0x0 && umask =3D=3D 0x3 && ri !=3D 2) > - return (EINVAL); > + if (ev =3D=3D 0x0) { > + if (umask !=3D ri + 1) > + return (EINVAL); Hey Alexander, This seems to break system-mode sampling of fixed-mode counters; e.g., from the manpage, `pmcstat -S instructions`, and I'm not at all familiar with these parts of pmc. We come in once with umask=3D1, ri=3D0; then again with umask=3D1, ri=3D1. The latter fails and we try umask=3D1, ri=3D2, which again fails, and the PMCALLOCATE op ultimately fails. Is `umask !=3D ri + 1` correct, or should this be reverted back to `umask =3D=3D 0x3 && ri !=3D 2` or something else? I've no idea what the `umask` values represent in this context. Thanks, Kyle Evans From nobody Wed Apr 19 20:13: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 4Q1sRf2PWxz46PRY; Wed, 19 Apr 2023 20:13: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 4Q1sRf1k0hz3nqq; Wed, 19 Apr 2023 20:13:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681935198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKPYOQrG810WK3BRlhCAC3bMb6Qs8IACajMza7uZRRg=; b=cRftdSUEFiJ6n9Ar97soEvL6wEit1tftf85R1jqqlYmQDhy4L33NwdSiDUL199Fv9CWg3W xR8keUcTyjWtHcjUbVPyZU04ooK1FJR2LoJmR0KCMJE7zoVBLmrAm0t8KOVO1w3qRVdigG lW++w3+UoklNrZjAtX0vGwzMTJRoqBzsgaXVdUe/U/Qr38Yn0pmLqq1J0LZG12QIy3NyXZ GNUOI/lAVz/lQb2ncbkW5vxagXHF3FKYi1BMm4206uG8WoMXWTtdZwZMfk+fKev9gIvqjg MdheGfW1i+Ht9Am/2n2zUL0utUuNK+Ik6aJ3ZnyTECBHCz+YAYv/QB7MW1AMtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681935198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKPYOQrG810WK3BRlhCAC3bMb6Qs8IACajMza7uZRRg=; b=MtpH2nVcmetGpcTCJz9ogZwLpG/nfKMFIBDfI7m+FmjmHpwFKZrSd3vtFSCLI9kh/bd/ZL 5T64ve1obdy3QKQ5cUTuEOakYNeW6SjXAAL5jMx4vMZkqa7YaVpygusygJXi3Xeq15wg4b dbBFqUo6y6ZywfUfflPBwyTds2f4VwvCaPnlr2PEyWjWwFbRyCTHuBenFu5qL86XvNynQH 05G9IrjAJQIKwcgQlXXbu8pa34d4uzx8eh4MD1Mx6ZX9LcRwYj2WmBz2qXOItqPAMbIde4 EnG3Dcxyi8pX86sEvCxdxnDNXfIKEVX5pnAxBNtELT3CTxdruoIfh7oJxBdyaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681935198; a=rsa-sha256; cv=none; b=nGxbQYDtmClDTeFYezAJMkNI2LmALqEV6BpQiJMg98saN+FOR2L8SDO8fC1SFE1nvKjy8E XkyY/+Zn64X3EMAnYstAhPPp/X9PIpKrxuxvtR4EQRa/u7WBz/hcaeoD+MKhYkditbQP1h /NK0sXeLP5WDuOEN9ytL6L4jSpNsu4eoMmllED9nDzHPmKy2bpvRifFeVQvWCqH76o7xQx tafU7rS7DIzBQVNuFTDLlbeJnOpVlJ5EV+q2GzVynA8CMBTn3Anrg1U4cfxBK4ToIfYL/R JbrQPIe1QXRavsO1/66GIB0Yy+1MPCgjS6ygOWuz/or18WV2j9v4GWZFrLA5tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1sRf0l5Hz17pd; Wed, 19 Apr 2023 20:13: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 33JKDILN070522; Wed, 19 Apr 2023 20:13:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JKDIrM070521; Wed, 19 Apr 2023 20:13:18 GMT (envelope-from git) Date: Wed, 19 Apr 2023 20:13:18 GMT Message-Id: <202304192013.33JKDIrM070521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: a7469c9c0a50 - main - libc: bsort_s() requires both __BSD_VISIBLE and __EXT1_VISIBLE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f commit a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f Author: Hans Petter Selasky AuthorDate: 2023-04-19 19:37:29 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-19 20:12:04 +0000 libc: bsort_s() requires both __BSD_VISIBLE and __EXT1_VISIBLE Fixes build of Python: /usr/include/stdlib.h:409:1: error: unknown type name 'errno_t' errno_t bsort_s(void *, rsize_t, rsize_t, Reported by: vishwin@ MFC after: 1 week Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D36493 --- include/stdlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/stdlib.h b/include/stdlib.h index 857092b9053e..3ad28cf68847 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -403,12 +403,12 @@ void ignore_handler_s(const char * __restrict, void * __restrict, errno_t); /* K.3.6.3.2 */ errno_t qsort_s(void *, rsize_t, rsize_t, int (*)(const void *, const void *, void *), void *); -#endif /* __EXT1_VISIBLE */ #if __BSD_VISIBLE errno_t bsort_s(void *, rsize_t, rsize_t, int (*)(const void *, const void *, void *), void *); #endif /* __BSD_VISIBLE */ +#endif /* __EXT1_VISIBLE */ __END_DECLS __NULLABILITY_PRAGMA_POP From nobody Wed Apr 19 20:15: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 4Q1sTn4t2vz46PPg; Wed, 19 Apr 2023 20:15:09 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1sTm53b1z3rvl; Wed, 19 Apr 2023 20:15:08 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2a01:4f8:c17:6c4b::2 is neither permitted nor denied by domain of hselasky@freebsd.org) smtp.mailfrom=hselasky@freebsd.org; dmarc=none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 44E94260220; Wed, 19 Apr 2023 22:15:06 +0200 (CEST) Message-ID: <54e824c6-4b42-40d7-a8fb-9c4c4b062d47@freebsd.org> Date: Wed, 19 Apr 2023 22:15:05 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. From: Hans Petter Selasky To: Charlie Li , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [0.78 / 15.00]; NEURAL_HAM_LONG(-0.99)[-0.990]; NEURAL_SPAM_MEDIUM(0.98)[0.983]; NEURAL_SPAM_SHORT(0.89)[0.888]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[hselasky]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4Q1sTm53b1z3rvl X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 21:49, Hans Petter Selasky wrote: > On 4/19/23 21:07, Charlie Li wrote: >> Hans Petter Selasky wrote: > >> This causes ports to fail, so far with Python's configure phase and >> any Python ports with C extensions: >> >> In file included from /usr/local/include/python3.11/Python.h:23: >> /usr/include/stdlib.h:409:1: error: unknown type name 'errno_t' >> errno_t  bsort_s(void *, rsize_t, rsize_t, >> ^ >> /usr/include/stdlib.h:409:35: error: redefinition of parameter 'rsize_t' >> errno_t  bsort_s(void *, rsize_t, rsize_t, >>                                    ^ >> /usr/include/stdlib.h:409:26: note: previous declaration is here >> errno_t  bsort_s(void *, rsize_t, rsize_t, >>                           ^ >> 2 errors generated. >> > > Hi Charlie, > > The following patch should fix it. I'm just kicking a buildworld to > ensure nothing else is broken. Will push this once that is complete. > Hi, Then the buildworld completed for amd64 and the fix is in: a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f I also tested building python38 from sources. --HPS From nobody Wed Apr 19 20:17: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 4Q1sY413qJz46Pv6 for ; Wed, 19 Apr 2023 20:18:00 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 4Q1sY36Xylz3xhR for ; Wed, 19 Apr 2023 20:17:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f43.google.com with SMTP id n43-20020a05600c502b00b003f17466a9c1so2080533wmr.2 for ; Wed, 19 Apr 2023 13:17:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681935478; x=1684527478; 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=rwUMbvtlVqEwBFoH8OQ9M6yG9iPsfzCkBhQ+lfoGb4k=; b=ERsatxRca40dz3ZY0wddvBA8ZVUQknuhVH2FYQzwrdwnitEmGHpqtvN5uFCNFrOEnp AjV3mLZec9Rl6zWe5YgBIGoOMU07p5N7e/6jaKZHQUHNPfVTIj/AxC/ndhy9yF6jloJv +wd5ur39hIltFVlpaD2ktwFtvZn3flwzvoFLIDVxUTJ7ocHVSwUYwyZq0TVxUYm5nF9c W7CCgcLz0/I6NBJ0TxaQlsEnoZ6jsXXgPZm1hnnuDQ2OgLz8mAXLAmpchvwhNLFyBXqN PYU2U9i5p3xOjR/0zR0qTEISsDh6DDnvZZZ1Ek9F+t+PMdUGkbrAt/e8bPbLX9FU5IOa tGYg== X-Gm-Message-State: AAQBX9d318M5wtf/HQT3bNs34nxnG6M4lluH29mpge3249g7TT62CBvE ptiaVtQhzsbqKOjlTqhAr4uah0tv+UvFuQCkyQxhrg== X-Google-Smtp-Source: AKy350awf187czuAFzk/xqSPRSZhDJfdQ9w71xEExB/KQg2ktpR8Fd9NvLE18BBKjqEgAAYJ+lDAww== X-Received: by 2002:a05:600c:538f:b0:3f1:7510:62e8 with SMTP id hg15-20020a05600c538f00b003f1751062e8mr2717152wmb.3.1681935478371; Wed, 19 Apr 2023 13:17:58 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id j22-20020a5d6e56000000b002fbb285b01fsm36218wrz.25.2023.04.19.13.17.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2023 13:17:57 -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 \(3696.120.41.1.1\)) Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. From: Jessica Clarke In-Reply-To: Date: Wed, 19 Apr 2023 21:17:57 +0100 Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q1sY36Xylz3xhR 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 19 Apr 2023, at 20:27, Hans Petter Selasky = wrote: >=20 > On 4/19/23 19:51, Jessica Clarke wrote: >> On 19 Apr 2023, at 18:24, Hans Petter Selasky = wrote: >>>=20 >>> On 4/19/23 17:46, Brooks Davis wrote: >>>> On Wed, Apr 19, 2023 at 12:06:26PM +0000, Hans Petter Selasky = wrote: >>>>> The branch main has been updated by hselasky: >>>>>=20 >>>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D8dcf3a82c54cb216df3213a013047907= 636a01da >>>>>=20 >>>>> commit 8dcf3a82c54cb216df3213a013047907636a01da >>>>> Author: Hans Petter Selasky >>>>> AuthorDate: 2022-09-08 10:16:43 +0000 >>>>> Commit: Hans Petter Selasky >>>>> CommitDate: 2023-04-19 12:04:22 +0000 >>>>>=20 >>>>> libc: Implement bsort(3) a bitonic type of sorting algorithm. >>>>> The bsort(3) algorithm works by swapping objects, = similarly to qsort(3), >>>>> and does not require any significant amount of additional = memory. >>>>> The bsort(3) algorithm doesn't suffer from the processing = time issues >>>>> known the plague the qsort(3) family of algorithms, and is = bounded by >>>>> a complexity of O(log2(N) * log2(N) * N), where N is the = number of >>>>> elements in the sorting array. The additional complexity = compared to >>>>> mergesort(3) is a fair tradeoff in situations where no memory = may >>>>> be allocated. >>>>> The bsort(3) APIs are identical to those of qsort(3), = allowing for >>>>> easy drop-in and testing. >>>>> The design of the bsort(3) algorithm allows for future = parallell CPU >>>>> execution when sorting arrays. The current version of the = bsort(3) >>>>> algorithm is single threaded. This is possible because fixed = areas >>>>> of the sorting data is compared at a time, and can easily be = divided >>>>> among different CPU's to sort large arrays faster. >>>>> Reviewed by: gbe@, delphij@, pauamma_gundo.com = (manpages) >>>>> Sponsored by: NVIDIA Networking >>>>> Differential Revision: https://reviews.freebsd.org/D36493 >>>> Why was this needed? I'm not really a fan to adding new, = non-standard >>>> sorts without a clear use case. I understand it has some specific >>>> advantages vs qsort, but are we going to use it? Doing so will = make our >>>> code less portable so we almost certainly can't s/qsort/bsort/. >>>=20 >>> Hi Brooks, >>>=20 >>> My long term plan is to get bsort() to replace qsort(), but because = the two algorithms have different characteristics, then some people may = complain it is good for me, but not for you. I want there to be an = option besides from qsort(), which does not use malloc() as an integral = part of sorting. And is faster than O(N*N) sorting (still the worst case = for qsort in FreeBSD). >> Why not do an adaptive qsort instead like other standard libraries? >> Also, nothing actually says qsort doesn=E2=80=99t allocate memory; in = fact, >> glibc=E2=80=99s own documentation states that one should not assume = it is >> in-place and doesn=E2=80=99t allocate. >=20 > Hi Jessica, >=20 >>> qsort() is frequently used to do all kinds of sorting, and some = pointed out that qsort() can technically be any kind of sorting = algorithm, but looking around it is not. >> Because there are variants that are guaranteed n log n? Which is = better >> than your n log^2 n. >=20 > Only so-called mergesort() algorithms can do sorting in O(N log N) = time, from what I know. And it needs to allocate working memory, when = the sorting arrays get large. =46rom past experience, malloc() is a = problem in the fast path. If only mergesort() could pre-allocate that = memory, or have a pointer to pass working memory. What is the point of = allocating and freeing memory over and over again, in certain = applications, doing frequent sorting. The API is broken. pdqsort is n log n time, in-place and doesn=E2=80=99t allocate, and is = used, for example, for Rust=E2=80=99s standard sort_unstable. >>> When I build applications of my own, I always use mergesort(), which = depend on malloc(). Having a dependency on a certain memory allocator to = get performance is not good. >>>=20 >>> I want to distinguish from qsort() by calling it bsort(). If people = use bsort() they know what they get cross-platform. >> No they don=E2=80=99t, bsort can mean multiple things. >=20 > In the C-code standard domain, can you give examples of different = meanings of bsort() which are established? I'm not aware of any such = existing usage. The b could be bitonic, bubble, binary insertion or something else? Searching the literature turns up https://dl.acm.org/doi/pdf/10.1145/3341.3348 as an algorithm described in the April 1985 Communications of the ACM. >> If you want a specific >> algorithm, put it in your program, but please don=E2=80=99t, just use = a >> standardised function like qsort. >=20 > Sorting is a quite generic thing. >=20 > Likewise with we support four different ways to make = lists. And then after epoch(9) was introduced came another three ways, = basically replicas of with different properties (See: = sys/contrib/ck/include/ck_queue.h) >=20 > Personally I think the same about mergesort(), qsort() and bsort(). = They are so different and unique ways to sort that we should have all of = them in libc. They each serve a purpose. Except they=E2=80=99re not, because all of what bsort provides can be = provided by qsort. All people care about are being able to quickly sort their data and whether it=E2=80=99s a stable sort. Occasionally people care = about allocating, but not often. We have multiple list implementations in sys/queue.h because they support different sets of operations. Arguably SLIST and LIST should be subsumed by STAILQ and TAILQ respectively, though. Meanwhile the CK variants exist because they=E2=80=99re lockless data structures, which the sys/queue.h ones are not (and shouldn=E2=80=99t = be). >>> If people use qsort() the output is random basically. It helps very = little my application works on FreeBSD, but not Linux, for example. >> No, the output is sorted, which is far from random. And if you need a >> stable sort you should ask for one. >=20 > Let me rephrase: Random with regards to execution time. >=20 > mergesort() : not for realtime applications (syscalls can sleep when = getting working memory) > qsort() : usually fast, but not always > bsort() : Worst case is "N * log2 N" compared to "N * N" (qsort), and = no syscalls are involved. Modified qsort() : Wort case is =E2=80=9CN * log N=E2=80=9D, and no = syscalls are involved. Please just adapt qsort to not have degenerate behaviour; it will improve our implementation of a standard C function and render your bsort() entirely obsolete. >>> In FreeBSD qsort() is typically used for sorting files up to 16K = entries per directory. Even if qsort() can explode in time, probably = it's not that important. But when using qsort() for sorting millions of = mathematical expressions, for example, doing number analysis, this is = unacceptable. >>>=20 >>> I think "C.A.R. Hoare's quicksort" technique is designed for single = CPU systemsf only. Even if the best-case average is "N*log2(N)", that = amount of processing cannot be split by multiple CPUs. The algorithm is = serial as such. >>>=20 >>> The bsort() algorithm is much more NCPU friendly, because it can = split the work into fixed size smaller and independent work loads. = Otherwise the work load doubles every time you merge two sorted lists. = And when the number of lists to merge is fewer than the number of CPUs = available, your system runs out of guts basically. >> I highly doubt you want a libc sort routine to start spawning = threads. >=20 > Right. I'm thinking more like Grand Dispatch Central, though not that = common in FreeBSD, we still have a wiki page: >=20 > https://wiki.freebsd.org/GrandCentralDispatch >=20 > bsort() itself doesn't have to create threads to be SMP'ed, but can = provide the basic functions for SMP sorting. >=20 > When sorting records, the clever way to do it, is to make a list of = pointers to those records, and sort based on that, swapping pointers = first, then records in the end. >=20 > Technically you could have 4 CPUs go in a tight spin on different = parts of the bsort() algorithm, and by use of existing atomic compare = and set pointer operations, you could make a fully deterministic sorting = algorithm, even if the different CPUs clobber on the same memory = locations. That sounds like a great way to get a big game of cache line ping pong. > This is something I want to explore later. >=20 > Neither mergesort() nor qsort() can do that. You can still parallelise them, there=E2=80=99s just a serial step to = merge or partition respectively. >> That also seems extremely contradictory to your claim about wanting = one >> that doesn=E2=80=99t allocate memory, but creating threads is going = to do much >> more than just that, and would scream POLA violation to me. >=20 > See my explanation above. TAILQ_INSERT_TAIL() can also be used in = multithreading environments, without having to link to pthreads. Only under a lock. At which point multithreading isn't relevant. Please revert this all. FreeBSD=E2=80=99s libc isn=E2=80=99t a place for = your pet projects. New public interfaces in something as core as libc should have good justification, and I still do not see that here. >>>> I also note that the swap code is pointlessly slow for size > 256 = and >>>> should almost certainly use aliasing with matching words like = memcpy >>>> implementations do. Doing so would make it easier to port this = code to >>>> CHERI where that is required. >>>=20 >>> I totally agree about the swap code being pointless. And I tried to = look where is memswap(), but it was not there. This kind of swapping is = done many places, and we could benefit from having a compiler supported = memswap() function. What do you think? >> We agree: https://github.com/CTSRD-CHERI/cheribsd/issues/207. But the >> world doesn=E2=80=99t have that in C. >=20 > Yes, that's a good idea! I'll try to follow that lead. >=20 >> We don=E2=80=99t need new non-standard sorting routines in libc. >=20 > We don't need English tea either ;-) I don=E2=80=99t know, nor do I care, what tea has to do with sorting = routines. Jess From nobody Wed Apr 19 20:26: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 4Q1skS2Kdtz46QHH; Wed, 19 Apr 2023 20:26: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 4Q1skS1bbDz4F29; Wed, 19 Apr 2023 20:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681935968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D04SrCaW7YhcL3VHOvQGXjAxTtQwrAvuxzcAlS4cS/M=; b=KkKtv/b1Vzv7J8yYGa/4jhEGzIdWQf+kQsfsilcLkG/V3w/GzM/AOsFCVaikkXIzEGtUwG 4ulQQ38QDFTl83RCcAML8kW+y1gTvUUCQlDcdoC0mQfKbrtwZ8HxypsR/Xhn/j9cArKAW4 I6NCl7uVNgBIH8Jy0yJwfyyTLMj8y4U0m03vdt6RWTiRoJdZSK7/57IDf4VgkE/qL0RSdF oO4u57VfyWxK1YdXY031+KAmD88LbVQCceHZT3rOhfY+npK3WcVKE68MJaRA0SiMJ/2T4G vVfvhDThOYgXfcgmCcDDLhu7z9UIk17GBiI3DcA1fYiHWW38Iz+aO2+oA99sKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681935968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D04SrCaW7YhcL3VHOvQGXjAxTtQwrAvuxzcAlS4cS/M=; b=Ez/ZuMpdcG6TrCTTZd9dj2tR/o32I3KqipmKRGF3VtG6ZUuXowd0vRL0UASZsirLjpNkkm PGy+L7f7IOrJkzysWlRw45GXHkE/9ro4HIWl7pY4urQi1TsHP0nyH3kR52R4Ecj8IqBahH w65ls/PMKp7iJgi0l3gzxWNyQE21jTGN+/ZDSXInFO/VuIzA+W1TdUrjNodyelerraBqy+ jUI3G5m2Av+pcpPDhgoYBguEh8bTg9keWX8bg/dCeeHVIMhz8TXD8siWBUTVordeG2LtGF SA/T8FhujKScriqjpxK1Yn71H3JCEa5kZWQ6FMlubqiJMQgpy6IihGnTg5QBlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681935968; a=rsa-sha256; cv=none; b=Kzi/fQlhpsFd91dhPtZesju+8vayKKYU1BNnKcutgyAUQr8NmF0F5Y4PuujMHFZ9pBztho hXBpFhNmBFQM25y/VPBpyr05QeUjvFxXWCEjbAUvPgNsIS1P+S+juh+l9rV4kEkhdfPamZ dvl27X4FrgqrjK5ejAIUQmx2/o8x3ZxhBykjLjQnBa9k1aGcRhv4N6QT1jGxIn+YBjGa3/ 6wCTkOcq/AUfRLlsDggRWXDdtR3E+lLgAQ59SnhOHZJZfs4wUtLvE5rInNiIJD+HlWhQM5 kHF7CPWSgj/8djG/XfcLCAGdPQi5f7KAutDgDfxgduJoZ5ApUmH1d3rFqH+UKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1skS0ZSgz17jj; Wed, 19 Apr 2023 20:26: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 33JKQ7uI087346; Wed, 19 Apr 2023 20:26:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JKQ7mU087345; Wed, 19 Apr 2023 20:26:07 GMT (envelope-from git) Date: Wed, 19 Apr 2023 20:26:07 GMT Message-Id: <202304192026.33JKQ7mU087345@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: 87f55ab0b46a - main - ichiic: use bool for one-bit wide bit-fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 87f55ab0b46ad72efee11d1b64ec8f839bb013da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=87f55ab0b46ad72efee11d1b64ec8f839bb013da commit 87f55ab0b46ad72efee11d1b64ec8f839bb013da Author: Dimitry Andric AuthorDate: 2023-04-18 18:08:28 +0000 Commit: Dimitry Andric CommitDate: 2023-04-19 20:25:50 +0000 ichiic: use bool for one-bit wide bit-fields A one-bit wide bit-field can take only the values 0 and -1. Clang 16 introduced a warning that "implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1". Fix by using c99 bool. Reported by: Clang Reviewed by: emaste, wulf MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39665 --- sys/dev/ichiic/ig4_acpi.c | 4 ++-- sys/dev/ichiic/ig4_iic.c | 8 ++++---- sys/dev/ichiic/ig4_pci.c | 4 ++-- sys/dev/ichiic/ig4_var.h | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/dev/ichiic/ig4_acpi.c b/sys/dev/ichiic/ig4_acpi.c index 8f349b36f9dc..550763f90b0e 100644 --- a/sys/dev/ichiic/ig4_acpi.c +++ b/sys/dev/ichiic/ig4_acpi.c @@ -108,7 +108,7 @@ ig4iic_acpi_attach(device_t dev) ig4iic_acpi_detach(dev); return (ENXIO); } - sc->platform_attached = 1; + sc->platform_attached = true; error = ig4iic_attach(sc); if (error) @@ -127,7 +127,7 @@ ig4iic_acpi_detach(device_t dev) error = ig4iic_detach(sc); if (error) return (error); - sc->platform_attached = 0; + sc->platform_attached = false; } if (sc->intr_res) { diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index 7353a6fae844..b557df26e9d9 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -337,9 +337,9 @@ set_slave_addr(ig4iic_softc_t *sc, uint8_t slave) { uint32_t tar; uint32_t ctl; - int use_10bit; + bool use_10bit; - use_10bit = 0; + use_10bit = false; if (sc->slave_valid && sc->last_slave == slave && sc->use_10bit == use_10bit) { return; @@ -364,7 +364,7 @@ set_slave_addr(ig4iic_softc_t *sc, uint8_t slave) reg_write(sc, IG4_REG_CTL, ctl); reg_write(sc, IG4_REG_TAR_ADD, tar); set_controller(sc, IG4_I2C_ENABLE); - sc->slave_valid = 1; + sc->slave_valid = true; sc->last_slave = slave; } @@ -1009,7 +1009,7 @@ ig4iic_set_config(ig4iic_softc_t *sc, bool reset) (sc->cfg.bus_speed & IG4_CTL_SPEED_MASK)); /* Force setting of the target address on the next transfer */ - sc->slave_valid = 0; + sc->slave_valid = false; return (0); } diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 2316e0cac1d0..242cf7e6ecec 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -316,7 +316,7 @@ ig4iic_pci_attach(device_t dev) ig4iic_pci_detach(dev); return (ENXIO); } - sc->platform_attached = 1; + sc->platform_attached = true; error = ig4iic_attach(sc); if (error) @@ -335,7 +335,7 @@ ig4iic_pci_detach(device_t dev) error = ig4iic_detach(sc); if (error) return (error); - sc->platform_attached = 0; + sc->platform_attached = false; } if (sc->intr_res) { diff --git a/sys/dev/ichiic/ig4_var.h b/sys/dev/ichiic/ig4_var.h index 608c925df38e..99c1b854514b 100644 --- a/sys/dev/ichiic/ig4_var.h +++ b/sys/dev/ichiic/ig4_var.h @@ -91,10 +91,10 @@ struct ig4iic_softc { struct ig4_cfg cfg; uint32_t intr_mask; uint8_t last_slave; - int platform_attached : 1; - int use_10bit : 1; - int slave_valid : 1; - int poll: 1; + bool platform_attached : 1; + bool use_10bit : 1; + bool slave_valid : 1; + bool poll: 1; /* * Locking semantics: From nobody Wed Apr 19 20:29: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 4Q1spq5Tvxz46QPY; Wed, 19 Apr 2023 20:29:55 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1spn5R5Tz4LC3; Wed, 19 Apr 2023 20:29:53 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 3FEA93C0199; Wed, 19 Apr 2023 20:29:52 +0000 (UTC) Date: Wed, 19 Apr 2023 20:29:52 +0000 From: Brooks Davis To: Hans Petter Selasky Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a7469c9c0a50 - main - libc: bsort_s() requires both __BSD_VISIBLE and __EXT1_VISIBLE Message-ID: References: <202304192013.33JKDIrM070521@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 Content-Transfer-Encoding: quoted-printable In-Reply-To: <202304192013.33JKDIrM070521@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Q1spn5R5Tz4LC3 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This is a formal request to revert all commits related to bsort. It should not have been committed without much broader discussion and IMO does not belong in the tree. It certainly should not be in the tree under such a generic name. -- Brooks On Wed, Apr 19, 2023 at 08:13:18PM +0000, Hans Petter Selasky wrote: > The branch main has been updated by hselasky: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Da7469c9c0a504a5e6e9b89e148= cd78df5e67ff7f >=20 > commit a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f > Author: Hans Petter Selasky > AuthorDate: 2023-04-19 19:37:29 +0000 > Commit: Hans Petter Selasky > CommitDate: 2023-04-19 20:12:04 +0000 >=20 > libc: bsort_s() requires both __BSD_VISIBLE and __EXT1_VISIBLE > =20 > Fixes build of Python: > /usr/include/stdlib.h:409:1: error: unknown type name 'errno_t' > errno_t bsort_s(void *, rsize_t, rsize_t, > =20 > Reported by: vishwin@ > MFC after: 1 week > Sponsored by: NVIDIA Networking > Differential Revision: https://reviews.freebsd.org/D36493 > --- > include/stdlib.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/include/stdlib.h b/include/stdlib.h > index 857092b9053e..3ad28cf68847 100644 > --- a/include/stdlib.h > +++ b/include/stdlib.h > @@ -403,12 +403,12 @@ void ignore_handler_s(const char * __restrict, void= * __restrict, errno_t); > /* K.3.6.3.2 */ > errno_t qsort_s(void *, rsize_t, rsize_t, > int (*)(const void *, const void *, void *), void *); > -#endif /* __EXT1_VISIBLE */ > =20 > #if __BSD_VISIBLE > errno_t bsort_s(void *, rsize_t, rsize_t, > int (*)(const void *, const void *, void *), void *); > #endif /* __BSD_VISIBLE */ > +#endif /* __EXT1_VISIBLE */ > =20 > __END_DECLS > __NULLABILITY_PRAGMA_POP >=20 From nobody Wed Apr 19 21:16: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 4Q1trc75Rwz45F4R for ; Wed, 19 Apr 2023 21:16: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 4Q1trc6G9vz4dLy; Wed, 19 Apr 2023 21:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681938992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=13U5EZCzmwHZSaNbKdPFexB2kq7IdMKXX98KjPHIXvo=; b=HbFqqzwHgIpcT8kOQZ691jiE9+NNI9JD/ke+oPklf3zvmBEzgt3veFcreKdU/njliyrUGr HvI8/MTuORvOwtvWMWRo9mqd3LYeegQiV3loOVk8KidxWC84PJoWm9/hDiB0cvSyZOH61K G3NeiLehWei+hUnzcyWoBgAId9dPe3sA+P+qR3uOGrWhgAUo9xky9O/C9g5F4j0rP5MXN9 nlY+NHTA5R2pWC4Q4BNTjfTv3PdCFIbXeZYkGA6DB0ziNNupFKQ/GHp4GsK9Nd7q6C6M8c 0/IPhil08A1+wtT6Zb1UC3rWKMJh9Wbf9aNWuibBVLeMM+bgjyGZxIpUuYmRYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681938992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=13U5EZCzmwHZSaNbKdPFexB2kq7IdMKXX98KjPHIXvo=; b=TukuQGLuvE8eBQPr07v++puRtS53H+sL7QVWYfYasjx1V504tDR138wIQDiNAdpQKcpnDg c/BGZclt7RGTAhB1Pdjh7WQI8ILKQuF2QUQ9sfFmR4xgCtFjc8TjobwiTXsAfmySndkHcb zxumaVF2E6jKoPk2NXJNXwmR19C7Kw6YIKiSltwq3WT8mRfW1MTPWe8FiKFnZwT1defFB7 2HUU9zQ1J8Cvak44LJtb2qTJidG4AtjdQblypLfsgnT6Nf0dgdy6PUswORzAdau7uF8J9m oppXmAqZJcuBG/0pSoN5ZNqYoG3W0ONoAYUbPuUI5Qo1jd40LkSRRq3sfj7LUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681938992; a=rsa-sha256; cv=none; b=h8fxmGyYQR2AgTVq3C2PfvbpOOeTIPBbZd72glHBbNt5wRDTSGBIMPQGXbi/P+rxykJ2Kw PTiyrzxJYXbCBn3adl3piLaLGyDVpdiCXInY8t5AYQzIRxEZugrHWN2bb4xDTxnjEviUgI OFUg6Dz4410tJ1oIxA79HzdBfRh0RrzvOrlewVpjCfEjfruas4eOY0rED6u6cJiGZFMdpM ld6w526TzzJMpyLSi6NU2PTQxr/6HMF/RiD3Daifawi5QfCU28H3mMSH8jomCu98n2P717 OTHtQZdWff7FT5ZNd97W5SJRXxnssZ45rLtEXs5pPv40PnV7IEXg0GCrLqVchg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1trc4yhTz18B5; Wed, 19 Apr 2023 21:16: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 33JLGWr6069705; Wed, 19 Apr 2023 21:16:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JLGWL8069704; Wed, 19 Apr 2023 21:16:32 GMT (envelope-from git) Date: Wed, 19 Apr 2023 21:16:32 GMT Message-Id: <202304192116.33JLGWL8069704@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: 85639444f44f..d5228e8957c2 - vendor/tzcode - 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/tzcode X-Git-Reftype: branch X-Git-Commit: d5228e8957c2b6a9cbb2a73947640ce3c70097e8 X-Git-Oldrev: 85639444f44f168af982f59143b53efbba37669e X-Git-Newrev: d5228e8957c2b6a9cbb2a73947640ce3c70097e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/tzcode has been updated by des: URL: https://cgit.FreeBSD.org/src/log/?id=85639444f44f..d5228e8957c2 48847a88f61e Import tzcode 2023a 65596a0dd002 Import tzcode 2023b d5228e8957c2 Import tzcode 2023c From nobody Wed Apr 19 21:17: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 4Q1ttK1krvz45F4f for ; Wed, 19 Apr 2023 21:18:01 +0000 (UTC) (envelope-from joerg@bec.de) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1ttG6H6Lz3DBg for ; Wed, 19 Apr 2023 21:17:58 +0000 (UTC) (envelope-from joerg@bec.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bec.de header.s=gm1 header.b=SYlzyyZ+; spf=pass (mx1.freebsd.org: domain of joerg@bec.de designates 217.70.183.196 as permitted sender) smtp.mailfrom=joerg@bec.de; dmarc=none Received: (Authenticated sender: joerg@bec.de) by mail.gandi.net (Postfix) with ESMTPSA id 0AC41E0002 for ; Wed, 19 Apr 2023 21:17:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bec.de; s=gm1; t=1681939076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uvd1+Z/Ahq4zZorjRN0wIStUcU1kcBiBMf+VDzpV9J0=; b=SYlzyyZ+BBxUZVzuHY0kwtAN4g77UrBT+N8SpXTflTHGXNXf5kkmwPNMMr4D2wSo8HSUvS ZB9Om5hCP0oyiw8BwsQaixW9R+Pmol7C+GBEflDUpTNxc6Zr/Rjn30lEy56J7TDT1lasez CU+NBJIeI69+WudqGTRljxPkvvGhvrSQG9rLCG6vvxjJrmZl0QYxL/RODDW6sz/KrrJ6Py EMbq8/BG5/SkvTeZRMtH77a7YNuoKD4eYBTzHjHeZlqhIqk9M1EPOYeEot84MD94TdycSL GU5tt84Kk1BNwwT2YFJf9jiIkSGl2cr4O3bZjKlt8tj1V5PIxN0dPOM2C1szmA== Date: Wed, 19 Apr 2023 23:17:54 +0200 From: Joerg Sonnenberger To: dev-commits-src-all@freebsd.org Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Message-ID: References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@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: X-Spamd-Result: default: False [-3.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[bec.de:s=gm1]; R_SPF_ALLOW(-0.20)[+ip4:217.70.183.192/28]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[217.70.183.196:from]; RWL_MAILSPIKE_GOOD(-0.10)[217.70.183.196:from]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR]; FREEFALL_USER(0.00)[joerg]; DKIM_TRACE(0.00)[bec.de:+]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[bec.de]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4Q1ttG6H6Lz3DBg X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Am Wed, Apr 19, 2023 at 09:27:14PM +0200 schrieb Hans Petter Selasky: > > > qsort() is frequently used to do all kinds of sorting, and some pointed out that qsort() can technically be any kind of sorting algorithm, but looking around it is not. > > > > Because there are variants that are guaranteed n log n? Which is better > > than your n log^2 n. > > Only so-called mergesort() algorithms can do sorting in O(N log N) time, > from what I know. That's false. The difficult part of QuickSort is the median selection. This can be done in O(n) using the median of median algorithm and when combined into the main algorithm, much of the work for the median selection also helps the partition step. Joerg From nobody Wed Apr 19 21:35: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 4Q1vH31ntfz45Fkw; Wed, 19 Apr 2023 21:35:59 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1vH14g2Gz40F0; Wed, 19 Apr 2023 21:35:57 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3D0F026232D; Wed, 19 Apr 2023 23:35:56 +0200 (CEST) Message-ID: Date: Wed, 19 Apr 2023 23:35:56 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: a7469c9c0a50 - main - libc: bsort_s() requires both __BSD_VISIBLE and __EXT1_VISIBLE To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304192013.33JKDIrM070521@gitrepo.freebsd.org> Content-Language: en-US From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q1vH14g2Gz40F0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 22:29, Brooks Davis wrote: > This is a formal request to revert all commits related to bsort. It > should not have been committed without much broader discussion and IMO > does not belong in the tree. It certainly should not be in the tree > under such a generic name. > > -- Brooks Hi Brooks, I don't have an issue reverting my bsort() patch series, but please clarify your statement first. Who are "we" this time, representing this formal request for revert? Regarding "broader discussion" - what do you mean? The initial discussion was started last September: https://lists.freebsd.org/archives/freebsd-arch/2022-September/000225.html And several people have been asked for review and comments. Please elaborate what "broader discussion" means? Do you mean like getting something into ANSI first? I don't get it. --HPS From nobody Wed Apr 19 21:41: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 4Q1vPG6g82z45GT6; Wed, 19 Apr 2023 21:41:22 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1vPG5g0kz49QG; Wed, 19 Apr 2023 21:41:22 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 78C5C2600F3; Wed, 19 Apr 2023 23:41:19 +0200 (CEST) Message-ID: <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> Date: Wed, 19 Apr 2023 23:41:20 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Jessica Clarke Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> From: Hans Petter Selasky In-Reply-To: <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q1vPG5g0kz49QG X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 22:17, Jessica Clarke wrote: > pdqsort is n log n time, in-place and doesn’t allocate, and is used, > for example, for Rust’s standard sort_unstable. Hi Jessica, Like many many people have tried over the years, to improve the belated QuickSort (*) algorithm since it was invented, by catching bad behaviour and then fallback to other algorithms, pdqsort() is not a solution! Yes, it is probably "N log N" time, but if you read the code carefully, it falls back to heapsort(), which indeed uses malloc(), which is exactly my point, that I want to avoid. Please come forward with a "N log N" time algorithm which is malloc() and alloca() free, and then we'll talk! And not at least BSD-2-clause licensed and not covered by any patents, GPLv2 or whatever! --HPS (*) https://en.wikipedia.org/wiki/Quicksort From nobody Wed Apr 19 21: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 4Q1vXS36nlz45GWm for ; Wed, 19 Apr 2023 21:47:36 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1vXS28Y4z4LnV for ; Wed, 19 Apr 2023 21:47:36 +0000 (UTC) (envelope-from hps@selasky.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 25B20260220; Wed, 19 Apr 2023 23:47:35 +0200 (CEST) Message-ID: Date: Wed, 19 Apr 2023 23:47:35 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Joerg Sonnenberger , dev-commits-src-all@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q1vXS28Y4z4LnV X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 23:17, Joerg Sonnenberger wrote: > That's false. The difficult part of QuickSort is the median selection. > This can be done in O(n) using the median of median algorithm and when > combined into the main algorithm, much of the work for the median > selection also helps the partition step. Hi Joerg, From what I know, they all fall back to other sorting algorithms using malloc(), in the end. They keep track of the sorting cost, and then at some point give up, finding a good median. So called radix sorting is more appropriate for doing split partition sorting, where you have not just +1/0/-1 as return values from the compare() callback function, but an actual N-bit indexer. This limits the complexity and recursion. Sometimes when you know the data to be sorted well, qsort() works great, but other times not. And there should be more options in FreeBSD, in my opinion. --HPS From nobody Wed Apr 19 21:50: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 4Q1vbl4qWPz45Gfh; Wed, 19 Apr 2023 21:50: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 4Q1vbl3tnxz3Bq6; Wed, 19 Apr 2023 21:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681941027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=krqnTaDJy9bnPmJwH+MYAZGIECbupO2zH5Uhy3Z7y4s=; b=UYhj2kYn4yM4e9Vw7dNL/MyhcBK6Fxma0WmTp0o9uuK4WRLrHjt0aaMOraYFJiecjif1OO 6MlfQFOQeGxzuX1yfTY+RD0W2AnXZYlB3XoivzUJVB+RtOonLIVh4Pf9jEpX/YywyZGFSH pUxyIXrFdqjBdXcq8e/smmCgCVNGQqfEx8uvHbKSq/N8GhaDiG9ltQZGjTCABCCHKXmMhw 2+quVnXdPu2gw0YBTF2AILXGdepLYJQRJZGl3wXiC0bqLToYWIFV8axjhUg1bV//LgFlSZ BxhV5/4FmOi6Z5wju2olTkphmkmHiP/CUQ7VWxk4ekH9KTqeWZh22uV/UOOtzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681941027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=krqnTaDJy9bnPmJwH+MYAZGIECbupO2zH5Uhy3Z7y4s=; b=I9sVAqhi0hkes28dAJwplkZOnLfsea8K0tCTOngjHaMPpbBbU/jXJrz4UKI1RGF8pJbxg1 1aPowR3mIPYXe+GrS4YK3Bu4qBkZ/ZRUX1FVB9Moc7DIk06zJq+C2EUmywkzbmKIYlf8MV 7TnmalgT3TX/G04DTXX80X5jzOgXFrvEhMxiaRrlUqk3odDB3fzsl7h9nTVcPMnjyCOr1f zJT2rqLZd4onkbXX0wvIPeYt8dDg01inBxa7v+jFX+drzw+SyCaMoPBJddmRNfuy0PTiqR Lqp8FGKbH1q8QrnNAYr3sY92UheFzJoneUK6wWPOMO8OFJNC99rt2hSh3gCmlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681941027; a=rsa-sha256; cv=none; b=ufLSTzlPl/LRooxoWpB3zytpEWJt0S1zauGoDivTE7QfXkQ2bUCBz4jO3HOAp4FQ6yNdIU ZTl8Xj5ROjMow4nvUJxHGJWVdUIjQkcRyqR6iuDDMretgCKyIXwlXRqddzdsuh0LpYAkGP wHiCkHRXm3VVPGZQFsSfU2XiXaUGoTvulS2wyk05+E3DvmK/ZYpj8sQujbLWZqW7z0tvs9 AtsXBlUUGdhNVvpusnsZF1EeVjt8mBgomsTMynYjzz/y9JiuFoo+J+95YTagX7SnhJqzcz +Lwi1ThEYGKM2znvCdxbd99ZzfM9jEhybP2mErchUC2kFQUx5lMhlC3AF78Zmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1vbl2pF4z19rM; Wed, 19 Apr 2023 21:50: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 33JLoRrG027033; Wed, 19 Apr 2023 21:50:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JLoRV7027032; Wed, 19 Apr 2023 21:50:27 GMT (envelope-from git) Date: Wed, 19 Apr 2023 21:50:27 GMT Message-Id: <202304192150.33JLoRV7027032@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: b2dcb848688e - main - 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/main X-Git-Reftype: branch X-Git-Commit: b2dcb848688e1e8346762531208dd7d468ff3854 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b2dcb848688e1e8346762531208dd7d468ff3854 commit b2dcb848688e1e8346762531208dd7d468ff3854 Author: Bjoern A. Zeeb AuthorDate: 2023-04-19 21:37:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-19 21:49:00 +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 MFC after: 3 days --- 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 Wed Apr 19 21:50: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 4Q1vbm5mrPz45GNm; Wed, 19 Apr 2023 21:50: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 4Q1vbm4SZCz3Bw2; Wed, 19 Apr 2023 21:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681941028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JFwdjXLrjykUuBjDphOMBRxX0d30WTCyd2eoLviP/io=; b=b9aUdsflA9YCDsRKKUKDjdS6eTpeWQz+VtaJcPnMqD3+RVBCTPSDpdfTkSuXgm0Rx36LNe pRCbmlx1CVJu3HFEfIMIuBZ8vZ8f4JnJalsm7qqOEuhQqnq86oJOe3cCRSmwApO9/06qTP EA0q8eq7eY5L33XeRT8jIU5dH5+kAn/LiOvj4p/QRjVnImy4V5BBS4AstkoRsjxaDSRV8/ l2HEmzs5L/qx+FN8AgPtbHFHW0WSo2UQKFIQTAbM/OUui9izlQkjwLEMwjMmpkHuS+uS1c gS6/Ck67//8+iGGs6esyUejt/7JDlk3fwpUO5G8CZo3HO0jExGP3BOTdDmPxMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681941028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JFwdjXLrjykUuBjDphOMBRxX0d30WTCyd2eoLviP/io=; b=UsdNMy5uTQq1A+KaH2h1dA6qPt43CfPt8GYRb7IJdq0+th4AhhP0FHKy0k8bGyq2OjfyYD dtOC6urWxj1GbvWgPfxkrg7qHLv1xCzqTizgCEh+FOWabeeg9AATH3ueFg9C/2OBKZWXl0 4l3eKWbOd2ptx06fTPTztLkZzc9qXuFsWp3PUZULWwK+s9Ds/sfLaRcg5LHhvW9IfB0mAN KpHJPN+uUYGKpp9oJw/Ca/AwG52JoimjRWxSuivCteNkZPXwBDaFnXNnNxWDec6k4Qer8P fHocDZngB25+B6K8OUYvmARg+5K65NXduFVwotOVN2MgPGkkAWSpiGZjcR1j0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681941028; a=rsa-sha256; cv=none; b=i4Bm4lRv+o+7P8W4U33xS6zWWO1kPVc/5RGiGaOQNAxeCeuwfsbswF2Z90cQ963TaH/gG0 MCaYQl6mvDG3XuzxRNoPFXGRzkfJA1zkMiD5knFtzVvAl4OE6VyelYDzelGw6snGfouJOi xI3eIkR+RQ006OdKjrSlWNB/YFepHg+3HibGJsmyb1Eh1cxNq1p61ASMH8i368gvmHclZe qib5W4sHNLMqsYccNIr80U6s0UMkIjSv+HpK7PDX83TQy/4OY6ZeIhQsCcQKzJdoX0jHAO orDYKNtOE+rl3OugpUJVFrQyv5Q+fgGV6lPAaijj7p7k96uxxXAN4scPhWCBVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1vbm3SWQz19gd; Wed, 19 Apr 2023 21:50: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 33JLoSx0027058; Wed, 19 Apr 2023 21:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JLoSMP027057; Wed, 19 Apr 2023 21:50:28 GMT (envelope-from git) Date: Wed, 19 Apr 2023 21:50:28 GMT Message-Id: <202304192150.33JLoSMP027057@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: f369f10dd812 - main - 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/main X-Git-Reftype: branch X-Git-Commit: f369f10dd8122b1cd1282a378fb16ba81a712a74 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f369f10dd8122b1cd1282a378fb16ba81a712a74 commit f369f10dd8122b1cd1282a378fb16ba81a712a74 Author: Bjoern A. Zeeb AuthorDate: 2023-04-19 21:40:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-19 21:49:17 +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 MFC after: 3 days --- 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 Wed Apr 19 22:28: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 4Q1wRW3kWkz45JtP for ; Wed, 19 Apr 2023 22:28:23 +0000 (UTC) (envelope-from 010001879ba20fa7-95ae06cc-e046-4f59-a9b7-5e2cd389d101-000000@amazonses.com) Received: from a8-237.smtp-out.amazonses.com (a8-237.smtp-out.amazonses.com [54.240.8.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1wRW1dWDz3CVp for ; Wed, 19 Apr 2023 22:28:23 +0000 (UTC) (envelope-from 010001879ba20fa7-95ae06cc-e046-4f59-a9b7-5e2cd389d101-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1681943302; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=mA6LrvbdJieHXNqm2q1T732F2g32oolmocP2deHc8/s=; b=anufIuBsam7seUYpJWYzm0jQm+EqdQhGBOu/upyHK2nazPqll9Qs9TxZORagT3hW +dDvYTgnf5GMwtWBjE5Hr/BRtS1z7JnU9cuuD+IKiESoahElrNZzrrKIoNPim7wMw5V m37Yg2lqJXgEAqwQTi3YuywR3Ne69+zHusacM/oE= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1681943302; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=mA6LrvbdJieHXNqm2q1T732F2g32oolmocP2deHc8/s=; b=aETJeiHDj5X6OvGaOkMX6gN5+kpbhBuVZo76I+iqn+KerAEruwEY2/PmUNE8pP+K jLEk9cAHkV0+y7mWRDo2oXK33uOtUeax0FKiRHMSTVhRQuC7Tm6NjYf951VsB4BUukQ Y5nEqq4qZxu5rZxDqznwfzeXaps3zMWjN0NCeHTM= Message-ID: <010001879ba20fa7-95ae06cc-e046-4f59-a9b7-5e2cd389d101-000000@email.amazonses.com> Date: Wed, 19 Apr 2023 22:28:22 +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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Hans Petter Selasky , Jessica Clarke Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> From: Colin Percival In-Reply-To: <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2023.04.19-54.240.8.237 X-Rspamd-Queue-Id: 4Q1wRW1dWDz3CVp X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 14:41, Hans Petter Selasky wrote: > On 4/19/23 22:17, Jessica Clarke wrote: >> pdqsort is n log n time, in-place and doesn’t allocate, and is used, >> for example, for Rust’s standard sort_unstable. > > Like many many people have tried over the years, to improve the belated > QuickSort (*) algorithm since it was invented, by catching bad behaviour and > then fallback to other algorithms, pdqsort() is not a solution! > > Yes, it is probably "N log N" time, but if you read the code carefully, it > falls back to heapsort(), which indeed uses malloc(), which is exactly my > point, that I want to avoid. > > Please come forward with a "N log N" time algorithm which is malloc() and > alloca() free, and then we'll talk! Quicksort with cryptographically randomized pivot selection is O(N^2) worst case but O(N log N) average-case-for-worst-case-inputs which is good enough for most purposes. Quicksort with in-place median-of-medians pivot selection is O(N log N) worst case. Both of them can be easily implemented with O(log N) extra space (for the call stack), and with O(1) extra space if you're insane enough to care. -- Colin Percival FreeBSD Deputy Release Engineer & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Wed Apr 19 22:31:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1wVy6NDpz45KKx for ; Wed, 19 Apr 2023 22:31:22 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 4Q1wVy3xwHz3Hn0 for ; Wed, 19 Apr 2023 22:31:22 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-2fbb99cb297so125563f8f.1 for ; Wed, 19 Apr 2023 15:31:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681943480; x=1684535480; 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=p+6vm2QFIoJXVujiwu4xr7MxRLlWaVj7FPr+YfbNwbM=; b=i+AgPKSWeTsxofOE29kEX2ijYWMKW+72LJiiLliIBEkLQICOlxfApDqWVNeXrCx4Nl GTtCLKo43NWXYeOTNI7r7qizxuvsWimZOJI2E4YC8k+a+zsjG0763JNwW4yYmAhb8Kuu SxUEmg+F7uqVi/uAKE9INoiPa14jxhrfcTg+Pa2aZrGmS0adyJAsUVwCOEGXBdSBHU1c mvOn3KDLrmaBr+d4zF6oMZqvoS1HDDwj8HS55Pvxufv/l2F9DP5x7iTU5xEvyPsBEA8v Oqo/l/OMPPr2RRGfCixtl38na5xiYNtSB2GlPOSfMRaod5MvXHshGxl5gSEHgTHsEVhT Cwcg== X-Gm-Message-State: AAQBX9cqwZFCKu9FLsjZ3nxi60V70nfMG4oqEMm5vmBaddzZNNq12Mzt CgaLcprwUXoSst8rx4VzgSGFZw== X-Google-Smtp-Source: AKy350aymeVbEiTZgRPOSwR6ctAf0Hj+3jA1MD86OPqRnfUvroVNHqkFIy4sPkJe+hS6NdWBc73KQA== X-Received: by 2002:adf:d4c7:0:b0:2f6:a7d5:adbe with SMTP id w7-20020adfd4c7000000b002f6a7d5adbemr6128611wrk.37.1681943480407; Wed, 19 Apr 2023 15:31:20 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id q13-20020adfcd8d000000b002d7a75a2c20sm225694wrj.80.2023.04.19.15.31.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2023 15:31:20 -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 \(3696.120.41.1.1\)) Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. From: Jessica Clarke In-Reply-To: <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> Date: Wed, 19 Apr 2023 23:31:19 +0100 Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0E123CCD-C06E-443F-8C3C-AFDC8258CCF6@freebsd.org> References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q1wVy3xwHz3Hn0 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 19 Apr 2023, at 22:41, Hans Petter Selasky = wrote: >=20 > On 4/19/23 22:17, Jessica Clarke wrote: >> pdqsort is n log n time, in-place and doesn=E2=80=99t allocate, and = is used, >> for example, for Rust=E2=80=99s standard sort_unstable. >=20 > Hi Jessica, >=20 > Like many many people have tried over the years, to improve the = belated QuickSort (*) algorithm since it was invented, by catching bad = behaviour and then fallback to other algorithms, pdqsort() is not a = solution! >=20 > Yes, it is probably "N log N" time, but if you read the code = carefully, it falls back to heapsort(), which indeed uses malloc(), = which is exactly my point, that I want to avoid. Citation needed. This directly contradicts Rust=E2=80=99s documentation: > This sort is unstable (i.e., may reorder equal elements), in-place = (i.e., does not allocate), and O(n * log(n)) worst-case. >=20 > Current implementation > The current algorithm is based on pattern-defeating quicksort by Orson = Peters, which combines the fast average case of randomized quicksort = with the fast worst case of heapsort, while achieving linear time on = slices with certain patterns. It uses some randomization to avoid = degenerate cases, but with a fixed seed to always provide deterministic = behavior. -- = https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable > Please come forward with a "N log N" time algorithm which is malloc() = and alloca() free, and then we'll talk! >=20 > And not at least BSD-2-clause licensed and not covered by any patents, = GPLv2 or whatever! Rust=E2=80=99s meets that and is MIT or Apache 2.0. The original = pdqsort=E2=80=99s also does and is under the zlib license. I=E2=80=99m not including alloca() = free, because that=E2=80=99s a nonsense restriction that would forbid any = local variables. Jess From nobody Wed Apr 19 23:43: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 4Q1y5v14VVz45Pvc; Wed, 19 Apr 2023 23:43:15 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q1y5t6K0wz4N7v; Wed, 19 Apr 2023 23:43:14 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id D6CF43C0199; Wed, 19 Apr 2023 23:43:13 +0000 (UTC) Date: Wed, 19 Apr 2023 23:43:13 +0000 From: Brooks Davis To: Hans Petter Selasky Cc: Brooks Davis , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a7469c9c0a50 - main - libc: bsort_s() requires both __BSD_VISIBLE and __EXT1_VISIBLE Message-ID: References: <202304192013.33JKDIrM070521@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: X-Rspamd-Queue-Id: 4Q1y5t6K0wz4N7v X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, Apr 19, 2023 at 11:35:56PM +0200, Hans Petter Selasky wrote: > On 4/19/23 22:29, Brooks Davis wrote: > > This is a formal request to revert all commits related to bsort. It > > should not have been committed without much broader discussion and IMO > > does not belong in the tree. It certainly should not be in the tree > > under such a generic name. > > > > -- Brooks > > Hi Brooks, > > I don't have an issue reverting my bsort() patch series, but please > clarify your statement first. Who are "we" this time, representing this > formal request for revert? This is my request. I see some review and the thread below, but adding non-standard symbols that are likely to collide with other software[0] to libc should be subject to a higher bar than a few people helping you improve your patch of saying "that's neat". New things added to libc should be in a standard or aligned with one (e.g., strlcpy, etc) and anything not from a standard should have immediate uses where it improves things in the rest of the system. Critically I don't see plans or prototype conversions and I don't see benchmarks of real systems (which could easily be done with LD_PRELOAD. > Regarding "broader discussion" - what do you mean? > > The initial discussion was started last September: > > https://lists.freebsd.org/archives/freebsd-arch/2022-September/000225.html More pushback here probably would be been good, sorry. A heads up before the actual commit might have been a good idea. I personally find your answer to the question, "why not improve qsort instead?" unsatisfactory. It might be that importing your implementation makes sense, but I don't think making is a public symbol we're stuck with forever if we ship it in 14 is a good way to go. > And several people have been asked for review and comments. Please > elaborate what "broader discussion" means? Do you mean like getting > something into ANSI first? I don't get it. I'd like more "I'd use it for X" and less "that's neat". -- Brooks [0] Debian code search finds fewer collisions than I'd feared, but not zero: https://codesearch.debian.net/search?q=%5B%5Ea-z%5Dbsort%5C%28&literal=0 From nobody Thu Apr 20 01:37: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 4Q20dw3PsWz463Vp; Thu, 20 Apr 2023 01:37: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 4Q20dw1wT8z4GhC; Thu, 20 Apr 2023 01:37:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681954660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KB/5zWjcSLyjPkz8D1R0bSXnYLLNiwemEjFs+yJAVpA=; b=UYZuj2PJxgKRRT2SKgGDGwFigxrsfS2nXjVkuQ3vnqZXFFijA4jspYthLkZqVAmyPh9JyE iid/jk/e031sprdeFORhNxymNJunEcbCqFXXW9RV+AYpuMA6o7bhzW4Ov7Ab9VXU6iUXyj I7ICmjTMKUQbYnb8qjEDo/OP7GLHerYAiE3lH59fmc5ZTppZiMyzuytiB89iY5FzKD2ipN F+H469zw3nw41+XNubFvHvXCTVQCAeSWm6I68vVoDAB4FJj/qevMd2anH3S0JZ6jaXxD+R +g+CSDXW1UjTM/QbryY6nsKvpr/IUXsQP96HYhrZW3+DjxVqqT2TOTHA4ciORQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681954660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KB/5zWjcSLyjPkz8D1R0bSXnYLLNiwemEjFs+yJAVpA=; b=v2PpkXJB3bFWBCY8CCuOWdkaAcJ4zj7lhtdfBfWdCoXsDjqySb9RdUh6qk1/4SdfCRuZCN 81gikJP4KP1POxg1brqF5i1FPSyHgu8kHQPUr2ZRfMDuw3zkpkWVWOM38udn3KZTuBuYCe QqSmBR0XtTD5Ln60bvifXYIIF1RrHIVSvPqhO2E0OgbfY5rIz3zcEuIz30l4u07sUWGMnq JiOcF2B0HqVVm/cg0E0p0lJRG4643kJ+jIJNJ5lp7OhuEzmng7QGbzNsbJ0neR+dcAA9oS 33K1sp+ag6cwy0m1ui7MUvdNAKaGjr5vIKJ83WDQM87DVZy34IlPEsQT9zVkjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681954660; a=rsa-sha256; cv=none; b=s+YfSmtDqZHaKRu1DndgnMuAJn03mWtC044Jzh5fglPC4g3JluWysjsGjf595r5v2e+UFw 2EpuexXYBFGebJMlFd57/DmFny5tAH/ILhvmcmpLSIgJkbKm2YvI9nJ1JG+FZQoXx040OE teR1FhrmECyadB9E/g8ei5AfjJ/bALTMMkFACXd4UKow6edK02TQE+rQEQlVD3M2BTp4Hz BOZU+x59gn5zXN9Hyk7JEYQjoRYTjMlH3GldTYpx7XCb8DSsZaUMKdQflHDdQ4gb5/g7Gg Xd3SAWYNgf+GApl6od6yXw+jQdLbLOrYyvegQHkAURwum4CqhFkOhKr9QU4F0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q20dw0zZfzJ4n; Thu, 20 Apr 2023 01:37: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 33K1beQE096074; Thu, 20 Apr 2023 01:37:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33K1bemS096073; Thu, 20 Apr 2023 01:37:40 GMT (envelope-from git) Date: Thu, 20 Apr 2023 01:37:40 GMT Message-Id: <202304200137.33K1bemS096073@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: 43c6b7a60aff - main - openssh: restore PrintLastLog 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43c6b7a60aff069da7e0ba6c87d3d7a532e812f6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=43c6b7a60aff069da7e0ba6c87d3d7a532e812f6 commit 43c6b7a60aff069da7e0ba6c87d3d7a532e812f6 Author: Ed Maste AuthorDate: 2023-04-20 00:09:13 +0000 Commit: Ed Maste CommitDate: 2023-04-20 01:17:59 +0000 openssh: restore PrintLastLog option Upstream's autoconf sets DISABLE_LASTLOG if lastlog.ll_line does not exist, but PrintLastLog also works with utmpx and other mechanisms. Reported upstream at https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-May/040242.html PR: 209441 Sponsored by: The FreeBSD Foundation --- crypto/openssh/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 2c576da3a38c..4a274147b22e 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -113,7 +113,7 @@ /* #undef DISABLE_FD_PASSING */ /* Define if you don't want to use lastlog */ -#define DISABLE_LASTLOG 1 +/* #undef DISABLE_LASTLOG */ /* Define if you don't want to use your system's login() call */ /* #undef DISABLE_LOGIN */ From nobody Thu Apr 20 01:40: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 4Q20jP5HCHz463Qj; Thu, 20 Apr 2023 01:40: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 4Q20jP3dNRz4MZ2; Thu, 20 Apr 2023 01:40:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681954841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUofmtGATyU4/I0Z0UzxZBMKwPEgxPiYyDpyZGdWY5w=; b=FDyF+ZN1LsC+/zEkvO1c8vRfnewD3tgGzHL8ORix5RzFQe1xWaNvzYKrGOjX49iCzYC0BX /OjEwDyCZDlDXMR9j+lBtKsOUegB6AA1331HjxfmGs6GAMu108CGnAxor30LrcGShFZYZS d5qDcGkdLcXzQI1YeOCAGWFINE5rhScXZzdncJa0Bg0dbYbVTBoEnAL4lfUQ00gf0iCBBp pQCeCkz9jVhTc+EtT2uMoAgUc5KA58UGb1ajQryUJquhFYZgPbE77/ERvMNXftwbZfMwbx k7shXhK7hyoEvEgDKXfOzrNdCnik7JHA8/JvAMtxESZIGENZcLww/buExLhYwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681954841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUofmtGATyU4/I0Z0UzxZBMKwPEgxPiYyDpyZGdWY5w=; b=tbxnguxcU7FyIoqY83YHV5sRBO0pUE4Q48l8LKinTRnrI3RqSxg+sw0TanxSnr90YV8KlO 2srfNrUuk1KpGLIvWh65grsB+JyuNB3Y+ZKe3sphyfLJmT1cQMD7MSNQtCej5LAwV0rtoP 04tT+/UFg9WYjpWRCU8aEmHyig9EqfsXClQn3yhL9U00tPKC1Wq+37XCMLQbN+jJAdwq8p wb5lLWJcSSvoGujh/pAJiDGiLJvQjdaniJ7CwqF9bXud2EenNKGHFo0a6/ycI0HdRAwF8F +ZkpTvBlzSHSMn5IYFqKsuvtFabf2LA7LQtCL6o3cC9sx3RjvhxuQScOmwzoJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681954841; a=rsa-sha256; cv=none; b=UfUS4F75BBB7MMFTvvlYepAAI9puq99q0uT62Xjl2H1tRYKS6KT4Ea+z2lRKXN6OdqOUST tveJditHialRzUrm8ukLfLkxl10H9ER9xAicG7iYFb8Cs2EnQcJrCrYefCsVhyc+AFL6N2 u4U0ANwcAgYtclJKe0ZShett6BLSlVPhmURSClJpc70lU8xq1JEJ512LBLAF726SOT6CGX K3bu/JC8n672V5RZZ9mqAD7E8LJCN7sL33X3+0IEapLM2VGVjAC1gZnBPzPJJVguezo64Y TVpGpamjHM/REonhQ22OZm6EsWwN7mjllbuQWkZmvxH8RtmECOqqLqDR0z8F0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q20jP2hLNzHs3; Thu, 20 Apr 2023 01:40: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 33K1efoa005020; Thu, 20 Apr 2023 01:40:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33K1efjv005019; Thu, 20 Apr 2023 01:40:41 GMT (envelope-from git) Date: Thu, 20 Apr 2023 01:40:41 GMT Message-Id: <202304200140.33K1efjv005019@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 64a67b72660d - main - meta: remove LDFLAGS setting when cross building List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64a67b72660d6f6b38e10ec66f2ce7474824b109 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=64a67b72660d6f6b38e10ec66f2ce7474824b109 commit 64a67b72660d6f6b38e10ec66f2ce7474824b109 Author: Stephen J. Kiernan AuthorDate: 2023-04-17 23:36:02 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-04-20 01:40:29 +0000 meta: remove LDFLAGS setting when cross building The setting was left over from older clang version and is not necessary any more (and also causes link issues.) Reviewed by: sjg --- share/mk/local.meta.sys.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index decbb087870d..6b5ff5e97555 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -254,7 +254,6 @@ FREEBSD_REVISION!= sed -n '/^REVISION=/{s,.*=,,;s,",,g;p; }' ${SRCTOP}/sys/conf/ CROSS_TARGET_FLAGS= -target ${MACHINE_ARCH}-unknown-freebsd${FREEBSD_REVISION} CFLAGS+= ${CROSS_TARGET_FLAGS} ACFLAGS+= ${CROSS_TARGET_FLAGS} -LDFLAGS+= -Wl,-m -Wl,elf_${MACHINE_ARCH}_fbsd .endif META_MODE+= missing-meta=yes From nobody Thu Apr 20 02:00: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 4Q218B1CkNz464gk; Thu, 20 Apr 2023 02:00: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 4Q21896tFbz3xtK; Thu, 20 Apr 2023 02:00:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681956026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7a64a2036TSKCcs8puSJknsz6DFaYq1+Szmi02cFXo=; b=ycUg5ThZQzNFPadFqTcJUI2ydwza3bhR9Ouqexup7JexauSdx1SxP/TSae69n8qNsE5TY/ LRX9pRpMBHFx3DEwWvyH9ioYE55M979Fz5yiYQxsK6+2AEj90+PsAaspzvWRdiCVui6mPS i+5n/5UJUAvpziOXMNnSCjbKIGMqIFHSZ6SYncIY5uFQVkRYyk5jMCrIMNNNt+7dnwKwIN BUPe4x6wKchFlt4uUD1ZFv0d4E7ZW4mFdooW499MVq5nD1IrtOEpQo6bGS+ycx78dNNLjg qyQBHxg0LTf/eL8MD1jAH3XkebfxX5sqOb8uBgG0j+ueeP5Fy8RoKZ8q8wwz3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681956026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7a64a2036TSKCcs8puSJknsz6DFaYq1+Szmi02cFXo=; b=eIX4nyanYgyMAzgyOp57inytidLzc4Mqd/ZnC1hn3qrDECBP6x7HkBdCj0QQTqmK/tVTVz ZQ2GKowN/WUqeR4vT7AbOA4ROBrsIGoonybhIIWs4CvFjizzb+/9ea/KNsSUVTLwITGdRK RXg0LUrPDiyh6/zGIRToIXAkL0RoFLmDhibPgA2fo7GuoWmNPRCtftWW9ft9aQTCjiBpCE +y8UzrNZv0pcha4K8mAREVdcx+llF+Kp6x3CtyVa70A0rWu2NnlPeTs5wTYUZ77fJp3ygS dlmJLKY6SP79SnzCY4PVJvOvPgcLPqmOkkzmbL9ugi4bBwA384RbNuIyckukpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681956026; a=rsa-sha256; cv=none; b=S35VT7mfM+WZtNgRtmtp6aokNzPC9qr/b7VYB5Lz3Fy1dSk54SEzsA17sp3NsjWB3yZW7e SPUL+QRz9Jrq7b31UrAez8BlDlUuv9/6ulIYrTZ1eK0IwA34i7HrBG/sqpJ/kMX4fiG1fN qNBlHGsQTd0cQuoDzjmmwGT2tAcf50TzAvOAlnkQXYOetApAaPNr+3rj523frLVSlz7Yw0 IvkdZH5UldbbRtR9VroLsnM5Jh5PkwGOl4vmOHTq1Ft/Sc/Paps93pMsGFW2NT+GBic+gx BDHCLVGwOwfMHX9QZEDBoiUbIcFlpCDpmnLyTv4hJEP35TUunYdQ7t6fJ0yKnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q21895sjFzJNb; Thu, 20 Apr 2023 02:00: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 33K20PCb038208; Thu, 20 Apr 2023 02:00:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33K20P9A038207; Thu, 20 Apr 2023 02:00:25 GMT (envelope-from git) Date: Thu, 20 Apr 2023 02:00:25 GMT Message-Id: <202304200200.33K20P9A038207@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: 061e8e6ba60e - main - Makefile.xtras: fix show-valid-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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 061e8e6ba60e10e7d25e45e63d44a54186ed845e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=061e8e6ba60e10e7d25e45e63d44a54186ed845e commit 061e8e6ba60e10e7d25e45e63d44a54186ed845e Author: Simon J. Gerraty AuthorDate: 2023-04-20 01:59:53 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-20 01:59:53 +0000 Makefile.xtras: fix show-valid-targets Use ALL_MACHINE_LIST and leverage .MAKE.DEPENDFILE_PREFERENCE --- targets/Makefile.xtras | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/targets/Makefile.xtras b/targets/Makefile.xtras index 124bddc9b01c..6e328cd3e7cd 100644 --- a/targets/Makefile.xtras +++ b/targets/Makefile.xtras @@ -34,21 +34,20 @@ OTHER_TARGETS = \ destroy-stage \ BUILD_TARGETS_${MACHINE:tu} != cd ${_here} && \ - find . \( -name Makefile.depend -o -name ${.MAKE.DEPENDFILE:T} \) | \ + find . \( ${${.MAKE.DEPENDFILE:T} ${.MAKE.DEPENDFILE_PREFIX}:L:O:u:@m@-name $m -o@:tW:S,-o$,,} \) | \ sed 's,/Makefile.*,,;s,^./,,' | sort -u -.for _machine in ${all_machine_list} +.for _machine in ${ALL_MACHINE_LIST} _targets_${_machine} != cd ${_here} && \ - find . \( -name Makefile.depend.${_machine} -o \ - -name ${.MAKE.DEPENDFILE:T}.${_machine} \) | \ + find . \( ${.MAKE.DEPENDFILE_PREFERENCE:T:M*${MACHINE}*:S,${MACHINE},${_machine},g:O:u:@m@-name $m -o@:tW:S,-o$,,} \) | \ sed 's,/Makefile.*,,;s,^./,,' | sort -u BUILD_TARGETS_${_machine:tu} += ${_targets_${_machine}} .endfor show-valid-targets: -.for _machine in ${all_machine_list:O} +.for _machine in ${ALL_MACHINE_LIST:O} .if !empty(BUILD_TARGETS_${_machine:tu}) - @echo "Build targets for ${_machine} (leave out the ${target_dirs:S,${_here:T},,:S,^/,,:S,$,/,}):" + @echo "Build targets for ${_machine} (leave out the ${DIRDEPS_TARGETS_DIRS:S,${_here:T},,:S,^/,,:S,$,/,}):" @echo -e "${BUILD_TARGETS_${_machine:tu}:O:ts\n}" | sed -e 's,^, ,' @echo .endif From nobody Thu Apr 20 04:15: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 4Q24810zWZz46DJ5; Thu, 20 Apr 2023 04:15: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 4Q24806kmgz40Qj; Thu, 20 Apr 2023 04:15:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681964128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=55dRbKsd4Bq2MHP8vd9DlxsIiW8sgITV96jK8bZMNBY=; b=YsygQ2+uz/albVnv8CkSMCnQ9Bw5owpxfHL0TtGJ8JR6mVvpBhfb0CXqTaBYPtIcN25n3B lSFwjtOUJ0Yn/myP2lHio717Xmlw/J9IqAIO6T+3fOm6pA2SemAC6F11YCrtieEHbRKcAn JNLLt8etgkS1yd+0ea+HTUIdFU7K3RkcgZzyuSLl0JHVmILrBM6kLF/RLlP335p/O/PKBT MJR1XJzbHEQbTBQI9b5k1ZoE9Mp3zUygzx4W/cRK1W8/013ae5+bZBHosWMqNOEYgukmet icExuM/HS1qdgcEPXWBGfgRj8+PyYYwQc4hk/esiIEyv2m/SU6qEL3shrPIBzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681964128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=55dRbKsd4Bq2MHP8vd9DlxsIiW8sgITV96jK8bZMNBY=; b=sMvo/YZwnghb8+W8CU32RHdDUbprW10VY+eVIMjUkcGs8kGcpvGryv150L8MIG5xlMZ437 2NXDoFakqHkjaYaxCyre3JwkpR0I2qc/E50KBG2L2CUrs2CrMy/0m3fQ/XgcehVBqyXxSg yAX+VW+0HU3aw4xEimtQvRNDXbczegTulLPr9vlYTQ+RGIJOi2H71leS3F2s4gd7wUOhud 8PajXNksEGtIFRu5eZg3bJQ3ejH2jizyuzkVht7WyvrDDYXl/bZ3bMmGO098WCjnjeuMNe FvpzVmn2567r0055g9rjnyL5i/oodHi/EJaB3MTTbzG4qR3o1vUom6C4zBuaJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681964128; a=rsa-sha256; cv=none; b=sYzpQ8kAXx+T4OGpaakNdkIMEurSpcR2cXfMKKGUokrNit1zVwWH/qMDExrNwQnq7K5B3J RfSTfavzKjw38CIVGbn6jlhAH3gQTodDtHKNdl+NNQTOxiKoUEDrb44X1WenFY4bE7RAnu T7WNSdL7j84SWEGToyy3x8E63/4ClCCS+fiJVJUDySl5R5YMvBIcMhsS2V8gmYxgV0IdJq NJ0lB8tX7FsaVJ8y6iJAtKJBBYFcLcbpImks+5hahHJUjDL18AYMB+81SOynC6S1HfR3LV RnUYgmciWjMzR21pGePZypjn9Pym+FBD3A/AXKeRttmQ2BDDTPo9FL/djnWVKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q24805njQzMhg; Thu, 20 Apr 2023 04:15: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 33K4FSGt060752; Thu, 20 Apr 2023 04:15:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33K4FSvg060751; Thu, 20 Apr 2023 04:15:28 GMT (envelope-from git) Date: Thu, 20 Apr 2023 04:15:28 GMT Message-Id: <202304200415.33K4FSvg060751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 7e5811f76bb0 - stable/13 - loader: lua: unload the kernel when changing BEs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7e5811f76bb0df289b32144849331a2db83ac718 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7e5811f76bb0df289b32144849331a2db83ac718 commit 7e5811f76bb0df289b32144849331a2db83ac718 Author: Cyrus Rahman AuthorDate: 2023-04-16 02:27:53 +0000 Commit: Kyle Evans CommitDate: 2023-04-20 04:15:15 +0000 loader: lua: unload the kernel when changing BEs Usually the kernel is loaded later, but there are circumstances where it could have been loaded earlier than changing BEs. Unload anything that is already there so that we know we're using artifacts from the proper environment. PR: 265471 Reviewed by: kevans MFC after: 3 days (cherry picked from commit d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c) --- stand/lua/menu.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 400dbf3d469b..4a326cb54bb9 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -58,6 +58,9 @@ local function bootenvSet(env) loader.setenv("vfs.root.mountfrom", env) loader.setenv("currdev", env .. ":") config.reload() + if loader.getenv("kernelname") ~= nil then + loader.perform("unload") + end end local function multiUserPrompt() From nobody Thu Apr 20 04:15: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 4Q24826PtGz46DNk; Thu, 20 Apr 2023 04:15: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 4Q24820F34z40Sd; Thu, 20 Apr 2023 04:15:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681964130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sSxdTs4orTFdzfHPJUdNfNvx1SOWK3yd4+B7O4j86zA=; b=Rd8t+4YnGNVR6K1JcXWD86rJ+SV+iDSwTn8GfWCVjP1Kkx4DHSkNBkmkU8t1JEkwh3JKqX RT9e9iWfeB2ip9ikiCDgOvHDd4Yw/cTwgKqAeafqSLEMsrzKE8v1Xmv0sAy4r9/jaur996 5eMlEXvbXKINubWJe1CWHAOEt8v+T0pdLIVOuFi1qiedBInIKDklL43KYP0pEMmgFJUgRf eZOEZxyZIPMpD115TrMss6BFlYzE826C1FWeCggV0dxHw4b1fY5PJZUAbOWrFlmViumfLv OW2OZmi/AfqwUX+pjwW/p1se6X4oRgyY6e6VVz5RpTAO+X9rLPBicbpdCwSZ4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681964130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sSxdTs4orTFdzfHPJUdNfNvx1SOWK3yd4+B7O4j86zA=; b=HpAO8R8xkI1JQy7tSF9RTFOn9soDsX2g4A+3jr2BKRjsc78vfvOOaU6Ebjz0eQQVNA8ds9 cNxnKOc9jTtPrtlfgy7VJpTNq/84L93/VO+7kY1dCy+FYer2x8HRRMOuIoZx+wGNKELkBk ztUbsWdvLrEn4z2fNc729fXGUbnOuYyYBrWtu5vPqTGJqtaHKxyWI/7rRkuyeN8Ka67wc1 TgYBSlny075BEL/3aFDGk56PNl7XRDjjSUCSEOolLpcSeQgpuFuWJPADkOC+KnwV4RneZj RPNJ3MuM1/CzOX8RwuBDRbNZ3eP3Nr9scdw7LgaxtrLaCgyKuiWLt8v8yrG9Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681964130; a=rsa-sha256; cv=none; b=McHaDL90qOlvm4qIfvNXijQgeD+2OOBIaiIxaOTXCE5ztxc9hMsThZAk23wIuTEUiCX5ch nD1IhkaJIKlD4bAc9iIgQayKWspQBoUEXsea6/ybJGfi3EsgibQeQUAwVlwlxf/SjHzioC ZNLYKI9jnWvAuq8Gbj5rLY+uEdyxvHo/vwNf/LnLbKb/zBUKFvI46R8kl78zU+qCfNOTAo OPwrRG2A5Y1snlz6BgXYEyzYUzqbHxFqdk4XftApF2TVU2cnk7zP2qLTR4mnzMqrh8wbTH rXxyY+4aDxRBHIxz9zjyXI4bLlqMlwxesfW1KNSI5IGlJh7gPVH/GxvhVhpJUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q24816SL8zMwV; Thu, 20 Apr 2023 04:15: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 33K4FTdc060771; Thu, 20 Apr 2023 04:15:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33K4FTYM060770; Thu, 20 Apr 2023 04:15:29 GMT (envelope-from git) Date: Thu, 20 Apr 2023 04:15:29 GMT Message-Id: <202304200415.33K4FTYM060770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: f0cb73450966 - stable/13 - loader: lua: disable autoboot timer after password entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f0cb73450966fd064015efc8fc0342a44f9eb1d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f0cb73450966fd064015efc8fc0342a44f9eb1d7 commit f0cb73450966fd064015efc8fc0342a44f9eb1d7 Author: Cyrus Rahman AuthorDate: 2023-04-16 02:30:41 +0000 Commit: Kyle Evans CommitDate: 2023-04-20 04:15:15 +0000 loader: lua: disable autoboot timer after password entry In the lua loader, if one sets a password in loader.conf, the autoboot_delay timer will start before the menu is displayed. One can interrupt the autoboot and bring up the menu by entering a keyboard character before the timer expires. If this is done a prompt for the password is displayed. Entering the password will bring up the menu, but the timer will again start and another keyboard character must be entered or autoboot will abort the menu and boot the system. PR: 265472 Reviewed by: kevans MFC after: 3 days (cherry picked from commit 0ab68e9272b573becdb42edf2b4419cb7ab04707) --- stand/lua/password.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/lua/password.lua b/stand/lua/password.lua index 8edd4edd7ec3..3aea8e80bae6 100644 --- a/stand/lua/password.lua +++ b/stand/lua/password.lua @@ -135,6 +135,7 @@ function password.check() local pwd = loader.getenv("password") if pwd ~= nil then core.autoboot() + loader.setenv("autoboot_delay", "NO") -- The autoboot sequence was interrupted, so we'll need to -- prompt for a password. Put the screen back into a known -- good state, otherwise we're drawing back a couple lines From nobody Thu Apr 20 05:13: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 4Q25RQ0MG4z46J9J; Thu, 20 Apr 2023 05:13:54 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-vk1-xa2f.google.com (mail-vk1-xa2f.google.com [IPv6:2607:f8b0:4864:20::a2f]) (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 4Q25RP4pY9z3t0w; Thu, 20 Apr 2023 05:13:53 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-xa2f.google.com with SMTP id 71dfb90a1353d-440887e09c8so76753e0c.3; Wed, 19 Apr 2023 22:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681967630; x=1684559630; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CREYCPl+8ZgqA1WhDD29OOXZovVuBrBISBbCAHtmdzg=; b=NG9AObQAV57f/UKQg/sGy6m/4jKNmfiDVxF6/AUUJ1b/vxJsmg10JuFMvpsA6pUYnI xjJpG03YQhjgVcuvapnR3WR+yspPflu/VrUMidnzGBhw2eoDPEplPY/su451XmLuxcmy +WXYOJv2yOYsq1BOcIbkVYy5LQBcfDYqWQGCJDI1KuB7HfY1twNWHb8pGz3RY5aHuSIu MoO71SpHRUu038GahJ7J6gc/xlKi752ndq9jT3NN+9KxdqzDAJFTlt6qG9H7+FNR/ehD +zQx0VEsw+sIHF45ZEpZaaKRqAvwrt4cCc/9Y7MliAFqptRnAC0PQdJZNSZucgIApVyJ 3JTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681967630; x=1684559630; 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=CREYCPl+8ZgqA1WhDD29OOXZovVuBrBISBbCAHtmdzg=; b=SFm//m5VY+FrKJSr+71DJs9V9UjvbL8PGsUwRkNMb60UgmdkC1Zsk8O1Elfadl/8GO jCrqo7BHOEr3A5MGnRiXzHyBbLiriIKwaulb9afsYxFGYgd6s/Wzus4zRivAJQtsd7sX yDvY4hhiBccyNKBLvcwz7+tyYZ3jQMsOL9n9n1Vz8zl1MT7ZZNr0Mxj6XEExhm1oc+/D lDmH3Gr/+BZk5exXQTphkSrDDBSScw/9GlKZv9OoqtLIV1hg0Rl8oTACzgZXkFX/JaGE 9KB6j5zBuZZA+Z+bRtYvUqC/99PJOKAqYYbtfGR7CKXf1+wXG9qXoa4oMcpj2iqsrwYw uzRQ== X-Gm-Message-State: AAQBX9fywclXtHsa+n3c4vXzfgC+g5r+s+R972bHdXwFy0uqFGVtIHLF iVEhJ7uuKA68NYrNrKR4niYvHhZiKI19PBc+cJXEvJJW X-Google-Smtp-Source: AKy350app93KehGBDTRdhJgZCubVmPkKoSnEBtvzTY1HlVAPlWZS633/s+JVCHUYoHjzZEMTJkE1QOkBI+fjsWOEf40= X-Received: by 2002:a67:db81:0:b0:42c:761a:90ed with SMTP id f1-20020a67db81000000b0042c761a90edmr345656vsk.6.1681967630484; Wed, 19 Apr 2023 22:13:50 -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: <202304191016.33JAGuR9081578@gitrepo.freebsd.org> In-Reply-To: <202304191016.33JAGuR9081578@gitrepo.freebsd.org> From: Benjamin Kaduk Date: Wed, 19 Apr 2023 22:13:39 -0700 Message-ID: Subject: Re: git: 373b95976bce - main - netstat: document that PCB information can't be read from corefiles To: Michael Tuexen Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000238a6f05f9bd9b5a" X-Rspamd-Queue-Id: 4Q25RP4pY9z3t0w X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000238a6f05f9bd9b5a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 19, 2023 at 3:16=E2=80=AFAM Michael Tuexen = wrote: > The branch main has been updated by tuexen: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D373b95976bcefe2c4b582d6707efc65= bae23ea44 > > commit 373b95976bcefe2c4b582d6707efc65bae23ea44 > Author: Michael Tuexen > AuthorDate: 2023-04-19 10:15:35 +0000 > Commit: Michael Tuexen > CommitDate: 2023-04-19 10:15:35 +0000 > > netstat: document that PCB information can't be read from corefiles > > I see only removed lines, other than the .Dd update. Is this the intended change+commit message? -Ben --000000000000238a6f05f9bd9b5a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Apr 19, 2023 at 3:16=E2=80=AFAM M= ichael Tuexen <tuexen@freebsd.org<= /a>> wrote:
The branch main has been updated by tuexen:

URL:
https://cgit.= FreeBSD.org/src/commit/?id=3D373b95976bcefe2c4b582d6707efc65bae23ea44
commit 373b95976bcefe2c4b582d6707efc65bae23ea44
Author:=C2=A0 =C2=A0 =C2=A0Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-04-19 10:15:35 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-04-19 10:15:35 +0000

=C2=A0 =C2=A0 netstat: document that PCB information can't be read from= corefiles



I see onl= y removed lines, other than the .Dd update.=C2=A0 Is this the intended chan= ge+commit message?

-Ben=C2=A0
--000000000000238a6f05f9bd9b5a-- From nobody Thu Apr 20 05:19: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 4Q25ZX2hF4z46JXV; Thu, 20 Apr 2023 05:20:04 +0000 (UTC) (envelope-from kevans@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 4Q25ZX0LDLz42mF; Thu, 20 Apr 2023 05:20:04 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681968004; 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=t6UZ9Svmtn8TrRaLp4+uK9YRVBxt4O6/QoXW5jq1nGg=; b=hjaWwBs7UAF9r/MjmapyXG7BJdZPYb2rpCE/yd0DM10WT2k2nRwQS24jq0NCEDOqHz24jb dKv5fCgeIar0fqgd4ZE3TMk04LMgN8ZbSklv4y5auUEinQXAsQLMHljGGUaQc+IsBZm6WJ gKY1+Qf5Hjc+PPHnrI7eQw5E1I9QB6qT0/vda3NCKEff/ic4Es3UwSFPT9L3yWzdD1ZtCm i3FmgExOqGF4l8GrBrGtPfJATGpJfQfgStXhRsITxVSmWoFjGFVZfwHleQ+I8+P1j8owG7 FzaDj3NtYT++ET0MnZ44c6mpcR+7/3JZfyO9+F9nazrf8G+BHWgz3Kq3TUhucA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681968004; 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=t6UZ9Svmtn8TrRaLp4+uK9YRVBxt4O6/QoXW5jq1nGg=; b=DItxPhWtJHQZnt1SakZ27dmMeFwpe/Lgarqcg2lecYrQfzoKyfRheyvDDVr8t8+X8rd4ry 4BsA9BocK3/NfVXkU9HVkLGkDgs21G4PvFOE4ZDGQnANg6v+dmWzQD/yplI5PhHBemzCh2 AB9N3AgqaRzyXRQDxYQ8H0KMd3wQv6TToyutD6HgLqtjyRBeQ0hql2z757Ej7J6tiZXaPB PxGldnvfGao9Nqq3oeGX/yQLZguAKgXwaJaf2H+/jO4lel422RAbUggp+GtoOjHF9wymTB sjV/fvRDo/8NvYpy/RyS9XZRihmwMLpcQY75UIrnbHSMjtNYvzcsT0D1BRZFRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681968004; a=rsa-sha256; cv=none; b=DgK7QJffS9y64VCeCupE2Qr/hEBPMJ0Ajt2YZO+OiOKclguPfZPlAFWWNDaVTDFFUn22Si c6YA1B3PS3hCMcgLJzJUUJSgqpGUP+wze8uAMud218hROX88xsUT2zfbAfNnn+N3VX+5Q3 6F9X2YphPDd7991XmI8JcT2T1J2WqkvcdzztfJTHrfEfbRV+FLHKL2IuvREy0U8wS6Ede9 YVAnExy3/zqpmXaoIUIa1nDHJbsxzVrBfUR1O5KbzPMXkWT07zGxZ9zxEZJaSa58F3q/Lx KxqXOin/5qXzqPUI4+ObKtYe5e4124GK7f6wf0dGNfdC2WtGTxi2ZIfThG5t0g== Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q25ZW5SFczZDc; Thu, 20 Apr 2023 05:20:03 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-74d889cfc87so15334485a.0; Wed, 19 Apr 2023 22:20:03 -0700 (PDT) X-Gm-Message-State: AAQBX9cs1rf11Sg9MVtmwsSwSzLxGWIEF6yh4qhjsurIQKh8e02r9nmY fAde4fo6D+y94MqQ/qehU2HOb2APQ8FDLVvk1wE= X-Google-Smtp-Source: AKy350ZGIMqqXyMrtI/O62o8FMyfdh5Migpaot5mbDE4bwbq/uFcHyEBBQV4nOLHANR3Ub14M2i8dBVfBWg7VZIT4kI= X-Received: by 2002:a05:620a:359:b0:74d:fb3d:536 with SMTP id t25-20020a05620a035900b0074dfb3d0536mr43668qkm.13.1681968003091; Wed, 19 Apr 2023 22:20:03 -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: <202304191016.33JAGuR9081578@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Thu, 20 Apr 2023 00:19:52 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 373b95976bce - main - netstat: document that PCB information can't be read from corefiles To: Benjamin Kaduk Cc: Michael Tuexen , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Thu, Apr 20, 2023 at 12:13=E2=80=AFAM Benjamin Kaduk = wrote: > > On Wed, Apr 19, 2023 at 3:16=E2=80=AFAM Michael Tuexen wrote: >> >> The branch main has been updated by tuexen: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D373b95976bcefe2c4b582d670= 7efc65bae23ea44 >> >> commit 373b95976bcefe2c4b582d6707efc65bae23ea44 >> Author: Michael Tuexen >> AuthorDate: 2023-04-19 10:15:35 +0000 >> Commit: Michael Tuexen >> CommitDate: 2023-04-19 10:15:35 +0000 >> >> netstat: document that PCB information can't be read from corefiles >> > > > I see only removed lines, other than the .Dd update. Is this the intende= d change+commit message? > I had the same initial reaction, but looking at the manpage it's clear that this removes it from a couple forms of invocation where they simply don't apply anymore. I probably would've worded the commit message a bit differently, though. Thanks, Kyle Evans From nobody Thu Apr 20 06:26: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 4Q273b4gTZz46N92; Thu, 20 Apr 2023 06:26:51 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q273Z1p1gz4P4g; Thu, 20 Apr 2023 06:26:50 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6DE502601C7; Thu, 20 Apr 2023 08:26:47 +0200 (CEST) Message-ID: <1287e42d-3176-1d20-1c84-9bee0243d933@freebsd.org> Date: Thu, 20 Apr 2023 08:26:46 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. To: Jessica Clarke Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> <0E123CCD-C06E-443F-8C3C-AFDC8258CCF6@freebsd.org> Content-Language: en-US From: Hans Petter Selasky In-Reply-To: <0E123CCD-C06E-443F-8C3C-AFDC8258CCF6@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q273Z1p1gz4P4g X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 00:31, Jessica Clarke wrote: > On 19 Apr 2023, at 22:41, Hans Petter Selasky wrote: >> >> On 4/19/23 22:17, Jessica Clarke wrote: >>> pdqsort is n log n time, in-place and doesn’t allocate, and is used, >>> for example, for Rust’s standard sort_unstable. >> >> Hi Jessica, >> >> Like many many people have tried over the years, to improve the belated QuickSort (*) algorithm since it was invented, by catching bad behaviour and then fallback to other algorithms, pdqsort() is not a solution! >> >> Yes, it is probably "N log N" time, but if you read the code carefully, it falls back to heapsort(), which indeed uses malloc(), which is exactly my point, that I want to avoid. > Hi, > Citation needed. This directly contradicts Rust’s documentation: Sure, look at line 448 in there: https://github.com/orlp/pdqsort/blob/master/pdqsort.h#L448 >> This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not allocate), and O(n * log(n)) worst-case. Unfortunately it can end up allocating memory. >> >> Current implementation >> The current algorithm is based on pattern-defeating quicksort by Orson Peters, which combines the fast average case of randomized quicksort with the fast worst case of heapsort, while achieving linear time on slices with certain patterns. It uses some randomization to avoid degenerate cases, but with a fixed seed to always provide deterministic behavior. > > -- https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable > >> Please come forward with a "N log N" time algorithm which is malloc() and alloca() free, and then we'll talk! >> >> And not at least BSD-2-clause licensed and not covered by any patents, GPLv2 or whatever! > > Rust’s meets that and is MIT or Apache 2.0. The original pdqsort’s also > does and is under the zlib license. I’m not including alloca() free, > because that’s a nonsense restriction that would forbid any local > variables. --HPS From nobody Thu Apr 20 06:32: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 4Q27Bh4NGcz46NGR; Thu, 20 Apr 2023 06:33:00 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q27Bg5GwNz3JTx; Thu, 20 Apr 2023 06:32:59 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D2B1F2603CF; Thu, 20 Apr 2023 08:32:53 +0200 (CEST) Message-ID: <1ce00b7b-e34b-a91b-59ef-c3ee9683c4a0@freebsd.org> Date: Thu, 20 Apr 2023 08:32:54 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Colin Percival , Jessica Clarke Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> <010001879ba20fa7-95ae06cc-e046-4f59-a9b7-5e2cd389d101-000000@email.amazonses.com> From: Hans Petter Selasky In-Reply-To: <010001879ba20fa7-95ae06cc-e046-4f59-a9b7-5e2cd389d101-000000@email.amazonses.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q27Bg5GwNz3JTx X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 00:28, Colin Percival wrote: > > Quicksort with cryptographically randomized pivot selection is O(N^2) worst > case but O(N log N) average-case-for-worst-case-inputs which is good enough > for most purposes. > > Quicksort with in-place median-of-medians pivot selection is O(N log N) > worst > case. > > Both of them can be easily implemented with O(log N) extra space (for > the call > stack), and with O(1) extra space if you're insane enough to care. Yes, I know there are different ways to mitigate O(N^2) behaviour, but there is not yet after xxx years of research a way to fully mitigate that behaviour. What I think, there should be some statistics done in our qsort() when it goes to O(N^2), and then it could fallback to bsort() for example, to avoid issues with malloc(). Or maybe one round of bsort() is enough to make qsort() do its thing right. I want to investigate that. Like a hybrid. --HPS From nobody Thu Apr 20 06:50:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q27b95pkBz46PWT for ; Thu, 20 Apr 2023 06:50:45 +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 4Q27b92bfbz40Z7 for ; Thu, 20 Apr 2023 06:50:45 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3010889c6ebso193158f8f.2 for ; Wed, 19 Apr 2023 23:50:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681973444; x=1684565444; 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=HlDjRSwfcAkuKvzzpwb/mRA9BopuSKJPfMChSc3hgzA=; b=EiEL2rO0Gde+AaMTar6VN82Y8Jf1x5HSB36kfHvzRDBvQvl5Rr/kH6qAnk2WJNAOqX GjXDrtuOjVbvrqQMnqVcZJcjMOiwzyGnVcUXcam4TksRkBF7G7wlyCgM6+AfQCqD1i7n 7Bl18hi855tR10oRjbI/4VLLGMd3dnKA9mT/K9ZXviY+3AawegqL05zdvJgM4zTFm0ED ZzpvPNJruoKy2D6XcJdxWBanTkAdTjsamAfxQitHeLvboRuH20BAMmipVPD7QU7yq3ML hIInDeTIVX7n+sVih9ueqt/6ympBY+Naww7RmZZTg3gQfkaAQt5UyTZ5HSr7Iv44N5ly cTKg== X-Gm-Message-State: AAQBX9de5ro7Rpfk2ikAl+O6hdYO+sQjruOQ6V7+C7DwRVWyiHDITJ6X h4JmegjnZGVMX/O7nEV+cIb1CQ== X-Google-Smtp-Source: AKy350Zs+nh25fhDgeUnFJ/8QmAnyJNQZE2rgjswa/zq1NUB4YdCY6SDR2GwDg6VeW/G/glX5GdiRQ== X-Received: by 2002:adf:dd85:0:b0:2d1:9c50:5746 with SMTP id x5-20020adfdd85000000b002d19c505746mr358927wrl.12.1681973443791; Wed, 19 Apr 2023 23:50:43 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id hn3-20020a05600ca38300b003f0ad8d1c69sm4274703wmb.25.2023.04.19.23.50.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2023 23:50:43 -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 \(3696.120.41.1.1\)) Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. From: Jessica Clarke In-Reply-To: <1287e42d-3176-1d20-1c84-9bee0243d933@freebsd.org> Date: Thu, 20 Apr 2023 07:50:42 +0100 Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <20CF4C97-7C84-4A4E-984E-E95E406D788C@freebsd.org> References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> <0E123CCD-C06E-443F-8C3C-AFDC8258CCF6@freebsd.org> <1287e42d-3176-1d20-1c84-9bee0243d933@freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q27b92bfbz40Z7 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 20 Apr 2023, at 07:26, Hans Petter Selasky = wrote: > On 4/20/23 00:31, Jessica Clarke wrote: >> On 19 Apr 2023, at 22:41, Hans Petter Selasky = wrote: >>>=20 >>> On 4/19/23 22:17, Jessica Clarke wrote: >>>> pdqsort is n log n time, in-place and doesn=E2=80=99t allocate, and = is used, >>>> for example, for Rust=E2=80=99s standard sort_unstable. >>>=20 >>> Hi Jessica, >>>=20 >>> Like many many people have tried over the years, to improve the = belated QuickSort (*) algorithm since it was invented, by catching bad = behaviour and then fallback to other algorithms, pdqsort() is not a = solution! >>>=20 >>> Yes, it is probably "N log N" time, but if you read the code = carefully, it falls back to heapsort(), which indeed uses malloc(), = which is exactly my point, that I want to avoid. >=20 > Hi, >=20 >> Citation needed. This directly contradicts Rust=E2=80=99s = documentation: >=20 > Sure, look at line 448 in there: >=20 > https://github.com/orlp/pdqsort/blob/master/pdqsort.h#L448 That=E2=80=99s not Rust, and that=E2=80=99s also a comment, not a malloc = call. >>> This sort is unstable (i.e., may reorder equal elements), in-place = (i.e., does not allocate), and O(n * log(n)) worst-case. >=20 > Unfortunately it can end up allocating memory. Again. Citation needed. Rust=E2=80=99s documentation says otherwise. Jess >>> Current implementation >>> The current algorithm is based on pattern-defeating quicksort by = Orson Peters, which combines the fast average case of randomized = quicksort with the fast worst case of heapsort, while achieving linear = time on slices with certain patterns. It uses some randomization to = avoid degenerate cases, but with a fixed seed to always provide = deterministic behavior. >> -- = https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable >>> Please come forward with a "N log N" time algorithm which is = malloc() and alloca() free, and then we'll talk! >>>=20 >>> And not at least BSD-2-clause licensed and not covered by any = patents, GPLv2 or whatever! >> Rust=E2=80=99s meets that and is MIT or Apache 2.0. The original = pdqsort=E2=80=99s also >> does and is under the zlib license. I=E2=80=99m not including = alloca() free, >> because that=E2=80=99s a nonsense restriction that would forbid any = local >> variables. >=20 > --HPS From nobody Thu Apr 20 06:54: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 4Q27gr3Psvz46Phd; Thu, 20 Apr 2023 06:54:48 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q27gq5RJRz45mD; Thu, 20 Apr 2023 06:54:47 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 73FC12601A5; Thu, 20 Apr 2023 08:54:46 +0200 (CEST) Message-ID: <7c37a671-ab84-2a03-cd1f-d0bb75f8d153@freebsd.org> Date: Thu, 20 Apr 2023 08:54:46 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: a7469c9c0a50 - main - libc: bsort_s() requires both __BSD_VISIBLE and __EXT1_VISIBLE Content-Language: en-US To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304192013.33JKDIrM070521@gitrepo.freebsd.org> From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q27gq5RJRz45mD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 01:43, Brooks Davis wrote: > On Wed, Apr 19, 2023 at 11:35:56PM +0200, Hans Petter Selasky wrote: >> On 4/19/23 22:29, Brooks Davis wrote: >>> This is a formal request to revert all commits related to bsort. It >>> should not have been committed without much broader discussion and IMO >>> does not belong in the tree. It certainly should not be in the tree >>> under such a generic name. >>> >>> -- Brooks >> >> Hi Brooks, >> >> I don't have an issue reverting my bsort() patch series, but please >> clarify your statement first. Who are "we" this time, representing this >> formal request for revert? > > This is my request. Hi Brooks, Maybe bsort() can be an internal symbol to libc, I'm not sure if we support that. At the same time I want a solution forward about our qsort(). I would say that qsort() falling back to my bsort() would be a good solution, when qsort() already today sporadically exhibit O(N²) behaviour. How to do that clean? Regarding benchmarks, there is: https://github.com/hselasky/qsortbench It's basically a fork of a test-suite for sorting algorithms, having my bsort() added on top. There you also have the bad-cases for the FreeBSD's qsort(). My bsort() scores pretty OK on average. > > I see some review and the thread below, but adding > non-standard symbols that are likely to collide with other software[0] to > libc should be subject to a higher bar than a few people helping you > improve your patch of saying "that's neat". > > New things added to libc should be in a standard or aligned with one > (e.g., strlcpy, etc) and anything not from a standard should have > immediate uses where it improves things in the rest of the system. > Critically I don't see plans or prototype conversions and I don't see > benchmarks of real systems (which could easily be done with LD_PRELOAD. See answer above. > >> Regarding "broader discussion" - what do you mean? >> >> The initial discussion was started last September: >> >> https://lists.freebsd.org/archives/freebsd-arch/2022-September/000225.html > > More pushback here probably would be been good, sorry. A heads up > before the actual commit might have been a good idea. I personally > find your answer to the question, "why not improve qsort instead?" > unsatisfactory. It might be that importing your implementation makes > sense, but I don't think making is a public symbol we're stuck with > forever if we ship it in 14 is a good way to go. My plan was to get a broader audience for the bsort() algorithm, get it well tested to iron out any bugs in there, and then I see qsort() could fallback to bsort() as a remedy, which would be a great use-case. Regarding the libc symbol name, I could expand the "b" into "bitonic", but it will be like "int" vs "int32_t" to me. > >> And several people have been asked for review and comments. Please >> elaborate what "broader discussion" means? Do you mean like getting >> something into ANSI first? I don't get it. > > I'd like more "I'd use it for X" and less "that's neat". Do I have a commitment and plan from your side to work on this if I back the bsort() patch series out? I already see Jessica mentioning some memswap() patches, and I guess it is due to ongoing work for Cheri? I think we need something like bsort(). If it's not exactly like my version, something like that _is_ needed from what I can see. > > -- Brooks > > [0] Debian code search finds fewer collisions than I'd feared, but not > zero: https://codesearch.debian.net/search?q=%5B%5Ea-z%5Dbsort%5C%28&literal=0 Thanks for checking. I did some research already, and it doesn't look that bad. --HPS From nobody Thu Apr 20 07: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 4Q27zw2BGFz46QlB; Thu, 20 Apr 2023 07:08:44 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q27zw0ZMnz4QP9; Thu, 20 Apr 2023 07:08:44 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id BBC2B2602D4; Thu, 20 Apr 2023 09:08:42 +0200 (CEST) Message-ID: <2012a30a-ac2c-46cc-eb25-ea8970e6d170@freebsd.org> Date: Thu, 20 Apr 2023 09:08:42 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Jessica Clarke Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> <0E123CCD-C06E-443F-8C3C-AFDC8258CCF6@freebsd.org> <1287e42d-3176-1d20-1c84-9bee0243d933@freebsd.org> <20CF4C97-7C84-4A4E-984E-E95E406D788C@freebsd.org> From: Hans Petter Selasky In-Reply-To: <20CF4C97-7C84-4A4E-984E-E95E406D788C@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q27zw0ZMnz4QP9 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 08:50, Jessica Clarke wrote: > On 20 Apr 2023, at 07:26, Hans Petter Selasky wrote: >> On 4/20/23 00:31, Jessica Clarke wrote: >>> On 19 Apr 2023, at 22:41, Hans Petter Selasky wrote: >>>> >>>> On 4/19/23 22:17, Jessica Clarke wrote: >>>>> pdqsort is n log n time, in-place and doesn’t allocate, and is used, >>>>> for example, for Rust’s standard sort_unstable. >>>> >>>> Hi Jessica, >>>> >>>> Like many many people have tried over the years, to improve the belated QuickSort (*) algorithm since it was invented, by catching bad behaviour and then fallback to other algorithms, pdqsort() is not a solution! >>>> >>>> Yes, it is probably "N log N" time, but if you read the code carefully, it falls back to heapsort(), which indeed uses malloc(), which is exactly my point, that I want to avoid. >> >> Hi, >> >>> Citation needed. This directly contradicts Rust’s documentation: >> >> Sure, look at line 448 in there: >> >> https://github.com/orlp/pdqsort/blob/master/pdqsort.h#L448 > > That’s not Rust, and that’s also a comment, not a malloc call. > >>>> This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not allocate), and O(n * log(n)) worst-case. >> >> Unfortunately it can end up allocating memory. > > Again. Citation needed. Rust’s documentation says otherwise. Hi Jessica, Here are my citations: cd /usr/ports/lang/rust make extract less work/rustc-1.68.2-src/library/alloc/src/slice.rs /// The current algorithm is based on [pattern-defeating quicksort][pdqsort] by Orson Peters, /// which combines the fast average case of randomized quicksort with the fast worst case of /// heapsort, while achieving linear time on slices with certain patterns. It uses some /// randomization to avoid degenerate cases, but with a fixed seed to always provide /// deterministic behavior. less /usr/src/lib/libc/stdlib/heapsort.c The first thing heapsort() does is go and grab memory: > if ((k = malloc(size)) == NULL) > return (-1); --HPS From nobody Thu Apr 20 07:12: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 4Q284Z3x6bz46R3Z for ; Thu, 20 Apr 2023 07:12:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 4Q284Z1LBqz4WRt for ; Thu, 20 Apr 2023 07:12:46 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-3f17b967bfbso11510655e9.1 for ; Thu, 20 Apr 2023 00:12:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681974765; x=1684566765; 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=tjx11f8b/phbB6LGhFQG74ix4f7aLFd+FA7m5uQ0zZ8=; b=Cu+5VxvcYQ6L7yzCVvCFUPO9GGKRYhUh0bdLkYuU9b5K6OGLYob6JwXXTGgHYxtiGd x/nyX0pCSlh3w4CBCgg8CIQv49iSl8B1yrX3nCyg9jjTJiOIq1er0Kv1emJUsjOWKCBx mK9C2CodqF+pKlqWynHh50jRaJX/mrSxx30KComDLcPfo/S0+jhJ006HHJU6KCLhNps7 TUrJdvvOLlkdSm30RViHBTHzVtexvaC524NwtNOWEawGj5NVCenAOJFhFAhbKYH6Yk4j fwGJn5tZEOginUvjxZFiSnlsIEHV2OOhvi97M5DkDNxdY8QBw2Mfiw97sJTlXttXgjzq dbXA== X-Gm-Message-State: AAQBX9fVHxpt640i2IrFlpdRvmqbj6A5TS75RLP9mz7z31c5ePgYH0ZS r4NaVLEcqkKIqLyS9Ey8lHtlSzFVdExXRmPo5ucEYg== X-Google-Smtp-Source: AKy350ZE0NN9otiyHmuTFjpnTBKA/w0u9beksbu6scUpgH3XWaeWntjljPCB5XFMl1UxnmqGsOMCKw== X-Received: by 2002:adf:f604:0:b0:2cb:29eb:a35e with SMTP id t4-20020adff604000000b002cb29eba35emr3827005wrp.11.1681974764896; Thu, 20 Apr 2023 00:12:44 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id n3-20020a05600c294300b003f182c11667sm1040606wmd.39.2023.04.20.00.12.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Apr 2023 00:12: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 \(3696.120.41.1.1\)) Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. From: Jessica Clarke In-Reply-To: <2012a30a-ac2c-46cc-eb25-ea8970e6d170@freebsd.org> Date: Thu, 20 Apr 2023 08:12:43 +0100 Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6B7B56C5-52CF-4B1C-A4D2-4D4BE0FE30C7@freebsd.org> References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> <0E123CCD-C06E-443F-8C3C-AFDC8258CCF6@freebsd.org> <1287e42d-3176-1d20-1c84-9bee0243d933@freebsd.org> <20CF4C97-7C84-4A4E-984E-E95E406D788C@freebsd.org> <2012a30a-ac2c-46cc-eb25-ea8970e6d170@freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q284Z1LBqz4WRt 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 20 Apr 2023, at 08:08, Hans Petter Selasky = wrote: > On 4/20/23 08:50, Jessica Clarke wrote: >> On 20 Apr 2023, at 07:26, Hans Petter Selasky = wrote: >>> On 4/20/23 00:31, Jessica Clarke wrote: >>>> On 19 Apr 2023, at 22:41, Hans Petter Selasky = wrote: >>>>>=20 >>>>> On 4/19/23 22:17, Jessica Clarke wrote: >>>>>> pdqsort is n log n time, in-place and doesn=E2=80=99t allocate, = and is used, >>>>>> for example, for Rust=E2=80=99s standard sort_unstable. >>>>>=20 >>>>> Hi Jessica, >>>>>=20 >>>>> Like many many people have tried over the years, to improve the = belated QuickSort (*) algorithm since it was invented, by catching bad = behaviour and then fallback to other algorithms, pdqsort() is not a = solution! >>>>>=20 >>>>> Yes, it is probably "N log N" time, but if you read the code = carefully, it falls back to heapsort(), which indeed uses malloc(), = which is exactly my point, that I want to avoid. >>>=20 >>> Hi, >>>=20 >>>> Citation needed. This directly contradicts Rust=E2=80=99s = documentation: >>>=20 >>> Sure, look at line 448 in there: >>>=20 >>> https://github.com/orlp/pdqsort/blob/master/pdqsort.h#L448 >> That=E2=80=99s not Rust, and that=E2=80=99s also a comment, not a = malloc call. >>>>> This sort is unstable (i.e., may reorder equal elements), in-place = (i.e., does not allocate), and O(n * log(n)) worst-case. >>>=20 >>> Unfortunately it can end up allocating memory. >> Again. Citation needed. Rust=E2=80=99s documentation says otherwise. >=20 > Hi Jessica, >=20 > Here are my citations: >=20 > cd /usr/ports/lang/rust > make extract > less work/rustc-1.68.2-src/library/alloc/src/slice.rs >=20 > /// The current algorithm is based on [pattern-defeating = quicksort][pdqsort] by Orson Peters, > /// which combines the fast average case of randomized quicksort = with the fast worst case of > /// heapsort, while achieving linear time on slices with certain = patterns. It uses some > /// randomization to avoid degenerate cases, but with a fixed seed = to always provide > /// deterministic behavior. And? That=E2=80=99s just a comment, it=E2=80=99s not a memory = allocation. > less /usr/src/lib/libc/stdlib/heapsort.c >=20 > The first thing heapsort() does is go and grab memory: >=20 >> if ((k =3D malloc(size)) =3D=3D NULL) >> return (-1); That=E2=80=99s our heapsort. Neither Rust=E2=80=99s nor pdqsort=E2=80=99s = calls heapsort(3). So again, point me at the malloc that you claim is made by either Rust or pdqsort despite Rust=E2=80=99s own documentation explicitly stating it = does not do that. This conversation is getting extremely tiresome. Jess From nobody Thu Apr 20 07:25:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q28Lr5jN3z46RGr; Thu, 20 Apr 2023 07:25:08 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q28Lr1b8lz3N9Q; Thu, 20 Apr 2023 07:25:08 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D7CE82601C7; Thu, 20 Apr 2023 09:25:06 +0200 (CEST) Message-ID: <6253bac6-4c65-ed77-96c9-6a1d9f69e21e@freebsd.org> Date: Thu, 20 Apr 2023 09:25:05 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Jessica Clarke Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> <0E123CCD-C06E-443F-8C3C-AFDC8258CCF6@freebsd.org> <1287e42d-3176-1d20-1c84-9bee0243d933@freebsd.org> <20CF4C97-7C84-4A4E-984E-E95E406D788C@freebsd.org> <2012a30a-ac2c-46cc-eb25-ea8970e6d170@freebsd.org> <6B7B56C5-52CF-4B1C-A4D2-4D4BE0FE30C7@freebsd.org> From: Hans Petter Selasky In-Reply-To: <6B7B56C5-52CF-4B1C-A4D2-4D4BE0FE30C7@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q28Lr1b8lz3N9Q X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 09:12, Jessica Clarke wrote: > On 20 Apr 2023, at 08:08, Hans Petter Selasky wrote: >> On 4/20/23 08:50, Jessica Clarke wrote: >>> On 20 Apr 2023, at 07:26, Hans Petter Selasky wrote: >>>> On 4/20/23 00:31, Jessica Clarke wrote: >>>>> On 19 Apr 2023, at 22:41, Hans Petter Selasky wrote: >>>>>> >>>>>> On 4/19/23 22:17, Jessica Clarke wrote: >>>>>>> pdqsort is n log n time, in-place and doesn’t allocate, and is used, >>>>>>> for example, for Rust’s standard sort_unstable. >>>>>> >>>>>> Hi Jessica, >>>>>> >>>>>> Like many many people have tried over the years, to improve the belated QuickSort (*) algorithm since it was invented, by catching bad behaviour and then fallback to other algorithms, pdqsort() is not a solution! >>>>>> >>>>>> Yes, it is probably "N log N" time, but if you read the code carefully, it falls back to heapsort(), which indeed uses malloc(), which is exactly my point, that I want to avoid. >>>> >>>> Hi, >>>> >>>>> Citation needed. This directly contradicts Rust’s documentation: >>>> >>>> Sure, look at line 448 in there: >>>> >>>> https://github.com/orlp/pdqsort/blob/master/pdqsort.h#L448 >>> That’s not Rust, and that’s also a comment, not a malloc call. >>>>>> This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not allocate), and O(n * log(n)) worst-case. >>>> >>>> Unfortunately it can end up allocating memory. >>> Again. Citation needed. Rust’s documentation says otherwise. >> >> Hi Jessica, >> >> Here are my citations: >> >> cd /usr/ports/lang/rust >> make extract >> less work/rustc-1.68.2-src/library/alloc/src/slice.rs >> >> /// The current algorithm is based on [pattern-defeating quicksort][pdqsort] by Orson Peters, >> /// which combines the fast average case of randomized quicksort with the fast worst case of >> /// heapsort, while achieving linear time on slices with certain patterns. It uses some >> /// randomization to avoid degenerate cases, but with a fixed seed to always provide >> /// deterministic behavior. > > And? That’s just a comment, it’s not a memory allocation. > >> less /usr/src/lib/libc/stdlib/heapsort.c >> >> The first thing heapsort() does is go and grab memory: >> >>> if ((k = malloc(size)) == NULL) >>> return (-1); > > That’s our heapsort. Neither Rust’s nor pdqsort’s calls heapsort(3). So > again, point me at the malloc that you claim is made by either Rust or > pdqsort despite Rust’s own documentation explicitly stating it does not > do that. > > This conversation is getting extremely tiresome. > Hi Jessica, FreeBSD's libc is written in C and not Rust. Please point to something written in C. Probably that malloc() can be on-stack for small sizes in libc's heapsort(). On GitHub : hselasky/qsortbench you can apply this patch: > diff --git a/Makefile b/Makefile > index a0d85e0..634fabc 100644 > --- a/Makefile > +++ b/Makefile > @@ -1,5 +1,5 @@ > -CC := gcc > -CFLAGS = -Ofast -march=native -Wall -Wextra -std=c11 # -Dcheck=1 > +CC := clang # gcc > +CFLAGS = -O3 -march=native -Wall -Wextra -std=c11 # -Dcheck=1 > #CFLAGS = -Os -march=native -Wall -Wextra -std=c11 # -Dcheck=1 > LDFLAGS = -flto > > diff --git a/qsort.c b/qsort.c > index b18a4f9..079fb07 100644 > --- a/qsort.c > +++ b/qsort.c > @@ -175,6 +175,7 @@ int main(int argc, char *argv[]) { > { musl_qsort, "musl" , 0, 0 }, > { diet_qsort, "diet" , 0, 0 }, > { bsort_qsort, "bsort" , 0, 0 }, > + { heapsort, "heapsort", 0, 0 }, > { bsd_qsort, "bsd" , 0, 0 }, > { uclibc_qsort, "uclibc" , 0, 0 }, > { plan9_qsort, "plan9" , 0, 0 }, Then you do "gmake" and run the test-bench: ./qsort 1000000 Comparing heapsort() to bsort() gives the following results: leaderboard 1. illumos 0.998335 1.000000 2. mine 1.013954 1.015645 3. system 1.154811 1.156737 4. glibc 1.033140 1.034864 5. freebsd 1.212156 1.214178 6. plan9 1.503944 1.506453 7. bsd 1.467272 1.469719 8. wada 1.713490 1.716349 9. mini 2.545149 2.549395 10. bsort 2.819615 2.824318 11. linux 2.051919 2.055342 12. musl 3.194471 3.199800 13. diet 2.242223 2.245964 14. uclibc 3.561086 3.567026 15. heapsort 2.879076 2.883879 Our libc's heapsort() is on the bottom. --HPS From nobody Thu Apr 20 07:39: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 4Q28gD5RMvz46SHV; Thu, 20 Apr 2023 07:39:20 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q28gC6m3Fz41P8; Thu, 20 Apr 2023 07:39:19 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 59FC0260025; Thu, 20 Apr 2023 09:39:18 +0200 (CEST) Message-ID: Date: Thu, 20 Apr 2023 09:39:18 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Jessica Clarke Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> <0E123CCD-C06E-443F-8C3C-AFDC8258CCF6@freebsd.org> <1287e42d-3176-1d20-1c84-9bee0243d933@freebsd.org> <20CF4C97-7C84-4A4E-984E-E95E406D788C@freebsd.org> <2012a30a-ac2c-46cc-eb25-ea8970e6d170@freebsd.org> <6B7B56C5-52CF-4B1C-A4D2-4D4BE0FE30C7@freebsd.org> From: Hans Petter Selasky In-Reply-To: <6B7B56C5-52CF-4B1C-A4D2-4D4BE0FE30C7@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q28gC6m3Fz41P8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 09:12, Jessica Clarke wrote: > This conversation is getting extremely tiresome. Can we move the discussion over to differential? https://reviews.freebsd.org/D36493 --HPS From nobody Thu Apr 20 08:10: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 4Q29M95x4rz46TZZ; Thu, 20 Apr 2023 08:10: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 4Q29M941QYz3kG8; Thu, 20 Apr 2023 08:10:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681978229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZoCrvKsk7h5wiKpJeFEvCj7yXogkSCFDlngbPmW5DbM=; b=vLc9Rv753kmO79Pc9/BAlEu4WaW6oxTJd/FQ8qvYOgRz989QkPc1EhpMJtvV4Ek4VRtpg8 NAa0coijNGfinU7P8f0RpPBhy/6h6cE3CsgcR3EWoUgvp6TFg4Qv1BjVl72cWiDNvxgrZ0 bhdN4AW4BmEB9DOWtKAlDXrJE1EX1OZJBOFcv65Q17+sbH9CC89c9TBi4g+n1fT9nIG0er Gw5yZgZ6weDgaSaWAmIO77WxFFajtAu3qzVq5GxxaCZUq4+NKKpip9wVyItguLEy5evE3C NzsrxuOkESAppbfU806DBlMf8lb4XIfOdchHS0lw+/lqfWrYNFVycxUfadsEKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681978229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZoCrvKsk7h5wiKpJeFEvCj7yXogkSCFDlngbPmW5DbM=; b=Z/uwhEHGTuggk3EC78CAbVS21e7hc1vxa8dMGZQGXsIyew7HywkF+WeyKgx4nkJsgVKEZT slFHIbS3SQNYGHPels6VTHF+z8u1irgB0G+mji6xknU3g/frJEWYfV0rJ6E36+6VW1Z5Io 81LxJzpdV8kbD+rWp1/ss+xD5RMZxU/n0ZM74w7gziyJmK7f3Vb/38tVBm2iY56UpLHtX8 t2KV/2Nr2XL0OlNrKK1jWyt3xvwNX5/Y3AOH1P7tPsVOYZ3Br/1fawR35/PjJw3znfRyid EEQXSF9FFGVFppjHE4Cal7zuT64zTfkVvThFx8SWhTsh8RSjk24A+FbyMxPpgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681978229; a=rsa-sha256; cv=none; b=RyU1nQC5lU750Hd4CPTRP0euib7zlp8oTOIm2GkIdxsVgyM2M8xgy2hIh4C1Qe7M2KzsBE imDQZhXK0Oy3nDvoouESh2XvHCpRBXwAMAeUlo7lv58njUkbD+D6b4X3m+4E+2p4CtGSoS vOnwVIvtzMI+AR7wSjfLUsSQhZ8kV52xOGgko/TQn6K6zjnddjUBKk5g15rgRrgVL6kC95 kXB1UEfMMoDph6ZmyPkJmaIgRIJtC0ZkgHd3yetmSZqqeih/ITFUMJbS+qr9atik2u2vID S/9XgSN9Fk6X06Wq8FAc/9Slxv6KfpCP6dc76DfcLWkAAfkv+34Y3aQT7vG1Dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q29M92WV6zVGK; Thu, 20 Apr 2023 08:10: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 33K8ATIF048493; Thu, 20 Apr 2023 08:10:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33K8ATis048492; Thu, 20 Apr 2023 08:10:29 GMT (envelope-from git) Date: Thu, 20 Apr 2023 08:10:29 GMT Message-Id: <202304200810.33K8ATis048492@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: 7ff314380919 - main - zfs: add missing vn state transition for .zfs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 7ff314380919d5b7c4b45e68fd093a51a998f845 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7ff314380919d5b7c4b45e68fd093a51a998f845 commit 7ff314380919d5b7c4b45e68fd093a51a998f845 Author: Mateusz Guzik AuthorDate: 2023-04-20 08:09:59 +0000 Commit: Mateusz Guzik CommitDate: 2023-04-20 08:09:59 +0000 zfs: add missing vn state transition for .zfs Reported by: des --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c index d00efa44f2bc..8ba5e0b242a2 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c @@ -204,6 +204,10 @@ sfs_vgetx(struct mount *mp, int flags, uint64_t parent_id, uint64_t id, return (error); } +#if __FreeBSD_version >= 1400077 + vn_set_state(vp, VSTATE_CONSTRUCTED); +#endif + *vpp = vp; return (0); } From nobody Thu Apr 20 08: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 4Q29zd5cVfz46WSP; Thu, 20 Apr 2023 08: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 4Q29zd1R6Lz4WTl; Thu, 20 Apr 2023 08:38:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681979917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=28o3mph+FsZJsx4Ou+nsBxPdat3TRAcjjf0m58IGN7g=; b=O7arsI8Yd7DekndX8TAGm5X1LkXiSMDI2Shxtf4Tio4w5FFE7HNTU87jMOtq7ZNqvBH9nJ 3JLCeDo23+VOT0eHBxxvrcCVmZdLxr3hfXIUMAKSKJs6pPMumr0SbxgAqbLc0VT00SWfvB GdPXTaOq1Bg9UKmIIIgMLhvksTJJ6v7cK/sTvu+vC++B0rQCe+lgoCxMydyapFoc5MfrIZ 7rh7fHw+r25Q801Tl6HDWjnRxSONteJ2go1KIveQCM7/biZqj6m6Wk+P8h6E8O1EFQFIJq dHTf97AJ7rjSBggVKXZguqIyEOXymPu1IDxmaNE/jO6jffHqHdIYfqlDEiaj+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681979917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=28o3mph+FsZJsx4Ou+nsBxPdat3TRAcjjf0m58IGN7g=; b=acx6QGgIsk+lrFnHNqJGE7OEDMxb7Hd8K34nMsPjWrkK8Z0NijTCJLHhdE3VsIUnFIsQc1 CYvbuSGY93GeYwkbL2nGt2/EzSkemwFXeaYTLoagxqUhEL+ilT0CYfvCvAjEzysZKYkBTl GMIGJtDcmrRg3w7hmxr8IxhIblWohbypAf97vIDQS+F6OfHWRpTzpL7YgfVzPVmgO/D//z ckVst3pUrN2zw9RZeHMRIh3/twcf2I74LTZb3buEBRoc4ZlIVLAIbckVDEprCHPqjOLnA8 1I5gXLiHiZcMP+DMtMH54xC4JB4Lm9T0qvxbVr8kaiWpcyRBOeFory+FdZqEVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681979917; a=rsa-sha256; cv=none; b=dOhPNgfs6PBCeqdHJOhcPd6+jtNP1flXhjgths+ULVOYdSlyB1CW4NVjDDsEbWSGIJs8+D nSrsYS5Dy6bfM/pmavTEGSok0FCPcSG9XM4O5yxWiSIgdU/X7IKjpH4hkK1urROIAI78Qa WLixGoOmdNRf3ANTuaB0IOAmzwBVKH9DZchTSRuUjpCZrXfMTxcVeWFqLSULRuJxlSxWGB /Y81yPIkIMvG0ILOVu2zhGrUWY4Nw4RQEBKZs302kZhEfX+wT6M99NyXHGEAfQmK35Ftbb 6HUEOuzbF7f6niN5Cpe2p66M28hBHt20XJvl7DofLXMbPCpVuSP45WLHeMg5Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q29zd0W9dzVpv; Thu, 20 Apr 2023 08:38: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 33K8cbUL088626; Thu, 20 Apr 2023 08: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 33K8cbmZ088625; Thu, 20 Apr 2023 08:38:37 GMT (envelope-from git) Date: Thu, 20 Apr 2023 08:38:37 GMT Message-Id: <202304200838.33K8cbmZ088625@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: 9c4e270822a3 - main - zfs: fix up EINVAL from getdirentries on .zfs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9c4e270822a3592bf122f9a8e4e815b4602329f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9c4e270822a3592bf122f9a8e4e815b4602329f1 commit 9c4e270822a3592bf122f9a8e4e815b4602329f1 Author: Mateusz Guzik AuthorDate: 2023-04-20 08:36:53 +0000 Commit: Mateusz Guzik CommitDate: 2023-04-20 08:38:28 +0000 zfs: fix up EINVAL from getdirentries on .zfs PR: 270909 --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c index 8ba5e0b242a2..420d887b661e 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c @@ -679,6 +679,17 @@ zfsctl_root_readdir(struct vop_readdir_args *ap) ASSERT3S(vp->v_type, ==, VDIR); + /* + * FIXME: this routine only ever emits 3 entries and does not tolerate + * being called with a buffer too small to handle all of them. + * + * The check below facilitates the idiom of repeating calls until the + * count to return is 0. + */ + if (zfs_uio_offset(&uio) == 3 * sizeof(entry)) { + return (0); + } + error = sfs_readdir_common(zfsvfs->z_root, ZFSCTL_INO_ROOT, ap, &uio, &dots_offset); if (error != 0) { From nobody Thu Apr 20 08:42: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 4Q2B485YtVz46X6P; Thu, 20 Apr 2023 08:42:32 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q2B482c9mz4cdZ; Thu, 20 Apr 2023 08:42:32 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id CAA902601A4; Thu, 20 Apr 2023 10:42:29 +0200 (CEST) Message-ID: Date: Thu, 20 Apr 2023 10:42:30 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Content-Language: en-US To: Jessica Clarke Cc: Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> From: Hans Petter Selasky In-Reply-To: <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q2B482c9mz4cdZ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/19/23 22:17, Jessica Clarke wrote: > Except they’re not, because all of what bsort provides can be provided > by qsort. All people care about are being able to quickly sort their > data and whether it’s a stable sort. Hi Jessica, From this I'm reading: Going bad being rare should just be accepted, because the benefit is greater than the deficit. I disagree: Bugs like those in FreeBSD's qsort() can/do create random victims out there having real life consequences. Being a victim is fine as long as it is not me? Databases, QuickSort, JSON, HTML, HTTP request timeout, default values and AirTags. What can go wrong goes wrong! --HPS From nobody Thu Apr 20 09:12: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 4Q2BkT0YQlz46YFl; Thu, 20 Apr 2023 09:12: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 4Q2BkS597Jz46bP; Thu, 20 Apr 2023 09:12:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681981936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mt30lAfXD36JNLYKURsrGDLDYWjtpQQnQxb6NyMODpo=; b=lPVvoZhXrdSRI1XuDaApVcwBg/bWU7s4UmyzhUz1M+ObgpUUhEXKH5VZtf/PTrX7lfz1d+ rxetB5YF5Rgr01AKPWaWqQ+Snrq9JO4W+JHTnig6rD0SN66WICD4hyDlI64cA83fIHwxGe JMZ3nsgzAg32HqffD0xkZ4ZQO2zdWQq8Tel6kfiDeoSEcrYRLg8rLCt8kz5mZ0QgrKxrbH zPhj432pP30Px+pBxnZcsQZJrHekSa8O43NLUZAtkaxlLRDbROpxt6vuqvtYPgqzXWHo7A K6+i81IYJWHTaI6yXAwT72MP4qnWgBTOBd7OjyqL/XSuPKgFbTd+mG4ulzD9Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681981936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mt30lAfXD36JNLYKURsrGDLDYWjtpQQnQxb6NyMODpo=; b=rpwrbl3xGY4snsYWgldsb55k9DUE9tF33NM2ciaWCrom+g6XKFIA+Eu84knTIHM0NVDFmZ 7xt52+xeq7DedW4g1kR1ThHA80D0TWQfP8Xt31YyUiZvIhCNMnaXU0+qwbboO9LLDmB5Kv WknwnmMqBUxm3CMNddpwmmD470rZmYAndM5S53PL2ME88UiyydkqQdBGgn9gk36bXvedIm Hf0h+gC1HuFijAnmsvTejdVkp1q1b7EWt18hdie6lAnh+COpraOIthGzSZtRvOTJpJbeQl yhq5Rk5kuE36odvZMrI5aMIUVMw0RklBzagTYcPUDc2zYlJlFy4N1lf732geFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681981936; a=rsa-sha256; cv=none; b=Re7UfGDZoFXxWQwxLZZnhd+i8A2gdrqCkX5XuxaQC91eHwLvk22IMkM7tQNT+rDlqMWbcu FxPyBdMUeoJ6EoXV2MlqSAaE8KAT2yq5XWGF4nLUmyDcz3Lp+aFfwuQko6ipwrrwhcHDL6 PZepAyfEqJqyk+4625KVA+CyX1RCgePgvFoua0zFKQp7chUE+wBoymqjA3PTDUMFBZpgWW i4s+U+0ntJpjq41bKWa2aaqFpwzd7aHQD2CHkRG4gZG10D6Q2ZswEckO9Y2k/+wm4Nfa5G qhI7YNgDYsyS9ospuuQ0oLcYQgarsj/npTgQnatsq+CNVsnHHuc8UBYdJ3zm+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 4Q2BkS4FrtzWnC; Thu, 20 Apr 2023 09:12: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 33K9CGR9053903; Thu, 20 Apr 2023 09:12:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33K9CGlD053902; Thu, 20 Apr 2023 09:12:16 GMT (envelope-from git) Date: Thu, 20 Apr 2023 09:12:16 GMT Message-Id: <202304200912.33K9CGlD053902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 66095010d1f4 - main - stand: Remove a double word in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66095010d1f4e5ff4a7bc39020106103887a470e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=66095010d1f4e5ff4a7bc39020106103887a470e commit 66095010d1f4e5ff4a7bc39020106103887a470e Author: Gordon Bergling AuthorDate: 2023-04-20 09:11:18 +0000 Commit: Gordon Bergling CommitDate: 2023-04-20 09:11:18 +0000 stand: Remove a double word in a source code comment - s/value value/value/ MFC after: 3 days --- stand/libsa/zfs/zfsimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 76063e76225f..4a285470642e 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -447,7 +447,7 @@ vdev_indirect_mapping_entry(vdev_indirect_mapping_t *vim, uint64_t index) * * It's possible that the given offset will not be in the mapping table * (i.e. no mapping entries contain this offset), in which case, the - * return value value depends on the "next_if_missing" parameter. + * return value depends on the "next_if_missing" parameter. * * If the offset is not found in the table and "next_if_missing" is * B_FALSE, then NULL will always be returned. The behavior is intended From nobody Thu Apr 20 09:13: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 4Q2BmM2CySz46YYF; Thu, 20 Apr 2023 09:13:55 +0000 (UTC) (envelope-from gbe@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 4Q2BmM0L4Hz4BJQ; Thu, 20 Apr 2023 09:13:55 +0000 (UTC) (envelope-from gbe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681982035; 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=LWBm47ZjQiB6qivzt/lBM6o8Z9jYH7xc+YAI0i93T1g=; b=q6EZgxCXth/WjnZYYtpqY67tDhnJtoqO+cCmeuRAaAtISEtk+7UuTVDgVuWehe+6OrT/Ig Djfy7G1A4+semphcWyUYmbMwMCmxV5cjhtzPO1Ts14Xi5AjcAefTQVo1fE38lDqyhGf+MD cnvR0gjF+k17jxzjaBxQSLbx7sYS5z84zuSRw6PvAOw+GgGGkE0WWqhhuBbNmzTaQJXkB/ awxfhI3C1n0WH66gPfpk2Co//lGrePhuAc8yotn6GAF1U1/LnnAfCGOHUZxMfINkyrXSVD PXvOsU0YgRFtG0dqlO5ZWR+1AhYxouAsXKWiczUHem3pfKlhW6HcREjTw5DBHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681982035; 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=LWBm47ZjQiB6qivzt/lBM6o8Z9jYH7xc+YAI0i93T1g=; b=W4AELXSaBK7T9JYsaM+6y/INmGp3tR/+AD7BATFFdaHA6CkMLAgzRzirgoANlC9eryr+Rl mZ8gtJeR/hFAyIkhzo0U6/VdTXtqwQSEoIjPsti5Dye4oJUbYJ2DrPCNH9ZSJCsbN5Zem5 BW5B8qU+o1QTZ+lBVsMK/Sp9PGR26kTM0wO24/V2WcILZQrhOmESxadBxtwvkhsSVqjCiE 6GLrJL/EmyEc89wiUCmrA9mpl+SBU+ou13iC6SKhiGort57Ke0vCaWCzTO6+8yaUdqnJeb wAcwRqwjRD1GYJuxJmfWYCJz3NKxMMLBELFjLVAgO0O7mcRyXlSVWmrRN94+tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681982035; a=rsa-sha256; cv=none; b=Hu8AwLb97E+JfGLp9oLlebksB1kVm19AlZdik/qUe97O2UopDtpur661uyzomkQ6jx8rZf siRMHS+Ymk2Z7zC8K6/2lCatAna8Nb2brvh0cn5XhhLf9BsSHJzrD4KbRQySjMPjC9SmAw +UlIsj0aIW52QrAN0QCrNVEk5JiwlkcytS4JLOF5W5+ce5dxHyON7VGIFetwj6P1k4U481 HrOvNTwTHMpuh/seS5Z4A5p8P1VmgqixnKgGcplFrbbAHFMJN+GcpFRhlFFP7xMtCkETiL Oa+QY19KqdT4IEiIFTBlP4julQahKqfmjBcaD1Iafpojrlh01EIgFGOGK5/Exg== Received: from localhost (p200300cb8725f568bdce6866266242cd.dip0.t-ipconnect.de [IPv6:2003:cb:8725:f568:bdce:6866:2662:42cd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q2BmL3P6lzfgv; Thu, 20 Apr 2023 09:13:54 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Thu, 20 Apr 2023 11:13:52 +0200 From: Gordon Bergling To: John Baldwin Cc: Alexey Dokuchaev , Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: b12ccd0bb1b3 - main - stand: Remove double words in source code comments Message-ID: References: <202304180515.33I5FKdK006761@gitrepo.freebsd.org> <5B4D966A-896A-4C77-97CD-1594B9C79B42@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: X-Url: X-Operating-System: FreeBSD 13.2-STABLE amd64 X-Host-Uptime: 11:08AM up 2 days, 21:50, 2 users, load averages: 0.47, 0.52, 0.51 X-ThisMailContainsUnwantedMimeParts: N Hi John, On Tue, Apr 18, 2023 at 10:56:49AM -0700, John Baldwin wrote: > On 4/17/23 11:59 PM, Alexey Dokuchaev wrote: > > On Tue, Apr 18, 2023 at 08:12:51AM +0200, Gordon Bergling wrote: > >> On Tue, Apr 18, 2023 at 06:31:28AM +0100, Jessica Clarke wrote: > >>> On 18 Apr 2023, at 06:15, Gordon Bergling wrote: > >> [...] > >>>> --- a/stand/i386/boot0/Makefile > >>>> +++ b/stand/i386/boot0/Makefile > >>>> @@ -36,7 +36,7 @@ BOOT_BOOT0_FLAGS?= 0x8f > >>>> # 0xb6 (182d) corresponds to 10 seconds. > >>>> BOOT_BOOT0_TICKS?= 0xb6 > >>>> > >>>> -# The base address that we the boot0 code to to run it. Don't change this > >>>> +# The base address that we the boot0 code to run it. Don't change this > >>> > >>> This was correct and is now incorrect; read as "that we [load] the > >>> boot0 code to in order to run it". > >> > >> I just reverted the change. Sorry, not a native speaker on this side > >> and the sentence was a little hard to understand. > > > > This reminds me of the situation with commit 8ca67bf1273 which jrtc27@ > > pointed out was wrong, so I'd say again that comments like this should > > be rephrased: these consequent double words make it hard to understand > > and just begging for someone to try to "fix" it again in the future. > > Yes, I'll try to reword it. Gordon, your second change here was correct > (the double "value") and you should go ahead and re-do that one. Thanks for the reminder, done in 66095010d1f4. --Gordon From nobody Thu Apr 20 09: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 4Q2Bvd0p8Vz46Yyj for ; Thu, 20 Apr 2023 09:20:13 +0000 (UTC) (envelope-from joerg@bec.de) Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [IPv6:2001:4b98:dc4:8::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2Bvb2D1Xz4Kl4 for ; Thu, 20 Apr 2023 09:20:11 +0000 (UTC) (envelope-from joerg@bec.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bec.de header.s=gm1 header.b=VTxFEeP3; spf=pass (mx1.freebsd.org: domain of joerg@bec.de designates 2001:4b98:dc4:8::230 as permitted sender) smtp.mailfrom=joerg@bec.de; dmarc=none Received: (Authenticated sender: joerg@bec.de) by mail.gandi.net (Postfix) with ESMTPSA id ACFB6240007 for ; Thu, 20 Apr 2023 09:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bec.de; s=gm1; t=1681982407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IUzX4yhH9zTD9LoTsrHX9rGeT16BMHupU8zbI7mg1FU=; b=VTxFEeP3l85wHmh6Eisywlg9ZcPBieHJp4g1q5ZETTGtXDVWGGfICXgpi6rnqRhymzOYQF Yn4zPvAxkrHs320tmd2rGvt05AzzTMggUoN5FGDnPtiBOmPsKp67PdsoAXnjBAGRQ1QXas fkcqz09J0hKrExRN8sU+3NKMAqSIwFPaaM9YPs/h2mTWIkMvTM7oOyhxhu4wbzvosqZ85V 4JQOOpMt/SSz6wvN9CkKsnq+msZpJx3arUXGGSstrDLXzfzEoZ37WERX3AOZHr3CGqxp/+ My4rUDkg4Nge8gZmnwekasrq0DVV3FsKW4hiGAUSv2KAN8nwT0cFvvKEMKi1Lg== Date: Thu, 20 Apr 2023 11:20:05 +0200 From: Joerg Sonnenberger To: dev-commits-src-all@freebsd.org Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm.] Message-ID: References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@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: X-Spamd-Result: default: False [-3.60 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+ip6:2001:4b98:dc4:8::/64]; R_DKIM_ALLOW(-0.20)[bec.de:s=gm1]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[2001:4b98:dc4:8::230:from]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[bec.de:+]; BLOCKLISTDE_FAIL(0.00)[2001:4b98:dc4:8::230:server fail]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29169, ipnet:2001:4b98::/32, country:FR]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[bec.de]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[joerg]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4Q2Bvb2D1Xz4Kl4 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Am Wed, Apr 19, 2023 at 11:47:35PM +0200 schrieb Hans Petter Selasky: > On 4/19/23 23:17, Joerg Sonnenberger wrote: > > That's false. The difficult part of QuickSort is the median selection. > > This can be done in O(n) using the median of median algorithm and when > > combined into the main algorithm, much of the work for the median > > selection also helps the partition step. > > Hi Joerg, > > From what I know, they all fall back to other sorting algorithms using > malloc(), in the end. Please, just go and read: Blum, Floy, Pratt, Rivest, Tarjan: Time Bounds for Selection, 1973. [https://people.csail.mit.edu/rivest/pubs/BFPRT73.pdf] If you want a slightly more variant: Alexandrescu: Fast Deterministic Selection, 2017. [http://erdani.org/research/sea2017.pdf] Short answer: QuickSort requires O(log N) extra space, which is essentially a fixed cost given the natural address space limitations. Unless operating in a seriously confined environment, that's a perfectly fine use of the regular stack. Joerg From nobody Thu Apr 20 09:44: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 4Q2CRl38RSz46b8s; Thu, 20 Apr 2023 09:44:35 +0000 (UTC) (envelope-from danfe@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 4Q2CRl0y2cz3xBw; Thu, 20 Apr 2023 09:44:35 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681983875; 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=lkbsc7iRyUCi4SLVEqb1VssNLdOswEdcUaXzMozsimk=; b=HZYrErW+Azp9OTxAYHks+kiEk9ugh4wfpiXpM1V5WeAGUqYkKBLQfa8ZLqUNG2y6BOikYr vo4E9xkzl60HYD8LAey02tJ0Dgt4yx0NFeLzZysOodllcYqpStGyaeZxTVYYq7Rp4TvvaN VG9JqJ3OyaBIHLXB2mIlDJ1HQ2wGIB99BRsCaDS8ID7dfIvrwwqkW66177ihkMyy3DCKg8 X1Xf1KRutHqSHG5x/nOc/8+ss4/7oW6j4ENa4KQWiT2g1lD6g/Vv4LxXiEeDqIfdAXoJEJ 58oqJSJVabe1HLG4uyJ+D/PFUuB1+rTy4c+S6eweyDvJwoJdVkTsWdwRuCJi7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681983875; 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=lkbsc7iRyUCi4SLVEqb1VssNLdOswEdcUaXzMozsimk=; b=VSFz6bjveokMNZ0cmCPeuFqjGpRcbsbSNt3vL1/ceqeWEQ5Uomh8dqzkCtazHb2RyCS3bs Vme2YHkae/UY4TxzHxXSdQ7BgGJQGAKPNeXbfLkwNX2FAuedoO30AgYB/MaMYgMUBrBLB2 +dF7PrvT6YpVEZlRZg9qItZozs2EDCt6EFPxzF46Jgp5FmK2ZefGa0Y4vN18ohkUMOUT+p ijNmj+2IVchZd57QjVBntt72akltx+KXGMYML7PsXAiPEk4dDwLPgSq4vbHytX9ogOjtG7 84KnOWxqCUt3x+PQBW9mGa5AVbmm38tSM48oR4mleoW+8AnsPBWCLuRI2JkzaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681983875; a=rsa-sha256; cv=none; b=Lu3kzF4YThkG6fUiaSKwpdD/broYv9N9hWZC70JTVB3tw0N4mAezOreqbnlsC6977epSXS xiZyyp5WPUx1LMQniCGZuWGCGM96cBUB0zDcW5ptxJQevtqNNSWpctAPA0Y9oa9pPtD8g6 dZzZBcwabXqBYVXeKM0dLwzjCjLNMLvZkkpP2dUg/+ccZjwCryGCmBs+L7e+fhy5hVph50 kjMjGW7P5O2bIdodiLAbTMA6i0HRtc+4P2V8pCE5smw3E/S0Ownij5Zs2FmB4q9jIPYMq9 uq9D64vBpvfYckX+NkKXhGinxZPgidphf3lKf0HtE9OrDC/nOkSFekwGa/ZtGQ== Received: by freefall.freebsd.org (Postfix, from userid 1033) id EFA7E18085; Thu, 20 Apr 2023 09:44:34 +0000 (UTC) Date: Thu, 20 Apr 2023 09:44:34 +0000 From: Alexey Dokuchaev To: Jessica Clarke Cc: Hans Petter Selasky , Brooks Davis , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Message-ID: References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@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: <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> X-ThisMailContainsUnwantedMimeParts: N On Wed, Apr 19, 2023 at 09:17:57PM +0100, Jessica Clarke wrote: > ... > Please just adapt qsort to not have degenerate behaviour; it will > improve our implementation of a standard C function and render your > bsort() entirely obsolete. This. > Please revert this all. FreeBSD's libc isn't a place for your pet > projects. New public interfaces in something as core as libc should > have good justification, and I still do not see that here. I join this request. ./danfe From nobody Thu Apr 20 10:24:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2DKG3rCKz46dBt; Thu, 20 Apr 2023 10:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2DKG1dwVz3xLD; Thu, 20 Apr 2023 10:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681986242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eRYUj7w+XfU+1GOQnd3MPfGIF9ospCLnEz18keoWfxI=; b=WXS7Uui2Mt6HeVVBXSgumtawwomSjCUSpxaDIv1NonLOnvAL/wO/GnSBcsffk7nddnC/Na 81V7Ut7qTiF9WMvBBn03WS+vcqEp258qe8fWRms1Z+X3vPXeJLvEi6dUuWsApduP8sO/JB Xry4KFRDPFFnA/7TUKyOVrYqlfQ++eA2bjMhStZHtVS11lc81NN4Jjui7aTEqhoaxR16f3 tebLkzfRn5OphgbxPCxFmDh2G9pUDfp5RhNy6SBZAf2V8MHKkTAs0Q44/pL7+rlUvpSn9I PYgAfc/7PiB3edA+gNHF4DTf16WSKij57KldnQFzCalAK6w/XCX2LIadA5Qc5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681986242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eRYUj7w+XfU+1GOQnd3MPfGIF9ospCLnEz18keoWfxI=; b=Pbo8G5y8tJQL80G51y4rkGzM4/L2l3mH2RQ+NO/WDHOq5Piyy3xaSLAtiwMkXxm/YokUq9 uxHKq/M1hri/Fdt9Lw4NabqWhtviZCli095q/k3PXa7IxCKKnvodXZCF0MCcqDmyg+I5Zn udMADDFKmWwVjZmgxwig8Xe6G+Q6cFhL3H+adgo0KijV9mmWBOuHQiwt+CjYzXyqMbO87z Q2GdrETQfhjWBvwBPdPJ0KX2AlTqBl1flkqDkL2q1Ub0n3V+RgYX+YCPbrsqOJsTvOrEIv adeGpZ0uc92r3l9m2inth7wyzaPakiR4MxOQs4EujLSYsyfvYiUY5Ct7GBVd7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681986242; a=rsa-sha256; cv=none; b=TusTlINREyZUMvk1LrJfXaW80WfaSh3mWbT9E+IwticNDLaloqpYXKgUmvm3NsI+2gNDjb 4SGCBRt62JHsSFkXfsIv4GxrsIjKMybv1An0h88vXoKlnFB7SYgekmjzliiR1Mwg95vHgF cxRuqOOaafguoGZl7f5ol+Y+jXn9DOmVChHuSN0sMEwIKwM/i8z05I/oBgkNHd7xdo5PQu jVDsUROstUP2viaAYceIF4uD8PU0cp93KNZr25+GhwmOl/5jR7xIZbfJszBl18npX9vYMX 1x/8/+fqc5VrvhTYXmQMsmLC9ptbOywB5nX7SjYvH4MeSLf40oCEx7pFSmWJNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2DKG0HVCzYk0; Thu, 20 Apr 2023 10:24: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 33KAO10S068825; Thu, 20 Apr 2023 10:24:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KAO1jg068824; Thu, 20 Apr 2023 10:24:01 GMT (envelope-from git) Date: Thu, 20 Apr 2023 10:24:01 GMT Message-Id: <202304201024.33KAO1jg068824@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: 56d4550c4d71 - main - ifnet: factor out interface renaming into a separate function. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56d4550c4d71e61057362b3f7d5e391496efec4e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=56d4550c4d71e61057362b3f7d5e391496efec4e commit 56d4550c4d71e61057362b3f7d5e391496efec4e Author: Alexander V. Chernikov AuthorDate: 2023-04-19 14:26:20 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-04-20 10:23:37 +0000 ifnet: factor out interface renaming into a separate function. This change is required to support interface renaming via Netlink. No functional changes intended. Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D39692 MFC after: 2 weeks --- sys/net/if.c | 116 ++++++++++++++++++++++++++++++------------------------- sys/net/if_var.h | 1 + 2 files changed, 64 insertions(+), 53 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 90ed39bb2cff..b53a361c2ba3 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -2476,13 +2476,9 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) struct ifreq *ifr; int error = 0, do_ifup = 0; int new_flags, temp_flags; - size_t namelen, onamelen; size_t descrlen, nvbuflen; char *descrbuf; char new_name[IFNAMSIZ]; - char old_name[IFNAMSIZ], strbuf[IFNAMSIZ + 8]; - struct ifaddr *ifa; - struct sockaddr_dl *sdl; void *buf; nvlist_t *nvcap; struct siocsifcapnv_driver_data drv_ioctl_data; @@ -2749,55 +2745,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) NULL); if (error != 0) return (error); - if (new_name[0] == '\0') - return (EINVAL); - if (strcmp(new_name, ifp->if_xname) == 0) - break; - if (ifunit(new_name) != NULL) - return (EEXIST); - - /* - * XXX: Locking. Nothing else seems to lock if_flags, - * and there are numerous other races with the - * ifunit() checks not being atomic with namespace - * changes (renames, vmoves, if_attach, etc). - */ - ifp->if_flags |= IFF_RENAMING; - - EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); - - if_printf(ifp, "changing name to '%s'\n", new_name); - - IF_ADDR_WLOCK(ifp); - strlcpy(old_name, ifp->if_xname, sizeof(old_name)); - strlcpy(ifp->if_xname, new_name, sizeof(ifp->if_xname)); - ifa = ifp->if_addr; - sdl = (struct sockaddr_dl *)ifa->ifa_addr; - namelen = strlen(new_name); - onamelen = sdl->sdl_nlen; - /* - * Move the address if needed. This is safe because we - * allocate space for a name of length IFNAMSIZ when we - * create this in if_attach(). - */ - if (namelen != onamelen) { - bcopy(sdl->sdl_data + onamelen, - sdl->sdl_data + namelen, sdl->sdl_alen); - } - bcopy(new_name, sdl->sdl_data, namelen); - sdl->sdl_nlen = namelen; - sdl = (struct sockaddr_dl *)ifa->ifa_netmask; - bzero(sdl->sdl_data, onamelen); - while (namelen != 0) - sdl->sdl_data[--namelen] = 0xff; - IF_ADDR_WUNLOCK(ifp); - - EVENTHANDLER_INVOKE(ifnet_arrival_event, ifp); - - ifp->if_flags &= ~IFF_RENAMING; - - snprintf(strbuf, sizeof(strbuf), "name=%s", new_name); - devctl_notify("IFNET", old_name, "RENAME", strbuf); + error = if_rename(ifp, new_name); break; #ifdef VIMAGE @@ -3207,6 +3155,68 @@ out_noref: return (error); } +int +if_rename(struct ifnet *ifp, char *new_name) +{ + struct ifaddr *ifa; + struct sockaddr_dl *sdl; + size_t namelen, onamelen; + char old_name[IFNAMSIZ]; + char strbuf[IFNAMSIZ + 8]; + + if (new_name[0] == '\0') + return (EINVAL); + if (strcmp(new_name, ifp->if_xname) == 0) + return (0); + if (ifunit(new_name) != NULL) + return (EEXIST); + + /* + * XXX: Locking. Nothing else seems to lock if_flags, + * and there are numerous other races with the + * ifunit() checks not being atomic with namespace + * changes (renames, vmoves, if_attach, etc). + */ + ifp->if_flags |= IFF_RENAMING; + + EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); + + if_printf(ifp, "changing name to '%s'\n", new_name); + + IF_ADDR_WLOCK(ifp); + strlcpy(old_name, ifp->if_xname, sizeof(old_name)); + strlcpy(ifp->if_xname, new_name, sizeof(ifp->if_xname)); + ifa = ifp->if_addr; + sdl = (struct sockaddr_dl *)ifa->ifa_addr; + namelen = strlen(new_name); + onamelen = sdl->sdl_nlen; + /* + * Move the address if needed. This is safe because we + * allocate space for a name of length IFNAMSIZ when we + * create this in if_attach(). + */ + if (namelen != onamelen) { + bcopy(sdl->sdl_data + onamelen, + sdl->sdl_data + namelen, sdl->sdl_alen); + } + bcopy(new_name, sdl->sdl_data, namelen); + sdl->sdl_nlen = namelen; + sdl = (struct sockaddr_dl *)ifa->ifa_netmask; + bzero(sdl->sdl_data, onamelen); + while (namelen != 0) + sdl->sdl_data[--namelen] = 0xff; + IF_ADDR_WUNLOCK(ifp); + + EVENTHANDLER_INVOKE(ifnet_arrival_event, ifp); + + ifp->if_flags &= ~IFF_RENAMING; + + snprintf(strbuf, sizeof(strbuf), "name=%s", new_name); + devctl_notify("IFNET", old_name, "RENAME", strbuf); + + return (0); +} + /* * The code common to handling reference counted flags, * e.g., in ifpromisc() and if_allmulti(). diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 5f11998ecab8..e21bf44516cc 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -590,6 +590,7 @@ const char *if_getdname(const if_t ifp); void if_setdname(if_t ifp, const char *name); const char *if_name(if_t ifp); int if_setname(if_t ifp, const char *name); +int if_rename(struct ifnet *ifp, char *new_name); void if_setdescr(if_t ifp, char *descrbuf); char *if_allocdescr(size_t sz, int malloc_flag); void if_freedescr(char *descrbuf); From nobody Thu Apr 20 11:23: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 4Q2Fdj60gkz46gQf for ; Thu, 20 Apr 2023 11:23:21 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q2Fdj1VkBz4LXk for ; Thu, 20 Apr 2023 11:23:21 +0000 (UTC) (envelope-from hps@selasky.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3FC982601C7; Thu, 20 Apr 2023 13:23:19 +0200 (CEST) Message-ID: Date: Thu, 20 Apr 2023 13:23:18 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm.] To: Joerg Sonnenberger , dev-commits-src-all@freebsd.org References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> Content-Language: en-US From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q2Fdj1VkBz4LXk X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 11:20, Joerg Sonnenberger wrote: > Am Wed, Apr 19, 2023 at 11:47:35PM +0200 schrieb Hans Petter Selasky: >> On 4/19/23 23:17, Joerg Sonnenberger wrote: >>> That's false. The difficult part of QuickSort is the median selection. >>> This can be done in O(n) using the median of median algorithm and when >>> combined into the main algorithm, much of the work for the median >>> selection also helps the partition step. >> >> Hi Joerg, >> >> From what I know, they all fall back to other sorting algorithms using >> malloc(), in the end. > > Please, just go and read: > Blum, Floy, Pratt, Rivest, Tarjan: Time Bounds for Selection, 1973. > [https://people.csail.mit.edu/rivest/pubs/BFPRT73.pdf] > > If you want a slightly more variant: > Alexandrescu: Fast Deterministic Selection, 2017. > [http://erdani.org/research/sea2017.pdf] > > Short answer: QuickSort requires O(log N) extra space, which is > essentially a fixed cost given the natural address space limitations. > Unless operating in a seriously confined environment, that's a perfectly > fine use of the regular stack. Hi Joerg, Thanks for the references you've provided. After reading through the paper from 1973, I have the impressions it is about solving the so-called pivot selection problem. The basic QuickSort idea was introduced in 1961, according to the paper you referred to: C. A. R. HOaRE, Find (Algorithm 65), Communications of the ACM, July 1961, pp. 321-32 The other paper you refer to: http://erdani.org/research/sea2017.pdf is about different ways to implement QuickSort and how to mitigate problems about pivot selection and performance. Looking around, qsort() in libc's around the globe is so-to-speak equivalent to variants of QuickSort: Example 1: Android https://android.googlesource.com/platform/bionic/+/754c178ae551aedcbbfd3bfd1c1c3b710d9ad989/libc/stdlib/qsort.c Example 2: Linux (GLibc) https://github.com/lattera/glibc/blob/master/stdlib/qsort.c Example 3: NetBSD http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdlib/qsort.c?rev=1.23&content-type=text/x-cvsweb-markup Example 4: Darwin https://github.com/apple/darwin-xnu/blob/main/bsd/kern/qsort.c And FreeBSD of course. Why not allow for more sorting competition inside FreeBSD? If libc is not the place, maybe an own library, like libsort is more appropriate? Would that be any better if bsort(3) was in its own library, and developed from that? --HPS From nobody Thu Apr 20 11:52: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 4Q2GHD4byPz45yvH; Thu, 20 Apr 2023 11: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 4Q2GHD0zw6z44cB; Thu, 20 Apr 2023 11: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=1681991544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wyj+228PtfOuflqeWXfYvoJRCsWGeSnYllNm1XrCUwc=; b=h1oMjmVgabB/A6v2buxGNfSE4GdlQUiRImdTAIfzlA47iTOxtpcennCbj8qisiY1TmTWiv Biq9h0JdP1jmIkTBJPGDbVaDCKzCbsHKsOV7zL0NHf8GjEAGw5GD0cv7MaPdlEa/Eqr3LI UsIx2cYJ28sUef6Z8+SysYyQYcD+S4rhwQEC8CXi9XRfNJe1gB6IseKicVgQWiPki0WAWm dk83KdT88mOacr7dqGQKbwdY62q48uT/GqLwfTP0zXiHDFNDY58oaIc61hZYJJrbgR5OtE ZMvX7Ozku7u3kTeMzfncClbCBVmR7Euv0XK8o9Yz5KRmTbyKRpjO+FS63q0kSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681991544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wyj+228PtfOuflqeWXfYvoJRCsWGeSnYllNm1XrCUwc=; b=pY/aIoqfsyX3l4TD0PqhoPUxxAKwF4qj7egdFo0h3VMbAyEr3Z9Ba44bgY18aq5FXRpTFK MHajSab5V8carNU2afc5+FOwlnZFbzAlzfKxCSBd0Z3WZ7i1VQYviuooHX3M1DvepAqFKQ gtqiwD/cWiVjIvGhdWH094GIDIQUnzhsGy2oRYB5vy8L4ztUwwj8N1B5+by1crloMv2p6W 03WthxzN9qWWDeQpzEgPxIqC5lRSFD94eZjQlJzYBH1ZJQiRXVEmTxEtDWRNu+cfZ4WhgX qUphzGx6HOKwsBrPE/Pff+D1hv8/xPT0p1m8YCNR/svWzDCKcBsGTG2Qoi9qdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681991544; a=rsa-sha256; cv=none; b=ClCAS/2SxLPs7Y9oNSxptqUIlCbl7cZJaUkYzW9Qds+wd+nuNnOu/b57qLd+nxUQgAsIMg Bkz5wPBrNRK/LDbTB7AMhKNKCiz7T86ccyRA4no1tEBil8XTlfEMxgCCAwQ2+GKvU8tziu XWka+3tfkGN2PMZUAX/y9KDgCTVjZuT93N9cJVzxAXTkxdth248geo7RijH60CsEwHMmek sCxPl9T2A8eKxfrbcZ7o4dblHySMDDdxajUqsmS4JTTkHgVfBC8EZm4f1of8vznrd4wQUZ 1G+fxQkUve8TBB50GIdE3Npc6alNAErLzv/pczkI3LvK9GckoZ9pMJ5zmCjqFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2GHC6w0kzcBB; Thu, 20 Apr 2023 11:52: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 33KBqNnh016564; Thu, 20 Apr 2023 11:52:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KBqNaw016563; Thu, 20 Apr 2023 11:52:23 GMT (envelope-from git) Date: Thu, 20 Apr 2023 11:52:23 GMT Message-Id: <202304201152.33KBqNaw016563@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: 74e908b3c63b - main - 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/main X-Git-Reftype: branch X-Git-Commit: 74e908b3c63b28de1d590dc42502fbe959a6da2e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=74e908b3c63b28de1d590dc42502fbe959a6da2e commit 74e908b3c63b28de1d590dc42502fbe959a6da2e Author: Bjoern A. Zeeb AuthorDate: 2023-04-19 21:43:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-20 11:51:22 +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 MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D39706 --- 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 Thu Apr 20 12:45: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 4Q2HT20drWz462Wx; Thu, 20 Apr 2023 12:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2HT14dtFz4Ctv; Thu, 20 Apr 2023 12:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681994757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uzIUmDPewvF1X2UP/AmvOzNPD2FatezKtBV86Pbdktg=; b=HC0oNQ+9FPDE1wJNzpveBqy1Cr9IA+Dha5G5Nn5O9vMufHGWUK0SHj0/eax73Mfdil0em3 37BA7+Lx46s066fgdjgPRGnU0GUeorE/98snEBLlN19PM/xAlmKHmkCEvO86oNP/jBTRqI B6oWFHm+kCtMfmex0oxwWSFAR9f2uMITcHCVuM75b5TAxLmr0Ngne+Gr977ZkOs5O6XNg9 l3tLTSxUbIfXv777jbEuv0Ue9M2ZYAcVLdu8OJA81koozbU625skPgNYoXNSVibQrozkf2 k577IBg3eJab+XPBLDwJsopkIvCSQ5N8ptC6m8ew+aZcUCHhAEqdxJd6xOPEkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681994757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uzIUmDPewvF1X2UP/AmvOzNPD2FatezKtBV86Pbdktg=; b=s/x5vzZo9zLjzteHVthMprRTQ/pwPdZ/gVGfiwbuW75o5O4PzjC32arTbB067ZvYz7eOYk YzbO0kYqYuHQiwJWywvYDe2wmNOlgTBzKIuzDRcr3MHPeLSJ9QWR1ha0VzZMNGJtgPYuYT 8rZwzZ+X/fNK3PXe/AXzyVTt4DAKbQrJz9ndb5ZsNq+Zci4y4TV2y98jq1OGIdRfReLgmI b4lcssOpbXPcnZ9+sArC5BIt8NG5DQStgIbUuG/FosOCZlFUhsiliYsLZ8hnR5QJfemeMz c/BWkt6NhULgrZAua5e2t+d8EY/oI5WNSjQjUhJaHk8l2yqq3qEFy81IUI2Ohw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681994757; a=rsa-sha256; cv=none; b=vifrnDy8to/5F6DcKgendUbgHxzJaSACiFaJknM86B7PH6QdciGVE9Mq5SeZgoXgFLZlEk ypsjMaiifJAPBLhluA7oaWPfA+nfHu1lYGgSqIdYRQibZb7nIl6F4Oki42FlRDOmrt0zj4 ZjthCo7iYJW4WgGExPCKQTWORQ1kmdGJXvq0wLzuqL+mgQ6gu+CDt2QFFI+5bJ2mw6iLxM ZeQToqaz2JldWxYMRh+6fTm9l20DHbqcrOc3fZfO2XyZSJi6+1zbo0z7NJ4W8VGTJfzXD/ cDyAshvuiSO+Lxo/eID1dUiwTLCpNdIQlb6MjQYoUmGUgyNPiQweISxXAGDZbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2HT13KKjzdXQ; Thu, 20 Apr 2023 12:45:57 +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 33KCjv9g099397; Thu, 20 Apr 2023 12:45:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KCjvqQ099396; Thu, 20 Apr 2023 12:45:57 GMT (envelope-from git) Date: Thu, 20 Apr 2023 12:45:57 GMT Message-Id: <202304201245.33KCjvqQ099396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 607bc91d90a3 - main - vmrun.sh: Fix a typo in usage() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 607bc91d90a34f4d75cb7738bf23bc4517cd327f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=607bc91d90a34f4d75cb7738bf23bc4517cd327f commit 607bc91d90a34f4d75cb7738bf23bc4517cd327f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-04-20 12:43:57 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-04-20 12:45:13 +0000 vmrun.sh: Fix a typo in usage() MFC after: 3 days Sponsored by: Klara Inc. --- share/examples/bhyve/vmrun.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index 9770ff459a67..1ef310b07e92 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -83,7 +83,7 @@ usage() { "(default: ${DEFAULT_ISOFILE})" echo " -l: the OS loader to use (default: /boot/userboot.so)" echo " -L: IP address for UEFI GOP VNC server" \ - "(default: ${DEFAULT_VNCHOST}" + "(default: ${DEFAULT_VNCHOST})" echo " -m: memory size (default: ${DEFAULT_MEMSIZE})" echo " -n: network adapter emulation type" \ "(default: ${DEFAULT_NIC})" From nobody Thu Apr 20 13:31: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 4Q2JV21Fdnz464nl; Thu, 20 Apr 2023 13:31:54 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2JV11wRRz3y31; Thu, 20 Apr 2023 13:31:53 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (unknown [IPv6:2003:a:e03:d412:d974:1845:8ee3:64]) (Authenticated sender: micmac) by mail-n.franken.de (Postfix) with ESMTPSA id 7805F722C872B; Thu, 20 Apr 2023 15:31:41 +0200 (CEST) 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.500.231\)) Subject: Re: git: 373b95976bce - main - netstat: document that PCB information can't be read from corefiles From: tuexen@freebsd.org In-Reply-To: Date: Thu, 20 Apr 2023 15:31:39 +0200 Cc: Benjamin Kaduk , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202304191016.33JAGuR9081578@gitrepo.freebsd.org> To: Kyle Evans X-Mailer: Apple Mail (2.3731.500.231) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4Q2JV11wRRz3y31 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > On 20. Apr 2023, at 07:19, Kyle Evans wrote: >=20 > On Thu, Apr 20, 2023 at 12:13=E2=80=AFAM Benjamin Kaduk = wrote: >>=20 >> On Wed, Apr 19, 2023 at 3:16=E2=80=AFAM Michael Tuexen = wrote: >>>=20 >>> The branch main has been updated by tuexen: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D373b95976bcefe2c4b582d6707efc65b= ae23ea44 >>>=20 >>> commit 373b95976bcefe2c4b582d6707efc65bae23ea44 >>> Author: Michael Tuexen >>> AuthorDate: 2023-04-19 10:15:35 +0000 >>> Commit: Michael Tuexen >>> CommitDate: 2023-04-19 10:15:35 +0000 >>>=20 >>> netstat: document that PCB information can't be read from = corefiles >>>=20 >>=20 >>=20 >> I see only removed lines, other than the .Dd update. Is this the = intended change+commit message? >>=20 >=20 > I had the same initial reaction, but looking at the manpage it's clear > that this removes it from a couple forms of invocation where they > simply don't apply anymore. I probably would've worded the commit > message a bit differently, though. I just removed the core/kernel arguments where there are not supported anymore. For me this is documenting that. Could have said: Fix documentation that PCB information can't be read = from corefiles Best regards Michael >=20 > Thanks, >=20 > Kyle Evans From nobody Thu Apr 20 14:31: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 4Q2KpF6gMSz468By; Thu, 20 Apr 2023 14:31: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 4Q2KpF5RtNz4KNk; Thu, 20 Apr 2023 14:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682001061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EvApKkjqXVZZ4+8DdKzCj/lwRj3bWJjw20/0t+sSJ1Y=; b=RvARH1CwESGP9qFfy8Qsu+KbtHMenvXH1nQni8ee2EJPGWRTe5SWXUZShdCrs+1vbXwJY9 0QzbiqIS3rO/v2YwFdM277vnqA+0cXfSMNA4SHArNgubZNsNDPQHk+/h109xrpTi5n68aD JCvyR9FpA/E3o9tf98EkkUp4YonstMW26oZ+CbyaPMJ9BTpVVAdh2nuA0Bfki2Nf+9aolu 0VslDx0SszLyR9A2Fgthe6M5Fe91ewGaMIUSZHX8+4uoBTuONr88P7NROpZaBPWYDwn6SA 2x6gBq6CsZ5uTeFT5W+UrFWus0PfIK3mHpana+o7BwYr65bO5V2HL/xf/BZhtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682001061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EvApKkjqXVZZ4+8DdKzCj/lwRj3bWJjw20/0t+sSJ1Y=; b=X7rVynEESE2bEy+G0XdZE4kaIg3Dt8GetlSk5CNN9077UXG85yWPq8zMKuN30QxrPnWkbA Izi3IAx7/qwf1RmCdiPMb1A9BAIR5t7Un295MbJlSxomDHceCfaBJVW+ESLWnwhWcNqHAx 3OGaO7j0NqYdqCifyrIyWVloMCq2VkYfmdiI7B2wYvoPbIotvOvhVERrIuwuNG0Q112qx4 JqpHZ1zdoafzAeRTc7fjE69DHOqK7OGSNVzGO3GGlHUXsI1fS99OwbRXTjRYByr4vfVXbW 2uc4vgHDynbCkClHoasl74G5vHNvad7LzoQqHMkVi7nSZlSk9rra8CPVir86VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682001061; a=rsa-sha256; cv=none; b=AYJH1rf9pidB16PzqEFa8l5FeNPAezIjeZ8ljkI0Qop4TmE9/hshjBPqFQlb3he6dd3b5y prTn71D6HfUlSJ1/0ONKBxgfFOlQq9Xob2YAV0mU9LISI8C1EJF/qAuPhwEvcAWu2UvX6R 2ORFJb2/VRsVpIbYaEs8zt9LHTW6iTf1CUhWW/vVejonljZ4S7SqFXhBuIL9XsLybIFHbn 9dKWhaCO+gStXSZUrrzltd1jGYRPJhXTIZgsV6NXeyyC/SSwUfZfm8K6LVCWP6sL7v9c4Q rshAL5C/pZ4hQglz8GFYIbrcxQGu6Pxo2MSHMH9lQ9QosaBBxqRcTsH9bcJIVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2KpF4YtVzhJR; Thu, 20 Apr 2023 14:31: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 33KEV1ka074225; Thu, 20 Apr 2023 14:31:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KEV1tk074224; Thu, 20 Apr 2023 14:31:01 GMT (envelope-from git) Date: Thu, 20 Apr 2023 14:31:01 GMT Message-Id: <202304201431.33KEV1tk074224@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: de1dde5dfea4 - main - 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/main X-Git-Reftype: branch X-Git-Commit: de1dde5dfea4407119955a6f94528396b258db3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de1dde5dfea4407119955a6f94528396b258db3f commit de1dde5dfea4407119955a6f94528396b258db3f Author: Bjoern A. Zeeb AuthorDate: 2023-04-18 14:40:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-20 14:30:42 +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="..." MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39674 --- 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 Thu Apr 20 15:50: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 4Q2MYX1pq9z46D5W; Thu, 20 Apr 2023 15:50:08 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q2MYW5R4Jz41Y7; Thu, 20 Apr 2023 15:50:07 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 4343C3C0199; Thu, 20 Apr 2023 15:50:01 +0000 (UTC) Date: Thu, 20 Apr 2023 15:50:01 +0000 From: Brooks Davis To: Hans Petter Selasky Cc: Colin Percival , Jessica Clarke , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm. Message-ID: References: <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <3B5734C4-8630-4CD5-BA8D-DE33899161F1@freebsd.org> <2840BE79-CC25-427A-A5E9-476A38E749E3@freebsd.org> <42d63675-9b1f-70dc-a1da-fef3d43790fd@freebsd.org> <010001879ba20fa7-95ae06cc-e046-4f59-a9b7-5e2cd389d101-000000@email.amazonses.com> <1ce00b7b-e34b-a91b-59ef-c3ee9683c4a0@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 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1ce00b7b-e34b-a91b-59ef-c3ee9683c4a0@freebsd.org> X-Rspamd-Queue-Id: 4Q2MYW5R4Jz41Y7 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, Apr 20, 2023 at 08:32:54AM +0200, Hans Petter Selasky wrote: > On 4/20/23 00:28, Colin Percival wrote: > >=20 > > Quicksort with cryptographically randomized pivot selection is O(N^2) w= orst > > case but O(N log N) average-case-for-worst-case-inputs which is good en= ough > > for most purposes. > >=20 > > Quicksort with in-place median-of-medians pivot selection is O(N log N)= =20 > > worst > > case. > >=20 > > Both of them can be easily implemented with O(log N) extra space (for= =20 > > the call > > stack), and with O(1) extra space if you're insane enough to care. >=20 > Yes, I know there are different ways to mitigate O(N^2) behaviour, but=20 > there is not yet after xxx years of research a way to fully mitigate=20 > that behaviour. >=20 > What I think, there should be some statistics done in our qsort() when=20 > it goes to O(N^2), and then it could fallback to bsort() for example, to= =20 > avoid issues with malloc(). >=20 > Or maybe one round of bsort() is enough to make qsort() do its thing=20 > right. I want to investigate that. Like a hybrid. Please perform this investigation out of the tree with without exposing new symbols. For testing there is not need for this to be in libc at all as you can do most testing via LD_PRELOAD replacing qsort. There is certainly room to improve our sort implementations (we've had to replace mergesort entirely in CheriBSD due to it's terrible design that stores unaligned pointers in place of elements) and I encourage work on it, but I see little or no scope for adding more sorts in libc. -- Brooks From nobody Thu Apr 20 16: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 4Q2Mz01zQPz46FBX; Thu, 20 Apr 2023 16: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 4Q2Mz01L8Sz3C3P; Thu, 20 Apr 2023 16: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=1682006924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJLnwUsKP1sVE703UrW5P2UCBXBYWZ/I5UgJ5fhfEEs=; b=eTwPhRqYVP7WqE7m+YUS7Isc4zJ+Lwdszi4UTGebSMd0NwYXqCamLMiMdOzB6zwwypEeUD yyDojurmaZqHKhrlUvaw/1seDnxkS8+wx6sURSRzpbiPqIHQzw5L2EEWL99iSGBUq+LLvl V6CMfrYg8lqaBpimpd7sHo5Vr8l8uhD2LAqqjOnMDoBcqgSLaq4Uvg2ClYe7yPp+ihrbGh Xe2x+QKz5c99WZAMLwwpbVlqN8Stw1+M5KYDuu1dYnGT3fa1b5mJ6pIvM5aRtOk5oNfQRX Ega1FAgLvuPtpZZk/ZD1vOugkTUakzTOfO1Y3DCwuAhB1B+5RFVKB6jxQIXMMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682006924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJLnwUsKP1sVE703UrW5P2UCBXBYWZ/I5UgJ5fhfEEs=; b=S29gahygvwiXhD4NTaQVFJ7Mdj+AaQCfYWYej7mjv1r/TkU3pTFUY4SNrL5kJzmeZpTbSK U5YDBfEVc1Aen0q1a0I79w8o9Iu+Lp5eJYjIskgEHAhmA02o3lXxp8zjxyWMioqkj1MrMk vggQAHKUbjeRcFu1w0oNFVZWfD6ZKYpYsTT/Kz1lGIRBHEs0sx381fIdaxk2Fz4ObAOcfS APzYhw1KfntiIXskxyluI3GScgSovnpLwvo/C1V0W8TaquYUDuExdkPS7q5ANsIc8NYB3F kAAKLRZn3J1ui0/uSQp/6n6bCN/YDvmzgGC12oQkP252x6e2kHnG4kGNmXnV9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682006924; a=rsa-sha256; cv=none; b=cLy/5/VNpqrqe7IksVerjFFomvaRL+AXuHGkyR4PtncaSBNqhPhtdBsVw6m4LINZ1Or32y GvSYIftzHW5smvQlAVe0aOk4t6ISChke/Qfi9TZ8mgLU+ZCbpZHVmeaaUHJ5w3mgqznio5 QyIR6+qqleNoy9HZ/C4oVYKKAX+Tvk8bPvTx+8nVFXeM5yXKeNCvBErEs3sF3viSlWfngH H8Zd1uOAcCFVAYpPdkW3JBmMUPPCk6UOZNrmsJjf2jWGxM41yX4n6wcEDOOJwriTZQeFk6 zTee6ohJrYTprz3zBAlhr8/dl0YFKxG9vUFSzNJdiVNC3EeQ5g1rO9/zLq5U6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Mz007tXzkbK; Thu, 20 Apr 2023 16: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 33KG8hd1029072; Thu, 20 Apr 2023 16: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 33KG8hL6029071; Thu, 20 Apr 2023 16:08:43 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:08:43 GMT Message-Id: <202304201608.33KG8hL6029071@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: 7db7bfe1a7b9 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 7db7bfe1a7b95c1acfc7861e05ee8808d448715f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7db7bfe1a7b95c1acfc7861e05ee8808d448715f commit 7db7bfe1a7b95c1acfc7861e05ee8808d448715f Author: Bjoern A. Zeeb AuthorDate: 2023-04-20 15:57:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-20 16:07:05 +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 MFC after: 3 days --- 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 Thu Apr 20 16: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 4Q2Mz20FLDz46FkR; Thu, 20 Apr 2023 16: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 4Q2Mz13HKCz3CF8; Thu, 20 Apr 2023 16: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=1682006925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rto39X946MR4EdqjTQPmdY0oZl/ZXsyGbjpzMx/nRTo=; b=X1SkV+al8a8wPi6KvcI7KHBSaQr42HKA4Z8AkJrV/ukOQqFkNRe6o1rvnAmmqd7h9SdlXi eLoM/admchWxP1c/uNv9r3E02G9PZKHfs9KZyayppmf/03ZxhO5ci9m/KufFOWSEDYykXd EaSFYTTmwYokppl5QoVK1NE2NtC1zn7jSLxZQicxCJqHglplALWbJQ4A+UUEZasY6LISVC +1DbY4CZnNRp3wZu9Jwcfclh88iHGC78waQcIWtb9hXwVsWtwGlG0gMgpKGBesVQVKDUTL L7CEF9dor7Bn9kZmfTYCzV35z+NBf8Ielo6TzqIt5Qdc4mzBtq/T0ZORET7RMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682006925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rto39X946MR4EdqjTQPmdY0oZl/ZXsyGbjpzMx/nRTo=; b=kIHquwpavpCRqNg9i9EcM4fVFCClyz1PG/U8l3lfbOqrVTrHG44LmtK/Iafmtyg0YGytU0 KIIExLwcdNk8HEb+sE50gQ4l5hNsvjTTV8nn6Hn8nEZhWVZuyfPUtGl5HtBpiSfichQVkd inVX1NmK223nEkgKUqC08R2HVUBBFTEgrxQ14+VTfBFZEVtss/Tm0VMCI1eYupz3X61Xve Xtt6UiMQi9JqE2Gk3mi2uUvG+mAwyxt+AFJ0YKjSTBjRttDJSiR/KADaRlMmxIWQ1HVZ4u 1UKnv3H8YR7VJxmIYqs9nAzkNUmS7IqZyYznlHqDk7KJmcqz3G8Zxlgc4VfERg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682006925; a=rsa-sha256; cv=none; b=xlcgnHPn/iWn9g1Fun/vk4iHlsS7yKVE4uguN68miYky3WutYScMTzQFHiQuWbdZhcKRIJ eicVI85xQVh0sMYt2OPhEGC0IBijQokOcpVubM8ocXMuoeHVIQCwcuBQZW3Z5zJjN0dtjm umNBLzZrm88AC3BDbq35K/qv6xfN6QphAndgUmK66J5v2VfY7aZhDv2Pl0MbJyXLEn9KVB l07vIQ+uTNqROSBK/oKd00lXCl8r+syKhBelSXYo1N0UJ3WIMvk8LHHW2gYKB5zr08sh2x kyG+KnPUjHwgXiD/fvhniT931bpGag+73jqYXL9GvgsJHwDiHbFJnUMGBdyorw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Mz10yN8zk1G; Thu, 20 Apr 2023 16: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 33KG8jAr029092; Thu, 20 Apr 2023 16: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 33KG8jad029091; Thu, 20 Apr 2023 16:08:45 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:08:45 GMT Message-Id: <202304201608.33KG8jad029091@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: 35f7fa4ac1ae - main - 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/main X-Git-Reftype: branch X-Git-Commit: 35f7fa4ac1aea8af9a4f2428b3f0a346151b4071 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=35f7fa4ac1aea8af9a4f2428b3f0a346151b4071 commit 35f7fa4ac1aea8af9a4f2428b3f0a346151b4071 Author: Bjoern A. Zeeb AuthorDate: 2023-04-20 16:01:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-20 16:07:50 +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 MFC after: 3 days --- 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 Thu Apr 20 16:13: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 4Q2N4v4MHSz46Ftr; Thu, 20 Apr 2023 16:13: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 4Q2N4t6mZnz3Lnv; Thu, 20 Apr 2023 16:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682007230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cVRFTA9GR7kMZf+7NGfzMMLsc9IOT0bwnKIKNMdoQjc=; b=ZMvV5K6XmeWOzW4+M3ihYnh1OLHl6C+fytzD5yPCPMuSPMBQtrH/bAy1AvzRSA5Q6Qfsch fhHFb9PSWh4+x5IEmmz8dMELFp0MYpox0AsJiACY9PYtOVIsVGRmrqVCdD+o1H0bTVCisf tlcfwtxPmFY+mTJ+f12J7JiMoQcW+Mf1s09CR6/iUy4gK9pMHmjBeoB+4lFdSzBxwMfwyj DrdrqnObdFa6P8qypaZ2MX4aSNoZexk0w/rhY6Y9U8/oHUoMhAjf14jiqFwWoeakXl8xcf 6f/BBJzmHO2gpw1y8DqkLt8GpMTZKJFaEYrLm6xApIQ29PKM8U/UZ1V3ofhZEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682007230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cVRFTA9GR7kMZf+7NGfzMMLsc9IOT0bwnKIKNMdoQjc=; b=TzlbeTb+1GPMI+gechtA4RyhEfqaevZ1eWfFySMlV30atAazMmEQXlPCnUl8Tt1Bi1GyQQ OJB+mgfnkCiHz0liYwL5vuDD9x1uoNtGpeCjoiUjo3E0HF1eHgG25dfsMf02tcF3PXU39o NCzDfSLpH43XP6br5Gb8NYXyF3zMi9AhtQJaAnvD900xBKqHXdy3xSslDV+mMLrsh6Su20 XohpXaTIpnivwP//jaSuqu3VI2/NGU+ZlNvbHDsX3dMAISx/57WQ+T2bh2NhVg9c7yuhnM TqHoWdMOvp2wNePO3U7aV7tghEc8J7twx88Y3m3CiU3o/lwlxtunMeoyiOtAQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682007230; a=rsa-sha256; cv=none; b=MHs06GVhTtg0NcfRNwa9fJ2pGvm4B1lGFIfI4OJtFVvr2uVpEW37acE318CIXY4AM7u7km S/asJ+ENL4cg9leYZLIrxidv3q5ZKFtIMyeAhmHMZzYAABnGT61qk9SApkGqVnwV3HMx9X leCA9ReHkITVr/AwkSn4dkqy0skGvHAenhB3pxJK/pn3nHtES84GsC8SqOAmvwvwh4uYZQ ToJRyfSoi7ofw00LKkWgo/f0td6QYzWP/otI2mGTMX39kIY3B82uhPgwpkci8z9G40NTva C1WfJobZ+1xESClGLCWjNQV24ciT4KSQa6GAjF/MwLoDfiTCYOrwHMPKKHbfgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2N4t5rkrzkjy; Thu, 20 Apr 2023 16:13: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 33KGDoIT045388; Thu, 20 Apr 2023 16:13:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KGDov0045387; Thu, 20 Apr 2023 16:13:50 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:13:50 GMT Message-Id: <202304201613.33KGDov0045387@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: fdb987bebddf - main - inpcb: Split PCB hash tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: fdb987bebddf05e15a5af840379c7715a94aec1c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fdb987bebddf05e15a5af840379c7715a94aec1c commit fdb987bebddf05e15a5af840379c7715a94aec1c Author: Mark Johnston AuthorDate: 2023-04-20 15:48:01 +0000 Commit: Mark Johnston CommitDate: 2023-04-20 16:13:06 +0000 inpcb: Split PCB hash tables Currently we use a single hash table per PCB database for connected and bound PCBs. Since we started using net_epoch to synchronize hash table lookups, there's been a bug, noted in a comment above in_pcbrehash(): connecting a socket can cause an inpcb to move between hash chains, and this can cause a concurrent lookup to follow the wrong linkage pointers. I believe this could cause rare, spurious ECONNREFUSED errors in the worse case. Address the problem by introducing a second hash table and adding more linkage pointers to struct inpcb. Now the database has one table each for connected and unconnected sockets. When inserting an inpcb into the hash table, in_pcbinhash() now looks at the foreign address of the inpcb to figure out which table to use. This ensures that queue linkage pointers are stable until the socket is disconnected, so the problem described above goes away. There is also a small benefit in that in_pcblookup_*() can now search just one of the two possible hash buckets. I also made the "rehash" parameter of in(6)_pcbconnect() unused. This parameter seems confusing and it is simpler to let the inpcb code figure out what to do using the existing INP_INHASHLIST flag. UDP sockets pose a special problem since they can be connected and disconnected multiple times during their lifecycle. To handle this, the patch plugs a hole in the inpcb structure and uses it to store an SMR sequence number. When an inpcb is disconnected - an operation which requires the global PCB database hash lock - the write sequence number is advanced, and in order to reconnect, the connecting thread must wait for readers to drain before reusing the inpcb's hash chain linkage pointers. raw_ip (ab)uses the hash table without using the corresponding accessors. Since there are now two hash tables, it arbitrarily uses the "connected" table for all of its PCBs. This will be addressed in some way in the future. inp interators which specify a hash bucket will only visit connected PCBs. This is not really correct, but nothing in the tree uses that functionality except raw_ip, which as mentioned above places all of its PCBs in the "connected" table and so is unaffected. Discussed with: glebius Tested by: glebius Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D38569 --- sys/netinet/in_pcb.c | 179 ++++++++++++++++++++++++++++++++++--------------- sys/netinet/in_pcb.h | 16 +++-- sys/netinet/raw_ip.c | 6 +- sys/netinet6/in6_pcb.c | 40 +++++------ 4 files changed, 159 insertions(+), 82 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 3b8931a90262..c6c5ca4d2281 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -58,8 +58,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -510,7 +512,9 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, struct inpcbstorage *pcbstor, #endif CK_LIST_INIT(&pcbinfo->ipi_listhead); pcbinfo->ipi_count = 0; - pcbinfo->ipi_hashbase = hashinit(hash_nelements, M_PCB, + pcbinfo->ipi_hash_exact = hashinit(hash_nelements, M_PCB, + &pcbinfo->ipi_hashmask); + pcbinfo->ipi_hash_wild = hashinit(hash_nelements, M_PCB, &pcbinfo->ipi_hashmask); porthash_nelements = imin(porthash_nelements, IPPORT_MAX + 1); pcbinfo->ipi_porthashbase = hashinit(porthash_nelements, M_PCB, @@ -532,7 +536,8 @@ in_pcbinfo_destroy(struct inpcbinfo *pcbinfo) KASSERT(pcbinfo->ipi_count == 0, ("%s: ipi_count = %u", __func__, pcbinfo->ipi_count)); - hashdestroy(pcbinfo->ipi_hashbase, M_PCB, pcbinfo->ipi_hashmask); + hashdestroy(pcbinfo->ipi_hash_exact, M_PCB, pcbinfo->ipi_hashmask); + hashdestroy(pcbinfo->ipi_hash_wild, M_PCB, pcbinfo->ipi_hashmask); hashdestroy(pcbinfo->ipi_porthashbase, M_PCB, pcbinfo->ipi_porthashmask); hashdestroy(pcbinfo->ipi_lbgrouphashbase, M_PCB, @@ -630,6 +635,8 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo) #ifdef INET inp->inp_vflag |= INP_IPV4; #endif + inp->inp_smr = SMR_SEQ_INVALID; + /* * Routes in inpcb's can cache L2 as well; they are guaranteed * to be cleaned up. @@ -1010,7 +1017,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr_in *sin, in_addr_t *laddrp, */ int in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred, - bool rehash) + bool rehash __unused) { u_short lport, fport; in_addr_t laddr, faddr; @@ -1018,6 +1025,8 @@ in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred, INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); + KASSERT(in_nullhost(inp->inp_faddr), + ("%s: inp is already connected", __func__)); lport = inp->inp_lport; laddr = inp->inp_laddr.s_addr; @@ -1027,28 +1036,26 @@ in_pcbconnect(struct inpcb *inp, struct sockaddr_in *sin, struct ucred *cred, if (error) return (error); + inp->inp_faddr.s_addr = faddr; + inp->inp_fport = fport; + /* Do the initial binding of the local address if required. */ if (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0) { - KASSERT(rehash == true, - ("Rehashing required for unbound inps")); inp->inp_lport = lport; inp->inp_laddr.s_addr = laddr; if (in_pcbinshash(inp) != 0) { - inp->inp_laddr.s_addr = INADDR_ANY; - inp->inp_lport = 0; + inp->inp_laddr.s_addr = inp->inp_faddr.s_addr = + INADDR_ANY; + inp->inp_lport = inp->inp_fport = 0; return (EAGAIN); } - } - - /* Commit the remaining changes. */ - inp->inp_lport = lport; - inp->inp_laddr.s_addr = laddr; - inp->inp_faddr.s_addr = faddr; - inp->inp_fport = fport; - if (rehash) { - in_pcbrehash(inp); } else { - in_pcbinshash(inp); + inp->inp_lport = lport; + inp->inp_laddr.s_addr = laddr; + if ((inp->inp_flags & INP_INHASHLIST) != 0) + in_pcbrehash(inp); + else + in_pcbinshash(inp); } if (anonport) @@ -1402,11 +1409,16 @@ in_pcbdisconnect(struct inpcb *inp) INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); + KASSERT(inp->inp_smr == SMR_SEQ_INVALID, + ("%s: inp %p was already disconnected", __func__, inp)); + + in_pcbremhash_locked(inp); + /* See the comment in in_pcbinshash(). */ + inp->inp_smr = smr_advance(inp->inp_pcbinfo->ipi_smr); inp->inp_laddr.s_addr = INADDR_ANY; inp->inp_faddr.s_addr = INADDR_ANY; inp->inp_fport = 0; - in_pcbrehash(inp); } #endif /* INET */ @@ -1551,11 +1563,11 @@ inp_smr_lock(struct inpcb *inp, const inp_lookup_t lock) #define II_LIST_FIRST(ipi, hash) \ (((hash) == INP_ALL_LIST) ? \ CK_LIST_FIRST(&(ipi)->ipi_listhead) : \ - CK_LIST_FIRST(&(ipi)->ipi_hashbase[(hash)])) + CK_LIST_FIRST(&(ipi)->ipi_hash_exact[(hash)])) #define II_LIST_NEXT(inp, hash) \ (((hash) == INP_ALL_LIST) ? \ CK_LIST_NEXT((inp), inp_list) : \ - CK_LIST_NEXT((inp), inp_hash)) + CK_LIST_NEXT((inp), inp_hash_exact)) #define II_LOCK_ASSERT(inp, lock) \ rw_assert(&(inp)->inp_lock, \ (lock) == INPLOOKUP_RLOCKPCB ? RA_RLOCKED : RA_WLOCKED ) @@ -1996,9 +2008,9 @@ in_pcblookup_local(struct inpcbinfo *pcbinfo, struct in_addr laddr, * Look for an unconnected (wildcard foreign addr) PCB that * matches the local address and port we're looking for. */ - head = &pcbinfo->ipi_hashbase[INP_PCBHASH_WILD(lport, + head = &pcbinfo->ipi_hash_wild[INP_PCBHASH_WILD(lport, pcbinfo->ipi_hashmask)]; - CK_LIST_FOREACH(inp, head, inp_hash) { + CK_LIST_FOREACH(inp, head, inp_hash_wild) { #ifdef INET6 /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV4) == 0) @@ -2178,9 +2190,9 @@ in_pcblookup_hash_exact(struct inpcbinfo *pcbinfo, struct in_addr faddr, INP_HASH_LOCK_ASSERT(pcbinfo); match = NULL; - head = &pcbinfo->ipi_hashbase[INP_PCBHASH(&faddr, lport, fport, + head = &pcbinfo->ipi_hash_exact[INP_PCBHASH(&faddr, lport, fport, pcbinfo->ipi_hashmask)]; - CK_LIST_FOREACH(inp, head, inp_hash) { + CK_LIST_FOREACH(inp, head, inp_hash_exact) { #ifdef INET6 /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV4) == 0) @@ -2214,13 +2226,13 @@ in_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, * 3. non-jailed, non-wild. * 4. non-jailed, wild. */ - head = &pcbinfo->ipi_hashbase[INP_PCBHASH_WILD(lport, + head = &pcbinfo->ipi_hash_wild[INP_PCBHASH_WILD(lport, pcbinfo->ipi_hashmask)]; local_wild = local_exact = jail_wild = NULL; #ifdef INET6 local_wild_mapped = NULL; #endif - CK_LIST_FOREACH(inp, head, inp_hash) { + CK_LIST_FOREACH(inp, head, inp_hash_wild) { bool injail; #ifdef INET6 @@ -2368,21 +2380,31 @@ in_pcbinshash(struct inpcb *inp) struct inpcbporthead *pcbporthash; struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct inpcbport *phd; + uint32_t hash; + bool connected; INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); - KASSERT((inp->inp_flags & INP_INHASHLIST) == 0, ("in_pcbinshash: INP_INHASHLIST")); #ifdef INET6 - if (inp->inp_vflag & INP_IPV6) - pcbhash = &pcbinfo->ipi_hashbase[INP6_PCBHASH(&inp->in6p_faddr, - inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)]; - else + if (inp->inp_vflag & INP_IPV6) { + hash = INP6_PCBHASH(&inp->in6p_faddr, inp->inp_lport, + inp->inp_fport, pcbinfo->ipi_hashmask); + connected = !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr); + } else #endif - pcbhash = &pcbinfo->ipi_hashbase[INP_PCBHASH(&inp->inp_faddr, - inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)]; + { + hash = INP_PCBHASH(&inp->inp_faddr, inp->inp_lport, + inp->inp_fport, pcbinfo->ipi_hashmask); + connected = !in_nullhost(inp->inp_faddr); + } + + if (connected) + pcbhash = &pcbinfo->ipi_hash_exact[hash]; + else + pcbhash = &pcbinfo->ipi_hash_wild[hash]; pcbporthash = &pcbinfo->ipi_porthashbase[ INP_PCBPORTHASH(inp->inp_lport, pcbinfo->ipi_porthashmask)]; @@ -2421,66 +2443,117 @@ in_pcbinshash(struct inpcb *inp) } inp->inp_phd = phd; CK_LIST_INSERT_HEAD(&phd->phd_pcblist, inp, inp_portlist); - CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash); + + /* + * The PCB may have been disconnected in the past. Before we can safely + * make it visible in the hash table, we must wait for all readers which + * may be traversing this PCB to finish. + */ + if (inp->inp_smr != SMR_SEQ_INVALID) { + smr_wait(pcbinfo->ipi_smr, inp->inp_smr); + inp->inp_smr = SMR_SEQ_INVALID; + } + + if (connected) + CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_exact); + else + CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_wild); inp->inp_flags |= INP_INHASHLIST; return (0); } -static void -in_pcbremhash(struct inpcb *inp) +void +in_pcbremhash_locked(struct inpcb *inp) { struct inpcbport *phd = inp->inp_phd; INP_WLOCK_ASSERT(inp); + INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); MPASS(inp->inp_flags & INP_INHASHLIST); - INP_HASH_WLOCK(inp->inp_pcbinfo); if ((inp->inp_flags2 & INP_REUSEPORT_LB) != 0) in_pcbremlbgrouphash(inp); - CK_LIST_REMOVE(inp, inp_hash); +#ifdef INET6 + if (inp->inp_vflag & INP_IPV6) { + if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) + CK_LIST_REMOVE(inp, inp_hash_wild); + else + CK_LIST_REMOVE(inp, inp_hash_exact); + } else +#endif + { + if (in_nullhost(inp->inp_faddr)) + CK_LIST_REMOVE(inp, inp_hash_wild); + else + CK_LIST_REMOVE(inp, inp_hash_exact); + } CK_LIST_REMOVE(inp, inp_portlist); if (CK_LIST_FIRST(&phd->phd_pcblist) == NULL) { CK_LIST_REMOVE(phd, phd_hash); uma_zfree_smr(inp->inp_pcbinfo->ipi_portzone, phd); } - INP_HASH_WUNLOCK(inp->inp_pcbinfo); inp->inp_flags &= ~INP_INHASHLIST; } +static void +in_pcbremhash(struct inpcb *inp) +{ + INP_HASH_WLOCK(inp->inp_pcbinfo); + in_pcbremhash_locked(inp); + INP_HASH_WUNLOCK(inp->inp_pcbinfo); +} + /* * Move PCB to the proper hash bucket when { faddr, fport } have been * changed. NOTE: This does not handle the case of the lport changing (the * hashed port list would have to be updated as well), so the lport must * not change after in_pcbinshash() has been called. - * - * XXXGL: a race between this function and SMR-protected hash iterator - * will lead to iterator traversing a possibly wrong hash list. However, - * this race should have been here since change from rwlock to epoch. */ void in_pcbrehash(struct inpcb *inp) { struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct inpcbhead *head; + uint32_t hash; + bool connected; INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); - KASSERT(inp->inp_flags & INP_INHASHLIST, - ("in_pcbrehash: !INP_INHASHLIST")); + ("%s: !INP_INHASHLIST", __func__)); + KASSERT(inp->inp_smr == SMR_SEQ_INVALID, + ("%s: inp was disconnected", __func__)); #ifdef INET6 - if (inp->inp_vflag & INP_IPV6) - head = &pcbinfo->ipi_hashbase[INP6_PCBHASH(&inp->in6p_faddr, - inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)]; - else + if (inp->inp_vflag & INP_IPV6) { + hash = INP6_PCBHASH(&inp->in6p_faddr, inp->inp_lport, + inp->inp_fport, pcbinfo->ipi_hashmask); + connected = !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr); + } else #endif - head = &pcbinfo->ipi_hashbase[INP_PCBHASH(&inp->inp_faddr, - inp->inp_lport, inp->inp_fport, pcbinfo->ipi_hashmask)]; + { + hash = INP_PCBHASH(&inp->inp_faddr, inp->inp_lport, + inp->inp_fport, pcbinfo->ipi_hashmask); + connected = !in_nullhost(inp->inp_faddr); + } - CK_LIST_REMOVE(inp, inp_hash); - CK_LIST_INSERT_HEAD(head, inp, inp_hash); + /* + * When rehashing, the caller must ensure that either the new or the old + * foreign address was unspecified. + */ + if (connected) + CK_LIST_REMOVE(inp, inp_hash_wild); + else + CK_LIST_REMOVE(inp, inp_hash_exact); + + if (connected) { + head = &pcbinfo->ipi_hash_exact[hash]; + CK_LIST_INSERT_HEAD(head, inp, inp_hash_exact); + } else { + head = &pcbinfo->ipi_hash_wild[hash]; + CK_LIST_INSERT_HEAD(head, inp, inp_hash_wild); + } } /* diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index f8a2a311cf4e..179d706381a7 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -45,13 +45,13 @@ #include #include #include +#include #include #ifdef _KERNEL #include #include #include -#include #include #include #include @@ -215,7 +215,8 @@ struct inpcbpolicy; struct m_snd_tag; struct inpcb { /* Cache line #1 (amd64) */ - CK_LIST_ENTRY(inpcb) inp_hash; /* (w:h/r:e) hash list */ + CK_LIST_ENTRY(inpcb) inp_hash_exact; /* hash table linkage */ + CK_LIST_ENTRY(inpcb) inp_hash_wild; /* hash table linkage */ struct rwlock inp_lock; /* Cache line #2 (amd64) */ #define inp_start_zero inp_hpts @@ -261,11 +262,12 @@ struct inpcb { u_char inp_ip_p; /* (c) protocol proto */ u_char inp_ip_minttl; /* (i) minimum TTL or drop */ uint32_t inp_flowid; /* (x) flow id / queue id */ + smr_seq_t inp_smr; /* (i) sequence number at disconnect */ struct m_snd_tag *inp_snd_tag; /* (i) send tag for outgoing mbufs */ uint32_t inp_flowtype; /* (x) M_HASHTYPE value */ /* Local and foreign ports, local and foreign addr. */ - struct in_conninfo inp_inc; /* (i) list for PCB's local port */ + struct in_conninfo inp_inc; /* (i,h) list for PCB's local port */ /* MAC and IPSEC policy information. */ struct label *inp_label; /* (i) MAC label */ @@ -430,10 +432,12 @@ struct inpcbinfo { /* * Global hash of inpcbs, hashed by local and foreign addresses and - * port numbers. + * port numbers. The "exact" hash holds PCBs connected to a foreign + * address, and "wild" holds the rest. */ struct mtx ipi_hash_lock; - struct inpcbhead *ipi_hashbase; /* (r:e/w:h) */ + struct inpcbhead *ipi_hash_exact; /* (r:e/w:h) */ + struct inpcbhead *ipi_hash_wild; /* (r:e/w:h) */ u_long ipi_hashmask; /* (c) */ /* @@ -643,7 +647,6 @@ int inp_so_options(const struct inpcb *inp); #define IN6P_RTHDRDSTOPTS 0x00200000 /* receive dstoptions before rthdr */ #define IN6P_TCLASS 0x00400000 /* receive traffic class value */ #define IN6P_AUTOFLOWLABEL 0x00800000 /* attach flowlabel automatically */ -/* was INP_TIMEWAIT 0x01000000 */ #define INP_ONESBCAST 0x02000000 /* send all-ones broadcast */ #define INP_DROPPED 0x04000000 /* protocol drop flag */ #define INP_SOCKREF 0x08000000 /* strong socket reference */ @@ -760,6 +763,7 @@ void in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr, int, struct inpcb *(*)(struct inpcb *, int)); void in_pcbref(struct inpcb *); void in_pcbrehash(struct inpcb *); +void in_pcbremhash_locked(struct inpcb *); bool in_pcbrele_rlocked(struct inpcb *); bool in_pcbrele_wlocked(struct inpcb *); diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 39f40fcebff1..7fc5ca2ec712 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -166,8 +166,8 @@ rip_inshash(struct inpcb *inp) inp->inp_faddr.s_addr, pcbinfo->ipi_hashmask); } else hash = 0; - pcbhash = &pcbinfo->ipi_hashbase[hash]; - CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash); + pcbhash = &pcbinfo->ipi_hash_exact[hash]; + CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_exact); } static void @@ -177,7 +177,7 @@ rip_delhash(struct inpcb *inp) INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); INP_WLOCK_ASSERT(inp); - CK_LIST_REMOVE(inp, inp_hash); + CK_LIST_REMOVE(inp, inp_hash_exact); } #endif /* INET */ diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 81a3fd49a93d..6a5fbe93b58a 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -81,7 +81,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include @@ -398,7 +400,7 @@ in6_pcbladdr(struct inpcb *inp, struct sockaddr_in6 *sin6, */ int in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, - bool rehash) + bool rehash __unused) { struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct sockaddr_in6 laddr6; @@ -411,6 +413,8 @@ in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, ("%s: invalid address family for %p", __func__, sin6)); KASSERT(sin6->sin6_len == sizeof(*sin6), ("%s: invalid address length for %p", __func__, sin6)); + KASSERT(IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr), + ("%s: inp is already connected", __func__)); bzero(&laddr6, sizeof(laddr6)); laddr6.sin6_family = AF_INET6; @@ -440,17 +444,6 @@ in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, return (EADDRINUSE); if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (inp->inp_lport == 0) { - /* - * rehash was required to be true in the past for - * this case; retain that convention. However, - * we now call in_pcb_lport_dest rather than - * in6_pcbbind; the former does not insert into - * the hash table, the latter does. Change rehash - * to false to do the in_pcbinshash below. - */ - KASSERT(rehash == true, - ("Rehashing required for unbound inps")); - rehash = false; error = in_pcb_lport_dest(inp, (struct sockaddr *) &laddr6, &inp->inp_lport, (struct sockaddr *) sin6, sin6->sin6_port, cred, @@ -468,7 +461,7 @@ in6_pcbconnect(struct inpcb *inp, struct sockaddr_in6 *sin6, struct ucred *cred, inp->inp_flow |= (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK); - if (rehash) { + if ((inp->inp_flags & INP_INHASHLIST) != 0) { in_pcbrehash(inp); } else { in_pcbinshash(inp); @@ -483,13 +476,20 @@ in6_pcbdisconnect(struct inpcb *inp) INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); + KASSERT(inp->inp_smr == SMR_SEQ_INVALID, + ("%s: inp %p was already disconnected", __func__, inp)); + + in_pcbremhash_locked(inp); + + /* See the comment in in_pcbinshash(). */ + inp->inp_smr = smr_advance(inp->inp_pcbinfo->ipi_smr); + /* XXX-MJ torn writes are visible to SMR lookup */ memset(&inp->in6p_laddr, 0, sizeof(inp->in6p_laddr)); memset(&inp->in6p_faddr, 0, sizeof(inp->in6p_faddr)); inp->inp_fport = 0; /* clear flowinfo - draft-itojun-ipv6-flowlabel-api-00 */ inp->inp_flow &= ~IPV6_FLOWLABEL_MASK; - in_pcbrehash(inp); } struct sockaddr * @@ -712,9 +712,9 @@ in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct in6_addr *laddr, * Look for an unconnected (wildcard foreign addr) PCB that * matches the local address and port we're looking for. */ - head = &pcbinfo->ipi_hashbase[INP_PCBHASH_WILD(lport, + head = &pcbinfo->ipi_hash_wild[INP_PCBHASH_WILD(lport, pcbinfo->ipi_hashmask)]; - CK_LIST_FOREACH(inp, head, inp_hash) { + CK_LIST_FOREACH(inp, head, inp_hash_wild) { /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV6) == 0) continue; @@ -952,9 +952,9 @@ in6_pcblookup_hash_exact(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, * First look for an exact match. */ match = NULL; - head = &pcbinfo->ipi_hashbase[INP6_PCBHASH(faddr, lport, fport, + head = &pcbinfo->ipi_hash_exact[INP6_PCBHASH(faddr, lport, fport, pcbinfo->ipi_hashmask)]; - CK_LIST_FOREACH(inp, head, inp_hash) { + CK_LIST_FOREACH(inp, head, inp_hash_exact) { /* XXX inp locking */ if ((inp->inp_vflag & INP_IPV6) == 0) continue; @@ -982,10 +982,10 @@ in6_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, * 3. non-jailed, non-wild. * 4. non-jailed, wild. */ - head = &pcbinfo->ipi_hashbase[INP_PCBHASH_WILD(lport, + head = &pcbinfo->ipi_hash_wild[INP_PCBHASH_WILD(lport, pcbinfo->ipi_hashmask)]; local_wild = local_exact = jail_wild = NULL; - CK_LIST_FOREACH(inp, head, inp_hash) { + CK_LIST_FOREACH(inp, head, inp_hash_wild) { bool injail; /* XXX inp locking */ From nobody Thu Apr 20 16:13: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 4Q2N4w4hM2z46Fmm; Thu, 20 Apr 2023 16:13: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 4Q2N4w0t5Fz3Lp6; Thu, 20 Apr 2023 16:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682007232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVkx5RkqNBHEkml1BhBVdbJLZdjQ3yINxyW96Ap5N54=; b=OH2t0izzPd6fxxnNZi8Mr2UEwW8teYC4PMaFIOBXBof4CTv1vyQyVxPFMbFPteweLiFEP0 lzVIb0pAbLXJLDvDO56pfIGJ7XED5VQdLDDD0FrpNz9cCbmYqlDHfIaARR0hZR0AzLTln8 T1w0h9EMabbw9NxYG6OYgyQFm4yph4TWuvH3XlGu1+aG3SPmXz/QcZIncJ9g5jIBKWILt+ wtUkh8cXj+GI3a6y989HO/wy82oj/SKN5pVamVcPS6Kf2dca6mGR7uKKVe5+pqvi2PdlXa wfPNqngK6PTLhgRZGbz8Y3AqnhtsaYKHuVPvBkLtbcA0vQc8NRrIPVIBfttGRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682007232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVkx5RkqNBHEkml1BhBVdbJLZdjQ3yINxyW96Ap5N54=; b=hTIdQvl0uPzhyA26ueeuphCRYENqRRvMhUaaDNe3M+A7wKRKk7xiQpurHKjwd9/ToRzjRx Nxuscmje0W01pRK/P0i3HyfVn/QtzTuJ3GbSshMFWH/BgnG7fb1oTzjavvXE/CWEIBoiBP vwCVjKUm/+wPRlyvFtdlPem0C0RiUDVLWuO2UoDz98+CVUJQpxplckVWNpqaX5aHSoTVaW 27ZwnJl3I9MOk3BsWjZxX7G7XPuhDqYNWO5jVvB8s0lcaqeOG9NH/Nmyyy6t2HfQGiEhbZ oSYz0CiqD+qMONtu4WVfTg+G1NwXYldRY9kjh6e6CmgFzT/uVMG9V0G2AujJXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682007232; a=rsa-sha256; cv=none; b=ThVRDvGT+bollW41qtJNmDn+PKNFYhzcr3b3yssCl4z88wMavdGGvJI7/lrzkCsW4hQ5ms ZpwcIMN4zyWrb5ZcLMvqW75L+OtEzTrFK4tV/S6EVgYdxUD/lU24ixXDh1mitPdkaJRuRT mM+szILPClNXj0MCz2RmogFi4wbSvQHmitKG+qBMEmMYEa5uGKSv9wG/OvzT1apzuEOKGD V5mIThg6/yYPXwMogOoxfQIQwh7PqAZE8d1GOzwhrVHNcApW12DX7/FUqxhBTjvAa0DgnV NpLhy9mO895LdINYRhjGPNU5IEacZX2BuMKB7u1+PxIycAFLK85lKrN0B/vh6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2N4v726LzkgK; Thu, 20 Apr 2023 16:13: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 33KGDpF1045412; Thu, 20 Apr 2023 16:13:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KGDpiW045411; Thu, 20 Apr 2023 16:13:51 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:13:51 GMT Message-Id: <202304201613.33KGDpiW045411@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: 3e98dcb3d574 - main - inpcb: Move inpcb matching logic into separate 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e98dcb3d574af3364be350ee40105d515c6f45f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3e98dcb3d574af3364be350ee40105d515c6f45f commit 3e98dcb3d574af3364be350ee40105d515c6f45f Author: Mark Johnston AuthorDate: 2023-04-20 15:48:08 +0000 Commit: Mark Johnston CommitDate: 2023-04-20 16:13:06 +0000 inpcb: Move inpcb matching logic into separate functions These functions will get some additional callers in future revisions. No functional change intended. Discussed with: glebius Tested by: glebius Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38571 --- sys/netinet/in_pcb.c | 70 +++++++++++++++++++++++++++++++++++--------------- sys/netinet6/in6_pcb.c | 66 +++++++++++++++++++++++++++++++++-------------- 2 files changed, 96 insertions(+), 40 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index c6c5ca4d2281..e301c307a413 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2180,31 +2180,63 @@ out: grp->il_inpcnt]); } +static bool +in_pcblookup_exact_match(const struct inpcb *inp, struct in_addr faddr, + u_short fport, struct in_addr laddr, u_short lport) +{ +#ifdef INET6 + /* XXX inp locking */ + if ((inp->inp_vflag & INP_IPV4) == 0) + return (false); +#endif + if (inp->inp_faddr.s_addr == faddr.s_addr && + inp->inp_laddr.s_addr == laddr.s_addr && + inp->inp_fport == fport && + inp->inp_lport == lport) + return (true); + return (false); +} + static struct inpcb * in_pcblookup_hash_exact(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_short fport, struct in_addr laddr, u_short lport) { struct inpcbhead *head; - struct inpcb *inp, *match; + struct inpcb *inp; INP_HASH_LOCK_ASSERT(pcbinfo); - match = NULL; head = &pcbinfo->ipi_hash_exact[INP_PCBHASH(&faddr, lport, fport, pcbinfo->ipi_hashmask)]; CK_LIST_FOREACH(inp, head, inp_hash_exact) { -#ifdef INET6 - /* XXX inp locking */ - if ((inp->inp_vflag & INP_IPV4) == 0) - continue; -#endif - if (inp->inp_faddr.s_addr == faddr.s_addr && - inp->inp_laddr.s_addr == laddr.s_addr && - inp->inp_fport == fport && - inp->inp_lport == lport) + if (in_pcblookup_exact_match(inp, faddr, fport, laddr, lport)) return (inp); } - return (match); + return (NULL); +} + +typedef enum { + INPLOOKUP_MATCH_NONE = 0, + INPLOOKUP_MATCH_WILD = 1, + INPLOOKUP_MATCH_LADDR = 2, +} inp_lookup_match_t; + +static inp_lookup_match_t +in_pcblookup_wild_match(const struct inpcb *inp, struct in_addr laddr, + u_short lport) +{ +#ifdef INET6 + /* XXX inp locking */ + if ((inp->inp_vflag & INP_IPV4) == 0) + return (INPLOOKUP_MATCH_NONE); +#endif + if (inp->inp_faddr.s_addr != INADDR_ANY || inp->inp_lport != lport) + return (INPLOOKUP_MATCH_NONE); + if (inp->inp_laddr.s_addr == INADDR_ANY) + return (INPLOOKUP_MATCH_WILD); + if (inp->inp_laddr.s_addr == laddr.s_addr) + return (INPLOOKUP_MATCH_LADDR); + return (INPLOOKUP_MATCH_NONE); } static struct inpcb * @@ -2233,15 +2265,11 @@ in_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, local_wild_mapped = NULL; #endif CK_LIST_FOREACH(inp, head, inp_hash_wild) { + inp_lookup_match_t match; bool injail; -#ifdef INET6 - /* XXX inp locking */ - if ((inp->inp_vflag & INP_IPV4) == 0) - continue; -#endif - if (inp->inp_faddr.s_addr != INADDR_ANY || - inp->inp_lport != lport) + match = in_pcblookup_wild_match(inp, laddr, lport); + if (match == INPLOOKUP_MATCH_NONE) continue; injail = prison_flag(inp->inp_cred, PR_IP4) != 0; @@ -2254,11 +2282,11 @@ in_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, continue; } - if (inp->inp_laddr.s_addr == laddr.s_addr) { + if (match == INPLOOKUP_MATCH_LADDR) { if (injail) return (inp); local_exact = inp; - } else if (inp->inp_laddr.s_addr == INADDR_ANY) { + } else { #ifdef INET6 /* XXX inp locking, NULL check */ if (inp->inp_vflag & INP_IPV6PROTO) diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 6a5fbe93b58a..508d264809e3 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -939,32 +939,62 @@ out: grp->il_inpcnt]); } +static bool +in6_pcblookup_exact_match(const struct inpcb *inp, const struct in6_addr *faddr, + u_short fport, const struct in6_addr *laddr, u_short lport) +{ + /* XXX inp locking */ + if ((inp->inp_vflag & INP_IPV6) == 0) + return (false); + if (IN6_ARE_ADDR_EQUAL(&inp->in6p_faddr, faddr) && + IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) && + inp->inp_fport == fport && inp->inp_lport == lport) + return (true); + return (false); +} + static struct inpcb * in6_pcblookup_hash_exact(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, u_short fport, struct in6_addr *laddr, u_short lport) { struct inpcbhead *head; - struct inpcb *inp, *match; + struct inpcb *inp; INP_HASH_LOCK_ASSERT(pcbinfo); /* * First look for an exact match. */ - match = NULL; head = &pcbinfo->ipi_hash_exact[INP6_PCBHASH(faddr, lport, fport, pcbinfo->ipi_hashmask)]; CK_LIST_FOREACH(inp, head, inp_hash_exact) { - /* XXX inp locking */ - if ((inp->inp_vflag & INP_IPV6) == 0) - continue; - if (IN6_ARE_ADDR_EQUAL(&inp->in6p_faddr, faddr) && - IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr) && - inp->inp_fport == fport && - inp->inp_lport == lport) + if (in6_pcblookup_exact_match(inp, faddr, fport, laddr, lport)) return (inp); } - return (match); + return (NULL); +} + +typedef enum { + INPLOOKUP_MATCH_NONE = 0, + INPLOOKUP_MATCH_WILD = 1, + INPLOOKUP_MATCH_LADDR = 2, +} inp_lookup_match_t; + +static inp_lookup_match_t +in6_pcblookup_wild_match(const struct inpcb *inp, const struct in6_addr *laddr, + u_short lport) +{ + /* XXX inp locking */ + if ((inp->inp_vflag & INP_IPV6) == 0) + return (INPLOOKUP_MATCH_NONE); + if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) || + inp->inp_lport != lport) + return (INPLOOKUP_MATCH_NONE); + if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) + return (INPLOOKUP_MATCH_WILD); + if (IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr)) + return (INPLOOKUP_MATCH_LADDR); + return (INPLOOKUP_MATCH_NONE); } static struct inpcb * @@ -975,6 +1005,8 @@ in6_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, struct inpcbhead *head; struct inpcb *inp, *jail_wild, *local_exact, *local_wild; + INP_HASH_LOCK_ASSERT(pcbinfo); + /* * Order of socket selection - we always prefer jails. * 1. jailed, non-wild. @@ -986,17 +1018,13 @@ in6_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, pcbinfo->ipi_hashmask)]; local_wild = local_exact = jail_wild = NULL; CK_LIST_FOREACH(inp, head, inp_hash_wild) { + inp_lookup_match_t match; bool injail; - /* XXX inp locking */ - if ((inp->inp_vflag & INP_IPV6) == 0) + match = in6_pcblookup_wild_match(inp, laddr, lport); + if (match == INPLOOKUP_MATCH_NONE) continue; - if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) || - inp->inp_lport != lport) { - continue; - } - injail = prison_flag(inp->inp_cred, PR_IP6) != 0; if (injail) { if (prison_check_ip6_locked( @@ -1007,12 +1035,12 @@ in6_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, continue; } - if (IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, laddr)) { + if (match == INPLOOKUP_MATCH_LADDR) { if (injail) return (inp); else local_exact = inp; - } else if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { + } else { if (injail) jail_wild = inp; else From nobody Thu Apr 20 16:13: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 4Q2N4x6F48z46G4r; Thu, 20 Apr 2023 16:13: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 4Q2N4x1KBnz3LjJ; Thu, 20 Apr 2023 16:13:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682007233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/H0vajVbGely3P3NNDrFzGrr/JeavRdTrkQf+FZe7I=; b=eHzTqho9vNIu0MGlAiw8PN3pbQ1K0KpYjUdba0UYJggkmgmQcoZEDWEDwpMNa5wB4gtpEm BTC0JyPVVVwq0rsFB8pN5zeaSGaOr2t8VI1JDmYxy6Vc67p+eeWHU8ZS6js/KVe9LH3hCF qWNdeaBido9wxsgIXjrX3uRd3c1i934NKGvyLRN+Cp4ftdyZv7Ks2SmSxcyJAzVl/5sIJr 5ITv1Km7ohYAQW/2uS/b9pM96TVcrmDzF0u0W9ovcd0vH3AXBHpOKU67vyakz0Qj4Jd0Bb NZWr9wo0XJ0IlWt9R0uSjm4tNMOw1rOe07zDQm5z1F8R8Qi0nhhKC296dpfe3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682007233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/H0vajVbGely3P3NNDrFzGrr/JeavRdTrkQf+FZe7I=; b=P86us2Lnoy86DHJndCwsi5u0fYOrczHEe40KCtANRA/uqL+kXVl6gzlr7RBYQe6zLC5Veo IuwcSnmpuGp4YJ/m0dccSjXJxi+7qrkIOtpKzbaTiZz55NaXU9A2sl2J90EENBLP9yHisH gy91D/Uy5OqoMc9XjaCrOtq+FCXS/LysW1JAsZR0dGWmYSkd81Hoia61V1tAn1tRk7GhQG XJ59e37bXFSAHjo+JUDp/Ozh8UvjQJkzVK/rDIq2Vg2R4irru4bzAmw1+iSBGDI/Q8sqOk Zs15rjFN4CFXFMkdR9JMtXXJJcxAFxjSpYyQQpNzk+s5o0REfIyV27kUBz8VeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682007233; a=rsa-sha256; cv=none; b=m2qCS+gb6xZ0yXjt6S/2q+VrJtJGQDK/qeBvOJHAwCT9bq+ESdf8W/j1eu7arNO7b++PV2 QeCscmznd5g3OXaBDL04NTEeiQxBBxoDG+H816QsmvxhIcLMSFhl4ztWuh+a5R7Svl73wW nPqRUoOa82LYpAqgWXOYPBjBTndlru4JQ7rHl1RM//Lf1QZZtNiunm26KHt+7DjvBbs3+R jCe8mmZZFBw+04J4aHID+nBCPTuwLwsCiWHuq0j9KJD17heH6Aqcuc2fwmmhqG06iLszOw zP5CjlGOZysIeElA+vP6FhlOFwA4q/W4xjAuZS/FBpWGjNniBll9t8ZaDxE90Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2N4x0MHQzkk0; Thu, 20 Apr 2023 16:13: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 33KGDqPI045440; Thu, 20 Apr 2023 16:13:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KGDqRF045439; Thu, 20 Apr 2023 16:13:52 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:13:52 GMT Message-Id: <202304201613.33KGDqRF045439@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: 7b92493ab1d4 - main - inpcb: Avoid inp_cred dereferences in SMR-protected 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b92493ab1d464263ccdf4494b187edbe19864dc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7b92493ab1d464263ccdf4494b187edbe19864dc commit 7b92493ab1d464263ccdf4494b187edbe19864dc Author: Mark Johnston AuthorDate: 2023-04-20 15:48:19 +0000 Commit: Mark Johnston CommitDate: 2023-04-20 16:13:06 +0000 inpcb: Avoid inp_cred dereferences in SMR-protected lookup The SMR-protected inpcb lookup algorithm currently has to check whether a matching inpcb belongs to a jail, in order to prioritize jailed bound sockets. To do this it has to maintain a ucred reference, and for this to be safe, the reference can't be released until the UMA destructor is called, and this will not happen within any bounded time period. Changing SMR to periodically recycle garbage is not trivial. Instead, let's implement SMR-synchronized lookup without needing to dereference inp_cred. This will allow the inpcb code to free the inp_cred reference immediately when a PCB is freed, ensuring that ucred (and thus jail) references are released promptly. Commit 220d89212943 ("inpcb: immediately return matching pcb on lookup") gets us part of the way there. This patch goes further to handle lookups of unconnected sockets. Here, the strategy is to maintain a well-defined order of items within a hash chain so that a wild lookup can simply return the first match and preserve existing semantics. This makes insertion of listening sockets more complicated in order to make lookup simpler, which seems like the right tradeoff anyway given that bind() is already a fairly expensive operation and lookups are more common. In particular, when inserting an unconnected socket, in_pcbinhash() now keeps the following ordering: - jailed sockets before non-jailed sockets, - specified local addresses before unspecified local addresses. Most of the change adds a separate SMR-based lookup path for inpcb hash lookups. When a match is found, we try to lock the inpcb and re-validate its connection info. In the common case, this works well and we can simply return the inpcb. If this fails, typically because something is concurrently modifying the inpcb, we go to the slow path, which performs a serialized lookup. Note, I did not touch lbgroup lookup, since there the credential reference is formally synchronized by net_epoch, not SMR. In particular, lbgroups are rarely allocated or freed. I think it is possible to simplify in_pcblookup_hash_wild_locked() now, but I didn't do it in this patch. Discussed with: glebius Tested by: glebius Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D38572 --- sys/netinet/in_pcb.c | 256 ++++++++++++++++++++++++++++++++++++++++++----- sys/netinet/in_pcb.h | 1 + sys/netinet/in_pcb_var.h | 3 + sys/netinet6/in6_pcb.c | 125 ++++++++++++++++++++--- sys/netinet6/in6_pcb.h | 5 +- 5 files changed, 351 insertions(+), 39 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index e301c307a413..ea36d684a82b 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -222,7 +222,6 @@ SYSCTL_COUNTER_U64(_net_inet_ip_rl, OID_AUTO, newrl, CTLFLAG_RD, &rate_limit_new, "Total Rate limit new attempts"); SYSCTL_COUNTER_U64(_net_inet_ip_rl, OID_AUTO, chgrl, CTLFLAG_RD, &rate_limit_chg, "Total Rate limited change attempts"); - #endif /* RATELIMIT */ #endif /* INET */ @@ -1450,7 +1449,7 @@ in_pcbdetach(struct inpcb *inp) * here because SMR is a critical section. * In 99%+ cases inp_smr_lock() would obtain the lock immediately. */ -static inline void +void inp_lock(struct inpcb *inp, const inp_lookup_t lock) { @@ -1458,7 +1457,7 @@ inp_lock(struct inpcb *inp, const inp_lookup_t lock) rw_rlock(&inp->inp_lock) : rw_wlock(&inp->inp_lock); } -static inline void +void inp_unlock(struct inpcb *inp, const inp_lookup_t lock) { @@ -1466,7 +1465,7 @@ inp_unlock(struct inpcb *inp, const inp_lookup_t lock) rw_runlock(&inp->inp_lock) : rw_wunlock(&inp->inp_lock); } -static inline int +int inp_trylock(struct inpcb *inp, const inp_lookup_t lock) { @@ -1474,14 +1473,6 @@ inp_trylock(struct inpcb *inp, const inp_lookup_t lock) rw_try_rlock(&inp->inp_lock) : rw_try_wlock(&inp->inp_lock)); } -static inline bool -in_pcbrele(struct inpcb *inp, const inp_lookup_t lock) -{ - - return (lock == INPLOOKUP_RLOCKPCB ? - in_pcbrele_rlocked(inp) : in_pcbrele_wlocked(inp)); -} - static inline bool _inp_smr_lock(struct inpcb *inp, const inp_lookup_t lock, const int ignflags) { @@ -1725,6 +1716,14 @@ in_pcbrele_wlocked(struct inpcb *inp) return (true); } +bool +in_pcbrele(struct inpcb *inp, const inp_lookup_t lock) +{ + + return (lock == INPLOOKUP_RLOCKPCB ? + in_pcbrele_rlocked(inp) : in_pcbrele_wlocked(inp)); +} + /* * Unconditionally schedule an inpcb to be freed by decrementing its * reference count, which should occur only after the inpcb has been detached @@ -2239,6 +2238,44 @@ in_pcblookup_wild_match(const struct inpcb *inp, struct in_addr laddr, return (INPLOOKUP_MATCH_NONE); } +#define INP_LOOKUP_AGAIN ((struct inpcb *)(uintptr_t)-1) + +static struct inpcb * +in_pcblookup_hash_wild_smr(struct inpcbinfo *pcbinfo, struct in_addr faddr, + u_short fport, struct in_addr laddr, u_short lport, + const inp_lookup_t lockflags) +{ + struct inpcbhead *head; + struct inpcb *inp; + + KASSERT(SMR_ENTERED(pcbinfo->ipi_smr), + ("%s: not in SMR read section", __func__)); + + head = &pcbinfo->ipi_hash_wild[INP_PCBHASH_WILD(lport, + pcbinfo->ipi_hashmask)]; + CK_LIST_FOREACH(inp, head, inp_hash_wild) { + inp_lookup_match_t match; + + match = in_pcblookup_wild_match(inp, laddr, lport); + if (match == INPLOOKUP_MATCH_NONE) + continue; + + if (__predict_true(inp_smr_lock(inp, lockflags))) { + if (__predict_true(in_pcblookup_wild_match(inp, laddr, + lport) != INPLOOKUP_MATCH_NONE)) + return (inp); + inp_unlock(inp, lockflags); + } + + /* + * The matching socket disappeared out from under us. Fall back + * to a serialized lookup. + */ + return (INP_LOOKUP_AGAIN); + } + return (NULL); +} + static struct inpcb * in_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_short fport, struct in_addr laddr, u_short lport) @@ -2332,15 +2369,15 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, ("%s: invalid foreign address", __func__)); KASSERT(laddr.s_addr != INADDR_ANY, ("%s: invalid local address", __func__)); - INP_HASH_LOCK_ASSERT(pcbinfo); + INP_HASH_WLOCK_ASSERT(pcbinfo); inp = in_pcblookup_hash_exact(pcbinfo, faddr, fport, laddr, lport); if (inp != NULL) return (inp); if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { - inp = in_pcblookup_lbgroup(pcbinfo, &faddr, fport, &laddr, - lport, numa_domain); + inp = in_pcblookup_lbgroup(pcbinfo, &faddr, fport, + &laddr, lport, numa_domain); if (inp == NULL) { inp = in_pcblookup_hash_wild_locked(pcbinfo, faddr, fport, laddr, lport); @@ -2351,11 +2388,40 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, } static struct inpcb * -in_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in_addr faddr, +in_pcblookup_hash(struct inpcbinfo *pcbinfo, struct in_addr faddr, u_int fport, struct in_addr laddr, u_int lport, int lookupflags, uint8_t numa_domain) { struct inpcb *inp; + const inp_lookup_t lockflags = lookupflags & INPLOOKUP_LOCKMASK; + + KASSERT((lookupflags & (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)) != 0, + ("%s: LOCKPCB not set", __func__)); + + INP_HASH_WLOCK(pcbinfo); + inp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, + lookupflags & ~INPLOOKUP_LOCKMASK, numa_domain); + if (inp != NULL && !inp_trylock(inp, lockflags)) { + in_pcbref(inp); + INP_HASH_WUNLOCK(pcbinfo); + inp_lock(inp, lockflags); + if (in_pcbrele(inp, lockflags)) + /* XXX-MJ or retry until we get a negative match? */ + inp = NULL; + } else { + INP_HASH_WUNLOCK(pcbinfo); + } + return (inp); +} + +static struct inpcb * +in_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in_addr faddr, + u_int fport_arg, struct in_addr laddr, u_int lport_arg, int lookupflags, + uint8_t numa_domain) +{ + struct inpcb *inp; + const inp_lookup_t lockflags = lookupflags & INPLOOKUP_LOCKMASK; + const u_short fport = fport_arg, lport = lport_arg; KASSERT((lookupflags & ~INPLOOKUP_MASK) == 0, ("%s: invalid lookup flags %d", __func__, lookupflags)); @@ -2363,13 +2429,49 @@ in_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in_addr faddr, ("%s: LOCKPCB not set", __func__)); smr_enter(pcbinfo->ipi_smr); - inp = in_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, - lookupflags & INPLOOKUP_WILDCARD, numa_domain); + inp = in_pcblookup_hash_exact(pcbinfo, faddr, fport, laddr, lport); if (inp != NULL) { - if (__predict_false(inp_smr_lock(inp, - (lookupflags & INPLOOKUP_LOCKMASK)) == false)) - inp = NULL; - } else + if (__predict_true(inp_smr_lock(inp, lockflags))) { + /* + * Revalidate the 4-tuple, the socket could have been + * disconnected. + */ + if (__predict_true(in_pcblookup_exact_match(inp, + faddr, fport, laddr, lport))) + return (inp); + inp_unlock(inp, lockflags); + } + + /* + * We failed to lock the inpcb, or its connection state changed + * out from under us. Fall back to a precise search. + */ + return (in_pcblookup_hash(pcbinfo, faddr, fport, laddr, lport, + lookupflags, numa_domain)); + } + + if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { + inp = in_pcblookup_lbgroup(pcbinfo, &faddr, fport, + &laddr, lport, numa_domain); + if (inp != NULL) { + if (__predict_true(inp_smr_lock(inp, lockflags))) { + if (__predict_true(in_pcblookup_wild_match(inp, + laddr, lport) != INPLOOKUP_MATCH_NONE)) + return (inp); + inp_unlock(inp, lockflags); + } + inp = INP_LOOKUP_AGAIN; + } else { + inp = in_pcblookup_hash_wild_smr(pcbinfo, faddr, fport, + laddr, lport, lockflags); + } + if (inp == INP_LOOKUP_AGAIN) { + return (in_pcblookup_hash(pcbinfo, faddr, fport, laddr, + lport, lookupflags, numa_domain)); + } + } + + if (inp == NULL) smr_exit(pcbinfo->ipi_smr); return (inp); @@ -2398,6 +2500,106 @@ in_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in_addr faddr, } #endif /* INET */ +static bool +in_pcbjailed(const struct inpcb *inp, unsigned int flag) +{ + return (prison_flag(inp->inp_cred, flag) != 0); +} + +/* + * Insert the PCB into a hash chain using ordering rules which ensure that + * in_pcblookup_hash_wild_*() always encounter the highest-ranking PCB first. + * + * Specifically, keep jailed PCBs in front of non-jailed PCBs, and keep PCBs + * with exact local addresses ahead of wildcard PCBs. + */ +static void +_in_pcbinshash_wild(struct inpcbhead *pcbhash, struct inpcb *inp) +{ + struct inpcb *last; + bool bound, injail; + + INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); + + last = NULL; + bound = inp->inp_laddr.s_addr != INADDR_ANY; + injail = in_pcbjailed(inp, PR_IP4); + if (!injail) { + CK_LIST_FOREACH(last, pcbhash, inp_hash_wild) { + if (in_pcbjailed(inp, PR_IP4)) + break; + if (CK_LIST_NEXT(last, inp_hash_wild) == NULL) { + CK_LIST_INSERT_AFTER(last, inp, inp_hash_wild); + return; + } + } + } else if (!CK_LIST_EMPTY(pcbhash) && + !in_pcbjailed(CK_LIST_FIRST(pcbhash), PR_IP4)) { + CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_wild); + return; + } + if (!bound) { + CK_LIST_FOREACH_FROM(last, pcbhash, inp_hash_wild) { + if (last->inp_laddr.s_addr == INADDR_ANY) + break; + if (CK_LIST_NEXT(last, inp_hash_wild) == NULL) { + CK_LIST_INSERT_AFTER(last, inp, inp_hash_wild); + return; + } + } + } + if (last == NULL) + CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_wild); + else + CK_LIST_INSERT_BEFORE(last, inp, inp_hash_wild); +} + +#ifdef INET6 +/* + * See the comment above _in_pcbinshash_wild(). + */ +static void +_in6_pcbinshash_wild(struct inpcbhead *pcbhash, struct inpcb *inp) +{ + struct inpcb *last; + bool bound, injail; + + INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); + + last = NULL; + bound = !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr); + injail = in_pcbjailed(inp, PR_IP6); + if (!injail) { + CK_LIST_FOREACH(last, pcbhash, inp_hash_wild) { + if (in_pcbjailed(last, PR_IP6)) + break; + if (CK_LIST_NEXT(last, inp_hash_wild) == NULL) { + CK_LIST_INSERT_AFTER(last, inp, inp_hash_wild); + return; + } + } + } else if (!CK_LIST_EMPTY(pcbhash) && + !in_pcbjailed(CK_LIST_FIRST(pcbhash), PR_IP6)) { + CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_wild); + return; + } + if (!bound) { + CK_LIST_FOREACH_FROM(last, pcbhash, inp_hash_wild) { + if (IN6_IS_ADDR_UNSPECIFIED(&last->in6p_laddr)) + break; + if (CK_LIST_NEXT(last, inp_hash_wild) == NULL) { + CK_LIST_INSERT_AFTER(last, inp, inp_hash_wild); + return; + } + } + } + if (last == NULL) + CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_wild); + else + CK_LIST_INSERT_BEFORE(last, inp, inp_hash_wild); +} +#endif + /* * Insert PCB onto various hash lists. */ @@ -2484,8 +2686,14 @@ in_pcbinshash(struct inpcb *inp) if (connected) CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_exact); - else - CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash_wild); + else { +#ifdef INET6 + if ((inp->inp_vflag & INP_IPV6) != 0) + _in6_pcbinshash_wild(pcbhash, inp); + else +#endif + _in_pcbinshash_wild(pcbhash, inp); + } inp->inp_flags |= INP_INHASHLIST; return (0); diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 179d706381a7..984cb9e26561 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -764,6 +764,7 @@ void in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr, void in_pcbref(struct inpcb *); void in_pcbrehash(struct inpcb *); void in_pcbremhash_locked(struct inpcb *); +bool in_pcbrele(struct inpcb *, inp_lookup_t); bool in_pcbrele_rlocked(struct inpcb *); bool in_pcbrele_wlocked(struct inpcb *); diff --git a/sys/netinet/in_pcb_var.h b/sys/netinet/in_pcb_var.h index 31214b6092f3..51fae58ea6a7 100644 --- a/sys/netinet/in_pcb_var.h +++ b/sys/netinet/in_pcb_var.h @@ -47,6 +47,9 @@ VNET_DECLARE(uint32_t, in_pcbhashseed); #define V_in_pcbhashseed VNET(in_pcbhashseed) +void inp_lock(struct inpcb *inp, const inp_lookup_t lock); +void inp_unlock(struct inpcb *inp, const inp_lookup_t lock); +int inp_trylock(struct inpcb *inp, const inp_lookup_t lock); bool inp_smr_lock(struct inpcb *, const inp_lookup_t); int in_pcb_lport(struct inpcb *, struct in_addr *, u_short *, struct ucred *, int); diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 508d264809e3..da7ed5ca79e0 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -954,8 +954,9 @@ in6_pcblookup_exact_match(const struct inpcb *inp, const struct in6_addr *faddr, } static struct inpcb * -in6_pcblookup_hash_exact(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_short fport, struct in6_addr *laddr, u_short lport) +in6_pcblookup_hash_exact(struct inpcbinfo *pcbinfo, + const struct in6_addr *faddr, u_short fport, + const struct in6_addr *laddr, u_short lport) { struct inpcbhead *head; struct inpcb *inp; @@ -997,9 +998,47 @@ in6_pcblookup_wild_match(const struct inpcb *inp, const struct in6_addr *laddr, return (INPLOOKUP_MATCH_NONE); } +#define INP_LOOKUP_AGAIN ((struct inpcb *)(uintptr_t)-1) + +static struct inpcb * +in6_pcblookup_hash_wild_smr(struct inpcbinfo *pcbinfo, + const struct in6_addr *faddr, u_short fport, const struct in6_addr *laddr, + u_short lport, const inp_lookup_t lockflags) +{ + struct inpcbhead *head; + struct inpcb *inp; + + KASSERT(SMR_ENTERED(pcbinfo->ipi_smr), + ("%s: not in SMR read section", __func__)); + + head = &pcbinfo->ipi_hash_wild[INP_PCBHASH_WILD(lport, + pcbinfo->ipi_hashmask)]; + CK_LIST_FOREACH(inp, head, inp_hash_wild) { + inp_lookup_match_t match; + + match = in6_pcblookup_wild_match(inp, laddr, lport); + if (match == INPLOOKUP_MATCH_NONE) + continue; + + if (__predict_true(inp_smr_lock(inp, lockflags))) { + if (__predict_true(in6_pcblookup_wild_match(inp, laddr, + lport) != INPLOOKUP_MATCH_NONE)) + return (inp); + inp_unlock(inp, lockflags); + } + + /* + * The matching socket disappeared out from under us. Fall back + * to a serialized lookup. + */ + return (INP_LOOKUP_AGAIN); + } + return (NULL); +} + static struct inpcb * in6_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, - struct in6_addr *faddr, u_short fport, struct in6_addr *laddr, + const struct in6_addr *faddr, u_short fport, const struct in6_addr *laddr, u_short lport) { struct inpcbhead *head; @@ -1058,8 +1097,9 @@ in6_pcblookup_hash_wild_locked(struct inpcbinfo *pcbinfo, } struct inpcb * -in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, +in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, + const struct in6_addr *faddr, u_int fport_arg, + const struct in6_addr *laddr, u_int lport_arg, int lookupflags, uint8_t numa_domain) { struct inpcb *inp; @@ -1071,7 +1111,6 @@ in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, ("%s: invalid foreign address", __func__)); KASSERT(!IN6_IS_ADDR_UNSPECIFIED(laddr), ("%s: invalid local address", __func__)); - INP_HASH_LOCK_ASSERT(pcbinfo); inp = in6_pcblookup_hash_exact(pcbinfo, faddr, fport, laddr, lport); @@ -1089,12 +1128,41 @@ in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, return (inp); } +static struct inpcb * +in6_pcblookup_hash(struct inpcbinfo *pcbinfo, const struct in6_addr *faddr, + u_int fport, const struct in6_addr *laddr, u_int lport, int lookupflags, + uint8_t numa_domain) +{ + struct inpcb *inp; + const inp_lookup_t lockflags = lookupflags & INPLOOKUP_LOCKMASK; + + KASSERT((lookupflags & (INPLOOKUP_RLOCKPCB | INPLOOKUP_WLOCKPCB)) != 0, + ("%s: LOCKPCB not set", __func__)); + + INP_HASH_WLOCK(pcbinfo); + inp = in6_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, + lookupflags & ~INPLOOKUP_LOCKMASK, numa_domain); + if (inp != NULL && !inp_trylock(inp, lockflags)) { + in_pcbref(inp); + INP_HASH_WUNLOCK(pcbinfo); + inp_lock(inp, lockflags); + if (in_pcbrele(inp, lockflags)) + /* XXX-MJ or retry until we get a negative match? */ + inp = NULL; + } else { + INP_HASH_WUNLOCK(pcbinfo); + } + return (inp); +} + static struct inpcb * in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, - u_int fport, struct in6_addr *laddr, u_int lport, int lookupflags, + u_int fport_arg, struct in6_addr *laddr, u_int lport_arg, int lookupflags, uint8_t numa_domain) { struct inpcb *inp; + const inp_lookup_t lockflags = lookupflags & INPLOOKUP_LOCKMASK; + const u_short fport = fport_arg, lport = lport_arg; KASSERT((lookupflags & ~INPLOOKUP_MASK) == 0, ("%s: invalid lookup flags %d", __func__, lookupflags)); @@ -1102,13 +1170,44 @@ in6_pcblookup_hash_smr(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, ("%s: LOCKPCB not set", __func__)); smr_enter(pcbinfo->ipi_smr); - inp = in6_pcblookup_hash_locked(pcbinfo, faddr, fport, laddr, lport, - lookupflags & INPLOOKUP_WILDCARD, numa_domain); + inp = in6_pcblookup_hash_exact(pcbinfo, faddr, fport, laddr, lport); if (inp != NULL) { - if (__predict_false(inp_smr_lock(inp, - (lookupflags & INPLOOKUP_LOCKMASK)) == false)) - inp = NULL; - } else + if (__predict_true(inp_smr_lock(inp, lockflags))) { + if (__predict_true(in6_pcblookup_exact_match(inp, + faddr, fport, laddr, lport))) + return (inp); + inp_unlock(inp, lockflags); + } + /* + * We failed to lock the inpcb, or its connection state changed + * out from under us. Fall back to a precise search. + */ + return (in6_pcblookup_hash(pcbinfo, faddr, fport, laddr, lport, + lookupflags, numa_domain)); + } + + if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { + inp = in6_pcblookup_lbgroup(pcbinfo, faddr, fport, + laddr, lport, numa_domain); + if (inp != NULL) { + if (__predict_true(inp_smr_lock(inp, lockflags))) { + if (__predict_true(in6_pcblookup_wild_match(inp, + laddr, lport) != INPLOOKUP_MATCH_NONE)) + return (inp); + inp_unlock(inp, lockflags); + } + inp = INP_LOOKUP_AGAIN; + } else { + inp = in6_pcblookup_hash_wild_smr(pcbinfo, faddr, fport, + laddr, lport, lockflags); + } + if (inp == INP_LOOKUP_AGAIN) { + return (in6_pcblookup_hash(pcbinfo, faddr, fport, laddr, + lport, lookupflags, numa_domain)); + } + } + + if (inp == NULL) smr_exit(pcbinfo->ipi_smr); return (inp); diff --git a/sys/netinet6/in6_pcb.h b/sys/netinet6/in6_pcb.h index 91131d1968bc..92cec00bce3b 100644 --- a/sys/netinet6/in6_pcb.h +++ b/sys/netinet6/in6_pcb.h @@ -83,8 +83,9 @@ struct inpcb * struct ucred *); struct inpcb * in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, - struct in6_addr *faddr, u_int fport_arg, struct in6_addr *laddr, - u_int lport_arg, int lookupflags, uint8_t); + const struct in6_addr *faddr, u_int fport_arg, + const struct in6_addr *laddr, u_int lport_arg, + int lookupflags, uint8_t); struct inpcb * in6_pcblookup(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int, From nobody Thu Apr 20 16:13: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 4Q2N4y4qPtz46Fjy; Thu, 20 Apr 2023 16:13: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 4Q2N4y2m7tz3Lfw; Thu, 20 Apr 2023 16:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682007234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E4S2iHAnO6GAALcxsS3M/+hzR4sGUgQ6EYrmOoh96og=; b=MDJvwdHLdZipNNkGW3yIoFV5FCIRc5uPXp/y94Umx5yHkkbD8jTzB2TjGjiYAl2408ENzu 3zqfrsnhX1qRgpqFST57on2gZq/c9tjDr8y1HjZuXI4hpOZccyy4ZQ7kFS3JPLIMzJWlSP 4rVAujcHMYjV8e/99yAsnvkv8JbzWKJNSi4HK6D7FAfq3HFF1Q9H8kWRnkaQeG08i7FTqW YOfba52Q+xZGNq191WGJJUxM6tZ4GmnFNO29Nwt3pkr7m1UiZAZSdNztVzkViFLJ6Kif3v HD3+cy0AZTMAFelLiMMMV5Z5/tTb6OqjXWko2EwNmP0IPnht///xvZkmMzDzeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682007234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E4S2iHAnO6GAALcxsS3M/+hzR4sGUgQ6EYrmOoh96og=; b=CQq2fUHsG0PfGfnJ+jzJVZh3V8p/XVhXkCxMSGG9jrKEUKUAayQx1KZblNnuowIjrZD0uw IMdimLivW4ok+1JZTSe1AjCM8AyoJ8MS6vpB9qGx3dltXcjsmV3BKCLbJZzXYsn1RNBmZG JrT/ag3LCrOY8+y9y/xqupJTwwf4qhSUK8KGkcrAJiTdx3mwB/pFknK8PU4JLc0zmxmvC+ S0Y8aPGeefNuSbIw2lTipy4qnoj5slwMjPEaOzdhuivOPmmgYcXrU9fiy9MoU71VFRIo7u mACGeg4CET8GM6QRtdAmrF46snwpWSKNQ2DtpRvkVcpP+wsSCaoNGHAYG1pXCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682007234; a=rsa-sha256; cv=none; b=yQYyOLKyDI5XB0um2fCoL27W3rXqhfhjvuU2sHKaQfpmNeh7jiw/zTJgJZBf5+cxPY7F7h amf+hVdiL49yKhbrQmeIB93bzzrUI+ivdE3ke4h4t7v2Pkczi6/zJWoqQjKNus50XtmYQ4 VcEsIKFwQxJWRkfMZfNt9Db2K8lBdjkK3qdaFwy1N+2tUAvMM35bPCIcdG1CJb6rNMan+T g/SFsfoXbR/WwiEDh1MH6FoXr6zpZ/7VjVQUsDPj2aTv0juozSjNXlTpWs2vvCzwU/olTx AA72QjhRm3MGd1nTaYqKU04XunCRUBGWPBgXNV7cFiWcAO1e/HG8kGF01+C/rA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2N4y1GLhzkmR; Thu, 20 Apr 2023 16:13: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 33KGDs5t045459; Thu, 20 Apr 2023 16:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KGDsuT045458; Thu, 20 Apr 2023 16:13:54 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:13:54 GMT Message-Id: <202304201613.33KGDsuT045458@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: 5fd1a67e885e - main - inpcb: Release the inpcb cred reference before freeing the structure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5fd1a67e885e834cda8f1d122e9b0f9d47977e54 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd1a67e885e834cda8f1d122e9b0f9d47977e54 commit 5fd1a67e885e834cda8f1d122e9b0f9d47977e54 Author: Mark Johnston AuthorDate: 2023-04-20 15:48:33 +0000 Commit: Mark Johnston CommitDate: 2023-04-20 16:13:06 +0000 inpcb: Release the inpcb cred reference before freeing the structure Now that the inp_cred pointer is accessed only while the inpcb lock is held, we can avoid deferring a crfree() call when freeing an inpcb. This fixes a problem introduced when inpcb hash tables started being synchronized with SMR: the credential reference previously could not be released until all lockless readers have drained, and there is no mechanism to explicitly purge cached, freed UMA items. Thus, ucred references could linger indefinitely, and since ucreds hold a jail reference, the jail would linger indefinitely as well. This manifests as jails getting stuck in the DYING state. Discussed with: glebius Tested by: glebius Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D38573 --- sys/netinet/in_pcb.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index ea36d684a82b..4c1ba835a066 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -548,7 +548,6 @@ in_pcbinfo_destroy(struct inpcbinfo *pcbinfo) /* * Initialize a pcbstorage - per protocol zones to allocate inpcbs. */ -static void inpcb_dtor(void *, int, void *); static void inpcb_fini(void *, int); void in_pcbstorage_init(void *arg) @@ -556,7 +555,7 @@ in_pcbstorage_init(void *arg) struct inpcbstorage *pcbstor = arg; pcbstor->ips_zone = uma_zcreate(pcbstor->ips_zone_name, - pcbstor->ips_size, NULL, inpcb_dtor, pcbstor->ips_pcbinit, + pcbstor->ips_size, NULL, NULL, pcbstor->ips_pcbinit, inpcb_fini, UMA_ALIGN_CACHE, UMA_ZONE_SMR); pcbstor->ips_portzone = uma_zcreate(pcbstor->ips_portzone_name, sizeof(struct inpcbport), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); @@ -1694,6 +1693,10 @@ in_pcbrele_rlocked(struct inpcb *inp) MPASS(inp->inp_flags & INP_FREED); MPASS(inp->inp_socket == NULL); MPASS(inp->inp_in_hpts == 0); + crfree(inp->inp_cred); +#ifdef INVARIANTS + inp->inp_cred = NULL; +#endif INP_RUNLOCK(inp); uma_zfree_smr(inp->inp_pcbinfo->ipi_zone, inp); return (true); @@ -1711,6 +1714,10 @@ in_pcbrele_wlocked(struct inpcb *inp) MPASS(inp->inp_flags & INP_FREED); MPASS(inp->inp_socket == NULL); MPASS(inp->inp_in_hpts == 0); + crfree(inp->inp_cred); +#ifdef INVARIANTS + inp->inp_cred = NULL; +#endif INP_WUNLOCK(inp); uma_zfree_smr(inp->inp_pcbinfo->ipi_zone, inp); return (true); @@ -1788,18 +1795,6 @@ in_pcbfree(struct inpcb *inp) #endif #ifdef INET inp_freemoptions(imo); -#endif - /* Destruction is finalized in inpcb_dtor(). */ -} - -static void -inpcb_dtor(void *mem, int size, void *arg) -{ - struct inpcb *inp = mem; - - crfree(inp->inp_cred); -#ifdef INVARIANTS - inp->inp_cred = NULL; #endif } From nobody Thu Apr 20 16:33: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 4Q2NX303w0z46HRw; Thu, 20 Apr 2023 16:33: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 4Q2NX25PdHz49bs; Thu, 20 Apr 2023 16:33:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682008434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=evVOvUyEUTVfnF1iRrrgYxyeJDhZGalN8KnypWIvNwY=; b=mVHilCTPaJr49dL4RotRyuns70E8azMoEU/9I8UHNQdXE3B/udDUAxuDeYC8dNweI0mg3b o+e0NCBuk4n1K9fQcYBn/YPqRTKXCqqp9Q1h2mXYKk3dpiFblXNMAleklQuhMFFvC3NOT5 c4KNE/flqfx5+6JcH63vxvda4yRDp0Cmac0Ldl2WitDQ4FRcj47Pw1Ka5FvGbURj14k+4U R3veQFtcCaiH0BmyhLlZWWsikJUqyoSxEm04r7qNzoZ997okzzoAZZ+Mv4fdQKPCMVF6eo /twvOiXO7TaX490IqhplS9KOLX9CYkjbgLezLQZNvudv5NXeJCqEyihAOvrGBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682008434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=evVOvUyEUTVfnF1iRrrgYxyeJDhZGalN8KnypWIvNwY=; b=hdDOCMtm4lQAvpDBx4DdbcL4RXdaGt2gFZlS27vBmCV9TURuaQt4yUJZBK+eOxRdkmgn+F SdcCq4odT2jhyLNkCVS3MRV+NCTi1HPStXOrMTr7bLzLQlOHeDcjSRQ4tpTHW4PMUsujfx 6Hj4jrjp2st6S+nzuozVdNpzjjN9a8gdguzlHEJF2KMI9mKd9d0srIcaJHQKcgkMnA3Yiz Xt5b1p9X7at/1K3mjOiPoAUr2gv/wU4y+dQgIIDGW2zXpzEdGREzJLulKu5BIXteE0yB8f vX5JKIBjyGzeRU6l39JY8pRChvG49/M76Pj95NdbyL4h7fIgYsDzGkLEw22aow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682008434; a=rsa-sha256; cv=none; b=vy10yD7uo8UyyNxZHQIsfYa0xartpkZmyA++epWnG9w7DjuFAz/bu1nbu2E8iESumcj5u5 8sed75rlNqbHcBkk8ueJYbf6w2g3hrWWcdXlRAvvRQk9uZr1wTBC3JkVPcSVXG73iZfmCK Uqtie2U4CKula32hy8/Xkjszrv6bh1dqFe4xVab9AbWmcY4TawO4MLTjj0NXHLNX3w03C2 yxNNlVSAS1qgb+FBhFuX4n9BRRT7TbVgq0gY9fc45WxgE7vocW2KkOMTMWTMuXKd4zP4dM y49MoUEp1rMXR1HjICFGKN8COhxbW9XfsO6Dc7WGn1obYDAExxm+7Y1OsCKh0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2NX24MpGzlBc; Thu, 20 Apr 2023 16:33: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 33KGXsjX077281; Thu, 20 Apr 2023 16:33:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KGXs75077280; Thu, 20 Apr 2023 16:33:54 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:33:54 GMT Message-Id: <202304201633.33KGXs75077280@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: dd9059b3e9a1 - main - makefs: set cd9660 Rock Ridge timestamps for . and .. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: dd9059b3e9a1711d54c1d511a2cbb23e6e23f556 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dd9059b3e9a1711d54c1d511a2cbb23e6e23f556 commit dd9059b3e9a1711d54c1d511a2cbb23e6e23f556 Author: Ed Maste AuthorDate: 2023-04-18 13:57:29 +0000 Commit: Ed Maste CommitDate: 2023-04-20 16:20:56 +0000 makefs: set cd9660 Rock Ridge timestamps for . and .. DOT and DOTDOT entries have special handling, and previously only Rock Ridge PX (POSIX attributes) entries were attached. Add TF (timestamp) entries as well. PR: 203531 Reported by: Thomas Schmitt Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39662 --- usr.sbin/makefs/cd9660/iso9660_rrip.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.sbin/makefs/cd9660/iso9660_rrip.c b/usr.sbin/makefs/cd9660/iso9660_rrip.c index 1107688aa21e..e1b8fc993a3a 100644 --- a/usr.sbin/makefs/cd9660/iso9660_rrip.c +++ b/usr.sbin/makefs/cd9660/iso9660_rrip.c @@ -394,6 +394,12 @@ cd9660_rrip_initialize_node(iso9660_disk *diskStructure, cd9660node *node, SUSP_ENTRY_RRIP_PX, "PX", SUSP_LOC_ENTRY); cd9660node_rrip_px(current, parent->node); TAILQ_INSERT_TAIL(&node->head, current, rr_ll); + + /* TF - timestamp */ + current = cd9660node_susp_create_node(SUSP_TYPE_RRIP, + SUSP_ENTRY_RRIP_TF, "TF", SUSP_LOC_ENTRY); + cd9660node_rrip_tf(current, parent->node); + TAILQ_INSERT_TAIL(&node->head, current, rr_ll); } } else if (node->type & CD9660_TYPE_DOTDOT) { if (grandparent != NULL && grandparent->node != NULL && @@ -403,6 +409,12 @@ cd9660_rrip_initialize_node(iso9660_disk *diskStructure, cd9660node *node, SUSP_ENTRY_RRIP_PX, "PX", SUSP_LOC_ENTRY); cd9660node_rrip_px(current, grandparent->node); TAILQ_INSERT_TAIL(&node->head, current, rr_ll); + + /* TF - timestamp */ + current = cd9660node_susp_create_node(SUSP_TYPE_RRIP, + SUSP_ENTRY_RRIP_TF, "TF", SUSP_LOC_ENTRY); + cd9660node_rrip_tf(current, grandparent->node); + TAILQ_INSERT_TAIL(&node->head, current, rr_ll); } /* Handle PL */ if (parent != NULL && parent->rr_real_parent != NULL) { From nobody Thu Apr 20 16:41: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 4Q2Nhy1DYQz46HG7; Thu, 20 Apr 2023 16:41: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 4Q2Nhx6d4Bz4Nbv; Thu, 20 Apr 2023 16:41:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682008897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VgrgkM4gWrZ6yC2o5CudXyUqNpniywO/SM+GnCUAX/8=; b=puXxLILcFdTiObErwN8Zzn7+BUwPv2kaEyLjGk/ksAlmoQmniU5hp53eCRUG6H/uc45d9p 0aVgd7yE6j27Lf/OdTAe4D/gMM1B/KtQlHN/TeoNCj0Vsy3h0b8WO61JDmx5vp17TQNbQj PaMlx+3t3e8koIwllVasagtHzK2trqIla6X038htnNSmV0Kbn5bfVZQoL5i2+AiQ/wB6jG fX6n2QxpEUz1gnpnti8ne7ztD/W91H3BjGqW8Xif2BK/cPBrYQ8QMB031QjOk69kQdLb74 n00bLpYzExixdWcZhoZgkC+ZmKk9gDWBupYgWG/+TuFelmVIlabhq0TXHBXpAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682008897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VgrgkM4gWrZ6yC2o5CudXyUqNpniywO/SM+GnCUAX/8=; b=WIVnYfWHFo7dZ2PMsOEWilTkhjBg20nLAMBWE6FmtBZJ3zoGTILgkwuDoZ6rfedVH6Lemw Xo4mxY3nEsTBloJstLhh+9tH0HJ2IyMrJOyKVoKgqN8y+S1h8XbC+DyKKxYZIRmC4iJsHg UGZNPFtMSM7fmCTqHQQnJh9m9hjVHCZ2mxmvbw8jXCcak5PUIvoIyoWlk8Ws3TaY7k1PEV bQDFHl1XFa6hWlZdoIza+mfAfwRQUaXjTnckw+es6bXUk+3vphWmpmb+y8ebH6OcZ2YxyR K8pH05G3HRlVfGc3zXe0lLiSd98FfXBpUu+Nr83TXRrPuFSJ9rN1I1GOsaWQ5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682008897; a=rsa-sha256; cv=none; b=L49qrrqCjhgiPNv12YgvuEYIArvUmNWJ7YlpdypfddioACHNXKE2RKu28OmMz2zwApzued a6UhBWKPoXi+OuQRz5rS9l7Yc+QIPZIL0l12yjeI1rg9pAgHIwN3m1VxNjcCJdEgR7fVba vokVTxxI4fYhZ4MvI8GFVbhDhFsoaMRT1S1a9XUxJIBbxlCrdqWYcckHGmKZftPIHI5oac DDysD5hfLBiYP+WfLmFYh8vG32LT8fmYfH1E/K13Vn721rkx/mxj3llSiAI+o4Qz5k62nB 5iMx8AjAQWrAnOeyu6bJ7uf5Tf8rMbEKdiwVFDV/sEyslnVA6pvtWvCp6k6+LQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Nhx5l3yzlDn; Thu, 20 Apr 2023 16:41: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 33KGfbWg089376; Thu, 20 Apr 2023 16:41:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KGfbrH089361; Thu, 20 Apr 2023 16:41:37 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:41:37 GMT Message-Id: <202304201641.33KGfbrH089361@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: 0df4d8ad7a1b - main - Add jobs.mk to allow for target-jobs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0df4d8ad7a1b675ead8dec70f291bfd4f3fd81fa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0df4d8ad7a1b675ead8dec70f291bfd4f3fd81fa commit 0df4d8ad7a1b675ead8dec70f291bfd4f3fd81fa Author: Simon J. Gerraty AuthorDate: 2023-04-20 16:40:39 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-20 16:40:39 +0000 Add jobs.mk to allow for target-jobs jobs.mk automates -j$JOB_MAX and capturing build log based on target. Compute a default for JOB_MAX in local.sys.mk Reviewed by: stevek, imp Differential Revision: https://reviews.freebsd.org/D39683 --- Makefile | 10 ++++++ UPDATING | 9 ++++++ share/mk/jobs.mk | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++ share/mk/local.sys.mk | 20 ++++++++++++ 4 files changed, 127 insertions(+) diff --git a/Makefile b/Makefile index 8232041e0a35..0b2438a0cfc0 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,16 @@ # For more information, see the build(7) manual page. # +# Include jobs.mk early if we need it. +# It will turn: +# make buildworld-jobs +# into +# make -j${JOB_MAX} buildworld > ../buildworld.log 2>&1 +# +.if make(*-jobs) +.include +.endif + .if defined(UNIVERSE_TARGET) || defined(MAKE_JUST_WORLDS) || defined(WITHOUT_KERNELS) __DO_KERNELS=no .endif diff --git a/UPDATING b/UPDATING index 092115d899ea..70e5a58352af 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,15 @@ 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".) +20230420: + Add jobs.mk to save typing. Enables -j${JOB_MAX} and logging + eg. + make buildworld-jobs + runs + make -j${JOB_MAX} buildworld > ../buildworld.log 2>&1 + + where JOB_MAX is derrived from ncpus in local.sys.mk if not set in env. + 20230316: Video related devices for some arm devices have been renamed. If you have a custom kernel config and want to use hdmi output on diff --git a/share/mk/jobs.mk b/share/mk/jobs.mk new file mode 100644 index 000000000000..f465ea06310b --- /dev/null +++ b/share/mk/jobs.mk @@ -0,0 +1,88 @@ +# $Id: jobs.mk,v 1.7 2023/04/18 23:32:28 sjg Exp $ +# +# @(#) Copyright (c) 2012-2023, Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# + +# This makefile is used by top-level makefile. +# With the following: +# +# .if make(*-jobs) +# .include +# .endif +# +# +# Then if you do: +# +# mk target-jobs +# +# We will run: +# +# ${MAKE} -j${JOB_MAX} target > ${JOB_LOGDIR}/target.log 2>&1 +# +# JOB_MAX defaults to 8 but should normally be derrived based on the +# number of cpus available. The wrapper script 'mk' makes that easy. +# + +now_utc ?= ${%s:L:gmtime} +.if !defined(start_utc) +start_utc := ${now_utc} +.endif + +.info ${.newline}${TIME_STAMP} Start ${.TARGETS} + +.if make(*-jobs) + +JOB_LOGDIR ?= ${SRCTOP:H} +JOB_LOG = ${JOB_LOGDIR}/${.TARGET:S,-jobs,,:S,/,_,g}.log +JOB_LOG_GENS ?= 4 +# we like to rotate logs +.if empty(NEWLOG_SH) +.ifdef M_whence +NEWLOG_SH := ${newlog.sh:L:${M_whence}} +.else +NEWLOG_SH := ${(type newlog.sh) 2> /dev/null:L:sh:M/*} +.endif +.endif +.if !empty(NEWLOG_SH) && exists(${NEWLOG_SH}) +NEWLOG := sh ${NEWLOG_SH} +JOB_NEWLOG_ARGS ?= -S -n ${JOB_LOG_GENS} +.else +NEWLOG = : +.endif + +.if ${.MAKE.JOBS:U0} > 0 +JOB_MAX= ${.MAKE.JOBS} +.else +# This should be derrived from number of cpu's +JOB_MAX?= 8 +JOB_ARGS+= -j${JOB_MAX} +.endif + +# we need to reset .MAKE.LEVEL to 0 do that +# build orchestration works as expected (DIRDEPS_BUILD) +${.TARGETS:M*-jobs}: + @${NEWLOG} ${JOB_NEWLOG_ARGS} ${JOB_LOG} + @echo Logging to ${JOB_LOG} + @cd ${.CURDIR} && env MAKELEVEL=0 \ + ${.MAKE} ${JOB_ARGS} _TARGETS=${.TARGET:S,-jobs,,} ${.TARGET:S,-jobs,,} >> ${JOB_LOG} 2>&1 + +.endif + +.END: _build_finish +.ERROR: _build_failed + +_build_finish: .NOMETA + @echo "${TIME_STAMP} Finished ${.TARGETS} seconds=`expr ${now_utc} - ${start_utc}`" + +_build_failed: .NOMETA + @echo "${TIME_STAMP} Failed ${.TARGETS} seconds=`expr ${now_utc} - ${start_utc}`" diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index 39605c05e129..1817f6393949 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -59,6 +59,26 @@ _PREMK_LIBDIR:= ${LIBDIR} .include "src.sys.mk" .-include +.if make(*-jobs) && empty(JOB_MAX) +# provide a reasonable? default for JOB_MAX based on ncpu +JOB_MAX_FACTOR?= 1.33 +NPROC?= ${(type nproc) 2> /dev/null:L:sh:M/*:[1]} +NPROC:= ${NPROC} +.if !empty(NPROC) +ncpu!= ${NPROC} +.elif ${.MAKE.OS:NDarwin:NFreeBSD} == "" +ncpu!= sysctl -n hw.ncpu +.endif +.if ${ncpu:U0} > 1 +.if ${JOB_MAX_FACTOR} == 1 +JOB_MAX:= ${ncpu} +.else +jm!= echo ${ncpu} \* ${JOB_MAX_FACTOR} | bc +JOB_MAX:= ${jm:R} +.endif +.endif +.endif + .if ${.MAKE.MODE:Mmeta*} != "" # we can afford to use cookies to prevent some targets # re-running needlessly but only when using filemon. From nobody Thu Apr 20 16:43: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 4Q2Nks25qXz46J2V; Thu, 20 Apr 2023 16:43: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 4Q2Nkr6Nw0z4Qsy; Thu, 20 Apr 2023 16:43:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682008996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWGMCcMUHmSDFT5EcbXLkhpE7QB29VOlQeHmrP6ZHSA=; b=BHNkHwEezwbFJGH+d7MjrWhHGUFNImycPQNOtrZHU+1mv5cEdcARUI9AnRKj0MP04TcDz5 mldzWBODeAZEKUj3oqA3itto/FPzincCBy7KAH+u9+p454HueQwrZBXDt7RVL2CHvkO2aS d2GO3uUVl0wuDMG3El+OJJDh7jAIsvSq+89y6hfvmtv7y/iD7FG+fjIuM87Vg74AMC5zGu 8xKHtTRsIJ4MgsTzqyVAlsJrnbf/jRlFA3Nf5mMbTmOEFdNh5nXU4FgbroUHPaQyq+C0T/ LTaiao/855lqwnsZZSUG2Phnl+gP8/7xlmqyagQLMKQTyKfuc2CvrUh48yjiqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682008996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWGMCcMUHmSDFT5EcbXLkhpE7QB29VOlQeHmrP6ZHSA=; b=hwDgvFP+R24icSNpaP2W5f3iDHz/IBOV6ZVCt4MdzLfrrm+BsWtEoBkLb1iROLMVKjlo6E ez9LLnxrC6wEsDy8HNCeu4ftSQytWiQp+EYzy70eAc+79g0Rh75kOB7kYaCdjAlR7Wk320 YnryJamRVebjw8cDk+r8+dcjXhyZBH0os9AoquVJehn82Y2yA4QDL+JuAMGIDEE/Kjcp8o T0Nxn9L28775N4kFAEtBAm5SnlcZP2wErRauJBz+QupzAwtdC7QXabhFZh8aaPzilOXlRn 1yDVAsaNgixmNak0kwQs9iO8ZNdzo36ngOMwPYcLeLrNDRh3/9Hsn08RZfU+yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682008996; a=rsa-sha256; cv=none; b=aMNucU+RwAsCpWZ9s1jJSJ/LheLKQtqSwaJUQXAFOmOhYNojpqtnFfYgM+wvsHcWnMy4V/ 27ro9ixJu2GrrMPDROofHk7mSoHgGyNEDEbkbTPSA0Z4lQsGZvTClrnMMKcOvqA4OUS2cM iJNf+rhfA0rvnSZCdX4sflFThRshqtoZ69Wn/qurstAKdTm0gXAHOIOeDRt6Tm64PilQdD nmSNHV0nPZoehZE8mA7cXvCFfeN4R0c/yvTbHjr+XFS7bF8didWJVBRn4Kns3jW1y/7192 SEsIYiSiztnJ+3O/ufO6q5jUirUMuKvkHrhhyKemLqrBIdAEuRCwdCKicC0YQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Nkr5TshzlLR; Thu, 20 Apr 2023 16:43: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 33KGhGvY094552; Thu, 20 Apr 2023 16:43:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KGhG8n094551; Thu, 20 Apr 2023 16:43:16 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:43:16 GMT Message-Id: <202304201643.33KGhG8n094551@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: d1f4c44aa8af - main - x86: Move i386 ppireg.h to x86 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d1f4c44aa8aff72671f7787ea956f3b0a8dca784 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d1f4c44aa8aff72671f7787ea956f3b0a8dca784 commit d1f4c44aa8aff72671f7787ea956f3b0a8dca784 Author: Dmitry Chagin AuthorDate: 2023-04-20 16:42:59 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-20 16:42:59 +0000 x86: Move i386 ppireg.h to x86 Differential Revision: https://reviews.freebsd.org/D39655 MFC after: 1 month --- sys/amd64/acpica/acpi_wakecode.S | 2 +- sys/i386/acpica/acpi_wakecode.S | 2 +- sys/i386/include/ppireg.h | 51 ------------------------------------- sys/{amd64 => x86}/include/ppireg.h | 0 sys/x86/isa/clock.c | 2 +- 5 files changed, 3 insertions(+), 54 deletions(-) diff --git a/sys/amd64/acpica/acpi_wakecode.S b/sys/amd64/acpica/acpi_wakecode.S index d4dc8058a01b..6a112c5ea438 100644 --- a/sys/amd64/acpica/acpi_wakecode.S +++ b/sys/amd64/acpica/acpi_wakecode.S @@ -30,9 +30,9 @@ */ #include -#include #include #include +#include #include "assym.inc" diff --git a/sys/i386/acpica/acpi_wakecode.S b/sys/i386/acpica/acpi_wakecode.S index 682dadbf359f..ccbc67e5f588 100644 --- a/sys/i386/acpica/acpi_wakecode.S +++ b/sys/i386/acpica/acpi_wakecode.S @@ -30,9 +30,9 @@ */ #include -#include #include #include +#include #include "assym.inc" diff --git a/sys/i386/include/ppireg.h b/sys/i386/include/ppireg.h deleted file mode 100644 index 9794504da499..000000000000 --- a/sys/i386/include/ppireg.h +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (C) 2005 TAKAHASHI Yoshihiro. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY 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 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 _MACHINE_PPIREG_H_ -#define _MACHINE_PPIREG_H_ - -#ifdef _KERNEL - -#define IO_PPI 0x61 /* Programmable Peripheral Interface */ - -/* - * PPI speaker control values - */ - -#define PIT_ENABLETMR2 0x01 /* Enable timer/counter 2 */ -#define PIT_SPKRDATA 0x02 /* Direct to speaker */ - -#define PIT_SPKR (PIT_ENABLETMR2 | PIT_SPKRDATA) - -#define ppi_spkr_on() outb(IO_PPI, inb(IO_PPI) | PIT_SPKR) -#define ppi_spkr_off() outb(IO_PPI, inb(IO_PPI) & ~PIT_SPKR) - -#endif /* _KERNEL */ - -#endif /* _MACHINE_PPIREG_H_ */ diff --git a/sys/amd64/include/ppireg.h b/sys/x86/include/ppireg.h similarity index 100% rename from sys/amd64/include/ppireg.h rename to sys/x86/include/ppireg.h diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index f0074ccc87ae..efd85a496e10 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -69,10 +69,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include +#include #include #ifdef DEV_ISA From nobody Thu Apr 20 16:43: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 4Q2Nkt34Fkz46HsG; Thu, 20 Apr 2023 16:43: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 4Q2Nkt0G1Jz4QqJ; Thu, 20 Apr 2023 16:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682008998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8TFtCCPvnA454aEh0UP1W50enepVsQMv6RfZ+Z2uRMY=; b=gNVLh0H5NY0AQ9GT7tun61C1eGfgT8WFh+/TgaukNUFqb6hM2A6tdMaI3pCH6G9job8v2S zzFBMNYJFWkTIGoq4pnTRBZSGOP096Pzvf44T2Zyh8ak9jgGmGoK4EjHDnmDJFWh4+1uoy 7P3/8YIoIuwW5BwcR0BEb9VKY3fmT8+LIWG2bmivMTu/8jeevl3Z2RAem+BLI73h2RzCbl 8G26kP57QkHnrfgMa77kUAmPTdJ1Llz7vihbW4eMN4YmvcxnMYhBAMH9zB7N4+3sY1LxWg ntZ7szJe7w9rXFmt9Qw0ZtnBRPFxJ4ijsGkgnup2arqya1Wg8jRs/arwi9xCxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682008998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8TFtCCPvnA454aEh0UP1W50enepVsQMv6RfZ+Z2uRMY=; b=GzLNZmIEt6imVvdHATw5MiBnKk1X8qiXZIMxONLb/5t8HyuPAOHMJWTtTfVH7Bpjnl35OK rKAriL1kcagIEjV/NDPKyVwgpN33nAv1r3D6kaeIgy+ZyDKfS78KHW86tB5IIK3459jpfr naADRK8Uc7y/qr9qticaBroK9cPsiUbTvxSmIx1oeRyUhh/HdqWZ6Rhu6YLGChTJTRmBSf oANfjJlmN9+DSHpgWGr3xm0KgrCTVolRQNGVNDyp2Z5rBj//mFJKQnGyRj+SEF11PT8r08 pBo0xE7NPMlY+QxdxZjApC97PIKDRUBuSXthwW9R4lL6nFMlrlS67RbQPHXt8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682008998; a=rsa-sha256; cv=none; b=kcT4G/4hYY+6UUWElsYEtH+Y/iF+F8o0gt92pAVWV9eq0ZwZBwzWepgFHDqZScCFvfnAo6 CVYcqidmciYsdSYhZomppjF0uSL51ANAFkg2Qa3EE3pdHckVs5WTZQOYwS+3eexxXAlwyc FBEq3e6FmpqvkL2TlON0EXz48qpcKcAehFHqT5nZTJyGUKXNuqXvfwHtLmdl74K5HSVuVa k7MRcuIuxDdrPDhLqsuArW831R+i83wwuuvPreokLrAeADxs6vh9QuOZDR/Ek9dsSjTyl/ 67iqxLyeiqtC6KZOjN7nph0F9y0fwtxXS4Bcy9wG2p5dUGztcpWQaHsFbXTU6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Nks69NCzlNj; Thu, 20 Apr 2023 16:43: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 33KGhHWE094573; Thu, 20 Apr 2023 16:43:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KGhHpp094572; Thu, 20 Apr 2023 16:43:17 GMT (envelope-from git) Date: Thu, 20 Apr 2023 16:43:17 GMT Message-Id: <202304201643.33KGhHpp094572@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: de4da6cd04bf - main - x86: Move i386 timerreg.h to x86 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: de4da6cd04bf299e46f0c65d4bfd9fa94bf00f08 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=de4da6cd04bf299e46f0c65d4bfd9fa94bf00f08 commit de4da6cd04bf299e46f0c65d4bfd9fa94bf00f08 Author: Dmitry Chagin AuthorDate: 2023-04-20 16:42:59 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-20 16:42:59 +0000 x86: Move i386 timerreg.h to x86 Reviewed by: emaste, jhb Differential Revision: https://reviews.freebsd.org/D39656 MFC after: 1 month --- sys/amd64/acpica/acpi_wakecode.S | 2 +- sys/amd64/vmm/io/vatpit.h | 2 +- sys/i386/acpica/acpi_wakecode.S | 2 +- sys/i386/include/timerreg.h | 56 ----------------------------------- sys/{amd64 => x86}/include/timerreg.h | 0 sys/x86/isa/clock.c | 2 +- 6 files changed, 4 insertions(+), 60 deletions(-) diff --git a/sys/amd64/acpica/acpi_wakecode.S b/sys/amd64/acpica/acpi_wakecode.S index 6a112c5ea438..3828feeb35df 100644 --- a/sys/amd64/acpica/acpi_wakecode.S +++ b/sys/amd64/acpica/acpi_wakecode.S @@ -31,8 +31,8 @@ #include #include -#include #include +#include #include "assym.inc" diff --git a/sys/amd64/vmm/io/vatpit.h b/sys/amd64/vmm/io/vatpit.h index 96ed9c231420..a026545263c0 100644 --- a/sys/amd64/vmm/io/vatpit.h +++ b/sys/amd64/vmm/io/vatpit.h @@ -32,7 +32,7 @@ #ifndef _VATPIT_H_ #define _VATPIT_H_ -#include +#include #define NMISC_PORT 0x61 diff --git a/sys/i386/acpica/acpi_wakecode.S b/sys/i386/acpica/acpi_wakecode.S index ccbc67e5f588..af6567d9d0a8 100644 --- a/sys/i386/acpica/acpi_wakecode.S +++ b/sys/i386/acpica/acpi_wakecode.S @@ -31,8 +31,8 @@ #include #include -#include #include +#include #include "assym.inc" diff --git a/sys/i386/include/timerreg.h b/sys/i386/include/timerreg.h deleted file mode 100644 index 77e6cad5775d..000000000000 --- a/sys/i386/include/timerreg.h +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (C) 2005 TAKAHASHI Yoshihiro. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY 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 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$ - */ - -/* - * The outputs of the three timers are connected as follows: - * - * timer 0 -> irq 0 - * timer 1 -> dma chan 0 (for dram refresh) - * timer 2 -> speaker (via keyboard controller) - * - * Timer 0 is used to call hardclock. - * Timer 2 is used to generate console beeps. - */ - -#ifndef _MACHINE_TIMERREG_H_ -#define _MACHINE_TIMERREG_H_ - -#ifdef _KERNEL - -#include - -#define IO_TIMER1 0x40 /* 8253 Timer #1 */ -#define TIMER_CNTR0 (IO_TIMER1 + TIMER_REG_CNTR0) -#define TIMER_CNTR1 (IO_TIMER1 + TIMER_REG_CNTR1) -#define TIMER_CNTR2 (IO_TIMER1 + TIMER_REG_CNTR2) -#define TIMER_MODE (IO_TIMER1 + TIMER_REG_MODE) - -#endif /* _KERNEL */ - -#endif /* _MACHINE_TIMERREG_H_ */ diff --git a/sys/amd64/include/timerreg.h b/sys/x86/include/timerreg.h similarity index 100% rename from sys/amd64/include/timerreg.h rename to sys/x86/include/timerreg.h diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index efd85a496e10..cd4117b14114 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -69,10 +69,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include +#include #include #ifdef DEV_ISA From nobody Thu Apr 20 17:06: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 4Q2PFq48KLz46KHk; Thu, 20 Apr 2023 17:06: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 4Q2PFn695Kz3kHQ; Thu, 20 Apr 2023 17:06:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682010398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g04riSrt9kxPDZqlI+lrLehIDq6GZDAPK5MQ9ty31hQ=; b=c0kIjxYXrePAenzdm8W2n7PlU4QvUV8VWLGITcuPqCEErZamW8XYbDrzMLewABfEE1KmU4 GSt27h6PsgDNqMvy4vC+mcY19Kv6rNHr8td3prEFNET7+SGwamIOEWOeZeu9Vxg+41lR2h rixmaQHVOAfgyZEEIlmhUeOtgSi3eBePf6/SvJohXfNRVi1MvSeejVfoTHQ0R3XBrgPzpk 41Undqt/Sh5jzmZoQW95NPz7T2KlhgXX7lppVhFy+U7xX2JP6afPEh89fI7IjAsJGElVlS hjSQJnkN+FxXiCTJSN5r/5MQXQzSE4baR8ZuQJ9iF5m/4Epu+bTresb3+mpunQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682010398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g04riSrt9kxPDZqlI+lrLehIDq6GZDAPK5MQ9ty31hQ=; b=shDEdUY/qWPYkmDK35ajpS7D6mAnr8BFSY9/bEwCJqcLZR4twG3aLhooy4w0i0DMInnzlU hg6tpixCBSI8sHd8/o1MNcxSgyoNVgAa8gIGDr1nhxNb4I8u/qypvd5Tz7RZ+d1k252Lud G0rksWWC4I5wlaEN8plG8pVr7rwLm698P95u6QfRv6MIVaguGmje6wdQ1HD7+fSQewgv2Q 8lSgdSiCuhH15+/BWYOfio72TJQbFJG8gFxOsXgdkO0MMwi1S3NtTWbp/NB7FSpzdvlgmd VE0oYYOpje+YwFCEB2d3F+AWVqREKolbEZf56et3W9LtayIc4eUmDM2jmo2Nog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682010398; a=rsa-sha256; cv=none; b=RprnsnGQosSgGugPuAgbGMf7IuhNVKltUJbDjIccwlameFTdX+o3woM1aQM5j0so50UnF4 IB0ui5btMbBdD0bpFmEabrcm9Pc5us8HVo2fsP57SMr3taRavmFny+S91I6CaHhNhFrg7W n75WX0j4s3dPdBjpUbZpNwMR+XZZdpxZxqVIbZbZvayxisHnBi+sEoXr4Pbh68Spltnk6l LaedBk292IoNtVZ0hjHk6LkmWz+zkGpBlHlsfau7uworzueuMOAG03w8P4CIbP0nU2LPkC nFdHtiz70KrOJXCIHJzGQied3b7jFY4XxFfT45zAgtuYvu1yHAJfre2yMmmm0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2PFn2BvMzlmx; Thu, 20 Apr 2023 17:06: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 33KH6bYn028112; Thu, 20 Apr 2023 17:06:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KH6bWs028111; Thu, 20 Apr 2023 17:06:37 GMT (envelope-from git) Date: Thu, 20 Apr 2023 17:06:37 GMT Message-Id: <202304201706.33KH6bWs028111@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: 8fe4f8f7a75f - main - Fix building host tools 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: 8fe4f8f7a75f3f6d1fc52e31a6d25a112d4644fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8fe4f8f7a75f3f6d1fc52e31a6d25a112d4644fd commit 8fe4f8f7a75f3f6d1fc52e31a6d25a112d4644fd Author: Simon J. Gerraty AuthorDate: 2023-04-20 17:05:43 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-20 17:05:43 +0000 Fix building host tools for host Several makefile depend on tools built for host. At least when using DIRDEPS_BUILD we can build these for the pseudo machine "host" to facilitate building on older host versions. Ideally we would build these tools in their own directories to avoid building more than needed. For now, setting an appropriate default for BTOOLSPATH will suffice Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39708 --- bin/csh/Makefile | 5 ++++- bin/sh/Makefile | 7 +++++-- lib/ncurses/tinfo/Makefile | 13 +++++++++++++ share/mk/local.meta.sys.mk | 7 +++++++ share/syscons/scrnmaps/Makefile | 10 ++++++---- usr.bin/awk/Makefile | 2 ++ 6 files changed, 37 insertions(+), 7 deletions(-) diff --git a/bin/csh/Makefile b/bin/csh/Makefile index d59626703685..2d1edcf53a80 100644 --- a/bin/csh/Makefile +++ b/bin/csh/Makefile @@ -118,15 +118,18 @@ NLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo charse csh.1: tcsh.man cat ${.ALLSRC} > ${.TARGET} +.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" build-tools: gethost +tc.defs.c: gethost DEPENDOBJS+= gethost gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} @rm -f ${.TARGET} ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ ${TCSHDIR}/gethost.c +.endif -tc.defs.c: gethost ${TCSHDIR}/host.defs +tc.defs.c: ${TCSHDIR}/host.defs @rm -f ${.TARGET} @echo "/* Do not edit this file, make creates it */" > ${.TARGET} ${BTOOLSPATH:U.}/gethost ${TCSHDIR}/host.defs >> ${.TARGET} diff --git a/bin/sh/Makefile b/bin/sh/Makefile index c61094b06720..039da7309adc 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -39,15 +39,18 @@ CFLAGS+=-DSHELL -I. -I${.CURDIR} CLEANFILES+= mknodes mksyntax CLEANFILES+= ${GENSRCS} ${GENHDRS} +.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" build-tools: mknodes mksyntax +DEPENDOBJS+= mknodes mksyntax +mknodes mksyntax: ${BUILD_TOOLS_META} +.endif + .ORDER: builtins.c builtins.h builtins.h: .NOMETA builtins.c builtins.h: mkbuiltins builtins.def sh ${.CURDIR}/mkbuiltins ${.CURDIR} -DEPENDOBJS+= mknodes mksyntax -mknodes mksyntax: ${BUILD_TOOLS_META} .ORDER: nodes.c nodes.h nodes.h: .NOMETA diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile index fc4e4447562e..2d251072acb8 100644 --- a/lib/ncurses/tinfo/Makefile +++ b/lib/ncurses/tinfo/Makefile @@ -270,6 +270,11 @@ keys.list: MKkeys_list.sh Caps Caps-ncurses AWK=${AWK} sh ${NCURSES_DIR}/ncurses/tinfo/MKkeys_list.sh \ ${NCURSES_DIR}/include/Caps ${NCURSES_DIR}/include/Caps-ncurses | LC_ALL=C sort > keys.list +.if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host" +# we need to override the default +BTOOLSPATH= ${HOST_OBJTOP}/${RELDIR:S,w$,,} +.endif +.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" # Build tools DEPENDOBJS+= make_hash make_keys build-tools: make_hash make_keys @@ -280,6 +285,14 @@ make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} ${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ ${NCURSES_DIR}/ncurses/tinfo/make_hash.c +.endif +.if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host" +make_keys: ${BTOOLSPATH}/make_keys + ${LN:Uln} -sf ${.ALLSRC} ${.TARGET} + +make_hash: ${BTOOLSPATH}/make_hash + ${LN:Uln} -sf ${.ALLSRC} ${.TARGET} +.endif # ./configure generated MKterm.h.awk: MKterm.h.awk.in diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 6b5ff5e97555..6d54d9c5881c 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -210,12 +210,19 @@ TOOLSDIR?= ${HOST_OBJTOP}/tools .elif defined(STAGE_HOST_OBJTOP) TOOLSDIR?= ${STAGE_HOST_OBJTOP} .endif +.if ${MK_DIRDEPS_BUILD} == "yes" && ${MACHINE} != "host" +# ideally tools needed by makefiles like sh,csh,tinfo +# would be built in their own directories but for now +# this works well enough. +BTOOLSPATH= ${HOST_OBJTOP}/${RELDIR} +.else # Only define if it exists in case user didn't run bootstrap-tools. Otherwise # the tool will be built during the build. Building it assumes it is # TARGET==MACHINE. .if exists(${HOST_OBJTOP}/tools${.CURDIR}) BTOOLSPATH= ${HOST_OBJTOP}/tools${.CURDIR} .endif +.endif # Don't use the bootstrap tools logic on itself. .if ${.TARGETS:Mbootstrap-tools} == "" && \ diff --git a/share/syscons/scrnmaps/Makefile b/share/syscons/scrnmaps/Makefile index fb6bf59131b9..f3b5ed273cd3 100644 --- a/share/syscons/scrnmaps/Makefile +++ b/share/syscons/scrnmaps/Makefile @@ -14,16 +14,18 @@ CLEANFILES+= ${SCRMAPS_MK} ${SCRMAPS} FILES= ${SCRMAPS} FILESDIR= ${SHAREDIR}/syscons/scrnmaps +.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" DEPENDOBJS+= ${SCRMAPS_MK} build-tools: ${SCRMAPS_MK} +${SCRMAPS_MK}: ${.TARGET:R} mkscrfil.c ${BUILD_TOOLS_META} + ${CC:N${CCACHE_BIN}} ${CFLAGS} -I${.CURDIR} -DFIL=\"${.TARGET:R}\" \ + ${LDFLAGS} -o ${.TARGET} ${.CURDIR}/mkscrfil.c +.endif + ${SCRMAPS}: ${.TARGET:R}.mk ${BTOOLSPATH:U.}/${.TARGET:R}.mk ${.TARGET:R}.tmp uuencode ${.TARGET:R}.tmp ${.TARGET:R} > ${.TARGET} rm -f ${.TARGET:R}.tmp -${SCRMAPS_MK}: ${.TARGET:R} mkscrfil.c ${BUILD_TOOLS_META} - ${CC:N${CCACHE_BIN}} ${CFLAGS} -I${.CURDIR} -DFIL=\"${.TARGET:R}\" \ - ${LDFLAGS} -o ${.TARGET} ${.CURDIR}/mkscrfil.c - .include diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile index 28212f75f7d9..f604684804fa 100644 --- a/usr.bin/awk/Makefile +++ b/usr.bin/awk/Makefile @@ -25,9 +25,11 @@ awkgram.tab.h: awkgram.h proctab.c: maketab awkgram.tab.h ${BTOOLSPATH:U.}/maketab awkgram.tab.h > proctab.c +.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" DEPENDOBJS+= maketab build-tools: maketab maketab: awkgram.tab.h ${BUILD_TOOLS_META} +.endif HAS_TESTS= SUBDIR.${MK_TESTS}+= tests From nobody Thu Apr 20 17:17: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 4Q2PV83Fkwz46L6L; Thu, 20 Apr 2023 17:17: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 4Q2PV7649gz4212; Thu, 20 Apr 2023 17:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682011039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kS/gEPlx5Pm9G+JAHpeNObbdz5TGQLj4wAmt87bxCck=; b=XznbZoniqqJ1qdd9Lv7/IzIOXn5u2MMY1LV3TmRY+b5n/k3RTSPB0PBJFyME1wZcq3wUTm 8c28YErprSH0x+QKeLuZZQ00NcBssZeYuzzkuFx/fnUtGjD1RYSzWJaUIpPgj0pJyqEdzg aEf3PvtwEGLNS2bQQQyP30luXzCtp7AQ9issK40TtP2JSVBs4Oje3FuiTt15tWLYObX/Rq 55HcJxlELp+Q0xnbLX8B1z2xFyZX0pHkJ72Uwj64p915claBEkQljOl86ELmLlSmHSYbEA E+4knSDZLdbz8ef2O7t6u1Sq21NspZ8w3Q/6Il/oaJAO/RsTfq4/iql2euiGKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682011039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kS/gEPlx5Pm9G+JAHpeNObbdz5TGQLj4wAmt87bxCck=; b=WhPDjsN8+sWXuQDXti+wlYfhCWIiHjIMXcfnSUqX9J+DGhsrc8LDyxBfHXFo08ldb9WWDn PFm8ev4IfcVF8fWpVWE4fYU+Sl5PKzdBx4KSjQpcXkDF3Fa2WKWwn5VHu4OpvcPZiJ18bn bSV+or1zXCynfHTHl0/X3yoZthQQCrUAo4/0yYCUjgAuKljkOUJaZFbHn/uzEidSu3G+/3 GRuZPGA/KirvyTSH1dm1EBqi2P6Z5c1AWPbs/6pPz+YVpVFTXOX4chga8C9rR+7Xem1GD5 sG6HCpKyCUmB6sfZdjHtkfqPB/dTjLxUTw/JvNTUvmdsmmAnBvqCV/GGvcrIdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682011039; a=rsa-sha256; cv=none; b=febTWiet1xuiKO/g6JVD0PomrDP9kGzqRgMeyMP9hHaDkWGj17Y3FBKh0MKzDslUxx4aaz XVoX48VeOaom/3pgsOwtRW4BJrvg/IwPdXmqUL98Lg7t5oP1b9AVzr6JRVG11oBu3OmOiG FZH6i26F/tq5ZaFI/wM2hq1xQMHNdhU2u95vqWHZT+J+HIcmXT/rv3VV1Av8IvBAvqKhcj t8jdHqBuGmGyay942+N1S6KEXY6cxVCIzH5qq1OJWtiBLWcSOVyhuBgY1gfQwtnixlC5pz 3BsNAFJMoZdPCSsoTt7ZY1YDFdYPUTJdI82eXVR2+Vzm5KNhOzArpG0o3FNpCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2PV74BHVzmTx; Thu, 20 Apr 2023 17:17: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 33KHHJq7044449; Thu, 20 Apr 2023 17:17:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KHHJsQ044448; Thu, 20 Apr 2023 17:17:19 GMT (envelope-from git) Date: Thu, 20 Apr 2023 17:17:19 GMT Message-Id: <202304201717.33KHHJsQ044448@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: bb8e8e230d94 - main - Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 commit bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 Author: Hans Petter Selasky AuthorDate: 2023-04-20 16:50:32 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-20 17:16:14 +0000 Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." Some points for the future: - libc is not the right place for sorting algorithms. Probably libutil is better suited for this purpose or a dedicated libsort. Should move all sorting algorithms away from libc eventually. - CheriBSD uses capabilities for memory access, and could benefit from a standard memswap() function. - Do something about qsort() in FreeBSD's libc like: - Mark it deprecated on FreeBSD, as a first step, due to missing limits on CPU time. - Audit the use of qsort() in the FreeBSD base system and consider swapping to other existing sorting algorithms. Discussed with: brooks@ Differential Revision: https://reviews.freebsd.org/D36493 This reverts commit a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f. This reverts commit 7d65a450cdcc7cc743f2ecd114ba3428a21c0033. This reverts commit 8dcf3a82c54cb216df3213a013047907636a01da. --- include/stdlib.h | 13 --- lib/libc/stdlib/Makefile.inc | 4 +- lib/libc/stdlib/Symbol.map | 4 - lib/libc/stdlib/bsort.3 | 201 -------------------------------- lib/libc/stdlib/bsort.c | 267 ------------------------------------------- lib/libc/stdlib/bsort_r.c | 25 ---- lib/libc/stdlib/bsort_s.c | 5 - 7 files changed, 1 insertion(+), 518 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index 3ad28cf68847..730223e7fd77 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -107,10 +107,6 @@ void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); int mblen(const char *, size_t); size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); -#if __BSD_VISIBLE -void bsort(void *, size_t, size_t, - int (* _Nonnull)(const void *, const void *)); -#endif void qsort(void *, size_t, size_t, int (* _Nonnull)(const void *, const void *)); int rand(void); @@ -304,8 +300,6 @@ int heapsort(void *, size_t, size_t, #ifdef __BLOCKS__ int heapsort_b(void *, size_t, size_t, int (^ _Nonnull)(const void *, const void *)); -void bsort_b(void *, size_t, size_t, - int (^ _Nonnull)(const void *, const void *)); void qsort_b(void *, size_t, size_t, int (^ _Nonnull)(const void *, const void *)); #endif @@ -319,8 +313,6 @@ int mkostemps(char *, int, int); int mkostempsat(int, char *, int, int); void qsort_r(void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); -void bsort_r(void *, size_t, size_t, - int (*)(const void *, const void *, void *), void *); int radixsort(const unsigned char **, int, const unsigned char *, unsigned); void *reallocarray(void *, size_t, size_t) __result_use_check @@ -403,11 +395,6 @@ void ignore_handler_s(const char * __restrict, void * __restrict, errno_t); /* K.3.6.3.2 */ errno_t qsort_s(void *, rsize_t, rsize_t, int (*)(const void *, const void *, void *), void *); - -#if __BSD_VISIBLE -errno_t bsort_s(void *, rsize_t, rsize_t, - int (*)(const void *, const void *, void *), void *); -#endif /* __BSD_VISIBLE */ #endif /* __EXT1_VISIBLE */ __END_DECLS diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index 7503a82a6045..964e7ce30594 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -11,7 +11,6 @@ MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ hsearch_r.c imaxabs.c imaxdiv.c \ insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \ - bsort.c bsort_r.c bsort_s.c \ merge.c mergesort_b.c ptsname.c qsort.c qsort_r.c qsort_r_compat.c \ qsort_s.c quick_exit.c radixsort.c rand.c \ random.c reallocarray.c reallocf.c realpath.c remque.c \ @@ -37,7 +36,7 @@ MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 \ atoi.3 atol.3 at_quick_exit.3 bsearch.3 \ div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \ hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \ - lsearch.3 memory.3 ptsname.3 bsort.3 qsort.3 \ + lsearch.3 memory.3 ptsname.3 qsort.3 \ quick_exit.3 \ radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 realpath.3 \ set_constraint_handler_s.3 \ @@ -55,7 +54,6 @@ MLINKS+=hcreate.3 hcreate_r.3 hcreate.3 hdestroy_r.3 hcreate.3 hsearch_r.3 MLINKS+=insque.3 remque.3 MLINKS+=lsearch.3 lfind.3 MLINKS+=ptsname.3 grantpt.3 ptsname.3 ptsname_r.3 ptsname.3 unlockpt.3 -MLINKS+=bsort.3 bsort_r.3 bsort.3 bsort_b.3 bsort.3 bsort_s.3 MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 qsort.3 qsort_r.3 \ qsort.3 qsort_s.3 MLINKS+=rand.3 rand_r.3 rand.3 srand.3 diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map index 50583a30ad3d..a105f781734d 100644 --- a/lib/libc/stdlib/Symbol.map +++ b/lib/libc/stdlib/Symbol.map @@ -126,10 +126,6 @@ FBSD_1.6 { }; FBSD_1.7 { - bsort; - bsort_b; - bsort_r; - bsort_s; clearenv; qsort_r; secure_getenv; diff --git a/lib/libc/stdlib/bsort.3 b/lib/libc/stdlib/bsort.3 deleted file mode 100644 index d0cadcacccc0..000000000000 --- a/lib/libc/stdlib/bsort.3 +++ /dev/null @@ -1,201 +0,0 @@ -.\" -.\" Copyright (c) 2022-2023 Hans Petter Selasky -.\" -.\" 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$ -.\" -.Dd April 20, 2023 -.Dt BSORT 3 -.Os -.Sh NAME -.Nm bsort , -.Nm bsort_b , -.Nm bsort_r , -.Nm bsort_s -.Nd sort functions -.Sh LIBRARY -.Lb libc -.Sh SYNOPSIS -.In stdlib.h -.Ft void -.Fo bsort -.Fa "void *base" -.Fa "size_t nmemb" -.Fa "size_t size" -.Fa "int \*[lp]*compar\*[rp]\*[lp]const void *, const void *\*[rp]" -.Fc -.Ft void -.Fo bsort_b -.Fa "void *base" -.Fa "size_t nmemb" -.Fa "size_t size" -.Fa "bsort_block compar" -.Fc -.Ft void -.Fo bsort_r -.Fa "void *base" -.Fa "size_t nmemb" -.Fa "size_t size" -.Fa "int \*[lp]*compar\*[rp]\*[lp]const void *, const void *, void *\*[rp]" -.Fa "void *thunk" -.Fc -.Fd #define __STDC_WANT_LIB_EXT1__ 1 -.Ft errno_t -.Fo bsort_s -.Fa "void *base" -.Fa "size_t nmemb" -.Fa "size_t size" -.Fa "int \*[lp]*compar\*[rp]\*[lp]void *, const void *, const void *\*[rp]" -.Fa "void *thunk" -.Fc -.Sh DESCRIPTION -The -.Fn bsort -function is based on so-called in-place bitonic sorting. -Bitonic sorting is suitable for parallel execution, -because the elements in the array to sort are compared in a predefined -sequence not depending on the data. -The complexity of the -.Fn bsort -algorithm is bounded by O(log2(N) * log2(N) * N), where N is the -number of elements in the sorting array. -The -.Fn bsort -function provides a reliable in-place sorting algorithm, -with little memory usage and without the excess processing usage -caveats of other algorithms like -.Xr qsort 3 . -.Pp -The comparison function must return an integer less than, equal to, or -greater than zero if the first argument is considered to be respectively -less than, equal to, or greater than the second. -.Pp -The -.Fn bsort_r -function behaves identically to -.Fn bsort , -except it takes an additional argument, -.Fa thunk , -which is passed unchanged as the last argument to the function -.Fa compar -points to. -This allows the comparison function to access additional -data without using global variables, and thus -.Fn bsort_r -is suitable for use in functions which must be reentrant. -The -.Fn bsort_b -function behaves identically to -.Fn bsort , -except it takes a block, rather than a function pointer. -.Pp -The algorithm implemented by -.Fn bsort , -.Fn bsort_b , -.Fn bsort_r -and -.Fn bsort_s -is -.Em not -stable, that is, if two members compare as equal, their order in -the sorted array is undefined. -.Pp -The -.Fn bsort_s -function behaves the same as -.Fn bsort_r -except if -.Fa size -is greater than -.Dv RSIZE_MAX , -or -.Fa nmemb -is not zero and -.Fa compar -is -.Dv NULL -or -.Fa size -is zero, then the runtime-constraint handler is called, and -.Fn bsort_s -returns an error. -Note the handler is called before -.Fn bsort_s -returns the error, and the handler function might not return. -.Sh RETURN VALUES -The -.Fn bsort , -.Fn bsort_b -and -.Fn bsort_r -functions -return no value. -The -.Fn bsort_s -function returns zero on success, non-zero on error. -.Sh EXAMPLES -A sample program sorting an array of -.Vt int -values in place using -.Fn bsort , -and then prints the sorted array to standard output is: -.Bd -literal -#include -#include - -/* - * Custom comparison function comparing 'int' values through pointers - * passed by bsort(3). - */ -static int -int_compare(const void *p1, const void *p2) -{ - int left = *(const int *)p1; - int right = *(const int *)p2; - - return ((left > right) - (left < right)); -} - -/* - * Sort an array of 'int' values and print it to standard output. - */ -int -main(void) -{ - int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 }; - size_t array_size = sizeof(int_array) / sizeof(int_array[0]); - size_t k; - - bsort(&int_array, array_size, sizeof(int_array[0]), int_compare); - for (k = 0; k < array_size; k++) - printf(" %d", int_array[k]); - puts(""); - return (EXIT_SUCCESS); -} -.Ed -.Sh SEE ALSO -.Xr sort 1 , -.Xr qsort 3 , -.Xr radixsort 3 -.Sh HISTORY -This implementation was created by Hans Petter Selasky. diff --git a/lib/libc/stdlib/bsort.c b/lib/libc/stdlib/bsort.c deleted file mode 100644 index 0c470654cfe7..000000000000 --- a/lib/libc/stdlib/bsort.c +++ /dev/null @@ -1,267 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2016-2023 Hans Petter Selasky - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include - -#include -#include -#include -#include -#include - -#include "libc_private.h" - -/* - * A variant of bitonic sorting - * - * Worst case sorting complexity: log2(N) * log2(N) * N - * Additional memory and stack usage: none - */ - -#if defined(I_AM_BSORT_R) -typedef int cmp_t (const void *, const void *, void *); -#define ARG_PROTO void *arg, -#define ARG_NAME arg , -#define CMP(fn,arg,a,b) (fn)(a, b, arg) -#elif defined(I_AM_BSORT_S) -typedef int cmp_t (const void *, const void *, void *); -#define ARG_PROTO void *arg, -#define ARG_NAME arg , -#define CMP(fn,arg,a,b) (fn)(a, b, arg) -#else -typedef int cmp_t (const void *, const void *); -#define ARG_PROTO -#define ARG_NAME -#define CMP(fn,arg,a,b) (fn)(a, b) -#endif - -static inline void -bsort_swap(char *pa, char *pb, const size_t es) -{ - if (__builtin_constant_p(es) && es == 8) { - uint64_t tmp; - - /* swap */ - tmp = *(uint64_t *)pa; - *(uint64_t *)pa = *(uint64_t *)pb; - *(uint64_t *)pb = tmp; - } else if (__builtin_constant_p(es) && es == 4) { - uint32_t tmp; - - /* swap */ - tmp = *(uint32_t *)pa; - *(uint32_t *)pa = *(uint32_t *)pb; - *(uint32_t *)pb = tmp; - } else if (__builtin_constant_p(es) && es == 2) { - uint16_t tmp; - - /* swap */ - tmp = *(uint16_t *)pa; - *(uint16_t *)pa = *(uint16_t *)pb; - *(uint16_t *)pb = tmp; - } else if (__builtin_constant_p(es) && es == 1) { - uint8_t tmp; - - /* swap */ - tmp = *(uint8_t *)pa; - *(uint8_t *)pa = *(uint8_t *)pb; - *(uint8_t *)pb = tmp; - } else if (es <= 256) { - char tmp[es] __aligned(8); - - /* swap using fast memcpy() */ - memcpy(tmp, pa, es); - memcpy(pa, pb, es); - memcpy(pb, tmp, es); - } else { - /* swap byte-by-byte to avoid huge stack usage */ - for (size_t x = 0; x != es; x++) { - char tmp; - - /* swap */ - tmp = pa[x]; - pa[x] = pb[x]; - pb[x] = tmp; - } - } -} - -/* The following function returns true when the array is completely sorted. */ -static inline bool -bsort_complete(void *ptr, const size_t lim, const size_t es, ARG_PROTO cmp_t *fn) -{ - for (size_t x = 1; x != lim; x++) { - if (CMP(fn, arg, ptr, (char *)ptr + es) > 0) - return (false); - ptr = (char *)ptr + es; - } - return (true); -} - -static inline void -bsort_xform(char *ptr, const size_t n, size_t lim, const size_t es, ARG_PROTO cmp_t *fn) -{ -#define BSORT_TABLE_MAX (1UL << 4) - size_t x, y, z; - unsigned t, u, v; - size_t p[BSORT_TABLE_MAX]; - char *q[BSORT_TABLE_MAX]; - - lim *= es; - x = n; - for (;;) { - /* optimise */ - if (x >= BSORT_TABLE_MAX) - v = BSORT_TABLE_MAX; - else if (x >= 2) - v = x; - else - break; - - /* divide down */ - x /= v; - - /* generate ramp table */ - for (t = 0; t != v; t += 2) { - p[t] = (t * x); - p[t + 1] = (t + 2) * x - 1; - } - - /* bitonic sort */ - for (y = 0; y != n; y += (v * x)) { - for (z = 0; z != x; z++) { - const size_t w = y + z; - - /* p[0] is always zero and is omitted */ - q[0] = ptr + w * es; - - /* insertion sort */ - for (t = 1; t != v; t++) { - q[t] = ptr + (w ^ p[t]) * es; - - /* check for array lengths not power of two */ - if ((size_t)(q[t] - ptr) >= lim) - break; - for (u = t; u != 0 && CMP(fn, arg, q[u - 1], q[u]) > 0; u--) - bsort_swap(q[u - 1], q[u], es); - } - } - } - } -} - -static void -local_bsort(void *ptr, const size_t n, const size_t es, ARG_PROTO cmp_t *fn) -{ - size_t max; - - /* if there are less than 2 elements, then sorting is not needed */ - if (__predict_false(n < 2)) - return; - - /* compute power of two, into max */ - if (sizeof(size_t) <= sizeof(unsigned long)) - max = 1UL << (8 * sizeof(unsigned long) - __builtin_clzl(n) - 1); - else - max = 1ULL << (8 * sizeof(unsigned long long) - __builtin_clzll(n) - 1); - - /* round up power of two, if needed */ - if (!powerof2(n)) - max <<= 1; - - /* optimize common sort scenarios */ - switch (es) { - case 8: - while (!bsort_complete(ptr, n, 8, ARG_NAME fn)) - bsort_xform(ptr, max, n, 8, ARG_NAME fn); - break; - case 4: - while (!bsort_complete(ptr, n, 4, ARG_NAME fn)) - bsort_xform(ptr, max, n, 4, ARG_NAME fn); - break; - case 2: - while (!bsort_complete(ptr, n, 2, ARG_NAME fn)) - bsort_xform(ptr, max, n, 2, ARG_NAME fn); - break; - case 1: - while (!bsort_complete(ptr, n, 1, ARG_NAME fn)) - bsort_xform(ptr, max, n, 1, ARG_NAME fn); - break; - case 0: - /* undefined behaviour */ - break; - default: - while (!bsort_complete(ptr, n, es, ARG_NAME fn)) - bsort_xform(ptr, max, n, es, ARG_NAME fn); - break; - } -} - -#if defined(I_AM_BSORT_R) -void -bsort_r(void *a, size_t n, size_t es, cmp_t *cmp, void *arg) -{ - local_bsort(a, n, es, cmp, arg); -} -#elif defined(I_AM_BSORT_S) -errno_t -bsort_s(void *a, rsize_t n, rsize_t es, cmp_t *cmp, void *arg) -{ - if (n > RSIZE_MAX) { - __throw_constraint_handler_s("bsort_s : n > RSIZE_MAX", EINVAL); - return (EINVAL); - } else if (es > RSIZE_MAX) { - __throw_constraint_handler_s("bsort_s : es > RSIZE_MAX", - EINVAL); - return (EINVAL); - } else if (n != 0) { - if (a == NULL) { - __throw_constraint_handler_s("bsort_s : a == NULL", - EINVAL); - return (EINVAL); - } else if (cmp == NULL) { - __throw_constraint_handler_s("bsort_s : cmp == NULL", - EINVAL); - return (EINVAL); - } else if (es <= 0) { - __throw_constraint_handler_s("bsort_s : es <= 0", - EINVAL); - return (EINVAL); - } - } - - local_bsort(a, n, es, cmp, arg); - return (0); -} -#else -void -bsort(void *a, size_t n, size_t es, cmp_t *cmp) -{ - local_bsort(a, n, es, cmp); -} -#endif diff --git a/lib/libc/stdlib/bsort_r.c b/lib/libc/stdlib/bsort_r.c deleted file mode 100644 index 762f3c5aa1ec..000000000000 --- a/lib/libc/stdlib/bsort_r.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is in the public domain. - */ -#include "block_abi.h" -#define I_AM_BSORT_R -#include "bsort.c" - -typedef DECLARE_BLOCK(int, bsort_block, const void *, const void *); - -static int -bsort_b_compare(const void *pa, const void *pb, void *arg) -{ - bsort_block compar; - int (*cmp)(void *, const void *, const void *); - - compar = arg; - cmp = (void *)compar->invoke; - return (cmp(compar, pa, pb)); -} - -void -bsort_b(void *base, size_t nel, size_t width, bsort_block compar) -{ - bsort_r(base, nel, width, &bsort_b_compare, compar); -} diff --git a/lib/libc/stdlib/bsort_s.c b/lib/libc/stdlib/bsort_s.c deleted file mode 100644 index 57abde76a257..000000000000 --- a/lib/libc/stdlib/bsort_s.c +++ /dev/null @@ -1,5 +0,0 @@ -/* - * This file is in the public domain. - */ -#define I_AM_BSORT_S -#include "bsort.c" From nobody Thu Apr 20 17:18: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 4Q2PX10JBPz46LQK for ; Thu, 20 Apr 2023 17:18:57 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 4Q2PX05f07z448D for ; Thu, 20 Apr 2023 17:18:56 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-2f7c281a015so508982f8f.1 for ; Thu, 20 Apr 2023 10:18:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682011134; x=1684603134; 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=aLDH43atIn1gj7+mbkWVgV88FnAOgnaAbZ4u0YODz/Q=; b=AAja6DKTmSRZzjxFPwR45qu52rH91kzofcfCw5QU6cgwYfEe06PjH4zx46VLaH0EAa +uVzZKcAljzGHcShwsRY4BGQPw8wT8/DTKNUX6btjveYIRKHJsa+IdoWC0ht6WsToVVN kK+KHcRLpDguv38PEqN6uOLSW2IyM21ZEIln5/V/GUEMjnhK4Vac7LO482MadjXokgq6 eOtQO6r8GkRkgYQxoUaChwoBm7yIBi50v8kTFEQ1Pl7ieFk/RhCrK01wUHATCLD8zo0t qyhdTUF9Aky0WKJh6YoY9MIC7IRolrMXl6tvP9JfQA2w+53w42x29SvLx7NnYgcYtxML 15Jw== X-Gm-Message-State: AAQBX9e4v1HyIX/o0V+ZOzJtYLpIpz3iqufQXJ2EB9phwqugWWRymyia bk62YEEaOE+pV0XUFJgtmxJItw== X-Google-Smtp-Source: AKy350aFQkQNsvrnYwrTj4BbbRY8/p43lbhVn8G0qvMiN6cCf87xMNYGI3QHins0dMGceI/DsHfB9w== X-Received: by 2002:a05:6000:136a:b0:2ef:9837:6b2b with SMTP id q10-20020a056000136a00b002ef98376b2bmr2145075wrz.21.1682011134529; Thu, 20 Apr 2023 10:18:54 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id f17-20020a5d58f1000000b002cea8e3bd54sm2430860wrd.53.2023.04.20.10.18.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Apr 2023 10:18:53 -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 \(3696.120.41.1.1\)) Subject: Re: git: bb8e8e230d94 - main - Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." From: Jessica Clarke In-Reply-To: <202304201717.33KHHJsQ044448@gitrepo.freebsd.org> Date: Thu, 20 Apr 2023 18:18:53 +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: <145FD575-5987-4BD8-805D-26DB13EBF06A@freebsd.org> References: <202304201717.33KHHJsQ044448@gitrepo.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q2PX05f07z448D 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 20 Apr 2023, at 18:17, Hans Petter Selasky = wrote: >=20 > The branch main has been updated by hselasky: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dbb8e8e230d94c9522bd9ff95c13dc9f5= b1592929 >=20 > commit bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 > Author: Hans Petter Selasky > AuthorDate: 2023-04-20 16:50:32 +0000 > Commit: Hans Petter Selasky > CommitDate: 2023-04-20 17:16:14 +0000 >=20 > Revert "libc: Implement bsort(3) a bitonic type of sorting = algorithm." >=20 > Some points for the future: > - libc is not the right place for sorting algorithms. > Probably libutil is better suited for this purpose or > a dedicated libsort. Should move all sorting algorithms > away from libc eventually. qsort is part of ISO C, so no. > - CheriBSD uses capabilities for memory access, and could > benefit from a standard memswap() function. > - Do something about qsort() in FreeBSD's libc like: > - Mark it deprecated on FreeBSD, as a first step, > due to missing limits on CPU time. Nobody=E2=80=99s saying that, quite the opposite. It=E2=80=99s in ISO C. > - Audit the use of qsort() in the FreeBSD base system > and consider swapping to other existing sorting > algorithms. No. We=E2=80=99re saying to make the implementation better. Jess > Discussed with: brooks@ >=20 > Differential Revision: https://reviews.freebsd.org/D36493 >=20 > This reverts commit a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f. > This reverts commit 7d65a450cdcc7cc743f2ecd114ba3428a21c0033. > This reverts commit 8dcf3a82c54cb216df3213a013047907636a01da. From nobody Thu Apr 20 17:27: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 4Q2Pjs30WYz46M0v; Thu, 20 Apr 2023 17:27:29 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q2Pjr5yZnz4JZg; Thu, 20 Apr 2023 17:27:28 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id F15683C0199; Thu, 20 Apr 2023 17:27:27 +0000 (UTC) Date: Thu, 20 Apr 2023 17:27:27 +0000 From: Brooks Davis To: Hans Petter Selasky Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: bb8e8e230d94 - main - Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." Message-ID: References: <202304201717.33KHHJsQ044448@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: <202304201717.33KHHJsQ044448@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Q2Pjr5yZnz4JZg X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, Apr 20, 2023 at 05:17:19PM +0000, Hans Petter Selasky wrote: > The branch main has been updated by hselasky: > > URL: https://cgit.FreeBSD.org/src/commit/?id=bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 > > commit bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 > Author: Hans Petter Selasky > AuthorDate: 2023-04-20 16:50:32 +0000 > Commit: Hans Petter Selasky > CommitDate: 2023-04-20 17:16:14 +0000 > > Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." Thank you. -- Brooks From nobody Thu Apr 20 17:30: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 4Q2PnB15hGz46Lkn; Thu, 20 Apr 2023 17:30: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 4Q2Pn956bZz4NCh; Thu, 20 Apr 2023 17:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682011821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U8Ee8A7U4EjXLiFEVCzzjc6iIAiuq0CK8EA7l3KKo/0=; b=p18Rxncl+okxMrrjQWP9MkA2uxZuvX6GZT/sHVQaxqA03byX7TvPT5dCZZ3OeUBjnZqLXm apvfbmEji9XciB1LZ3ONRD46mDgCDoUUHjNXi+7Weywwp68SljjrSFSWSrhvFJ/oRxtM+v bLYRiDpUvu2v8u/e1pPYRY6uCy7BhRbKximp3T6kBgweXSEsHOlPBiEKRD/TyBOcBa9Vs+ dETOctSCmrksjMFHATM4tW6A8eZTOtrbvfWDdP7b0wPrARReFHrB032vPri5pLl7S+6Lz9 FjN0vUDLPvtEay10/wSgXdDEqEpk8+kntN7WK+deJQaydcYa9ZHaEBJTnTjl8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682011821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U8Ee8A7U4EjXLiFEVCzzjc6iIAiuq0CK8EA7l3KKo/0=; b=VjJtoHmJXHrlxV2ATfPhyYxrFJ9z/X+P7iMqcnsyWZugdQte0yIM6JIdxPAuGW31m6E5W2 /24sc+P34E2xEEWLSpCmxX6xvQ5upJmcErRRwBM5AJlOZMj5MOBwtPpREVJoKHQzCf5GTR HQNzOl7iCQY9fXBmCtUc43hOq+Uo+J0GJgeOWfdwf1lQWTms9IZ6LIZiK/UwxhgLWOJlZQ hNRId16CGTt4A+325ArTe9A3IJcxHFj5gU0oK1fg833xtJ8JclO/3Sxq9/K13QtwvDDO9W Ok8peeffOckvlcYH2dXtExnDPzmN6BBvdBhtyYiglqpQHSZXobgp/zRosnUBeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682011821; a=rsa-sha256; cv=none; b=i3oiqLzj7Sxb0ZnPzkKAdNWw3ZlRJ4vzhr03ARUFl2YZpnDWtb27pWVaaWj1gWUsL80kDA O/XPynHyX21Ad3Jk916vDX6LU62CFLvTLYl6e6rhdGrhYfIi6tL/U9TRf2fFQgrxEJAkkj emdzll9jDDT2RxAZxz9XGbvmBnAGWxuPqTw/9UUVcS0msAwdX/4jPcLG94EwM1agj/uIYj ksxBneJEFqwlpasDLA+34icMTpT0fSiW2LBnRgH6TFCyhfA3UIqZuxVq5/A++w0FM+9yRg C3xVkwIPJBnnU92J3HYWoEzNHxLThGt8s+QfSvhPkHfGYGb8sjE4/bGQxfc3Qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Pn94CY7zmqJ; Thu, 20 Apr 2023 17:30: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 33KHUL94069786; Thu, 20 Apr 2023 17:30:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KHULvU069785; Thu, 20 Apr 2023 17:30:21 GMT (envelope-from git) Date: Thu, 20 Apr 2023 17:30:21 GMT Message-Id: <202304201730.33KHULvU069785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 312c06634ec3 - stable/13 - pkill: tests: do a pass for case-sensitive conflicts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 312c06634ec3b405377840573f932fd937f51a61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=312c06634ec3b405377840573f932fd937f51a61 commit 312c06634ec3b405377840573f932fd937f51a61 Author: Kyle Evans AuthorDate: 2023-03-20 19:51:41 +0000 Commit: Kyle Evans CommitDate: 2023-04-20 17:29:23 +0000 pkill: tests: do a pass for case-sensitive conflicts As in 76b6a59f9d30a5a39a5ed, encode upper-case flag tests with a leading underbar to avoid collisions (thus, erroneously dirty git repos) on case-sensitive filesystems. PR: 270948 Sponsored by: Klara, Inc. (cherry picked from commit 822057bfbbbcdb722a7ccd0e40d6b7e82b1d83f7) --- ObsoleteFiles.inc | 10 ++++++++++ bin/pkill/tests/Makefile | 16 ++++++++-------- bin/pkill/tests/{pgrep-F_test.sh => pgrep-_f_test.sh} | 0 bin/pkill/tests/{pgrep-LF_test.sh => pgrep-_lf_test.sh} | 0 bin/pkill/tests/{pgrep-P_test.sh => pgrep-_p_test.sh} | 0 bin/pkill/tests/{pgrep-U_test.sh => pgrep-_u_test.sh} | 0 bin/pkill/tests/{pkill-F_test.sh => pkill-_f_test.sh} | 0 bin/pkill/tests/{pkill-LF_test.sh => pkill-_lf_test.sh} | 0 bin/pkill/tests/{pkill-P_test.sh => pkill-_p_test.sh} | 0 bin/pkill/tests/{pkill-U_test.sh => pkill-_u_test.sh} | 0 10 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 39c3e57f93b1..9340f00e9e29 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -52,6 +52,16 @@ # xargs -n1 | sort | uniq -d; # done +# 20230420: case-sensitive conflicts removed +OLD_FILES+=usr/tests/bin/pkill/pgrep-F_test +OLD_FILES+=usr/tests/bin/pkill/pgrep-LF_test +OLD_FILES+=usr/tests/bin/pkill/pgrep-P_test +OLD_FILES+=usr/tests/bin/pkill/pgrep-U_test +OLD_FILES+=usr/tests/bin/pkill/pkill-F_test +OLD_FILES+=usr/tests/bin/pkill/pkill-LF_test +OLD_FILES+=usr/tests/bin/pkill/pkill-P_test +OLD_FILES+=usr/tests/bin/pkill/pkill-U_test + # 20230410: new clang import which bumps version from 14.0.5 to 15.0.7 OLD_FILES+=usr/lib/clang/14.0.5/include/cuda_wrappers/algorithm OLD_FILES+=usr/lib/clang/14.0.5/include/cuda_wrappers/complex diff --git a/bin/pkill/tests/Makefile b/bin/pkill/tests/Makefile index 9bf448bb2460..66a1d655b764 100644 --- a/bin/pkill/tests/Makefile +++ b/bin/pkill/tests/Makefile @@ -7,10 +7,10 @@ PACKAGE= tests PROGS+= spin_helper BINDIR= ${TESTSDIR} -TAP_TESTS_SH= pgrep-F_test -TAP_TESTS_SH+= pgrep-LF_test -TAP_TESTS_SH+= pgrep-P_test -TAP_TESTS_SH+= pgrep-U_test +TAP_TESTS_SH= pgrep-_f_test +TAP_TESTS_SH+= pgrep-_lf_test +TAP_TESTS_SH+= pgrep-_p_test +TAP_TESTS_SH+= pgrep-_u_test TAP_TESTS_SH+= pgrep-_g_test TAP_TESTS_SH+= pgrep-_s_test TAP_TESTS_SH+= pgrep-g_test @@ -27,10 +27,10 @@ TAP_TESTS_SH+= pgrep-s_test TAP_TESTS_SH+= pgrep-t_test TAP_TESTS_SH+= pgrep-v_test TAP_TESTS_SH+= pgrep-x_test -TAP_TESTS_SH+= pkill-F_test -TAP_TESTS_SH+= pkill-LF_test -TAP_TESTS_SH+= pkill-P_test -TAP_TESTS_SH+= pkill-U_test +TAP_TESTS_SH+= pkill-_f_test +TAP_TESTS_SH+= pkill-_lf_test +TAP_TESTS_SH+= pkill-_p_test +TAP_TESTS_SH+= pkill-_u_test TAP_TESTS_SH+= pkill-_g_test TAP_TESTS_SH+= pkill-g_test TAP_TESTS_SH+= pkill-i_test diff --git a/bin/pkill/tests/pgrep-F_test.sh b/bin/pkill/tests/pgrep-_f_test.sh similarity index 100% rename from bin/pkill/tests/pgrep-F_test.sh rename to bin/pkill/tests/pgrep-_f_test.sh diff --git a/bin/pkill/tests/pgrep-LF_test.sh b/bin/pkill/tests/pgrep-_lf_test.sh similarity index 100% rename from bin/pkill/tests/pgrep-LF_test.sh rename to bin/pkill/tests/pgrep-_lf_test.sh diff --git a/bin/pkill/tests/pgrep-P_test.sh b/bin/pkill/tests/pgrep-_p_test.sh similarity index 100% rename from bin/pkill/tests/pgrep-P_test.sh rename to bin/pkill/tests/pgrep-_p_test.sh diff --git a/bin/pkill/tests/pgrep-U_test.sh b/bin/pkill/tests/pgrep-_u_test.sh similarity index 100% rename from bin/pkill/tests/pgrep-U_test.sh rename to bin/pkill/tests/pgrep-_u_test.sh diff --git a/bin/pkill/tests/pkill-F_test.sh b/bin/pkill/tests/pkill-_f_test.sh similarity index 100% rename from bin/pkill/tests/pkill-F_test.sh rename to bin/pkill/tests/pkill-_f_test.sh diff --git a/bin/pkill/tests/pkill-LF_test.sh b/bin/pkill/tests/pkill-_lf_test.sh similarity index 100% rename from bin/pkill/tests/pkill-LF_test.sh rename to bin/pkill/tests/pkill-_lf_test.sh diff --git a/bin/pkill/tests/pkill-P_test.sh b/bin/pkill/tests/pkill-_p_test.sh similarity index 100% rename from bin/pkill/tests/pkill-P_test.sh rename to bin/pkill/tests/pkill-_p_test.sh diff --git a/bin/pkill/tests/pkill-U_test.sh b/bin/pkill/tests/pkill-_u_test.sh similarity index 100% rename from bin/pkill/tests/pkill-U_test.sh rename to bin/pkill/tests/pkill-_u_test.sh From nobody Thu Apr 20 17:36: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 4Q2Pvt6dwKz46M7f; Thu, 20 Apr 2023 17:36: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 4Q2Pvt4rDSz3JFb; Thu, 20 Apr 2023 17:36:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682012170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CLuksVCbVWcisCBzs5MwqECmOnTAmwekWhCgC4y8wfk=; b=A/ouw9i5Y2zJ097IdpwsQW8tI5AbsgXWvauUp1bHqmrlrM8AZd8tmbcMNkoDd4IDhV19Tk RBedlat75PXTWY0+/A06jfX4+sYQ/m8wkxwTPL65AUR3FEOxfE4D70/JBSBlWqm3IkOH0b 2u0UvwD5V47s45Xbk/Y0ZkgyuCbbtoa412pheI4c8Qj0jtTcQiHrkmA0xdYGn2S2aiJFyy KPAlrBTWoL6qwDtGaPeFBDTRo3ztvAUmVSPKt/C8sYVm9JH534C9e430SBETRlnbPQq84t 87pwlXVMCsnJfgsFnVOghxYhrohtcIWoc12BPjZ3dIZyiJuTD+/b4t6Sw78kYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682012170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CLuksVCbVWcisCBzs5MwqECmOnTAmwekWhCgC4y8wfk=; b=VA5GVg2TC12LSqRscwuUAfssD7aHkU45zv1DDK1Z/6f51entlRJpiS8ueawNIVZ/NJ1HQ/ /AlN5hFJN1r3Xk8792XBOpIWuHxAgh773WRfmTlhT/qmr7vtPmlW6g9QGw5ByXY9AmSk6U xDoJuf+EqfvPsfnSUJUZGz6z6Sl1Bbtzmer9EsneefzJ1Bipa6A2YXGYM5Q5YmltTxGeoC FpUXGoFS4sQJIsAQMGeiHlRUwAWyjJiL0rf8irfU0xuaVQHcIOlU4kz8Ws1QgL8a7aRTDu RSJ6l1ZAM4himJOQ/UrYdPJXHtYhDE7XhxDAHGrpsv35PWj8HlBHfXa+CEl6sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682012170; a=rsa-sha256; cv=none; b=CKon+F5SA4AanGRaQ5/s3pkifjU7t0q7QCL2/hWbLSiITG7CBmZPHM+KT5/HBs3ugnJnZL uBy+RWXwqgfBPLzLRLQWQnX0pN5FQTplJh9dVTVNxqLfXVZMb5ELlg7mM729yQaHrzFJ6Z Kh8HWwTlfkkw6Cpx7PDXf7KZqSaC82s5PtCXnBvEC0W0ofJuNzNE3lBQJSPUsWn0DWWkyN 0V64dVC3IQBFcY87Ae282d1bqN0PRoamz/31+FR/QP4G/U8h+SBkc7M0etdn4UT/LPozNA 5pqCzEq06XY2szPAKa3PCgwkJKyPXtlwIO4Pko9QZMs46oNkCBSWQpOW3G1dHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Pvt3vFgzmnq; Thu, 20 Apr 2023 17:36: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 33KHaAqa077228; Thu, 20 Apr 2023 17:36:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KHaAYw077227; Thu, 20 Apr 2023 17:36:10 GMT (envelope-from git) Date: Thu, 20 Apr 2023 17:36:10 GMT Message-Id: <202304201736.33KHaAYw077227@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: 1a149d65baed - main - dtrace: get rid of uchar_t types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1a149d65baed31b90a0b8abe2d6c5a568122a5ec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1a149d65baed31b90a0b8abe2d6c5a568122a5ec commit 1a149d65baed31b90a0b8abe2d6c5a568122a5ec Author: Christos Margiolis AuthorDate: 2023-04-20 16:19:42 +0000 Commit: Mark Johnston CommitDate: 2023-04-20 17:35:56 +0000 dtrace: get rid of uchar_t types Callers are specifying uint8_t anyway and this slightly reduces dependencies on compatibility typedefs. No functional change intended. Reviewed by: markj, mhorne MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39490 --- sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h | 4 ++-- sys/cddl/dev/dtrace/amd64/dtrace_subr.c | 4 ++-- sys/cddl/dev/dtrace/i386/dtrace_subr.c | 4 ++-- sys/cddl/dev/dtrace/x86/instr_size.c | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index 5cad5a3b18c9..d3d8fbca6164 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2399,8 +2399,8 @@ extern void dtrace_safe_synchronous_signal(void); extern int dtrace_mach_aframes(void); #if defined(__i386) || defined(__amd64) -extern int dtrace_instr_size(uchar_t *instr); -extern int dtrace_instr_size_isa(uchar_t *, model_t, int *); +extern int dtrace_instr_size(uint8_t *instr); +extern int dtrace_instr_size_isa(uint8_t *, model_t, int *); extern void dtrace_invop_callsite(void); #endif extern void dtrace_invop_add(int (*)(uintptr_t, struct trapframe *, uintptr_t)); diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c index 2521afc7b443..c4a36e851c3f 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c @@ -449,7 +449,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * Offset the instruction pointer to the instruction * following the one causing the fault. */ - frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip); + frame->tf_rip += dtrace_instr_size((uint8_t *) frame->tf_rip); return (1); /* Page fault. */ case T_PAGEFLT: @@ -461,7 +461,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * Offset the instruction pointer to the instruction * following the one causing the fault. */ - frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip); + frame->tf_rip += dtrace_instr_size((uint8_t *) frame->tf_rip); return (1); default: /* Handle all other traps in the usual way. */ diff --git a/sys/cddl/dev/dtrace/i386/dtrace_subr.c b/sys/cddl/dev/dtrace/i386/dtrace_subr.c index 69a07e8ee968..dedc1ffe84c8 100644 --- a/sys/cddl/dev/dtrace/i386/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/i386/dtrace_subr.c @@ -449,7 +449,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * Offset the instruction pointer to the instruction * following the one causing the fault. */ - frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip); + frame->tf_eip += dtrace_instr_size((uint8_t *) frame->tf_eip); return (1); /* Page fault. */ case T_PAGEFLT: @@ -461,7 +461,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * Offset the instruction pointer to the instruction * following the one causing the fault. */ - frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip); + frame->tf_eip += dtrace_instr_size((uint8_t *) frame->tf_eip); return (1); default: /* Handle all other traps in the usual way. */ diff --git a/sys/cddl/dev/dtrace/x86/instr_size.c b/sys/cddl/dev/dtrace/x86/instr_size.c index 6eea987244b1..a2a9b9342566 100644 --- a/sys/cddl/dev/dtrace/x86/instr_size.c +++ b/sys/cddl/dev/dtrace/x86/instr_size.c @@ -49,8 +49,8 @@ typedef u_int model_t; #define DATAMODEL_NATIVE 0 -int dtrace_instr_size(uchar_t *); -int dtrace_instr_size_isa(uchar_t *, model_t, int *); +int dtrace_instr_size(uint8_t *); +int dtrace_instr_size_isa(uint8_t *, model_t, int *); #endif #include @@ -83,7 +83,7 @@ static int dtrace_dis_get_byte(void *p) { int ret; - uchar_t **instr = p; + uint8_t **instr = p; ret = **instr; *instr += 1; @@ -101,7 +101,7 @@ dtrace_dis_get_byte(void *p) */ /* ARGSUSED2 */ static int -dtrace_dis_isize(uchar_t *instr, dis_isize_t which, model_t model, int *rmindex) +dtrace_dis_isize(uint8_t *instr, dis_isize_t which, model_t model, int *rmindex) { int sz; dis86_t x; @@ -127,13 +127,13 @@ dtrace_dis_isize(uchar_t *instr, dis_isize_t which, model_t model, int *rmindex) } int -dtrace_instr_size_isa(uchar_t *instr, model_t model, int *rmindex) +dtrace_instr_size_isa(uint8_t *instr, model_t model, int *rmindex) { return (dtrace_dis_isize(instr, DIS_ISIZE_INSTR, model, rmindex)); } int -dtrace_instr_size(uchar_t *instr) +dtrace_instr_size(uint8_t *instr) { return (dtrace_dis_isize(instr, DIS_ISIZE_INSTR, DATAMODEL_NATIVE, NULL)); From nobody Thu Apr 20 17:36: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 4Q2Pvw07spz46MHK; Thu, 20 Apr 2023 17: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 4Q2Pvv5m2jz3JJh; Thu, 20 Apr 2023 17:36:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682012171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MgynPMH6yE7rYZGNJkgsSwk2M63z2SUGn11y82shkvs=; b=SJU9JAsMQBAjXtAdgnEJ36mAqeSXurdOME1QkQyuUIL7VUwCpUJzG2ebNcAymtLsP4ictr njJtnf0UbEwsT/p1AfXYNaz5XL0Ca7RlwId1HXCU5Dujzgn9ACo6WIxn30ORIs9Yc72qxk Pes1jvz0XyaMTuP/2YvtDe+ZlRN6fJes+isSyzRaok/HhyueTmPwGgXzT7PcTnPHnHM04l smb2t6WAQke2qtFe70pv4UNdF+mvymu68j6sDaiyYAEdtzkH7LcbzIyYE4f67giPmLJ9Dc IkbXgRZNWXcPigxRxT4WWKP6kjkn2XrprTGdXqvyjoEwDFQgOM18v0vIo+SsWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682012171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MgynPMH6yE7rYZGNJkgsSwk2M63z2SUGn11y82shkvs=; b=COkZ4aAjSo9NfD7KU/jjXBL6evh4QvZek0vKj2bc+h6mc4S8aOPaAIlAPQBgh/xdXHg7FF 2Q4Bw8vySzFGU/92PzLnaM6F4yfvcVXORm7CJr6OJdfd6iX72mjJF6G9p1bxwZmZvEWxgH hsop5J4RM3OYFyDUYui+LR4h4/PCX78vCGYYc7qWRfbY/rQvqonlcDi9/rZ03gLcqp/X7J YWis85HBK7FbqBYjOA4Wy3cqO/5FRc7FTuXVr+ETEE2FvVV5TP/CO7QIpjIrdy03UOMGwQ YRyMB2bf/b/orr+ehOY+favKQVaYsPzJfxxgPDkbZJZiFVkQuBuLAhZglOPh4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682012171; a=rsa-sha256; cv=none; b=e/TFSLUBt+I7v3W9rXdhr7nkuWGJSBc/xTcKpveYzsn96t57Iyei83rllk0ba8/HUTEMBD iIGq0ScOgJk36IyNs2LKP4UiXFG5KsXsVmloalhg6RyMokjL7fSsmSdK9oNmq/4JEFMJ8O q15/YJSKwrpA7YeXGzF9XZbaSQkErOFT8Ir5xt/z3W+SqlwQ9HgkraMe4ELuYepc1SNuYu Vf86BEv11AnOetaxwXS34aRQNOd+Q+1LRXIMqWmu5YaP4CPrhwH4/MDKglPnS15d1g0D16 AtgIQ8TK16H7IH7/xIMW1h8gcpIGaieJVFgfrqpf2AernaiSGr9zNuWSsMkaPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Pvv4q4dzn2Q; Thu, 20 Apr 2023 17:36: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 33KHaBBc077248; Thu, 20 Apr 2023 17:36:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KHaBjD077247; Thu, 20 Apr 2023 17:36:11 GMT (envelope-from git) Date: Thu, 20 Apr 2023 17:36:11 GMT Message-Id: <202304201736.33KHaBjD077247@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: 080e56a6c98c - main - dtrace: expose dtrace_instr_size() to userland and implement it for riscv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 080e56a6c98c7e7a241a4260d4c19d3cad5b22af Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=080e56a6c98c7e7a241a4260d4c19d3cad5b22af commit 080e56a6c98c7e7a241a4260d4c19d3cad5b22af Author: Christos Margiolis AuthorDate: 2023-04-20 16:21:46 +0000 Commit: Mark Johnston CommitDate: 2023-04-20 17:35:57 +0000 dtrace: expose dtrace_instr_size() to userland and implement it for riscv dtrace_instr_size() is needed by the forthcoming RISC-V port of kinst, as well as by libdtrace in D38825 for both amd64 and RISC-V. Reviewed by: markj, mhorne MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39489 --- cddl/lib/libdtrace/Makefile | 6 +++++- .../contrib/opensolaris/uts/common/sys/dtrace.h | 5 ++++- sys/cddl/dev/dtrace/riscv/instr_size.c | 22 ++++++++++++++++++++++ sys/modules/dtrace/dtrace/Makefile | 4 ++++ 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 651609409a3a..84258169e44a 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -122,10 +122,14 @@ CFLAGS+= -I${OPENSOLARIS_SYS_DISTDIR}/uts/intel .endif .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" -SRCS+= dis_tables.c +SRCS+= dis_tables.c instr_size.c DSRCS+= regs_x86.d .endif +.if ${MACHINE_CPUARCH} == "riscv" +SRCS+= instr_size.c +.endif + YFLAGS+=-d LIBADD= ctf elf proc pthread rtld_db diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index d3d8fbca6164..7b8da08e9ae9 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2399,7 +2399,6 @@ extern void dtrace_safe_synchronous_signal(void); extern int dtrace_mach_aframes(void); #if defined(__i386) || defined(__amd64) -extern int dtrace_instr_size(uint8_t *instr); extern int dtrace_instr_size_isa(uint8_t *, model_t, int *); extern void dtrace_invop_callsite(void); #endif @@ -2428,6 +2427,10 @@ extern void dtrace_helpers_destroy(proc_t *); #endif /* _KERNEL */ +#if defined(__i386) || defined(__amd64) || defined (__riscv) +extern int dtrace_instr_size(uint8_t *instr); +#endif + #endif /* _ASM */ #if defined(__i386) || defined(__amd64) diff --git a/sys/cddl/dev/dtrace/riscv/instr_size.c b/sys/cddl/dev/dtrace/riscv/instr_size.c new file mode 100644 index 000000000000..bfdc962f4aa9 --- /dev/null +++ b/sys/cddl/dev/dtrace/riscv/instr_size.c @@ -0,0 +1,22 @@ +/* + * SPDX-License-Identifier: CDDL 1.0 + * + * Copyright 2023 Christos Margiolis + */ + +#include +#include + +#include + +#define RVC_MASK 0x03 + +int +dtrace_instr_size(uint8_t *instr) +{ + /* Detect compressed instructions. */ + if ((~(*instr) & RVC_MASK) == 0) + return (INSN_SIZE); + else + return (INSN_C_SIZE); +} diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index 0bd81bb39db0..1513418281ad 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -22,8 +22,12 @@ SRCS+= dis_tables.c \ instr_size.c CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/intel \ -I${SYSDIR}/cddl/dev/dtrace/x86 +.endif +.if ${MACHINE_CPUARCH} == "riscv" +SRCS+= instr_size.c .endif + CFLAGS+= ${OPENZFS_CFLAGS} SRCS+= bus_if.h device_if.h vnode_if.h From nobody Thu Apr 20 17: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 4Q2Pvx3ym7z46MMg; Thu, 20 Apr 2023 17:36: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 4Q2Pvx0cvmz3JD0; Thu, 20 Apr 2023 17:36:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682012173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NLNg01ihJmZuMVkypELmRewKVIumAksYk6O39Em5XHQ=; b=NjT1lo7qw56TDTw8UEW1x48AXhvSxihgR8y5uDTfvm6kmfJzW6WW6dA5GqQXhjcNYwRWRA a1+F4ipL5ZUvdPaxUDuJgZ6XaUYDm8lFeg5h+YJJoj5+1ku3GtZrjXuhBdb9OK6rTHup4j joc4GVxZ6I8wqMpBF3qerLSZisi04q66xAXBgwoEiw3UagLB1SoB+3ngdbULzdj5U6G0w2 tIAONpgFtpfpe6LfVaAnZwiQvSUx1ZkyOyKz9G7EsKSE8pQHWsi3yVQfAvNHNU+fAzLN3C nBloT0+v+5Qo1xG7GpgnRCEIYHM9nVYR7FsuQxdE17rgLb7kWlUdQC/zRBcWeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682012173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NLNg01ihJmZuMVkypELmRewKVIumAksYk6O39Em5XHQ=; b=gMPkmXEYoKt6bWESpZNpLArH/cUFlLG7DX2r5ZhOxGQCnvj+jcUen9dp3rhYd9sXQ4futd 4UFcE5P82C7p2Ur0BOWeUcc48li+Jf+oje+saV1BLVPv9oJeJtfnrOGG0eUHm/tIRzS5R8 fj4tENPUwurOwSwv5pEY5W8D3VtsxyETf3yOENNnSvrltavZ6cqtq1wZYPJwPMrhG7bjKD YWD5Z6O1XVfbNEWbFPYwz3dK0pjlRV5ooHr5+pzVccNiL7Zf72FqMc6UXxnXIhhFEWKVZe 6cJ/N2IbSnOQjOH+G400F0uJBev+5VM3llMmgcoJuV5MM+tXe/r2/RL1OdGiFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682012173; a=rsa-sha256; cv=none; b=J7uoqZng1N/8/ZzQnAnxV7/sAf70BJbybpt3TFNsBGdgRB7B1vD15RcCjVgCF07IXUgXpi NO1SEQLZOOtR+ep3ztgVyM13grNiO2vntgbOO+1uAzFV62f0k5CPTUrB7Lf4uvbYVikbFd nUzi0zRiJEJAWHZxCe8CELnjB45rczU+I6mCVg+0/U/dZJrJj5MBDANe/H0joc1ZzatMZ9 Fac6fJIQoO1PfbPAKyG5KP7MI882ZV7evdEtOmU7Yxdpur9GzWrzOtBZ36bA78QujhMpgT 36tU/U/HXCvpMFUnyLkxaTW1EHq5HiFttFKaG7FioMKj+fBttIVm9QE3FE3oIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Pvw5zYtzmcD; Thu, 20 Apr 2023 17: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 33KHaCwr077267; Thu, 20 Apr 2023 17: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 33KHaCXC077266; Thu, 20 Apr 2023 17:36:12 GMT (envelope-from git) Date: Thu, 20 Apr 2023 17:36:12 GMT Message-Id: <202304201736.33KHaCXC077266@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: 75081b9ed8e6 - main - dtrace: use dtrace_instr_size() in the riscv dtrace_subr.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75081b9ed8e67c8443551828f1b5ccf3d449b41b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=75081b9ed8e67c8443551828f1b5ccf3d449b41b commit 75081b9ed8e67c8443551828f1b5ccf3d449b41b Author: Christos Margiolis AuthorDate: 2023-04-20 16:24:03 +0000 Commit: Mark Johnston CommitDate: 2023-04-20 17:35:57 +0000 dtrace: use dtrace_instr_size() in the riscv dtrace_subr.c No functional change intended. Reviewed by: mhorne, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39652 --- sys/cddl/dev/dtrace/riscv/dtrace_subr.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c index 1717b118be7e..f42c073f94c9 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c @@ -190,8 +190,6 @@ dtrace_gethrestime(void) int dtrace_trap(struct trapframe *frame, u_int type) { - uint16_t insn; - /* * A trap can occur while DTrace executes a probe. Before * executing the probe, DTrace blocks re-scheduling and sets @@ -219,15 +217,10 @@ dtrace_trap(struct trapframe *frame, u_int type) /* * Offset the instruction pointer to the instruction - * following the one causing the fault. Check if the - * instruction is compressed or not. Standard - * instructions always have bits [1:0] == 11. + * following the one causing the fault. */ - insn = *(uint16_t *)frame->tf_sepc; - if (match_opcode(insn, 0x3, 0x3)) - frame->tf_sepc += INSN_SIZE; - else - frame->tf_sepc += INSN_C_SIZE; + frame->tf_sepc += + dtrace_instr_size((uint8_t *)frame->tf_sepc); return (1); default: From nobody Thu Apr 20 17:36: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 4Q2Pvy2F0fz46MXl; Thu, 20 Apr 2023 17:36: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 4Q2Pvy11yfz3JWR; Thu, 20 Apr 2023 17:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682012174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uc4yyUyl9vSiKiWLuheADZqVMgBMQ6CLLzbCHpN1v6c=; b=fA+Vjjwvv40pz/UoJBebNYR724k1HRYClXsdsc7L0lThZIilR+ikSui3g6TWEaEEsnoxva 4icXVo4XbiYOmj87QfUzhurxAy0RIYdpitvJOC1rypEva4vIbpydl5U4N7PpBviMScCL1R iktTsLk0hKTngGk5p/miGSDWmoNgF0d7U1xbYacgOUDRPdkaHRFgWvMN5H8MgsJUUTfwgV 3MXXvobloHpeMdPyGwk7dc9cR6ChMGw/TG1wFMrI1gPVXTMrkymYP2qbQvgq/zX4eAGjG8 5IRS6NuHu2m7gOdc532batZeLBXgxX2ob0dL+PKV9gAdRP4AbWco5vIZSRikQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682012174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uc4yyUyl9vSiKiWLuheADZqVMgBMQ6CLLzbCHpN1v6c=; b=vvh1UmqgxB3IftimvtyqSyI4oEBc1dXOPDNlSA+2uE3qEl+8WXE8Yxd8OLUbg23XMiYzUP 9xr69EOHFMvTkprbyPUPysESNYkWvr4thG2eL3Ue7pFAUnxmmTmtlO+k5oXkZwdi9dNcX+ dE8VBOSNB2pSIhg4AEriQY7KHB+Kkj7sgSjPcyFCfnMnquPnJPHTY3nU40QyNMhIJZnXPF Qtp+yRsjFDNpMuYKbfbK94+SJL7Or9oqizxRNWqyFqnrJkKTpvEkEUdJrWIVKI6tn6Q8A8 J7+SXcQoILMU/iOHJqi0SVGoK627sqr0WIS2/qwgETPMDY+ij8Qkcmd8mjHlgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682012174; a=rsa-sha256; cv=none; b=J6lV+iWM8u6411EFGPWuMNEcTgNLIT7vz6RKwAuynvLJvmUCaazfOlVKjfreVP4S9S95m8 xSBJX/WUb3Oabve5hHLTJ+G5vpjmDFVYoKmaqysiaPbZg/dGv2cf3JcALKjfZsLZNGmcTV pNvIJPBqqIOQo7nkwZnteKAqgT51HBTurdP51TAD/Cs4kr3wjFsdS4FACsAwQEECuKZVMi K9AIR3VhuIc74kXNDssImbS+Kzu6QF1Hta4gn35cA5oJYjzMPnPzNthijW5Db22EmI5W+d lEXQtvSdXrYsrCjBksm2LdTL/1i8h98aHaAxmaFZkAU9naaB9foS5lCWcjgQJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Pvx6w6Wzmlp; Thu, 20 Apr 2023 17:36: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 33KHaDP6077289; Thu, 20 Apr 2023 17:36:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KHaD5Z077288; Thu, 20 Apr 2023 17:36:13 GMT (envelope-from git) Date: Thu, 20 Apr 2023 17:36:13 GMT Message-Id: <202304201736.33KHaD5Z077288@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: 1fef7abdc76b - main - dtrace: add register bindings for RISC-V List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1fef7abdc76bd6f0c93775bd0c1b62b523abd20d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1fef7abdc76bd6f0c93775bd0c1b62b523abd20d commit 1fef7abdc76bd6f0c93775bd0c1b62b523abd20d Author: Christos Margiolis AuthorDate: 2023-04-20 16:25:37 +0000 Commit: Mark Johnston CommitDate: 2023-04-20 17:35:57 +0000 dtrace: add register bindings for RISC-V Reviewed by: mhorne, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39611 --- cddl/lib/libdtrace/Makefile | 1 + cddl/lib/libdtrace/regs_riscv.d | 74 ++++++++++++++++++++++++++++++++++ sys/cddl/dev/dtrace/riscv/dtrace_isa.c | 32 +++++++++++++-- sys/cddl/dev/dtrace/riscv/regset.h | 35 +++++++++++++++- 4 files changed, 137 insertions(+), 5 deletions(-) diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index 84258169e44a..468603633658 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -128,6 +128,7 @@ DSRCS+= regs_x86.d .if ${MACHINE_CPUARCH} == "riscv" SRCS+= instr_size.c +DSRCS+= regs_riscv.d .endif YFLAGS+=-d diff --git a/cddl/lib/libdtrace/regs_riscv.d b/cddl/lib/libdtrace/regs_riscv.d new file mode 100644 index 000000000000..e8a9667d2efd --- /dev/null +++ b/cddl/lib/libdtrace/regs_riscv.d @@ -0,0 +1,74 @@ +/* + * SPDX-License-Identifier: CDDL 1.0 + * + * Copyright 2023 Christos Margiolis + */ + +inline int R_ZERO = 0; +#pragma D binding "1.13" R_ZERO +inline int R_RA = 1; +#pragma D binding "1.13" R_RA +inline int R_SP = 2; +#pragma D binding "1.13" R_SP +inline int R_GP = 3; +#pragma D binding "1.13" R_GP +inline int R_TP = 4; +#pragma D binding "1.13" R_TP +inline int R_T0 = 5; +#pragma D binding "1.13" R_T0 +inline int R_T1 = 6; +#pragma D binding "1.13" R_T1 +inline int R_T2 = 7; +#pragma D binding "1.13" R_T2 +inline int R_S0 = 8; +#pragma D binding "1.13" R_S0 +inline int R_FP = 8; +#pragma D binding "1.13" R_FP +inline int R_S1 = 9; +#pragma D binding "1.13" R_S1 +inline int R_A0 = 10; +#pragma D binding "1.13" R_A0 +inline int R_A1 = 11; +#pragma D binding "1.13" R_A1 +inline int R_A2 = 12; +#pragma D binding "1.13" R_A2 +inline int R_A3 = 13; +#pragma D binding "1.13" R_A3 +inline int R_A4 = 14; +#pragma D binding "1.13" R_A4 +inline int R_A5 = 15; +#pragma D binding "1.13" R_A5 +inline int R_A6 = 16; +#pragma D binding "1.13" R_A6 +inline int R_A7 = 17; +#pragma D binding "1.13" R_A7 +inline int R_S2 = 18; +#pragma D binding "1.13" R_S2 +inline int R_S3 = 19; +#pragma D binding "1.13" R_S3 +inline int R_S4 = 20; +#pragma D binding "1.13" R_S4 +inline int R_S5 = 21; +#pragma D binding "1.13" R_S5 +inline int R_S6 = 22; +#pragma D binding "1.13" R_S6 +inline int R_S7 = 23; +#pragma D binding "1.13" R_S7 +inline int R_S8 = 24; +#pragma D binding "1.13" R_S8 +inline int R_S9 = 25; +#pragma D binding "1.13" R_S9 +inline int R_S10 = 26; +#pragma D binding "1.13" R_S10 +inline int R_S11 = 27; +#pragma D binding "1.13" R_S11 +inline int R_T3 = 28; +#pragma D binding "1.13" R_T3 +inline int R_T4 = 29; +#pragma D binding "1.13" R_T4 +inline int R_T5 = 30; +#pragma D binding "1.13" R_T5 +inline int R_T6 = 31; +#pragma D binding "1.13" R_T6 +inline int R_PC = 32; +#pragma D binding "1.13" R_PC diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c index 6e6459a8ce74..61743c42d9b7 100644 --- a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c @@ -311,10 +311,34 @@ dtrace_getstackdepth(int aframes) ulong_t dtrace_getreg(struct trapframe *rp, uint_t reg) { - - printf("IMPLEMENT ME: %s\n", __func__); - - return (0); + switch (reg) { + case REG_ZERO: + return (0); + case REG_RA: + return (rp->tf_ra); + case REG_SP: + return (rp->tf_sp); + case REG_GP: + return (rp->tf_gp); + case REG_TP: + return (rp->tf_tp); + case REG_T0 ... REG_T2: + return (rp->tf_t[reg - REG_T0]); + case REG_S0 ... REG_S1: + return (rp->tf_s[reg - REG_S0]); + case REG_A0 ... REG_A7: + return (rp->tf_a[reg - REG_A0]); + case REG_S2 ... REG_S11: + return (rp->tf_s[reg - REG_S2 + 2]); + case REG_T3 ... REG_T6: + return (rp->tf_t[reg - REG_T3 + 3]); + case REG_PC: + return (rp->tf_sepc); + default: + DTRACE_CPUFLAG_SET(CPU_DTRACE_ILLOP); + return (0); + } + /* NOTREACHED */ } static int diff --git a/sys/cddl/dev/dtrace/riscv/regset.h b/sys/cddl/dev/dtrace/riscv/regset.h index f99b48f8354f..034781f11238 100644 --- a/sys/cddl/dev/dtrace/riscv/regset.h +++ b/sys/cddl/dev/dtrace/riscv/regset.h @@ -42,7 +42,40 @@ extern "C" { #endif -/* Place here */ +#define REG_ZERO 0 +#define REG_RA 1 +#define REG_SP 2 +#define REG_GP 3 +#define REG_TP 4 +#define REG_T0 5 +#define REG_T1 6 +#define REG_T2 7 +#define REG_S0 8 +#define REG_FP 8 +#define REG_S1 9 +#define REG_A0 10 +#define REG_A1 11 +#define REG_A2 12 +#define REG_A3 13 +#define REG_A4 14 +#define REG_A5 15 +#define REG_A6 16 +#define REG_A7 17 +#define REG_S2 18 +#define REG_S3 19 +#define REG_S4 20 +#define REG_S5 21 +#define REG_S6 22 +#define REG_S7 23 +#define REG_S8 24 +#define REG_S9 25 +#define REG_S10 26 +#define REG_S11 27 +#define REG_T3 28 +#define REG_T4 29 +#define REG_T5 30 +#define REG_T6 31 +#define REG_PC 32 #ifdef __cplusplus } From nobody Thu Apr 20 17:54:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2QJv2FSbz46N77; Thu, 20 Apr 2023 17:54:23 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q2QJt6Rkvz43Q0; Thu, 20 Apr 2023 17:54:22 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 72EE3260492; Thu, 20 Apr 2023 19:54:12 +0200 (CEST) Message-ID: Date: Thu, 20 Apr 2023 19:54:12 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: bb8e8e230d94 - main - Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202304201717.33KHHJsQ044448@gitrepo.freebsd.org> <145FD575-5987-4BD8-805D-26DB13EBF06A@freebsd.org> Content-Language: en-US From: Hans Petter Selasky In-Reply-To: <145FD575-5987-4BD8-805D-26DB13EBF06A@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q2QJt6Rkvz43Q0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 19:18, Jessica Clarke wrote: > On 20 Apr 2023, at 18:17, Hans Petter Selasky wrote: >> >> The branch main has been updated by hselasky: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 >> >> commit bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 >> Author: Hans Petter Selasky >> AuthorDate: 2023-04-20 16:50:32 +0000 >> Commit: Hans Petter Selasky >> CommitDate: 2023-04-20 17:16:14 +0000 >> >> Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." >> >> Some points for the future: >> - libc is not the right place for sorting algorithms. >> Probably libutil is better suited for this purpose or >> a dedicated libsort. Should move all sorting algorithms >> away from libc eventually. > > qsort is part of ISO C, so no. Hi Jessica, I know, and maybe it shouldn't be part of ISO C in the future. >> - CheriBSD uses capabilities for memory access, and could >> benefit from a standard memswap() function. >> - Do something about qsort() in FreeBSD's libc like: >> - Mark it deprecated on FreeBSD, as a first step, >> due to missing limits on CPU time. > > Nobody’s saying that, quite the opposite. It’s in ISO C. https://en.cppreference.com/w/c/algorithm/qsort Quote: "Despite the name, neither C nor POSIX standards require this function to be implemented using quicksort or make any complexity or stability guarantees." This is the definition of chaos. ISO C says qsort() may be just anything? How can programmers rely on this? > >> - Audit the use of qsort() in the FreeBSD base system >> and consider swapping to other existing sorting >> algorithms. > > No. We’re saying to make the implementation better. Someone interested needs to drive it. And it needs to be agreed what qsort() should really do - why not just call heapsort()? We are still in compliance with ISO C by doing that. Anyway, my time budget on sorting problems is far exceeded, and I would like to suggest a general warning flag __may_be_slow, as appropriate for qsort(). Isn't that just what ISO C says about qsort() ? I've put up a review here for you all: https://reviews.freebsd.org/D39723 --HPS From nobody Thu Apr 20 17:54: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 4Q2QKP2DRrz46N9G; Thu, 20 Apr 2023 17:54:49 +0000 (UTC) (envelope-from hselasky@freebsd.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q2QKN6Blrz44FT; Thu, 20 Apr 2023 17:54:48 +0000 (UTC) (envelope-from hselasky@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D65AC260492; Thu, 20 Apr 2023 19:54:47 +0200 (CEST) Message-ID: <5d7cebf2-9a20-0d10-8e0e-8ecc81678797@freebsd.org> Date: Thu, 20 Apr 2023 19:54:46 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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.10.0 Subject: Re: git: bb8e8e230d94 - main - Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." Content-Language: en-US To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202304201717.33KHHJsQ044448@gitrepo.freebsd.org> From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q2QKN6Blrz44FT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4/20/23 19:27, Brooks Davis wrote: > On Thu, Apr 20, 2023 at 05:17:19PM +0000, Hans Petter Selasky wrote: >> The branch main has been updated by hselasky: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 >> >> commit bb8e8e230d94c9522bd9ff95c13dc9f5b1592929 >> Author: Hans Petter Selasky >> AuthorDate: 2023-04-20 16:50:32 +0000 >> Commit: Hans Petter Selasky >> CommitDate: 2023-04-20 17:16:14 +0000 >> >> Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm." > > Thank you. > You are welcome! --HPS From nobody Thu Apr 20 18:01: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 4Q2QSn5Zy5z46NsH; Thu, 20 Apr 2023 18:01: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 4Q2QSn4QH6z4GH7; Thu, 20 Apr 2023 18:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682013673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q1CIEiKtG98BnNTvusGPwoOMvxacb5yS1v9CBehg2a4=; b=AStqKPsXq/D6Vd8xLPaSbUhQyRyRIv259v3WoVbddJuQxqul49+rS2XszkPGhIIy6aYFPQ gnal2oHlG9u9S/nOaBJi6QFap2yo1MtBKbrEVWUHr/QHfW+xffMT8SEg3Nh+uKc9dVq+Kj cE9L1jAgCvdNq8x/f4iHO1H01iYZGL4Ot8R8eKQuSdaQda8pAAbOnhZ600CBC2aODCawL6 xKsevf0Txmf1ZIvzh0kwDDw1s80/qikgGWxEjKypYB7h/w1UDKvrS6qvBGGUte3Dw3zZ0V wVd6YNiGT/yGE10PE0cpAyQQRs6X35gffvRUK2YDhattgVTW5l4egOjs6mIwVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682013673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q1CIEiKtG98BnNTvusGPwoOMvxacb5yS1v9CBehg2a4=; b=TuO7X9OG7NE9fnfaJCNjb3FFaEWgBoNxv+tGPMet9C8OoHKhAJushtZz3VssWAp4zpZsPL DlJYwEjsHVlLBl1sFAUO8OZ/V/+4kZNJ8Hm5rG+xq4muw++/qdHo53Ba6l8bO9m0NPsIwu a/A9rsgrjOrfjUK7loe+BchcS8fDTsOxkRdQVqXj8HFlxsC92K7eF7psDo92kDL3BJcv2M slIDVEYcyl6onlvP3jEAA3DJOYPIryc0jfBSro5dsGUi/d/UpRvdNKVuJJRrw33J22hYKf 2b/w0wbiqdzWDw7OxviAFbjw6dvFj7AoM8PaD8wldk0Sv8YAGhihxNgcv/R8sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682013673; a=rsa-sha256; cv=none; b=uqp+82Fxo4IjZmkVwhSEjjunUXAsdoB1h8ldpsFC3wpR6Vh2Oo3W4lhBtlroWAD98fGkbU 0rat8jmS+HQzcQQuL3rdxps1Ey8UXn0SaTbTJ0qw4BWiXefg+LB6h3dbCNBkoOtGkneIma RFAaR1JQO5Z8onWKUaSpplh704pKHb6gGBghKjXfGiIp/G8PsMtqN9AI68rtKInOCnlhta z6BV3MW0CSwV99e5dAMMDnATZRPuDsM7uzHgkmQdL/9q8uP3NxJ6lTwE6UPpaXJAmyfL3/ NxWhiQAqNMXBZo+KMZE8jtQTuy69grOO5JtV20zz4BlhRrpAiAIig+Wt5vIS1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2QSn3VKBznHx; Thu, 20 Apr 2023 18:01: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 33KI1DcT023328; Thu, 20 Apr 2023 18:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KI1DDv023327; Thu, 20 Apr 2023 18:01:13 GMT (envelope-from git) Date: Thu, 20 Apr 2023 18:01:13 GMT Message-Id: <202304201801.33KI1DDv023327@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: 47e888f8363d - main - Remove a few more references to 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: 47e888f8363dff61b48befcfb79161abee65b1d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=47e888f8363dff61b48befcfb79161abee65b1d1 commit 47e888f8363dff61b48befcfb79161abee65b1d1 Author: John Baldwin AuthorDate: 2023-04-20 18:00:46 +0000 Commit: John Baldwin CommitDate: 2023-04-20 18:00:46 +0000 Remove a few more references to riscv64sf. Fixes: 1ca12bd927d7 Remove the riscv64sf architecture. --- lib/libc/Makefile | 3 +-- lib/libcompiler_rt/Makefile.inc | 4 ---- share/mk/bsd.cpu.mk | 7 +------ 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 2c6f2da361b3..e2a8f1473bf3 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -125,8 +125,7 @@ NOASM= .include "${LIBC_SRCTOP}/rpc/Makefile.inc" .include "${LIBC_SRCTOP}/uuid/Makefile.inc" .include "${LIBC_SRCTOP}/xdr/Makefile.inc" -.if (${LIBC_ARCH} == "arm" && (defined(CPUTYPE) && ${CPUTYPE:M*soft*})) || \ - (${LIBC_ARCH} == "riscv" && ${MACHINE_ARCH:Mriscv*sf} != "") +.if (${LIBC_ARCH} == "arm" && (defined(CPUTYPE) && ${CPUTYPE:M*soft*})) .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" .endif .if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 519ff0943ff3..2ceab5f12d8d 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -246,7 +246,3 @@ SRCS+= switch8.S SRCS+= switchu8.S SRCS+= sync_synchronize.S .endif - -.if ${MACHINE_ARCH:Mriscv*sf} -CFLAGS+= -D__SOFT_FP__ -.endif diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 693a9b5209da..dbd58a385b23 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -317,12 +317,8 @@ CFLAGS.gcc+= -mabi=spe -mfloat-gprs=double -Wa,-me500 .endif .if ${MACHINE_CPUARCH} == "riscv" -.if ${MACHINE_ARCH:Mriscv*sf} -CFLAGS += -march=rv64imac -mabi=lp64 -.else CFLAGS += -march=rv64imafdc -mabi=lp64d .endif -.endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk @@ -367,8 +363,7 @@ CXXFLAGS += ${CXXFLAGS.${MACHINE_ARCH}} # Size of time_t: time32, time64 # .if (${MACHINE} == "arm" && (defined(CPUTYPE) && ${CPUTYPE:M*soft*})) || \ - (${MACHINE_ARCH} == "powerpc" && (defined(CPUTYPE) && ${CPUTYPE} == "e500")) || \ - ${MACHINE_ARCH:Mriscv*sf*} + (${MACHINE_ARCH} == "powerpc" && (defined(CPUTYPE) && ${CPUTYPE} == "e500")) MACHINE_ABI+= soft-float .else MACHINE_ABI+= hard-float From nobody Thu Apr 20 18:01: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 4Q2QSq5Jszz46Nh4; Thu, 20 Apr 2023 18:01: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 4Q2QSp5Jbwz4GKM; Thu, 20 Apr 2023 18:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682013674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AY1uyjmo0rUT/8ghKH+DqEAaYNsHc0Ih91kikCAXo8o=; b=RxCFSCRoDnI3e4NSXjMfXCAM1VL3AUh86YdjrY9SSZ0JADMa+9QFDRcN+b/ud7ehPBdRab Z/LMAC3E8YjePeI42iTCC0GozGyooKRW1j2nsLDz+i3/Q6Z9MMz/1vvqjb/H4nzvbvM1ti uf5nwzjC+cBghENt7MbhY9nxDg/fUR2PWnxlMUUuDRaSubCmTqOj67xeNZBsalbZRel/Rd bMUPnlmqADtgAnSkY+wS47m/56UPLsnA0oMnD2+rcdvrRzsX1pya9rmEKErfcRIl3aOtrm fGRQdN43pXVQ8BRQEHlulnTK79MjsuhedRg8Y9JWPX8WW9gFF2ClxOh3RX1waw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682013674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AY1uyjmo0rUT/8ghKH+DqEAaYNsHc0Ih91kikCAXo8o=; b=ROqbbcYQ+6hWwldVDEuSSHlZGKHcU6n0YDfxd8xPrRSPZcETAdX7sB+HpVrXJZCstLwuvq 2CNUYvwOKcVQUTmBczxHo9I5VSqe2gRNHMCs6sFTNOMA9bGdI5IHudd7C1ED+UXzWhMy0D LCD2bjdbP71sTq/tsPWH+dRx77a0P4llO0dXyfAdLdVd5mlTbd4bPS9l2AtTUdWzuYRAia ggbFTb2knczpV9e8j3Eu7Ue053VkvxLUmBr6XdcpxefWlobivR/nDbJ+VOmlRvDlap4B8w C6ugDruE8XJsksQ/ES/3SdHnHIKbte/oHrnDP2WWyJf3TegY0PVofp7vHrdSGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682013674; a=rsa-sha256; cv=none; b=XXNX3EPO4IvuiNRzxdyhi5yn6bGUY2IuhcjUdIvCbRI3+//0F94tuElbiB2wICUzCd1c0c nKNWhEZvmCsji12EXJA4l3noHbL7P9GpbTMfHEjXTF/itcG/ziAjVXsm0834vZ+uDDBRaU 73AaoDpBB0uCeoRRBug13Eki+oLk+8cLFPy54jwi6yw6Nevuby57y7gZgYVcYf/M4lhUn3 bvGrI/bNa6e3qJ+HHAQv2S6V0QvchwRHZU3k6VZTGp0QqRwEIvUmqzmLoFJrOGug5j08um dON4Fb7mmLt0zlEAJx7bvfLY0aNSrSGE1pFvtzfZr81Ow90BNGtDVEk5kIzIkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2QSp4Nj7znD5; Thu, 20 Apr 2023 18:01: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 33KI1Epw023347; Thu, 20 Apr 2023 18:01:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KI1EZO023346; Thu, 20 Apr 2023 18:01:14 GMT (envelope-from git) Date: Thu, 20 Apr 2023 18:01:14 GMT Message-Id: <202304201801.33KI1EZO023346@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: 048606bec11f - main - perfmon(4): Use a C89 function definition for a SYSINIT. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 048606bec11f587037a5ffe6b3066ac646110b57 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=048606bec11f587037a5ffe6b3066ac646110b57 commit 048606bec11f587037a5ffe6b3066ac646110b57 Author: John Baldwin AuthorDate: 2023-04-20 18:00:46 +0000 Commit: John Baldwin CommitDate: 2023-04-20 18:00:46 +0000 perfmon(4): Use a C89 function definition for a SYSINIT. --- sys/i386/i386/perfmon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c index cb8c0acfc0dc..813cb4cfd1aa 100644 --- a/sys/i386/i386/perfmon.c +++ b/sys/i386/i386/perfmon.c @@ -113,8 +113,7 @@ perfmon_init(void) } static void -perfmon_init_dev(dummy) - void *dummy; +perfmon_init_dev(void *dummy) { make_dev(&perfmon_cdevsw, 32, UID_ROOT, GID_KMEM, 0640, "perfmon"); } From nobody Thu Apr 20 18:01: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 4Q2QSr19jfz46NsJ; Thu, 20 Apr 2023 18:01: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 4Q2QSq65Pjz4GTf; Thu, 20 Apr 2023 18:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682013675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kPKpdxkstiFLIt+2n4RPc/yjp8WyFDZxLbFU5PbMMPo=; b=Wj7b1m/t1ZfkXdI+scgbCAkEojKqf10y/ldkI3wctnPYILb0ERt8McQtru5xzFl8Gt9v4a /ZuBykothR+S0iTtnvuWWfOuDKnygRV0FumuU7MzX9/TbqSLsYi3RY8V9KX0PISJhzDjDU HJJsbRGCJY33WAGV/oyNYdMDls1jisb9+O/3iD3JBpm5s/G0QF0hqbsQTgh/Zst2frZAFS A7Op+CwZpAZGjJK9ZNA7PSnunC+D5oRXxzDchpuGSXjWYFbEt/m1iLKV1oP5wuZ4dC+vsY El9WZlHCRgyx4jrYc4Ez1XrTkXPkFxqS3vCx0ITZLi0738ZFrQDeRTu2blOcgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682013675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kPKpdxkstiFLIt+2n4RPc/yjp8WyFDZxLbFU5PbMMPo=; b=XCvHP/kIGv3NEAXpTMcpKC2AEqVjquDXNGD+yKlza3YkzD9YYerLG9s38u+tegdaYoQT9j /3sXoiqH4wEEBVcOjaVxDgNMBI5vz29uMyp6aEwzBYCtRZAiX0gs+ejfVpJjNT4Lw9ckyL W48ll01Oc3PZpjVjC8j6/RQfcbaAU6hnvu01ceFmYxafgjeM4Ln+GSG/eqSt/7tCq9BKjv DfxHoZh/EOMLzVoWJmZ8pFIb3wtmQPLG5UTi0V85740PP+/y65uKDS7YpbRkTrUBdLJH77 G1Dm/a6cp/niftxIXXGj/jU8Cnd7oiNRt+M6FWuOqqHVMMM0i6coYEiZUkJWPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682013675; a=rsa-sha256; cv=none; b=Ds+14M8z+oE5/0ebYAmUu/78wXNfb3dMwp68fi7BGg2OaUceE+MvIAANTmFzPkQxZq6ZJD R8MKy8YX/Ek4WJPCd4MIFbz3seX21irjRqyzYXMl++m02RQtpyECDoCCTetFU5784u29pI DgZNxYZG16hx0A/II2HMGOa0X2jycSm/EcM/eSd/f+kF9tCY+m+RdSZ/8JqnaeXjiT73AC Qiuvvy/svK9zgaqjfDFh0BO8waYD2YBq1BR/iNyH7MwLJOdAQTmSmIO6JKTquCNbu1CeQD yVOPVPQ3FZ+SYJOX7hEtXS8pSLCxMQfPQJFjrD9T9sWL2IyFdnmas711U6Aocw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2QSq5BxfznZG; Thu, 20 Apr 2023 18:01: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 33KI1F42023370; Thu, 20 Apr 2023 18:01:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KI1FAp023369; Thu, 20 Apr 2023 18:01:15 GMT (envelope-from git) Date: Thu, 20 Apr 2023 18:01:15 GMT Message-Id: <202304201801.33KI1FAp023369@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: bf043855213c - main - arm: Use C89 function declaration for db_read_bytes. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: bf043855213c17262c70b698c4402a425a069057 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bf043855213c17262c70b698c4402a425a069057 commit bf043855213c17262c70b698c4402a425a069057 Author: John Baldwin AuthorDate: 2023-04-20 18:00:46 +0000 Commit: John Baldwin CommitDate: 2023-04-20 18:00:46 +0000 arm: Use C89 function declaration for db_read_bytes. --- sys/arm/arm/db_interface.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/arm/arm/db_interface.c b/sys/arm/arm/db_interface.c index 73d0cc478617..c202a5ab0016 100644 --- a/sys/arm/arm/db_interface.c +++ b/sys/arm/arm/db_interface.c @@ -180,10 +180,7 @@ db_validate_address(vm_offset_t addr) * Read bytes from kernel address space for debugger. */ int -db_read_bytes(addr, size, data) - vm_offset_t addr; - size_t size; - char *data; +db_read_bytes(vm_offset_t addr, size_t size, char *data) { char *src = (char *)addr; From nobody Thu Apr 20 18:57: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 4Q2Rk567Xnz46SHg; Thu, 20 Apr 2023 18:57:49 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) (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 4Q2Rk52Srsz3FNx; Thu, 20 Apr 2023 18:57:49 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-54f21cdfadbso54592747b3.7; Thu, 20 Apr 2023 11:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682017067; x=1684609067; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :from:to:cc:subject:date:message-id:reply-to; bh=RsY8KjN3FdDYBX/nb4FT9kVxgIw3BqrgocQqQTsKUg0=; b=r2DJagF2dWrYpRWHKFzbHUQNsvrVKzYv+Nn907lww+jbTbJ/jxGkQ8zdyNd3QUPga2 uDAutANsP/DFm+BirhHLe/bqVvD6ZfJhwef2VxJeughBJt5htsznqCYse0cWXvA77FaL mephN2+kXeEmZF5vEfdq/hwTkLTnWurVyOI/Gn66p7uiNKgANKY7qXLKPjNVELAC0Ey+ pMk6ZH9NyO7dCnAl93YkZLxZsq7uaQcxTQALGTok6LT7cgOWOTQ95fXSPmMqmmRW1NVF Qzi7HBELAA6srYI9nC0EOhutj89EcdigdtThZH+pxzsMqejJy7QeFISF9aYYOnzfrlUK KOeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682017067; x=1684609067; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RsY8KjN3FdDYBX/nb4FT9kVxgIw3BqrgocQqQTsKUg0=; b=j7r0+C/d9X8takR/iAqeUU0DMN5a6IFOI/Qg2BeJ+ovJHSD5LxcoadjdqGF0vaXJAR KAmrUVAd3vq3UcYl6Jia4Y2W+MQs9GKYccQgbH9lmF0vle79oI5nzSLi2fC6LoKjVWgO HqDavo0aVP00rs8DjtPsNek0md81ijR91yuN1rSo5b84wBNd9hlGGFZFbPHcJVlGIpXS sedgjkEF4P/c7419wyVmkPUwJe/8GLQolCk3o2iKkEB743ytqrcXsfAjSGPuw0QTk29m Mx5HPnHS+PkspdD0fInnaDjDC2Jfbm2pQWInaUQ7t770IZqybjmywiZ66jt0TfHj22fK m+hg== X-Gm-Message-State: AAQBX9feCgtTC/rno77Z7r4t8KzivvQ+VY6vQw38r5mY8rjPYR9cku1k fBhFCpc0GoyY1WoHC3EZYgFIuSq8eEA= X-Google-Smtp-Source: AKy350bfISNE/zSsrvl3x5utgpyzLALqcH9QZJ61buiHWXNjQ0HZak9Ld/IKlZmuPm3DF+qEVQn6oQ== X-Received: by 2002:a81:834b:0:b0:54f:a8cf:6b48 with SMTP id t72-20020a81834b000000b0054fa8cf6b48mr2035523ywf.10.1682017067591; Thu, 20 Apr 2023 11:57:47 -0700 (PDT) Received: from [10.230.45.5] ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id w9-20020a0dd409000000b0054f8a3f6281sm498490ywd.3.2023.04.20.11.57.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Apr 2023 11:57:47 -0700 (PDT) Message-ID: <5593fcdc-9adb-89a9-3ad8-151a9e7c5c0d@FreeBSD.org> Date: Thu, 20 Apr 2023 14:57:45 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: 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:91.0) Gecko/20100101 Thunderbird/91.13.0 Content-Language: en-US To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, "Sideropoulos, Alexander" , Andrew Gallatin , Toomas Soome References: <202205310005.24V05MTi034088@gitrepo.freebsd.org> From: Alexander Motin Subject: Re: git: c1e813d12309 - main - hwpmc: Correct selection of Intel fixed counters. In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Q2Rk52Srsz3FNx X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Kyle, Andrew, On 19.04.2023 16:06, Kyle Evans wrote: > On Mon, May 30, 2022 at 7:05 PM Alexander Motin wrote: >> >> The branch main has been updated by mav: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=c1e813d1230915e19a236ec687cadc1051841e56 >> >> commit c1e813d1230915e19a236ec687cadc1051841e56 >> Author: Alexander Motin >> AuthorDate: 2022-05-30 23:46:48 +0000 >> Commit: Alexander Motin >> CommitDate: 2022-05-31 00:05:15 +0000 >> >> hwpmc: Correct selection of Intel fixed counters. >> >> Intel json's use event=0 to specify fixed counter number via umask. >> Alternatively fixed counters have equivalent programmable event/umask. >> >> MFC after: 1 month >> --- >> sys/dev/hwpmc/hwpmc_core.c | 34 +++++++++++++++++++++++++--------- >> 1 file changed, 25 insertions(+), 9 deletions(-) >> >> diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c >> index fce97cbd5b8e..73cfee0b3975 100644 >> --- a/sys/dev/hwpmc/hwpmc_core.c >> +++ b/sys/dev/hwpmc/hwpmc_core.c >> @@ -245,15 +245,31 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, >> ev = IAP_EVSEL_GET(config); >> umask = IAP_UMASK_GET(config); >> >> - /* INST_RETIRED.ANY */ >> - if (ev == 0xC0 && ri != 0) >> - return (EINVAL); >> - /* CPU_CLK_UNHALTED.THREAD */ >> - if (ev == 0x3C && ri != 1) >> - return (EINVAL); >> - /* CPU_CLK_UNHALTED.REF */ >> - if (ev == 0x0 && umask == 0x3 && ri != 2) >> - return (EINVAL); >> + if (ev == 0x0) { >> + if (umask != ri + 1) >> + return (EINVAL); > > Hey Alexander, > > This seems to break system-mode sampling of fixed-mode counters; e.g., > from the manpage, `pmcstat -S instructions`, and I'm not at all > familiar with these parts of pmc. We come in once with umask=1, ri=0; > then again with umask=1, ri=1. The latter fails and we try umask=1, > ri=2, which again fails, and the PMCALLOCATE op ultimately fails. > > Is `umask != ri + 1` correct, or should this be reverted back to > `umask == 0x3 && ri != 2` or something else? I've no idea what the > `umask` values represent in this context. I still believe this code is correct, at least as much as data in lib/libpmc/pmu-events/arch/x86 is consistent (look for "INST_RETIRED.ANY", that actually fails here after translation from "instructions"). The multiple calls you see is the result of hwpmc trying to find counter "matching" parameters. For fixed counters the match is really just (umask == ri + 1), since umask for fixed counters in the Intel events data is just a counter number starting from 1. I've tried to test fixed-mode counters myself and got it failing also. But looking a bit deeper, I think the problem may be caused by this patch: https://reviews.freebsd.org/D35709 . I think it tries to allocate the same fixed counter twice, where the first attempt succeeds, while the second fails, since the hardware is already busy. I haven't looked close on the pmcstat code, but I suppose the patch was wrong, so if you or Andrew wish to fix it properly -- I'd be happy. -- Alexander Motin From nobody Thu Apr 20 19:04: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 4Q2Rt55TDfz46SLT; Thu, 20 Apr 2023 19:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2Rt52MYFz3NJV; Thu, 20 Apr 2023 19:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682017485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F6UAQKfE/DeOQjqSKtMnHB332qJONkbHl7gHCKDIpQU=; b=ZI/dYr/IfhRUTmAo5LWddg8qdQaQxJipNPIRw/PEt8pk0HmvZTVNiXJX65IDj/hp1Wqvcd n6G6EzU1KFRHkBXzYl7HJzvwBz2B/00w3DwbsZ6P4zKk1ovdhVoHf5kloIVdKwpWXt0Mgj kzbGYLTEV8Bep/DfipvDePpPosx6PbV+rW3uc8RNlq+gGu+haFkCKpL5Gkb5rrxr9PSIEw kC354+P4ATDiFN29BEiZMX9ifo2nfW8UZQ+kbmPfWnMnJr4WRGEtJ3tujuJ7t6b9l1VcoJ qb3IG8MKEca3ormbvFAfXFd6iFMS2v4mcCYuflv9ehnIX/I7A4+2iHkwrRXVUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682017485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F6UAQKfE/DeOQjqSKtMnHB332qJONkbHl7gHCKDIpQU=; b=IO3RYF+KoUhHd/Im+5yiN2ZoztWIl/qGVTZlv20hGNt1IuepA//9rG9EfzMtpUSaqwvdAz OTSarS+AgyjAIQwAzmL4Za/XA7Om5tV8frAVBjrwpX/26lwHg/MkoxlObdT2yyPkBiWOvp WtkBHO8xwQfF7Q2YTiyN1ulhAdWvKCrYyXMb6zHMLuTs4BjQX00Ij3k0sVdrvakQOur63c IA1bLjxX0xh3VuCef/EwhM48sqWBOUkM+zy+NHLMGf4p8rP7Xryd+kSZ2z4P9l7nkV36bu 2En2614WQzpSxpUApiowvbzyNxE5dfYonYv3/BRW6AqNuwpyTojM8xh8x/z47g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682017485; a=rsa-sha256; cv=none; b=XGsxLyi+2ZHNxwuMoi3cVDFFVxkZvbcSuTDi7BgAUFOzwcxg/463jFb/7vyrTS5rSaVR4h nV1eOVus27y7PYI2mv6/35+i9ikjUNjiLvz53Lv/MsboksEkExhqxrodVBdeP7Qn0UtIY8 OiyTf2VGWvFto5IWHqAs7KFxinGGIDwOMg6ZSRmLp7us7crkl2ZRlTcrUstBbXS9JHYLsV egVzqzZFQjE5vEo/EW80iCnEI+QhVbOvBNY7efkcDyEx5mRQD1H5mw0cEqteM6mBpyl5a0 JqpSW75OVxIjCvfe0aei2NEkfcOPThtenrCVfiTsgDTS2arTAsNBQDMg8y3xoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Rt51S29zqCF; Thu, 20 Apr 2023 19:04: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 33KJ4jod027404; Thu, 20 Apr 2023 19:04:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KJ4jtT027403; Thu, 20 Apr 2023 19:04:45 GMT (envelope-from git) Date: Thu, 20 Apr 2023 19:04:45 GMT Message-Id: <202304201904.33KJ4jtT027403@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: 72ef722b2a34 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 72ef722b2a34b8f94fd639b05881242686480f05 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=72ef722b2a34b8f94fd639b05881242686480f05 commit 72ef722b2a34b8f94fd639b05881242686480f05 Author: Bjoern A. Zeeb AuthorDate: 2023-02-14 15:53:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-04-20 18:59:03 +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 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D38592 --- 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 461c69edb23d..895d29cae818 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -204,6 +204,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 72e8e46143c8..64b73cb20723 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 Thu Apr 20 19:27: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 4Q2SNr5S75z46Tfd; Thu, 20 Apr 2023 19:27: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 4Q2SNr4Xlgz4GnW; Thu, 20 Apr 2023 19:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682018876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5kmcrj/zPne0jCabjMZ9sZjvh3nSyHDpp6E1RKyjHuM=; b=xwBaPZ7hUL8shBNN+jd34EA8LYOS8bk6CbOGxPK/SE236iipSBPwn9Z+CgjJBV5mlHbqmk NQTixYAE5NJHn/t2grOJsP/H4ac7NaNhloF0sTxoaa4HCVyhNIXsqNCsX0YSP+0EJr8DUq 7G81yUAmW4Yh9uJ2KA9ip7tbQmb8H5KGXJ4DfZGtf6BFC2umWwfXdWwPuuqMY3SFxN0YFd X9AHCPHQuDezxepjEMjaDVV55+iZW1u6EEfh6Zyu9tLbETaTHCF8vjdPgUhIhoF1opHgwI x7OjfcV8EZI82+OhXoeN0iXznpCAK1dSlk5CqtQUsCFVSpGTf4Ym7icfFUWzNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682018876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5kmcrj/zPne0jCabjMZ9sZjvh3nSyHDpp6E1RKyjHuM=; b=osUaIawha33j4oOl0fNux0yJ4Mcc7jdEvokdNmCFkfR711UpQNQss9lJxeB3ChyiQxp4Cu W5x9BR1/0K/K6cZeB2bu4vH1421FZULchsTGg+8nTB4Is9TOTeYk6MENkRsf1DVymXCuN3 YnMf/GDfdBo2Dhf4Nf6IjZTz8xwOjMOzvLsTu/a6Nmyyk3VTV7Y6Kq1HpJyV7sEjIFDjrj 8BjhPLdBuNan64wx7bjQKYfIzG/mBqTo5jszn3g2DTAX9ooLvCYXCjfBTBm20GeRvzhtWW BfKq12GXWnVj6VtlE4mdHdb2FmZXFY9Sepp/qu4I+1WprIc3eBukKV0UD2XYCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682018876; a=rsa-sha256; cv=none; b=yU341//VQf9z51OS5podziWTBtb7R5ZbaF+NkZUQTSd0pjTBScmUggf7+Wq2eLRvjeIjln fN8t0VHX9LjOMomX8RT4NomPudU4vQ5q3D5aCffHIxM5t8laNAaRYcsTjiFmOGGGEhzlIu pnuPUS1nrhWK9sTI8UN8M+LCZgUNRhNuDVrt5x+exYNpfH4z3l5N4kOJ5z2sP/+6BbCIiw RKM6rOhU9Tj0IU5c3J/COAlcKETKKqwt84vL6yXPQaM80J4gz+g1InPRLAnYileLFTJfez 4HlKmigOsI2a9vfp3TG01M2QnSRiRkUqQs2HHmvrM21g58qzI30p5GLuasA90g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2SNr3dT2zqst; Thu, 20 Apr 2023 19:27: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 33KJRucH061048; Thu, 20 Apr 2023 19:27:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KJRuZL061047; Thu, 20 Apr 2023 19:27:56 GMT (envelope-from git) Date: Thu, 20 Apr 2023 19:27:56 GMT Message-Id: <202304201927.33KJRuZL061047@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: 42140052765e - main - kern.mk: clang >= 16 already infers ELFv2 for powerpc64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42140052765e05c83a3ea797dce3eaad94bc3733 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=42140052765e05c83a3ea797dce3eaad94bc3733 commit 42140052765e05c83a3ea797dce3eaad94bc3733 Author: Dimitry Andric AuthorDate: 2023-04-20 19:27:11 +0000 Commit: Dimitry Andric CommitDate: 2023-04-20 19:27:27 +0000 kern.mk: clang >= 16 already infers ELFv2 for powerpc64 There is no need to pass -mabi=elfv2 explicitly anymore, and with clang 16 in fact results in a "unused argument" warning. MFC after: 3 days --- sys/conf/kern.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 9040fced6cba..06fb48d0f93f 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -215,7 +215,8 @@ CFLAGS.gcc+= -mno-spe # Use dot symbols (or, better, the V2 ELF ABI) on powerpc64 to make # DDB happy. ELFv2, if available, has some other efficiency benefits. # -.if ${MACHINE_ARCH:Mpowerpc64*} != "" +.if ${MACHINE_ARCH:Mpowerpc64*} != "" && \ + ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 160000 CFLAGS+= -mabi=elfv2 .endif From nobody Thu Apr 20 19:42: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 4Q2Sk43cKbz46Vr2; Thu, 20 Apr 2023 19:42: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 4Q2Sk41Zb3z3R8c; Thu, 20 Apr 2023 19:42:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682019772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=55KyJftk6Mhe7rfoZBjPNF1TNkM8rjbvrYRvCqHOYW0=; b=mnjIVzW4jgr40SB7OsKnXY1URPKPA0flEFFLSlLKWgkkwqDTX4e3woTXchfqmznZQiaKfh lNMn7sFV6glxnICeGOcj6giaHtaCY77mVWhgf4nod/0KifrUQRZObpuBMS6JI4rG0+LEic XjJRWgxwu+zjRrui/ApxyGkjFN1nqwLWm/5+uqR5JpDfOAR5bwePymwK4wreFgWtHgif48 /5niWI3Y7Aene0cDBOugnXYHnxQu+nSq+9iTVWX7L4NVJNWhujnKB+vFTgiYacLgCAxIqj xTN+FalbYm38egiEnXAZxqCvyeTE5LupsYd/BTD1DzAlYuTlI0gseW3ICqM9Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682019772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=55KyJftk6Mhe7rfoZBjPNF1TNkM8rjbvrYRvCqHOYW0=; b=xQBaJIoQGYWWrZCbYaIFRJscH3AF7ZYOSTEcBNE6EZPc+Jao+o88VziatLfdpMIsTyXozQ kKENDOK+0PF+hRpB9fRzw2Gxp2vX7NATXiG72j7znteuFjVZNdYZmSlVlvR0MXpHiP7kI3 qpDLzMmO/oEvSPGbPpPK7AxthWaRlWGQdmeshspP73Jzh3rw4+NwITak4eLwBLMuRI6RWP Xl+Lc8OoBeaUB1YCMKmAmEz6CNamZGg4lzMSfU/kOqWWgqmHHIEmQtRXqPVdh0SbxxAPOf WyAllkolfh6hIaVsqjdgEKydMi706G37I+/lZiiYkJxE75bW+pbD7gQWoobkag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682019772; a=rsa-sha256; cv=none; b=oKOHLJUsqjZBRf2pswLBCPWum3hhWU/DeTzdl+iTe+JMJ/8RFyGvUTK4Cn2K9kJ78E5zRB xN6IRpiegdsFkAUi04X28jaRPRdKEO0QuBvSRXDoJA2P6Uz6gXzItUvs80Onyw48ayLnfS Upaa/TwGkH5vLShzyXFsJbWfY21c73azu2qmpAnaq0Pxzy8mPRd1RF0OXpGW/QpUNhQ1xw h9cDObUk4Ap9F1K/asLDioFx3fsFW4pB+dZReH9Z2/G7pxbGykLn4xabVgqDwL5QmILsJz VeNp3iD8EWS2kqCgYZt7YRxCcOcK+jmXs0o/Hm2GTv66b92uBsY3McVKZFwvRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Sk40WkSzrFS; Thu, 20 Apr 2023 19:42: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 33KJgpQ9092571; Thu, 20 Apr 2023 19:42:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KJgpgk092570; Thu, 20 Apr 2023 19:42:51 GMT (envelope-from git) Date: Thu, 20 Apr 2023 19:42:51 GMT Message-Id: <202304201942.33KJgpgk092570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 8e813d07c680 - main - netstat: fix printing of TCP pcbs with -A List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e813d07c6804f80e1380b54f6e5fa6d34a3be52 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8e813d07c6804f80e1380b54f6e5fa6d34a3be52 commit 8e813d07c6804f80e1380b54f6e5fa6d34a3be52 Author: Gleb Smirnoff AuthorDate: 2023-04-20 19:41:03 +0000 Commit: Gleb Smirnoff CommitDate: 2023-04-20 19:42:42 +0000 netstat: fix printing of TCP pcbs with -A This change touches both kernel and netstat(1), but either of the changes will fix printing pcb addresses with -A. The thing is that historically netstat(1) treated TCP differently, and printed tcpcb address instead of inpcb address. This is not documented anywhere! With e68b3792440 these two addresses became the same. It is highly likely they will be the same for a long time, but it might be they will start to differ again in a far future. My proposal is to stop treating TCP differently with netstat(1) and right now is a good opportunity to do that, since there will be no behavior change at all. The kernel change to tcp_inptoxtp() will go into stable/14 to make it compatible with netstat(1) binary from stable/13. We can drop it later, probably together with in_ppcb pointer from inpcb. The in_ppcb in xinpcb will stay for size compatibility. Reviewed by: tuexen, rrs Differential Revision: https://reviews.freebsd.org/D39736 --- sys/netinet/tcp_subr.c | 7 +++++++ usr.bin/netstat/inet.c | 13 +++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index db0c71fdbfff..d7ca44e8a581 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -3968,6 +3968,13 @@ tcp_inptoxtp(const struct inpcb *inp, struct xtcpcb *xt) xt->xt_len = sizeof(struct xtcpcb); in_pcbtoxinpcb(inp, &xt->xt_inp); + /* + * TCP doesn't use inp_ppcb pointer, we embed inpcb into tcpcb. + * Fixup the pointer that in_pcbtoxinpcb() has set. When printing + * TCP netstat(1) used to use this pointer, so this fixup needs to + * stay for stable/14. + */ + xt->xt_inp.inp_ppcb = (uintptr_t)tp; } void diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index a16f09d391fb..fd1a6ff20e42 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -383,16 +383,9 @@ protopr(u_long off, const char *name, int af1, int proto) if (Lflag && so->so_qlimit == 0) continue; xo_open_instance("socket"); - if (Aflag) { - if (istcp) - xo_emit("{q:address/%*lx} ", - 2 * (int)sizeof(void *), - (u_long)inp->inp_ppcb); - else - xo_emit("{q:address/%*lx} ", - 2 * (int)sizeof(void *), - (u_long)so->so_pcb); - } + if (Aflag) + xo_emit("{q:address/%*lx} ", 2 * (int)sizeof(void *), + (u_long)so->so_pcb); #ifdef INET6 if ((inp->inp_vflag & INP_IPV6) != 0) vchar = ((inp->inp_vflag & INP_IPV4) != 0) ? From nobody Thu Apr 20 20: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 4Q2TXs4qqgz46X63; Thu, 20 Apr 2023 20: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 4Q2TXs4BBpz4FGy; Thu, 20 Apr 2023 20: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=1682021997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YI88m2YgrqYtJ/Shzk+8VnPS1nIK0jr1nih0UgkpVsk=; b=h2D5DH5qvPGyyoZ+R1ki9FxxvNHZFVtAohRdi18lxFMJNVOR1kwisfPMP+OSs9HhOzW9fB H6eB4rSAf/t7exBRw327UwpUcpy67+uBtPZsvpgsXNl0l29dY59KGgcr93Gxuq8MC/V1hs DXSUdcK2YuVKfiIYW+Lc4AGP8JOp/ODSCRqktwfKU+9vYYVidPlTftpe5vsU3BU1vGM3o4 WFHb8ayULAUv6JKjrBstfXR60fXxkuRUbHvqIPG5cPdssbzp6c2ptgHtykeh54UKomLthn rQtFhmyHgb5dukxZSpUZMGsPGLNkN+2fAJIa4/ON0R142wS2MdNDEobm8/hgng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682021997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YI88m2YgrqYtJ/Shzk+8VnPS1nIK0jr1nih0UgkpVsk=; b=Wru4EpAgW5te76pBKXm8z9nEBVz+tLgviJPHiCtsQsrQQIV7itmBsiD3Ph9MJrLl5IwKT4 fs4HrZ+rs01RAvw3FiAhcF80DQPuKowQlijGZIvAXedweTd7ZhUobtvVHT19Zaz7sbeBP3 LgiztM3bk3+X4wVFpMKFWqfN7wvJQismNH4zVQ2lal//zoYx0PUIUwnpaZAbcFaN8ABUSA iNLaU/bgEn36F2JPRi/g/l3x4Z7cWYsicpV5cOCMQ2niNUbEX2vYNNEPFILnU7982kjrLV oyCE0f+YnxVHa7gms+5iGAGZI0lyp8pyQvLjLRYwv13dI78nyyMrXOBURHo65g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682021997; a=rsa-sha256; cv=none; b=Vl9gDGK03/va81ZzmSMpCUUG+GE3LPL0c8aqofQKqwkT7fxJjEJvCxa3neOA3EscjW2s+T mI6IXXIycm78covdqiOBdwBYwEWREDCNZQVOUg4+vyz1GxGjx+BPfQ+yM8ojd6ik3UxOw3 nYqXT8YOXXbT0Qh0TCZPPrSFpgAE/PI8i95MkpgJP4erVyjYi1a34xHysZAbiy5wg16V4p bzpWYoJaAcLQLjJldJ4I3KAVjnr0qt172kWsbrOg5Sq2fj2eNcQEMKQYqU7TTJGcKG5bH2 UlM/dwY85AaxwIZueTPy1sE4HjEL6VhHoCVcJa2yaV7WprzvpixPBRkucgoufg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2TXs3HLvzrjJ; Thu, 20 Apr 2023 20:19:57 +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 33KKJvdb043960; Thu, 20 Apr 2023 20:19:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KKJvc1043959; Thu, 20 Apr 2023 20:19:57 GMT (envelope-from git) Date: Thu, 20 Apr 2023 20:19:57 GMT Message-Id: <202304202019.33KKJvc1043959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 27913351047b - main - cxgbe(4): Dump the firmware log before falling back to a minimal config. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27913351047b2f49c49c5f3dfc3bcbe3672eea36 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=27913351047b2f49c49c5f3dfc3bcbe3672eea36 commit 27913351047b2f49c49c5f3dfc3bcbe3672eea36 Author: Navdeep Parhar AuthorDate: 2023-04-20 19:43:45 +0000 Commit: Navdeep Parhar CommitDate: 2023-04-20 19:56:24 +0000 cxgbe(4): Dump the firmware log before falling back to a minimal config. It might have errors that explain why the attempted configuration failed. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 18698ff468f3..ebf830d4db70 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -5096,6 +5096,7 @@ partition_resources(struct adapter *sc) retry: rc = apply_cfg_and_initialize(sc, cfg_file, &caps_allowed); if (rc != 0 && fallback) { + dump_devlog(sc); device_printf(sc->dev, "failed (%d) to configure card with \"%s\" profile, " "will fall back to a basic configuration and retry.\n", From nobody Thu Apr 20 21:38:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2WHy4HfKz46d5R; Thu, 20 Apr 2023 21:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2WHy3WmVz3tQs; Thu, 20 Apr 2023 21:38:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682026734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBjpYl7T+AzQeb05EE7kN64nbKyGx/JmYbA2Q0otBlE=; b=Fpz2sK2XgQ3rHu7lcLJSS3hQuuTQP3yxieM2IYJbpdZbU/TK7hDTAUjm8HKJq/P0gi42vW eFq8dkJp3bgcicv8DOeAMGOziGm19q/67UYATe/CNhxc2pr8P73FQ5+b6XNcPlC9kGhPHZ VJh6A/aVCXw/RkrFn1KQsBKahKl5c9ZjOffZw8sfYuTx2UHTzSc3bXK4/pzCRcY+3ClPkh IpOyx3N+PmY8x73jsuy8epW8N+9dr1IhOja0kmtqylKz7jV+3EcbMhmeTwFROQ6ufoiczL nFoxzhkmJtn2QTOuSL8aYyLrTNRpktt+UIm8SI+hOOSWA0C17DyrlHpRmy0FbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682026734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBjpYl7T+AzQeb05EE7kN64nbKyGx/JmYbA2Q0otBlE=; b=pHf16PjMWI3G+J3pTOHTzKjrqjt/JZJjBhIPCGY9qxDAN+l+EIG69jrF6+yzxHVmLXOFqC g1pwu23UWYnV6CSxLd+p1Zh/oDTCatE3SbZbONBGvD8Ra91eb+G+aJ6tR13Sz78OcES1L6 8TDE+bRpn7/y1Ia97o40k2GxZk8PrADJu+SftygGfJ5BAUNWrNEVwRGISWcycdqOo30hJl N2vRdXfHsVzU7iXAZHLF35O13hzyJCnGCCUFGF/cpJ9tiY3LNlBR/KTT09xtTw9xuRBllx K4m+gRVKQclFESaoJA0AgjK+kRBXf6vk+pdR2RtoJzVTHu6MTshY+plrBkokSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682026734; a=rsa-sha256; cv=none; b=a2Vj7KUNEmIJJ578MEE5yJmnVIs+5fK/dFuOqiQxI1U+j+Gq93pm8KCOGv/Ri/Vx6QlNPQ IOZy8mW/7T+pWdRRdUj/g5tkRkYdOrr2fgW8fEyZEhjlqn5ABhYWb5HBVP0hFBS5aiPhs2 mgrO/AqVcXQ2NDrr5Io7T6Ly3I67PtaELbM1g03II6UTEIylfbITSyTUVo1HYATKgVh/WY pQdwJRBGvZr19IgcuhZeLJz3DsybPfvFryPQXWxRNFdF+z2q+QBREZkxPx6NFdX9LDaG/J tiIsf1un/kIEw33VYtIBwxCSR7U6Q6z54V9oc2xwy3rNXy4bj0S5A/1xfLN98w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2WHy2d5FztmF; Thu, 20 Apr 2023 21:38: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 33KLcsFJ074974; Thu, 20 Apr 2023 21:38:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KLcsZb074973; Thu, 20 Apr 2023 21:38:54 GMT (envelope-from git) Date: Thu, 20 Apr 2023 21:38:54 GMT Message-Id: <202304202138.33KLcsZb074973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 0ef8e98fda0e - main - Add WITH_NETLINK_SUPPORT 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ef8e98fda0e80608c10f6ed895a83fe164c9c92 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0ef8e98fda0e80608c10f6ed895a83fe164c9c92 commit 0ef8e98fda0e80608c10f6ed895a83fe164c9c92 Author: Brooks Davis AuthorDate: 2023-04-20 21:34:21 +0000 Commit: Brooks Davis CommitDate: 2023-04-20 21:34:21 +0000 Add WITH_NETLINK_SUPPORT description Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D39676 --- tools/build/options/WITH_NETLINK_SUPPORT | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/build/options/WITH_NETLINK_SUPPORT b/tools/build/options/WITH_NETLINK_SUPPORT new file mode 100644 index 000000000000..0f0f8f8b9799 --- /dev/null +++ b/tools/build/options/WITH_NETLINK_SUPPORT @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Make libraries and programs use +.Xr snl 3 +interfaces instead of rtsock and +.Xr sysctl 3 . From nobody Thu Apr 20 21:38:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2WHz5h8Nz46d83; Thu, 20 Apr 2023 21:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2WHz52H4z3tnR; Thu, 20 Apr 2023 21:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682026735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gw+5J8GU17uObpOCEbOa+bMUH7WUDk0ubpW/yevxdeQ=; b=C7F+EZimbGvCSEvqmpWx4LaBdYOSC6jTNnfD6tLorXW3WNQ4nIFOzdzp2uUv62VUJtfyyQ i7LPf7cdUD1wgC58zbbvsRT9FBhE5fYMlXIDUqAcvU1ngqB2jwsuuiLcaWd1TK3vTkFVeS I6sKVmcoUWUaZ5m0sveC6hNTbBSbspTHlkKBT/sIJlBXiP0Si6ZZ0IQoXhFaSbJa0fhUVn /nRweRMbzKDOqt8L8OhlrWeuXUmYpRLY52MJwwxBwNqUMxVBsthKIxPn+UbZM2cJXrcwnl krCCcgeCUX9tztJEHm/eANuXUiO5eQp/80/afCQf662F5W1M3ZZAhMpI5aWSUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682026735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gw+5J8GU17uObpOCEbOa+bMUH7WUDk0ubpW/yevxdeQ=; b=JIDIysvRnEf/VZMcSEE4rY7xPXm1fo4RFwU6mPi+/MBobZB77qhJALcU566xNQKyWQJfoI 7irv0BacSIFRr+ncSFqLotq6Tn8rITPpN0ST8AvesaP+h72xaEuFCu1mcwMBbI4Q3H1EpC eixC6rZS35igi1AM7VWMWASjcVqNluxz2VcTRfTi3fjn7HXYM4eUwx8g5v0LvBMXC8p7Va u1ZgUKtwvJ11ubdwNl0RmOpJmZszLaRZ+9AfZjusxP2AHytBJiUnNMW+LDVZDB/OHTX5q0 Cv52/IJ8W6Sxx1/akt5jhN0w9NsteQK6d5G60opiFJXeY0iodu6kqaYm13ctXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682026735; a=rsa-sha256; cv=none; b=Cx8G5B3cvihVT0raKbc8yCqdKqTPD5t9GUJMwU51dv2BpWRaFHNW/qSyIUaofY5o7HvLkH rSsqg0znOOGYEqYGCOnZ1BS06Bb+n18LAAvdhaRnFaQ2TOJM2DHrOeIjSvDGZYSJfqG3dc 6NLG86N1SU/EVOlAMH+Ah80WTEhBO70I2as2Api2M1FBcx1hyQPOP6HVRCFJKF6M/qyaZ+ pN3PRvqJRD6qFwXAdj+3lzpwk93d5HUbIfvL34JExnqKezJv4it8lufEA7wFOnu0z+hxtE FcfPf9l4V/T3fXUJ68JyEGzYOGBSS8r+HLxnX6bOnC/oR8k/wOryB598k0qBKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2WHz3W2fztpb; Thu, 20 Apr 2023 21:38: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 33KLct29074997; Thu, 20 Apr 2023 21:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KLct4X074996; Thu, 20 Apr 2023 21:38:55 GMT (envelope-from git) Date: Thu, 20 Apr 2023 21:38:55 GMT Message-Id: <202304202138.33KLct4X074996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6c1be0194aba - main - src.conf.5: regen with WITH_NETLINK_SUPPORT 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c1be0194aba7d87f2aa74d36260e7a5683f942d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6c1be0194aba7d87f2aa74d36260e7a5683f942d commit 6c1be0194aba7d87f2aa74d36260e7a5683f942d Author: Brooks Davis AuthorDate: 2023-04-20 21:34:27 +0000 Commit: Brooks Davis CommitDate: 2023-04-20 21:38:36 +0000 src.conf.5: regen with WITH_NETLINK_SUPPORT desc Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D39677 --- share/man/man5/src.conf.5 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index a4f93d35af8d..9029732f0fe8 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd April 12, 2023 +.Dd April 20, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1257,6 +1257,14 @@ interfaces instead of .Pp This is a default setting on arm/armv6, arm/armv7, arm64/aarch64, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpc64le and riscv/riscv64. +.It Va WITH_NETLINK_SUPPORT +Make libraries and programs use +.Xr snl 3 +interfaces instead of rtsock and +.Xr sysctl 3 . +.Pp +This is a default setting on +amd64/amd64 and i386/i386. .It Va WITHOUT_NIS Do not build .Xr NIS 8 From nobody Thu Apr 20 21:38:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2WJ074z5z46cjt; Thu, 20 Apr 2023 21:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2WJ05bj2z3v0C; Thu, 20 Apr 2023 21:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682026736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UTJzwdJ3arXMW2+r3gWb/MumpUwRGyqX1Zo/upWN/II=; b=uIKfAjoiUFoKvKoXOzzwgJlehwqNQsgiq80LU9NlawIGjoosFkpT9JBNJdR5MoOM4rBin8 5VRjzZZCdJf+AN3mNP009iz7bCr64TvAIZLjcR0UBXPWMJf299lNUIXOraRBKgLKr6UNaR dniv+wwE795UBqjDsra9QcqPSuYjRjwTPo/284ovuS+ORi3n166hkqLKAEepR5FzLYXse0 4KAPNL7v9DYQjNQrELbKM12dbYPVYBdWjjj5JjOeIOe8bWISVHMgDFoT4CP67k4g19cqCC RfXR8s6mPpKRT7h6W+efdAEqX025YWYNzV3PJZESV5QlSmK+SheCgAltLgp6jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682026736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UTJzwdJ3arXMW2+r3gWb/MumpUwRGyqX1Zo/upWN/II=; b=DFMjRL7eJMjDU9tMcMTUBc6A0reD/DN6r1LUenehNCMWgBGME1zsY8eBbAfQqPjOfIHBge fFK+e4wedcrDgussjKG0OrYyouJl1nYdhfSzn42QhiyoMlFuwkhfoZPsvwB57wpQ74g4db 4CuWIExyjuHDXCQakiuITkNH+Z0iU8YlZyJUeGS3jkkj8m/qEAVq13DJmSKtbHOKrzzATO V+Xf2QjBSNlXUZhaRDhBYheUBrTFstwAcJqUbuAhPEnuFFipfSeHlpxTfYVQPT35PMjdNm /88AUBQoOqqLtwLkli3NGKhjdxFtu8ReK1/3fogpRvijRvv+WSpBOTSDCRmEPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682026736; a=rsa-sha256; cv=none; b=gpTaKYXL1anqkW7djIrHAivEwdj6M+zViguU7AOZjFqQr85TgrYp+Nq6cbQw7RD12ucuMp OPgiABOn3zcDEUBpfQj+aDUPSNOl0pNifqL1wdMJqUW+IgXNupIGpgAHunGrl/b25hOvOV cWRtu+i/yLUGJBVkxDENylXxoFs4TkfpC0VduDiYZoIRON3MscYhmMBdHjkOt9Jk04HEiV yQJGaCaUpqsxlsdU0NoabLt2X4KES+BQXfYVAay1gWlBfP9zXfSL43gnQ849ygrizKZ5MG xVN0Fts9tOIGocXJJbtk4axBlcDy4WagE7mQVCsdlCa2rfaoFe/1zuiAd6zDZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2WJ04f73ztyT; Thu, 20 Apr 2023 21:38: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 33KLcu6k075019; Thu, 20 Apr 2023 21:38:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KLcu6W075018; Thu, 20 Apr 2023 21:38:56 GMT (envelope-from git) Date: Thu, 20 Apr 2023 21:38:56 GMT Message-Id: <202304202138.33KLcu6W075018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 8612e44589d7 - main - Remove unused NETLINK build 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8612e44589d7aa84acfd023238bb6b2832892d47 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8612e44589d7aa84acfd023238bb6b2832892d47 commit 8612e44589d7aa84acfd023238bb6b2832892d47 Author: Brooks Davis AuthorDate: 2023-04-20 21:34:31 +0000 Commit: Brooks Davis CommitDate: 2023-04-20 21:38:36 +0000 Remove unused NETLINK build option NETLINK was added along side NETLINK_SUPPORT to control building netlink specific programs, but it has no consumers so remove it for now. Reviewed by: melifaro Differential Revision: https://reviews.freebsd.org/D39678 --- share/mk/src.opts.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index f40f35e6e2d9..d6f6650effd5 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -356,10 +356,8 @@ BROKEN_OPTIONS+= OFED .endif .if ${__T} == "i386" || ${__T} == "amd64" -__DEFAULT_YES_OPTIONS+=NETLINK __DEFAULT_YES_OPTIONS+=NETLINK_SUPPORT .else -__DEFAULT_NO_OPTIONS+=NETLINK __DEFAULT_NO_OPTIONS+=NETLINK_SUPPORT .endif From nobody Thu Apr 20 21:38:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2WJ21Z69z46cxx; Thu, 20 Apr 2023 21:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2WJ2086Qz3txv; Thu, 20 Apr 2023 21:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682026738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yOyl6K98JJ+pxDu9P2uw2LI0mIrbIioOdKVBj9uQ/fw=; b=YusKX4u7+SdbmN/bvaGX4lIGNBe63P4CEBkyc0s5RoK62OALaiy9rFvsAC3L4kO+/340aZ lPEcPvCplxNRFTVtpeReydrRmWczgFBEGMRqQrwybJERJhA+oGOq1HmtMcl/kWy/sooDK1 PSzjRxRSSmhX3FqnDMjzZPi5FWhDnYtjCtv41DS6ZFWO7hyuXInaA5UY1VZMLqAQ5eDZH2 I4qT42k0OTQktg0vK7Y+1aEnqxbam/x5FML+0gLyoHviogZ9Cim3WN/7cACPKssARXP2WR V4+Jma/XLlO5J5p1x2sn86zK9lMFtC4Y92CrSnRRYAApRzvpzILOQsfdDQguqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682026738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yOyl6K98JJ+pxDu9P2uw2LI0mIrbIioOdKVBj9uQ/fw=; b=qRMv92ZO+/O7cdcmwtMIp4FGX4UHO2d+M+8HTvgO/9CyFlbY7SSvlY/+BpftOyNPaZ7Qdv d1iOYKRKxoZhOtCpdbLIqt59+mJdDwS+SOcP7dMGcdYG/lC3tyAto59PTRB9l3LyU5YAUh /i7eh/TKTD+6SETzPwLx6hjjkuVExytBb07W+oi/hiNfncB+PHnb64DE/WFqYy4Fe/nSdu F9Yd5rXgXWe1OhyXi8EX17aanP7G0u1JXVVC38NWTGfI0UHdHOeiN59qzfc43At7B9ncx3 M1Q2TUe6QJUiMM2VaDrmGlmPd2YL2+N56qNMy4hCHRtlPX83ilSX7RK1d1TDSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682026738; a=rsa-sha256; cv=none; b=i6fXS8NjdEhbTX9rSSAFICuPEA2PaM7G8xFSD18pWn73e3Riuq/QI+0XcDWRlSnypBis5A PpjxFYHuSxwcc5UhFwbVPLmuNBURKXq0P+YeemrXXRQOtxxN0Unjnz8t2EIzkA6E8Raqq6 uJuW+aTaFtoISVVa0wrAr63k09/saYg08TkrIU8gTAPzTqFzP7UupJmBpfuOhIUBxOsCwM zXt/EUhN6xAUWMXn14sxlKFJaGv0yMS2qj8p1mUapiG7fU83KJe75bXNa1QHFgHkS/b5J2 oUF6fFikNitn/nknwvaU7S+uQEXDiX6fL2yhTcaUs/tdkhM2hv5bWZYAlLvpbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2WJ15LK7ztjj; Thu, 20 Apr 2023 21:38:57 +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 33KLcvVf075038; Thu, 20 Apr 2023 21:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KLcvnM075037; Thu, 20 Apr 2023 21:38:57 GMT (envelope-from git) Date: Thu, 20 Apr 2023 21:38:57 GMT Message-Id: <202304202138.33KLcvnM075037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 85e8c2a03490 - main - Cirrus-CI: Run makeman script List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85e8c2a0349075fcab5c2446dae1ce82f6445fe9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=85e8c2a0349075fcab5c2446dae1ce82f6445fe9 commit 85e8c2a0349075fcab5c2446dae1ce82f6445fe9 Author: Brooks Davis AuthorDate: 2023-04-20 21:38:10 +0000 Commit: Brooks Davis CommitDate: 2023-04-20 21:38:37 +0000 Cirrus-CI: Run makeman script Run makeman and verify that src.conf.5 has been updated if required and that there are no missing definition files. Reviewed by: emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D39682 --- .cirrus.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index d53d6ede110e..f2c8fa83c59f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -64,6 +64,14 @@ task: # Check that includes/Makefile refers to existing directories - if ! make -C include/ check-ldirs; then printf "\n>>> include/Makefile lists nonexistant directories <<<\n"; false; fi + makeman_script: + # Check that the committed src.conf.5 matches the one generated by + # tools/build/options/makeman (modulo the date which always updates) + # XXX: This script is slow so keep it last + - (make makeman 2> /tmp/makeman.out); cat /tmp/makeman.out + - if ! git diff --exit-code --ignore-matching-lines "^.Dd" share/man/man5/src.conf.5; then printf "\n>>> src.conf.5 was not updated as required <<<\n"; false; fi + - if grep -q "no description found" /tmp/makeman.out; then printf "\n>>> Missing description files <<<\n"; false; fi + post_script: - df -m - du -m -s /usr/obj From nobody Thu Apr 20 22:06: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 4Q2Wvm4lTNz46frY; Thu, 20 Apr 2023 22:06: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 4Q2Wvm405qz3PRT; Thu, 20 Apr 2023 22:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682028388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBo1f02/G37l8I9HLxzuQe7Xa7Wo40UjAUvqGIgZVnc=; b=k+x5I95Tkzj88Eor0wsCIzhrv1HUw5MDeoBdQGHIQghy/azYWaCzCy3BQpw88l98fFdB5O Pufr8DrBGUCnspDkhilrJcxQ+FyEerleyxdp5YqUvRQhXkpKERXJzCQ5h5lQTSH0NwqJ27 Kn4K4RPZimo2yHW/qte2D31alHnO966bwDj3dT6y0Zt0qydoaHPYHWH/Acevl9bFgKeiKs U78w/y8XiV57tPe6FbmAmYjdE/i+daFNFQ7H0HTt9/6i6qllZ8JoT0UR/8wuRUhL3EAMGm u3YXbTeZPeUy53BA7WBUcqwTGcPoQdZsMiuQ/id8o5DfrBF7/Ok8hEDUd1b4ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682028388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rBo1f02/G37l8I9HLxzuQe7Xa7Wo40UjAUvqGIgZVnc=; b=NQjWQcEFtuOuFvhrowr38ynlYfBZs006NYN++vw490uEEXquNzlxVR3DG1ce/XN+E/QdT1 hfb1bT3BysIzyIcfHJnvX/2uC3GnElN4erjkuJD668kcgJXYNGgFFklz43aaepDwFnTymg e7i4E7Nj2QwrBorXY2uSIk2UCZ0I8lrmnsk2JufQkTsDTuXsvXsDDLK+dDxzhbUWfRf1PM ++CX9xqPrfpQMF6hBM7LH3uwWQbl7Uhd03QgkVPfQPQjWi/DyssbjQvD1WiUY83zgabUUc a4P28V4iGZBVcjUlEY+Ov5wWW0A+GcQ8OOhFRby6lQOZmpVcV8Kua7s9WL4H5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682028388; a=rsa-sha256; cv=none; b=mf19HfalXPIwgahmtoOW9C6btmQ1CRnHFZbl2108g9l9Fvx9T1EqA5Jwk7JeC8xlJ+fm9A e5AbJAki6gC77A6SL/rhRlhrHF93cPsu7hQtHRj27wtre0tzIOlVLNQhvWrMsOzmsw5N1J ir+tebibTsTKuCUKdSJTIewYKiITzGbe1BOG9QK6++mfyXGlQDo+GaZCOTMZm9luoWzD7S a/5+xsciX54dbzQMeCU6FfqvEhycxtdEFkCYVKNNSAOGKNlwvhdHezqfc1Ld5/lp4qhH/2 bpZwKDA+7suUn3ADpw+Eusp21lzkydWpC34S2SU0bL/kjrrvFCOHCbSoni9+7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2Wvm2yJyzvss; Thu, 20 Apr 2023 22:06: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 33KM6S16024294; Thu, 20 Apr 2023 22:06:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KM6SnO024293; Thu, 20 Apr 2023 22:06:28 GMT (envelope-from git) Date: Thu, 20 Apr 2023 22:06:28 GMT Message-Id: <202304202206.33KM6SnO024293@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: ddf24a507c1a - main - netstat: 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddf24a507c1a7509d9657e477e69f1e7d08c77a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ddf24a507c1a7509d9657e477e69f1e7d08c77a6 commit ddf24a507c1a7509d9657e477e69f1e7d08c77a6 Author: Michael Tuexen AuthorDate: 2023-04-20 21:52:19 +0000 Commit: Michael Tuexen CommitDate: 2023-04-20 21:52:19 +0000 netstat: cleanup protopr does not support reading from a core anymore. So don't state that it can. Reviewed by: glebius, rscheff, rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D39688 --- usr.bin/netstat/main.c | 22 +++++++++++----------- usr.bin/netstat/nlist_symbols | 4 ---- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index 078d8cca3c61..f0db6409f1eb 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -88,9 +88,9 @@ static struct protox { int pr_usesysctl; /* non-zero if we use sysctl, not kvm */ int pr_protocol; } protox[] = { - { N_TCBINFO, N_TCPSTAT, 1, protopr, + { -1 , N_TCPSTAT, 1, protopr, tcp_stats, NULL, "tcp", 1, IPPROTO_TCP }, - { N_UDBINFO, N_UDPSTAT, 1, protopr, + { -1 , N_UDPSTAT, 1, protopr, udp_stats, NULL, "udp", 1, IPPROTO_UDP }, #ifdef SCTP { -1, N_SCTPSTAT, 1, sctp_protopr, @@ -100,13 +100,13 @@ static struct protox { { -1, -1, 1, protopr, NULL, NULL, "sdp", 1, IPPROTO_TCP }, #endif - { N_DIVCBINFO, -1, 1, protopr, + { -1 , -1, 1, protopr, divert_stats, NULL, "divert", 1, 0 }, - { N_RIPCBINFO, N_IPSTAT, 1, protopr, + { -1 , N_IPSTAT, 1, protopr, ip_stats, NULL, "ip", 1, IPPROTO_RAW }, - { N_RIPCBINFO, N_ICMPSTAT, 1, protopr, + { -1 , N_ICMPSTAT, 1, protopr, icmp_stats, NULL, "icmp", 1, IPPROTO_ICMP }, - { N_RIPCBINFO, N_IGMPSTAT, 1, protopr, + { -1 , N_IGMPSTAT, 1, protopr, igmp_stats, NULL, "igmp", 1, IPPROTO_IGMP }, #ifdef IPSEC { -1, N_IPSEC4STAT, 1, NULL, /* keep as compat */ @@ -118,7 +118,7 @@ static struct protox { { -1, N_IPCOMPSTAT, 1, NULL, ipcomp_stats, NULL, "ipcomp", 1, 0}, #endif - { N_RIPCBINFO, N_PIMSTAT, 1, protopr, + { -1 , N_PIMSTAT, 1, protopr, pim_stats, NULL, "pim", 1, IPPROTO_PIM }, { -1, N_CARPSTATS, 1, NULL, carp_stats, NULL, "carp", 1, 0 }, @@ -134,13 +134,13 @@ static struct protox { #ifdef INET6 static struct protox ip6protox[] = { - { N_TCBINFO, N_TCPSTAT, 1, protopr, + { -1 , N_TCPSTAT, 1, protopr, tcp_stats, NULL, "tcp", 1, IPPROTO_TCP }, - { N_UDBINFO, N_UDPSTAT, 1, protopr, + { -1 , N_UDPSTAT, 1, protopr, udp_stats, NULL, "udp", 1, IPPROTO_UDP }, - { N_RIPCBINFO, N_IP6STAT, 1, protopr, + { -1 , N_IP6STAT, 1, protopr, ip6_stats, ip6_ifstats, "ip6", 1, IPPROTO_RAW }, - { N_RIPCBINFO, N_ICMP6STAT, 1, protopr, + { -1 , N_ICMP6STAT, 1, protopr, icmp6_stats, icmp6_ifstats, "icmp6", 1, IPPROTO_ICMPV6 }, #ifdef SDP { -1, -1, 1, protopr, diff --git a/usr.bin/netstat/nlist_symbols b/usr.bin/netstat/nlist_symbols index 1c09d81c0b98..3583887ad9d7 100644 --- a/usr.bin/netstat/nlist_symbols +++ b/usr.bin/netstat/nlist_symbols @@ -4,7 +4,6 @@ all _ahstat all _arpstat all _carpstats -all _divcbinfo all _espstat all _icmp6stat all _icmpstat @@ -36,15 +35,12 @@ all _pfsyncstats all _pim6stat all _pimstat all _rip6stat -all _ripcbinfo all _rtree all _rtstat all _sctpstat all _sfstat -all _tcbinfo all _tcpstat all _tcps_states -all _udbinfo all _udpstat all _unp_count all _unp_dhead From nobody Thu Apr 20 22: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 4Q2WyN4md7z46fsL; Thu, 20 Apr 2023 22: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 4Q2WyN0SJgz3jd8; Thu, 20 Apr 2023 22: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=1682028524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vs/ZVwzSzxZf3oq0jes36g95jY1+gVMQ9teoTN12i94=; b=hbPIdsqWAPiCW7MuUJZDZhehkSxDRJM62ywmkuA+JWgIRD0dLsS4eCcHqsRQbTb28WZ6Zd FkvD+bOPpVEEtvaRZsuk10t4dX8QReAtW362HftVWJlKnu2YNeRLXjPjkThOSF8RNGWbmN mVPX1yDDGrWty6x0UACODjuNExPStsEuAdU6Iy7SCLM/dFwbva56qFFmwFnqwY2xxsMmrP FnsSJYE8CXSC30y9VG0FjmrIYMD0tCuxXIEtQfFEXKe6/q0W+/egIWckj4Vf2rlJkmVK2G mMk7eRLMg7Q5iba4d0B+ERJlZ0amgqaY+BoMyMYAkgiG5GY3CXEkH4gvLe7L2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682028524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vs/ZVwzSzxZf3oq0jes36g95jY1+gVMQ9teoTN12i94=; b=oEaJ6Ujf02k9dO1SmFkGeTm+PD/JpcIOQMt6fxGU8DpDaxDhTQTZ32GqHzj8Mu1HcLh3kt qUOT5OwyKCvKUsmMKgQvzh3S2uFjF7bmk1Dap05euotuuODoTFZbrlxAFqr9LY51msy98q dRRcMOJ1bF0EX5avTxhszxBjCbCn717SB1vlFR3ifqD11Kut5N6nOt5fAIgl8vcB0XV5vy hwNqwqYHXj2ANYW4iVi2C281pa2gA4ONUzZtr/g+EsBBFFTv9KZSOBej1CsSjlDtioi+kt 0LDW8WzypAYfjUkoRo9Xfw/q3V42Nhsx4O2o7/d3gKynTPOhCt4isig8po/iqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682028524; a=rsa-sha256; cv=none; b=uFyqwbss9K9YyNjSfKdU1G0nk3s5uTSrVwxTj3kOoK60+HtkbpSpB2v/GclA1oZ1wbw2ww OOLvxhWABmiheIKfPWV//m4O1LdpyYjqzGiQKNv4+vokoWcVJPOOiN8+pQpZ3+1N0d2V08 kQ6RXmXwN0iGudkmzfD79gtTk5lTL+roSsydcgwWn5xtPwEemnyx1Dy3md4exBo19ycTXC wyGdKWVGg4X9iFzfJMKn+J25gC+6ROF84QtXTF+iC9jLlE15kH3idh1r7tNfA5DTCqS36G pImfW6FwamlNGjnRBpdtO6VnPW0Fg/06ldgzy7oTtmXpIbIbdK6cFbdh5jCxfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2WyM6T3KzvfS; Thu, 20 Apr 2023 22: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 33KM8h9w024687; Thu, 20 Apr 2023 22: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 33KM8hCV024686; Thu, 20 Apr 2023 22:08:43 GMT (envelope-from git) Date: Thu, 20 Apr 2023 22:08:43 GMT Message-Id: <202304202208.33KM8hCV024686@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: 170511589e4d - main - openssh: Update configure for DISABLE_LASTLOG List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 170511589e4d15a27ee92979691cfc1b26929bb7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=170511589e4d15a27ee92979691cfc1b26929bb7 commit 170511589e4d15a27ee92979691cfc1b26929bb7 Author: Ed Maste AuthorDate: 2023-04-20 00:03:26 +0000 Commit: Ed Maste CommitDate: 2023-04-20 22:08:16 +0000 openssh: Update configure for DISABLE_LASTLOG PR: 209441 Sponsored by: The FreeBSD Foundation --- crypto/openssh/configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/openssh/configure.ac b/crypto/openssh/configure.ac index c5060c59ddf4..33d037c3f7ac 100644 --- a/crypto/openssh/configure.ac +++ b/crypto/openssh/configure.ac @@ -1037,6 +1037,7 @@ mips-sony-bsd|mips-sony-newsos4) [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it]) ;; *-*-freebsd*) + SKIP_DISABLE_LASTLOG_DEFINE=yes AC_DEFINE([LOCKED_PASSWD_PREFIX], ["*LOCKED*"], [Account locked with pw(1)]) AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way]) AC_CHECK_HEADER([net/if_tap.h], , From nobody Thu Apr 20 22:15: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 4Q2X6J4KyYz46g57; Thu, 20 Apr 2023 22:15: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 4Q2X6J3SkLz3vjN; Thu, 20 Apr 2023 22:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682028936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rMzwmtPnmE1vBQZW/4YKc1ED3i0UP5HMuwF0a/HYd88=; b=oIeaF2g3Vf9Fe4dqJHxFgwJvNRTpJqreYKoxXQsZJlh2wClAJGMzec4r2xJ6STjB1e+CBF GB5BZ7VFzYJ37qFBsD9nOORmL4AYG1JU0nBuPRFPcaakTc+0KhpecsoOoZ82ncZx0RACWG YsCS1pjnB0gWZo8Gzq13Q31oNC++A2Ixlb7cR0vvHHLDUqGXYa6lKgmm8P1Nebddu7pSJx usegcg7jYQ0raqf83JHXZLLcVSZ0SV0wJjzmEl0xySSe1V2kW1qY5SJ3iI1WTXUlWhlqrj IocRlL/PYbKn5UCo6FiHGvUHw9G6iXKnBybyWqEtoblO0weeTt/jEnj4AZc9mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682028936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rMzwmtPnmE1vBQZW/4YKc1ED3i0UP5HMuwF0a/HYd88=; b=d/EWH7Ed7xMj3f2OXfWxdSui0TotNuZSIcg0vTQdCezz0A4Noa+JhHB5Sr770LIRu0hAhw u08Y1wvlErGjvG2d4klLmHJUaWsaHDlGv9sd4/O42EuXTIe8jvR4ObhxZsHr/SSc1LYIV9 M/9U+6moLc2vxziDiHSJtF5KeXUTKzU42Tw4AXLa9O6YHT3BFp2Cy3xpyhp2GsMpT8a5qW 5awAtTmIaWz5mS4bNtjbBXf8jdjX+yb5y0QPI1MULqRfaEq9HUm2zk2XM6aw9OFEDOH+tC CEgkOrlWA2q/rm68cbBFEava9nBUKIvTI7FxSG6U58EESeZcUntq6ea1Y9Z6yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682028936; a=rsa-sha256; cv=none; b=htbu+Ve0zoU0P4ii5a4hTk5+a467SQKmca/j5dbM8eHfMNcSX2Sc8O1N32RwnCf59jXG2+ V3D5Xx9p33iV5E0VChGL4xwvxt7aSx+sGLsAyDtxvNvz4DGIcvCnBg5dc82V61Vmxly5Xs 6bRUG/qojdKUQkBnh+kyYVYFy1H+i7WA+IudXsKODPFN1qokxiVorv3S2Fiay9vpzgqU2q i7gJIr2kWKsO7Y3hpZj4nk2UeM1Oir4Cg9k6JQJYVgidTTwWFkm0WULYnsGzB4IIN/kOm+ EUB+wGfWQw4SjG4R1yXK2Y4f+iT8RkxJAVYyoNMLuK2Qywyp+Zm0gF9WEB90KQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2X6J2XzbzvW4; Thu, 20 Apr 2023 22:15: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 33KMFavW041618; Thu, 20 Apr 2023 22:15:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KMFa4H041617; Thu, 20 Apr 2023 22:15:36 GMT (envelope-from git) Date: Thu, 20 Apr 2023 22:15:36 GMT Message-Id: <202304202215.33KMFa4H041617@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: d7339c42673a - stable/13 - trpt: fix several bugs and add deprecation notice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: d7339c42673a84e222f630e80b5606776b755229 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d7339c42673a84e222f630e80b5606776b755229 commit d7339c42673a84e222f630e80b5606776b755229 Author: Michael Tuexen AuthorDate: 2023-04-20 22:09:40 +0000 Commit: Michael Tuexen CommitDate: 2023-04-20 22:09:40 +0000 trpt: fix several bugs and add deprecation notice This patch fixes several bugs releated to trpt including * the computation of the TCP payload bytes, in particular when TCP options are present or IPv4 is used. * the logging of incoming and outgoing packets. * the logging of timers, in particular add support for logging of the delayed ack timer. Also add a deprecation note, since support for this utility has been removed from the main branch. Therefore, this is a direct commit to stable/13. Reviewed by: cc, glebius, rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D39436 --- sys/netinet/tcp_debug.c | 9 +++++---- sys/netinet/tcp_input.c | 13 ++++++++++++- sys/netinet/tcp_output.c | 28 ++++++++-------------------- sys/netinet/tcp_timer.c | 20 +++++++++++++++----- sys/netinet/tcp_timer.h | 6 ++++++ usr.sbin/trpt/trpt.8 | 31 ++++++++++++++++++++++--------- usr.sbin/trpt/trpt.c | 10 ++++------ 7 files changed, 72 insertions(+), 45 deletions(-) diff --git a/sys/netinet/tcp_debug.c b/sys/netinet/tcp_debug.c index aedaa131095f..640940b1ce8c 100644 --- a/sys/netinet/tcp_debug.c +++ b/sys/netinet/tcp_debug.c @@ -177,13 +177,13 @@ tcp_trace(short act, short ostate, struct tcpcb *tp, void *ipgen, #ifdef INET6 isipv6 ? ntohs(((struct ip6_hdr *)ipgen)->ip6_plen) : #endif - ntohs(((struct ip *)ipgen)->ip_len); + ntohs(((struct ip *)ipgen)->ip_len) - + (((struct ip *)ipgen)->ip_hl << 2); if (act == TA_OUTPUT) { seq = ntohl(seq); ack = ntohl(ack); } - if (act == TA_OUTPUT) - len -= sizeof (struct tcphdr); + len -= th->th_off << 2; if (len) printf("[%x..%x)", seq, seq+len); else @@ -205,7 +205,8 @@ tcp_trace(short act, short ostate, struct tcpcb *tp, void *ipgen, case TA_USER: printf("%s", prurequests[req&0xff]); - if ((req & 0xff) == PRU_SLOWTIMO) + if ((req & 0xff) == PRU_SLOWTIMO || + (req & 0xff) == PRU_FASTTIMO) printf("<%s>", tcptimers[req>>8]); break; } diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9bc9923530e0..bb2a0e497dcf 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1561,7 +1561,18 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, */ u_char tcp_saveipgen[IP6_HDR_LEN]; struct tcphdr tcp_savetcp; - short ostate = 0; + short ostate; + + if (so->so_options & SO_DEBUG) { + ostate = tp->t_state; +#ifdef INET6 + if (mtod(m, struct ip *)->ip_v == 6) + bcopy(mtod(m, char *), (char *)tcp_saveipgen, sizeof(struct ip6_hdr)); + else +#endif + bcopy(mtod(m, char *), (char *)tcp_saveipgen, sizeof(struct ip)); + tcp_savetcp = *th; + } #endif thflags = th->th_flags; inc = &tp->t_inpcb->inp_inc; diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index fea54cdcc5cb..f979649ca608 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1430,26 +1430,6 @@ send: hhook_run_tcp_est_out(tp, th, &to, len, tso); #endif -#ifdef TCPDEBUG - /* - * Trace. - */ - if (so->so_options & SO_DEBUG) { - u_short save = 0; -#ifdef INET6 - if (!isipv6) -#endif - { - save = ipov->ih_len; - ipov->ih_len = htons(m->m_pkthdr.len /* - hdrlen + (th->th_off << 2) */); - } - tcp_trace(TA_OUTPUT, tp->t_state, tp, mtod(m, void *), th, 0); -#ifdef INET6 - if (!isipv6) -#endif - ipov->ih_len = save; - } -#endif /* TCPDEBUG */ TCP_PROBE3(debug__output, tp, th, m); /* We're getting ready to send; log now. */ @@ -1502,6 +1482,10 @@ send: /* Save packet, if requested. */ tcp_pcap_add(th, m, &(tp->t_outpkts)); #endif +#ifdef TCPDEBUG + if (so->so_options & SO_DEBUG) + tcp_trace(TA_OUTPUT, tp->t_state, tp, (void *)ip6, th, 0); +#endif /* TCPDEBUG */ /* TODO: IPv6 IP6TOS_ECT bit on */ error = ip6_output(m, tp->t_inpcb->in6p_outputopts, @@ -1549,6 +1533,10 @@ send: /* Save packet, if requested. */ tcp_pcap_add(th, m, &(tp->t_outpkts)); #endif +#ifdef TCPDEBUG + if (so->so_options & SO_DEBUG) + tcp_trace(TA_OUTPUT, tp->t_state, tp, (void *)ip, th, 0); +#endif /* TCPDEBUG */ error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 4b00b686be32..21e6b66ff81c 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -266,8 +266,12 @@ tcp_timer_delack(void *xtp) struct epoch_tracker et; struct tcpcb *tp = xtp; struct inpcb *inp; - CURVNET_SET(tp->t_vnet); +#ifdef TCPDEBUG + int ostate; + ostate = tp->t_state; +#endif + CURVNET_SET(tp->t_vnet); inp = tp->t_inpcb; KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); @@ -287,6 +291,11 @@ tcp_timer_delack(void *xtp) TCPSTAT_INC(tcps_delack); NET_EPOCH_ENTER(et); (void) tp->t_fb->tfb_tcp_output(tp); +#ifdef TCPDEBUG + if (inp->inp_socket->so_options & SO_DEBUG) + tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, + (TCPT_DELACK << 8) | PRU_FASTTIMO); +#endif INP_WUNLOCK(inp); NET_EPOCH_EXIT(et); CURVNET_RESTORE(); @@ -380,7 +389,7 @@ tcp_timer_2msl(void *xtp) #ifdef TCPDEBUG if (tp != NULL && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, - PRU_SLOWTIMO); + (TCPT_2MSL << 8) | PRU_SLOWTIMO); #endif TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); @@ -502,7 +511,7 @@ dropit: #ifdef TCPDEBUG if (tp != NULL && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, - PRU_SLOWTIMO); + (TCPT_KEEP << 8) | PRU_SLOWTIMO); #endif TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); NET_EPOCH_EXIT(et); @@ -592,7 +601,8 @@ tcp_timer_persist(void *xtp) #ifdef TCPDEBUG if (tp != NULL && tp->t_inpcb->inp_socket->so_options & SO_DEBUG) - tcp_trace(TA_USER, ostate, tp, NULL, NULL, PRU_SLOWTIMO); + tcp_trace(TA_USER, ostate, tp, NULL, NULL, + (TCPT_PERSIST << 8) | PRU_SLOWTIMO); #endif TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); INP_WUNLOCK(inp); @@ -875,7 +885,7 @@ tcp_timer_rexmt(void * xtp) #ifdef TCPDEBUG if (tp != NULL && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0, - PRU_SLOWTIMO); + (TCPT_REXMT << 8) | PRU_SLOWTIMO); #endif TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); INP_WUNLOCK(inp); diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h index 316b76e50f7e..d0bc74669123 100644 --- a/sys/netinet/tcp_timer.h +++ b/sys/netinet/tcp_timer.h @@ -35,6 +35,12 @@ #ifndef _NETINET_TCP_TIMER_H_ #define _NETINET_TCP_TIMER_H_ +#define TCPT_REXMT 0 /* retransmit */ +#define TCPT_PERSIST 1 /* retransmit persistance */ +#define TCPT_KEEP 2 /* keep alive */ +#define TCPT_2MSL 3 /* 2*msl quiet time timer */ +#define TCPT_DELACK 4 /* delay ack */ + /* * The TCPT_REXMT timer is used to force retransmissions. * The TCP has the TCPT_REXMT timer set whenever segments diff --git a/usr.sbin/trpt/trpt.8 b/usr.sbin/trpt/trpt.8 index 3c66f5afe761..8d674f76298b 100644 --- a/usr.sbin/trpt/trpt.8 +++ b/usr.sbin/trpt/trpt.8 @@ -28,13 +28,19 @@ .\" @(#)trpt.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd February 15, 2018 +.Dd April 21, 2023 .Dt TRPT 8 .Os .Sh NAME .Nm trpt .Nd transliterate protocol trace .Sh SYNOPSIS +To add support for this utility to the kernel, add the following line to the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options TCPDEBUG" +.Ed +.Pp .Nm .Op Fl a .Op Fl f @@ -44,12 +50,15 @@ .Oo .Ar system Op Ar core .Oc +.Sh DEPRECATION NOTICE +.Nm +is deprecated and will not be available in +.Fx 14.0 +and later. .Sh DESCRIPTION The .Nm -utility interrogates the buffer of -.Tn TCP -trace records created +utility interrogates the buffer of TCP trace records created when a socket is marked for .Dq debugging (see @@ -58,11 +67,8 @@ and prints a readable description of these records. When no options are supplied, .Nm prints all the trace records found in the system -grouped according to -.Tn TCP -connection protocol control -block -.Pq Tn PCB . +grouped according to TCP connection protocol control block +.Pq PCB . .Pp The following options may be used to alter this behavior: @@ -142,3 +148,10 @@ but this is not saved in the trace record. .Pp The output format is inscrutable and should be described here. +.Pp +It is not possible to use the +.Nm +utility if the following line is in the kernel config file: +.Bd -ragged -offset indent +.Cd "options TCPPCAP" +.Ed diff --git a/usr.sbin/trpt/trpt.c b/usr.sbin/trpt/trpt.c index e8198f7d080e..b89a82c191d8 100644 --- a/usr.sbin/trpt/trpt.c +++ b/usr.sbin/trpt/trpt.c @@ -124,7 +124,7 @@ main(int argc, char **argv) case 'p': if (npcbs >= TCP_NDEBUG) errx(1, "too many pcb's specified"); - (void)sscanf(optarg, "%x", (int *)&tcp_pcbs[npcbs++]); + (void)sscanf(optarg, "%lx", (long *)&tcp_pcbs[npcbs++]); break; case 's': ++sflag; @@ -369,18 +369,16 @@ tcp_trace(short act, short ostate, struct tcpcb *tp, int family __unused, len = #ifdef INET6 - isipv6 ? ip6->ip6_plen : + isipv6 ? ntohs(ip6->ip6_plen) : #endif - ip4->ip_len; + ntohs(ip4->ip_len) - (ip4->ip_hl << 2); win = th->th_win; if (act == TA_OUTPUT) { seq = ntohl(seq); ack = ntohl(ack); - len = ntohs(len); win = ntohs(win); } - if (act == TA_OUTPUT) - len -= sizeof(struct tcphdr); + len -= th->th_off << 2; if (len) printf("[%lx..%lx)", (u_long)seq, (u_long)(seq + len)); else From nobody Thu Apr 20 22:19: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 4Q2XBj2dBSz46gSk; Thu, 20 Apr 2023 22:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2XBj25X0z43LG; Thu, 20 Apr 2023 22:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682029165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SeXxtficFFYnFV8dEaYkRGpb2ZvtwygYfgPfO6RaRXQ=; b=wMW7MBk995t/tcNYKOHIto7cgEXpf+3PDf4kI99BTeQJj9Ahmm7YGFkB2TVVJSMI+bIeFc TSLvWtZWyK5veUwS2i0Q3FhjJb3c87Ikzmwfc2sqvJC9FWH+L6c0jRd1XSvE03n9mpbHvn MJjDsZNjnGlC/3QqaNoWPim/IbzFtVoMArypxBK5yqxEi+SdHDobFWp2R9+cnREdsnBUwi gYpL+GwBw5nZPTyG2HEaqG+Vo+Ov2Lhsfv06rNzWKILMqJa27ZYRDxUoSeGyHhE57T5Bcl Ytd7I4b4yYxeHximr2HBJdLZQNHbvZnmO83XPOYzGl4a5vTrjPoJcbe98eBIIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682029165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SeXxtficFFYnFV8dEaYkRGpb2ZvtwygYfgPfO6RaRXQ=; b=ZKwAtSX0M0hT2TakT6h7Azblvn1WFYWdo+EUEgiOXOyuAIhAHMsbYuyezSmxEiJ0Kd6tRw OM8dvoZDhT6SytT/XoBt9JLPDd3GZKRgvWbRfeuREmaP2mCVr+ov5KgYJMvLpw0WER7V37 C6DRV/7WDbsconO9IEKtL8c1RMUDFcFgTywq+oHjpUaif9e9l/EDQeVeOaquD252YNcS5d dg2g/5h1cSDNnFLpcWLD5JgSh+5h53KSltWHNAdAl11z+A1HObIYwCPHBJB/6XOo+A83Fq QD4//Q8Utg/UUTNnlSYVRQ39CZMUCbJ8TiFEaPgMHxSztC5p8U4Uwgjf2iOSDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682029165; a=rsa-sha256; cv=none; b=nAksGBJU2vex+qIXnQ+Pj66/Xw7OlNeSHa2LWpCy9mhtvfCzFNhfAnKDVDxTXS6XxYzjCQ ZNg+Pw6zLkvkNMMMsTJmJO++BElY/nVp8ICbyM6SXDe74XmejGGsal+vx38XdS8YA7QVlC nr6LyNIImJXpP/5wk61KDtNlVWbxO4gfevl6UnRMrRf0uGLtMI5NpOBCHCxCZKE1jJjRUi 1iJHH1BU9X/kUjfX6A41cTra4HIQIeVRE559aT7coMAlQI78MF3rarR8wAM4b+6NukU0yE kNsj9NtmETfRui7o5kxeNdAgGku6wJY2mxqolWmwSeQAL18vg9k6ARXdm4RVeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2XBj1B69zvbx; Thu, 20 Apr 2023 22:19: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 33KMJPjV042225; Thu, 20 Apr 2023 22:19:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KMJPUo042224; Thu, 20 Apr 2023 22:19:25 GMT (envelope-from git) Date: Thu, 20 Apr 2023 22:19:25 GMT Message-Id: <202304202219.33KMJPUo042224@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: 1dd350fce0aa - main - makesyscalls.lua: Make more luaish List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 1dd350fce0aad85c559b962654f71d1449f21727 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1dd350fce0aad85c559b962654f71d1449f21727 commit 1dd350fce0aad85c559b962654f71d1449f21727 Author: Warner Losh AuthorDate: 2023-04-20 22:15:57 +0000 Commit: Warner Losh CommitDate: 2023-04-20 22:17:25 +0000 makesyscalls.lua: Make more luaish x["y"] can be written as x.y, which looks better and is a more typical lua idiom. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D39709 --- sys/tools/makesyscalls.lua | 248 ++++++++++++++++++++++----------------------- 1 file changed, 124 insertions(+), 124 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index ec79ae30d130..564551a47ed3 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -352,66 +352,66 @@ local function process_compat() nval = nval << 1 for _, v in pairs(compat_options) do - if v["stdcompat"] ~= nil then - local stdcompat = v["stdcompat"] - v["definition"] = "COMPAT_" .. stdcompat:upper() - v["compatlevel"] = tonumber(stdcompat:match("([0-9]+)$")) - v["flag"] = stdcompat:gsub("FREEBSD", "COMPAT") - v["prefix"] = stdcompat:lower() .. "_" - v["descr"] = stdcompat:lower() + if v.stdcompat ~= nil then + local stdcompat = v.stdcompat + v.definition = "COMPAT_" .. stdcompat:upper() + v.compatlevel = tonumber(stdcompat:match("([0-9]+)$")) + v.flag = stdcompat:gsub("FREEBSD", "COMPAT") + v.prefix = stdcompat:lower() .. "_" + v.descr = stdcompat:lower() end - local tmpname = "sys" .. v["flag"]:lower() + local tmpname = "sys" .. v.flag:lower() local dcltmpname = tmpname .. "dcl" files[tmpname] = io.tmpfile() files[dcltmpname] = io.tmpfile() - v["tmp"] = tmpname - v["dcltmp"] = dcltmpname + v.tmp = tmpname + v.dcltmp = dcltmpname - known_flags[v["flag"]] = nval - v["mask"] = nval + known_flags[v.flag] = nval + v.mask = nval nval = nval << 1 - v["count"] = 0 + v.count = 0 end end local function process_abi_flags() - local flags, mask = config["abi_flags"], 0 + local flags, mask = config.abi_flags, 0 for txtflag in flags:gmatch("([^|]+)") do if known_abi_flags[txtflag] == nil then abort(1, "Unknown abi_flag: " .. txtflag) end - mask = mask | known_abi_flags[txtflag]["value"] + mask = mask | known_abi_flags[txtflag].value end - config["abi_flags_mask"] = mask + config.abi_flags_mask = mask end local function process_obsol() - local obsol = config["obsol"] + local obsol = config.obsol for syscall in obsol:gmatch("([^ ]+)") do - config["obsol_dict"][syscall] = true + config.obsol_dict[syscall] = true end end local function process_unimpl() - local unimpl = config["unimpl"] + local unimpl = config.unimpl for syscall in unimpl:gmatch("([^ ]+)") do - config["unimpl_dict"][syscall] = true + config.unimpl_dict[syscall] = true end end local function process_syscall_abi_change() - local changes_abi = config["syscall_abi_change"] + local changes_abi = config.syscall_abi_change for syscall in changes_abi:gmatch("([^ ]+)") do - config["sys_abi_change"][syscall] = true + config.sys_abi_change[syscall] = true end - local no_changes = config["syscall_no_abi_change"] + local no_changes = config.syscall_no_abi_change for syscall in no_changes:gmatch("([^ ]+)") do - config["sys_no_abi_change"][syscall] = true + config.sys_no_abi_change[syscall] = true end end @@ -420,11 +420,11 @@ local function abi_changes(name) abort(1, "abi_changes: unknown flag: " .. name) end - return config["abi_flags_mask"] & known_abi_flags[name]["value"] ~= 0 + return config.abi_flags_mask & known_abi_flags[name].value ~= 0 end local function strip_abi_prefix(funcname) - local abiprefix = config["abi_func_prefix"] + local abiprefix = config.abi_func_prefix local stripped_name if funcname == nil then return nil @@ -469,7 +469,7 @@ end -- to work both before and after the substitution local function isptrtype(type) return type:find("*") or type:find("caddr_t") or - type:find("intptr_t") or type:find(config['abi_intptr_t']) + type:find("intptr_t") or type:find(config.abi_intptr_t) end local function isptrarraytype(type) @@ -486,7 +486,7 @@ local process_syscall_def -- These patterns are processed in order on any line that isn't empty. local pattern_table = { { - pattern = "%s*$" .. config['os_id_keyword'], + pattern = "%s*$" .. config.os_id_keyword, process = function(_, _) -- Ignore... ID tag end, @@ -521,8 +521,8 @@ local pattern_table = { dump_prevline = true, pattern = "%%ABI_HEADERS%%", process = function() - if config['abi_headers'] ~= "" then - line = config['abi_headers'] .. "\n" + if config.abi_headers ~= "" then + line = config.abi_headers .. "\n" write_line('sysinc', line) end end, @@ -572,9 +572,9 @@ local function process_sysfile(file) local function do_match(nextline, prevline) local pattern, handler, dump for _, v in pairs(pattern_table) do - pattern = v['pattern'] - handler = v['process'] - dump = v['dump_prevline'] + pattern = v.pattern + handler = v.process + dump = v.dump_prevline if nextline:match(pattern) then if dump and prevline then process_syscall_def(prevline) @@ -648,7 +648,7 @@ end local function check_abi_changes(arg) for k, v in pairs(known_abi_flags) do - local exprs = v["exprs"] + local exprs = v.exprs if abi_changes(k) and exprs ~= nil then for _, e in pairs(exprs) do if arg:find(e) then @@ -684,26 +684,26 @@ local function process_args(args) -- is removed changes_abi = changes_abi or (abi_changes("pair_64bit") and is64bittype(argtype)) - argtype = argtype:gsub("intptr_t", config["abi_intptr_t"]) - argtype = argtype:gsub("semid_t", config["abi_semid_t"]) + argtype = argtype:gsub("intptr_t", config.abi_intptr_t) + argtype = argtype:gsub("semid_t", config.abi_semid_t) if isptrtype(argtype) then - argtype = argtype:gsub("size_t", config["abi_size_t"]) - argtype = argtype:gsub("^long", config["abi_long"]); - argtype = argtype:gsub("^u_long", config["abi_u_long"]); - argtype = argtype:gsub("^const u_long", "const " .. config["abi_u_long"]); + argtype = argtype:gsub("size_t", config.abi_size_t) + argtype = argtype:gsub("^long", config.abi_long); + argtype = argtype:gsub("^u_long", config.abi_u_long); + argtype = argtype:gsub("^const u_long", "const " .. config.abi_u_long); elseif argtype:find("^long$") then - argtype = config["abi_long"] + argtype = config.abi_long end - if isptrarraytype(argtype) and config["abi_ptr_array_t"] ~= "" then + if isptrarraytype(argtype) and config.abi_ptr_array_t ~= "" then -- `* const *` -> `**` argtype = argtype:gsub("[*][ ]*const[ ]*[*]", "**") -- e.g., `struct aiocb **` -> `uint32_t *` - argtype = argtype:gsub("[^*]*[*]", config["abi_ptr_array_t"] .. " ", 1) + argtype = argtype:gsub("[^*]*[*]", config.abi_ptr_array_t .. " ", 1) end -- XX TODO: Forward declarations? See: sysstubfwd in CheriBSD if arg_abi_change then - local abi_type_suffix = config["abi_type_suffix"] + local abi_type_suffix = config.abi_type_suffix argtype = argtype:gsub("(struct [^ ]*)", "%1" .. abi_type_suffix) argtype = argtype:gsub("(union [^ ]*)", "%1" .. @@ -741,9 +741,9 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, auditev, syscallret, funcname, funcalias, funcargs, argalias) local argssize - if flags & known_flags["SYSMUX"] ~= 0 then + if flags & known_flags.SYSMUX ~= 0 then argssize = "0" - elseif #funcargs > 0 or flags & known_flags["NODEF"] ~= 0 then + elseif #funcargs > 0 or flags & known_flags.NODEF ~= 0 then argssize = "AS(" .. argalias .. ")" else argssize = "0" @@ -762,7 +762,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, case %d: ]], funcname, sysnum)) - if #funcargs > 0 and flags & known_flags["SYSMUX"] == 0 then + if #funcargs > 0 and flags & known_flags.SYSMUX == 0 then write_line("systracetmp", "\t\tswitch (ndx) {\n") write_line("systrace", string.format( "\t\tstruct %s *p = params;\n", argalias)) @@ -771,8 +771,8 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, local argtype, argname, desc, padding padding = "" for idx, arg in ipairs(funcargs) do - argtype = arg["type"] - argname = arg["name"] + argtype = arg.type + argname = arg.name argtype = trim(argtype:gsub("__restrict$", ""), nil) if argtype == "int" and argname == "_pad" and abi_changes("pair_64bit") then @@ -795,7 +795,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, if isptrtype(argtype) then write_line("systrace", string.format( "\t\tuarg[a++] = (%s)p->%s; /* %s */\n", - config["ptr_intptr_t_cast"], + config.ptr_intptr_t_cast, argname, argtype)) elseif argtype == "union l_semun" then write_line("systrace", string.format( @@ -831,7 +831,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, ]], syscallret)) end local n_args = #funcargs - if flags & known_flags["SYSMUX"] ~= 0 then + if flags & known_flags.SYSMUX ~= 0 then n_args = 0 end write_line("systrace", string.format( @@ -844,7 +844,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, write_line("sysarg", string.format("struct %s {\n", argalias)) for _, v in ipairs(funcargs) do - local argname, argtype = v["name"], v["type"] + local argname, argtype = v.name, v.type if argtype == "int" and argname == "_pad" and abi_changes("pair_64bit") then write_line("sysarg", "#ifdef PAD64_REQUIRED\n") end @@ -879,20 +879,20 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, end write_line("sysdcl", ";\n") write_line("sysaue", string.format("#define\t%sAUE_%s\t%s\n", - config['syscallprefix'], funcalias, auditev)) + config.syscallprefix, funcalias, auditev)) end write_line("sysent", string.format("\t{ .sy_narg = %s, .sy_call = (sy_call_t *)", argssize)) local column = 8 + 2 + #argssize + 15 - if flags & known_flags["SYSMUX"] ~= 0 then + if flags & known_flags.SYSMUX ~= 0 then write_line("sysent", string.format( "nosys, .sy_auevent = AUE_NULL, " .. ".sy_flags = %s, .sy_thrcnt = SY_THR_STATIC },", sysflags)) column = column + #"nosys" + #"AUE_NULL" + 3 - elseif flags & known_flags["NOSTD"] ~= 0 then + elseif flags & known_flags.NOSTD ~= 0 then write_line("sysent", string.format( "lkmressys, .sy_auevent = AUE_NULL, " .. ".sy_flags = %s, .sy_thrcnt = SY_THR_ABSENT },", @@ -920,9 +920,9 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, write_line("sysnames", string.format("\t\"%s\",\t\t\t/* %d = %s */\n", funcalias, sysnum, funcalias)) - if flags & known_flags["NODEF"] == 0 then + if flags & known_flags.NODEF == 0 then write_line("syshdr", string.format("#define\t%s%s\t%d\n", - config['syscallprefix'], funcalias, sysnum)) + config.syscallprefix, funcalias, sysnum)) write_line("sysmk", string.format(" \\\n\t%s.o", funcalias)) end @@ -947,36 +947,36 @@ local function handle_compat(sysnum, thr_flag, flags, sysflags, rettype, auditev, funcname, funcalias, funcargs, argalias) local argssize, out, outdcl, wrap, prefix, descr - if #funcargs > 0 or flags & known_flags["NODEF"] ~= 0 then + if #funcargs > 0 or flags & known_flags.NODEF ~= 0 then argssize = "AS(" .. argalias .. ")" else argssize = "0" end for _, v in pairs(compat_options) do - if flags & v["mask"] ~= 0 then - if config["mincompat"] > v["compatlevel"] then + if flags & v.mask ~= 0 then + if config.mincompat > v.compatlevel then funcname = strip_abi_prefix(funcname) - funcname = v["prefix"] .. funcname + funcname = v.prefix .. funcname return handle_obsol(sysnum, funcname, funcname) end - v["count"] = v["count"] + 1 - out = v["tmp"] - outdcl = v["dcltmp"] - wrap = v["flag"]:lower() - prefix = v["prefix"] - descr = v["descr"] + v.count = v.count + 1 + out = v.tmp + outdcl = v.dcltmp + wrap = v.flag:lower() + prefix = v.prefix + descr = v.descr goto compatdone end end ::compatdone:: local dprotoflags = get_mask({"NOPROTO", "NODEF"}) - local nargflags = dprotoflags | known_flags["NOARGS"] + local nargflags = dprotoflags | known_flags.NOARGS if #funcargs > 0 and flags & nargflags == 0 then write_line(out, string.format("struct %s {\n", argalias)) for _, v in ipairs(funcargs) do - local argname, argtype = v["name"], v["type"] + local argname, argtype = v.name, v.type write_line(out, string.format( "\tchar %s_l_[PADL_(%s)]; %s %s; char %s_r_[PADR_(%s)];\n", argname, argtype, @@ -993,11 +993,11 @@ local function handle_compat(sysnum, thr_flag, flags, sysflags, rettype, "%s\t%s%s(struct thread *, struct %s *);\n", rettype, prefix, funcname, argalias)) write_line("sysaue", string.format( - "#define\t%sAUE_%s%s\t%s\n", config['syscallprefix'], + "#define\t%sAUE_%s%s\t%s\n", config.syscallprefix, prefix, funcname, auditev)) end - if flags & known_flags['NOSTD'] ~= 0 then + if flags & known_flags.NOSTD ~= 0 then write_line("sysent", string.format( "\t{ .sy_narg = %s, .sy_call = (sy_call_t *)%s, " .. ".sy_auevent = %s, .sy_flags = 0, " .. @@ -1024,9 +1024,9 @@ local function handle_compat(sysnum, thr_flag, flags, sysflags, rettype, write_line("syshdr", string.format( "\t\t\t\t/* %d is %s %s */\n", sysnum, descr, funcalias)) - elseif flags & known_flags["NODEF"] == 0 then + elseif flags & known_flags.NODEF == 0 then write_line("syshdr", string.format("#define\t%s%s%s\t%d\n", - config['syscallprefix'], prefix, funcalias, sysnum)) + config.syscallprefix, prefix, funcalias, sysnum)) write_line("sysmk", string.format(" \\\n\t%s%s.o", prefix, funcalias)) end @@ -1104,7 +1104,7 @@ process_syscall_def = function(line) abort(1, "Range only allowed with RESERVED and UNIMPL: " .. line) end - if (flags & known_flags["NOTSTATIC"]) ~= 0 then + if (flags & known_flags.NOTSTATIC) ~= 0 then thr_flag = "SY_THR_ABSENT" end @@ -1195,37 +1195,37 @@ process_syscall_def = function(line) funcname = trim(funcname) - if config["obsol_dict"][funcname] then + if config.obsol_dict[funcname] then local compat_prefix = "" for _, v in pairs(compat_options) do - if flags & v["mask"] ~= 0 then - compat_prefix = v["prefix"] + if flags & v.mask ~= 0 then + compat_prefix = v.prefix goto obsol_compat_done end end ::obsol_compat_done:: args = nil - flags = known_flags['OBSOL'] + flags = known_flags.OBSOL funcomment = compat_prefix .. funcname end - if config["unimpl_dict"][funcname] then - flags = known_flags['UNIMPL'] + if config.unimpl_dict[funcname] then + flags = known_flags.UNIMPL funcomment = funcname end sysflags = "0" -- NODEF events do not get audited - if flags & known_flags['NODEF'] ~= 0 then + if flags & known_flags.NODEF ~= 0 then auditev = 'AUE_NULL' end -- If applicable; strip the ABI prefix from the name local stripped_name = strip_abi_prefix(funcname) - if flags & known_flags['CAPENABLED'] ~= 0 or - config["capenabled"][funcname] ~= nil or - config["capenabled"][stripped_name] ~= nil then + if flags & known_flags.CAPENABLED ~= 0 or + config.capenabled[funcname] ~= nil or + config.capenabled[stripped_name] ~= nil then sysflags = "SYF_CAPENABLED" end @@ -1234,17 +1234,17 @@ process_syscall_def = function(line) if args ~= nil then funcargs, changes_abi = process_args(args) end - if config["sys_no_abi_change"][funcname] then + if config.sys_no_abi_change[funcname] then changes_abi = false end - local noproto = config["abi_flags"] ~= "" and not changes_abi + local noproto = config.abi_flags ~= "" and not changes_abi local argprefix = '' local funcprefix = '' if abi_changes("pointer_args") then for _, v in ipairs(funcargs) do - if isptrtype(v["type"]) then - if config["sys_no_abi_change"][funcname] then + if isptrtype(v.type) then + if config.sys_no_abi_change[funcname] then print("WARNING: " .. funcname .. " in syscall_no_abi_change, but pointers args are present") end @@ -1254,14 +1254,14 @@ process_syscall_def = function(line) end ::ptrfound:: end - if config["sys_abi_change"][funcname] then + if config.sys_abi_change[funcname] then changes_abi = true end if changes_abi then -- argalias should be: -- COMPAT_PREFIX + ABI Prefix + funcname - argprefix = config['abi_func_prefix'] - funcprefix = config['abi_func_prefix'] + argprefix = config.abi_func_prefix + funcprefix = config.abi_func_prefix funcalias = funcprefix .. funcname noproto = false end @@ -1275,11 +1275,11 @@ process_syscall_def = function(line) if argalias == nil and funcname ~= nil then argalias = funcname .. "_args" for _, v in pairs(compat_options) do - local mask = v["mask"] + local mask = v.mask if (flags & mask) ~= 0 then -- Multiple aliases doesn't seem to make -- sense. - argalias = v["prefix"] .. argalias + argalias = v.prefix .. argalias goto out end end @@ -1291,17 +1291,17 @@ process_syscall_def = function(line) local ncompatflags = get_mask({"STD", "NODEF", "NOARGS", "NOPROTO", "NOSTD"}) local compatflags = get_mask_pat("COMPAT.*") - if noproto or flags & known_flags["SYSMUX"] ~= 0 then - flags = flags | known_flags["NOPROTO"]; + if noproto or flags & known_flags.SYSMUX ~= 0 then + flags = flags | known_flags.NOPROTO; end - if flags & known_flags["OBSOL"] ~= 0 then + if flags & known_flags.OBSOL ~= 0 then handle_obsol(sysnum, funcname, funcomment) - elseif flags & known_flags["RESERVED"] ~= 0 then + elseif flags & known_flags.RESERVED ~= 0 then handle_reserved(sysnum, sysstart, sysend) - elseif flags & known_flags["UNIMPL"] ~= 0 then + elseif flags & known_flags.UNIMPL ~= 0 then handle_unimpl(sysnum, sysstart, sysend, funcomment) elseif flags & compatflags ~= 0 then - if flags & known_flags['STD'] ~= 0 then + if flags & known_flags.STD ~= 0 then abort(1, "Incompatible COMPAT/STD: " .. line) end handle_compat(sysnum, thr_flag, flags, sysflags, rettype, @@ -1342,7 +1342,7 @@ if configfile ~= nil then end end -local compat_set = config['compat_set'] +local compat_set = config.compat_set if compat_set ~= "" then if not compat_option_sets[compat_set] then abort(1, "Undefined compat set: " .. compat_set) @@ -1354,18 +1354,18 @@ else end -- We ignore errors here if we're relying on the default configuration. -if not config_modified["capenabled"] then - config["capenabled"] = grab_capenabled(config['capabilities_conf'], - config_modified["capabilities_conf"] == nil) -elseif config["capenabled"] ~= "" then +if not config_modified.capenabled then + config.capenabled = grab_capenabled(config.capabilities_conf, + config_modified.capabilities_conf == nil) +elseif config.capenabled ~= "" then -- Due to limitations in the config format mostly, we'll have a comma -- separated list. Parse it into lines local capenabled = {} - -- print("here: " .. config["capenabled"]) - for sysc in config["capenabled"]:gmatch("([^,]+)") do + -- print("here: " .. config.capenabled) + for sysc in config.capenabled:gmatch("([^,]+)") do capenabled[sysc] = true end - config["capenabled"] = capenabled + config.capenabled = capenabled end process_compat() process_abi_flags() @@ -1403,7 +1403,7 @@ write_line("sysent", string.format([[ /* The casts are bogus but will do for now. */ struct sysent %s[] = { -]], config['switchname'])) +]], config.switchname)) write_line("syssw", string.format([[/* * System call switch table. @@ -1412,7 +1412,7 @@ write_line("syssw", string.format([[/* * $%s$ */ -]], generated_tag, config['os_id_keyword'])) +]], generated_tag, config.os_id_keyword)) write_line("sysarg", string.format([[/* * System call prototypes. @@ -1450,8 +1450,8 @@ struct thread; #define PADR_(t) 0 #endif -]], generated_tag, config['os_id_keyword'], config['sysproto_h'], - config['sysproto_h'])) +]], generated_tag, config.os_id_keyword, config.sysproto_h, + config.sysproto_h)) if abi_changes("pair_64bit") then write_line("sysarg", string.format([[ #if !defined(PAD64_REQUIRED) && !defined(__amd64__) @@ -1467,7 +1467,7 @@ if abi_changes("pair_64bit") then ]])) end for _, v in pairs(compat_options) do - write_line(v["tmp"], string.format("\n#ifdef %s\n\n", v["definition"])) + write_line(v.tmp, string.format("\n#ifdef %s\n\n", v.definition)) end write_line("sysnames", string.format([[/* @@ -1478,7 +1478,7 @@ write_line("sysnames", string.format([[/* */ const char *%s[] = { -]], generated_tag, config['os_id_keyword'], config['namesname'])) +]], generated_tag, config.os_id_keyword, config.namesname)) write_line("syshdr", string.format([[/* * System call numbers. @@ -1487,12 +1487,12 @@ write_line("syshdr", string.format([[/* * $%s$ */ -]], generated_tag, config['os_id_keyword'])) +]], generated_tag, config.os_id_keyword)) write_line("sysmk", string.format([[# FreeBSD system call object files. # DO NOT EDIT-- this file is automatically %s. # $%s$ -MIASM = ]], generated_tag, config['os_id_keyword'])) +MIASM = ]], generated_tag, config.os_id_keyword)) write_line("systrace", string.format([[/* * System call argument to DTrace register array converstion. @@ -1508,7 +1508,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) int64_t *iarg = (int64_t *)uarg; int a = 0; switch (sysnum) { -]], generated_tag, config['os_id_keyword'])) +]], generated_tag, config.os_id_keyword)) write_line("systracetmp", [[static void systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) @@ -1533,7 +1533,7 @@ write_line("sysinc", "\n#define AS(name) (sizeof(struct name) / sizeof(syscallarg_t))\n") for _, v in pairs(compat_options) do - if v["count"] > 0 then + if v.count > 0 then write_line("sysinc", string.format([[ #ifdef %s @@ -1541,11 +1541,11 @@ for _, v in pairs(compat_options) do #else #define %s(n, name) .sy_narg = 0, .sy_call = (sy_call_t *)nosys #endif -]], v["definition"], v["flag"]:lower(), v["prefix"], v["flag"]:lower())) +]], v.definition, v.flag:lower(), v.prefix, v.flag:lower())) end - write_line(v["dcltmp"], string.format("\n#endif /* %s */\n\n", - v["definition"])) + write_line(v.dcltmp, string.format("\n#endif /* %s */\n\n", + v.definition)) end write_line("sysprotoend", string.format([[ @@ -1555,14 +1555,14 @@ write_line("sysprotoend", string.format([[ #undef PADR_ #endif /* !%s */ -]], config["sysproto_h"])) +]], config.sysproto_h)) write_line("sysmk", "\n") write_line("sysent", "};\n") write_line("sysnames", "};\n") -- maxsyscall is the highest seen; MAXSYSCALL should be one higher write_line("syshdr", string.format("#define\t%sMAXSYSCALL\t%d\n", - config["syscallprefix"], maxsyscall + 1)) + config.syscallprefix, maxsyscall + 1)) write_line("systrace", [[ default: *n_args = 0; @@ -1596,8 +1596,8 @@ write_line("syssw", read_file("sysent")) write_line("sysproto", read_file("sysarg")) write_line("sysproto", read_file("sysdcl")) for _, v in pairs(compat_options) do - write_line("sysproto", read_file(v["tmp"])) - write_line("sysproto", read_file(v["dcltmp"])) + write_line("sysproto", read_file(v.tmp)) + write_line("sysproto", read_file(v.dcltmp)) end write_line("sysproto", read_file("sysaue")) write_line("sysproto", read_file("sysprotoend")) From nobody Thu Apr 20 22:19: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 4Q2XBl3lS3z46gQY; Thu, 20 Apr 2023 22:19: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 4Q2XBk6Plyz43By; Thu, 20 Apr 2023 22:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682029167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84dWfprrOq3DJji7mz6cHhVYzvT9QvcjMqsPTcCRriw=; b=KeoSTfBOxJkLE6QyYEc3G+r1VexDE+uqLn3+Gmp98tFq+IdNFiZEVMGV11B8IXNMapITJl x0vWSa9/xVTTCjJVXZr2xNpCAWp67nIb4W65gGR6lyBJfkuhyBbNkDUIh89wdr/Dynpsb2 d0NBL8lXL/3iTBRwRiUVEwA5ezRbiBJ85W3KfK2s3INiQZPOUUsQ89ebf9e12KoqSAChaH mOpQUu+KszcB4RsmvlReeABRpoc3PfVQ0OQ6enTf8HUTRbdJDtxB1KTif1hviGuDConAi4 2T7ySKX7ARKVuwvT8DcKqumqHB1yTJ2zYBfFHd6FYGJEw9RyD+W9vxEgj2ohXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682029167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84dWfprrOq3DJji7mz6cHhVYzvT9QvcjMqsPTcCRriw=; b=I58doGaSE1CEcdFZ4YEoqkt+WK2MToYX5J66iqbr034neb1ggGn78oVb4oiu/4U3fbOOo/ gMgbNOkclC36KQtUiG068MJdPY04otM2l4dfAtk47JTBhnw+5/6rLW1dI5ImZlvkNYy6yd qi1moqFf77jUyOjACUjylcsFqvB0yxVWZUzjcMQi4oiDnoXAQOdwMz0wR42vuR5koxlG68 Nmt9Eh3WS/P3tm/S7bHic186S/cLMMsPCDnISXozL5MeMnVCXoGgCgKrsuzws2YvyotcFF pbExH6V5bEdqocGO6WJm7O5hXVbohmWAiGmZm8UZ2w9roazMrOnPRl95hcOi9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682029167; a=rsa-sha256; cv=none; b=FNuK1CqX/zlcQ+DNPgn3qFxBRTZbkWB5CQ7fIQEl85ZFuOt5srBq9mXv3H6AzPJZsdhULa 64IJbtoYm2OfZdQMYm97i0vWz6P/OIfc35ZMfuEUZ+pdHLlHPLFvUgNhKnMB/BZMBktmJd CSb5EnIdZeIUarA8kuJBY/2MY9Q0YrH/kROizvRD+WAQM2PtJ1aY1zp8msBuKsVYUsIkAe Z5onrUfRMTkr6Qpeu5pBAWeGzQVt9hdwbsFvBL/2qCEmwJvspDa90Up42MuxMgTxXjhFTc gZXlC/6bAW0Fj4CVG1oOcnQcvMgdDnpspBMaCnDNtM61yNKP757raKELxZ8fuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2XBk1sl5zw9G; Thu, 20 Apr 2023 22:19: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 33KMJQ6h042246; Thu, 20 Apr 2023 22:19:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KMJQM8042245; Thu, 20 Apr 2023 22:19:26 GMT (envelope-from git) Date: Thu, 20 Apr 2023 22:19:26 GMT Message-Id: <202304202219.33KMJQM8042245@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: 8341a74afea5 - main - makesyscalls.lua: Use "sysxxx" 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8341a74afea598092947eea66172313f37e0be0b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8341a74afea598092947eea66172313f37e0be0b commit 8341a74afea598092947eea66172313f37e0be0b Author: Warner Losh AuthorDate: 2023-04-20 22:16:06 +0000 Commit: Warner Losh CommitDate: 2023-04-20 22:17:25 +0000 makesyscalls.lua: Use "sysxxx" consistently Find the few places where we use 'sysxxx' and use "sysxxx" instead to be more consistent. Sponsored by: Netflix --- sys/tools/makesyscalls.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 564551a47ed3..00e5e74512e0 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -496,7 +496,7 @@ local pattern_table = { pattern = "^#%s*include", process = function(line) line = line .. "\n" - write_line('sysinc', line) + write_line("sysinc", line) end, }, { @@ -509,12 +509,12 @@ local pattern_table = { maxsyscall = savesyscall end line = line .. "\n" - write_line('sysent', line) - write_line('sysdcl', line) - write_line('sysarg', line) - write_line_pfile('syscompat[0-9]*$', line) - write_line('sysnames', line) - write_line_pfile('systrace.*', line) + write_line("sysent", line) + write_line("sysdcl", line) + write_line("sysarg", line) + write_line_pfile("syscompat[0-9]*$", line) + write_line("sysnames", line) + write_line_pfile("systrace.*", line) end, }, { @@ -523,7 +523,7 @@ local pattern_table = { process = function() if config.abi_headers ~= "" then line = config.abi_headers .. "\n" - write_line('sysinc', line) + write_line("sysinc", line) end end, }, From nobody Thu Apr 20 22:19: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 4Q2XBl6DbZz46gH3; Thu, 20 Apr 2023 22:19: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 4Q2XBl46qGz43R9; Thu, 20 Apr 2023 22:19:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682029167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fLg5xVsOgJ3z2rPtuYr+AqaqCs1FySLk7/VETosoYXU=; b=VQhDMnIG+r8cuw7crKK9J2GiCg9FBa+R9hU6zSOrdFpUggJ0+oyeicwG2nC4k9I7QyyX1g V+/SHBjANjGKr2zAXH4pdGA/EpAzdRWq1I1saJCJPEqzCieggOu/gideK0qR2GhoWWOmAb R0cj4QQM9TsucVoRm1bryD8DYjJ3hgCSbbPGDzINyCncFEQu/gEKn8OlmTv0TNFFQcpl53 TZ71Bo3BCgFTkykGDsQP2fIDbofhnOYRcYYnSe/u2pHt/yXO4YBdPBgvDFER0W1q9L5281 KDBX9n4bnfEmOHAH1qYI0JjhoEub/+dGCLRx1gWzv4ysd6nj01aSnG6Z2m14WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682029167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fLg5xVsOgJ3z2rPtuYr+AqaqCs1FySLk7/VETosoYXU=; b=gwXYwSAIWg5Lxsrn6jlixIXuNEHCQjo+rKStXCMCfuy0WT9EgXp+NilkGuPRcMzE3C6KYO GqYhMXk7W9Y/8w12s6nMVgsMSIQ78QYU/rKIdRVapA+E0x/ZyzG19T5+cJFFCQoIGeUDs9 R0QrnL9w3Vzy2pFn5q7SYGQGDxQPhmBApY3Hjf6SMarzF2yUAAGl0Ht2qRNJ+XxuuBEht4 7JLPoA9D6HH8A4Oj8WM++NFSbT5VOhQBxErNuEexM5+MdcIosiz/1GIWdPFo77G49SV9Le xsoLc974RUpAv8kwQdg4iS6nHmZqC8kojJV7qTwHCAf7zJd8VAtFYfl7p3YJbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682029167; a=rsa-sha256; cv=none; b=D5G3cISdg0yK6ZsVyiw2qp3csQS63SdECHFXUidMG/Hnu2L1dffPj2bXtISHrLGcqvbUnn sYjJM0qsxtnTMjGndM4WRjplazpafEt1Zcvqi9tg+3Fy1K1GdWy/Ocl0rUztdvCBJ6SUk3 RBjDvACLFlazJEEva9JRK4Rmx6jZ9T4vmCpFdN4lhDOd4RfWCLBBIvi0Ctm9KuGM+A5yPF 0AoMQOkjSzpznmVD5ump1RUyuepXdpmWq3xJKWTKk7QRhWJ7Z29B0s8x3NDEeIC7DNgN2N Op0OiDmPpMLl8MI1n6i3AsHgrlAZjI0UwrI2Y4gWj6Wd1iOxbv60JBCihdvQzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2XBl30DPzw13; Thu, 20 Apr 2023 22:19: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 33KMJR0F042265; Thu, 20 Apr 2023 22:19:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KMJRvI042264; Thu, 20 Apr 2023 22:19:27 GMT (envelope-from git) Date: Thu, 20 Apr 2023 22:19:27 GMT Message-Id: <202304202219.33KMJRvI042264@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: c1e987e0624e - main - makesyscalls.lua: Minor fluff removal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: c1e987e0624ebf509a6d86099dd47ae6d72a8c03 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c1e987e0624ebf509a6d86099dd47ae6d72a8c03 commit c1e987e0624ebf509a6d86099dd47ae6d72a8c03 Author: Warner Losh AuthorDate: 2023-04-20 22:16:16 +0000 Commit: Warner Losh CommitDate: 2023-04-20 22:17:58 +0000 makesyscalls.lua: Minor fluff removal luacheck pointed out two minor issues: line isn't declared as a global, so declare it local. Also remove an unused parameter. Suggested by: kevans Sponsored by: Netflix --- sys/tools/makesyscalls.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 00e5e74512e0..1f352c505160 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -522,7 +522,7 @@ local pattern_table = { pattern = "%%ABI_HEADERS%%", process = function() if config.abi_headers ~= "" then - line = config.abi_headers .. "\n" + local line = config.abi_headers .. "\n" write_line("sysinc", line) end end, @@ -1052,7 +1052,7 @@ local function handle_unimpl(sysnum, sysstart, sysend, comment) end end -local function handle_reserved(sysnum, sysstart, sysend, comment) +local function handle_reserved(sysnum, sysstart, sysend) handle_unimpl(sysnum, sysstart, sysend, "reserved for local use") end From nobody Thu Apr 20 22:19: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 4Q2XBm72Zhz46gWB; Thu, 20 Apr 2023 22:19: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 4Q2XBm5TvKz43CV; Thu, 20 Apr 2023 22:19:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682029168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kLflGehLP0ebpWWeoaLu1FLOFVhESwaEqoN2h3MpRGo=; b=ftXwCjFd3ge+RnYBfvXReMIVSGrqHmvLf8bvpG2XoFQsCudBVbkxSdzgVeLTl6XmwWwBmv UWFrCtElpOzS6YKJ002qkjkvaASbE68vaT77S2x8XFq9vW4frIicklH3MlchGTewPHTIzX J9CVUdOm3lOeuqvWLpJ9KHMalHslNoOjC9w90a8iFQQfj1c77f/F2rTz15fNYwha+k/cUw jaSKQ7I6XGObvsAAhnZ4tkjDG750NKMvQd74RPI11PYN7abumbxK6wzkJmjDsvvh/KDsgE SYNT3V86e5EVofm6HYRxlg56jgVEToUuzVvuY3qryPcKuOX4K75PpbKHZAqYVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682029168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kLflGehLP0ebpWWeoaLu1FLOFVhESwaEqoN2h3MpRGo=; b=dNvcpzqlT3oPkCG2Qtg0Cejh0MbG2TeRXj1OvP4ZnMXuj9E35tOyzfqe7ZY9GHTl4Q7qeL LuiQumB5kKjoVXG6wAN3LQeDCEDo2x4KFh16xNeyCsxlG6NfpDiXQlEXuQorBjUhElm3D/ N4AmWEHjSHw582MujY9SIm7mVgN+guY+rR0Jn+OfGNDVUbuZbpjQ9zlnXeq40j14zlIe2c 7VMBfB8yKZ+5IwIh0xxFWCntxhyrzhDCQmaTN8O5dk4HGyKWCmBAsLTRZ97diDvmSmLJ7S biEobBQmr21cNgy+gHsgxnqRQnQpn0aZW1hs10FH2+z0mm6NReYbdLb8l4TW8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682029168; a=rsa-sha256; cv=none; b=JwzNxrA4ByeuqBabDGeX/UwNIDR96om2d8xleubIwju00CIPMUdy6mQsFjJot60U68g+xs XlWdWip8PeoPBNLjTIDLuRyf5P+7XgQETTHrpHrgFZKPKLkku/0qPo0r+PjCN9yLKxcjzg 0IgClRf2pCJCF9z57xlirsJFla7zdc6I/2ehPC6MAPm0xkf0RuyWju12TpryTLXpY+7lmF x0w2W2BQTjJV9JLhFcdOkA0yflPM/b2Itiojz4YUYq48NWyv6ODN6/IfBFQDAI+6+iiORz mKbLzeEbfyVTBZce+WFoHNAbcnkrn1VjBsaoqdinCupgzFOhaTzQ0kz1RWUTyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2XBm3yTfzw53; Thu, 20 Apr 2023 22:19: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 33KMJSB0042284; Thu, 20 Apr 2023 22:19:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KMJSY0042283; Thu, 20 Apr 2023 22:19:28 GMT (envelope-from git) Date: Thu, 20 Apr 2023 22:19:28 GMT Message-Id: <202304202219.33KMJSY0042283@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: 559b94a12257 - main - syscall.master: Fix 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 559b94a12257807115bf84264936f0de2ac3884e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=559b94a12257807115bf84264936f0de2ac3884e commit 559b94a12257807115bf84264936f0de2ac3884e Author: Warner Losh AuthorDate: 2023-04-20 22:16:21 +0000 Commit: Warner Losh CommitDate: 2023-04-20 22:18:02 +0000 syscall.master: Fix comments Have more accruate comments. While #if, #else, etc are copied to the header files, lines that don't start with # are not. And #include files are only output to sysinc (which winds up at the front of init_sysent.c which seems a bit odd). This is all radically undocumented, and likely has drifted somewhat from 4.4BSD and what other systems do (they've drifted too, fwiw). Sponsored by: Netflix --- sys/amd64/linux/syscalls.master | 6 ++++-- sys/amd64/linux32/syscalls.master | 6 ++++-- sys/arm64/linux/syscalls.master | 4 ++++ sys/i386/linux/syscalls.master | 4 ++++ sys/kern/syscalls.master | 4 +++- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 90476b15433f..a2ac67c2d126 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -26,6 +26,10 @@ ; function prototype in sys/sysproto.h. Does add a ; definition to syscall.h besides adding a sysent. +; #include's, #defines's, etc. may be included, and are copied to the output +; files. However, #ifdef, etc will be copied, but any lines that don't start +; with # will not. Caveat Emptor. + #include #include #include @@ -36,8 +40,6 @@ ; Isn't pretty, but there seems to be no other way to trap nosys #define nosys linux_nosys -; #ifdef's, etc. may be included, and are copied to the output files. - 0 AUE_NULL NOPROTO { int read( int fd, diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 4561667dc3cc..f84d51c372a8 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -26,6 +26,10 @@ ; function prototype in sys/sysproto.h. Does add a ; definition to syscall.h besides adding a sysent. +; #include's, #defines's, etc. may be included, and are copied to the output +; files. However, #ifdef, etc will be copied, but any lines that don't start +; with # will not. Caveat Emptor. + #include #include #include @@ -36,8 +40,6 @@ ; Isn't pretty, but there seems to be no other way to trap nosys #define nosys linux_nosys -; #ifdef's, etc. may be included, and are copied to the output files. - 0 AUE_NULL UNIMPL setup 1 AUE_EXIT STD { void linux_exit( diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index 647fd0262e8c..f4c2acca435d 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -3,6 +3,10 @@ ; Linux ABI system call generic name/number map, based on Linux file ; include/uapi/asm-generic/unistd.h +; #include's, #defines's, etc. may be included, and are copied to the output +; files. However, #ifdef, etc will be copied, but any lines that don't start +; with # will not. Caveat Emptor. + #include #include #include diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index a5b246c0822a..96b74e1cc649 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -26,6 +26,10 @@ ; function prototype in sys/sysproto.h. Does add a ; definition to syscall.h besides adding a sysent. +; #include's, #defines's, etc. may be included, and are copied to the output +; files. However, #ifdef, etc will be copied, but any lines that don't start +; with # will not. Caveat Emptor. + #include #include #include diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 92de51fc0d97..af2f4194e2c5 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -108,7 +108,9 @@ ; timet_ Object contains a time_t and varies between i386 and other ; ABIs. -; #ifdef's, etc. may be included, and are copied to the output files. +; #include's, #defines's, etc. may be included, and are copied to the output +; files. However, #ifdef, etc will be copied, but any lines that don't start +; with # will not. Caveat Emptor. #include #include From nobody Thu Apr 20 23:19: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 4Q2YWx1pwYz46l0Y for ; Thu, 20 Apr 2023 23:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2YWx1LFkz3GsB; Thu, 20 Apr 2023 23:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682032765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJn1/kmCWoVojIPpft33GyjewhEJVi5GXuvs2P0k0eA=; b=WGUhL6tLzkrVNKV6+KMQNFnFd9wI9tM0ke2IiSgpxeP6ZufZfiMkjo4dEtSzJ2KmutAPYz ByFfJt+2j/CrcMBTOav8OjYSffejNOiZC2DKn3TTLwoEE5tUsz4iFkCPnrUiKPrSpPPSmX xp2+6Oyoq96VWKmqn6v6LXce8QopooSHyY9x8jXOoW+DGjCDWFKD48d9LOkEmpNr3pLr9d cLEgRPlTpxr2Sum0VGcQyXAAAEXwAXkceHLHkDJihP4k22/3IqTPy9xAAAmDXTwDLX1JTU b135B+lroTgYnEXVhjAp7D5vVabAid19iQUuT5xmJAvoE3dgka0anLt6V9Mw3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682032765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJn1/kmCWoVojIPpft33GyjewhEJVi5GXuvs2P0k0eA=; b=Mn+jLhiHODJLA2qHWF0AFMtEYxdgjqieEDBcN5XOCjGZB2l+ch46GOVbjusA9YndsgcNpB ZdU7l7TGG5dp2WDcw35TxHJLS73bAWWb29TXKkbRh8s15NcdoX7Qqf1Vf44N6/xnciWz+u QAdMNezTGI/Xq8MvnEubmFJi+UYKRoZEAXPXpfjESVgQ0JwvYu2SDTo4fmz80R6trHkTKh GpGpmeejYtl3CncBBbgxEks08/f7Kie3uP5CSBZPtvcq7jfXoMwauJeWjsvN9LpsM31guc 41qq3Ug90kS0iFOsVZAqYzwhDRGSq1z/Ofbnc3SL18yisuADUoyT3l4ynCKJrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682032765; a=rsa-sha256; cv=none; b=PG7/vXpFB6i+EPM5ZjvzhMaB25JovlckUvkq9XBB9L3Z4QfD9RVlSv6Td+ao+MuK6//TZp ahm3cZ3DWi4drLsAqcgFT0g6oz82oHbfdD8s8Fyu45kdGaLm7lHfX5+RwEgruxK8ZtLCyJ +nf03Xl0la04kyKLcadzgFlSwBZG1x72YGQ501o/d+4LFWHRO2C3QMP3n4Xd5Sup5GzumP Zu/t9NO+hIfG1GXYem7q+t/hcMvmq454v30+oQS0APzqmeSj1SpA3MxVzb/R8mNb2AdTma n/6kiuq+K28a5wrzBDwu+oRsCO8tym438hQR+8GtF2G5tLRQJSiDA7GhJQgeyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2YWx05gSzxBK; Thu, 20 Apr 2023 23:19: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 33KNJOIu039652; Thu, 20 Apr 2023 23:19:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KNJOAf039649; Thu, 20 Apr 2023 23:19:24 GMT (envelope-from git) Date: Thu, 20 Apr 2023 23:19:24 GMT Message-Id: <202304202319.33KNJOAf039649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 5b2defbd2a1a..058aa793d837 - vendor/libcbor - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/vendor/libcbor X-Git-Reftype: branch X-Git-Commit: 058aa793d837f38f112acc154816397251019319 X-Git-Oldrev: 5b2defbd2a1aa991bd0a2855eef8e15107572747 X-Git-Newrev: 058aa793d837f38f112acc154816397251019319 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/libcbor has been updated by emaste: URL: https://cgit.FreeBSD.org/src/log/?id=5b2defbd2a1a..058aa793d837 058aa793d837 Vendor import of libcbor 0.10.2 From nobody Thu Apr 20 23:19: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 4Q2YX30M3lz46ktS for ; Thu, 20 Apr 2023 23:19: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 4Q2YX2732sz3H7h; Thu, 20 Apr 2023 23:19:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682032771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fWKOuW5Ws11gpEjK68CfCGbDbznu8gLtg9qyVPzsS+A=; b=dX43bKETJmNKZPXua5A5dEIFXjBRDLaf7Je5jmfOt4IaFTQnkH90y1hoqaPKd9/D/oaufZ YClzlI6zpO23zGWcUqr+eIr0UwUDaj8kkmpWYij6y+CZyrQhgOAud91dCP90t1ZLeIrRDF 7y4g8ieIQSndULVDXeADEN/4RKn/WELyug2eKqC0HMMZyUUwJZBiwrfofcDBdDZxI95QTU QZKhIEuHUw2kYxUy0dwpQz9vH3hk6OhNV+1ajmh835vHGDZjU6KS5bNuREqz+REtunQiKN 6zO8/ydDAFLXHTNYVNjUnzCfqqTiCAoA8AvAdC4JBZRtnk0jd9xwG2VUf6BuEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682032771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fWKOuW5Ws11gpEjK68CfCGbDbznu8gLtg9qyVPzsS+A=; b=R2fnxgI1c+ZGeTaQqx53IrcS+yD86CPhf4I88eMvgo5fYm37V5ERssKtQsQtm6bCl5KthY DlXbHsXVmtmSfkdyY/37fXmWRkffNQCdEO2C5QnnMa2Qm424A3sbJIFOu0WR4ZJY7rdCvL kfbe6FnseGIqLqA3uE+i/jT2OLhPx3LW1pTudccEC9ZTNDFxG3HDKwwt7jV7e8IGuITIHF CQVodVul4fk28pKA0GBgPDfgB1+e9n1RyKTRR/iTFbOoN5O4wkoR10GMip+ALhaXT5OXnA ZW0/K2nyuj1vXg4u1BJdCrru0eV48o4mFmAvIOSk2HEfo4/N3BGNLlPnd+gl5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682032771; a=rsa-sha256; cv=none; b=gCV89cR7iluRVj6Xo94EHp+qv3lGZ82n+frg12ydeAUgjnbXhLPySfyL0s8eLTNHGwqLs4 I1ho7++ktjcWaAXG/GqC/Q3jx1gyEUbfbhKVh8v7mS4GpBCa7282CjMLcggb2PIAYroE5T s0ozR5excbqSxUU5u/AB1LDxdACjxo+LQizmM9qDAzK9JpHkTPFA8gVIwTtxk6o3fS5mph YHcBs/dfk4micG8SeMa2LS5Nlpewa3pPAHVG4jqmHsoriM9N6jVSJKImU48Q6yW/Z3CIrs KbsGd4Y5mzQGgrTt2hrjvONHjT7B5vpAxai4qTTPyV4q32r0wCq+KRDeRobHzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2YX2698pzxdr; Thu, 20 Apr 2023 23:19: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 33KNJU0u039749; Thu, 20 Apr 2023 23:19:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33KNJU5N039748; Thu, 20 Apr 2023 23:19:30 GMT (envelope-from git) Date: Thu, 20 Apr 2023 23:19:30 GMT Message-Id: <202304202319.33KNJU5N039748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: e57df5189954 - Create tag vendor/libcbor/0.10.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: emaste X-Git-Repository: src X-Git-Refname: refs/tags/vendor/libcbor/0.10.2 X-Git-Reftype: annotated tag X-Git-Commit: e57df5189954d605bd27197b6146b464e2d3c97a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/libcbor/0.10.2 has been created by emaste: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/libcbor/0.10.2 tag vendor/libcbor/0.10.2 Tagger: Ed Maste TaggerDate: 2023-04-20 23:19:06 +0000 Tag libcbor 0.10.2 commit 058aa793d837f38f112acc154816397251019319 Author: Ed Maste AuthorDate: 2023-04-20 23:17:42 +0000 Commit: Ed Maste CommitDate: 2023-04-20 23:17:42 +0000 Vendor import of libcbor 0.10.2 From nobody Fri Apr 21 00:42: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 4Q2bNH0rBLz46qdy; Fri, 21 Apr 2023 00:42: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 4Q2bNH0LZ0z3LPs; Fri, 21 Apr 2023 00:42:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682037775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DnoMRDq/26HON4Yob2tO7mFME3fO1kVmfUe1hUzmNs=; b=hAWG95MaiuA7pNCaoAhn8ODb0z2RwLVy79UmFMwxCjBNuo4PUdwk7EH3ngcc3cigG3nzsI pFmFEPIE5pnW3i4jNjTrpPg5+HDdkdNavprhQ7vRiDYbEOZ7TNpuKzDSD/a14cwogjbaMJ Xl1thc5DFs0QtbHqDnpdU+AbZwBKwcXQFzQtzXI8201IkD1k5DbGRSOHxRALm30ygZ7YkW Fi5ejpjVqvrOY35VOX/jB2LkMLfBDJkR1amnuY3KpiRUKB5lazm0/bsHT2Ea3eEScBs7N3 pfMSWdIHZndUvxd6F5JR3KwUl6u+UXYdybk/EjH8aRhpDBc+QMeVuaWltYbfgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682037775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7DnoMRDq/26HON4Yob2tO7mFME3fO1kVmfUe1hUzmNs=; b=k4IZIoeBD1GFAVItp6WKBBxWyRZGke1B5mQUaGCkpSxRXmjRYhLAJJL3tzZ6x8c6k5UibK eU8kDeiVkwkUVXkEiWMimoNWrWiPZoQ8t7EYOcVwt0tmSWwVgFXjeA1MaNjy5mag9yc9X4 lOQNDOPouCJ9gYspDi3FwaA/lRd/eg6zG3Y65/xE2iIHViWAgtwwMkUdiA8Kfr4gknzbX2 NqXuxYZ8hRDfQzhvtfDAWNAYBcNN8UhjGPEavkYdgBnTD6jzWzQrgsELTSMtwmy5tpexdQ g7cCcEvAcA8ZpVdKpgEP7pPwlQjqn9uQXkqDcXg2TaRK/xmzGckUnV3KEGBGIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682037775; a=rsa-sha256; cv=none; b=N0oBL0LsDrBdkAAwUo/AhquLSEzM/bv6v52WqpdE/K+vGZIISNzBcJS2jUxjupV2uOjySU MIyBfWrUlacrHWT5rg4GIfGyUWH/BsX7KZWigYc1owV1zfBGnwfj47Mq4QM3Hx9LiZjOFv y4IseMBe3ZoGtf6TFF6/cfeLpadSjT1vTixPugPS2sIQhnaaQGjUKP8yxMGM9Kfbyu1yq7 3+ZavYZ9/FOb19CPgDGSo07ggTNgiZWydaGhp+3hdGPktfXsnM/iJZc4jsWFO69WHTrnna RPpQqO57sjF2TISmbOlirE2gGBYWgunPc7aojwJVjXthdZz246iWY/z8vD6iGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2bNG6Y24z10sT; Fri, 21 Apr 2023 00:42: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 33L0gs0G086469; Fri, 21 Apr 2023 00:42:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L0gsUl086468; Fri, 21 Apr 2023 00:42:54 GMT (envelope-from git) Date: Fri, 21 Apr 2023 00:42:54 GMT Message-Id: <202304210042.33L0gsUl086468@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: 11793cb60351 - stable/13 - amd64: fix PKRU and swapout interaction List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 11793cb6035116242d3480ebff855cc0beea1b0b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=11793cb6035116242d3480ebff855cc0beea1b0b commit 11793cb6035116242d3480ebff855cc0beea1b0b Author: Konstantin Belousov AuthorDate: 2023-04-13 11:37:35 +0000 Commit: Konstantin Belousov CommitDate: 2023-04-21 00:32:33 +0000 amd64: fix PKRU and swapout interaction (cherry picked from commit 1e0e335b0f0dbae8ce49307377b23ef3673bd402) --- sys/amd64/amd64/pmap.c | 37 ++++++++++++++++++++++++++++--------- sys/amd64/include/pmap.h | 1 + sys/arm/include/pmap.h | 1 + sys/arm64/include/pmap.h | 1 + sys/i386/include/pmap.h | 1 + sys/mips/include/pmap.h | 1 + sys/powerpc/include/pmap.h | 1 + sys/riscv/include/pmap.h | 1 + sys/vm/vm_map.c | 2 +- 9 files changed, 36 insertions(+), 10 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index facbc6d3dd81..3883019daf24 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -6174,14 +6174,8 @@ pmap_remove_ptes(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, return (anyvalid); } -/* - * Remove the given range of addresses from the specified map. - * - * It is assumed that the start and end are properly - * rounded to the page size. - */ -void -pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +static void +pmap_remove1(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, bool map_delete) { struct rwlock *lock; vm_page_t mt; @@ -6213,7 +6207,8 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) pmap_delayed_invl_start(); PMAP_LOCK(pmap); - pmap_pkru_on_remove(pmap, sva, eva); + if (map_delete) + pmap_pkru_on_remove(pmap, sva, eva); /* * special handling of removing one page. a very @@ -6335,6 +6330,30 @@ out: vm_page_free_pages_toq(&free, true); } +/* + * Remove the given range of addresses from the specified map. + * + * It is assumed that the start and end are properly + * rounded to the page size. + */ +void +pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + pmap_remove1(pmap, sva, eva, false); +} + +/* + * Remove the given range of addresses as part of a logical unmap + * operation. This has the effect of calling pmap_remove(), but + * also clears any metadata that should persist for the lifetime + * of a logical mapping. + */ +void +pmap_map_delete(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + pmap_remove1(pmap, sva, eva, true); +} + /* * Routine: pmap_remove_all * Function: diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 0faee81a67c5..ebdcbc6ce202 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -516,6 +516,7 @@ void pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void pmap_get_mapping(pmap_t pmap, vm_offset_t va, uint64_t *ptr, int *num); boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); +void pmap_map_delete(pmap_t, vm_offset_t, vm_offset_t); void pmap_pti_add_kva(vm_offset_t sva, vm_offset_t eva, bool exec); void pmap_pti_remove_kva(vm_offset_t sva, vm_offset_t eva); void pmap_pti_pcid_invalidate(uint64_t ucr3, uint64_t kcr3); diff --git a/sys/arm/include/pmap.h b/sys/arm/include/pmap.h index d06d44d648d5..8572602be35e 100644 --- a/sys/arm/include/pmap.h +++ b/sys/arm/include/pmap.h @@ -45,6 +45,7 @@ extern vm_offset_t virtual_end; void *pmap_kenter_temporary(vm_paddr_t, int); #define pmap_page_is_write_mapped(m) (((m)->a.flags & PGA_WRITEABLE) != 0) void pmap_page_set_memattr(vm_page_t, vm_memattr_t); +#define pmap_map_delete(pmap, sva, eva) pmap_remove(pmap, sva, eva) void *pmap_mapdev(vm_paddr_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index 9140e25e023a..6c3b4211da0c 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -179,6 +179,7 @@ int pmap_pinit_stage(pmap_t, enum pmap_stage, int); bool pmap_ps_enabled(pmap_t pmap); uint64_t pmap_to_ttbr0(pmap_t pmap); void pmap_disable_promotion(vm_offset_t sva, vm_size_t size); +#define pmap_map_delete(pmap, sva, eva) pmap_remove(pmap, sva, eva) void *pmap_mapdev(vm_offset_t, vm_size_t); void *pmap_mapbios(vm_paddr_t, vm_size_t); diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 5ac99b92cad3..228c1520f0a0 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -286,6 +286,7 @@ void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void *pmap_trm_alloc(size_t size, int flags); void pmap_trm_free(void *addr, size_t size); +#define pmap_map_delete(pmap, sva, eva) pmap_remove(pmap, sva, eva) void invltlb_glob(void); diff --git a/sys/mips/include/pmap.h b/sys/mips/include/pmap.h index fb186011bd85..0cc098fcf4be 100644 --- a/sys/mips/include/pmap.h +++ b/sys/mips/include/pmap.h @@ -184,6 +184,7 @@ void pmap_flush_pvcache(vm_page_t m); int pmap_emulate_modified(pmap_t pmap, vm_offset_t va); void pmap_page_set_memattr(vm_page_t, vm_memattr_t); int pmap_change_attr(vm_offset_t, vm_size_t, vm_memattr_t); +#define pmap_map_delete(pmap, sva, eva) pmap_remove(pmap, sva, eva) static inline int pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused) diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h index d14398750080..4062417193e5 100644 --- a/sys/powerpc/include/pmap.h +++ b/sys/powerpc/include/pmap.h @@ -325,6 +325,7 @@ const char *pmap_mmu_name(void); bool pmap_ps_enabled(pmap_t pmap); int pmap_nofault(pmap_t pmap, vm_offset_t va, vm_prot_t flags); boolean_t pmap_page_is_mapped(vm_page_t m); +#define pmap_map_delete(pmap, sva, eva) pmap_remove(pmap, sva, eva) void pmap_page_array_startup(long count); diff --git a/sys/riscv/include/pmap.h b/sys/riscv/include/pmap.h index 8834c91362ad..f87e6942af2c 100644 --- a/sys/riscv/include/pmap.h +++ b/sys/riscv/include/pmap.h @@ -56,6 +56,7 @@ #define pmap_page_get_memattr(m) ((m)->md.pv_memattr) #define pmap_page_is_write_mapped(m) (((m)->a.flags & PGA_WRITEABLE) != 0) void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); +#define pmap_map_delete(pmap, sva, eva) pmap_remove(pmap, sva, eva) /* * Pmap stuff diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index fa57cea48dae..ce520de160ef 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -3965,7 +3965,7 @@ vm_map_delete(vm_map_t map, vm_offset_t start, vm_offset_t end) */ if ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0 || entry->object.vm_object != NULL) - pmap_remove(map->pmap, entry->start, entry->end); + pmap_map_delete(map->pmap, entry->start, entry->end); if (entry->end == map->anon_loc) map->anon_loc = entry->start; From nobody Fri Apr 21 03:39: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 4Q2gJG4XNgz472JM; Fri, 21 Apr 2023 03:39: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 4Q2gJG39jWz3jp7; Fri, 21 Apr 2023 03:39:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682048382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=anHUs+f5CnNC4ov0m8EAfyh/hMpfic2bSAXg7mBemCE=; b=Vzbr0lhQM2dVXq+AUmbyDNipr2lwp+5B548v7cMbjkrDxqXTh1XASu0nQ5jLeDcyoE5vSe XLVO1oFH0gW3jNeylJQI4+UrpPHcIzW/VbGhtAPGNLD8y7YTo7ari3PIx7c8YUwXJemVdD +7idaxc5b7p8M8vs/KuZkHCWFJaNPOnrv4dZaAatirIFkIrE8vPHTAE+MgwO6hP3sibPWi oFcpibkJyIH9v8UxrEWxv1rbpL90A8E7JiqnCTpaZWbRq9TpsslE7WasrDvZagBhw6Cnv2 MH7xCGd4MybYM+Wg5RhUGLKThGNE6VrnBkXZmf+XbgNKW8s3x5EIsVD6A2ZBRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682048382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=anHUs+f5CnNC4ov0m8EAfyh/hMpfic2bSAXg7mBemCE=; b=WnBVHxAavFErhpPP0JTpY37Qbr9u2KIiX1vomhO7Lhp2Exv8Akjrp8hwMS96hYtjkV9BB0 sKDncGY6a1FFf1+F8AFjlX8SiAVwl1FrGCkEHv34PCyKfBFZIhg3IkRShgh50uKcBrzfzZ m1wx9gHHP+NXh7o0ZNJL/c7Kb5/9Rh8qdDr2mgRXgSWnNuOwB8+JxA/MbIMovwIMcWdXJh 2BA4jV+KLyVQjm+aPXSqkgKy6iAPKvlffbCAIB48K2GHT00UkMXHBMjnoDqjW9I4hmEhFX vM9u0wuorcNGk3xm1vohf9AfKUGY5p2ZT9TN2zvhxPQqNJyE5kur7AC1ovc+Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682048382; a=rsa-sha256; cv=none; b=nD5arTs+TajlGtkLSqMnyD5Mea7eXN/9C6Z3HgQrXx9RI6aHgTayPzDqIiZKZlaj1kFM/y JsGU/BVQyqS3gdyCCMTvcq/t+MLkG63FiD+FlSF3+M8QLBr2u3NGfwSts6iaprmIRb9TEs dW0w/lpsg6D8eGXzQDbApVeYYUPrYP7gEq1DzITQKh0dRDyfshwOV4MkOy1dlpCX4/Lh+X LTMbwjaPpy3xgUYBsODew0jbH+f9Jn0q89VlaP3ae19n2eZ/n9PHORthnHxMNsOOQ4xTQ8 yXGG/Q8C5H+E2Qm0XV21Wac+W404UFfIoSHQQ17iHHaHIn5pw+vgQZsuEFxrBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2gJG1wJpz14lT; Fri, 21 Apr 2023 03:39: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 33L3dgho067539; Fri, 21 Apr 2023 03:39:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L3dgNI067538; Fri, 21 Apr 2023 03:39:42 GMT (envelope-from git) Date: Fri, 21 Apr 2023 03:39:42 GMT Message-Id: <202304210339.33L3dgNI067538@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: f957a32dacfd - main - Update meta.sys.mk and related local*mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: f957a32dacfd0e18e574d0797e4bec4bec9f15af Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f957a32dacfd0e18e574d0797e4bec4bec9f15af commit f957a32dacfd0e18e574d0797e4bec4bec9f15af Author: Simon J. Gerraty AuthorDate: 2023-04-21 03:38:53 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-21 03:38:53 +0000 Update meta.sys.mk and related local*mk Move the setting of TARGET_SPEC_VARS to local.sys.env.mk so meta.sys.mk can do the processing, and include local.meta.sys.mk later. Move the setting of GENDIRDEPS_FILTER*_VARS from local.gendirdeps.mk to local.meta.sys.mk so we can automatically set DEP_* at level 1+ to avoid syntax errors when DEP_* variables are used in conditionals in Makefile.depend files. Update gendirdeps.mk just to get the documentation about the above. No functional change. local.dirdeps.mk be more careful about adding to DIRDEPS to avoid unnecessary overhead, and introducing cycles in the graph. Also set DEP_MACHINE_CPUARCH. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39737 --- share/mk/gendirdeps.mk | 35 +++++++++++++++++++++++++- share/mk/local.dirdeps.mk | 3 ++- share/mk/local.gendirdeps.mk | 16 ++---------- share/mk/local.meta.sys.mk | 60 +++++++++++++++++++++----------------------- share/mk/local.sys.env.mk | 5 ++++ share/mk/meta.sys.mk | 44 +++++++++++++++++++++++++++++--- 6 files changed, 112 insertions(+), 51 deletions(-) diff --git a/share/mk/gendirdeps.mk b/share/mk/gendirdeps.mk index 1ff2036237ed..ec4e188cdf78 100644 --- a/share/mk/gendirdeps.mk +++ b/share/mk/gendirdeps.mk @@ -1,5 +1,7 @@ -# $Id: gendirdeps.mk,v 1.48 2022/09/09 17:44:29 sjg Exp $ +# $Id: gendirdeps.mk,v 1.49 2023/04/20 17:45:03 sjg Exp $ +# SPDX-License-Identifier: BSD-2-Clause +# # Copyright (c) 2011-2020, Simon J. Gerraty # Copyright (c) 2010-2018, Juniper Networks, Inc. # All rights reserved. @@ -41,6 +43,37 @@ # symlink to another filesystem. # _objroot must be a prefix match for _objtop +# If any of GENDIRDEPS_FILTER, GENDIRDEPS_FILTER_DIR_VARS +# or GENDIRDEPS_FILTER_VARS are set, we use them to filter the +# output from filemon(4). +# Any references to variables that dirdeps.mk will set +# such as DEP_MACHINE, DEP_RELDIR etc, should use that form. +# Thus we want ${DEP_MACHINE} not ${MACHINE} used in DIRDEPS. +# +# If any manually maintained Makefile.depend files will use any +# DEP_* variables in conditionals, precautions are needed to avoid +# errors when Makefile.depend is read at level 1+ (ie not via +# dirdeps.mk) +# Using MACHINE as an example; such makefiles can do: +# +# DEP_MACHINE ?= ${MACHINE} +# .if ${DEP_MACHINE} == "xyz" +# +# or: +# +# .if ${DEP_MACHINE:U${MACHINE}} == "xyz" +# +# but it might be safer to set GENDIRDEPS_FILTER_DIR_VARS and +# GENDIRDEPS_FILTER_VARS via local.meta.sys.mk rather than +# local.gendirdeps.mk and then: +# +# .if ${.MAKE.LEVEL} > 0 +# .for V in ${GENDIRDEPS_FILTER_DIR_VARS:MDEP_*} \ +# ${GENDIRDEPS_FILTER_VARS:MDEP_*} +# $V ?= ${${V:S,DEP_,,}} +# .endfor +# .endif +# .MAIN: all # keep this simple diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk index d7e5396c81ed..246c9cdef114 100644 --- a/share/mk/local.dirdeps.mk +++ b/share/mk/local.dirdeps.mk @@ -207,12 +207,13 @@ DIRDEPS+= ${_lib${_lib}reldir} .if ${MK_STAGING} == "yes" # we need targets/pseudo/stage to prep the stage tree -.if ${DEP_RELDIR} != "targets/pseudo/stage" +.if ${DEP_RELDIR:N.:N${SRCTOP}:N*pseudo/stage} != "" DIRDEPS += targets/pseudo/stage .endif .endif DEP_MACHINE_ARCH = ${MACHINE_ARCH.${DEP_MACHINE}} +DEP_MACHINE_CPUARCH = ${DEP_MACHINE_ARCH:${__TO_CPUARCH}} CSU_DIR.${DEP_MACHINE_ARCH} ?= csu/${DEP_MACHINE_ARCH} CSU_DIR := ${CSU_DIR.${DEP_MACHINE_ARCH}} BOOT_MACHINE_DIR:= ${BOOT_MACHINE_DIR.${DEP_MACHINE}} diff --git a/share/mk/local.gendirdeps.mk b/share/mk/local.gendirdeps.mk index c8aa3ce05910..c224c7c64bd2 100644 --- a/share/mk/local.gendirdeps.mk +++ b/share/mk/local.gendirdeps.mk @@ -53,20 +53,8 @@ GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_HOST_TOOLS} GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U} # gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple -# order of this list matters! -GENDIRDEPS_FILTER_DIR_VARS+= \ - CSU_DIR \ - BOOT_MACHINE_DIR - -# order of this list matters! -GENDIRDEPS_FILTER_VARS+= \ - KERNEL_NAME \ - MACHINE_CPUARCH \ - MACHINE_ARCH \ - MACHINE - -GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@} -GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u} +# see local.meta.sys.mk for GENDIRDEPS_FILTER_DIR_VARS and +# GENDIRDEPS_FILTER_VARS # avoid churn for now LOCAL_DEPENDS_GUARD= _{DEP_RELDIR} == _{_DEP_RELDIR} diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 6d54d9c5881c..6e03a99d7dfe 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -1,7 +1,6 @@ # $FreeBSD$ # local configuration specific to meta mode -# XXX some of this should be in meta.sys.mk # we assume that MK_DIRDEPS_BUILD=yes # we need this until there is an alternative @@ -34,7 +33,6 @@ MACHINE_ARCH.$m?= ${MACHINE_ARCH_LIST.$m:[1]} BOOT_MACHINE_DIR.$m ?= boot/$m .endfor -.ifndef _TARGET_SPEC .if empty(MACHINE_ARCH) .if !empty(TARGET_ARCH) MACHINE_ARCH= ${TARGET_ARCH} @@ -44,36 +42,6 @@ MACHINE_ARCH= ${MACHINE_ARCH.${MACHINE}} .endif MACHINE_ARCH?= ${MACHINE_ARCH.${MACHINE}} MACHINE_ARCH:= ${MACHINE_ARCH} -.else -# we got here via dirdeps -MACHINE_ARCH:= ${MACHINE_ARCH.${MACHINE}} -.endif - -# now because for universe we want to potentially -# build for multiple MACHINE_ARCH per MACHINE -# we need more than MACHINE in TARGET_SPEC -TARGET_SPEC_VARS?= MACHINE MACHINE_ARCH -# see dirdeps.mk -.if ${TARGET_SPEC:Uno:M*,*} != "" -_tspec := ${TARGET_SPEC:S/,/ /g} -MACHINE := ${_tspec:[1]} -MACHINE_ARCH := ${_tspec:[2]} -# etc. -# We need to stop that TARGET_SPEC affecting any submakes -# and deal with MACHINE=${TARGET_SPEC} in the environment. -TARGET_SPEC= -# export but do not track -.export-env TARGET_SPEC -.export ${TARGET_SPEC_VARS} -.for v in ${TARGET_SPEC_VARS:O:u} -.if empty($v) -.undef $v -.endif -.endfor -.endif -# make sure we know what TARGET_SPEC is -# as we may need it to find Makefile.depend* -TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v:U}@:ts,} # to be consistent with src/Makefile just concatenate with '.'s TARGET_OBJ_SPEC:= ${TARGET_SPEC:S;,;.;g} @@ -96,6 +64,7 @@ TARGET_MACHINE= host .endif .if ${MACHINE} == "host" OBJTOP := ${HOST_OBJTOP} +MACHINE_ARCH= ${MACHINE_ARCH.${MACHINE}} .endif .if ${.MAKE.LEVEL} == 0 || empty(PYTHON) @@ -267,3 +236,30 @@ META_MODE+= missing-meta=yes .if empty(META_MODE:Mnofilemon) META_MODE+= missing-filemon=yes .endif + +.if ${MK_DIRDEPS_BUILD} == "yes" +# we set these here, rather than local.gendirdeps.mk +# so we can ensure any DEP_* values that might be used in +# conditionals do not cause syntax errors when Makefile.depend +# is included at level 1+ + +# order of this list matters! +GENDIRDEPS_FILTER_DIR_VARS+= \ + CSU_DIR \ + BOOT_MACHINE_DIR + +# order of this list matters! +GENDIRDEPS_FILTER_VARS+= \ + KERNEL_NAME \ + DEP_MACHINE_CPUARCH \ + DEP_MACHINE_ARCH \ + DEP_MACHINE + +.if ${.MAKE.LEVEL} > 0 +.for V in ${GENDIRDEPS_FILTER_DIR_VARS:MDEP_*:O:u} \ + ${GENDIRDEPS_FILTER_VARS:MDEP_*:O:u} +$V?= ${${V:S,DEP_,,}} +.endfor +.endif + +.endif diff --git a/share/mk/local.sys.env.mk b/share/mk/local.sys.env.mk index e3348537db41..626aafe61270 100644 --- a/share/mk/local.sys.env.mk +++ b/share/mk/local.sys.env.mk @@ -50,3 +50,8 @@ ECHO_TRACE?= true .include "src.sys.env.mk" .-include + +# For universe we want to potentially +# build for multiple MACHINE_ARCH per MACHINE +# so we need more than MACHINE in TARGET_SPEC +TARGET_SPEC_VARS?= MACHINE MACHINE_ARCH diff --git a/share/mk/meta.sys.mk b/share/mk/meta.sys.mk index cccab7ca952d..1fc58a226cb1 100644 --- a/share/mk/meta.sys.mk +++ b/share/mk/meta.sys.mk @@ -1,5 +1,4 @@ -# $FreeBSD$ -# $Id: meta.sys.mk,v 1.42 2021/12/13 05:50:55 sjg Exp $ +# $Id: meta.sys.mk,v 1.46 2023/04/18 18:43:00 sjg Exp $ # # @(#) Copyright (c) 2010-2021, Simon J. Gerraty @@ -21,7 +20,44 @@ .if ${MAKE_VERSION:U0} > 20100901 .if !target(.ERROR) -.-include +.-include + +# If TARGET_SPEC_VARS is other than just MACHINE +# it should be set by now. +# TARGET_SPEC must not contain any '.'s. +TARGET_SPEC_VARS ?= MACHINE + +.if !target(_meta_tspec_env_done_) +_meta_tspec_env_done_: .NOTMAIN +# Allow for local.meta.sys.env.mk to have done this + +.if ${TARGET_SPEC:Uno:M*,*} != "" +# deal with TARGET_SPEC from env +_tspec := ${TARGET_SPEC:S/,/ /g} +.for i in ${TARGET_SPEC_VARS:${M_RANGE:Urange}} +${TARGET_SPEC_VARS:[$i]} := ${_tspec:[$i]} +.endfor +# We need to stop that TARGET_SPEC affecting any submakes +TARGET_SPEC= +# so export but do not track +.export-env TARGET_SPEC +.export ${TARGET_SPEC_VARS} +.for v in ${TARGET_SPEC_VARS:O:u} +.if empty($v) +.undef $v +.endif +.endfor +.endif +.endif + +# Now make sure we know what TARGET_SPEC is +# as we may need it to find Makefile.depend* +.if ${MACHINE:Mhost*} != "" +# host is special +TARGET_SPEC = ${MACHINE} +.else +TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v:U}@:ts,} +.endif # absolute path to what we are reading. _PARSEDIR = ${.PARSEDIR:tA} @@ -178,3 +214,5 @@ META_NOPHONY= .PHONY META_NOECHO= echo .endif .endif + +.-include From nobody Fri Apr 21 03:59: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 4Q2gkb3QWFz4738k; Fri, 21 Apr 2023 03:59: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 4Q2gkb0BRhz46gv; Fri, 21 Apr 2023 03:59:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682049543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwbHr3QOgxXE8jg+vWV/vKyW19H0iFFobUg51Hl53NQ=; b=PJ5obC3I9cA+KEAVoyxvIoT+yHNnPfV0MgszEY7w8rMxkQOY1qWtqQ6e0Ag0ihkhcslbS+ FihCxYfkoHbtDqxsT+Hz2BAT3wGrJnL3JWYj8HyTXkkZxBhvure4dNY7uFyEIQO6TFXD5c fYm80JnxVlB6fTOXa1xyQF0Z6oJRFPZTNDB8/4cWX2ppQpOFznlveWTlq7MI384pngMxiK BLm6MS/4ZlZQFJngUfrvyQgOWZfAN5dyyL9B80Ay8xS0hVfeUYGkB7pe4s9NfOa10WSvFO mLwAcqImPBArTZiZNVgWVwPV8KDFkdqFy+xVNuZlxndd9VOvo34Pjr5NGlQ6eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682049543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NwbHr3QOgxXE8jg+vWV/vKyW19H0iFFobUg51Hl53NQ=; b=WNFEKOanm6pbXM6fgrtjBV23lUFkQCqN7obDulPq/Z7NLvdc60MnZ7CaNJu1DvDMbUKaTv kvZR2j6+iWEgAiii9fsY+pW38kirJpzuizj+FzSEtmJegedGNt1CgXb1ZXBWhyAVJl8JwS 7SskddNJ4M7BetRyxCGyP0QLDsT8HsdD7N5otIY6D/9p75IafAIasIHPOJqKI7KCm1+VFs mwJ0MvOLqOSiYMeIQ2k591c2lkE9cwehtdwm3brO4sMSGHWN//1gxZ3sBassZjaZlr4a3D 4pIOVOoxdWC694qK8Psf/TmbmPDQnVOZt6XsBtimpM97mCvBGHHiFs0XxsbNBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682049543; a=rsa-sha256; cv=none; b=ZAFJfG/1j/biFLzSjBMMOPVzPuEupOFKBDVnsapU9mFNFkZ4QiIxoJkdd59NORzbH8lgWX 8uerG3RCgtkpA5SCbGlrMJbc4QeYmEKpFKLfEs0LJ1lStFB8BODL6XSHOAJvqAjHNqvECH PU4bRDpQajQg431hOGzIp5TCkEsBO8XZhJAWcKAChyOrVqaqjV+bbpQoYeE6Y2T17XdSQy fnHVPWyJ0A6C3UJaQnKE66rzNdybiTfbT0E4tP96X+ZQVFM111vjkSxV6XKF2E0dkKOPae CKGwf1rSQkiuVqoFLww3emjcdoED6ZnjsqNVbG0nRPwDk+YYQQdGngXfHFVMbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2gkZ6542z158n; Fri, 21 Apr 2023 03:59: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 33L3x2Bl099796; Fri, 21 Apr 2023 03:59:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L3x2fY099795; Fri, 21 Apr 2023 03:59:02 GMT (envelope-from git) Date: Fri, 21 Apr 2023 03:59:02 GMT Message-Id: <202304210359.33L3x2fY099795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: ca5391bd8579 - main - cxgbe(4): Update firmwares to version 1.27.3.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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca5391bd8579fd404dc31880b4d8744f43d22adb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=ca5391bd8579fd404dc31880b4d8744f43d22adb commit ca5391bd8579fd404dc31880b4d8744f43d22adb Author: Navdeep Parhar AuthorDate: 2023-04-21 01:24:57 +0000 Commit: Navdeep Parhar CommitDate: 2023-04-21 03:57:38 +0000 cxgbe(4): Update firmwares to version 1.27.3.0 These are the changes since the last update (copy-pasted from the release notes for Chelsio Unified Wire v3.18.0.0): ==================== Version : 1.27.3.0 Date : 04/07/2023 Fixes ----- BASE: - Fixed a hang if module eeprom reads gives invalid data. - KR backlplane no-fec link problem fixed. OFLD: - iscsi ddp errors fixed. - iwarp connection abort in rare cases causing NIC traffic hang fixed. ENHANCEMENTS ------------ BASE: - Cisco GLC-TE 1G modules support added. ==================== Version : 1.27.1.0 Date : 12/02/2022 Fixes ----- BASE: - memwrite dsgl cannot be used for T5. OFLD: - Enabled FCoE in SO adapters. - TOE-TLS crash fixed. - iscsi hang fixed. MFC after: 2 weeks Sponsored by: Chelsio Communications --- sys/conf/files | 6 +++--- .../{t4fw-1.27.0.0.bin => t4fw-1.27.3.0.bin} | Bin 570880 -> 570880 bytes sys/dev/cxgbe/firmware/t4fw_interface.h | 6 +++--- sys/dev/cxgbe/firmware/t5fw-1.27.0.0.bin | Bin 677376 -> 0 bytes sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin | Bin 0 -> 678912 bytes sys/dev/cxgbe/firmware/t6fw-1.27.0.0.bin | Bin 729600 -> 0 bytes sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin | Bin 0 -> 730624 bytes sys/modules/cxgbe/t4_firmware/Makefile | 2 +- sys/modules/cxgbe/t5_firmware/Makefile | 2 +- sys/modules/cxgbe/t6_firmware/Makefile | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index e94652462a17..a78c37558227 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1471,7 +1471,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.27.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.27.3.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1505,7 +1505,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.27.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.27.3.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1539,7 +1539,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.27.0.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.27.3.0.bin" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" diff --git a/sys/dev/cxgbe/firmware/t4fw-1.27.0.0.bin b/sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin similarity index 60% rename from sys/dev/cxgbe/firmware/t4fw-1.27.0.0.bin rename to sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin index dcae4d1b8a2b..e1576783a65c 100644 Binary files a/sys/dev/cxgbe/firmware/t4fw-1.27.0.0.bin and b/sys/dev/cxgbe/firmware/t4fw-1.27.3.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h index e8f8096a6595..bbe6896430d3 100644 --- a/sys/dev/cxgbe/firmware/t4fw_interface.h +++ b/sys/dev/cxgbe/firmware/t4fw_interface.h @@ -10003,17 +10003,17 @@ enum fw_hdr_chip { enum { T4FW_VERSION_MAJOR = 1, T4FW_VERSION_MINOR = 27, - T4FW_VERSION_MICRO = 0, + T4FW_VERSION_MICRO = 3, T4FW_VERSION_BUILD = 0, T5FW_VERSION_MAJOR = 1, T5FW_VERSION_MINOR = 27, - T5FW_VERSION_MICRO = 0, + T5FW_VERSION_MICRO = 3, T5FW_VERSION_BUILD = 0, T6FW_VERSION_MAJOR = 1, T6FW_VERSION_MINOR = 27, - T6FW_VERSION_MICRO = 0, + T6FW_VERSION_MICRO = 3, T6FW_VERSION_BUILD = 0, }; diff --git a/sys/dev/cxgbe/firmware/t5fw-1.27.0.0.bin b/sys/dev/cxgbe/firmware/t5fw-1.27.0.0.bin deleted file mode 100644 index 1158b9567336..000000000000 Binary files a/sys/dev/cxgbe/firmware/t5fw-1.27.0.0.bin and /dev/null differ diff --git a/sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin b/sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin new file mode 100644 index 000000000000..fcae45a4df35 Binary files /dev/null and b/sys/dev/cxgbe/firmware/t5fw-1.27.3.0.bin differ diff --git a/sys/dev/cxgbe/firmware/t6fw-1.27.0.0.bin b/sys/dev/cxgbe/firmware/t6fw-1.27.0.0.bin deleted file mode 100644 index 0652ae751b82..000000000000 Binary files a/sys/dev/cxgbe/firmware/t6fw-1.27.0.0.bin and /dev/null differ diff --git a/sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin b/sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin new file mode 100644 index 000000000000..31bd7019e51e Binary files /dev/null and b/sys/dev/cxgbe/firmware/t6fw-1.27.3.0.bin differ diff --git a/sys/modules/cxgbe/t4_firmware/Makefile b/sys/modules/cxgbe/t4_firmware/Makefile index bd46124af668..f70a13a3e30e 100644 --- a/sys/modules/cxgbe/t4_firmware/Makefile +++ b/sys/modules/cxgbe/t4_firmware/Makefile @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T4FW_VER= 1.27.0.0 +T4FW_VER= 1.27.3.0 FIRMWS+= t4fw-${T4FW_VER}.bin:t4fw:${T4FW_VER} .include diff --git a/sys/modules/cxgbe/t5_firmware/Makefile b/sys/modules/cxgbe/t5_firmware/Makefile index 3cc9c0b07f09..b586727a994a 100644 --- a/sys/modules/cxgbe/t5_firmware/Makefile +++ b/sys/modules/cxgbe/t5_firmware/Makefile @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T5FW_VER= 1.27.0.0 +T5FW_VER= 1.27.3.0 FIRMWS+= t5fw-${T5FW_VER}.bin:t5fw:${T5FW_VER} .include diff --git a/sys/modules/cxgbe/t6_firmware/Makefile b/sys/modules/cxgbe/t6_firmware/Makefile index 0f89e03fe819..be5ed1d99bb4 100644 --- a/sys/modules/cxgbe/t6_firmware/Makefile +++ b/sys/modules/cxgbe/t6_firmware/Makefile @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T6FW_VER= 1.27.0.0 +T6FW_VER= 1.27.3.0 FIRMWS+= t6fw-${T6FW_VER}.bin:t6fw:${T6FW_VER} .include From nobody Fri Apr 21 04:01: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 4Q2gmz6Zpdz4734F; Fri, 21 Apr 2023 04:01: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 4Q2gmz5Tc1z49MD; Fri, 21 Apr 2023 04:01:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682049667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VjN//my15Tf8LpU5HeQ7EQBF+dbqt13D9GxJEh46xA4=; b=utseu7WtD2feOWnKHCoLWFIVPvMGTELAl0LMDNhgOCXj8Fe/a5qjJTsunvK8XVDuB3P7MK 0LMK7+0IENLhQtmJymUa+wIn5i/L37REwtVxkjBE0OaFSCXyCAe0/udqqN4ECj256z8q2d anMf7XOpTJFd31kds2WZPt4vSr3lWd+uxy7Bm0+pUUq82zP254I8gMMxE+YSWkznDl6mG3 yLLPPgFN9rtYGNzDEYUEi65lFzwDHZaWrT7O3IYaWcbdK5LVAuXVSYLja4Q5JMa6N89nwH SsfDg2wNAbANKJCzvmQims2Ymf/YcJtNwYOyd8m1nrPE69zpu7yAP5XV4cPwNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682049667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VjN//my15Tf8LpU5HeQ7EQBF+dbqt13D9GxJEh46xA4=; b=PFDz6f1gIUTec1aOl29qBOqzXH0Dd0ew/0bdOHy33gyelt312FrnC9pDdqTKcfJnAR+Odc +TfefeXDXc90SYTloqayl28l1zBDIRF2X1+mhtRFmAoif8G2MQBsRVOcq3M1dO3HBfwNOe HxRV0cDV/cOUGQrD9N6+tpTCuybSdhG2MTYsr8S2B+R/qrprf+YgZ1MqrHGtxHsBOVBihe kxc8XzNOnqWApohWtvzoNsaCAu54ROeQsOJXibk2PjXw4nssEthLZzXpn3eQcwYcsLqgRC zYEWD8v1nNtXb/kGhwUA506SczPjSQHXJhCoNdi4+NJSZW9pTSatMvL8PVk2UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682049667; a=rsa-sha256; cv=none; b=fGZWvMUSN4beTK5+4jtuhp706xSNm48IkMSbqxcA6pOG/8HrUIa03Wpb3h/rG6617D8rVC TkOyyZU4IRYuvbo/8XW09yAkW5NHIECs5GzUceRfh3QLrddoVLjAuT+U9veHSgabJ6Zi0E NL7xjNLsW1TQZazCRgPdQ8czhuKu8wi7phSXvzCe7DvZD3doaH5VxGEf7X0Zqz6yz7i4AB Riv3VdAGX1KnPFawB1x1sZZhIaFwOM5RHTy9EollvykSOwvlRug9eVNzqCyr0ceKwaFvjX ijQrLWetpdFunl8H4ITK4sC72V6AL8WfG3x/SMImxkUMhp6sRckyqjnuN4TEkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2gmz4ZMdz15FZ; Fri, 21 Apr 2023 04:01: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 33L417Ti011442; Fri, 21 Apr 2023 04:01:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L417aC011441; Fri, 21 Apr 2023 04:01:07 GMT (envelope-from git) Date: Fri, 21 Apr 2023 04:01:07 GMT Message-Id: <202304210401.33L417aC011441@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: 552815b2da6e - main - zoneinfo get zic from stage tree during DIRDEPS_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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 552815b2da6ee05c89e2d77970e0c010cf83d307 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=552815b2da6ee05c89e2d77970e0c010cf83d307 commit 552815b2da6ee05c89e2d77970e0c010cf83d307 Author: Simon J. Gerraty AuthorDate: 2023-04-21 04:00:17 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-21 04:00:32 +0000 zoneinfo get zic from stage tree during DIRDEPS_BUILD --- share/zoneinfo/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index 17dce860edae..2e8e0cd53cd2 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -82,11 +82,15 @@ META_TARGETS+= zoneinfo install-zoneinfo # ZICFLAGS?= -b fat +.if ${MK_DIRDEPS_BUILD} == "yes" +ZIC= ${STAGE_HOST_OBJTOP}/usr/sbin/zic +.endif + zoneinfo: ${TDATA} mkdir -p ${TZBUILDDIR} cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS} umask 022; cd ${.CURDIR}; \ - zic -D -d ${TZBUILDDIR} ${ZICFLAGS} -m ${NOBINMODE} \ + ${ZIC:Uzic} -D -d ${TZBUILDDIR} ${ZICFLAGS} -m ${NOBINMODE} \ ${LEAPFILE} ${TZFILES} # From nobody Fri Apr 21 04:46: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 4Q2hn719Qzz475P5; Fri, 21 Apr 2023 04:46: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 4Q2hn70MMbz4Jd1; Fri, 21 Apr 2023 04:46:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6WkVbgSQdMPLuhGLRzPap4RxALlU9h/fKLBRGV2/wjo=; b=ClP2XBgeHgVz0HJXoBYU7v5OrG05TfMtFgUfzc70huNsp0jv+xvMoPkR0LQ4DK8qIX09Yq ZxAm8cuDbEZ8XYMos+g/LpMST0waIAIH10XXWRYuPpx+NKxBbaROMfv70imR35iqwJq9+t K5bQMYCy/nOP94vhA7Evsicbm1/1v1HhajEenATcgcz3yhcL3tjTRxOK7mp8i1r6G3lhsV jCowLRv1YhM/i8WSWHSOwSc/Z+CM86DvtOSNZD4acTLw+Uew2NoPk3UXJ8tmxKlK6VF3c4 XLFaR5OG9VEOcxpKxCCaxZChg09oRjND9ge7FKYGKjWqki3aBx/YhHpaSsNmNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6WkVbgSQdMPLuhGLRzPap4RxALlU9h/fKLBRGV2/wjo=; b=ttasygLaQvWoI95w7cUnbQHAKD6rwGm3bbe2Bd+xSaLCSm4qRSQho4gj6Z7rx6LxUIUEou IYMipBXx307cy9Tu8S3wnhP0wMKLMPJwedabwjfGQZhzhSQxOcUeRP09YNO0bErRcNd6SW pEDh0kvf87FJQaNBdUaFViFmFzo0mJ8srY9/UJO4qdCGl4EpR6JtNFjk+EcN99zmwfDnxu rN2Orvn5BfkC0azvpni7uFGl7uQ3BW2Bi4n1xOnm60jtgkWPvaoSUrB8AacDQPM8ftzMEC lQqQGtq/TO8k1nvBqC5hoZTfyPIu20x14nuA2jWfdiusnQ9Vx+0sktFsDKVviA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682052379; a=rsa-sha256; cv=none; b=vwqgMB2UdYkp4+SZOJEKt4yD89lnvAswECcMDQEUjUw4DOchyQQCqflBOjSkyzXoF0ouBI cwWxJUjH6fp49S1ZEplCPwuJYkud0oZci//l727PaFcHB0ZwXLZHmgF3ZviygBAygbfIJ+ 1c9raLD/PwIEDtXvrkObeBnXZ76mmS2MzsNz2EpSSgq017Q9kMTtakI4hd7qaBQh2vSNh4 dWqlCGN0g1QMVKFJHksmTmeY64RZfOJb5jg1Pk/Nh1Z8U2O2QTkZfj48wKYTpQqU1YjaVn vzo3u2nXHofVQk/8jnx3bWrB69+MgL3qMgUSyceE/3irz9zJJBcek56N23Bc+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2hn66V6cz16NR; Fri, 21 Apr 2023 04:46: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 33L4kIKE081972; Fri, 21 Apr 2023 04:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L4kICO081971; Fri, 21 Apr 2023 04:46:18 GMT (envelope-from git) Date: Fri, 21 Apr 2023 04:46:18 GMT Message-Id: <202304210446.33L4kICO081971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 6b5b4668ce76 - stable/13 - mount_nfs.8: Fix a mandoc 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6b5b4668ce7649c0e2314964ae8f6bb1455ba00d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=6b5b4668ce7649c0e2314964ae8f6bb1455ba00d commit 6b5b4668ce7649c0e2314964ae8f6bb1455ba00d Author: Gordon Bergling AuthorDate: 2023-04-18 07:14:20 +0000 Commit: Gordon Bergling CommitDate: 2023-04-21 04:45:36 +0000 mount_nfs.8: Fix a mandoc warning - sections out of conventional order: Sh IMPLEMENTATION NOTES (cherry picked from commit c2a9d23736da3593bc7cc883f43d913188d79beb) --- sbin/mount_nfs/mount_nfs.8 | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8 index 0e6ea0538063..c3da26c41c66 100644 --- a/sbin/mount_nfs/mount_nfs.8 +++ b/sbin/mount_nfs/mount_nfs.8 @@ -529,6 +529,26 @@ options should only be used as a last ditch effort at improving performance when mounting servers that do not support TCP mounts. .El .El +.Sh IMPLEMENTATION NOTES +When neither the +.Cm rsize +nor +.Cm wsize +options are specified, the I/O size will be set to the largest value +supported by both the NFS client and server. +The largest value supported by the NFS client is defined by +the tunable +.Cd vfs.maxbcachebuf +which can be set to a power of two up to +.Cd kern.maxphys . +.Pp +The +.Xr nfsstat 1 +command with the +.Ic -m +command line option will show what +.Nm +option settings are actually in use for the mount. .Sh COMPATIBILITY The following command line flags are equivalent to .Fl o @@ -625,26 +645,6 @@ Same as Same as .Fl o Cm nfsv4 .El -.Sh IMPLEMENTATION NOTES -When neither the -.Cm rsize -nor -.Cm wsize -options are specified, the I/O size will be set to the largest value -supported by both the NFS client and server. -The largest value supported by the NFS client is defined by -the tunable -.Cd vfs.maxbcachebuf -which can be set to a power of two up to -.Cd kern.maxphys . -.Pp -The -.Xr nfsstat 1 -command with the -.Ic -m -command line option will show what -.Nm -option settings are actually in use for the mount. .Sh SEE ALSO .Xr nfsstat 1 , .Xr nmount 2 , From nobody Fri Apr 21 04:46: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 4Q2hn81jtjz475hj; Fri, 21 Apr 2023 04:46: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 4Q2hn811Lgz4JbC; Fri, 21 Apr 2023 04:46:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObF0lMS8BmTL0n2Y2/5DjdIHfjwMbCG6igkEs4VcxUE=; b=SVJEhTtjjb1MMAtJFU5VlZ2X+z9PtKPyCBVuGzXxyo830sx8Vk4SvIHJrs7UhAywVfEO47 iEFr2gFsrjyFaocHsw2PeT3lPlZjzTzIleUwodqaZs2t054M28K14nofiqww/VXiEGnV0c wwXVxqNHmWMUmf9W/JNEnHXURy4E9oEMCRcvMHFmGIfDaAFyjBZpqmSiMTZP41bLFjZAJO N24gN1IYe0a0P2upWmSqSdJ6WULqrau4pIm9gM495Tx6Bx19+rPG9Z0IRmUj0MXYcBB02f eO2nbOQelTPCmbzBS0V1jRGFM28kg+IzhBxeTbVsrra08Z1ncmlsL4uN6N5r4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ObF0lMS8BmTL0n2Y2/5DjdIHfjwMbCG6igkEs4VcxUE=; b=TR1/xdJrS2yVz5GGZ8aNJksJHmQPpCcGYi8mIIt3yIDzbcmv0RbXog0cxJEm7z0AejB2HI frZXBCUjlR+tFL8rNtkTxrWfOxf/Uu/O/OidnJpLlqeLOcAlLNGXaneBvOaAIxzXuIpPKC f9IXbHMtk3G5CvCZEDNxlM2ThtO3xCUjV++P05L85jGPeJ+FKzitNOIPx6vx3BqRrGpIrl VcsP/6vhMznLxtHAOrfAHJgapZe8CRuQjOrbK3Je26OkFUTbKx16NvFAufozSLWBjCPaSu z3lORE2bNSjJcxirqcK1ZRgaOvQJSC8aBwG4iIbZdHHVAUZ+hnDO2NWIlrlnwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682052380; a=rsa-sha256; cv=none; b=aPrrR1YrQDQMaMcy0ler0Rq0wshqWNHcEiLe85etzdxEjcC/1k4MrMTuT22TjWBlqsqj97 1lqLpKa9/rnKqCZFUkGbQ2vRDyl0Ra0h2hib9LQbuou/i5QGzUGls6Yykx/R0RILyHDPjG kZPoZ1vHlAsTmxGm+pctrBvELcEph485AJKOYp4zuLN3SRmz07zklMcFkYPSHbiELufWwB p65MynS6TUS7W4LJlTqdV4y9BhfbevC7GtK9CKTZhtSH7PjlgOai9g6pPntTKPclYTxsDP gCOSJ5fBOkTUofJxDxGcS1CuILvTfRmcu7bv8NHDYvIrl7kJ1KgMdwG6Eivl9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2hn7733Xz16NS; Fri, 21 Apr 2023 04:46: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 33L4kJj5081991; Fri, 21 Apr 2023 04:46:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L4kJcp081990; Fri, 21 Apr 2023 04:46:19 GMT (envelope-from git) Date: Fri, 21 Apr 2023 04:46:19 GMT Message-Id: <202304210446.33L4kJcp081990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: eca916b0e65f - stable/13 - morse.6: Mention to standards in the 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eca916b0e65fb60df4725de3a1b1bd74c508ba77 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=eca916b0e65fb60df4725de3a1b1bd74c508ba77 commit eca916b0e65fb60df4725de3a1b1bd74c508ba77 Author: Gordon Bergling AuthorDate: 2023-04-16 09:46:09 +0000 Commit: Gordon Bergling CommitDate: 2023-04-21 04:45:52 +0000 morse.6: Mention to standards in the SEE ALSO section Mention ITU-T Recommendation F.1 and ITU-R M.1677-1 in the SEE ALSO section. Obtained from: OpenBSD (cherry picked from commit 82a036d86acaac75b1ff6d4f8b767bbb117694f1) --- usr.bin/morse/morse.6 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/usr.bin/morse/morse.6 b/usr.bin/morse/morse.6 index bf339563589b..d2ce30eddb82 100644 --- a/usr.bin/morse/morse.6 +++ b/usr.bin/morse/morse.6 @@ -29,7 +29,7 @@ .\" @(#)bcd.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd January 5, 2018 +.Dd April 16, 2023 .Dt MORSE 6 .Os .Sh NAME @@ -178,6 +178,17 @@ device file .El .Sh SEE ALSO .Xr speaker 4 +.Rs +.%I ITU-T Recommendation F.1 +.%R "Operational provisions for the international public telegram service" +.%O Division B, I. Morse code +.Re +.Rs +.%I ITU-R M.1677-1 +.%R International Morse code +.%D 2009 +.%U https://www.itu.int/rec/R-REC-M.1677-1-200910-I/ +.Re .Sh HISTORY Sound support for .Nm @@ -191,7 +202,7 @@ Ability to key an external device added by Farnsworth support for .Nm added by -.An Stephen Cravey (N5UUU). +.An Stephen Cravey (N5UUU) . .Sh BUGS Only understands a few European characters (German and French), From nobody Fri Apr 21 04:46: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 4Q2hnB1kXMz475cf; Fri, 21 Apr 2023 04:46: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 4Q2hn92DdKz4JkF; Fri, 21 Apr 2023 04:46:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zl68p6PGc3/MYv9x5C/77gSOJu7ahzrBSunIl9q3aZs=; b=rnrquoHhZyO+poUNRXVWW/eRZkfkNIEgll38K2ZuA6yrbIGWPv9XJPxSLxTu2mjB6QepKP nAcrjNpeA7hKbnRy+O8qYNfdbmTCgyqOQFV1OtrfgUqnCWysr8RT9ihcNtln/nbYwx3mSv 8sRH3v5nvw+kTdqIv2tJNOP5dI3XABauNWVsMptv0kFYcvyMZk0Atd02+yPbtiaN9lmdeA mRHcIuevqQS7f3IRVDMjzrvoHCnDloXobYauEAmH3k29BGavxToy3CjSe9MFlAnkoNH0gt TEB+i8PYJ5PfO7gvpSOUTRwyQe9QxSZB1m36R//RtLaQBRfzG2c7V66zjpYDiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zl68p6PGc3/MYv9x5C/77gSOJu7ahzrBSunIl9q3aZs=; b=DkoU/PbSeltjWt5XNj4q9tFCxvUdVaMiAbZVGKUa5qbUu5vIyOb2omcHD2ci7jAWL6VA3K byqqtiIhAJQhx6Jh0lZsASWStIV+JnpKj/rdYVcTCyInxQjtfygTEPjU3ykE/KQP7RpDDZ OZ+z1B4iUJKZKiDAvH5gGOkYEapf8/Q35RdMs1A3R2rW+vC/Tu19GQ3AHlvth6F4OrPAhW vNdvN9Og8OhJRfejszfTM+eKzpY1Zt95hR715jvzseVGrXb8vHFDirtU1qcmaEhWck7yzc ifDR61Py2V/M1Q5xhZfhHoiMOmT0FB36PZYdv1t4q+X11tdJ57i0dbgqbz97ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682052381; a=rsa-sha256; cv=none; b=llkxFftFk5IBNbILDpMBFobOtsWXgkBsY5Q7biYQxE2EfArcbZgCaaEOwtz3Nt3NM+9k34 J7+Lasd/HgmfTN09qhpIRMFUTcjewKCNCvMWk7uj/Tg6B+/3WHjMczwxuIdRwWxOgcTc/G 0/UuNmrVvXuSJnXqUOlZy1/VcUYqjMMNT8jo8TfwIzOT+tfulp07ovFpMkN/uVUd5sl9m4 Z8TIN+bG9QCaVqRlqQSnjFXw1NcbKgcJM1mbBcMSDsgW6JnM7S/tfuC6fs1d5z4jtLPqmE R9rU6HMA3dZU044f4gpIupNr0uPSGgCn8HLyAy749DOrbIUs0DIpZFZBE1Vksw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2hn90h61z16NT; Fri, 21 Apr 2023 04:46: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 33L4kLQE082010; Fri, 21 Apr 2023 04:46:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L4kKQx082009; Fri, 21 Apr 2023 04:46:20 GMT (envelope-from git) Date: Fri, 21 Apr 2023 04:46:20 GMT Message-Id: <202304210446.33L4kKQx082009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 64040734ed6f - stable/13 - grdc.6: Add an ENVIRONMENT section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 64040734ed6f3e4eba87a57bcc137402156471dd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=64040734ed6f3e4eba87a57bcc137402156471dd commit 64040734ed6f3e4eba87a57bcc137402156471dd Author: Gordon Bergling AuthorDate: 2023-04-16 09:17:06 +0000 Commit: Gordon Bergling CommitDate: 2023-04-21 04:46:09 +0000 grdc.6: Add an ENVIRONMENT section - Add an ENVIRONMENT section Obtained from: OpenBSD (cherry picked from commit 991360ba49707b84889e5bfce49dfbf383088171) --- usr.bin/grdc/grdc.6 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.bin/grdc/grdc.6 b/usr.bin/grdc/grdc.6 index 5226a6b2a9c7..269b8984ec3e 100644 --- a/usr.bin/grdc/grdc.6 +++ b/usr.bin/grdc/grdc.6 @@ -26,6 +26,18 @@ The optional flag tells grdc to output the time in a 12-hour format. In this curses mode implementation, the scrolling option has trouble keeping up. +.Sh ENVIRONMENT +.Bl -tag -width Ds +.It Ev TZ +The time zone to use for displaying the time. +It is normally specified as a pathname relative to +.Pa /usr/share/zoneinfo , +though see +.Xr tzset 3 +for more information. +If this variable is not set, the time zone is determined based on +.Pa /etc/localtime . +.El .Sh AUTHORS .An -nosplit .An Amos Shapir , From nobody Fri Apr 21 04:47: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 4Q2hp03TjZz475cl; Fri, 21 Apr 2023 04:47: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 4Q2hp02xX3z4LTd; Fri, 21 Apr 2023 04:47:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QUv7NY3rLD9fHCCBOb4U9Tkx0ygAzDzWHGAZH6edc10=; b=t4rbyf0edwui3MmuV6OaTxM52aOP8AD3rPubgOLrcVe5WnhDuH+IGRvkNvgYuNN95/zoY8 Kk6W3gF3jJ7NmJ4mWrwTAfRyckd8cpfNG9q+iXubKS9h2Ahq6RleK8u+UOl1wTiUMInVA/ /K+lW94pauf7z5JcPUTbdvFSUIRXm/Bf+6bkVBGbucDAGrVC/5UMXdX7dy1lKfiS91L4XZ QvH937GlvLlMskT4nKmu8ykJn7PzJOz+j+lQkslRe+ZXIVJx6a6WiM1XsQarXh1ZpZtAwr fIEYrCmG5+K/TJ7QcAJVswcbsU66nRNE/Qq6UptESvCJ2f+A0myBXkbxurUdog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QUv7NY3rLD9fHCCBOb4U9Tkx0ygAzDzWHGAZH6edc10=; b=es7MRREnxC6YxZ1o0hLgyTNbuUdU/2XsZmuyHDjZFL1pCkgwnVE+Ww0GDDhV5BSUBt0Pr2 1Gzlq8g3nh6jyBoHXDiEUeEGV0aCRYGomMQU5chXjz1p3TrRNBpv8H4dhNr7weDjtQ4vGm Cqus+WDsJjp8RQzUc1g8nBGfehc1Fov/V5QJnHQ7vCXJlMHuCqy7m0pPtEafCeBjVAi+Va t0+S9/A6guUuyhtW9gXD26+/yFJxhP8BiduKopapiXkcci8xacPYiSjdJHcv/eCCQ20g+C J9xVqc6ej5ZS42JCsvfNOp2BEGIR2HhleewUtPkEHV6rWCZBZHTTyHwfztBleA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682052424; a=rsa-sha256; cv=none; b=Q88YAUAFRMD/P4TMGX1ORol3xN+mwJ0iF8ccnH54ZFdGsYmqIH01IfZnIBO6VaYEiwG97V KqC0VmyCTia1B7sd5hUirBvATFozDyJQGEVjAfZ1NPpYAF9LDXVMHigvPb2fP2vrV5rUIT 9nmcPVl2ueVVMKBez93XyUJRaW8LR1Jc+SC7D/ixG/HLZGGoJ9bmwLJLlzGecR9ouvgo3d m0rNQuCyDpDQHUAuZswRWkcjnD7s30vDqlwUc1vyWg6zT2OJnWdIUOnNXdJ7M3b7qX9rUW YSsgcj2RENNi/R7pEK/E8CkbE3jTaF4saQF1MsmSk82iz/786mwGfqQ67KRATg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2hp01thvz168q; Fri, 21 Apr 2023 04:47: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 33L4l4QC082222; Fri, 21 Apr 2023 04:47:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L4l4mW082221; Fri, 21 Apr 2023 04:47:04 GMT (envelope-from git) Date: Fri, 21 Apr 2023 04:47:04 GMT Message-Id: <202304210447.33L4l4mW082221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: b75fa8cba4c3 - stable/12 - mount_nfs.8: Fix a mandoc 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b75fa8cba4c30e9ee80b20f6d4c6a91defc5d4bb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=b75fa8cba4c30e9ee80b20f6d4c6a91defc5d4bb commit b75fa8cba4c30e9ee80b20f6d4c6a91defc5d4bb Author: Gordon Bergling AuthorDate: 2023-04-18 07:14:20 +0000 Commit: Gordon Bergling CommitDate: 2023-04-21 04:46:40 +0000 mount_nfs.8: Fix a mandoc warning - sections out of conventional order: Sh IMPLEMENTATION NOTES (cherry picked from commit c2a9d23736da3593bc7cc883f43d913188d79beb) --- sbin/mount_nfs/mount_nfs.8 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8 index a99ace2d1c82..7d65991e8892 100644 --- a/sbin/mount_nfs/mount_nfs.8 +++ b/sbin/mount_nfs/mount_nfs.8 @@ -471,6 +471,26 @@ options should only be used as a last ditch effort at improving performance when mounting servers that do not support TCP mounts. .El .El +.Sh IMPLEMENTATION NOTES +When neither the +.Cm rsize +nor +.Cm wsize +options are specified, the I/O size will be set to the largest value +supported by both the NFS client and server. +The largest value supported by the NFS client is defined by +the tunable +.Cd vfs.maxbcachebuf +which can be set to a power of two up to +.Cd kern.maxphys . +.Pp +The +.Xr nfsstat 1 +command with the +.Ic -m +command line option will show what +.Nm +option settings are actually in use for the mount. .Sh COMPATIBILITY The following command line flags are equivalent to .Fl o From nobody Fri Apr 21 04: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 4Q2hp15Pstz475LZ; Fri, 21 Apr 2023 04:47: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 4Q2hp13gCwz4Lfx; Fri, 21 Apr 2023 04:47:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fu1KZbbk6i3deeUNt24QknofTp78ExkSLc/uVv8pV0U=; b=Vg3X5jG28Ivs0iPMjpuNQxAxx9ygZS6llTKPJqro9Mldy0+Rpxvv/P1c3m/xniTSaOGc+N my4eEoAQH7d1DsAwqW7MunWjhi7/hxOF45waMPSuZNiFTd98GCwxq0Yew+Ci/6nZHipdT6 Nd6oAFONLKLQLoyAD6RaAylOtWQ6XophJ1jyUf4kpWUv3vX+ge3QaivIfCy6+oGIMXUCBM Ubvm6u2C2qcRvO3aLbk/eAKaBUh5Q6WyBAsjnL+bsxMnFJw8Zx6WliZtJ4ltwn2gzSYgHJ jf4lWkkStpbARF9HnDX2QeeWhn4BfhsiiEetg+qw7rRjKFcv3AbrcEzYG/LJTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052425; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fu1KZbbk6i3deeUNt24QknofTp78ExkSLc/uVv8pV0U=; b=KC0wTTdyN432iCQd8NAG73Ch4acXBgGNKYwicTCxGps1Ze7OYxU5KePsR6H75HsRshxQKp MeiXQ9BBzE1oaNOMh9gOiSCugMR/zQkVlnaEz4fU6bIOgVjN5u3CcUsUKvXsYPcFENo2YI ynElPV8Kqj4RGYXICJcwzpd6M9qsChFO/HHsa4BN2jw2eaX8Z6gBcLz77gzp/zhu3VP/M6 SecmOrvHUvVbdWBuoN9A6j35cYy4D1UCm6CCk7q48tU2f2rdSXZ3fPa6tXuHHEtsbQw1eB GjyF+i31anpuy0cQ2G9YmDjnn/KZnmDx4rg6YPjZBMsRctuMbHa2FkTx5qDAEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682052425; a=rsa-sha256; cv=none; b=Cn8pbIWv9RTP1ZHDzv/5ZuqKEdlBfkDPIPlD8U3hTLdLJGg7Df0i+HRGJeElzUYtDwVPgs gQR2SP3WZ5pjW3SvCZ1XOv9f0ewxQQcFJaGs6n3pTcwjXtose4VhcI0qZKAIvT9RpwY4uo Cbz3WoWp9aapdhjQLKhxAcZaINGo1/V4CfGRtDnZ3M/PxANRItAthuDnDzO74Cf+QbnT0Q x05Lc4lqnqmL40sn3K6ZH7rzlGL5u9ahOr8jQ5/YnpFjNXLQ0MN7fHMmRc2zRR7Bj0DPH7 fIyBhFkewmpuXi8cBphjI4CZzdTXMlmTYxyUPWv6yPAQ1yIetBQytTQ/bdC90A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2hp12kH6z16NW; Fri, 21 Apr 2023 04:47:05 +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 33L4l5tj082242; Fri, 21 Apr 2023 04:47:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L4l5KT082241; Fri, 21 Apr 2023 04:47:05 GMT (envelope-from git) Date: Fri, 21 Apr 2023 04:47:05 GMT Message-Id: <202304210447.33L4l5KT082241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 3c5b9739552c - stable/12 - morse.6: Mention to standards in the 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3c5b9739552c9e2afdbfb015db2288bfa9dc2199 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=3c5b9739552c9e2afdbfb015db2288bfa9dc2199 commit 3c5b9739552c9e2afdbfb015db2288bfa9dc2199 Author: Gordon Bergling AuthorDate: 2023-04-16 09:46:09 +0000 Commit: Gordon Bergling CommitDate: 2023-04-21 04:46:49 +0000 morse.6: Mention to standards in the SEE ALSO section Mention ITU-T Recommendation F.1 and ITU-R M.1677-1 in the SEE ALSO section. Obtained from: OpenBSD (cherry picked from commit 82a036d86acaac75b1ff6d4f8b767bbb117694f1) --- usr.bin/morse/morse.6 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/usr.bin/morse/morse.6 b/usr.bin/morse/morse.6 index bf339563589b..d2ce30eddb82 100644 --- a/usr.bin/morse/morse.6 +++ b/usr.bin/morse/morse.6 @@ -29,7 +29,7 @@ .\" @(#)bcd.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd January 5, 2018 +.Dd April 16, 2023 .Dt MORSE 6 .Os .Sh NAME @@ -178,6 +178,17 @@ device file .El .Sh SEE ALSO .Xr speaker 4 +.Rs +.%I ITU-T Recommendation F.1 +.%R "Operational provisions for the international public telegram service" +.%O Division B, I. Morse code +.Re +.Rs +.%I ITU-R M.1677-1 +.%R International Morse code +.%D 2009 +.%U https://www.itu.int/rec/R-REC-M.1677-1-200910-I/ +.Re .Sh HISTORY Sound support for .Nm @@ -191,7 +202,7 @@ Ability to key an external device added by Farnsworth support for .Nm added by -.An Stephen Cravey (N5UUU). +.An Stephen Cravey (N5UUU) . .Sh BUGS Only understands a few European characters (German and French), From nobody Fri Apr 21 04:47: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 4Q2hp265MTz475PG; Fri, 21 Apr 2023 04:47: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 4Q2hp24jdCz4LdJ; Fri, 21 Apr 2023 04:47:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fsh6WmdLldvIDTWLmvfOUL1+Mvn3bqqt3S0gKYF/71U=; b=QkJslvcS4ZyhcT3FCxfRj01p0IIHmnkVy7beBckwed79kK/CnnAg3rpFtxbLhi074bEQ1Q mSdiRCfxA96Kj7SVM/YYwqv5N5fjOKDdEwREUoMRnfmHBAS+Oerx3nxgTA+rE963J+JX6J 3rXkUyXxbdWPHt4BICfQV/Wclk/JGo0Z6PuZnpqaA9BQ8sMjQuc4aAqJ0MyGo2nMCUIrEg zPrGzejYNDYNicjaI3JtCntQTuRCI3FsDSDnnklSH9fMP1pCpMbtUxU8cpBBZ4v0dgGurz SvpyJ9ZQLBnwmF2qWUVNEj0wNjmaF8+X7HBk/XVVU4TJHV523xn0fR73TYFWgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682052426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fsh6WmdLldvIDTWLmvfOUL1+Mvn3bqqt3S0gKYF/71U=; b=cVDgDXHaasyhuWmVewppjG8zkZCodutOLY6wJ2AyyFzKXTdks6BvbXTCWI36NYFwl4xWkv XxHlosjgf5B4QgEBFiIaOwBn98TQBd2pFBdrjGfCVF4Oz3QY/ye+n1eubKYO9ZI4ZQjFDV zofPgDytOYPqnsu9yNGwZdhhOhjLtSU22gM8E+/FBZ9m8VzPSvWl6VI5T579athcF+dG3H YqxZRv9ivxL9M0iBZm9dUvju1U4xyYhQuCo1eNfwJzRKX/nQQ5JVpONdh2+amCmJ1gwUjn /Zh6oApLIuNJbrlvCs+XmW43jNXAtBzg4No3A09Bwx4iZ1G/9FBKlvpVaBQmcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682052426; a=rsa-sha256; cv=none; b=w/CrBlmhd1Moo2/kCdFQwoTyhJ/x47chrD8nTrHGonhbLMpA0i00qTSt4p6+YQydUjYczc vgXxEtf6Q42eW0U6n0p6FO36ta2nMcNWs+Mv9xRuRj3HMbTagLZdyQPwYzgGWYga20hYBT NdM8TuBVm5+BiuvlyoBaJklBjyi+uJ3XZ0/lzfPM4o5iXkQx/iEBCSZqbUyvpl2QJDfWMk IA1c0S0DqaslAm78l0hNRUnCRiJlkirh7TfexpQS9wmvWNiZrKmU5utKmU1cdOvc6Hdy2j KPklSr6hxesn9xlsxAAF7fBUjc/H1sdClodyTviEZcD/n/ktz8qrmvbz3j1yiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2hp23SyNz16NX; Fri, 21 Apr 2023 04:47: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 33L4l6MK082262; Fri, 21 Apr 2023 04:47:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L4l6Nc082261; Fri, 21 Apr 2023 04:47:06 GMT (envelope-from git) Date: Fri, 21 Apr 2023 04:47:06 GMT Message-Id: <202304210447.33L4l6Nc082261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: b5a5ddaa4c2e - stable/12 - grdc.6: Add an ENVIRONMENT section List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b5a5ddaa4c2e6c2d813e1662df4b2f8ac941c61e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=b5a5ddaa4c2e6c2d813e1662df4b2f8ac941c61e commit b5a5ddaa4c2e6c2d813e1662df4b2f8ac941c61e Author: Gordon Bergling AuthorDate: 2023-04-16 09:17:06 +0000 Commit: Gordon Bergling CommitDate: 2023-04-21 04:46:56 +0000 grdc.6: Add an ENVIRONMENT section - Add an ENVIRONMENT section Obtained from: OpenBSD (cherry picked from commit 991360ba49707b84889e5bfce49dfbf383088171) --- usr.bin/grdc/grdc.6 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.bin/grdc/grdc.6 b/usr.bin/grdc/grdc.6 index 5226a6b2a9c7..269b8984ec3e 100644 --- a/usr.bin/grdc/grdc.6 +++ b/usr.bin/grdc/grdc.6 @@ -26,6 +26,18 @@ The optional flag tells grdc to output the time in a 12-hour format. In this curses mode implementation, the scrolling option has trouble keeping up. +.Sh ENVIRONMENT +.Bl -tag -width Ds +.It Ev TZ +The time zone to use for displaying the time. +It is normally specified as a pathname relative to +.Pa /usr/share/zoneinfo , +though see +.Xr tzset 3 +for more information. +If this variable is not set, the time zone is determined based on +.Pa /etc/localtime . +.El .Sh AUTHORS .An -nosplit .An Amos Shapir , From nobody Fri Apr 21 05:01: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 4Q2j6Y4YV4z476Vc; Fri, 21 Apr 2023 05:01: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 4Q2j6Y42Wtz3HNf; Fri, 21 Apr 2023 05:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682053285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ITVCGDDpcTdQC7B2Qojq9j6P5ea7jsqXgqtu0GwnfLc=; b=pSnA6gmuqdBVkTkHFIbMyG8SpDSobzcF6q7NB4dq+iCLRK8lu92uBC9P9/Q41XBm17AXC5 wjka8B9L+cNqUYcAXbWiUd/MWGjrL2l6h9nF+7cxw3Zx9JtkoaS1Hw4ivicWs0grO3SYWb tYE1Sv4WfE2ZBwS+0TzfvCXLYVbae1fbgfgyVmxCgTsRGw31pHjkXtY73I/aVidxHiypn1 /Mm6NENWyyrdojavXFhxVwzFikGroM1Qmasd1Q7KO1Yj8Or8n/A3550otyiM54esJserJV kzEE9QP68SNmHsu86P/03rs/H1z6VTVGLl7EBdn/6KSCj3z74SZ9o9UE3J9+hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682053285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ITVCGDDpcTdQC7B2Qojq9j6P5ea7jsqXgqtu0GwnfLc=; b=LG/lGs7Gm7jrTz3zGguqAL0yBMlUZTpCKSj/dIEh4xA6LdzBhRLEquC/Ycqm7x/X7LogBL zC69ZHirCxsXHKsAnlqMuGK9LucIpeheQFBYeMjk/5rpQc2gP7dCQr2yHdAbmbfhN7Z7J2 0Z/xKL20JT0aAgzpcJhXYwxZduBaJ+VCy0bFflTNxu354Cc2Mt/eLNdBW+P99V/eYxlb6Q uxsTgGKnzci81t7mmsiG5qkiyRjraYLBjXlPaxWMZt7h63kmPgOS2/5QkgAYqRptSotI9A b0x51Gdejcxh0EeEhEKWCdzj2aZw2kPoTOKLUp+eD+jGDVu6byEsO9Zo8xgIIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682053285; a=rsa-sha256; cv=none; b=kRW0BrLJOMaT27U5W1SfA0GRzVk7OuKmFicwgMzEY6umXSf7BXGzKVmla0Y6zpYO+ItbkT eIrJDedgqxwQ0g49jl/PaIzJdC2Ulej0pzUxnDWqbK7eWxYTen9q6J807izyDVBtVJZVJw 0Rp5WqRLIcXTCbBwhtS7GRYM2H02TdJgxAqRyRaDWDOkPUfe2ZI04I4c84xSr+L87b92mB c7JkD4fd9nr/hlbplt5ERIs0uDP86FM8mb83ybGWA2n4pcEahN0h2PGXUKI1Boz3a3A3kp K+sdiCqnnmKd5quU0OsHi5IqVXa2Yvb0Vo9kv6z0Ide2MMyJdhfJprlok3kmcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2j6Y35DFz16RR; Fri, 21 Apr 2023 05:01: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 33L51PNd011708; Fri, 21 Apr 2023 05:01:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L51PBT011707; Fri, 21 Apr 2023 05:01:25 GMT (envelope-from git) Date: Fri, 21 Apr 2023 05:01:25 GMT Message-Id: <202304210501.33L51PBT011707@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: 0c3627f44d49 - main - bsdinstall avoid subdir depending on parent List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 0c3627f44d49b460d5b9156145dec9d4a91beb2c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0c3627f44d49b460d5b9156145dec9d4a91beb2c commit 0c3627f44d49b460d5b9156145dec9d4a91beb2c Author: Simon J. Gerraty AuthorDate: 2023-04-21 05:00:40 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-21 05:00:40 +0000 bsdinstall avoid subdir depending on parent When not doing tree walks, it is bad for sub-dirs to depend on parents. Move the generation of opt_osname.h to distextract and have others that need that depend on it. In usr.sbin/bsdinstall use SUBDIR_DEPEND_ so tree walking still works. Reviewed by: obrien Differential Revision: https://reviews.freebsd.org/D39742 --- usr.sbin/bsdinstall/Makefile | 9 ++------- usr.sbin/bsdinstall/distextract/Makefile | 11 ++++++++++- usr.sbin/bsdinstall/distfetch/Makefile | 2 +- usr.sbin/bsdinstall/partedit/Makefile | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index e71cae726536..aaa006694222 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -3,19 +3,14 @@ OSNAME?= FreeBSD SUBDIR= distextract distfetch partedit runconsoles scripts SUBDIR_PARALLEL= +SUBDIR_DEPEND_distfetch = distextract +SUBDIR_DEPEND_partedit = distextract SCRIPTS= bsdinstall MAN= bsdinstall.8 PACKAGE= bsdinstall -GENHDRS= opt_osname.h -SRCS+= ${GENHDRS} -CLEANFILES+= ${GENHDRS} SCRIPTS+= startbsdinstall SCRIPTSDIR_startbsdinstall= ${LIBEXECDIR}/bsdinstall -opt_osname.h: .PHONY - if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then \ - echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ - fi .include diff --git a/usr.sbin/bsdinstall/distextract/Makefile b/usr.sbin/bsdinstall/distextract/Makefile index 6ae9bb65e8fb..0292c01e78f4 100644 --- a/usr.sbin/bsdinstall/distextract/Makefile +++ b/usr.sbin/bsdinstall/distextract/Makefile @@ -2,9 +2,18 @@ BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distextract -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I. LIBADD= archive bsddialog m +SRCS= distextract.c MAN= +GENHDRS= opt_osname.h +SRCS+= ${GENHDRS} +CLEANFILES+= ${GENHDRS} + +opt_osname.h: .PHONY + if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then \ + echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ + fi .include diff --git a/usr.sbin/bsdinstall/distfetch/Makefile b/usr.sbin/bsdinstall/distfetch/Makefile index 0104df0e3aec..1555719dd15d 100644 --- a/usr.sbin/bsdinstall/distfetch/Makefile +++ b/usr.sbin/bsdinstall/distfetch/Makefile @@ -2,7 +2,7 @@ BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distfetch -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/../distextract LIBADD= fetch bsddialog MAN= diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile index 96c4ddb53961..df17028eab2a 100644 --- a/usr.sbin/bsdinstall/partedit/Makefile +++ b/usr.sbin/bsdinstall/partedit/Makefile @@ -5,7 +5,7 @@ PROG= partedit LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ ${BINDIR}/partedit ${BINDIR}/scriptedpart SYMLINKS= ../libexec/bsdinstall/partedit /usr/sbin/sade -CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. +CFLAGS+= -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/../distextract LIBADD+= geom util bsddialog PARTEDIT_ARCH= ${MACHINE} From nobody Fri Apr 21 05:14: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 4Q2jPV2pcxz4771G for ; Fri, 21 Apr 2023 05:14:22 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 4Q2jPV19Nhz3pjZ for ; Fri, 21 Apr 2023 05:14:22 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-3f193ca059bso679715e9.3 for ; Thu, 20 Apr 2023 22:14:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682054060; x=1684646060; 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=2zhPtCjxNX8cbyYreW86PRgFlX+CNQj6DU7h3IMkpaY=; b=jtFAqrv0zFQ06Dc4VYA2MHS/kva4dBC4gVoGeJ60WDNFESVuDk4iNxGILB6PBQidMO xyOML1dAj3/vbWQLhqUA9CChNg7x2/HKt3HEmmBMmi+1Dbvdo4o+kz+EDiE3fgIlvZ6L 46gNoklw52LrepWqCZjJ/J0Qao4H20y9kn5z8MCvlmObkF2Gt1RXLs04QRgK0UurIJoJ fBtqIJXV+dP/R5CkzX2sMsSjGtmH7e+LKsJ+cnXnA8SZrs2IN/ctIIE4fx0oQeVrk/Ka fOezAhG22qRP4DYl2tK7Ufn7Fkq4q1jEhxZUgjZOX/7hthcWECRR0U06WJxWMm7OCGPn YuSQ== X-Gm-Message-State: AAQBX9elohNDwd4YXnkiuk7aqlfdijuwsKPdZXPez8+auCmmYd7XLSU2 gWrBDn+vVkfb5n2pBR0djNj41uvAWQ4VPMY/6d+YOw== X-Google-Smtp-Source: AKy350aI4lgZDDpkA7mjfmlfZN/3CSm55ZzuFMVRTXQW0eYJOp5xjtrHp7gCDj2WB8e0j9o/uoqM1A== X-Received: by 2002:a1c:7c03:0:b0:3f1:72ec:4020 with SMTP id x3-20020a1c7c03000000b003f172ec4020mr803768wmc.1.1682054060555; Thu, 20 Apr 2023 22:14:20 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id g9-20020a05600c000900b003f0aa490336sm7076890wmc.26.2023.04.20.22.14.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Apr 2023 22:14:20 -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 \(3696.120.41.1.1\)) Subject: Re: git: 0c3627f44d49 - main - bsdinstall avoid subdir depending on parent From: Jessica Clarke In-Reply-To: <202304210501.33L51PBT011707@gitrepo.freebsd.org> Date: Fri, 21 Apr 2023 06:14:19 +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: <09DDC25F-63F8-440A-A674-31F190C087B4@freebsd.org> References: <202304210501.33L51PBT011707@gitrepo.freebsd.org> To: "Simon J. Gerraty" X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q2jPV19Nhz3pjZ 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 21 Apr 2023, at 06:01, Simon J. Gerraty wrote: >=20 > The branch main has been updated by sjg: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D0c3627f44d49b460d5b9156145dec9d4= a91beb2c >=20 > commit 0c3627f44d49b460d5b9156145dec9d4a91beb2c > Author: Simon J. Gerraty > AuthorDate: 2023-04-21 05:00:40 +0000 > Commit: Simon J. Gerraty > CommitDate: 2023-04-21 05:00:40 +0000 >=20 > bsdinstall avoid subdir depending on parent >=20 > When not doing tree walks, it is bad for sub-dirs to depend on > parents. Move the generation of opt_osname.h to distextract > and have others that need that depend on it. >=20 > In usr.sbin/bsdinstall use SUBDIR_DEPEND_ so tree walking still = works. >=20 > Reviewed by: obrien > Differential Revision: https://reviews.freebsd.org/D39742 > --- > usr.sbin/bsdinstall/Makefile | 9 ++------- > usr.sbin/bsdinstall/distextract/Makefile | 11 ++++++++++- > usr.sbin/bsdinstall/distfetch/Makefile | 2 +- > usr.sbin/bsdinstall/partedit/Makefile | 2 +- > 4 files changed, 14 insertions(+), 10 deletions(-) >=20 > diff --git a/usr.sbin/bsdinstall/Makefile = b/usr.sbin/bsdinstall/Makefile > index e71cae726536..aaa006694222 100644 > --- a/usr.sbin/bsdinstall/Makefile > +++ b/usr.sbin/bsdinstall/Makefile > @@ -3,19 +3,14 @@ > OSNAME?=3D FreeBSD > SUBDIR=3D distextract distfetch partedit runconsoles scripts > SUBDIR_PARALLEL=3D > +SUBDIR_DEPEND_distfetch =3D distextract > +SUBDIR_DEPEND_partedit =3D distextract > SCRIPTS=3D bsdinstall > MAN=3D bsdinstall.8 > PACKAGE=3D bsdinstall > -GENHDRS=3D opt_osname.h > -SRCS+=3D ${GENHDRS} > -CLEANFILES+=3D ${GENHDRS} >=20 > SCRIPTS+=3D startbsdinstall > SCRIPTSDIR_startbsdinstall=3D ${LIBEXECDIR}/bsdinstall >=20 > -opt_osname.h: .PHONY > - if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then = \ > - echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ > - fi >=20 > .include > diff --git a/usr.sbin/bsdinstall/distextract/Makefile = b/usr.sbin/bsdinstall/distextract/Makefile > index 6ae9bb65e8fb..0292c01e78f4 100644 > --- a/usr.sbin/bsdinstall/distextract/Makefile > +++ b/usr.sbin/bsdinstall/distextract/Makefile > @@ -2,9 +2,18 @@ >=20 > BINDIR=3D ${LIBEXECDIR}/bsdinstall > PROG=3D distextract > -CFLAGS+=3D -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. > +CFLAGS+=3D -I${SRCTOP}/contrib/bsddialog/lib -I. > LIBADD=3D archive bsddialog m > +SRCS=3D distextract.c >=20 > MAN=3D > +GENHDRS=3D opt_osname.h > +SRCS+=3D ${GENHDRS} > +CLEANFILES+=3D ${GENHDRS} > + > +opt_osname.h: .PHONY > + if ! grep -q "^#define OSNAME \"${OSNAME}\"$"" ${.TARGET}; then = \ > + echo "#define OSNAME \"${OSNAME}\"" > ${.TARGET}; \ > + fi >=20 > .include > diff --git a/usr.sbin/bsdinstall/distfetch/Makefile = b/usr.sbin/bsdinstall/distfetch/Makefile > index 0104df0e3aec..1555719dd15d 100644 > --- a/usr.sbin/bsdinstall/distfetch/Makefile > +++ b/usr.sbin/bsdinstall/distfetch/Makefile > @@ -2,7 +2,7 @@ >=20 > BINDIR=3D ${LIBEXECDIR}/bsdinstall > PROG=3D distfetch > -CFLAGS+=3D -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. > +CFLAGS+=3D -I${SRCTOP}/contrib/bsddialog/lib = -I${.OBJDIR}/../distextract > LIBADD=3D fetch bsddialog >=20 > MAN=3D > diff --git a/usr.sbin/bsdinstall/partedit/Makefile = b/usr.sbin/bsdinstall/partedit/Makefile > index 96c4ddb53961..df17028eab2a 100644 > --- a/usr.sbin/bsdinstall/partedit/Makefile > +++ b/usr.sbin/bsdinstall/partedit/Makefile > @@ -5,7 +5,7 @@ PROG=3D partedit > LINKS=3D ${BINDIR}/partedit ${BINDIR}/autopart \ > ${BINDIR}/partedit ${BINDIR}/scriptedpart > SYMLINKS=3D ../libexec/bsdinstall/partedit /usr/sbin/sade > -CFLAGS+=3D -I${SRCTOP}/contrib/bsddialog/lib -I${.OBJDIR}/.. > +CFLAGS+=3D -I${SRCTOP}/contrib/bsddialog/lib = -I${.OBJDIR}/../distextract Surely this is a sign that this is a worse solution? The header isn=E2=80=99= t a part of distextract any more than partedit, so this is entirely arbitrary. It also blocks the ability to do the subdirectories in parallel with each other. I would much rather this reverted; this feels like a regression to me, with the only justification being that it =E2=80=9Cis bad=E2=80=9D, = according to your commit message, but so is this, and I would argue it=E2=80=99s worse. Or go put it in its own common directory. Jess > LIBADD+=3D geom util bsddialog >=20 > PARTEDIT_ARCH=3D ${MACHINE} From nobody Fri Apr 21 05:39: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 4Q2jyZ5b9Yz478Kk; Fri, 21 Apr 2023 05:39: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 4Q2jyZ58B7z3Llw; Fri, 21 Apr 2023 05:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682055574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mOI14kVXILVGfEAehqEUnRp8Wjmb2n2HodiZtFXlNco=; b=s5zlFd8mL7N5qSidR9NZiDDkXVFTCN0ja67fOiF8lexAdORHPxEjWrhdfcmCus9mz7AA2v hOI/k1gioWW+0WDtlxfPH0oNuRx4XszDxWlsW9ROOm6FLFLoBaKk1WRa1mx6/3OLpLYjpk rLX/4QNDxwPgxzigdOt6BRsPJYWqZnwZ4C+C9RUGsPVTWSsGTf6XEL8WYBgt0ICg273Nfw qeEW28t3YLPMV2rdfFHY1V7bSqXMrUfSkXZzFNb8xAomMfX3zveHJB9a7QfTnBZh8JXG/R VMzctREljnTgXHOv2YU1PcMUkqU2Avg+4L2vVoumKWJGuhtRV6XRJCJ+n4QWtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682055574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mOI14kVXILVGfEAehqEUnRp8Wjmb2n2HodiZtFXlNco=; b=PgU/udXnnZOF8r2TwuexwgM1CovaB0Ei3ZYjg5LDJeIi+dPaSCI2oNatQIZMnB4W/DfBH7 3Z+HuKFTqMElcHByhHUN2flD5glxZJrc4Vc1XPKU9yiQ3zWXHng+vxejXz9OKjEIcN0Oc8 3CyPdiA3gxjxntd8eXUriUZaq0QziX97s8L6yIDfOA4KGA0RdpqJIgFrf0dmcJZbJsX4ng yUMfBksU3+glSl+T1iKX83lGnCLowl6w+3mODi2IHBp9ALlI7T2kGb+QygTHAFX/bOhwak e2ziQphpjv28KS7Wyuh0JG0BFBXPohuPI9N2JtD+5sYKbvqfLBj7Fw3Jm9lALg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682055574; a=rsa-sha256; cv=none; b=FSeqFYmaFCTkRd1F1lGFWKVe5EegEPerxFOdxFAAotqTGDBfTzDv+5myHBDv554Exjtzca d1Ulvz3p1UXEDwRkHE7ZJxF0BxSNG+eA40nUaCEfDNIgI8yXB7goPm5UUoUor3wRA+ZD5y q0KsP6bG+b+Cwdy+hvwmZqblMLaQWhAyBY0jf0GZ1jxmB/UkLCobqewCP40QFZZGUURQCM 7uLLcdOWzrBIwpEGQxdvegXaAkiDRxKlxkb1/g9/fmNPuL90Ul2zMYqbox4sTmUbbuX1y1 hLt0DljiPJ7jBQqm9A4czvD5jZ734L6SYZdeI75ZMs8eySOkL2P2PsT7vA/Ldg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2jyZ4FBbz17bc; Fri, 21 Apr 2023 05:39: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 33L5dYOS064995; Fri, 21 Apr 2023 05:39:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L5dYmB064994; Fri, 21 Apr 2023 05:39:34 GMT (envelope-from git) Date: Fri, 21 Apr 2023 05:39:34 GMT Message-Id: <202304210539.33L5dYmB064994@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: 8fc68c1b34ae - main - Remove stray line List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 8fc68c1b34ae11af78c3d8a32f58ff1497fe14a5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fc68c1b34ae11af78c3d8a32f58ff1497fe14a5 commit 8fc68c1b34ae11af78c3d8a32f58ff1497fe14a5 Author: Warner Losh AuthorDate: 2023-04-21 05:04:40 +0000 Commit: Warner Losh CommitDate: 2023-04-21 05:39:23 +0000 Remove stray line Forgot to remove this in 559b94a12257. Fixes: 559b94a12257 Sponsored by: Netflix --- sys/i386/linux/syscalls.master | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 96b74e1cc649..9431143f7336 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -40,8 +40,6 @@ ; Isn't pretty, but there seems to be no other way to trap nosys #define nosys linux_nosys -; #ifdef's, etc. may be included, and are copied to the output files. - 0 AUE_NULL UNIMPL setup 1 AUE_EXIT STD { void linux_exit( From nobody Fri Apr 21 05:39: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 4Q2jyc1GyPz4788K; Fri, 21 Apr 2023 05:39: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 4Q2jyb6mlqz3LmY; Fri, 21 Apr 2023 05:39:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682055576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0EU6r2yHcLkYNUy9kbvic5uAtUW4n53VOh6NQNXGPOs=; b=mT8WkuoEK3Plfu0TRqc/hA5yAx7CBxnjs3Oa+UfAnTKjudgJAlsYMNuo7vUPJA2cV0rxP7 ns7MExYTaFkoBWx6U/+tIAkUYq43awJkR0TsqqLPD8naDrFHtMoT/KpVQ05fvZFE4zF15t pcV6h+kD6/jhVxS8YQh2FlhFcoH5/VK1AumSPYce2RCcorkTtVluj67URZCTDSe8lnv3Qg /KPBklShIvDAZPQG6vL0/RDDYWR7eU20KZaEVdXis7JYxkju+JeMrAj/0MoEiEirFTEPr4 5D1F346ZzOazVQ7xIk3w1GGrFR5vlsDYHlUjbcar6dznTWTVMe4Oc4pYQXPAtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682055576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0EU6r2yHcLkYNUy9kbvic5uAtUW4n53VOh6NQNXGPOs=; b=izb+1SCSiGdiJShCvoRfTM7+y3TclzGVEa5km1qK/Sg5U9BqEaYEU5usDbBlTa5bzrAHzQ HObRQWMnHh5eofHnfDD3MhqE8emSfZV9BPZrp0t8tArpwYEQmzjyrAMGwdQhkLgiDKF3a9 sefQ9wvz06IAUrFQJ6rvRkQiIInRyMB5onOBOVyy973O0izXuyfmiYPznRMoNy/GwyQ3n4 CgLxA+fbIuPIH77KuEZeZTSMpgy3HF+xxO2iZlemK8uZeNa+39PEwuu4vhlNL+PD0RIhq0 L+RMNV1kSCrGSpCybjHKNFL4MGx+v/ojKmjd781Sj/ycpfL/QSV/O4d9XEZqsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682055576; a=rsa-sha256; cv=none; b=lIXrM1ogtLfl585Wiy2nb5KmBv38iahTG4hpMEt2jVIPam5exK680iOlmfJxXpbtztl+PX g1teoBWFpD5nNc2k2d6X7KfeMySLa+pCOyOYKduU+Y80PlNS0A9Mvtrw0s+jlr/eguahGi ZrBBK0dfX12BiketZyi6q3+2dwvPcma+r9pAHPzt+7Khxx9Nl398Coy7wK8S/A3GWfANKW JHP57dqjPneyNQjtbJMUTsTdUG8d7WtZQFTKqlisZWiF1u7wrBCyzOAHx7Pyj/e8OL3Rh/ 1+wM19IeCMh7PmR4K2ktCCutxh2cPDZCzr286btrDPAjVfsb7+PFFBwBO7AUcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2jyb58gWz17WW; Fri, 21 Apr 2023 05:39: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 33L5dZAg065019; Fri, 21 Apr 2023 05:39:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L5dZ4K065018; Fri, 21 Apr 2023 05:39:35 GMT (envelope-from git) Date: Fri, 21 Apr 2023 05:39:35 GMT Message-Id: <202304210539.33L5dZ4K065018@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: 602b575a88ed - main - syscall.master: Remove stray 4.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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 602b575a88ed4ce12358837daa4d0608a08e03c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=602b575a88ed4ce12358837daa4d0608a08e03c0 commit 602b575a88ed4ce12358837daa4d0608a08e03c0 Author: Warner Losh AuthorDate: 2023-04-21 05:05:30 +0000 Commit: Warner Losh CommitDate: 2023-04-21 05:39:23 +0000 syscall.master: Remove stray 4.2 Back in 4.3BSD, the system call table wasn't generated, and there was an entry: "4.2 sigreturn", /* 139 = old 4.2 sigreturn */ This got converted to 139 OBSOL 0 4.2 sigreturn in 4.3 RENO. Since it was obsolete, nothing bad happened. In fact, there was code in makeyscalls.sh to cope: { comment = $4 for (i = 5; i <= NF; i++) comment = comment " " $i if (NF < 5) $5 = $4 } so the generated comment in syscalls.c was almost correct: "obs_4.2", /* 139 = obsolete 4.2 sigreturn */ a bug that we have to this very day, despite makesyscalls.sh being rewritten in lua. However, this historical wart is the only place in our current syscalls.master file where we have an extra field for the 'not generated' class of system calls. Remove the historical wart so that the re-write of makesyscalls.lua can be simpler (so, I hope, qemu's bsd-user can large swathes of code automatically generated too). This should help make things more understandable (changes to simplify makesyscalls.lue aren't quite debugged, so have to wait for another day). There's 3 different obsolete sigreturns (but only 1 that was ever in FreeBSD 2.x and newer). Sponsored by: Netflix --- sys/kern/syscalls.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index af2f4194e2c5..c3e2a0343fde 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -917,7 +917,7 @@ _In_ _Contains_long_timet_ const struct timeval *tptr ); } -139 AUE_NULL OBSOL 4.2 sigreturn +139 AUE_NULL OBSOL sigreturn 140 AUE_ADJTIME STD { int adjtime( _In_ _Contains_long_timet_ const struct timeval *delta, From nobody Fri Apr 21 05:39: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 4Q2jyd0cVWz4783q; Fri, 21 Apr 2023 05:39: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 4Q2jyc6y3Nz3Lxc; Fri, 21 Apr 2023 05:39:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682055577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fIxTNp90pVTlNphRXavZBweFFTch/yFBpsYpeSV2vM4=; b=beE3MIWDe75Pi1TOnjA8v6IGoSf6i740S+29Grp6RLb+OHbe9/JC/yfrk+it341F1YraVf KraH1mw4nGKbVuSBMCC78EWx9WLL+7ab0/6KhkGgyKoVR48/lJKkhDGh7b2+hFwgYw1g79 davKsEtoG83HqnXil208KyG8OWrY30ZWygnVz80+TeC0mVDo1B/OqK5YgKSIbiPRPI5E3n WD8ZhG5Ocia0Hqjzn551rbJfnClzTpqDSpEZrOzwMxdAYRZ3YhuOAku6D3xelxJdpK0HX0 mn8d8VA0wf9cb/9xGrrwW0u1lbrkHyq5iCXXKU2oD6kMKgAJCsoLybK7iqElLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682055577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fIxTNp90pVTlNphRXavZBweFFTch/yFBpsYpeSV2vM4=; b=kaSME9SuwgnbGBk0xZEXMmc6iCUQWK8Tl8osBqHWB3tk2CIFQTGEkTYXLCQxRRgCdDLLgc 9ElvTXLMj8FopdAnuaVsHOVNFGwu585CXgPKavgfd+ydEQS1OFtSy5yR7TZ4ue+B6pzHoR eXD2JEdk9fCdee32g2Iv5x7CcQpM7aQT0eEGgk7+KknvL+VZxCbpcMzSctnahTQygX5+0M uBNmm3iLUeN5m5ExJlsOFGaYNB3AFg6kMkJ2UL2Mnx8h6TXxj3Zq/F6inl7xc6q6fQhE2d ue+835+mUiAdm69kTW/OgVagEkYcEgVeUpay8AbMmlT0g8aSaMuSX6IcHFwlOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682055577; a=rsa-sha256; cv=none; b=KXvxxMzrUkEVYmy4vIKhas15yoQS/c7ahprHwL0jmfJYkcA5NuX6Q2JjgTJWQMB8vqG7+9 f1OKBViW/hea5TqgYaSqfhJnYcQS0ftWbzGtjnm3BK7dOPgseFcXw0k/Ap+pvAnOU9ay7F 6ECQ5R7E2061jCdH84/A4v9LY7Xvj3TBGaac70IN2JLWs8BuFN3tW91T2VK4beiUpkMYKN TgD9bcWpLiGAAwzZTeJ1YHRoOcxXwkAvnAmA92Z02Mc3EPbFjmiBWsdmOZk4EbNv59P74I smBKUg5gGfd5E8oRYDn/j1444gyAwIPtKR5a7WyePNm8S+KxuefQYj6Pq+VMmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2jyc5lpzz17HV; Fri, 21 Apr 2023 05:39: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 33L5da0B065038; Fri, 21 Apr 2023 05:39:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L5dagY065037; Fri, 21 Apr 2023 05:39:36 GMT (envelope-from git) Date: Fri, 21 Apr 2023 05:39:36 GMT Message-Id: <202304210539.33L5dagY065037@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: 9abba78acc2a - main - syscalls: regenerate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9abba78acc2a657f65935352b25b56cb8fe89d03 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9abba78acc2a657f65935352b25b56cb8fe89d03 commit 9abba78acc2a657f65935352b25b56cb8fe89d03 Author: Warner Losh AuthorDate: 2023-04-21 05:28:59 +0000 Commit: Warner Losh CommitDate: 2023-04-21 05:39:23 +0000 syscalls: regenerate The 4.2 sigreturn was a bit of a enima so the 4.2 was remove. Regenerate to cope the very minor changes in comments and one string. Sponsored by: Netflix --- sys/kern/init_sysent.c | 2 +- sys/kern/syscalls.c | 2 +- sys/sys/syscall.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index b7709bbc9fcb..5c7bf120226e 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -200,7 +200,7 @@ struct sysent sysent[] = { { .sy_narg = AS(mkdir_args), .sy_call = (sy_call_t *)sys_mkdir, .sy_auevent = AUE_MKDIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 136 = mkdir */ { .sy_narg = AS(rmdir_args), .sy_call = (sy_call_t *)sys_rmdir, .sy_auevent = AUE_RMDIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 137 = rmdir */ { .sy_narg = AS(utimes_args), .sy_call = (sy_call_t *)sys_utimes, .sy_auevent = AUE_UTIMES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 138 = utimes */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 139 = obsolete 4.2 sigreturn */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 139 = obsolete sigreturn */ { .sy_narg = AS(adjtime_args), .sy_call = (sy_call_t *)sys_adjtime, .sy_auevent = AUE_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 140 = adjtime */ { compat(AS(ogetpeername_args),getpeername), .sy_auevent = AUE_GETPEERNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 141 = old getpeername */ { compat(0,gethostid), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 142 = old gethostid */ diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index bf6281ad38ae..14ac1da10c82 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -145,7 +145,7 @@ const char *syscallnames[] = { "mkdir", /* 136 = mkdir */ "rmdir", /* 137 = rmdir */ "utimes", /* 138 = utimes */ - "obs_4.2", /* 139 = obsolete 4.2 sigreturn */ + "obs_sigreturn", /* 139 = obsolete sigreturn */ "adjtime", /* 140 = adjtime */ "compat.getpeername", /* 141 = old getpeername */ "compat.gethostid", /* 142 = old gethostid */ diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 0e725febf183..c8c369afbc28 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -141,7 +141,7 @@ #define SYS_mkdir 136 #define SYS_rmdir 137 #define SYS_utimes 138 - /* 139 is obsolete 4.2 sigreturn */ + /* 139 is obsolete sigreturn */ #define SYS_adjtime 140 /* 141 is old getpeername */ /* 142 is old gethostid */ From nobody Fri Apr 21 07:58: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 4Q2n2X094lz4644s; Fri, 21 Apr 2023 07:58: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 4Q2n2W6Wz7z426m; Fri, 21 Apr 2023 07:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682063891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ulQsKuTzZHJWsw0FFohdpeBeENu+2zVoPYAerC3E3Lk=; b=UI+/ox/hyp7JIW+NIDqQCDHF6L8m4qRhPKnEhStlc19ycOjpCG0W7PzSNOspAUMokRuU7Y nULvTxTNovbIse55VveFx9SJRQXzx4JTr0sVA9CZzFgBx9PNy5MgUIGx+6a+MYsxZctgb7 YA3Eq3dPhm/tjbeckGAO6Gu4nZebVNaQFc1vVCQCUtmhNBFq9cKUQLzLUsy+OE4+/yBAlv qEB/Noxu4EQJtHR1FfD28lcMTpAmfqFEOXirJ5DrO34REOAJwNHXt0sEn76BGTt9ITG96r 8Qx/yaP1dAg2GBCtr6keQWdzY5lp7iScvXl6rerxCIlvmpPzxuem3xQtxChslw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682063891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ulQsKuTzZHJWsw0FFohdpeBeENu+2zVoPYAerC3E3Lk=; b=Ectq/sWVq8GBsbqsnTTQUyW/zdHKTsqz0g6UEoq4IG0pbeuhZFGKHHhA7Ys8Og6aZnsSvt wzXxFa5QwoaLmA5Ua0tsdtebnZ447LimZFBAem9KorEPWFbVkUgRFtl55C0gHqvsxH71/J Gaz1j/DXBWS8ELcPyK6ifNAm3AUFetf1TYLqEwqz7yFVv5TYGjt6SP2bYRoc6fRqb2J7bn OoHTZn1zblPTn8wjgHUSH2TC4QZAZIV0hHmVgwmjwJedLNfEAKGgSf748byHzpNviFUto4 jGGNaMjd+AYtZrJGsz/JA12B6uMTPPfOUXLJcgh5WOr7Y35r6aoY/NsdsaknKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682063891; a=rsa-sha256; cv=none; b=g4BA/C43EytYoKlrqUj02emFOTF2zX5Vt9vusOOKaV1rRzmFrRUxuq4DQQUrH4V/xQXDSF ZCHJiP+X5Hq36JvLl3CWha6hc8iviYuNTSs6KvM8kKhhBEonoi8uSycbaiayyDRDf5EXRX uo1m6uAFtxKwp7tRE/Pc7aJh1iL4RV6amV7P7QWFyJw0L+sKmfeeBs+nqc0d/3T12SYwu9 0IWb7VreYy90Or5+SETL12cvhQKpcJ5mTqGWMjrFSTSI4y5NW7EM729VqOe5qbJ6kL0aXD 4uofTrivduBOT0RVnAA7AA6hEQF3ci6icGBdNaQ+7on1XJZIecIXcKnP5c7xEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2n2W5VHxz1Bnx; Fri, 21 Apr 2023 07:58: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 33L7wBuQ094160; Fri, 21 Apr 2023 07:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L7wBLf094159; Fri, 21 Apr 2023 07:58:11 GMT (envelope-from git) Date: Fri, 21 Apr 2023 07:58:11 GMT Message-Id: <202304210758.33L7wBLf094159@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 3f686532c9b4 - main - linuxkpi: Fix __sg_alloc_table_from_pages loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f686532c9b4fd603d4ad2d3392232cff24188f4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3f686532c9b4fd603d4ad2d3392232cff24188f4 commit 3f686532c9b4fd603d4ad2d3392232cff24188f4 Author: Austin Shafer AuthorDate: 2023-04-21 07:56:50 +0000 Commit: Emmanuel Vadot CommitDate: 2023-04-21 07:56:50 +0000 linuxkpi: Fix __sg_alloc_table_from_pages loop Commit 3e0856b63fe0e375a0951e05c2ef98bb2ebd9421 updated __sg_alloc_table_from_pages to use the same API as linux, but modified the loop condition when going over the pages in a sg list. Part of the change included moving the sg_next call out of the for loop and into the body, which causes an off by one error when traversing the list. Since sg_next is called before the loop body it will skip the first element and read one past the last element. This caused panics when running PRIME with nvidia-drm as the off-by-one issue causes a NULL dereference. Reviewed by: bz, hselasky Differential Revision: https://reviews.freebsd.org/D39628 Fixes: 3e0856b63fe0 ("linuxkpi: Fix `sg_alloc_table_from_pages()` to have the same API as Linux") --- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index fe4bce06819d..b448262f3497 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -383,8 +383,6 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, unsigned long seg_size; unsigned int j; - s = sg_next(s); - len = 0; for (j = cur + 1; j < count; ++j) { len += PAGE_SIZE; @@ -398,6 +396,8 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, size -= seg_size; off = 0; cur = j; + + s = sg_next(s); } KASSERT(s != NULL, ("s is NULL after loop in __sg_alloc_table_from_pages()")); From nobody Fri Apr 21 08:02: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 4Q2n794WH6z464cX; Fri, 21 Apr 2023 08:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2n793zdkz47Rh; Fri, 21 Apr 2023 08:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682064133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s//Qv4tFBsOFq6mjoHCjfH6yjUZDgfZKhdezerJjkPs=; b=PaE+nGcxcHPEp7UWLMhe64pmvY6gN+snTWq5/UeIt4oLDnod4Ve+0mdG3v3eZ7CXwwYHxO stmTReVGHsVdlb/ec7BqdkZJWyBgLBE0tD+iay1o5hSx3yrfI95p4u4YeIq4iiMqk24PwE zXez2JwwOUTEv855SIraOkd2ObXFol28K53t5R9T2PETVYrJeOBHRTfn9uYqZ97kWn155b 2RGUQKAHhdLS7DRd/Yy3evaAvdkLpI4jsaTdR4pGdQt0Vu2LHQ4b4oNXxgEyeXc5apKk7a bRUBvYXfkLEO8IfPeknS/HKSkPdeZDtGN5Ym+UYtNK2sBy44SBTb311PTp4JdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682064133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s//Qv4tFBsOFq6mjoHCjfH6yjUZDgfZKhdezerJjkPs=; b=q4t098PFcCnRJJ++BwarRVquWidLrn08DJwRyMMTTx9lVVEMSSsTzbxQfMYDh2fmgYb9bF +bK31xEAxnoEtsaU97txGPO8+GXixQphS/uidkJWfSzo9/etbhJJzPLiaHEm4qhnxHZjD5 5vVfUjWk8qzQQ/jN5h84grqwys0npLqhvwlc4rmW1KfMipqQQe/zXgX7Hou5xv5/4YisGR Xv7h4dIs9altR3y4lCpZarrKzFgz/XVUZiPTDcCm4RMMrCOGnI3wo9Zz9qIdCPW6eCtH29 /tXmYbHKJjh1LcnojR/WrIwj6S4qKvaBilXnbbml5pXUMEp3jtC+VQcMyLI3Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682064133; a=rsa-sha256; cv=none; b=LaLsaQ2XG+XeD8v2eT5hObxPrz9lTa/Ro9J1vlPFLPxYiZsxzyBvcEEA5j/BelG3SbnFgR fawiDqKYCNZ2Cf1vVybrYewQTxZQ4U0utZRgNkIMK7sJMlA5DILpWOtSfgF7pakEl8q6FG lEsamCLM48eJcvooXs+Q8gZSQ35CLizutnVLlP68dwGNou1sfYwDL+AeB6jCuHx4h4CX9C I6SEHaX8wPWirc0gfZFjvESvXyUD0wTZRcUA21F2GxzB5l0xi+7huYq758damcA7eBEnel l6Ul14twqUWSpHmE65x3zBMd5mbQmVI3VyeYvAFYApY/fNr9eGxsmjMRq+hhQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2n7934dcz1Bb9; Fri, 21 Apr 2023 08:02: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 33L82DEA009856; Fri, 21 Apr 2023 08:02:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L82DVQ009855; Fri, 21 Apr 2023 08:02:13 GMT (envelope-from git) Date: Fri, 21 Apr 2023 08:02:13 GMT Message-Id: <202304210802.33L82DVQ009855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: ea6597c38c77 - main - mpr: fix copying of event_mask List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea6597c38c77c7bfaae71259d8636cbb89add6a3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=ea6597c38c77c7bfaae71259d8636cbb89add6a3 commit ea6597c38c77c7bfaae71259d8636cbb89add6a3 Author: Mariusz Zaborski AuthorDate: 2023-04-21 07:50:16 +0000 Commit: Mariusz Zaborski CommitDate: 2023-04-21 08:01:38 +0000 mpr: fix copying of event_mask Before the commit 6cc44223cb6717795afdac4348bbe7e2a968a07d the field event_mask was fully copied to the EventMasks field. After this commit the event_mask (uint8_t) is 4 times casted to EventMask (uint32_t). Because of that 24 bits of each event_mask array is lost. This commits brings back simple copying of field, and after words converting 32 bits field to the requested endian. I don't think we need more sophisticated method, as the array is of size 4 (for 32 bits version). Reviewed by: imp MFC after: 1 week Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D39562 --- sys/dev/mpr/mpr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 8450ef9900b0..b9996806f213 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -2764,8 +2764,9 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else + bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) - evtreq->EventMasks[i] = htole32(sc->event_mask[i]); + evtreq->EventMasks[i] = htole32(evtreq->EventMasks[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -2819,8 +2820,9 @@ mpr_reregister_events(struct mpr_softc *sc) bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else + bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) - evtreq->EventMasks[i] = htole32(sc->event_mask[i]); + evtreq->EventMasks[i] = htole32(evtreq->EventMasks[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; From nobody Fri Apr 21 08:02: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 4Q2n7B5CH7z464VN; Fri, 21 Apr 2023 08:02: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 4Q2n7B4lDXz47Xg; Fri, 21 Apr 2023 08:02:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682064134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9TU1MEA2uUKEo5KnABF+5Hwhp/VqaweYoIcRSiVBjUw=; b=P/uBtYQC7GHo1ePsp6Y4KR5FgI/ClBY+WxvaV1IQM2o7mn+0ijZynUYr1wWm0w8dQ2ymdY FAn5zLUP4/zOX2j5JAjWRtek4IM9GqdDj6HLVI239YAHGnLNz7D+pkZTUDaArIWngQdTOi aPKSaBk5jj1Jv78Pz/Ft0WR0gpMXEdS+vQBCJKyE4d5NOcfW41xWbZvDJCh8mi6eShEzwA wdQ1AtUux+UvlUfan9VCn4mpJVHRY2r7LdEEoPZWWFTCNcL6I0hB12cXCloxTx0E/u1cFh foM5FgcE6sTQ2kpLcw0Vseddot/pbijiodUuEG8gMA/+Q96OHag+VHmoYYVnWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682064134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9TU1MEA2uUKEo5KnABF+5Hwhp/VqaweYoIcRSiVBjUw=; b=DLTUI8TIkvrWMc0YqItSMhRLcJ1xpWMBwzEjuskpDWjrzs8sIqrnsnDHTZbueNUW1X+3Tr 9Y2PgeECLPzGGvtDHSFCSRJsg71mLUc1W2Vv1VUHxHvZpCxXauL9dPXDKoAPjDRtoZ+F/n Pe2Rj4rMmIGxoircmppADlWjg0mZMqhWe3JoXrQ0I775rVo9vIe4bDIL3PKgLo/efUuV7f X50Cb3lFh3yhSxL8vYeKZ/WNiQMSJecV11eAcaBDwhdTy/E3cjmjSgd9EDAt8BFLZ2+Ztu RHDN3rsXpUk7iQ/4er6q9jHL4IFX4zIV6XmDQWcgT0Q8y0rE+Wj3CGsr4Ie4Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682064134; a=rsa-sha256; cv=none; b=nDcYGHFyg+PS+5/w+kFhEXEKohp54vn2UD1UO30Bz+LKaW8v2G5g0/DmbkHkX1zom64x6V OjvUWbco+J3y+rcrAmoGSAkhT0I2rnv9LnX/h/yEvjEvL9EHrRa/N8xxuvaUu6raKazz1w uI+YUcbzpS1zu/nJLNEund54cjS5M++aZbKRQjB8xJXVKzNyUGHjuTs5SjiMkpJpeYOmXV FcfxpVlXhExlCeKP0q/EY2PtvuaS7HbvSfNXLeGy7j/LoQX6TnwlsSOdvMi5o642cFtNb4 nfp2ZBtg/hvhMIdaTp74CjMiWeJV/kqj1fBWZb5DnQhDGaKHHcWLslkz0fIaGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2n7B3p9zz1C49; Fri, 21 Apr 2023 08:02: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 33L82EhJ009875; Fri, 21 Apr 2023 08:02:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33L82E5v009874; Fri, 21 Apr 2023 08:02:14 GMT (envelope-from git) Date: Fri, 21 Apr 2023 08:02:14 GMT Message-Id: <202304210802.33L82E5v009874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 444c6615459e - main - mpr: don't use hardcoded value in debug branch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 444c6615459efe2b015deb1cffc54fcaa3ea1fca Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=444c6615459efe2b015deb1cffc54fcaa3ea1fca commit 444c6615459efe2b015deb1cffc54fcaa3ea1fca Author: Mariusz Zaborski AuthorDate: 2023-04-21 07:57:38 +0000 Commit: Mariusz Zaborski CommitDate: 2023-04-21 08:01:38 +0000 mpr: don't use hardcoded value in debug branch Pointed out by: imp Sponsored by: Klara Inc. --- sys/dev/mpr/mpr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index b9996806f213..dc95c8a6a803 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -2759,9 +2759,9 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, evtreq->SASBroadcastPrimitiveMasks = 0; #ifdef MPR_DEBUG_ALL_EVENTS { - u_char fullmask[16]; - memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + u_char fullmask[sizeof(evtreq->EventMasks)]; + memset(fullmask, 0x00, sizeof(fullmask)); + bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, sizeof(fullmask)); } #else bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); @@ -2815,9 +2815,9 @@ mpr_reregister_events(struct mpr_softc *sc) evtreq->SASBroadcastPrimitiveMasks = 0; #ifdef MPR_DEBUG_ALL_EVENTS { - u_char fullmask[16]; - memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + u_char fullmask[sizeof(evtreq->EventMasks)]; + memset(fullmask, 0x00, sizeof(fullmask)); + bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, sizeof(fullmask)); } #else bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); From nobody Fri Apr 21 08: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 4Q2nH565HWz464nN; Fri, 21 Apr 2023 08: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 4Q2nH54xsyz4Hs0; Fri, 21 Apr 2023 08: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=1682064545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/V9Q3VrtLr3Vup+EZDUVTO/z0sFOpQoT4D1RFWk8mTE=; b=xJ5SdLWzN/C9q3/WMBFjFh2FkSJRBnR+K1gHWtLZ234qm6+l0P1d6addKmT6+GPkbwLYOQ DpiVY1iJeAzCKPnRV8e3ANGxfamM5o/Bzw2m1XkHehV9yRUGDopoTv8USPRCakmkLAgJhC WLV0pPz8HkVhfsqxAG7c7hIhDkbLXFpHnIpU8mwfg49eH8osEet65PV51Z3B1misQWdeLN ZYS8jdRKkfjBXyMenS2QtuDwNimWfXZonnfU4gBkUsowpFgnBPV4AKBggVe0RY9qUFM65c 8nyytkmGw0XHV3UGhRI9nL7omWJCh3LTh8/fZgCGsqELX1lN5QfZHTe/OmjLKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682064545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/V9Q3VrtLr3Vup+EZDUVTO/z0sFOpQoT4D1RFWk8mTE=; b=UA341qfK8l8/7NFh5aOvy1hwxTiSXpmmxemAjXKEP6VXZyggnPSsRfXqJLF/Z2h1hOIIXv kMCssOXYTz/J/rsOJ//yWWbw4OoEo8S64mhfPPxirxB+hfEgH+aIfL/oREXTglUWdKA0p5 KcdGUF7YBUV5MouBfmlno0u2HqibeVxvoSe8lQ8OsElSXU1EyOjRhCyr0xE68hchPWZB8J 5VaHiIjfI8ODSal/d1w/5NWBSOw2He0rP0dGC2cqYN4LYVUmaMuuF7dh1mzXYcEZtB+aAE LE0bjmUOBhgUhGqpSlwbC2slTBPVrsLRdIBb0V790mVmZDNYesA1yWoRgIDccg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682064545; a=rsa-sha256; cv=none; b=U3s2r3P8jPgD3jnXNPByUAVvvBUZ2ptluHcSAVKJO8tfWm3oZluwSjM+2bvGEbc9MAZ8AW xDAmFTFIfDxb3F/zN5857paAs0K1NvNfrnqITsnkdgxuSYN/kcPgYfbRpmTrNNQme3iMPU guSA3ByYK9fp7zG88z53ZWvHg2cz9lY+POAZ61XOF9RHJFH1hBzylRMqJbNBt5RRHO1aBr vOh08QSL9GW1mikW9Y9ho4FkysMeZX7Mpiq8t4eNn47hVKVcBO+ki4lCYx4nLoTVJOUYjE Dy9JIQNKK6eTXEldhPfA09udnsrpG0qxBYgfMIGsAa03iC1UzSVGRLa5LtGadQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2nH53xYmz1CKy; Fri, 21 Apr 2023 08:09:05 +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 33L895sM011700; Fri, 21 Apr 2023 08: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 33L895Sk011699; Fri, 21 Apr 2023 08:09:05 GMT (envelope-from git) Date: Fri, 21 Apr 2023 08:09:05 GMT Message-Id: <202304210809.33L895Sk011699@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: 4bfffd8cf52c - main - pf.conf.5: minor improvements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4bfffd8cf52cfa5c9659416977a5740a4b4b43f2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4bfffd8cf52cfa5c9659416977a5740a4b4b43f2 commit 4bfffd8cf52cfa5c9659416977a5740a4b4b43f2 Author: Kristof Provost AuthorDate: 2023-04-21 07:16:53 +0000 Commit: Kristof Provost CommitDate: 2023-04-21 08:08:02 +0000 pf.conf.5: minor improvements * Align 'on ' parameter with the BNF, so use 'on ' * Clarify etherprotospec BNF, to make it clearer that only numbers are supported. Suggested by: Christian McDonald Sponsored by: Rubicon Communications, LLC ("Netgate") --- share/man/man5/pf.conf.5 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 8e0bb42f257a..88c509f36ff7 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 24, 2022 +.Dd April 21, 2023 .Dt PF.CONF 5 .Os .Sh NAME @@ -702,7 +702,7 @@ If a packet matches a rule which has the option set, this rule is considered the last matching rule, and evaluation of subsequent rules is skipped. -.It Ar on Aq Ar interface +.It Ar on Aq Ar ifspec This rule applies only to packets coming in on, or going out through, this particular interface or interface group. For more information on interface groups, @@ -3197,7 +3197,8 @@ route = ( "route-to" | "reply-to" | "dup-to" ) [ pooltype ] af = "inet" | "inet6" -etherprotospec = "proto" ( proto-number | "{" proto-list "}" ) +etherprotospec = "proto" ( proto-number | "{" etherproto-list "}" ) +etherproto-list = proto-number [ [ "," ] etherproto-list ] protospec = "proto" ( proto-name | proto-number | "{" proto-list "}" ) proto-list = ( proto-name | proto-number ) [ [ "," ] proto-list ] From nobody Fri Apr 21 10:11: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 4Q2r0J5yH4z46CJT; Fri, 21 Apr 2023 10:11: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 4Q2r0J5Tv1z3Mtx; Fri, 21 Apr 2023 10:11:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qyHUJhNQVcUATMAtNCrP7ogz3hITgzR/Q3HbtxyzOAc=; b=sD9kEDQLoyr2sJO5rW77pxSudQuehvQ+VwsDsJrRcYgqYD/LMK7QCjaXtsZO84bjtCTPhx HYIcpg7FMhWOQ8mCT9JjNuJ3nOWcrPd0/niYKn3n5gOWnqbXr4ysO91n3XNrIHHF5pa1zu MXkh55ONWgHrA0mm78Uhzq/uIN5keLNfX5bboe8/Gr4fMdaLsFZ59FdvNFkYKleoLnOkMl ivkS/ODS9zCMDEyb6sUAhCyQTX36e5u3RXKXGHZnhAEfKc8322hxSwDycHy7iI6dCs9kQ/ KVrQ/C7oFykWXAugJtyJF27pCN11vIAqLn1eSBKj9RF4sVoHiATos5GtL3g/pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qyHUJhNQVcUATMAtNCrP7ogz3hITgzR/Q3HbtxyzOAc=; b=ApbrLzi4yiYzEPPZX4f6dx1LZk13ajC+JLOLz9TzonFrUhlkHQHlUfk3p0L91T1CZna+N4 2L8VQIvI5UXinTuxaKBGSACEMn1ajOfzcM1dDUsjCOm1Cuyvx+q/iqfn+Y2+PxiYDjFkYN PSLTUjlTOg/CrOJsEV6mWb9A7lQULAvipvxVFxE61CdZl0fjUr8ocl09fm0yal+4lIVWmd SfdoV+As2AbqW6sYb4eYdcLmnPiJEzgIrpvFEkGCA1wXvKE0+cjPH0FMPUdSKHat8EU9TV qxyZHDi/GvvaInWHUz43H41h7EQfsRDB3q2WA1FXzMbU2YitEtVKIc9/J9EhZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682071888; a=rsa-sha256; cv=none; b=ZFmK71tX8zer/FmLRMT65HbrXVMiVoauWvajNjB5JWLfLqFspPQ4XiCIx8oy/rXLFBxLcb HkhN8d1tIFEVyLnZRYmyZfjVcSpwGO+jPKKd3JZso6EKleHeOgxNIJzAFirFGViy3Bvq+A odpcqPX8QfULDEEWXTjSlnmdUCM5o6K75w0hUusjejoqK8V7g3AOXDYKUjX2Q11HcPn1tl 0Zmj+n2T9KMCFVlyymuUqr33CjQqDrkyQ6A7RfNnlzE/bpcD3ZhC3rDIxO4SqBGti2Yx3L AcaaBCjJsdeMIjZ+11mD+VxqeM7VX0pNXVDHEW1u0dETEn/jQ8I58zkzoeSkVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r0J4Y8szGW3; Fri, 21 Apr 2023 10:11: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 33LABSxx020329; Fri, 21 Apr 2023 10:11:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LABS3I020328; Fri, 21 Apr 2023 10:11:28 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:11:28 GMT Message-Id: <202304211011.33LABS3I020328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e74e0dc9b018 - stable/13 - infiniband: Opt-in for net epoch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e74e0dc9b0185e3b87a9b62161406af74cd0a56c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e74e0dc9b0185e3b87a9b62161406af74cd0a56c commit e74e0dc9b0185e3b87a9b62161406af74cd0a56c Author: Zhenlei Huang AuthorDate: 2023-04-05 16:05:02 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:10:11 +0000 infiniband: Opt-in for net epoch This is counterpart to e87c4940156c, which did the same for ethernet. Suggested by: hselasky Reviewed by: hselasky, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D39405 (cherry picked from commit fc6c93b6a5cf14cbc099f550f745d63779499fec) --- sys/net/if_infiniband.c | 9 +++++++-- sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h | 2 +- sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c | 6 ++++-- sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 2 +- sys/ofed/include/rdma/ib_verbs.h | 1 + 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/net/if_infiniband.c b/sys/net/if_infiniband.c index 9bf4756f2556..fc8ce08e0260 100644 --- a/sys/net/if_infiniband.c +++ b/sys/net/if_infiniband.c @@ -409,9 +409,13 @@ infiniband_input(struct ifnet *ifp, struct mbuf *m) struct infiniband_header *ibh; struct epoch_tracker et; int isr; + bool needs_epoch; + + needs_epoch = (ifp->if_flags & IFF_KNOWSEPOCH) == 0; CURVNET_SET_QUIET(ifp->if_vnet); - NET_EPOCH_ENTER(et); + if (__predict_false(needs_epoch)) + NET_EPOCH_ENTER(et); if ((ifp->if_flags & IFF_UP) == 0) { if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); @@ -501,7 +505,8 @@ infiniband_input(struct ifnet *ifp, struct mbuf *m) /* Allow monitor mode to claim this frame, after stats are updated. */ netisr_dispatch(isr, m); done: - NET_EPOCH_EXIT(et); + if (__predict_false(needs_epoch)) + NET_EPOCH_EXIT(et); CURVNET_RESTORE(); } diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h index eb1cb87dc888..2c63b8e0117c 100644 --- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h @@ -459,7 +459,7 @@ void ipoib_reap_ah(struct work_struct *work); void ipoib_mark_paths_invalid(struct ipoib_dev_priv *priv); void ipoib_flush_paths(struct ipoib_dev_priv *priv); -struct ipoib_dev_priv *ipoib_intf_alloc(const char *format); +struct ipoib_dev_priv *ipoib_intf_alloc(const char *format, struct ib_device *ca); int ipoib_ib_dev_init(struct ipoib_dev_priv *priv, struct ib_device *ca, int port); diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c index 0982af9fb904..a1a457804169 100644 --- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -902,7 +902,7 @@ ipoib_priv_alloc(void) } struct ipoib_dev_priv * -ipoib_intf_alloc(const char *name) +ipoib_intf_alloc(const char *name, struct ib_device *hca) { struct ipoib_dev_priv *priv; struct ifnet *dev; @@ -923,6 +923,8 @@ ipoib_intf_alloc(const char *name) } if_initname(dev, name, priv->unit); dev->if_flags = IFF_BROADCAST | IFF_MULTICAST; + if (hca->attrs.device_cap_flags & IB_DEVICE_KNOWSEPOCH) + dev->if_flags |= IFF_KNOWSEPOCH; infiniband_ifattach(priv->dev, NULL, priv->broadcastaddr); @@ -977,7 +979,7 @@ ipoib_add_port(const char *format, struct ib_device *hca, u8 port) struct ib_port_attr attr; int result = -ENOMEM; - priv = ipoib_intf_alloc(format); + priv = ipoib_intf_alloc(format, hca); if (!priv) goto alloc_mem_failed; diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c index 1ea5cdb1a319..0256c3ee06c9 100644 --- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c +++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c @@ -89,7 +89,7 @@ int ipoib_vlan_add(struct ifnet *pdev, unsigned short pkey) snprintf(intf_name, sizeof intf_name, "%s.%04x", ppriv->dev->name, pkey); - priv = ipoib_intf_alloc(intf_name); + priv = ipoib_intf_alloc(intf_name, ppriv->ca); if (!priv) { result = -ENOMEM; goto err; diff --git a/sys/ofed/include/rdma/ib_verbs.h b/sys/ofed/include/rdma/ib_verbs.h index 697dc3fbc98f..21ccfa6b08ad 100644 --- a/sys/ofed/include/rdma/ib_verbs.h +++ b/sys/ofed/include/rdma/ib_verbs.h @@ -229,6 +229,7 @@ enum ib_device_cap_flags { IB_DEVICE_SG_GAPS_REG = (1ULL << 32), IB_DEVICE_VIRTUAL_FUNCTION = (1ULL << 33), IB_DEVICE_RAW_SCATTER_FCS = (1ULL << 34), + IB_DEVICE_KNOWSEPOCH = (1ULL << 35), }; enum ib_signature_prot_cap { From nobody Fri Apr 21 10:11: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 4Q2r0L0vHPz46CWp; Fri, 21 Apr 2023 10:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2r0K6NlTz3N2Q; Fri, 21 Apr 2023 10:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MpP3J0Rex//8JQ6D1tFILHbewTLcdL1iKVuX8muzB6Q=; b=BnBCeHygriI4ddR4T5s68Ot6GbGc8LH068G13yOdl584vpTDNTvb9nLzLGEQAmRbTO65IM 5xklQRd8nGYZouM9LiN9WoO5Iw3hCDELpQdG+YKyHahQCuxHh9KC7E60nvYdLppago2Oo+ TAXFswuIDli9jAw4tlKikb807jDztTW9uqWLDIejjjzwjjMXCunNQpYxlWQzsSvohy6j23 EBPbOVvJumCzEYvjR0s+xoT1Xz+rQK7IVfrmkdeBzlJG+fZwToRHJrTGf7QHdoxDML2FRZ i1ks7v20iH/+CU1wuNwKUVoS4F+oIgKV6up9nDzyXSzI2VhySdJLteCgpDWEvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MpP3J0Rex//8JQ6D1tFILHbewTLcdL1iKVuX8muzB6Q=; b=cXZrX4A2c26Cr69hrPgeq6cGfwpCMPTySIKOxgyINqjRQHEf33xoyAOOddnGyXCC+3QQHS q4MovBKULURMOJdF1PXqt7/uIvJNdiyyD5e2DDniPBdoybFVRygDWnvZ7IXywhrHRwEpQP a7SAvAqwiWP4lLzJJthMQyB45KH1ykQLTQ+DaZnc5zXQdAHuGWNx8b3I7FGiIeVyVpIc5g ClrFiLXww9sJrtduaZluL4s5zBuTgI+myxi5cr58DAE5BAwKC7n7NzNQA2NUW4ejALjcxC hgRs4U6q3REaWWn3Oj8tRqf/OPI/WA7W48jM3gOvERGK1/kFh51HinZ/RkpO/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682071889; a=rsa-sha256; cv=none; b=gD9W7Tc3vYcBWITSwNzSrOh5HyexQEckcA1AB3+gIffbt2Ews3y5g0YHEizG84XdOSH4GY ndgCEt05huQTQ7gS7i/RYqYbvk3eNkNKlyAt0tmAe7vJqIL72b266VCompojpyWQ3Kf2yp JKjQs8op7KcZQaOSdNoGYGUMuHxz1qwZ1TkS2fzbgrF/+Mc84HGUAZNdReGDH8nlzlL6xh ++9zB1UDAwz8eCo0S1xNCzCUkKgRIAUAoZU8dy5FrTXroW2KFhWPvypgQSgVj6oSAZBdWN vrQ1xxrhTCs521j0TlXJ4u9f7S5qywZo7a+4mkBHu5LfeELtezr8AxDDN2EbvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r0K5VnZzGjh; Fri, 21 Apr 2023 10:11: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 33LABT4p020349; Fri, 21 Apr 2023 10:11:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LABTXT020348; Fri, 21 Apr 2023 10:11:29 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:11:29 GMT Message-Id: <202304211011.33LABTXT020348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a023d986e462 - stable/13 - mlx5ib(4): Mark driver knows net epoch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a023d986e462ff12d2316842ceb8a5bddddb3b93 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a023d986e462ff12d2316842ceb8a5bddddb3b93 commit a023d986e462ff12d2316842ceb8a5bddddb3b93 Author: Zhenlei Huang AuthorDate: 2023-04-05 16:06:15 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:10:11 +0000 mlx5ib(4): Mark driver knows net epoch This driver has already been EPOCH(9) aware since e48813009c6a. Reviewed by: hselasky Tested by: hselasky MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D39406 (cherry picked from commit da4068c4e1a090915a1a763c0d9fa5dc5b80842c) --- sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index 1d4842160d4a..b509bc9982fc 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -680,7 +680,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, props->device_cap_flags = IB_DEVICE_CHANGE_PHY_PORT | IB_DEVICE_PORT_ACTIVE_EVENT | IB_DEVICE_SYS_IMAGE_GUID | - IB_DEVICE_RC_RNR_NAK_GEN; + IB_DEVICE_RC_RNR_NAK_GEN | + IB_DEVICE_KNOWSEPOCH; if (MLX5_CAP_GEN(mdev, pkv)) props->device_cap_flags |= IB_DEVICE_BAD_PKEY_CNTR; From nobody Fri Apr 21 10:11:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2r0M0cWwz46CQD; Fri, 21 Apr 2023 10:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2r0M02GDz3N84; Fri, 21 Apr 2023 10:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ABGSZAU3ESlR/NsEopF9TM3Z3eZBNi4DDxsDW/CMqM=; b=RQilFeU44F9RsbBluP4ba4VBC8XPJeMgAvNEL6dum6FhIGcb4OBcfD0R7cCgGjUJBPnG5x mgYPU/qKC0emxagVzFFFk138sRPAlMl6ArEBl5SFdf4Ah2LzL+61ziFEuDyHAgkdVzYJD+ xODsAOCty6HDSDtIJ59Yon0mI0GkVu5Gkbj4R5VI/OHMGU6l1l7E+QiNlSxendPYVxiQfw P1f1nmB1os+M1jp4ZCOi5KmCbcemvK1BkkxH4pHoKnp5pa7Axafk6EInzrF3iAxO1D3tKy gDdLTC/K/7uQeJxTjV9FsROHE+WDTIMT1SlwwcAMI0mXOfD5g0jn2lwqoHieQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ABGSZAU3ESlR/NsEopF9TM3Z3eZBNi4DDxsDW/CMqM=; b=F3ecFuv23/X6CuOWQ59oJ0sZ1cshV2wl+IChTkwdZDpWTORZimKHNteP0AKSVVVprB1D41 dzwQ/Ww5JXeDorV0Tea4ulw2GMgn7zwcnbREhOedSIza9CWoHZ+4I3Ijj9+0guBfWo4Dk1 IhzNOvJg6QCHy7taYqnRrsuDnEOvm5WNz0FfUnNWUn8QHixDN83FmxwFVhbdUw7yVLKrxR 3+9HGLrsgw1oXfrkhP2xXrFpQd7Y0MbABEs51Zcg6wfRlwN/DRvGpwwh1WBQXGWj2gbMWX VzZ3/p/I3Aw505P9gAYr/Y9/eOhCS7ClEFJhTSTBxcJn5XQXylHEoH09EqUqjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682071891; a=rsa-sha256; cv=none; b=GBjLn2ERYNXU2Ftpb0qQwVGAJ/te3OcHeSz4gy99B/irp/bAWkWnuF0vMeb9E8UK0J3SAC oN42VRRj8yPrwAEMfRSmbZPNLZz9iZYyeQJNPh3hOnGOdtfiwfDovQyCU8J4V4lFwrs/FX atxYkbptWbBVo1oExiShEsgXD+I0NAb9lVVczTp14qCP/afBiPPKyrx0jF9NSFrZ2xVAZG qozLT5/5sCKidUSvOSFeYgUsUBQPos5/2XpaN6y+nkkINKNtQ7+z05fvWcKDUIWFrHTd0r AYf2plOAwQdF7V4VyMSTo6D4YUWBoCqoLBfHKV+bXVTEjeOgBxnVeYp7GFDg0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r0L6DrkzG8C; Fri, 21 Apr 2023 10:11: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 33LABUDJ020368; Fri, 21 Apr 2023 10:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LABUBE020367; Fri, 21 Apr 2023 10:11:30 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:11:30 GMT Message-Id: <202304211011.33LABUBE020367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: fd635d87ad35 - stable/13 - vnet: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fd635d87ad35bda209e29303167dec8c9ed48847 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=fd635d87ad35bda209e29303167dec8c9ed48847 commit fd635d87ad35bda209e29303167dec8c9ed48847 Author: Zhenlei Huang AuthorDate: 2023-04-17 10:24:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:10:12 +0000 vnet: Fix a typo in a source code comment - s/form/from/ MFC after: 3 days (cherry picked from commit a7acce3491987c116e607697a4906807f4ea1c10) --- sys/net/vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/vnet.c b/sys/net/vnet.c index b46ed9e270e0..057043808031 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -245,7 +245,7 @@ vnet_alloc(void) /* * Allocate storage for virtualized global variables and copy in - * initial values form our 'master' copy. + * initial values from our 'master' copy. */ vnet->vnet_data_mem = malloc(VNET_SIZE, M_VNET_DATA, M_WAITOK); memcpy(vnet->vnet_data_mem, (void *)VNET_START, VNET_BYTES); From nobody Fri Apr 21 10:11:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2r0N2FlFz46CJb; Fri, 21 Apr 2023 10:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2r0N1S1Hz3NMp; Fri, 21 Apr 2023 10:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oHhKLF+dXbS9g0J3Rgi4NdWwrctiJMdvK4oyveE7EA4=; b=RBqWVvnFNDRObXRxktX6qt3a6M62RTzfrBu2D85Boqy66S5a2vmqoBoUIvYjvpwF8iRH2k hmzkiogGhwclPiCZ8h22lR1AkeY7Dg7dmywEwzbSKPbuWEPhUqguLZknFqmU0jeiASBXjQ DLMg/Gjcd3a65RF/loO22v7ygxOUChovBdI7pn+cl+9DDDKFJZPbE4hcIdL8W0FbQCgQTO cA3P6pId7XyeGCejBcqQcM+6YDE0gg/wSbyTjX1fc2tUxnEu4sbkwUFdQEQndLQ+BKLdXD s9o4+RGtTBpGx3AbRFEWp300G4o2CVZMrdno12miv4T/GIp9/TPZXVU6Y4rYTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oHhKLF+dXbS9g0J3Rgi4NdWwrctiJMdvK4oyveE7EA4=; b=ncalg0DURFxkVkBbyTR/gvi1A75Ace/KWUH/EOHbfVfbYlh0HgJbzikFGP5RAwrTsI/p0N o7HhKzc50CNCBNkujZFkWhyXd9aX6QSNdxRkqWTf8tQjZo5lk37tlOdv0ohyOvpI7fC5VN UeF4UjlsfIF8cdiT6alW4943OGH8ZYAVeYiElgtD9Gw6hmFZ/8BB/9Sw1hCXUjfamylttg aqCQWIW0MFtd70Aykj1oNKi+cLhif7XEEB8yJdRHxKGZSvO31hbAJhxSxxK2JxIkE87ZG6 arJ+xTGzpaqs5uvcd2xpOemUqkSclvKzy6yZqTzc/byFC5WUUDn85ZEXSLSoVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682071892; a=rsa-sha256; cv=none; b=OK5aLwWdbdBxmD/jy6Y6VJPjit/PPIbpgvupEdFDBpG9WfwNp7jaKt1v9SwDxO6mkuY420 OXK04MYuyvBVO6M9gAWo0kB/qdJkfAVYiMJKm4+OuPF5RzbJnUCZaXmKH+OPl8PZZzAdAi sZaYjR8wmfSIE61qwY69NDQjOIxTcRyXICiksvlkhjtDq+qAHe+B8Mt9fBZUqJtFhpUzXB FwattZnvj4QN7U63Rn4doLC+yWLjlYAKeBien6lSNlwZfQCAnepAkFxbnkdIW74qY5QHsy pEWky2Sz1bHfLVJrmMmX/4ryxjkgLg2kHcge1tH7PMrfF01aRkAvBFZBcYmKIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r0N0GYnzG8D; Fri, 21 Apr 2023 10:11: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 33LABVgb020387; Fri, 21 Apr 2023 10:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LABVs5020386; Fri, 21 Apr 2023 10:11:31 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:11:31 GMT Message-Id: <202304211011.33LABVs5020386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 774a2ee9ad7a - stable/13 - lagg(4): Correctly define some sysctl 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 774a2ee9ad7a512c5faf0fc30b13aa1de33ceb2f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=774a2ee9ad7a512c5faf0fc30b13aa1de33ceb2f commit 774a2ee9ad7a512c5faf0fc30b13aa1de33ceb2f Author: Zhenlei Huang AuthorDate: 2023-04-17 10:24:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:10:12 +0000 lagg(4): Correctly define some sysctl variables 939a050ad96c virtualized lagg(4), but the corresponding sysctl of some virtualized global variables are not marked with CTLFLAG_VNET. A try to operate on those variables via sysctl will effectively go to the 'master' copies and the virtualized ones are not read or set accordingly. As a side effect, on updating the 'master' copy, the virtualized global variables of newly created vnets will have correct values. PR: 270705 Reviewed by: kp Fixes: 939a050ad96c Virtualize lagg(4) cloner MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39467 (cherry picked from commit 401f03445e4aa42960e337604560593c7096e589) --- sys/net/if_lagg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 687c07971d60..55d68bbde226 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -278,22 +278,22 @@ SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW | CTLFLAG_VNET, /* Default value for using flowid */ VNET_DEFINE_STATIC(int, def_use_flowid) = 0; #define V_def_use_flowid VNET(def_use_flowid) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RWTUN, - &VNET_NAME(def_use_flowid), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_use_flowid), 0, "Default setting for using flow id for load sharing"); /* Default value for using numa */ VNET_DEFINE_STATIC(int, def_use_numa) = 1; #define V_def_use_numa VNET(def_use_numa) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_numa, CTLFLAG_RWTUN, - &VNET_NAME(def_use_numa), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_numa, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_use_numa), 0, "Use numa to steer flows"); /* Default value for flowid shift */ VNET_DEFINE_STATIC(int, def_flowid_shift) = 16; #define V_def_flowid_shift VNET(def_flowid_shift) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RWTUN, - &VNET_NAME(def_flowid_shift), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_flowid_shift), 0, "Default setting for flowid shift for load sharing"); static void From nobody Fri Apr 21 10:11: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 4Q2r0P2xw9z46CZJ; Fri, 21 Apr 2023 10:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2r0P2FtQz3NfP; Fri, 21 Apr 2023 10:11:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8hDnsxT7qHyBPCgjyNdCKFyPJJUQx1v+GhNEff+woK0=; b=yfY/a181W9w+dqzZ/ar+8gPJn4EvSK1lxZSxzaWvNwgzeHVdm8fzKXjl5kL8wqDH1uaBPl hwKWfmMcBbS4e8em0AEM5zgk6bcR0sIt0nnfYRD7mwoLA4pE8kwwXtVOn+1/Py+N7s3TXq +kn7ODgdImDD3/s7XOEgWayZ8oCePJvuVPLa3jPqLPRpbWOhHSD0yi6QuLLqxg4jKTPyrl mihanCYdHaQfTlIacTplDwLKMbjzlRNAKVyOHm+vJNqFxfZdUkMQSj+ltf0r7IetsAhBcG AT9ut35xQLbw+do55wkxYgC6ErkU/0kGjyqetJc9+ItNzab/a7Dw6mtLcSpjjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8hDnsxT7qHyBPCgjyNdCKFyPJJUQx1v+GhNEff+woK0=; b=g3i9T8PVVy0QHTB/FLZbv1ogH4eynliTYWzLtUYNg5fB/M9OZsf0vA9FWfRK128IWtOY1e wpPtFvgMQwwMp0P/1LU9VXLjOzT+7m8MZcu/raOvrrmcf/lRtRFh4m/Xj4i4qF5/WyYIYG RTopn5xU+fkHPBUyxqaarzZGS0M+7kU9C2u1QjbSu6HrU0X8yNU+E40DRbRF2MaQ+aGKIP Hj7tu3uR/4buk9oxSunix/oiVD5ZXUpd9vumhubgPQ1ca3SebdfYb+lpLPDJll/kMYE14g okJwk2n6tQIvWE69NVYC5d5FzaKHxD7AZ141+Kc9WgftqCIX4B7vqFDryIcqjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682071893; a=rsa-sha256; cv=none; b=fvQjAOH+S9yJp2tRvH+kfSepGSBHYTqflpG63GJ27cqzQISlcGbGnKp5ujsQ+YwGN0QpK+ CUyaafpF0GnIPJKMQaBvkIzj1iUkPYrxecXtVOtCjsEtg3fBqy0VPN2jAs763oJb9WLK/F Whf/ye2RPj5ZIkSKo9Uof/5ZLRw04o4126cy6pI89EI1kXnNKd/7X7wDC7WbPrxRD6NN+G 55vdYI1z40OXaI8XTM3EGN7hlMmRhjDR9BeXw2V/v82AD6PYl56ZsLXQ+P9ggLbAgJABOq FPDokitu6MBbryRVXkVFIl1zmNSW1iaF+ao2o14dRdEo3HxD1odtVkVKCQlPhw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r0P1CG7zGg1; Fri, 21 Apr 2023 10:11: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 33LABXoL020412; Fri, 21 Apr 2023 10:11:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LABXsq020411; Fri, 21 Apr 2023 10:11:33 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:11:33 GMT Message-Id: <202304211011.33LABXsq020411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ff7151058e51 - stable/13 - printf.9: Update the use example of the %D conversion specifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ff7151058e51902989b05f39a0569224dae54245 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ff7151058e51902989b05f39a0569224dae54245 commit ff7151058e51902989b05f39a0569224dae54245 Author: Zhenlei Huang AuthorDate: 2023-04-14 10:08:56 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:10:12 +0000 printf.9: Update the use example of the %D conversion specifier The output of hexadecimal bytes are in lowercase. Update the example to reflect the reality. Reviewed by: gbe (manpages) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39543 (cherry picked from commit 722b7589cca704670c3c532bdd0f5d46675df085) --- share/man/man9/printf.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man9/printf.9 b/share/man/man9/printf.9 index 4d3a6fb8b2a5..33347fb135ca 100644 --- a/share/man/man9/printf.9 +++ b/share/man/man9/printf.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2020 +.Dd April 14, 2023 .Dt PRINTF 9 .Os .Sh NAME @@ -164,14 +164,14 @@ printf_test(void) { printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE"); - printf("out: %4D\en", "AAAA", ":"); + printf("out: %4D\en", "AAZZ", ":"); } .Ed .Pp will produce the following output: .Bd -literal -offset indent reg=3 -out: 41:41:41:41 +out: 41:41:5a:5a .Ed .Pp The call From nobody Fri Apr 21 10:11: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 4Q2r0Q4bdTz46CMY; Fri, 21 Apr 2023 10:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2r0Q35HDz3NRC; Fri, 21 Apr 2023 10:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SrndkCv5XNJMNoPBbEbxGm64GvWtC9kUJ7V8L4woeM8=; b=oBSkkKN/j6CXUK5s4K4ur/BLehlkzXR3f95nhqnWQtege8jTkETlGspPSif8B3dgdbc/gp rZpPPS/HRRb7tB3vI8RxX/XdVBec2JYQ9WlQSuA6/nSYMeqn+XDW0QNH4lN0sAwMKyDZLN eTCBepyvxW/lYlJ14BWA7k386vYL4eOXN+1eBhNqEqUBKQ6uMGIJYbpJEAehZmQXQHv7L9 JdoRbUR0iFwo17aK36yLdYiqIy6oelUZfGZ7deYzv8HlN+j3wwXEghcQ1qlzsfnJBgBH4o 9Ns9XweWHfeNkrVIZxrvlCcSBWSZXmM7VtGEXAmwiZhUR5/Ptc0ObrTXHjgT8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682071894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SrndkCv5XNJMNoPBbEbxGm64GvWtC9kUJ7V8L4woeM8=; b=E1XzHJHt59G2To7rsyG/FtN4g1QDASsgDv+WaaKl0Kl26JQsUSUVP5im7yPj9qENSZsTET 8NXXWfwmstvlT/QtbIdVAG3y3Ai2B/ze2rfqWnY3Q+PqR7ZBJDqZB9xTHideGL7HO+N7Yv O8l9eJXuYXWNY9imkEyYfo3k8nt2GScHCPEda+i35CsNNpF6fyCWDJFOlBxFz2Y4F8dM6X M9c7sUJbGtGZ/A4mkTlMXHFX+ZR6wXqfwablt2RGxiZZEwAbIcjVfM+fbk50wNn0nEZXnT NAXVjHIVro+JUgW4VlRB28R3/df99l1Ha3QWyFsIwbYK1A51nkuQ70sYkicO1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682071894; a=rsa-sha256; cv=none; b=KT7UTthOL09z9arZ/pFgS5U4gOMa+goXZTgJ7Sslr5F6FkYYoeKXFO48vOd4iswGH24vps D4NVcP6lv1tVd02bKbwmgvwhMTHwMeNjleWmm0JVnP4JPhHfK1AyHYk2t1s2oNeRTYOwxQ 2lv3vTMH7bxmRKVc2f5tHd9qHK7HsAsFcZKEjHS2v+TlTWRyrD1IRjRMnMRkkvInINBNVP HZdUIpEkFOKmvl2oUiUg/h5QPsSo0gsLnskS1Icp16mel4ERvdd0/COhqIHzmhVDldfash e33MmVCqRWq6CjLRN4Se7I9o+xDrkBhyUWRQsMFBo1VzMKkP8vdBiADqe6prYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r0Q26B7zGlP; Fri, 21 Apr 2023 10:11: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 33LABYNJ020436; Fri, 21 Apr 2023 10:11:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LABYDr020435; Fri, 21 Apr 2023 10:11:34 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:11:34 GMT Message-Id: <202304211011.33LABYDr020435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: de53ebb0f20e - stable/13 - bridge: Log MAC address port flapping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: de53ebb0f20e9735a6167230eb38fd4695aa9c51 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=de53ebb0f20e9735a6167230eb38fd4695aa9c51 commit de53ebb0f20e9735a6167230eb38fd4695aa9c51 Author: Zhenlei Huang AuthorDate: 2023-04-07 14:25:41 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:10:12 +0000 bridge: Log MAC address port flapping MAC flapping occurs when a bridge receives packets with the same source MAC address on different member interfaces. The common reasons are: - user roams from one bridge port to another - user has wrong network setup, bridge loops e.g. - someone set duplicated ethernet address on his/her nic - some bad guy / virus / trojan send spoofed packets if_bridge currently updates the bridge routing entry silently hence it is hard to diagnose. Emit logs when MAC address port flapping occurs to make it easier to diagnose. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D39375 Differential Revision: https://reviews.freebsd.org/D39542 (cherry picked from commit 2d3614fb132b1cb8efd1e0accdd0c98ce6893efa) (cherry picked from commit 9af6f4268ac3cc8203f34c746d955b4405279099) --- sys/net/if_bridge.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index ef01be9c5b49..cd2fbff3a85c 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -466,6 +466,21 @@ SYSCTL_INT(_net_link_bridge, OID_AUTO, allow_llz_overlap, "Allow overlap of link-local scope " "zones of a bridge interface and the member interfaces"); +/* log MAC address port flapping */ +VNET_DEFINE_STATIC(bool, log_mac_flap) = true; +#define V_log_mac_flap VNET(log_mac_flap) +SYSCTL_BOOL(_net_link_bridge, OID_AUTO, log_mac_flap, + CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(log_mac_flap), true, + "Log MAC address port flapping"); + +VNET_DEFINE_STATIC(int, log_interval) = 5; +VNET_DEFINE_STATIC(int, log_count) = 0; +VNET_DEFINE_STATIC(struct timeval, log_last) = { 0 }; + +#define V_log_interval VNET(log_interval) +#define V_log_count VNET(log_count) +#define V_log_last VNET(log_last) + struct bridge_control { int (*bc_func)(struct bridge_softc *, void *); int bc_argsize; @@ -2745,6 +2760,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t *dst, uint16_t vlan, struct bridge_iflist *bif, int setflags, uint8_t flags) { struct bridge_rtnode *brt; + struct bridge_iflist *obif; int error; BRIDGE_LOCK_OR_NET_EPOCH_ASSERT(sc); @@ -2768,7 +2784,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t *dst, uint16_t vlan, /* Check again, now that we have the lock. There could have * been a race and we only want to insert this once. */ - if ((brt = bridge_rtnode_lookup(sc, dst, vlan)) != NULL) { + if (bridge_rtnode_lookup(sc, dst, vlan) != NULL) { BRIDGE_RT_UNLOCK(sc); return (0); } @@ -2817,12 +2833,23 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t *dst, uint16_t vlan, } if ((brt->brt_flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC && - brt->brt_dst != bif) { + (obif = brt->brt_dst) != bif) { BRIDGE_RT_LOCK(sc); brt->brt_dst->bif_addrcnt--; brt->brt_dst = bif; brt->brt_dst->bif_addrcnt++; BRIDGE_RT_UNLOCK(sc); + + if (V_log_mac_flap && + ppsratecheck(&V_log_last, &V_log_count, V_log_interval)) { + log(LOG_NOTICE, + "%s: mac address %6D vlan %d moved from %s to %s\n", + sc->sc_ifp->if_xname, + &brt->brt_addr[0], ":", + brt->brt_vlan, + obif->bif_ifp->if_xname, + bif->bif_ifp->if_xname); + } } if ((flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC) From nobody Fri Apr 21 10:17: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 4Q2r7g188kz46D1v; Fri, 21 Apr 2023 10:17: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 4Q2r7g0bRhz3Pxb; Fri, 21 Apr 2023 10:17:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682072271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q5C3Ipi8UGL5p5bvbeZ5vxCLOkxa7+Kvg9pCG2IAzpA=; b=bTpBlX2Og6BUpay1TEHOK8vahyUEAUwwZmRbOvPAFTCRIkt1hTgCfhZcOly75VRelrZy5M 35WC4icEk7zN6CxDf2MTw/3MxEQ+9jfR5ZHS5oyZvAGt7i3E6P2nigA+9KcKYaZHJZnnz2 22XWzEvZj/ykbT0OIFHIuNcKIP5Ci9zQfGedLwqk0MRegRxwj58x6hYnvd8ET1bfv8PTDw doKK6QCev1I1EyZ48b8OGxwT571HE+a2ToA7fmxeyOuCxm3BqsS5py3LxEuVso13rLNhbT R5sc8Bm8GM83qWH+VhVZ2cLpjUvpsvMd8V5m/CxUvsn0zXYt19q0dJgZVYoTsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682072271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q5C3Ipi8UGL5p5bvbeZ5vxCLOkxa7+Kvg9pCG2IAzpA=; b=nJCSmswIrNBMT+GRaRH8C0XkfFiBL3Qly9APfJw5omtQX4N0jfs0Gbm3o3+zCpjxI1MJJl aH8OuRTc3t3pvAvijyARiSeIajpj2k+J+XNPpW6nrqgu6f3bOT1GlJWm1g5zTiLpQY5CcJ vkph8qt0ebiN7OZ1Bmktop5clp7wh7iSpRl85yOJpoU7rh9CCY77vVACggItDjAJsBLnjg rGrS3N9Q/8TpPZb8yNCXwbjLM3Scwb1dUeHSOSNxxesa/VA8s+taQWjHVuGZt4v9MNaQpL 6vxtbV5iaH/GSL9+cY06HSYkduz4jh5yJdN7YC94UsjDIlpgK5c7pqb0tt6W/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682072271; a=rsa-sha256; cv=none; b=jDMZ5Yx6JowNSSWiPFY1FJouSqjBU45e69r+SPs6GZxz1WvEKfVxpYovGHPfSseJ1rj9b3 vpZ/e6YhQt1kgr+/dmA24E2vRygphtTH7P3WAikuj+H0EgpPAbUvmylu/iJWpAzEXLq0Sl +pGDvDLzMzNeANZjtMbKVj/QPaqOBzO+09xHNtT+C6tiZbTWQKGp+mKaJaZuMORPHddwiU PPdTd3h4/CgvdY/p7E1QG1aQPzN+SadZwgxBYrXi7SUTKGXo91F/YamF6Xx3sbUwGWBG56 +bHB+qjHw+jkc2HLJPlgCZ/Tf2J7pQkCpep0CC5lAzmHmQDy28UZntXS7qEIDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r7f6mHlzGlb; Fri, 21 Apr 2023 10:17: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 33LAHorX024876; Fri, 21 Apr 2023 10:17:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LAHoM6024875; Fri, 21 Apr 2023 10:17:50 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:17:50 GMT Message-Id: <202304211017.33LAHoM6024875@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 109bea7ab84e - stable/12 - vnet: Fix a typo in a source code comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 109bea7ab84e7e3d56289c8d9a4aad090987cfd3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=109bea7ab84e7e3d56289c8d9a4aad090987cfd3 commit 109bea7ab84e7e3d56289c8d9a4aad090987cfd3 Author: Zhenlei Huang AuthorDate: 2023-04-17 10:24:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:16:10 +0000 vnet: Fix a typo in a source code comment - s/form/from/ MFC after: 3 days (cherry picked from commit a7acce3491987c116e607697a4906807f4ea1c10) (cherry picked from commit fd635d87ad35bda209e29303167dec8c9ed48847) --- sys/net/vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/vnet.c b/sys/net/vnet.c index 0c8755990520..91b28dff482d 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -246,7 +246,7 @@ vnet_alloc(void) /* * Allocate storage for virtualized global variables and copy in - * initial values form our 'master' copy. + * initial values from our 'master' copy. */ vnet->vnet_data_mem = malloc(VNET_SIZE, M_VNET_DATA, M_WAITOK); memcpy(vnet->vnet_data_mem, (void *)VNET_START, VNET_BYTES); From nobody Fri Apr 21 10:17: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 4Q2r7h2VQPz46CYW; Fri, 21 Apr 2023 10:17: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 4Q2r7h1fXgz3Q6R; Fri, 21 Apr 2023 10:17:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682072272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=neRsCKak3AK0ZYhRwKaJHDEGrPyHdGYZGVvpfYLIx40=; b=aM9qvI0FtjCrqE5HLt7u37wAzsRqIKxCRTMFHX7EOp+2drm/XEbehmfh6rmdbc4F49wGwE rWPJh73YtPqGKpHriTdnY2pJEVDa0xVp9MAiVMcIh2pUG6Gl8fAuaW5zvfRkNX+g8GVxWp 6Z8mHXGKHb5oIpiTPsc47u5NIgfKZwyzhsPslU0w4kngchygSPlmjx8mwYA98k8qf0FaJF VvQulAoMcNG/iPqpoeABi4j1sJH5SeWremi4vdIbDJnYKaKRhnf/hzhDTDevkJ5uKHb60S s1LW9aKxL/UDPs7RX9vlMckxovQ4GiM73mskXvsFWFNDwukEvL5PJy5ykG7b7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682072272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=neRsCKak3AK0ZYhRwKaJHDEGrPyHdGYZGVvpfYLIx40=; b=LymIaLmj0NzNJl/0SM6vCB0t5A37Iqu4Ou1ykLQkc0uNsm4rYqc2OlTKdRpP3pMJEB0imX jgovCG4l//92qBTtGlMPAoc8aHY2ny+fl6iJDSERbYwk4S1RVyje4v/jsu1PC3Zdpxkjn7 g8+Ee6dnGB3sZH55gTibQ8CUoPX/R/U+6OCBaRM2bPo+/S7IanQFAXvli7N5S+HoOTVSNN RO5zw62Q1xJZAnkDUPNZQzx+ZSoaicKzdHmKTQZWOZWvLy5ezfGCLuQ72M4ZWiR4GN7wl0 sHH21weP3u/37+FOyK2cUzez/3S/tmUuCaKnOaCzfsI0bQueyCR31G7jEvoTpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682072272; a=rsa-sha256; cv=none; b=UOpziRTlGC630T2nxKkor7ZLzaOReomere5rso7KPhdniejYC99k1kMavGySoumijilaFH 25p/amjk3XhlAPH0CJ7bKp2bRzqHaHOFdlxfJRJ7NZwi2szUYNIaW7WVcLcGbXr3/io1SG 7d85ZJlBKlDyZgT9Hg76Na7kUYzoyim7yX1wEKIaGOL958bKrQW9jQiUTQ2/TUw1ipJX3e NGJ/DRYWlGrK6XkuhFxEMawdWG4XaaigebDrHLn3CMj4PGaBW+s4RxhezTraVmkCd44jwC 3gWl5zvyMsRmoaeubMQqADiJs1ECPHAc/Zme6hiHs7cMI9eZCCu/GfnCRAaTGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r7h0WsdzGgr; Fri, 21 Apr 2023 10:17: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 33LAHp7T024895; Fri, 21 Apr 2023 10:17:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LAHp8H024894; Fri, 21 Apr 2023 10:17:51 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:17:51 GMT Message-Id: <202304211017.33LAHp8H024894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 673685a50aeb - stable/12 - lagg(4): Correctly define some sysctl 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 673685a50aeb090b81bbd84f5c606728e00aba68 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=673685a50aeb090b81bbd84f5c606728e00aba68 commit 673685a50aeb090b81bbd84f5c606728e00aba68 Author: Zhenlei Huang AuthorDate: 2023-04-17 10:24:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:16:10 +0000 lagg(4): Correctly define some sysctl variables 939a050ad96c virtualized lagg(4), but the corresponding sysctl of some virtualized global variables are not marked with CTLFLAG_VNET. A try to operate on those variables via sysctl will effectively go to the 'master' copies and the virtualized ones are not read or set accordingly. As a side effect, on updating the 'master' copy, the virtualized global variables of newly created vnets will have correct values. PR: 270705 Reviewed by: kp Fixes: 939a050ad96c Virtualize lagg(4) cloner MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39467 (cherry picked from commit 401f03445e4aa42960e337604560593c7096e589) (cherry picked from commit 774a2ee9ad7a512c5faf0fc30b13aa1de33ceb2f) --- sys/net/if_lagg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 796aa7f24dcd..34bcd37bed73 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -269,15 +269,15 @@ SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW | CTLFLAG_VNET, /* Default value for using flowid */ VNET_DEFINE_STATIC(int, def_use_flowid) = 0; #define V_def_use_flowid VNET(def_use_flowid) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RWTUN, - &VNET_NAME(def_use_flowid), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_use_flowid), 0, "Default setting for using flow id for load sharing"); /* Default value for flowid shift */ VNET_DEFINE_STATIC(int, def_flowid_shift) = 16; #define V_def_flowid_shift VNET(def_flowid_shift) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RWTUN, - &VNET_NAME(def_flowid_shift), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_flowid_shift), 0, "Default setting for flowid shift for load sharing"); static void From nobody Fri Apr 21 10:17: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 4Q2r7j32z1z46Ctl; Fri, 21 Apr 2023 10:17: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 4Q2r7j2Qk1z3Q4d; Fri, 21 Apr 2023 10:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682072273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/U9m33cg2nq8wZrM1bJXitHzNIngaWqGZebdQHqBPU0=; b=IUJiBNW2yMYuPTIQ2BNZEGggT21kcT72IRMwvdGUJwxxBa+4Xi6CCg2Z/uu5cwzxTXvfL2 7RaYAdZvmZO6oARiifhCJz/33OydMq3YkZ2EItcKRylaQXH7ReY61FZvq7/jw7F26p4ax5 jzxVLdWh1UDW0SMaWTztelBDA7+3H9xmrAjvHYQqVQ5sLGaMr0FWUkW005H2UAs0URIon2 Qh4YTFKdgvNbGZvOYhGSh199yHugD2ekcaUN3yEEdzIUenBEHs+v61k84UeNL9to3x6kBb E1NZ5fyBs8N5cVmUYxKPaPr76bAKbmXv9RIfrWQMG8VqhDfI2e6Cs05Qd0/Ouw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682072273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/U9m33cg2nq8wZrM1bJXitHzNIngaWqGZebdQHqBPU0=; b=I3VP0kTSSijnQ5iAcExjNvpdbzk6VOYCHBfPZwnR3HooqGK7JVl5W9aXVouRJf8g5Rg2AR e2fZBhcDmWmnOKw3onXS/lS9Tych7fou0XTeKFiW+9jR08/y/uWHiJINRbLZbX/Ml/QsT3 CJzzVwv1C2FI7L5GYmIZTv8HVus04yA2TxjysiCU8MMARLxsoeoMrSkMRKFNm3Q4X+6fEW y49LgTIbJH5AL4yVv6UEpobXfW9j61T2c0DHcfVK0nLhG5A/K4+OL+k01PLviItm+o8Vk+ bDKq2RV56ROE77WqIyk4Hv70iiyPIZBuKYRGXwhyF9/ku4ga0+z+SBWAe9E2lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682072273; a=rsa-sha256; cv=none; b=Ep1NSYFZi5obrjzcfWPv4GvTV6Z8sC2QKDTcOmqDIrgizq+FTBahHSMwPL1wHZdZcxsZmB 4CpSr1LV8pqhkTmWXMmz4xJEEQmuwzOlcLxlcqed+w5wdtwr/xfOYamV1KA0YHA0vNFeHa bikhDWZTEKfRtlqDYOryoWVd1/G/qRCi9Zl2IxnbH6ZdGFfDjJQBcX6cJUnZ8KAnwLGmLi gD55PsDdX+GJOmpZSeqZ93v6547T6FwNuiLn1fBDuxO4nogMoQBgdhTf07PtDGBWv+Awcq QHqeVDqX0TDcZ80XVz4uy7Z8ufSaboyAi5qE7C0gEeLEAExEDWl8XGK54qaXwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r7j1TrbzGk8; Fri, 21 Apr 2023 10:17: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 33LAHr7m024929; Fri, 21 Apr 2023 10:17:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LAHrff024928; Fri, 21 Apr 2023 10:17:53 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:17:53 GMT Message-Id: <202304211017.33LAHrff024928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d26e62ad16dc - stable/12 - printf.9: Update the use example of the %D conversion specifier List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d26e62ad16dc573cccb12c79ac9d34ad773ac0d2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d26e62ad16dc573cccb12c79ac9d34ad773ac0d2 commit d26e62ad16dc573cccb12c79ac9d34ad773ac0d2 Author: Zhenlei Huang AuthorDate: 2023-04-14 10:08:56 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:16:10 +0000 printf.9: Update the use example of the %D conversion specifier The output of hexadecimal bytes are in lowercase. Update the example to reflect the reality. Reviewed by: gbe (manpages) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39543 (cherry picked from commit 722b7589cca704670c3c532bdd0f5d46675df085) (cherry picked from commit ff7151058e51902989b05f39a0569224dae54245) --- share/man/man9/printf.9 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man9/printf.9 b/share/man/man9/printf.9 index 0b4bd826aa5c..c5cb6f2ad89d 100644 --- a/share/man/man9/printf.9 +++ b/share/man/man9/printf.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 18, 2015 +.Dd April 14, 2023 .Dt PRINTF 9 .Os .Sh NAME @@ -160,14 +160,14 @@ printf_test(void) { printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE"); - printf("out: %4D\en", "AAAA", ":"); + printf("out: %4D\en", "AAZZ", ":"); } .Ed .Pp will produce the following output: .Bd -literal -offset indent reg=3 -out: 41:41:41:41 +out: 41:41:5a:5a .Ed .Pp The call From nobody Fri Apr 21 10:17: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 4Q2r7k4KjTz46ChM; Fri, 21 Apr 2023 10:17: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 4Q2r7k36Ctz3QNj; Fri, 21 Apr 2023 10:17:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682072274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKUDyboT6Ok35JIXVvo/cbcSzW/IUU10sU9zIrbTnco=; b=FEPmtEPQIAjdeHOu/u9t2/kXVJ/AoaamgssML1WZu/VkP0yy9TbHSZ9tjCEmksjIlKuczn UBkLDVOu6py/orUpEEVJOC3CTb21fZkABMByuZ7j1J5+suG5xyDC/LuLG6R8ZEmM46CwgV NUV72yErimsoCvQYgazVpGxpqmWlpSZHFzu8xHSE8Ujcpp3pS9YaO69qCfDtivhT5KxXRg SBTWQZ9sbp5G3pDmpnPdWjCEMm0ATAm9bRalwmF8/YjKuQ7cqoWDQ8nckUbrl7YJPP+M4g lZUvN2MrcjZnUqa5GdRkj0xOSN7KIzJg7zupqMP+c2Lmhzl8H5BSmgaqDatG1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682072274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKUDyboT6Ok35JIXVvo/cbcSzW/IUU10sU9zIrbTnco=; b=mWT9zEssqFGYb+fvEWkbkOGOAY4TaB662JQP1M03e64dmWHgXlTRF37BsbYoTvNuxt58L/ a6OqtYFykVqq+V6lbB11MRNqApVwDZijahIwK5P60A9xeFAVm2JK+4YRjt+BWQKFfbZV/a ZoPNCx6u2JoBn5jCL6fj3jAdaeozTSe6ZHfVTNXVqFhALebwp8tltJyEhSNwxUWRBETFGp oWzxE1alDs6dC1NVd/cw2liVmVsot6kmEkhLYz34KvIT1AvmA/Swjj5WAHCyJytb9bJRRk cPnmro5FmsTibdgRAM36LuDFjpbg8A3p5f7qU9Ng+u8hHvSNF9BisGJmhtgIvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682072274; a=rsa-sha256; cv=none; b=qo9yc7QPS8s7cMaDfg+2vXdTc0DMroR+WSixVt4f/XtWV06DstLj17WtKsYIypdzJht7we 95P60Q/dVz4q2QDbb9THdhQdMlYz5tUXei84Fm3SgTJWhdFe1D+zaPzi4OO/IkSPTvA49F IgfCEWktoPM9yrgDMyi+XtsfDyH1BQYduiU8w09+O/GOzruiKn1Uh8tj6WEvVOzc8l65/J sA6DxN+ZKRyZB+s0UbPAeoUagu9Ix1UTikbcpfppNEMYQz62TzzFSjUpFBoeZhdhj7zDiS UgXnG50lFw/9FGSJpC+/mGc5pHxlVmnpXLsKRe47Xwe57FVo6HdmHD3brzgEzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2r7k2Bv4zGgs; Fri, 21 Apr 2023 10:17: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 33LAHsZp024953; Fri, 21 Apr 2023 10:17:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LAHsp6024952; Fri, 21 Apr 2023 10:17:54 GMT (envelope-from git) Date: Fri, 21 Apr 2023 10:17:54 GMT Message-Id: <202304211017.33LAHsp6024952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 303d9a593bdd - stable/12 - bridge: Log MAC address port flapping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 303d9a593bddb7e0d83c490052041b4c665f4b45 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=303d9a593bddb7e0d83c490052041b4c665f4b45 commit 303d9a593bddb7e0d83c490052041b4c665f4b45 Author: Zhenlei Huang AuthorDate: 2023-04-07 14:25:41 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-21 10:16:10 +0000 bridge: Log MAC address port flapping MAC flapping occurs when a bridge receives packets with the same source MAC address on different member interfaces. The common reasons are: - user roams from one bridge port to another - user has wrong network setup, bridge loops e.g. - someone set duplicated ethernet address on his/her nic - some bad guy / virus / trojan send spoofed packets if_bridge currently updates the bridge routing entry silently hence it is hard to diagnose. Emit logs when MAC address port flapping occurs to make it easier to diagnose. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D39375 Differential Revision: https://reviews.freebsd.org/D39542 (cherry picked from commit 2d3614fb132b1cb8efd1e0accdd0c98ce6893efa) (cherry picked from commit 9af6f4268ac3cc8203f34c746d955b4405279099) (cherry picked from commit de53ebb0f20e9735a6167230eb38fd4695aa9c51) --- sys/net/if_bridge.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 67ab983cd4a7..28e8e8856b8e 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -469,6 +469,21 @@ SYSCTL_INT(_net_link_bridge, OID_AUTO, allow_llz_overlap, "Allow overlap of link-local scope " "zones of a bridge interface and the member interfaces"); +/* log MAC address port flapping */ +VNET_DEFINE_STATIC(bool, log_mac_flap) = true; +#define V_log_mac_flap VNET(log_mac_flap) +SYSCTL_BOOL(_net_link_bridge, OID_AUTO, log_mac_flap, + CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(log_mac_flap), true, + "Log MAC address port flapping"); + +VNET_DEFINE_STATIC(int, log_interval) = 5; +VNET_DEFINE_STATIC(int, log_count) = 0; +VNET_DEFINE_STATIC(struct timeval, log_last) = { 0 }; + +#define V_log_interval VNET(log_interval) +#define V_log_count VNET(log_count) +#define V_log_last VNET(log_last) + struct bridge_control { int (*bc_func)(struct bridge_softc *, void *); int bc_argsize; @@ -2806,6 +2821,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t *dst, uint16_t vlan, struct bridge_iflist *bif, int setflags, uint8_t flags) { struct bridge_rtnode *brt; + struct bridge_iflist *obif; int error; BRIDGE_LOCK_OR_NET_EPOCH_ASSERT(sc); @@ -2829,7 +2845,7 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t *dst, uint16_t vlan, /* Check again, now that we have the lock. There could have * been a race and we only want to insert this once. */ - if ((brt = bridge_rtnode_lookup(sc, dst, vlan)) != NULL) { + if (bridge_rtnode_lookup(sc, dst, vlan) != NULL) { BRIDGE_RT_UNLOCK(sc); return (0); } @@ -2878,12 +2894,23 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t *dst, uint16_t vlan, } if ((brt->brt_flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC && - brt->brt_dst != bif) { + (obif = brt->brt_dst) != bif) { BRIDGE_RT_LOCK(sc); brt->brt_dst->bif_addrcnt--; brt->brt_dst = bif; brt->brt_dst->bif_addrcnt++; BRIDGE_RT_UNLOCK(sc); + + if (V_log_mac_flap && + ppsratecheck(&V_log_last, &V_log_count, V_log_interval)) { + log(LOG_NOTICE, + "%s: mac address %6D vlan %d moved from %s to %s\n", + sc->sc_ifp->if_xname, + &brt->brt_addr[0], ":", + brt->brt_vlan, + obif->bif_ifp->if_xname, + bif->bif_ifp->if_xname); + } } if ((flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC) From nobody Fri Apr 21 11:12: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 4Q2sLs2B2sz46H3B; Fri, 21 Apr 2023 11:12: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 4Q2sLs1hlMz3sF6; Fri, 21 Apr 2023 11:12:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682075557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=34AVdITkjyiV7kDpzNTvHgZd+aCpli8l2+bCA/X4yGg=; b=Y3ucKv15Yliq6EE8+WK0Dkx1XEPas/L3EKQ4Hc9tGQMD2UpIjtG/hWDTXbW5qgzQUKgD99 +LX28GQY5zRmTeH2d9egQqncBaxR88NfgxdJef5VRig2hBz9Z0SO/kMlfUt3HPOKcLHdU+ GJEcmoNrVJRPozCKSmxYPT/aYBtnFNQXvzFelBYivCVdVHmQB6WTWDvTcfZUL6OKqZPBye pbGbmjJBXsAoFCrrukNUoOErZhCVlEqdge3Rv4RLPu8N3Li1O2U4ioVDwNaYPRmxHN1lwE xImj2ZRxutyER4moGlP6vMtYcr2ONVTq5vo2cHhtHMdIiAtB7o1LkGw30XX0+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682075557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=34AVdITkjyiV7kDpzNTvHgZd+aCpli8l2+bCA/X4yGg=; b=toW3ggxwkyWesa8pZBN2wF2+9BM0rH6RRbTtDi9JJyJ5ATD0qShcyeuuqzjGaN7sibMw3D i5WzeLe5pvSgVOx78DvIlSTllaPDlNpOxezvSn9rPih8X7ozdC8quUkJuXUizu3Oe8sbfv e4zrnqRX25nVJ6+Pp8ToK4PDILBV4uykwi1LwkqLn39BhHaGvsEdQcIwC8LGGjg3xKcl3H xdbsoZaE5C7W/8I0wXBZ9hhzOVm4yD8F0ssd7bLv4ZDTUJzqro5efz9hJpvvBGfdzfhkhi MZg/HGC9ctu4+0Bmi2B4heRPPTX+NqA+U+nuTGBf9eVx2nWDLSXjOMxbhc6Cnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682075557; a=rsa-sha256; cv=none; b=U/TC4rM0oSscz7O30a3yVNaBCNA1vzQtHEQdDpY6jeUMesxb9t/6/ZEmaBTqmdkU3Wi9t0 HQyQ0Lv0MERkCe4b0pJ7VUY6maaZDh2of6qVIdzbatvQ1ZinDvfBZX/kKqVWiOsSgPasuM lVwPvIFYZSZ5Cvrw8mWqy5HlhxEBGmQBgV0uOQhezg2G+yo3isjuLQ6h+oJ8A1H9Y+HpZP INAceGq2D3P8hK2tZdeoYok+MP/8iNNWbwKHQVoEc0o7/h6chxrgSDwstYUQdxXIJFXNmo lDVL0pwvfr2quohxxmEg6XmJDSP8+ZChkK1x6dthEf/Z0svAYEM0fHbFNxOchg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2sLs0m07zJ1k; Fri, 21 Apr 2023 11:12: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 33LBCb3l022808; Fri, 21 Apr 2023 11:12:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LBCblV022806; Fri, 21 Apr 2023 11:12:37 GMT (envelope-from git) Date: Fri, 21 Apr 2023 11:12:37 GMT Message-Id: <202304211112.33LBCblV022806@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: 01216268f89e - main - tcp: hpts needs to still call output even after input. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 01216268f89ef5403530446bda5b52a8e87ca544 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=01216268f89ef5403530446bda5b52a8e87ca544 commit 01216268f89ef5403530446bda5b52a8e87ca544 Author: Randall Stewart AuthorDate: 2023-04-21 11:12:25 +0000 Commit: Randall Stewart CommitDate: 2023-04-21 11:12:25 +0000 tcp: hpts needs to still call output even after input. The other stacks it turns out actually expect the output to be called and can become stuck if it is not. This is because they run there timer code from there and the input routine does not always assure a timer is running. The real longterm fix here might be to go into the other stacks (rack and bbr) and make sure that a timer is running after input if you don't do output.. as well as call the timer functions. This would cut down on calls from hpts. But I think its too dramatic of a change for the immediate time. Reviewed by: tuexen, glebius Sponsored by: Netflix Inc Differential Revision:https://reviews.freebsd.org/D39738 --- sys/netinet/tcp_hpts.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 2aa4135c7a25..cc1bd71d0d43 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1348,11 +1348,10 @@ again: /* The input killed the connection */ goto skip_pacing; } - } else { - error = tcp_output(tp); - if (error < 0) - goto skip_pacing; } + error = tcp_output(tp); + if (error < 0) + goto skip_pacing; if (ninp) { /* * If we have a nxt inp, see if we can From nobody Fri Apr 21 13:27:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2wLV3GyTz46Qc6; Fri, 21 Apr 2023 13:27: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 4Q2wLV2jV5z493t; Fri, 21 Apr 2023 13:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682083650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1bZSnSaZDLpXwnhtDrGmOaVysL/hOURqcA8BhcCoPI=; b=vXgrsBnApc9Ls3Undk1FONpt9ggssxcUtE1nJZspnFzmWvYFdee6Tn4lwhZlftMeuVPJpF 66Zv6Ac3BaSWAEoenZ5ouDB/ZqEpWhLIdWxMr2A05wpywpedLqZ54wDWLa6r6c3nTrZMZR xvWeEUVyOQAialjXHSzutZ+u4V7GFkbsRbE+2xXecdPEEVofKj4pI2qyuF+YgSsXDIdeYU 5IZVR2Otw0TpI4PZw1xR4j1tmdJ1oiqTC2qN+UcXZJd6slRmbyiXLvi8pIG+xL4MPH+eWs lpBNgNQPUmEvDBjPkQm1NeYnG8uXzgvTtt9/4IOPufGY3pq9TY4lp4U+9qU/3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682083650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c1bZSnSaZDLpXwnhtDrGmOaVysL/hOURqcA8BhcCoPI=; b=txi7CThlZuuJla3bnAHkDjrEVtd/yDr+hhJRJazBRpHLuJeSBZupm/fhoBOiJo7X1+KQqM OBLARcHKYdN5U2z1p9R2R1vldVpWLEE3eIMy67tpkMSBWMoWqcl2CSSgyprpSF6EK1xchB PxgGFsthOJY6JWOO8AHy01yrdJ43+YfiLCjZ9p6cI/TZZstfJAmt8+cKU5f8Jowu+YK81X Y+DMtou+EfT7b3Hop/UIcLdHypzXTVlHJGppgU0Js7/hJ0ryPfpcbUqYpDoKtt/619532P wvlvjY1/yf+3zt2xWBVCvs/juriCXW/6mQOibtVneV6xwN+3Dky8gG8OUZW9Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682083650; a=rsa-sha256; cv=none; b=aPRr620nZjGph12H4sMCXvar+6BV/7H8VVXJwrTB+kazH2dRcXE1kb9831/L34m+vW/sEP twrwMPh35yV7WKtd7JGYZnxGrGj1P3xudEZoATlCG8LxqVTyBRROi2beuz5/cRds7SSBCT oQAjUPsLXkxSm4YMaK1vduc6OZQDjDSUTphKHcbqkPkCUMxwKUKEKr0SAVCt9ByOWCMhB0 bfgM8BeC/ORzjY+MBd9cfnh1ndqA4t7jc7RnCpIlQzTh5TQIFr4+JI6LfoHAocTpfIEspn gZZfwi2hJqrVvCtbX3okgVXwlzhnkEcXpV7BjaQ5HTv43DfIw6uN3PlpOgZ6cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2wLV1kWYzMZP; Fri, 21 Apr 2023 13:27: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 33LDRUY7037295; Fri, 21 Apr 2023 13:27:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LDRUUL037294; Fri, 21 Apr 2023 13:27:30 GMT (envelope-from git) Date: Fri, 21 Apr 2023 13:27:30 GMT Message-Id: <202304211327.33LDRUUL037294@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: 92fa22c6a5c4 - main - riscv: Compile instr_size.c into the kernel when DTrace is configured List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 92fa22c6a5c41303e3ad98096c9ebe8202418d81 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=92fa22c6a5c41303e3ad98096c9ebe8202418d81 commit 92fa22c6a5c41303e3ad98096c9ebe8202418d81 Author: Mark Johnston AuthorDate: 2023-04-21 13:26:17 +0000 Commit: Mark Johnston CommitDate: 2023-04-21 13:26:17 +0000 riscv: Compile instr_size.c into the kernel when DTrace is configured Reported by: Jenkins Fixes: 080e56a6c98c ("dtrace: expose dtrace_instr_size() to userland and implement it for riscv") --- sys/conf/files.riscv | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index 774dabe0cd61..192a309c989e 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -1,6 +1,7 @@ # $FreeBSD$ cddl/dev/dtrace/riscv/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/riscv/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/dtrace/riscv/instr_size.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/fbt/riscv/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" crypto/des/des_enc.c optional netsmb dev/ofw/ofw_cpu.c optional fdt From nobody Fri Apr 21 13:46: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 4Q2wmt2Xx8z46Rw6; Fri, 21 Apr 2023 13:46: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 4Q2wmt1zStz4FWY; Fri, 21 Apr 2023 13:46:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682084814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfalPSEGZ+lWiD+NPK9nGEwy60jowamBMT1Z974KgbM=; b=vaNaUxbh2f1VxuhLt2W4A0rGFdU/EcoiVTbPUtWCbxX07YkCDjcfg8HRln9+250NTWdt3o Iqm8JkmhOHCgH0EUp9rJ34KBfdNzBBpLsrzKUyxONM45tFKxNr8huPMHy1nB9UCWwipapL NcX7XoMvgZrh3Hq3HZ4QneVr2TKrYpDw0H10zQR5Qvl1o50xlvZAUpcr3Z1z2bsgY7wlbk jSyGY4Zyz9DZPOQLiUNKVWl9aU7oM0Xc5f/YXe5cN39Lz9VwFnty6WOuKJtgR+h34482bv PAnbX1E0lejwsaIlGQ+J5iKJUZQqktdhIb1J7rxN3FFs3KVyWGgWvlgr+dzAnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682084814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfalPSEGZ+lWiD+NPK9nGEwy60jowamBMT1Z974KgbM=; b=hUEFt85maviGGpAtOeXGoExxMeuoR37dZGwsQBcGwYw6l1gRBuWJzjIaER8qe9kU/B3PC3 IoIPh3P5vQ5FKA1wWjm5L5Qr9Qs12KVgVPSrMk+li06njzWUU7wCgnqSoVFJOgo6G8zNJ1 qOc1hL57vAuTqQjw69K0yJd8XDFKI38Y9UVGRM9aUqMolaZOAjg1U3VAtkKYRFRzKwzvWJ dk1iFPEPNnvYzwW8oKjPA+HP793PHUde03IXV5anAT9K4MauFBCLapUu2QW2YHKG2ijTr7 ykOORRLG1iZ2BUj1UDztFbESFLFfJgIfoAKs2BqtzsEP1A85byK0yADg9r0F2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682084814; a=rsa-sha256; cv=none; b=uCU0cjnry13jHohCLO3ibUL0ThjWYl8iRgbv2N466Liez4avENLdFfrY62GtAeHO45XDdL YDvj2h5No/DytvH3pwj2a9zpCn0CqS+4t73Utb9pT2XKAH4TZkf6S/dCkJKvn/chxfpgrN 0Sis7/8R2RJgFPWlleCpItgBFJUXlyfXBc4f4x+oWqlUMyEI9sPuSU1yeqCzHO9eYCLDVn rigZ6sxMjPq/TxUxpGrbneyOLDh/xW4/C0EX7B0xHBeyC6RtytvlcYasVLpI0iRUWByq4R y1J1B28g6Ey9Kggj1TY7EPgYLd0LLi8VEHyJIg5PUys0Nn1b1Yz9d9WJPlg+HA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q2wmt12n7zMM4; Fri, 21 Apr 2023 13:46: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 33LDksEx069033; Fri, 21 Apr 2023 13:46:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LDksWr069032; Fri, 21 Apr 2023 13:46:54 GMT (envelope-from git) Date: Fri, 21 Apr 2023 13:46:54 GMT Message-Id: <202304211346.33LDksWr069032@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: 533a942a213c - stable/13 - sftp: avoid leaking path arg in calls to make_absolute_pwd_glob List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 533a942a213c9e852265f94d27f1e9768294eaa6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=533a942a213c9e852265f94d27f1e9768294eaa6 commit 533a942a213c9e852265f94d27f1e9768294eaa6 Author: Ed Maste AuthorDate: 2022-11-03 17:17:40 +0000 Commit: Ed Maste CommitDate: 2023-04-21 13:45:30 +0000 sftp: avoid leaking path arg in calls to make_absolute_pwd_glob As Coverity reports: Overwriting tmp in tmp = make_absolute_pwd_glob(tmp, remote_path) leaks the storage that tmp points to. Consume the first arg in make_absolute_pwd_glob, and add xstrdup() to the one case which did not assign to the same variable that was passed in. With this change make_absolute() and make_absolute_pwd_glob() have the same semantics with respect to freeing the input string. This change was reported to OpenSSH in https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-November/040497.html [and was later adopted upstream]. Reported by: Coverity Scan CID: 1500409 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37253 (cherry picked from commit 69c72a57af843267b220f8367c4cc7162a12d696) --- crypto/openssh/sftp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crypto/openssh/sftp.c b/crypto/openssh/sftp.c index 29081db3d434..ce7ab7f8f2fe 100644 --- a/crypto/openssh/sftp.c +++ b/crypto/openssh/sftp.c @@ -617,14 +617,14 @@ escape_glob(const char *s) } static char * -make_absolute_pwd_glob(const char *p, const char *pwd) +make_absolute_pwd_glob(char *p, const char *pwd) { char *ret, *escpwd; escpwd = escape_glob(pwd); if (p == NULL) return escpwd; - ret = make_absolute(xstrdup(p), escpwd); + ret = make_absolute(p, escpwd); free(escpwd); return ret; } @@ -637,7 +637,7 @@ process_get(struct sftp_conn *conn, const char *src, const char *dst, glob_t g; int i, r, err = 0; - abs_src = make_absolute_pwd_glob(src, pwd); + abs_src = make_absolute_pwd_glob(xstrdup(src), pwd); memset(&g, 0, sizeof(g)); debug3("Looking up %s", abs_src); @@ -1997,9 +1997,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path, memset(&g, 0, sizeof(g)); if (remote != LOCAL) { - tmp2 = make_absolute_pwd_glob(tmp, remote_path); - free(tmp); - tmp = tmp2; + tmp = make_absolute_pwd_glob(tmp, remote_path); remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g); } else glob(tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g); From nobody Fri Apr 21 16:33: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 4Q30Sp1ptWz46bhN; Fri, 21 Apr 2023 16:33: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 4Q30Sp1JZ0z3GNv; Fri, 21 Apr 2023 16:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682094794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hlb+z6gFRERNb2rxFnbUCtSeb4M/Uua5hyHxmcdmtHs=; b=mWodI34mZblulLQAhCRaL0TskoTNZNg6j5Qq/i1JwqU7mi5l/TgQbRGzcSZ09JptAefg7J NQ7tqGM3wX0DsE9xSuoDaF5ILA9zdGKkFw4haFx9kYliVGcnzZkqpTkLjJ225ifyuK0SG6 L3FSgFnQEO7Xzx8T2ZCLUdUdVa9v++LbnCx0Qvgv+V9t4zt9R7pRY7VMYysr4btYVn8qUy geH2LiUbpXbSAutBVJhGn4J3HV5LI4+N8t0r9wdm/LD7g2DEFX3IF8sHiEF9VRNvUq3QO8 IvtPtXYsnca3A9sLRwHq/bMSh2SyeHOcUO5YCZYpLSVXA7izFgO08kbJTQJ0tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682094794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hlb+z6gFRERNb2rxFnbUCtSeb4M/Uua5hyHxmcdmtHs=; b=shXQFU/vxM9V/pyWp2fHY/nHGgB5w6L5Yp5c8TQ7zMua+s8K5nhTm7IIxvqiVDQ5Ny+7Ym 3T5i8Wnr9hdUse1xw2xLgMCVlG3b1BWAnVNjiQtHAaN38+0h8r1GMZMZ1rCkEIy7SO1lwe sN3wtTfIBzYVgXtCqUViVPecgrxo0/Q1FFDcjc+v8TUsCuEzb9K9VAhMIlYFRnz5Mb023L KEM+blwT8FoURCcuIkmQ2J5DwDoIU8Yt/oltte34xP0LJJt1ZeKqhGI1RhQKSAbtUQaJrY f3XJQ/uR8CfEHgAMDdu95lDSO+i9HZrDdwfv7tTAU6ldcseKbILrjIzOpdGdRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682094794; a=rsa-sha256; cv=none; b=P6d/lb3Kw65AVttbCy4CKnZ9w5ZMTQSK4YxQ9wBVgPxp3nKYdC5/Gd21QbEzItwZhWx6mA m25Omu/jeBTUBcSB69qxp6hrRh33tz9pvoBf1MhiBbKnCjYmHi7LucrK5OZfN85lGQJ2qL pg+PQfoAdOTCaxJO0z3dI/jErwJ+fALN5Cutqn/XFcysz+muSeOS4PbCiHRPzCsf2P6BLF YvaepycPQ8Frh8ip8oX9kYAhyoz4w19nsdCvrDC8mby5Ksi0yknxGga3Xbwtr3sdG0eP2A 8uRhgQ6OEa269z2hzVDDHLjhzxApsrBtU1mbiRp+cXAkALYpgl5Skezq77CJpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q30Sp0MXwzR8g; Fri, 21 Apr 2023 16:33: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 33LGXDkI048455; Fri, 21 Apr 2023 16:33:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LGXDYG048454; Fri, 21 Apr 2023 16:33:13 GMT (envelope-from git) Date: Fri, 21 Apr 2023 16:33:13 GMT Message-Id: <202304211633.33LGXDYG048454@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: 2c19beeed231 - main - newvers: Use correct regexp List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 2c19beeed2312e5b19b073532ef708d64255a1e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c19beeed2312e5b19b073532ef708d64255a1e3 commit 2c19beeed2312e5b19b073532ef708d64255a1e3 Author: Warner Losh AuthorDate: 2023-04-21 16:14:41 +0000 Commit: Warner Losh CommitDate: 2023-04-21 16:24:25 +0000 newvers: Use correct regexp There's no need to quote the # here. Inside of regexp, it's not treated like a comment from an awk perspective. And inside if '' it's not treated as special by the shell. gawk also warns. Sponsored by: Netflix --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index f3c437269026..85346b1cdc29 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -65,7 +65,7 @@ if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi -RELDATE=$(awk '/^\#define[[:space:]]*__FreeBSD_version/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h}) +RELDATE=$(awk '/^#define[[:space:]]*__FreeBSD_version/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h}) if [ -r "${SYSDIR}/../COPYRIGHT" ]; then year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) From nobody Fri Apr 21 16:33: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 4Q30Sq2cJ1z46cBf; Fri, 21 Apr 2023 16:33: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 4Q30Sq26f6z3GB9; Fri, 21 Apr 2023 16:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682094795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nluLoih481tqaEX+DEbMDT4fY0B1KHnSMCyTNFHHp/w=; b=UGu/YMgGzifp+CrSJTMbMaThtVqMjWr625SSsucK13YD8TQ0tUNjXdG5gJxrQSUK0IsV8e QGwMUf0GIkVbiN0uSFPVGicSEQ8s9phq3OkjYE3oMGGMc9Cg4D17yEkZ0w/1+WLPuoz26L 5rzSEEdMpAu8Td2p0KL1ZoqFe6yCwqU+DI6dnZHmRrrshbHpeA1u3JUYKpPxYmtxouZ50J 3PAuw5GiMBSQDZMltWPCi+RubsRFws190Y9cHVSvOwsDPtlSwqr+xCURwY4R3WAQ9pRbe9 L0rPrhaOVMzqGQj+szqLIKdR/bAL5K2VfiP7DG89oPuz3NpoE67kXVHopApy4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682094795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nluLoih481tqaEX+DEbMDT4fY0B1KHnSMCyTNFHHp/w=; b=rvNVXWDhkegyAXRQyBOR0hGkfcNSrEAckaK5kHxTtIuqNbk58U+L74VHaA0veYWaNcr3f4 7r9QJ47ogGHfFLzF5FKrns/Ubg2bekZWUmJB+aUBY7+6cdxcJyXNr90GfcuA1OGOOKCKPt dUSbuWThfbFBwjXO/TK6JuLT0px/xwjc8AuxRd6M08XouPeG6k2Kx4nOKbEjfgLeWpRppN dg9MqhulE442JuQ1BkNwyCbR9IfWmk/tqYWsghb88p+kAWp47YcTI1EvCnxFiSVkxdbLvI JaZOsGraU+UhlcF+lVFRwAQpfWKd8eRW1zs4p6bcFK7zYle51Ba3nloU8XJBVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682094795; a=rsa-sha256; cv=none; b=eP61U1weJJbqq5zAYOB3CT5cbZ/JSJPHAwC05KtAtjEywM0XSovrPKzKZnAmdFIW6VPJMN QEnu7fciX7FLwl1ditCW8TUUfVhYx2dsKUm39JgoDC+tBSeMZqvdhlsxNsd6dwH+23bmZF x/YTGSri/NF4wlfslmKppHfmVPUwhodLqRaAZTNJ2LOxaa4sDUPdT8PklVw8635j3dtt70 +2l0n4pZ3EtH89RzkSwisOh/vILeSY9mshMiMbDi3D52/yWjlLUX+A/GdaPsadLHkcyrAy /54gxCpcg0NjtroSe2/EzlLNk4RnXq3DW0WALcizH9J+W0sujKlgE4RMv8hkAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q30Sq1D3vzSC6; Fri, 21 Apr 2023 16:33: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 33LGXFb1048479; Fri, 21 Apr 2023 16:33:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LGXF1f048478; Fri, 21 Apr 2023 16:33:15 GMT (envelope-from git) Date: Fri, 21 Apr 2023 16:33:15 GMT Message-Id: <202304211633.33LGXF1f048478@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: e63690e885d2 - main - truss: Kill dead 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e63690e885d2ad08c361d4d7cfd0e3b5c9af459c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e63690e885d2ad08c361d4d7cfd0e3b5c9af459c commit e63690e885d2ad08c361d4d7cfd0e3b5c9af459c Author: Warner Losh AuthorDate: 2023-04-21 16:21:40 +0000 Commit: Warner Losh CommitDate: 2023-04-21 16:24:26 +0000 truss: Kill dead code If it doesn't exist, we don't need it in the table... Sponsored by: Netflix --- usr.bin/truss/syscalls.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 2ac4b1a4b003..1d3232b15122 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -578,11 +578,6 @@ static const struct syscall_decode decoded_syscalls[] = { .args = { { Long, 0 }, { Name, 1 } } }, { .name = "truncate", .ret_type = 1, .nargs = 2, .args = { { Name | IN, 0 }, { QuadHex | IN, 1 } } }, -#if 0 - /* Does not exist */ - { .name = "umount", .ret_type = 1, .nargs = 2, - .args = { { Name, 0 }, { Int, 2 } } }, -#endif { .name = "unlink", .ret_type = 1, .nargs = 1, .args = { { Name, 0 } } }, { .name = "unlinkat", .ret_type = 1, .nargs = 3, From nobody Fri Apr 21 16:33: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 4Q30Sr3WGXz46c3f; Fri, 21 Apr 2023 16:33: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 4Q30Sr33pBz3GTM; Fri, 21 Apr 2023 16:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682094796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TxMIOTtizwXJaztaqkAi63GYc5uw1GyVYkPmal4TrKI=; b=vQf43UEuwdLZcClplsab7sGsZGEMz2CHn4pULyP8tZEBbRz7/J3jY5yI6Q+aRVmGwOAQYY KBPeglezOFWeFOqIbsAUqzV+wbTe6G9ZiuCIMAnnZaxfWTjjKQsOED1LGDtczYSBwV863r Ku1IxolQkrhVMmKZJeT1q3gYA0kCtIn+HjKCzu3BVcHU3+CIe9Kg7Fof900EVGWHAwr+dw KmhIJ6tmt/YJOT2ZgPBCST7zAwVL0m6j2VL5XoKG9PPbt70zkOENTdJLXeyyQmrt9Xtwtl 5yY3AUtx2KW//MVFrNCXot1QH6mkuw6Qbfb/Z3UZqvCHNQDzFYGPzh7idBV6Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682094796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TxMIOTtizwXJaztaqkAi63GYc5uw1GyVYkPmal4TrKI=; b=Pf2Sr6mubjogUc4vhsFR27JFRIdb+jllRyrKqPxEvqoNDKVJ1eb9/fJ315n6BweZku46aF iiJ5/FzHpnPSbU6CXItkQR2H763HUUVL6oQyT2O55ehMBN8MRHUvxCbl+uFjGvlPmCn3WQ 7tPV3sSwB+gHqiMs8LogAtHhUm+PgsQ6pO0QSYepeUDNOt5ZAQzI2eZwWApjI3L4coyMx3 YBco2r191iL+8/h+1r39RSKdNj0s4Scy9TEPbkg+e7qb8+C5RZFFcU67ZrbVMVyJuhUEx2 T32Npr6wLClo8Oq7YinrlyHy+15RuCj8PcS4AuWeTWS1SNJXD+Yf2q7grj03ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682094796; a=rsa-sha256; cv=none; b=wgVwQLfiVELtOUPdT6rNjITTUUhxe8GQBUDP2hfrigF5SFLM93NiZLzwkCqwV4U4C+YH82 J/sL9FV0hIixORuRg+wC8sBYK1USA2HZ3iK3AYtJqw5nfhsJU+7E5UCawr2f4h/aH67EKx LmAxEzUEJOWsFBb3xrzX74v6eOUx9Ugj+vJXvkX0bEpX67PeFKmP0m0llt1secmUTcPEcK OptldQjEGu/Ip1+9Dng39zixcYGTYK4Hg1qwBUzG3RojOUhTHDUj4LfkwUQLsxDfm4PFnf 2Yde+sgEfk7kaRqjJxbQnaqIKqMBRQGXM9HbzAQndFhDJl0/OXe2QbgCZ9dM2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q30Sr27NzzRyQ; Fri, 21 Apr 2023 16:33: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 33LGXGLi048498; Fri, 21 Apr 2023 16:33:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LGXGJ2048497; Fri, 21 Apr 2023 16:33:16 GMT (envelope-from git) Date: Fri, 21 Apr 2023 16:33:16 GMT Message-Id: <202304211633.33LGXGJ2048497@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: 7b42f338d7a3 - main - freebsd32: Regen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b42f338d7a31c99609d801e9c9ba33d93501863 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b42f338d7a31c99609d801e9c9ba33d93501863 commit 7b42f338d7a31c99609d801e9c9ba33d93501863 Author: Warner Losh AuthorDate: 2023-04-21 16:25:10 +0000 Commit: Warner Losh CommitDate: 2023-04-21 16:25:10 +0000 freebsd32: Regen Need to regen freebsd32 as well when sys/kern/syscalls.master is updated. Sponsored by: Netflix --- sys/compat/freebsd32/freebsd32_syscall.h | 2 +- sys/compat/freebsd32/freebsd32_syscalls.c | 2 +- sys/compat/freebsd32/freebsd32_sysent.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index c8815aa0a67b..24c11faf7fc2 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -141,7 +141,7 @@ #define FREEBSD32_SYS_mkdir 136 #define FREEBSD32_SYS_rmdir 137 #define FREEBSD32_SYS_freebsd32_utimes 138 - /* 139 is obsolete 4.2 sigreturn */ + /* 139 is obsolete sigreturn */ #define FREEBSD32_SYS_freebsd32_adjtime 140 /* 141 is old getpeername */ /* 142 is old gethostid */ diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 67db3b5dffe9..c5d7f1f9c5e7 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -145,7 +145,7 @@ const char *freebsd32_syscallnames[] = { "mkdir", /* 136 = mkdir */ "rmdir", /* 137 = rmdir */ "freebsd32_utimes", /* 138 = freebsd32_utimes */ - "obs_4.2", /* 139 = obsolete 4.2 sigreturn */ + "obs_freebsd32_sigreturn", /* 139 = obsolete sigreturn */ "freebsd32_adjtime", /* 140 = freebsd32_adjtime */ "compat.getpeername", /* 141 = old getpeername */ "compat.gethostid", /* 142 = old gethostid */ diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index e3574d407336..8d2912dc835b 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -201,7 +201,7 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(mkdir_args), .sy_call = (sy_call_t *)sys_mkdir, .sy_auevent = AUE_MKDIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 136 = mkdir */ { .sy_narg = AS(rmdir_args), .sy_call = (sy_call_t *)sys_rmdir, .sy_auevent = AUE_RMDIR, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 137 = rmdir */ { .sy_narg = AS(freebsd32_utimes_args), .sy_call = (sy_call_t *)freebsd32_utimes, .sy_auevent = AUE_UTIMES, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 138 = freebsd32_utimes */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 139 = obsolete 4.2 sigreturn */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 139 = obsolete sigreturn */ { .sy_narg = AS(freebsd32_adjtime_args), .sy_call = (sy_call_t *)freebsd32_adjtime, .sy_auevent = AUE_ADJTIME, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 140 = freebsd32_adjtime */ { compat(AS(ogetpeername_args),getpeername), .sy_auevent = AUE_GETPEERNAME, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 141 = old getpeername */ { compat(0,gethostid), .sy_auevent = AUE_SYSCTL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 142 = old gethostid */ From nobody Fri Apr 21 16:37:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q30Yj2BTJz46cHy; Fri, 21 Apr 2023 16:37:29 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_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 4Q30Yh6b6Wz3HSB; Fri, 21 Apr 2023 16:37:28 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 409763C0199; Fri, 21 Apr 2023 16:37:22 +0000 (UTC) Date: Fri, 21 Apr 2023 16:37:22 +0000 From: Brooks Davis To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 559b94a12257 - main - syscall.master: Fix comments Message-ID: References: <202304202219.33KMJSY0042283@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 Content-Transfer-Encoding: quoted-printable In-Reply-To: <202304202219.33KMJSY0042283@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Q30Yh6b6Wz3HSB X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, Apr 20, 2023 at 10:19:28PM +0000, Warner Losh wrote: > The branch main has been updated by imp: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D559b94a12257807115bf842649= 36f0de2ac3884e >=20 > commit 559b94a12257807115bf84264936f0de2ac3884e > Author: Warner Losh > AuthorDate: 2023-04-20 22:16:21 +0000 > Commit: Warner Losh > CommitDate: 2023-04-20 22:18:02 +0000 >=20 > syscall.master: Fix comments > =20 > Have more accruate comments. While #if, #else, etc are copied to the > header files, lines that don't start with # are not. And #include fi= les > are only output to sysinc (which winds up at the front of init_sysent= =2Ec > which seems a bit odd). This is all radically undocumented, and likely > has drifted somewhat from 4.4BSD and what other systems do (they've > drifted too, fwiw). We probably want to tighten what we do a fair bit with regard to '#' lines and perhaps make syscalls.master's format more explicit about what's being copied where. The historic behavior of blindly emitting lines beginning with '#' was there to support manual specification of things like padding of arguments to achieve 64-bit alignment on non-i386, 32-bit architectures. I think we should likely remove the support entirely post 14 branch (I'd kept it after the compat32 generation code because I was worried about breaking downstream consumers with custom syscalls, but by now they have had time to migrate.) -- Brooks From nobody Fri Apr 21 16:51: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 4Q30sN2qXbz46cfd; Fri, 21 Apr 2023 16:51: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 4Q30sN2JKhz3JXp; Fri, 21 Apr 2023 16:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682095864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4UukjOpqH3bq1QlVTMYPH9Ch5TsyWKQEYlvQOymIV8I=; b=Biev65EpMWq/Egd2v/mosd+bn3xkNBPhbY9K58SkysQDJl0Sw573+Z8aZsBnP86VAw+y9k m9BDwllE2MyxIajuef9kikakAXfUY+H1sl5YSexFu2Jq/ui/anF8283tcnOknLf2O3IshA nnhcmj1Yt4g+W9CcGQqERmTosYlSpZBxaXlx1YZiJThCEis3DcijSQD3Rny0UxRubkzqgF L2fUbRgog0abVbmlHZclBo8KMhwosYN6kg1Al5AHUoOyLfRVrPTta4P4P230/QPWPdXmOf UIub6IjAse+6k+NDT36o1X0zgllMKYAlCUt8ZBvHck8EnVh0CbjI+IY/hIXEFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682095864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4UukjOpqH3bq1QlVTMYPH9Ch5TsyWKQEYlvQOymIV8I=; b=tcZWq5BDbKmJLf9JlSATDxH38Dhv3IDlKz/6/OGEcdJIIBjycChot73O53VpPNx/nzqNxA 26fJh5+bDTTWNQFlPps5ei/D4PppP2SZbqthM666IkVpGcmxOYlvOsFAAY6etDYi3HC40I vnNHkhWRS3No7EgcrckqS1EfOAfQXDPM8OdlgzlpZKnC1G/67o68DJLYU4wyJtTpJ4XTzR rpUvDowY+M9iKqvgAW6hEk8emA9tBL1YllTniCcCS9b8dJW5QLRkHAa08IJFFMiIwee6tM WxuSbgeUj5mziEkniF5S21VRJjY2/k55uOauUihjQDPC7OQ3OEPU4cs9ex6wPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682095864; a=rsa-sha256; cv=none; b=UbmHb+Es4nUWToWlH113Y0dlkxfsdbR8iEuE765CWzB8DTZa3Xm82ZhG7Lepkl44rUD4E5 DqBmQc2Yw7cjLY0E7JWBGuuxrMIGH9fTQpTzOKby3OV0gWSt20qQM6PsB1ES4EZnQKcpfY 3yiWZpDh+RfVqsdPZmxgpBrVXf5q2ZNECFjM3aR9on/2Cht4/RXkzdCbgJdzOgO24fXgah L8gA7HumHqvepBfQjOpP7grOGvlyOr/ym7oaZi4gJXgZ6vnmmrBW+Q9COoFbZD1i7nd4ye gN7uSlSuv3UrsO7C4ROvkR6zd/gYOm0fdSfqUr0aYdRfTEF/5ZNEuHR/VmFkEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q30sN1M1jzSjG; Fri, 21 Apr 2023 16:51: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 33LGp4MZ075594; Fri, 21 Apr 2023 16:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LGp4GE075593; Fri, 21 Apr 2023 16:51:04 GMT (envelope-from git) Date: Fri, 21 Apr 2023 16:51:04 GMT Message-Id: <202304211651.33LGp4GE075593@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: 41df1d60e323 - main - llvm: fix some llvm-* tool links when WITH_LLVM_BINUTILS is set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41df1d60e3237df2106dddf357e3205bf29f85d5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=41df1d60e3237df2106dddf357e3205bf29f85d5 commit 41df1d60e3237df2106dddf357e3205bf29f85d5 Author: Ed Maste AuthorDate: 2023-04-21 13:11:45 +0000 Commit: Ed Maste CommitDate: 2023-04-21 16:49:05 +0000 llvm: fix some llvm-* tool links when WITH_LLVM_BINUTILS is set A few Makefiles overrode LINKS and MLINKS when WITH_LLVM_BINUTILS was set, which caused some llvm- prefixed tools to disappear. One such case was llvm-ranlib, which some ports invoke explicitly. Use += when adding to LINKS and MLINKS under WITH_LLVM_BINUTILS. PR: 270955, 270956, 270959 Submitted by: jbeich Reviewed by: arichardson Fixes: 021385aba562 ("Add WITH_LLVM_BINUTILS to install LLVM binuti...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39747 --- usr.bin/clang/llvm-ar/Makefile | 4 ++-- usr.bin/clang/llvm-nm/Makefile | 4 ++-- usr.bin/clang/llvm-size/Makefile | 4 ++-- usr.bin/clang/llvm-symbolizer/Makefile | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.bin/clang/llvm-ar/Makefile b/usr.bin/clang/llvm-ar/Makefile index a6a480bce359..3718248f5de9 100644 --- a/usr.bin/clang/llvm-ar/Makefile +++ b/usr.bin/clang/llvm-ar/Makefile @@ -15,8 +15,8 @@ LIBADD+= z LINKS+= ${BINDIR}/llvm-ar ${BINDIR}/llvm-ranlib .if ${MK_LLVM_BINUTILS} != "no" -LINKS= ${BINDIR}/llvm-ar ${BINDIR}/ar ${BINDIR}/llvm-ar ${BINDIR}/ranlib -MLINKS= llvm-ar.1 ar.1 llvm-ar.1 ranlib.1 +LINKS+= ${BINDIR}/llvm-ar ${BINDIR}/ar ${BINDIR}/llvm-ar ${BINDIR}/ranlib +MLINKS+= llvm-ar.1 ar.1 llvm-ar.1 ranlib.1 .endif .include "../llvm.prog.mk" diff --git a/usr.bin/clang/llvm-nm/Makefile b/usr.bin/clang/llvm-nm/Makefile index 0df48744632d..e0c41e4a0254 100644 --- a/usr.bin/clang/llvm-nm/Makefile +++ b/usr.bin/clang/llvm-nm/Makefile @@ -26,8 +26,8 @@ CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} LIBADD+= z .if ${MK_LLVM_BINUTILS} != "no" -LINKS= ${BINDIR}/llvm-nm ${BINDIR}/nm -MLINKS= llvm-nm.1 nm.1 +LINKS+= ${BINDIR}/llvm-nm ${BINDIR}/nm +MLINKS+= llvm-nm.1 nm.1 .endif .include "../llvm.prog.mk" diff --git a/usr.bin/clang/llvm-size/Makefile b/usr.bin/clang/llvm-size/Makefile index 20bd5de61192..bce5cf834e0c 100644 --- a/usr.bin/clang/llvm-size/Makefile +++ b/usr.bin/clang/llvm-size/Makefile @@ -24,8 +24,8 @@ DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} .if ${MK_LLVM_BINUTILS} != "no" -LINKS= ${BINDIR}/llvm-size ${BINDIR}/size -MLINKS= llvm-size.1 size.1 +LINKS+= ${BINDIR}/llvm-size ${BINDIR}/size +MLINKS+= llvm-size.1 size.1 .endif .include "../llvm.prog.mk" diff --git a/usr.bin/clang/llvm-symbolizer/Makefile b/usr.bin/clang/llvm-symbolizer/Makefile index c4677169f912..fcaf8facf1b8 100644 --- a/usr.bin/clang/llvm-symbolizer/Makefile +++ b/usr.bin/clang/llvm-symbolizer/Makefile @@ -29,8 +29,8 @@ LIBADD+= z LINKS+= ${BINDIR}/llvm-symbolizer ${BINDIR}/llvm-addr2line .if ${MK_LLVM_BINUTILS} != "no" -LINKS= ${BINDIR}/llvm-symbolizer ${BINDIR}/addr2line -MLINKS= llvm-addr2line.1 addr2line.1 +LINKS+= ${BINDIR}/llvm-symbolizer ${BINDIR}/addr2line +MLINKS+= llvm-addr2line.1 addr2line.1 .endif .include "../llvm.prog.mk" From nobody Fri Apr 21 20:10: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 4Q35J00fsJz46qcR; Fri, 21 Apr 2023 20:10: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 4Q35Hz45x6z3kpV; Fri, 21 Apr 2023 20:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682107855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PsrSPrVrtStotIaR9PZD0TLeREyx1Z9AKyBeEOyrJSg=; b=bGFbTygKWkGcG+sBm68Sy9MnYjTit5R6alHVn7hnFSmJ5MejsPBOdOXaVjD0X5muO1uH0a +TGEzqevA7Av7zmt1CcG1ZxatmFmIcGkXcSCKIRR1NCC8m48RVnPfxPQRWJ82qDzqfnn9A ryC4KjpgF4bZOSFe6AXgwURrJADUop053qfDYfoDElicMqpiXsqI7CxmX9761CajCCYh0I zVYmUAPs0RojJ7naQxDqWrz27pSqgpdCtYAM2RszYF2DmTHktwbB+8dKz4QE4Ytd8WNPP+ pCjiSwMiFCIdzyZ2EVVInbv+MM2h5NHh1YsqG9Xmv2/XHB3r29YBy/fcO408kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682107855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PsrSPrVrtStotIaR9PZD0TLeREyx1Z9AKyBeEOyrJSg=; b=O4swr5KMLkjsYrVib3pYPOZWc15uYCfVtzPUzYam1qiQj0YrdpQ+VDp7CJvylkf57DqBS1 f8/Zezx56Ymr+w6ELEHEuhbJ06FLTjV6s+RdKJggAScL8eQvON/fPufZK3puK2XqKmH4e6 opu1DXh8pDW+yEWiGqxF7FPCWAAC7r+jEvX5Rxzo/UD3IjjHRoL853MPiZMZeOGTQx3CuZ SaVrhMpbnsIPcjOQjB3+vOip+oHKHVG25FDvrgEeovuFx1lSjfl1Td/8jsXL+ye/Vtv8jA f12R3P2rcFCJOv56pF6p/eMzHEdCtZoH5qkUL+B7DND4bHCrM67BHn5DjMn7aQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682107855; a=rsa-sha256; cv=none; b=aigspXYnIHPmcRqX4ew1/N8FrzNIGZ6Esd4BwD/xsqn8VrtHFfkkZwwrX/sLNXNwDMPqBA +LdwwpA7TCXdP55zfgo24ybAERaCf3VD9liIOEM2q4tgTGLBV0cyCPZa7jvV4rYCqQ/PJ3 qePamCftIiIEemCoX3aOm7ed8wPeV9XsLmhj3TX5fBfeiO1XgDR/BjIwzKWDDt+CyU7fMh 8115JwWCy/ICei8YWq/K/M2dXFoS0nNOqd8wn3qaSmDEHhLhboI5Gv6o6teLhHZUhbMui2 4WnANKnKXIQpqfHS6PVIUGHcb1UNzfK6dGsy+QnyGop3ytO7m0KlHhSxJrbQJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q35Hz36HvzYZn; Fri, 21 Apr 2023 20:10: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 33LKAtOZ006505; Fri, 21 Apr 2023 20:10:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LKAsFs006504; Fri, 21 Apr 2023 20:10:54 GMT (envelope-from git) Date: Fri, 21 Apr 2023 20:10:54 GMT Message-Id: <202304212010.33LKAsFs006504@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: 5d3e7166f6a0 - main - libcbor: update to 0.10.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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d3e7166f6a0187fa3f8831b16a06bd9955c21ff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5d3e7166f6a0187fa3f8831b16a06bd9955c21ff commit 5d3e7166f6a0187fa3f8831b16a06bd9955c21ff Merge: 41df1d60e323 058aa793d837 Author: Ed Maste AuthorDate: 2023-04-21 20:09:03 +0000 Commit: Ed Maste CommitDate: 2023-04-21 20:10:03 +0000 libcbor: update to 0.10.2 Sponsored by: The FreeBSD Foundation contrib/libcbor/.circleci/config.yml | 224 ++++++ .../libcbor/.github/ISSUE_TEMPLATE/bug_report.md | 20 + contrib/libcbor/.github/PULL_REQUEST_TEMPLATE | 15 + contrib/libcbor/.github/workflows/fuzz-pr.yml | 25 + contrib/libcbor/.github/workflows/fuzz.yml | 6 +- contrib/libcbor/.gitignore | 8 + contrib/libcbor/.travis.yml | 66 -- contrib/libcbor/Bazel.md | 100 +++ contrib/libcbor/CHANGELOG.md | 47 ++ contrib/libcbor/CMakeLists.txt | 54 +- contrib/libcbor/CMakeModules/FindCMocka.cmake | 8 + contrib/libcbor/CMakeModules/JoinPaths.cmake | 23 + contrib/libcbor/CONTRIBUTING.md | 35 + contrib/libcbor/Doxyfile | 778 ++++++++++++++------- contrib/libcbor/README.md | 54 +- contrib/libcbor/appveyor.yml | 19 +- contrib/libcbor/clang-format.sh | 9 +- contrib/libcbor/codecov.yml | 9 +- contrib/libcbor/doc/source/api.rst | 4 +- contrib/libcbor/doc/source/api/encoding.rst | 4 + .../doc/source/api/item_reference_counting.rst | 19 +- .../decoding.rst => api/streaming_decoding.rst} | 14 +- .../libcbor/doc/source/api/streaming_encoding.rst | 65 ++ contrib/libcbor/doc/source/api/type_2.rst | 5 - contrib/libcbor/doc/source/api/type_3.rst | 6 +- contrib/libcbor/doc/source/api/type_4.rst | 9 +- contrib/libcbor/doc/source/api/type_5.rst | 26 +- contrib/libcbor/doc/source/api/type_7.rst | 9 +- contrib/libcbor/doc/source/conf.py | 4 +- contrib/libcbor/doc/source/getting_started.rst | 7 +- contrib/libcbor/doc/source/index.rst | 1 - contrib/libcbor/doc/source/requirements.txt | 60 +- contrib/libcbor/doc/source/rfc_conformance.rst | 4 +- contrib/libcbor/doc/source/streaming.rst | 13 - contrib/libcbor/doc/source/streaming/encoding.rst | 4 - contrib/libcbor/doc/source/using.rst | 11 +- contrib/libcbor/examples/CMakeLists.txt | 3 + contrib/libcbor/examples/bazel/README.md | 33 + contrib/libcbor/examples/bazel/WORKSPACE | 19 + contrib/libcbor/examples/bazel/src/BUILD | 46 ++ contrib/libcbor/examples/bazel/src/hello.cc | 7 + contrib/libcbor/examples/bazel/src/hello.h | 8 + contrib/libcbor/examples/bazel/src/hello_test.cc | 10 + contrib/libcbor/examples/bazel/src/main.cc | 10 + contrib/libcbor/examples/bazel/third_party/BUILD | 1 + .../examples/bazel/third_party/libcbor.BUILD | 21 + .../examples/bazel/third_party/libcbor/BUILD | 11 + .../bazel/third_party/libcbor/cbor/cbor_export.h | 42 ++ .../bazel/third_party/libcbor/cbor/configuration.h | 15 + contrib/libcbor/examples/cjson2cbor.c | 8 +- contrib/libcbor/examples/create_items.c | 25 +- contrib/libcbor/examples/hello.c | 3 +- contrib/libcbor/examples/readfile.c | 3 +- contrib/libcbor/examples/sort.c | 15 +- contrib/libcbor/examples/streaming_array.c | 47 ++ contrib/libcbor/examples/streaming_parser.c | 10 +- contrib/libcbor/misc/update_version.py | 29 +- contrib/libcbor/oss-fuzz/build.sh | 2 +- contrib/libcbor/oss-fuzz/cbor_load_fuzzer.cc | 54 +- contrib/libcbor/release.sh | 8 +- contrib/libcbor/src/CMakeLists.txt | 18 +- contrib/libcbor/src/cbor.c | 144 ++-- contrib/libcbor/src/cbor.h | 26 +- contrib/libcbor/src/cbor/arrays.c | 22 +- contrib/libcbor/src/cbor/arrays.h | 71 +- contrib/libcbor/src/cbor/bytestrings.c | 40 +- contrib/libcbor/src/cbor/bytestrings.h | 54 +- contrib/libcbor/src/cbor/callbacks.c | 153 ++-- contrib/libcbor/src/cbor/callbacks.h | 14 +- contrib/libcbor/src/cbor/common.c | 29 +- contrib/libcbor/src/cbor/common.h | 152 ++-- contrib/libcbor/src/cbor/configuration.h.in | 1 - contrib/libcbor/src/cbor/data.h | 11 +- contrib/libcbor/src/cbor/encoding.c | 20 +- contrib/libcbor/src/cbor/encoding.h | 103 ++- contrib/libcbor/src/cbor/floats_ctrls.c | 64 +- contrib/libcbor/src/cbor/floats_ctrls.h | 114 +-- .../libcbor/src/cbor/internal/builder_callbacks.c | 230 +++--- .../libcbor/src/cbor/internal/builder_callbacks.h | 12 +- contrib/libcbor/src/cbor/internal/encoders.c | 28 +- contrib/libcbor/src/cbor/internal/encoders.h | 5 + contrib/libcbor/src/cbor/internal/loaders.c | 2 +- contrib/libcbor/src/cbor/internal/loaders.h | 9 +- contrib/libcbor/src/cbor/internal/memory_utils.c | 17 +- contrib/libcbor/src/cbor/internal/memory_utils.h | 13 +- contrib/libcbor/src/cbor/internal/stack.c | 6 +- contrib/libcbor/src/cbor/internal/stack.h | 14 +- contrib/libcbor/src/cbor/internal/unicode.c | 9 +- contrib/libcbor/src/cbor/internal/unicode.h | 7 +- contrib/libcbor/src/cbor/ints.c | 59 +- contrib/libcbor/src/cbor/ints.h | 61 +- contrib/libcbor/src/cbor/maps.c | 21 +- contrib/libcbor/src/cbor/maps.h | 65 +- contrib/libcbor/src/cbor/serialization.c | 276 +++++--- contrib/libcbor/src/cbor/serialization.h | 135 ++-- contrib/libcbor/src/cbor/streaming.c | 181 ++--- contrib/libcbor/src/cbor/streaming.h | 10 +- contrib/libcbor/src/cbor/strings.c | 39 +- contrib/libcbor/src/cbor/strings.h | 87 ++- contrib/libcbor/src/cbor/tags.c | 11 +- contrib/libcbor/src/cbor/tags.h | 35 +- contrib/libcbor/src/libcbor.pc.in | 4 +- contrib/libcbor/test/CMakeLists.txt | 14 +- ...ype_4_encoders_test.c => array_encoders_test.c} | 31 +- contrib/libcbor/test/array_test.c | 222 ++++++ contrib/libcbor/test/assertions.c | 32 +- contrib/libcbor/test/assertions.h | 20 +- contrib/libcbor/test/bad_inputs_test.c | 43 +- ..._encoders_test.c => bytestring_encoders_test.c} | 20 +- .../test/{type_2_test.c => bytestring_test.c} | 122 +++- contrib/libcbor/test/callbacks_test.c | 374 +++++++++- contrib/libcbor/test/cbor_serialize_test.c | 490 +++++++++++-- contrib/libcbor/test/cbor_stream_decode_test.c | 274 ++++++-- contrib/libcbor/test/copy_test.c | 346 +++++++-- contrib/libcbor/test/float_ctrl_encoders_test.c | 213 ++++++ .../test/{type_7_test.c => float_ctrl_test.c} | 80 ++- contrib/libcbor/test/fuzz_test.c | 15 +- ...{type_5_encoders_test.c => map_encoders_test.c} | 21 +- contrib/libcbor/test/{type_5_test.c => map_test.c} | 120 +++- contrib/libcbor/test/memory_allocation_test.c | 277 -------- contrib/libcbor/test/memory_utils_test.c | 59 ++ ...pe_1_encoders_test.c => negint_encoders_test.c} | 49 +- .../libcbor/test/{type_1_test.c => negint_test.c} | 40 +- contrib/libcbor/test/pretty_printer_test.c | 9 +- contrib/libcbor/test/stack_over_limit_test.c | 15 +- contrib/libcbor/test/stream_expectations.c | 107 +-- contrib/libcbor/test/stream_expectations.h | 71 +- ...pe_3_encoders_test.c => string_encoders_test.c} | 21 +- .../libcbor/test/{type_3_test.c => string_test.c} | 112 ++- ...{type_6_encoders_test.c => tag_encoders_test.c} | 15 +- contrib/libcbor/test/{type_6_test.c => tag_test.c} | 59 +- contrib/libcbor/test/test_allocator.c | 89 +++ contrib/libcbor/test/test_allocator.h | 35 + contrib/libcbor/test/type_4_test.c | 127 ---- contrib/libcbor/test/type_7_encoders_test.c | 109 --- ...type_0_encoders_test.c => uint_encoders_test.c} | 46 +- .../libcbor/test/{type_0_test.c => uint_test.c} | 58 +- contrib/libcbor/test/unicode_test.c | 23 +- lib/libcbor/Makefile | 3 +- 139 files changed, 5668 insertions(+), 2660 deletions(-) diff --cc contrib/libcbor/.circleci/config.yml index 000000000000,69371b67d624..69371b67d624 mode 000000,100644..100644 --- a/contrib/libcbor/.circleci/config.yml +++ b/contrib/libcbor/.circleci/config.yml diff --cc contrib/libcbor/.github/ISSUE_TEMPLATE/bug_report.md index 000000000000,75997d8424cc..75997d8424cc mode 000000,100644..100644 --- a/contrib/libcbor/.github/ISSUE_TEMPLATE/bug_report.md +++ b/contrib/libcbor/.github/ISSUE_TEMPLATE/bug_report.md diff --cc contrib/libcbor/.github/PULL_REQUEST_TEMPLATE index 000000000000,1174d56f9c7a..1174d56f9c7a mode 000000,100644..100644 --- a/contrib/libcbor/.github/PULL_REQUEST_TEMPLATE +++ b/contrib/libcbor/.github/PULL_REQUEST_TEMPLATE diff --cc contrib/libcbor/.github/workflows/fuzz-pr.yml index 000000000000,0e3c4fde4e02..0e3c4fde4e02 mode 000000,100644..100644 --- a/contrib/libcbor/.github/workflows/fuzz-pr.yml +++ b/contrib/libcbor/.github/workflows/fuzz-pr.yml diff --cc contrib/libcbor/.gitignore index b6fe00f938ad,000000000000..61f88a874965 mode 100644,000000..100644 --- a/contrib/libcbor/.gitignore +++ b/contrib/libcbor/.gitignore @@@ -1,8 -1,0 +1,16 @@@ +build +*~ +nbproject +.idea +doxygen_docs +*/*.out +cmake-build-debug +venv ++**.DS_Store ++.vscode ++# No top-level requirements, see doc/source ++requirements.txt ++examples/bazel/bazel-bazel ++examples/bazel/bazel-bin ++examples/bazel/bazel-out ++examples/bazel/bazel-testlogs diff --cc contrib/libcbor/Bazel.md index 000000000000,9fa2081f58fc..9fa2081f58fc mode 000000,100644..100644 --- a/contrib/libcbor/Bazel.md +++ b/contrib/libcbor/Bazel.md diff --cc contrib/libcbor/CMakeModules/JoinPaths.cmake index 000000000000,c68d91b84dbc..c68d91b84dbc mode 000000,100644..100644 --- a/contrib/libcbor/CMakeModules/JoinPaths.cmake +++ b/contrib/libcbor/CMakeModules/JoinPaths.cmake diff --cc contrib/libcbor/CONTRIBUTING.md index 000000000000,000000000000..cc834d21a46b new file mode 100644 --- /dev/null +++ b/contrib/libcbor/CONTRIBUTING.md @@@ -1,0 -1,0 +1,35 @@@ ++# Contributing to libcbor ++ ++libcbor is maintained by [@PJK](https://github.com/PJK) in his spare time on a best-effort basis. ++ ++Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described belows. ++ ++## Principles ++ ++**Bug reports and questions:** Bug reports and specific technical questions are always welcome. Feel free to open an [issue](https://github.com/PJK/libcbor/issues). ++ ++**Incremental improvements:** Bug fixes (including build scripts, examples, test, typos, CI/CD config, etc.) and documentation improvements (fixes of typos, inaccuracies, out of date content, etc.) are always welcome. Feel free to open a [PR](https://github.com/PJK/libcbor/pulls). ++ ++**New features:** I am looking to keep the scope of libcbor small. If you would like to add a feature, please open an issue with your proposal (or reach out to me privately) to discuss if the feature fits into libcbor before opening a PR. ++ ++**Major changes:** Please open an issue with your proposal (or reach out to me privately) to discuss if the improvement fits into cbor before opening a PR. ++ ++## Pull Request Process ++ ++1. Ensure that all CI checks pass ++2. Check that the PR is complete and of good quality ++ - Include a descriptive summary of the change. If the PR addresses an open issue, please link it. ++ - Code changes: Add tests ++ - If necessary: Update documentation, including any links ++3. Code changes: Update [the changelog](https://github.com/PJK/libcbor/blob/master/CHANGELOG.md). Do *not* change the version number. ++ ++## Interactions ++ ++I work on libcbor on a best effort basis. The typical response time is a few days. ++ ++If you do not receive a response in a few weeks, feel free to ping the PR or issue. ++ ++## Resources ++ ++- [Development documentation](https://libcbor.readthedocs.io/en/latest/development.html) ++ diff --cc contrib/libcbor/README.md index cffae9191d01,000000000000..6d34ba9d4dcb mode 100644,000000..100644 --- a/contrib/libcbor/README.md +++ b/contrib/libcbor/README.md @@@ -1,122 -1,0 +1,122 @@@ +# [libcbor](https://github.com/PJK/libcbor) + - [![Build Status](https://travis-ci.org/PJK/libcbor.svg?branch=master)](https://travis-ci.org/PJK/libcbor) ++[![CircleCI](https://circleci.com/gh/PJK/libcbor/tree/master.svg?style=svg)](https://circleci.com/gh/PJK/libcbor/tree/master) +[![Build status](https://ci.appveyor.com/api/projects/status/8kkmvmefelsxp5u2?svg=true)](https://ci.appveyor.com/project/PJK/libcbor) +[![Documentation Status](https://readthedocs.org/projects/libcbor/badge/?version=latest)](https://readthedocs.org/projects/libcbor/?badge=latest) +[![latest packaged version(s)](https://repology.org/badge/latest-versions/libcbor.svg)](https://repology.org/project/libcbor/versions) +[![codecov](https://codecov.io/gh/PJK/libcbor/branch/master/graph/badge.svg)](https://codecov.io/gh/PJK/libcbor) + - **libcbor** is a C library for parsing and generating [CBOR](http://tools.ietf.org/html/rfc7049), the general-purpose schema-less binary data format. ++**libcbor** is a C library for parsing and generating [CBOR](https://tools.ietf.org/html/rfc7049), the general-purpose schema-less binary data format. + +## Main features + - Complete RFC conformance + - Robust C99 implementation + - Layered architecture offers both control and convenience + - Flexible memory management + - No shared global state - threading friendly + - Proper handling of UTF-8 + - Full support for streams & incremental processing + - Extensive documentation and test suite + - No runtime dependencies, small footprint + +## Getting started + +### Compile from source + +```bash +git clone https://github.com/PJK/libcbor - cmake -DCMAKE_BUILD_TYPE=Release -DCBOR_CUSTOM_ALLOC=ON libcbor ++cmake -DCMAKE_BUILD_TYPE=Release libcbor +make +make install +``` + +### Homebrew + +```bash +brew install libcbor +``` + +### Ubuntu 18.04 and above + +```bash +sudo add-apt-repository universe +sudo apt-get install libcbor-dev +``` + +### Fedora & RPM friends + +```bash +yum install libcbor-devel +``` + +### Others + +
+ Packaged libcbor is available from 15+ major repositories. Click here for more detail + + [![Packaging status](https://repology.org/badge/vertical-allrepos/libcbor.svg)](https://repology.org/project/libcbor/versions) +
+ +## Usage example + +```c +#include +#include + - int main(int argc, char * argv[]) - { - /* Preallocate the map structure */ - cbor_item_t * root = cbor_new_definite_map(2); - /* Add the content */ - cbor_map_add(root, (struct cbor_pair) { - .key = cbor_move(cbor_build_string("Is CBOR awesome?")), - .value = cbor_move(cbor_build_bool(true)) - }); - cbor_map_add(root, (struct cbor_pair) { - .key = cbor_move(cbor_build_uint8(42)), - .value = cbor_move(cbor_build_string("Is the answer")) - }); - /* Output: `length` bytes of data in the `buffer` */ - unsigned char * buffer; - size_t buffer_size, - length = cbor_serialize_alloc(root, &buffer, &buffer_size); - - fwrite(buffer, 1, length, stdout); - free(buffer); - - fflush(stdout); - cbor_decref(&root); ++int main(void) { ++ /* Preallocate the map structure */ ++ cbor_item_t* root = cbor_new_definite_map(2); ++ /* Add the content */ ++ bool success = cbor_map_add( ++ root, (struct cbor_pair){ ++ .key = cbor_move(cbor_build_string("Is CBOR awesome?")), ++ .value = cbor_move(cbor_build_bool(true))}); ++ success &= cbor_map_add( ++ root, (struct cbor_pair){ ++ .key = cbor_move(cbor_build_uint8(42)), ++ .value = cbor_move(cbor_build_string("Is the answer"))}); ++ if (!success) return 1; ++ /* Output: `length` bytes of data in the `buffer` */ ++ unsigned char* buffer; ++ size_t buffer_size; ++ cbor_serialize_alloc(root, &buffer, &buffer_size); ++ ++ fwrite(buffer, 1, buffer_size, stdout); ++ free(buffer); ++ ++ fflush(stdout); ++ cbor_decref(&root); +} +``` + +## Documentation +Get the latest documentation at [libcbor.readthedocs.org](http://libcbor.readthedocs.org/) + +## Contributions + - All bug reports and contributions are welcome. Please see https://github.com/PJK/libcbor for more info. ++Bug reports and contributions are welcome. Please see [CONTRIBUTING.md](https://github.com/PJK/libcbor/blob/master/CONTRIBUTING.md) for more info. + +Kudos to all the [contributors](https://github.com/PJK/libcbor/graphs/contributors)! + +## License +The MIT License (MIT) + +Copyright (c) Pavel Kalvoda, 2014-2020 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --cc contrib/libcbor/doc/source/api/streaming_encoding.rst index 000000000000,25100da9b5e0..25100da9b5e0 mode 000000,100644..100644 --- a/contrib/libcbor/doc/source/api/streaming_encoding.rst +++ b/contrib/libcbor/doc/source/api/streaming_encoding.rst diff --cc contrib/libcbor/examples/bazel/README.md index 000000000000,455e2d38d3e5..455e2d38d3e5 mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/README.md +++ b/contrib/libcbor/examples/bazel/README.md diff --cc contrib/libcbor/examples/bazel/WORKSPACE index 000000000000,c7601f3035ff..c7601f3035ff mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/WORKSPACE +++ b/contrib/libcbor/examples/bazel/WORKSPACE diff --cc contrib/libcbor/examples/bazel/src/BUILD index 000000000000,d3acb578398a..d3acb578398a mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/src/BUILD +++ b/contrib/libcbor/examples/bazel/src/BUILD diff --cc contrib/libcbor/examples/bazel/src/hello.cc index 000000000000,5162d26e1b47..5162d26e1b47 mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/src/hello.cc +++ b/contrib/libcbor/examples/bazel/src/hello.cc diff --cc contrib/libcbor/examples/bazel/src/hello.h index 000000000000,3d50065cfdcf..3d50065cfdcf mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/src/hello.h +++ b/contrib/libcbor/examples/bazel/src/hello.h diff --cc contrib/libcbor/examples/bazel/src/hello_test.cc index 000000000000,68d8633c8772..68d8633c8772 mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/src/hello_test.cc +++ b/contrib/libcbor/examples/bazel/src/hello_test.cc diff --cc contrib/libcbor/examples/bazel/src/main.cc index 000000000000,6c1e4f52a03a..6c1e4f52a03a mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/src/main.cc +++ b/contrib/libcbor/examples/bazel/src/main.cc diff --cc contrib/libcbor/examples/bazel/third_party/BUILD index 000000000000,c4c443f1b562..c4c443f1b562 mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/third_party/BUILD +++ b/contrib/libcbor/examples/bazel/third_party/BUILD diff --cc contrib/libcbor/examples/bazel/third_party/libcbor.BUILD index 000000000000,45f4975b4fc8..45f4975b4fc8 mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/third_party/libcbor.BUILD +++ b/contrib/libcbor/examples/bazel/third_party/libcbor.BUILD diff --cc contrib/libcbor/examples/bazel/third_party/libcbor/BUILD index 000000000000,2ef8702fd308..2ef8702fd308 mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/third_party/libcbor/BUILD +++ b/contrib/libcbor/examples/bazel/third_party/libcbor/BUILD diff --cc contrib/libcbor/examples/bazel/third_party/libcbor/cbor/cbor_export.h index 000000000000,8bf3dea85c8f..8bf3dea85c8f mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/cbor_export.h +++ b/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/cbor_export.h diff --cc contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h index 000000000000,3472cf49d8fe..3472cf49d8fe mode 000000,100644..100644 --- a/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h +++ b/contrib/libcbor/examples/bazel/third_party/libcbor/cbor/configuration.h diff --cc contrib/libcbor/examples/streaming_array.c index 000000000000,d165e62b1c9e..d165e62b1c9e mode 000000,100644..100644 --- a/contrib/libcbor/examples/streaming_array.c +++ b/contrib/libcbor/examples/streaming_array.c diff --cc contrib/libcbor/test/array_test.c index 000000000000,1a241c051f2c..1a241c051f2c mode 000000,100644..100644 --- a/contrib/libcbor/test/array_test.c +++ b/contrib/libcbor/test/array_test.c diff --cc contrib/libcbor/test/float_ctrl_encoders_test.c index 000000000000,8940106d91d3..8940106d91d3 mode 000000,100644..100644 --- a/contrib/libcbor/test/float_ctrl_encoders_test.c +++ b/contrib/libcbor/test/float_ctrl_encoders_test.c diff --cc contrib/libcbor/test/memory_utils_test.c index 000000000000,6cf07c7da934..6cf07c7da934 mode 000000,100644..100644 --- a/contrib/libcbor/test/memory_utils_test.c +++ b/contrib/libcbor/test/memory_utils_test.c diff --cc contrib/libcbor/test/test_allocator.c index 000000000000,72ccf6591d25..72ccf6591d25 mode 000000,100644..100644 --- a/contrib/libcbor/test/test_allocator.c +++ b/contrib/libcbor/test/test_allocator.c diff --cc contrib/libcbor/test/test_allocator.h index 000000000000,0e58454edbd6..0e58454edbd6 mode 000000,100644..100644 --- a/contrib/libcbor/test/test_allocator.h +++ b/contrib/libcbor/test/test_allocator.h diff --cc lib/libcbor/Makefile index 455efdbfc8ee,000000000000..340d10fb896a mode 100644,000000..100644 --- a/lib/libcbor/Makefile +++ b/lib/libcbor/Makefile @@@ -1,35 -1,0 +1,36 @@@ +# $FreeBSD$ + +PACKAGE=ssh +LIB= cbor +PRIVATELIB= + +DIST=${SRCTOP}/contrib/libcbor +.PATH: ${DIST}/src + - SRCS= cbor.c ++SRCS= allocators.c ++SRCS+= cbor.c +SRCS+= cbor/arrays.c +SRCS+= cbor/bytestrings.c +SRCS+= cbor/callbacks.c +SRCS+= cbor/common.c +SRCS+= cbor/encoding.c +SRCS+= cbor/floats_ctrls.c +SRCS+= cbor/ints.c +SRCS+= cbor/maps.c +SRCS+= cbor/serialization.c +SRCS+= cbor/streaming.c +SRCS+= cbor/strings.c +SRCS+= cbor/tags.c +SRCS+= cbor/internal/builder_callbacks.c +SRCS+= cbor/internal/encoders.c +SRCS+= cbor/internal/loaders.c +SRCS+= cbor/internal/memory_utils.c +SRCS+= cbor/internal/stack.c +SRCS+= cbor/internal/unicode.c + +CFLAGS+= -I${DIST}/src -I${.CURDIR} + +WARNS?= 2 +MAN= + +.include From nobody Fri Apr 21 20:14: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 4Q35Mj0JFVz46qxT; Fri, 21 Apr 2023 20:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q35Mh0S95z3qfs; Fri, 21 Apr 2023 20:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682108048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qHElZYga0JlCqF+8nkNxIehU7ttPpBuUjQx/G9iuuuw=; b=o/8hl83WlX0gP1IeHGgbbBz0onmUP9ELuTwBXtpBpoJ45ryMO3+RdmxrZDb/zsMU1hcFNh 1TroWf4kCA3Q2imb7QHGyuuFnjyEk4Vz0UIGraMx1S9Fq+KmJ1xm2VaU5raYemXLHA2l6p yte4E1ooTBenrs/iwhzXlN5v0oBa6f/5GCC5xoAs2FIYYfv31+6PTzUm6hDtT+4W9BpuSY zfSzETos4GzcVcJeqAPXkhRyzLa9dcz6u2TlXCV15w0nSKpHhS+6cs104Z4gfQ/PI6PDTn uddwcM1cSNOHo799yPWIoXQenBh9D1AxRV3kL54IOkrLkWsvDP7Qly5sWFtaNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682108048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qHElZYga0JlCqF+8nkNxIehU7ttPpBuUjQx/G9iuuuw=; b=twfa8N2BiIebwtlBKBEZb2J94WA0DQ3W0ULYRWw4OwLQuPdOgecgjBdURu/h50WZDXwlxc mxv9UDr8WhfOlMBatn68sYmk2btlbj/Th1/Vev17W+jIMyMA1WLMiWhKmYLAzgvgdQmuRp w37JuA9Gp+42ujq+GxvsjWiYbK3Hl2rh4r/Rhsk0B4TXxvNlZFj8PyJPr4RMW6KkaRs+fI SuKigtIC/mYnZdjA1XyXhY3NNCLC3dSb0nYtz9u/kP3rmSpzRAM+idolGoxaEqG72h5T14 UHGDUURF9tdfgbZ27JpAtlHySrf3fW/dA/+QFW/kDFZJSGNSX0MSD4UO2UuygA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682108048; a=rsa-sha256; cv=none; b=O8f6URo33AuqPRG1R9PwEf9hNAFgGrBmJZ+lsUZJcFUIEpqhDzcc86xS8y6eXdYm1xRF8o xc8ORO7QimEEdietGr3ykHIoYrXBhSiqfDMBgyOirerZFOxzoFhONBhkPKbSdKrBRmpXyA wxP0dmF5ZGcBa7ZFxzTYWq+qz+OoatzTzLjbrBkz5YNnIr9KAh4GnNBG3ixCrL2/SXzU8T BJPsMOwzpL0Okv9o1yvmJ1Fg2cnLgC3etarshBbabXWzX83Ae5/8xB/+B0sfh7Itn5pQ0D n6RV1Oer2HLuX94Dg1mfKGbLaS8K385c+X3CGbqBGB4VxuhSzL15rOAToVvujw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q35Mg6XrTzYvg; Fri, 21 Apr 2023 20:14: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 33LKE7cL013404; Fri, 21 Apr 2023 20:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LKE7fL013403; Fri, 21 Apr 2023 20:14:07 GMT (envelope-from git) Date: Fri, 21 Apr 2023 20:14:07 GMT Message-Id: <202304212014.33LKE7fL013403@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: 81fa5c4a828b - main - llvm-strings: Install as strings when WITH_LLVM_BINUTILS=YES List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 81fa5c4a828bec9f1ead280c59c31bd423e6eeea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=81fa5c4a828bec9f1ead280c59c31bd423e6eeea commit 81fa5c4a828bec9f1ead280c59c31bd423e6eeea Author: Cameron Katri AuthorDate: 2023-04-05 19:53:33 +0000 Commit: Ed Maste CommitDate: 2023-04-21 20:13:40 +0000 llvm-strings: Install as strings when WITH_LLVM_BINUTILS=YES Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D32065 --- usr.bin/Makefile | 2 +- usr.bin/clang/llvm-strings/Makefile | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 417c564b2fae..19988d35c7ba 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -144,7 +144,6 @@ SUBDIR= alias \ split \ stat \ stdbuf \ - strings \ su \ systat \ tail \ @@ -258,6 +257,7 @@ SUBDIR.${MK_TOOLCHAIN}+= nm SUBDIR.${MK_TOOLCHAIN}+= objcopy SUBDIR.${MK_TOOLCHAIN}+= readelf SUBDIR.${MK_TOOLCHAIN}+= size +SUBDIR+= strings .endif SUBDIR.${MK_TOOLCHAIN}+= c89 SUBDIR.${MK_TOOLCHAIN}+= c99 diff --git a/usr.bin/clang/llvm-strings/Makefile b/usr.bin/clang/llvm-strings/Makefile index 1438aa847997..589c866820c4 100644 --- a/usr.bin/clang/llvm-strings/Makefile +++ b/usr.bin/clang/llvm-strings/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG_CXX= llvm-strings SRCDIR= llvm/tools/llvm-strings @@ -21,4 +23,9 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} +.if ${MK_LLVM_BINUTILS} != "no" +LINKS+= ${BINDIR}/llvm-strings ${BINDIR}/strings +MLINKS+= llvm-strings.1 strings.1 +.endif + .include "../llvm.prog.mk" From nobody Fri Apr 21 20:46: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 4Q364Y50ydz46sNt; Fri, 21 Apr 2023 20:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q364Y0Bn5z3MZy; Fri, 21 Apr 2023 20:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682109965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UB/uDZOIiS9oo15uKZZtGct3/P2pK8Ne89cZA8R9UPo=; b=F12Yj7kzA4KNDnP73L7k4xEc/MPADICBOHME9LShkNB55mIQQJd5WpMBhI73qLGMGg83MR k/TRUYNeM9LEl602OH+f6h+LhHns3eZ5SOhaHhXce4gGtTKnk4hdIUioXr9rBQkMwqL/n3 5ej4loh1IyuEulTZL3dbI23NbT/hS+uuG/xuW33t00JPGUCaAprbu9BNhkfncDaqH3Iqbk l5uSr12wMkRZaEzfiE5zrunm8/Cu1zgHE2nXOeU+HzJxRRTc9tz9TN9O2pnjY2WBqhfHBx RzfEirbC9R1CSzlI8pXP3nyV3iSTQAt87v0Xaoba2frI4LLdzCXspN9r68kZVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682109965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UB/uDZOIiS9oo15uKZZtGct3/P2pK8Ne89cZA8R9UPo=; b=CJaHkPO2Qbwc5qXoLfnydRSGZJall6VLoxXwnYh/rbPdHBq3tVe/SEmpdKn7auj8cm1MAW 8hg2mSSRJeA3anJPbrblFYg4CPe8hPIRG3bUDsU94/1Qn+N2/5CkMlOh7ABbXvy1hemrk+ 4IUSMiYyP+/XzIFmktl5Uj9YQnCIFoqpr9+BqljyYUNRdgErj9a7z4doJoOCDD+DAbqhzg YwmynNT2R0rt+9taOheLW5C5Kwjv3l5nR5QshIgbAlIVB2ajiCDu9iQrr0Ga59DauDo48R JtHgFEdOGxh++TdOObPvZaQ/lnjdLsIKfQsAnXs73LpLWO0OtdsdI2ApxvMAKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682109965; a=rsa-sha256; cv=none; b=awxW/Dui2hkZZSFM5dcCz28XR1h9Z5zAd+Zdl+BUb4bn79Y8WOSdXZQjgjE4Btx6TJZrCU R7K/2EvwhS7kGlymuOBUye3bCMfjyPmQeyYm2TpobbKhJsJoxO2K6lcIahTKqD9oEiQv91 MMEeiaZpMiiwAfy094jqBjGgE+b5RrLYQCJQADFWKsbKsGxr9dXl+ryuWH0LWgXlGnVmPM 0z5A/gHS3ySvtcfgFGRwrgWh9GJhD/PdwM8nMfTJYD205LMQjITJPZO8UIdtthwjx+8O6v sd7DftNPQzj3esfmg+AEwgSoh7Y3cUzJ18DKNKUu5foCaYb9rPPJpsbSrURNew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q364X6PnCzZXB; Fri, 21 Apr 2023 20:46: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 33LKk4Jr061766; Fri, 21 Apr 2023 20:46:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LKk4E7061765; Fri, 21 Apr 2023 20:46:04 GMT (envelope-from git) Date: Fri, 21 Apr 2023 20:46:04 GMT Message-Id: <202304212046.33LKk4E7061765@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: bf5c45448720 - stable/13 - Enable KERN_TLS by default in ARM64 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bf5c45448720e20208d3e8f2b563e5234c28159a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=bf5c45448720e20208d3e8f2b563e5234c28159a commit bf5c45448720e20208d3e8f2b563e5234c28159a Author: Allan Jude AuthorDate: 2021-01-28 20:48:37 +0000 Commit: Ed Maste CommitDate: 2023-04-21 13:46:35 +0000 Enable KERN_TLS by default in ARM64 GENERIC PR: 270759 Sponsored-by: Ampere Computing Submitted-by: Klara, Inc. (cherry picked from commit f9322ff6efa508df8368e31e3c4880cff11b0e23) --- sys/arm64/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 9f7a67e2079a..a81f58b410e5 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -39,6 +39,7 @@ options TCP_BLACKBOX # Enhanced TCP event logging options TCP_HHOOK # hhook(9) framework for TCP options TCP_RFC7413 # TCP Fast Open options SCTP_SUPPORT # Allow kldload of SCTP +options KERN_TLS # TLS transmit & receive offload options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists From nobody Fri Apr 21 21: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 4Q36r55P2Qz46vPf; Fri, 21 Apr 2023 21: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 4Q36r54W6dz3JVW; Fri, 21 Apr 2023 21: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=1682112021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3sN3Ih9lIjLbAtTrJixjOTuPvJKj/sEyYTROxOWJkK8=; b=obLHJYx8LLNssuDEXypWC35KMm9i+hO/c9g2X+m8ANHxBtANy8uzEGbD+s44cPboFIgBCl aPIyEv/KEX7k7EyYakLXdstfzIcQYVguuM8Hq3FUtih8pOwwCVI+umMjGWE2xVweDkzcNm pMFgCv7ifluPWBFHsKmAEGx4C3hjLIYK2AcsmC6b2cLK5ge0W8CX548hbebUXw6L2LYlwM srGLiLhaRaXNa3f4Xv4LOkCTd+w4hyAoB/DusGZpamKzpL00XU+v5EMc4d+XNSnkJibBOm 0PuZ1EKPRL+hh6J9AS5DSROOb9OSA1ShHYDzYFTEVQVXMciRXUvQQibpdWDvDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682112021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3sN3Ih9lIjLbAtTrJixjOTuPvJKj/sEyYTROxOWJkK8=; b=alv7I9/E8X0U1lWe81iUVyqlsixKmFkIVHqMG147K2oPSZYNAsm61mAXVJp99/B5CMyqXz 18l/Tg3bGLJm0Lv/3zWS7sZD1jM5xULmq+Lfzbmor00u9amYeuw3/13tkTdJ2EK1P+6/sQ yF8KsPzMlAhNUnbXi4mSh7A0dGmfEZLq0bHyMyRN1g4fieoDOr6ZcPyPLqc+8VcMeiAQ0v wIesaYSgxFCH94tD0fOBhrBq4ZO6GLyDEA12cWBnz7jnEpbu9tXRA8GVeCuNei48bQz2Z4 Yl5YciPX6Shk3z1Wbd8KFdSvfHJPRkHpNaw+mfs3eAXciuuZq5kZm3voO+kt+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682112021; a=rsa-sha256; cv=none; b=ZYxWOvkvr20bWP24RwttDpOv+wnezhXCvzNuGTide/PCAITmmkZLWoIVeW7MBvRX7vv7co KuEQCj1z4IV/VXCQUEiSyuMNbgbfKkqUvXO6pPEw5fHJnAi2rhUFSTYQH3sDbsvYMa1LUM vcT3p8PE1xwfLwBALDVUxZYnUfib2CsJn+mvVEW1+aS9/cOurbbMIggMTFPH5fBP2RaC2N D820nIsRmv/PY7nWbnPvF3QB3GSkuKIuQSZyCQidhkeztEVFvc+gk5r7PNGuISnHcgUKUi NVksR4CNTb2o1gNk0VOONQYdPNJkD5wkWgZStQiLhrSLzNTsSGCyhXMsutyLUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q36r53Wt5zbkx; Fri, 21 Apr 2023 21:20: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 33LLKLFu020907; Fri, 21 Apr 2023 21:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LLKLQp020906; Fri, 21 Apr 2023 21:20:21 GMT (envelope-from git) Date: Fri, 21 Apr 2023 21:20:21 GMT Message-Id: <202304212120.33LLKLQp020906@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: 5fbe15bc2187 - stable/13 - makefs: remove unused cd9660 options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5fbe15bc21870dec4042c46c83b2ce3c09fa8a87 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5fbe15bc21870dec4042c46c83b2ce3c09fa8a87 commit 5fbe15bc21870dec4042c46c83b2ce3c09fa8a87 Author: Ed Maste AuthorDate: 2023-03-31 12:52:22 +0000 Commit: Ed Maste CommitDate: 2023-04-21 21:18:24 +0000 makefs: remove unused cd9660 options Makefs defined "follow-symlinks" and "help" options, but they did nothing. Remove them. Obtained from: OpenBSD a8f1645688c2 Sponsored by: The FreeBSD Foundation (cherry picked from commit c753f49f7006d28786c29dfbb5f838b494e2146f) --- usr.sbin/makefs/cd9660.c | 13 ------------- usr.sbin/makefs/cd9660.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index 661eefc832da..4d82a8dc93a1 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -196,7 +196,6 @@ cd9660_set_defaults(iso9660_disk *diskStructure) /* Set up defaults in our own structure */ diskStructure->verbose_level = 0; diskStructure->keep_bad_images = 0; - diskStructure->follow_sym_links = 0; diskStructure->isoLevel = 2; diskStructure->rock_ridge_enabled = 0; @@ -266,10 +265,6 @@ cd9660_prep_opts(fsinfo_t *fsopts) OPT_NUM('v', "verbose", verbose_level, 0, 2, "Turns on verbose output"), - OPT_BOOL('h', "help", displayHelp, - "Show help message"), - OPT_BOOL('S', "follow-symlinks", follow_sym_links, - "Resolve symlinks in pathnames"), OPT_BOOL('R', "rockridge", rock_ridge_enabled, "Enable Rock-Ridge extensions"), OPT_BOOL('C', "chrp-boot", chrp_boot, @@ -491,14 +486,6 @@ cd9660_makefs(const char *image, const char *dir, fsnode *root, assert(dir != NULL); assert(root != NULL); - if (diskStructure->displayHelp) { - /* - * Display help here - probably want to put it in - * a separate function - */ - return; - } - if (diskStructure->verbose_level > 0) printf("%s: image %s directory %s root %p\n", __func__, image, dir, root); diff --git a/usr.sbin/makefs/cd9660.h b/usr.sbin/makefs/cd9660.h index fae2d2077c00..f271e0425517 100644 --- a/usr.sbin/makefs/cd9660.h +++ b/usr.sbin/makefs/cd9660.h @@ -238,9 +238,7 @@ typedef struct _iso9660_disk { int include_padding_areas; - int follow_sym_links; int verbose_level; - int displayHelp; int keep_bad_images; /* SUSP options and variables */ From nobody Fri Apr 21 21: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 4Q36r82n16z46vh7; Fri, 21 Apr 2023 21: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 4Q36r65HWrz3Jmq; Fri, 21 Apr 2023 21: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=1682112022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FSwcFK2dvdS7Mta0MZ831S5cWoEhcSKP54qx2VpZS0c=; b=aC9xc6oVbYBs8WaQzlmBpZrUtgWHd0Rbf/o8yfCnvB7c3DEFHIRbAhEgQKVrEFEl/3Jaef SvztAX9jIugKgKy568zZd2LpEkx9SMK4/wfv+etGbgUmp8Yt8uwa4mhawZZrgjIGqY640u 4yn138ugjTQcdMWusHBRcuXKVVnI/tUA5JyIPCFs8lWZq/PWuNFFDwub1bpG6DbEMiVzuR fBtndf6udFxdqsUcA0A2vXwU5MKQWiUmCDdBoK0J3sU3uIhU80poxAmlu2Mz1/XXQ/W8Vh vCcjmVwYjkUuEflQykGfe2u5dx23NJZoMwKhHObFrKBCR2YH1PFyy0cp6yecow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682112022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FSwcFK2dvdS7Mta0MZ831S5cWoEhcSKP54qx2VpZS0c=; b=F68Y0rWG13WbLrqaAhOKmgBZeJrbEMj2AixmpvGf5ZARfINTn5FNXm20G0AK+aO4ecix8b NdtLdgJmF4nOhWACwn15j/F38fYPyfKJ7fHVmjoYnkkU/s9ZJr4HsYm80DNeRP+i3iqa7R QqycvmTRDGoHqHZPCCeqJXPTCc2hkXt7To5oRtlglNOAhDPPMLhTTTH/uAmXqqdJdJ1Qnp QBdou4EkJe6mWIb5aJ3wuE0G+qUAN/H6T/P8f6wG+SgefqhcGmQ783Fs5W2qoSsW36WyVT ANAaPkLQa0SkAhs8t94NoHGul2CJn3HQ8Hp6mQwQjezmjjk0J92D8kkgus+F+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682112022; a=rsa-sha256; cv=none; b=XVzR+qCzY0sXx5+Uf2cvEit7gDgGHfKEZ7EzYXo2WSviryj+w0IZefU7NvfkisSt43N09y XBsa5+AyZg5MabZEEnAsz3MX2zGsZgje0v6DbmzXZnVowoRmLf6iLWRmNzY0bHHTLnufcE CaTERTvwJEHLnN4FcY2IKdP511MMawwrLpZHrdYU3nQiBmtd5CchO6MjMqBjtKfuBOfZkU cfQiGTXv3DJFQCdITl9833a+IvHYam8/7/LX6h9V605Hq/dA3E+4A5JFIFalPUaXwkTOR7 4MRTKTJlAdUMgzOiRh0c4dAnVEtIuC+rtIb3O0xbSEYq7u9zvGlSg5qryR+0gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q36r64PSszbTl; Fri, 21 Apr 2023 21:20: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 33LLKMZQ020929; Fri, 21 Apr 2023 21:20:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LLKMe7020928; Fri, 21 Apr 2023 21:20:22 GMT (envelope-from git) Date: Fri, 21 Apr 2023 21:20:22 GMT Message-Id: <202304212120.33LLKMe7020928@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: 6dda38e5ca07 - stable/13 - makefs: remove 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6dda38e5ca071c30d8aa6322988569b5473d95a8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6dda38e5ca071c30d8aa6322988569b5473d95a8 commit 6dda38e5ca071c30d8aa6322988569b5473d95a8 Author: Ed Maste AuthorDate: 2023-04-17 12:12:27 +0000 Commit: Ed Maste CommitDate: 2023-04-21 21:19:48 +0000 makefs: remove unused variable Reported by: Clang Sponsored by: The FreeBSD Foundation (cherry picked from commit 79ead0849707396cb2de0bab7e354fb099ea344e) --- usr.sbin/makefs/cd9660/cd9660_write.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/makefs/cd9660/cd9660_write.c b/usr.sbin/makefs/cd9660/cd9660_write.c index 6716c2f98704..95038320a059 100644 --- a/usr.sbin/makefs/cd9660/cd9660_write.c +++ b/usr.sbin/makefs/cd9660/cd9660_write.c @@ -429,7 +429,6 @@ cd9660_copy_file(iso9660_disk *diskStructure, FILE *fd, off_t start_sector, { FILE *rf; int bytes_read; - off_t sector = start_sector; int buf_size = diskStructure->sectorSize; char *buf; @@ -462,7 +461,6 @@ cd9660_copy_file(iso9660_disk *diskStructure, FILE *fd, off_t start_sector, (void)fclose(rf); return 0; } - sector++; } fclose(rf); From nobody Fri Apr 21 21: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 4Q36r847Bfz46vXw; Fri, 21 Apr 2023 21: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 4Q36r76CX1z3JVm; Fri, 21 Apr 2023 21: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=1682112023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s4FX7gyuUgJ/SbbTA2x2ZgPhI6j4Z4Ng1Tev3eSkPrk=; b=mlgIdCS8XSjzdUaxz/1AV6jDlZAmrvDmnsnM7FKOI+2tLwZ6sLXeHPofdtMmnxoqBBVOou 1FZ8/zq9Ff/Y0cqNhI2zq7EDHpcJtwiubhGNRhcUjXS4Aewc6UMxsw0zO5HQHx+k4hNuPW 4KAKNwzHZzxyXeuIAKuQ5JhX+WyPaWhUke2cph+5buaIU+moOX2rXKqzE0O99EXlkPjT0/ 0klkWP5LeKcaMqjJJyKhMFFr8PcPdEjdMscPrvGUFpYgr2JmyUbHOBQZPW8j3DI9QYIaRY wL75TCU9tgj2NFmg/4c3+HH/quv0DvRAxTOQ/JtSn8S3matuSP05lG32MTEEHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682112023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s4FX7gyuUgJ/SbbTA2x2ZgPhI6j4Z4Ng1Tev3eSkPrk=; b=aJKDHzU31zw6bIrH/VmbYHv1HMagUEGh0NMbQz+T6V7KaoadVStRr/JEmcxFHyhoqDTqtl +bT2d0Gbeo9PnYeO/DYTyxku3xn9894ZHbiO6Gvr/bDJz2Dmm+Gr+5qFTohv07K1W4DSfo +osgZQk2BMHp6uV68wanO3h8tBo0UuhX8B7468dCDD0/CqSxO65BBk1KOM09myLyakihzb AFMWQ2r8BUTjMG9f45+pHi4KUK5M9uQQQueZUB+Au4+2uAAkTJ6TzTDfERhjtCfwLxrgBU VE+2g7vTDAwHWO4NW295N81YSOGfvtwE9f9bV8/5eUfccBUR7UJu+rOt0qg+Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682112023; a=rsa-sha256; cv=none; b=gmSj8LXsRE9QUnQml/3G0mEYEJwzfPD2PSiubQZhT34DisFf4dKnIewJczSmDe9Dg6Tr3b 10d4VOB4Ne7JSFTBOhT9nxZb/VeOMIFRPn3BxPg2sK1uecjGclyVNOwMf9nkXeT70GusA/ z11Rb9NODiC2ezQ/0xf1OOYbso3R8nbllkrc1f1DA1YMpi8soH2/zr0Gno3ieYtlKk7Une bIHwg/ZsuIGJ6b7JTT3ZVy36TG0hQaXfTNShPhJ6+vP9WcpnIj9JFnxsQirp2QQPWWLZvv IHoysuA/QHN2bgBqCYk0hkkErQjsaugOnj8f/aftlnJ0awHuATAEe9JgklTyvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q36r75Js9zbZg; Fri, 21 Apr 2023 21:20: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 33LLKNqC020952; Fri, 21 Apr 2023 21:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LLKNH5020951; Fri, 21 Apr 2023 21:20:23 GMT (envelope-from git) Date: Fri, 21 Apr 2023 21:20:23 GMT Message-Id: <202304212120.33LLKNH5020951@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: 775defbe0c23 - stable/13 - makefs: use unsigned and %u for rock_ridge_move_count List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 775defbe0c2346aad87e313f9d56e973ad8a245d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=775defbe0c2346aad87e313f9d56e973ad8a245d commit 775defbe0c2346aad87e313f9d56e973ad8a245d Author: Ed Maste AuthorDate: 2023-04-10 22:53:53 +0000 Commit: Ed Maste CommitDate: 2023-04-21 21:19:48 +0000 makefs: use unsigned and %u for rock_ridge_move_count For diff reduction against NetBSD's makefs. Based on NetBSD git mirror commit 00991aee8248. With this change our makefs cd9660 support should be in sync up to NetBSD commit bdae6c9dc792 ("makefs(8): Nix trailing whitespace."). Sponsored by: The FreeBSD Foundation (cherry picked from commit 10854bf51747c172e45e365995ccf42aef2ab470) --- usr.sbin/makefs/cd9660.c | 2 +- usr.sbin/makefs/cd9660.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c index 4d82a8dc93a1..0c9be8274643 100644 --- a/usr.sbin/makefs/cd9660.c +++ b/usr.sbin/makefs/cd9660.c @@ -1255,7 +1255,7 @@ cd9660_rrip_move_directory(iso9660_disk *diskStructure, cd9660node *dir) return NULL; diskStructure->rock_ridge_move_count++; - snprintf(newname, sizeof(newname), "%08i", + snprintf(newname, sizeof(newname), "%08u", diskStructure->rock_ridge_move_count); /* Point to old parent */ diff --git a/usr.sbin/makefs/cd9660.h b/usr.sbin/makefs/cd9660.h index f271e0425517..4cd8cd471672 100644 --- a/usr.sbin/makefs/cd9660.h +++ b/usr.sbin/makefs/cd9660.h @@ -249,7 +249,7 @@ typedef struct _iso9660_disk { int rock_ridge_enabled; /* Other Rock Ridge Variables */ char *rock_ridge_renamed_dir_name; - int rock_ridge_move_count; + unsigned rock_ridge_move_count; cd9660node *rr_moved_dir; int archimedes_enabled; From nobody Fri Apr 21 22:40: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 4Q38cx2w5cz1HFMT for ; Fri, 21 Apr 2023 22:40:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (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 4Q38cx1HCxz3mc8 for ; Fri, 21 Apr 2023 22:40:49 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-94f7a0818aeso303849666b.2 for ; Fri, 21 Apr 2023 15:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1682116848; x=1684708848; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PRvxsIKWAnwBBkzv+1sikIYoGex4MtQyaYqu2hR6gLE=; b=ca6EGPbSB1vt/jVaJgULR6mLj8FnMHH7+aGAeODjqNC8MiKZbfciEkIl0JPpEZGwEA hSeBlowZHs3gBmOkTvDAYFjXDgp94z/NJs5QpjMdwwcEU1GLRyPQP8SX/dY8iAd5wtgu mCZJXd5GOue2QfEwOYnu8kO8MB38w66+sv76rmnhwjW2q779ciKBMo4qWEqYDEMaiW7f j5SPYz9plPg8EkvgU447FHJl9RB1kgYSpaG6sm9dYK1NrKUylMSwtKNFDSFVSF/Z/zxR 4+IYLpYhnaxSteFiVKKSRTm29pGnj4Gpp9L80+cn1+H4D35Lp9lOsqz10utLQUMhGiSJ HWXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682116848; x=1684708848; 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=PRvxsIKWAnwBBkzv+1sikIYoGex4MtQyaYqu2hR6gLE=; b=dT7hXEHKjLnpz+GT4D3TRxSKEmXG1WK/9Sl47iV3bSmfil0lTdWp2qyhQfkc3/MJT+ U1CJ/1FR+cGnvQviXNAw4CInqwP8S5x6MUI9BgifWznE6iQIRF2+bi48vADYJdL0R4cR UgzOw6gH7HfmSM6NfStDcGxf06ZJwS7EhBF8PBIcqeJQQ/rRuk4RVlPuGn/9WXz+h/Cy UF9L6WeMd0rZzG0GQCjeVEo6jgrwtOY3aUJFSGU3LckCuZpFYTm4FSB+dTDJnh/vU6vl xo3y8HdJqVdf+e5ex7tM1vJ5m5JYs7YQFPaFutceetT+TLm15blk7dzAqpsvCSnN0jTW akoA== X-Gm-Message-State: AAQBX9dTqn5UCYGsgRgKqc0xW+XgM1hSohkxqa7LRj3SLNhNso21rk0v gh1yB3uTJ4wyQ3PMNkm5ZMJvCUtup41qqY3QxeWdUQ== X-Google-Smtp-Source: AKy350YfOGRxP+BCTuo2Usv+02tiQK+GimeiYnE+mQ/HgvkJvIefjJaT+qM9GnG+cHPEYVcYmd3nFU2VI4UrvUEeuJc= X-Received: by 2002:a17:906:7050:b0:94f:101:1daa with SMTP id r16-20020a170906705000b0094f01011daamr3195178ejj.13.1682116847496; Fri, 21 Apr 2023 15:40:47 -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: <202304202219.33KMJSY0042283@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 21 Apr 2023 16:40:36 -0600 Message-ID: Subject: Re: git: 559b94a12257 - main - syscall.master: Fix comments To: Brooks Davis Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000002a846005f9e059b7" X-Rspamd-Queue-Id: 4Q38cx1HCxz3mc8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.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 --0000000000002a846005f9e059b7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 21, 2023 at 10:37=E2=80=AFAM Brooks Davis = wrote: > On Thu, Apr 20, 2023 at 10:19:28PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D559b94a12257807115bf84264936f0d= e2ac3884e > > > > commit 559b94a12257807115bf84264936f0de2ac3884e > > Author: Warner Losh > > AuthorDate: 2023-04-20 22:16:21 +0000 > > Commit: Warner Losh > > CommitDate: 2023-04-20 22:18:02 +0000 > > > > syscall.master: Fix comments > > > > Have more accruate comments. While #if, #else, etc are copied to th= e > > header files, lines that don't start with # are not. And #include > files > > are only output to sysinc (which winds up at the front of > init_sysent.c > > which seems a bit odd). This is all radically undocumented, and > likely > > has drifted somewhat from 4.4BSD and what other systems do (they've > > drifted too, fwiw). > > We probably want to tighten what we do a fair bit with regard to '#' > lines and perhaps make syscalls.master's format more explicit about > what's being copied where. The historic behavior of blindly emitting lin= es > beginning with '#' was there to support manual specification of things > like padding of arguments to achieve 64-bit alignment on non-i386, 32-bit > architectures. I think we should likely remove the support entirely post > 14 > branch (I'd kept it after the compat32 generation code because I was > worried about breaking downstream consumers with custom syscalls, but by > now they have had time to migrate.) > Agreed. The # process is broken now for #ifdef, etc based one what's copied where. I've started shoveling the code from makesyscalls.lua into a series of *.lua files with classes for each item rather than having a huge ball of code that's a hopeless twisty maze that's hard to extend. The goal is to expand the remit of successor to generate tables for truss, and a bunch of things for qemu bsd-user to reduce the tedious and error-prone hand coding. This may also support cheri-on-freebsd, but I'm going to need someone on the CHERI team to work closely with me on this. Since it's all generated, the special needs of cheri can be accommodated more easily and automatically I believe. It would also allow the cheri bsd-user to update past 5.x (as well as FreeBSD's to move on from 3.1). It might also allow some non-threaded non-specialised FooBSD on BarBSD programs to work with tweaks to the generataor (though NetBSD's and OpenBSD's syscall.master contains a lot less metadata than FreeBSD, so that would need to be addressed before this is a non-starter). I'd also like to write syscall.master.9. I've written maybe 30-40% of the new thing based either on cut and paste code, or with a rewrite to simplify. If you are interested, you can get in touch... Warner --0000000000002a846005f9e059b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Apr 21, 2023 at 10:37=E2=80= =AFAM Brooks Davis <brooks@freebsd= .org> wrote:
On Thu, Apr 20, 2023 at 10:19:28PM +0000, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D559b94a12257807115bf84264936f0de2ac3884e<= /a>
>
> commit 559b94a12257807115bf84264936f0de2ac3884e
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2023-04-20 22:16:21 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-04-20 22:18:02 +0000
>
>=C2=A0 =C2=A0 =C2=A0syscall.master: Fix comments
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Have more accruate comments. While #if, #else, etc = are copied to the
>=C2=A0 =C2=A0 =C2=A0header files, lines that don't start with # are= not.=C2=A0 And #include files
>=C2=A0 =C2=A0 =C2=A0are only output to sysinc (which winds up at the fr= ont of init_sysent.c
>=C2=A0 =C2=A0 =C2=A0which seems a bit odd). This is all radically undoc= umented, and likely
>=C2=A0 =C2=A0 =C2=A0has drifted somewhat from 4.4BSD and what other sys= tems do (they've
>=C2=A0 =C2=A0 =C2=A0drifted too, fwiw).

We probably want to tighten what we do a fair bit with regard to '#'= ;
lines and perhaps make syscalls.master's format more explicit about
what's being copied where.=C2=A0 The historic behavior of blindly emitt= ing lines
beginning with '#' was there to support manual specification of thi= ngs
like padding of arguments to achieve 64-bit alignment on non-i386, 32-bit architectures.=C2=A0 I think we should likely remove the support entirely p= ost 14
branch (I'd kept it after the compat32 generation code because I was worried about breaking downstream consumers with custom syscalls, but by now they have had time to migrate.)

generated, the special needs of cheri can be accommodated more easily an= d



=
Warner
--0000000000002a846005f9e059b7-- From nobody Sat Apr 22 04:44:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q3JhK2m6zz469HX; Sat, 22 Apr 2023 04:44: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 4Q3JhK0vS3z3DRc; Sat, 22 Apr 2023 04:44:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682138657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rnX8wUmJlIzXXO/r82z0uSOJygzUulCGnSYHVoDYZI=; b=neABZqXQQg3tHMtrkwdNtgOUUsEd46HAmAS0+XWFN3ZuhekkD4oAl2t5ChV7il8fRrtN7G heELPxmZb0Z2suGOTX5iA0pdd5bPT7000xeoTo36oPRjZ3MGIw+5UDb69U908jkdD3G2Yr jPaLcDLiMuYQo37AGAEYuzbDyYgejA+VZK2vTV31H8E+7aLOsNx7jxyK4KJ0Rt65C+rV+o g8gpwvOkK8N1AFzYC/warYfAZYYp5tKh4ZQCiiYHgU7jX8JMZvRFQXk/bX5EGvv2TWO8wv UNMA6heGQBiCVthYw9IKZ9nQ92cMmRV5DlDipn+KDxN8KfaMZT6cz3GcKvVE8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682138657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rnX8wUmJlIzXXO/r82z0uSOJygzUulCGnSYHVoDYZI=; b=T6eoXV4uw9TolK8DzJhoGTI46RfI8opD6HKPKjDfP6uoWsSxbHu0aXv3oihh1WfGTkymxw pN5WXnrUFbGcjRGbXifbrsszSRy7sUbxOoHy8Flj1wF09mep1JuHicSD32uQ4uHJDxilOV mhUTSN3ED8nJ57iXPYxeto9Mwys8nJGfhW7anysmOUK44RO8PCzyHjWkTFStkaIT0FgJMf 52Z4r/O77uA3xZoepvn/CAnaTwg7uUyjTwIRt59H2MIdq1gQgqgZkNdT6YMa2AfUju37rx XS3OUXn4dy+Cc/gVguaiNxtRVw5MZ1hMC0/CPVfmtWqRMeQJQa6X5NKKlL0mag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682138657; a=rsa-sha256; cv=none; b=ibdVe+A4qGniOUB/OYJGB+hjlELS6g49FHD8CVHiDgrCUha+slLCkPQPmA/ZVxk9djWEm6 ekBS7zPEVsq92TQFxK1mw7mRIdWOAZiYQYH3wEIRolEDy5X2psEddLmruBBEdIyC4exy6n fe0+LLTi+li2QErPwmyqcnX27fMRRBpd47vwOMIfaVemI9GMpaU0dC8VjlROvYUgctEZGe qL9+PV00G5MO0vb58SuzBq3hfqBo/lFyWfv3Lg30hchoTFJUB8XouQ9PCKpfUuPTEiXOPO LhSUuBw/ZgiNH3jBkbq9ecGPWspGm50t0MjJEOFUFkb+8vV0Xn1Y8Wyu7a0U+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3JhK0168zp8r; Sat, 22 Apr 2023 04:44: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 33M4iG0m052010; Sat, 22 Apr 2023 04:44:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M4iGY0052009; Sat, 22 Apr 2023 04:44:16 GMT (envelope-from git) Date: Sat, 22 Apr 2023 04:44:16 GMT Message-Id: <202304220444.33M4iGY0052009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 02a7d117b591 - stable/13 - unionfs.5: Use '.An -nosplit' in the AUTHORS 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 02a7d117b5914dd8c42b8d98fe92faca381148bd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=02a7d117b5914dd8c42b8d98fe92faca381148bd commit 02a7d117b5914dd8c42b8d98fe92faca381148bd Author: Gordon Bergling AuthorDate: 2023-04-19 15:11:41 +0000 Commit: Gordon Bergling CommitDate: 2023-04-22 04:44:05 +0000 unionfs.5: Use '.An -nosplit' in the AUTHORS section Use '.An -nosplit' in the AUTHORS section to prevent line breaks. (cherry picked from commit 409731e7d71358cda3d23d903607614c29680038) --- share/man/man5/unionfs.5 | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man5/unionfs.5 b/share/man/man5/unionfs.5 index 7d5e16e3ff68..2f781c0899e7 100644 --- a/share/man/man5/unionfs.5 +++ b/share/man/man5/unionfs.5 @@ -69,6 +69,7 @@ The device driver first appeared in .Fx 5.0 . .Sh AUTHORS +.An -nosplit The .Nm device driver was written by Jan-Simon Pendry for From nobody Sat Apr 22 04: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 4Q3Jhd6Bz2z468CV; Sat, 22 Apr 2023 04: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 4Q3Jhd20SNz3Dys; Sat, 22 Apr 2023 04: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=1682138673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2bh+HFKEfC++7khBjBLq1bBREpVb2x0x0Q8TNTEF6fk=; b=HoraY2pKX+k2o4ZUZGZDXBOcuKZCmx3p78JCAqlLtfVseMFJ2NGf8Qe1pYEYnQu3dpB159 R0829NSF/QITtmv/pTO/nLCP+vyHTpWR5vczyr76TT3vhrGV6OkDV8o+mp8btH813Xo9EJ EWpysJJyuPOnnDnlNEmr7hr+KPeUjJIxSivGvpEsEPJCvSgllIUqmagiRarzM13ejG7/xx vaBR6981WgZWg/NtW3zCoe6K5rktYXF9vnrJz+MCuTiPjYkZnllyJLDMf9gRgjwSW611I/ fPa74e+4fNBdt6ikoBPkbWZdMlI1gtY1fDOmWJp4IZ6/FpYHSKXaLQqpTJr9Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682138673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2bh+HFKEfC++7khBjBLq1bBREpVb2x0x0Q8TNTEF6fk=; b=VjC+OvGdPRiKGfdiKQOIYJnsT6WWzeK7BQoTOQRsSEbmFjMf9pJjMBGX6Ibn92tcSjgX3a B5a5+rRcya4+l1BbyJGYl5KTVKoAXcOxBItenopOeE76l89AtmgXzXFPKhbZy2nKextH+q uUJIkdipYTiCD3BpEbdxS0IkbyEsshvrehzycjW4gzg2Ukb9XX84gxbWbiiPzLDPPHM2RU jDRRKdKPxuZYo8kAQ971fq7adMxQfODHNHyiqS9mT3QCuz/TbE1MO87/tenpoalv5P4Lkl 3qDwVGrb/EDyBIU5qMtc9BK9M40q+Xt7A/QidrAHrcOSqlrxN5GcYRLLoHG0gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682138673; a=rsa-sha256; cv=none; b=QfYlQ7JBkavosL9re1WtlV/vhAuq0QIJtCS3habLPHzp+p0O94Ba27uV6+4AV6LsIwwPCr 6Tx6Lxq82QzIGnXwVGvHgjY5CMB+BXM2bwiByVE+U0mh1hk6L+yniPU+qOXIKb9kZK7OIi GedvaWxY66w3a6oCwra5ZmMk9V1eAzpgc8KaVbOWLYAHZXG5u2DA7bgmICQMAwraVhD4zZ 8c2vT6L/+nT1l6+TcPE725GLufFdMp8uy2SIs4GPE5XhiSdTbqiRgahXngRtiTmO1EI0BC 7RfU5q8GcpPr8XDUi0TqaGzPaB4KMZVfG1cIcqKY4arHEaQSQ6r2QrC9MwzwNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3Jhd15jtzp0n; Sat, 22 Apr 2023 04: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 33M4iXKJ052148; Sat, 22 Apr 2023 04: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 33M4iXoN052147; Sat, 22 Apr 2023 04:44:33 GMT (envelope-from git) Date: Sat, 22 Apr 2023 04:44:33 GMT Message-Id: <202304220444.33M4iXoN052147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 14089ff9c21d - stable/12 - unionfs.5: Use '.An -nosplit' in the AUTHORS 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 14089ff9c21d7de7a08351c7e7ff0c154b939e62 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=14089ff9c21d7de7a08351c7e7ff0c154b939e62 commit 14089ff9c21d7de7a08351c7e7ff0c154b939e62 Author: Gordon Bergling AuthorDate: 2023-04-19 15:11:41 +0000 Commit: Gordon Bergling CommitDate: 2023-04-22 04:44:24 +0000 unionfs.5: Use '.An -nosplit' in the AUTHORS section Use '.An -nosplit' in the AUTHORS section to prevent line breaks. (cherry picked from commit 409731e7d71358cda3d23d903607614c29680038) --- share/man/man5/unionfs.5 | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man5/unionfs.5 b/share/man/man5/unionfs.5 index 7d5e16e3ff68..2f781c0899e7 100644 --- a/share/man/man5/unionfs.5 +++ b/share/man/man5/unionfs.5 @@ -69,6 +69,7 @@ The device driver first appeared in .Fx 5.0 . .Sh AUTHORS +.An -nosplit The .Nm device driver was written by Jan-Simon Pendry for From nobody Sat Apr 22 06:31:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q3M3v1TH0z46GqH; Sat, 22 Apr 2023 06:31:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q3M3v0ZpVz4lGN; Sat, 22 Apr 2023 06:31:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682145083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ae23adQlQ907MBcD0pOLVdPNbvDoZ8iBEq4wrY0M1iE=; b=UXf+zRWCLo3ycwSNDkRxU7lH8m17c0AjAKCHzWeIbXBnYsQYW95xLRVjuCQYbDlW9LvM70 JtCVqq7zAFClhXiNtQrPOtOk+RfjybMrCG/A8HWALadWMXQdsReYeapGUsnycrnivwpYFY 4Z0AJHry2Rz4EPC7R/WAdjAOlm7L2qMid0ebi6p6vYV52TY6hFemmmdojwefXg0Dgb4/w6 ikgKjP6NFpsBF8hkL7GGvc28eoi/DeDepDAz/+GaGRuD9IR9XR9DnsoBMvBIEpjyabci6r WLZfb+8LdaTafiFhj86g0RIxTukDbhxUeUO2Wg8q+jjpbkrk4JLHR1yxkQEp1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682145083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ae23adQlQ907MBcD0pOLVdPNbvDoZ8iBEq4wrY0M1iE=; b=vg9WbhtJrdek/hS9pPFIXk9NJ8hCuBFR7H0TOhUVq6ZSd9IYdU3REzlH6f+KRY/M9obWFo usfWJe9mSRLdoURPMu+y++zRV3TvmT7taapj3DgyuGHlDTxd4fdCfto9ey29LCidStc+6E cFG6jQ1ukqNQ0jLfQdI6nD7PKdwDMP7al4uBwOx6PiVN6sREKtBOAe1LrLXRx8JSeRhYxU Xgn7/+OLUD+hM44vlRfNUfKeFOq47fQfwJ+MLE94iqT/2Hw/aXjK4uomKOngTgR+qi7u2Z ju18zjI4CSdJgLXC4ZvzjrKt4GoBmu6pQu0feHZ7P1UG6B0p/+wSSR+MAzCftQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682145083; a=rsa-sha256; cv=none; b=A54dLKmclKTCuojB1vHVqYxO0k1AJhLb4HeRWcwneuJt0MlW/JbuFJKXNDd/IqKKn1LsRG JYyTMpSARSz3e0urDQKlupm3ge3CAOQnBAJJFB8Czd4D9aihVOHBZhSvxzXQuvmjGoQfho LjNHBA0S9eLkOfPbbMXDfLpUDetyYSElshfskPF0J8Dj8V8DZ4WiNUsvP+AvyEncBW2XB0 9Oq+8oYNxvrrcqoAxlf18vFGATIWEmuNsZy3QrmVUUH9Zjtm8S0U7GBm3+CUwq4EkQP19u TzNZPUv0o2cwI+y2A00gVqwsNkGqppB7lPUNOnd2UXMAy95HevStKbxP8Kw4kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3M3t6l7Hzs1T; Sat, 22 Apr 2023 06:31: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 33M6VM79026766; Sat, 22 Apr 2023 06:31:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M6VMYQ026765; Sat, 22 Apr 2023 06:31:22 GMT (envelope-from git) Date: Sat, 22 Apr 2023 06:31:22 GMT Message-Id: <202304220631.33M6VMYQ026765@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: 16e9ec4406c8 - main - stand: mark unused argment as unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16e9ec4406c8bf4e06d72e97ebd47bc8dd6c0319 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=16e9ec4406c8bf4e06d72e97ebd47bc8dd6c0319 commit 16e9ec4406c8bf4e06d72e97ebd47bc8dd6c0319 Author: Warner Losh AuthorDate: 2023-04-22 06:29:03 +0000 Commit: Warner Losh CommitDate: 2023-04-22 06:30:43 +0000 stand: mark unused argment as unused We don't use the 'ver' argument for uuids sometimes, so mark it unused. Sponsored by: Netflix --- stand/libsa/smbios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index 257aa15bd5f5..657e1635e6e1 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -198,7 +198,7 @@ smbios_setenv(const char *name, caddr_t addr, const int offset) #define UUID_GET(base, off) (*(UUID_TYPE *)((base) + (off))) static void -smbios_setuuid(const char *name, const caddr_t addr, const int ver) +smbios_setuuid(const char *name, const caddr_t addr, const int ver __unused) { char uuid[37]; int byteorder, i, ones, zeros; From nobody Sat Apr 22 08: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 4Q3PjX2H7Lz46PML; Sat, 22 Apr 2023 08:30: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 4Q3PjW4dXFz3mlV; Sat, 22 Apr 2023 08:30:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682152239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zIFlpyasGz8y1Jz8HcbL7DbYXzx8C7LN+zabAWRKZ18=; b=bu96CmeC3J9oqkkcPFHUv4Jm09uU6PsWtDeaGIIEfqNd2HvDj+FvMWEidJcZ+BP9CrLAOg 5n0F5yT4qQbuWvnMd6r8F4B9Tu/LvXiGq1eqgqVtYFUWvJgrtkl2byMwsOUFuO1eplFRbl sotrMQmpUtFA1p3VCEVxJU52fuIhnxpa3VX04qyYNSmFBhmAaxpspff8a4L/4zE8aPwEqO Er3E/vlMtmU3lLlyt/Jp/4Qf94Us0K1Ea1hKwHjYqdkMhzYk0OUDDZ40Pkn4/MpyWWwLck vaGqO6nrq5RJhDrQzcum5ASxG0tmeyOZiu48UakxGNJiaMaoiVlmbhz4Ce/Chw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682152239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zIFlpyasGz8y1Jz8HcbL7DbYXzx8C7LN+zabAWRKZ18=; b=q4kDia44IbH0E0+C7ZFX+P7gWwGxH6wIGNLzUwVRWG4b9qs3UTh8DjOnIx04eGL3XZHM1l 9KHehd84Xo+hH084dYp2aa+eOGNRpJC79Pi4UaFhSqe7xjv3rPev5WGSDy6lrMaJUXJtZs s554lGgPJUo1z2LVC4it02SphSFHfmCqnzgYxwXAP63up+kVkus4Y9suykN8ohRnjsva6I LGYkUMOxd6O7XL1BHqJc0moqDB3Je4xwjkVXCzGyspYorI95PJCiA09WXQCWe/LT8MHoaI H6jPs/v78K3wrne/S76COroO/iVp3K78djiQ67iq7aTFCYaUOeP7ZuaM4CBmlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682152239; a=rsa-sha256; cv=none; b=m+VlpnYtFYZWMUSLngH0vmkv/ejICGDcDOlvOzfQfJiewfoJiwCGNMPDxzPOR3ru4TcrM6 VCxftFTMmUIrlgHNQWaLBEOieDq0/rQqe7Nm2CdQgKY5R4G7Uc6hrwwSIiQaOiJMcTQqsb cIKIKqkPy486nKLtPb9B9MHAWgPEB6y9RqeBU+WUkG0axEhG/W/Dc7j5uptWVEPsbwfrsE 3PJqANJLd8og/yrV9ZL84zW1fqlEr1GqO8/o0SW4Qc7VUICk61Tz9TrG9gONS1q1Abt8OR 3mbu5D+bxQEGuxjtsL0rAzJ7oz6zktMI/Qb9wKWeZOorr8IneLWzUbUUeChJNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3PjW2784zvZ5; Sat, 22 Apr 2023 08:30: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 33M8Ud05023811; Sat, 22 Apr 2023 08: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 33M8Uduo023810; Sat, 22 Apr 2023 08:30:39 GMT (envelope-from git) Date: Sat, 22 Apr 2023 08:30:39 GMT Message-Id: <202304220830.33M8Uduo023810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: b14c03f808c4 - main - LinuxKPI: define acpi_put_table() in List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b14c03f808c415248ae7ec0f0476176ad521d67b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=b14c03f808c415248ae7ec0f0476176ad521d67b commit b14c03f808c415248ae7ec0f0476176ad521d67b Author: Vladimir Kondratyev AuthorDate: 2023-04-22 08:29:29 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-04-22 08:29:29 +0000 LinuxKPI: define acpi_put_table() in FreeBSD ACPICA calls it AcpiPutTable() Required by: drm-kmod 5.15-lts Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D39551 --- sys/compat/linuxkpi/common/include/acpi/acpi.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/acpi/acpi.h b/sys/compat/linuxkpi/common/include/acpi/acpi.h index e996301e27f0..4e187574c82d 100644 --- a/sys/compat/linuxkpi/common/include/acpi/acpi.h +++ b/sys/compat/linuxkpi/common/include/acpi/acpi.h @@ -97,4 +97,10 @@ acpi_get_table(ACPI_STRING Signature, UINT32 Instance, return (AcpiGetTable(Signature, Instance, OutTable)); } +static inline void +acpi_put_table(ACPI_TABLE_HEADER *Table) +{ + AcpiPutTable(Table); +} + #endif /* _LINUXKPI_ACPI_ACPI_H_ */ From nobody Sat Apr 22 08:30: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 4Q3PjY1t9dz46PvH; Sat, 22 Apr 2023 08: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 4Q3PjX5Nlpz3mtN; Sat, 22 Apr 2023 08: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=1682152240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOX3JvgsfeNE5myxzSSZvUJJtn2Onkgna6o9Yk2jL5w=; b=YfTOynryCRU8REg283KsYoMz2wM4L3tKebbfaJKTU3mMDkMHRr1V47peOMJv1UomaIwyW6 quWyeJsCmBDfOuFI+M4VrK3m60LJabawrBTgb9KVokUyhLT/+2L8kB/cIKcybe9vGntRkS zYwSkkNk9RmoJUedoYBNZVrxUl/txqzLTrwoCTsYjfNn954/2/LVio7uR1Oj+9GbWM3KC6 sxSLpPX66cPanNr//1RKpv02xbMvFqrNm00rRaK4oI5tN9uIDR2jaOHL1v3qWEQtyZnJFI fDkZ5EdtgnCEC99CAO1IG9uqng9vZUj3J50kjzmsAOYa4/DKprCo9mZxnTpEYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682152240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cOX3JvgsfeNE5myxzSSZvUJJtn2Onkgna6o9Yk2jL5w=; b=UWVwLy4u2PnRwFaiP5cZXhavgfOYwHswIEwAjCIYYoo5/sYkQ5Nl7OhA2x0xtzt7ALZ+d/ Cokby/6DQY5KqQoYX6VpJ8hULNavm2N3l0DaUlC23G4OCIjMe9hlziu1OxrPW+dSFKoVA7 6TQiaErCcWrOO4DpNXsVBRKUZQd5HtbC8q3BhErT1mto1kBGgLIcHt19uuIMWYTb8n9p0E GSyM+K6VyLk2uLKJg3Rpw3qZkRCQSVCe+IwOI8lNCP4RGtm0jn0c5sBN2FP6G0NYTR7Qtx OO+fubCiXYZIXShgXe3oDHkkdTPqrypRuBd5irCio/SZTK8VeYkjWNnkEDSAXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682152240; a=rsa-sha256; cv=none; b=WNEccCguo+juLCEMo18q+TPYMwW2wqEq5D7EfABL7zIJUQycAOsdxW2N1qEtruG77PM8Nq P96LWBZ9W6XhvLvctzGzXswTVanyytghQNPOVyKN6/xOYaZrnjXnZa/Y89QoTpUQDy/AG+ 27YxIEcm7lpRmt4H8C3pEFZQOs8BqgVeZ5jJhrNrTJc1EwdpFVelg+ohDtEzw01XRPCVU6 f3INN7bhYspF3T9tjtbTFtZa2eiP90Dp+cjnLqBnGmzUPo9wDJSUujnEJkPSvOXJ/V+Sg8 ckk00V/xYQqUkjCjZX3MDPzy55cuqy6vOJjyb069bUJ0UPetgJjFUM51Pyy61Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3PjX39kjzvD7; Sat, 22 Apr 2023 08: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 33M8Ueov023830; Sat, 22 Apr 2023 08:30:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M8UeAt023829; Sat, 22 Apr 2023 08:30:40 GMT (envelope-from git) Date: Sat, 22 Apr 2023 08:30:40 GMT Message-Id: <202304220830.33M8UeAt023829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: e5cf9deb61fd - main - LinuxKPI: Add bitmap_to_arr32() to List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5cf9deb61fdc52c7647f4669a64d3fae126db94 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e5cf9deb61fdc52c7647f4669a64d3fae126db94 commit e5cf9deb61fdc52c7647f4669a64d3fae126db94 Author: Vladimir Kondratyev AuthorDate: 2023-04-22 08:29:29 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-04-22 08:29:29 +0000 LinuxKPI: Add bitmap_to_arr32() to bitmap_to_arr32() copies contents of bitmap to a uint32_t array of bits Required by: drm-kmod 5.15-lts Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D39552 --- sys/compat/linuxkpi/common/include/linux/bitmap.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bitmap.h b/sys/compat/linuxkpi/common/include/linux/bitmap.h index 1ae6078966a4..4e156377cdaf 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitmap.h +++ b/sys/compat/linuxkpi/common/include/linux/bitmap.h @@ -288,6 +288,26 @@ bitmap_copy(unsigned long *dst, const unsigned long *src, dst[i] = src[i]; } +static inline void +bitmap_to_arr32(uint32_t *dst, const unsigned long *src, unsigned int size) +{ + const unsigned int end = howmany(size, 32); + +#ifdef __LP64__ + unsigned int i = 0; + while (i < end) { + dst[i++] = (uint32_t)(*src & UINT_MAX); + if (i < end) + dst[i++] = (uint32_t)(*src >> 32); + src++; + } +#else + bitmap_copy(dst, src, size); +#endif + if ((size % 32) != 0) /* Linux uses BITS_PER_LONG. Seems to be a bug */ + dst[end - 1] &= (uint32_t)(UINT_MAX >> (32 - (size % 32))); +} + static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, const unsigned int size) From nobody Sat Apr 22 08: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 4Q3PjZ2xHdz46PvK; Sat, 22 Apr 2023 08: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 4Q3PjY6JTdz3mgT; Sat, 22 Apr 2023 08: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=1682152242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zDJiznx+LyxMD3aPrJSry+oy8HrYC2Gah6v4dUrfzOw=; b=ygKoIT5rDX0Bj0xrvHkc3DDiCjghun7kBX12OpMRbGQva0fwdXqJMhVhjWpfrI5BGcQiu2 VG9wVrTLAfC8vZwpszLgnTDXoyxrbFDwhCyesP+DBD/d730p5Y6uwgzKMo9TKBCxu9vrOl qOc7LB/hsvlZFyumEwCnTHeeB2APtSSgJMxljkn675b4s2j+RmqwoP5kM/UQ/j28ynKA20 q+h5ajWplCEnZ1uJDLR+rvTsBcpUbX/eG+tFjFZwZXmuVbQCK2aXxOtVVmcvFPuPmoiExo plvv+773vN3ycaE7Wr7phJlhCdK2+pxJcmBiEme9L/Wp5DpdhmaWgVG2W2nKtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682152242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zDJiznx+LyxMD3aPrJSry+oy8HrYC2Gah6v4dUrfzOw=; b=iz/IsG721IOQpB8sCAfkYyRGY6PFD8IhjZH4N2Hu+9bumXVdGpzUyOj0wBXbD8Q4vuRlwK vsWxCxNxPADi947rNfFOAR9+ELKvqZpdvFIkVdX7tW7KiKeRJsDU8+SkQLEjr6N/tLmOg8 //74oaTCGy10ic/5EJwo8u/q/qtmbiahzqW4i4y7IzwriM33d8SJUJleGICR3GLcvFszJF dWwZbvJL8GCQQIp+hjGJ4Xij8+l1MDyjj+C4aYNtbtleaE8jhDiLQj7ysny5UKSvlejA57 hQFjyO/DDg+yT5Tqa2ku+Z6Rnl/NzwLfpRA5HZekf0tEfiExMtIrG09qCssOjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682152242; a=rsa-sha256; cv=none; b=kK/ctEz4eRsAZ3eZoDBag3+z/oBdUp+4Lstyn9Y+Xo4J043chUzDWouhgfeH5j4yBPaGnI iJdEyMO8n60ZdJ6AOh5ePkkjUFteWVXNqQWTHN7WY/YnXBIuDx7l2IzLc2GYA7IjP+W5Q6 m4Jy2YGmB3aKOMDTxfBVUtQmU8v83y/WkE/tpgk0BEDxGcQdpZurr3zb7+qCh+UlnBd3eV 07C4895USXw5ReyHrplJcyUJ4vT5TSCk9B54NA5DYICqLEofpZCiQ+3AznuN3BAdNX3QHn 9VYKv0DpPtpxSwpe188GqbzFh7wDWliR7tfCq77zJg9/PmVUNcR2JxIYiUMhHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3PjY3x0Czv6x; Sat, 22 Apr 2023 08: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 33M8UfoI023856; Sat, 22 Apr 2023 08: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 33M8Uftl023855; Sat, 22 Apr 2023 08:30:41 GMT (envelope-from git) Date: Sat, 22 Apr 2023 08:30:41 GMT Message-Id: <202304220830.33M8Uftl023855@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 53d821d651ce - main - LinuxKPI: Define noinline_for_stack compiler attribute List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53d821d651ce62c890413cdddb1bab8ba638f709 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=53d821d651ce62c890413cdddb1bab8ba638f709 commit 53d821d651ce62c890413cdddb1bab8ba638f709 Author: Vladimir Kondratyev AuthorDate: 2023-04-22 08:29:29 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-04-22 08:29:29 +0000 LinuxKPI: Define noinline_for_stack compiler attribute It is identical to noinline and used for documentation reasons. Required by: drm-kmod 5.15-lts Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D39553 --- sys/compat/linuxkpi/common/include/linux/compiler.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 801618e15f9f..b2c835ad808d 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h @@ -64,6 +64,7 @@ #undef __always_inline #define __always_inline inline #define noinline __noinline +#define noinline_for_stack __noinline #define ____cacheline_aligned __aligned(CACHE_LINE_SIZE) #define ____cacheline_aligned_in_smp __aligned(CACHE_LINE_SIZE) #define fallthrough /* FALLTHROUGH */ do { } while(0) From nobody Sat Apr 22 08: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 4Q3Pjd2GRJz46Pjv; Sat, 22 Apr 2023 08:30: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 4Q3Pjb1z7tz3mrT; Sat, 22 Apr 2023 08: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=1682152243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RG7iYf+s7EGFalIbRbCQ5fBl9e/7iLAquVHWPSHKnCQ=; b=hKvB/9JVvnni2DnObrvzIfHcYYVSF1PkLHbwplzbqlK99v0GqcOkVWPusEPw/LqQTWUH9e +ZXTtyig7fwsz20+RrGTYSrAwQzvAnyuQT9a+YjnDurJPfy6/UwkLTB20+nlSe4jouNiDb 2LrmC5aH09BGIg6vJdrTiPbuwrpGlgM5fkTiudNd3hxq1oFtpBrDw4cIIocglduNf/nvPd bb/aiDsWV9R+2QajibhOdOOBvdWZs/Evx1DXurLzY3sMVoAUcMr9/0qEV/KqzAcSXzvQPR DgLklpYKmgyOKN2gpFrPn1uI1ldVcsP/6w/NbTclyRsWz5edzTnMtnI1wV9+fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682152243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RG7iYf+s7EGFalIbRbCQ5fBl9e/7iLAquVHWPSHKnCQ=; b=ufFMu2sQHUB0ZoNMNXdaRD7pmXjWWQLAMXAzY90X2JA68LRe9nG4At1DDT+uak6+e6b8CS sGB711+CptIvLBVRr/I8oAjhazILS78zscjD22NqV/i+I9+l8ENhAdB40bNgRTvysWh+SN UxT99/0sv/OTwtb9Xxo3XU/gaPHiRzZpBUYIGD+Ax5dKP3hiqvvtHbknlCXYHcLyqDM3cF rWnYqOgJMV/jASXIOdEeUKUMtsMweAZWNaEtUH0zUwV+XbvcNPZidBxFVKQbQpeTwswlLh 05rWdbJf9sScR/IABmPPbKhLMF2kvx9MtwmBEccnublpTwTdnKHQf5DKUdspsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682152243; a=rsa-sha256; cv=none; b=Wu3jJTzsVjzAP9dBXoJ+cadJsNEeLI27pwUYXs/RE//KQGf3UyuLrAEo4unMKjvDlQcTf6 LMYr+irRGXIlISb9TtyrCnQ5G4XjPVy53la8EqQn6K3Q6F/CKmQIw5uJ+yiL5cGUqC3qSB m0FGK3wgR0t7c63WjeOoj9J9PCvbaOMeIAcf3Mmb9QPTkUlFZD30cGCWelrlb0fDHrIi4R V4MO2NkTSiGtYzD/FRf/eSARNqMfXm6puHiSyB9KuN6nPBoS+oXGfiAV6MwHtn+sRWP/Fm 1i95S72/niR6m3lKdMqWHD4WvKKPFW17mHgCOUlUnz3LlWgYgE/WCNDPoqEK7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3PjZ4tZJzvDB; Sat, 22 Apr 2023 08: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 33M8UgLj023875; Sat, 22 Apr 2023 08: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 33M8UgVs023874; Sat, 22 Apr 2023 08:30:42 GMT (envelope-from git) Date: Sat, 22 Apr 2023 08:30:42 GMT Message-Id: <202304220830.33M8UgVs023874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: af22da75a035 - main - Bump __FreeBSD_version after LinuxKPI updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af22da75a035e25cb47cd3f2eabe5a84d8a5cb34 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=af22da75a035e25cb47cd3f2eabe5a84d8a5cb34 commit af22da75a035e25cb47cd3f2eabe5a84d8a5cb34 Author: Vladimir Kondratyev AuthorDate: 2023-04-22 08:29:29 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-04-22 08:29:29 +0000 Bump __FreeBSD_version after LinuxKPI updates --- 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 f7190fa8b85e..b6bbe545a5b1 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400086 +#define __FreeBSD_version 1400087 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Sat Apr 22 09: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 4Q3QNN6RQDz46RS0; Sat, 22 Apr 2023 09:00: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 4Q3QNN2qbPz4b8P; Sat, 22 Apr 2023 09: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=1682154052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YIG4+2LmyFFTG+ljNoX+Nx3/gKF090OXIBsMXGHfy34=; b=wfOFAkjFRQ5L31OFomQn3lHhvKIIJqCSjn7X1ZVQjKavfyaldGURnGJTKbmAl+zPUdQQS9 1Fn2zOWGhLiq2Cp4wweZCMRSIttpTMq2eF6X/c+5II/mIQAnM6MqT5ieGLNwIu9BxB/00t 0aH3Zjtx3JlRKmoeQBb5/hcxwN2dwuj6pDhq8X7WuuKunfEy5qB+5JuvxDjFuHdszYXTpo uV861H8lR0scwviYRKaByeO3Jwuvts60BgTyEtkYuLfAR0Kxtj1v6AnoLjdkFZ3o8XyF0q p++6eWmdkpFPA0AJgZwWEH88Kc2AdrsGqZjL7K7ikV799Gzb7cBUNdL4+Y/SpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YIG4+2LmyFFTG+ljNoX+Nx3/gKF090OXIBsMXGHfy34=; b=oaG9CqrVDw+/bTYgg4l0aKQkK3EEHOXyf0UJ1kD8P7IMum6L7yjhQk0IbtulirGbVdsrjf SZGX1jUpFxiehKsjfUK9iKHt7HDqI+cKItw9vGWFv3WdNN5317BHxzTjksMUP1lCG/+kU6 9aWHFvtha44rI29gyEeImSKSucfCgPqqSRqquKYkIezJcQmf4vpbDOdN7FeMNHBWTBAIBM LMRujLinW5ukWTrqRhlxgdq+FaEObWjfo8/nADg4tPved7HOsrPPS3sdUgXjfNWjucEKap Ve8hon3l8WuYTHSZuehMtKQ28AXos+W/D65PV264ZBnx4xJzljIl21hfaNIeFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154052; a=rsa-sha256; cv=none; b=MfTGOdii5KICU61lD7IaR9buN068h9EsIAD4ZuaCBeDTtH6pzvAwaiw9XV68FEgXnKNZEN avufx3LdNN1k412QbZCSoc11cQC0BglCxWODZXh3PfZHfIldZJMkbzQqvHsIxxazyLMEaG EnNvQ50rsOwwdtVSXd8QcN3lx9KAYf/gWu1mezszk2t484rjcoQQhLfvkIZE4Mw4rCKj0Y TSGUMsnSUKEcr4zCtgEKNFWDFVtv334JtyfO9BVEx3N4rr6AA5xEhy1G+AYF6usOWfqy/E fY6lJHNrYoTLPEk/ROV4eIwWit++/tgidwIj2SPUjSbiwkrcMt+UytxIW3OItQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3QNN1x1LzvSn; Sat, 22 Apr 2023 09: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 33M90qEP072762; Sat, 22 Apr 2023 09: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 33M90qNV072761; Sat, 22 Apr 2023 09:00:52 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:00:52 GMT Message-Id: <202304220900.33M90qNV072761@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: 01bdf9acd258 - stable/13 - libsa: make single bit bitfields unsigned to avoid clang 16 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 01bdf9acd2581b92ad0d7215c7cd744a2533346b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=01bdf9acd2581b92ad0d7215c7cd744a2533346b commit 01bdf9acd2581b92ad0d7215c7cd744a2533346b Author: Dimitry Andric AuthorDate: 2023-04-17 16:15:57 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 08:58:48 +0000 libsa: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in libsa's tftp.c: stand/libsa/tftp.c:382:20: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* very short file */ ^ ~ stand/libsa/tftp.c:432:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* EOF */ ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the field as a boolean, so make it unsigned. MFC after: 3 days (cherry picked from commit 1a3ccb8f1552977e1b264e3b89d1fba8e717dad8) --- stand/libsa/tftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libsa/tftp.c b/stand/libsa/tftp.c index 903537b4bbe5..f1e056da3561 100644 --- a/stand/libsa/tftp.c +++ b/stand/libsa/tftp.c @@ -106,8 +106,8 @@ static int is_open = 0; struct tftp_handle { struct iodesc *iodesc; int currblock; /* contents of lastdata */ - int islastblock:1; /* flag */ - int tries:4; /* number of read attempts */ + unsigned int islastblock:1; /* flag */ + unsigned int tries:4; /* number of read attempts */ int validsize; int off; char *path; /* saved for re-requests */ From nobody Sat Apr 22 09:00: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 4Q3QNP5HpZz46RZs; Sat, 22 Apr 2023 09: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 4Q3QNP42zmz4b8f; Sat, 22 Apr 2023 09:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xqp+Qs1Nrjhh0qW7IdAJA1ZGo6gIhbC9h2HwQtHHpFY=; b=QCt9MNa2dyZWLqRI1DoRxTWXxdSrIZxEHsKj35f3AnzPryx5w65j6wUVlKA6X41jTDbrV8 ehub1xpExgdvV03Hd56XrmmEW6O7gimHZXe4wSqmUTDR4mbE4P14xwaAeSkTjTRMJKIhpn KVxcZO1ADCJdvWMjk1+YrDZ7RHE1J3ATEmBobJTB6/sBVfrkktnB6aBITvAgFT0CFcUCTK bJu4Typ+7PDvxF54wJwqIMee8QOr1CqTjPREr27er3GRmucLWaqWVF7wTINgARxMLyPiVC sDBM6UGHBKAXn9UtDpVBhH9Qeusq/5Kyb8N37YQIvTsDfEu+7euEyeukLuRmzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xqp+Qs1Nrjhh0qW7IdAJA1ZGo6gIhbC9h2HwQtHHpFY=; b=C+FlwF/DDH2SQ8kHn35gSBVro9pi2j1F4QDOFTWxXjefOXVgTAQ2vaIBanjCVq6JqiZPrO l7p8/yzB0yWv8KRXiK34xeVUXCRPGvnBQt29Pi5o0C4liAWqrT2Ue/6S0YWmBjgpeeV5Sg YQg4fA2iZdPepkcmtfj3A5Lm4ZDaEUt4ZD+PfXRRc1ZcGoIrDdQuVydHwERsw5RcHKTjBY KwOYDri5XI2a/Xgr3KfMzHXX1MXGPGE7DKTk4sJHi6muTkyGPgxyL4zpFRnl+abmk5pIyt K28PoBOeHOE/hmrnefFajIoxbTmYt2K0PRmxHgkDqZNnqUfzGozuA2UYHXWa5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154053; a=rsa-sha256; cv=none; b=ZLi423OjfKEbg7HfzeXuZsvOEc7GXuGa89la/0c4XLBffZ5ZhhAOhRB214Oc2srEn1z0EN frZdArN7RNwn2ba0y62pL5RWGjXESOKgb3ebqo57cgN3TrhSZPaJZTHLfxv1M/IjofT6UJ KflMPSkiAcC83ih5wmtaYxdfOS5hBFOg6x0MPIFBKfpFts3CpR2Hc9ihFgagCTsvst6VWv 7qeEB5LEHodoXx/AF347AbKPcHNq0xdF/UntoZMCRopqEnA1HTT/8Fn+7/4tkfB0aSGnVK YbsJVgV9Ixevyd4qp7eQxxfAOGGWLot0iELyxC6fo2HuJ86ziI/rJXbqRj8ujQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3QNP34Y2zwHc; Sat, 22 Apr 2023 09:00: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 33M90rhX072788; Sat, 22 Apr 2023 09:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M90rAK072787; Sat, 22 Apr 2023 09:00:53 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:00:53 GMT Message-Id: <202304220900.33M90rAK072787@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: 5cc19c2f6c68 - stable/13 - bsnmp: make single bit bitfields unsigned to avoid clang 16 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5cc19c2f6c68afd557c6888b22095054a4b4e419 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5cc19c2f6c68afd557c6888b22095054a4b4e419 commit 5cc19c2f6c68afd557c6888b22095054a4b4e419 Author: Dimitry Andric AuthorDate: 2023-04-17 16:11:56 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 08:58:56 +0000 bsnmp: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in bsnmp's snmpd.h: contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] peer->input.stream = 1; ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the field as a boolean, so make it unsigned. MFC after: 3 days (cherry picked from commit b740e02500ca248e1096cf745a17d2a8fcc44fed) --- contrib/bsnmp/snmpd/snmpd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/bsnmp/snmpd/snmpd.h b/contrib/bsnmp/snmpd/snmpd.h index 48a7b44a04b2..394a4f4736d6 100644 --- a/contrib/bsnmp/snmpd/snmpd.h +++ b/contrib/bsnmp/snmpd/snmpd.h @@ -152,12 +152,12 @@ struct port_input { int fd; /* socket */ void *id; /* evSelect handle */ - int stream : 1; /* stream socket */ - int cred : 1; /* want credentials */ + u_int stream : 1; /* stream socket */ + u_int cred : 1; /* want credentials */ struct sockaddr *peer; /* last received packet */ socklen_t peerlen; - int priv : 1; /* peer is privileged */ + u_int priv : 1; /* peer is privileged */ u_char *buf; /* receive buffer */ size_t buflen; /* buffer length */ From nobody Sat Apr 22 09:00: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 4Q3QNQ5s4sz46RLs; Sat, 22 Apr 2023 09:00: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 4Q3QNQ4qM7z4b9B; Sat, 22 Apr 2023 09:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gDbJ8X0L6FCFgXAYVr1inPPNCS+Ht75Z+bQTt2m7BmY=; b=coCIFT+we5v0QuEofQ7J2ZZCO1A0PbmumymKVo/F1NbC73RsL5YzJ8mmdkNMg1N1DN5XgC x0H0Uq5A3G4A71Mi1pSgsivt09+I7xj9G5UH5bzVpIgstSr0wOaNuOio4ga7U996QWfzpU vpGlsuK0gHyujEwZLmKcUcv5osBCZOqoHjeBFWSfU5x0WbP1W3pnBnEjQNtDWuQJht7/EA NI9Vi6JT0SD/y00Ju5lBPZFQgLAzx48HyypXWrJ3zqAuV4351mUeH1xtoBaYPTXB7uI5um Tac0+BFhYzILGpYXC4N4QunItFUr06ng+5Q9BynKeZ0RKhzoGSm/t7vscyXolg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gDbJ8X0L6FCFgXAYVr1inPPNCS+Ht75Z+bQTt2m7BmY=; b=prLsCEFkUn1DjQnuI+IqoPzB9B6WT727yUTDQRbegMaz/CzYThQtL0R8FRmyPCzD7c1xgr WhDsPhUsXdZR43qu/M/nz1vLcGtqm618kf4ph+5IfAhKYOx1YLLx2sBdsUfax90s68Kkn/ r+yIHLi+RINRD0gu46wDbvACD3HQqCGwjLR02ALyYXGizvrggLI8gh/iKXcatvy5HmOsx1 Aso2ng7Uwo08ZT5B26J3JiOhMrPWJRnJYUyVqjxuwKjfjTgF4XjIVNp53JVYrWWgW/ZfvV /VMtcCmVT/FEZWCt68L8v/QCdR2M1D5hdzrrzRjQXgcIMhL62c079zEx0a3KNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154054; a=rsa-sha256; cv=none; b=Y92AJAJN4yrFRaLt5z144nU1WOvSeYZIQ8JSyaiPSCXZKvZJXMpeEMoE+IZexpwcgBBdy1 cmbcdjMFSJhQSd7e2m4UY6bv403PXd8KlqF/Xn3mBq+9FrNoWjpYQdhbk5MQg6YXMTGhLJ eUckJYV2rnONy/dWSc1zjmtpA4Y5pV3eE+QEkuyBpMzTsT3VW717f+ZGjmhWDrvu1DzG+l BVOpOHp3GTdE8Y2rS/mHFnVPxpM8djMZwXb9rLjIYPhqVyTaQPTTQjDYjl3TklRvvxT0R1 yrbyPbl7PGK0p7iVTQe/3ge55xv8IJ5Z/T6ZP/534RLPvwtIpwQSy7l5Lm72lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3QNQ3nzpzw7X; Sat, 22 Apr 2023 09:00: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 33M90sZ5072809; Sat, 22 Apr 2023 09:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M90sbT072808; Sat, 22 Apr 2023 09:00:54 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:00:54 GMT Message-Id: <202304220900.33M90sbT072808@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: 9f9b65a0933a - stable/13 - ichiic: use bool for one-bit wide bit-fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 9f9b65a0933a9b6fdde611210b29bd670c932a44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9f9b65a0933a9b6fdde611210b29bd670c932a44 commit 9f9b65a0933a9b6fdde611210b29bd670c932a44 Author: Dimitry Andric AuthorDate: 2023-04-18 18:08:28 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 08:59:44 +0000 ichiic: use bool for one-bit wide bit-fields A one-bit wide bit-field can take only the values 0 and -1. Clang 16 introduced a warning that "implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1". Fix by using c99 bool. Reported by: Clang Reviewed by: emaste, wulf MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39665 (cherry picked from commit 87f55ab0b46ad72efee11d1b64ec8f839bb013da) --- sys/dev/ichiic/ig4_acpi.c | 4 ++-- sys/dev/ichiic/ig4_iic.c | 8 ++++---- sys/dev/ichiic/ig4_pci.c | 4 ++-- sys/dev/ichiic/ig4_var.h | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/dev/ichiic/ig4_acpi.c b/sys/dev/ichiic/ig4_acpi.c index b23d6324cff7..06aecc31090f 100644 --- a/sys/dev/ichiic/ig4_acpi.c +++ b/sys/dev/ichiic/ig4_acpi.c @@ -108,7 +108,7 @@ ig4iic_acpi_attach(device_t dev) ig4iic_acpi_detach(dev); return (ENXIO); } - sc->platform_attached = 1; + sc->platform_attached = true; error = ig4iic_attach(sc); if (error) @@ -127,7 +127,7 @@ ig4iic_acpi_detach(device_t dev) error = ig4iic_detach(sc); if (error) return (error); - sc->platform_attached = 0; + sc->platform_attached = false; } if (sc->intr_res) { diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index f24b26f53366..b4ef235bcf38 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -337,9 +337,9 @@ set_slave_addr(ig4iic_softc_t *sc, uint8_t slave) { uint32_t tar; uint32_t ctl; - int use_10bit; + bool use_10bit; - use_10bit = 0; + use_10bit = false; if (sc->slave_valid && sc->last_slave == slave && sc->use_10bit == use_10bit) { return; @@ -364,7 +364,7 @@ set_slave_addr(ig4iic_softc_t *sc, uint8_t slave) reg_write(sc, IG4_REG_CTL, ctl); reg_write(sc, IG4_REG_TAR_ADD, tar); set_controller(sc, IG4_I2C_ENABLE); - sc->slave_valid = 1; + sc->slave_valid = true; sc->last_slave = slave; } @@ -1009,7 +1009,7 @@ ig4iic_set_config(ig4iic_softc_t *sc, bool reset) (sc->cfg.bus_speed & IG4_CTL_SPEED_MASK)); /* Force setting of the target address on the next transfer */ - sc->slave_valid = 0; + sc->slave_valid = false; return (0); } diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 71b95c3d95fb..d6906aa80e1a 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -316,7 +316,7 @@ ig4iic_pci_attach(device_t dev) ig4iic_pci_detach(dev); return (ENXIO); } - sc->platform_attached = 1; + sc->platform_attached = true; error = ig4iic_attach(sc); if (error) @@ -335,7 +335,7 @@ ig4iic_pci_detach(device_t dev) error = ig4iic_detach(sc); if (error) return (error); - sc->platform_attached = 0; + sc->platform_attached = false; } if (sc->intr_res) { diff --git a/sys/dev/ichiic/ig4_var.h b/sys/dev/ichiic/ig4_var.h index da81980039f1..3cad69cf57e3 100644 --- a/sys/dev/ichiic/ig4_var.h +++ b/sys/dev/ichiic/ig4_var.h @@ -91,10 +91,10 @@ struct ig4iic_softc { struct ig4_cfg cfg; uint32_t intr_mask; uint8_t last_slave; - int platform_attached : 1; - int use_10bit : 1; - int slave_valid : 1; - int poll: 1; + bool platform_attached : 1; + bool use_10bit : 1; + bool slave_valid : 1; + bool poll: 1; /* * Locking semantics: From nobody Sat Apr 22 09:01: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 4Q3QNn2zbxz46RVy; Sat, 22 Apr 2023 09:01: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 4Q3QNn2YZRz4cbY; Sat, 22 Apr 2023 09:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=62C8F8wvIl4TZtULD3S18BGO+G5YMtGRD1cCft1Aaa8=; b=TBGTYd04yBh/ukJN6s6uNoNN4DqfEM3RBCT/gwNQF/R5//yROLxVeRAZYQRvNkZh7PeKA/ 50jzynsZ6lMEOAFHUmXBm3BC0D0+SWI1f91v3Hpy9CczZMpdC7RQHozMQQTxY1wUlTFRc1 yR+/3hUUfGVZRbPc1oJHZBsRFRonJUeMGbBUdV0TJRUx/rW2LzwNKQbZ/7PfikiO3BBLWS Um7IOml1yni1k0nnoKOY3Z6pzKHXUIEjsbllW533IlyFIss0RC8quDDyuF5/lMmhPcWlrX 6Ljbb3kOBHH6eo6QO1BiDB1ZaBjqhflGSi6S3R9lPdNJB8HW2zdv75h7MeC8XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=62C8F8wvIl4TZtULD3S18BGO+G5YMtGRD1cCft1Aaa8=; b=fA2QlUItl7mn3Lkv8tVmiG8jhoFN8syri3908uESCXuCvc+l9JxdN2xpbC9YnjeC5C2+GD E2ebp0C1iZbrPr2G5aBopdaKqugEM7U1VyoecrvglbH2lr5qSn+NtKuDFbY7ZdtDiBbEMV kgCqZ2RDIxTrauUCQDmcKyHC9DUFKHddyzzrJc57agOPJGis5BGEm1MKBuMwpiiUIQ3jKe n2pRURnUAw+WsaCzyZF+3/GBdO0/K52uONdEausG3fYwD4Ep6IpuO0nVp7rXHWvE4bM0jE w1xKECNo7Gf2gJA7fiSk/iNiqsoio+Fh+hEGRAfIIsM7eRwzYeNJVpmp0Axh+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154073; a=rsa-sha256; cv=none; b=m+++L7PZMdaHxCCcc/R9RwZfXPh33TkovEkh6d/+lOm7Ll8J57glcelhsLkEvNA74KBC0P JJ8c1AfN3xF0kmdjFWICZbbBwv35UvjwCBRhwiww/jg5RYjf8X3VYF4Q2hPP43v6IF6TMf s0eSjwIcJqLtE6MNY1FNZquoXcVMYBSYoKs+zCpC0Dl4z2iyrdjRLskoa0j2X3wQvgHfbS VAAthnI4Pzt2hN7AekvefzbOy/BtiLD8jUYEGsljvwHrQ2e2ktQ7FeaMUj2oOQaSAdU93P imI9J7N0qIFGMee4lQ8N1KeDoYqNKBpjC8Gj64KTGL1Sog/tCidgGscGdvZuPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3QNn1f4dzvws; Sat, 22 Apr 2023 09:01: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 33M91DtY074774; Sat, 22 Apr 2023 09:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M91DxQ074773; Sat, 22 Apr 2023 09:01:13 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:01:13 GMT Message-Id: <202304220901.33M91DxQ074773@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: f65f23e90da8 - stable/12 - libsa: make single bit bitfields unsigned to avoid clang 16 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f65f23e90da89a517dada5a4f330b181833e7a6b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f65f23e90da89a517dada5a4f330b181833e7a6b commit f65f23e90da89a517dada5a4f330b181833e7a6b Author: Dimitry Andric AuthorDate: 2023-04-17 16:15:57 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 09:00:01 +0000 libsa: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in libsa's tftp.c: stand/libsa/tftp.c:382:20: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* very short file */ ^ ~ stand/libsa/tftp.c:432:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] h->islastblock = 1; /* EOF */ ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the field as a boolean, so make it unsigned. MFC after: 3 days (cherry picked from commit 1a3ccb8f1552977e1b264e3b89d1fba8e717dad8) --- stand/libsa/tftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/libsa/tftp.c b/stand/libsa/tftp.c index 22e03ab58da1..8436bab31ae1 100644 --- a/stand/libsa/tftp.c +++ b/stand/libsa/tftp.c @@ -103,8 +103,8 @@ static int is_open = 0; struct tftp_handle { struct iodesc *iodesc; int currblock; /* contents of lastdata */ - int islastblock:1; /* flag */ - int tries:4; /* number of read attempts */ + unsigned int islastblock:1; /* flag */ + unsigned int tries:4; /* number of read attempts */ int validsize; int off; char *path; /* saved for re-requests */ From nobody Sat Apr 22 09:01: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 4Q3QNp4FbDz46RFn; Sat, 22 Apr 2023 09:01: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 4Q3QNp3VNxz4cDJ; Sat, 22 Apr 2023 09:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FOtXdasmqwV/sJXOzfUvD2i2poyZnhGlh0pdMa4DdIU=; b=tTif2O5Z6rlcl6im+D2oKYzcHxlHpQXs9N5O4iHZPdOd8HZwaldCnSJW8SHU1+oNWDXW3p tP/MYdX46tsir/YmMp2z3xSNabw8Xavz7noQpOsCKxzXIihy+D4SCzVNh21iHXViOJS0hm /JdNlsa8OrMa6l+uNxWXTB7xZv9aWWN0I+JWy/WSvy1WCnc6ti/1Ld6T2T5vipwW3VjDX3 40cGLu4K5/KKL9Aw73BkjXMRQzAKu3qv+hYCkR3PxxtgKFr6OTsG4PR+NqMIvrbLzgCV1s lKXvtpPV3a/YdnNfDUDkeDy5msd7Z/cNp5WDktj8u0IuYUF7qgCNorg7QwrvuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FOtXdasmqwV/sJXOzfUvD2i2poyZnhGlh0pdMa4DdIU=; b=dR6UXeWGr8U7vSgdZKQzHfzYOaHHQaW+/cnv7qBvCSWS4ttwE9aqHeQZcjHj7jrJ9uHUGb cJNvH1qmjJyPenbcQq5YCF1rJaCmSRgm8P+CnJyGijcGl7WsrRg1pjCq3y9lX+X8/3mepd sUfkzxUrqBNKUFv4f+bawhZ+JreesIeI0hy2cBDeFAZqTfGl6iYM2o1azwnFZinjiJC/Uf G6CImwpcBHObWwu+l9v9ZCItYBRstHt3OrZzerPX4guhJo71DYXSiK6iUuEcW6SaQk4O9Z tsY5YhFE+lYv0Iwko7yczQklA+868Vltn5w6ihRJK/7LEyMpwobQy+v79RHnyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154074; a=rsa-sha256; cv=none; b=AIjijFMIT0ItaRrqRjzfdhwGPQLcVK2w/RRcLRqI1A1BDomv5J4Y+AJLg6Oy7vE3xk8+OC rzghsHu+82KEq1L92D39SbF9Pia2AX8OF+Ac3MGK9fXhTaxgdH5J5Sg+eWsidB5W2YiZTy I5lCXQckx031xZnBEEkcDoZrsa/W0lyzVuKrQmyYAzYONCrqVt/3M/oe2O3sp3FQCTyOVs iZeBqFaOXoCcuhd/nBxtll5H4EkvXYe8+NeQj0mKGfRNogq4ovnH33z/knszMJqeI8tP/C Z0TfboegjcU1OSLjRpleInjeZLvW2xaQ/+EaYIE4CFmH4dVdFG6lxKUi0CC6zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3QNp2b7tzwBZ; Sat, 22 Apr 2023 09:01: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 33M91E8h074793; Sat, 22 Apr 2023 09:01:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M91E7U074792; Sat, 22 Apr 2023 09:01:14 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:01:14 GMT Message-Id: <202304220901.33M91E7U074792@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: 859735832d83 - stable/12 - bsnmp: make single bit bitfields unsigned to avoid clang 16 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 859735832d83e80a32c974bf3324023442edfe70 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=859735832d83e80a32c974bf3324023442edfe70 commit 859735832d83e80a32c974bf3324023442edfe70 Author: Dimitry Andric AuthorDate: 2023-04-17 16:11:56 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 09:00:07 +0000 bsnmp: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by a declaration in bsnmp's snmpd.h: contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] peer->input.stream = 1; ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the field as a boolean, so make it unsigned. MFC after: 3 days (cherry picked from commit b740e02500ca248e1096cf745a17d2a8fcc44fed) --- contrib/bsnmp/snmpd/snmpd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/bsnmp/snmpd/snmpd.h b/contrib/bsnmp/snmpd/snmpd.h index 48a7b44a04b2..394a4f4736d6 100644 --- a/contrib/bsnmp/snmpd/snmpd.h +++ b/contrib/bsnmp/snmpd/snmpd.h @@ -152,12 +152,12 @@ struct port_input { int fd; /* socket */ void *id; /* evSelect handle */ - int stream : 1; /* stream socket */ - int cred : 1; /* want credentials */ + u_int stream : 1; /* stream socket */ + u_int cred : 1; /* want credentials */ struct sockaddr *peer; /* last received packet */ socklen_t peerlen; - int priv : 1; /* peer is privileged */ + u_int priv : 1; /* peer is privileged */ u_char *buf; /* receive buffer */ size_t buflen; /* buffer length */ From nobody Sat Apr 22 09:01: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 4Q3QNq5xZcz46RXn; Sat, 22 Apr 2023 09:01: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 4Q3QNq54VFz4cYW; Sat, 22 Apr 2023 09:01:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8J45tg4zGiiBPnrUsSOurbe0siDGA0LsmWAAGtie6XQ=; b=fTg1oVs7/k6fmllqMRV/Ag6OSeTluFifDgwbFtx0dztxmwIftV+N9XJxNm5gGHzXcnNEPb dS6sgmFoNT0XB5iU2ZpEUEzaMHdsC78vLIbhJKitkoLRDI5ZzStjz2GvERPgnmhuVnd43f rTpkmo51k56FHcGM5UqAu1fVc9Z86km1aES33YK00RecnTVbOevmvZXJ+cfXI+f7OphMee mvSp62UJNV4aYeRzw/u+51P+paNRtKw16oDoeKeSSWIwjOl//v2YF5bvaElxTrXpR8n9vl uBeVauJZc7694DQB+TAm+66ab/tUXof6h+luKMXrqpqj4+oCp6Mj4zscQAjl7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8J45tg4zGiiBPnrUsSOurbe0siDGA0LsmWAAGtie6XQ=; b=l2/iyUj2XYa7GjLqg1l6ssfC/CULWlszu+OehjshKlxQpo3QwkFglsSx5JLlkBY2SRpvxK q/hyJosIiWsgIaG+0CM/C4xnQKZA9pWOAMkpy16lHHzPPiwybG7Uqg2zOlq86ch5h9FHJ+ Pr82mNEWsLnEPn2e45VPKHkD0mkzTGHsCDnqmKzt6sL4wHmeRqSS0OyzYwO4k7xiygY0Lm nzOKGr6j8x/lbOJHgASFPEdU7KKl8LXwsVnQ3TMy2DN2kk1dJJ5dGAGExHDWJ4qO5Tgl5z jx71ggwN2JRPVfj8/4+8VeV2TKJRgZTPO3xp3ia90HXEbJiqaoiYquS8HA3noQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154075; a=rsa-sha256; cv=none; b=pGoaSDOIWQCbS5Q+74OXG7is7DVuymZ9V02euVvaB48kFKQlRiNKvVvAdNFCy2y/dvVanN DYrnYFQrEva2gH4OJojsGN9kjI/VqZ0AGA6JLzS4qE+AxMjy5+f/7gUJuxsfTpvetvGq47 Q05KJbZ0D3Lz3+CxY5YP+WBsKv1NYyjNn+a2ZfmaJq/2rASsUmi1hp5rze8CJbYcXy9lb5 cXtbbANMv5LR/O95K6hQT5sz3sJCiwVQ4CRqD+/HG+rmOhatTtO1uzD6HaWrwn6CdTd4AP 7MdZgGafnrf65WAvel640QayxANrF1LYmhq88/cv4r/BFPJQTZP7BIgZ/Zj6XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3QNq3Qpzzw7d; Sat, 22 Apr 2023 09:01: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 33M91Fbg074816; Sat, 22 Apr 2023 09:01:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M91FLQ074815; Sat, 22 Apr 2023 09:01:15 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:01:15 GMT Message-Id: <202304220901.33M91FLQ074815@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: 449c2949368d - stable/12 - libarchive: make single bit bitfields unsigned to avoid clang 16 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 449c2949368d94093dace944defa479e1541b1f2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=449c2949368d94093dace944defa479e1541b1f2 commit 449c2949368d94093dace944defa479e1541b1f2 Author: Dimitry Andric AuthorDate: 2023-04-17 16:20:56 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 09:00:16 +0000 libarchive: make single bit bitfields unsigned to avoid clang 16 warning Clang 16 introduced a warning about single bit bitfields in structs, which is triggered by various declarations in libarchive: contrib/libarchive/libarchive/archive_write_set_format_7zip.c:1541:13: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] file->dir = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5127:15: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] isoent->dir = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5213:14: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] isoent->dir = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5214:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] isoent->virtual = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7149:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] isoent->virtual = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7435:32: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] iso9660->zisofs.detect_magic = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7495:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] iso9660->zisofs.making = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7496:26: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] iso9660->zisofs.allzero = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7702:28: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] iso9660->zisofs.allzero = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7871:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] zisofs->header_passed = 1; ^ ~ contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7894:24: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] zisofs->initialized = 1; ^ ~ Signed one-bit bitfields can only have values -1 and 0, but the intent here is to use the fields as booleans, so make them unsigned. This has also been sent upstream. MFC after: 3 days (cherry picked from commit 67ecab6f50ff29e9bda340be1e9d2acc963c9a2b) --- .../libarchive/libarchive/archive_write_set_format_7zip.c | 2 +- .../libarchive/archive_write_set_format_iso9660.c | 14 +++++++------- .../libarchive/libarchive/archive_write_set_format_xar.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/contrib/libarchive/libarchive/archive_write_set_format_7zip.c b/contrib/libarchive/libarchive/archive_write_set_format_7zip.c index d5ca9a665654..f4b34685d3d0 100644 --- a/contrib/libarchive/libarchive/archive_write_set_format_7zip.c +++ b/contrib/libarchive/libarchive/archive_write_set_format_7zip.c @@ -165,7 +165,7 @@ struct file { mode_t mode; uint32_t crc32; - signed int dir:1; + unsigned int dir:1; }; struct _7zip { diff --git a/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c b/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c index 58b7216a8071..b3e41d4ab997 100644 --- a/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c +++ b/contrib/libarchive/libarchive/archive_write_set_format_iso9660.c @@ -289,12 +289,12 @@ struct isoent { struct extr_rec *current; } extr_rec_list; - signed int virtual:1; + unsigned int virtual:1; /* If set to one, this file type is a directory. * A convenience flag to be used as * "archive_entry_filetype(isoent->file->entry) == AE_IFDIR". */ - signed int dir:1; + unsigned int dir:1; }; struct hardlink { @@ -755,9 +755,9 @@ struct iso9660 { /* Used for making zisofs. */ struct { - signed int detect_magic:1; - signed int making:1; - signed int allzero:1; + unsigned int detect_magic:1; + unsigned int making:1; + unsigned int allzero:1; unsigned char magic_buffer[64]; int magic_cnt; @@ -7802,8 +7802,8 @@ struct zisofs_extract { uint64_t pz_uncompressed_size; size_t uncompressed_buffer_size; - signed int initialized:1; - signed int header_passed:1; + unsigned int initialized:1; + unsigned int header_passed:1; uint32_t pz_offset; unsigned char *block_pointers; diff --git a/contrib/libarchive/libarchive/archive_write_set_format_xar.c b/contrib/libarchive/libarchive/archive_write_set_format_xar.c index d885f5c256d3..9d5e5dd41cbb 100644 --- a/contrib/libarchive/libarchive/archive_write_set_format_xar.c +++ b/contrib/libarchive/libarchive/archive_write_set_format_xar.c @@ -212,8 +212,8 @@ struct file { struct heap_data data; struct archive_string script; - signed int virtual:1; - signed int dir:1; + unsigned int virtual:1; + unsigned int dir:1; }; struct hardlink { From nobody Sat Apr 22 09:01: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 4Q3QNr60qQz46RQT; Sat, 22 Apr 2023 09:01: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 4Q3QNr562Cz4cZ4; Sat, 22 Apr 2023 09:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tI9nHMXDjR9xvgpRPIYNE0S7QNifvjnTuR8LIgkp4cY=; b=GBVNnA/lguPBooAjlVg2Uq3qNR4oBxPsZOBUHqkv4v08DxyLtfSWzhjoymRaMK5KEOEXCK GCKSZ19YQla6iyZpjQsGQNUN5n6G3BItZAXLseAiKQ8xRdPu9j1STheIgoL0MQILspdVYa 5xVpo/nDtkeJtjqycws7vihvEMYyBAj6+w0HqO8+M9lsfXOsNvXzx3HzScO4ODDEqPEU02 x52bKO5YLtbllCKPWwuMOrXyw0nw/w+CWfaUMcC575AYuQpkVQibJGYOqqG3oosv4Hn48c ebVk2C+JKmDhLRgvEazgRV/YvxCCoNkF8ujKfJryDCNB0mk1M1Xo7VXOPHrlug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682154076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tI9nHMXDjR9xvgpRPIYNE0S7QNifvjnTuR8LIgkp4cY=; b=PtMGerAQSdaojCvPcPcv3AcTtFKewJdGFmzIrOH4ACX1bkdyyQ3OQkNU+0k3udTRnFtOH3 EulFvrRFc81hPyV2vpbpD6qBuVS886aVBSM/d9oaQpsWo7ajIj9b6SfJ3HDs1eNeVTmFvZ btkHnkVOVpV3MfgLn0e0TiAP178FxgtGbvfi4IQ2C+7gYtyyE14SZWOcqmAIUvaRWysbhp +RgbG3mv5teTbrmtWvP/eNAhmPMGAa62HCdUTswx+FssLwS+LD0/NLn5c8jXqPCsDYowCh +u4pUigOPY+bLqSGV6vveyzmkU+WkF/S90Zen/hftdiK/DuS+4kUJhlL3pz17A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682154076; a=rsa-sha256; cv=none; b=pqAOXVs7jNC/UaWoR7fW/iy1x+R4G9g/zjwSybSl1pikMJoboNXsliAd1IKaO2rxSpKcmc HVPGn8SLhQFhOggo1Q/JylFEj8sVTS5BqX7kINGwe4mW5p59waUzBdFrZJDGDsnWIEh1W7 cmX9Xerbm6MBlIUROMxNTASScohi+F4D13i1WnNd5UgqAfUG9FTwRKcB/PqfIlbtSdrhz5 Cg/dBXpzaosU13OlHHorsGGDxukvWLri9kzr/EsDF3/kA1U5V6BdbbA4v+QDszbcgdWlxs kGDlTFtk+5BRvhxWEJC4o4q+LwZmR4tI3avjD2o+OTinIGiaWiIe62vmkgjo/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3QNr4CqqzwBg; Sat, 22 Apr 2023 09:01: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 33M91GZr074838; Sat, 22 Apr 2023 09:01:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33M91Gl5074837; Sat, 22 Apr 2023 09:01:16 GMT (envelope-from git) Date: Sat, 22 Apr 2023 09:01:16 GMT Message-Id: <202304220901.33M91Gl5074837@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: 17eaa359dcb5 - stable/12 - ichiic: use bool for one-bit wide bit-fields List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 17eaa359dcb5cb51f5b1a23d34a5c744e350ad8e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=17eaa359dcb5cb51f5b1a23d34a5c744e350ad8e commit 17eaa359dcb5cb51f5b1a23d34a5c744e350ad8e Author: Dimitry Andric AuthorDate: 2023-04-18 18:08:28 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 09:00:22 +0000 ichiic: use bool for one-bit wide bit-fields A one-bit wide bit-field can take only the values 0 and -1. Clang 16 introduced a warning that "implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1". Fix by using c99 bool. Reported by: Clang Reviewed by: emaste, wulf MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39665 (cherry picked from commit 87f55ab0b46ad72efee11d1b64ec8f839bb013da) --- sys/dev/ichiic/ig4_acpi.c | 4 ++-- sys/dev/ichiic/ig4_iic.c | 8 ++++---- sys/dev/ichiic/ig4_pci.c | 4 ++-- sys/dev/ichiic/ig4_var.h | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/dev/ichiic/ig4_acpi.c b/sys/dev/ichiic/ig4_acpi.c index 673f160c6312..44d07eff9ac8 100644 --- a/sys/dev/ichiic/ig4_acpi.c +++ b/sys/dev/ichiic/ig4_acpi.c @@ -107,7 +107,7 @@ ig4iic_acpi_attach(device_t dev) ig4iic_acpi_detach(dev); return (ENXIO); } - sc->platform_attached = 1; + sc->platform_attached = true; error = ig4iic_attach(sc); if (error) @@ -126,7 +126,7 @@ ig4iic_acpi_detach(device_t dev) error = ig4iic_detach(sc); if (error) return (error); - sc->platform_attached = 0; + sc->platform_attached = false; } if (sc->intr_res) { diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index f24b26f53366..b4ef235bcf38 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -337,9 +337,9 @@ set_slave_addr(ig4iic_softc_t *sc, uint8_t slave) { uint32_t tar; uint32_t ctl; - int use_10bit; + bool use_10bit; - use_10bit = 0; + use_10bit = false; if (sc->slave_valid && sc->last_slave == slave && sc->use_10bit == use_10bit) { return; @@ -364,7 +364,7 @@ set_slave_addr(ig4iic_softc_t *sc, uint8_t slave) reg_write(sc, IG4_REG_CTL, ctl); reg_write(sc, IG4_REG_TAR_ADD, tar); set_controller(sc, IG4_I2C_ENABLE); - sc->slave_valid = 1; + sc->slave_valid = true; sc->last_slave = slave; } @@ -1009,7 +1009,7 @@ ig4iic_set_config(ig4iic_softc_t *sc, bool reset) (sc->cfg.bus_speed & IG4_CTL_SPEED_MASK)); /* Force setting of the target address on the next transfer */ - sc->slave_valid = 0; + sc->slave_valid = false; return (0); } diff --git a/sys/dev/ichiic/ig4_pci.c b/sys/dev/ichiic/ig4_pci.c index 71b95c3d95fb..d6906aa80e1a 100644 --- a/sys/dev/ichiic/ig4_pci.c +++ b/sys/dev/ichiic/ig4_pci.c @@ -316,7 +316,7 @@ ig4iic_pci_attach(device_t dev) ig4iic_pci_detach(dev); return (ENXIO); } - sc->platform_attached = 1; + sc->platform_attached = true; error = ig4iic_attach(sc); if (error) @@ -335,7 +335,7 @@ ig4iic_pci_detach(device_t dev) error = ig4iic_detach(sc); if (error) return (error); - sc->platform_attached = 0; + sc->platform_attached = false; } if (sc->intr_res) { diff --git a/sys/dev/ichiic/ig4_var.h b/sys/dev/ichiic/ig4_var.h index da81980039f1..3cad69cf57e3 100644 --- a/sys/dev/ichiic/ig4_var.h +++ b/sys/dev/ichiic/ig4_var.h @@ -91,10 +91,10 @@ struct ig4iic_softc { struct ig4_cfg cfg; uint32_t intr_mask; uint8_t last_slave; - int platform_attached : 1; - int use_10bit : 1; - int slave_valid : 1; - int poll: 1; + bool platform_attached : 1; + bool use_10bit : 1; + bool slave_valid : 1; + bool poll: 1; /* * Locking semantics: From nobody Sat Apr 22 10: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 4Q3ShR1LGyz46YQY; Sat, 22 Apr 2023 10:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q3ShQ2gnhz3tVR; Sat, 22 Apr 2023 10:44:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682160294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4IbztKUbSP6raRA6dRR2HzPmBSSHRwK0RSuDWPESJI=; b=L08y07rJ5mpWtM/q3MR9kDoxmanneQAqmKJeG91WR2V0+WwaBrx374QkPlrp93P/acc8uZ 5T3/htwuEG4x09wbjBY9NuzKxm6kRwwy6N8U4/DR7RFs1T02mY0eV5lyJ8qIPxrhUttHGY kJm21eKmu3WWXoi4onehDU54nXRFS0HrmkReX/PN3OLO0hZ9OuAJygO6YX94IjER6oeUrF UxRe7FuHch6rYjf/IryguZyzYOYYnwPdzGqvEXnkgTjKE9M6xk7wKDjddUEU708zY2LsZb LVh6BrM+rYKSNrxcaTO2lZUu/2sMChPK9/lnSvvUwIUwKf0Rl6cxl6FnFPz2kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682160294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4IbztKUbSP6raRA6dRR2HzPmBSSHRwK0RSuDWPESJI=; b=BumlDmXWU5R00Y/fHdjuq6gvCvMsaqwTEfIdi6OPIl7dThsTSNZMiEoom+kb5/8c/HOvbW wZYKJ5VvqhlZ/jYkTxqkq9tQE/i1trqSD0PrQ8GgnTrHRQTL/w/Yge8O+M6HaQ8k81c8Yx xohcrfduUgArfNb7/0BB9F43tF8xpNGpwwnuhrTqJ+fK0qwiedjLYssL5y7p8RP5wuJvLR wNfXW9VQuRWaLUJzidNMr1VeQrEbcxY/8ocks1krQnh3Hg8VUI/Nfm4X0rfZCaAQpSI1UC tWv0KBHMQL3Tby2+lb0EYkfTqTw0Y3hY4kJDQSkA60EHDRBfHhy2PN67rd57Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682160294; a=rsa-sha256; cv=none; b=rKuCV0g4CphgDmewNZWDFcV0zAWvKJFekz1unmpXQlt0cBW8jk9A8/bZ7bqFRMATWPioob tW1rGnLq2YWElIwmGw+VAS1pzYod50ePfx/oI5kTeVEaq5jORhYa9jNydtMUPcjHJgMfGI bj5Ec4mfUMlVdIF35wrICobAlz4H89Tyn4hFjMw9tRuomAMXyyvxX3CDJryWvGObs+QKN4 vkw1B+L3C/uBBPvs4gppzs+XwR94NXz/EzpluQYL0FJ+vHTunqBtxGTsLipXaIMiKZVXH7 q4C6db4CNSFJ3EBzLS7TiG+xxXE6ePJgw6M90eBCOKq00f67sXOAAZlZ8k3zIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3ShQ0h9Yzy4V; Sat, 22 Apr 2023 10:44: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 33MAirIS044799; Sat, 22 Apr 2023 10: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 33MAirTg044798; Sat, 22 Apr 2023 10:44:53 GMT (envelope-from git) Date: Sat, 22 Apr 2023 10:44:53 GMT Message-Id: <202304221044.33MAirTg044798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 06c844e175ed - main - LinuxKPI: Fix building on 32bit archs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06c844e175ed5dbad96a1a84b3fdb74c03626900 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=06c844e175ed5dbad96a1a84b3fdb74c03626900 commit 06c844e175ed5dbad96a1a84b3fdb74c03626900 Author: Vladimir Kondratyev AuthorDate: 2023-04-22 10:24:40 +0000 Commit: Vladimir Kondratyev CommitDate: 2023-04-22 10:25:49 +0000 LinuxKPI: Fix building on 32bit archs Reported by: Jenkins Fixes: e5cf9deb61fd ("LinuxKPI: Add bitmap_to_arr32() to ") --- sys/compat/linuxkpi/common/include/linux/bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitmap.h b/sys/compat/linuxkpi/common/include/linux/bitmap.h index 4e156377cdaf..98e13dbb55d3 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitmap.h +++ b/sys/compat/linuxkpi/common/include/linux/bitmap.h @@ -302,7 +302,7 @@ bitmap_to_arr32(uint32_t *dst, const unsigned long *src, unsigned int size) src++; } #else - bitmap_copy(dst, src, size); + bitmap_copy((unsigned long *)dst, src, size); #endif if ((size % 32) != 0) /* Linux uses BITS_PER_LONG. Seems to be a bug */ dst[end - 1] &= (uint32_t)(UINT_MAX >> (32 - (size % 32))); From nobody Sat Apr 22 11:17: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 4Q3TPc1pKZz46bC1; Sat, 22 Apr 2023 11:17: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 4Q3TPc1NKCz3PCr; Sat, 22 Apr 2023 11:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682162228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2I8pf0wSqbd7G7/TKQukE9MTWx7fkGjP/VaNtzXMh/k=; b=D5mKSmevwuu5ucnh8whHt1HyxPMendDUCZRg42LZRd58fG/AJryvFM1QEIz+jY57NnjehI 99VW5inmCyrz3XqsNt03LbJi5zMQLGRY28oXIteN60XZO4k9TwyJBhNGTzBaof5mcr7XTV 1S93I8LWjM/C1DcS1siODFhtk5Z901N7AxG8pIsPsFIDPEzTDAbNJ6dqj/FVX3U4zuI+P7 20M6CKF0TkOaMJb2x1+uyixDiayTFlcwheJepLKYAkxMe5FKpk3DD34eDIQlqjOnvQU/3P carjFYjUlgMb9whwH3QRikyhfykvpnr/slrmrrDXR58DqlLH/YJMB16CahMX2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682162228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2I8pf0wSqbd7G7/TKQukE9MTWx7fkGjP/VaNtzXMh/k=; b=O/uPzC/eh+ulqe9V1FFXqZFcvtiRxPVw6Foc9ePtBXwt390VRdJRH/vJdp9uCu5LUQMUFn JfMprOnh381TuMVCSrdORfK7hRJmdSTH4c/61PnE0D41bXJmWjpJYuapIq49uCJoX5IlHz C6rZwOKeRHOa2ziWVBkuOOlBQh5TFcMf3mPjpafpC+8LYUzcTkggO+/VmgUl85nos+i51U 0ZdFJLtN9WRnmfq6j6CVB1bpl5LiUCJYdZtaWe5kHpBdPjjy/UlofoCz8aYi0e65cEb5iN HVV4zxZYVpoZcL1qjn5o+iyqmc4QMLPdfApROzeHF2qdquhwVH35TuVtFKXvBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682162228; a=rsa-sha256; cv=none; b=vKPCBtyKczCeJ0y/dJhHZTF1+hWAgdEFLr224svjJwPj4l8fjH6ppQRqonAzAM22UYaNrW /+pKGTlfXuangyJVwLUzP4vZhN1ai7tArdQWsJfqC0p8lwIiLL/bGRp7N4XJK4j7tDMXKd tlOvfdawBtcOuikP2T23glXKSS5Rd67Gi396i80od3i+v/meAVQ+3sihmq5fXg2pmALTRu w/zs0xsShsNFjdoR8qSyyKaZgwnZIenehSpt/0tQKUvTeuiXKPib6sIPZm8J0dXpZq4Neq PtftefBoYVm/iAcZMrYXoJR3q0S1bSJw4lmZiNrDuiPBraR3JXvwUsEJjDvsLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3TPc0PPXz1095; Sat, 22 Apr 2023 11:17: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 33MBH71m095172; Sat, 22 Apr 2023 11:17:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MBH79A095171; Sat, 22 Apr 2023 11:17:07 GMT (envelope-from git) Date: Sat, 22 Apr 2023 11:17:07 GMT Message-Id: <202304221117.33MBH79A095171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 7f658f99f7ed - main - stress2: Mark set but unused variables as unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f658f99f7ed5d1d0e0802073bb22eb8a0a784fb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=7f658f99f7ed5d1d0e0802073bb22eb8a0a784fb commit 7f658f99f7ed5d1d0e0802073bb22eb8a0a784fb Author: Peter Holm AuthorDate: 2023-04-22 11:16:01 +0000 Commit: Peter Holm CommitDate: 2023-04-22 11:16:01 +0000 stress2: Mark set but unused variables as unused --- tools/test/stress2/misc/syzkaller11.sh | 2 +- tools/test/stress2/misc/syzkaller12.sh | 2 +- tools/test/stress2/misc/syzkaller14.sh | 2 +- tools/test/stress2/misc/syzkaller15.sh | 2 +- tools/test/stress2/misc/syzkaller16.sh | 2 +- tools/test/stress2/misc/syzkaller19.sh | 2 +- tools/test/stress2/misc/syzkaller24.sh | 2 +- tools/test/stress2/misc/syzkaller26.sh | 2 +- tools/test/stress2/misc/syzkaller27.sh | 2 +- tools/test/stress2/misc/syzkaller28.sh | 2 +- tools/test/stress2/misc/syzkaller29.sh | 2 +- tools/test/stress2/misc/syzkaller31.sh | 2 +- tools/test/stress2/misc/syzkaller32.sh | 2 +- tools/test/stress2/misc/syzkaller33.sh | 2 +- tools/test/stress2/misc/syzkaller34.sh | 2 +- tools/test/stress2/misc/syzkaller4.sh | 2 +- tools/test/stress2/misc/syzkaller42.sh | 2 +- tools/test/stress2/misc/syzkaller43.sh | 2 +- tools/test/stress2/misc/syzkaller50.sh | 2 +- tools/test/stress2/misc/syzkaller51.sh | 2 +- tools/test/stress2/misc/syzkaller53.sh | 2 +- tools/test/stress2/misc/syzkaller54.sh | 2 +- tools/test/stress2/misc/syzkaller55.sh | 2 +- tools/test/stress2/misc/syzkaller58.sh | 2 +- tools/test/stress2/misc/syzkaller59.sh | 2 +- tools/test/stress2/misc/syzkaller61.sh | 2 +- tools/test/stress2/misc/syzkaller64.sh | 2 +- tools/test/stress2/misc/syzkaller7.sh | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tools/test/stress2/misc/syzkaller11.sh b/tools/test/stress2/misc/syzkaller11.sh index 9586092cd5b3..788ea3a9557a 100755 --- a/tools/test/stress2/misc/syzkaller11.sh +++ b/tools/test/stress2/misc/syzkaller11.sh @@ -218,7 +218,7 @@ static void execute_one(void); static void loop(void) { - int iter; + int iter __unused; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller12.sh b/tools/test/stress2/misc/syzkaller12.sh index dc026dc348bc..f5468c6c5e1f 100755 --- a/tools/test/stress2/misc/syzkaller12.sh +++ b/tools/test/stress2/misc/syzkaller12.sh @@ -94,7 +94,7 @@ static void execute_one(void); static void loop(void) { - int iter; + int iter __unused; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller14.sh b/tools/test/stress2/misc/syzkaller14.sh index 5fa99004f838..9181fe71a2af 100755 --- a/tools/test/stress2/misc/syzkaller14.sh +++ b/tools/test/stress2/misc/syzkaller14.sh @@ -229,7 +229,7 @@ static void execute_one(void); static void loop(void) { - int iter; + int iter __unused; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller15.sh b/tools/test/stress2/misc/syzkaller15.sh index d15017d7eb12..7a13bd819f0b 100755 --- a/tools/test/stress2/misc/syzkaller15.sh +++ b/tools/test/stress2/misc/syzkaller15.sh @@ -112,7 +112,7 @@ static void execute_one(void); static void loop(void) { - int iter; + int iter __unused; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller16.sh b/tools/test/stress2/misc/syzkaller16.sh index 8671b46474ac..7035223b8f0e 100755 --- a/tools/test/stress2/misc/syzkaller16.sh +++ b/tools/test/stress2/misc/syzkaller16.sh @@ -273,7 +273,7 @@ static void execute_one(void); static void loop(void) { - int iter; + int iter __unused; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller19.sh b/tools/test/stress2/misc/syzkaller19.sh index b36b12e524f2..116ab539c152 100755 --- a/tools/test/stress2/misc/syzkaller19.sh +++ b/tools/test/stress2/misc/syzkaller19.sh @@ -78,7 +78,7 @@ static void execute_one(void); static void loop(void) { - int iter; + int iter __unused; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller24.sh b/tools/test/stress2/misc/syzkaller24.sh index 12a816598b8f..98d4f90b146f 100755 --- a/tools/test/stress2/misc/syzkaller24.sh +++ b/tools/test/stress2/misc/syzkaller24.sh @@ -81,7 +81,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller26.sh b/tools/test/stress2/misc/syzkaller26.sh index f14806199ff5..857ba0eaac65 100755 --- a/tools/test/stress2/misc/syzkaller26.sh +++ b/tools/test/stress2/misc/syzkaller26.sh @@ -82,7 +82,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller27.sh b/tools/test/stress2/misc/syzkaller27.sh index b003f6aec319..a84c921e462d 100755 --- a/tools/test/stress2/misc/syzkaller27.sh +++ b/tools/test/stress2/misc/syzkaller27.sh @@ -86,7 +86,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller28.sh b/tools/test/stress2/misc/syzkaller28.sh index c6ba56d1e222..7062d84a8234 100755 --- a/tools/test/stress2/misc/syzkaller28.sh +++ b/tools/test/stress2/misc/syzkaller28.sh @@ -220,7 +220,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller29.sh b/tools/test/stress2/misc/syzkaller29.sh index 8b67dd4e1283..5976e2cc596d 100755 --- a/tools/test/stress2/misc/syzkaller29.sh +++ b/tools/test/stress2/misc/syzkaller29.sh @@ -79,7 +79,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller31.sh b/tools/test/stress2/misc/syzkaller31.sh index 12eb98bd8c57..9815ac16f404 100755 --- a/tools/test/stress2/misc/syzkaller31.sh +++ b/tools/test/stress2/misc/syzkaller31.sh @@ -228,7 +228,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller32.sh b/tools/test/stress2/misc/syzkaller32.sh index 03a13738c58a..1d96f1e3deff 100755 --- a/tools/test/stress2/misc/syzkaller32.sh +++ b/tools/test/stress2/misc/syzkaller32.sh @@ -231,7 +231,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller33.sh b/tools/test/stress2/misc/syzkaller33.sh index 7f017cd167f1..fac3318e4d0d 100755 --- a/tools/test/stress2/misc/syzkaller33.sh +++ b/tools/test/stress2/misc/syzkaller33.sh @@ -88,7 +88,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller34.sh b/tools/test/stress2/misc/syzkaller34.sh index 247079e1cd1a..d8b89991c2f2 100755 --- a/tools/test/stress2/misc/syzkaller34.sh +++ b/tools/test/stress2/misc/syzkaller34.sh @@ -53,7 +53,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller4.sh b/tools/test/stress2/misc/syzkaller4.sh index 2a14d4d2b776..06797980b2a0 100755 --- a/tools/test/stress2/misc/syzkaller4.sh +++ b/tools/test/stress2/misc/syzkaller4.sh @@ -215,7 +215,7 @@ static void execute_one(void); static void loop(void) { - int iter; + int iter __unused; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller42.sh b/tools/test/stress2/misc/syzkaller42.sh index b5b234de9cd6..e0a02e18df2d 100755 --- a/tools/test/stress2/misc/syzkaller42.sh +++ b/tools/test/stress2/misc/syzkaller42.sh @@ -75,7 +75,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller43.sh b/tools/test/stress2/misc/syzkaller43.sh index ffa6e1c6857c..fb32ea77ab66 100755 --- a/tools/test/stress2/misc/syzkaller43.sh +++ b/tools/test/stress2/misc/syzkaller43.sh @@ -214,7 +214,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller50.sh b/tools/test/stress2/misc/syzkaller50.sh index d50e90866b8c..e813db054458 100755 --- a/tools/test/stress2/misc/syzkaller50.sh +++ b/tools/test/stress2/misc/syzkaller50.sh @@ -71,7 +71,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller51.sh b/tools/test/stress2/misc/syzkaller51.sh index bd5b5da16d9a..772d6cc556c0 100755 --- a/tools/test/stress2/misc/syzkaller51.sh +++ b/tools/test/stress2/misc/syzkaller51.sh @@ -78,7 +78,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller53.sh b/tools/test/stress2/misc/syzkaller53.sh index ecb0843b8c1f..bfbabe70a571 100755 --- a/tools/test/stress2/misc/syzkaller53.sh +++ b/tools/test/stress2/misc/syzkaller53.sh @@ -119,7 +119,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller54.sh b/tools/test/stress2/misc/syzkaller54.sh index dc3ce0dc876c..252ba4e0f6f4 100755 --- a/tools/test/stress2/misc/syzkaller54.sh +++ b/tools/test/stress2/misc/syzkaller54.sh @@ -216,7 +216,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller55.sh b/tools/test/stress2/misc/syzkaller55.sh index 9914587926cf..e1d3e7a28121 100755 --- a/tools/test/stress2/misc/syzkaller55.sh +++ b/tools/test/stress2/misc/syzkaller55.sh @@ -77,7 +77,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller58.sh b/tools/test/stress2/misc/syzkaller58.sh index 0083e13f1692..6c11cd583b9d 100755 --- a/tools/test/stress2/misc/syzkaller58.sh +++ b/tools/test/stress2/misc/syzkaller58.sh @@ -216,7 +216,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller59.sh b/tools/test/stress2/misc/syzkaller59.sh index b628c25d3298..1644ce627934 100755 --- a/tools/test/stress2/misc/syzkaller59.sh +++ b/tools/test/stress2/misc/syzkaller59.sh @@ -94,7 +94,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller61.sh b/tools/test/stress2/misc/syzkaller61.sh index e150843dc380..a25ae4cf00d8 100755 --- a/tools/test/stress2/misc/syzkaller61.sh +++ b/tools/test/stress2/misc/syzkaller61.sh @@ -249,7 +249,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller64.sh b/tools/test/stress2/misc/syzkaller64.sh index c9a88f2184a6..f13fd415087b 100755 --- a/tools/test/stress2/misc/syzkaller64.sh +++ b/tools/test/stress2/misc/syzkaller64.sh @@ -268,7 +268,7 @@ static void execute_one(void); static void loop(void) { - int iter = 0; + int iter __unused = 0; for (;; iter++) { int pid = fork(); if (pid < 0) diff --git a/tools/test/stress2/misc/syzkaller7.sh b/tools/test/stress2/misc/syzkaller7.sh index f43747006862..c03a47d8b2d2 100755 --- a/tools/test/stress2/misc/syzkaller7.sh +++ b/tools/test/stress2/misc/syzkaller7.sh @@ -80,7 +80,7 @@ static void execute_one(void); static void loop(void) { - int iter; + int iter __unused; for (iter = 0;; iter++) { int pid = fork(); if (pid < 0) From nobody Sat Apr 22 13:39: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 4Q3XYR6fHKz46lCJ for ; Sat, 22 Apr 2023 13:39: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 4Q3XYR5bQ4z4Nmf; Sat, 22 Apr 2023 13:39:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682170747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ofuCyR4R1UM5ot+mPaas+3V40VzqsbqJEeaWWb9lLs=; b=WSDjsAxLSrWqo32b93OQfXfmPPa4uBqJADbMiOGp7D4JDTa+8CppjYe6nP2Zl6NSkCdAGb pXCTHMSbJB/AWfIpko4PmxujggHLZkm0Pudd7cIxDhpYAI5Qs0yfvY1RdomPazWu1GrOt1 QDLo8EH0rcBd2nRFqVh7XHW5Qkz4/Rt+0jzZXWwh1BibeXCktdW0I0/22J5tVqkaKA3mB9 JxtfNzhY69R2+YR5LZA1OH8KVePN/D4B6XyfAuHesA3Ywm4bij9v8NjbMX2vwPNtGLjuCR tufQMvVg9bTrt6bnKm4ETwBVjkzy0dsuDUXLeI8+d3Lvi2SrnW/OlP0Fa5wJjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682170747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ofuCyR4R1UM5ot+mPaas+3V40VzqsbqJEeaWWb9lLs=; b=UmTjYReyP88g3dvkPKCAFiBCJoOc1fOJKS7Pvf0oSM+0XoxBEo3WYx6SAbjygbr4BpltJH Bpk0z3PLct1mrS3mh6Cnl8w5LMvVKAViWqLjWbY1EwXMtoOsbJD3RusrLtgQ9f0+EJYUjk GaYKYwmbGmcUDMbyjUNvVU9ONNtoctKixrSGDcoCli9KQbed5wb+09HFy+gIbVz3QWqmZt YJB41O458TVB+Z7boRghP45XCJPPXIROlOFVxAwhz2dwhciNoBOE+WQkKiHAq6K+GiVRZS CAvLYyZnoPexlyMJOxCfiitLHn42AvtOakYDud1BJd7Iq6QgUCWmhKe1i3uzzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682170747; a=rsa-sha256; cv=none; b=kqeklmXpXbqe7wcat6V3Vn8eaZ9E+ZCn1ud2tdHKokVC/6wwZGtsqPvSRz2HK8AGTK7NZL cwV01wt/6wp+PIUMiAxMlHEE3ZkuHNlCg2c6E/9tz3FZ5m5PK6M8NUL8bM26rWjeJT9fB3 oEnAiapkxX9DdH+puU3UCQ+6IunlUenr3F09ZyBHZF7ZZ73+yU1i84n7BgEL6HJ+0TaheA WrR6tgc4ntKFAD1eix0xLZBe6RB5s3i6yuR/4dVJ0laGMfuZrzCbOLk6uZAN53UAuueCCs EJIKMDEAezwnXbWf8QzwSEwAzJa3e3l6u1/09//VA3VLfTY50lXoaPP3RsoxtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3XYR4MYZz13rj; Sat, 22 Apr 2023 13:39: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 33MDd70l024932; Sat, 22 Apr 2023 13:39:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MDd7Bm024931; Sat, 22 Apr 2023 13:39:07 GMT (envelope-from git) Date: Sat, 22 Apr 2023 13:39:07 GMT Message-Id: <202304221339.33MDd7Bm024931@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 8a37c71e9d88..86321b98854d - vendor/llvm-project/release-16.x - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/release-16.x X-Git-Reftype: branch X-Git-Commit: 86321b98854d834e516cc65ddd09ef53e930fc4c X-Git-Oldrev: 8a37c71e9d8855c91b9ef296ed389248f960bb52 X-Git-Newrev: 86321b98854d834e516cc65ddd09ef53e930fc4c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/llvm-project/release-16.x has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=8a37c71e9d88..86321b98854d 86321b98854d Vendor import of llvm-project branch release/16.x llvmorg-16.0.2-0-g18ddebe1a1a9 (aka 16.0.2 release). From nobody Sat Apr 22 13:39: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 4Q3XYS0MKjz46l6g for ; Sat, 22 Apr 2023 13:39: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 4Q3XYR5wNSz4P32; Sat, 22 Apr 2023 13:39:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682170747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KUrLTX601vNUhsj6eRQFoguxMi1D0C4kYPF6i2C3GU0=; b=RukXfoB/GE7u+9rdJG6u+96YVYLLiAXL1jWolTReflEUlSDdkFM+1LaQaxuTbrWyl0o0o3 zJdXXH1tXNkgow9P9HGgol/JUneqYVXbosU0rfoaoV2MJanb9dzq4wi71g6Kne2IRb75JT kZqVMctiViCnOiFAmbINQuu+c34sG7xMs8lgbMOTnmI5VBRvvtEW3wxsrt+nJZ/r/FUozu gBgPTi0mSaFCdMIvVonYhODwdmRtCkwCBIDAna5MwQAXgPlzxB8Qnz42XJlIO+M2okl/1+ eQguv6WB4otBUaOzZBIsNM0zxe4oEbltj5wGh4hIWh9FC+3iVLFSWrTQWcl9Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682170747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KUrLTX601vNUhsj6eRQFoguxMi1D0C4kYPF6i2C3GU0=; b=F3gM7GhIvqQsJXQSLDututG6TF3zCosCbelrNbMrlKzPzM/HHm2Fs93MsJHD3kfl2mDsnd G+l5cz1BBAJJyeq0wsfgAfUF2xUtYkT3W04BupnFd3d1S9WDYdLCVBiIwd5XtRFcEuPeY4 6hWG5Uj6gPCssdIo+qzsmK0pjNSHagclNKB646VM1JD8zcoAVKFYBaG09Dku+ILVauu/Xf pJYVYN9HjpP0TwJq2ERl576CyjGa0rEOSWN3jwC5XHgF/+XwWggf8kltT4tWc1Rh1m+b1M vXqZT9GWfrwLoSJ3QArftl0DuChCfebyq5FgyjkTS/gvxetAk9zELKRoM7HI+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682170747; a=rsa-sha256; cv=none; b=EYVgUtHlHdW2q3vhyHEQPDp86PzkvXRxtN4dnowP+2AKtFNOzjcVMvLIjiwPSAwNE3IB37 iI+h4v/k9/JftzuwLpZRAPhDoBF+p0LhJ1CoJF57ecaSQe5OMjIluU+sXVqKTN3athcoSY olCx8eN3bRLaZRIAGktkra7WfLJAkQMJiTxzL4E4I4+H+3MT/9pPxvVt0bQ6yeBZI9fSeo 3UHHc/nfyBik4k4VL8Q8sYRfv2FchUcE5uCyHz6gTu41ojdXiyk/ZBo3G+ECym7NG3KsDb ZKSAhtlH4SeisXijyPr0k9Cd0LOEsF5jVxJI7zGY0/0YfjuetBXeiQ/0a7RjHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3XYR50pFz13xX; Sat, 22 Apr 2023 13:39: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 33MDd7OM024952; Sat, 22 Apr 2023 13:39:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MDd7d0024951; Sat, 22 Apr 2023 13:39:07 GMT (envelope-from git) Date: Sat, 22 Apr 2023 13:39:07 GMT Message-Id: <202304221339.33MDd7d0024951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: b41a39d06009 - Create tag vendor/llvm-project/llvmorg-16.0.2-0-g18ddebe1a1a9 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-16.0.2-0-g18ddebe1a1a9 X-Git-Reftype: annotated tag X-Git-Commit: b41a39d06009d22403e575078168c5e980c35129 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/llvm-project/llvmorg-16.0.2-0-g18ddebe1a1a9 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-16.0.2-0-g18ddebe1a1a9 tag vendor/llvm-project/llvmorg-16.0.2-0-g18ddebe1a1a9 Tagger: Dimitry Andric TaggerDate: 2023-04-22 13:38:31 +0000 Tag llvm-project branch release/16.x llvmorg-16.0.2-0-g18ddebe1a1a9 (aka 16.0.2 release). commit 86321b98854d834e516cc65ddd09ef53e930fc4c Author: Dimitry Andric AuthorDate: 2023-04-22 13:38:13 +0000 Commit: Dimitry Andric CommitDate: 2023-04-22 13:38:13 +0000 Vendor import of llvm-project branch release/16.x llvmorg-16.0.2-0-g18ddebe1a1a9 (aka 16.0.2 release). From nobody Sat Apr 22 15:19: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 4Q3Znk5sSvz46sJM; Sat, 22 Apr 2023 15:19: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 4Q3Znk4Csbz3nWT; Sat, 22 Apr 2023 15:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682176794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9u6D9LDH3KDfNe8+v9jVBMvH07DMjNN7hkHBQn4A88=; b=fR8Bmpa0XAw7H/qP31zoN5UnfeTTBLZBW9KuP6/LS00ckbA9EqfZbzQNgGGUb0JDE+J5XU MtB4WL10UkXk2FYcP8xQVl02GyBE/LLVilpOYrKGM6umKH4XvYu9HxahjEsvaFVNbNpoxY yGGBnNsPl8s9CWgO469wVb7BIS/jiBbZ/mcpb5HN4RPYXfNFC4a4TpJhq1XB+sD1MPjAN+ PrC08A7/Obs/lcyh0wF8UVi0vhhgHvCBfqoRiMZyv2Zx362gte+kPe4WMAZaQmw5QqHfkc khM170m9PY5YAgCHj5OAMQ60hUzNIizAfk0mSM8lSXipNgLBjWbpFE3LDf4zRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682176794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e9u6D9LDH3KDfNe8+v9jVBMvH07DMjNN7hkHBQn4A88=; b=JvQQyEsd4Rp3IP8DmNBxW6Nmkx1sjToC8v5nRwg/1HR7XdThN4peMZ3xaZwrnF7REd9JG9 2tHilg9FRzD8hqjQQIJKaoozQ9KHccnqslPCq5NYao4YMftdAWT/iOAL+KCMnWkeS2CDbM Vgqyf3Xu482NZD6S7xmyjtxUIfKP/5l5x79PsqGgBYlPToWPZq+nz3QuOIFVLbiWWVC6m9 cpyuB8QjjVXcKJ/Qo+verFxb8aK1E1t/Hx472SNmMl2+fDYzfK/kX4X2s49fUSoKlR03J9 z8FvVRxrmlT4aTRhSI6IBOfpuusCw+SIojtwkCUSXxLpQpZED2szsxKwqaZfxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682176794; a=rsa-sha256; cv=none; b=vop+Xm4uS5HYwOCLZB9DynlAtLg9/YxwuJct6Exp0Vm4Unb7L0NkO1Xzb6bSIgD6CHXSqY QTz329R4HrcR9R6YAvlFfYT5tq005k6gbjpRrQ2hIm+E+0wdZd/bsX48g5ZC1IYeYFHcmP LxqX6wItjwYWb3lBKFGrGV9tqC/6su/Qz2/mH62eSLrDVoCK1o/WDlNyGq9MX5pR5ZWhdL ZqD++o0F5ZBB5VBFirrJB96Pid7/Oi+oiq5BVneNKQSqOBhMlzoDEq5d9tOsbi8oTA/27O PPbT4ylqkM4AWCJoyAlKUCy2e7g1N8WVaVYIzd2z0YGoFxjqmy+89pcMxoAJDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3Znk34gMz16Kg; Sat, 22 Apr 2023 15:19: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 33MFJsvt089963; Sat, 22 Apr 2023 15:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MFJsFu089962; Sat, 22 Apr 2023 15:19:54 GMT (envelope-from git) Date: Sat, 22 Apr 2023 15:19:54 GMT Message-Id: <202304221519.33MFJsFu089962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 33906122e1ff - main - nfsuserd.c: Replace slave with server List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33906122e1ff6c35f7023c7dbaf112cfec088b93 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=33906122e1ff6c35f7023c7dbaf112cfec088b93 commit 33906122e1ff6c35f7023c7dbaf112cfec088b93 Author: Rick Macklem AuthorDate: 2023-04-22 15:18:02 +0000 Commit: Rick Macklem CommitDate: 2023-04-22 15:18:02 +0000 nfsuserd.c: Replace slave with server --- usr.sbin/nfsuserd/nfsuserd.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/usr.sbin/nfsuserd/nfsuserd.c b/usr.sbin/nfsuserd/nfsuserd.c index 1e99f806637d..3095948dce75 100644 --- a/usr.sbin/nfsuserd/nfsuserd.c +++ b/usr.sbin/nfsuserd/nfsuserd.c @@ -96,9 +96,9 @@ u_char *defaultuser = "nobody"; uid_t defaultuid = 65534; u_char *defaultgroup = "nogroup"; gid_t defaultgid = 65533; -int verbose = 0, im_a_slave = 0, nfsuserdcnt = -1, forcestart = 0; +int verbose = 0, im_a_server = 0, nfsuserdcnt = -1, forcestart = 0; int defusertimeout = DEFUSERTIMEOUT, manage_gids = 0; -pid_t slaves[MAXNFSUSERD]; +pid_t servers[MAXNFSUSERD]; static struct sockaddr_storage fromip; #ifdef INET6 static struct in6_addr in6loopback = IN6ADDR_LOOPBACK_INIT; @@ -290,7 +290,7 @@ main(int argc, char *argv[]) dnsname, nid.nid_usermax, nid.nid_usertimeout); for (i = 0; i < nfsuserdcnt; i++) - slaves[i] = (pid_t)-1; + servers[i] = (pid_t)-1; nargs.nuserd_family = fromip.ss_family; /* @@ -444,7 +444,7 @@ main(int argc, char *argv[]) exit(0); #endif /* - * Temporarily block SIGUSR1 and SIGCHLD, so slaves[] can't + * Temporarily block SIGUSR1 and SIGCHLD, so servers[] can't * end up bogus. */ sigemptyset(&signew); @@ -463,14 +463,14 @@ main(int argc, char *argv[]) openlog("nfsuserd:", LOG_PID, LOG_DAEMON); /* - * Fork off the slave daemons that do the work. All the master - * does is kill them off and cleanup. + * Fork off the server daemons that do the work. All the master + * does is terminate them and cleanup. */ for (i = 0; i < nfsuserdcnt; i++) { - slaves[i] = fork(); - if (slaves[i] == 0) { - im_a_slave = 1; - setproctitle("slave"); + servers[i] = fork(); + if (servers[i] == 0) { + im_a_server = 1; + setproctitle("server"); sigemptyset(&signew); sigaddset(&signew, SIGUSR1); sigprocmask(SIG_UNBLOCK, &signew, NULL); @@ -481,7 +481,7 @@ main(int argc, char *argv[]) svc_run(); syslog(LOG_ERR, "nfsuserd died: %m"); exit(1); - } else if (slaves[i] < 0) { + } else if (servers[i] < 0) { syslog(LOG_ERR, "fork: %m"); } } @@ -800,7 +800,7 @@ cleanup_term(int signo __unused) { int i, cnt; - if (im_a_slave) + if (im_a_server) exit(0); /* @@ -809,9 +809,9 @@ cleanup_term(int signo __unused) */ cnt = 0; for (i = 0; i < nfsuserdcnt; i++) { - if (slaves[i] != (pid_t)-1) { + if (servers[i] != (pid_t)-1) { cnt++; - kill(slaves[i], SIGUSR1); + kill(servers[i], SIGUSR1); } } From nobody Sat Apr 22 15:24: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 4Q3ZvS1nkKz46sZ6; Sat, 22 Apr 2023 15:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q3ZvS0LQxz3vly; Sat, 22 Apr 2023 15:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682177092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jmwSUgibw7nLSIw5jfcWxW3hAsByLAVcewNcgCkvws=; b=TxbyVaYmOqdZzXlecbVd9tkUGiz77EDG04yYOblX1TNFCKsy9QHsb68Li7mm1dHEIbob8V 7inldPwcP7MVUqltRAuZOyGZEEoIgVnBV5zxRQ9rbzZGwhinezCs1HDEBvLoSKeBsi/qvx vQm4sZXweVIgBj6YitUfJC69pkeIOyenY49asmcONNLbaf7cyOQo0j8HxGEQ38NFT0hTjd NgfLz0Tg1Sk4hp+N3dffP4S+nnU8Df3e/y+0bSDIBdJIApHkEzgoz+H15AqBrCRtFCiLPD Agst/W+KlzT95Iu4+3QuRrQ+GhPb2fHpEnuYcYtUwfST8J6yBvF9GmyuG6oOOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682177092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jmwSUgibw7nLSIw5jfcWxW3hAsByLAVcewNcgCkvws=; b=WqTwdvgEyrXvqcqaEAPHbv9OUZjSASUGAjVVuTEOwRkLvsvEpsNKxQRc9d39MIUMSeHxM1 xIwAAIBEcDXdWuLVimN0wLeDMi/2C3NOOig+krTJl8v82b0ss0BH5aZr4GlW0p0AAjOvvm moB0o2EYY6xNms2ouuTkoAydq1TwwQyIVF5Uf7FkPqgU/wkPmbDX0v6Hlxt/Jvi5m+Pt6b lxYlstiPISjwRWMrirYxNSk0g0EHAJV1N7Eg2SefgUztuxXGkag6isKSXXq/KppK44nsKO htfAoLCwoK+kQRsIKeImHANW5aejy8UFN8qeLl/R/A6DQnl8C+LTIYzVYxftcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682177092; a=rsa-sha256; cv=none; b=u7dYKyCC10EJOI6sPPsbzxOjfjLmaLRi19el1ALM8aTEblugsJZ9b8l6z/o2qY5999+RsB spzgtgX9Jo8034IUo1Tj91sithJNMvfyQhp1fjgNPU/jRF9IWmZiInjhZRQIOF6X94SrAP KjETILYNcqzN0Azf847/W6PD7n9d74Ov6MG9oSVCy5ZF32LKiazLjQA7O6MqoUYzybbkqz EFM8lbZO01SgaeA8ui1VlYp/64sm1+8XdHj8/oJfq1ekSzjlbPnsZSUuEQoiBS2bpOYsXp p6+i4fHQox9Vevv559vKifes/Xh4MutDeEH+Qc9GImMk5YUdihGgUfzuMnXRoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3ZvR6LxJz16WJ; Sat, 22 Apr 2023 15:24: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 33MFOp6B005835; Sat, 22 Apr 2023 15:24:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MFOp1l005834; Sat, 22 Apr 2023 15:24:51 GMT (envelope-from git) Date: Sat, 22 Apr 2023 15:24:51 GMT Message-Id: <202304221524.33MFOp1l005834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 0468e89cb359 - main - zfs/powerpc64: Fix big-endian powerpc64 asm List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0468e89cb35936d608cd2760135a791350f2f161 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=0468e89cb35936d608cd2760135a791350f2f161 commit 0468e89cb35936d608cd2760135a791350f2f161 Author: Justin Hibbits AuthorDate: 2023-04-13 15:26:52 +0000 Commit: Justin Hibbits CommitDate: 2023-04-22 15:27:49 +0000 zfs/powerpc64: Fix big-endian powerpc64 asm The powerpc asm from openzfs assumes that big-endian is always ELFv1 and ELFv2 is always little-endian, while FreeBSD uses ELFv2 everywhere. Add the necessary bits to the checksum asm to work on big-endian ELFv2. This was also submitted upstream as PR#14779. Tested by: dbaio --- sys/contrib/openzfs/lib/libspl/include/sys/simd.h | 2 +- .../openzfs/module/icp/asm-ppc64/sha2/sha256-p8.S | 15 +++++++++++++++ .../openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S | 15 +++++++++++++++ .../openzfs/module/icp/asm-ppc64/sha2/sha512-p8.S | 16 ++++++++++++++++ .../openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S | 15 +++++++++++++++ 5 files changed, 62 insertions(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/lib/libspl/include/sys/simd.h b/sys/contrib/openzfs/lib/libspl/include/sys/simd.h index a106967d0725..41f9df506468 100644 --- a/sys/contrib/openzfs/lib/libspl/include/sys/simd.h +++ b/sys/contrib/openzfs/lib/libspl/include/sys/simd.h @@ -551,7 +551,7 @@ zfs_sha512_available(void) #elif defined(__powerpc__) -#define kfpu_allowed() 1 +#define kfpu_allowed() 0 #define kfpu_initialize(tsk) do {} while (0) #define kfpu_begin() do {} while (0) #define kfpu_end() do {} while (0) diff --git a/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-p8.S b/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-p8.S index 6bbfe23b6e15..dc3c4cea669c 100644 --- a/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-p8.S +++ b/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-p8.S @@ -21,6 +21,7 @@ #if (defined(__PPC64__) && defined(__BIG_ENDIAN__)) +#if (!defined(_CALL_ELF) || _CALL_ELF == 1) .text .globl zfs_sha256_power8 @@ -33,6 +34,16 @@ zfs_sha256_power8: .previous .align 6 .zfs_sha256_power8: +#else +.abiversion 2 +.text + +.globl zfs_sha256_power8 +.type zfs_sha256_power8,@function +.align 6 +zfs_sha256_power8: +.localentry zfs_sha256_power8,0 +#endif stdu 1,-384(1) mflr 8 li 10,207 @@ -677,8 +688,12 @@ zfs_sha256_power8: .long 0 .byte 0,12,4,1,0x80,6,3,0 .long 0 +#if (!defined(_CALL_ELF) || _CALL_ELF == 1) .size .zfs_sha256_power8,.-.zfs_sha256_power8 .size zfs_sha256_power8,.-.zfs_sha256_power8 +#else +.size zfs_sha256_power8,.-zfs_sha256_power8 +#endif .align 6 .LPICmeup: mflr 0 diff --git a/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S b/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S index 2219e313c9c6..d039bc36ee11 100644 --- a/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S +++ b/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha256-ppc.S @@ -21,6 +21,7 @@ #if (defined(__PPC64__) && defined(__BIG_ENDIAN__)) +#if (!defined(_CALL_ELF) || _CALL_ELF == 1) .text .globl zfs_sha256_ppc @@ -33,6 +34,16 @@ zfs_sha256_ppc: .previous .align 6 .zfs_sha256_ppc: +#else +.abiversion 2 +.text + +.globl zfs_sha256_ppc +.type zfs_sha256_ppc,@function +.align 6 +zfs_sha256_ppc: +.localentry zfs_sha256_ppc,0 +#endif stdu 1,-320(1) mflr 0 sldi 5,5,6 @@ -1312,8 +1323,12 @@ zfs_sha256_ppc: blr .long 0 .byte 0,12,0x14,0,0,0,0,0 +#if (!defined(_CALL_ELF) || _CALL_ELF == 1) .size .zfs_sha256_ppc,.-.zfs_sha256_ppc .size zfs_sha256_ppc,.-.zfs_sha256_ppc +#else +.size zfs_sha256_ppc,.-zfs_sha256_ppc +#endif .align 6 .LPICmeup: mflr 0 diff --git a/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-p8.S b/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-p8.S index 39a90ede3dc5..2409c53385d6 100644 --- a/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-p8.S +++ b/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-p8.S @@ -21,6 +21,7 @@ #if (defined(__PPC64__) && defined(__BIG_ENDIAN__)) +#if (!defined(_CALL_ELF) || _CALL_ELF == 1) .text .globl zfs_sha512_power8 @@ -33,6 +34,17 @@ zfs_sha512_power8: .previous .align 6 .zfs_sha512_power8: +#else +.abiversion 2 +.text + +.globl zfs_sha512_power8 +.type zfs_sha512_power8,@function +.align 6 +zfs_sha512_power8: +.localentry zfs_sha512_power8,0 +#endif + stdu 1,-384(1) mflr 8 li 10,207 @@ -679,8 +691,12 @@ zfs_sha512_power8: .long 0 .byte 0,12,4,1,0x80,6,3,0 .long 0 +#if (!defined(_CALL_ELF) || _CALL_ELF == 1) .size .zfs_sha512_power8,.-.zfs_sha512_power8 .size zfs_sha512_power8,.-.zfs_sha512_power8 +#else +.size zfs_sha512_power8,.-zfs_sha512_power8 +#endif .align 6 .LPICmeup: mflr 0 diff --git a/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S b/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S index 37070115c3ff..57213f68abc5 100644 --- a/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S +++ b/sys/contrib/openzfs/module/icp/asm-ppc64/sha2/sha512-ppc.S @@ -21,6 +21,7 @@ #if (defined(__PPC64__) && defined(__BIG_ENDIAN__)) +#if (!defined(_CALL_ELF) || _CALL_ELF == 1) .text .globl zfs_sha512_ppc @@ -33,6 +34,16 @@ zfs_sha512_ppc: .previous .align 6 .zfs_sha512_ppc: +#else +.abiversion 2 +.text + +.globl zfs_sha512_ppc +.type zfs_sha512_ppc,@function +.align 6 +zfs_sha512_ppc: +.localentry zfs_sha512_ppc,0 +#endif stdu 1,-384(1) mflr 0 sldi 5,5,7 @@ -1350,8 +1361,12 @@ zfs_sha512_ppc: blr .long 0 .byte 0,12,0x14,0,0,0,0,0 +#if (!defined(_CALL_ELF) || _CALL_ELF == 1) .size .zfs_sha512_ppc,.-.zfs_sha512_ppc .size zfs_sha512_ppc,.-.zfs_sha512_ppc +#else +.size zfs_sha512_ppc,.-zfs_sha512_ppc +#endif .align 6 .LPICmeup: mflr 0 From nobody Sat Apr 22 17:44: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 4Q3f0X5Mqsz464HX; Sat, 22 Apr 2023 17:44: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 4Q3f0X4HMPz3LCD; Sat, 22 Apr 2023 17:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682185468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3E5JggRKSbDg1NK+h/xkzvceRVywhV0gPR/JdHLpf8E=; b=ZxxOZ4tNIzg1r5PdFutVB37mWYjlEcqpyoKTDrmqIOCTl6Y7QrKJx0JfS1TAQx1HdQwn+t cu5JwnDTTDVbM+1co5zkkJpX2ws4yrJu4DxPSXk9iM6F0tVQdFOWYEiKDiwJnYf5Y7iPsq Ue6fMQnj9h/HB+xQXCS9IsRCDXVOwzNTMRl5YStF4iHCpKYcFQHWJtJWs+ydvh2NGNbvbN YxZMmPTeg3U7wNvwufpMrlwAwRSCdJ5yOq0j7pX7kRT8bpM7hsyiL4k6EOvKrlfabtVkUb 8EPivtMoqkQXdj9+fTYNDo6JM/9t1Bx5u/1M4iCiQCdLFwO/PMOhnOnOE8bbHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682185468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3E5JggRKSbDg1NK+h/xkzvceRVywhV0gPR/JdHLpf8E=; b=q240lZlWmC1NpZHEHArg4mV4T5wmUhv/wTcEy7u1N5SFzorykAS9eBOYfNeEL8gl37Dop6 mrLgDB7DdQnNCDmfbjv5mXle98eqnp3IoaJOo+KGQ10c0SlWU8KpoeDKjUaESkZBjbQJlB 8EDNRf3Y3dhvmX+WN31I5BuMwxpKjv2+b/v8KsSdLZ5+dkKYcKjj2+nIXur8yEAQMQsq7C DhT98FJls/eL4+WMnLYZcNuurxRxiFU1GuLJaKypP1dr0WsgWiUOSIm6K8WYcL+EN56sZi qKqWw6mKvRO0b6qWlfx+jKW+4rO1ighNB8Suc8eT0fSaUPYAI3Ve+hi9Ef/p1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682185468; a=rsa-sha256; cv=none; b=ZSgioh5VElg9vyxT4P9W5RxA1BWgWpKbHHkeHGR/H0FoFCaIWM3xyBA1pxOq32ZjiJva38 fdrP4YRSeEbxJF1MTUy/ZvxrChLISbcAXYMZA6qgmVCNFOTJjsAdVtX1BXI5iffQbj+/ym p0UmwW1ql+3ermfPpwLwWSU5RmsrnqUO1P+hqQ5J30TuSs3ZoFI0sLOkbqEBYprx4mckCA J322vuXPIJu7H2+SyHKDk13+hlvXjkCvgvsjTmYZFseI+nuK2FgV2rI7TOjjFxXdlWzUIP AWS4YezefCIdcm4NxxxhGaHR+GX7GnoUa7uQePS99gEtTWPM2iHEOT/pkXGaVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3f0X3G5Jz19s2; Sat, 22 Apr 2023 17:44: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 33MHiSst036215; Sat, 22 Apr 2023 17:44:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MHiSbL036214; Sat, 22 Apr 2023 17:44:28 GMT (envelope-from git) Date: Sat, 22 Apr 2023 17:44:28 GMT Message-Id: <202304221744.33MHiSbL036214@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: 5e3bb0514781 - main - pfctl: remove unneeded includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 5e3bb05147816885f1cf25c8cfc03ceec3fa376d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5e3bb05147816885f1cf25c8cfc03ceec3fa376d commit 5e3bb05147816885f1cf25c8cfc03ceec3fa376d Author: Kristof Provost AuthorDate: 2023-04-21 09:31:44 +0000 Commit: Kristof Provost CommitDate: 2023-04-22 17:43:55 +0000 pfctl: remove unneeded includes We don't use nvlists (directly) or sysctls, so there's no need to include the headers. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index b5ef07064fb9..09f29b1c601c 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -50,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From nobody Sat Apr 22 17:44: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 4Q3f0Z17ddz46467; Sat, 22 Apr 2023 17:44: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 4Q3f0Y6mvfz3LLj; Sat, 22 Apr 2023 17:44:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682185470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JwwGj4Z3IqUZ8i4D6Y4ygGpJQvuuU08ApMZOcYr+zDI=; b=Gmk5kSjCbpSWs6JOX0VLRlyXODDYpJM240OdKYlYQJadxhs8iuE8b4UHpiVy6M2lGLg9uU MokMEA+B+UuaoRzKM2vz4O0CbLOF0Q7jYAt3EW2eFEGb1J5jBdZjJiQRhoi/WYaUkmos+d pPAAglnXGpRPxYVsHewB1qm/WH3/cjHW7ubWkLMUB4CEFQyI/4lGTi8gnx9QX/DJEnraaT 6h4tBHS8EKp/ssDqHNRq1uEKkuoMUBvs7sYVD6A2YtGdutOD7NhnPjA3bmXyUDsz/fyURf rTinOevcEFZRhMKvBxW3PdFi2irgrEEXQo3BXoqmugOFCxAzpOEJuRC/O5qj9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682185470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JwwGj4Z3IqUZ8i4D6Y4ygGpJQvuuU08ApMZOcYr+zDI=; b=NsZlXInypYZ9jg3A540ST1YVpxVycS8LlqKQuvmjqWIOK2nV0+Ktq+jLgpRROAsaTLHYKQ EVUrHkWvfA9P8z9R2UuraUlhHBW82tL3Am3aRmbBtPAvnJXh8ynqay61v7DGCr6B/EkPag 7bhoSQSxHUCl5fiRhkTMXcstOo0KcF5XhmSJ6I8YZHNlPD86qkeOVB465Y/IfHnmgkRin5 VikDvy3Pl0LARl+JhSzJ8fKbTgrUaLFEEw5K7dOvUS2ufrX5J1jj7KdmM9ty6l51bLEMM+ 1Cxg1bbUt7kjmflIL+pp50SzNValm60ZVfquRrnUqzm5Hw9Mc8Tq3nxx85M4/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682185470; a=rsa-sha256; cv=none; b=L3PMi5d4aNCfck5mmO9hmkLiBf6bYI7FRN6MmqSUqo53xRWpmDBfD9LZ35X2V9HzCOKI1k C5a2tIbZ1p+7lCu2ANe+okc0/1EgThE+GTHis6EEes4INhg71ww1+tyPh0wBS88MH4qw1I +xWXHFcyUf2yFP/msX27oIXxnmd2hh5rZNygG2RRzY5nzucZvI/ZRNmL2ZohUatqpqZeZD sp0QLYFLAEJVPZv6+2emRGO14SeaS0bPg9rwLrDOXRNNXJE9vrgdH0fFanX+MBK+ukI6Gs HEfbwRLeUe8XRpWGLD1UO8PbbwRWMVceXZXaWOSimiIe3LDXeA7ue0BAgH+Exg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3f0Y4N0Gz19Zj; Sat, 22 Apr 2023 17:44: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 33MHiT9u036239; Sat, 22 Apr 2023 17:44:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MHiTHX036236; Sat, 22 Apr 2023 17:44:29 GMT (envelope-from git) Date: Sat, 22 Apr 2023 17:44:29 GMT Message-Id: <202304221744.33MHiTHX036236@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: dbce131b8f40 - main - pfctl: match geticmpcodeby*()/print_fromto() prototypes to definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: dbce131b8f40dbd5997db130e59ed7736a79f680 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dbce131b8f40dbd5997db130e59ed7736a79f680 commit dbce131b8f40dbd5997db130e59ed7736a79f680 Author: Kristof Provost AuthorDate: 2023-04-21 13:13:19 +0000 Commit: Kristof Provost CommitDate: 2023-04-22 17:43:56 +0000 pfctl: match geticmpcodeby*()/print_fromto() prototypes to definitions The definitions use sa_family_t, not u_int8_t. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 2 +- sbin/pfctl/pfctl_parser.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 15ed8c29abd0..1f8627f5e246 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -71,7 +71,7 @@ void print_port (u_int8_t, u_int16_t, u_int16_t, const char *, int); void print_ugid (u_int8_t, unsigned, unsigned, const char *, unsigned); void print_flags (u_int8_t); void print_fromto(struct pf_rule_addr *, pf_osfp_t, - struct pf_rule_addr *, u_int8_t, u_int8_t, int, int); + struct pf_rule_addr *, sa_family_t, u_int8_t, int, int); int ifa_skip_if(const char *filter, struct node_host *p); struct node_host *host_if(const char *, int, int *); diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index c5da3408fb93..563c525c1707 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -340,10 +340,10 @@ struct icmpcodeent { u_int8_t code; }; -const struct icmptypeent *geticmptypebynumber(u_int8_t, u_int8_t); -const struct icmptypeent *geticmptypebyname(char *, u_int8_t); -const struct icmpcodeent *geticmpcodebynumber(u_int8_t, u_int8_t, u_int8_t); -const struct icmpcodeent *geticmpcodebyname(u_long, char *, u_int8_t); +const struct icmptypeent *geticmptypebynumber(u_int8_t, sa_family_t); +const struct icmptypeent *geticmptypebyname(char *, sa_family_t); +const struct icmpcodeent *geticmpcodebynumber(u_int8_t, u_int8_t, sa_family_t); +const struct icmpcodeent *geticmpcodebyname(u_long, char *, sa_family_t); struct pf_timeout { const char *name; From nobody Sat Apr 22 19:03: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 4Q3glF1t5Qz468YQ; Sat, 22 Apr 2023 19:03: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 4Q3glF1LwTz3QrV; Sat, 22 Apr 2023 19:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682190185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cn+nCMHIES9yj4G7S2pYH2fcNTBdtz4ui6uPj5i4iv4=; b=uSJTE7+1LndPSAqAEEyeelvsro1SdZiLxMGuSLR8/HW895vs2WhslR22NFsOVEtHJeVpgG /5gB3y/TbQw1dYg+Z07FJ2bPhcwgkltZTzoz1bjNONPTUtiEqmEhB7c/sAP0IYeCPbDtwX uZdwRZOkL1w1pBB7wLcmdnf5/FPXRdDNhWDpL2s0EWbGfYW56o37SroSaHwpuOuP/wK+8U wciyOeCpkv3/Zge2N5ku2VOenmuVhoXo/BYeocjZxUKR2wH5UG9S9/gcSjEJrDeldKeNw/ ECgqwf+fk1BS82IVLFdaYI9gLR3t1NMCehdzYpCfa7NjnLZ6G53G+oWh0816Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682190185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cn+nCMHIES9yj4G7S2pYH2fcNTBdtz4ui6uPj5i4iv4=; b=Pwts4/q684tkxtSe4zBM2JJxKwJ263Wx1EFhPzD1s2oyB7rj5RsSgwgF21FjILexsNKlSb b2jc8Px7hitKZI26uiOa4EaYmqED4HXw5biTCtskxq7La6KKo+4HDhNZVlLEHkm+tuBZEm SMzGOlZLHdYwC4YOUPvguZiKwZXuRBqq5eRla9raLN7ZCrh1IDVurS7SqrWZ2kqFqUuSlf p8JeNTV5Bd09liYibmSRtu/N099JlM/40S+MAi35gUEaWFtZqGLRTQKMzz075dmG/2dgRl WMpY5ciPFc2iNAqTi/21gS9FXtznTMAAD5Xt/lq2AwZ2G5edtI4Y2Kw1KV/9SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682190185; a=rsa-sha256; cv=none; b=ON8l3GrSIYBFsNgW8oN9FXpBjYETqnuSCt13G5rdS6omqpqe0iwQDP+9MpW2sthWYuBwWw aRCigVdfFDA+oaWlI/RGB8GFE+bI/yypnG3/qhRMt9dqfd1b4zXF44Yt4x5hRr9e/RCUag RsnAS7/DpNLHLLtkvC+GmGWhMJKz7AvsZ5gAWq3BndQXItKMC0KE0uWTAwqmk2lTCKOpiR E1xIDvsqRova25BTibFSLeQCPN/2M0edk9iOxzupYJbEHH7C4aThwzlGBTiEVnnYIt+rz1 lp6083kfWECG6KeV2fYSQmzQ8BjQkDlfpFNiKv9UdnzF+NgNOfYuux7c1YM/zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3glF0PMdz1CbH; Sat, 22 Apr 2023 19:03:05 +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 33MJ34Pe068166; Sat, 22 Apr 2023 19:03:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MJ34Tj068165; Sat, 22 Apr 2023 19:03:04 GMT (envelope-from git) Date: Sat, 22 Apr 2023 19:03:04 GMT Message-Id: <202304221903.33MJ34Tj068165@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: 8561d0b2ec50 - main - Simplify building host tools during DIRDEPS_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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8561d0b2ec50eb127b58dee30bf49ef519947457 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8561d0b2ec50eb127b58dee30bf49ef519947457 commit 8561d0b2ec50eb127b58dee30bf49ef519947457 Author: Simon J. Gerraty AuthorDate: 2023-04-22 19:01:49 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-22 19:01:49 +0000 Simplify building host tools during DIRDEPS_BUILD The whole point of the DIRDEPS_BUILD is to avoid tree walks and basically build everything in a single pass. We use the pseudo MACHINE "host" to represent the build host. When the build host is not FreeBSD or is an older version of FreeBSD it may need some help to build host-tools. The directory tools/build does this - building libegacy. local.sys.mk: create a pseudo option MK_host_egacy to indicate if tools/build needs to be built for "host". local.dirdeps.mk: set MK_host_egacy.host to ${MK_host_egacy} all other DEP_MACHINES will get "no" This allows a Makefile.depend.options in makefs etc to cause tools/build to be built for host but only if necessary. local.init.mk: use ISYSTEM as arg to -isystem so that it can be overridden. The default remains ${STAGE_INCLUDEDIR} src.init.mk: if MACHINE is host and we are not FreeBSD set some MK_ flags the same as tools/build/mk/Makefile.boot.pre and include src.init.${.MAKE.OS:tl}.mk if it exists. For older versions of FreeBSD add libegacy when building PROGs for "host" Also instead of -isystem${STAGE_INCLUDEDIR} we want -I${STAGE_INCLUDEDIR} and -isystem/usr/include so we override ISYSTEM. This means any headers we stage for "host" will take precedence over system headers but #include_next will DTRT. src.init.linux.mk: add -I${SRCTOP}/tools/build/cross-build/include/linux and generally deal with building host tools on Linux. Eg. static linking does not work so set NO_SHARED= no Override some HAVE_ flags. src.sys.env.mk: on linux awk throws an warning about # in newvers.sh just send stderr to /dev/null Reviewed by: jrtc27, arichardson Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39744 --- share/mk/local.dirdeps.mk | 11 ++++++++++- share/mk/local.init.mk | 5 ++++- share/mk/local.sys.mk | 8 ++++++++ share/mk/src.init.linux.mk | 15 +++++++++++++++ share/mk/src.init.mk | 31 +++++++++++++++++++++++++++++++ 5 files changed, 68 insertions(+), 2 deletions(-) diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk index 246c9cdef114..d0ae1c0171cb 100644 --- a/share/mk/local.dirdeps.mk +++ b/share/mk/local.dirdeps.mk @@ -60,7 +60,15 @@ cleanup_worldtmp: .PHONY .NOMETA rm -rf ${OBJTOP}/tmp beforedirdeps: cleanup_worldtmp .endif -.endif + +# pseudo option for building host tools on old or non-FreeBSD host +# allows us to leverage Makefile.depend.options with +# DIRDEPS_OPTIONS = host_egacy +# dirdeps-options.mk will qualify with ${DEP_MACHINE} (and others) +# before looking at the bare option. +MK_host_egacy.host= ${MK_host_egacy} + +.endif # !target(_DIRDEP_USE) # reset this each time DIRDEPS_FILTER.xtras= @@ -69,6 +77,7 @@ DIRDEPS_FILTER.xtras+= Nusr.bin/clang/clang.host .endif .if ${DEP_MACHINE} != "host" +MK_host_egacy.${DEP_MACHINE}= no # this is how we can handle optional dependencies .if ${DEP_RELDIR} == "lib/libc" diff --git a/share/mk/local.init.mk b/share/mk/local.init.mk index c8072004697f..1d165c339ff0 100644 --- a/share/mk/local.init.mk +++ b/share/mk/local.init.mk @@ -19,7 +19,10 @@ CFLAGS_LAST+= --sysroot=${SYSROOT} CXXFLAGS_LAST+= --sysroot=${SYSROOT} LDADD+= --sysroot=${SYSROOT} .elif ${MK_STAGING} == "yes" -CFLAGS+= -isystem ${STAGE_INCLUDEDIR} +ISYSTEM?= ${STAGE_INCLUDEDIR} +# no space after -isystem makes it easier to +# grep the flag out of command lines (in meta files) to see its value. +CFLAGS+= -isystem${ISYSTEM} # XXX: May be needed for GCC to build with libc++ rather than libstdc++. See Makefile.inc1 #CXXFLAGS+= -std=gnu++11 #LDADD+= -L${STAGE_LIBDIR}/libc++ diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index 1817f6393949..1aac5014b737 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -79,6 +79,14 @@ JOB_MAX:= ${jm:R} .endif .endif +.if ${MK_DIRDEPS_BUILD} == "yes" +.if ${.MAKE.OS} != "FreeBSD" || ${_HOST_OSREL:R} < ${OS_REVISION:R} +# a pseudo option to indicate we need libegacy for host +MK_host_egacy= yes +.endif +.endif +MK_host_egacy?= no + .if ${.MAKE.MODE:Mmeta*} != "" # we can afford to use cookies to prevent some targets # re-running needlessly but only when using filemon. diff --git a/share/mk/src.init.linux.mk b/share/mk/src.init.linux.mk new file mode 100644 index 000000000000..1e351e1b41f6 --- /dev/null +++ b/share/mk/src.init.linux.mk @@ -0,0 +1,15 @@ +# We want to build some host tools (eg makefs, mkimg) for Linux +# This only gets included during DIRDEPS_BUILD when MACHINE is "host" + +CFLAGS+= -I${SRCTOP}/tools/build/cross-build/include/linux + +WARNS= 0 + +.ifdef PROG +LOCAL_LIBRARIES+= bsd egacy +LIBADD+= egacy m +.endif + +# Bring in the full GNU namespace +CFLAGS+= -D_GNU_SOURCE + diff --git a/share/mk/src.init.mk b/share/mk/src.init.mk index 2067dcdbbabc..148dc7a3e960 100644 --- a/share/mk/src.init.mk +++ b/share/mk/src.init.mk @@ -8,4 +8,35 @@ buildenv: .PHONY ${_+_}@env BUILDENV_DIR=${.CURDIR} ${MAKE} -C ${SRCTOP} buildenv .endif +.if ${MACHINE:Nhost*} == "" +.if ${.MAKE.OS} != "FreeBSD" +# these won't work anyway - see tools/build/mk/Makefile.boot.pre +MK_DEBUG_FILES= no +MK_MAN= no +MK_PIE= no +MK_RETPOLINE= no +NO_SHARED= no +MK_TESTS= no + +.-include + +CFLAGS+= \ + -DHAVE_NBTOOL_CONFIG_H=1 \ + -I${SRCTOP}/tools/build/cross-build/include/common \ + +.endif + +.if ${MK_host_egacy} == "yes" +.ifdef PROG +LOCAL_LIBRARIES+= egacy +LIBADD+= egacy +.endif +.endif + +.if ${MK_STAGING} == "yes" +ISYSTEM= /usr/include +CFLAGS+= -I${STAGE_INCLUDEDIR} +.endif +.endif + .endif # !target(____) From nobody Sat Apr 22 19:18: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 4Q3h5D3zh1z469ZH; Sat, 22 Apr 2023 19:18: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 4Q3h5C44s2z49R5; Sat, 22 Apr 2023 19:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bdrxBlhhmbM7XzkEZ7bzHXC0i+e6bXG2ESXDTGY8Wsg=; b=hDHMea+NVWQZYn9Wd44Zxid5WRQxPli7KVAoJJsY8En5Mf9vhqe0xiUr7MKjjZK/DlqmTR vqKisZ1llcIwTnBo2ITQThckbZr5kr0Q7Er2vd1i3t1UpeI8G3y4Kn2FQ6fj/gTsQxobJa /r3D/5X+Yyp1L1LCrp5AmjtbI1I6860eLzSigiDQTd34B1BGfy0IjqRX1/Tu4ilQtf1PmP 7ZJJJbrkJUn693m9sqKsPvxGBxv/v+SgEgUKewfxKB+pmHvWGtls+2zbgUG0eNDqZkMmTV TzifS5k8q6aLAaOIF0L0JHL34RVkiO+4HBPh66Ve0S3Uiv1ZMsKP/CnpTBdilw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bdrxBlhhmbM7XzkEZ7bzHXC0i+e6bXG2ESXDTGY8Wsg=; b=tPVvCHKUPjCTY1jJStqoPIeF0GDdO/glQQa3BdU1I3E4nhBiS4SI3belX+CCqqOIbLO2CJ EOAhFGlKpvUiqm5G+wfgGn63+bpluGCIwmrwXoputy4espV3sv+5sqNznomxKwtqDdS4i8 K4xMYEqOeylHa9R2bssadzAxzx33T4wnio8xYgFmxFlazbxiBCv/R34XDnunWNovjY24D5 5sp0wRuC21T6u2ii7CWc3Dl4ZFOq2oB5y1p7Vae8UIGmbVS6XW8uqAOHemLHVUXtiS9i4F JaaYvjY2jXyaMpp4fzqGXEmhlH7SosFNjdRW9x8UTOILPQOzLczMzDt3NTGO0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682191119; a=rsa-sha256; cv=none; b=ZD5EDNUorpa0mM7e9UfB+BAEnnKoAN26txApA7PsUeVm2Y00gIHlCIBVMoGEO/A+OPpA1P 0k96cJGVqvi8tAazqVFCXkzjxBhEgI58wVVv776CZSKzRgx+58GUP2Eda9v7cST1ZH9OVr +4oVHrEMME0W/vCtyLSLf/awfMFp54qI5PGdIupuZ3F1wNEodju7n8z22LhWvjRg67dRJM GrkZ1xF8jZmToZDEGOn1cVQLZdwNvn79UqmMvldBQO9TNohBrufEYpSFBPru2kg1iRyk2K EujXf4hWZJ+HuWIoGfrkuF4bGhmPnerqN9XbxzXBIDs0jNJjCK8iDvjBM9xCNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3h5C36kHzDgx; Sat, 22 Apr 2023 19:18: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 33MJIdqt085084; Sat, 22 Apr 2023 19:18:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MJIdb8085083; Sat, 22 Apr 2023 19:18:39 GMT (envelope-from git) Date: Sat, 22 Apr 2023 19:18:39 GMT Message-Id: <202304221918.33MJIdb8085083@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: 7d8c98398302 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 7d8c98398302b939b97310d31883ebdab8c0b938 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=7d8c98398302b939b97310d31883ebdab8c0b938 commit 7d8c98398302b939b97310d31883ebdab8c0b938 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:16:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-22 19:16:02 +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 --- 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 d8de283c0201..c57134da6464 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 6d4deb06dc00..8e157f1ffb6b 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -207,52 +207,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)); } /* @@ -623,7 +585,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, @@ -638,6 +600,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 9beee0b7079c..8693585da6d3 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 d398a463b8c2..3cec5d2e9eeb 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 @@ -848,7 +802,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, @@ -863,6 +817,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 19fef57e78e4..8940a0eb8486 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); @@ -162,55 +161,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)); } /* @@ -425,7 +383,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 7810f8d29ccd..063c81510c02 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 f0b979725741..625eb8a09d26 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 @@ -650,6 +604,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, @@ -678,7 +634,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, @@ -693,6 +649,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 Sat Apr 22 19:18: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 4Q3h5F2Khhz469WH; Sat, 22 Apr 2023 19:18: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 4Q3h5D4rRDz49Yd; Sat, 22 Apr 2023 19:18:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0F+hKpWhT64a0CsN32QRQyohn7pqjR/GJzxgAqAAj0g=; b=C9l3/l21wTO0XsehjlvXT3ubrZJb+od6fPpY21R+MzzaXrm5v8NeaE4z/SAHJuSiVlr11x EnFa9BRMn+q9P8ZR182U6oHuB7E+Nn51rG3Ft0iujasHWhyY09+SucL5y8U8GFMijYUhBg 94gjRURw1AvuchJpOY78IkbwpKXAMuoC/0FImLum2po4CPbmHsfM7jJZAnF5iU89kajmKf sZc0bYRRba3LUfG7KOy97a2fly69bqWSxK1ju9P22avWJgFgRx1pz6zq656AylUeiypHve b5z7npeMRg0hZ6e6wc92XPVSPqS8WTmLJxMOQ1RMK26yuXLeC0IwSkiSKzH0OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0F+hKpWhT64a0CsN32QRQyohn7pqjR/GJzxgAqAAj0g=; b=A9aSEsjP5jGZmZ2cRn1Yt43NxFjmOURgU3D7BInZEJTpcu/t5O3Zh6gGPdJashe/7fB5KB evp6G7LBGJq6HQXrEuAxA45S1qgzTIAUF1ZSdZ/UNZysRkTdGwxwWXHaGQnV020I4bI7sa L8SUNlAiQrfIO06vqQaSovPF3wpJ0NH4YSF9QN/t8IVSjdMgBRfSCpKLnM60wUgFW60hmY WHIdh0eD3QXd705EFzU0UcJzy/tV2Ml7zeVKyoTv26fZRpmjm2xfsSmiNQ9ND4zwZugElE iDlb5FzFoPnkMMN2OSKfWPOPBagx1AAWZhbnn65fAZUENLXPYL+wB2ve6BCgoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682191120; a=rsa-sha256; cv=none; b=kLykaaYZyAaz7r9Ahfsf54vYY4uvgZWjw/eVPbCLqQ0lv2PmOEwyT79uWbB9oFhk7nD7U6 owgROoOBGrDznNZTUr0xADpo9joCcZorFPQjezBOIRxG190gTcHu+iJT2dX4uJ+UQWdynM TMbIBk0LPliDKte7AWaaGGfHs9YoyCN/0zOUpyyi+Cj71Pr9Pk+75ctTyEyoIti5nLv5Gx fv13jerrX82eb+eGg9WZxXM/nDK83q3HbpTwOatHuDeoj04A95KVM08iFwIX6dcQXl5nLi T89gwGaL9vJGrpXrgxTyyofvMl+Bt6VfLbM1vHrviZVp8lc81xrX2QIT2Ysy3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3h5D3cJnz1Cv2; Sat, 22 Apr 2023 19:18: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 33MJIedA085107; Sat, 22 Apr 2023 19:18:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MJIe49085106; Sat, 22 Apr 2023 19:18:40 GMT (envelope-from git) Date: Sat, 22 Apr 2023 19:18:40 GMT Message-Id: <202304221918.33MJIe49085106@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: 56c5230afdcf - main - 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/main X-Git-Reftype: branch X-Git-Commit: 56c5230afdcf2b317d904009abe577e91b382542 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=56c5230afdcf2b317d904009abe577e91b382542 commit 56c5230afdcf2b317d904009abe577e91b382542 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:16:43 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-22 19:16:43 +0000 linux(4): Fix LINUX_AT_COUNT comments Differential Revision: https://reviews.freebsd.org/D39645 MFC after: 1 month --- 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 c57134da6464..11cc9f05c6f5 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 8693585da6d3..8acc5bc0f195 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 5c95acd86771..1b6852286662 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 063c81510c02..114d59d4eae0 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 Sat Apr 22 19:18: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 4Q3h5H0td6z469WM; Sat, 22 Apr 2023 19:18: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 4Q3h5F5NxPz49XV; Sat, 22 Apr 2023 19:18:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLPg6cpF+XO1IsvDs8z4xIFWQ27ZXgkZpag2d006BoQ=; b=m3jCnZU/cOq9pcwRxnMEUU6RjuxOICdEB5+NlXPQfilIAS46izMWoMJ2CGn6lnIRNXnjtU Bn2qSvZ78u6fNQ2JydLdF6M/6rtbV6Ehkn4kfNAl/XqwlghZZXnAdZGFvcRHyTcVh1OUVW JhubyW37pgde2OW3Lwq5gW6OekhYNtvblHCOl2BnXfRHVv2Cpmb1UmQokStfj1lZPzegCQ xybcBYDPiYT9PRLx6V0wRtw5uTXORuJ8KAriH1YnhiW30l3hsYmWikOJ70SRfIR5OHacwV z5WaI9sM27y4Qgnx3XAk+0hMlhIUteaRDstGwY6jZhdKHmddgd9DIwo/6Tgezw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLPg6cpF+XO1IsvDs8z4xIFWQ27ZXgkZpag2d006BoQ=; b=AlE022k5dW6Zk5do3LTZMITAf4yiJkDdj0u+BpG3SPHu9tijwq3mc7NGzMWSQrORvbbGB8 7ZsHxa3aQ1OiUKJ+7IArbIp/5Y4FZeWA1ZZIjdmKz8MisepjBV1QWckMpUdyUIDp0AndmH f0fDpOlXMWNoTcZnzZVfBsCVlkNTEat626roz/gFw+1gaFtwz0vYrb5T5moMf3GuEGvZU9 3Dqku6jexlaWpAmxcY4RW19YBkTzqsfpEOaGwYurEGZD3jz1A+63DDUYAonDvHP6fZ6ohq qVKG71YVn0TnAJ7iReV9zrUhDwqY3A3ILdrm2kP7Hgjvfm9J9Gwey0YfWnINYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682191121; a=rsa-sha256; cv=none; b=Meg4MNFEZEdnQ91RHzgvNiuQ02Tgk6FNAU8jSxACxF9+BAfG7fz5oN1BYP3BENpkkbDnuq 4TA3Pa7FcLy2hkbiRWK0bWzQ/5jJRllqxlmlFtvqSTV60CitMdhg4zFdAAe0jVfdXsfDxo n6KNyAH7w2XPx7FdIbr1tcax3KdRjZ7GnJHx/JU7CdmtBiaThI2Y+vwA3Buo1jxJ53cm83 HYz48h0EkwIUWFDxvsD7A/Y1syG9G6qETSJ4Q1w+BrN9b8E7LtcoLd1bj7QNhqk/fqeCAX wuTzxGPy5qxjjiCuqIQAm+iRaiJSQ6i7x2zbICk1ohDJxjDX3VRDg8EbokVsBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3h5F4VkVz1Cjl; Sat, 22 Apr 2023 19:18: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 33MJIfaI085130; Sat, 22 Apr 2023 19:18:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MJIf2U085129; Sat, 22 Apr 2023 19:18:41 GMT (envelope-from git) Date: Sat, 22 Apr 2023 19:18:41 GMT Message-Id: <202304221918.33MJIf2U085129@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: 40c36c4674eb - main - 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/main X-Git-Reftype: branch X-Git-Commit: 40c36c4674eb9602709cf9d0483a4f34ad9753f6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=40c36c4674eb9602709cf9d0483a4f34ad9753f6 commit 40c36c4674eb9602709cf9d0483a4f34ad9753f6 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:17:17 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-22 19:17:17 +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 --- 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 Sat Apr 22 19:18: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 4Q3h5K5FjLz469ZP; Sat, 22 Apr 2023 19:18: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 4Q3h5H1g88z49Rs; Sat, 22 Apr 2023 19:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2yPO4k0KGTXH9j5VQ07UkgDinr7uYtVXqO4zdqnxiio=; b=FPTyl6TFepDd2687uMNfUWqqnPdykpHnMRFbXV1fmZKkYsFymzl0Ui+sxIs0jsHjsW/X3E oD1feGyo22TudR3+fshovCgHFgBYVmpno2G0gwDsCf8/b3ADrKBvLZihl8wI+33TuXmdnZ USdS5BRntW5L7qMcXaOpLNQvPmc6qXiNEprQ9KVTaU6tzudxYMMAb0zl+p2hhRszpxH8JK i4n3S1W8SFaIHvm5ZbygPTGuHzDgdW4y5bJFPgDHSwZ9wAUv9if32huL4keuggqLWxrEAC +c/C3xuFqGNpeE/uVD7MWDzhOMZqEfj5TqfQliM+K+PtNPIL8X3t12RzDu2anQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2yPO4k0KGTXH9j5VQ07UkgDinr7uYtVXqO4zdqnxiio=; b=TTwusgz+gJzZwqZ3L4coE5K9dzXzpQpTNIK+2BSWrZFvVBReN1CeHPns8dISf35p53plA5 hPtXe9ur9ocRO/phucFyaa62/TksR7Mq2KElV0MzfMj3zVBU/g4xIfJotDKERqLZn+2gnU XOE5FvbSexG9G1MRDR7FpVMQKKuKTeUSKnxZxhDkSlI2I0qDoOB47xn1OeILK1vBbiO7Ps 4buliisG2NE74nqHrF2ealAqTkgHGAIXjKXeCCmZ0Nbv74nT8Rn6Ndd4ZJh+PqrO+QBZPw lKwhQAs4iedbMYgHBqJ/RUpdwBE3+ANKathW2EKFYCRpJ6fRQDlEqdDYFMtjCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682191123; a=rsa-sha256; cv=none; b=CdoUSbtpcpBD2YIth99GURhZhGpkj8INc9HynRXBnVY+PmsL8lGVVtfahYLUwGeMUz1rk6 k30ylyB31OUVQW5EeJ6QrYc6ZUZlOp3HXlLSYiULOs1wvTf4Wd2vKja1H0OO6yWveIwKDo oo8dvKwv8Ni9BNXXuzwLdPh/TMO4n80fM1Bjxg6q8WXW3VEUigeGQMgY9Q7uTD71VsWln1 /oO+WFYMoIKHyRmZT+cC7X3CPO5Iy0LO95ybk9xlKlqeaWOGEPE2D8+R05B6ywQcoRCD8+ EY2src86pMw+vzotz3e/7XgpU3v/aecIRuxykV72nr97uhp6C02AKHF+GGXRMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3h5G5R6zzDdP; Sat, 22 Apr 2023 19:18: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 33MJIgIJ085149; Sat, 22 Apr 2023 19:18:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MJIgRu085148; Sat, 22 Apr 2023 19:18:42 GMT (envelope-from git) Date: Sat, 22 Apr 2023 19:18:42 GMT Message-Id: <202304221918.33MJIgRu085148@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: 70eab81d6ffe - main - 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/main X-Git-Reftype: branch X-Git-Commit: 70eab81d6ffecf0ba4c7f19a8b6389178eda5259 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=70eab81d6ffecf0ba4c7f19a8b6389178eda5259 commit 70eab81d6ffecf0ba4c7f19a8b6389178eda5259 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:17:36 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-22 19:17:36 +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 --- 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 Sat Apr 22 19:18: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 4Q3h5L69ZQz469Xl; Sat, 22 Apr 2023 19:18: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 4Q3h5J07y4z49jZ; Sat, 22 Apr 2023 19:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bIM1RQl991sx77oVQxnWjnnjJqcW5m3ZqgDpIwibi3o=; b=UijNK1/kSltpRbuyWWh+CHOI2+AEl9IH45bR2aAM7t7ZZspfi6640106JbGAcFNbS+j4MC Tt4MA0j8FyqcFLilGp+bEbhmSHugV5rTLNbakhLOhk8ONSee9qSRYKcTUxwPD1VoPD3QI8 0B4frzjJyn9a6rwzgexB+bgiQbzrqcvo+7S60hK5YjaBdcEXinsSGwHQZYb/k/UpqUHRUc RtxMjIG5dHM5PjbDGjJDnQceiKopho3ssbuF1anvN+PEVCmI35DjNzjI0skvo1IYkInmVS T/gBtyRArU4iYrBl+q+RKb5GAaj98K/1fflrjorsGbYbt7L4/QADqX1tcZx99Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bIM1RQl991sx77oVQxnWjnnjJqcW5m3ZqgDpIwibi3o=; b=iRxlO/Ds9fvd/5ZxKNCF5I4pMhYj9dB0GeUAqWRYbHPRRf6HfTlaZ7N8O2c7s74TLwA3NS 566Sh1Gfo/bvGluHmyZ7DXQ0btHN+WIlQgqQikd4P22uBE3Yjuiav+Mn7VGZWVr/vtfU+Y VWHgPiJPbWiF3UwSLCISvRveWbTSW0BYGg5zeRvHyJr6lJ6jsYjwXADIkryv0mMIHL61Rf 6iW6133qVdSf9x9tH4U90EgrL3W125NJCzs1yYMK7F/xAXHWGalqz4N8qVAJ6/30DB70ci 63R4ON1t/Q+1YIaKkfFj9wrRI16Uya63hXW+TzGbsuafnQBdJ2TSxgWV4w8UQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682191124; a=rsa-sha256; cv=none; b=i8Dati4E7NRdesVY4rjKUt65M5g4jaVJ4hQc21MF5LIs5C180ulo0hV19dlU1e5ne8dB15 P14KZVa8qOrGWrqMjt4pyVv/zHolbAIPz1ZDE5aCjvHl6bFXhmnMEkmbSyBt36jne8+FrS QlC1gsHbRQ2UgCfrZ6P672nCgd37TqfPVNu4d/AN+/uO/3qiaG2hMex97n7UDbTNGuZmXE S/+MS8ly1oC1z+oiASi0tjrjX9q0dWPMTClwH7xie8pAx8x/Yw48juJVrnjICpmer4U3B3 7//SVdy26e5t4AbzpggDUUu7D27Pdyfcm69Em1s/7v0C/tLJJtssxEpGLOEC/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 4Q3h5H6M9NzDgy; Sat, 22 Apr 2023 19:18: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 33MJIhqX085169; Sat, 22 Apr 2023 19:18:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MJIhJ3085167; Sat, 22 Apr 2023 19:18:43 GMT (envelope-from git) Date: Sat, 22 Apr 2023 19:18:43 GMT Message-Id: <202304221918.33MJIhJ3085167@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: b7a6bcdd1319 - main - 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/main X-Git-Reftype: branch X-Git-Commit: b7a6bcdd1319b4e5da0bfc5e7790cbf26efe9892 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b7a6bcdd1319b4e5da0bfc5e7790cbf26efe9892 commit b7a6bcdd1319b4e5da0bfc5e7790cbf26efe9892 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:17:52 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-22 19:17:52 +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 --- 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 Sat Apr 22 19:18: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 4Q3h5M4dnTz469Rj; Sat, 22 Apr 2023 19:18: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 4Q3h5K0qTpz49Zb; Sat, 22 Apr 2023 19:18:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5HkB0iK76KFIBiTt99NEhw4KRK3OAgOeyRsHMQDVNik=; b=G/fh1WHJJXpyuCVpP5LQQesa+swZ399PpI7msijyzCMXrUx8ZAPnmX0ZtBqlH7sugYe1hK 8PaLfn/CNgscuF2GVs5vFj28w8MQ2//LEHhp9OmOL50ZuQ4EcyjnW44RIrVGlmCSqOGxza SL64u3bGlKDNwCRIdeQ2qQXFViK9zRJsThK/sbJAtkCfAG55BVy2opYb9EtNOmY/xWcEIh eu6Fqu9r3QJMVspMAU4TflP4NOUuA6KbWv2JymHedoKyBtntErC6ArsA5MUsP3zZA+Zq7o rrz1swQ3Uk4cpi7UJ5cfWkBZigV4w1yhUYh/nWqhPx58QOA8ca98kOaYcIWI2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5HkB0iK76KFIBiTt99NEhw4KRK3OAgOeyRsHMQDVNik=; b=FevTA1EV5ViPFlAyj5PQoMMbyfWtJeyxbX0r+ZTa3XcIar+cNeK2uwRwyONdktIebzOQc2 DImWAsuUBrtx9sFGfQS83aXABV8scmcZ5NPQW82tI6tQ4UHjB2Tv3k3MvZm2PjlaQ5oOjp WItUFDIUE0NKQ2knr1o17uz4k3lHS+D9jQEgWOXECdw0CSKtl1rpWkArjBcMS1of/wDoIN 30u3WbImrTYipsbcNmC6HPc2mnMiF8RnyUnEce/zkeqLFB7iA6s6zctGdbBtGIQx2grlsL B+A9W+PYDzSs+aCOF0jSeE7cfzj/oZH4IzrGFlFy7ZUJ3QY0V1ArGYlUNy8/8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682191125; a=rsa-sha256; cv=none; b=yo68lEIqiNJkHLkm3g/RjD9w06Z2fHVzwA30Bx4701DPyp6q/1LaihjmF+yPBaq/puhV/2 TcfMpZk4+inxIA8TumwHkJUHbJ8jPj4lTe3uCj3jzW+GHhlq4AEIKuoCz/ghuzFM2IA4UZ gBcvz89vlO9Y+uTP+a9Tf6+H2e1zjBAVOLRdAHv6BZGVFbOERETmz3pasR0VXgd408m2dI wsuOm89CdNIguJRycejgaj4NF4VptB65ygXpaYKph37VQEsWgtceeAAnJlrq3BJ2zxRq+k KIgCkcAMs54mXzucuoZXUSqEH15hjBr0379v5a5xgjwrz6LpGmcwE1T4VP4kyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3h5J73PGz1Cjm; Sat, 22 Apr 2023 19:18: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 33MJIiFs085188; Sat, 22 Apr 2023 19:18:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MJIi3a085187; Sat, 22 Apr 2023 19:18:44 GMT (envelope-from git) Date: Sat, 22 Apr 2023 19:18:44 GMT Message-Id: <202304221918.33MJIi3a085187@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: 0ef30b5d6b75 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 0ef30b5d6b75596e087a86c3cb01a0b2c611e7e6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=0ef30b5d6b75596e087a86c3cb01a0b2c611e7e6 commit 0ef30b5d6b75596e087a86c3cb01a0b2c611e7e6 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:18:08 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-22 19:18:08 +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 --- 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 Sat Apr 22 19:26: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 4Q3hGm638Hz469qT; Sat, 22 Apr 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 4Q3hGm3MrXz4T9d; Sat, 22 Apr 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=1682191616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZL+u9XXxMS96+ymMA5E429VwFgwUXxO1AX0AOWKzj0s=; b=QGv2SCif6rtJa8O58hFAikTXqLcpY4kWAyEciyhjXysD3YYg7WS1nHNoFSFudgiNG4mWYP AWO6QphxVfA8PwiYGTdTkyoeMgQ7p8zuato0A3h4C1g3aIiYH317pI3FGS6ajHGJ9Lm1k/ cpfh0f6LNIvd7eJP/2e5QmCwilb1mrHrBTehdqyBQcl8gdS6QSoA/4dy+ZylurEhuIsYAJ +/HCbAmy3Nc5+Kta1XGc0iJxZbEVyeSUNCcjrpKSzOCnE1vU8dBq17FXLZhdfHcqUtPQME ZetVtgk4KLlGxDrMf9g9LkXr7ZSQ4CccdUX7RaCD2AkvUeshBuld3QGADG9Efg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682191616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZL+u9XXxMS96+ymMA5E429VwFgwUXxO1AX0AOWKzj0s=; b=we/4MRQSbdStEVnXwcEPBUs6rPdvCVkNyMX5ryQPmUgOJOb7gm/8XM6H/zlnjSOTVFMMYZ sx8g/f9pliFVXNgq6wu3k86f+KZM9e1c3yphvuu4Oh8QxPPD/HtXm3X11hlRJprBpmSnWD Ri17CRysT0v653eoOWBthRNFRhQWuDe2ZYu6Ayi9mqNiBiagjTa8bPuUaPscGxcKHvrdPV 1H38rKOX0k6xqgEsCKzioGcjpjg0brkCmz/Ri21jS3eJESu0EUGq3hbKnopS3sJaK+oowi pjpRmh10PHKwyZgVwCoiS5E8ibn45g9QHVuM4Ice7ul+D0FOJ1Cl7RLl5LShQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682191616; a=rsa-sha256; cv=none; b=N8pah8q7HtV0qbQIran4Wfnd5xCJe59ifmD3xXqNGm2MmHtUiWpfk1psLU3M0OjL6H/geE ijiXWYkqRUByyO3f4qEpCjGmQ/e+NuAVMqOJIcrMU5JR1+mwynhxjL2QThE4XjGNOnybgE zYHUZoxtw/IjBPr76EBXsErsCmgxfE1LoGgfoMp3ieseUPeVpSB2rYHuSyq+HmZXiIC9pQ UCpQQgRleONLIXP5ldU9XgECIKyny6Y78Iwtnm/tNo7PhxRdnA24jpYSItd5tRZ/936mA5 90QCuHvr4spdffAkUbixSULJnV1Q7Dphrch0+0/wqQBWytzGuXHHTqVL1dHibA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3hGm2TZ1zDw8; Sat, 22 Apr 2023 19:26: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 33MJQuhf001441; Sat, 22 Apr 2023 19:26:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MJQuBl001440; Sat, 22 Apr 2023 19:26:56 GMT (envelope-from git) Date: Sat, 22 Apr 2023 19:26:56 GMT Message-Id: <202304221926.33MJQuBl001440@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: db98bc2c0d3a - main - Allow tools/build to work for DIRDEPS_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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db98bc2c0d3aae1772ee773c22c8d01d2add6c92 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=db98bc2c0d3aae1772ee773c22c8d01d2add6c92 commit db98bc2c0d3aae1772ee773c22c8d01d2add6c92 Author: Simon J. Gerraty AuthorDate: 2023-04-22 19:25:54 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-22 19:25:54 +0000 Allow tools/build to work for DIRDEPS_BUILD We want to be able to build some host tools for non-FreeBSD hosts without building more than we need. The DIRDEPS_BUILD lets us do that. We use the pseudo MACHINE "host" when building for the host - deal with that when setting _host_arch. Reviewed by: jrtc27 Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39751 --- tools/build/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/build/Makefile b/tools/build/Makefile index 922d86dba7e7..a1b8bbb8b2aa 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -125,7 +125,11 @@ CHACHA20INCSDIR= ${INCLUDEDIR}/crypto/chacha20 CHACHA20INCS+= ${SRCTOP}/sys/crypto/chacha20/_chacha.h \ ${SRCTOP}/sys/crypto/chacha20/chacha.h +.if ${MACHINE} == "host" +_host_arch= ${_HOST_ARCH} +.else _host_arch=${MACHINE} +.endif .if ${_host_arch} == "x86_64" # bmake on Linux/mac often prints that instead of amd64 _host_arch=amd64 From nobody Sat Apr 22 20:14: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 4Q3jKc3gNSz46DqT; Sat, 22 Apr 2023 20:14: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 4Q3jKb6wpdz3HmK; Sat, 22 Apr 2023 20:14:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682194468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rl0NpJKu09UMX5ihvDGHZaP0RzPD2eMqHE1Z3/QWMM=; b=OKCGD70mzJw0OdY1j67srZcvJHTrvUGWuL8sBYbbP4w7xFmeMgElJ41Zjgbi/29c0d2sJj +SrsMDk8ZTQBuMxEPMR2KU8OKKW5Vb03HxJ1xLUZkQe6IlssFxwDVhtxpYGLfp3Q1GdLUk agSnS+Bn8IBlxQYOmoUGJM9WG+PKbsG4cb2kGZIoJBjamKUr/G+Mmf7TLSrDWVjpdOGnTm NMg82yREuVR67ckEwqy1QLHosF49DeCLccHKt2vOUk1Bql3vGNpWZPIlGYfoX7Y1qcJjjD UVgqAbZU6LFUCv8/uPjPTiTFSph8jJET3mSe6Cwp7VRibuKIRB3N7MFhhID/eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682194468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0rl0NpJKu09UMX5ihvDGHZaP0RzPD2eMqHE1Z3/QWMM=; b=v7cHvVmWwmjvM3zFYtNQlgBaWX9obHxmCZP74V+YaIMDEmr5doZ+HR6nFlA6ZQWpcvu4m/ 75Uyk2dfwJqFpSMvXwPHZVky8XFJTh+4tF4h1pmlRWAgoXB/s2exkh8ylQ/+SafHqlNu3a 4H6eeHY70H+SN8s2OmgQMvKYkCME5FCu0VV8ulK+SZFNpSccIzKfjspTuYTEarJpUc7HsU i5CMJkrZZjmkKKWiT+Da/pyc2HPTEHC4gzEQuvcL9oLzBDFqPkhopl+/jOLoiq66DJ5GSg UBogl7jNDnC4nr4xSxTC+K9oUrAkFl8j7l1PBymaZMFHHfoY331NrVvCN++kaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682194468; a=rsa-sha256; cv=none; b=HzgCQdpXoSWWPNwF8ZCJLG2U5g0xtvRNLez2AUoTI8VayfD2ZoXVEs+RpjPzwO2S2eWIXB Tmx5NpS9eULfouVLIaPWkM3YJD92fPzeUhSokbtP4dN3yB9C68aJGHHrbeJJDnZSvwNUJQ 4JiNccVCsvrEefiaOQOUvOI70t8dXODQqN+4WP1tb6XSiSFyoZWMiAlqkvJOzFr78qQB4i NX+TATApPGxR8e9JnuIvpWhv96JdJXG3Q/uNNAr0B/iRzZu6F3Syz1Q6+Yd2QFapsoDb1d WL15iZl8DLWx1lz+8Z+Ag8c9haji8Nw/OCqVwzfHqgJAVDW0iMbgEcQZooJFrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3jKb5fhRzG0l; Sat, 22 Apr 2023 20:14: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 33MKER5M083342; Sat, 22 Apr 2023 20:14:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MKERAc083341; Sat, 22 Apr 2023 20:14:27 GMT (envelope-from git) Date: Sat, 22 Apr 2023 20:14:27 GMT Message-Id: <202304222014.33MKERAc083341@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: 188bf8876fdc - main - Build host tools on non-FreeBSD host with DIRDEPS_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: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 188bf8876fdc6e3edebeb76f80e764e419a65f1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=188bf8876fdc6e3edebeb76f80e764e419a65f1e commit 188bf8876fdc6e3edebeb76f80e764e419a65f1e Author: Simon J. Gerraty AuthorDate: 2023-04-22 20:13:22 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-22 20:13:22 +0000 Build host tools on non-FreeBSD host with DIRDEPS_BUILD Add Makefile.depend.options to libnetbsd, mkimg and makefs to ensure libegacy is build if needed. targets/pseudo/stage/Makefile avoid the need for mtree the staging process creates target dirs as needed anyway. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39757 --- lib/libnetbsd/Makefile.depend.options | 6 ++++++ targets/pseudo/host-tools/Makefile | 1 + targets/pseudo/host-tools/Makefile.depend.host | 7 +++++++ targets/pseudo/stage/Makefile | 16 ++++++++++++++++ usr.bin/mkimg/Makefile.depend.host | 11 +++++++++++ usr.bin/mkimg/Makefile.depend.options | 6 ++++++ usr.sbin/makefs/Makefile.depend.host | 12 ++++++++++++ usr.sbin/makefs/Makefile.depend.options | 6 ++++++ 8 files changed, 65 insertions(+) diff --git a/lib/libnetbsd/Makefile.depend.options b/lib/libnetbsd/Makefile.depend.options new file mode 100644 index 000000000000..4dcc6c412671 --- /dev/null +++ b/lib/libnetbsd/Makefile.depend.options @@ -0,0 +1,6 @@ +DIRDEPS_OPTIONS = host_egacy + +DIRDEPS.host_egacy.yes = tools/build + +.include + diff --git a/targets/pseudo/host-tools/Makefile b/targets/pseudo/host-tools/Makefile new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/targets/pseudo/host-tools/Makefile @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/targets/pseudo/host-tools/Makefile.depend.host b/targets/pseudo/host-tools/Makefile.depend.host new file mode 100644 index 000000000000..3be07061c202 --- /dev/null +++ b/targets/pseudo/host-tools/Makefile.depend.host @@ -0,0 +1,7 @@ +DIRDEPS= \ + usr.bin/mkimg \ + usr.bin/tar \ + usr.sbin/makefs \ + +.include + diff --git a/targets/pseudo/stage/Makefile b/targets/pseudo/stage/Makefile index ed3217d9f743..3a17f8a2e648 100644 --- a/targets/pseudo/stage/Makefile +++ b/targets/pseudo/stage/Makefile @@ -4,6 +4,7 @@ # distrib-dirs can be done in STAGE_OBJTOP all: +.if ${.MAKE.OS} == "FreeBSD" # mtree makes a lot of noise if we are not root, # we don't need to see it. stage-distrib-dirs: .META ${META_DEPS} @@ -11,6 +12,21 @@ stage-distrib-dirs: .META ${META_DEPS} INSTALL="sh ${SRCTOP}/tools/install.sh" ${.MAKE} -C ${SRCTOP}/etc \ distrib-dirs -DNO_FSCHG -DWITH_TESTS DESTDIR=${STAGE_OBJTOP} +.else +std_dirs= \ + /bin \ + /etc \ + /sbin \ + /usr/bin \ + /usr/include/sys \ + /usr/lib \ + /usr/sbin \ + +stage-distrib-dirs: .META + mkdir -p ${std_dirs:@d@${STAGE_OBJTOP}$d@} + +.endif + .include .if ${.MAKE.LEVEL} > 0 && ${MK_STAGING} == "yes" diff --git a/usr.bin/mkimg/Makefile.depend.host b/usr.bin/mkimg/Makefile.depend.host new file mode 100644 index 000000000000..f80275d86ab1 --- /dev/null +++ b/usr.bin/mkimg/Makefile.depend.host @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.bin/mkimg/Makefile.depend.options b/usr.bin/mkimg/Makefile.depend.options new file mode 100644 index 000000000000..4dcc6c412671 --- /dev/null +++ b/usr.bin/mkimg/Makefile.depend.options @@ -0,0 +1,6 @@ +DIRDEPS_OPTIONS = host_egacy + +DIRDEPS.host_egacy.yes = tools/build + +.include + diff --git a/usr.sbin/makefs/Makefile.depend.host b/usr.sbin/makefs/Makefile.depend.host new file mode 100644 index 000000000000..858c2f2c11ec --- /dev/null +++ b/usr.sbin/makefs/Makefile.depend.host @@ -0,0 +1,12 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + lib/libnetbsd \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/makefs/Makefile.depend.options b/usr.sbin/makefs/Makefile.depend.options new file mode 100644 index 000000000000..4dcc6c412671 --- /dev/null +++ b/usr.sbin/makefs/Makefile.depend.options @@ -0,0 +1,6 @@ +DIRDEPS_OPTIONS = host_egacy + +DIRDEPS.host_egacy.yes = tools/build + +.include + From nobody Sat Apr 22 20:43: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 4Q3jzx5VPRz46Hll; Sat, 22 Apr 2023 20:44:13 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 4Q3jzw5ndfz4Mkg; Sat, 22 Apr 2023 20:44:12 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.208.178 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=none Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2a8dc00ade2so27915331fa.0; Sat, 22 Apr 2023 13:44:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682196250; x=1684788250; 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=lUFdsxsddkoB2cZMb25ssEMIwPqaCf22AFbX1/u5ZSI=; b=aEXp0IlcBnma9yxsFrKjQdZhOx5lstLwMlLuS0IcSgmtr+6yyPsTvDlCrXmUJzMJBB CuEVtmEwSFfFYaSaoMAp9mavs3qN6ZMzDLc3/0DZkyoCdxrZb81RYk77DZlCzNAIHwqW vLTWc7Tt5ea/T/lP4vUPDeut7ZQDQwIefcKWsm/IytBzN4fUvK98Hx2hotZRjEwbAscb xp2avfJa4vkksacgYIR9Fqqy7kLggm3+I7bUgQexIazj+HYkj9LNmkdvI3IHofl/l3r3 zUnrpIM2siiVH2W4tjG0O8dQyrUyzMS+BWU467v9a3Oyy+I0C6Hi0AK4MhtWhnvKrjWm 3WQQ== X-Gm-Message-State: AAQBX9dctqcOJqJ9tB2fQTVGFy9MpDUrmYp2wUiMumYD0aicL1/zOf9p YDokgRUvjYikeEGzEfr6Sxx805T3zzIBswjPCBHk0NZ89Fc= X-Google-Smtp-Source: AKy350ajIDhCPppO0dC++Y9TTGt8z2CXCqqvgcL9yfkcD1JX/VaiyvLbLw5cOwLmnR50nmqE0cJ2U0e7P1Qx+i70aGE= X-Received: by 2002:a2e:8645:0:b0:2a7:730d:a7c2 with SMTP id i5-20020a2e8645000000b002a7730da7c2mr1875671ljj.46.1682196250088; Sat, 22 Apr 2023 13:44:10 -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: <202304210339.33L3dgNI067538@gitrepo.freebsd.org> In-Reply-To: <202304210339.33L3dgNI067538@gitrepo.freebsd.org> From: Ed Maste Date: Sat, 22 Apr 2023 16:43:58 -0400 Message-ID: Subject: Re: git: f957a32dacfd - main - Update meta.sys.mk and related local*mk To: "Simon J. Gerraty" 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-Spamd-Result: default: False [0.98 / 15.00]; NEURAL_SPAM_LONG(0.86)[0.865]; NEURAL_SPAM_SHORT(0.60)[0.601]; NEURAL_HAM_MEDIUM(-0.49)[-0.490]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.178:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.178:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Q3jzw5ndfz4Mkg X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On Thu, 20 Apr 2023 at 23:39, Simon J. Gerraty wrote: > > The branch main has been updated by sjg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f957a32dacfd0e18e574d0797e4bec4bec9f15af > > commit f957a32dacfd0e18e574d0797e4bec4bec9f15af > Author: Simon J. Gerraty > AuthorDate: 2023-04-21 03:38:53 +0000 > Commit: Simon J. Gerraty > CommitDate: 2023-04-21 03:38:53 +0000 > > Update meta.sys.mk and related local*mk It appears this broke `make makeman` and hence Cirrus-CI has been red since. See https://cirrus-ci.com/github/freebsd/freebsd-src/main First failing run: https://cirrus-ci.com/task/5992477161684992 From nobody Sat Apr 22 21:57: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 4Q3ld36YMJz46MmG; Sat, 22 Apr 2023 21:57: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 4Q3ld35k4kz42B5; Sat, 22 Apr 2023 21:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682200679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vtt12Y8nkgTpmpbrLtXs+CpTAJndssNDxaLSNBkd/iY=; b=yCeGRDSvE7e6hKUzzZ0Gg+bC1RngtveXVBGHcqDXVh15r1kI2oyBzZL/1ueHDXAcaGoRSY znGcC+MqAPP7cYOQ0eqB+Q0ABkMc5VBI5qSzNuzobOspRaP0HM0bGU5mbgwGZOXfm1ri2G qEeR4URItJr+VUgpH5Y43yA1H3PZuChdmjd0tSBkpBqCmolmPXKg+VeB62oiOkqgKUo7Qj NO2NCBZmb79FIkqWrniIVlLcxXqGY3A2xmvHQ8s2uMPReYMF649qG7nji6aApj0T1jjW59 2GJuR1LMoxLirq1kcj9j86QFNYQ4O1AMXiCvzQfa1TeMEWUuwXPyn3WKT3rjkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682200679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vtt12Y8nkgTpmpbrLtXs+CpTAJndssNDxaLSNBkd/iY=; b=jCOxZGXAjfTSNiefkrHqslo7uoTH51GNSIfx4qrvthrVw+9qwOGEzZRuOpCZHLSRHtgzou I7GHiiud62gd3TK467kOyThcIfc/i4xpE9RdLeZSCULW8bDmZYmBKCqVhdzNB1AMagQrQO 52mcLCGzjlqyc+0oRpI2+t4ZM+CGqoZRnomUxmRWw/idGSk7QZRthOrGlf+OW750XckVQZ mFJ3K+VzrqDIRBewR3aIRJyyAGzc0GfD2J0Ys/4IrbTWu41dP8OVe5kECXids6dbIdmTCW /JsvbddRV2bktvF/9KkRHbJGuVExMelZe3py6L9XHABGFG6LegLQNFX0rq2Ecw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682200679; a=rsa-sha256; cv=none; b=aWxdFJdJK6lE5bUXxlVjPMpykE5T+/W1PGHGxMlCsiguT2r0w4mzhXQKc74b+abuRN+or4 JL5oFmlgnuhsC9/vPsNecNLWy2CYM09eV6dk8qvMDJ7jWdl3RUfP9rGD8y1hL4HtjZf4ru PBtaIyX137nxQcNmk1kSF1XC22U5b+0GvvUvrOP/MJmKzmwtzG0f/x8bJ+D2OAIyjj9NEQ JlWKYO2k4BL+0eun7cqPngpx3csxleOTPYyxuBnLHfCTMBuLiG1fVZxpxsYYjfmbO94czs 8J8COl49838H4x2Y3XSchkH3B1yUyChIESDSD+rpRQ7O8M8Bv6Y+CtEuBxZBnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3ld34jyyzJ3n; Sat, 22 Apr 2023 21:57: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 33MLvxKC047870; Sat, 22 Apr 2023 21:57:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MLvxB9047869; Sat, 22 Apr 2023 21:57:59 GMT (envelope-from git) Date: Sat, 22 Apr 2023 21:57:59 GMT Message-Id: <202304222157.33MLvxB9047869@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: 16161b4839ff - main - makeman export UPDATE_DEPENFILE=no List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 16161b4839ffea0da6c2ecf5984952d43fca6ea3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=16161b4839ffea0da6c2ecf5984952d43fca6ea3 commit 16161b4839ffea0da6c2ecf5984952d43fca6ea3 Author: Simon J. Gerraty AuthorDate: 2023-04-22 21:57:24 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-22 21:57:24 +0000 makeman export UPDATE_DEPENFILE=no Just to be clear we do not need any updates. --- tools/build/options/makeman | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/options/makeman b/tools/build/options/makeman index 5a8b207b228a..db0b75363a85 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -20,6 +20,8 @@ set -o errexit export LC_ALL=C +# just be clear that we are not making anything +export UPDATE_DEPENDFILE=no t=$(mktemp -d -t makeman) trap 'test -d $t && rm -rf $t' exit From nobody Sat Apr 22 22: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 4Q3ls84pFZz46N7Q; Sat, 22 Apr 2023 22: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 4Q3ls841GZz4Gnc; Sat, 22 Apr 2023 22: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=1682201308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6PeJbj2W3ie75s/TZ6VsOZ7uve2EC7izWFMPVloeWw=; b=g5Y/UFkrvrKFw+dd/c9o61iBXvchEx5nqS4XieZ9/PBUTUJHXK56iFtKYOyju/MMPGjcc1 NW0qVuc0obFAXNYsM23scWuJ+ZQCA6yQoqHGsGf2I3nlG14BDaRov3ASdOLAJ/fnDV+FNL axMBWhtHKz8u2REJweeX2RYKUT5yC590d1DKLBmnZFotquJmZh9aDjuBtWzK5wVG45lyPs rdidTWhG8jV1AcjpfmqG00CLyGXvaPjCXmGg5qKsA961PGMGFj7ytzkXifwqkzMTxUpl48 dx8mW1RMsyhfMXHkvb1zz/h6zIHZDqIZ4MVTVNGVA3htdynhVDYBSWbJr1cQvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682201308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6PeJbj2W3ie75s/TZ6VsOZ7uve2EC7izWFMPVloeWw=; b=ijIkZYPjy+YQmfdeSwelpK56aLnsfw0cSLRj/gCKgaNz2DdQ1jlXwlCQgr8GBO6610Y7ma PnpVu4CIR+iuS5ysodIOBVub5lEbPPbXeDWePOf3H0w3k/qbHPg5PZWQzYlugkHwHiJFFs kpQJkDzvb8CazZskKDP2hfaNzCCGd0hp+dHWWZbgWHwGZTJZW70XvdoPIjqMoX7ZOMT2uN ttd3VtcOELpxQHI1U2qho7jg/mD/48GALkFxRr9uYkzw14ir4AGul7oKe697Fz3+TUsFGG 0vyER7twP5gT2pPM17apaWwOosWtIDoofxL8ngom8VA37HvjH8Wp0c8iDvW5Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682201308; a=rsa-sha256; cv=none; b=i3dsFX3SaGX/Eq+zUO0NhhAlNkWZPJETaYBrIZbkmQawzveINhu0z3nVm+OkPl4Evb8Goq FfptYd1vq2m2WBLOnEKRfMse/YlDOE6pZxl87cU+239fn+Fp34EwaWj0c/TGhuL0tEePM6 oR2T46AIgv8wrbo4uYkqSOP/qhHFKM+MXbSUDeIUbVAK69K2AZLmbSdNpLpC8snEVky7sQ kqiX6RNDEDlsMy076o8MeqkwMvCcwbee8SHEn5iAjpcZh3Yltpii1DyECCy7h1cEGGpDQL xIa27H6a4meuyjrtACi6M2uCfzYA2ikuRavIaXYjtdVUmE4v/gbzZKt3qUPvMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3ls83413zJGM; Sat, 22 Apr 2023 22: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 33MM8Su6064989; Sat, 22 Apr 2023 22: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 33MM8Sij064988; Sat, 22 Apr 2023 22:08:28 GMT (envelope-from git) Date: Sat, 22 Apr 2023 22:08:28 GMT Message-Id: <202304222208.33MM8Sij064988@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: cf20b1f81c10 - main - Extract some of local.meta.sys.mk to local.meta.sys.env.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: cf20b1f81c1043faca2a5e4fe16bc48679494fe0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cf20b1f81c1043faca2a5e4fe16bc48679494fe0 commit cf20b1f81c1043faca2a5e4fe16bc48679494fe0 Author: Simon J. Gerraty AuthorDate: 2023-04-22 22:07:53 +0000 Commit: Simon J. Gerraty CommitDate: 2023-04-22 22:07:53 +0000 Extract some of local.meta.sys.mk to local.meta.sys.env.mk Latest meta.sys.mk follows sys.mk in including local.meta.sys.env.mk and local.meta.sys.mk late, but we have things we need done early so move them to local.meta.sys.env.mk --- share/mk/local.meta.sys.env.mk | 90 ++++++++++++++++++++++++++++++++++++++++++ share/mk/local.meta.sys.mk | 85 +-------------------------------------- share/mk/local.sys.env.mk | 5 --- 3 files changed, 91 insertions(+), 89 deletions(-) diff --git a/share/mk/local.meta.sys.env.mk b/share/mk/local.meta.sys.env.mk new file mode 100644 index 000000000000..937b9c10bc3b --- /dev/null +++ b/share/mk/local.meta.sys.env.mk @@ -0,0 +1,90 @@ +# $FreeBSD$ + +# local configuration specific to meta mode +# before we process TARGET_SPEC +# we assume that MK_DIRDEPS_BUILD=yes + +.if !defined(HOST_TARGET) || !defined(HOST_MACHINE) +# we need HOST_TARGET etc below. +.include +.export HOST_TARGET +.endif + +# from src/Makefile (for universe) +TARGET_ARCHES_arm?= arm armv6 armv7 +TARGET_ARCHES_arm64?= aarch64 +TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpc64le powerpcspe +TARGET_ARCHES_riscv?= riscv64 + +# some corner cases +BOOT_MACHINE_DIR.amd64 = boot/i386 +MACHINE_ARCH.host = ${_HOST_ARCH} + +# the list of machines we support +ALL_MACHINE_LIST?= amd64 arm arm64 i386 powerpc riscv + +.-include + +.for m in ${ALL_MACHINE_LIST:O:u} +MACHINE_ARCH_LIST.$m?= ${TARGET_ARCHES_${m}:U$m} +MACHINE_ARCH.$m?= ${MACHINE_ARCH_LIST.$m:[1]} +BOOT_MACHINE_DIR.$m ?= boot/$m +.endfor + +.if empty(MACHINE_ARCH) +.if !empty(TARGET_ARCH) +MACHINE_ARCH= ${TARGET_ARCH} +.else +MACHINE_ARCH= ${MACHINE_ARCH.${MACHINE}} +.endif +.endif +MACHINE_ARCH?= ${MACHINE_ARCH.${MACHINE}} +MACHINE_ARCH:= ${MACHINE_ARCH} + +# For universe we want to potentially +# build for multiple MACHINE_ARCH per MACHINE +# so we need more than MACHINE in TARGET_SPEC +TARGET_SPEC_VARS?= MACHINE MACHINE_ARCH + +HOST_OBJTOP ?= ${OBJROOT}${HOST_TARGET} + +.if ${REQUESTED_MACHINE:U${MACHINE}} == "host" +MACHINE= host +.if ${TARGET_MACHINE:Uno} == ${HOST_TARGET} +# not what we want +TARGET_MACHINE= host +.endif +.endif +.if ${MACHINE} == "host" +OBJTOP := ${HOST_OBJTOP} +MACHINE_ARCH= ${MACHINE_ARCH.${MACHINE}} +.endif + +.if ${.MAKE.LEVEL} == 0 || empty(PYTHON) +PYTHON ?= /usr/local/bin/python +.export PYTHON +# _SKIP_BUILD is not 100% as it requires wrapping all 'all:' targets to avoid +# building in MAKELEVEL0. Just prohibit 'all' entirely in this case to avoid +# problems. +.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL} == 0 +.MAIN: dirdeps +.if make(all) +.error DIRDEPS_BUILD: Please run '${MAKE}' instead of '${MAKE} all'. +.endif +.endif +.endif + +# this is sufficient for most of the tree. +.MAKE.DEPENDFILE_DEFAULT = ${.MAKE.DEPENDFILE_PREFIX} + +# but if we have a machine qualified file it should be used in preference +.MAKE.DEPENDFILE_PREFERENCE = \ + ${.MAKE.DEPENDFILE_PREFIX}.${MACHINE} \ + ${.MAKE.DEPENDFILE_PREFIX} + +.undef .MAKE.DEPENDFILE + +META_MODE+= missing-meta=yes +.if empty(META_MODE:Mnofilemon) +META_MODE+= missing-filemon=yes +.endif diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 6e03a99d7dfe..7747329694ff 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -6,43 +6,8 @@ # we need this until there is an alternative MK_INSTALL_AS_USER= yes -.if !defined(HOST_TARGET) || !defined(HOST_MACHINE) -# we need HOST_TARGET etc below. -.include -.export HOST_TARGET -.endif - -# from src/Makefile (for universe) -TARGET_ARCHES_arm?= arm armv6 armv7 -TARGET_ARCHES_arm64?= aarch64 -TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpc64le powerpcspe -TARGET_ARCHES_riscv?= riscv64 - -# some corner cases -BOOT_MACHINE_DIR.amd64 = boot/i386 -MACHINE_ARCH.host = ${_HOST_ARCH} - -# the list of machines we support -ALL_MACHINE_LIST?= amd64 arm arm64 i386 powerpc riscv - .-include -.for m in ${ALL_MACHINE_LIST:O:u} -MACHINE_ARCH_LIST.$m?= ${TARGET_ARCHES_${m}:U$m} -MACHINE_ARCH.$m?= ${MACHINE_ARCH_LIST.$m:[1]} -BOOT_MACHINE_DIR.$m ?= boot/$m -.endfor - -.if empty(MACHINE_ARCH) -.if !empty(TARGET_ARCH) -MACHINE_ARCH= ${TARGET_ARCH} -.else -MACHINE_ARCH= ${MACHINE_ARCH.${MACHINE}} -.endif -.endif -MACHINE_ARCH?= ${MACHINE_ARCH.${MACHINE}} -MACHINE_ARCH:= ${MACHINE_ARCH} - # to be consistent with src/Makefile just concatenate with '.'s TARGET_OBJ_SPEC:= ${TARGET_SPEC:S;,;.;g} OBJTOP:= ${OBJROOT}${TARGET_OBJ_SPEC} @@ -53,33 +18,6 @@ OBJTOP:= ${OBJROOT}${TARGET_OBJ_SPEC} .endif .endif -HOST_OBJTOP ?= ${OBJROOT}${HOST_TARGET} - -.if ${OBJTOP} == ${HOST_OBJTOP} || ${REQUESTED_MACHINE:U${MACHINE}} == "host" -MACHINE= host -.if ${TARGET_MACHINE:Uno} == ${HOST_TARGET} -# not what we want -TARGET_MACHINE= host -.endif -.endif -.if ${MACHINE} == "host" -OBJTOP := ${HOST_OBJTOP} -MACHINE_ARCH= ${MACHINE_ARCH.${MACHINE}} -.endif - -.if ${.MAKE.LEVEL} == 0 || empty(PYTHON) -PYTHON ?= /usr/local/bin/python -.export PYTHON -# _SKIP_BUILD is not 100% as it requires wrapping all 'all:' targets to avoid -# building in MAKELEVEL0. Just prohibit 'all' entirely in this case to avoid -# problems. -.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL} == 0 -.MAIN: dirdeps -.if make(all) -.error DIRDEPS_BUILD: Please run '${MAKE}' instead of '${MAKE} all'. -.endif -.endif -.endif # we want to end up with a singe stage tree for all machines .if ${MK_STAGING} == "yes" @@ -130,25 +68,9 @@ LDFLAGS_LAST+= -L${STAGE_LIBDIR} .-include "local.toolchain.mk" -# this is sufficient for most of the tree. -.MAKE.DEPENDFILE_DEFAULT = ${.MAKE.DEPENDFILE_PREFIX} - -# but if we have a machine qualified file it should be used in preference -.MAKE.DEPENDFILE_PREFERENCE = \ - ${.MAKE.DEPENDFILE_PREFIX}.${MACHINE} \ - ${.MAKE.DEPENDFILE_PREFIX} - -.undef .MAKE.DEPENDFILE - -.include "sys.dependfile.mk" - .if ${.MAKE.LEVEL} > 0 && ${MACHINE} == "host" && ${.MAKE.DEPENDFILE:E} != "host" # we can use this but should not update it. -UPDATE_DEPENDFILE= NO -.endif -# Don't require filemon for makeman. -.if make(showconfig) -UPDATE_DEPENDFILE= NO +UPDATE_DEPENDFILE?= NO .endif # define the list of places that contain files we are responsible for @@ -232,11 +154,6 @@ CFLAGS+= ${CROSS_TARGET_FLAGS} ACFLAGS+= ${CROSS_TARGET_FLAGS} .endif -META_MODE+= missing-meta=yes -.if empty(META_MODE:Mnofilemon) -META_MODE+= missing-filemon=yes -.endif - .if ${MK_DIRDEPS_BUILD} == "yes" # we set these here, rather than local.gendirdeps.mk # so we can ensure any DEP_* values that might be used in diff --git a/share/mk/local.sys.env.mk b/share/mk/local.sys.env.mk index 626aafe61270..e3348537db41 100644 --- a/share/mk/local.sys.env.mk +++ b/share/mk/local.sys.env.mk @@ -50,8 +50,3 @@ ECHO_TRACE?= true .include "src.sys.env.mk" .-include - -# For universe we want to potentially -# build for multiple MACHINE_ARCH per MACHINE -# so we need more than MACHINE in TARGET_SPEC -TARGET_SPEC_VARS?= MACHINE MACHINE_ARCH From nobody Sat Apr 22 22:41: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 4Q3mbF2YMkz46Qbs; Sat, 22 Apr 2023 22:41: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 4Q3mbF1cY9z47h1; Sat, 22 Apr 2023 22:41:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682203289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3YfwZZyiH+kibH2+rFSPDkzWPrhSuy7SUrUghM9PJs=; b=RPWvh6uV1HMNFct3WOl/+/2lQGoD0Woimu6zru9kmSZsGG5sFEfxdhF6td5BBcBGUZUrcg zBDpgFmjywODTSnps1tfJ5s4KXuGADh4M/DJuj2xsdpTBqnZS033TJmP3feijAczyJqDnq KgqQcRQU2Zo+sksYNQf/Z9ADh83ktNe+5/Q/btmbq4zNjqw7/Zne//q92fOvF3/BSyLWN7 3HAkxUNMTMU5wBLgWRQwoknQPQ3q7eBfhUyXw0YknGtQbm32wm5rO7s67spMyZ6IUh4bd3 AWNvqzvz8eA/NDFz1NWnoDGxKpHtM9YKR94cU4uD6uk8oCRTv00xndjbkWwqaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682203289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3YfwZZyiH+kibH2+rFSPDkzWPrhSuy7SUrUghM9PJs=; b=Bm7V7ElE+lEsieQjzT++yms4C1yg4+cwcbpAbc2tdTTk9/VQe3gcCQ75CapBbw/XqhDmzh iykbZ54hnVBdHGa6PAg6yYXDIQxGf8Gy3T+lZ14R5js+9OFEXHOSSF9KgBq76bYruGA6SS 95WZ7sUlgz7ELVNF53dSyW61vLNcLEVPTjUSP18VIJnlX76xSkkzEaaexfPhWV4NcIhtb3 q8DN+V6/ZA/0iIoYvzObHB5ak1XGyZu5L1NO20sL6ueZhB74oEgKGe4uOTvG0c0p4+CC0/ DJoABW/NOMbqgv/aCYMuQCaReSPNbN2b1Wv0d1jBiVl447gs4/3LYHrGETMYtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682203289; a=rsa-sha256; cv=none; b=PAO3jD7DsuY5yTCgcwwZ7QXqPG2v5J2ZeYe0c1uWuO+8Ex9iFOvjlW8pviuftxpdPacjP4 Gyj/hKWvZHV6jDTq1La7c6h6WCe98V//+BxjkEtM/IoWCovwXYJALMyKOkuvJXm8ui8PtL XdZB/oerHtMGBtS3bQyVz3QrFVTORmTs6RZSdHf2mX8w0YDoiGcdcGh7J7boNLLVLtWhTv G39dpYAOjSPmaAoLm4rJaJgYI0OQwzd9ouCzTTWlRXAMgx9Oho9YzAXO5taln9om8NRHnw DEbGrUOT0M2Jjnc36cJ+/S7dG9eFQQdKFwiZ4W0CX4EOcNmiJmPt4zWjWqls8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3mbF0PSBzKR9; Sat, 22 Apr 2023 22:41: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 33MMfSwG023579; Sat, 22 Apr 2023 22:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33MMfSjo023578; Sat, 22 Apr 2023 22:41:28 GMT (envelope-from git) Date: Sat, 22 Apr 2023 22:41:28 GMT Message-Id: <202304222241.33MMfSjo023578@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: 66e8f1f7d37b - main - 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/main X-Git-Reftype: branch X-Git-Commit: 66e8f1f7d37b5f657086437f5411a63c9080e25c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=66e8f1f7d37b5f657086437f5411a63c9080e25c commit 66e8f1f7d37b5f657086437f5411a63c9080e25c Author: Dmitry Chagin AuthorDate: 2023-04-22 22:41:12 +0000 Commit: Dmitry Chagin CommitDate: 2023-04-22 22:41:12 +0000 linux(4): Fix arm64 build after b7a6bcdd, missed chunk added MFC after: 1 month --- 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);