From nobody Mon Sep 22 00:26:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVP6Z4N7jz68FKp; Mon, 22 Sep 2025 00:26:14 +0000 (UTC) (envelope-from madpilot@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVP6Z3Pjcz40y2; Mon, 22 Sep 2025 00:26:14 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758500774; 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:autocrypt:autocrypt; bh=8Eeq+68j0A1Rciw3ZPaKxfyCC5WwHHoF4ECbfE+IrOU=; b=DQXaFKZeDOMZ4NxT/GptAy5KP0RlwXuOfnXqWAtE+AI2J5Ba1UMnW88PwJ1iqDOnviyEJp 1IOZvaCoAbePH1oOPqCJL7UETE7YGBtkIYeWRIU44LLUjISLnl1xmLTDhCyuRZ+x9hJvp6 bmO0oDlCc7/kjg3hCPRIuIbx6xzRPchrt58oTJ8PdiNG1prAHCBBYR0PFceOzDsYeDg8gH mReh1laxoVUoKKcUL/OPs2TweUTN+WQDj5BEWVfjAiZwN0YTGnyJTbPUY+sNJTnM6MH6bS ioDn+Iw+h3GBYSwl1BIEgTdz5DMX1AJzEwZyBiGa9lvSVRISv4fRvNi7eqK8kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758500774; 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:autocrypt:autocrypt; bh=8Eeq+68j0A1Rciw3ZPaKxfyCC5WwHHoF4ECbfE+IrOU=; b=vm4xUjyVsaRnfpWrksQI2837emJQS20ZATooEPFFNnF++aa3Pn6iSCk2nuoyvF5PSxcy19 bj5K9hQdSyFl3BYKt36t9ZMXavbs0y6/t4eraEt7dsSZgYsB9IFvmlY939GSPMcB5sMHWc n4TodavrGDAcMw4rN9DhVI7ESmTDgd95cFOL/3X9yEvx1innp0C+2lHgVkhM3QfCqwkfQE H2/Gz641JS6xUR4VX+2TppG0BoOMLCt5j+meKV5IPidN9wO0dGs5ZD1eHxe/cS4bayZs0l Fr0qURgciBMcxkiv+HxqmHkfnXJyXou+VokApdktr9Q45gG6XRLRdCiYo2qBrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758500774; a=rsa-sha256; cv=none; b=GFP+2DNEWklc+DhRXQGHefpL0kELnTCoDGcfM0SOkwC8YGQOBLxO46ifz+2EZ6yTMdOz05 Do6YXDfSmiTuzXbQX7Cl7fQDMSqPskgjc3bi2YZhef1PMxBTvt1ccWc6w2ZSc4zea2o2ZE +Z2N688KeO34465H/iuSZxJFjOPxa49RFvCZEEqmpdqxhW3/TkZnNtp59fxSr4+HfhkvcE YvTRntXlCMxCEh4ToKhf3DFpZZ6Vw/qVIHq8+ru2cRbf3iXb2oyWI8CzYBNm9N/xKKaQkq aetP/7dheh+x2HeJnRDnFTeMlKcLhq14nfRIux2++o7uZJ16YdBYoiAJltjWjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280:ab9b:8bf1:ec36:413a] (unknown [IPv6:2a01:e11:2002:4280:ab9b:8bf1:ec36:413a]) (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: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVP6Y5Y9qzKdN; Mon, 22 Sep 2025 00:26:13 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Content-Type: multipart/mixed; boundary="------------CiyNtVCmAby94etLq2JHMfHd" Message-ID: <63c07846-cd1b-4ff2-8c35-c0a6db6954cc@FreeBSD.org> Date: Mon, 22 Sep 2025 02:26:12 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Guido Falsi Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 To: Gleb Smirnoff Cc: "Herbert J. Skuhra" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> <87jz1sc9fr.wl-herbert@gojira.at> <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> <909b3e33-0639-4abc-915f-073cd0f304da@FreeBSD.org> Content-Language: en-US Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: This is a multi-part message in MIME format. --------------CiyNtVCmAby94etLq2JHMfHd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/22/25 01:00, Gleb Smirnoff wrote: > On Sun, Sep 21, 2025 at 09:17:15PM +0200, Guido Falsi wrote: > G> > Is struct nd_ifinfo something that is used as argument to ioctl(2)? > G> > If so, then adding counter_u64_t into it is not correct. > G> > > G> > I would suggest to not revert the change as a whole, but remove the > G> > counter only and bring struct nd_ifinfo back to original. The counter > G> > should probably go into struct in6_ifextra that is pointed by > G> > if->if_afdata[AF_INET6]. > G> > G> Thanks for the feedback and suggestion! > G> > G> You are definitely right! I'm in the process to create a review for such a > G> change shortly, I'll post it as soon as I'm able to have the code tested. > > As long as Herbert confirms that the patch fixes the issue for him, please > consider the change as approved by an src committer and please push it. We > want to enter the stabweek that starts tomorrow without a ABI breakage. > @Herbert I'm attaching a patch against base sources for you to test. It moves the new counter to in6_ifextra structure, removing the ABI breakage I introduced. Everything should be back to working with this. Can you confirm it fixes the issue for you? Thanks in advance! -- Guido Falsi --------------CiyNtVCmAby94etLq2JHMfHd Content-Type: text/x-patch; charset=UTF-8; name="0001-Move-dad_failures-to-in6_ifextra.patch" Content-Disposition: attachment; filename="0001-Move-dad_failures-to-in6_ifextra.patch" Content-Transfer-Encoding: base64 RnJvbSBiOWI4MTRhNmJmYzg0ODE4YWZmY2U5MjQzMTcyZTRiNTkxZTAyMjE1IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBHdWlkbyBGYWxzaSA8bWFkcGlsb3RARnJlZUJTRC5v cmc+CkRhdGU6IFN1biwgMjEgU2VwIDIwMjUgMTk6MjM6MjggKzAyMDAKU3ViamVjdDogW1BB VENIXSBNb3ZlIGRhZF9mYWlsdXJlcyB0byBpbjZfaWZleHRyYQoKLS0tCiBzeXMvbmV0aW5l dDYvaW42LmMgICAgICAgICAgfCAzICsrKwogc3lzL25ldGluZXQ2L2luNl9pZmF0dGFjaC5j IHwgMiArLQogc3lzL25ldGluZXQ2L2luNl92YXIuaCAgICAgIHwgMiArKwogc3lzL25ldGlu ZXQ2L25kNi5jICAgICAgICAgIHwgNCAtLS0tCiBzeXMvbmV0aW5ldDYvbmQ2LmggICAgICAg ICAgfCAxIC0KIHN5cy9uZXRpbmV0Ni9uZDZfbmJyLmMgICAgICB8IDYgKysrLS0tCiBzeXMv bmV0aW5ldDYvbmQ2X3J0ci5jICAgICAgfCAyICstCiA3IGZpbGVzIGNoYW5nZWQsIDEwIGlu c2VydGlvbnMoKyksIDEwIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL3N5cy9uZXRpbmV0 Ni9pbjYuYyBiL3N5cy9uZXRpbmV0Ni9pbjYuYwppbmRleCA0Zjc1NmE3NWZhYzcuLjhlZjc1 NWUyZGMwYSAxMDA2NDQKLS0tIGEvc3lzL25ldGluZXQ2L2luNi5jCisrKyBiL3N5cy9uZXRp bmV0Ni9pbjYuYwpAQCAtMjYwNCw2ICsyNjA0LDggQEAgaW42X2RvbWlmYXR0YWNoKHN0cnVj dCBpZm5ldCAqaWZwKQogCUNPVU5URVJfQVJSQVlfQUxMT0MoZXh0LT5pY21wNl9pZnN0YXQs CiAJICAgIHNpemVvZihzdHJ1Y3QgaWNtcDZfaWZzdGF0KSAvIHNpemVvZih1aW50NjRfdCks IE1fV0FJVE9LKTsKIAorCWV4dC0+ZGFkX2ZhaWx1cmVzID0gY291bnRlcl91NjRfYWxsb2Mo TV9XQUlUT0spOworCiAJZXh0LT5uZF9pZmluZm8gPSBuZDZfaWZhdHRhY2goaWZwKTsKIAll eHQtPnNjb3BlNl9pZCA9IHNjb3BlNl9pZmF0dGFjaChpZnApOwogCWV4dC0+bGx0YWJsZSA9 IGluNl9sbHRhdHRhY2goaWZwKTsKQEAgLTI2MzksNiArMjY0MSw3IEBAIGluNl9kb21pZmRl dGFjaChzdHJ1Y3QgaWZuZXQgKmlmcCwgdm9pZCAqYXV4KQogCUNPVU5URVJfQVJSQVlfRlJF RShleHQtPmljbXA2X2lmc3RhdCwKIAkgICAgc2l6ZW9mKHN0cnVjdCBpY21wNl9pZnN0YXQp IC8gc2l6ZW9mKHVpbnQ2NF90KSk7CiAJZnJlZShleHQtPmljbXA2X2lmc3RhdCwgTV9JRkFE RFIpOworCWNvdW50ZXJfdTY0X2ZyZWUoZXh0LT5kYWRfZmFpbHVyZXMpOwogCWZyZWUoZXh0 LCBNX0lGQUREUik7CiB9CiAKZGlmZiAtLWdpdCBhL3N5cy9uZXRpbmV0Ni9pbjZfaWZhdHRh Y2guYyBiL3N5cy9uZXRpbmV0Ni9pbjZfaWZhdHRhY2guYwppbmRleCA1N2ZlMTJhMWM5M2Iu LjRmZGUzNDZmYjY5MSAxMDA2NDQKLS0tIGEvc3lzL25ldGluZXQ2L2luNl9pZmF0dGFjaC5j CisrKyBiL3N5cy9uZXRpbmV0Ni9pbjZfaWZhdHRhY2guYwpAQCAtMzc3LDcgKzM3Nyw3IEBA IGluNl9nZXRfc3RhYmxlaWZpZChzdHJ1Y3QgaWZuZXQgKmlmcCwgc3RydWN0IGluNl9hZGRy ICppbjYsIGludCBwcmVmaXhsZW4pCiAJfQogCWhvc3R1dWlkX2xlbiA9IHN0cmxlbihob3N0 dXVpZCk7CiAKLQlkYWRfZmFpbHVyZXMgPSBjb3VudGVyX3U2NF9mZXRjaChORF9JRklORk8o aWZwKS0+ZGFkX2ZhaWx1cmVzKTsKKwlkYWRfZmFpbHVyZXMgPSBjb3VudGVyX3U2NF9mZXRj aChEQURfRkFJTFVSRVMoaWZwKSk7CiAKIAkvKgogCSAqIFJGQyA3MjE3IHNlY3Rpb24gNwpk aWZmIC0tZ2l0IGEvc3lzL25ldGluZXQ2L2luNl92YXIuaCBiL3N5cy9uZXRpbmV0Ni9pbjZf dmFyLmgKaW5kZXggZTVhYjgzZTZhMmExLi5lNTExZWFkMjRmMDggMTAwNjQ0Ci0tLSBhL3N5 cy9uZXRpbmV0Ni9pbjZfdmFyLmgKKysrIGIvc3lzL25ldGluZXQ2L2luNl92YXIuaApAQCAt MTA2LDkgKzEwNiwxMSBAQCBzdHJ1Y3QgaW42X2lmZXh0cmEgewogCXN0cnVjdCBzY29wZTZf aWQgKnNjb3BlNl9pZDsKIAlzdHJ1Y3QgbGx0YWJsZSAqbGx0YWJsZTsKIAlzdHJ1Y3QgbWxk X2lmc29mdGMgKm1sZF9pZmluZm87CisJY291bnRlcl91NjRfdCBkYWRfZmFpbHVyZXM7CS8q IERBRCBmYWlsdXJlcyB3aGVuIHVzaW5nIFJGQyA3MjE3IHN0YWJsZSBhZGRyZXNzZXMgKi8K IH07CiAKICNkZWZpbmUJTExUQUJMRTYoaWZwKQkoKChzdHJ1Y3QgaW42X2lmZXh0cmEgKiko aWZwKS0+aWZfYWZkYXRhW0FGX0lORVQ2XSktPmxsdGFibGUpCisjZGVmaW5lCURBRF9GQUlM VVJFUyhpZnApCSgoKHN0cnVjdCBpbjZfaWZleHRyYSAqKShpZnApLT5pZl9hZmRhdGFbQUZf SU5FVDZdKS0+ZGFkX2ZhaWx1cmVzKQogCiAjaWZkZWYgX0tFUk5FTAogCmRpZmYgLS1naXQg YS9zeXMvbmV0aW5ldDYvbmQ2LmMgYi9zeXMvbmV0aW5ldDYvbmQ2LmMKaW5kZXggOTM4ZDQx MTcxMWYwLi4wMGRmNWVmY2VmOTIgMTAwNjQ0Ci0tLSBhL3N5cy9uZXRpbmV0Ni9uZDYuYwor KysgYi9zeXMvbmV0aW5ldDYvbmQ2LmMKQEAgLTMyOSw4ICszMjksNiBAQCBuZDZfaWZhdHRh Y2goc3RydWN0IGlmbmV0ICppZnApCiAJCW5kLT5mbGFncyB8PSBORDZfSUZGX1NUQUJMRUFE RFI7CiAJfQogCi0JbmQtPmRhZF9mYWlsdXJlcyA9IGNvdW50ZXJfdTY0X2FsbG9jKE1fV0FJ VE9LKTsKLQogCXJldHVybiBuZDsKIH0KIApAQCAtMzUwLDggKzM0OCw2IEBAIG5kNl9pZmRl dGFjaChzdHJ1Y3QgaWZuZXQgKmlmcCwgc3RydWN0IG5kX2lmaW5mbyAqbmQpCiAJfQogCU5F VF9FUE9DSF9FWElUKGV0KTsKIAotCWNvdW50ZXJfdTY0X2ZyZWUobmQtPmRhZF9mYWlsdXJl cyk7Ci0KIAlmcmVlKG5kLCBNX0lQNk5EUCk7CiB9CiAKZGlmZiAtLWdpdCBhL3N5cy9uZXRp bmV0Ni9uZDYuaCBiL3N5cy9uZXRpbmV0Ni9uZDYuaAppbmRleCAxZGUyYTc3ZGRmNmQuLjVm ZTAyN2FjNWU3YyAxMDA2NDQKLS0tIGEvc3lzL25ldGluZXQ2L25kNi5oCisrKyBiL3N5cy9u ZXRpbmV0Ni9uZDYuaApAQCAtNzYsNyArNzYsNiBAQCBzdHJ1Y3QgbmRfaWZpbmZvIHsKIAl1 X2ludDhfdCByYW5kb21zZWVkMFs4XTsgLyogdXBwZXIgNjQgYml0cyBvZiBNRDUgZGlnZXN0 ICovCiAJdV9pbnQ4X3QgcmFuZG9tc2VlZDFbOF07IC8qIGxvd2VyIDY0IGJpdHMgKHVzdWFs bHkgdGhlIEVVSTY0IElGSUQpICovCiAJdV9pbnQ4X3QgcmFuZG9taWRbOF07CS8qIGN1cnJl bnQgcmFuZG9tIElEICovCi0JY291bnRlcl91NjRfdCBkYWRfZmFpbHVyZXM7CS8qIERBRCBm YWlsdXJlcyB3aGVuIHVzaW5nIFJGQyA3MjE3IHN0YWJsZSBhZGRyZXNzZXMgKi8KIH07CiAK ICNkZWZpbmUgTkQ2X0lGRl9QRVJGT1JNTlVECTB4MQpkaWZmIC0tZ2l0IGEvc3lzL25ldGlu ZXQ2L25kNl9uYnIuYyBiL3N5cy9uZXRpbmV0Ni9uZDZfbmJyLmMKaW5kZXggNzZiMWZkODZl ZTA4Li5jYzE3YjRlMWE0MDIgMTAwNjQ0Ci0tLSBhL3N5cy9uZXRpbmV0Ni9uZDZfbmJyLmMK KysrIGIvc3lzL25ldGluZXQ2L25kNl9uYnIuYwpAQCAtMTQ3Myw3ICsxNDczLDcgQEAgbmQ2 X2RhZF90aW1lcih2b2lkICphcmcpCiAJCQlpZiAoKE5EX0lGSU5GTyhpZnApLT5mbGFncyAm IE5ENl9JRkZfSUZESVNBQkxFRCkgPT0gMCkgewogCQkJCWlhLT5pYTZfZmxhZ3MgJj0gfklO Nl9JRkZfVEVOVEFUSVZFOwogCQkJCWlmICgoTkRfSUZJTkZPKGlmcCktPmZsYWdzICYgTkQ2 X0lGRl9TVEFCTEVBRERSKSAmJiAhKGlhLT5pYTZfZmxhZ3MgJiBJTjZfSUZGX1RFTVBPUkFS WSkpCi0JCQkJCWNvdW50ZXJfdTY0X3plcm8oTkRfSUZJTkZPKGlmcCktPmRhZF9mYWlsdXJl cyk7CisJCQkJCWNvdW50ZXJfdTY0X3plcm8oREFEX0ZBSUxVUkVTKGlmcCkpOwogCQkJfQog CiAJCQluZDZsb2coKExPR19ERUJVRywKQEAgLTE1MjIsMTAgKzE1MjIsMTAgQEAgbmQ2X2Rh ZF9kdXBsaWNhdGVkKHN0cnVjdCBpZmFkZHIgKmlmYSwgc3RydWN0IGRhZHEgKmRwKQogCSAq IE1vcmUgYWRkcmVzc2VzIHdpbGwgYmUgZ2VuZXJhdGVkIGFzIGxvbmcgYXMgcmV0cmllcyBh cmUgbm90IGV4aGF1c3RlZC4KIAkgKi8KIAlpZiAoKE5EX0lGSU5GTyhpZnApLT5mbGFncyAm IE5ENl9JRkZfU1RBQkxFQUREUikgJiYgIShpYS0+aWE2X2ZsYWdzICYgSU42X0lGRl9URU1Q T1JBUlkpKSB7Ci0JCXVpbnQ2NF90IGRhZF9mYWlsdXJlcyA9IGNvdW50ZXJfdTY0X2ZldGNo KE5EX0lGSU5GTyhpZnApLT5kYWRfZmFpbHVyZXMpOworCQl1aW50NjRfdCBkYWRfZmFpbHVy ZXMgPSBjb3VudGVyX3U2NF9mZXRjaChEQURfRkFJTFVSRVMoaWZwKSk7CiAKIAkJaWYgKGRh ZF9mYWlsdXJlcyA8PSBWX2lwNl9zdGFibGVhZGRyX21heHJldHJpZXMpIHsKLQkJCWNvdW50 ZXJfdTY0X2FkZChORF9JRklORk8oaWZwKS0+ZGFkX2ZhaWx1cmVzLCAxKTsKKwkJCWNvdW50 ZXJfdTY0X2FkZChEQURfRkFJTFVSRVMoaWZwKSwgMSk7CiAJCQkvKiBpZiByZXRyaWVzIGV4 aGF1c3RlZCwgb3V0cHV0IGFuIGluZm9ybWF0aXZlIGVycm9yIG1lc3NhZ2UgKi8KIAkJCWlm IChkYWRfZmFpbHVyZXMgPT0gVl9pcDZfc3RhYmxlYWRkcl9tYXhyZXRyaWVzKQogCQkJCWxv ZyhMT0dfRVJSLCAiJXM6IG1hbnVhbCBpbnRlcnZlbnRpb24gcmVxdWlyZWQsIGNvbnNpZGVy IGRpc2FibGluZyBcInN0YWJsZWFkZHJcIiBvbiB0aGUgaW50ZXJmYWNlIgpkaWZmIC0tZ2l0 IGEvc3lzL25ldGluZXQ2L25kNl9ydHIuYyBiL3N5cy9uZXRpbmV0Ni9uZDZfcnRyLmMKaW5k ZXggMDE2MjNhNDUwNmJlLi43OGRjNTVkZDI5MmYgMTAwNjQ0Ci0tLSBhL3N5cy9uZXRpbmV0 Ni9uZDZfcnRyLmMKKysrIGIvc3lzL25ldGluZXQ2L25kNl9ydHIuYwpAQCAtMTc1Nyw3ICsx NzU3LDcgQEAgcHJlbGlzdF91cGRhdGUoc3RydWN0IG5kX3ByZWZpeGN0bCAqbmV3LCBzdHJ1 Y3QgbmRfZGVmcm91dGVyICpkciwKIAkJICogdG8gZmFpbCBhbmQgbm8gZnVydGhlciByZXRy aWVzIHNob3VsZCBoYXBwZW4uCiAJCSAqLwogCQlpZiAoTkRfSUZJTkZPKGlmcCktPmZsYWdz ICYgTkQ2X0lGRl9TVEFCTEVBRERSICYmCi0JCSAgICBjb3VudGVyX3U2NF9mZXRjaChORF9J RklORk8oaWZwKS0+ZGFkX2ZhaWx1cmVzKSA8PSBWX2lwNl9zdGFibGVhZGRyX21heHJldHJp ZXMgJiYKKwkJICAgIGNvdW50ZXJfdTY0X2ZldGNoKERBRF9GQUlMVVJFUyhpZnApKSA8PSBW X2lwNl9zdGFibGVhZGRyX21heHJldHJpZXMgJiYKIAkJICAgIGlmYTYtPmlhNl9mbGFncyAm IChJTjZfSUZGX0RVUExJQ0FURUQgfCBJTjZfSUZGX1RFTVBPUkFSWSkpCiAJCQljb250aW51 ZTsKIAotLSAKMi41MS4wCgo= --------------CiyNtVCmAby94etLq2JHMfHd-- From nobody Mon Sep 22 04:57:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVW845czmz68Zf7; Mon, 22 Sep 2025 04:57: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVW844qVLz3QKt; Mon, 22 Sep 2025 04:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758517076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zWCkRyM/RPdl545jEDQjdw8+Gf3nMXsdicZGAr4znU=; b=ynfngXgL9TGXUE4AkUd2whljRbI4IH0VIAPliSgBpNkgx9aFuEwgF4De11JYosobNFNBrF aVfdcSzIVKIDXGVLqrQGtOVQBwwsrYCj71LBjy8deVSrPWIhGn4UXHHT5f6a5SAi6Zxljl 82Hr1GVCyWWAW2/60qpCUUILXWSgI1xEdbsA9Btop92GSl2ZqXRv0NaBNmk3sbzTUbttA+ SgNudoT0IZFVEjJRCOZB/IL315ONWAbFRGmqeqv6lmnF+JjOPRSSiPtcjFDyrusExDvFTH WPvww0dTgjSasa/ON7jnJSnu+U9pMKzxy3mkGAfN3fd6em6G/Cn0mmYAmUWQEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758517076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zWCkRyM/RPdl545jEDQjdw8+Gf3nMXsdicZGAr4znU=; b=TDLPvEkvqLFB0Hco9pZbZTsXwhdmTNzBL0UWt75Jl1Rn7T0Sg1+mHSXhjLOYYM0egzKTkJ WlKP0HuQQqTjHFzcv9tDwJ7XSGCpik6XI7JtjQydy3ke3Ny884u/VyQ47JxTkc6VtvFruM Ox4o8qv3SSTitcwUiBumOG4nCVFb/sh366//AemWi6DDgIKITQ4qeHMNCkhVdahFMF+3dp X/A6CKWTj2fN3UnEAhOBlVXuVw7fuDHsRxJu1OZzips5wVC5ISiO4lUUyaNAEbml6mV3nx AKAeeYvJ0CQbKWBgKbiEOwX76jJ0GwENIsGBRKW/qKFohkMSKWNoO0NOo3pHwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758517076; a=rsa-sha256; cv=none; b=U5Uo/GSwi/T7nkPH4pmDpwqMbrt03ikV/Y581L5DZZSwwRuvOhsxvCEfNMTo6D1M5zXmOe ZUoNJPk+MfYfmye1B8MbFljmJu+yKzQg4ixjy+cNtcBHM9D5RG+da3Aj/3RDfqeQXIsw5Z bho2d71gV66wN6I1kRQJX0YNlXj1gH9LpiIpQm9JpLktjcaZxPTDmuq4/tHwi9HZmwCgc/ 8LaM7pTxC0a2u/VvZTRy5EkKbRdGKagOsO5LjiexABi/kFyRUjZnNa3dNR0RJJiVqhti3p hhgwfmWd2r4GIchJq0wsg62/OLxzkJZppVLebEBwR7SZDpEEICTCcfWGthNanQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVW8448NDzm42; Mon, 22 Sep 2025 04:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M4vuH0094169; Mon, 22 Sep 2025 04:57:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M4vuW7094166; Mon, 22 Sep 2025 04:57:56 GMT (envelope-from git) Date: Mon, 22 Sep 2025 04:57:56 GMT Message-Id: <202509220457.58M4vuW7094166@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: 0143af8499ca - main - Revert "ifconfig: Display the IFCAP_NV capability without netlink" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0143af8499cacfe5787ad3902a714bbdab4c8b28 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0143af8499cacfe5787ad3902a714bbdab4c8b28 commit 0143af8499cacfe5787ad3902a714bbdab4c8b28 Author: Zhenlei Huang AuthorDate: 2025-09-22 04:45:48 +0000 Commit: Zhenlei Huang CommitDate: 2025-09-22 04:51:03 +0000 Revert "ifconfig: Display the IFCAP_NV capability without netlink" The display of IFCAP_NV is handled by SIOCGIFCAPNV ioctl. The kernel composes a nvlist of capabilities and the userland unpack them and display. So this "NV" in IFCAPBITS is meaningless but rather misleading. This reverts commit 0c1684dd456e3df306b359b04e61f9f2048d9ff2. --- sbin/ifconfig/ifconfig.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index d4c8cbd29d18..9aeb4a09ef49 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1658,7 +1658,6 @@ static const char *IFCAPBITS[] = { [14] = "TOE4", [15] = "TOE6", [16] = "VLAN_HWFILTER", - [17] = "NV", [18] = "VLAN_HWTSO", [19] = "LINKSTATE", [20] = "NETMAP", From nobody Mon Sep 22 05:02:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVWF53n87z68b79; Mon, 22 Sep 2025 05:02: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVWF53Cb3z3RQ7; Mon, 22 Sep 2025 05:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758517337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gun8YsetDgiuXBkOyej2AivN1t0QqYexrHuC1RnC+Hw=; b=SLdDPF4IsB4KJeyHUIWRddm4HbdOIKcOu3+4LNg4U0uKMemgnIJ7wcTnQpXi4YlVPt3dJ3 TCr90O83G5KUHd0K9oMwUgrk39N/jkUqLV8bOs9H2ZiE1skks6fIWBwjUVJ2OHLP4VMwHV v6JyTasE8PaaQEN8pvBr+oeOAhyMxKm/pT2qYOKsbdwBNa7r4ZvVp0i4jflwJ2Q84tXzGv 0KGlajpQKgsBA1aDpHFE7v019bc6qhK2ujvZGBf0BczwWQ1/OILxQIYfdpNzII75XxCtN6 WTofd1XZuTxPDocyv22zHtXa0TAl6OFoYxhdJkdiOACa8UHNIh0n9z1jdpacGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758517337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gun8YsetDgiuXBkOyej2AivN1t0QqYexrHuC1RnC+Hw=; b=gtC6GIf1Y5SuT5hfU5/Ga+l80HuL1C/Wb/AjoObf1FrSE6zmYqU9qpapMZzfu906+jICZx owBuiFBt6qN05IVpisfchL7HzHH7Si9bxRgcESLbrTR9My7gIAoz0hdDTo2lrnL+u8hub4 zcWtI3wRAngdM7iLO+/Nr8jzz3ahT4Ns6ofY/3ZfcpR8Nn7Jn4HUOLe70AWXfNRUJN7M85 aCj2Q+QU9xVBbpvb5dJfRXVpaoS/giwoHS0R9VnApchn8kmmJCn3if5Lx5xzdlA/fpNShS 6+DY7xOiJilMDpzWSR+Ic6d4fYteY4n53k3VsbYeYvaT/MUmA0s5fo7/wuYmdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758517337; a=rsa-sha256; cv=none; b=Qc5bprFEmCIxLQXMMGwYZvAY05sYL15g/zKNOvCqm4o1Y0kVn1XpN2XIGr1VnkEWLdu+Ct R1WZ3feIP3bCZMmET9C91fvpauPKDkDW05odNWzAR+YHeQCPUhtmlWpcuBEbooahwUzDqX UeMbApRoN4f1U/KlI3AzPOX6haIgxy1p54BOmSUfdGfbxcWq736Ythn1ojKE9h4SYV7x8a SYQlPRwgLdsa/0NLOaMO1PvdVX9tH5wvd4STDi+If9qR31RCs6/+iQHh6R9ko7E0R1yNYM QHQM2CmVEP4PJ2ZHbhfxPml5o8TxTbkqz+HNasIg+JteyEsTIAgtOq8PmtWAPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVWF52pGszm6n; Mon, 22 Sep 2025 05:02:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M52HJ8012818; Mon, 22 Sep 2025 05:02:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M52HGJ012815; Mon, 22 Sep 2025 05:02:17 GMT (envelope-from git) Date: Mon, 22 Sep 2025 05:02:17 GMT Message-Id: <202509220502.58M52HGJ012815@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: f72908c94df9 - main - libc: properly reference setgroups@FBSD_1.0 in initgroups@FBSD_1.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f72908c94df9a256422790d4e2a60c9c33a35f2d Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f72908c94df9a256422790d4e2a60c9c33a35f2d commit f72908c94df9a256422790d4e2a60c9c33a35f2d Author: Konstantin Belousov AuthorDate: 2025-09-20 23:50:47 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-22 05:01:47 +0000 libc: properly reference setgroups@FBSD_1.0 in initgroups@FBSD_1.0 by forwarding the reference to libsys syscall symbol, for the libc.so case. Reviewed and tested by: kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52672 --- lib/libc/gen/gen-compat.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/gen-compat.h b/lib/libc/gen/gen-compat.h index dac8f54b45a2..74678301af6f 100644 --- a/lib/libc/gen/gen-compat.h +++ b/lib/libc/gen/gen-compat.h @@ -52,6 +52,12 @@ int freebsd11_getmntinfo(struct freebsd11_statfs **, int); char *freebsd11_devname(__uint32_t dev, __mode_t type); char *freebsd11_devname_r(__uint32_t dev, __mode_t type, char *buf, int len); -int freebsd14_setgroups(int gidsize, const __gid_t *gidset); +#define F14SG int freebsd14_setgroups(int gidsize, const __gid_t *gidset) +#ifdef PIC +static F14SG __attribute__((__weakref__("setgroups@FBSD_1.0"))); +#else +F14SG; +#endif +#undef F14SG #endif /* _GEN_COMPAT_H_ */ From nobody Mon Sep 22 06:07:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVXj75406z68fbt; Mon, 22 Sep 2025 06:08:11 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (using TLSv1.3 with cipher TLS_AES_256_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 4cVXj71X7nz3bwf; Mon, 22 Sep 2025 06:08:11 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4cVXhc1ddfz9sc4; Mon, 22 Sep 2025 08:07:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gojira.at; s=MBO0001; t=1758521264; 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=4gh/CdPMb6D7jg9++0rGtaj/44WBMZhxIOwa6x4kZLo=; b=UZM+7ctqw/w6oi9p/JvujGRgThrfsK8r+kVfM4eGm+Kot5ITKXFPxPdqpJjlSeeA4ldhOV wFQJ1Cwi108P8Ecp5+xm7ultKqQBiPgQ+DFUc4zp2JXlD1BOcAme5gwXIBXgsVg9Jr4eFE dUbinFu+fY31hRLfRU1eVsc3E3vE0237t3BRaKMKdBJ3CiFgdZMcfJs/TnGdmiEcVQgTCv TvxHqljYtO2MtKGmExAZUPTSBcQIftX2ZFE0bXmx0BIdRwTgjhWKhtwavMZoEVlfS4bDot 451/ETtMbYhpDsUmX6gclTy577NNa2hR1Pqpc1SO114d0/tLjpscgdCAeUSZ4A== Date: Mon, 22 Sep 2025 08:07:08 +0200 Message-ID: <87plbj9g1f.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Guido Falsi Cc: Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 31ec8b6407fd - main - sys/netinet6: Implement RFC 7217 In-Reply-To: <63c07846-cd1b-4ff2-8c35-c0a6db6954cc@FreeBSD.org> References: <202509201231.58KCVqBC047480@gitrepo.freebsd.org> <874iswhip4.wl-herbert@gojira.at> <07503de1-785e-4e4d-b4e4-0524aeb064e1@FreeBSD.org> <87jz1sc9fr.wl-herbert@gojira.at> <31da7dd5-ae67-4fb4-aa47-81e57f460c9d@FreeBSD.org> <909b3e33-0639-4abc-915f-073cd0f304da@FreeBSD.org> <63c07846-cd1b-4ff2-8c35-c0a6db6954cc@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVXj71X7nz3bwf On Mon, 22 Sep 2025 02:26:12 +0200, Guido Falsi wrote: > > On 9/22/25 01:00, Gleb Smirnoff wrote: > > On Sun, Sep 21, 2025 at 09:17:15PM +0200, Guido Falsi wrote: > > G> > Is struct nd_ifinfo something that is used as argument to ioctl(2)? > > G> > If so, then adding counter_u64_t into it is not correct. > > G> > > > G> > I would suggest to not revert the change as a whole, but remove the > > G> > counter only and bring struct nd_ifinfo back to original. The counter > > G> > should probably go into struct in6_ifextra that is pointed by > > G> > if->if_afdata[AF_INET6]. > > G> > > G> Thanks for the feedback and suggestion! > > G> > > G> You are definitely right! I'm in the process to create a review for such a > > G> change shortly, I'll post it as soon as I'm able to have the code tested. > > > > As long as Herbert confirms that the patch fixes the issue for him, please > > consider the change as approved by an src committer and please push it. We > > want to enter the stabweek that starts tomorrow without a ABI breakage. > > > > @Herbert I'm attaching a patch against base sources for you to test. > > It moves the new counter to in6_ifextra structure, removing the ABI > breakage I introduced. Everything should be back to working with this. > > Can you confirm it fixes the issue for you? Thanks a lot, this patch fixes the issue. From nobody Mon Sep 22 07:59:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVb9v1LZdz68mKP; Mon, 22 Sep 2025 07:59: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVb9v0mfvz3p2M; Mon, 22 Sep 2025 07:59:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758527987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jYR9qLKwxgHpKF/xdAWX5iofMfOQOVMJ6WKa/9PcS9s=; b=PoDyg37ASVdXFAm5N5uiifgH8h7rW5KYMGIRF8UaJ9BJ1mPgyTuvr5BD8TcY/90nLSD/xv scn8AD9wUB3vz7c3ttdSq4q+82V0ulW6EokrbVKrU5HWnRWr5Zg98uqhvwSePQpQs4ViAj Rt90d6kBueFmMiDvqcS/N1cRKwNz+d7cvHTiYg5F2DQ52NiMQElApY8fI3ITM6zTM+JYt8 TDyAGW84fTHgqvYPXWUcIN7dapYgh1AJ2wsh6GgGde3gvgMD7+RCgNn0nWe9gepMfVsncH l0eJ9sJCy7zW/xtOaK5xs+Bnqm760EFgqF8TMD9Ctunu+vWcTPYo46AquT3sHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758527987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jYR9qLKwxgHpKF/xdAWX5iofMfOQOVMJ6WKa/9PcS9s=; b=FRoUohdXandj2yWicO1zmWZfuIFLth8yVveOjcBnNVVatbqKZf6UH58JxaftyX23ny7aeV hvxeHLv0S0YkOk8tdn0G6zzdcGHl7jO+giD1jfl6A1wXZ71NZEfjTA5zgpQyGJ5VmW8iRf /qkxumg36uIo77ElKH59JdhwiEoT+1/BDJE9uQxY7YFaLEHFFlcbv3LYOBnwoXozUSXqwP ttzJa6oDJR61ab8Yq9f003/sdXu3GbVFkcqGJrFDNH/P96IESTJQxtS1t7ouqajevN1nqE W/7w1lUwPzl8YEjNmgoZuQlj8MXeMuYfs4VqE6EtTmZPoQK0/LfBIe64HAcvtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758527987; a=rsa-sha256; cv=none; b=FU2H8RFmprONFr2KxNRohh/Npe18rGda0rVSamJOqPkfpp0qunLtFnfNFi/rXa7A4T5lA6 Zo1PBUzpiueJDNKh2FIZweZET1JoBSXSVA8kQBpki7w6Zfswd7cvGWJV9tqi7BPrVwT+9v puuD3Icmvffa0ZhFb1F1rJxnAH7rOOQcGGYylBpyaIw4EY/2lg/37dk1OSBoZDO1dtI7z6 5WBCUaAIiJg0TW+gtWJ8uXwxGqp5VeUaxRk9cT77faOCCahQbxhu8LewvPA3uNxc1DLPuh WGFml22GNqX8yrYldE2bnk1TzerkyUbuLb5KTlLiSiyfr8QumcQPBgGkv1nmgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVb9v0L9qzrXv; Mon, 22 Sep 2025 07:59:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M7xkdI031435; Mon, 22 Sep 2025 07:59:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M7xkrM031432; Mon, 22 Sep 2025 07:59:46 GMT (envelope-from git) Date: Mon, 22 Sep 2025 07:59:46 GMT Message-Id: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guido Falsi Subject: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: madpilot X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ec13430c583830cc4d29640787e2d154b140e31 Auto-Submitted: auto-generated The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/src/commit/?id=0ec13430c583830cc4d29640787e2d154b140e31 commit 0ec13430c583830cc4d29640787e2d154b140e31 Author: Guido Falsi AuthorDate: 2025-09-22 07:57:39 +0000 Commit: Guido Falsi CommitDate: 2025-09-22 07:59:36 +0000 sys/netinet6: Fix ABI breakage introduced with RFC 7217 support commit 31ec8b6407fdd5a87d70265762457c67ce618283 added a `dad_failures` variable to `struct nd_ifinfo`, which broke the netowrking ABI. This commit fixes it by moving such variable to `struct in6_ifextra` which is not a public interface, while `struct nd_ifinfo` is back in its original state. Thanks to kib, markj and glebious for their help and suggestions in solving this problem. Reported by: "Herbert J. Skuhra" Tested by: "Herbert J. Skuhra" Approved by: glebius Fixes: 31ec8b6407fdd5a87d70265762457c67ce618283 --- sys/netinet6/in6.c | 3 +++ sys/netinet6/in6_ifattach.c | 2 +- sys/netinet6/in6_var.h | 2 ++ sys/netinet6/nd6.c | 4 ---- sys/netinet6/nd6.h | 1 - sys/netinet6/nd6_nbr.c | 6 +++--- sys/netinet6/nd6_rtr.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 4f756a75fac7..8ef755e2dc0a 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2604,6 +2604,8 @@ in6_domifattach(struct ifnet *ifp) COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat, sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK); + ext->dad_failures = counter_u64_alloc(M_WAITOK); + ext->nd_ifinfo = nd6_ifattach(ifp); ext->scope6_id = scope6_ifattach(ifp); ext->lltable = in6_lltattach(ifp); @@ -2639,6 +2641,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) COUNTER_ARRAY_FREE(ext->icmp6_ifstat, sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); free(ext->icmp6_ifstat, M_IFADDR); + counter_u64_free(ext->dad_failures); free(ext, M_IFADDR); } diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 57fe12a1c93b..4fde346fb691 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -377,7 +377,7 @@ in6_get_stableifid(struct ifnet *ifp, struct in6_addr *in6, int prefixlen) } hostuuid_len = strlen(hostuuid); - dad_failures = counter_u64_fetch(ND_IFINFO(ifp)->dad_failures); + dad_failures = counter_u64_fetch(DAD_FAILURES(ifp)); /* * RFC 7217 section 7 diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index e5ab83e6a2a1..e511ead24f08 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -106,9 +106,11 @@ struct in6_ifextra { struct scope6_id *scope6_id; struct lltable *lltable; struct mld_ifsoftc *mld_ifinfo; + counter_u64_t dad_failures; /* DAD failures when using RFC 7217 stable addresses */ }; #define LLTABLE6(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->lltable) +#define DAD_FAILURES(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->dad_failures) #ifdef _KERNEL diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 938d411711f0..00df5efcef92 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -329,8 +329,6 @@ nd6_ifattach(struct ifnet *ifp) nd->flags |= ND6_IFF_STABLEADDR; } - nd->dad_failures = counter_u64_alloc(M_WAITOK); - return nd; } @@ -350,8 +348,6 @@ nd6_ifdetach(struct ifnet *ifp, struct nd_ifinfo *nd) } NET_EPOCH_EXIT(et); - counter_u64_free(nd->dad_failures); - free(nd, M_IP6NDP); } diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 1de2a77ddf6d..5fe027ac5e7c 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -76,7 +76,6 @@ struct nd_ifinfo { u_int8_t randomseed0[8]; /* upper 64 bits of MD5 digest */ u_int8_t randomseed1[8]; /* lower 64 bits (usually the EUI64 IFID) */ u_int8_t randomid[8]; /* current random ID */ - counter_u64_t dad_failures; /* DAD failures when using RFC 7217 stable addresses */ }; #define ND6_IFF_PERFORMNUD 0x1 diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 76b1fd86ee08..cc17b4e1a402 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1473,7 +1473,7 @@ nd6_dad_timer(void *arg) if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) == 0) { ia->ia6_flags &= ~IN6_IFF_TENTATIVE; if ((ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) && !(ia->ia6_flags & IN6_IFF_TEMPORARY)) - counter_u64_zero(ND_IFINFO(ifp)->dad_failures); + counter_u64_zero(DAD_FAILURES(ifp)); } nd6log((LOG_DEBUG, @@ -1522,10 +1522,10 @@ nd6_dad_duplicated(struct ifaddr *ifa, struct dadq *dp) * More addresses will be generated as long as retries are not exhausted. */ if ((ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) && !(ia->ia6_flags & IN6_IFF_TEMPORARY)) { - uint64_t dad_failures = counter_u64_fetch(ND_IFINFO(ifp)->dad_failures); + uint64_t dad_failures = counter_u64_fetch(DAD_FAILURES(ifp)); if (dad_failures <= V_ip6_stableaddr_maxretries) { - counter_u64_add(ND_IFINFO(ifp)->dad_failures, 1); + counter_u64_add(DAD_FAILURES(ifp), 1); /* if retries exhausted, output an informative error message */ if (dad_failures == V_ip6_stableaddr_maxretries) log(LOG_ERR, "%s: manual intervention required, consider disabling \"stableaddr\" on the interface" diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 01623a4506be..78dc55dd292f 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1757,7 +1757,7 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, * to fail and no further retries should happen. */ if (ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR && - counter_u64_fetch(ND_IFINFO(ifp)->dad_failures) <= V_ip6_stableaddr_maxretries && + counter_u64_fetch(DAD_FAILURES(ifp)) <= V_ip6_stableaddr_maxretries && ifa6->ia6_flags & (IN6_IFF_DUPLICATED | IN6_IFF_TEMPORARY)) continue; From nobody Mon Sep 22 08:38:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVc2J01Myz68pC9; Mon, 22 Sep 2025 08:38: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVc2H6Y6Jz3sNR; Mon, 22 Sep 2025 08:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHY7JYjx9HV0S479Tr2vk2gGiblDZf9yHuNBt3cpHsU=; b=tIlQUvpCmeFa0pZP/T2R308NWsofrgHjGWLU+Mm5iwHhJLa2kDcnFdXXuqAvAuZsSAW9ye VFy6aK7HUJChBBwCrWNMV8k09aTY/Inx0B8WwUgdy41LZdzdqnpiSAlCPtVXoDuF/XpHyn VE8i9xa37qI9FxPjGz7mFRw+4CR8NYUpx+dnUg77BDjcfrvOgrhehRWEx4grdphQ3KHnFN DfenRLG9oAO0/kNZfCapVktDBy4Yyzd137fRUlg+zbdBoKHofkfYrE8ZsKcynYfULYQlnw iU/ob0ZGif2H5xiUYTQwafcUxua7R2tfljwYBvUwkSZukRN932VkwXrvshkJ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHY7JYjx9HV0S479Tr2vk2gGiblDZf9yHuNBt3cpHsU=; b=msipV0k+vKbJFyYI3EgaSR+u5MHjeHnX780Fg8CJfZLPZkSvC1Ym8amdMSbQjq/JyqcLH4 fG7OHnjOiMKC7MsA+EA5UtDyBROGzoKFLQdpOUKBUIV+zF+NgIdgW9OmOhR3jmABGtJMJ7 DVFFhkGUY41DYOXsCENlEE1xy0AacFEyhoC4/ms7a66jETH3chtRlcg2mgrQgWF4jTY++K IP7FJDd1bfswtPtR58PbORB+Pf6x5o9UQSnBzxqRes5HHgnGL7+O0u8li9aD2KdyvRjDX/ LxRk6rLB6uWrZ12HovmUg0fW45QP2bB0XiKyMQmHCXmiGgSDQQgT40yfE+CQRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758530295; a=rsa-sha256; cv=none; b=yvHsoKkA4WD+wbp3+dKA8vEBCuGXIG/y1RcaTJYHG3iGA5KkwV93U6D1+ohv+x6BtBiyX7 C+CvCZl9qS1dE9GZNFzGmin9dCZKrTD8ZuiYAAAAa7pI/A6k7bYFGKbhlOCFhpi5EzuqAT EX1qY+rSCIsuUwo2yLbVKM74vJe7jZgSJIW1IpDXFW+RzsMPh/uiPbBWp/ov46WqptIn3+ Fy0hJaJLj70trfMkM2YsJF19fAc9yXuuPMjmiwRolF+TIzTq6fTGZKHMwnkjagvW4BokFD MiTe5sGdmTynqmghdtiO3sxRkZaLR78YDmpsLV7wI0vpziLj5s/QoTsEFlUvfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVc2H5PXZzsxr; Mon, 22 Sep 2025 08:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M8cFvc006080; Mon, 22 Sep 2025 08:38:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M8cFGA006077; Mon, 22 Sep 2025 08:38:15 GMT (envelope-from git) Date: Mon, 22 Sep 2025 08:38:15 GMT Message-Id: <202509220838.58M8cFGA006077@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: 8f496952e3e6 - main - iichid(4): Always use wMaxInputLength bytes as input report length List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f496952e3e6cdd531675a44b84b3f1954532afb Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=8f496952e3e6cdd531675a44b84b3f1954532afb commit 8f496952e3e6cdd531675a44b84b3f1954532afb Author: Vladimir Kondratyev AuthorDate: 2025-09-22 08:37:19 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-09-22 08:37:19 +0000 iichid(4): Always use wMaxInputLength bytes as input report length Lower values may result in non-acknowledged interrupts. E.g. ITE5570 device found in ASUS TUF. Greater values may result in read failures. E.g. GXTP7863 device found on MateBookPro 2023. Investigated by: huanghwh@gmail.com PR: 289353 MFC after: 1 week fixes: 36027361f9cf ("iichid: Stop using split I²C bus transactions") --- sys/dev/iicbus/iichid.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index fdb4816b8bd9..6d95d6d2d4f8 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -816,12 +816,13 @@ iichid_intr_setup(device_t dev, device_t child __unused, hid_intr_t intr, sc = device_get_softc(dev); /* - * Do not rely just on wMaxInputLength, as some devices (which?) - * may set it to a wrong length. Also find the longest input report - * in report descriptor, and add two for the length field. + * Start with wMaxInputLength to follow HID-over-I2C specs. Than if + * semi-HID device like ietp(4) requested changing of input buffer + * size with report descriptor overloading, find the longest input + * report in the descriptor, and add two for the length field. */ - rdesc->rdsize = 2 + - MAX(rdesc->isize, le16toh(sc->desc.wMaxInputLength)); + rdesc->rdsize = rdesc->rdsize == 0 ? + le16toh(sc->desc.wMaxInputLength) : rdesc->isize + 2; /* Write and get/set_report sizes are limited by I2C-HID protocol. */ rdesc->grsize = rdesc->srsize = IICHID_SIZE_MAX; rdesc->wrsize = IICHID_SIZE_MAX; From nobody Mon Sep 22 08:38:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVc2K0HMSz68pFP; Mon, 22 Sep 2025 08:38: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVc2J6lLdz3sbr; Mon, 22 Sep 2025 08:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ff7rHXnzfk6BIWbo2kAF/GwKLLN3quFS9iBMaZPKlls=; b=fuWzgMCNPRvnw19TuK/qiYHt7DZRGaEYPRdZp7iUR4n6nQVLneqbyTqaTGkXxwld3798Z9 raWaC2z6rB8kf5TsPHuXdIbpcClL//LJv3Fv1fjgrvbUYB4Y2ExdM3bw8xQMr/cAvDNF0j Ho88lxq+wj711XDiu5ctRZodzwUNyds4Elsm+BqEgDoG9WiingrJFWqcvEd9WIm7gk2saA Th79sZr2zWCkwKuVvJ/AXp5wk2bea0y36RdHfdl1xuXeIbvhSJMFiScF7zthpNmMWwDfaA vDuccR8rS61dqMTr1TpvLogsuEiRsCZiSk8BYBPwlMdoiWGvZTAbbIocj4czcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ff7rHXnzfk6BIWbo2kAF/GwKLLN3quFS9iBMaZPKlls=; b=YVJBYKI9kvZvnb8I97BqNtPqiUf/ttL7dFZPNDHd2lvupDfx8br4JAFRJzpGTki3zb9NfI UIHZoIu4oUIxBS00s7JoNxOeMt/9xWPb/bkHlirIv5iUDuiLMH/3IkLpyXPSTQmGUh1z6J S+0PF9f9hZbiLgL5H98Jmwo9z0BQfKUjxrD/r0QbthWxq76vZaeJj2z4oTkdycpm9fBrCj LJEoJcdtCTu12EQ2uEDVr98vQ0OK5Nih6YhlQQxkxCh8wFrQpuaJFFT0pHA1JKplM4NH4O YIJ2UmzQBOpAS7XZvyVpD9iysQ/CX9e37YSI3Gp8++/ylPrOzW2Zncdl1fXeUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758530297; a=rsa-sha256; cv=none; b=OGSYxc4E00sPjL5X7QN7rBV4b4oHK2rKkv7ixBsO6vSDIFsfuKxjoFlgCAZ9sIwANatBb0 fwWWB8O19MYxTZq4vZO6BkdZPG7nT392T/Hg1Vzha4YfCGy2E4dEuQbYpQNpCTqGxqGVH2 F27s29cmWI5jeO+/wr3bJdKfAnLmGOZQMXmlzQxZb0cKvt70jx5NklgaHuemmcGwvwmBnP 9bCM23D+3u756Qr16kdgcu6txYHgslM1QUg7QGF2fhHGogRMKuurCJ5pLWnIySzRQ0pM1h Aj6vSB9AQKL10bpZCgWYX1zPy2GZ1OVzI7Ufg5FMrsoHapGM+/6Ctjrz4z6ISA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVc2J6CByzsxs; Mon, 22 Sep 2025 08:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M8cGRF006116; Mon, 22 Sep 2025 08:38:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M8cG9E006113; Mon, 22 Sep 2025 08:38:16 GMT (envelope-from git) Date: Mon, 22 Sep 2025 08:38:16 GMT Message-Id: <202509220838.58M8cG9E006113@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: a9227954b0f0 - main - ietp(4): Always overload HID report descriptor List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9227954b0f01e950cc51d744af27585778ddf84 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a9227954b0f01e950cc51d744af27585778ddf84 commit a9227954b0f01e950cc51d744af27585778ddf84 Author: Vladimir Kondratyev AuthorDate: 2025-09-22 08:37:19 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-09-22 08:37:19 +0000 ietp(4): Always overload HID report descriptor It is required since "iichid(4): Always use wMaxInputLength bytes as input report length" commit. MFC after: 1 week --- sys/dev/hid/ietp.c | 55 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/sys/dev/hid/ietp.c b/sys/dev/hid/ietp.c index 73a5cb7414d4..a9d0295fb121 100644 --- a/sys/dev/hid/ietp.c +++ b/sys/dev/hid/ietp.c @@ -199,17 +199,32 @@ static const struct hid_device_id ietp_iic_devs[] = { IETP_IIC_DEV("ELAN1000"), }; -static uint8_t const ietp_dummy_rdesc[] = { +static uint8_t const ietp_dummy_rdesc_lo[] = { 0x05, HUP_GENERIC_DESKTOP, /* Usage Page (Generic Desktop Ctrls) */ 0x09, HUG_MOUSE, /* Usage (Mouse) */ 0xA1, 0x01, /* Collection (Application) */ 0x09, 0x01, /* Usage (0x01) */ + 0x15, 0x00, /* Logical Minimum (0) */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ 0x95, IETP_REPORT_LEN_LO, /* Report Count (IETP_REPORT_LEN_LO) */ 0x75, 0x08, /* Report Size (8) */ 0x81, 0x02, /* Input (Data,Var,Abs) */ 0xC0, /* End Collection */ }; +static uint8_t const ietp_dummy_rdesc_hi[] = { + 0x05, HUP_GENERIC_DESKTOP, /* Usage Page (Generic Desktop Ctrls) */ + 0x09, HUG_MOUSE, /* Usage (Mouse) */ + 0xA1, 0x01, /* Collection (Application) */ + 0x09, 0x01, /* Usage (0x01) */ + 0x15, 0x00, /* Logical Minimum (0) */ + 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ + 0x95, IETP_REPORT_LEN_HI, /* Report Count (IETP_REPORT_LEN_HI) */ + 0x75, 0x08, /* Report Size (8) */ + 0x81, 0x02, /* Input (Data,Var,Abs) */ + 0xC0, /* End Collection */ +}; + static const struct evdev_methods ietp_evdev_methods = { .ev_open = &ietp_ev_open, .ev_close = &ietp_ev_close, @@ -433,28 +448,38 @@ ietp_res2dpmm(uint8_t res, bool hi_precision) static void ietp_iic_identify(driver_t *driver, device_t parent) { - void *d_ptr; - hid_size_t d_len; - int isize; - uint8_t iid; + device_t iichid = device_get_parent(parent); + static const uint16_t reg = IETP_PATTERN; + uint16_t addr = iicbus_get_addr(iichid) << 1; + uint8_t resp[2]; + uint8_t cmd[2] = { reg & 0xff, (reg >> 8) & 0xff }; + struct iic_msg msgs[2] = { + { addr, IIC_M_WR | IIC_M_NOSTOP, sizeof(cmd), cmd }, + { addr, IIC_M_RD, sizeof(resp), resp }, + }; + struct iic_rdwr_data ird = { msgs, nitems(msgs) }; + uint8_t pattern; if (HIDBUS_LOOKUP_ID(parent, ietp_iic_devs) == NULL) return; - if (hid_get_report_descr(parent, &d_ptr, &d_len) != 0) + + if (device_get_devclass(iichid) != devclass_find("iichid")) return; - /* - * Some Elantech trackpads have a mangled HID report descriptor, which - * reads as having an incorrect input size (i.e. < IETP_REPORT_LEN_LO). - * If the input size is incorrect, load a dummy report descriptor. - */ + DPRINTF("Read reg 0x%04x with size %zu\n", reg, sizeof(resp)); - isize = hid_report_size_max(d_ptr, d_len, hid_input, &iid); - if (isize >= IETP_REPORT_LEN_LO) + if (hid_ioctl(parent, I2CRDWR, (uintptr_t)&ird) != 0) return; - hid_set_report_descr(parent, ietp_dummy_rdesc, - sizeof(ietp_dummy_rdesc)); + DPRINTF("Response: %*D\n", (int)size(resp), resp, " "); + + pattern = (resp[0] == 0xFF && resp[1] == 0xFF) ? 0 : resp[1]; + if (pattern >= 0x02) + hid_set_report_descr(parent, ietp_dummy_rdesc_hi, + sizeof(ietp_dummy_rdesc_hi)); + else + hid_set_report_descr(parent, ietp_dummy_rdesc_lo, + sizeof(ietp_dummy_rdesc_lo)); } static int From nobody Mon Sep 22 08:38:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVc2L23g3z68npw; Mon, 22 Sep 2025 08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVc2L1BvZz3sTB; Mon, 22 Sep 2025 08:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Yq4+cKd0qnfLWMoMENv3DBZbAk/aquwnu3Hn1IWX6g=; b=rIRcwR3rsmStc4a5JPvK0EJ1ipvgYYR4ERcHxUakO8MTMWz5kaOrsHq/UI67FfWq2eH06t bAR8rDn/2JU8TdPeOjD+x5tFF0MXgoosWv/JudVBrxqCrP5RoCT4++DdZOKk5TgOT2TLav CPP/ovoyLx2AIsqWSIE0kngwRab/AR5tqu7TAuOL5nUzxMT3f9PjqJrWXWT9SiGXXpvo6y FCq1aQ+Fvidw1slt9AH34B0a6/toHgXDVluMrIS9GsHxgVKxL45srKwNmeFLYGFJa5XGai DHGOVW+FHZ3MuBzEHJGf8Y0ShZW5zneqZv8MFEyETdbEPTpX5reDvTx9FV0Iig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Yq4+cKd0qnfLWMoMENv3DBZbAk/aquwnu3Hn1IWX6g=; b=kFhUKrrmw7jq4cEGTIQhmbCqeKoFgLUWpgVN24cAP5787EjqlgWOG7p6sXyXB7D5RTPguL pm08aVZt3gIuKNFDzFtkaj6vEpoe602/IL0Ex7IP4fInHiiyi50Sj9kQ3S85O8OZi0Iz8j yLG16bc55ha2BK6cLaHJ+0UweQJBJavSBkkWEY0mTEwKOc/1ROsPGsK2+9GCEpWT95YffO pe48lOvIRO5NgG7m8ClJgDdXdS8OK6tJf/OU+fJ3zaVxkWcGpXOCNc0tYIqWMeF7hVsn7l VPPokI9koxWP8pLlChwnhAM9J/5DOCI6YqzN69GNcMWJFL1Exf95VcQodZF1Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758530298; a=rsa-sha256; cv=none; b=AkyM6wE3SjZt2PVN4F89IEHz204rI4rnxLnDwdctNh5HoXQadtyPj/zcdPmNVX688wRwM9 OGJUVlaagVOzJhTj0RxXTBUsuhhqzj38yjRe3NQku1XGrVeIlqwO4PQabL4UXhAtmiOzb2 C4saWx02PK1jyN4Wey71wqjuSl8cqmFO+b2v32lT0xTAJ/6Ott7xcMbUVIh2Bs/ZYM/mNJ voxfstS/Ywf7OU7J4ykRMr0DfUUFEzUkLpCtdey5bBZAhcxmpYQ/xSBm1IXblz2LDtWzpo 2meAzAz5R9V4fxBKsX9oB5JAXpsuLVIr/Wh/qYtg7tDvC32EhDmYnY3JBKZ17A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVc2K6vMKzslr; Mon, 22 Sep 2025 08:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M8cHSw006151; Mon, 22 Sep 2025 08:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M8cH5S006148; Mon, 22 Sep 2025 08:38:17 GMT (envelope-from git) Date: Mon, 22 Sep 2025 08:38:17 GMT Message-Id: <202509220838.58M8cH5S006148@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: 1e74951b6cd8 - main - iichid(4): Do not add 2 leading "length" bytes to input report length List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e74951b6cd8132ae417177336b7180e174a5e3f Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=1e74951b6cd8132ae417177336b7180e174a5e3f commit 1e74951b6cd8132ae417177336b7180e174a5e3f Author: Vladimir Kondratyev AuthorDate: 2025-09-22 08:37:20 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-09-22 08:37:20 +0000 iichid(4): Do not add 2 leading "length" bytes to input report length MFC after: 1 week fixes: 36027361f9cf ("iichid: Stop using split I²C bus transactions") --- sys/dev/iicbus/iichid.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 6d95d6d2d4f8..5ca3f1b84e48 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -540,7 +540,7 @@ iichid_sampling_task(void *context, int pending) error = iichid_cmd_read(sc, sc->intr_buf, sc->intr_bufsize, &actual); if (error == 0) { if (actual > 0) { - sc->intr_handler(sc->intr_ctx, sc->intr_buf + 2, actual); + sc->intr_handler(sc->intr_ctx, sc->intr_buf + 2, actual - 2); sc->missing_samples = 0; if (sc->dup_size != actual || memcmp(sc->dup_buf, sc->intr_buf, actual) != 0) { @@ -607,7 +607,7 @@ iichid_intr(void *context) if (sc->power_on && sc->open) { if (actual != 0) sc->intr_handler(sc->intr_ctx, sc->intr_buf + 2, - actual); + actual - 2); else DPRINTF(sc, "no data received\n"); } @@ -822,7 +822,7 @@ iichid_intr_setup(device_t dev, device_t child __unused, hid_intr_t intr, * report in the descriptor, and add two for the length field. */ rdesc->rdsize = rdesc->rdsize == 0 ? - le16toh(sc->desc.wMaxInputLength) : rdesc->isize + 2; + le16toh(sc->desc.wMaxInputLength) - 2 : rdesc->isize; /* Write and get/set_report sizes are limited by I2C-HID protocol. */ rdesc->grsize = rdesc->srsize = IICHID_SIZE_MAX; rdesc->wrsize = IICHID_SIZE_MAX; @@ -832,7 +832,7 @@ iichid_intr_setup(device_t dev, device_t child __unused, hid_intr_t intr, sc->intr_handler = intr; sc->intr_ctx = context; - sc->intr_bufsize = rdesc->rdsize; + sc->intr_bufsize = rdesc->rdsize + 2; sc->intr_buf = realloc(sc->intr_buf, sc->intr_bufsize, M_DEVBUF, M_WAITOK | M_ZERO); #ifdef IICHID_SAMPLING @@ -1094,7 +1094,8 @@ iichid_probe(device_t dev) } if (le16toh(sc->desc.wHIDDescLength) != 30 || - le16toh(sc->desc.bcdVersion) != 0x100) { + le16toh(sc->desc.bcdVersion) != 0x100 || + le16toh(sc->desc.wMaxInputLength) < 2) { DPRINTF(sc, "HID descriptor is broken\n"); return (ENXIO); } From nobody Mon Sep 22 08:41:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVc5r4sqrz68nwB; Mon, 22 Sep 2025 08:41:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVc5r48HNz3tdh; Mon, 22 Sep 2025 08:41:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8m2BGL/L3jrh1QfOvtfW1KXFfxnFUVSdOocHbtijljM=; b=ni9ISaZXoRcCp36FX/5zAbGqw7ZRI1pPpqYybYRA55ZWGK3mPu4UV9JyDklPFbzLH/YVhL mdW+KA+viDes5OEyQkjtJYygt1Ep1AFr9m9ENEscsTTPKIafSsEhnoZrJRl3WSvj5lp9g+ WDT8p+rdJX0KXBzsp/IRaT0uRDlyq20DIz/d8tqOcT6A+MoFcwI1ygePgh/g5mj6GVp6a/ GRxcQBG/sk0YlXhlEcGHi/vnv93lP+efLasRS2i/QAZb5+h51r6n0TPG9o6yeeS0ZOCvsw KxcmwJxfOnEs6w5mmFk1/0k4IOgi+6DFPQVYSejznoyWzRcGO0kl7Nwa1D7PhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530480; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8m2BGL/L3jrh1QfOvtfW1KXFfxnFUVSdOocHbtijljM=; b=pdksjgwia7tQWSygkhMmzsR8eRSEx7nYsPy27XmOAnsJESM4A8qO/F7Rb1MIwrckTUReuS AUxk6ukjsyFU8m3Vu858tkWq+Fx42esbU4bE6D2K2kDMXy3FSAiuzBLZLiip05rc2iKAbx ubDQxehe+iee48xT1WmZL5yieybyftlvol8A9HwqRmbzLeSY4nCqY7wfMgAv2HRA61Wjoz s+mg0fEfojp3ZoOZ+sx3t2NnuEaAj8WbSziK6PF/AywhgCRRodab6aVunulESrdzRM/eJ5 7he9i9NZabfl7QIIlGlnsceOjD3blPhA5x0wgrGl9RnQG0CwJbMgxfrXZPHTAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758530480; a=rsa-sha256; cv=none; b=mkgOooPtQ8GszRVb9P7Qnn1nKExcShIwTEAczR9FqWJexSQnfNbDS+FRhLebqXXjPeqXGC JHybgyVlmbrYVg2J2ZkDAQf8uSU7Lx7kHxfsNEGyzs0+eXA09HykE7Esl6U9wX9jgCcDRn qxTYyJ4c+4v/pPjDzm96zrSV/hnyI2ipySZgNFwF+rf7ydvi8ky7qYv9qclvlpuA+0GKsL NICFd/SG7kHkqpH8yKllX8+srWVLCU3pYId5tkPUPiQI+a4DyXc8NHMJqm5S+VwYBMIjC4 +1eoJa1+jIiUcqv4JfxoCvvybsRFWFPClNuBdMd7M1W3WTo4f04gral0N8SphQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.255.53.30] (nat-184-221.net.cam.ac.uk [131.111.184.221]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVc5r0PxJzlmQ; Mon, 22 Sep 2025 08:41:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> Date: Mon, 22 Sep 2025 09:41:18 +0100 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL Content-Language: en-US To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/19/25 10:19, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=40a42785dbba93cc5196178fc49d340c1a89cabe > > commit 40a42785dbba93cc5196178fc49d340c1a89cabe > Author: Konstantin Belousov > AuthorDate: 2025-09-11 10:05:04 +0000 > Commit: Konstantin Belousov > CommitDate: 2025-09-19 14:19:13 +0000 > > fcntl(F_SETFL): only allow one thread to perform F_SETFL > > Use f_vflags file locking for this. > Allowing more than one thread handling F_SETFL might cause de-sync > between real driver state and flags. > > Reviewed by: markj > Tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > Differential revision: https://reviews.freebsd.org/D52487 Thanks for fixing this. I still slightly worry that "home-grown" locks aren't visible to WITNESS and it's checking. I was also expecting this to require more changes, but apparently if a process directly invokes FIONBIO on a file descriptor, f_flags isn't updated currently. I wonder if that is a bug. (Similarly for FIOASYNC.) Oh, we do handle that, but poorly. We don't revert on errors, and this should be updated to use fsetfl_lock now I think: kern_ioctl(...) { ... switch (com) { ... case FIONBIO: if ((tmp = *(int *)data)) atomic_set_int(&fp->f_flag, FNONBLOCK); else atomic_clear_int(&fp->f_flag, FNONBLOCK); data = (void *)&tmp; break; case FIOASYNC: if ((tmp = *(int *)data)) atomic_set_int(&fp->f_flag, FASYNC); else atomic_clear_int(&fp->f_flag, FASYNC); data = (void *)&tmp; break; } error = fo_ioctl(fp, com, data, td->td_ucred, td); out: I think instead we want something like: int f_flag; switch (com) { ... case FIONBIO: case FIOASYNC: fsetfl_lock(fp); tmp = *(int *)data; f_flag = com == FIONBIO ? FNONBLOCK : FASYNC; if ((fp->f_flag & f_flag) != 0) { fsetfl_unlock(fp); goto out; } data = (void *)&tmp; break; } error = fo_ioctl(fp, com, data, td->td_ucred, td); switch (com) { ... case FIONBIO: case FIOASYNC: if (error == 0) { if (tmp) atomic_set_int(&fp->f_flag, f_flag); else atomic_clear_int(&fp->f_flag, f_flag); } fsetfl_unlock(fp); break; } out: This only updates the flag if the underlying ioctl succeeds, and it also avoids invoking the underlying ioctl if the flag is already in the correct\ state. -- John Baldwin From nobody Mon Sep 22 08:44:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVc9t4RM2z68pLk; Mon, 22 Sep 2025 08:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVc9t2FwKz3ts0; Mon, 22 Sep 2025 08:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqWsx3Z71xkHVw0xcZtIJux+QqjmHx3vLwSaA5rfJAQ=; b=rgf1dWX/9ZUZ7Vw1klxwj1UW5WPfZt37XAJk/7OqOLrWSYVrtm3AwgnAWhGyd1ZKTOchX5 8f+kfZ2wtIQvFjE4zt31BbrEiya2AC18Oae0Q5FDW1pSABECLSRaWxmIdXVUJDfStoHteO +Zz0iBAbc+MEW/yM9eLEOVwvH2kEVo2jzvDlcMhVrPzMGQIndDz1ER0iMRxYZrA/icHTzc XPxxFU9A2HIodHHnnXf2zqWBhSBONyM12xn1bhDA/XqnO840rls8SeH6tKhDK88FUbb5dD CzT6f4QEFTyVztP+9a/DzpBpNaNPxsDGgwi3pGiHG3Vzxm6H1gz3FCSNwhn+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758530690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqWsx3Z71xkHVw0xcZtIJux+QqjmHx3vLwSaA5rfJAQ=; b=oz20IyY/Y0AR6Qb4LtREE+JCtHvQYQn/OmrcaBmc8/q3LXUd2cACWWlULNiORM+G983ZeM Y9dud6ryMdV8Ocz0eGCfUuUl0wNlqpa8p4Vjv8geyZA4wLtVVeZM1kVbnkBiMP0NqcbqLs feFEJVsmXCufj4vIvZbIRcD3DgCvKAj85j9qJyeA0UlkNvYd9E/oqIWIuAdx1NWcDqQiGN W6aABUnhXBv5hYzOXO2S2k+z9u5r+7X8aIO2WoOGfSa+jDHCUqRl9m2FEBMLSSYoy5L0tX m1gCW2geLFhkpQCKZH2AShCRbQaYarfqFo8tDuyJ/g5+VvoZXaB8x58KPD2Faw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758530690; a=rsa-sha256; cv=none; b=FUb/VLmjnu0KqjWbHwvzQBBIyp/0oG0ns3jex+ETgP53Q1P6kJglIWjXks3dJBv1a/CraY 9K4P9cm5CFEsf9bFjZphxQ1MNIc2BchRbUgBoVTnxA+GZA82+R680Rh/8awE+Qv+LIjcVt bzYAGqDbbjGomqzfIKbUi8GWZAM1VlPfVj01XU6evtc9z1+sg0v1JTUCRpS3FBx0WDv6pH vQGjhEV9Rehf7ZuYyZxaurTZSgWhrswBTZRB43NSdFJqB3eizgZ5It4hDhFIMTb6bn+axe 21kfEGYkO0mVFmDvd1lF4in7ZA5vz6TFu2Q8HeEBS6a1qnjEbJVF6mvqbUNDqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVc9t1Yzrzt3W; Mon, 22 Sep 2025 08:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58M8iotB024096; Mon, 22 Sep 2025 08:44:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58M8ioci024093; Mon, 22 Sep 2025 08:44:50 GMT (envelope-from git) Date: Mon, 22 Sep 2025 08:44:50 GMT Message-Id: <202509220844.58M8ioci024093@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: ff6abfec807e - main - pipe: sort out ino commentary on failed pipe creation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff6abfec807e31301e3bf9c0df14a22bb6bc3443 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ff6abfec807e31301e3bf9c0df14a22bb6bc3443 commit ff6abfec807e31301e3bf9c0df14a22bb6bc3443 Author: Mateusz Guzik AuthorDate: 2025-09-22 08:37:50 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-22 08:44:46 +0000 pipe: sort out ino commentary on failed pipe creation Implements pipe_destroy as a counterpart to pipe_create, no functional changes. Arguably code could be refactored so that ino allocation only happens after bufs are allocated. --- sys/kern/sys_pipe.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index ed651da96b14..30527fdd4fd0 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -234,6 +234,7 @@ static void pipeinit(void *dummy __unused); static void pipeclose(struct pipe *cpipe); static void pipe_free_kmem(struct pipe *cpipe); static int pipe_create(struct pipe *pipe, bool backing); +static void pipe_destroy(struct pipe *pipe); static int pipe_paircreate(struct thread *td, struct pipepair **p_pp); static __inline int pipelock(struct pipe *cpipe, bool catch); static __inline void pipeunlock(struct pipe *cpipe); @@ -399,16 +400,7 @@ pipe_paircreate(struct thread *td, struct pipepair **p_pp) goto fail; error = pipe_create(wpipe, false); if (error != 0) { - /* - * This cleanup leaves the pipe inode number for rpipe - * still allocated, but never used. We do not free - * inode numbers for opened pipes, which is required - * for correctness because numbers must be unique. - * But also it avoids any memory use by the unr - * allocator, so stashing away the transient inode - * number is reasonable. - */ - pipe_free_kmem(rpipe); + pipe_destroy(rpipe); goto fail; } @@ -743,6 +735,16 @@ pipe_create(struct pipe *pipe, bool large_backing) return (error); } +static void +pipe_destroy(struct pipe *pipe) +{ + pipe_free_kmem(pipe); + /* + * Note: we "leak" pipe_ino -- by design the alloc_unr64 mechanism does + * not undo allocations. + */ +} + /* ARGSUSED */ static int pipe_read(struct file *fp, struct uio *uio, struct ucred *active_cred, From nobody Mon Sep 22 08:50:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVcJ26R5xz68pmy; Mon, 22 Sep 2025 08:50:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVcJ25n0Tz3vZG; Mon, 22 Sep 2025 08:50:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758531010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Rlu9wAz+YriA/eAjJvZDDQGHjH37ZDWcFNTPwdYIg8=; b=MERDp5/8kZyYRXXCscBCgxMyXuFSo/xUIfoS3NC724QrpSol2ah+WLrshC2B/91TLKnjCr 4x1sjDnujuaYZVabqjo29R86cmeEMveOiT2pKCqZdDBNCQXYNQrcNzCoioNQqBua0M0jrZ zgRAHrqsfynfcmjiF7RoIS0PEMCSdJS5NgDEJAP+PKJrJ4/od07A/y5Vt+OCry+HoK6Vgu UBBwWj1Fg9stiAJIbreMebodbH9zfmKgEaEEZ8qIOmBH8i3rZkUfEnthzlKVMMZxD4x0Cd CNuNLDaBB8wpDcY9kyZ+6WlFSJHJ0dVa+q0YfYPqjSdasTTgp29erKclTKwQ7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758531010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4Rlu9wAz+YriA/eAjJvZDDQGHjH37ZDWcFNTPwdYIg8=; b=J4Ghzd40V6RdUez/bO7NgqPe7hVYfSRKdHk4hBZV53YUs2MHyCyvlUomZNy+BDRvojY5gT H6W5MkD3ORn+g5Sv5NXLBJyDzi1gZM0k7F7aeBpOcG3reUlSw/2CWn0pt4VjyQ3OW9UHFb IFJ5bg+t5tS2+Yx8V3eW86nfqLBrKce3u1BAb7HWFp+VkfHU70ArpBizNS5rZr21HKY+QR TfHL7VN46s/42oWwdAoDqaDiGLEmAIRnJB58ddRTWmb5qhFPoDNvhSybWx1yPYGnz7cys9 eecvEns92vc2lxtOsM9gYlbpCDxqpSUMhMlKMnm6x2J5myaiBadHrsupyYAWKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758531010; a=rsa-sha256; cv=none; b=uQBeaBuYcrDH6AaSTJTGaaIMk+NpNzBHVmGEY1wv+bpzVpZ9yxsEw82IeOAyqOS1lctUVI rwkQtOuvlQN9d+BymNqlqSTryZcv0tMB8wjyk/Mucm/XIKY/0plMeOHvqG7nxDgk2sh5rg 3eKWki6fM0cVc/LXeqTNbvBSuoGe7lU+yBqcrftssfT6gGwwdpZ6lyaxun4sv5pKVWYVAQ iwz35AT3mhMP4VwmhwbZeYIciw3Ma7lKdaDS0SyY2yp/hJcwp1cqDYys51Uwi56NcMs2Dz sakYBXshLkxDeh89PbrTZ/BmzYgPgn0L/ndKcKyjBRBE2UYFVuYIAYRSbYaKRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.255.53.30] (nat-184-221.net.cam.ac.uk [131.111.184.221]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVcJ21yl3zl04; Mon, 22 Sep 2025 08:50:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <02323a46-fb47-444b-812a-1ec199a654d1@FreeBSD.org> Date: Mon, 22 Sep 2025 09:50:09 +0100 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL Content-Language: en-US From: John Baldwin To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> In-Reply-To: <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/22/25 04:41, John Baldwin wrote: > On 9/19/25 10:19, Konstantin Belousov wrote: >> The branch main has been updated by kib: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=40a42785dbba93cc5196178fc49d340c1a89cabe >> >> commit 40a42785dbba93cc5196178fc49d340c1a89cabe >> Author: Konstantin Belousov >> AuthorDate: 2025-09-11 10:05:04 +0000 >> Commit: Konstantin Belousov >> CommitDate: 2025-09-19 14:19:13 +0000 >> >> fcntl(F_SETFL): only allow one thread to perform F_SETFL >> >> Use f_vflags file locking for this. >> Allowing more than one thread handling F_SETFL might cause de-sync >> between real driver state and flags. >> >> Reviewed by: markj >> Tested by: pho >> Sponsored by: The FreeBSD Foundation >> MFC after: 2 weeks >> Differential revision: https://reviews.freebsd.org/D52487 > > Thanks for fixing this. I still slightly worry that "home-grown" locks > aren't visible to WITNESS and it's checking. > > I was also expecting this to require more changes, but apparently if a > process directly invokes FIONBIO on a file descriptor, f_flags isn't > updated currently. I wonder if that is a bug. (Similarly for FIOASYNC.) > > Oh, we do handle that, but poorly. We don't revert on errors, and this > should be updated to use fsetfl_lock now I think: > > kern_ioctl(...) > { > ... > switch (com) { > ... > case FIONBIO: > if ((tmp = *(int *)data)) > atomic_set_int(&fp->f_flag, FNONBLOCK); > else > atomic_clear_int(&fp->f_flag, FNONBLOCK); > data = (void *)&tmp; > break; > case FIOASYNC: > if ((tmp = *(int *)data)) > atomic_set_int(&fp->f_flag, FASYNC); > else > atomic_clear_int(&fp->f_flag, FASYNC); > data = (void *)&tmp; > break; > } > > error = fo_ioctl(fp, com, data, td->td_ucred, td); > out: > > I think instead we want something like: > > int f_flag; > > switch (com) { > ... > case FIONBIO: > case FIOASYNC: > fsetfl_lock(fp); > tmp = *(int *)data; > f_flag = com == FIONBIO ? FNONBLOCK : FASYNC; > if ((fp->f_flag & f_flag) != 0) { This is wrong, should be: if (((fp->f_flag & f_flag) != 0) == (tmp != 0)) > fsetfl_unlock(fp); > goto out; > } > data = (void *)&tmp; > break; > } > > error = fo_ioctl(fp, com, data, td->td_ucred, td); > switch (com) { > ... > case FIONBIO: > case FIOASYNC: > if (error == 0) { > if (tmp) Probably 'if (tmp != 0)' > atomic_set_int(&fp->f_flag, f_flag); > else > atomic_clear_int(&fp->f_flag, f_flag); > } > fsetfl_unlock(fp); > break; > } > > out: > > This only updates the flag if the underlying ioctl succeeds, and it also > avoids invoking the underlying ioctl if the flag is already in the correct\ > state. > -- John Baldwin From nobody Mon Sep 22 08:54:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVcPM6Sg0z68pmC for ; Mon, 22 Sep 2025 08:54:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVcPM3DvNz3wX8 for ; Mon, 22 Sep 2025 08:54:47 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-b2e0513433bso48918066b.1 for ; Mon, 22 Sep 2025 01:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758531280; x=1759136080; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=p4nsIok/texjVZyDKIwsui8pDc4nNAsb0gGNGIaqlh8=; b=meKx8M8ZEC4xWIol7R8Enj3E5DQ5C4zMNZ73317/mTp8W7g29PiaLHtYcPZfjvdbVj wGGAFQcsYyFfO39eiQ6fr3ex9s29dy2LZV74SUm/N+6R25CJNoJX6nbHS+o3ObDRZDTx +G4lX1tuL7+35GFyxcMr5tLuIcL+P31LCHgmvuRgjBwZi1fJlyvC3ZwcH8aduk6XBnTe sV3XB7E4mok6tfkwOkMJSBhTIiwjWrxyNuZ5oqXJNKlE7lXjv62gsjqRlbmrJkLsaEz+ hS9anEWWJ63uevLhOlgR7QbQUSH6u2kxpqdTJvndeJ05YEwBPWDip2ZC/48iCVcxuJeW lvGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758531280; x=1759136080; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p4nsIok/texjVZyDKIwsui8pDc4nNAsb0gGNGIaqlh8=; b=KnQh5/wv1acrgLsUO7avU8PTxX8nldftwjXwVQpynaLcki4bv1abEUxW9Wa4tIazzv 28m3HUgqbzvggh7PPstoGU/3NaM+l3u/DY8IkBBosWP0nnp+WcGhbZk23bJ8E54gibFb 8C8iCa2pIKStCRpdZvaBK9ZDjk0lHnw/pg03L8cc8kB9MiaHLvlN/jNteNKUEfbN7zpP P+r7Xu6wF4ddcfdOnOft5rIq6cmbq1kSDwYLZriFAvSoKJJ3ddeiDH4p8dDzRN4LxBCu L7efCaDSpQx7m0IUAvNRPUwzjulZ0evVzAYLAzFk/P+cpdKK6Dy9a+9uKvFUwrliyTt7 zFFA== X-Forwarded-Encrypted: i=1; AJvYcCWNuw0eD7kbxA6iLCVvnXV4BObcnToUEBAoioInXFUqxbRK7htpL5jh/PUpBXlZwYNIZ4GcwNlasYurnJe1jQdfld5DLA==@freebsd.org X-Gm-Message-State: AOJu0YxiITD5ONO3HAwkyGjNPDHFPlqkoWN24GTONp+85iGZwSneQf+b kR/57MrHi4bgiotuM8IyxR0spDmEJobGF2++tBarBKvCxCGZcLVDjFvjVcDAgkx6P3493udjGLu PU0XiGLEzM9wvkIAaKoG3++tf9/VvVJ4= X-Gm-Gg: ASbGnctQzwdwcvOQIVRGsZ+CLy/ykLOfBB+IB4jikRVzpabZbL5K/pLljzLXAyR21rh TNXP7DWCB+7Q8OjNdW7kiMbFjSYAEe6R90HHl2mu0g4eyZHewYEsVlolQchfGsQP0q8ALCI48G+ 3peZHYQN7z24vMMHF2aNbaRFSnWneLe/QYiJSz8V8om/e5p8vXFROnSNYneyGQRT2MPywGAxHJw lqQrxFkP/XdcRm9eCbuSXNt26At8XYsUDR0ZYC2DgngDrrm X-Google-Smtp-Source: AGHT+IGs2Kba6uislMugWdzsWyTUqJ93MfB3LJAQULBZ+2udlswtI9alNwimutwRWRj4y8IElxMhZ4e4XnJRyD0UTeY= X-Received: by 2002:a17:907:72c1:b0:b04:83af:b4ba with SMTP id a640c23a62f3a-b24f4cd16bcmr1202389366b.52.1758531279883; Mon, 22 Sep 2025 01:54:39 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> In-Reply-To: <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> From: Mateusz Guzik Date: Mon, 22 Sep 2025 10:54:27 +0200 X-Gm-Features: AS18NWDT-zTybmcw0u8g7EEeFoKJ50Ou-apfiGoJofwNxZo54cmOA95LTKwwVd4 Message-ID: Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL To: John Baldwin Cc: Konstantin Belousov , 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-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-Rspamd-Queue-Id: 4cVcPM3DvNz3wX8 On Mon, Sep 22, 2025 at 10:41=E2=80=AFAM John Baldwin wro= te: > > On 9/19/25 10:19, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D40a42785dbba93cc5196178f= c49d340c1a89cabe > > > > commit 40a42785dbba93cc5196178fc49d340c1a89cabe > > Author: Konstantin Belousov > > AuthorDate: 2025-09-11 10:05:04 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2025-09-19 14:19:13 +0000 > > > > fcntl(F_SETFL): only allow one thread to perform F_SETFL > > > > Use f_vflags file locking for this. > > Allowing more than one thread handling F_SETFL might cause de-sync > > between real driver state and flags. > > > > Reviewed by: markj > > Tested by: pho > > Sponsored by: The FreeBSD Foundation > > MFC after: 2 weeks > > Differential revision: https://reviews.freebsd.org/D52487 > > Thanks for fixing this. I still slightly worry that "home-grown" locks > aren't visible to WITNESS and it's checking. > Another problem with these is that they don't do adaptive spinning. In particular for file offset, it *is* putting threads off cpu in real workloads when it plausibly could be avoided. I think the real thing to do here is to drop the hand-rolled machinery and use an sx lock. Currently struct file is 80 bytes which is a very nasty size from caching standpoint. Locks are 32 bytes in size, which is another problem, but ultimately one can be added here without growing the struct past 128 bytes. The only issue here is that files are marked as NOFREE, so this memory can *never* be reclaimed. One could be tempted to use smr here, but the cost of smr_enter is prohibitive. There is a lazy variant which does not do atomics, which perhaps could work, but that 0 users in the tree and was probably never tested. With 32-bit archs going away I don't think it's a big deal though. For interested, on Linux the struct is 256 bytes. From nobody Mon Sep 22 15:37:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVnLM4Mhkz683FS for ; Mon, 22 Sep 2025 15:37:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVnLM1qbMz3b5Z for ; Mon, 22 Sep 2025 15:37:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-62ecd3c21d3so6974500a12.0 for ; Mon, 22 Sep 2025 08:37:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758555465; x=1759160265; 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=bW/Ib6TOrwbBpdMHwKphLQQgzKDk1Uz7zaHME4VHF8o=; b=U5TMjsJyOz/3EdougZvG8tHnPiVJo6Hn+lOJUKIuBKq/KNXJ0ws1ai06p/eL5Yu0RF tRhjdyUMKXG5MfHjRz6wgcGywwDTwxDpwrDXHKuFAy1B751poMv3ant2FSrmARIEecmH 8nrrbofnIudZF0Ege3laNLw8DmQGECvgpmYsRMA5nyeA6R5O7eG5b+d/hr579dD2rkN9 HEqIF87YEPoHuWbo0EfnvvwVzzNfKj/2IMN/uRiZl+x8cPjem6i9d+uN/HYQMs/cvdqU jCjoJ6ECtB2Sr1QQQFx6Y+AAMGZ9S/jREBNrIn9E/omIPW8WAk38SgGC8W7nR8WpD6vt uupw== X-Forwarded-Encrypted: i=1; AJvYcCVR6mtjpPd1J59HPXEJPS5CvrS/vf/HCG4fG/aSJNbGlCUuxO6eWGbSjs0yyAuS/mhS2L1oxT4fyZQrGMTLa7iXy+H3Bw==@freebsd.org X-Gm-Message-State: AOJu0Yykjpen1oOrg1UV8g9Sd8TD/lCNJjGJusBth4DrFDFJyyhHjC+0 5SEEZzJfoHNBVsuz8/5BIiwmrV70v14JTAg++xlsF1n/+eBAN3GUkGaYuDftdUnq X-Gm-Gg: ASbGncsn8XdwPu89JBpy5wxu56xywS/iKdKzv8VkfxzyCcdtzooz1H+yPGMX3VuqUy7 Aa/tXD75E6RTkDCpadGY0SeumM7vLutaF5azwGOtwQbdtEHSRFr8r61cvwW0SLHlmTwapAK20ZO /wjPZtH06RFbdW5528XjCSm1dKtvqdGGMib7oW4Sw72hi7KpuE6TQiXsvpgpUZP3KQBHTWKRQgP F8TOSascILEZUMF+KmrvR3pRvCmzUw61QJrP4AGGOt8Vr8h25oT571mLo32iAa+SkGJR5X7CpdN 8tC2NUKpe5vKTlLsLOVgwui8vKpTllF9prtUkSKdMCPxaaTi3FUBDf0gtrJFrlC8Z/c+3d8P7jL UZDZBtTf7EeVUE2xP0PnW5Ejas5t0dthMmpF/jw1SCwnThikURLLsiA== X-Google-Smtp-Source: AGHT+IFd9luQiAThX67N7bVC6f2zD7RDdKshXizri35ycirnc8ofKgpS1WRMhuehdg1zlRe1z5ybmw== X-Received: by 2002:a05:6402:4316:b0:634:5fb4:10c3 with SMTP id 4fb4d7f45d1cf-6345fb41431mr426770a12.31.1758555464516; Mon, 22 Sep 2025 08:37:44 -0700 (PDT) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com. [209.85.208.52]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-62fa5d027fdsm9267591a12.5.2025.09.22.08.37.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Sep 2025 08:37:44 -0700 (PDT) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-62f4a8dfadcso5395163a12.1 for ; Mon, 22 Sep 2025 08:37:43 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXPtXfC7AGBN1LbIi4hy/CawgEVrxVDz2V9G0Kd+JnJFqVOdiF2vzF+x3oUlrNzv/6sSa4Lgc/Wx21wGmlU09XB0yYb3w==@freebsd.org X-Received: by 2002:a17:907:7f27:b0:b07:c5b1:b129 with SMTP id a640c23a62f3a-b24eda731a4mr1333306966b.1.1758555463512; Mon, 22 Sep 2025 08:37:43 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> In-Reply-To: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> From: "Jonathan T. Looney" Date: Mon, 22 Sep 2025 11:37:31 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWBH61PiU7vTxGZN7EGr1_eANGlQLau9vCkRv56QnH6aasPYTU8yE_Ssb98 Message-ID: Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support To: Guido Falsi Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b879d5063f65997c" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVnLM1qbMz3b5Z --000000000000b879d5063f65997c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 22, 2025 at 3:59=E2=80=AFAM Guido Falsi = wrote: > diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c > index 4f756a75fac7..8ef755e2dc0a 100644 > --- a/sys/netinet6/in6.c > +++ b/sys/netinet6/in6.c > @@ -2604,6 +2604,8 @@ in6_domifattach(struct ifnet *ifp) > COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat, > sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK); > > + ext->dad_failures =3D counter_u64_alloc(M_WAITOK); > + > ext->nd_ifinfo =3D nd6_ifattach(ifp); > ext->scope6_id =3D scope6_ifattach(ifp); > ext->lltable =3D in6_lltattach(ifp); > @@ -2639,6 +2641,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) > COUNTER_ARRAY_FREE(ext->icmp6_ifstat, > sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); > free(ext->icmp6_ifstat, M_IFADDR); > + counter_u64_free(ext->dad_failures); > free(ext, M_IFADDR); > } > This seems like it is probably a low-frequency event. If so, why is a counter a better choice for this than an atomic? Jonathan --000000000000b879d5063f65997c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Sep 22, 2025 at 3:59=E2=80=AFAM G= uido Falsi <madpilot@freebsd.org= > wrote:
diff --git a/sys/netinet6/in6.= c b/sys/netinet6/in6.c
index 4f756a75fac7..8ef755e2dc0a 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -2604,6 +2604,8 @@ in6_domifattach(struct ifnet *ifp)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof(struct icmp6_ifstat) / siz= eof(uint64_t), M_WAITOK);

+=C2=A0 =C2=A0 =C2=A0 =C2=A0ext->dad_failures =3D counter_u64_alloc(M_WA= ITOK);
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ext->nd_ifinfo =3D nd6_ifattach(ifp);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ext->scope6_id =3D scope6_ifattach(ifp);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ext->lltable =3D in6_lltattach(ifp);
@@ -2639,6 +2641,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 COUNTER_ARRAY_FREE(ext->icmp6_ifstat,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sizeof(struct icmp6_ifstat) / siz= eof(uint64_t));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 free(ext->icmp6_ifstat, M_IFADDR);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0counter_u64_free(ext->dad_failures);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 free(ext, M_IFADDR);
=C2=A0}

This seems like it is probably = a low-frequency event. If so, why is a counter a better choice for this tha= n an atomic?

Jonathan
--000000000000b879d5063f65997c-- From nobody Mon Sep 22 15:43:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVnSm2MLjz683Lk; Mon, 22 Sep 2025 15:43: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVnSm1syxz3bbg; Mon, 22 Sep 2025 15:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758555800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8XyI3fOkwlWJ5mK3k9aO/B8K+j/qwcNUG1kBFPB1how=; b=idw9rjj2EAjFO8CTMjctZlvknZ8eHvkIlfimebCEeN0FjOam4yRUfHJKmgygc0Q5li+Kup k9kh9T2JRkq9oxid1xwg/guLShu4+PqYHxaRKVq5Me45ME7SvTH6Kpa7FKnrFnEq4Ih8l7 A5v3X5tsuo1SbiSD2uuv0OMpMm/NZTkKSWC78qNV4DfE4nN979dNPIvwuTlGSvaj2XUmf7 e50uQv7wdh83hT5G3/MN+UnO5AwpQ/AVCoAiw/5Za7iF2jJDigqMsbN23M6kOGYlzhISCf uzxmfnfNb6mImTAwkTUfq4DPX+kkzcvSfdcdstQzgE2rNby9lBAJ7NcB54IS+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758555800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8XyI3fOkwlWJ5mK3k9aO/B8K+j/qwcNUG1kBFPB1how=; b=VfPdw/tW11mXL5Q0tl9myHDqAYnx0RMPX6VovKnzTY2Is45KmxY7eam9XT74iEGuWpOO1Z tACV4ugxcAEp32FHUGtLvG9gdIPZeyIHfC1GEblAFpJdjh9lscOzh84guial2CyI1DwO7y xr0NcloQWH+mk0UEgvti9aXtN7gQleIEvUbKhA6iQcW475kBsguoCT4eZqdNKP5fO/zwFB j9280WPR0aCtBghrihJ44MfIknK+ODX+bGT4QM3pF+qR5FAgrvQdOlyl91Y5taoxxzpsbT OrzBtDkedXTlkzpeuuBnL02kr+Nf6ut7jXjrMqgHLBumNOd+WklmtYZoV2T9+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758555800; a=rsa-sha256; cv=none; b=Ps3FWypfumTdLVuEYv6tq4XZeXM7v9RSfpH9a6a7hawjtsb24G2DIvcBLHfcffk9kby8PK 0AsZ4pC2K1GB5efajlyEvmoOyYYCFauuzwzsMaAou2PWFKYwoO+/DR542TZIh58270OBao 0f4fD8nauUGj4fAtd+boJd9m8xZuhwp4kLj16jzsEZqkEBIQXV0N4Plh23EU+LTlfIac8P Wa+ZZ13YC1NmdBCOn/h73Oar4zawMgCEjYyze8Pqf+iik8fprCjLBIjm0WTC6E66DUmCkK T8hG4lzZoVyBi1n/sJxKj6pB2D9SE9AyXfB0M+XrVbq5XDf0knzLtvJIwVSwIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVnSm1Sk9z15Rp; Mon, 22 Sep 2025 15:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MFhKRa014589; Mon, 22 Sep 2025 15:43:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MFhJ5S014583; Mon, 22 Sep 2025 15:43:19 GMT (envelope-from git) Date: Mon, 22 Sep 2025 15:43:19 GMT Message-Id: <202509221543.58MFhJ5S014583@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: 3e13aae0d1f1 - main - krb5: Remove tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e13aae0d1f1a28352d52e41d6ef8f02efd9150e Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3e13aae0d1f1a28352d52e41d6ef8f02efd9150e commit 3e13aae0d1f1a28352d52e41d6ef8f02efd9150e Author: Cy Schubert AuthorDate: 2025-09-22 15:06:41 +0000 Commit: Cy Schubert CommitDate: 2025-09-22 15:42:15 +0000 krb5: Remove tests Tests contains a file that contains spaces in it. This causes the freebsd-update build scripts some issues. As we don't need the tests directory let's simply remove it. MFC after: 3 days or as determined by re@ MFC to: stable/15 --- crypto/krb5/src/tests/Makefile.in | 203 --- crypto/krb5/src/tests/adata.c | 381 ----- crypto/krb5/src/tests/asn.1/Makefile.in | 98 -- crypto/krb5/src/tests/asn.1/README | 28 - crypto/krb5/src/tests/asn.1/cammac.asn1 | 30 - crypto/krb5/src/tests/asn.1/debug.h | 46 - crypto/krb5/src/tests/asn.1/deps | 75 - crypto/krb5/src/tests/asn.1/krb5.asn1 | 392 ----- crypto/krb5/src/tests/asn.1/krb5_decode_leak.c | 676 -------- crypto/krb5/src/tests/asn.1/krb5_decode_test.c | 1315 -------------- crypto/krb5/src/tests/asn.1/krb5_encode_test.c | 850 --------- crypto/krb5/src/tests/asn.1/ktest.c | 1796 -------------------- crypto/krb5/src/tests/asn.1/ktest.h | 210 --- crypto/krb5/src/tests/asn.1/ktest_equal.c | 1054 ------------ crypto/krb5/src/tests/asn.1/ktest_equal.h | 154 -- crypto/krb5/src/tests/asn.1/ldap_encode.out | 1 - crypto/krb5/src/tests/asn.1/ldap_trval.out | 30 - crypto/krb5/src/tests/asn.1/make-vectors.c | 333 ---- crypto/krb5/src/tests/asn.1/otp.asn1 | 109 -- crypto/krb5/src/tests/asn.1/pkinit-agility.asn1 | 99 -- crypto/krb5/src/tests/asn.1/pkinit.asn1 | 253 --- crypto/krb5/src/tests/asn.1/pkinit_encode.out | 8 - crypto/krb5/src/tests/asn.1/pkinit_trval.out | 97 -- crypto/krb5/src/tests/asn.1/pkix.asn1 | 654 ------- crypto/krb5/src/tests/asn.1/reference_encode.out | 78 - crypto/krb5/src/tests/asn.1/spake.asn1 | 44 - crypto/krb5/src/tests/asn.1/t_trval.c | 105 -- crypto/krb5/src/tests/asn.1/trval.c | 742 -------- crypto/krb5/src/tests/asn.1/trval_reference.out | 1584 ----------------- crypto/krb5/src/tests/asn.1/utility.c | 142 -- crypto/krb5/src/tests/asn.1/utility.h | 57 - crypto/krb5/src/tests/au_dict.json | 64 - crypto/krb5/src/tests/conccache.c | 190 --- crypto/krb5/src/tests/create/Makefile.in | 17 - crypto/krb5/src/tests/create/deps | 14 - crypto/krb5/src/tests/create/kdb5_mkdums.c | 398 ----- crypto/krb5/src/tests/deps | 181 -- crypto/krb5/src/tests/dumpfiles/dump | 11 - crypto/krb5/src/tests/dumpfiles/dump.16 | 7 - crypto/krb5/src/tests/dumpfiles/dump.b7 | 11 - crypto/krb5/src/tests/dumpfiles/dump.ov | 9 - crypto/krb5/src/tests/dumpfiles/dump.r13 | 11 - crypto/krb5/src/tests/dumpfiles/dump.r18 | 11 - crypto/krb5/src/tests/etinfo.c | 172 -- crypto/krb5/src/tests/forward.c | 93 - crypto/krb5/src/tests/fuzzing/Makefile.in | 138 -- crypto/krb5/src/tests/fuzzing/README | 26 - crypto/krb5/src/tests/fuzzing/deps | 222 --- crypto/krb5/src/tests/fuzzing/fuzz_aes.c | 104 -- .../tests/fuzzing/fuzz_aes_seed_corpus/input.bin | 1 - crypto/krb5/src/tests/fuzzing/fuzz_asn.c | 188 -- .../decode_authenticator_3.bin | Bin 165 -> 0 bytes .../decode_authenticator_4.bin | Bin 168 -> 0 bytes .../decode_authenticator_6.bin | 2 - .../decode_enc_tkt_part_30.bin | Bin 167 -> 0 bytes .../decode_encryption_key_15.bin | 2 - .../decode_encryption_key_21.bin | 2 - .../decode_encryption_key_22.bin | Bin 20 -> 0 bytes .../decode_encryption_key_24.bin | 2 - .../decode_fail_encryption_key_16.bin | Bin 21 -> 0 bytes .../fuzz_asn_seed_corpus/encode_auth_pack_80.bin | 4 - .../fuzz_asn_seed_corpus/encode_cammac_68.bin | 1 - .../fuzz_asn_seed_corpus/encode_cammac_69.bin | 3 - .../fuzz_asn_seed_corpus/encode_enc_data_47.bin | Bin 40 -> 0 bytes .../encode_kdc_dh_key_info_81.bin | Bin 39 -> 0 bytes .../encode_kkdcp_message_67.bin | Bin 512 -> 0 bytes .../encode_krb5_ad_kdcissued_54.bin | 1 - .../encode_krb5_ap_rep_enc_part_16.bin | 1 - .../fuzz_asn_seed_corpus/encode_krb5_ap_req_14.bin | Bin 53 -> 0 bytes .../fuzz_asn_seed_corpus/encode_krb5_as_rep_10.bin | Bin 197 -> 0 bytes .../fuzz_asn_seed_corpus/encode_krb5_as_req_19.bin | Bin 107 -> 0 bytes .../encode_krb5_authdata_36.bin | 1 - .../encode_krb5_authenticator_2.bin | 1 - .../fuzz_asn_seed_corpus/encode_krb5_cred_31.bin | Bin 249 -> 0 bytes .../encode_krb5_enc_cred_part_32.bin | Bin 551 -> 0 bytes .../encode_krb5_enc_cred_part_33.bin | Bin 274 -> 0 bytes .../encode_krb5_enc_kdc_rep_part_8.bin | Bin 181 -> 0 bytes .../encode_krb5_enc_priv_part_29.bin | Bin 81 -> 0 bytes .../encode_krb5_enc_priv_part_30.bin | Bin 33 -> 0 bytes .../encode_krb5_enc_tkt_part_5.bin | Bin 280 -> 0 bytes .../encode_krb5_enc_tkt_part_7.bin | Bin 274 -> 0 bytes .../fuzz_asn_seed_corpus/encode_krb5_error_34.bin | 3 - .../fuzz_asn_seed_corpus/encode_krb5_error_35.bin | 1 - .../encode_krb5_etype_info2_43.bin | Bin 83 -> 0 bytes .../encode_krb5_etype_info2_44.bin | Bin 34 -> 0 bytes .../encode_krb5_etype_info_40.bin | Bin 53 -> 0 bytes .../encode_krb5_etype_info_41.bin | Bin 24 -> 0 bytes .../encode_krb5_fast_response_57.bin | 2 - .../encode_krb5_iakerb_finished_56.bin | 1 - .../encode_krb5_iakerb_header_55.bin | 3 - .../encode_krb5_kdc_req_body_24.bin | Bin 258 -> 0 bytes .../encode_krb5_tgs_rep_13.bin | Bin 160 -> 0 bytes .../encode_krb5_tgs_req_23.bin | Bin 426 -> 0 bytes .../encode_otp_tokeninfo_61.bin | Bin 116 -> 0 bytes .../encode_pa_enc_ts (no usec)_45.bin | 1 - .../fuzz_asn_seed_corpus/encode_pa_for_user_53.bin | 2 - .../encode_pa_fx_fast_reply_59.bin | Bin 43 -> 0 bytes .../encode_pa_otp_challenge_63.bin | Bin 168 -> 0 bytes .../fuzz_asn_seed_corpus/encode_pa_otp_req_64.bin | Bin 46 -> 0 bytes .../fuzz_asn_seed_corpus/encode_pa_otp_req_65.bin | Bin 188 -> 0 bytes .../encode_pa_pk_as_rep_78.bin | 3 - .../encode_pa_pk_as_rep_79.bin | 1 - .../encode_pa_s4u_x509_user_54.bin | Bin 106 -> 0 bytes .../fuzz_asn_seed_corpus/encode_pa_spake_73.bin | 2 - .../fuzz_asn_seed_corpus/encode_pa_spake_74.bin | 1 - .../fuzz_asn_seed_corpus/encode_pa_spake_75.bin | Bin 54 -> 0 bytes .../fuzz_asn_seed_corpus/encode_pa_spake_76.bin | Bin 39 -> 0 bytes .../encode_padata_sequence_38.bin | Bin 2 -> 0 bytes .../fuzz_asn_seed_corpus/encode_priv_28.bin | Bin 53 -> 0 bytes .../encode_reply_key_pack_82.bin | 2 - .../fuzz_asn_seed_corpus/encode_safe_26.bin | Bin 112 -> 0 bytes .../fuzz_asn_seed_corpus/encode_safe_27.bin | Bin 64 -> 0 bytes .../encode_sam_challenge_2_49.bin | 1 - .../encode_sam_challenge_2_body_50.bin | Bin 102 -> 0 bytes .../encode_sam_response_2_51.bin | Bin 68 -> 0 bytes .../encode_secure_cookie_70.bin | 1 - .../encode_sp80056a_other_info_83.bin | 2 - .../encode_spake_factor_71.bin | 1 - .../fuzz_asn_seed_corpus/encode_tgs_rep_11.bin | Bin 237 -> 0 bytes .../fuzz_asn_seed_corpus/encode_tgs_rep_12.bin | Bin 197 -> 0 bytes .../fuzz_asn_seed_corpus/encode_tgs_req_20.bin | Bin 488 -> 0 bytes .../fuzz_asn_seed_corpus/encode_tgs_req_21.bin | Bin 280 -> 0 bytes .../fuzz_asn_seed_corpus/encode_ticket_3.bin | Bin 94 -> 0 bytes crypto/krb5/src/tests/fuzzing/fuzz_attrset.c | 68 - .../fuzzing/fuzz_attrset_seed_corpus/t_attrset.bin | 2 - crypto/krb5/src/tests/fuzzing/fuzz_chpw.c | 65 - .../fuzz_chpw_seed_corpus/result_ad_age.bin | Bin 30 -> 0 bytes .../fuzz_chpw_seed_corpus/result_ad_all.bin | Bin 30 -> 0 bytes .../fuzz_chpw_seed_corpus/result_ad_complex.bin | Bin 30 -> 0 bytes .../fuzz_chpw_seed_corpus/result_ad_history.bin | Bin 30 -> 0 bytes .../fuzz_chpw_seed_corpus/result_ad_length.bin | Bin 30 -> 0 bytes .../fuzz_chpw_seed_corpus/result_invalid_utf8.bin | Bin 19 -> 0 bytes .../fuzzing/fuzz_chpw_seed_corpus/result_utf8.bin | 1 - crypto/krb5/src/tests/fuzzing/fuzz_crypto.c | 171 -- .../fuzzing/fuzz_crypto_seed_corpus/input.bin | 1 - crypto/krb5/src/tests/fuzzing/fuzz_des.c | 109 -- .../tests/fuzzing/fuzz_des_seed_corpus/input.bin | 1 - crypto/krb5/src/tests/fuzzing/fuzz_gss.c | 73 - .../fuzz_gss_seed_corpus/establish_contexts_ex.bin | Bin 469 -> 0 bytes .../gss_accept_sec_context_kerberos.bin | Bin 599 -> 0 bytes .../gss_accept_sec_context_spnego.bin | Bin 664 -> 0 bytes .../fuzzing/fuzz_gss_seed_corpus/realm_query.bin | Bin 18 -> 0 bytes .../fuzz_gss_seed_corpus/start_accept_context.bin | Bin 212 -> 0 bytes crypto/krb5/src/tests/fuzzing/fuzz_json.c | 74 - .../fuzzing/fuzz_json_seed_corpus/seed_1.json | 1 - .../fuzzing/fuzz_json_seed_corpus/seed_2.json | 1 - .../fuzzing/fuzz_json_seed_corpus/seed_3.json | 1 - crypto/krb5/src/tests/fuzzing/fuzz_kdc.c | 72 - .../tests/fuzzing/fuzz_kdc_seed_corpus/input.bin | 1 - crypto/krb5/src/tests/fuzzing/fuzz_krad.c | 93 - .../fuzzing/fuzz_krad_seed_corpus/do_auth_1.bin | Bin 20 -> 0 bytes crypto/krb5/src/tests/fuzzing/fuzz_krb.c | 170 -- crypto/krb5/src/tests/fuzzing/fuzz_krb5_ticket.c | 85 - .../fuzzing/fuzz_krb5_ticket_seed_corpus/gcred.bin | Bin 470 -> 0 bytes .../fuzz_krb5_ticket_seed_corpus/s4u2proxy.bin | Bin 505 -> 0 bytes .../tests/fuzzing/fuzz_krb_seed_corpus/deltat.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/enctype_1.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/enctype_2.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/enctype_3.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/enctype_4.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/enctype_5.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/enctype_6.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/enctype_7.bin | 1 - .../fuzz_krb_seed_corpus/host_string_11.bin | 1 - .../fuzz_krb_seed_corpus/host_string_12.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/host_string_2.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/host_string_4.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/host_string_5.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/host_string_8.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/host_string_9.bin | 1 - .../fuzzing/fuzz_krb_seed_corpus/parse_name.bin | 1 - .../fuzz_krb_seed_corpus/principal_425_name.bin | 1 - crypto/krb5/src/tests/fuzzing/fuzz_marshal_cred.c | 69 - .../cred_1_input_1.bin | Bin 165 -> 0 bytes .../cred_1_input_2.bin | Bin 173 -> 0 bytes .../cred_1_input_4.bin | Bin 173 -> 0 bytes .../cred_2_input_1.bin | Bin 113 -> 0 bytes .../cred_2_input_2.bin | Bin 121 -> 0 bytes .../cred_2_input_4.bin | Bin 121 -> 0 bytes crypto/krb5/src/tests/fuzzing/fuzz_marshal_princ.c | 69 - .../princ_input_1.bin | Bin 33 -> 0 bytes .../princ_input_2.bin | Bin 37 -> 0 bytes .../princ_input_4.bin | Bin 37 -> 0 bytes crypto/krb5/src/tests/fuzzing/fuzz_ndr.c | 67 - .../fuzzing/fuzz_ndr_seed_corpus/s4u_di_double.bin | Bin 264 -> 0 bytes .../fuzzing/fuzz_ndr_seed_corpus/s4u_di_long.bin | Bin 184 -> 0 bytes crypto/krb5/src/tests/fuzzing/fuzz_oid.c | 65 - .../tests/fuzzing/fuzz_oid_seed_corpus/oid_19.bin | 1 - .../tests/fuzzing/fuzz_oid_seed_corpus/oid_20.bin | Bin 2 -> 0 bytes .../tests/fuzzing/fuzz_oid_seed_corpus/oid_21.bin | Bin 3 -> 0 bytes .../tests/fuzzing/fuzz_oid_seed_corpus/oid_22.bin | Bin 2 -> 0 bytes .../tests/fuzzing/fuzz_oid_seed_corpus/oid_24.bin | Bin 4 -> 0 bytes .../tests/fuzzing/fuzz_oid_seed_corpus/oid_8.bin | 1 - crypto/krb5/src/tests/fuzzing/fuzz_pac.c | 93 - .../fuzz_pac_seed_corpus/s4u_pac_regular.bin | Bin 624 -> 0 bytes .../fuzzing/fuzz_pac_seed_corpus/saved_pac.bin | Bin 624 -> 0 bytes crypto/krb5/src/tests/fuzzing/fuzz_profile.c | 87 - .../fuzzing/fuzz_profile_seed_corpus/final2.ini | 5 - .../fuzzing/fuzz_profile_seed_corpus/final3.ini | 6 - .../fuzzing/fuzz_profile_seed_corpus/final4.ini | 6 - .../fuzzing/fuzz_profile_seed_corpus/final5.ini | 5 - .../fuzzing/fuzz_profile_seed_corpus/modtest.conf | 1 - .../fuzzing/fuzz_profile_seed_corpus/test3.ini | 3 - .../fuzzing/fuzz_profile_seed_corpus/testinc.ini | 6 - .../fuzzing/fuzz_profile_seed_corpus/testinc2.ini | 2 - crypto/krb5/src/tests/fuzzing/fuzz_util.c | 159 -- .../tests/fuzzing/fuzz_util_seed_corpus/base64.txt | 1 - .../tests/fuzzing/fuzz_util_seed_corpus/hax.txt | 1 - .../tests/fuzzing/fuzz_util_seed_corpus/host.txt | 1 - .../tests/fuzzing/fuzz_util_seed_corpus/name.txt | 1 - crypto/krb5/src/tests/fuzzing/oss-fuzz.sh | 28 - crypto/krb5/src/tests/gcred.c | 124 -- crypto/krb5/src/tests/gss-threads/Makefile.in | 34 - crypto/krb5/src/tests/gss-threads/README | 165 -- crypto/krb5/src/tests/gss-threads/deps | 15 - crypto/krb5/src/tests/gss-threads/gss-client.c | 865 ---------- crypto/krb5/src/tests/gss-threads/gss-misc.c | 410 ----- crypto/krb5/src/tests/gss-threads/gss-misc.h | 51 - crypto/krb5/src/tests/gss-threads/gss-server.c | 850 --------- crypto/krb5/src/tests/gssapi/Makefile.in | 141 -- crypto/krb5/src/tests/gssapi/ccinit.c | 72 - crypto/krb5/src/tests/gssapi/ccrefresh.c | 80 - crypto/krb5/src/tests/gssapi/common.c | 282 --- crypto/krb5/src/tests/gssapi/common.h | 90 - crypto/krb5/src/tests/gssapi/deps | 203 --- crypto/krb5/src/tests/gssapi/reload.c | 83 - crypto/krb5/src/tests/gssapi/t_accname.c | 93 - crypto/krb5/src/tests/gssapi/t_add_cred.c | 137 -- crypto/krb5/src/tests/gssapi/t_authind.py | 51 - crypto/krb5/src/tests/gssapi/t_bindings.c | 124 -- crypto/krb5/src/tests/gssapi/t_bindings.py | 61 - crypto/krb5/src/tests/gssapi/t_ccselect.c | 90 - crypto/krb5/src/tests/gssapi/t_ccselect.py | 164 -- crypto/krb5/src/tests/gssapi/t_ciflags.c | 120 -- crypto/krb5/src/tests/gssapi/t_client_keytab.py | 189 -- crypto/krb5/src/tests/gssapi/t_context.c | 60 - crypto/krb5/src/tests/gssapi/t_credstore.c | 140 -- crypto/krb5/src/tests/gssapi/t_credstore.py | 97 -- crypto/krb5/src/tests/gssapi/t_enctypes.c | 205 --- crypto/krb5/src/tests/gssapi/t_enctypes.py | 147 -- crypto/krb5/src/tests/gssapi/t_err.c | 126 -- crypto/krb5/src/tests/gssapi/t_export_cred.c | 115 -- crypto/krb5/src/tests/gssapi/t_export_cred.py | 50 - crypto/krb5/src/tests/gssapi/t_export_name.c | 119 -- crypto/krb5/src/tests/gssapi/t_gssapi.py | 258 --- crypto/krb5/src/tests/gssapi/t_gssexts.c | 247 --- crypto/krb5/src/tests/gssapi/t_iakerb.c | 87 - crypto/krb5/src/tests/gssapi/t_imp_cred.c | 101 -- crypto/krb5/src/tests/gssapi/t_imp_name.c | 94 - crypto/krb5/src/tests/gssapi/t_inq_cred.c | 116 -- crypto/krb5/src/tests/gssapi/t_inq_ctx.c | 241 --- crypto/krb5/src/tests/gssapi/t_inq_mechs_name.c | 64 - crypto/krb5/src/tests/gssapi/t_invalid.c | 795 --------- crypto/krb5/src/tests/gssapi/t_iov.c | 547 ------ crypto/krb5/src/tests/gssapi/t_lifetime.c | 140 -- crypto/krb5/src/tests/gssapi/t_namingexts.c | 227 --- crypto/krb5/src/tests/gssapi/t_negoex.py | 149 -- crypto/krb5/src/tests/gssapi/t_oid.c | 224 --- crypto/krb5/src/tests/gssapi/t_pcontok.c | 190 --- crypto/krb5/src/tests/gssapi/t_prf.c | 190 --- crypto/krb5/src/tests/gssapi/t_s4u.c | 334 ---- crypto/krb5/src/tests/gssapi/t_s4u.py | 403 ----- crypto/krb5/src/tests/gssapi/t_s4u2proxy_krb5.c | 164 -- crypto/krb5/src/tests/gssapi/t_saslname.c | 165 -- crypto/krb5/src/tests/gssapi/t_spnego.c | 314 ---- crypto/krb5/src/tests/gssapi/t_srcattrs.c | 63 - crypto/krb5/src/tests/gssapi/t_store_cred.c | 114 -- crypto/krb5/src/tests/gssapi/t_store_cred.py | 80 - crypto/krb5/src/tests/hammer/Makefile.in | 15 - crypto/krb5/src/tests/hammer/deps | 13 - crypto/krb5/src/tests/hammer/kdc5_hammer.c | 494 ------ crypto/krb5/src/tests/hammer/pp.c | 27 - crypto/krb5/src/tests/hist.c | 113 -- crypto/krb5/src/tests/hooks.c | 253 --- crypto/krb5/src/tests/hrealm.c | 99 -- crypto/krb5/src/tests/icinterleave.c | 128 -- crypto/krb5/src/tests/icred.c | 144 -- crypto/krb5/src/tests/jsonwalker.py | 105 -- crypto/krb5/src/tests/kcmserver.py | 336 ---- crypto/krb5/src/tests/kdbtest.c | 403 ----- crypto/krb5/src/tests/localauth.c | 72 - crypto/krb5/src/tests/misc/Makefile.in | 58 - crypto/krb5/src/tests/misc/deps | 44 - crypto/krb5/src/tests/misc/test_chpw_message.c | 174 -- crypto/krb5/src/tests/misc/test_cxx_gss.cpp | 10 - crypto/krb5/src/tests/misc/test_cxx_k5int.cpp | 20 - crypto/krb5/src/tests/misc/test_cxx_kadm5.cpp | 15 - crypto/krb5/src/tests/misc/test_cxx_krb5.cpp | 19 - crypto/krb5/src/tests/misc/test_cxx_rpc.cpp | 14 - crypto/krb5/src/tests/misc/test_getpw.c | 51 - crypto/krb5/src/tests/misc/test_getsockname.c | 117 -- crypto/krb5/src/tests/misc/test_nfold.c | 66 - crypto/krb5/src/tests/pkinit-certs/ca.pem | 29 - crypto/krb5/src/tests/pkinit-certs/eckey.pem | 5 - crypto/krb5/src/tests/pkinit-certs/ecuser.pem | 24 - crypto/krb5/src/tests/pkinit-certs/generic.p12 | Bin 2560 -> 0 bytes crypto/krb5/src/tests/pkinit-certs/generic.pem | 21 - crypto/krb5/src/tests/pkinit-certs/kdc.pem | 29 - crypto/krb5/src/tests/pkinit-certs/make-certs.sh | 179 -- crypto/krb5/src/tests/pkinit-certs/privkey-enc.pem | 30 - crypto/krb5/src/tests/pkinit-certs/privkey.pem | 28 - crypto/krb5/src/tests/pkinit-certs/user-enc.p12 | Bin 2920 -> 0 bytes crypto/krb5/src/tests/pkinit-certs/user-upn.p12 | Bin 2912 -> 0 bytes crypto/krb5/src/tests/pkinit-certs/user-upn.pem | 28 - crypto/krb5/src/tests/pkinit-certs/user-upn2.p12 | Bin 2896 -> 0 bytes crypto/krb5/src/tests/pkinit-certs/user-upn2.pem | 28 - crypto/krb5/src/tests/pkinit-certs/user-upn3.p12 | Bin 2912 -> 0 bytes crypto/krb5/src/tests/pkinit-certs/user-upn3.pem | 28 - crypto/krb5/src/tests/pkinit-certs/user.p12 | Bin 2920 -> 0 bytes crypto/krb5/src/tests/pkinit-certs/user.pem | 28 - crypto/krb5/src/tests/plugorder.c | 96 -- crypto/krb5/src/tests/proxy-certs/ca.pem | 28 - crypto/krb5/src/tests/proxy-certs/make-certs.sh | 124 -- crypto/krb5/src/tests/proxy-certs/proxy-badsig.pem | 56 - crypto/krb5/src/tests/proxy-certs/proxy-ideal.pem | 56 - .../krb5/src/tests/proxy-certs/proxy-no-match.pem | 54 - crypto/krb5/src/tests/proxy-certs/proxy-san.pem | 56 - .../krb5/src/tests/proxy-certs/proxy-subject.pem | 54 - crypto/krb5/src/tests/rdreq.c | 118 -- crypto/krb5/src/tests/replay.c | 172 -- crypto/krb5/src/tests/responder.c | 431 ----- crypto/krb5/src/tests/s2p.c | 81 - crypto/krb5/src/tests/s4u2proxy.c | 147 -- crypto/krb5/src/tests/s4u2self.c | 128 -- crypto/krb5/src/tests/shlib/Makefile.in | 23 - crypto/krb5/src/tests/shlib/deps | 8 - crypto/krb5/src/tests/shlib/t_loader.c | 374 ---- crypto/krb5/src/tests/t_alias.py | 124 -- crypto/krb5/src/tests/t_audit.py | 27 - crypto/krb5/src/tests/t_authdata.py | 362 ---- crypto/krb5/src/tests/t_bogus_kdc_req.py | 42 - crypto/krb5/src/tests/t_ccache.py | 202 --- crypto/krb5/src/tests/t_certauth.py | 65 - crypto/krb5/src/tests/t_changepw.py | 70 - crypto/krb5/src/tests/t_crossrealm.py | 192 --- crypto/krb5/src/tests/t_cve-2012-1014.py | 29 - crypto/krb5/src/tests/t_cve-2012-1015.py | 36 - crypto/krb5/src/tests/t_cve-2013-1416.py | 13 - crypto/krb5/src/tests/t_cve-2013-1417.py | 11 - crypto/krb5/src/tests/t_cve-2021-36222.py | 46 - crypto/krb5/src/tests/t_dump.py | 94 - crypto/krb5/src/tests/t_errmsg.py | 27 - crypto/krb5/src/tests/t_etype_info.py | 69 - crypto/krb5/src/tests/t_general.py | 74 - crypto/krb5/src/tests/t_hooks.py | 8 - crypto/krb5/src/tests/t_hostrealm.py | 140 -- crypto/krb5/src/tests/t_inetd.c | 128 -- crypto/krb5/src/tests/t_iprop.py | 520 ------ crypto/krb5/src/tests/t_kadm5_auth.py | 80 - crypto/krb5/src/tests/t_kadm5_hook.py | 15 - crypto/krb5/src/tests/t_kadmin.py | 66 - crypto/krb5/src/tests/t_kadmin_acl.py | 450 ----- crypto/krb5/src/tests/t_kadmin_parsing.py | 82 - crypto/krb5/src/tests/t_kdb.py | 637 ------- crypto/krb5/src/tests/t_kdb_locking.py | 32 - crypto/krb5/src/tests/t_kdc_log.py | 21 - crypto/krb5/src/tests/t_kdcoptions.py | 100 -- crypto/krb5/src/tests/t_kdcpolicy.py | 65 - crypto/krb5/src/tests/t_keydata.py | 49 - crypto/krb5/src/tests/t_keyrollover.py | 100 -- crypto/krb5/src/tests/t_keytab.py | 209 --- crypto/krb5/src/tests/t_kprop.py | 125 -- crypto/krb5/src/tests/t_localauth.py | 154 -- crypto/krb5/src/tests/t_mkey.py | 344 ---- crypto/krb5/src/tests/t_otp.py | 275 --- crypto/krb5/src/tests/t_pkinit.py | 469 ----- crypto/krb5/src/tests/t_policy.py | 222 --- crypto/krb5/src/tests/t_preauth.py | 265 --- crypto/krb5/src/tests/t_princflags.py | 138 -- crypto/krb5/src/tests/t_proxy.py | 220 --- crypto/krb5/src/tests/t_pwqual.py | 78 - crypto/krb5/src/tests/t_rdreq.py | 138 -- crypto/krb5/src/tests/t_referral.py | 142 -- crypto/krb5/src/tests/t_renew.py | 122 -- crypto/krb5/src/tests/t_renprinc.py | 45 - crypto/krb5/src/tests/t_replay.py | 6 - crypto/krb5/src/tests/t_salt.py | 55 - crypto/krb5/src/tests/t_sendto_kdc.py | 45 - crypto/krb5/src/tests/t_sesskeynego.py | 94 - crypto/krb5/src/tests/t_skew.py | 55 - crypto/krb5/src/tests/t_sn2princ.py | 167 -- crypto/krb5/src/tests/t_spake.py | 149 -- crypto/krb5/src/tests/t_stringattr.py | 41 - crypto/krb5/src/tests/t_tabdump.py | 86 - crypto/krb5/src/tests/t_u2u.py | 60 - crypto/krb5/src/tests/t_unlockiter.py | 20 - crypto/krb5/src/tests/t_y2038.py | 79 - crypto/krb5/src/tests/threads/Makefile.in | 40 - crypto/krb5/src/tests/threads/deps | 27 - crypto/krb5/src/tests/threads/gss-perf.c | 455 ----- crypto/krb5/src/tests/threads/init_ctx.c | 273 --- crypto/krb5/src/tests/threads/prof1.c | 105 -- crypto/krb5/src/tests/threads/profread.c | 287 ---- crypto/krb5/src/tests/threads/t_rcache.c | 260 --- crypto/krb5/src/tests/unlockiter.c | 276 --- crypto/krb5/src/tests/verify/Makefile.in | 16 - crypto/krb5/src/tests/verify/deps | 14 - crypto/krb5/src/tests/verify/kdb5_verify.c | 440 ----- crypto/krb5/src/tests/verify/pkey.c | 24 - 399 files changed, 41351 deletions(-) diff --git a/crypto/krb5/src/tests/Makefile.in b/crypto/krb5/src/tests/Makefile.in deleted file mode 100644 index 41ac0d3b2a29..000000000000 --- a/crypto/krb5/src/tests/Makefile.in +++ /dev/null @@ -1,203 +0,0 @@ -mydir=tests -BUILDTOP=$(REL).. -SUBDIRS = asn.1 create hammer verify gssapi shlib gss-threads misc threads \ - @fuzz_dir@ - -RUN_DB_TEST = $(RUN_SETUP) KRB5_KDC_PROFILE=kdc.conf KRB5_CONFIG=krb5.conf \ - GSS_MECH_CONFIG=mech.conf LC_ALL=C $(VALGRIND) - -OBJS= adata.o conccache.o etinfo.o forward.o gcred.o hist.o hooks.o hrealm.o \ - icinterleave.o icred.o kdbtest.o localauth.o plugorder.o rdreq.o \ - replay.o responder.o s2p.o s4u2self.o s4u2proxy.o t_inetd.o \ - unlockiter.o -EXTRADEPSRCS= adata.c conccache.c etinfo.c forward.c gcred.c hist.c hooks.c \ - hrealm.c icinterleave.c icred.c kdbtest.c localauth.c plugorder.c \ - rdreq.c replay.c responder.c s2p.c s4u2self.c s4u2proxy.c t_inetd.c \ - unlockiter.c - -TEST_DB = ./testdb -TEST_REALM = FOO.TEST.REALM -TEST_MKEY = footes -TEST_NUM = 65 -TEST_DEPTH = 5 -TEST_PREFIX = "foo bar" - -KADMIN_OPTS= -d $(TEST_DB) -r $(TEST_REALM) -P $(TEST_MKEY) -KTEST_OPTS= $(KADMIN_OPTS) -p $(TEST_PREFIX) -n $(TEST_NUM) -D $(TEST_DEPTH) - -adata: adata.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ adata.o $(KRB5_BASE_LIBS) - -conccache: conccache.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ conccache.o $(KRB5_BASE_LIBS) - -etinfo: etinfo.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ etinfo.o $(KRB5_BASE_LIBS) - -forward: forward.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ forward.o $(KRB5_BASE_LIBS) - -gcred: gcred.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ gcred.o $(KRB5_BASE_LIBS) - -hist: hist.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ hist.o $(KDB5_LIBS) $(KADMSRV_LIBS) $(KRB5_BASE_LIBS) - -hooks: hooks.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ hooks.o $(KRB5_BASE_LIBS) - -hrealm: hrealm.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ hrealm.o $(KRB5_BASE_LIBS) - -icinterleave: icinterleave.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ icinterleave.o $(KRB5_BASE_LIBS) - -icred: icred.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ icred.o $(KRB5_BASE_LIBS) - -kdbtest: kdbtest.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ kdbtest.o $(KDB5_LIBS) $(KADMSRV_LIBS) \ - $(KRB5_BASE_LIBS) - -localauth: localauth.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ localauth.o $(KRB5_BASE_LIBS) - -plugorder: plugorder.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ plugorder.o $(KRB5_BASE_LIBS) - -rdreq: rdreq.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ rdreq.o $(KRB5_BASE_LIBS) - -replay: replay.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ replay.o $(KRB5_BASE_LIBS) - -responder: responder.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ responder.o $(KRB5_BASE_LIBS) - -s2p: s2p.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ s2p.o $(KRB5_BASE_LIBS) - -s4u2self: s4u2self.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ s4u2self.o $(KRB5_BASE_LIBS) - -s4u2proxy: s4u2proxy.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ s4u2proxy.o $(KRB5_BASE_LIBS) - -t_inetd: t_inetd.o $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ t_inetd.o $(LIBS) $(KRB5_BASE_LIBS) - -unlockiter: unlockiter.o $(KDB5_DEPLIBS) $(KADMSRV_DEPLIBS) $(KRB5_BASE_DEPLIBS) - $(CC_LINK) -o $@ unlockiter.o $(KDB5_LIBS) $(KADMSRV_LIBS) \ - $(KRB5_BASE_LIBS) - -all-unix: t_inetd - -check-unix: kdb_check - -kdc.conf: Makefile - rm -rf kdc.conf - @echo "[realms]" > kdc.conf - @echo "$(TEST_REALM) = {" >> kdc.conf - @echo " key_stash_file = `pwd`/stash_file" >> kdc.conf - @echo "}" >> kdc.conf - -krb5.conf: Makefile - cat $(top_srcdir)/config-files/krb5.conf > krb5.new - echo "[dbmodules]" >> krb5.new - echo " db_module_dir = `pwd`/../plugins/kdb" >> krb5.new - mv krb5.new krb5.conf - -kdb_check: kdc.conf krb5.conf - $(RM) $(TEST_DB)* - $(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create -W - $(RUN_DB_TEST) ../tests/create/kdb5_mkdums $(KTEST_OPTS) - $(RUN_DB_TEST) ../tests/verify/kdb5_verify $(KTEST_OPTS) - $(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump - $(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f - @echo "====> NOTE!" - @echo "The following 'create' command is needed due to a change" - @echo "in functionality caused by DAL integration. See ticket 3973." - @echo ==== - $(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) create -W - $(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) load $(TEST_DB).dump - $(RUN_DB_TEST) ../tests/verify/kdb5_verify $(KTEST_OPTS) - $(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) dump $(TEST_DB).dump2 - sort $(TEST_DB).dump > $(TEST_DB).sort - sort $(TEST_DB).dump2 > $(TEST_DB).sort2 - cmp $(TEST_DB).sort $(TEST_DB).sort2 - $(RUN_DB_TEST) ../kadmin/dbutil/kdb5_util $(KADMIN_OPTS) destroy -f - $(RM) $(TEST_DB)* stash_file - -check-pytests: adata conccache etinfo forward gcred hist hooks hrealm -check-pytests: icinterleave icred kdbtest localauth plugorder rdreq replay -check-pytests: responder s2p s4u2proxy unlockiter s4u2self - $(RUNPYTEST) $(srcdir)/t_general.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_hooks.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_dump.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_iprop.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kprop.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_policy.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_changepw.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_pkinit.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_otp.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_spake.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_localauth.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kadm5_hook.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kadm5_auth.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_pwqual.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_hostrealm.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kdb_locking.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_keyrollover.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_renew.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_renprinc.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_ccache.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_stringattr.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_sesskeynego.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_crossrealm.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_referral.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_skew.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_keytab.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kadmin.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kadmin_acl.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kadmin_parsing.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kdb.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_keydata.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_mkey.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_rdreq.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_sn2princ.py $(PYTESTFLAGS) $(OFFLINE) - $(RUNPYTEST) $(srcdir)/t_cve-2012-1014.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_cve-2012-1015.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_cve-2013-1416.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_cve-2013-1417.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_cve-2021-36222.py $(PYTESTFLAGS) - $(RM) au.log - $(RUNPYTEST) $(srcdir)/t_audit.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/jsonwalker.py -d $(srcdir)/au_dict.json \ - -i au.log - $(RUNPYTEST) $(srcdir)/t_salt.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_etype_info.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_bogus_kdc_req.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kdc_log.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_proxy.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_unlockiter.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_errmsg.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_authdata.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_preauth.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_princflags.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_tabdump.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_certauth.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_y2038.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kdcpolicy.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_u2u.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_kdcoptions.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_replay.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_sendto_kdc.py $(PYTESTFLAGS) - $(RUNPYTEST) $(srcdir)/t_alias.py $(PYTESTFLAGS) - -clean: - $(RM) adata conccache etinfo forward gcred hist hooks hrealm - $(RM) icinterleave icred kdbtest localauth plugorder rdreq replay - $(RM) responder s2p s4u2proxy s4u2self t_inetd unlockiter - $(RM) krb5.conf kdc.conf - $(RM) -rf kdc_realm/sandbox ldap - $(RM) au.log diff --git a/crypto/krb5/src/tests/adata.c b/crypto/krb5/src/tests/adata.c deleted file mode 100644 index 58981c971142..000000000000 --- a/crypto/krb5/src/tests/adata.c +++ /dev/null @@ -1,381 +0,0 @@ -/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ -/* tests/adata.c - Test harness for KDC authorization data */ -/* - * Copyright (C) 2014 by the Massachusetts Institute of Technology. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER 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. - */ - -/* - * Usage: ./adata [-c ccname] [-p clientprinc] serviceprinc - * [ad-type ad-contents ...] - * - * This program acquires credentials for the specified service principal, using - * the specified or default ccache, possibly including requested authdata. The - * resulting ticket is decrypted using the default keytab, and the authdata in - * the ticket are displayed to stdout. - * - * In the requested authdata types, the type may be prefixed with '?' for an - * AD-IF-RELEVANT container, '!' for an AD-MANDATORY-FOR-KDC container, or '^' - * for an AD-KDC-ISSUED container checksummed with a random AES256 key. - * Multiple prefixes may be specified for nested container. - * - * In the output, authdata containers will be flattened and displayed with the - * above prefixes or '+' for an AD-CAMMAC container. AD-KDC-ISSUED and - * AD-CAMMAC containers will be verified with the appropriate key. Nested - * containers only display the prefix for the innermost container. - */ - -#include -#include - -static krb5_context ctx; - -static void display_authdata_list(krb5_authdata **list, - krb5_enc_tkt_part *enc_tkt, - krb5_keyblock *tktkey, char prefix_byte, - krb5_boolean pac_ok); - -static void -check(krb5_error_code code) -{ - const char *errmsg; - - if (code) { - errmsg = krb5_get_error_message(ctx, code); - fprintf(stderr, "%s\n", errmsg); - krb5_free_error_message(ctx, errmsg); - exit(1); - } -} - -static krb5_authdatatype -get_type_for_prefix(int prefix_byte) -{ - if (prefix_byte == '?') - return KRB5_AUTHDATA_IF_RELEVANT; - if (prefix_byte == '!') - return KRB5_AUTHDATA_MANDATORY_FOR_KDC; - if (prefix_byte == '^') - return KRB5_AUTHDATA_KDC_ISSUED; - if (prefix_byte == '+') - return KRB5_AUTHDATA_CAMMAC; - abort(); -} - -static int -get_prefix_byte(krb5_authdata *ad) -{ - if (ad->ad_type == KRB5_AUTHDATA_IF_RELEVANT) - return '?'; - if (ad->ad_type == KRB5_AUTHDATA_MANDATORY_FOR_KDC) - return '!'; - if (ad->ad_type == KRB5_AUTHDATA_KDC_ISSUED) - return '^'; - if (ad->ad_type == KRB5_AUTHDATA_CAMMAC) - return '+'; - abort(); -} - -/* Construct a container of type ad_type for the single authdata element - * content. For KDC-ISSUED containers, use a random checksum key. */ -static krb5_authdata * -make_container(krb5_authdatatype ad_type, krb5_authdata *content) -{ - krb5_authdata *list[2], **enclist, *ad; - krb5_keyblock kb; - - list[0] = content; - list[1] = NULL; - - if (ad_type == KRB5_AUTHDATA_KDC_ISSUED) { - check(krb5_c_make_random_key(ctx, ENCTYPE_AES256_CTS_HMAC_SHA1_96, - &kb)); - check(krb5_make_authdata_kdc_issued(ctx, &kb, NULL, list, &enclist)); - krb5_free_keyblock_contents(ctx, &kb); - } else { - check(krb5_encode_authdata_container(ctx, ad_type, list, &enclist)); - } - - /* Grab the first element from the encoded list and free the array. */ - ad = enclist[0]; - free(enclist); - return ad; -} - -/* Parse typestr and contents into an authdata element. */ -static krb5_authdata * -make_authdata(const char *typestr, const char *contents) -{ - krb5_authdata *inner_ad, *ad; - - if (*typestr == '?' || *typestr == '!' || *typestr == '^') { - inner_ad = make_authdata(typestr + 1, contents); - ad = make_container(get_type_for_prefix(*typestr), inner_ad); - free(inner_ad->contents); - free(inner_ad); - return ad; - } - - ad = malloc(sizeof(*ad)); - assert(ad != NULL); - ad->magic = KV5M_AUTHDATA; - ad->ad_type = atoi(typestr); - ad->length = strlen(contents); - ad->contents = (unsigned char *)strdup(contents); - assert(ad->contents != NULL); - return ad; -} - -static krb5_authdata ** -get_container_contents(krb5_authdata *ad, krb5_keyblock *skey, - krb5_keyblock *tktkey) -{ - krb5_authdata **inner_ad; - - if (ad->ad_type == KRB5_AUTHDATA_KDC_ISSUED) - check(krb5_verify_authdata_kdc_issued(ctx, skey, ad, NULL, &inner_ad)); - else if (ad->ad_type == KRB5_AUTHDATA_CAMMAC) - check(k5_unwrap_cammac_svc(ctx, ad, tktkey, &inner_ad)); - else - check(krb5_decode_authdata_container(ctx, ad->ad_type, ad, &inner_ad)); - return inner_ad; -} - -static int -compare_uint32(const void *p1, const void *p2) -{ - uint32_t t1 = *(uint32_t *)p1, t2 = *(uint32_t *)p2; - - return (t1 > t2) ? 1 : (t1 == t2) ? 0 : -1; -} - -static void -display_pac(krb5_authdata *ad, krb5_enc_tkt_part *enc_tkt, - krb5_keyblock *tktkey) -{ - krb5_pac pac; - size_t tlen, i; - uint32_t *types; - - assert(ad->ad_type == KRB5_AUTHDATA_WIN2K_PAC); - check(krb5_pac_parse(ctx, ad->contents, ad->length, &pac)); - - check(krb5_pac_verify(ctx, pac, enc_tkt->times.authtime, enc_tkt->client, - tktkey, NULL)); - - check(krb5_pac_get_types(ctx, pac, &tlen, &types)); - qsort(types, tlen, sizeof(*types), compare_uint32); - - printf("["); - for (i = 0; i < tlen; i++) { - printf("%d", (int)types[i]); - if (i + 1 < tlen) - printf(", "); - } - printf("]"); - - free(types); - krb5_pac_free(ctx, pac); -} - -/* Decode and display authentication indicator authdata. */ -static void -display_auth_indicator(krb5_authdata *ad) -{ - krb5_data **strs = NULL, **p; - - check(k5_authind_decode(ad, &strs)); - assert(strs != NULL); - - printf("["); - for (p = strs; *p != NULL; p++) { - printf("%.*s", (int)(*p)->length, (*p)->data); - if (*(p + 1) != NULL) - printf(", "); - } - printf("]"); - k5_free_data_ptr_list(strs); -} - -/* Display ad as either a hex dump or ASCII text. */ -static void -display_binary_or_ascii(krb5_authdata *ad) -{ - krb5_boolean binary = FALSE; - unsigned char *p; - - for (p = ad->contents; p < ad->contents + ad->length; p++) { - if (!isascii(*p) || !isprint(*p)) - binary = TRUE; - } - if (binary) { - for (p = ad->contents; p < ad->contents + ad->length; p++) - printf("%02X", *p); - } else { - printf("%.*s", (int)ad->length, ad->contents); - } -} - -/* Display the contents of an authdata element, prefixed by prefix_byte. skey - * must be the ticket session key. */ -static void -display_authdata(krb5_authdata *ad, krb5_enc_tkt_part *enc_tkt, - krb5_keyblock *tktkey, int prefix_byte, krb5_boolean pac_ok) -{ - krb5_authdata **inner_ad; - - if (ad->ad_type == KRB5_AUTHDATA_IF_RELEVANT || - ad->ad_type == KRB5_AUTHDATA_MANDATORY_FOR_KDC || - ad->ad_type == KRB5_AUTHDATA_KDC_ISSUED || - ad->ad_type == KRB5_AUTHDATA_CAMMAC) { - if (ad->ad_type != KRB5_AUTHDATA_IF_RELEVANT) - pac_ok = FALSE; - /* Decode and display the contents. */ - inner_ad = get_container_contents(ad, enc_tkt->session, tktkey); - display_authdata_list(inner_ad, enc_tkt, tktkey, get_prefix_byte(ad), - pac_ok); - krb5_free_authdata(ctx, inner_ad); - return; - } - - assert(pac_ok || ad->ad_type != KRB5_AUTHDATA_WIN2K_PAC); - - printf("%c", prefix_byte); - printf("%d: ", (int)ad->ad_type); - - if (ad->ad_type == KRB5_AUTHDATA_WIN2K_PAC) - display_pac(ad, enc_tkt, tktkey); - else if (ad->ad_type == KRB5_AUTHDATA_AUTH_INDICATOR) - display_auth_indicator(ad); - else - display_binary_or_ascii(ad); - printf("\n"); -} - -static void -display_authdata_list(krb5_authdata **list, krb5_enc_tkt_part *tkt_enc, - krb5_keyblock *tktkey, char prefix_byte, - krb5_boolean pac_ok) -{ - if (list == NULL) - return; - /* Only expect a PAC in the first element, if at all. */ - for (; *list != NULL; list++) { - display_authdata(*list, tkt_enc, tktkey, prefix_byte, pac_ok); - pac_ok = FALSE; - } -} - -int -main(int argc, char **argv) -{ - const char *ccname = NULL, *clientname = NULL; - krb5_principal client, server; - krb5_ccache ccache; - krb5_keytab keytab; - krb5_creds in_creds, *creds; - krb5_ticket *ticket; - krb5_authdata **req_authdata = NULL, *ad; - krb5_keytab_entry ktent; - size_t count; - int c; - - check(krb5_init_context(&ctx)); - - while ((c = getopt(argc, argv, "+c:p:")) != -1) { - switch (c) { - case 'c': - ccname = optarg; - break; - case 'p': - clientname = optarg; - break; - default: - abort(); - } - } - argv += optind; - /* Parse arguments. */ - assert(*argv != NULL); - check(krb5_parse_name(ctx, *argv++, &server)); - - count = 0; - for (; argv[0] != NULL && argv[1] != NULL; argv += 2) { - ad = make_authdata(argv[0], argv[1]); - req_authdata = realloc(req_authdata, - (count + 2) * sizeof(*req_authdata)); - assert(req_authdata != NULL); - req_authdata[count++] = ad; - req_authdata[count] = NULL; - } - assert(*argv == NULL); - - if (ccname != NULL) - check(krb5_cc_resolve(ctx, ccname, &ccache)); - else - check(krb5_cc_default(ctx, &ccache)); - - if (clientname != NULL) - check(krb5_parse_name(ctx, clientname, &client)); - else - check(krb5_cc_get_principal(ctx, ccache, &client)); - - memset(&in_creds, 0, sizeof(in_creds)); - in_creds.client = client; - in_creds.server = server; - in_creds.authdata = req_authdata; - *** 43069 LINES SKIPPED *** From nobody Mon Sep 22 15:44:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVnTw580Mz683jD; Mon, 22 Sep 2025 15:44:20 +0000 (UTC) (envelope-from madpilot@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVnTw4RLdz3bv7; Mon, 22 Sep 2025 15:44:20 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758555860; 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:autocrypt:autocrypt; bh=J7ZUtISCuFqL/54Z6PkZsDgfIabTh1gavL3W8vMuTz0=; b=j4GeKRR4h/EplXUN0jrUlq5PHLTd3IWxMrhvFkJhHRz9WLVt4V6LT+JOgRDU5l+Cf9V/HG otawZAJPrv0sLR1FXkO1qBGAuTjcifxFTXQQ9dTrEPpCT4t1GFjKCVAk6zGx3kKizJlzXx gQi++inIHUTYjux2kTFz5rcDuz36hvK0dI8w072aDM/SMgRzPCx8Qq2uv+/qOy1t8SBvJh kn0hULV8rg/cK/DOh4ueSwgVjx10U6SpP/a6ToEJzIU//fFzf+eGCrZcBCcvVyrwbsV9q9 irdAkcQA7fDz5L94bO2WJVRY6aRtvKjB2UkcHO866pzy26NlCx4H2+mivyeS6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758555860; 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:autocrypt:autocrypt; bh=J7ZUtISCuFqL/54Z6PkZsDgfIabTh1gavL3W8vMuTz0=; b=fgs8aiXNpcQEn91tuKdXiiH+fpIqSkFo40avp7tXAh5g4xZyPWOxTeKDXZrscJ06zH1sm9 Bp+D4pKuj2phHyaRVBnykGElzXHIadyVF5X0amIxXELlHgA3aan28Hk6vBB7a66GyK9M4V nzGsub5g4P85P7FUh7BSkbLw4E5jFiT5FHlxjLjohhof4u6SzJYsBlDrOgBwx76ksnv51v Fdz5tfUkMx8p95U2hFKJNcn4GJR7qWbvFSMMfH4CPVfjLArAtYEG0VAakhCSraLYVD9hfp lPpj0POuM6XVMp3ii6nLgvRYkwbqTFFpXVFWRwEirfK+TZTaWtpa5wA7H2LmEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758555860; a=rsa-sha256; cv=none; b=AexacpkiAyD7fXICruIuQxwZG9Jxq6boNRnJXb/yMdu3vigo2YldLFbD7LU8Y6pzgF8orK 1sRiGdyWzYR6EfzTGGCq9VY1EKp3o3OiVlfEx5ElW8uXIZhrWz6WmpWcSPugmcY9K4zEAG Jsx/6I8F0P7HLKe8dmz9+cxJtbYBQJj4u+havmoXIkb/AjiNi/a9/RR+FkjCG1F3kL0cV+ w0ZfGV5B0uCEf58bLax2EDLNg0Bdf+xlAE3ZJMGiKgAZPKoq1JyAewcMhJiTJ6VjXEe356 L0vePuDeBNlIEIle7aZi3WpnD3XdES/r/HlNW205wlMxaL52buo+yN7acOFyNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280::13:1] (unknown [IPv6:2a01:e11:2002:4280::13:1]) (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: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVnTw06KXzvNx; Mon, 22 Sep 2025 15:44:19 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: Date: Mon, 22 Sep 2025 17:44:18 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Guido Falsi Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support To: "Jonathan T. Looney" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> Content-Language: en-US, it, en-GB Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/22/25 17:37, Jonathan T. Looney wrote: > On Mon, Sep 22, 2025 at 3:59 AM Guido Falsi > wrote: > > diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c > index 4f756a75fac7..8ef755e2dc0a 100644 > --- a/sys/netinet6/in6.c > +++ b/sys/netinet6/in6.c > @@ -2604,6 +2604,8 @@ in6_domifattach(struct ifnet *ifp) >         COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat, >             sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK); > > +       ext->dad_failures = counter_u64_alloc(M_WAITOK); > + >         ext->nd_ifinfo = nd6_ifattach(ifp); >         ext->scope6_id = scope6_ifattach(ifp); >         ext->lltable = in6_lltattach(ifp); > @@ -2639,6 +2641,7 @@ in6_domifdetach(struct ifnet *ifp, void *aux) >         COUNTER_ARRAY_FREE(ext->icmp6_ifstat, >             sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); >         free(ext->icmp6_ifstat, M_IFADDR); > +       counter_u64_free(ext->dad_failures); >         free(ext, M_IFADDR); >  } > > > This seems like it is probably a low-frequency event. If so, why is a > counter a better choice for this than an atomic? > I used counters because they were already being used in the netinet6 code, and are a good match for the use. -- Guido Falsi From nobody Mon Sep 22 15:46:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVnX91r1sz683gs; Mon, 22 Sep 2025 15:46:17 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVnX83Rf3z3cGB; Mon, 22 Sep 2025 15:46:16 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=permerror reason="p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com" header.from=cschubert.com (policy=permerror); spf=pass (mx1.freebsd.org: domain of cy.schubert@cschubert.com designates 3.97.99.33 as permitted sender) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id 0a5HvGNYKPzKy0ik4vHdyl; Mon, 22 Sep 2025 15:46:16 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id 0ik2vC3q7WbOa0ik3vBoUi; Mon, 22 Sep 2025 15:46:16 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Q5lx4J2a c=1 sm=1 tr=0 ts=68d16f48 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=yJojWOMRYYMA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=JKdJzE29rHvMBSuvSxcA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 6AF261B58; Mon, 22 Sep 2025 08:46:14 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 49BE518F; Mon, 22 Sep 2025 08:46:14 -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: re@freebsd.org cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 3e13aae0d1f1 - main - krb5: Remove tests In-reply-to: <202509221543.58MFhJ5S014583@gitrepo.freebsd.org> References: <202509221543.58MFhJ5S014583@gitrepo.freebsd.org> Comments: In-reply-to Cy Schubert message dated "Mon, 22 Sep 2025 15:43:19 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 22 Sep 2025 08:46:14 -0700 Message-Id: <20250922154614.49BE518F@slippy.cwsent.com> X-CMAE-Envelope: MS4xfJQbinqDk4e9UsJJQ5FyD10acssbt2Qmw/6LQypeq74PZZ0zE0u/1/HKSNdSykcWku9TsRacZi/Q8ThMueCyQtGTOBrgaqpWj74Hso8HUouQrcCOr6IQ L9EO/hbXUHKIFwQ5QbxTTcfmDdN8KPK48vHymrO1/6Ha9sSGiK3V4PpO5QGRP536qX8lIwGqKlOxRG5eVPzd/kAUywPMhRomZkj0QLnypmfCqHbOkJqZLxb3 A+Ch18xVRwwHO1Xt13BOkiYnNgLSrkrbVcjO+/m0Y01dxeGqH9twpLAQvsRMJqB5p24cfxVaXf22ktCzMDffhZxeDSZF0JRv38C429OUrRY= X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.69)[-0.688]; MV_CASE(0.50)[]; RWL_MAILSPIKE_EXCELLENT(-0.40)[3.97.99.33:from]; R_SPF_ALLOW(-0.20)[+ip4:3.97.99.32/31:c]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.33:from]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DMARC_BAD_POLICY(0.00)[cschubert.com : p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_NA(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; TO_DN_NONE(0.00)[]; REPLYTO_EQ_FROM(0.00)[] X-Rspamd-Queue-Id: 4cVnX83Rf3z3cGB In message <202509221543.58MFhJ5S014583@gitrepo.freebsd.org>, Cy Schubert write s: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3e13aae0d1f1a28352d52e41d6ef8f02 > efd9150e > > commit 3e13aae0d1f1a28352d52e41d6ef8f02efd9150e > Author: Cy Schubert > AuthorDate: 2025-09-22 15:06:41 +0000 > Commit: Cy Schubert > CommitDate: 2025-09-22 15:42:15 +0000 > > krb5: Remove tests > > Tests contains a file that contains spaces in it. This causes the > freebsd-update build scripts some issues. As we don't need the tests > directory let's simply remove it. > > MFC after: 3 days or as determined by re@ > MFC to: stable/15 > --- Hi re@, MFC this sooner than three days if you need to. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Mon Sep 22 16:00:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVnrq5wWMz685TV; Mon, 22 Sep 2025 16:00:43 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVnrq5K7vz3dfL; Mon, 22 Sep 2025 16:00:43 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758556843; 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=CmuK+IFw9q3EmiTFDtO+1JQtwjE4zNJTXwMmqn+wlcM=; b=es9GHf9YxwAZemFAGNAH3+AshOx7IBKxXCs4ie9qz+Xcg1UM8F6zRilM2ya7XEGujEnBd2 IK8Ed8Il9amhjyxS55adtBk0J2D3CdcJ4ypEdLp1Oqs5ViA+PPOBOLuZSiw5E9kqA1SM3+ i89yZYWOcaI08mJ3/UCCy5B5oZIuuEYrA1ioz66SGU014HzWtgdAODTrQFOImDeK8N9fjJ KK29Y+aOk2lHyC1aZuR0iBlgP3p9GeTqHejyR+qtgs7783d0AtAFMxn+cCZF2sw2lByOdv IYblk/ROhw5nAUb9ISUr4SQ8JvKkfNJfBjWaL0wSv9jfAa0SYAk1hovvwbqKLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758556843; 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=CmuK+IFw9q3EmiTFDtO+1JQtwjE4zNJTXwMmqn+wlcM=; b=Yu5DbF4s4Cs0L9FSX5uZX637lMGaIX/GqbkJfeCxctXny2FInDypuRAASRssGpKxdl/E8E +X1SWrqJ+ReuAlw3m9EQ6Bs/4HvgLg/Oi7Avf1VnrB7fToOJx8LlKmKFv2/gS0pv3J6KHL eqhxRup3Y72hSuIdxX70s5MpH2+67LwrSO5V9f3aX3vFx7zRqPF4295nqT977DxWSowcZf VMhy+P0/BX/I/8J8q3JC6f2mKJjvjv/diS77NhdveBQbLNylgX1GVAm6fQYvbTcughDju3 tWNx3OUr8dR+0KgZq+P3nKCVvoXybECP2w2XhyoKsnS3jAZa4SJiUm3md+yIHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758556843; a=rsa-sha256; cv=none; b=SE2nNEG5iECEQ814cok4gRHwsQjWkxgtCxMWYN8P+UwJjClwT+qKnQxhdntQzn439XmLZY 5Jc8+SSP/fF5YRsoOc+4jmjLPWrwMlgph3c3/t0XS/gUnKGLBUEmHAtRsowDzEvQbLg2ca uZDuoaC+0wl2wPRnIzr/ekI2FGie9elAaOqdGIiDSqbO57sFA504Nm6sVsAsc/IrfhlXvB 9hfwu2DwP3QLn/QySosEJumAK8QLJN5f3noUorxKdCskpVLpuKwFHcfFEgBsQf+8jtWMCU mYFUJtMzj9Vl4KTbXagLhabaRAvxLe983ZFuIn/UJYl/13sWyLHYgmW/bOiKqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVnrq0z6hzv15; Mon, 22 Sep 2025 16:00:43 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 22 Sep 2025 09:00:40 -0700 From: Gleb Smirnoff To: Guido Falsi Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support Message-ID: References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> On Mon, Sep 22, 2025 at 07:59:46AM +0000, Guido Falsi wrote: G> commit 0ec13430c583830cc4d29640787e2d154b140e31 G> Author: Guido Falsi G> AuthorDate: 2025-09-22 07:57:39 +0000 G> Commit: Guido Falsi G> CommitDate: 2025-09-22 07:59:36 +0000 G> G> sys/netinet6: Fix ABI breakage introduced with RFC 7217 support G> G> commit 31ec8b6407fdd5a87d70265762457c67ce618283 added a `dad_failures` G> variable to `struct nd_ifinfo`, which broke the netowrking ABI. G> G> This commit fixes it by moving such variable to `struct in6_ifextra` G> which is not a public interface, while `struct nd_ifinfo` is back G> in its original state. G> G> Thanks to kib, markj and glebious for their help and suggestions G> in solving this problem. G> G> Reported by: "Herbert J. Skuhra" G> Tested by: "Herbert J. Skuhra" G> Approved by: glebius G> Fixes: 31ec8b6407fdd5a87d70265762457c67ce618283 This was pushed after the automated creation of the stabweek tag. I will make a note on known regression in the StabWeeks wiki page. -- Gleb Smirnoff From nobody Mon Sep 22 16:42:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVpmh5JDCz687ZV for ; Mon, 22 Sep 2025 16:42:12 +0000 (UTC) (envelope-from 01000199724dd2ac-f218c60e-2b39-42eb-925f-04bcac722134-000000@amazonses.com) Received: from a8-176.smtp-out.amazonses.com (a8-176.smtp-out.amazonses.com [54.240.8.176]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVpmh3NfJz3kxH for ; Mon, 22 Sep 2025 16:42:12 +0000 (UTC) (envelope-from 01000199724dd2ac-f218c60e-2b39-42eb-925f-04bcac722134-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=vnqrkfnvu6csdl6mwgk5t6ix3nnepx57; d=tarsnap.com; t=1758559327; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=ceJSSFlLy54lRy8SpKg83YLWtw3vkuFVAxzua/jowAY=; b=bO72QUH1wUxA5mhShGe3zgRy0LA7RQzhep9hwvbFQydeway2JdlISNSxPf35ZKEd nrJ6uofe68+BfxuPjlibkpmhzJdyn/8mIUnoyxPKmIFJGsPHmTOoB2f+Mb93vsDWvq+ J9vFBbcXz2o5XAGP0oFx2y/n28EZ03ZHHRCfJxCw= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1758559327; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=ceJSSFlLy54lRy8SpKg83YLWtw3vkuFVAxzua/jowAY=; b=AApYPSD+hGEO/Yl+fqdLrK0MpG5zFB20NNsH+Aq9KUF31mOM2IlBtNjqwQoc+8cu pA3wXHl4ZK1TfcG/6FeycmA0tGdkD3J7EpJtEXwlLkuMBtLYYW+7KXBap+niCeokZBz sfzza+IlvuRKPa1ssAPhA932RG5xgaTgUt17nu8g= Message-ID: <01000199724dd2ac-f218c60e-2b39-42eb-925f-04bcac722134-000000@email.amazonses.com> Date: Mon, 22 Sep 2025 16:42:06 +0000 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 3e13aae0d1f1 - main - krb5: Remove tests To: Cy Schubert , re@freebsd.org Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509221543.58MFhJ5S014583@gitrepo.freebsd.org> <20250922154614.49BE518F@slippy.cwsent.com> Content-Language: en-US From: Colin Percival Autocrypt: addr=cperciva@tarsnap.com; keydata= xsFNBGWMSrYBEACdWRqDn3B3SKO7IG0/fGHYtfs26f3Q5QeAcasy1fQLniwGQWn5rlILhbCD K/jdNoDm5Zxq20eqyffoDNObCjnHgg4tGANdi+RmDy+7CDpE789H8dss9y7Pt5DlGGAXQQnt hxush3EYS/Ctprd9UUL/lzOOLOU1aNtzB84tNrJBtcJmL7OYHfyTSNFxvedqJrrasejIQOLI t/DQ89BPzz+vsKHz7FJPXh3fsVkzLA00DJYcfkgxyABfJNA7U6yMwd4DVSdx/SsvfIDMVXnu UXCXswo106WPZbYGlZPpq0wW6iibtTerJix+8AeuwXvl9O1p8yESK4ErkIxCnmghTSz+pdzj z/6xBRkdDM9VdZ0r+CzsaNXMpDOzFuKyjaiYBdgCLljbDnXIHFcqXenrZ7Xwkm09g/M4uVSh pIUG2RYa6tsHSQoGCp3f2RZv1znfViKQFbbL83QjtPA20AhseZSYbHp1FPhXyy9J0wkGL16L e99g6gdGeIRE82BZjBjKGDkoyDPq+oDRSFl8NtzmIKy+cfz00nViqcTF4bREXEawFGhlpO0X O9q8mijI9iFB6zaPBiSdJGBL5ML5qLTNCl8Zlf4m1TBvmRTqF/lzMHVXHidDoUhpSh/y3AFZ 1KrYc27ztJQywDJPJPWPbtY8YhFLFs377gfP8WldsZjzp8nvoQARAQABzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wsGRBBMBCAA7FiEEglY7hNBiDtwN+4ZBOJfy 4i5lrT8FAmWMSyYCGwMICwkNCAwHCwMFFQoJCAsFFgMCAQACHgUCF4AACgkQOJfy4i5lrT+i Yg/+PYyJNoFuygtV5t/skcjYmvEC93mnazEvh+x99vGYZnGKeJ8NDOF4QCUzeHquOWxDi8Zl reXyswKcrIquPxxX6+YyGe97VbvLnez3ksfzOYRj1F4qV0Rq8ZNK51+bvIrbcS3SfDaRioAk D7WWwFor8y/hSwxYkfsKbtP5PRcem20JUxuC085zqWLaKv5t5n2CBzAGMjwJaQ3tM3AXVwWJ uJaHA6ot/6fntJlmkfcyCYyyr0D6b0guRj3STbZ2hNn5o2AI+f6LJJ31s2sPFjl6rs7fORf3 hFSNOHDd2HxfVBXFdQy24ROkC4orBBz2xh9GScjxxT/hbXkfufkubFubw7n0HkvHzA3UF+Qq A8JiI3n+d7ocsP0/5BQ2sZdeqPGJgHx6RkAMuW1tJ29wSvCN1qMgFwhYkpQdfvHlociQrimU fvlRfSrBEe8o7tvIuEdpvwvCZSTJqQbVoMw8UHFE7nzyCXUSab5h6PbjakCqim13ekVO2KFF TTPcz5o5jEeUY75tzbIwcDfFbT5KqNjWy06TVdM9VEJDHSfOfxHR3kSEwZ+tT2aTvL3grsUn gFwSNcj4Cl4CRFfUw8zVZY+7O7RiMlhBqykikvUurrdGKc1Scwa0yuppdA6eVvylyTWSQGrQ +uLWtV1LUKN7ZqKJWBkLPt9nS4XZWGyBvxOHYqjOwU0EZYxKtgEQANYfgbtUMVnhjxDHhWLp g5kLHK3YW0TfJKzpXqDB7NiqxHofn4OcbZnVC3MKggcbs9o1/UtsjnlsG8550PfiYkDXvPiO RJwgbGs6MGIDK797C6cnBLQ8xwBa9SL4cl5iQFnhWmt6vwnJ+an/cm5JpYves3wL7jV09qU9 57hkHXEUcl38r4FssZzVcLKPUVTa3Un+QGRTGDGe/f4ctjMaqv0ZCM+l2ixPhf/vqESrfSLv V/+T3dmtUfXjazO3SABvsHwxgGuTTYOlKoPCaebr+BRdqm0xeIShoIlhvTI8y4clchqx/Uxg UG5X2kvU13k3DS3Q8uLE4Et9x1CcZT6WGgBZSR6R0WfD0SDnzufNnRWJ0dEPA2MtJHE7+85R Vi9j/IgZV+y5Ur+bnPkjDG1s2SVciX5v9HQ0oilcBhvx0j5lGE9hhurD9F+fCvkr4KdbCknE 6Y8ce8pCNBUoB/DqibJivOzTk9K9MGB5x0De5TerIrFiaw3/mQC9nGeO9dtE7wvDJetWeoTq 4BEaCzpufNqbkpOaTQILr4V6Gp7M6v97g83TVAwZntz/q8ptwuKQPZ2JaSFLZn7oWUpYXA5s +SIODFHLn6iMoYpBQskHQjnj4lEPJadl4qj+ZKA89iDAKsniyoFXsbJe2CPbMS1yzBxKZq6K D/jpt7BOnuHr/JrXABEBAAHCwXYEGAEIACAWIQSCVjuE0GIO3A37hkE4l/LiLmWtPwUCZYxK tgIbDAAKCRA4l/LiLmWtP3jmEACQrh9gWe8F1Tkw3m6VoHKwLc5he4tX3WpQa//soPO6iGG3 S3WPruQ46NrAaAojoOcKI9UONDO5rxG0ZTX53S+lu2EO47jbcLwOCjaEpjKpDRt9ZXBQE8Xl mtBE9Bp3W9gpjB1nE3KNM1mJYgsK0QdRpwwfh4pVgGpOj8j23I6MCK+v99zEBnpgCn2GX8W/ kctRXHqWwndHysOJtRP/zrl7dDaABF1f9efUl0LL3TD3GJ9VDz+DNOin/uK2a1hiJo8QzTRk PpfUQ2ebzDsrd1i/pOWkMSkdH+rEu4AGrXWtaBwrMyrGkL6Icb6yO+P9/z0W2wlgBf3P1YRt JPgQt/Dj3yvA/UnaV/QmuVQPjl13o24UnJGsZM8XGnNdfWBKkC1Q6VXC4QT+dyBHYH9MuE9d 6oGl8pFM1+cTfEfbM62/rRoPkF1yHMsI/903VxEvuUIKfhEZAVLFyHldooNxuchntHQP9y8J 8Ou9bWYQP7MnEn+kwSwrZkjurfPkan+xQvp6dDYnj3V0GwA5pprBMaB928VIDVOv+1PNQI3t Cvk5VPv/skq+TJRMHW7bFSt8PRa91cUf1FOLIz9APDiJOzXkwxUEHGV3zPSaUhs1JYjyBeGT wDAvtLUdjOnRhEUOwlnIrztmvyciutjJoVzKEEjj5WXnHk9L9kQ1bpAjkjTONw== In-Reply-To: <20250922154614.49BE518F@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Feedback-ID: ::1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2025.09.22-54.240.8.176 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-Rspamd-Queue-Id: 4cVpmh3NfJz3kxH Hi Cy, Cy Schubert wrote: >> commit 3e13aae0d1f1a28352d52e41d6ef8f02efd9150e >> >> krb5: Remove tests >> >> Tests contains a file that contains spaces in it. This causes the >> freebsd-update build scripts some issues. As we don't need the tests >> directory let's simply remove it. >> >> MFC after: 3 days or as determined by re@ >> MFC to: stable/15 > > MFC this sooner than three days if you need to. I think 3 days is fine; as long as it's there before the end of Thursday UTC. I won't start ALPHA4 builds any earlier than that and freebsd-update builds won't happen again until ALPHA4. Thanks for the quick fix! -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Mon Sep 22 17:39:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVr2J5trhz68BwM; Mon, 22 Sep 2025 17:39:04 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVr2J5FvLz3rbt; Mon, 22 Sep 2025 17:39:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758562744; 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=LnecI+H1+7PmHGYzX2HvB1V8PW2Chf4GH12Vmghuq7A=; b=yYhdFf5b43MNEQ4d1ED/3XHbuOlX6nqlbInzkWkGU2c/AQkhPadGUz7E2zlNu54p1iFXw0 Ai3TOiZj+vBPBWK3HPn8dYgQDnWir5xLUjnis6eQvIT5OkDfY+XEsk2mhfgtWgRS6qCs7W UXhqxr7bsfS+SetIakuLAfoQ0eJOC1b8pMY8NG58QJ9C2cxurqAdKocDlWGxAzkv+J89XK UMrYEpF1sLJ0jDK9Ji+TFTsJCrTzBfVfYXVBh2BoV58jBd7ZCNt3Q7+hyiSo+X3rP3AhoK rUx0IzNIi+srJv14kvas5nc5Z7SuTt+XVVN4TjvmwIZkhCfoIPRNwuVnfARVNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758562744; 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=LnecI+H1+7PmHGYzX2HvB1V8PW2Chf4GH12Vmghuq7A=; b=rq9/p2x7+aPOAa9KwgxyxBdwBQIGdnRvm7LXBBbLHzNF0Ch8A1v+1yvKhMMdtv6vdW35gh jwl/tFaFiPobcIgZOGhY+LNo1zer9GbN3fGCFOQuRedU2APbGY1KBDe8u0J7dJ6GMJrBYo w5yd/j2/aAP21v0FAjD0EW8T0khJiQGChNPUMEbj5k/BqWsX+nlZniEFCkLs+QD/8xXTYc gC6esnvwpIichVTDSabzyo3ABLY9obD63AYyF5BKwqSE9xjWKqG5ozbqO14L5uDm1+AVSe F9kWzsJZ+N3BNTrzRmTZyDgkrhGJKdy3K4KZ9I8gSl5/hh5xN0Y3uDLW2+acvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758562744; a=rsa-sha256; cv=none; b=NZqAwE2nqvM3KdpwbdBd2un9Nz2jA8+fPRBINAqGt0F+RkH6qCNeBvUBbWxc+a3yAz7BsD D253hVhR8Htqtk8yVfuVT0dPpwmPXhtXwVj12VkANn0nm5pu/2LSjSNOTVknLfJrNQ+Svb 4vwOccRYwtcyUgH3RrNKOyfddGCuJ7EHx6FUHyGDAetFPpgNnNyvSuqLXNu6ezU7VcNU/S GaGSaw4Yccj1PbLMl46JUxChSN0VlYbURIQ3Qqaw2IZhIoezL09ldATdgqavOtq0ij8yZZ sQOvmoi14M99PF9gJxThz7PWbwqJYqI8urx9LXAeptLNjd6+AhueCounJg+IwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.103.41.71] (unknown [193.115.216.57]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVr2J1DdBzxNg; Mon, 22 Sep 2025 17:39:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 22 Sep 2025 18:39:02 +0100 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL Content-Language: en-US To: Mateusz Guzik Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/22/25 04:54, Mateusz Guzik wrote: > On Mon, Sep 22, 2025 at 10:41 AM John Baldwin wrote: >> >> On 9/19/25 10:19, Konstantin Belousov wrote: >>> The branch main has been updated by kib: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=40a42785dbba93cc5196178fc49d340c1a89cabe >>> >>> commit 40a42785dbba93cc5196178fc49d340c1a89cabe >>> Author: Konstantin Belousov >>> AuthorDate: 2025-09-11 10:05:04 +0000 >>> Commit: Konstantin Belousov >>> CommitDate: 2025-09-19 14:19:13 +0000 >>> >>> fcntl(F_SETFL): only allow one thread to perform F_SETFL >>> >>> Use f_vflags file locking for this. >>> Allowing more than one thread handling F_SETFL might cause de-sync >>> between real driver state and flags. >>> >>> Reviewed by: markj >>> Tested by: pho >>> Sponsored by: The FreeBSD Foundation >>> MFC after: 2 weeks >>> Differential revision: https://reviews.freebsd.org/D52487 >> >> Thanks for fixing this. I still slightly worry that "home-grown" locks >> aren't visible to WITNESS and it's checking. >> > > Another problem with these is that they don't do adaptive spinning. > > In particular for file offset, it *is* putting threads off cpu in real > workloads when it plausibly could be avoided. > > I think the real thing to do here is to drop the hand-rolled machinery > and use an sx lock. > > Currently struct file is 80 bytes which is a very nasty size from > caching standpoint. > > Locks are 32 bytes in size, which is another problem, but ultimately > one can be added here without growing the struct past 128 bytes. > > The only issue here is that files are marked as NOFREE, so this memory > can *never* be reclaimed. > > One could be tempted to use smr here, but the cost of smr_enter is > prohibitive. There is a lazy variant which does not do atomics, which > perhaps could work, but that 0 users in the tree and was probably > never tested. > > With 32-bit archs going away I don't think it's a big deal though. > > For interested, on Linux the struct is 256 bytes. I had suggested in an earlier review adding an sx-pool similar to our existing mtxpool and using that. That would avoid bloating the structure with a dedicated lock. -- John Baldwin From nobody Mon Sep 22 17:40:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVr4b3CfJz68CBb for ; Mon, 22 Sep 2025 17:41:03 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVr4b0g7Fz3s78 for ; Mon, 22 Sep 2025 17:41:03 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-b07883a5feeso936758566b.1 for ; Mon, 22 Sep 2025 10:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758562856; x=1759167656; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OlePrsfVGeoL5VltgpCewFfLmZKXwnZFN10HP8x32vA=; b=eDMrsdOSN8Wvrd3P7z9iQB04REIxRtNCjhJeP3+k+53scO7qdfkm60dOwIhwqu9DKF ZlYC3vOCPVyS2IB1Y7qpaLPL2ECcdBOWNHcx7TLbieV+C3eUaL1TFLgwaeEml6Q0k7p7 c70kBrAVkdeNskpWTl5plbmBtcuNpWIcMbASPUdlQ/3vtbS5gfY5WyaKTMWEGH8f2Mvb ferR7uOX+zAc9n3Wd7Klv2FCa600NGFUiuX+H4Kx6VwMQFpNvM/cZU1FOWbaJrSdMtHW 0djzLCUXAsSCXb/G5mmbkUoFWtZ6bzDWKIICBMScAOyXKrganKmHw0YVQAx4JbiUmfOw 54Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758562856; x=1759167656; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OlePrsfVGeoL5VltgpCewFfLmZKXwnZFN10HP8x32vA=; b=UroGQ7ifKBc4FdPb9Pok82O8d74e8freW4hAjuwTYjcpi1VtPt9qvQY3JEuAZXpSP1 oFN87Weq84zHWYhuWzlSJzgD46ydiiOyER3LLq0dNgPM5A69ZKrxVqApYDOtuRfFNX7e YkFvfZq7sge22ezynmhujdkWkq6Y2gt2RwiseIi59/r9fznjF7rfKIyRkbEThcqID/4N oTiQ8Bd0sXJy95Yvs6IGsCTUOvgIG6nVcg1uME59t7hv85+lnNQtuaLcTpf8P6INqPvX rkREhNEBtN9XX1fW6aiI5YPTsW1H9fIfOnn7He6xm8Af9mdBAZ+jpEaUogzwU4wm+0p5 8fAw== X-Forwarded-Encrypted: i=1; AJvYcCUAv+Fkqlzo0t7Iy68MphaD/Gsg9tTVlZhMTqFJLvyyBbbc0e5mX5MiolFnH0AWLNb55bPDShQ6zKNzRKwEDBbMc2QKxQ==@freebsd.org X-Gm-Message-State: AOJu0Yy+EUe4I/8UzPx98eETaf2wwFSlVkTazEpRQ5G9dlUodVN0DGc6 TdoULIKNRjkxbre29dHXI2deCheMdurv4v2wGi3reyTgfJTVFF0Hcvb3tjQHvC9wWxPofk51i4x YLCj/60efKufZpTi4gZPjmD+SRXXRc+w= X-Gm-Gg: ASbGnctdc81mA9bUIVRsmUid5GX9VHqLsuK+bdB88C2/11fY134UXYb53uGGgVjCc4l xUpL8NCLX+NIqmRnrz2T7IBoFBn0v1hvp6WW7khG81omSeQQB3OuwLeZ4MbExLvdDmIlG712OxL rbgLqD2tUxgWsEsC+tQUN+v3JN/82so4yGEZxOl7NSXo0D5aeDFoebmsgNDM7IzTutqVF2gSTPR t99g99RkZkmr5bTNANcqA8hfUTu+a89Ear3BQ== X-Google-Smtp-Source: AGHT+IEIhCKsdj0PUsTIVPRKFi1iQx+oNm7Q/YrAKLsI7TsWrgkIhw2ZEkPgz+mfmK8m37P+ZUkEn0nioGPqP3WRjhE= X-Received: by 2002:a17:907:3fa7:b0:b04:a1a4:4bec with SMTP id a640c23a62f3a-b24f6120ff6mr1397440566b.58.1758562855762; Mon, 22 Sep 2025 10:40:55 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> In-Reply-To: From: Mateusz Guzik Date: Mon, 22 Sep 2025 19:40:42 +0200 X-Gm-Features: AS18NWBiCSyd8QewrF__8dE4g78HSKSI2mCPnt6Z70iSetUONTUsYZDPTEKfX2A Message-ID: Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL To: John Baldwin Cc: Konstantin Belousov , 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-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-Rspamd-Queue-Id: 4cVr4b0g7Fz3s78 On Mon, Sep 22, 2025 at 7:39=E2=80=AFPM John Baldwin wrot= e: > > On 9/22/25 04:54, Mateusz Guzik wrote: > > On Mon, Sep 22, 2025 at 10:41=E2=80=AFAM John Baldwin = wrote: > >> > >> On 9/19/25 10:19, Konstantin Belousov wrote: > >>> The branch main has been updated by kib: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D40a42785dbba93cc519617= 8fc49d340c1a89cabe > >>> > >>> commit 40a42785dbba93cc5196178fc49d340c1a89cabe > >>> Author: Konstantin Belousov > >>> AuthorDate: 2025-09-11 10:05:04 +0000 > >>> Commit: Konstantin Belousov > >>> CommitDate: 2025-09-19 14:19:13 +0000 > >>> > >>> fcntl(F_SETFL): only allow one thread to perform F_SETFL > >>> > >>> Use f_vflags file locking for this. > >>> Allowing more than one thread handling F_SETFL might cause de-s= ync > >>> between real driver state and flags. > >>> > >>> Reviewed by: markj > >>> Tested by: pho > >>> Sponsored by: The FreeBSD Foundation > >>> MFC after: 2 weeks > >>> Differential revision: https://reviews.freebsd.org/D52487 > >> > >> Thanks for fixing this. I still slightly worry that "home-grown" lock= s > >> aren't visible to WITNESS and it's checking. > >> > > > > Another problem with these is that they don't do adaptive spinning. > > > > In particular for file offset, it *is* putting threads off cpu in real > > workloads when it plausibly could be avoided. > > > > I think the real thing to do here is to drop the hand-rolled machinery > > and use an sx lock. > > > > Currently struct file is 80 bytes which is a very nasty size from > > caching standpoint. > > > > Locks are 32 bytes in size, which is another problem, but ultimately > > one can be added here without growing the struct past 128 bytes. > > > > The only issue here is that files are marked as NOFREE, so this memory > > can *never* be reclaimed. > > > > One could be tempted to use smr here, but the cost of smr_enter is > > prohibitive. There is a lazy variant which does not do atomics, which > > perhaps could work, but that 0 users in the tree and was probably > > never tested. > > > > With 32-bit archs going away I don't think it's a big deal though. > > > > For interested, on Linux the struct is 256 bytes. > > I had suggested in an earlier review adding an sx-pool similar to our > existing mtxpool and using that. That would avoid bloating the structure > with a dedicated lock. > Per my previous e-mail the offset lock is already contested. Using a pool over a lock embedded into the struct would hinder performance. I explained why I don't consider embedding sx into struct file to be a prob= lem. From nobody Mon Sep 22 17:42:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVr6M5nyQz68CP7; Mon, 22 Sep 2025 17:42:35 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVr6M52ksz3sWV; Mon, 22 Sep 2025 17:42:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758562955; 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=Wk7D1PUDgYRzy/BzlPgjC6lzskMa48u4mPTN1oE5WnQ=; b=cn4f1U+CJldvvlTTj7zZ9P3M2yLZAwfHkPXlDVGCrok2yvwR1lNL/UM85KGvUPReuk8d+l MqKf6o8Fs/+fHyokYQw0FUUwPoGXTYiPXWGiGMm4VR+3vP8qH4XKtFwbZBWDI/hN7lctoj D223MPI8lFw5/C2c2VLxUGlpvgzdzW9Jec+O9IUWC7L7yaj9X8rDRuuJryItLxtHJLzpFp ya8fmE1PRE+NNj8ucupMs8DW6TYtByj+96xlT2FIZlxwGBRHhs2WRVefgtHnXgtWEnEb5e LHJHhSVqCmWTKWn5Qdv4hiZcpXso6lgQZLTEFtRBsA0FJbITV1mQrsB0FgpXNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758562955; 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=Wk7D1PUDgYRzy/BzlPgjC6lzskMa48u4mPTN1oE5WnQ=; b=evlII62VYQ7mQQqJpU9/+2cbw2L7EfeGMEng+Ii91a+HxZR6KHO2T/3W5uGQYnBP3rwTPs dJStQzNpl56c3LrYHspnlSz//cDqjldhyq0v3DCMnte4r73X8hPq4sV74Lxhz8Vr9Bju97 h/YG9/pd2UCKog131HYzUZpvruKwCbBQ0KkY1eRxM9dfUzwT4gLwg5JEETxlJsPX6mgt1e 0MsFkQEj1Ta1vLSk7VH+Zhv765o5i4/m//UEKpYRunR+6XSOGeA1qFTAkxVKGNSBdVGlJa nWC5dSxIj0Q4yWHStz1g3m1NnfVyVO4ZExWsVG60Ozl3WVtfIhIl4ym/Q/eX3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758562955; a=rsa-sha256; cv=none; b=vPVUMx2wCAdzeSIWpViNIswbQsUCn5PZ4MkiIGCcq8QbfIYZRv4V1nAdLbYqoHKQDKYXoS fcWOvVAXjrBSmiEali9fXTR63Pt9g4bYEkfSALxG/uIaCsHXOAY1ySAQksfmy5O/H1ymP/ Qb6qnFv3DSe2x4zaYxwox3SX3+Fec30nMmc2GnY3H/dpm/FovmQNuKTJwwMFD5ZhLtHakZ lC12McizBr4bTknKAA6x7QjH1bMB6nVsuVeLE8Ii6uFeYUi5fJviuUifpen3elQ8HMuzmc mT7kZLjIORkGunIAJnhEzQvfvJIOtM0nMCH+kor6TdOo0fLru4IipId21L8CxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.103.41.71] (unknown [193.115.216.57]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cVr6M0zRZzxxr; Mon, 22 Sep 2025 17:42:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 22 Sep 2025 18:42:34 +0100 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL Content-Language: en-US To: Mateusz Guzik Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/22/25 13:40, Mateusz Guzik wrote: > On Mon, Sep 22, 2025 at 7:39 PM John Baldwin wrote: >> >> On 9/22/25 04:54, Mateusz Guzik wrote: >>> On Mon, Sep 22, 2025 at 10:41 AM John Baldwin wrote: >>>> >>>> On 9/19/25 10:19, Konstantin Belousov wrote: >>>>> The branch main has been updated by kib: >>>>> >>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=40a42785dbba93cc5196178fc49d340c1a89cabe >>>>> >>>>> commit 40a42785dbba93cc5196178fc49d340c1a89cabe >>>>> Author: Konstantin Belousov >>>>> AuthorDate: 2025-09-11 10:05:04 +0000 >>>>> Commit: Konstantin Belousov >>>>> CommitDate: 2025-09-19 14:19:13 +0000 >>>>> >>>>> fcntl(F_SETFL): only allow one thread to perform F_SETFL >>>>> >>>>> Use f_vflags file locking for this. >>>>> Allowing more than one thread handling F_SETFL might cause de-sync >>>>> between real driver state and flags. >>>>> >>>>> Reviewed by: markj >>>>> Tested by: pho >>>>> Sponsored by: The FreeBSD Foundation >>>>> MFC after: 2 weeks >>>>> Differential revision: https://reviews.freebsd.org/D52487 >>>> >>>> Thanks for fixing this. I still slightly worry that "home-grown" locks >>>> aren't visible to WITNESS and it's checking. >>>> >>> >>> Another problem with these is that they don't do adaptive spinning. >>> >>> In particular for file offset, it *is* putting threads off cpu in real >>> workloads when it plausibly could be avoided. >>> >>> I think the real thing to do here is to drop the hand-rolled machinery >>> and use an sx lock. >>> >>> Currently struct file is 80 bytes which is a very nasty size from >>> caching standpoint. >>> >>> Locks are 32 bytes in size, which is another problem, but ultimately >>> one can be added here without growing the struct past 128 bytes. >>> >>> The only issue here is that files are marked as NOFREE, so this memory >>> can *never* be reclaimed. >>> >>> One could be tempted to use smr here, but the cost of smr_enter is >>> prohibitive. There is a lazy variant which does not do atomics, which >>> perhaps could work, but that 0 users in the tree and was probably >>> never tested. >>> >>> With 32-bit archs going away I don't think it's a big deal though. >>> >>> For interested, on Linux the struct is 256 bytes. >> >> I had suggested in an earlier review adding an sx-pool similar to our >> existing mtxpool and using that. That would avoid bloating the structure >> with a dedicated lock. >> > > Per my previous e-mail the offset lock is already contested. > > Using a pool over a lock embedded into the struct would hinder performance. > > I explained why I don't consider embedding sx into struct file to be a problem. Fair enough. Certainly simpler. -- John Baldwin From nobody Mon Sep 22 21:05:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVwcS3wf6z68RTN; Mon, 22 Sep 2025 21:05:28 +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 4cVwcR6b8sz3JcB; Mon, 22 Sep 2025 21:05:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 58ML5Fj1059607; Tue, 23 Sep 2025 00:05:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 58ML5Fj1059607 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 58ML5Fhs059606; Tue, 23 Sep 2025 00:05:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 23 Sep 2025 00:05:15 +0300 From: Konstantin Belousov To: John Baldwin Cc: Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL Message-ID: References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVwcR6b8sz3JcB On Mon, Sep 22, 2025 at 06:42:34PM +0100, John Baldwin wrote: > On 9/22/25 13:40, Mateusz Guzik wrote: > > On Mon, Sep 22, 2025 at 7:39 PM John Baldwin wrote: > > > > > > On 9/22/25 04:54, Mateusz Guzik wrote: > > > > On Mon, Sep 22, 2025 at 10:41 AM John Baldwin wrote: > > > > > > > > > > On 9/19/25 10:19, Konstantin Belousov wrote: > > > > > > The branch main has been updated by kib: > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=40a42785dbba93cc5196178fc49d340c1a89cabe > > > > > > > > > > > > commit 40a42785dbba93cc5196178fc49d340c1a89cabe > > > > > > Author: Konstantin Belousov > > > > > > AuthorDate: 2025-09-11 10:05:04 +0000 > > > > > > Commit: Konstantin Belousov > > > > > > CommitDate: 2025-09-19 14:19:13 +0000 > > > > > > > > > > > > fcntl(F_SETFL): only allow one thread to perform F_SETFL > > > > > > > > > > > > Use f_vflags file locking for this. > > > > > > Allowing more than one thread handling F_SETFL might cause de-sync > > > > > > between real driver state and flags. > > > > > > > > > > > > Reviewed by: markj > > > > > > Tested by: pho > > > > > > Sponsored by: The FreeBSD Foundation > > > > > > MFC after: 2 weeks > > > > > > Differential revision: https://reviews.freebsd.org/D52487 > > > > > > > > > > Thanks for fixing this. I still slightly worry that "home-grown" locks > > > > > aren't visible to WITNESS and it's checking. > > > > > > > > > > > > > Another problem with these is that they don't do adaptive spinning. > > > > > > > > In particular for file offset, it *is* putting threads off cpu in real > > > > workloads when it plausibly could be avoided. > > > > > > > > I think the real thing to do here is to drop the hand-rolled machinery > > > > and use an sx lock. > > > > > > > > Currently struct file is 80 bytes which is a very nasty size from > > > > caching standpoint. > > > > > > > > Locks are 32 bytes in size, which is another problem, but ultimately > > > > one can be added here without growing the struct past 128 bytes. > > > > > > > > The only issue here is that files are marked as NOFREE, so this memory > > > > can *never* be reclaimed. > > > > > > > > One could be tempted to use smr here, but the cost of smr_enter is > > > > prohibitive. There is a lazy variant which does not do atomics, which > > > > perhaps could work, but that 0 users in the tree and was probably > > > > never tested. > > > > > > > > With 32-bit archs going away I don't think it's a big deal though. > > > > > > > > For interested, on Linux the struct is 256 bytes. > > > > > > I had suggested in an earlier review adding an sx-pool similar to our > > > existing mtxpool and using that. That would avoid bloating the structure > > > with a dedicated lock. > > > > > > > Per my previous e-mail the offset lock is already contested. I am curious how they are? If several threads do read(2)/write(2) kind of io on the same fd, they get what they deserve. > > > > Using a pool over a lock embedded into the struct would hinder performance. > > > > I explained why I don't consider embedding sx into struct file to be a problem. Are you saying that struct file falls into 128-byte zone, and has enough space for sx? From nobody Mon Sep 22 21:05:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVwcw24hSz68R7S; Mon, 22 Sep 2025 21:05:52 +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 4cVwcv4xSgz3KDj; Mon, 22 Sep 2025 21:05:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 58ML5jMl059637; Tue, 23 Sep 2025 00:05:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 58ML5jMl059637 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 58ML5jF4059636; Tue, 23 Sep 2025 00:05:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 23 Sep 2025 00:05:45 +0300 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL Message-ID: References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> <02323a46-fb47-444b-812a-1ec199a654d1@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <02323a46-fb47-444b-812a-1ec199a654d1@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cVwcv4xSgz3KDj On Mon, Sep 22, 2025 at 09:50:09AM +0100, John Baldwin wrote: > On 9/22/25 04:41, John Baldwin wrote: > > On 9/19/25 10:19, Konstantin Belousov wrote: > > > The branch main has been updated by kib: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=40a42785dbba93cc5196178fc49d340c1a89cabe > > > > > > commit 40a42785dbba93cc5196178fc49d340c1a89cabe > > > Author: Konstantin Belousov > > > AuthorDate: 2025-09-11 10:05:04 +0000 > > > Commit: Konstantin Belousov > > > CommitDate: 2025-09-19 14:19:13 +0000 > > > > > > fcntl(F_SETFL): only allow one thread to perform F_SETFL > > > Use f_vflags file locking for this. > > > Allowing more than one thread handling F_SETFL might cause de-sync > > > between real driver state and flags. > > > Reviewed by: markj > > > Tested by: pho > > > Sponsored by: The FreeBSD Foundation > > > MFC after: 2 weeks > > > Differential revision: https://reviews.freebsd.org/D52487 > > > > Thanks for fixing this. I still slightly worry that "home-grown" locks > > aren't visible to WITNESS and it's checking. > > > > I was also expecting this to require more changes, but apparently if a > > process directly invokes FIONBIO on a file descriptor, f_flags isn't > > updated currently. I wonder if that is a bug. (Similarly for FIOASYNC.) > > > > Oh, we do handle that, but poorly. We don't revert on errors, and this > > should be updated to use fsetfl_lock now I think: > > > > kern_ioctl(...) > > { > > ... > > switch (com) { > > ... > > case FIONBIO: > > if ((tmp = *(int *)data)) > > atomic_set_int(&fp->f_flag, FNONBLOCK); > > else > > atomic_clear_int(&fp->f_flag, FNONBLOCK); > > data = (void *)&tmp; > > break; > > case FIOASYNC: > > if ((tmp = *(int *)data)) > > atomic_set_int(&fp->f_flag, FASYNC); > > else > > atomic_clear_int(&fp->f_flag, FASYNC); > > data = (void *)&tmp; > > break; > > } > > > > error = fo_ioctl(fp, com, data, td->td_ucred, td); > > out: > > > > I think instead we want something like: > > > > int f_flag; > > > > switch (com) { > > ... > > case FIONBIO: > > case FIOASYNC: > > fsetfl_lock(fp); > > tmp = *(int *)data; > > f_flag = com == FIONBIO ? FNONBLOCK : FASYNC; > > if ((fp->f_flag & f_flag) != 0) { > > This is wrong, should be: > > if (((fp->f_flag & f_flag) != 0) == (tmp != 0)) > > > fsetfl_unlock(fp); > > goto out; > > } > > data = (void *)&tmp; > > break; > > } > > > > error = fo_ioctl(fp, com, data, td->td_ucred, td); > > switch (com) { > > ... > > case FIONBIO: > > case FIOASYNC: > > if (error == 0) { > > if (tmp) > > Probably 'if (tmp != 0)' > > > atomic_set_int(&fp->f_flag, f_flag); > > else > > atomic_clear_int(&fp->f_flag, f_flag); > > } > > fsetfl_unlock(fp); > > break; > > } > > > > out: > > > > This only updates the flag if the underlying ioctl succeeds, and it also > > avoids invoking the underlying ioctl if the flag is already in the correct\ > > state. So will you handle this? From nobody Mon Sep 22 22:38:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVyhL35HKz68Xct; Mon, 22 Sep 2025 22: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVyhL2bp7z3ZZr; Mon, 22 Sep 2025 22: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=1758580738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c0IDkh9wPCXgITv+s/xn87ePq7BN6HHncYJG6Qoz3fs=; b=HzNwj2f1ObAP748Ch2/whV24buI30q2BOGmO1aC84HEWlGVGF2gVFBDSPXhZg6SY1KzB+7 Y+IA2u2B+44ZreNgAnO+7rHpSUofBEZG5fYw1Y1nmLzkRBjnxBtJQkZR1JySSz+AcFyZuQ ur7MWYGCWo/KVEn+LAh2LTnq+pdfWhHKbDl5+tQl7zGTOwcpoZS+Humu2/R6HHBaqOC1uw vKnKfPqalGqK4Lu9Rp6wA6jy99xSXbcPGpTrsZlwpsXKdgi9UZsKLOVZS764hhd74czzq/ LdeqYAdKsS+6YVYkmGpL96PHewHjOq8pqQGR4ApRKIUfb+tTlpwY+fbk/1Z48A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758580738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c0IDkh9wPCXgITv+s/xn87ePq7BN6HHncYJG6Qoz3fs=; b=ABSjiTOGKC3nosjyhbdAHxoLiRxNrnU14ROF4/oEWNrScsJz+1JkwKMEBEVBmykJk1xUQN /U2fRQd7T5E/iLXQHRoa3pf5PAtdP6nGwkDGMJHJiNfxIklvpnBWHTte8KZxHYk8dXJvYh TkEv6+wkp+WXUZQrhZJLh2ds8H735UovcfC6qFAkPX13R33kNrlu9/4U6l9rB4AQFof8oZ fgSsAQiBlXuYcgT9lfaJRsSjZoVK8b3yLaNhg0NWN2rwjUNDAviZGbur05eTpVE9CfkESJ K4NnCYDXiZ9Og5rQktTSIpMJJBPq7RJGvbUmaPSNormV+SPlR6u65pQUMHUIhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758580738; a=rsa-sha256; cv=none; b=TfL/TVesqyI+KhYK1relIu34o26BWCG6uXS5qhAtVjKtHqGITDwcekdTPqsE1P6i4jP+jY 9XlvzFEomEZJY5Ic7zchF/h69PNH9tzq56SD3KoX5mR736iK77OvPV/esZiZluN2jRJIUz Fa5K+L3hmSlVnGsSIyzrvmYWTXUC0bfStcwLHPDfolp1nnUL2XfRG1Kn5KJ4Qe7bsKH8gc sQJGQ19Fs8SE4qKyUPnHutbdPyg1g1+TGzra9xvZd5ljo+kj/nitQZwyA1EPK9Daz4hRMz vi6t2KLqpI8RuW/v1DPuU1ecEDxypJ5wCTzMBV3ZgoKOmIjkKqNYd1w9XRb4YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVyhL27m8z3jC; Mon, 22 Sep 2025 22:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MMcvOB086507; Mon, 22 Sep 2025 22:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MMcvnY086500; Mon, 22 Sep 2025 22:38:57 GMT (envelope-from git) Date: Mon, 22 Sep 2025 22:38:57 GMT Message-Id: <202509222238.58MMcvnY086500@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 88b8b7f0c4e9 - main - crypto/openssl: update component to 3.5.3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88b8b7f0c4e9948667a2279e78e975a784049cba Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=88b8b7f0c4e9948667a2279e78e975a784049cba commit 88b8b7f0c4e9948667a2279e78e975a784049cba Merge: 3e13aae0d1f1 aed904c48f33 Author: Enji Cooper AuthorDate: 2025-09-22 22:31:10 +0000 Commit: Enji Cooper CommitDate: 2025-09-22 22:31:10 +0000 crypto/openssl: update component to 3.5.3 This change updates the sources for crypto/openssl. The subsequent commit will update the build artifacts to match the 3.5.3 release. More details about the update can be found in the related vendor branch commits. MFC after: 1 week Merge commit 'aed904c48f330dc76da942a8ee2d6eef9d11f572' crypto/openssl/.ctags.d/add-dir.ctags | 11 + crypto/openssl/.ctags.d/exclude.ctags | 13 + .../openssl-stage1/10extrac-macrodefs.ctags | 18 + .../.ctags.d/openssl-stage2/10expand-macros.ctags | 9 + crypto/openssl/CHANGES.md | 57 +++ crypto/openssl/Configurations/unix-Makefile.tmpl | 14 +- crypto/openssl/NEWS.md | 14 + crypto/openssl/NOTES-WINDOWS.md | 2 +- crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/asn1parse.c | 2 +- crypto/openssl/apps/cms.c | 1 + crypto/openssl/apps/enc.c | 2 + crypto/openssl/apps/include/apps.h | 1 - crypto/openssl/apps/lib/apps.c | 49 -- crypto/openssl/apps/ocsp.c | 21 +- crypto/openssl/apps/rand.c | 4 +- crypto/openssl/crypto/aes/asm/aes-s390x.pl | 5 +- crypto/openssl/crypto/asn1/asn_mime.c | 22 +- crypto/openssl/crypto/bio/bss_dgram.c | 25 +- crypto/openssl/crypto/dh/dh_check.c | 36 +- crypto/openssl/crypto/dh/dh_key.c | 14 +- crypto/openssl/crypto/dh/dh_pmeth.c | 2 +- crypto/openssl/crypto/encode_decode/decoder_lib.c | 28 ++ crypto/openssl/crypto/encode_decode/decoder_pkey.c | 72 ++- .../openssl/crypto/encode_decode/encoder_local.h | 2 + crypto/openssl/crypto/err/openssl.txt | 1 + crypto/openssl/crypto/evp/asymcipher.c | 8 +- crypto/openssl/crypto/evp/keymgmt_meth.c | 4 +- crypto/openssl/crypto/evp/m_sigver.c | 24 +- crypto/openssl/crypto/evp/p_seal.c | 7 +- crypto/openssl/crypto/evp/skeymgmt_meth.c | 2 +- crypto/openssl/crypto/pkcs7/pk7_doit.c | 7 +- crypto/openssl/crypto/provider_core.c | 10 +- crypto/openssl/crypto/rand/randfile.c | 6 +- crypto/openssl/crypto/riscv32cpuid.pl | 5 +- crypto/openssl/crypto/riscv64cpuid.pl | 5 +- crypto/openssl/crypto/rsa/rsa_gen.c | 15 + crypto/openssl/crypto/rsa/rsa_pmeth.c | 8 +- crypto/openssl/crypto/sleep.c | 39 +- crypto/openssl/crypto/slh_dsa/slh_dsa_key.c | 24 +- crypto/openssl/crypto/slh_dsa/slh_hash.c | 3 + crypto/openssl/crypto/sm2/sm2_sign.c | 6 +- crypto/openssl/crypto/store/store_lib.c | 25 +- crypto/openssl/crypto/x509/by_store.c | 34 +- crypto/openssl/crypto/x509/t_req.c | 6 +- crypto/openssl/crypto/x509/v3_attrdesc.c | 4 +- crypto/openssl/crypto/x509/v3_purp.c | 2 +- crypto/openssl/crypto/x509/x509_ext.c | 20 +- crypto/openssl/crypto/x509/x509_local.h | 1 + crypto/openssl/crypto/x509/x509_lu.c | 6 +- crypto/openssl/crypto/x509/x509_vpm.c | 5 + crypto/openssl/crypto/x509/x_crl.c | 15 +- crypto/openssl/demos/bio/saccept.c | 7 +- crypto/openssl/demos/bio/server-arg.c | 7 +- crypto/openssl/demos/bio/server-cmod.c | 7 +- crypto/openssl/demos/bio/server-conf.c | 7 +- crypto/openssl/demos/certs/mkcerts.sh | 2 +- crypto/openssl/demos/certs/ocspquery.sh | 2 +- crypto/openssl/demos/certs/ocsprun.sh | 4 +- crypto/openssl/demos/cms/cms_ddec.c | 4 +- crypto/openssl/demos/cms/cms_denc.c | 4 +- crypto/openssl/demos/pkey/EVP_PKEY_RSA_keygen.c | 4 +- .../openssl/doc/internal/man3/ossl_namemap_new.pod | 15 +- crypto/openssl/doc/man1/openssl-enc.pod.in | 7 +- crypto/openssl/doc/man1/openssl-fipsinstall.pod.in | 10 +- crypto/openssl/doc/man3/BN_generate_prime.pod | 6 +- crypto/openssl/doc/man3/EVP_EncryptInit.pod | 2 +- crypto/openssl/doc/man3/EVP_PKEY_new.pod | 14 +- crypto/openssl/doc/man3/EVP_aes_128_gcm.pod | 4 +- crypto/openssl/doc/man3/EVP_aria_128_gcm.pod | 4 +- crypto/openssl/doc/man3/EVP_chacha20.pod | 4 +- crypto/openssl/doc/man3/OPENSSL_secure_malloc.pod | 9 +- crypto/openssl/doc/man3/OSSL_CALLBACK.pod | 11 +- crypto/openssl/doc/man3/PEM_read_CMS.pod | 8 +- crypto/openssl/doc/man3/RAND_load_file.pod | 8 +- .../openssl/doc/man3/SSL_CTX_set_domain_flags.pod | 2 +- .../doc/man3/SSL_CTX_set_tmp_dh_callback.pod | 10 +- crypto/openssl/doc/man3/SSL_poll.pod | 24 +- crypto/openssl/doc/man3/d2i_X509.pod | 5 +- crypto/openssl/doc/man5/fips_config.pod | 16 +- crypto/openssl/doc/man7/EVP_ASYM_CIPHER-RSA.pod | 5 +- crypto/openssl/doc/man7/EVP_PKEY-DSA.pod | 4 +- crypto/openssl/doc/man7/EVP_PKEY-FFC.pod | 4 +- crypto/openssl/doc/man7/EVP_SIGNATURE-ML-DSA.pod | 2 +- crypto/openssl/doc/man7/EVP_SIGNATURE-SLH-DSA.pod | 2 +- crypto/openssl/doc/man7/OSSL_PROVIDER-FIPS.pod | 96 ++-- crypto/openssl/doc/man7/provider-base.pod | 31 ++ crypto/openssl/fuzz/dtlsserver.c | 5 +- crypto/openssl/include/crypto/dh.h | 4 +- crypto/openssl/include/crypto/rsa.h | 6 +- crypto/openssl/include/crypto/slh_dsa.h | 2 + crypto/openssl/include/internal/quic_ackm.h | 4 +- crypto/openssl/include/internal/quic_record_rx.h | 11 + crypto/openssl/include/openssl/core_dispatch.h | 4 + crypto/openssl/include/openssl/crypto.h.in | 8 +- crypto/openssl/include/openssl/opensslv.h.in | 9 +- crypto/openssl/include/openssl/pem.h | 1 + crypto/openssl/include/openssl/proverr.h | 1 + crypto/openssl/include/openssl/self_test.h | 2 + crypto/openssl/providers/common/provider_err.c | 2 + .../openssl/providers/common/securitycheck_fips.c | 25 +- crypto/openssl/providers/fips-sources.checksums | 76 +-- crypto/openssl/providers/fips.checksum | 2 +- crypto/openssl/providers/fips/fipsprov.c | 9 + .../providers/fips/include/fips/fipsindicator.h | 3 +- crypto/openssl/providers/fips/self_test.c | 13 +- crypto/openssl/providers/fips/self_test_data.inc | 235 ++++----- .../implementations/asymciphers/rsa_enc.c | 19 +- .../implementations/encode_decode/decode_pem2der.c | 1 + .../providers/implementations/kem/ml_kem_kem.c | 2 +- .../providers/implementations/keymgmt/dh_kmgmt.c | 15 +- .../providers/implementations/keymgmt/ec_kmgmt.c | 17 + .../providers/implementations/keymgmt/ecx_kmgmt.c | 23 +- .../implementations/keymgmt/ml_dsa_kmgmt.c | 13 +- .../implementations/keymgmt/ml_kem_kmgmt.c | 4 +- .../providers/implementations/keymgmt/rsa_kmgmt.c | 1 + .../implementations/keymgmt/slh_dsa_kmgmt.c | 29 +- .../providers/implementations/macs/hmac_prov.c | 17 +- .../providers/implementations/signature/dsa_sig.c | 2 +- .../implementations/signature/ecdsa_sig.c | 2 +- .../providers/implementations/signature/rsa_sig.c | 8 +- crypto/openssl/providers/legacyprov.c | 11 +- crypto/openssl/ssl/d1_lib.c | 2 +- crypto/openssl/ssl/quic/quic_ackm.c | 33 +- crypto/openssl/ssl/quic/quic_channel.c | 18 +- crypto/openssl/ssl/quic/quic_impl.c | 1 + crypto/openssl/ssl/quic/quic_port.c | 3 +- crypto/openssl/ssl/quic/quic_record_rx.c | 10 + crypto/openssl/ssl/quic/quic_record_tx.c | 4 +- crypto/openssl/ssl/quic/quic_rx_depack.c | 28 +- crypto/openssl/ssl/statem/extensions_clnt.c | 10 +- crypto/openssl/test/crltest.c | 127 ++++- crypto/openssl/test/evp_extra_test.c | 43 ++ crypto/openssl/test/fake_rsaprov.c | 548 ++++++++++++++++++++- crypto/openssl/test/ml_kem_internal_test.c | 14 +- crypto/openssl/test/provider_pkey_test.c | 289 ++++++++++- .../hq-interop/quic-hq-interop.c | 3 +- crypto/openssl/test/quic_ackm_test.c | 5 +- crypto/openssl/test/quic_fifd_test.c | 5 +- crypto/openssl/test/quic_txp_test.c | 3 +- crypto/openssl/test/quicapitest.c | 57 +++ crypto/openssl/test/radix/quic_bindings.c | 4 +- crypto/openssl/test/recipes/15-test_ec.t | 14 +- crypto/openssl/test/recipes/20-test_cli_list.t | 25 + .../recipes/30-test_evp_data/evppkey_ecdsa.txt | 11 +- crypto/openssl/test/recipes/80-test_cms.t | 17 + crypto/openssl/test/recipes/90-test_store_cases.t | 26 +- .../recipes/90-test_store_cases_data/test-BER.p12 | Bin 0 -> 2126 bytes .../recipes/90-test_threads_data/store/8489a545.0 | 19 + .../oqsprovider-ca.sh | 58 +++ .../oqsprovider.sh | 2 + crypto/openssl/test/sanitytest.c | 81 ++- crypto/openssl/test/slh_dsa_test.c | 9 +- crypto/openssl/test/testec-sm2.pem | 5 + crypto/openssl/test/threadstest.c | 70 ++- crypto/openssl/test/tls13groupselection_test.c | 19 +- crypto/openssl/test/x509_test.c | 111 ++++- crypto/openssl/util/perl/TLSProxy/Proxy.pm | 27 +- 158 files changed, 2705 insertions(+), 653 deletions(-) diff --cc crypto/openssl/.ctags.d/add-dir.ctags index 000000000000,ec20b51bd4ca..ec20b51bd4ca mode 000000,100644..100644 --- a/crypto/openssl/.ctags.d/add-dir.ctags +++ b/crypto/openssl/.ctags.d/add-dir.ctags diff --cc crypto/openssl/.ctags.d/exclude.ctags index 000000000000,c932464e6dbd..c932464e6dbd mode 000000,100644..100644 --- a/crypto/openssl/.ctags.d/exclude.ctags +++ b/crypto/openssl/.ctags.d/exclude.ctags diff --cc crypto/openssl/.ctags.d/openssl-stage1/10extrac-macrodefs.ctags index 000000000000,ddd4fd54bd04..ddd4fd54bd04 mode 000000,100644..100644 --- a/crypto/openssl/.ctags.d/openssl-stage1/10extrac-macrodefs.ctags +++ b/crypto/openssl/.ctags.d/openssl-stage1/10extrac-macrodefs.ctags diff --cc crypto/openssl/.ctags.d/openssl-stage2/10expand-macros.ctags index 000000000000,5cf5000df3af..5cf5000df3af mode 000000,100644..100644 --- a/crypto/openssl/.ctags.d/openssl-stage2/10expand-macros.ctags +++ b/crypto/openssl/.ctags.d/openssl-stage2/10expand-macros.ctags diff --cc crypto/openssl/crypto/aes/asm/aes-s390x.pl index 5d1283f57690,2345d4574a41..2345d4574a41 mode 100755,100644..100755 --- a/crypto/openssl/crypto/aes/asm/aes-s390x.pl +++ b/crypto/openssl/crypto/aes/asm/aes-s390x.pl diff --cc crypto/openssl/test/recipes/20-test_cli_list.t index 000000000000,a039b20978e4..a039b20978e4 mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/20-test_cli_list.t +++ b/crypto/openssl/test/recipes/20-test_cli_list.t diff --cc crypto/openssl/test/recipes/90-test_store_cases_data/test-BER.p12 index 000000000000,256e697bac1a..256e697bac1a mode 000000,100644..100644 Binary files differ diff --cc crypto/openssl/test/recipes/90-test_threads_data/store/8489a545.0 index 000000000000,7fd65dfe924b..7fd65dfe924b mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/90-test_threads_data/store/8489a545.0 +++ b/crypto/openssl/test/recipes/90-test_threads_data/store/8489a545.0 diff --cc crypto/openssl/test/recipes/95-test_external_oqsprovider_data/oqsprovider-ca.sh index 000000000000,716172f029d3..716172f029d3 mode 000000,100755..100755 --- a/crypto/openssl/test/recipes/95-test_external_oqsprovider_data/oqsprovider-ca.sh +++ b/crypto/openssl/test/recipes/95-test_external_oqsprovider_data/oqsprovider-ca.sh diff --cc crypto/openssl/test/testec-sm2.pem index 000000000000,30e25613b38e..30e25613b38e mode 000000,100644..100644 --- a/crypto/openssl/test/testec-sm2.pem +++ b/crypto/openssl/test/testec-sm2.pem From nobody Mon Sep 22 22:38:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cVyhM3l7Jz68Xp8; Mon, 22 Sep 2025 22:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cVyhM2kwQz3ZX7; Mon, 22 Sep 2025 22:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758580739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMoVndVHJfmCK9H9sqkDRvphyvFzVyoVcV1oykFsCHk=; b=cLsmyw/YdgZyZJzV+JGxyEUp0XfibHSn6BBg3/jB1VCzujja/Q39EAYpegVETA6ovaKEH3 lHSwx3UH9DhyPNAlnML2sx0gfb2nX7fvX2aY1gnOWRolds5JHxYq1CFf0qm5rUcwj+gGDa 2HZZ87+9IryQfRgagEltOk/OQDyOkgM+/c9/HBO0/7yhAXk4Puo+fZVCLWyaXdc0PxlCh8 b3p06w1efBjz0KjdQ80EEOGpKaOGfUE461CXUipnUrTG+Jx9Zcv7H/A/iNu3PBdMrAqLN2 8ayH/DeDLbHTzf05q9Ow4djSO5KYob6Xxb/n8UPQY2zAdJ89NwEol1kR2GqdOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758580739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TMoVndVHJfmCK9H9sqkDRvphyvFzVyoVcV1oykFsCHk=; b=NYyZEctrq+08KdPWOG+24ZUpwpUkB+Uj8Qg4fGwAuTMEmZv1a9b5FPMf2V87ROHibWQjY0 HD6GrRGmPLGJ7qN01DxV8PrEGFaOe6HtJQhCAREOF6Up8Duh/jxPHb7dTn8B3rWD//9ovy JyN/dUrbSCFMLnhLxKa/RuCfSH6DJ50qg8XlgBFBt6W/4tAhPwbWJ9YxhjNraTdh9agHB0 1uss+X9pkwpDmf9FfV3Bbu4kClYycyHkPHHlP+YIFRnR0p2w54xktTkmOKJ3pKF0dsEOgb IP3PGZH9k7gBQXSeXsF8T7PARoaEauqvdyoCI2boopBiyVVL2YTG3cWh+jqtaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758580739; a=rsa-sha256; cv=none; b=nNE/mjS/5a2qQkMO34AK2zWO7qzjaiJYb8xQ+ySna7UCUi9mUz8RN19b3SuRYjneC1+Ce5 6uD3Pdmj3SxvC18VtYX9Fxm2b72jxcgEBtLB6wc8H6tyojrGQbYhIWcFbZYjmqvqXGBQyy EshLGG8U2vhD0pzbE0mimEPEIQWLNP+ynhHvCe/DIh6qO2ASKxBKh9RT3XgxHgjxydStLF WuthRR2X/qJQL/O5Fjzuk3wXot9wpNjSRCmuOoB3YihcrMFt4RTjWxybX0YKryt1zQPuFJ 9elQIAev47PW7jzpjghSuRoqRqHBXS9WAZxj2lUnDPeKFM9uBcvBZS5D6sNvMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cVyhM2HFVz3T8; Mon, 22 Sep 2025 22:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58MMcxPV086547; Mon, 22 Sep 2025 22:38:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58MMcwH8086541; Mon, 22 Sep 2025 22:38:58 GMT (envelope-from git) Date: Mon, 22 Sep 2025 22:38:58 GMT Message-Id: <202509222238.58MMcwH8086541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: d9cc3d558d00 - main - crypto/openssl: update build artifacts for the 3.5.3 release List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9cc3d558d00ee7f62dbef2032f099033c91d2a1 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d9cc3d558d00ee7f62dbef2032f099033c91d2a1 commit d9cc3d558d00ee7f62dbef2032f099033c91d2a1 Author: Enji Cooper AuthorDate: 2025-09-18 19:20:31 +0000 Commit: Enji Cooper CommitDate: 2025-09-22 22:38:36 +0000 crypto/openssl: update build artifacts for the 3.5.3 release This change updates the build artifacts to match the 3.5.3 release. Much of the change involves updating version numbers and release dates to match the release version's metadata. MFC after: 1 week MFC with: 88b8b7f0c4e9948667a2279e78e975a784049cba --- crypto/openssl/configdata.pm | 15 ++-- crypto/openssl/exporters/libcrypto.pc | 2 +- crypto/openssl/exporters/libssl.pc | 2 +- crypto/openssl/exporters/openssl.pc | 2 +- crypto/openssl/include/openssl/crypto.h | 8 +- crypto/openssl/include/openssl/opensslv.h | 19 ++--- crypto/openssl/libcrypto.pc | 2 +- crypto/openssl/libssl.pc | 2 +- crypto/openssl/openssl.pc | 2 +- secure/lib/libcrypto/Makefile.version | 4 +- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_EXTERN_FUNCS.3 | 2 +- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_INTEGER_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_aux_cb.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_item_d2i_bio.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_item_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_item_sign.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 2 +- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_prefix.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_readbuffer.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 2 +- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 2 +- .../libcrypto/man/man3/BIO_get_rpoll_descriptor.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_printf.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_push.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_read.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_core.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_datagram.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_dgram_pair.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_sendmmsg.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_socket_wait.3 | 2 +- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add_word.3 | 2 +- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 2 +- secure/lib/libcrypto/man/man3/BN_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/BN_copy.3 | 2 +- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 8 +- secure/lib/libcrypto/man/man3/BN_mod_exp_mont.3 | 2 +- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 2 +- secure/lib/libcrypto/man/man3/BN_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/BN_rand.3 | 2 +- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 2 +- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 2 +- secure/lib/libcrypto/man/man3/BN_swap.3 | 2 +- secure/lib/libcrypto/man/man3/BN_zero.3 | 2 +- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 2 +- secure/lib/libcrypto/man/man3/CMAC_CTX.3 | 2 +- .../libcrypto/man/man3/CMS_EncryptedData_decrypt.3 | 2 +- .../libcrypto/man/man3/CMS_EncryptedData_encrypt.3 | 2 +- .../libcrypto/man/man3/CMS_EnvelopedData_create.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 2 +- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_compress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_data_create.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_digest_create.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_final.3 | 2 +- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 2 +- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 2 +- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 2 +- .../lib/libcrypto/man/man3/CMS_signed_get_attr.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 2 +- secure/lib/libcrypto/man/man3/COMP_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 2 +- .../libcrypto/man/man3/CONF_modules_load_file.3 | 2 +- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 2 +- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 2 +- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 2 +- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 2 +- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 2 +- secure/lib/libcrypto/man/man3/DES_random_key.3 | 2 +- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 2 +- .../libcrypto/man/man3/DH_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 2 +- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 2 +- secure/lib/libcrypto/man/man3/DH_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DH_size.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 2 +- .../libcrypto/man/man3/DSA_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 2 +- secure/lib/libcrypto/man/man3/DTLSv1_get_timeout.3 | 2 +- .../lib/libcrypto/man/man3/DTLSv1_handle_timeout.3 | 2 +- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 2 +- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 2 +- secure/lib/libcrypto/man/man3/ECDSA_sign.3 | 2 +- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 2 +- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 2 +- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 2 +- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 2 +- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 2 +- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_new.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 2 +- .../lib/libcrypto/man/man3/EVP_ASYM_CIPHER_free.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 2 +- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 2 +- .../man/man3/EVP_CIPHER_CTX_get_original_iv.3 | 2 +- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 2 +- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 4 +- secure/lib/libcrypto/man/man3/EVP_KDF.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_KEM_free.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_KEYEXCH_free.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_KEYMGMT.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_MAC.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PBE_CipherInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY2PKCS8.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_get0_libctx.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_get0_pkey.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_get_algor.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_params.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_check.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_copy_parameters.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_decapsulate.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 2 +- .../man/man3/EVP_PKEY_digestsign_supports_digest.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_encapsulate.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_fromdata.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_get_attr.3 | 2 +- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_get_field_type.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_get_group_name.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_get_size.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_gettable_params.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_is_a.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 16 +++- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 2 +- .../man/man3/EVP_PKEY_set1_encoded_public_key.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set_type.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_settable_params.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_todata.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_RAND.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SIGNATURE.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SKEY.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SKEYMGMT.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aes_128_gcm.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_aria_128_gcm.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 2 +- .../lib/libcrypto/man/man3/EVP_camellia_128_ecb.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 6 +- secure/lib/libcrypto/man/man3/EVP_des_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md4.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md5.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 2 +- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 2 +- .../man/man3/EVP_set_default_properties.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 2 +- secure/lib/libcrypto/man/man3/GENERAL_NAME.3 | 2 +- secure/lib/libcrypto/man/man3/HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/MD5.3 | 2 +- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 2 +- secure/lib/libcrypto/man/man3/NCONF_new_ex.3 | 2 +- secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 2 +- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_FILE.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_gmtime.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_hexchar2int.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 2 +- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 2 +- .../man/man3/OPENSSL_load_builtin_modules.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_load_u16_le.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_riscvcap.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_s390xcap.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 11 ++- secure/lib/libcrypto/man/man3/OPENSSL_strcasecmp.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_ALGORITHM.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CALLBACK.3 | 8 +- secure/lib/libcrypto/man/man3/OSSL_CMP_ATAV_set0.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CMP_CTX_new.3 | 2 +- .../man/man3/OSSL_CMP_HDR_get0_transactionID.3 | 2 +- .../libcrypto/man/man3/OSSL_CMP_ITAV_new_caCerts.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CMP_ITAV_set0.3 | 2 +- .../libcrypto/man/man3/OSSL_CMP_MSG_get0_header.3 | 2 +- .../libcrypto/man/man3/OSSL_CMP_MSG_http_perform.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_CMP_SRV_CTX_new.3 | 2 +- .../libcrypto/man/man3/OSSL_CMP_STATUSINFO_new.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_CMP_exec_certreq.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CMP_log_open.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_CMP_validate_msg.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_CORE_MAKE_FUNC.3 | 2 +- .../libcrypto/man/man3/OSSL_CRMF_MSG_get0_tmpl.3 | 2 +- .../man/man3/OSSL_CRMF_MSG_set0_validity.3 | 2 +- .../man/man3/OSSL_CRMF_MSG_set1_regCtrl_regToken.3 | 2 +- .../man/man3/OSSL_CRMF_MSG_set1_regInfo_certReq.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_CRMF_pbmp_new.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_DECODER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_DECODER_CTX.3 | 2 +- .../man/man3/OSSL_DECODER_CTX_new_for_pkey.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_DECODER_from_bio.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_DISPATCH.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_ENCODER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_ENCODER_CTX.3 | 2 +- .../man/man3/OSSL_ENCODER_CTX_new_for_pkey.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_ENCODER_to_bio.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_ERR_STATE_save.3 | 2 +- .../man/man3/OSSL_ESS_check_signing_certs.3 | 2 +- .../libcrypto/man/man3/OSSL_GENERAL_NAMES_print.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_HPKE_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_HTTP_REQ_CTX.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_HTTP_parse_url.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_HTTP_transfer.3 | 2 +- .../lib/libcrypto/man/man3/OSSL_IETF_ATTR_SYNTAX.3 | 2 +- .../man/man3/OSSL_IETF_ATTR_SYNTAX_print.3 | 2 +- .../man/man3/OSSL_INDICATOR_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_ITEM.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_LIB_CTX.3 | 2 +- .../man/man3/OSSL_LIB_CTX_set_conf_diagnostics.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PARAM.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_BLD.3 | 2 +- .../man/man3/OSSL_PARAM_allocate_from_text.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_dup.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PARAM_int.3 | 2 +- .../libcrypto/man/man3/OSSL_PARAM_print_to_bio.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_PROVIDER.3 | 2 +- .../libcrypto/man/man3/OSSL_QUIC_client_method.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_SELF_TEST_new.3 | 2 +- .../man/man3/OSSL_SELF_TEST_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_attach.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_sleep.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_trace_enabled.3 | 2 +- .../man/man3/OSSL_trace_get_category_num.3 | 2 +- .../libcrypto/man/man3/OSSL_trace_set_channel.3 | 2 +- .../man/man3/OpenSSL_add_all_algorithms.3 | 2 +- secure/lib/libcrypto/man/man3/OpenSSL_version.3 | 2 +- .../libcrypto/man/man3/PBMAC1_get1_pbkdf2_param.3 | 2 +- .../libcrypto/man/man3/PEM_X509_INFO_read_bio_ex.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 10 +-- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 2 +- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 2 +- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 2 +- .../lib/libcrypto/man/man3/PKCS12_PBE_keyivgen.3 | 2 +- .../man/man3/PKCS12_SAFEBAG_create_cert.3 | 2 +- .../libcrypto/man/man3/PKCS12_SAFEBAG_get0_attrs.3 | 2 +- .../libcrypto/man/man3/PKCS12_SAFEBAG_get1_cert.3 | 2 +- .../libcrypto/man/man3/PKCS12_SAFEBAG_set0_attrs.3 | 2 +- .../libcrypto/man/man3/PKCS12_add1_attr_by_NID.3 | 2 +- .../libcrypto/man/man3/PKCS12_add_CSPName_asc.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_add_cert.3 | 2 +- .../man/man3/PKCS12_add_friendlyname_asc.3 | 2 +- .../lib/libcrypto/man/man3/PKCS12_add_localkeyid.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_add_safe.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 2 +- .../lib/libcrypto/man/man3/PKCS12_decrypt_skey.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_gen_mac.3 | 2 +- .../libcrypto/man/man3/PKCS12_get_friendlyname.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_init.3 | 2 +- .../libcrypto/man/man3/PKCS12_item_decrypt_d2i.3 | 2 +- .../libcrypto/man/man3/PKCS12_key_gen_utf8_ex.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 2 +- .../lib/libcrypto/man/man3/PKCS12_pack_p7encdata.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS5_PBE_keyivgen.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 2 +- .../libcrypto/man/man3/PKCS7_get_octet_string.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 2 +- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 2 +- .../lib/libcrypto/man/man3/PKCS7_type_is_other.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS8_encrypt.3 | 2 +- .../lib/libcrypto/man/man3/PKCS8_pkey_add1_attr.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_add.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_egd.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_get0_primary.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 10 ++- secure/lib/libcrypto/man/man3/RAND_set_DRBG_type.3 | 2 +- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 2 +- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 2 +- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_new.3 | 2 +- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_print.3 | 2 +- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_sign.3 | 2 +- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_new.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_print.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_validate.3 | 2 +- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_ASN1.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_ASN1.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 2 +- secure/lib/libcrypto/man/man3/SRP_Calc_B.3 | 2 +- secure/lib/libcrypto/man/man3/SRP_VBASE_new.3 | 2 +- .../lib/libcrypto/man/man3/SRP_create_verifier.3 | 2 +- secure/lib/libcrypto/man/man3/SRP_user_pwd_new.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 2 +- .../man/man3/SSL_COMP_add_compression_method.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 2 +- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 2 +- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 2 +- .../man/man3/SSL_CTX_load_verify_locations.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 2 +- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 2 +- .../man/man3/SSL_CTX_set1_cert_comp_preference.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 2 +- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 2 +- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 2 +- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 2 +- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 2 +- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 2 +- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_domain_flags.3 | 4 +- .../man/man3/SSL_CTX_set_generate_session_id.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 2 +- .../man/man3/SSL_CTX_set_keylog_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 2 +- .../man/man3/SSL_CTX_set_min_proto_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 2 +- .../man/man3/SSL_CTX_set_new_pending_conn_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 2 +- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 2 +- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 2 +- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 2 +- .../man/man3/SSL_CTX_set_security_level.3 | 2 +- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 2 +- .../man/man3/SSL_CTX_set_session_id_context.3 | 2 +- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 2 +- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_srp_password.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 2 +- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 2 +- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 2 +- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 12 +-- .../lib/libcrypto/man/man3/SSL_CTX_set_tmp_ecdh.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 2 +- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 2 +- .../man/man3/SSL_SESSION_get0_id_context.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 2 +- .../man/man3/SSL_SESSION_get_compress_id.3 | 2 +- .../man/man3/SSL_SESSION_get_protocol_version.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_accept.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_accept_stream.3 | 2 +- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_clear.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_connect.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 2 +- .../man/man3/SSL_export_keying_material.3 | 2 +- .../libcrypto/man/man3/SSL_extension_supported.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_free.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get0_connection.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get0_group_name.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_rpk.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 2 +- .../libcrypto/man/man3/SSL_get1_builtin_sigalgs.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_certificate.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 2 +- .../libcrypto/man/man3/SSL_get_conn_close_info.3 | 2 +- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_event_timeout.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_handshake_rtt.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 2 +- .../man/man3/SSL_get_peer_signature_nid.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 2 +- .../libcrypto/man/man3/SSL_get_rpoll_descriptor.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 2 +- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_stream_id.3 | 2 +- .../libcrypto/man/man3/SSL_get_stream_read_state.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_value_uint.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_group_to_name.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_handle_events.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 2 +- .../lib/libcrypto/man/man3/SSL_inject_net_dgram.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 2 +- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new_domain.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new_listener.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new_stream.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_pending.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_poll.3 | 26 ++++--- secure/lib/libcrypto/man/man3/SSL_read.3 | 2 +- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 2 +- .../man/man3/SSL_set1_initial_peer_addr.3 | 2 +- .../libcrypto/man/man3/SSL_set1_server_cert_type.3 | 2 +- .../libcrypto/man/man3/SSL_set_async_callback.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_blocking_mode.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 2 +- .../man/man3/SSL_set_default_stream_mode.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 2 +- .../man/man3/SSL_set_incoming_stream_policy.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_quic_tls_cbs.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_retry_verify.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 2 +- .../libcrypto/man/man3/SSL_set_session_secret_cb.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 2 +- .../lib/libcrypto/man/man3/SSL_stream_conclude.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_stream_reset.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_want.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_write.3 | 2 +- secure/lib/libcrypto/man/man3/TS_RESP_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/TS_VERIFY_CTX.3 | 2 +- secure/lib/libcrypto/man/man3/UI_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 2 +- secure/lib/libcrypto/man/man3/UI_create_method.3 | 2 +- secure/lib/libcrypto/man/man3/UI_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 2 +- secure/lib/libcrypto/man/man3/X509V3_set_ctx.3 | 2 +- .../lib/libcrypto/man/man3/X509_ACERT_add1_attr.3 | 2 +- .../libcrypto/man/man3/X509_ACERT_add_attr_nconf.3 | 2 +- .../man/man3/X509_ACERT_get0_holder_baseCertId.3 | 2 +- .../lib/libcrypto/man/man3/X509_ACERT_get_attr.3 | 2 +- .../lib/libcrypto/man/man3/X509_ACERT_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 2 +- secure/lib/libcrypto/man/man3/X509_ATTRIBUTE.3 | 2 +- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 2 +- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 2 +- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 2 +- .../man/man3/X509_NAME_ENTRY_get_object.3 | 2 +- .../man/man3/X509_NAME_add_entry_by_txt.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 2 +- .../man/man3/X509_NAME_get_index_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_REQ_get_attr.3 | 2 +- .../libcrypto/man/man3/X509_REQ_get_extensions.3 | 2 +- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 2 +- .../man/man3/X509_STORE_CTX_get_by_subject.3 | 2 +- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 2 +- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 2 +- .../man/man3/X509_STORE_set_verify_cb_func.3 | 2 +- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 2 +- secure/lib/libcrypto/man/man3/X509_add_cert.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_host.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 2 +- .../libcrypto/man/man3/X509_check_private_key.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 2 +- secure/lib/libcrypto/man/man3/X509_digest.3 | 2 +- secure/lib/libcrypto/man/man3/X509_dup.3 | 2 +- .../man/man3/X509_get0_distinguishing_id.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 2 +- .../man/man3/X509_get_default_cert_file.3 | 2 +- .../libcrypto/man/man3/X509_get_extension_flags.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/X509_load_http.3 | 2 +- secure/lib/libcrypto/man/man3/X509_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_sign.3 | 2 +- secure/lib/libcrypto/man/man3/X509_verify.3 | 2 +- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/b2i_PVK_bio_ex.3 | 2 +- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_RSAPrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_X509.3 | 7 +- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 2 +- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 2 +- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 2 +- secure/lib/libcrypto/man/man3/s2i_ASN1_IA5STRING.3 | 2 +- secure/lib/libcrypto/man/man5/config.5 | 2 +- secure/lib/libcrypto/man/man5/fips_config.5 | 18 ++--- secure/lib/libcrypto/man/man5/x509v3_config.5 | 2 +- .../lib/libcrypto/man/man7/EVP_ASYM_CIPHER-RSA.7 | 7 +- .../lib/libcrypto/man/man7/EVP_ASYM_CIPHER-SM2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-AES.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-ARIA.7 | 2 +- .../lib/libcrypto/man/man7/EVP_CIPHER-BLOWFISH.7 | 2 +- .../lib/libcrypto/man/man7/EVP_CIPHER-CAMELLIA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-CAST.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-CHACHA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-DES.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-IDEA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-NULL.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC4.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-RC5.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-SEED.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_CIPHER-SM4.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-ARGON2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-HKDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-HMAC-DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-KB.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-KRB5KDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-PBKDF1.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-PBKDF2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-PKCS12KDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-PVKKDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-SCRYPT.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-SS.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-SSHKDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-TLS13_KDF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-TLS1_PRF.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-X942-ASN1.7 | 2 +- .../lib/libcrypto/man/man7/EVP_KDF-X942-CONCAT.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KDF-X963.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEM-EC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEM-ML-KEM.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEM-RSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEM-X25519.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-DH.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-ECDH.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_KEYEXCH-X25519.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-BLAKE2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-CMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-GMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-HMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-KMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-Poly1305.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MAC-Siphash.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-BLAKE2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-KECCAK.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MD2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MD4.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MD5-SHA1.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MD5.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-MDC2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-NULL.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-RIPEMD160.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA1.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SHA3.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SHAKE.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-SM3.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-WHIRLPOOL.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_MD-common.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-DH.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-DSA.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-EC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-FFC.7 | 6 +- secure/lib/libcrypto/man/man7/EVP_PKEY-HMAC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-ML-DSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-ML-KEM.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-RSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-SLH-DSA.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-SM2.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_PKEY-X25519.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-CRNG-TEST.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-CTR-DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-HASH-DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-HMAC-DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-JITTER.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-SEED-SRC.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND-TEST-RAND.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_RAND.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-DSA.7 | 2 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-ECDSA.7 | 2 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-ED25519.7 | 2 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-HMAC.7 | 2 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-ML-DSA.7 | 4 +- secure/lib/libcrypto/man/man7/EVP_SIGNATURE-RSA.7 | 2 +- .../lib/libcrypto/man/man7/EVP_SIGNATURE-SLH-DSA.7 | 4 +- secure/lib/libcrypto/man/man7/OSSL_PROVIDER-FIPS.7 | 87 ++++++++++------------ secure/lib/libcrypto/man/man7/OSSL_PROVIDER-base.7 | 2 +- .../lib/libcrypto/man/man7/OSSL_PROVIDER-default.7 | 2 +- .../lib/libcrypto/man/man7/OSSL_PROVIDER-legacy.7 | 2 +- secure/lib/libcrypto/man/man7/OSSL_PROVIDER-null.7 | 2 +- .../lib/libcrypto/man/man7/OSSL_STORE-winstore.7 | 2 +- secure/lib/libcrypto/man/man7/RAND.7 | 2 +- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 2 +- secure/lib/libcrypto/man/man7/X25519.7 | 2 +- secure/lib/libcrypto/man/man7/bio.7 | 2 +- secure/lib/libcrypto/man/man7/ct.7 | 2 +- secure/lib/libcrypto/man/man7/des_modes.7 | 2 +- secure/lib/libcrypto/man/man7/evp.7 | 2 +- secure/lib/libcrypto/man/man7/fips_module.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-cipher.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-digest.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-kdf.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-mac.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-pkey.7 | 2 +- secure/lib/libcrypto/man/man7/life_cycle-rand.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-core.h.7 | 2 +- .../libcrypto/man/man7/openssl-core_dispatch.h.7 | 2 +- .../lib/libcrypto/man/man7/openssl-core_names.h.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-env.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-glossary.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-qlog.7 | 2 +- .../libcrypto/man/man7/openssl-quic-concurrency.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-quic.7 | 2 +- secure/lib/libcrypto/man/man7/openssl-threads.7 | 2 +- .../lib/libcrypto/man/man7/openssl_user_macros.7 | 2 +- .../libcrypto/man/man7/ossl-guide-introduction.7 | 2 +- .../man/man7/ossl-guide-libcrypto-introduction.7 | 2 +- .../man/man7/ossl-guide-libraries-introduction.7 | 2 +- .../man/man7/ossl-guide-libssl-introduction.7 | 2 +- .../lib/libcrypto/man/man7/ossl-guide-migration.7 | 2 +- .../man/man7/ossl-guide-quic-client-block.7 | 2 +- .../man/man7/ossl-guide-quic-client-non-block.7 | 2 +- .../man/man7/ossl-guide-quic-introduction.7 | 2 +- .../man/man7/ossl-guide-quic-multi-stream.7 | 2 +- .../man/man7/ossl-guide-quic-server-block.7 | 2 +- .../man/man7/ossl-guide-quic-server-non-block.7 | 2 +- .../man/man7/ossl-guide-tls-client-block.7 | 2 +- .../man/man7/ossl-guide-tls-client-non-block.7 | 2 +- .../man/man7/ossl-guide-tls-introduction.7 | 2 +- .../man/man7/ossl-guide-tls-server-block.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store.7 | 2 +- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 2 +- secure/lib/libcrypto/man/man7/property.7 | 2 +- .../lib/libcrypto/man/man7/provider-asym_cipher.7 | 2 +- secure/lib/libcrypto/man/man7/provider-base.7 | 29 +++++++- secure/lib/libcrypto/man/man7/provider-cipher.7 | 2 +- secure/lib/libcrypto/man/man7/provider-decoder.7 | 2 +- secure/lib/libcrypto/man/man7/provider-digest.7 | 2 +- secure/lib/libcrypto/man/man7/provider-encoder.7 | 2 +- secure/lib/libcrypto/man/man7/provider-kdf.7 | 2 +- secure/lib/libcrypto/man/man7/provider-kem.7 | 2 +- secure/lib/libcrypto/man/man7/provider-keyexch.7 | 2 +- secure/lib/libcrypto/man/man7/provider-keymgmt.7 | 2 +- secure/lib/libcrypto/man/man7/provider-mac.7 | 2 +- secure/lib/libcrypto/man/man7/provider-object.7 | 2 +- secure/lib/libcrypto/man/man7/provider-rand.7 | 2 +- secure/lib/libcrypto/man/man7/provider-signature.7 | 2 +- secure/lib/libcrypto/man/man7/provider-skeymgmt.7 | 2 +- secure/lib/libcrypto/man/man7/provider-storemgmt.7 | 2 +- secure/lib/libcrypto/man/man7/provider.7 | 2 +- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 2 +- secure/lib/libcrypto/man/man7/x509.7 | 2 +- secure/usr.bin/openssl/man/CA.pl.1 | 2 +- secure/usr.bin/openssl/man/openssl-asn1parse.1 | 2 +- secure/usr.bin/openssl/man/openssl-ca.1 | 2 +- secure/usr.bin/openssl/man/openssl-ciphers.1 | 2 +- secure/usr.bin/openssl/man/openssl-cmds.1 | 2 +- secure/usr.bin/openssl/man/openssl-cmp.1 | 2 +- secure/usr.bin/openssl/man/openssl-cms.1 | 2 +- secure/usr.bin/openssl/man/openssl-crl.1 | 2 +- secure/usr.bin/openssl/man/openssl-crl2pkcs7.1 | 2 +- secure/usr.bin/openssl/man/openssl-dgst.1 | 2 +- secure/usr.bin/openssl/man/openssl-dhparam.1 | 2 +- secure/usr.bin/openssl/man/openssl-dsa.1 | 2 +- secure/usr.bin/openssl/man/openssl-dsaparam.1 | 2 +- secure/usr.bin/openssl/man/openssl-ec.1 | 2 +- secure/usr.bin/openssl/man/openssl-ecparam.1 | 2 +- secure/usr.bin/openssl/man/openssl-enc.1 | 11 ++- secure/usr.bin/openssl/man/openssl-engine.1 | 2 +- secure/usr.bin/openssl/man/openssl-errstr.1 | 2 +- secure/usr.bin/openssl/man/openssl-fipsinstall.1 | 12 +-- .../usr.bin/openssl/man/openssl-format-options.1 | 2 +- secure/usr.bin/openssl/man/openssl-gendsa.1 | 2 +- secure/usr.bin/openssl/man/openssl-genpkey.1 | 2 +- secure/usr.bin/openssl/man/openssl-genrsa.1 | 2 +- secure/usr.bin/openssl/man/openssl-info.1 | 2 +- secure/usr.bin/openssl/man/openssl-kdf.1 | 2 +- secure/usr.bin/openssl/man/openssl-list.1 | 2 +- secure/usr.bin/openssl/man/openssl-mac.1 | 2 +- .../openssl/man/openssl-namedisplay-options.1 | 2 +- secure/usr.bin/openssl/man/openssl-nseq.1 | 2 +- secure/usr.bin/openssl/man/openssl-ocsp.1 | 2 +- .../openssl/man/openssl-passphrase-options.1 | 2 +- secure/usr.bin/openssl/man/openssl-passwd.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkcs12.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkcs7.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkcs8.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkey.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkeyparam.1 | 2 +- secure/usr.bin/openssl/man/openssl-pkeyutl.1 | 2 +- secure/usr.bin/openssl/man/openssl-prime.1 | 2 +- secure/usr.bin/openssl/man/openssl-rand.1 | 2 +- secure/usr.bin/openssl/man/openssl-rehash.1 | 2 +- secure/usr.bin/openssl/man/openssl-req.1 | 2 +- secure/usr.bin/openssl/man/openssl-rsa.1 | 2 +- secure/usr.bin/openssl/man/openssl-rsautl.1 | 2 +- secure/usr.bin/openssl/man/openssl-s_client.1 | 2 +- secure/usr.bin/openssl/man/openssl-s_server.1 | 2 +- secure/usr.bin/openssl/man/openssl-s_time.1 | 2 +- secure/usr.bin/openssl/man/openssl-sess_id.1 | 2 +- secure/usr.bin/openssl/man/openssl-skeyutl.1 | 2 +- secure/usr.bin/openssl/man/openssl-smime.1 | 2 +- secure/usr.bin/openssl/man/openssl-speed.1 | 2 +- secure/usr.bin/openssl/man/openssl-spkac.1 | 2 +- secure/usr.bin/openssl/man/openssl-srp.1 | 2 +- secure/usr.bin/openssl/man/openssl-storeutl.1 | 2 +- secure/usr.bin/openssl/man/openssl-ts.1 | 2 +- .../openssl/man/openssl-verification-options.1 | 2 +- secure/usr.bin/openssl/man/openssl-verify.1 | 2 +- secure/usr.bin/openssl/man/openssl-version.1 | 2 +- secure/usr.bin/openssl/man/openssl-x509.1 | 2 +- secure/usr.bin/openssl/man/openssl.1 | 2 +- secure/usr.bin/openssl/man/tsget.1 | 2 +- 903 files changed, 1078 insertions(+), 1036 deletions(-) diff --git a/crypto/openssl/configdata.pm b/crypto/openssl/configdata.pm index ec70eaba9f07..8ea23bf8a681 100755 --- a/crypto/openssl/configdata.pm +++ b/crypto/openssl/configdata.pm @@ -30,6 +30,7 @@ our %config = ( "FIPSKEY" => "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813", "FIPS_VENDOR" => "OpenSSL non-compliant FIPS Provider", "HASHBANGPERL" => "/usr/bin/env perl", + "LD" => "ld", "LDFLAGS" => [], "LDLIBS" => [], "OBJCOPY" => "objcopy", @@ -167,7 +168,7 @@ our %config = ( ], "dynamic_engines" => "1", "ex_libs" => [], - "full_version" => "3.5.1", + "full_version" => "3.5.3", "includes" => [], "ktls" => "", "lflags" => [], @@ -231,10 +232,10 @@ our %config = ( "openssl_sys_defines" => [], "openssldir" => "etc", "options" => "enable-ec_nistp_64_gcc_128 enable-ktls enable-sctp --openssldir=etc --prefix=/usr no-acvp-tests no-afalgeng no-aria no-asan no-brotli no-brotli-dynamic no-buildtest-c++ no-crypto-mdebug no-crypto-mdebug-backtrace no-demos no-egd no-external-tests no-fips no-fips-jitter no-fips-post no-fips-securitychecks no-fuzz-afl no-fuzz-libfuzzer no-h3demo no-hqinterop no-idea no-jitter no-md2 no-mdc2 no-msan no-pie no-rc5 no-sm2 no-sm3 no-sm4 no-ssl3 no-ssl3-method no-sslkeylog no-tfo no-trace no-ubsan no-unit-test no-uplink no-weak-ssl-ciphers no-winstore no-zlib no-zlib-dynamic no-zstd no-zstd-dynamic", - "patch" => "1", + "patch" => "3", "perl_archname" => "amd64-freebsd-thread-multi", "perl_cmd" => "/usr/local/bin/perl", - "perl_version" => "5.40.2", + "perl_version" => "5.40.3", "perlargv" => [ "disable-aria", "disable-egd", @@ -255,7 +256,7 @@ our %config = ( "AS" => undef, "ASFLAGS" => undef, "BUILDFILE" => undef, - "CC" => undef, + "CC" => "cc", "CFLAGS" => undef, "CPP" => undef, "CPPDEFINES" => undef, @@ -265,7 +266,7 @@ our %config = ( "CXX" => undef, "CXXFLAGS" => undef, "HASHBANGPERL" => undef, - "LD" => undef, + "LD" => "ld", "LDFLAGS" => undef, "LDLIBS" => undef, "MT" => undef, @@ -290,11 +291,11 @@ our %config = ( "prerelease" => "", "processor" => "", "rc4_int" => "unsigned int", - "release_date" => "1 Jul 2025", + "release_date" => "16 Sep 2025", "shlib_version" => "3", "sourcedir" => ".", "target" => "BSD-x86_64", - "version" => "3.5.1" *** 12454 LINES SKIPPED *** From nobody Tue Sep 23 08:37:28 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWCyw5sCCz68K0L; Tue, 23 Sep 2025 08:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWCyw4tsdz3rlG; Tue, 23 Sep 2025 08:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758616648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pOIhXsKp+vwe8/I2BMGnyRYyBTo7m0MIrMXhpeSCwhc=; b=NOC7C8FiHcndfd0o3Vw8bD/igvQ4sn0/k749UNqwOoc6Gyfs9fiajxx50QdhHmDEa8wRN+ ZKylGoE4tydARWn8f54YFNQzQpmeB5/b/EZFGXfaFxc5dG8iYMabRRAabCxgrW/vp7hEJw f7uCWARTRvd9TZ0FTjXnONtC20XgnguM3yOhNUhJq+xOQvRkWZP1yRAAKte+2kH+FHMWhL 2ev9MikcfwkHze9eSDKmWd6FKOmt+n+ZKA/Kolf6vrOX0z1115yk/fCLu5ujT9/gH+BsnB dmm+HNII9BkIEYKKHRNtssdyvd+93H8w980WR9brKIPl/2vCs1M4cuO8svtxHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758616648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pOIhXsKp+vwe8/I2BMGnyRYyBTo7m0MIrMXhpeSCwhc=; b=poqshDM9Vu+1umSEbF6jhCB0Jud1PBWhDjnBPIHFfVK0q9PLddeu4oyEPOhUDhvukp3dZi UOaSuBx12sFd5YV6elFtO2fzkBYVuFMxIpz5C3YHZlQZy0HllvAOk/A3ed4mVKsLCKj6K6 m1hZeMoef/QfsbbYcWTf+pvawGsy7RwjCoEZctyZmIXgeRheZ0x33HGy0tI6XEMdxlCxqW NAK2UYnBSFZOorxMYJ4Kztp/GiJERO4q3/rSK2vrgwzH4rfSooXECc7BCkx+c38u9VEO8Z pZl0b/ZY0XujxmUbcav1tUr5FdZVgf5HubanQQCgjw5PIPClGCocKBUhKUwIdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758616648; a=rsa-sha256; cv=none; b=TDAk8OeRBJPNOx5h8p7Es6FE8TmLlrYjRViPYetHWWFkWCUeqLQT0ZQgb68OE8gQ/sY9a8 sNV79ATeIZN3FrkaDw2iNQbbYk70OwmzLcBo5prFVOglQJySaGjGiXNgYRzneXoBAw+y80 Cnrpul37PM+DBVXRHGicOuRm9o6IDd1ATouXL+EAXK/IgifDnkigf7/4PrZtjdptJ/s8MZ vhJvSyjQDzyWxKFkE7vzNByKL0WDFHxUOsqxMXkPyI8WxdckJlSszeNgPuLQKBEfsMvDer 4f23l827rgGsQbGag7zI8eVZs+rgM5xp/eX1WF9VdCr7y0w+MPzzLc6qSzUpmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWCyw4DCqzfRf; Tue, 23 Sep 2025 08:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58N8bS2j013494; Tue, 23 Sep 2025 08:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58N8bS4F013491; Tue, 23 Sep 2025 08:37:28 GMT (envelope-from git) Date: Tue, 23 Sep 2025 08:37:28 GMT Message-Id: <202509230837.58N8bS4F013491@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: f586fc0cf8ff - main - rc.d/moused: Fix misplaced `basename` List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f586fc0cf8ff54393a3db565437788a12bdc6e99 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=f586fc0cf8ff54393a3db565437788a12bdc6e99 commit f586fc0cf8ff54393a3db565437788a12bdc6e99 Author: Vladimir Kondratyev AuthorDate: 2025-09-23 08:33:03 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-09-23 08:36:33 +0000 rc.d/moused: Fix misplaced `basename` This fixes "usage: basename string [suffix]" message. Reported by: cy MFC after: 1 day --- libexec/rc/rc.d/moused | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused index 35a26bd57275..e267ae5b3cd8 100755 --- a/libexec/rc/rc.d/moused +++ b/libexec/rc/rc.d/moused @@ -46,8 +46,8 @@ moused_start() # the moused_port variable, which if not defined sets it to the # passed in device name. # - ms=`basename $1` - if [ -n "$ms" ]; then + if [ -n "$1" ]; then + ms=`basename $1` eval myflags=\${moused_${ms}_flags-$moused_flags} eval myport=\${moused_${ms}_port-/dev/$1} eval mytype=\${moused_${ms}_type-$moused_type} From nobody Tue Sep 23 09:50:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWFbq6tf7z68PPK for ; Tue, 23 Sep 2025 09:51:03 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWFbq4rmkz45v2 for ; Tue, 23 Sep 2025 09:51:03 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-62fa99bcfcdso7813354a12.0 for ; Tue, 23 Sep 2025 02:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758621062; x=1759225862; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=V4giJWC/+uACYkH8OgTwb0xX9epOJOFH20WVIPjHeQA=; b=HJJ5zEoS+c/F8YvGrCnvrcZqP6+9p2zUp8xYGWTNWcEV4ISjae5NrPcyVEZ9P2bMdQ D4P6Uyr3+hzxsxpXLfIl5cYKxEZf3QQ07mjWn+FTm/o7XGN739hOeKsjNRQBJ0kFmM7D jnUPy7LNYefJ1w9awmFfINmHPhw1Q9BntUzhGfjPr159l+MXIDcLJaKZBooT2qjTNM8Q Zqpu9qGy9sWlsDLEkbjqD9fNppgIdwGRa9uogN20pEZ3k7ItLXSGTd8tGGCtcnyDZyb6 ZJ/hY0YrrTroi2hPTx5E0rAgSGL8nCKcDN8zNpSzZ0heb2OCM8JdYJL5698LoAyHBU9w yu+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758621062; x=1759225862; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V4giJWC/+uACYkH8OgTwb0xX9epOJOFH20WVIPjHeQA=; b=oNSjmCFMJb6Ve0Q94UEZ2ejGP1QRR3QvVU7FNNNXXkqiQukZUirTUj0eum7f0RwchM gb8gqki3coXkhB75SM5uAne4Q93KZkVjzeiKoYrKGdXw/lbOBlfO9MKhNZiLXyKKU1C8 9uqO1LNTRg0Paa3h6noMwE65mnC+Cwye9Is9HhVWMyP0PSw4B3gWxtZvKBPfB0iFGQL+ Jyj+2bKdZmKiplZW77NrjM/F9HCbsxzz2jSu6ckDGB9yhcDS/PbEb7yWC/ejlmnqHgzZ lYbubkIoWUuE6v+VyYA9kNTWx/mN/I14sMobuRfKmCLEcch9VkXm7Tk8sutRxXd0ObPe 1yag== X-Forwarded-Encrypted: i=1; AJvYcCUqRb5B8jSKYTL+eOoXYc/Bo17vw3jekepwsBBtGfc0FlxgLI8F5DKgraXuz1miacCRBh+kSYab/XgQYZQB4mH4TJq6tg==@freebsd.org X-Gm-Message-State: AOJu0YyEUqwLqosSGxIam/W/m1yNRY0WH2RkgvdMnLWtvVEm17CeLJft DHluoPQyUPD5fIKdgjnRTqo3GQoGW7aNV73PCbBW4AXafQx07EMmIFvA/EUZZEg8WzCzFBBCr1v p+/Mq9ti3ykp1/FltJDLqal8KV/U+L/6wiLzo X-Gm-Gg: ASbGncvknlVzgoD6VNjjfkx3769+C7kPLm0/+QDltRUUXUnGig9b8FglC8SEYH0KRvz 0A1ZQBo5FddxChEpEqxHxpyC1yy17toZjtCWkmWOGcUf7WCuYw9Wxjxe9a1hnEe0pTOlLPt7TS1 YiJPJWLz1xOTTmRuO4nnKsctwac5c/JPHuTTOv0q2PcAUA/ZHNROf4HkZzQXbwKE/Cg5ZA4z0KQ x+TlOzakpmWQBmAWMs9ScJTMwoFQI+tnkfTTQ== X-Google-Smtp-Source: AGHT+IHXYSJAOdQyatTZQ9a9DHt8PgSmTLwIe8EgP9G69ho0wEYqOMIrq7k7sEeQ8wNHXnXMvzdRFmsk8dFWqsf5ol8= X-Received: by 2002:a05:6402:2682:b0:62f:b45d:2191 with SMTP id 4fb4d7f45d1cf-634678057acmr1760061a12.33.1758621062328; Tue, 23 Sep 2025 02:51:02 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> In-Reply-To: From: Mateusz Guzik Date: Tue, 23 Sep 2025 11:50:49 +0200 X-Gm-Features: AS18NWCax9YlSMN1vp1BB_64vBiDcvf_iFXJfL-3vDSZ7Fdr4ri30QuCkmq1jw0 Message-ID: Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL To: Konstantin Belousov Cc: John Baldwin , 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-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-Rspamd-Queue-Id: 4cWFbq4rmkz45v2 On Mon, Sep 22, 2025 at 11:05=E2=80=AFPM Konstantin Belousov wrote: > > > On 9/22/25 13:40, Mateusz Guzik wrote: > > > Per my previous e-mail the offset lock is already contested. > I am curious how they are? > If several threads do read(2)/write(2) kind of io on the same fd, > they get what they deserve. > I don't know who, I had seen them with poudriere: https://people.freebsd.org/~mjg/poudriere-offcpu-32kpkg.svg?s=3Dvofflock Note the % would be higher if it was not for other problems. > > > > > > Using a pool over a lock embedded into the struct would hinder perfor= mance. > > > > > > I explained why I don't consider embedding sx into struct file to be = a problem. > > Are you saying that struct file falls into 128-byte zone, and has enough > space for sx? It is 80 bytes now. adding 32 still leaves 16 bytes free. From nobody Tue Sep 23 10:11:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWG3z643Rz68Qbf; Tue, 23 Sep 2025 10:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWG3z4wc4z47Zb; Tue, 23 Sep 2025 10:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758622319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GrJyAVbm4laFs+F0N7n05Ni1cVKUQn0Ky1fcAz1dwUk=; b=DR3qwFFS6zq+y47FeanCurGf57YOl2kOZB5hC3+U96778fxenIFbbCokxs+T6SY+UvUmXI tV9WxaP9B/lbBm5lSTTLgp3zMvzy+gISNk1UAX++/YrPZ8ZlijFRkMzbp8B6Behk7LuZLp QxoSzj8d/W8563qVSDfJ4JwHoqqA/4Hy4RL5zqXQ6WytYy5U4IqlM9p9zfTx/rrb2qIyQP C+VPpMmXbvdmq+bnS0vOF+uR/M/uyyuETsuQjUpbZBp0qosRCKRRxPHWGV2UOHtOC/jLc4 Rm3Jc8IAyX04cC9ayEwTykDhosY13jwsk+yNuR9kRmAqx4DkZ5lvJjxE4SJ37g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758622319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GrJyAVbm4laFs+F0N7n05Ni1cVKUQn0Ky1fcAz1dwUk=; b=WlgV5CszYJtgr4dYWQ+YI2OyQgKcvpqh7hPmt61xiC78j7T4rnCH+SuYQ0HvHMbeQe5VZh XgpgAOIJEUDcBR/zqJHnzQC0SqCDUYq9wkg2Dt4UnAtKJaobvn1LBQc/bh83pGVmsubCPo Ecx6J1uJ5R1Js+1ba2HIjI3tlCsP/uZlLnJL0d08IFLOCK5/JnccUjS6IcFzgSO1LZ0Cxt iYUFJqfv0zJ5bKWZLyFaGVdV9b1H2KICpHfdEBLHqTtLHgjWDrElsJbe4evR2M4LqzUcus zWuKv3BBUGAlmaRNNbK2Wcuiv/uaH1j7bE6S45KNiUtrEw/jXyd5YOS1xl5CoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758622319; a=rsa-sha256; cv=none; b=b/DvT9/HfDveTJ8zbHF2xgRAORvFuuag6wKB/hWjfAloOR7Da1Nz6Ho7xIdKhBjsLg9pU4 w46w2KNmOab02Ua2MAayQPr/zhJVcHtzllsdUWsQ5pWLevZU/neXDQK6ZF9TnAcnNOLFfh ZN62bBdgjIL14YRfLl+BJSpqnJPUgipoBOFd5CtOoSjlENIZC0Wst16AQCTy5gT4SIe18C HhLK15woNHEVySRpaIiuHo/Nu0Yrw+Q/PCAF0dpNk1KsvUO9eKfnAvjX/RQsxEIx4uOy5w YC21+dofQoSYQUXNRY38unCdT99CnKplCwdB7C+IjJ31VOblqB+eUd08E/G6Ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWG3z4QgLzhgV; Tue, 23 Sep 2025 10:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NABxsJ099564; Tue, 23 Sep 2025 10:11:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NABxFd099561; Tue, 23 Sep 2025 10:11:59 GMT (envelope-from git) Date: Tue, 23 Sep 2025 10:11:59 GMT Message-Id: <202509231011.58NABxFd099561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: 99475087d63b - main - pf: Add pfsync protocol for FreeBSD 15 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99475087d63b4602a0213645bc17d82c3946e2fd Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=99475087d63b4602a0213645bc17d82c3946e2fd commit 99475087d63b4602a0213645bc17d82c3946e2fd Author: Kajetan Staszkiewicz AuthorDate: 2025-08-22 10:44:20 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2025-09-23 10:06:33 +0000 pf: Add pfsync protocol for FreeBSD 15 A new version of pfsync packet is introduced: 1500. This version solves the issues with data alignment introduced in version 1400 and adds syncing of information needed to sync states created by rules with af-to (original interface, af and proto separate for wire and stack keys), of rt_af needed for prefer-ipv6-nexthop, and of tag names. Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D52176 --- contrib/tcpdump/print-pfsync.c | 14 +- share/man/man4/pfsync.4 | 2 + sys/net/if_pfsync.h | 7 +- sys/net/pfvar.h | 62 +++++- sys/netpfil/pf/if_pfsync.c | 219 +++++++++++++++---- sys/netpfil/pf/pf_ioctl.c | 204 ++++++++++++++---- tests/sys/netpfil/pf/pfsync.sh | 466 ++++++++++++++++++++++++++++++++++++++++- usr.bin/netstat/if.c | 12 +- 8 files changed, 883 insertions(+), 103 deletions(-) diff --git a/contrib/tcpdump/print-pfsync.c b/contrib/tcpdump/print-pfsync.c index e4f11930816c..e7885c4a9e00 100644 --- a/contrib/tcpdump/print-pfsync.c +++ b/contrib/tcpdump/print-pfsync.c @@ -102,6 +102,7 @@ struct pfsync_actions { static void pfsync_print_clr(netdissect_options *, const void *); static void pfsync_print_state_1301(netdissect_options *, const void *); static void pfsync_print_state_1400(netdissect_options *, const void *); +static void pfsync_print_state_1500(netdissect_options *, const void *); static void pfsync_print_ins_ack(netdissect_options *, const void *); static void pfsync_print_upd_c(netdissect_options *, const void *); static void pfsync_print_upd_req(netdissect_options *, const void *); @@ -131,6 +132,8 @@ struct pfsync_actions actions[] = { { "eof", 0, NULL }, { "insert", sizeof(struct pfsync_state_1400), pfsync_print_state_1400 }, { "update", sizeof(struct pfsync_state_1400), pfsync_print_state_1400 }, + { "insert", sizeof(struct pfsync_state_1500), pfsync_print_state_1500 }, + { "update", sizeof(struct pfsync_state_1500), pfsync_print_state_1500 }, }; static void @@ -228,12 +231,21 @@ pfsync_print_state_1301(netdissect_options *ndo, const void *bp) static void pfsync_print_state_1400(netdissect_options *ndo, const void *bp) { - struct pfsync_state_1301 *st = (struct pfsync_state_1301 *)bp; + struct pfsync_state_1400 *st = (struct pfsync_state_1400 *)bp; fn_print_char(ndo, '\n'); print_state(ndo, (union pfsync_state_union *)st, PFSYNC_MSG_VERSION_1400); } +static void +pfsync_print_state_1500(netdissect_options *ndo, const void *bp) +{ + struct pfsync_state_1500 *st = (struct pfsync_state_1500 *)bp; + + fn_print_char(ndo, '\n'); + print_state(ndo, (union pfsync_state_union *)st, PFSYNC_MSG_VERSION_1500); +} + static void pfsync_print_ins_ack(netdissect_options *ndo, const void *bp) { diff --git a/share/man/man4/pfsync.4 b/share/man/man4/pfsync.4 index cc9c350ea875..c12bad74831f 100644 --- a/share/man/man4/pfsync.4 +++ b/share/man/man4/pfsync.4 @@ -162,6 +162,8 @@ FreeBSD releases 13.2 and older. Compatibility with FreeBSD 13.1 has been verified. .It Cm 1400 FreeBSD release 14.0. +.It Cm 1500 +FreeBSD release 15.0. .El .Sh SYSCTL VARIABLES The following variables can be entered at the diff --git a/sys/net/if_pfsync.h b/sys/net/if_pfsync.h index e99df0b85ccf..7b3177e1137d 100644 --- a/sys/net/if_pfsync.h +++ b/sys/net/if_pfsync.h @@ -62,9 +62,10 @@ enum pfsync_msg_versions { PFSYNC_MSG_VERSION_UNSPECIFIED = 0, PFSYNC_MSG_VERSION_1301 = 1301, PFSYNC_MSG_VERSION_1400 = 1400, + PFSYNC_MSG_VERSION_1500 = 1500, }; -#define PFSYNC_MSG_VERSION_DEFAULT PFSYNC_MSG_VERSION_1400 +#define PFSYNC_MSG_VERSION_DEFAULT PFSYNC_MSG_VERSION_1500 #define PFSYNC_ACT_CLR 0 /* clear all states */ #define PFSYNC_ACT_INS_1301 1 /* insert state */ @@ -81,7 +82,9 @@ enum pfsync_msg_versions { #define PFSYNC_ACT_EOF 12 /* end of frame */ #define PFSYNC_ACT_INS_1400 13 /* insert state */ #define PFSYNC_ACT_UPD_1400 14 /* update state */ -#define PFSYNC_ACT_MAX 15 +#define PFSYNC_ACT_INS_1500 15 /* insert state */ +#define PFSYNC_ACT_UPD_1500 16 /* update state */ +#define PFSYNC_ACT_MAX 17 /* * A pfsync frame is built from a header followed by several sections which diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 8b102f198de8..d7d69615151d 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -452,6 +452,16 @@ VNET_DECLARE(struct rmlock, pf_rules_lock); #define PF_RULES_RASSERT() rm_assert(&V_pf_rules_lock, RA_RLOCKED) #define PF_RULES_WASSERT() rm_assert(&V_pf_rules_lock, RA_WLOCKED) +VNET_DECLARE(struct rmlock, pf_tags_lock); +#define V_pf_tags_lock VNET(pf_tags_lock) + +#define PF_TAGS_RLOCK_TRACKER struct rm_priotracker _pf_tags_tracker +#define PF_TAGS_RLOCK() rm_rlock(&V_pf_tags_lock, &_pf_tags_tracker) +#define PF_TAGS_RUNLOCK() rm_runlock(&V_pf_tags_lock, &_pf_tags_tracker) +#define PF_TAGS_WLOCK() rm_wlock(&V_pf_tags_lock) +#define PF_TAGS_WUNLOCK() rm_wunlock(&V_pf_tags_lock) +#define PF_TAGS_WASSERT() rm_assert(&V_pf_tags_lock, RA_WLOCKED) + 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) @@ -1209,11 +1219,11 @@ struct pfsync_state_1301 { u_int8_t state_flags; u_int8_t timeout; u_int8_t sync_flags; - u_int8_t updates; + u_int8_t updates; /* unused */ } __packed; struct pfsync_state_1400 { - /* The beginning of the struct is compatible with previous versions */ + /* The beginning of the struct is compatible with pfsync_state_1301 */ u_int64_t id; char ifname[IFNAMSIZ]; struct pfsync_state_key key[2]; @@ -1236,7 +1246,7 @@ struct pfsync_state_1400 { u_int8_t __spare; u_int8_t timeout; u_int8_t sync_flags; - u_int8_t updates; + u_int8_t updates; /* unused */ /* The rest is not */ u_int16_t qid; u_int16_t pqid; @@ -1249,12 +1259,54 @@ struct pfsync_state_1400 { u_int8_t set_prio[2]; u_int8_t rt; char rt_ifname[IFNAMSIZ]; +} __packed; +struct pfsync_state_1500 { + /* The beginning of the struct is compatible with pfsync_state_1301 */ + u_int64_t id; + char ifname[IFNAMSIZ]; + struct pfsync_state_key key[2]; + struct pf_state_peer_export src; + struct pf_state_peer_export dst; + struct pf_addr rt_addr; + u_int32_t rule; + u_int32_t anchor; + u_int32_t nat_rule; + u_int32_t creation; + u_int32_t expire; + u_int32_t packets[2][2]; + u_int32_t bytes[2][2]; + u_int32_t creatorid; + /* The rest is not, use the opportunity to fix alignment */ + char tagname[PF_TAG_NAME_SIZE]; + char rt_ifname[IFNAMSIZ]; + char orig_ifname[IFNAMSIZ]; + int32_t rtableid; + u_int16_t state_flags; + u_int16_t qid; + u_int16_t pqid; + u_int16_t dnpipe; + u_int16_t dnrpipe; + u_int16_t max_mss; + sa_family_t wire_af; + sa_family_t stack_af; + sa_family_t rt_af; + u_int8_t wire_proto; + u_int8_t stack_proto; + u_int8_t log; + u_int8_t timeout; + u_int8_t direction; + u_int8_t rt; + u_int8_t min_ttl; + u_int8_t set_tos; + u_int8_t set_prio[2]; + u_int8_t spare[3]; /* Improve struct alignment */ } __packed; union pfsync_state_union { struct pfsync_state_1301 pfs_1301; struct pfsync_state_1400 pfs_1400; + struct pfsync_state_1500 pfs_1500; } __packed; #ifdef _KERNEL @@ -2462,6 +2514,10 @@ int pf_translate(struct pf_pdesc *, struct pf_addr *, u_int16_t, struct pf_addr *, u_int16_t, u_int16_t, int); int pf_translate_af(struct pf_pdesc *); bool pf_init_threshold(struct pf_kthreshold *, uint32_t, uint32_t); +uint16_t pf_tagname2tag(const char *); +#ifdef ALTQ +uint16_t pf_qname2qid(const char *, bool); +#endif /* ALTQ */ void pfr_initialize(void); void pfr_cleanup(void); diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 7b9405ee1f8d..66bc99df2afa 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -153,6 +153,8 @@ static int (*pfsync_acts[])(struct mbuf *, int, int, int, int) = { pfsync_in_eof, /* PFSYNC_ACT_EOF */ pfsync_in_ins, /* PFSYNC_ACT_INS_1400 */ pfsync_in_upd, /* PFSYNC_ACT_UPD_1400 */ + pfsync_in_ins, /* PFSYNC_ACT_INS_1500 */ + pfsync_in_upd, /* PFSYNC_ACT_UPD_1500 */ }; struct pfsync_q { @@ -165,9 +167,11 @@ struct pfsync_q { enum pfsync_q_id { PFSYNC_Q_INS_1301, PFSYNC_Q_INS_1400, + PFSYNC_Q_INS_1500, PFSYNC_Q_IACK, PFSYNC_Q_UPD_1301, PFSYNC_Q_UPD_1400, + PFSYNC_Q_UPD_1500, PFSYNC_Q_UPD_C, PFSYNC_Q_DEL_C, PFSYNC_Q_COUNT, @@ -176,6 +180,7 @@ enum pfsync_q_id { /* Functions for building messages for given queue */ static void pfsync_out_state_1301(struct pf_kstate *, void *); static void pfsync_out_state_1400(struct pf_kstate *, void *); +static void pfsync_out_state_1500(struct pf_kstate *, void *); static void pfsync_out_iack(struct pf_kstate *, void *); static void pfsync_out_upd_c(struct pf_kstate *, void *); static void pfsync_out_del_c(struct pf_kstate *, void *); @@ -184,9 +189,11 @@ static void pfsync_out_del_c(struct pf_kstate *, void *); static struct pfsync_q pfsync_qs[] = { { pfsync_out_state_1301, sizeof(struct pfsync_state_1301), PFSYNC_ACT_INS_1301 }, { pfsync_out_state_1400, sizeof(struct pfsync_state_1400), PFSYNC_ACT_INS_1400 }, + { pfsync_out_state_1500, sizeof(struct pfsync_state_1500), PFSYNC_ACT_INS_1500 }, { pfsync_out_iack, sizeof(struct pfsync_ins_ack), PFSYNC_ACT_INS_ACK }, { pfsync_out_state_1301, sizeof(struct pfsync_state_1301), PFSYNC_ACT_UPD_1301 }, { pfsync_out_state_1400, sizeof(struct pfsync_state_1400), PFSYNC_ACT_UPD_1400 }, + { pfsync_out_state_1500, sizeof(struct pfsync_state_1500), PFSYNC_ACT_UPD_1500 }, { pfsync_out_upd_c, sizeof(struct pfsync_upd_c), PFSYNC_ACT_UPD_C }, { pfsync_out_del_c, sizeof(struct pfsync_del_c), PFSYNC_ACT_DEL_C } }; @@ -195,9 +202,11 @@ static struct pfsync_q pfsync_qs[] = { static u_int8_t pfsync_qid_sstate[] = { PFSYNC_S_INS, /* PFSYNC_Q_INS_1301 */ PFSYNC_S_INS, /* PFSYNC_Q_INS_1400 */ + PFSYNC_S_INS, /* PFSYNC_Q_INS_1500 */ PFSYNC_S_IACK, /* PFSYNC_Q_IACK */ PFSYNC_S_UPD, /* PFSYNC_Q_UPD_1301 */ PFSYNC_S_UPD, /* PFSYNC_Q_UPD_1400 */ + PFSYNC_S_UPD, /* PFSYNC_Q_UPD_1500 */ PFSYNC_S_UPD_C, /* PFSYNC_Q_UPD_C */ PFSYNC_S_DEL_C, /* PFSYNC_Q_DEL_C */ }; @@ -525,13 +534,15 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) struct pf_kstate *st = NULL; struct pf_state_key *skw = NULL, *sks = NULL; struct pf_krule *r = NULL; - struct pfi_kkif *kif; + struct pfi_kkif *kif, *orig_kif; struct pfi_kkif *rt_kif = NULL; struct pf_kpooladdr *rpool_first; int error; + int n = 0; sa_family_t rt_af = 0; uint8_t rt = 0; - int n = 0; + sa_family_t wire_af, stack_af; + u_int8_t wire_proto, stack_proto; PF_RULES_RASSERT(); @@ -542,7 +553,11 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) return (EINVAL); } - if ((kif = pfi_kkif_find(sp->pfs_1301.ifname)) == NULL) { + /* + * Check interfaces early on. Do it before allocating memory etc. + * Because there is a high chance there will be a lot more such states. + */ + if ((kif = orig_kif = pfi_kkif_find(sp->pfs_1301.ifname)) == NULL) { if (V_pf_status.debug >= PF_DEBUG_MISC) printf("%s: unknown interface: %s\n", __func__, sp->pfs_1301.ifname); @@ -551,6 +566,30 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) return (0); /* skip this state */ } + /* + * States created with floating interface policy can be synchronized to + * hosts with different interfaces, because they are bound to V_pfi_all. + * But s->orig_kif still points to a real interface. Don't abort + * importing the state if orig_kif does not exists on the importing host + * but the state is not interface-bound. + */ + if (msg_version == PFSYNC_MSG_VERSION_1500) { + orig_kif = pfi_kkif_find(sp->pfs_1500.orig_ifname); + if (orig_kif == NULL) { + if (kif == V_pfi_all) { + orig_kif = kif; + } else { + if (V_pf_status.debug >= PF_DEBUG_MISC) + printf("%s: unknown original interface:" + " %s\n", __func__, + sp->pfs_1500.orig_ifname); + if (flags & PFSYNC_SI_IOCTL) + return (EINVAL); + return (0); /* skip this state */ + } + } + } + /* * If the ruleset checksums match or the state is coming from the ioctl, * it's safe to associate the state with the rule of that number. @@ -565,10 +604,6 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) } else r = &V_pf_default_rule; - /* - * Check routing interface early on. Do it before allocating memory etc. - * because there is a high chance there will be a lot more such states. - */ switch (msg_version) { case PFSYNC_MSG_VERSION_1301: /* @@ -619,10 +654,12 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) "because of different ruleset", __func__); return ((flags & PFSYNC_SI_IOCTL) ? EINVAL : 0); } + wire_af = stack_af = sp->pfs_1301.af; + wire_proto = stack_proto = sp->pfs_1301.proto; break; case PFSYNC_MSG_VERSION_1400: /* - * On FreeBSD 14 and above we're not taking any chances. + * On FreeBSD 14 we're not taking any chances. * We use the information synced to us. */ if (sp->pfs_1400.rt) { @@ -641,6 +678,29 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) */ rt_af = sp->pfs_1400.af; } + wire_af = stack_af = sp->pfs_1400.af; + wire_proto = stack_proto = sp->pfs_1400.proto; + break; + case PFSYNC_MSG_VERSION_1500: + /* + * On FreeBSD 15 and above we're not taking any chances. + * We use the information synced to us. + */ + if (sp->pfs_1500.rt) { + rt_kif = pfi_kkif_find(sp->pfs_1500.rt_ifname); + if (rt_kif == NULL) { + DPFPRINTF(PF_DEBUG_MISC, + "%s: unknown route interface: %s", + __func__, sp->pfs_1500.rt_ifname); + return ((flags & PFSYNC_SI_IOCTL) ? EINVAL : 0); + } + rt = sp->pfs_1500.rt; + rt_af = sp->pfs_1500.rt_af; + } + wire_af = sp->pfs_1500.wire_af; + stack_af = sp->pfs_1500.stack_af; + wire_proto = sp->pfs_1500.wire_proto; + stack_proto = sp->pfs_1500.stack_proto; break; } @@ -667,8 +727,9 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) ks = &sp->pfs_1301.key[PF_SK_STACK]; #endif - if (PF_ANEQ(&kw->addr[0], &ks->addr[0], sp->pfs_1301.af) || - PF_ANEQ(&kw->addr[1], &ks->addr[1], sp->pfs_1301.af) || + if (wire_af != stack_af || + PF_ANEQ(&kw->addr[0], &ks->addr[0], wire_af) || + PF_ANEQ(&kw->addr[1], &ks->addr[1], wire_af) || kw->port[0] != ks->port[0] || kw->port[1] != ks->port[1]) { sks = uma_zalloc(V_pf_state_key_z, M_NOWAIT); @@ -687,36 +748,19 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) skw->addr[1] = kw->addr[1]; skw->port[0] = kw->port[0]; skw->port[1] = kw->port[1]; - skw->proto = sp->pfs_1301.proto; - skw->af = sp->pfs_1301.af; + skw->proto = wire_proto; + skw->af = wire_af; if (sks != skw) { sks->addr[0] = ks->addr[0]; sks->addr[1] = ks->addr[1]; sks->port[0] = ks->port[0]; sks->port[1] = ks->port[1]; - sks->proto = sp->pfs_1301.proto; - sks->af = sp->pfs_1301.af; + sks->proto = stack_proto; + sks->af = stack_af; } /* copy to state */ - bcopy(&sp->pfs_1301.rt_addr, &st->act.rt_addr, sizeof(st->act.rt_addr)); st->creation = (time_uptime - ntohl(sp->pfs_1301.creation)) * 1000; - st->expire = pf_get_uptime(); - if (sp->pfs_1301.expire) { - uint32_t timeout; - - timeout = r->timeout[sp->pfs_1301.timeout]; - if (!timeout) - timeout = V_pf_default_rule.timeout[sp->pfs_1301.timeout]; - - /* sp->expire may have been adaptively scaled by export. */ - st->expire -= (timeout - ntohl(sp->pfs_1301.expire)) * 1000; - } - - st->direction = sp->pfs_1301.direction; - st->act.log = sp->pfs_1301.log; - st->timeout = sp->pfs_1301.timeout; - st->act.rt = rt; st->act.rt_kif = rt_kif; st->act.rt_af = rt_af; @@ -724,6 +768,12 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) switch (msg_version) { case PFSYNC_MSG_VERSION_1301: st->state_flags = sp->pfs_1301.state_flags; + st->direction = sp->pfs_1301.direction; + st->act.log = sp->pfs_1301.log; + st->timeout = sp->pfs_1301.timeout; + if (rt) + bcopy(&sp->pfs_1301.rt_addr, &st->act.rt_addr, + sizeof(st->act.rt_addr)); /* * In FreeBSD 13 pfsync lacks many attributes. Copy them * from the rule if possible. If rule can't be matched @@ -762,6 +812,9 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) break; case PFSYNC_MSG_VERSION_1400: st->state_flags = ntohs(sp->pfs_1400.state_flags); + st->direction = sp->pfs_1400.direction; + st->act.log = sp->pfs_1400.log; + st->timeout = sp->pfs_1400.timeout; st->act.qid = ntohs(sp->pfs_1400.qid); st->act.pqid = ntohs(sp->pfs_1400.pqid); st->act.dnpipe = ntohs(sp->pfs_1400.dnpipe); @@ -772,12 +825,47 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) st->act.max_mss = ntohs(sp->pfs_1400.max_mss); st->act.set_prio[0] = sp->pfs_1400.set_prio[0]; st->act.set_prio[1] = sp->pfs_1400.set_prio[1]; + if (rt) + bcopy(&sp->pfs_1400.rt_addr, &st->act.rt_addr, + sizeof(st->act.rt_addr)); + break; + case PFSYNC_MSG_VERSION_1500: + st->state_flags = ntohs(sp->pfs_1500.state_flags); + st->direction = sp->pfs_1500.direction; + st->act.log = sp->pfs_1500.log; + st->timeout = sp->pfs_1500.timeout; + st->act.qid = ntohs(sp->pfs_1500.qid); + st->act.pqid = ntohs(sp->pfs_1500.pqid); + st->act.dnpipe = ntohs(sp->pfs_1500.dnpipe); + st->act.dnrpipe = ntohs(sp->pfs_1500.dnrpipe); + st->act.rtableid = ntohl(sp->pfs_1500.rtableid); + st->act.min_ttl = sp->pfs_1500.min_ttl; + st->act.set_tos = sp->pfs_1500.set_tos; + st->act.max_mss = ntohs(sp->pfs_1500.max_mss); + st->act.set_prio[0] = sp->pfs_1500.set_prio[0]; + st->act.set_prio[1] = sp->pfs_1500.set_prio[1]; + if (rt) + bcopy(&sp->pfs_1500.rt_addr, &st->act.rt_addr, + sizeof(st->act.rt_addr)); + if (sp->pfs_1500.tagname[0] != 0) + st->tag = pf_tagname2tag(sp->pfs_1500.tagname); break; default: panic("%s: Unsupported pfsync_msg_version %d", __func__, msg_version); } + st->expire = pf_get_uptime(); + if (sp->pfs_1301.expire) { + uint32_t timeout; + timeout = r->timeout[st->timeout]; + if (!timeout) + timeout = V_pf_default_rule.timeout[st->timeout]; + + /* sp->expire may have been adaptively scaled by export. */ + st->expire -= (timeout - ntohl(sp->pfs_1301.expire)) * 1000; + } + if (! (st->act.rtableid == -1 || (st->act.rtableid >= 0 && st->act.rtableid < rt_numfibs))) goto cleanup; @@ -797,7 +885,7 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) if (!(flags & PFSYNC_SI_IOCTL)) st->state_flags |= PFSTATE_NOSYNC; - if ((error = pf_state_insert(kif, kif, skw, sks, st)) != 0) + if ((error = pf_state_insert(kif, orig_kif, skw, sks, st)) != 0) goto cleanup_state; /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ @@ -1089,23 +1177,29 @@ pfsync_in_ins(struct mbuf *m, int offset, int count, int flags, int action) struct mbuf *mp; union pfsync_state_union *sa, *sp; int i, offp, total_len, msg_version, msg_len; + u_int8_t timeout, direction; + sa_family_t af; switch (action) { case PFSYNC_ACT_INS_1301: msg_len = sizeof(struct pfsync_state_1301); - total_len = msg_len * count; msg_version = PFSYNC_MSG_VERSION_1301; break; case PFSYNC_ACT_INS_1400: msg_len = sizeof(struct pfsync_state_1400); - total_len = msg_len * count; msg_version = PFSYNC_MSG_VERSION_1400; break; + case PFSYNC_ACT_INS_1500: + msg_len = sizeof(struct pfsync_state_1500); + msg_version = PFSYNC_MSG_VERSION_1500; + break; default: V_pfsyncstats.pfsyncs_badver++; return (-1); } + total_len = msg_len * count; + mp = m_pulldown(m, offset, total_len, &offp); if (mp == NULL) { V_pfsyncstats.pfsyncs_badlen++; @@ -1116,13 +1210,26 @@ pfsync_in_ins(struct mbuf *m, int offset, int count, int flags, int action) for (i = 0; i < count; i++) { sp = (union pfsync_state_union *)((char *)sa + msg_len * i); + switch (msg_version) { + case PFSYNC_MSG_VERSION_1301: + case PFSYNC_MSG_VERSION_1400: + af = sp->pfs_1301.af; + timeout = sp->pfs_1301.timeout; + direction = sp->pfs_1301.direction; + break; + case PFSYNC_MSG_VERSION_1500: + af = sp->pfs_1500.wire_af; + timeout = sp->pfs_1500.timeout; + direction = sp->pfs_1500.direction; + break; + } + /* Check for invalid values. */ - if (sp->pfs_1301.timeout >= PFTM_MAX || + if (timeout >= PFTM_MAX || sp->pfs_1301.src.state > PF_TCPS_PROXY_DST || sp->pfs_1301.dst.state > PF_TCPS_PROXY_DST || - sp->pfs_1301.direction > PF_OUT || - (sp->pfs_1301.af != AF_INET && - sp->pfs_1301.af != AF_INET6)) { + direction > PF_OUT || + (af != AF_INET && af != AF_INET6)) { if (V_pf_status.debug >= PF_DEBUG_MISC) printf("%s: invalid value\n", __func__); V_pfsyncstats.pfsyncs_badval++; @@ -1215,23 +1322,28 @@ pfsync_in_upd(struct mbuf *m, int offset, int count, int flags, int action) struct pf_kstate *st; struct mbuf *mp; int sync, offp, i, total_len, msg_len, msg_version; + u_int8_t timeout; switch (action) { case PFSYNC_ACT_UPD_1301: msg_len = sizeof(struct pfsync_state_1301); - total_len = msg_len * count; msg_version = PFSYNC_MSG_VERSION_1301; break; case PFSYNC_ACT_UPD_1400: msg_len = sizeof(struct pfsync_state_1400); - total_len = msg_len * count; msg_version = PFSYNC_MSG_VERSION_1400; break; + case PFSYNC_ACT_UPD_1500: + msg_len = sizeof(struct pfsync_state_1500); + msg_version = PFSYNC_MSG_VERSION_1500; + break; default: V_pfsyncstats.pfsyncs_badact++; return (-1); } + total_len = msg_len * count; + mp = m_pulldown(m, offset, total_len, &offp); if (mp == NULL) { V_pfsyncstats.pfsyncs_badlen++; @@ -1242,8 +1354,18 @@ pfsync_in_upd(struct mbuf *m, int offset, int count, int flags, int action) for (i = 0; i < count; i++) { sp = (union pfsync_state_union *)((char *)sa + msg_len * i); + switch (msg_version) { + case PFSYNC_MSG_VERSION_1301: + case PFSYNC_MSG_VERSION_1400: + timeout = sp->pfs_1301.timeout; + break; + case PFSYNC_MSG_VERSION_1500: + timeout = sp->pfs_1500.timeout; + break; + } + /* check for invalid values */ - if (sp->pfs_1301.timeout >= PFTM_MAX || + if (timeout >= PFTM_MAX || sp->pfs_1301.src.state > PF_TCPS_PROXY_DST || sp->pfs_1301.dst.state > PF_TCPS_PROXY_DST) { if (V_pf_status.debug >= PF_DEBUG_MISC) { @@ -1288,7 +1410,7 @@ pfsync_in_upd(struct mbuf *m, int offset, int count, int flags, int action) pfsync_alloc_scrub_memory(&sp->pfs_1301.dst, &st->dst); pf_state_peer_ntoh(&sp->pfs_1301.dst, &st->dst); st->expire = pf_get_uptime(); - st->timeout = sp->pfs_1301.timeout; + st->timeout = timeout; } st->pfsync_time = time_uptime; @@ -1788,6 +1910,14 @@ pfsync_out_state_1400(struct pf_kstate *st, void *buf) pfsync_state_export(sp, st, PFSYNC_MSG_VERSION_1400); } +static void +pfsync_out_state_1500(struct pf_kstate *st, void *buf) +{ + union pfsync_state_union *sp = buf; + + pfsync_state_export(sp, st, PFSYNC_MSG_VERSION_1500); +} + static void pfsync_out_iack(struct pf_kstate *st, void *buf) { @@ -2455,6 +2585,8 @@ pfsync_sstate_to_qid(u_int8_t sync_state) return PFSYNC_Q_INS_1301; case PFSYNC_MSG_VERSION_1400: return PFSYNC_Q_INS_1400; + case PFSYNC_MSG_VERSION_1500: + return PFSYNC_Q_INS_1500; } break; case PFSYNC_S_IACK: @@ -2465,6 +2597,8 @@ pfsync_sstate_to_qid(u_int8_t sync_state) return PFSYNC_Q_UPD_1301; case PFSYNC_MSG_VERSION_1400: return PFSYNC_Q_UPD_1400; + case PFSYNC_MSG_VERSION_1500: + return PFSYNC_Q_UPD_1500; } break; case PFSYNC_S_UPD_C: @@ -3021,6 +3155,7 @@ pfsync_kstatus_to_softc(struct pfsync_kstatus *status, struct pfsync_softc *sc) break; case PFSYNC_MSG_VERSION_1301: case PFSYNC_MSG_VERSION_1400: + case PFSYNC_MSG_VERSION_1500: sc->sc_version = status->version; break; default: diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index bd506c092da2..d58af6e5ec4d 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -116,7 +116,6 @@ static int pf_rollback_altq(u_int32_t); static int pf_commit_altq(u_int32_t); static int pf_enable_altq(struct pf_altq *); static int pf_disable_altq(struct pf_altq *); -static uint16_t pf_qname2qid(const char *); static void pf_qid_unref(uint16_t); #endif /* ALTQ */ static int pf_begin_rules(u_int32_t *, int, const char *); @@ -214,8 +213,7 @@ static void pf_init_tagset(struct pf_tagset *, unsigned int *, static void pf_cleanup_tagset(struct pf_tagset *); static uint16_t tagname2hashindex(const struct pf_tagset *, const char *); static uint16_t tag2hashindex(const struct pf_tagset *, uint16_t); -static u_int16_t tagname2tag(struct pf_tagset *, const char *); -static u_int16_t pf_tagname2tag(const char *); +static u_int16_t tagname2tag(struct pf_tagset *, const char *, bool); static void tag_unref(struct pf_tagset *, u_int16_t); struct cdev *pf_dev; @@ -286,6 +284,7 @@ int pf_end_threads; struct proc *pf_purge_proc; VNET_DEFINE(struct rmlock, pf_rules_lock); +VNET_DEFINE(struct rmlock, pf_tags_lock); VNET_DEFINE_STATIC(struct sx, pf_ioctl_lock); #define V_pf_ioctl_lock VNET(pf_ioctl_lock) struct sx pf_end_lock; @@ -687,19 +686,50 @@ tag2hashindex(const struct pf_tagset *ts, uint16_t tag) } static u_int16_t -tagname2tag(struct pf_tagset *ts, const char *tagname) +tagname2tag(struct pf_tagset *ts, const char *tagname, bool add_new) { struct pf_tagname *tag; u_int32_t index; u_int16_t new_tagid; - PF_RULES_WASSERT(); + PF_TAGS_RLOCK_TRACKER; + + PF_TAGS_RLOCK(); index = tagname2hashindex(ts, tagname); TAILQ_FOREACH(tag, &ts->namehash[index], namehash_entries) if (strcmp(tagname, tag->name) == 0) { tag->ref++; - return (tag->tag); + new_tagid = tag->tag; + PF_TAGS_RUNLOCK(); + return (new_tagid); + } + + /* + * When used for pfsync with queues we must not create new entries. + * Pf tags can be created just fine by this function, but queues + * require additional configuration. If they are missing on the target + * system we just ignore them + */ + if (add_new == false) { + printf("%s: Not creating a new tag\n", __func__); + PF_TAGS_RUNLOCK(); + return (0); + } + + /* + * If a new entry must be created do it under a write lock. + * But first search again, somebody could have created the tag + * between unlocking the read lock and locking the write lock. + */ + PF_TAGS_RUNLOCK(); + PF_TAGS_WLOCK(); + TAILQ_FOREACH(tag, &ts->namehash[index], namehash_entries) + if (strcmp(tagname, tag->name) == 0) { + tag->ref++; + new_tagid = tag->tag; + PF_TAGS_WUNLOCK(); + return (new_tagid); } /* @@ -716,16 +746,20 @@ tagname2tag(struct pf_tagset *ts, const char *tagname) * to rounding of the number of bits in the vector up to a multiple * of the vector word size at declaration/allocation time. */ - if ((new_tagid == 0) || (new_tagid > TAGID_MAX)) + if ((new_tagid == 0) || (new_tagid > TAGID_MAX)) { + PF_TAGS_WUNLOCK(); return (0); + } /* Mark the tag as in use. Bits are 0-based for BIT_CLR() */ BIT_CLR(TAGID_MAX, new_tagid - 1, &ts->avail); /* allocate and fill new struct pf_tagname */ tag = uma_zalloc(V_pf_tag_z, M_NOWAIT); - if (tag == NULL) + if (tag == NULL) { + PF_TAGS_WUNLOCK(); return (0); + } strlcpy(tag->name, tagname, sizeof(tag->name)); tag->tag = new_tagid; tag->ref = 1; @@ -737,7 +771,29 @@ tagname2tag(struct pf_tagset *ts, const char *tagname) index = tag2hashindex(ts, new_tagid); TAILQ_INSERT_TAIL(&ts->taghash[index], tag, taghash_entries); - return (tag->tag); + PF_TAGS_WUNLOCK(); + return (new_tagid); +} + +static char * +tag2tagname(struct pf_tagset *ts, u_int16_t tag) +{ + struct pf_tagname *t; + uint16_t index; + + PF_TAGS_RLOCK_TRACKER; + + PF_TAGS_RLOCK(); + + index = tag2hashindex(ts, tag); + TAILQ_FOREACH(t, &ts->taghash[index], taghash_entries) + if (tag == t->tag) { + PF_TAGS_RUNLOCK(); + return (t->name); + } + + PF_TAGS_RUNLOCK(); + return (NULL); } static void @@ -746,7 +802,7 @@ tag_unref(struct pf_tagset *ts, u_int16_t tag) struct pf_tagname *t; uint16_t index; - PF_RULES_WASSERT(); + PF_TAGS_WLOCK(); index = tag2hashindex(ts, tag); TAILQ_FOREACH(t, &ts->taghash[index], taghash_entries) @@ -763,12 +819,20 @@ tag_unref(struct pf_tagset *ts, u_int16_t tag) } break; } + + PF_TAGS_WUNLOCK(); } -static uint16_t +uint16_t pf_tagname2tag(const char *tagname) { - return (tagname2tag(&V_pf_tags, tagname)); + return (tagname2tag(&V_pf_tags, tagname, true)); +} + +static const char * +pf_tag2tagname(uint16_t tag) +{ + return (tag2tagname(&V_pf_tags, tag)); } static int @@ -899,10 +963,16 @@ pf_commit_eth(uint32_t ticket, const char *anchor) } #ifdef ALTQ -static uint16_t -pf_qname2qid(const char *qname) +uint16_t +pf_qname2qid(const char *qname, bool add_new) +{ + return (tagname2tag(&V_pf_qids, qname, add_new)); +} + +static const char * +pf_qid2qname(uint16_t qid) { - return (tagname2tag(&V_pf_qids, qname)); + return (tag2tagname(&V_pf_qids, qid)); } static void @@ -1151,7 +1221,7 @@ pf_altq_ifnet_event(struct ifnet *ifp, int remove) } bcopy(a1, a2, sizeof(struct pf_altq)); - if ((a2->qid = pf_qname2qid(a2->qname)) == 0) { + if ((a2->qid = pf_qname2qid(a2->qname, true)) == 0) { error = EBUSY; free(a2, M_PFALTQ); break; @@ -1606,7 +1676,7 @@ pf_export_kaltq(struct pf_altq *q, struct pfioc_altq_v1 *pa, size_t ioc_size) #define ASSIGN_OPT(x) exported_q->pq_u.hfsc_opts.x = q->pq_u.hfsc_opts.x #define ASSIGN_OPT_SATU32(x) exported_q->pq_u.hfsc_opts.x = \ SATU32(q->pq_u.hfsc_opts.x) - + ASSIGN_OPT_SATU32(rtsc_m1); ASSIGN_OPT(rtsc_d); ASSIGN_OPT_SATU32(rtsc_m2); @@ -1620,7 +1690,7 @@ pf_export_kaltq(struct pf_altq *q, struct pfioc_altq_v1 *pa, size_t ioc_size) ASSIGN_OPT_SATU32(ulsc_m2); ASSIGN_OPT(flags); - + #undef ASSIGN_OPT #undef ASSIGN_OPT_SATU32 } else @@ -1728,7 +1798,7 @@ pf_import_kaltq(struct pfioc_altq_v1 *pa, struct pf_altq *q, size_t ioc_size) ASSIGN_OPT(ulsc_m2); ASSIGN_OPT(flags); - + #undef ASSIGN_OPT } else COPY(pq_u); @@ -1760,7 +1830,7 @@ pf_import_kaltq(struct pfioc_altq_v1 *pa, struct pf_altq *q, size_t ioc_size) ASSIGN(qid); break; } - default: + default: panic("%s: unhandled struct pfioc_altq version", __func__); break; } @@ -2191,11 +2261,11 @@ pf_ioctl_addrule(struct pf_krule *rule, uint32_t ticket, #ifdef ALTQ /* set queue IDs */ if (rule->qname[0] != 0) { - if ((rule->qid = pf_qname2qid(rule->qname)) == 0) + if ((rule->qid = pf_qname2qid(rule->qname, true)) == 0) ERROUT(EBUSY); else if (rule->pqname[0] != 0) { if ((rule->pqid = - pf_qname2qid(rule->pqname)) == 0) + pf_qname2qid(rule->pqname, true)) == 0) ERROUT(EBUSY); } else rule->pqid = rule->qid; @@ -3314,7 +3384,7 @@ DIOCGETETHRULE_error: #ifdef ALTQ /* set queue IDs */ if (rule->qname[0] != 0) { - if ((rule->qid = pf_qname2qid(rule->qname)) == 0) + if ((rule->qid = pf_qname2qid(rule->qname, true)) == 0) error = EBUSY; else rule->qid = rule->qid; @@ -3865,11 +3935,11 @@ DIOCGETRULENV_error: /* set queue IDs */ if (newrule->qname[0] != 0) { if ((newrule->qid = - pf_qname2qid(newrule->qname)) == 0) + pf_qname2qid(newrule->qname, true)) == 0) error = EBUSY; else if (newrule->pqname[0] != 0) { if ((newrule->pqid = - pf_qname2qid(newrule->pqname)) == 0) + pf_qname2qid(newrule->pqname, true)) == 0) error = EBUSY; } else newrule->pqid = newrule->qid; @@ -4400,7 +4470,7 @@ DIOCGETSTATESV2_full: * copy the necessary fields */ if (altq->qname[0] != 0) { - if ((altq->qid = pf_qname2qid(altq->qname)) == 0) { + if ((altq->qid = pf_qname2qid(altq->qname, true)) == 0) { PF_RULES_WUNLOCK(); error = EBUSY; free(altq, M_PFALTQ); @@ -5723,6 +5793,7 @@ fail: void pfsync_state_export(union pfsync_state_union *sp, struct pf_kstate *st, int msg_version) { + const char *tagname; bzero(sp, sizeof(union pfsync_state_union)); /* copy from state key */ *** 680 LINES SKIPPED *** From nobody Tue Sep 23 10:11:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWG3y4fJYz68QYq; Tue, 23 Sep 2025 10:11: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWG3y3rYWz47Wt; Tue, 23 Sep 2025 10:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758622318; h=from:from:reply-to:subject:subject: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+MKmiJICYL7RVqqovIfHwW55WdhlUthr7uzZOv+rmI=; b=rhC845zEN4WgV+eal+CGZ6reb2CcTLwnjNBflfuwGcv+9Xw6MI69yZV4utjNjVxTnQxGAs xSceXhWSh00ySTMFzR4K5geWzzHuAIYbJ9cs9SydSCH0llbM7T5FnF61YYITzXEhWjJZ52 Fy7FiSnhTAjFwHT3yqBlkjMajfcjYtisArGl7uCpPq+vJdFPlrmKTxnSlV84bVJuKx50XP N2yt9hFRF+9flsLifzGLh1QfmgjlvvP/0SkseQOBLGTMz/LEw8iBmoNfVWUX1pZN1yySX6 Rh73YaGUUKnb03ndaI/pATnNJLM2gH7sBBQ9Wrh4jz8h4JjWdKawMlucImGRTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758622318; h=from:from:reply-to:subject:subject: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+MKmiJICYL7RVqqovIfHwW55WdhlUthr7uzZOv+rmI=; b=V5kFAHqqndxudZNGRcgrmofeGNkvLoVKfms/ztklrcuuUE5iXKjEDIJC3gCtT+D1ghr4eq sIG724TmozZ8VFD4XCJZ0l6JtnX6UVbNKT0wUeE3MX4K92Ji5VBSmnODHEceERdJd1YMVy vL+dNa255HubjiI3539J3WJjMgpBnUgJzWkm4RtmZSxFpQan97nqeNQnoCv2zt2vBULcXS 376/q3B84AjafJHCM8Gi+dJ0fKvYu96Ji1Wd9OQAAvXV3eNipMFsy/qHB8p8is6MXXLBAp e00o4p6gBcaAH6EowZm3T2DdfNesQzFI9tZRrjDLIrmknOkZZmOukKUSe6OXSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758622318; a=rsa-sha256; cv=none; b=x+SDpVh/bKq7+xbEj6P/S7SBg3bbccGC2qW9uju7T8bISA9CL4uF3QrfaacZ4GBcMlkNlt uVsY3kAtYgV4zoP+zH455bjA3BUy/N4CQaZbhSnYJtm2BvefMT8Yw683MM99Z4gLR5Mb8p BYvSrS+NMDm3EcnM2unlMKVMrJbLu6vHuMnvU4vpIQekohGN1mvXspVoCcMNRXiPsBfmeF txV0+ONYI9AXbNvVB4jYlHHESAQzfsZuO8WxULmlo6Zvdy6izli+f7bfKNZVhcAM4Mwcuz si1/65VEMclW99wspSThEOfuGUzbBO8aOel3jFxgREIAPi4Y8cMMn9gXmSZdkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWG3y3J0xzj8h; Tue, 23 Sep 2025 10:11:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NABwvc099524; Tue, 23 Sep 2025 10:11:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NABwLv099521; Tue, 23 Sep 2025 10:11:58 GMT (envelope-from git) Date: Tue, 23 Sep 2025 10:11:58 GMT Message-Id: <202509231011.58NABwLv099521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: 42441d342071 - main - pf: Fix interface binding for af-to with route-to List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42441d342071767f32cfe507466135dc79052a56 Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=42441d342071767f32cfe507466135dc79052a56 commit 42441d342071767f32cfe507466135dc79052a56 Author: Kajetan Staszkiewicz AuthorDate: 2025-09-07 10:48:15 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2025-09-23 10:06:30 +0000 pf: Fix interface binding for af-to with route-to States created by inbound af-to rules bypass outbound filtering and span both the inbound and outbound interfaces. When the first packet for such rule creates a state, this state has st->orig_kif set the original inbound interface and kif set to V_pfi_all. When the outbound interface is eventually known st->kif is updated to that interface. When not using route-to, the outbound route and its interface are determined for the new address family and st->kif is set to that interface. However when using route-to, ifp is explicitely given and the code for updating st->kif is not run for the first packet. When the returning packet matches the state, the code is run but updates st->kif to the original inbound interface, which is now the outbound interface. The state ends up with st->kif == st->orig_kif and won't forward any more returning packets. There is another block of code performing such update, but only for reply-to. Perform the update of st->kif in a single place no matter if ifp was explicitely given or found by routing lookup. For checks using pings check if really all pings have been replied to, because a single reply is enough to have ping exit with a successful exit code. Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D52445 --- sys/netpfil/pf/pf.c | 64 +++++++++++++++++---------------------- tests/sys/netpfil/pf/nat64.sh | 6 +++- tests/sys/netpfil/pf/src_track.sh | 6 ++-- 3 files changed, 36 insertions(+), 40 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 2705df61a1f7..a57905df0c69 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9172,26 +9172,8 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, } else { dst->sin.sin_addr = ip->ip_dst; } - - /* - * Bind to the correct interface if we're - * if-bound. We don't know which interface - * that will be until here, so we've inserted - * the state on V_pf_all. Fix that now. - */ - if (s->kif == V_pfi_all && ifp != NULL && - r->rule_flag & PFRULE_IFBOUND) - s->kif = ifp->if_pf_kif; } } - - if (r->rule_flag & PFRULE_IFBOUND && - pd->act.rt == PF_REPLYTO && - s->kif == V_pfi_all) { - s->kif = pd->act.rt_kif; - s->orig_kif = oifp->if_pf_kif; - } - PF_STATE_UNLOCK(s); } @@ -9206,6 +9188,20 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, goto bad; } + /* + * Bind to the correct interface if we're if-bound. We don't know which + * interface that will be until here, so we've inserted the state + * on V_pf_all. Fix that now. + */ + if (s != NULL && s->kif == V_pfi_all && r->rule_flag & PFRULE_IFBOUND) { + /* Verify that we're here because of BOUND_IFACE */ + MPASS(r->rt == PF_REPLYTO || (pd->af != pd->naf && s->direction == PF_IN)); + s->kif = ifp->if_pf_kif; + if (pd->act.rt == PF_REPLYTO) { + s->orig_kif = oifp->if_pf_kif; + } + } + if (r->rt == PF_DUPTO) skip_test = true; @@ -9486,26 +9482,8 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, sizeof(dst.sin6_addr)); else dst.sin6_addr = ip6->ip6_dst; - - /* - * Bind to the correct interface if we're - * if-bound. We don't know which interface - * that will be until here, so we've inserted - * the state on V_pf_all. Fix that now. - */ - if (s->kif == V_pfi_all && ifp != NULL && - r->rule_flag & PFRULE_IFBOUND) - s->kif = ifp->if_pf_kif; } } - - if (r->rule_flag & PFRULE_IFBOUND && - pd->act.rt == PF_REPLYTO && - s->kif == V_pfi_all) { - s->kif = pd->act.rt_kif; - s->orig_kif = oifp->if_pf_kif; - } - PF_STATE_UNLOCK(s); } @@ -9527,6 +9505,20 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, goto bad; } + /* + * Bind to the correct interface if we're if-bound. We don't know which + * interface that will be until here, so we've inserted the state + * on V_pf_all. Fix that now. + */ + if (s != NULL && s->kif == V_pfi_all && r->rule_flag & PFRULE_IFBOUND) { + /* Verify that we're here because of BOUND_IFACE */ + MPASS(r->rt == PF_REPLYTO || (pd->af != pd->naf && s->direction == PF_IN)); + s->kif = ifp->if_pf_kif; + if (pd->act.rt == PF_REPLYTO) { + s->orig_kif = oifp->if_pf_kif; + } + } + if (r->rt == PF_DUPTO) skip_test = true; diff --git a/tests/sys/netpfil/pf/nat64.sh b/tests/sys/netpfil/pf/nat64.sh index 4438ad6abb85..d930e2ee5763 100644 --- a/tests/sys/netpfil/pf/nat64.sh +++ b/tests/sys/netpfil/pf/nat64.sh @@ -1039,13 +1039,14 @@ route_to_body() "pass in on ${epair}b route-to (${epair_link}a 192.0.2.2) inet6 from any to 64:ff9b::/96 af-to inet from (${epair_link}a)" atf_check -s exit:0 -o ignore \ + -o match:'3 packets transmitted, 3 packets received, 0.0% packet loss' \ ping6 -c 3 64:ff9b::192.0.2.2 states=$(mktemp) || exit 1 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states for state_regexp in \ - "${epair}b ipv6-icmp 192.0.2.1:.* \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:8 \(64:ff9b::c000:202\[[0-9]+\]\).*4:2 pkts.*route-to: 192.0.2.2@${epair_link}a" \ + "${epair_link}a ipv6-icmp 192.0.2.1:.* \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:8 \(64:ff9b::c000:202\[[0-9]+\]\).*6:6 pkts.*route-to: 192.0.2.2@${epair_link}a origif: ${epair}b" \ ; do grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'" done @@ -1094,6 +1095,7 @@ reply_to_body() "pass in on ${epair}b reply-to (${epair}b 2001:db8::2) inet6 from any to 64:ff9b::/96 af-to inet from 192.0.2.1" atf_check -s exit:0 -o ignore \ + -o match:'3 packets transmitted, 3 packets received, 0.0% packet loss' \ ping6 -c 3 64:ff9b::192.0.2.2 } @@ -1155,8 +1157,10 @@ v6_gateway_body() "pass in on ${epair_lan}b inet6 from any to 64:ff9b::/96 af-to inet from (${epair_wan_one}a)" atf_check -s exit:0 -o ignore \ + -o match:'3 packets transmitted, 3 packets received, 0.0% packet loss' \ ping6 -c 3 64:ff9b::192.0.2.2 atf_check -s exit:0 -o ignore \ + -o match:'3 packets transmitted, 3 packets received, 0.0% packet loss' \ ping6 -c 3 64:ff9b::198.51.100.1 } diff --git a/tests/sys/netpfil/pf/src_track.sh b/tests/sys/netpfil/pf/src_track.sh index e12d0464ee8c..d86b4ce6c466 100755 --- a/tests/sys/netpfil/pf/src_track.sh +++ b/tests/sys/netpfil/pf/src_track.sh @@ -565,9 +565,9 @@ mixed_af_body() # FIXME: Sticky-address is broken for af-to pools! # The SN is created but apparently not used, as seen in states. for state_regexp in \ - "${epair_tester}b tcp 203.0.113.0:4201 \(2001:db8:44::1\[4201\]\) -> 192.0.2.100:9 \(64:ff9b::c000:264\[9\]\) .* route-to: 2001:db8:4202::2@${epair_server2}a" \ - "${epair_tester}b tcp 203.0.113.1:4202 \(2001:db8:44::1\[4202\]\) -> 192.0.2.100:9 \(64:ff9b::c000:264\[9\]\) .* route-to: 2001:db8:4202::2@${epair_server2}a" \ - "${epair_tester}b tcp 203.0.113.2:4203 \(2001:db8:44::2\[4203\]\) -> 192.0.2.100:9 \(64:ff9b::c000:264\[9\]\) .* route-to: 198.51.100.18@${epair_server1}a" \ + "${epair_server2}a tcp 203.0.113.0:4201 \(2001:db8:44::1\[4201\]\) -> 192.0.2.100:9 \(64:ff9b::c000:264\[9\]\) .* route-to: 2001:db8:4202::2@${epair_server2}a origif: ${epair_tester}b" \ + "${epair_server2}a tcp 203.0.113.1:4202 \(2001:db8:44::1\[4202\]\) -> 192.0.2.100:9 \(64:ff9b::c000:264\[9\]\) .* route-to: 2001:db8:4202::2@${epair_server2}a origif: ${epair_tester}b" \ + "${epair_server1}a tcp 203.0.113.2:4203 \(2001:db8:44::2\[4203\]\) -> 192.0.2.100:9 \(64:ff9b::c000:264\[9\]\) .* route-to: 198.51.100.18@${epair_server1}a origif: ${epair_tester}b" \ ; do grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'" done From nobody Tue Sep 23 12:59:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKmq5vHQz68ch1; Tue, 23 Sep 2025 12:59: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKmq5Hgdz3WC7; Tue, 23 Sep 2025 12:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758632347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hwelhLCI2MWWo1HVkLj+p593YYYz2jVWVuNNWkyzcfc=; b=soUfIG8kfz9Ta4cqUpyYs2iIInhoSycRqRHjHNcTQGKSKaAoBxbIJKy+qLdlr8HJepz5+1 CdLK1QU4Xx1R5zmzHJan81Vm9YwrFdSvWtrSsVXb4pmGpGOsQe8HGjHOeXkb8U8YSij4oT iAgSgdICM8k9xn7/b7FDIoApACsQtkciJcH2HkVlSEbgGxxNEr/SOKc3K1Zag85mkH+hHX F9V+bKZ/x0tVt9oGYUt5Vcw75AFZa4LQgyr0UG8ofBv3e+unAh3esHMWrVyU24TrZxrK9r YB9v0q0DOQcULnBtq2IyHsoK5NwSdas95W8JPI/a+42XBCUZ3D4cDKw60nW8jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758632347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hwelhLCI2MWWo1HVkLj+p593YYYz2jVWVuNNWkyzcfc=; b=xV1QoabV5QUh+hLkIECT7iLxlU00LoPSEcMfKLKWlIe5gTiMQlWRmHDzouU4060Fjo0JVK 7qHwBiWCqesDJ2d3fjJUl6VS1qzGMkpixraAIuxID0qqxa0n4ucLHneupVCobNEK5iXath nHnCcRSBu39TPD6N68Q17kgQfhhnvIhIOEL/IoMDiJk70JOcVbtfOkfbS8PvOgHcud1E+2 SaujaQiJrM+Jh7JzxEMQam0admQDKHGNaG9ELafTAABlN+bNjJI3sPAablrp7i8b21ZPBK DEtMevj79uUluyBnMYyl5JLtKeo8fvNSxAaeXvKbJD8qsAj+lkHl2AYmrOzftQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632347; a=rsa-sha256; cv=none; b=Jvr5Aujso4EqNTWcn1iWIARdi4OUlmS9e6+rgoWCXD60r5xkP3tncmR+EkgrS0NvbTDPwt eOerdsuKi8ViSf2+TeTXrCPeuf0FcPgjSx4kwv8J6/QreiJe51KAcsFl/BOIRrR7DQRE+5 bBa+9RI36TAZIS9umlqEmOhZtpItKGE1YV/TR8lduX3uhky8M4d5qy52529AVaLWeE2yjy GdjAgI6CHhgSvFrA3VfmlSnEcckg3LWuxgXbzH24iX4p8A3kWP2r8xSByVp7CvQdN2iXKv v/tqGmu97bnyw6e7dX4nhc1P34sKn6io/XI0WaSFCj8KdG4fBo/LvqXKEGYfaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKmq4vN4znDK; Tue, 23 Sep 2025 12:59:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCx72Q004782; Tue, 23 Sep 2025 12:59:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCx7X0004779; Tue, 23 Sep 2025 12:59:07 GMT (envelope-from git) Date: Tue, 23 Sep 2025 12:59:07 GMT Message-Id: <202509231259.58NCx7X0004779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5953e7c98427 - main - rc.subr: Move the sleep in wait_for_pids List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5953e7c98427e038500221e885dffa181dcc064b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5953e7c98427e038500221e885dffa181dcc064b commit 5953e7c98427e038500221e885dffa181dcc064b Author: Dag-Erling Smørgrav AuthorDate: 2025-09-23 12:55:56 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-23 12:55:56 +0000 rc.subr: Move the sleep in wait_for_pids Instead of sleeping while constructing the list of PIDs to wait for, sleep briefly after pwait to give init a chance to reap the processes that just terminated before we loop around and start probing them. PR: 289630 Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D52619 --- libexec/rc/rc.subr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 06b1bd51384c..6be226021949 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -804,7 +804,6 @@ wait_for_pids() for _j in $_list; do if kill -0 $_j 2>/dev/null; then _nlist="${_nlist}${_nlist:+ }$_j" - [ -n "$_prefix" ] && sleep 1 fi done if [ -z "$_nlist" ]; then @@ -814,6 +813,10 @@ wait_for_pids() echo -n ${_prefix:-"Waiting for PIDS: "}$_list _prefix=", " pwait -o $_list 2>/dev/null + # At least one of the processes we were waiting for + # has terminated. Give init a chance to collect it + # before looping around and checking again. + sleep 1 done if [ -n "$_prefix" ]; then echo "." From nobody Tue Sep 23 12:59:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKmr74HNz68cYB; Tue, 23 Sep 2025 12:59: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKmr64Zxz3W7D; Tue, 23 Sep 2025 12:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758632348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUZQhgHL0ODoVsBsuuHYQqSM28LjzJLRu08ZhqMS/Ro=; b=PsDoJq3L50BWg2PzfJwUb0cfKCCB94QIDfMovYNut8yImA3wGuvMPcfCEdUZcgTEQXWpgC Z9NEfWSdsZmFivwaadXYQIjeLR3w1q2LSSx9kR3uVzgDFRkhJzzJekDQl2PxJPZFDP+AMJ gAQnoKb0dmBD3/+QcF8zkjYkO4vHXeAinXjN4aDgfc7K1Kl3+mFO/AEfBybSC7lNJ+dnzM BGKBqc9rJxUbbTzkJmKL1y/7jYF11ir3rtwHCgw0ppNelwmNhwRNGKg/iYU9Dt3oCFETkd DSvR2WxzuP7K+mqVudgqUAKeJ8O9hTiI4GrkxWoxe5Pw3WzcQh8grbdGC3uQPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758632348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUZQhgHL0ODoVsBsuuHYQqSM28LjzJLRu08ZhqMS/Ro=; b=qG+f1NOUo6JKCv5kYi6fiCJfUHFCU9vMM3dPsVxeaddTEovXRLGhif4KOA4ooE+nAFLtNT JPs1Yq8LVroINFOot6tjbw4r7rmg6X/0LnL2UOD65lg7FUMNawc3EMBuyDOb9YfsUP9CxM rs+dqBKv8vc7wtx8O2STQfFFQWbqIRjNM5SBmysUWQOt/ukNZVbCOCT8avpGMhUPiszQCu ilsoG/TB+atXE+f5JiR5QnrB22jMclSDl7/aSqKsyZUdEkEsgRLsn8wZtbbG/0I2mi/3lh uLHt2x69EKxVLZ8G2259wYmAKWsaHTgn8VxmI1+R+jk147paO+HG/jIBIGY/SQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632348; a=rsa-sha256; cv=none; b=XBj1XwtBhrAfyv4mQG0ehpU8ZaVOFi7mIOWgGcr3pD1JlapT1wbTM6+xCZCw9vLZi/V1pE LJlf46LsCF/3A350mOpx3iBSQxSX2Xmtlr9Rudhbq9weQ5SPJBv0uUBkr65s/8o9aDgFIK Zz4f+c0vHg1fTNjjC6EELYjKnkRov7I3DTEq6Om3OUxD8YjDFAnteEOUdAZ99imH1w6RH8 Q1zir/wKijbWV+NJ49cSI9wfaAzlQFNnKPlA/WEbFZJ9neEd7tdjsfkVbpMk9c7eeQ7N0B F9xMLwWUrycwUY0oS0RkoCPb6zgKIN+xDLBJI7fZROMwS8l3VRnJrV8uyxupjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKmr5hSwzn9x; Tue, 23 Sep 2025 12:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCx8ai004821; Tue, 23 Sep 2025 12:59:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCx8Yi004818; Tue, 23 Sep 2025 12:59:08 GMT (envelope-from git) Date: Tue, 23 Sep 2025 12:59:08 GMT Message-Id: <202509231259.58NCx8Yi004818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 3aac05f56620 - main - pwait: Fix timeout unit parser List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3aac05f56620712744cb57d71a0ef42f8d8e3b52 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3aac05f56620712744cb57d71a0ef42f8d8e3b52 commit 3aac05f56620712744cb57d71a0ef42f8d8e3b52 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-23 12:56:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-23 12:56:04 +0000 pwait: Fix timeout unit parser The timeout parser would check the first character after the number and ignore any subsequent ones. While here, switch to bool for booleans and fix some style nits. MFC after: 1 week Reviewed by: 0mp, markj Differential Revision: https://reviews.freebsd.org/D52612 --- bin/pwait/pwait.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/bin/pwait/pwait.c b/bin/pwait/pwait.c index 0fae22562607..a78c0bb84ca8 100644 --- a/bin/pwait/pwait.c +++ b/bin/pwait/pwait.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -48,7 +49,6 @@ static void usage(void) { - fprintf(stderr, "usage: pwait [-t timeout] [-ov] pid ...\n"); exit(EX_USAGE); } @@ -61,15 +61,15 @@ main(int argc, char *argv[]) { struct itimerval itv; struct kevent *e; - int oflag, tflag, verbose; - int i, kq, n, nleft, opt, status; - long pid; char *end, *s; double timeout; + long pid; + int i, kq, n, nleft, opt, status; + bool oflag, tflag, verbose; - oflag = 0; - tflag = 0; - verbose = 0; + oflag = false; + tflag = false; + verbose = false; memset(&itv, 0, sizeof(itv)); while ((opt = getopt(argc, argv, "ot:v")) != -1) { @@ -78,25 +78,31 @@ main(int argc, char *argv[]) oflag = 1; break; case 't': - tflag = 1; + tflag = true; errno = 0; timeout = strtod(optarg, &end); if (end == optarg || errno == ERANGE || timeout < 0) { errx(EX_DATAERR, "timeout value"); } - switch(*end) { - case 0: + switch (*end) { + case '\0': + break; case 's': + end++; break; case 'h': timeout *= 60; /* FALLTHROUGH */ case 'm': timeout *= 60; + end++; break; default: errx(EX_DATAERR, "timeout unit"); } + if (*end != '\0') { + errx(EX_DATAERR, "timeout unit"); + } if (timeout > 100000000L) { errx(EX_DATAERR, "timeout value"); } @@ -106,7 +112,7 @@ main(int argc, char *argv[]) (suseconds_t)(timeout * 1000000UL); break; case 'v': - verbose = 1; + verbose = true; break; default: usage(); @@ -134,7 +140,7 @@ main(int argc, char *argv[]) for (n = 0; n < argc; n++) { s = argv[n]; /* Undocumented Solaris compat */ - if (!strncmp(s, "/proc/", 6)) { + if (strncmp(s, "/proc/", 6) == 0) { s += 6; } errno = 0; From nobody Tue Sep 23 12:59:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWKmt4ZcFz68cdT; Tue, 23 Sep 2025 12:59: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWKmt13BRz3W9S; Tue, 23 Sep 2025 12:59:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758632350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8E9ZR0I8Vfd4lrcp4B0Zw+gFaCC9egA1tgdSykrulzs=; b=w67tPWGRH+anNwSbe8XJ9A5bWd62NswxohMLpwummkKsHxDtVEj8rZ/Jx4NeJsz6FQoaXE AbVcGs+DAJRY4jFmjcLS7gWeayeKm1JT1ww8V/piJiLmw20oGi5QxwizfYVgYojqpHcpjN w0YCigxN56AGEbvX8yrEAcK7ejDyPPp+y/Jqf4T6o+Tr55R0uKHyL9HisC/iT56+/AX9pP FtM9kuCw06jKkecZUvAsVQjuKKIw0s223sSpR2acJ4H8uz+GQ6vvaLhca/LUPDbsUuJqaT PLrE/nldtn27Nn/C6jD9mCFCCoflzjgbl52+W8vrTP271QkR+mSCuYY7Jc0B2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758632350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8E9ZR0I8Vfd4lrcp4B0Zw+gFaCC9egA1tgdSykrulzs=; b=ff+KFjqtlw1NapLnD4lJEDSicPN2oEhSsuqA5sCfMVEcTWJ7ahN1/6vtcBJB3ZDT3q2aoZ krLrVmza/aIMIWtMof8r4UVrypUS8sISgjAxo4x/WeV8UxaQzSofts6zP6IH7Op1znBSrZ D+vJMk61ZkRtzdlhgDrm3SVK3YeQ7+v5t10eO4MUY7KEOoB+9duSfilp3WHWl5Kqno5uDq +suqsVarA7zuJ3zywfZ6Vhy/CVJZJgdOamTAzf6itknc3gIWOHQdrUvKGc7uri8auFjEOn 4zVHMwmkV5QdNVueNDOpY+JnxLOiUnZFGDIFAQFg/BKOI3Bo2UlqTe15uiB+BA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758632350; a=rsa-sha256; cv=none; b=vtmDL+8h/8/LhyMDZXNEI7DBHFC71SQQ/p0Llh5ncS4CaFcRr6wxk9XRtwep3NQvQ2w3KG lv4Cwml8qGfb6uohphMJvBWumZZbCcf2fMkYk6b1W0zdDGNPvq6gRRirAvj1+EMX1jW7Hu XIW1dnDsuOo6jfXi67vs4GvuoW7v+aJfcJlebeCG4LI5gNgU8w/lyMB8gJPp1+q6wAFh9f tw5LkHh4dAs3YzJ6fowvkGH4ChwQd+h/aBPJauulSyMrepagWVsz6yA+D40UKPiqQRnKY0 OBTivduV8zz/iVQm7cdDGAD1SDFY7FTCuHMDPYWz3r3r+iZdLDIx5oRP1xK3HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWKms6VJRzmm8; Tue, 23 Sep 2025 12:59:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NCx9fc004860; Tue, 23 Sep 2025 12:59:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NCx9p6004857; Tue, 23 Sep 2025 12:59:09 GMT (envelope-from git) Date: Tue, 23 Sep 2025 12:59:09 GMT Message-Id: <202509231259.58NCx9p6004857@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a5f14e4f9069 - main - tzcode: Use -00 only for invalid time zones List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5f14e4f9069a8ffed66d923bb0ecf20d8a0e6af Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a5f14e4f9069a8ffed66d923bb0ecf20d8a0e6af commit a5f14e4f9069a8ffed66d923bb0ecf20d8a0e6af Author: Dag-Erling Smørgrav AuthorDate: 2025-09-23 12:56:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-23 12:56:11 +0000 tzcode: Use -00 only for invalid time zones As of tzcode 2025a, if we are unable to load a time zone, we set tzname to "-00" to indicate an error. This penalizes users who simply don't set TZ or create /etc/localtime as a faster way of setting the time zone to UTC (pointing /etc/localtime at /usr/share/zoneinfo/UTC forces us to parse it every time for no real benefit). To rectify this, use "-00" only if TZ was set or zoneinit() returned something else than ENOENT. MFC after: 3 days Fixes: 967a49a21a27 ("Update tzcode to 2025b") Reviewed by: philip Differential Revision: https://reviews.freebsd.org/D52680 --- contrib/tzcode/localtime.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index 15afeeecb6d0..7ba72d730648 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -1649,9 +1649,13 @@ tzset_unlocked_name(char const *name) lclptr = sp = malloc(sizeof *lclptr); # endif if (sp) { - if (zoneinit(sp, name, TZLOAD_FROMENV | TZLOAD_TZSTRING) != 0) { + int err = zoneinit(sp, name, TZLOAD_FROMENV | TZLOAD_TZSTRING); + if (err != 0) { zoneinit(sp, "", 0); - strcpy(sp->chars, UNSPEC); + /* Abbreviate with "-00" if there was an error. + Do not treat a missing TZDEFAULT file as an error. */ + if (name || err != ENOENT) + strcpy(sp->chars, UNSPEC); } if (0 < lcl) strcpy(lcl_TZname, name); From nobody Tue Sep 23 13:14:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWL673mlzz68d9c; Tue, 23 Sep 2025 13:14: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWL672rfCz3Z9J; Tue, 23 Sep 2025 13:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758633247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qm2oktkY+BYz2aZiXxjhf7ESoE5T/3Ngm3MR3CuZA48=; b=nLEdbaQFFRNdwT4CzI6kPZbmmjh88Mr9GuwoCmL7SHoviXM8ZgG3G5n4fV+XyVmY5hsNKA w5ldjBRFGo+1+8SJc7Pbe9HIAVscwMKQ8ZEtQ2wHxRwPxf/48nzHGFklBJgBGjozQKfMgR 5ljWcnHQQj2uxLFmHRzcdaqXRrQ65DjSuw3K6FjEBaOFUH3Tgwh8TRTwXODTlFGOXVzKIP ZOZeA7sv6jmHrys5rJqJ//73vsD7rALpzkjN7oKWCQVCoBIWDK13QnzJgi+6c19hChHCOn GHvjKJgbecmp93gF3PJBZ17Hylg1Y6EOiSvhacFmcDncnS6RnjPpWiT8wVhbBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758633247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qm2oktkY+BYz2aZiXxjhf7ESoE5T/3Ngm3MR3CuZA48=; b=fbKmxU5iuG5r70kvAkFOJcluhwfGQSMbIQzZUcomPnQ+cW//EfsjIjwvAwdZdDOLc/cXMK 3dvmwGuYXOzZUoKdUBAe93h+QIvhpHjxE/6hHbCM4po0zC6sPh76nC34r9EOIRkhRg40Xe 67g00tEHtRoZXh+q/vU2LE2QiTP0k3YIe4iwo37vV2evoI4MeTwC5tv0GxLOoYS1nFM9JY YV+YMvVz4I6NqDntVFzvEtec+x3UoCo4Egw349AcdGUjseC+fiY0Yz5OzwCuqioEyIizv5 IrgtmxbG72L8yVwxxa2K9bpsQrmDO2aowU2lNmz7M7B0EpG2/SavOhlIk48KSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758633247; a=rsa-sha256; cv=none; b=nb8CuB5/ZZd4XP1TO7OmN99aO01so8Hw23aWbY1g8/gp6Adao9TVbYR+c8HG6hEHEdqoV+ Fikmq/zGs4csAR9StfkY+2iBZ3U/LfMVxqgblsA6FH4OkA/7iWZtQH7fiaW81rNWvlJkhK p8YLRqPGTGIJ63girhz3vgqCJLH0IaxowmxQ+Ob2ctRorpB/ryzugOhIL0ehlBYCHPhtHN FXHdauU8bFr0TbKJ89pfJm3du8nbau4mzPBHNJGRolyRXgTN0oyGp/1YATIeQoWTXxi6Dm ul0DZPLNeseD9lC2/QHX7POrmEoxMcuz2dVTjHnwLH4I+QSscLIMRQTEmvrqxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWL6727CpznFT; Tue, 23 Sep 2025 13:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NDE7qV042115; Tue, 23 Sep 2025 13:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NDE7Ir042112; Tue, 23 Sep 2025 13:14:07 GMT (envelope-from git) Date: Tue, 23 Sep 2025 13:14:07 GMT Message-Id: <202509231314.58NDE7Ir042112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 23e69b54973f - main - pkgbase: set origin for each packages as base/FreeBSD-* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23e69b54973fcb68d14986ec1600d9dfd0cb7af3 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=23e69b54973fcb68d14986ec1600d9dfd0cb7af3 commit 23e69b54973fcb68d14986ec1600d9dfd0cb7af3 Author: Baptiste Daroussin AuthorDate: 2025-09-23 07:53:58 +0000 Commit: Baptiste Daroussin CommitDate: 2025-09-23 13:13:50 +0000 pkgbase: set origin for each packages as base/FreeBSD-* MFC After: 3 day Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D52689 --- release/packages/template.ucl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release/packages/template.ucl b/release/packages/template.ucl index bf4b1b44bbec..1609a7213be0 100644 --- a/release/packages/template.ucl +++ b/release/packages/template.ucl @@ -8,8 +8,7 @@ name = "${PKG_NAME_PREFIX}-${PKGNAME}" # Base packages always install to /. prefix = "/" -# For base packages, origin is always "base". -origin = "base" +origin = "base/${PKG_NAME_PREFIX}-${PKGNAME}" categories = [ base ] # $VERSION is the version of the base system being built. From nobody Tue Sep 23 15:27:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWP4M6vSmz68mlc for ; Tue, 23 Sep 2025 15:27:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWP4M4666z3qY9 for ; Tue, 23 Sep 2025 15:27:47 +0000 (UTC) (envelope-from jonlooney@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-b2e0513433bso305086266b.1 for ; Tue, 23 Sep 2025 08:27:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758641265; x=1759246065; 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=E4ljfWZhdWJI+fXf/636eP3pxfoTOoyclT1EchK3qJ8=; b=TW7pW7Qc2z8NxvOMdELzI55tiP1GKMUuPC4N8eehy7M40lmYov0EYYA6yG5glXlWsB FkhHDUIuQV8kbvhMS4qytakaSg4G/4O/vRzks4jWzmFo5ZN+x9XFLQloASLastHFyxVb aTehuH8mphcYcU5DsjMJPYfappcIaPhMjVzrXuAJuKX88gBIVKY0k9mo273ydezkWsb/ 7YBn3EBCm2LjpY+rYM0HySAob5cifS337XAQ+flAgdE20o62soMArsu4y7E6lodfSEMI Es9L/+1I0+MqNHX/hB44/Z6U42ndnwmC0FWUYNA0yy4S2ibNH/DNiLp/0s+GaMP+obEr 0tLw== X-Forwarded-Encrypted: i=1; AJvYcCVZD/GLqKBPbNVazmZGbk59Wuz2XUwQRimxsjov/MpC6Yrkojtz0EgdYz4lRuybAHlC9JpMedI5jnHXseRTVEz5R91Kzw==@freebsd.org X-Gm-Message-State: AOJu0YyW4IHvYtdlQdSrqDfyr5t+afZ57fci1hhF8KyAIxjLoHnNiX/c 5xt+vIxwXJTVWNNL522EwRAjqfvKTH0M85g0PdyedZSFa6ZfqTbfam2u+XDFnKoF X-Gm-Gg: ASbGncvt3cMBZx4p37n+v1ZT5VUWDcz5LmHBOlS4LmFR/8u2zAyMlcsaOEfBneEE138 vFp4GEuTRjPsHcwIQ0iEZoUY8l3dsANVx1bO32K+6m0TsA7ngDVv2HS9zFP5lQVYvTpyWT3Gkwl Q0QBR0AL2vmj2DuXXZNNim7mDxGuapcgo70tfCsZijI+SMI4FWcG/MRcYbaZiZbWpL3O1REc3Ok WwhYGlEURt6JeezFXz8K82ORDdXWjBCuLA04ehDtpfSe76SLztcb8xaK+9OR2JO97/9aLI7J2FD IqbbUkxBPAH+H3Ms9JFoQh5KJzdPysBIOC6o2KEdDpMIx0cS0zeJMs5p1KZyem2l0YHdPwOMVnk YdsEiWs7aXgwMokUSSbNpiBzxaYgiFMJfx7PbWMBkBkUUlUeDCie06g== X-Google-Smtp-Source: AGHT+IH/N6Qx7IhHcBAitel/aGIEmetw6nxKxf8+4eUdjL5hmN1gsU/iziydCyyPlu05LwsnGBNXZg== X-Received: by 2002:a17:906:7943:b0:b04:83af:b4ba with SMTP id a640c23a62f3a-b302c7e6feemr274545966b.52.1758641264705; Tue, 23 Sep 2025 08:27:44 -0700 (PDT) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com. [209.85.218.51]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b26847b9f37sm996835566b.18.2025.09.23.08.27.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Sep 2025 08:27:44 -0700 (PDT) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-b2e0513433bso305079566b.1 for ; Tue, 23 Sep 2025 08:27:44 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVq1zqAUlJXDWg4BDAKJH/IEI0y80p833zRulwpaWICnoV6NPJUrRKdQTW0zg+YFFHN0/brz4T+IXmHf2YTI6Fp19vC/g==@freebsd.org X-Received: by 2002:a17:907:3cc7:b0:aff:17b1:dde1 with SMTP id a640c23a62f3a-b3027262102mr288840166b.1.1758641264184; Tue, 23 Sep 2025 08:27:44 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> In-Reply-To: From: "Jonathan T. Looney" Date: Tue, 23 Sep 2025 11:27:32 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWDvW7cZeCXsRrkn8CuteOlOgc7Ln37gvmewzGa2AgsrtDDxT0aQ6vdaSu4 Message-ID: Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support To: Guido Falsi Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000d6d571063f7993cb" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cWP4M4666z3qY9 --000000000000d6d571063f7993cb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 22, 2025 at 11:44=E2=80=AFAM Guido Falsi = wrote: > On 9/22/25 17:37, Jonathan T. Looney wrote: > > This seems like it is probably a low-frequency event. If so, why is a > > counter a better choice for this than an atomic? > > > > I used counters because they were already being used in the netinet6 > code, and are a good match for the use. > What makes them a good match for the use? Counters are generally best for write-often, read-rarely (by comparison) things, like statistics, where we want to avoid contention in a often-used critical path. For low-frequency events, the expense of keeping the counters (memory usage multiplied by the number of cores; more difficult debugging; etc.) may outweigh the benefits. Jonathan --000000000000d6d571063f7993cb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Sep 22, 2025 at 11:44=E2=80=AFAM = Guido Falsi <madpilot@freebsd.or= g> wrote:
On 9/22/25 17:37, Jonathan T.= Looney wrote:
> This seems like it is probably a low-frequency event= . If so, why is a
> counter a better choice for this than an atomic?
>

I used counters because they were already being used in the netinet6
code, and are a good match for the use.

What makes them a good match for the use? Counters are generally best for = write-often, read-rarely=C2=A0(by comparison) things, like statistics, wher= e we want to avoid contention in a often-used critical path. For low-freque= ncy events, the expense of keeping the counters (memory usage multiplied by= the number of cores; more difficult debugging; etc.) may outweigh the bene= fits.

Jonathan
--000000000000d6d571063f7993cb-- From nobody Tue Sep 23 15:34:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWPD809y8z68n1r; Tue, 23 Sep 2025 15:34:32 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWPD76Xv2z3rTw; Tue, 23 Sep 2025 15:34:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758641672; 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=Cc8pxXthp2bZidOu7lQ+sYZ5JQdPjmC4Qc+gqT7MdA8=; b=jT5PfEL9g4WNQtcFM+JDRmkW0qbcWn35p4C7044CEyFTZd6c58NqPs+RnfZdev//l2OBGX P+EXfRVVyRVGJ1P5FjcNg0/A+RUNo+gqNwnzlhUM6BfnC9WiSeSzl6WUX/iZbTfc/bokIY 55Jms2VrDuyy0ghHDP5fLo4vpwQsv2zziAIXgeE0M3X73xMBa2GuPOnRES9V8/dfv+Qdsw +dMEudgtfoTf3j+tf1tI2jDM8a7M7yEIdT6vTa3NySnVkJLdB6Atq4SEbHtlOoPpozg80z kBBLFMp7FMV6/HD/Cb9XOwaxllu3vO3fMqvdJml40NuV7CJDEkLPEZw4NSidng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758641671; 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=Cc8pxXthp2bZidOu7lQ+sYZ5JQdPjmC4Qc+gqT7MdA8=; b=pHtvGIruXaHQIz9K+vc0xnLW62FJDFXioghCwAn+CUqL1W1Z5aucfq6P5YpMTf1Y5ZQDNS IqmsoMQOZKhlhuMqPycoB4i9UWGSEr2uQuMn0GUU1SYfS+vNTlGysJitCc2ryBcvpb1Fa8 AixeuqkBuLL++zE33qKMbbWxbWIyWsElQyLMrwOPTgzlNeYnt4riIO/O8RsX9Xd9IGTtyz 8W+FAN4zOQ9LkYxmBaYphahln/PYSfRGlHAy1oRoIzTmHzKZ/G6rmq3xGfKhwLrTqziupr NgMihwo4v9H0kYWFdte7cS9pCifI12/TDkus0oM4RrlyKWHYt8mIHXZQHi2+8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758641671; a=rsa-sha256; cv=none; b=AjUw7Ta0oLKCX21wkTXxsbb2ESDw0p4wf8OmfL1D9EE/HirICK1RzGwIPqA0/44emcWGpy S5oQVvmrfzR9ig5zaAvPzsk4aAvbGCaQaKAHZRUpCj9g/NFC+JGGAQqupXD6/oPxt0SBOj sAHKH6HLFoWg1FBL4P4nOWEHAU0Kxl6hJtgwe/8MpwfbZvprmSzHRs892Bjr+SE3saJUmx irybiGMpLbDeNSWl6vpfh8i6eV1583CyKBY4wvoV+PZr3BmTrQXMsMHCWOwdYLkD5+nMXG pohDfr7WAobcen9heM9LDVHF0gYTmWOBA3RRu4FrkAjiyU07Tf4kuX9sBIQo1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.20.22.243] (unknown [195.29.209.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWPD71SGFz1R0l; Tue, 23 Sep 2025 15:34:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 23 Sep 2025 17:34:24 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 40a42785dbba - main - fcntl(F_SETFL): only allow one thread to perform F_SETFL Content-Language: en-US To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509191419.58JEJsvj031867@gitrepo.freebsd.org> <92831372-745d-4612-b38f-aeb235dd8cca@FreeBSD.org> <02323a46-fb47-444b-812a-1ec199a654d1@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/22/25 17:05, Konstantin Belousov wrote: > On Mon, Sep 22, 2025 at 09:50:09AM +0100, John Baldwin wrote: >> On 9/22/25 04:41, John Baldwin wrote: >>> On 9/19/25 10:19, Konstantin Belousov wrote: >>>> The branch main has been updated by kib: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=40a42785dbba93cc5196178fc49d340c1a89cabe >>>> >>>> commit 40a42785dbba93cc5196178fc49d340c1a89cabe >>>> Author: Konstantin Belousov >>>> AuthorDate: 2025-09-11 10:05:04 +0000 >>>> Commit: Konstantin Belousov >>>> CommitDate: 2025-09-19 14:19:13 +0000 >>>> >>>> fcntl(F_SETFL): only allow one thread to perform F_SETFL >>>> Use f_vflags file locking for this. >>>> Allowing more than one thread handling F_SETFL might cause de-sync >>>> between real driver state and flags. >>>> Reviewed by: markj >>>> Tested by: pho >>>> Sponsored by: The FreeBSD Foundation >>>> MFC after: 2 weeks >>>> Differential revision: https://reviews.freebsd.org/D52487 >>> >>> Thanks for fixing this. I still slightly worry that "home-grown" locks >>> aren't visible to WITNESS and it's checking. >>> >>> I was also expecting this to require more changes, but apparently if a >>> process directly invokes FIONBIO on a file descriptor, f_flags isn't >>> updated currently. I wonder if that is a bug. (Similarly for FIOASYNC.) >>> >>> Oh, we do handle that, but poorly. We don't revert on errors, and this >>> should be updated to use fsetfl_lock now I think: >>> >>> kern_ioctl(...) >>> { >>> ... >>> switch (com) { >>> ... >>> case FIONBIO: >>> if ((tmp = *(int *)data)) >>> atomic_set_int(&fp->f_flag, FNONBLOCK); >>> else >>> atomic_clear_int(&fp->f_flag, FNONBLOCK); >>> data = (void *)&tmp; >>> break; >>> case FIOASYNC: >>> if ((tmp = *(int *)data)) >>> atomic_set_int(&fp->f_flag, FASYNC); >>> else >>> atomic_clear_int(&fp->f_flag, FASYNC); >>> data = (void *)&tmp; >>> break; >>> } >>> >>> error = fo_ioctl(fp, com, data, td->td_ucred, td); >>> out: >>> >>> I think instead we want something like: >>> >>> int f_flag; >>> >>> switch (com) { >>> ... >>> case FIONBIO: >>> case FIOASYNC: >>> fsetfl_lock(fp); >>> tmp = *(int *)data; >>> f_flag = com == FIONBIO ? FNONBLOCK : FASYNC; >>> if ((fp->f_flag & f_flag) != 0) { >> >> This is wrong, should be: >> >> if (((fp->f_flag & f_flag) != 0) == (tmp != 0)) >> >>> fsetfl_unlock(fp); >>> goto out; >>> } >>> data = (void *)&tmp; >>> break; >>> } >>> >>> error = fo_ioctl(fp, com, data, td->td_ucred, td); >>> switch (com) { >>> ... >>> case FIONBIO: >>> case FIOASYNC: >>> if (error == 0) { >>> if (tmp) >> >> Probably 'if (tmp != 0)' >> >>> atomic_set_int(&fp->f_flag, f_flag); >>> else >>> atomic_clear_int(&fp->f_flag, f_flag); >>> } >>> fsetfl_unlock(fp); >>> break; >>> } >>> >>> out: >>> >>> This only updates the flag if the underlying ioctl succeeds, and it also >>> avoids invoking the underlying ioctl if the flag is already in the correct\ >>> state. > > So will you handle this? I can. Do you think this is a good idea? :) -- John Baldwin From nobody Tue Sep 23 15:48:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWPXT714pz68ngg; Tue, 23 Sep 2025 15:48:41 +0000 (UTC) (envelope-from madpilot@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWPXT6Rq7z3tCY; Tue, 23 Sep 2025 15:48:41 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758642521; 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:autocrypt:autocrypt; bh=MwoZlBglM/7tUDX/CDrXorZ/55BoxRwtEXiZ6s7xsXE=; b=XU+3fepWlJ4+Mv8g/LduiZ3H1cLVD8xUA0q6Xw9SMhaq/9VtBhigOn+zNMw3kHcu+6mcOV D/xaWRH3Eicvy+SYjMNfAkSPfGidcBoUv5UdmAKVthNEfmNIqHPrIFp6lHVrUSGYkEO9wH WaIQ9QVvp6FsLo94jx38/I0yIHwg6y4IyamP5L2F0ay7EzJt0qrqquwLnRz+7+4hNj+Rxi ol+vKESprMQFMfdtWLIjpvxWmWkaga4pcnfGTzpIykaIDwSkKNwvFHIw25YJOS/fdtDIXc +WVVZtKRLfQsRHPRtSL7wvNFJyvXcgLFpv9cQqJMgpSmRsP+YRALzCcyNHrQ+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758642521; 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:autocrypt:autocrypt; bh=MwoZlBglM/7tUDX/CDrXorZ/55BoxRwtEXiZ6s7xsXE=; b=izmp4Znyor6KC2tG1GU8ocIKJzfOmy3bWc76SoeR16ZFZ6KkkoeWa6doVUc+xZDQJmK0IP IQkQ9KubB8lP0djxQbdHEuP/inVc1iYgg9pQlAUX1n1NUTADSBvIvGQ04yFz6ACLTstmOB kmzObgs+RUkxmrR/YBA0avuWzUtUyrkhOwgblgd48r+OMOQSnnPbRmvQPeb9ztch4+bn+o lOwfuu70fOWP6cdSik7R3i/TuWAnwrenORZ7GLHYL6S/XRtQ6y3vcGu1Sr+hiN1usf8k7g WfZisXlL1NYJRzDRWjVkMgce7VMPwK5un5qqIasuyLqrDj5Zdpvf8LHg5ByJsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758642521; a=rsa-sha256; cv=none; b=N+uHlIf6XAglouBzCJejYO32bmoV5JS/GKJidPVOuHnM7tnauJMfgWpDhtTfeJCcdpW9oP 6rg93hZXh9A5fDHMjIp0kHDeEuHz1j2j6eDCEfKMwu6bI+XsZ2mpJ6/8Yl4a4eTKF5J9Cg eusPTWvBKaqFFT6N+dOW2g3eI47FL8fsm6rtcuqi2lUos7bOx2ffZnr6SSIfcyeSfbOiE+ 4MyPCVXwvcZMZ3by3JyIloQBlpmQORp8Jsz0SRIIbEYAyrHZD+spVirbKgsJTq2mtLNwnm k5SKz/7Qp9iapRCH9hyissPqq+zOfREGfeSnhoYCZkgCi/0j38acgBjhBUAulQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280::13:1] (unknown [IPv6:2a01:e11:2002:4280::13:1]) (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: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWPXT2N1Rz1QQ7; Tue, 23 Sep 2025 15:48:41 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: <6c318ff2-48af-4d8d-8f0f-eea629f42e62@FreeBSD.org> Date: Tue, 23 Sep 2025 17:48:40 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Guido Falsi Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support To: "Jonathan T. Looney" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> Content-Language: en-US, it, en-GB Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/23/25 17:27, Jonathan T. Looney wrote: > On Mon, Sep 22, 2025 at 11:44 AM Guido Falsi > wrote: > > On 9/22/25 17:37, Jonathan T. Looney wrote: > > This seems like it is probably a low-frequency event. If so, why > is a > > counter a better choice for this than an atomic? > > > > I used counters because they were already being used in the netinet6 > code, and are a good match for the use. > > > What makes them a good match for the use? Counters are generally best > for write-often, read-rarely (by comparison) things, like statistics, > where we want to avoid contention in a often-used critical path. For > low-frequency events, the expense of keeping the counters (memory usage > multiplied by the number of cores; more difficult debugging; etc.) may > outweigh the benefits. > Maybe I explained myself poorly, I meant to say the structure already uses counters and they work. It did not occur to me to use something different, but I see no problem using a different tool, as long as it works and does not make the logic more complex. -- Guido Falsi From nobody Tue Sep 23 16:16:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWQ8S2n53z68qV0; Tue, 23 Sep 2025 16:16:24 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWQ8S1LXTz3xSD; Tue, 23 Sep 2025 16:16:24 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758644184; 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=BtIB1XvKFaKuqWIU6JbdRLjYa/652hNqtoR9/LyyhHw=; b=lKOHvPq8C99Gk30vjKIFStRN+ujosOmDZc1iLQowN4cZwIsSlOX9igB0ir9/TrLlE3LyTR CgL2bxyM2oUc2ZxA+naezD2FKr+WdhRzRVR9sgyHxKaSQpRW3PwMYgh5S80arw2QkHysUs ncoszomus7OQWpzCv9RONB6kJeqaYOxS7pgjm0mdD83c83jsBJISr9DSJfiia6nmLQ2pZ5 24J3pUfI3QrqLWwOeYFv199KrY+yAAP5pZf6fH0UIk/Ib8N4iEBhSfCpUpP+Zb66yMl/QZ R/34u5lTbsqnRTCFudV4NTU0WzRodbQKQElUrjQopmjByoxNkin0jFFz7/qoWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758644184; 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=BtIB1XvKFaKuqWIU6JbdRLjYa/652hNqtoR9/LyyhHw=; b=ER3BCDbZn7w6VwYTs/nRYJKxdSnCtJ6kYKD6PtTcj3xEIC2lsH940bKxbKHC147+DvQGab eKHFa+2iYAknzI9+GGlirPl4zGbH7hgxE5wzwf7R7LiqgMyoNJX9MOaN8401AvilDFrDZI z2dM1BDYq4cUkQ4Fd/wKyFm3iUaz6FErMaPCA5yyuNbUH7vfOidWO+vx42fcHBdM+bYmH9 L+/Ib8/TuW9SBvMgDTNNd3cFQdsLDKD8U0v/odv3FGLY0Yl77hHGwvyOCrztc5KUPdNAD9 qWhQZJmtExbap93q1dWcaIHIhwQA9B7UUxPCjpn8yNHXaba0Sen6FpO3vDkz+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758644184; a=rsa-sha256; cv=none; b=OnqTg9yfPvz/puhCGBysFL2IXkIT0F3n8MlSyVaul/B31oueA5mrvCpKaOCDeC4SdN2Pqj 5gc+oCetvbKtmSmoTGM7FP5dxrGos7zUmHf2orUiFmZrJ1mdYaQ2iPtY/lx/28Tz8nqgga SHrnzadJ/aLbbIH0zGlI9HonXX2odbik5Sk5DPZqI955K2Pb3yd9Vo82bPqj5TRwSJT0Pq AmmFEG1QCYahzhSFDTHO2sy7srVWml6WGC9q+Iomc4TT0WwGti1wr3qwz9lECQS2fL2ydB f5QU8A3Z1XyujwB1T/4IF8c/nXygB4Y7mUErigRPv6924W5S/OFj1znfSFmB2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWQ8N6VBbz1QtM; Tue, 23 Sep 2025 16:16:20 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support From: Zhenlei Huang In-Reply-To: <6c318ff2-48af-4d8d-8f0f-eea629f42e62@FreeBSD.org> Date: Wed, 24 Sep 2025 00:16:07 +0800 Cc: "Jonathan T. Looney" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6657C773-2A9B-4C76-BAAC-E3CCE69CA5D1@FreeBSD.org> References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> <6c318ff2-48af-4d8d-8f0f-eea629f42e62@FreeBSD.org> To: Guido Falsi X-Mailer: Apple Mail (2.3696.120.41.1.10) > On Sep 23, 2025, at 11:48 PM, Guido Falsi = wrote: >=20 > On 9/23/25 17:27, Jonathan T. Looney wrote: >> On Mon, Sep 22, 2025 at 11:44=E2=80=AFAM Guido Falsi = > wrote: >> On 9/22/25 17:37, Jonathan T. Looney wrote: >> > This seems like it is probably a low-frequency event. If so, = why >> is a >> > counter a better choice for this than an atomic? >> > >> I used counters because they were already being used in the = netinet6 >> code, and are a good match for the use. >> What makes them a good match for the use? Counters are generally best = for write-often, read-rarely (by comparison) things, like statistics, = where we want to avoid contention in a often-used critical path. For = low-frequency events, the expense of keeping the counters (memory usage = multiplied by the number of cores; more difficult debugging; etc.) may = outweigh the benefits. >=20 > Maybe I explained myself poorly, I meant to say the structure already = uses counters and they work. Jonathan is not talking about the correctness but he hints it is = overkill to use a counter(9) for a rarely updated struct member. >=20 > It did not occur to me to use something different, but I see no = problem using a different tool, as long as it works and does not make = the logic more complex. An atomic(9) is sufficient, so you can eliminate alloc / free and the = code is shorter :) >=20 > --=20 > Guido Falsi >=20 Best regards, Zhenlei From nobody Tue Sep 23 16:28:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWQQ53HGZz68qnp; Tue, 23 Sep 2025 16:28: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWQQ52nRkz40Kr; Tue, 23 Sep 2025 16:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758644893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z1pH2ARmFaa6Yk5CzZjDX6gla7FlHbA1AbQQB5RtliY=; b=UrEOWHd1Y9L4r289MInEtKjpMvb/hAOlMfAmlcC3HEsBEVyOFtjQDV8B8g5Pjk0zin6mDT MIN3mVhtfT4TbkWVOdtNbSk1louB/AdntZDnF30jvS2ncdOt1ow1LXvLEQLbhGXdQH92tt +VtQ5pWHGv5iKoiwOZ1bMILWYMxLeHBujImArMAm/JRe5UYVlVpRv2Ob/EDfiCKoZCevWo Fx7CXirZp6za97B2u9rc7hcyRXAu/Xj8prIBRxyDebX0l+xdNad+R+/UQcYn3PpQgeqztR o4zMQRER3Fb78Lg42UoGzlVTXgiJekv1kDKsnRLrMh5kv5Sxq9C8VKaPa/c04g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758644893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z1pH2ARmFaa6Yk5CzZjDX6gla7FlHbA1AbQQB5RtliY=; b=jAh503eHoDvAT9gTi3MvPjhaaGiIG4GG3PAuInLL8XtUcyguy4Y2GzPwqA7bgkVXd6ZZ15 8Taz/xMAN8R8invfSVNDw8eUw4h7tpqqhdWYTMF+iOPzBk4eZP9YHp6CUkqMgOmxpoZPhU gbJfxgKS9EuooYxHyJ8Pn4cN778/fu67dysB9T308BsTgka35krWEqA6NqGvJqCcsa+3vb OQXpA48+94Zdr1ZXdICwwl0GSOgdu5yApVJZ2njjzk0IPsfjDdoGlN1ryPEH/T7DlVGjQj kTOef0XNjCYfdu0fpOSxsw0yY3Lt3+E+s0WtutpiK4vRgxS5gt6CZdVydYRWNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758644893; a=rsa-sha256; cv=none; b=BSXHe/6yosEatgQux8safCs71Q4eOkHj7ciYVHMr79TDQr0M7cy9hDqO4EVUoAIW90Tu73 V/Sl0Kx5CS/rzZ/x4ZT1YtOE+hYVXDRYjGzrWpgdYytfQ0ttJrILjyfYVsTLGB5j1YP7Nt jitazouF0CM0I3y9hAAAhOa5DwPQ3BV+q64I6lP79IXE59TkdKcueNN5IuKnLoCBkxB1rn FYo3PaDwZbr1l292AAjJR/vbAl2nSSo7mEdODqaM1vE9ptpBqTHUqV/ALQ0Tbr1ZAVijTv qIPKNHvkbxQOPuAn+ZSnkfLgghNZvoxncYkpZN2FPwfYTKJVUnHSKagRdAJSEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWQQ52G8yzt2r; Tue, 23 Sep 2025 16:28:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NGSDmf000744; Tue, 23 Sep 2025 16:28:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NGSD5b000741; Tue, 23 Sep 2025 16:28:13 GMT (envelope-from git) Date: Tue, 23 Sep 2025 16:28:13 GMT Message-Id: <202509231628.58NGSD5b000741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Sobolev Subject: git: 60be0d71daab - main - mksnap_ffs: fix running unded chroot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sobomax X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60be0d71daab4247dc61c323777b0c593eb76975 Auto-Submitted: auto-generated The branch main has been updated by sobomax: URL: https://cgit.FreeBSD.org/src/commit/?id=60be0d71daab4247dc61c323777b0c593eb76975 commit 60be0d71daab4247dc61c323777b0c593eb76975 Author: Maxim Sobolev AuthorDate: 2025-09-23 16:24:44 +0000 Commit: Maxim Sobolev CommitDate: 2025-09-23 16:26:09 +0000 mksnap_ffs: fix running unded chroot Fix "run-under-chroot" workaround by replacing strlcpy(2) with memmove(2) since strings overlap. MFC after: 1 week Reviewed by: arrowd Differential Revision: https://reviews.freebsd.org/D52670 --- sbin/mksnap_ffs/mksnap_ffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mksnap_ffs/mksnap_ffs.c b/sbin/mksnap_ffs/mksnap_ffs.c index 0d8e32a15ab3..58939cc69029 100644 --- a/sbin/mksnap_ffs/mksnap_ffs.c +++ b/sbin/mksnap_ffs/mksnap_ffs.c @@ -150,7 +150,7 @@ main(int argc, char **argv) errx(1, "%s: Not a mount point", stfsbuf.f_mntonname); } if (cp != stfsbuf.f_mntonname) - strlcpy(stfsbuf.f_mntonname, cp, sizeof(stfsbuf.f_mntonname)); + memmove(stfsbuf.f_mntonname, cp, strlen(cp) + 1); /* * Having verified access to the directory in which the From nobody Tue Sep 23 17:09:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRKm6lpKz68tYd; Tue, 23 Sep 2025 17:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRKm62Lqz46hV; Tue, 23 Sep 2025 17:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJUHL9Ig9/EA5WRHh95oq5GHvEbtN8eyh/mNxiktBfo=; b=oTx2WP5BhOnWzCl6N5gxyPCYedpFZiniugO4zfHrpOXU5FDxr6d6GkBDleMJJuCbyHYcFE 9S3M0BL0Xbq/XbkidclXJPSPcMZTLPwApL5euQdqzjjvMAfMGWKtl7KQsIrE/Gv25i8LlM 4QovFeSKpwqeYN2/RFSQo9tQjL6o1tsiG8MMtxsXbbn6eVbYbWkrCuxfIsF40j3tC0SdLG 5qLGXJgLrb7TTDlq6IcRDMVyWHma/Tyye0w5Je1+0OjfvfadRC4WCrXB82xu4QuTyoqkT9 eHs50R0GodgSUx5FeFHzMVce7F4IJMFRtxgup740DQn2JbCHPXgWRXw9CCQNiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dJUHL9Ig9/EA5WRHh95oq5GHvEbtN8eyh/mNxiktBfo=; b=lIggTsYKVy5Omlz31OAurwrlrJh3ty5omlNGS67s/mWbuzveI9DbciN3oFVcbo/UeK2OXn NLcaVAF2v9+1L13fbOvdvArw2QjI0F7zaRAFXPPGX14nSqMOmJgnuc8FjCdDy5rbfGrrxL ajvq9PhtteAVt3QX0UmIlILLirR8vVRBJq1omehLkl9YrQrrxT468P7d9gnCtvEQGCz2ri 96Hn33v0GicMGBLXIJGQtSvmXBCjRakncv2tAB3C2mYmSo2kXSPga7sckT7l1kPFmEIMrA aRaTFNatAKTvZNHFI0ROhgV0ik4o+Cc9I/I0pHu+bXd45kF0KYFbNqFGqKjJxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647372; a=rsa-sha256; cv=none; b=SlHgWhM6aGPraj9/H3zb+8SWM/1UWLF49q+s+jujrTq6x6yNL3OV+gUYVfO+fOFE7qQvf4 LdQklobfFMmIoSM5DCn0BO5erxouTZu+d8wd7Shp/9nnZ94k1KaEQNIxjz9m65qbsi1dg6 0Mk2rmDYC8p0qgvWMt/N0tCbazrMgXiBbdTkTSpYUDbHf4uWdFht20XyB665XYTqr9/CHw tMC/IYT5KVpurTwIxmhZwKCPrwOe5qMpO/+o+SFu4YJMHsGOXjXTmTzwL70ZD5CsVevT0N sT59OofuP+4XrAR2huUfLVG4hXo/TnTrgrOwhETFB7yHxT2WR2RpfR3ng9wmZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRKm5MSZzvjc; Tue, 23 Sep 2025 17:09:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NH9W4Q077217; Tue, 23 Sep 2025 17:09:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NH9WAd077214; Tue, 23 Sep 2025 17:09:32 GMT (envelope-from git) Date: Tue, 23 Sep 2025 17:09:32 GMT Message-Id: <202509231709.58NH9WAd077214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 0f455824d0ab - main - arm64/vmm: Add a feature flag and use it for HCRX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f455824d0abdcf09d2e96cf97f99c542bbde877 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0f455824d0abdcf09d2e96cf97f99c542bbde877 commit 0f455824d0abdcf09d2e96cf97f99c542bbde877 Author: Andrew Turner AuthorDate: 2025-09-22 17:07:57 +0000 Commit: Andrew Turner CommitDate: 2025-09-23 17:08:36 +0000 arm64/vmm: Add a feature flag and use it for HCRX Add a field to hold the features the hardware supports that need to be handled when switching to a guest and use it to handle FEAT_HCX that adds the HRX_EL2 register. This reduces the number of times we read ID registers in guest switching which may be trapped when running under nested virtualisation. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51816 --- sys/arm64/vmm/arm64.h | 2 ++ sys/arm64/vmm/vmm_arm64.c | 6 ++++++ sys/arm64/vmm/vmm_hyp.c | 28 +++++++++++++++------------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h index 6a0c4c78e568..0bd5a933bee1 100644 --- a/sys/arm64/vmm/arm64.h +++ b/sys/arm64/vmm/arm64.h @@ -125,6 +125,8 @@ struct hyp { uint64_t vmid_generation; uint64_t vttbr_el2; uint64_t el2_addr; /* The address of this in el2 space */ + uint64_t feats; /* Which features are enabled */ +#define HYP_FEAT_HCX (0x1ul << 0) bool vgic_attached; struct vgic_v3 *vgic; struct hypctx *ctx[]; diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index e293c99a6646..70bb914d68c6 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -517,6 +517,7 @@ vmmops_init(struct vm *vm, pmap_t pmap) { struct hyp *hyp; vm_size_t size; + uint64_t idreg; size = el2_hyp_size(vm); hyp = malloc_aligned(size, PAGE_SIZE, M_HYP, M_WAITOK | M_ZERO); @@ -524,6 +525,11 @@ vmmops_init(struct vm *vm, pmap_t pmap) hyp->vm = vm; hyp->vgic_attached = false; + if (get_kernel_reg(ID_AA64MMFR1_EL1, &idreg)) { + if (ID_AA64MMFR1_HCX_VAL(idreg) >= ID_AA64MMFR1_HCX_IMPL) + hyp->feats |= HYP_FEAT_HCX; + } + vtimer_vminit(hyp); vgic_vminit(hyp); diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c index d61885c15871..475ad79f63cc 100644 --- a/sys/arm64/vmm/vmm_hyp.c +++ b/sys/arm64/vmm/vmm_hyp.c @@ -259,14 +259,6 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest) hypctx->hcr_el2 = READ_SPECIALREG(hcr_el2); hypctx->vpidr_el2 = READ_SPECIALREG(vpidr_el2); hypctx->vmpidr_el2 = READ_SPECIALREG(vmpidr_el2); - -#ifndef VMM_VHE - /* hcrx_el2 depends on feat_hcx */ - uint64_t mmfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); - if (ID_AA64MMFR1_HCX_VAL(mmfr1) >> ID_AA64MMFR1_HCX_SHIFT) { - hypctx->hcrx_el2 = READ_SPECIALREG(MRS_REG_ALT_NAME(HCRX_EL2)); - } -#endif } static void @@ -277,11 +269,9 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest) /* Restore the special registers */ WRITE_SPECIALREG(hcr_el2, hypctx->hcr_el2); - if (guest_or_nonvhe(guest)) { - uint64_t mmfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); - if (ID_AA64MMFR1_HCX_VAL(mmfr1) >> ID_AA64MMFR1_HCX_SHIFT) { - WRITE_SPECIALREG(MRS_REG_ALT_NAME(HCRX_EL2), hypctx->hcrx_el2); - } + if (guest) { + if ((hyp->feats & HYP_FEAT_HCX) != 0) + WRITE_SPECIALREG(HCRX_EL2_REG, hypctx->hcrx_el2); } isb(); @@ -502,11 +492,18 @@ vmm_hyp_call_guest(struct hyp *hyp, struct hypctx *hypctx) struct hypctx host_hypctx; uint64_t cntvoff_el2; uint64_t ich_hcr_el2, ich_vmcr_el2, cnthctl_el2, cntkctl_el1; +#ifndef VMM_VHE + uint64_t hcrx_el2; +#endif uint64_t ret; uint64_t s1e1r, hpfar_el2; bool hpfar_valid; vmm_hyp_reg_store(&host_hypctx, NULL, false); +#ifndef VMM_VHE + if ((hyp->feats & HYP_FEAT_HCX) != 0) + hcrx_el2 = READ_SPECIALREG(MRS_REG_ALT_NAME(HCRX_EL2)); +#endif /* Save the host special registers */ cnthctl_el2 = READ_SPECIALREG(cnthctl_el2); @@ -584,6 +581,11 @@ vmm_hyp_call_guest(struct hyp *hyp, struct hypctx *hypctx) vmm_hyp_reg_restore(&host_hypctx, NULL, false); +#ifndef VMM_VHE + if ((hyp->feats & HYP_FEAT_HCX) != 0) + WRITE_SPECIALREG(MRS_REG_ALT_NAME(HCRX_EL2), hcrx_el2); +#endif + /* Restore the host special registers */ WRITE_SPECIALREG(ich_hcr_el2, ich_hcr_el2); WRITE_SPECIALREG(ich_vmcr_el2, ich_vmcr_el2); From nobody Tue Sep 23 17:09:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRKp0rN5z68tSv; Tue, 23 Sep 2025 17:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRKn6WT5z46xv; Tue, 23 Sep 2025 17:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBfpDqr8aIQb4WVoVb/cEAuditqqnyrLcH2uJrK10ig=; b=PNGgqcRHFRicjIt7mVoEW9nDBs3QhWagyahSCf6BNnLLAljP5JN6cfwXHHWsf9iZZ5E1tw jh3gxWZgLytMzqOeDvv3DQZRauaHFv0NaFJa4RIz4HEO55KqKryrXr3kCEwvcziWAMyyS3 V8JciDTR64EkFudKiD/13IBHZt/56+x+ydFdZ9WkfFHXypctU9l43FsmKnBVQr4f+HfQ4N JyZ9jpE3r70Bv+a5msxzowK+qS2sGJxpGHxIZYAe4eIKDX9I2McTVaOWpnxmlcnAeAMEdK YKGMqoFVm+zKNXNDnR0UiqQrYwfngYKKCPnCTHmOEqQdmTBINlBqtO+LVYPYMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xBfpDqr8aIQb4WVoVb/cEAuditqqnyrLcH2uJrK10ig=; b=eOnTcG5M8GUTOYKUZLyWbbyzdVQwu9Pj/FPNNtoEsubsJV44ZbQCRLYwLSJt/pGldY0gBq urbWk1cRS+K9Cvu5e2IfPf5nfjOJdAYeGLTBqzXJFFzbz7cdjjG2CncxmULeUZTrnugffF GBKyNO5/jk8fWvgggClfrGmsihdd0fOhbmVAUu3fWm7LSzY+/Rhgyojj0D1IwiokEEHLjv 58mCa3/b9usagJc2A38mJ1IP/ZKVCxohuXMFCQZy6ouFJGbHwfXsR2LmhGJHPoBFCSGBwc y6FUI3w35XKhDkK32JQcIhCEeK0zutUQz5EbBkwVDwouD8nYUUNL0mP5ZJsEMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647374; a=rsa-sha256; cv=none; b=luVtERjqzzz+EdM+uJNJSRY0RSzlex+1gE2iPFzTL2lh504Vw+FslFrNJIs0SeoMLZ+0Tm A4Id8RFbSn5plkcydw7e8kaESOtJ89zb0AG0hyjfvZuWjdsTThcihhtl9beH/roXC/vKgH 8TbyXwcArZW0Uv6zKgofDgaQktk8aP/rhdWr1B2obFVRmWyt/K0snTIxAbYjq20YrqCxAz FrA0DjhqtY91N2F8Z3V2UMpIU8mXkm8g6p5TBTGJLVhpeBR1vvwZaHO4XyDP1OwExNajFH 1v9niIWdbHCcJyWGGmqKGmFBoewS7LElsQr7YLPZox94H0EMDNy738XURMNx/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRKn63yxzvZD; Tue, 23 Sep 2025 17:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NH9XTr077255; Tue, 23 Sep 2025 17:09:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NH9XaU077251; Tue, 23 Sep 2025 17:09:33 GMT (envelope-from git) Date: Tue, 23 Sep 2025 17:09:33 GMT Message-Id: <202509231709.58NH9XaU077251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: f38792ffc2db - main - arm64/vmm: Clean up enabling guest timer access List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f38792ffc2db67ca82026eb4861f37fe7ac7c38e Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f38792ffc2db67ca82026eb4861f37fe7ac7c38e commit f38792ffc2db67ca82026eb4861f37fe7ac7c38e Author: Andrew Turner AuthorDate: 2025-09-22 17:08:06 +0000 Commit: Andrew Turner CommitDate: 2025-09-23 17:08:36 +0000 arm64/vmm: Clean up enabling guest timer access Clean up the name of CNTHCTL_EL2 field macros and expand to include more fields. This makes it easier to see which accesses are trapped or not trapped. While here set the register directly. We already set it in locore.S so there is no need to read that and modify it. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51817 --- sys/arm64/arm64/locore.S | 4 +-- sys/arm64/include/hypervisor.h | 79 ++++++++++++++++++++++++++++++++++++------ sys/arm64/vmm/io/vtimer.c | 31 ++++++++++------- 3 files changed, 88 insertions(+), 26 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 50a3eda846da..d35e334905a7 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -418,7 +418,7 @@ LENTRY(enter_kernel_el) msr SCTLR_EL12_REG, x2 mov x2, xzr /* CPTR_EL2 is managed by vfp.c */ - ldr x3, =(CNTHCTL_E2H_EL1PCTEN | CNTHCTL_E2H_EL1PTEN) + ldr x3, =(CNTHCTL_E2H_EL1PCTEN_NOTRAP | CNTHCTL_E2H_EL1PTEN_NOTRAP) ldr x5, =(PSR_DAIF | PSR_M_EL2h) b .Ldone_vhe @@ -429,7 +429,7 @@ LENTRY(enter_kernel_el) msr vbar_el2, x2 ldr x2, =(CPTR_RES1) - ldr x3, =(CNTHCTL_EL1PCTEN | CNTHCTL_EL1PCEN) + ldr x3, =(CNTHCTL_EL1PCTEN_NOTRAP | CNTHCTL_EL1PCEN_NOTRAP) ldr x5, =(PSR_DAIF | PSR_M_EL1h) .Ldone_vhe: diff --git a/sys/arm64/include/hypervisor.h b/sys/arm64/include/hypervisor.h index e3a880afbe9c..04e15b55b218 100644 --- a/sys/arm64/include/hypervisor.h +++ b/sys/arm64/include/hypervisor.h @@ -36,20 +36,77 @@ */ /* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ -#define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ /* Valid if HCR_EL2.E2H == 0 */ -#define CNTHCTL_EL1PCTEN (1 << 0) /* Allow physical counter access */ -#define CNTHCTL_EL1PCEN (1 << 1) /* Allow physical timer access */ +#define CNTHCTL_EL1PCTEN_SHIFT 0 +#define CNTHCTL_EL1PCTEN_MASK (0x1ul << CNTHCTL_E2H_EL1PCTEN_SHIFT) +#define CNTHCTL_EL1PCTEN_TRAP (0x0ul << CNTHCTL_E2H_EL1PCTEN_SHIFT) +#define CNTHCTL_EL1PCTEN_NOTRAP (0x1ul << CNTHCTL_EL1PCTEN_SHIFT) +#define CNTHCTL_EL1PCEN_SHIFT 1 +#define CNTHCTL_EL1PCEN_MASK (0x1ul << CNTHCTL_EL1PCEN_SHIFT) +#define CNTHCTL_EL1PCEN_TRAP (0x0ul << CNTHCTL_EL1PCEN_SHIFT) +#define CNTHCTL_EL1PCEN_NOTRAP (0x1ul << CNTHCTL_EL1PCEN_SHIFT) /* Valid if HCR_EL2.E2H == 1 */ -#define CNTHCTL_E2H_EL0PCTEN (1 << 0) /* Allow EL0 physical counter access */ -#define CNTHCTL_E2H_EL0VCTEN (1 << 1) /* Allow EL0 virtual counter access */ -#define CNTHCTL_E2H_EL0VTEN (1 << 8) -#define CNTHCTL_E2H_EL0PTEN (1 << 9) -#define CNTHCTL_E2H_EL1PCTEN (1 << 10) /* Allow physical counter access */ -#define CNTHCTL_E2H_EL1PTEN (1 << 11) /* Allow physical timer access */ +#define CNTHCTL_E2H_EL0PCTEN_SHIFT 0 +#define CNTHCTL_E2H_EL0PCTEN_MASK (0x1ul << CNTHCTL_E2H_EL0PCTEN_SHIFT) +#define CNTHCTL_E2H_EL0PCTEN_TRAP (0x0ul << CNTHCTL_E2H_EL0PCTEN_SHIFT) +#define CNTHCTL_E2H_EL0PCTEN_NOTRAP (0x1ul << CNTHCTL_E2H_EL0PCTEN_SHIFT) +#define CNTHCTL_E2H_EL0VCTEN_SHIFT 1 +#define CNTHCTL_E2H_EL0VCTEN_MASK (0x1ul << CNTHCTL_E2H_EL0VCTEN_SHIFT) +#define CNTHCTL_E2H_EL0VCTEN_TRAP (0x0ul << CNTHCTL_E2H_EL0VCTEN_SHIFT) +#define CNTHCTL_E2H_EL0VCTEN_NOTRAP (0x1ul << CNTHCTL_E2H_EL0VCTEN_SHIFT) +#define CNTHCTL_E2H_EL0VTEN_SHIFT 8 +#define CNTHCTL_E2H_EL0VTEN_MASK (0x1ul << CNTHCTL_E2H_EL0VTEN_SHIFT) +#define CNTHCTL_E2H_EL0VTEN_TRAP (0x0ul << CNTHCTL_E2H_EL0VTEN_SHIFT) +#define CNTHCTL_E2H_EL0VTEN_NOTRAP (0x1ul << CNTHCTL_E2H_EL0VTEN_SHIFT) +#define CNTHCTL_E2H_EL0PTEN_SHIFT 9 +#define CNTHCTL_E2H_EL0PTEN_MASK (0x1ul << CNTHCTL_E2H_EL0PTEN_SHIFT) +#define CNTHCTL_E2H_EL0PTEN_TRAP (0x0ul << CNTHCTL_E2H_EL0PTEN_SHIFT) +#define CNTHCTL_E2H_EL0PTEN_NOTRAP (0x1ul << CNTHCTL_E2H_EL0PTEN_SHIFT) +#define CNTHCTL_E2H_EL1PCTEN_SHIFT 10 +#define CNTHCTL_E2H_EL1PCTEN_MASK (0x1ul << CNTHCTL_E2H_EL1PCTEN_SHIFT) +#define CNTHCTL_E2H_EL1PCTEN_TRAP (0x0ul << CNTHCTL_E2H_EL1PCTEN_SHIFT) +#define CNTHCTL_E2H_EL1PCTEN_NOTRAP (0x1ul << CNTHCTL_E2H_EL1PCTEN_SHIFT) +#define CNTHCTL_E2H_EL1PTEN_SHIFT 11 +#define CNTHCTL_E2H_EL1PTEN_MASK (0x1ul << CNTHCTL_E2H_EL1PTEN_SHIFT) +#define CNTHCTL_E2H_EL1PTEN_TRAP (0x0ul << CNTHCTL_E2H_EL1PTEN_SHIFT) +#define CNTHCTL_E2H_EL1PTEN_NOTRAP (0x1ul << CNTHCTL_E2H_EL1PTEN_SHIFT) /* Unconditionally valid */ -#define CNTHCTL_EVNTDIR (1 << 3) /* Control transition trigger bit */ -#define CNTHCTL_EVNTEN (1 << 2) /* Enable event stream */ +#define CNTHCTL_EVNTEN_SHIFT 2 +#define CNTHCTL_EVNTEN_MASK (0x1ul << CNTHCTL_EVNTEN_SHIFT) +#define CNTHCTL_EVNTEN_DIS (0x0ul << CNTHCTL_EVNTEN_SHIFT) +#define CNTHCTL_EVNTEN_EN (0x1ul << CNTHCTL_EVNTEN_SHIFT) +#define CNTHCTL_EVNTDIR_SHIFT 3 +#define CNTHCTL_EVNTDIR_MASK (0x1ul << CNTHCTL_EVNTDIR_SHIFT) +#define CNTHCTL_EVNTDIR_HIGH (0x0ul << CNTHCTL_EVNTDIR_SHIFT) +#define CNTHCTL_EVNTDIR_LOW (0x1ul << CNTHCTL_EVNTDIR_SHIFT) +#define CNTHCTL_EVNTI_SHIFT 4 +#define CNTHCTL_EVNTI_MASK (0xful << CNTHCTL_EVNTI_SHIFT) +#define CNTHCTL_ECV_SHIFT 12 +#define CNTHCTL_ECV_MASK (0x1ul << CNTHCTL_ECV_SHIFT) +#define CNTHCTL_ECV_DIS (0x0ul << CNTHCTL_ECV_SHIFT) +#define CNTHCTL_ECV_EN (0x1ul << CNTHCTL_ECV_SHIFT) +#define CNTHCTL_EL1TVT_SHIFT 13 +#define CNTHCTL_EL1TVT_MASK (0x1ul << CNTHCTL_EL1TVT_SHIFT) +#define CNTHCTL_EL1TVT_NOTRAP (0x0ul << CNTHCTL_EL1TVT_SHIFT) +#define CNTHCTL_EL1TVT_TRAP (0x1ul << CNTHCTL_EL1TVT_SHIFT) +#define CNTHCTL_EL1TVCT_SHIFT 14 +#define CNTHCTL_EL1TVCT_MASK (0x1ul << CNTHCTL_EL1TVCT_SHIFT) +#define CNTHCTL_EL1TVCT_NOTRAP (0x0ul << CNTHCTL_EL1TVCT_SHIFT) +#define CNTHCTL_EL1TVCT_TRAP (0x1ul << CNTHCTL_EL1TVCT_SHIFT) +#define CNTHCTL_EL1NVPCT_SHIFT 15 +#define CNTHCTL_EL1NVPCT_MASK (0x1ul << CNTHCTL_EL1NVPCT_SHIFT) +#define CNTHCTL_EL1NVPCT_NOTRAP (0x0ul << CNTHCTL_EL1NVPCT_SHIFT) +#define CNTHCTL_EL1NVPCT_TRAP (0x1ul << CNTHCTL_EL1NVPCT_SHIFT) +#define CNTHCTL_EL1NVVCT_SHIFT 16 +#define CNTHCTL_EL1NVVCT_MASK (0x1ul << CNTHCTL_EL1NVVCT_SHIFT) +#define CNTHCTL_EL1NVVCT_NOTRAP (0x0ul << CNTHCTL_EL1NVVCT_SHIFT) +#define CNTHCTL_EL1NVVCT_TRAP (0x1ul << CNTHCTL_EL1NVVCT_SHIFT) +#define CNTHCTL_EVNTIS_SHIFT 17 +#define CNTHCTL_EVNTIS_MASK (0x1ul << CNTHCTL_EVNTIS_SHIFT) +#define CNTHCTL_CNTVMASK_SHIFT 18 +#define CNTHCTL_CNTVMASK_MASK (0x1ul << CNTHCTL_CNTVMASK_SHIFT) +#define CNTHCTL_CNTPMASK_SHIFT 19 +#define CNTHCTL_CNTPMASK_MASK (0x1ul << CNTHCTL_CNTPMASK_SHIFT) /* CNTPOFF_EL2 - Counter-timer Physical Offset Register */ #define CNTPOFF_EL2_REG MRS_REG_ALT_NAME(CNTPOFF_EL2) diff --git a/sys/arm64/vmm/io/vtimer.c b/sys/arm64/vmm/io/vtimer.c index f59d7ebc1ad4..51b21110d42c 100644 --- a/sys/arm64/vmm/io/vtimer.c +++ b/sys/arm64/vmm/io/vtimer.c @@ -137,33 +137,38 @@ vtimer_vminit(struct hyp *hyp) if (in_vhe()) { /* * CNTHCTL_E2H_EL0PCTEN: trap EL0 access to CNTP{CT,CTSS}_EL0 - * CNTHCTL_E2H_EL1VCTEN: don't trap EL0 access to - * CNTV{CT,CTSS}_EL0 + * CNTHCTL_E2H_EL0VCTEN: don't trap EL0 access to + * CNTV{CT,CTXX}_EL0 * CNTHCTL_E2H_EL0VTEN: don't trap EL0 access to * CNTV_{CTL,CVAL,TVAL}_EL0 * CNTHCTL_E2H_EL0PTEN: trap EL0 access to * CNTP_{CTL,CVAL,TVAL}_EL0 - * CNTHCTL_E2H_EL1PCEN: trap EL1 access to - CNTP_{CTL,CVAL,TVAL}_EL0 * CNTHCTL_E2H_EL1PCTEN: trap access to CNTPCT_EL0 + * CNTHCTL_E2H_EL1PTEN: trap access to + * CNTP_{CTL,CVAL,TVAL}_EL0 + * CNTHCTL_E2H_EL1VCTEN: don't trap EL0 access to + * CNTV{CT,CTSS}_EL0 + * CNTHCTL_E2H_EL1PCEN: trap EL1 access to + * CNTP_{CTL,CVAL,TVAL}_EL0 * * TODO: Don't trap when FEAT_ECV is present */ - hyp->vtimer.cnthctl_el2 &= ~CNTHCTL_E2H_EL0PCTEN; - hyp->vtimer.cnthctl_el2 |= CNTHCTL_E2H_EL0VCTEN; - hyp->vtimer.cnthctl_el2 |= CNTHCTL_E2H_EL0VTEN; - hyp->vtimer.cnthctl_el2 &= ~CNTHCTL_E2H_EL0PTEN; - - hyp->vtimer.cnthctl_el2 &= ~CNTHCTL_E2H_EL1PTEN; - hyp->vtimer.cnthctl_el2 &= ~CNTHCTL_E2H_EL1PCTEN; + hyp->vtimer.cnthctl_el2 = + CNTHCTL_E2H_EL0PCTEN_TRAP | + CNTHCTL_E2H_EL0VCTEN_NOTRAP | + CNTHCTL_E2H_EL0VTEN_NOTRAP | + CNTHCTL_E2H_EL0PTEN_TRAP | + CNTHCTL_E2H_EL1PCTEN_TRAP | + CNTHCTL_E2H_EL1PTEN_TRAP; } else { /* * CNTHCTL_EL1PCEN: trap access to CNTP_{CTL, CVAL, TVAL}_EL0 * from EL1 * CNTHCTL_EL1PCTEN: trap access to CNTPCT_EL0 */ - hyp->vtimer.cnthctl_el2 &= ~CNTHCTL_EL1PCEN; - hyp->vtimer.cnthctl_el2 &= ~CNTHCTL_EL1PCTEN; + hyp->vtimer.cnthctl_el2 = + CNTHCTL_EL1PCTEN_TRAP | + CNTHCTL_EL1PCEN_TRAP; } now = READ_SPECIALREG(cntpct_el0); From nobody Tue Sep 23 17:09:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRKq1ttnz68tWN; Tue, 23 Sep 2025 17:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRKq0FgRz46lQ; Tue, 23 Sep 2025 17:09:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5HqPwY5yd1XfX0HxzGtYa+kfY7mpm4X69mfSV5epuc8=; b=XSUFh98zfCpiyyUNuRqoIdCpir+8X3Y2uskgdyhLyXrnzprbDrJHXoTo1bG8QfXCkpQFQI geLictALpVNna8GXQR4+Az9VAaCfMSZL3NFNm9Mivs/knVDK5vIXshZVimmzKE7JhRAZ4J w8b4AH/oIR4/c1oDggYzcespLN1YXntwdI5KoFDhVfq3BE9LcS+MJkRbGB6kqFk06pSfqe xLzSqsvMt8Qxrfc+xDmSX3ikCcd+wXImeHe7C5LStuIUmwIjmdvWPlqiS7wX7XgSWicxFt PIWbUF56KllM9XkzAbWPqJFLShdpQp0B9OMOMGzeKcpshUWYSMIyOuW71+NhOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5HqPwY5yd1XfX0HxzGtYa+kfY7mpm4X69mfSV5epuc8=; b=Sd32lb4OpA4jQh9GOVsrkLKdzX6tstYBaxHVP7HDTOY0UX8pDdOyFiqxVPlpdNhXmdAzeu IcMOCUHSdlhl0Ut27DoEfnh/8EskAqh2G9Z0jFJPlunKMolTyzi92xDZTX9xScb6vHfyKQ XqjwMPmX+OBGJl60BwYnjXNLaoY9zLK4EdJ787VshzmwolSHU+hzhES/Tw/Tkf5srJt+CE J9HG8TE3pv8xKfum5d4PhurMn43m8EwJicerzQrRTV3hZdat9c3oTrq1lgJABOrLdZdxVv D2tOnKAyXVjVYuqO3fIA61wkhyM6Ldvw5ZyvXmRa9ub9cjJzrzjzuQEHo9slMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647375; a=rsa-sha256; cv=none; b=CL8NwpZdj585R8fN8jEOz1YNjMwQEtN0dPncNFQ7QseqFWvxcwTKHiJphTvZJ7EtBlFqXV gFm5wpQDO32hJXtwF1v315C9+oeWFDM6YC/F3iFKgvGNqZhe53yoCgrvfzicrYESnXTe7e jD4mbvADucQTSc5F9Jzc6QcmY/eOGROfyL/9hhcIiOY6RBJByndCXLdbAf+P3t0FLE/OSC qBEN5ahQi5CVk0t6mtCrW16fvB4Xtexj2bvL+3ys7Pb6zhEUoauuJUXVklISckxg3lUXKw HvdjD2NYBfqz/6Ix92m7ZUTiRb5MajkNCJW1KhZ05tHQXMyruODbz4tnwbAiHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRKp6QlZzvSC; Tue, 23 Sep 2025 17:09:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NH9Yw6077289; Tue, 23 Sep 2025 17:09:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NH9YwQ077286; Tue, 23 Sep 2025 17:09:34 GMT (envelope-from git) Date: Tue, 23 Sep 2025 17:09:34 GMT Message-Id: <202509231709.58NH9YwQ077286@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: b3d30be6ed71 - main - arm64/vmm: Remove support for reading CNTHCTL_EL2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3d30be6ed7108b97ed628f7ec9497a112d49fd6 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=b3d30be6ed7108b97ed628f7ec9497a112d49fd6 commit b3d30be6ed7108b97ed628f7ec9497a112d49fd6 Author: Andrew Turner AuthorDate: 2025-09-22 17:08:14 +0000 Commit: Andrew Turner CommitDate: 2025-09-23 17:08:36 +0000 arm64/vmm: Remove support for reading CNTHCTL_EL2 This is now unused as we just set the register value directly. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51818 --- sys/arm64/vmm/hyp.h | 1 - sys/arm64/vmm/io/vtimer.c | 5 +---- sys/arm64/vmm/io/vtimer.h | 2 +- sys/arm64/vmm/vmm_arm64.c | 4 +--- sys/arm64/vmm/vmm_hyp.c | 2 -- 5 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sys/arm64/vmm/hyp.h b/sys/arm64/vmm/hyp.h index 0b2977c73960..0c8d0fb28b18 100644 --- a/sys/arm64/vmm/hyp.h +++ b/sys/arm64/vmm/hyp.h @@ -80,7 +80,6 @@ #define HYP_ENTER_GUEST 0x00000002 #define HYP_READ_REGISTER 0x00000003 #define HYP_REG_ICH_VTR 0x1 -#define HYP_REG_CNTHCTL 0x2 #define HYP_CLEAN_S2_TLBI 0x00000004 #define HYP_DC_CIVAC 0x00000005 #define HYP_EL2_TLBI 0x00000006 diff --git a/sys/arm64/vmm/io/vtimer.c b/sys/arm64/vmm/io/vtimer.c index 51b21110d42c..ddc9e6e840a5 100644 --- a/sys/arm64/vmm/io/vtimer.c +++ b/sys/arm64/vmm/io/vtimer.c @@ -55,7 +55,6 @@ #define timer_enabled(ctl) \ (!((ctl) & CNTP_CTL_IMASK) && ((ctl) & CNTP_CTL_ENABLE)) -static uint64_t cnthctl_el2_reg; static uint32_t tmr_frq; #define timer_condition_met(ctl) ((ctl) & CNTP_CTL_ISTATUS) @@ -111,9 +110,8 @@ out: } int -vtimer_init(uint64_t cnthctl_el2) +vtimer_init(void) { - cnthctl_el2_reg = cnthctl_el2; /* * The guest *MUST* use the same timer frequency as the host. The * register CNTFRQ_EL0 is accessible to the guest and a different value @@ -129,7 +127,6 @@ vtimer_vminit(struct hyp *hyp) { uint64_t now; - hyp->vtimer.cnthctl_el2 = cnthctl_el2_reg; /* * Configure the Counter-timer Hypervisor Control Register for the VM. diff --git a/sys/arm64/vmm/io/vtimer.h b/sys/arm64/vmm/io/vtimer.h index 71a20344d05e..92ce025968d2 100644 --- a/sys/arm64/vmm/io/vtimer.h +++ b/sys/arm64/vmm/io/vtimer.h @@ -66,7 +66,7 @@ struct vtimer_cpu { uint32_t cntkctl_el1; }; -int vtimer_init(uint64_t cnthctl_el2); +int vtimer_init(void); void vtimer_vminit(struct hyp *); void vtimer_cpuinit(struct hypctx *); void vtimer_cpucleanup(struct hypctx *); diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index 70bb914d68c6..fa13fc76677a 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -238,7 +238,6 @@ vmmops_modinit(int ipinum) vm_offset_t next_hyp_va; vm_paddr_t vmm_base; uint64_t id_aa64mmfr0_el1, pa_range_bits, pa_range_field; - uint64_t cnthctl_el2; int cpu, i; bool rv __diagused; @@ -444,10 +443,9 @@ vmmops_modinit(int ipinum) vmem_add(el2_mem_alloc, next_hyp_va, HYP_VM_MAX_ADDRESS - next_hyp_va, M_WAITOK); } - cnthctl_el2 = vmm_read_reg(HYP_REG_CNTHCTL); vgic_init(); - vtimer_init(cnthctl_el2); + vtimer_init(); return (0); } diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c index 475ad79f63cc..6bbf0d7eb730 100644 --- a/sys/arm64/vmm/vmm_hyp.c +++ b/sys/arm64/vmm/vmm_hyp.c @@ -615,8 +615,6 @@ VMM_HYP_FUNC(read_reg)(uint64_t reg) switch (reg) { case HYP_REG_ICH_VTR: return (READ_SPECIALREG(ich_vtr_el2)); - case HYP_REG_CNTHCTL: - return (READ_SPECIALREG(cnthctl_el2)); } return (0); From nobody Tue Sep 23 17:09:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRKr3813z68tWR; Tue, 23 Sep 2025 17:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRKr0j21z471C; Tue, 23 Sep 2025 17:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qi+LW8t0RWDLLsdgWtJ9wS3MkQ96xwOvkCpB1akPKRo=; b=mI8hcldrErUWyigCCjQ/zjzISW022QW5pvIjUlY6aDk3x858H7gk/Mo2fUVSzsJSf9ApYo 8F+j+S8VnUaEvl6K48x9n209urPg79F7jn0rRLp+up/ISdd6sS8/5kR4GOvt3kMdBSbXLE Il/vI5Qn6GCuisXF+rCMapXF6FRzWJVsMmU3ES159bHOMiJ8t9w4MvHDlqaRTX1ggtkbe/ 3EkldhkAxM+fJlkyRCH8tbRwRsXqBRtfnPpEKG0VSwfX3dG137OXHIyoiGPFNblYaYTnlN bA6Zgrr19s0B8G0f1O7Dd76gIEk0lH66PphqcNfD6Aa56aZgkMj045oDxhLv7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qi+LW8t0RWDLLsdgWtJ9wS3MkQ96xwOvkCpB1akPKRo=; b=xoPbHe9o24AbOwuL8fNtIrU3/l9WHOPJ+KXVj9646dsNz+k8zbauWFmW5q0zUvr24sXwRx tyrldBd4BQzJXW/T38jQxvg1y8i+B5gQeiTFXSvEvb1mydrjJD4gA1jcVWE2WjxqXsM7Df vC8yFPpguBOhOptKKUG4foHgfezO3ilT0GxItBswbIho89syNFphfeQYmhMaGjnzTe52Nf 3m8S3IqUYxr2TasNuDQS6eWoyGOx9laHRu2ww/OWYXJfzdzh2h7gOGGb0G7pOwnDIkLeEH aehLltGxY1l2hRhmy0/EXrMmEp21H/2gWninuFqkKwXz3q7sfxadhpSkDZj38A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647376; a=rsa-sha256; cv=none; b=qp6VL1RsDiYNvXBE7D1GY/QYZOhD56iCvCdN9aAKN3Tg2c88EBGndsnlq9nP5CmmwMkU9m A54Uv1Yv6NX+tkl48md5rHlQ0ya5TqZLvpPQZpyF+tef9FdH26LkFZBqqr2LMNJ2judK+E UC/OaHeJkV96nHNr/Ic+tijcaecZ71WfHGcm4vE1s6oIlGWrqZbcV+TUmucJQcl4dyJrs3 9Zk3TZIP2Dm7ki5wj182kMw3P7a3z2K4orz3J5qutdSJIwhnuEP5YLn+rzr1GjtgEtIRvG edl9reVz7KJsYj2OS4W9zPqKJRpy3NP3jJ2DTTlBXfEkgUdAJ140BtvN8vsY5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRKr0K03zvcf; Tue, 23 Sep 2025 17:09:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NH9ZkM077326; Tue, 23 Sep 2025 17:09:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NH9Z5Q077323; Tue, 23 Sep 2025 17:09:35 GMT (envelope-from git) Date: Tue, 23 Sep 2025 17:09:35 GMT Message-Id: <202509231709.58NH9Z5Q077323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: e38e04a0ba3f - main - arm64: Add more counter/timer registers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e38e04a0ba3fdcdc2f3238bf4d962f65fadf527f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e38e04a0ba3fdcdc2f3238bf4d962f65fadf527f commit e38e04a0ba3fdcdc2f3238bf4d962f65fadf527f Author: Andrew Turner AuthorDate: 2025-09-22 17:08:25 +0000 Commit: Andrew Turner CommitDate: 2025-09-23 17:08:36 +0000 arm64: Add more counter/timer registers These will be used to support the Enhanced Counter Virtualization Extensions: FEAT_ECV and FEAT_ECV_POFF. The former adds Self-Synchronized registers, and the latter adds support for an offset for the physical counter. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51819 --- sys/arm64/include/armreg.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index c2065fdb3f8c..da051e8f7c8a 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -232,6 +232,14 @@ #define CNTP_CTL_IMASK (1 << 1) #define CNTP_CTL_ISTATUS (1 << 2) +/* CNTP_CTL_EL02 - Counter-timer Physical Timer Control register */ +#define CNTP_CTL_EL02_REG MRS_REG_ALT_NAME(CNTP_CTL_EL02) +#define CNTP_CTL_EL02_op0 3 +#define CNTP_CTL_EL02_op1 5 +#define CNTP_CTL_EL02_CRn 14 +#define CNTP_CTL_EL02_CRm 2 +#define CNTP_CTL_EL02_op2 1 + /* CNTP_CVAL_EL0 - Counter-timer Physical Timer CompareValue register */ #define CNTP_CVAL_EL0_op0 3 #define CNTP_CVAL_EL0_op1 3 @@ -239,6 +247,14 @@ #define CNTP_CVAL_EL0_CRm 2 #define CNTP_CVAL_EL0_op2 2 +/* CNTP_CVAL_EL02 - Counter-timer Physical Timer CompareValue register */ +#define CNTP_CVAL_EL02_REG MRS_REG_ALT_NAME(CNTP_CVAL_EL02) +#define CNTP_CVAL_EL02_op0 3 +#define CNTP_CVAL_EL02_op1 5 +#define CNTP_CVAL_EL02_CRn 14 +#define CNTP_CVAL_EL02_CRm 2 +#define CNTP_CVAL_EL02_op2 2 + /* CNTP_TVAL_EL0 - Counter-timer Physical Timer TimerValue register */ #define CNTP_TVAL_EL0_op0 3 #define CNTP_TVAL_EL0_op1 3 @@ -254,6 +270,14 @@ #define CNTPCT_EL0_CRm 0 #define CNTPCT_EL0_op2 1 +/* CNTPCTSS_EL0 - Counter-timer Self-Synchronized Physical Count register */ +#define CNTPCTSS_EL0_REG MRS_REG_ALT_NAME(CNTPCTSS_EL0) +#define CNTPCTSS_EL0_op0 3 +#define CNTPCTSS_EL0_op1 3 +#define CNTPCTSS_EL0_CRn 14 +#define CNTPCTSS_EL0_CRm 0 +#define CNTPCTSS_EL0_op2 5 + /* CNTV_CTL_EL0 - Counter-timer Virtual Timer Control register */ #define CNTV_CTL_EL0_op0 3 #define CNTV_CTL_EL0_op1 3 @@ -282,6 +306,14 @@ #define CNTV_CVAL_EL02_CRm 3 #define CNTV_CVAL_EL02_op2 2 +/* CNTVCTSS_EL0 - Counter-timer Self-Synchronized Virtual Count register */ +#define CNTVCTSS_EL0_REG MRS_REG_ALT_NAME(CNTVCTSS_EL0) +#define CNTVCTSS_EL0_op0 3 +#define CNTVCTSS_EL0_op1 3 +#define CNTVCTSS_EL0_CRn 14 +#define CNTVCTSS_EL0_CRm 0 +#define CNTVCTSS_EL0_op2 6 + /* CONTEXTIDR_EL1 - Context ID register */ #define CONTEXTIDR_EL1_REG MRS_REG_ALT_NAME(CONTEXTIDR_EL1) #define CONTEXTIDR_EL1_op0 3 From nobody Tue Sep 23 17:09:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRKs5ZvCz68tSy; Tue, 23 Sep 2025 17:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRKs1xpWz471c; Tue, 23 Sep 2025 17:09:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SNFLxf8hdmpQIfUmW8jiMWP2DwCz/Baoyr1zuJ3ML98=; b=oJQFrzNttNY6GKyt46phHdiGM5G7Z4LZI8e78FZA/b6DOtAJnyFymbwm17X/4/Vcv0ZbJu 52s6SnXlDhvsQtoFDEefeMaB1xZwHFQIaT3/6StEDEO5FG6bMw071cIMmkBxYf3v8tAE38 5mCTepxml+5+8UHG081hNR9X9E16nz50suK4PZ0jLzsRafL9p+HBCaH+AC9QxIRxVDfUkg VNci1bbQnYqzQUrc/+FgrG9p7mOmSzBwRcrcPX0KTl4gs+tVmCqQC5hdkO1TBR2vagjNE4 pZt5xJcJaH+kWbcN+FmcM48ac4HhonLr8L4k+Xhe0E8zoBWxNrk1bk1U6fvGHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SNFLxf8hdmpQIfUmW8jiMWP2DwCz/Baoyr1zuJ3ML98=; b=MC1EteEGH3RNtt2zMqX9OD9u/mgvoXUbPFdYs0K17Pr6IB654kAYBrfmqQoa3C3vziYv20 mxPa/x4bOV8cej0nFSA28f1ZULqqzcf/VcsMmnJt/8QA7s3Rg2GgBynmGEebtc/phHSGEf DI9z96RYQvwGQubha8h4ZlxhF5R21qgbYTcMyHVXbaCZYX7rziSeMpJxvxnnR5bpIvgE26 rUG9wzDPzrTlySAuiNSPHcWmB+6wOzrbciohxFgFZuOy4LQr6RrEb4Eq2wvvZ1QKMzLx9D X10nFf3h0gP8d7YqFQZvvr9zuvgaDSkEMO1I4GhPtE1wUnNoXITPyjVcJiS6eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647377; a=rsa-sha256; cv=none; b=CCiAvfKBS+3RTLIhy1sHJ89eL0vHQgQwm7UzYECIKNZ3fx1PLKoVj+Ow4u1PzRHNZmlhjs 3X2iOuuyNygQBHDuO/Ch93OUfO8z3Pe89G46WewsBBQ/1E7lN8jrDAQhqHqyTcyB83FW5b NQ/ZnLxmW9AN9gXevvWYCZat+thsqg3fQrEwX9OgiMLxzpG0vPSOjsHtMOCOStKyZwijdG O84m10fS4l5lubNmVWra4L795hkWfixfa9uAQe4rXElO3kXukZh5QyzwYos9y56HDHs+EG hOjeF3z7znEBekAUFQWxj9YTaITRKwvACw7qhfJFxlDcC04kk8Rt7zjhBQW1XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRKs1X8MzvgN; Tue, 23 Sep 2025 17:09:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NH9b6F077360; Tue, 23 Sep 2025 17:09:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NH9b26077357; Tue, 23 Sep 2025 17:09:37 GMT (envelope-from git) Date: Tue, 23 Sep 2025 17:09:37 GMT Message-Id: <202509231709.58NH9b26077357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 0efa0fe26b9d - main - arm: Use the Self-Synchronized counter registers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0efa0fe26b9d980b2862bb58f8484f0123cff19f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0efa0fe26b9d980b2862bb58f8484f0123cff19f commit 0efa0fe26b9d980b2862bb58f8484f0123cff19f Author: Andrew Turner AuthorDate: 2025-09-22 17:08:47 +0000 Commit: Andrew Turner CommitDate: 2025-09-23 17:08:37 +0000 arm: Use the Self-Synchronized counter registers When FEAT_ECV is implemented on arm64 a Self-Synchronized view of the counter registers are available. These don't need an isb before reading the count as they are not able to be speculatively executed. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51820 --- sys/arm/arm/generic_timer.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index c4a1f44a0079..e3ba56a6f6ac 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -231,6 +231,25 @@ get_cntxct(bool physical) return (val); } +#ifdef __aarch64__ +/* + * Read the self-syncronized counter. These cannot be read speculatively so + * don't need an isb before them. + */ +static uint64_t +get_cntxctss(bool physical) +{ + uint64_t val; + + if (physical) + val = READ_SPECIALREG(CNTPCTSS_EL0_REG); + else + val = READ_SPECIALREG(CNTVCTSS_EL0_REG); + + return (val); +} +#endif + static int set_ctrl(uint32_t val, bool physical) { @@ -631,6 +650,7 @@ arm_tmr_attach(device_t dev) pcell_t clock; #endif #ifdef __aarch64__ + uint64_t id_aa64mmfr0_el1; int user_phys; #endif int error; @@ -641,6 +661,11 @@ arm_tmr_attach(device_t dev) return (ENXIO); sc->get_cntxct = &get_cntxct; +#ifdef __aarch64__ + if (get_kernel_reg(ID_AA64MMFR0_EL1, &id_aa64mmfr0_el1) && + ID_AA64MMFR0_ECV_VAL(id_aa64mmfr0_el1) >= ID_AA64MMFR0_ECV_IMPL) + sc->get_cntxct = &get_cntxctss; +#endif #ifdef FDT /* Get the base clock frequency */ node = ofw_bus_get_node(dev); From nobody Tue Sep 23 17:09:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRKw0JKTz68syK; Tue, 23 Sep 2025 17:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRKv3N2Zz46wt; Tue, 23 Sep 2025 17:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OzDIMe3t40QSY+NzgoQRUbIM5zjrGriSvrjj+56SoYQ=; b=JoAPitAI0+q02Dc3XFSUgY3RmW994mZf3eGzXBXbX0eTj4VrK+51lPWiWx+EgYxDWANh1K q3HOlCcPxRu9YqtOph+0GrWIiyUg56DMztWS+cxVuQIRN6f9i895InFK+g8K3P8a8hDVdC tBiElHe77AZlfbnvosvxpnr/Tg+B3KKFmnpfDo4q7uKs6A4hrE1ACzkrzYbKxwenZzn9f5 aTfxU2QYIeJP9dj1IujfWd8qtt8k3Qd0+qH0rBMSl1dKYolme07enBPcUn8rFqa+dFJsRq 2U3gGv8E1xXAJikS+aWBfCxk/litt9FR0EgIfRvSm6cYLby3ANvX+aM6JotaEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OzDIMe3t40QSY+NzgoQRUbIM5zjrGriSvrjj+56SoYQ=; b=gYEkDBjZQNfPQ3lC3XyAKJg9dzxj4bDzf4/Q7OiCohyeC7G61yh2T+t5Tqw61Oj4NTUzil j2ZRFmZ9jrIlm9MPVXenJ3305v7buWBdDgo4Gpv1gIyvK1spNImgsWXiZAYH9h02sWRRap 3rx7Q4nJoHzey2q0hdW70BSNVJf0lEP7aMbNuoJiUQHN7iVgvRaTWeuPfxNYZT0YpX9ahk 2y68M2ilfpudliWwY+NB5DSaFvSlFipqqkUOaM7N2U1nZfm6RG7TAfauoEG9FpNa6tvXue nOhdrzNuCCa17c/V10OkIfkPttT5SNh/A94847/l5+x2VZml1HmpkhaeRHxeDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647379; a=rsa-sha256; cv=none; b=eAQNXjUmdGtWaNXEqXripJhElVtUOGy/Q0h8zU3PykhHXIbSTd/89tVTbOgMnCdSM6FJ7K UB1YAg8NX31+8Jry2n1ZQdDryo+q3DY4Ze4OZP0IScA21lJvrRlECvcKhL/ZAuEOeGa+3M BJXBOX6COxL+HBQ03hTcnZkOOIKcRNsdHi1BjHxbzILM5Pm6TSVNcq6vNruSm3l8AJREsh ZPfCKKeBhPadUmjUTQ8X4A9M3ueipXWmkuWq2zBA6TUtrBh9hLuoh2HKBfUoOVAFQO1F/9 ikNAIbr7PNVcFqKrvniALwiQvP/p7nbrgzsI3IysqUlQ+GElyM82Fdzi0IV6HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRKv308bzvgP; Tue, 23 Sep 2025 17:09:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NH9d8D077439; Tue, 23 Sep 2025 17:09:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NH9dVv077436; Tue, 23 Sep 2025 17:09:39 GMT (envelope-from git) Date: Tue, 23 Sep 2025 17:09:39 GMT Message-Id: <202509231709.58NH9dVv077436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: fe1d344bf416 - main - sys/conf: Fix arm64 vmm_nvhe dependencies List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe1d344bf416aa921b4bf233668dda7cf4e27444 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=fe1d344bf416aa921b4bf233668dda7cf4e27444 commit fe1d344bf416aa921b4bf233668dda7cf4e27444 Author: Andrew Turner AuthorDate: 2025-09-22 17:10:12 +0000 Commit: Andrew Turner CommitDate: 2025-09-23 17:08:37 +0000 sys/conf: Fix arm64 vmm_nvhe dependencies These files include a vmm_hyp equivalent file but don't have a dependency recorded. Fix this by manually adding this dependency. This is only a problem in a non-GENERIC configuration as normally vmm is loaded as vmm.ko. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51822 --- sys/conf/files.arm64 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 45966fea8041..856ea3af1372 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -127,9 +127,11 @@ arm64/vmm/vmm_reset.c optional vmm arm64/vmm/vmm_handlers.c optional vmm arm64/vmm/vmm_call.S optional vmm arm64/vmm/vmm_nvhe_exception.S optional vmm \ + dependency "$S/arm64/vmm/vmm_hyp_exception.S" \ compile-with "${NOSAN_C} -fpie" \ no-obj arm64/vmm/vmm_nvhe.c optional vmm \ + dependency "$S/arm64/vmm/vmm_hyp.c" \ compile-with "${NOSAN_C} -fpie" \ no-obj vmm_hyp_blob.elf.full optional vmm \ From nobody Tue Sep 23 17:09:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRKt4Y66z68tT2; Tue, 23 Sep 2025 17:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRKt2lX4z471v; Tue, 23 Sep 2025 17:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=orUVgLfyXwjrJyNpmA3gNC+goamIjQkYIHEGgRRbWco=; b=LlSyuZ0M1ilc3FQ+AmqMZBh5lTHr9Rf9RTU6RJmArSmXfZ/3KVNtc3s9tyT6GE49iGkNAf HV3xTTQbCxZ913k/KvyD65xRSN+8e7mztAR0GVZS6nhrQvbOulAgWzdFR5tMGY4J7ExdcF BVvDP9dQ+JNfeHrhPvkA9iLRZosfhKtue99jREmvdnRAPzG4hOAGDJrInO72FqsKaLBJ3s ZmsubdHbme9X0GF/bGr0oYlz5yGh0tWxNFI752DkCsYfPb5gg8Whv3qjShI3KsKo0vBg8P 8d76GoOd4wBPctvQkdTV8uBSz5e5Os06eYa9dGRfjZOhDRAX/OIgByg7Jjq3jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=orUVgLfyXwjrJyNpmA3gNC+goamIjQkYIHEGgRRbWco=; b=YYVpcWo5MKkWbb6cfDThYb+lxNyZZGz7U4M6/YfLJO151qYfkF+dDO3J2AO3g+vvLu6r2N rWWeoVzQu6FmEzqQLJJJXYLbAVkU6Djdsg61Q8LghYg0VVkL7XMdoxN/JQffR59gtO6NVr x4uyS76gqMVy5pYoc1IY3FVBPxrFFSq0Ufa4iuhuSydXtZn3G6IgmdY4P+lkwnAw9S6zkS vFQ90m80rvSivEyGTqzbxGEIdoff43jBCrmShmStgjrHwlRlB+isoMfbrgA9n11v6WOLY0 9kTW0uhmPnO23dkSX4qYGOggmHquZ/S3xSkmCJVP9K8gw76KIlvRXb/VSdcvGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647378; a=rsa-sha256; cv=none; b=YTFihJ0pYJdCpLjOxRS5ajUFJYrB81c/uk+NxK1umLZ4yLioUfY0TpxKmV3uVxmovwy8yP XzaIt2jlp64FXSAq+DPwxDJp31TYtd511PeXzw7amdAbw2YmVvQOK+vWOpG9BR9Y2kwmnJ NgCAB/DyTCfWOPLFNUh2+SmNqx247CEsxx9Rgf04k8oe5V5SFuhb/wCYgXgRwzjBgvyJSq WrlHhAwB3cmJnSM33yCbm+6Gx85aDbdo7EkzEYKPRnAshmFRcSHq0YWQox9NxgLo0znMWX nTcDY18REWr1tFeAqKn5gegnBZDZDn6OxorsR9bf+QkNK/MBdLtL6dmt4xpn3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRKt2LB0zvSD; Tue, 23 Sep 2025 17:09:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NH9c8l077404; Tue, 23 Sep 2025 17:09:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NH9c9N077401; Tue, 23 Sep 2025 17:09:38 GMT (envelope-from git) Date: Tue, 23 Sep 2025 17:09:38 GMT Message-Id: <202509231709.58NH9c9N077401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: fbe076b2c837 - main - arm64/vmm: Use FEAT_ECV_POFF to support a timer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbe076b2c837f396f96d4725a43745e741557df1 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=fbe076b2c837f396f96d4725a43745e741557df1 commit fbe076b2c837f396f96d4725a43745e741557df1 Author: Andrew Turner AuthorDate: 2025-09-22 17:09:54 +0000 Commit: Andrew Turner CommitDate: 2025-09-23 17:08:37 +0000 arm64/vmm: Use FEAT_ECV_POFF to support a timer Support guest access to the physical timer when FEAT_ECV_POFF is supported. In this case we can set an offset for the physical timer. We can reuse the virtual timer support to also support the physical timer, with a few more registers needing to be handled when switching to a guest. As it is not clear how this will affect performance when the guest doesn't use it hide enabling it behind a sysctl. It is expected this will be useful when Nested Virtualisation is supported as guests are expected to use the physical timer registers. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51821 --- sys/arm64/vmm/arm64.h | 1 + sys/arm64/vmm/io/vtimer.c | 74 +++++++++++++++++++++++++++++++++++++---------- sys/arm64/vmm/vmm_arm64.c | 5 ++++ sys/arm64/vmm/vmm_hyp.c | 54 +++++++++++++++++++++++++++++----- 4 files changed, 110 insertions(+), 24 deletions(-) diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h index 0bd5a933bee1..82c4481b8692 100644 --- a/sys/arm64/vmm/arm64.h +++ b/sys/arm64/vmm/arm64.h @@ -127,6 +127,7 @@ struct hyp { uint64_t el2_addr; /* The address of this in el2 space */ uint64_t feats; /* Which features are enabled */ #define HYP_FEAT_HCX (0x1ul << 0) +#define HYP_FEAT_ECV_POFF (0x1ul << 1) bool vgic_attached; struct vgic_v3 *vgic; struct hypctx *ctx[]; diff --git a/sys/arm64/vmm/io/vtimer.c b/sys/arm64/vmm/io/vtimer.c index ddc9e6e840a5..da0f0d96c431 100644 --- a/sys/arm64/vmm/io/vtimer.c +++ b/sys/arm64/vmm/io/vtimer.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,14 @@ static uint32_t tmr_frq; #define timer_condition_met(ctl) ((ctl) & CNTP_CTL_ISTATUS) +SYSCTL_DECL(_hw_vmm); +SYSCTL_NODE(_hw_vmm, OID_AUTO, vtimer, CTLFLAG_RW, NULL, NULL); + +static bool allow_ecv_phys = false; +SYSCTL_BOOL(_hw_vmm_vtimer, OID_AUTO, allow_ecv_phys, CTLFLAG_RW, + &allow_ecv_phys, 0, + "Enable hardware access to the physical timer if FEAT_ECV_POFF is supported"); + static void vtimer_schedule_irq(struct hypctx *hypctx, bool phys); static int @@ -126,7 +135,12 @@ void vtimer_vminit(struct hyp *hyp) { uint64_t now; + bool ecv_poff; + + ecv_poff = false; + if (allow_ecv_phys && (hyp->feats & HYP_FEAT_ECV_POFF) != 0) + ecv_poff = true; /* * Configure the Counter-timer Hypervisor Control Register for the VM. @@ -151,23 +165,41 @@ vtimer_vminit(struct hyp *hyp) * TODO: Don't trap when FEAT_ECV is present */ hyp->vtimer.cnthctl_el2 = - CNTHCTL_E2H_EL0PCTEN_TRAP | CNTHCTL_E2H_EL0VCTEN_NOTRAP | - CNTHCTL_E2H_EL0VTEN_NOTRAP | - CNTHCTL_E2H_EL0PTEN_TRAP | - CNTHCTL_E2H_EL1PCTEN_TRAP | - CNTHCTL_E2H_EL1PTEN_TRAP; + CNTHCTL_E2H_EL0VTEN_NOTRAP; + if (ecv_poff) { + hyp->vtimer.cnthctl_el2 |= + CNTHCTL_E2H_EL0PCTEN_NOTRAP | + CNTHCTL_E2H_EL0PTEN_NOTRAP | + CNTHCTL_E2H_EL1PCTEN_NOTRAP | + CNTHCTL_E2H_EL1PTEN_NOTRAP; + } else { + hyp->vtimer.cnthctl_el2 |= + CNTHCTL_E2H_EL0PCTEN_TRAP | + CNTHCTL_E2H_EL0PTEN_TRAP | + CNTHCTL_E2H_EL1PCTEN_TRAP | + CNTHCTL_E2H_EL1PTEN_TRAP; + } } else { /* * CNTHCTL_EL1PCEN: trap access to CNTP_{CTL, CVAL, TVAL}_EL0 * from EL1 * CNTHCTL_EL1PCTEN: trap access to CNTPCT_EL0 */ - hyp->vtimer.cnthctl_el2 = - CNTHCTL_EL1PCTEN_TRAP | - CNTHCTL_EL1PCEN_TRAP; + if (ecv_poff) { + hyp->vtimer.cnthctl_el2 = + CNTHCTL_EL1PCTEN_NOTRAP | + CNTHCTL_EL1PCEN_NOTRAP; + } else { + hyp->vtimer.cnthctl_el2 = + CNTHCTL_EL1PCTEN_TRAP | + CNTHCTL_EL1PCEN_TRAP; + } } + if (ecv_poff) + hyp->vtimer.cnthctl_el2 |= CNTHCTL_ECV_EN; + now = READ_SPECIALREG(cntpct_el0); hyp->vtimer.cntvoff_el2 = now; @@ -233,15 +265,10 @@ vtimer_cleanup(void) { } -void -vtimer_sync_hwstate(struct hypctx *hypctx) +static void +vtime_sync_timer(struct hypctx *hypctx, struct vtimer_timer *timer, + uint64_t cntpct_el0) { - struct vtimer_timer *timer; - uint64_t cntpct_el0; - - timer = &hypctx->vtimer_cpu.virt_timer; - cntpct_el0 = READ_SPECIALREG(cntpct_el0) - - hypctx->hyp->vtimer.cntvoff_el2; if (!timer_enabled(timer->cntx_ctl_el0)) { vgic_inject_irq(hypctx->hyp, vcpu_vcpuid(hypctx->vcpu), timer->irqid, false); @@ -255,6 +282,21 @@ vtimer_sync_hwstate(struct hypctx *hypctx) } } +void +vtimer_sync_hwstate(struct hypctx *hypctx) +{ + uint64_t cntpct_el0; + + cntpct_el0 = READ_SPECIALREG(cntpct_el0) - + hypctx->hyp->vtimer.cntvoff_el2; + vtime_sync_timer(hypctx, &hypctx->vtimer_cpu.virt_timer, cntpct_el0); + /* If FEAT_ECV_POFF is in use then we need to sync the physical timer */ + if ((hypctx->hyp->vtimer.cnthctl_el2 & CNTHCTL_ECV_EN) != 0) { + vtime_sync_timer(hypctx, &hypctx->vtimer_cpu.phys_timer, + cntpct_el0); + } +} + static void vtimer_inject_irq_callout_phys(void *context) { diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index fa13fc76677a..618f4afaf8ee 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -523,6 +523,11 @@ vmmops_init(struct vm *vm, pmap_t pmap) hyp->vm = vm; hyp->vgic_attached = false; + if (get_kernel_reg(ID_AA64MMFR0_EL1, &idreg)) { + if (ID_AA64MMFR0_ECV_VAL(idreg) >= ID_AA64MMFR0_ECV_POFF) + hyp->feats |= HYP_FEAT_ECV_POFF; + } + if (get_kernel_reg(ID_AA64MMFR1_EL1, &idreg)) { if (ID_AA64MMFR1_HCX_VAL(idreg) >= ID_AA64MMFR1_HCX_IMPL) hyp->feats |= HYP_FEAT_HCX; diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c index 6bbf0d7eb730..345535318f6e 100644 --- a/sys/arm64/vmm/vmm_hyp.c +++ b/sys/arm64/vmm/vmm_hyp.c @@ -42,11 +42,11 @@ struct hypctx; uint64_t VMM_HYP_FUNC(do_call_guest)(struct hypctx *); static void -vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest) +vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest, + bool ecv_poff) { uint64_t dfr0; - /* Store the guest VFP registers */ if (guest) { /* Store the timer registers */ hypctx->vtimer_cpu.cntkctl_el1 = @@ -55,7 +55,20 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest) READ_SPECIALREG(EL0_REG(CNTV_CVAL)); hypctx->vtimer_cpu.virt_timer.cntx_ctl_el0 = READ_SPECIALREG(EL0_REG(CNTV_CTL)); + } + if (guest_or_nonvhe(guest) && ecv_poff) { + /* + * If we have ECV then the guest could modify these registers. + * If VHE is enabled then the kernel will see a different view + * of the registers, so doesn't need to handle them. + */ + hypctx->vtimer_cpu.phys_timer.cntx_cval_el0 = + READ_SPECIALREG(EL0_REG(CNTP_CVAL)); + hypctx->vtimer_cpu.phys_timer.cntx_ctl_el0 = + READ_SPECIALREG(EL0_REG(CNTP_CTL)); + } + if (guest) { /* Store the GICv3 registers */ hypctx->vgic_v3_regs.ich_eisr_el2 = READ_SPECIALREG(ich_eisr_el2); @@ -262,7 +275,8 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest) } static void -vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest) +vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest, + bool ecv_poff) { uint64_t dfr0; @@ -440,6 +454,29 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest) WRITE_SPECIALREG(cnthctl_el2, hyp->vtimer.cnthctl_el2); WRITE_SPECIALREG(cntvoff_el2, hyp->vtimer.cntvoff_el2); + if (ecv_poff) { + /* + * Load the same offset as the virtual timer + * to keep in sync. + */ + WRITE_SPECIALREG(CNTPOFF_EL2_REG, + hyp->vtimer.cntvoff_el2); + isb(); + } + } + if (guest_or_nonvhe(guest) && ecv_poff) { + /* + * If we have ECV then the guest could modify these registers. + * If VHE is enabled then the kernel will see a different view + * of the registers, so doesn't need to handle them. + */ + WRITE_SPECIALREG(EL0_REG(CNTP_CVAL), + hypctx->vtimer_cpu.phys_timer.cntx_cval_el0); + WRITE_SPECIALREG(EL0_REG(CNTP_CTL), + hypctx->vtimer_cpu.phys_timer.cntx_ctl_el0); + } + + if (guest) { /* Load the GICv3 registers */ WRITE_SPECIALREG(ich_hcr_el2, hypctx->vgic_v3_regs.ich_hcr_el2); WRITE_SPECIALREG(ich_vmcr_el2, @@ -497,9 +534,10 @@ vmm_hyp_call_guest(struct hyp *hyp, struct hypctx *hypctx) #endif uint64_t ret; uint64_t s1e1r, hpfar_el2; - bool hpfar_valid; + bool ecv_poff, hpfar_valid; - vmm_hyp_reg_store(&host_hypctx, NULL, false); + ecv_poff = (hyp->vtimer.cnthctl_el2 & CNTHCTL_ECV_EN) != 0; + vmm_hyp_reg_store(&host_hypctx, NULL, false, ecv_poff); #ifndef VMM_VHE if ((hyp->feats & HYP_FEAT_HCX) != 0) hcrx_el2 = READ_SPECIALREG(MRS_REG_ALT_NAME(HCRX_EL2)); @@ -513,7 +551,7 @@ vmm_hyp_call_guest(struct hyp *hyp, struct hypctx *hypctx) ich_hcr_el2 = READ_SPECIALREG(ich_hcr_el2); ich_vmcr_el2 = READ_SPECIALREG(ich_vmcr_el2); - vmm_hyp_reg_restore(hypctx, hyp, true); + vmm_hyp_reg_restore(hypctx, hyp, true, ecv_poff); /* Load the common hypervisor registers */ WRITE_SPECIALREG(vttbr_el2, hyp->vttbr_el2); @@ -529,7 +567,7 @@ vmm_hyp_call_guest(struct hyp *hyp, struct hypctx *hypctx) /* Store the exit info */ hypctx->exit_info.far_el2 = READ_SPECIALREG(far_el2); - vmm_hyp_reg_store(hypctx, hyp, true); + vmm_hyp_reg_store(hypctx, hyp, true, ecv_poff); hpfar_valid = true; if (ret == EXCP_TYPE_EL1_SYNC) { @@ -579,7 +617,7 @@ vmm_hyp_call_guest(struct hyp *hyp, struct hypctx *hypctx) } } - vmm_hyp_reg_restore(&host_hypctx, NULL, false); + vmm_hyp_reg_restore(&host_hypctx, NULL, false, ecv_poff); #ifndef VMM_VHE if ((hyp->feats & HYP_FEAT_HCX) != 0) From nobody Tue Sep 23 17:18:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRXV1xpBz68tSJ; Tue, 23 Sep 2025 17:18:50 +0000 (UTC) (envelope-from madpilot@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRXT73TMz3Cmg; Tue, 23 Sep 2025 17:18:49 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647930; 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:autocrypt:autocrypt; bh=/lHV9XLZh+mhz9T6Hjd4krdEt7DaHGGyzqMmTOYM2iU=; b=pv5xSiLQUeP9XH0GSj1YU8cvFfjM2nnxw9NJQOSGcWQNMHugmzb6KyBc7gvh2xOp8pagwm ho/6W0SkWqXz9NjeqOhcbIsurS68vOe3vA85lgDXYvy/7km/tMZ3Dnu/dOWupWt2Yv3GuM NBgkUb7FwpjQP+Uk+PYOI91PLvMpooD92ScgCcJQKoYoHOLYnTiFUpl5IG3cXW0XBZiLSF AT+jGeHjDxZocUS2ptC2HbfmtaMgjUY/sQVhCcFBkrnxrDkqsR5zZ6Q7D+8GjbkJaDP+7Q Li+nkggXyXbRacpeNG8MJpdzRIsoltfWF/oE/XeX1DdtUg57iacJjWlwp7JZpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758647930; 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:autocrypt:autocrypt; bh=/lHV9XLZh+mhz9T6Hjd4krdEt7DaHGGyzqMmTOYM2iU=; b=C9TtZ0hgfaMzKBmvmGFsBxV8hlnZTLG7mAxAstt+3Wd6ob62gijfIFPOysVijlamfm2+ZM NT+jyzU8qFbRQpZT+5wjLo4nuGFuIEnUTEMzAjewwxvkZAZIZDkfwDLb6BLaNfMWwNRC3l 8WYz8JlOZX87VOTFG9TFU/B0NwlHdBbY3chbNxMxwR3I2jdXEKGLqiXQyF0muoEOle1gig Wf6yio/C/pRTj//cCa4E8Ou9TQKUNRdXtpNTqCdy2b9W4gsuAL6LIWD9Za8RuQVu1PjsRR M4n80Udyfbp8ka9zoNZUoV2wlUMfjDAw7zTuluC44csTH0GAQG8a7UEC2Ok7AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758647930; a=rsa-sha256; cv=none; b=Qq+9xdOxJ3oJsEZiqe5XcNoTFWqr7v+CEoxaUnxYLHmecODKWNI/PN7IEybC4RpU1SmOAA 62vDyO2qcNQdCx+GDS61SLYnXamEJMax1wSRJWkH6nd1gtwFB5Ltnnzs+OrjHX990zx+1z Hd0PAwvwFnDXqKEMP5VCosERmfuanrIAg+Xe3baiZW+Uv1GZ3hNmd2mMc6NgE9vHAhlrMe l+Ntt36B+in5iJBmmb35MsWbKsZ8rgiM6O7DOsuNt0tiPWNV91PqgWqPdKLT94luijB66G 54tt1XG0iY1jG6zmNOjJUdIqsF53NXZprAYJ+jp9wWLbYdEqOWKUiP1v1GPYSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a01:e11:2002:4280::13:1] (unknown [IPv6:2a01:e11:2002:4280::13:1]) (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: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWRXT29m0z1Rrk; Tue, 23 Sep 2025 17:18:49 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Message-ID: <997869ae-377b-493b-bedb-19b89a888381@FreeBSD.org> Date: Tue, 23 Sep 2025 19:18:47 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Guido Falsi Subject: Re: git: 0ec13430c583 - main - sys/netinet6: Fix ABI breakage introduced with RFC 7217 support To: Zhenlei Huang Cc: "Jonathan T. Looney" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509220759.58M7xkrM031432@gitrepo.freebsd.org> <6c318ff2-48af-4d8d-8f0f-eea629f42e62@FreeBSD.org> <6657C773-2A9B-4C76-BAAC-E3CCE69CA5D1@FreeBSD.org> Content-Language: en-US, it, en-GB Autocrypt: addr=madpilot@FreeBSD.org; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNIkd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz7CwHgEEwECACIFAk+G+3MC GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEBrmhg5Wy9KT2uIIAIrawQ89TnqEhi2C OEQAhx3uqWZuNoS6NyiSgsRCmtSnT2GOgH4Ucbr/I37SkV1B3K6HkoL6lwN8Gjf5KOgLqmTi E1W3RTwS7l8PSvdnjM9i7g351R4mTijtxawB/JcQf/Kge3Yqr1V4g6H+wQXHUStmHThbupuN trzRphvR/e5ekT0FTyVfPmpcbm68i2bwZnKUex/TNIECBykYh8b+SYMLhENf2ayRjCIWS2Ad 7tnTKhMtnS5jtW6qjBy4RoTpQD6oR1xIgkTRlQ49roVCUfdHb+Y/kh+U9G1IcoNy4vkg9IfP dwpSfnP+a8j0AZ1hMnOLZ1fYoQrs+4gVLy8Fs7TOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj 6SQYisvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef +WE75M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ube T3XwQO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr 8OEQfOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB 2i6A/xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45 qfyhMiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0 xpNiUilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWA dlKCNTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanC YrAg+8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNR gow3kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCk X/qwEVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7F jfrV+dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxA lZ/7i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+ lQMZ9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8 LkQdrQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: <6657C773-2A9B-4C76-BAAC-E3CCE69CA5D1@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/23/25 18:16, Zhenlei Huang wrote: > > >> On Sep 23, 2025, at 11:48 PM, Guido Falsi wrote: >> >> On 9/23/25 17:27, Jonathan T. Looney wrote: >>> On Mon, Sep 22, 2025 at 11:44 AM Guido Falsi > wrote: >>> On 9/22/25 17:37, Jonathan T. Looney wrote: >>> > This seems like it is probably a low-frequency event. If so, why >>> is a >>> > counter a better choice for this than an atomic? >>> > >>> I used counters because they were already being used in the netinet6 >>> code, and are a good match for the use. >>> What makes them a good match for the use? Counters are generally best for write-often, read-rarely (by comparison) things, like statistics, where we want to avoid contention in a often-used critical path. For low-frequency events, the expense of keeping the counters (memory usage multiplied by the number of cores; more difficult debugging; etc.) may outweigh the benefits. >> >> Maybe I explained myself poorly, I meant to say the structure already uses counters and they work. > > Jonathan is not talking about the correctness but he hints it is overkill to use a counter(9) for a rarely updated struct member. > >> >> It did not occur to me to use something different, but I see no problem using a different tool, as long as it works and does not make the logic more complex. > > An atomic(9) is sufficient, so you can eliminate alloc / free and the code is shorter :) Thanks for the clarification. I'll take a look then, if the code can be improved I'm all in favour of that. -- Guido Falsi From nobody Tue Sep 23 17:32:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWRrG1WKqz68vXF; Tue, 23 Sep 2025 17:32: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWRrG14Thz3FZK; Tue, 23 Sep 2025 17:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758648750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XbmBy6R0XhFZve5dikUyd8o0rJJBCivDK8oEGHaPWmA=; b=wOnW4z4CE9A7BNvCEcFSxj99IzYQh1i9KmfP0KxrVYpNVdE8vj7iT4fSjko0M5ihrW4QdL E6jBsVhyvwfUPSj4oAH0vdY/7ykVK7iGHK0LT/8jId+fPfGt1BYNl5yPzhte4StnwOUOdO MUq9mDGHsxTEGBVDUg5/QrZtB2kSGtYYRG/hwhLy9gjqV34frtkxJZi+ztJSQuOLfvWd2U q+1CvsfR4KS8Ldidt3x07KShQHXGQEhJ2xQcVPC3QxI+new3L2jcoSbGmx9nNWUCvAJChR GH6hNTcMB7MOfLB4ZFC7NpACP8s8v0symQqLY62WxIdQYtZ2qiUehUkv4HA5qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758648750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XbmBy6R0XhFZve5dikUyd8o0rJJBCivDK8oEGHaPWmA=; b=epU1PSjoypdvV9YuLAT+EQBcq5HCyg2+3T0sbr77UIHjWQIKFAkTaWOaAt6IikzkbqZTQb t3h+8N8XfwAPbK8o6EHWLu1ozqDBEJTOfDxfphAlsuK04whZjBofeV1IsDDdA3aCHHsfQL /1BQHODjElBY3ekpBS6wZlioPPciskfAbR4XABHpozRmY97GbwZ/8YEoIySIg+TlhgOYcQ b6HQMrFzuIEj0YIR8eQ+lshzRGxihIbzPmTR1sb3Iu/OjWfWp8JGdbk6YwukfPqlCJGOjn hnOTSwKw9HOfo55W7cxfoimPYmGKi2BqEOkVnHFLyUKNYyVivFk4uWe/mNXhVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758648750; a=rsa-sha256; cv=none; b=gJrHHHJ3Z4e9WLOytn0iRObHRARx3VBq0R1tl22D4VVH0ghs7SSAn7TwZGHJ35o3WwKP00 QZS8zpWtIk6HYDipGfoIxC5jh1ExqP6p4Y6+X5P33KMSbdAcJTT2yvc/sf3/lLE3o78+2o HCHRPcc0p2yC8aY6VwmVk6b/17nrPQCFdyZnXgEGMSvXPq3sq1tY8wrV5OKqPlSppPwAR7 aYSdrj6YkCo9V6YDNq6wtYn9TijZv6O4UtLL9VMu5omifZzcRM2tA8JRzSu1TeNjRX37D5 Au99LxhxsS81bYjlq/i6raNveDD6YN1TIIiPFykDrHqyf63qU+7uzBPtX+lcAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWRrG0Xphzvxg; Tue, 23 Sep 2025 17:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NHWUeV031176; Tue, 23 Sep 2025 17:32:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NHWUgn031173; Tue, 23 Sep 2025 17:32:30 GMT (envelope-from git) Date: Tue, 23 Sep 2025 17:32:30 GMT Message-Id: <202509231732.58NHWUgn031173@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: ab17974c1203 - main - tcp: fix sending of RST segments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab17974c12033c6ff3bae27458efcd13584438ba Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ab17974c12033c6ff3bae27458efcd13584438ba commit ab17974c12033c6ff3bae27458efcd13584438ba Author: Michael Tuexen AuthorDate: 2025-09-23 17:29:48 +0000 Commit: Michael Tuexen CommitDate: 2025-09-23 17:32:21 +0000 tcp: fix sending of RST segments Take endpoint parameters into account when available. Fixes: 463b5aed0d62 ("tcp: retire rstreason") MFC after: 3 days Sponsored by: Netflix, Inc. --- sys/netinet/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index d5dc516c28aa..dd27ec77c1af 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3412,7 +3412,7 @@ dropafterack: return; dropwithreset: - tcp_dropwithreset(m, th, NULL, tlen); + tcp_dropwithreset(m, th, tp, tlen); if (tp != NULL) { INP_WUNLOCK(inp); } From nobody Tue Sep 23 18:30:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWT7m0bShz67kst; Tue, 23 Sep 2025 18:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWT7l5whtz3LcT; Tue, 23 Sep 2025 18:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758652259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+2nU8u/UOLS80ka7ih32Tpfjv1KdyNtEEEYpkbjibeQ=; b=mCPBa1Molvehr25Z9fGE9g6XT4HkaZeoWaRSck8tQHP0+uOSb1t9F+lx+2sJlDKuwPDOww Kh7LVp7pJCoRBmeNQKNU9TR4wwQL17I7EfR3pcmk/2xM2hds3dgA9x37lEN7qxovummNCg wb9mTPPH0Sm/v+6fNdPjRoCxGlpnU6xrUyw0YEUBYQbv44PeblusJsKstzlaWqB8lntqpw 0dZlAXchy4HIJyQ+4ZqWPmqDkF0BEQiaP/74Y2J4TYolJVyVMxyZ6fUk68iXoSAjQkdZu5 Y8R7LYDZqXzwBxiayXK5LjKw/ryAUusle2eOUQXXWDsLDMYR+a87g/WyUcJMrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758652259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+2nU8u/UOLS80ka7ih32Tpfjv1KdyNtEEEYpkbjibeQ=; b=abErv1AaycJ0DS0Yh7S+w8JM7U2M8AM8It/+/NsfFgbv0cxEXh/O2McYf1ZTyI9x6OK8Vl f/73a7hEMGMMuRSLSoMrVvqFvowSCqp547a6cqwmyGEoHS2iRVqiCPTE1M/vX9Jvn9esVI OHEfvvkAC4srz1E79KMj6dR5bczIfVFiMIjYL5zLuS0EmQ1DUjMl9l3mdQdX9YP1HBiZuV kpxSqxAQuynKHFTeLYbBwUQKV15b1JZfSodUdx3tapufGpN7pGSsn0FS32jo9DWWshmAPk A/9r/8ESblFcbcZLLrtJ0F+x0fEyO4AIfyp5iGCaSz+tRT/MhCnaf0DZ4g3ocA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758652259; a=rsa-sha256; cv=none; b=dR7vlCZuPUQkVdIMp+tB2d44XzENLaB9QkFOFhOc6lZG8Dc9blU2XI262tBHgbsaLA7JCy 7FVgNwoVM/Y5+m5XVvkIK/AdUOtPcZwOsa+PZV4tbpdKgg7t+xF6f0YIoqrW6YVQYraAVj AddamkDazUA0fOHDjgLSbk+eQpq+UYvY66JgwXqiZR0m3kmk2m5vgqoxbvv+IxLn1iWhcJ cbXx7dBBj3lBwWYMz+ou2ABtj1tdjTF8PfZaQKRoJfTGYkJoT9zd2WglH6LBnH8ApabhWF 0vDu91u9G2TCBWZouLdZfsWWGwj+1u132/2a2VaMLrpBPkZ0SNDrevf+rgw9rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWT7l5WxRzxPY; Tue, 23 Sep 2025 18:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NIUxfd038592; Tue, 23 Sep 2025 18:30:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NIUxc2038589; Tue, 23 Sep 2025 18:30:59 GMT (envelope-from git) Date: Tue, 23 Sep 2025 18:30:59 GMT Message-Id: <202509231830.58NIUxc2038589@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: 43bbecaeb95f - main - tcp lro: remove redundant check List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43bbecaeb95fe5ea1d7acffab4f2874247ba6915 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=43bbecaeb95fe5ea1d7acffab4f2874247ba6915 commit 43bbecaeb95fe5ea1d7acffab4f2874247ba6915 Author: Michael Tuexen AuthorDate: 2025-09-23 18:28:54 +0000 Commit: Michael Tuexen CommitDate: 2025-09-23 18:28:54 +0000 tcp lro: remove redundant check Remove a check which is also done in tcp_lro_rx_common(). Reviewed by: gallatin MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52683 --- sys/netinet/tcp_lro.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 7512679bd4e9..64efa4bf060f 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1428,17 +1428,6 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum) { int error; - if (((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) != - ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) || - (m->m_pkthdr.csum_data != 0xffff)) { - /* - * The checksum either did not have hardware offload - * or it was a bad checksum. We can't LRO such - * a packet. - */ - counter_u64_add(tcp_bad_csums, 1); - return (TCP_LRO_CANNOT); - } /* get current time */ binuptime(&lc->lro_last_queue_time); CURVNET_SET(lc->ifp->if_vnet); From nobody Tue Sep 23 19:00:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWTnb50TKz67myj; Tue, 23 Sep 2025 19:00: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWTnb4Flmz3PQT; Tue, 23 Sep 2025 19:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758654019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ox6/PwHLI7zYamYuT9T597sqrOPIsy9XZziIJOfTQPk=; b=ezbLyjwNpT6RMqHYJskKsvzI9Z75E5+Wmt/6Hh7Fj9HDDHyL1JOO+1WEnJMG0xPtr8FMh/ QJuIIJXhG+wd+iJMSsi+6iVW1pGWcQZeKimSJLRwn/5GFlO+38IDureomGOnRVSjd5ra08 OfyTyPx6ictftjlLlFXnM0QLuid1MQX/u5ZhBG1VAtVKYB+40mAS9MVLa+RAlLFyai1ezF 3cWEG5X00SE4ycMHCBxIdUONZLDGv4AeUjTYYF+Xskna5DZymKw4tSwSzAePt8k1g295pM uSG1xWRqtsA9PD3qGzao5yIqclAiJJQwLpiepY5aVPZBK6PMFclBiIRnCgerAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758654019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ox6/PwHLI7zYamYuT9T597sqrOPIsy9XZziIJOfTQPk=; b=ii1ZdYnPyPw99d1cJ9UO0AcPgZfFeAv9rV7thb7qefflzrp8DlxNEpH7M4dD7Wr3/HXj7+ kpwDUCWBMcfTGTn0sOojEqYqCPYFttMxlq0KdLaOcR6snrl55/i3tHlASE6js8Nwa0RJFE 9HgE6T1jm93aLvt7Nl/Ut/MXFXU5UupX2Dk3xKudPyVwsOTjd0QLWh/SYX/45htlGkNCZF OpVsm5FOxKNk3Q8KF1IlvGUWxcooHT3ty0/9B/EIjkiMO28FiL+H4ltvkCaGjpaWh7Q/Gx ftL8bCTMhiPRd7GCUPeBuH9rDzoKPMNuWiuPYE3xYl+eaKhegHBE2omgj4MDTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758654019; a=rsa-sha256; cv=none; b=UKKyu9LTCaWhn1DWKaIDfc1PsMbA2gL8J7I0MEo0UGm0I4upIajxV/CXn+GyI8sa9Eg1kg a/KXSEpbUi5vdxLCpiXjbBugykwOtfijM1ngerTv7EMi2UMNevnGJJug4qP4o2IG+WG9c1 qohFukqS15Un9UNbMGGYaOPPrHorNnCxN/k5diksN3bhekR/6jVL3tfzNXLDJ94EnPo1S/ pEvn3qMq+Zz3YVOv9eYg6RYjdXd9ner3u0y9Bcuw+oPQotQsfEJNC+USlr37gEjRyOqk2a HBoA3PF/NDMvDPRBtc6ayBDNpYLeycfYi3FcGBnQ4+et+16hm6UukPFYgyrlTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWTnb3mprzyMD; Tue, 23 Sep 2025 19:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NJ0JRR094689; Tue, 23 Sep 2025 19:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NJ0J7Y094686; Tue, 23 Sep 2025 19:00:19 GMT (envelope-from git) Date: Tue, 23 Sep 2025 19:00:19 GMT Message-Id: <202509231900.58NJ0J7Y094686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 749a9266982b - main - sound: Implement COMPAT_FREEBSD32 shims List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 749a9266982b8e012b5ec370b2fdfef11f34c0b2 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=749a9266982b8e012b5ec370b2fdfef11f34c0b2 commit 749a9266982b8e012b5ec370b2fdfef11f34c0b2 Author: Damjan Jovanovic AuthorDate: 2025-09-23 18:59:05 +0000 Commit: Christos Margiolis CommitDate: 2025-09-23 18:59:05 +0000 sound: Implement COMPAT_FREEBSD32 shims PR: 216568 MFC after: 1 week Reviewed by: christos, kib Differential Revision: https://reviews.freebsd.org/D52509 --- sys/dev/sound/pcm/dsp.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 118 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index da38f52021ae..fe5576baf017 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -671,6 +671,43 @@ dsp_ioctl_channel(struct dsp_cdevpriv *priv, struct pcm_channel *ch, return (0); } +#ifdef COMPAT_FREEBSD32 +typedef struct _snd_chan_param32 { + uint32_t play_rate; + uint32_t rec_rate; + uint32_t play_format; + uint32_t rec_format; +} snd_chan_param32; +#define AIOGFMT32 _IOC_NEWTYPE(AIOGFMT, snd_chan_param32) +#define AIOSFMT32 _IOC_NEWTYPE(AIOSFMT, snd_chan_param32) + +typedef struct _snd_capabilities32 { + uint32_t rate_min, rate_max; + uint32_t formats; + uint32_t bufsize; + uint32_t mixers; + uint32_t inputs; + uint16_t left, right; +} snd_capabilities32; +#define AIOGCAP32 _IOC_NEWTYPE(AIOGCAP, snd_capabilities32) + +typedef struct audio_errinfo32 +{ + int32_t play_underruns; + int32_t rec_overruns; + uint32_t play_ptradjust; + uint32_t rec_ptradjust; + int32_t play_errorcount; + int32_t rec_errorcount; + int32_t play_lasterror; + int32_t rec_lasterror; + int32_t play_errorparm; + int32_t rec_errorparm; + int32_t filler[16]; +} audio_errinfo32; +#define SNDCTL_DSP_GETERROR32 _IOC_NEWTYPE(SNDCTL_DSP_GETERROR, audio_errinfo32) +#endif + static int dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) @@ -829,9 +866,25 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, case AIOSFMT: case AIOGFMT: +#ifdef COMPAT_FREEBSD32 + case AIOSFMT32: + case AIOGFMT32: +#endif { snd_chan_param *p = (snd_chan_param *)arg; +#ifdef COMPAT_FREEBSD32 + snd_chan_param32 *p32 = (snd_chan_param32 *)arg; + snd_chan_param param; + + if (cmd == AIOSFMT32) { + p = ¶m; + p->play_rate = p32->play_rate; + p->rec_rate = p32->rec_rate; + p->play_format = p32->play_format; + p->rec_format = p32->rec_format; + } +#endif if (cmd == AIOSFMT && ((p->play_format != 0 && p->play_rate == 0) || (p->rec_format != 0 && p->rec_rate == 0))) { @@ -872,15 +925,41 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, p->rec_format = 0; } PCM_RELEASE_QUICK(d); +#ifdef COMPAT_FREEBSD32 + if (cmd == AIOSFMT32 || cmd == AIOGFMT32) { + p32->play_rate = p->play_rate; + p32->rec_rate = p->rec_rate; + p32->play_format = p->play_format; + p32->rec_format = p->rec_format; + } +#endif } break; case AIOGCAP: /* get capabilities */ +#ifdef COMPAT_FREEBSD32 + case AIOGCAP32: +#endif { snd_capabilities *p = (snd_capabilities *)arg; struct pcmchan_caps *pcaps = NULL, *rcaps = NULL; struct cdev *pdev; - +#ifdef COMPAT_FREEBSD32 + snd_capabilities32 *p32 = (snd_capabilities32 *)arg; + snd_capabilities capabilities; + + if (cmd == AIOGCAP32) { + p = &capabilities; + p->rate_min = p32->rate_min; + p->rate_max = p32->rate_max; + p->formats = p32->formats; + p->bufsize = p32->bufsize; + p->mixers = p32->mixers; + p->inputs = p32->inputs; + p->left = p32->left; + p->right = p32->right; + } +#endif PCM_LOCK(d); if (rdch) { CHN_LOCK(rdch); @@ -913,6 +992,18 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, if (rdch) CHN_UNLOCK(rdch); PCM_UNLOCK(d); +#ifdef COMPAT_FREEBSD32 + if (cmd == AIOGCAP32) { + p32->rate_min = p->rate_min; + p32->rate_max = p->rate_max; + p32->formats = p->formats; + p32->bufsize = p->bufsize; + p32->mixers = p->mixers; + p32->inputs = p->inputs; + p32->left = p->left; + p32->right = p->right; + } +#endif } break; @@ -1635,6 +1726,9 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, break; case SNDCTL_DSP_GETERROR: +#ifdef COMPAT_FREEBSD32 + case SNDCTL_DSP_GETERROR32: +#endif /* * OSSv4 docs: "All errors and counters will automatically be * cleared to zeroes after the call so each call will return only @@ -1644,6 +1738,14 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, */ { audio_errinfo *ei = (audio_errinfo *)arg; +#ifdef COMPAT_FREEBSD32 + audio_errinfo errinfo; + audio_errinfo32 *ei32 = (audio_errinfo32 *)arg; + + if (cmd == SNDCTL_DSP_GETERROR32) { + ei = &errinfo; + } +#endif bzero((void *)ei, sizeof(*ei)); @@ -1659,6 +1761,21 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, rdch->xruns = 0; CHN_UNLOCK(rdch); } +#ifdef COMPAT_FREEBSD32 + if (cmd == SNDCTL_DSP_GETERROR32) { + bzero((void *)ei32, sizeof(*ei32)); + ei32->play_underruns = ei->play_underruns; + ei32->rec_overruns = ei->rec_overruns; + ei32->play_ptradjust = ei->play_ptradjust; + ei32->rec_ptradjust = ei->rec_ptradjust; + ei32->play_errorcount = ei->play_errorcount; + ei32->rec_errorcount = ei->rec_errorcount; + ei32->play_lasterror = ei->play_lasterror; + ei32->rec_lasterror = ei->rec_lasterror; + ei32->play_errorparm = ei->play_errorparm; + ei32->rec_errorparm = ei->rec_errorparm; + } +#endif } break; From nobody Tue Sep 23 19:06:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWTwV2K3yz67n37; Tue, 23 Sep 2025 19:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWTwV1nSmz3QHj; Tue, 23 Sep 2025 19:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758654378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m5BHQBD+cZVWIXP24wo2emMc8DveFKNTM0Y5fPMFlFU=; b=KdANOkhVIw89rENcKJ1Wk+DXSOu4YsRyI6qIYLgU4JRmWYO0S/19yMxgVUbW3E/nOANXJR nAjnVCa+mvkowvDQMgwHiyQMJFPZnlDuH/acHdkHuvLPDMR/oRE6/lRAMPEobS+QV24AWR LeGtEyd+cfBKGYrCc9QpxTBIWhZkQJCiIoPT5j+UiFWAXGmTHmL9oj7GBJbz+VESldcVTJ /dhQ3JrW2+U7qMdC32NW4gJvdraNRGfFO6wSTXLDkFcjCULJ7ArSPJ5xVU5olIV1lHRE/L AgdaqRCJQXJCFyA++HXnKc3dbkv6NKeTHbEyuFm78P892ikIwFYyrIq+l+6a7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758654378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m5BHQBD+cZVWIXP24wo2emMc8DveFKNTM0Y5fPMFlFU=; b=KgWv82WGW0qKjQ8XKxmcd8o33Ji+GzzBgGuJNz67mbQGDgC5Gv0C3F9xUJfYkbO01g/fO4 C/yYD9X20NIkSqZkUoQUpvZ0m/ZhYapBMtlPcVzJrr13scrFi0zVSk77BZ/UOV37Qr/WBo 8CqDirzMhQQadl0hwa0ukkcIV4epQGS/KNKx2FTMwN3jeqCRLS0jHzi1N7EMRpFVVbz6RI 6tDB64NigR8CuKqVdXZWf9EB8hRXt27TtY0A5zdrk7sWyxKguwXRNFTh49nJsQLgBjZTVd Xu+GW/75Crl+0/ECPou8uLHWZ7G8X3tzM2sQvvzlFCLqxYqdaAhBQN/StYcACQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758654378; a=rsa-sha256; cv=none; b=vcNEIKOJP7DivQLuBleFPEJ07BnDHZH2WssXDm/Yrj0Tve79mRq2VpOyy8qn4CqwjXZ4Yq NakTajEG1kpJs0Whut+mz/jTkpk2p6Pxp2ch2MW4Jv4kTghTtDehUZX3SpWAkMRSf0/jRj 1kZkxwf1qmOOUygfoQ3kypWWClUg164hmGqy6IqTNboKbXNfRpo5/SuTSps6lkdx4hikeO cOWW4pMmB+cnn/jqCxLbgcwrZl8nwyX7WaU7UcJc9JUKX5FvK9SQdBvFZg4xvZqaG9Impy kldU4VxukFrEupeL62nn8Oaq/65oQWM0IQ8C2POWeCV2Ff/pqsyl7m2jBW93PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWTwV1NHCzxyq; Tue, 23 Sep 2025 19:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NJ6IVV003092; Tue, 23 Sep 2025 19:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NJ6Iwg003089; Tue, 23 Sep 2025 19:06:18 GMT (envelope-from git) Date: Tue, 23 Sep 2025 19:06:18 GMT Message-Id: <202509231906.58NJ6Iwg003089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 38f6a4467419 - main - blackhole.4: Describe better List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38f6a4467419f5b2344d184baa454c126e2919a9 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=38f6a4467419f5b2344d184baa454c126e2919a9 commit 38f6a4467419f5b2344d184baa454c126e2919a9 Author: Alexander Ziaee AuthorDate: 2025-09-23 19:05:18 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-23 19:06:06 +0000 blackhole.4: Describe better Rewrite the document description to fit cleanly on one line and omit crossreferences, to clean up apropos results. MFC after: 3 days Reviewed by: tuexen, cperciva Differential Revision: https://reviews.freebsd.org/D52695 --- share/man/man4/blackhole.4 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index bb955fd4497d..56b1b52b9212 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,15 +10,12 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd May 25, 2024 +.Dd September 23, 2025 .Dt BLACKHOLE 4 .Os .Sh NAME .Nm blackhole -.Nd a -.Xr sysctl 8 -MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connection -attempts +.Nd quietly drop refused SCTP, TCP, or UDP connections .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" .Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" From nobody Tue Sep 23 19:33:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWVX65ZR8z67pNt; Tue, 23 Sep 2025 19:33: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWVX654qYz3SXv; Tue, 23 Sep 2025 19:33:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758656022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vYmZimQAvQZrXM0hfWyY2iDYdOAQxUSYHhT3fuDeDDc=; b=lAg03x/gqUe3OeIiAixnZz34dRwT7HUainPCXaJeGmR1138UC/XyvEgsQv8Rzyr1vN1jZN raRtT/6j0w+fmnLQ+dhfHopt3FOa1Wcl+nKcgEe0T0G5hDxDwvYBRLJ4uo+kmmRCmBzznw O7qW0/Mq5VETmEOTB95nGrt4NMEN/914sdeE8izbYnw33b8WsPWtihD+to2W/2SXGGDvAY kxxQq7O3EOT32SRDzcOH7N/Wl1iXWE1RmxlfCRHK3Nvjf+fJChr+EZu96JJ0ZSKLLLfzdE HhGbA9eYbuN7ZpBX3HK2gOHl/nmSwTb3paOyv7fdvCOse8LNGXVLmX0BdN97gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758656022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vYmZimQAvQZrXM0hfWyY2iDYdOAQxUSYHhT3fuDeDDc=; b=KOIM9IkNP8VRjp97/atrgnMJD1m3lSMfmwmgbehQsQhAEatNXI6ytRy0m/tZMJmYJlnZJt U5eKmktIV+oFMSscmUkUnmt5TTcaYKf0fGjNtUCO+sq1aKqKsWGxmq+RvP8qGKyvgl9E1G A8d1SZtRCKfMi39iiZTlg5Z3EOD6qx4hG5B65Owu5/ToMqGUkezlxkWKkZ+Jr6yK0vVNAN bxJYT2dqVhTNSiaTi505CpUn8nth9vGACZbP6AOXgFdvxgq5VO7F99xwZ2zqQvLArOWLiU azRpbra0xqhS01jAVv2P1dSWb5SsWzQmvB3Zd2zqoNMHsSTc7oI0lEB6NWw/LA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758656022; a=rsa-sha256; cv=none; b=HJV8EEee6Xo21Pll6C3wrazByD6YlTWYW1lbGJ6zfW11XZCm8S2oW7cacJ4BXz/LwlnoMb ddOASswhV1B1iySP4lOBB/Pj7xIMBR69oApfbCx9zoEgu4vas0a6UALhLfioJHp5fLjmox shJC34Qw6fLV8LDPvEJs8aVFv+g5h0tK9cg5xGd2/so1R+rMPBr+fskUzbduOydEWm+bfg bg3Gc5tSGMN9BQvdjWlEImmjOuhijEuup2cTohfIea5pxENiP3pVWf2Mzcz3eomw+ZnPhF dVSj6MDju0MVKsM+pKKrwYT18vsrNbjT9+fBl8DALaEIXCTgoxOk6C0hsBqRWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWVX64Vvmz10LF; Tue, 23 Sep 2025 19:33:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NJXguY058587; Tue, 23 Sep 2025 19:33:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NJXgwL058584; Tue, 23 Sep 2025 19:33:42 GMT (envelope-from git) Date: Tue, 23 Sep 2025 19:33:42 GMT Message-Id: <202509231933.58NJXgwL058584@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: 874eaa3821dd - main - tests/newsyslog: cleanup after tests_normal_rotate_recompress test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 874eaa3821dd678ca27706af3f023844e3094b2e Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=874eaa3821dd678ca27706af3f023844e3094b2e commit 874eaa3821dd678ca27706af3f023844e3094b2e Author: Gleb Smirnoff AuthorDate: 2025-09-23 09:21:02 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-23 19:32:26 +0000 tests/newsyslog: cleanup after tests_normal_rotate_recompress test The garbage left would prevent subsequent tests to succeed. Note that currently this is the last test to execute. --- usr.sbin/newsyslog/tests/legacy_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/newsyslog/tests/legacy_test.sh b/usr.sbin/newsyslog/tests/legacy_test.sh index 5aecdeacd10a..1ec48d5a0cc7 100644 --- a/usr.sbin/newsyslog/tests/legacy_test.sh +++ b/usr.sbin/newsyslog/tests/legacy_test.sh @@ -522,6 +522,8 @@ tests_normal_rotate_recompress() { ckfe ${LOGFNAME}.0${ext} ckfe ${LOGFNAME}.1${ext} end + + tmpdir_clean } echo 1..185 From nobody Tue Sep 23 19:33:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWVX80P40z67pjc; Tue, 23 Sep 2025 19:33: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWVX75qSsz3Sb5; Tue, 23 Sep 2025 19:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758656023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWRRNjopRLMUoL96WAYYzis13t4vCf9Z/7S9ll7gWAQ=; b=majDA/mijLEtr7Y1pPpVW10OXKLwvKp3AYHrldgdwl5X1U3dqwaVnirqugi7J5D3Bz8T1P ivnYsMm052BqYJG+XVVqpxAsuJzZp36i6WKFz6+HTztRGpZLePcC3XcyskvkO6tHhtIgaj r9wr3MKXrkwuwCaatHQjnM8LD833Ce5hMIDIBOggBhjH/zVkuJx78W25t1DPAoCWbL19JR KcqQk6nygwAcR4JD+C4/e9NPDtN1MLEVlAqL+Sl557rBeAdcM9pRZnHAR4W2+3Goa1m8T1 9hAjbsbyN+GfZsaLCnlc2GUOFZVhvN1WIEhve4fmWFfWNGnbxTinuJOA6k342w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758656023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWRRNjopRLMUoL96WAYYzis13t4vCf9Z/7S9ll7gWAQ=; b=r1PrPfjTJ1T6OFdHDZN5CX5gT5z4kZU0GvVQjfHX86T0FjtnzRkCZytAOv92Es0Trxb/gc Vy2brw+VFCPKlylVbDelQgzSkp0jZ2G2Fd4j/26pURsjlL5fcTnrCUaYrUI1ZgtBkQRfYu MsTdHRi1wQ/tToAJZ8Nfs/QmNCB9V+SFtocetCzOvHAXjnmd3GbCWQGdYXHHM6o2E/KQuh S0/JyRJ+3M4Z3e6Uj06Z9L7JZ71jhomNTE6/UAPHtWklEB3x+RsWSe5MdTZcA+/xxMZ8ft mXyIPt4DGR7XNVzyUgr34r8CRkIqVwgyCdfuxFPfmrnpnoiBOr34SuyIDw4zWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758656023; a=rsa-sha256; cv=none; b=Wz7pL2D1DruAnu6bUD2oLX/FFBvArfw/Vy0sywVUySoFY3FTlCN5q9sXGTuO1224E8FUZO og9D7fZD2UehABa0Cga/RXRs1eUZ43VfDmuInrOvtvFcmyC/t/DTcd+Ix3fPut8itQ8RHx cADaeYTkiMa5ctTOvXLW50bqxcfN5OaQYontPEYrkMhKnGdFwvkfzxSPGv12SiKqGC71Qi RPXqsnJRznipMrODIflICz/cAOINb8wG5vbUFq5lc00a7xxPgxYRkB3m9gj5HaKkgmxyQ7 lfMDPzHFNNESqHBkBfIVkwTg2kGd/K4cPoxdO+vijLkBT66OD+VjTjo77Tw8Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWVX75RJyz102j; Tue, 23 Sep 2025 19:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NJXhbJ058620; Tue, 23 Sep 2025 19:33:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NJXhgf058617; Tue, 23 Sep 2025 19:33:43 GMT (envelope-from git) Date: Tue, 23 Sep 2025 19:33:43 GMT Message-Id: <202509231933.58NJXhgf058617@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: f221f410920d - main - tests/newsyslog: don't hardcode -F for newsyslog execution List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f221f410920df17a2044cd47a23a6f2a1268b44a Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f221f410920df17a2044cd47a23a6f2a1268b44a commit f221f410920df17a2044cd47a23a6f2a1268b44a Author: Gleb Smirnoff AuthorDate: 2025-09-23 09:23:00 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-23 19:32:26 +0000 tests/newsyslog: don't hardcode -F for newsyslog execution At the moment all tests need forced rotation, but future tests may not, so let the tests themselves decide if -F is needed. Should be no functional change. --- usr.sbin/newsyslog/tests/legacy_test.sh | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/usr.sbin/newsyslog/tests/legacy_test.sh b/usr.sbin/newsyslog/tests/legacy_test.sh index 1ec48d5a0cc7..c8c18a754977 100644 --- a/usr.sbin/newsyslog/tests/legacy_test.sh +++ b/usr.sbin/newsyslog/tests/legacy_test.sh @@ -206,7 +206,7 @@ tmpdir_clean() run_newsyslog() { - newsyslog -f ../newsyslog.conf -F -r "$@" + newsyslog -f ../newsyslog.conf -r "$@" } tests_normal_rotate() { @@ -216,17 +216,17 @@ tests_normal_rotate() { dir="$2" if [ -n "$dir" ]; then - newsyslog_args=" -a ${dir}" + newsyslog_args="-F -a ${dir}" name_postfix="${ext} archive dir" else - newsyslog_args="" + newsyslog_args="-F" name_postfix="${ext}" fi tmpdir_create begin "create file ${name_postfix}" -newdir - run_newsyslog -C + run_newsyslog -CF ckfe $LOGFNAME cknt ${dir}${LOGFNAME}.0${ext} end @@ -294,17 +294,17 @@ tests_normal_rotate_keepn() { dir="$3" if [ -n "$dir" ]; then - newsyslog_args=" -a ${dir}" + newsyslog_args="-F -a ${dir}" name_postfix="${ext} archive dir" else - newsyslog_args="" + newsyslog_args="-F" name_postfix="${ext}" fi tmpdir_create begin "create file ${name_postfix}" -newdir - run_newsyslog -C + run_newsyslog -CF ckfe $LOGFNAME cknt ${dir}${LOGFNAME}.0${ext} end @@ -363,10 +363,10 @@ tests_time_rotate() { dir="$2" if [ -n "$dir" ]; then - newsyslog_args="-t DEFAULT -a ${dir}" + newsyslog_args="-F -t DEFAULT -a ${dir}" name_postfix="${ext} archive dir" else - newsyslog_args="-t DEFAULT" + newsyslog_args="-F -t DEFAULT" name_postfix="${ext}" fi @@ -424,17 +424,17 @@ tests_rfc5424() { dir="$2" if [ -n "$dir" ]; then - newsyslog_args=" -a ${dir}" + newsyslog_args="-F -a ${dir}" name_postfix="${ext} archive dir" else - newsyslog_args="" + newsyslog_args="-F" name_postfix="${ext}" fi tmpdir_create begin "RFC-5424 - create file ${name_postfix}" -newdir - run_newsyslog -C + run_newsyslog -CF ckfe $LOGFNAME cknt ${dir}${LOGFNAME}.0${ext} ckfe $LOGFNAME5424 @@ -466,23 +466,23 @@ tests_p_flag_rotate() { tmpdir_create begin "create file" - run_newsyslog -C + run_newsyslog -CF ckfe $LOGFNAME cknt ${LOGFNAME}.0 cknt ${LOGFNAME}.0${ext} end begin "rotate p flag 1 ${ext}" - run_newsyslog + run_newsyslog -F ckfe $LOGFNAME ckfe ${LOGFNAME}.0 cknt ${LOGFNAME}.0${ext} - run_newsyslog + run_newsyslog -F ckfe $LOGFNAME ckfe ${LOGFNAME}.0 cknt ${LOGFNAME}.0${ext} ckfe ${LOGFNAME}.1${ext} - run_newsyslog + run_newsyslog -F ckfe $LOGFNAME ckfe ${LOGFNAME}.0 cknt ${LOGFNAME}.0${ext} @@ -501,13 +501,13 @@ tests_normal_rotate_recompress() { tmpdir_create begin "create file recompress" - run_newsyslog -C + run_newsyslog -CF ckfe $LOGFNAME cknt ${LOGFNAME}.0${ext} end begin "rotate normal 1" - run_newsyslog + run_newsyslog -F ckfe $LOGFNAME ckfe ${LOGFNAME}.0${ext} cknt ${LOGFNAME}.1${ext} @@ -517,7 +517,7 @@ tests_normal_rotate_recompress() { gunzip ${LOGFNAME}.0${ext} ckfe ${LOGFNAME}.0 cknt ${LOGFNAME}.0${ext} - run_newsyslog + run_newsyslog -F ckfe $LOGFNAME ckfe ${LOGFNAME}.0${ext} ckfe ${LOGFNAME}.1${ext} From nobody Tue Sep 23 19:33:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWVX92DcFz67pjg; Tue, 23 Sep 2025 19:33: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWVX86wQrz3SdP; Tue, 23 Sep 2025 19:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758656025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Vp74gIegdv3EPbDDsBbN+7KC38y45EQIhpP+NI7ZUw=; b=iG6pjMKqmUWKXUBL6yE/oZd/nZs0YiEaKN/qI+6gUEETlDnrvt8FYLWliCNv8V5ClDbfH9 rUR98i8KdTgvSPV3jY/Csd5nehNuafaYBqBH7hwUoHToxpIvlrHE0mEvrDauLwPaIIjFF+ SJMqB+zZa9xIJaV9mTE7iR4Or2aQmiUoiXVxBJx0QAMr7kz8huUrWQP3OJvj+PiV5fSl5p L32bkqunPN62tg7z52UEhmcQw6Yl0nZqxMomgxiQ24LWBmyhc4HddS7OLvW3CPU2JUuzS8 aOV+Yvc9ka2hUUjSSGsxpP9Zb6jsPk8InIPLE4FjPm4GklRZW5ObGa0A4pD91Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758656025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Vp74gIegdv3EPbDDsBbN+7KC38y45EQIhpP+NI7ZUw=; b=BL2Pw8ApY/LwjzYLbjnTs1ucnVQ2XTb6K9dwxaA18ul8xf4XKpzd+xbc7ESepAkCdIo+D3 BD1RX2OdG/kW1rZ9Udx9J5pLO0zR2nPsPlnsBF2sB9JoP2Q9RaNdOabY2YnAoHY5L0u2+w /8vgbnuzjwzD7i2daU9C4kSDMGBJzLBhqjkUwAuduvPaLisPbGBlnRsPlMtRJjRWx4R8JG dL0RcfMzEbQi5AuJH1PXeJxPcbZZSvAbLvPqIf/2MOWtmU2NnfBTaKMYnBR3rIkxVssEKR uDlkJhNmgd8y/AHWcl+HfSzAFvZ5VY3+l/VjplSXFifezFPJUa441ijiLfQOZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758656025; a=rsa-sha256; cv=none; b=p+9F5sEmPPLk7JMZ7pk5YwPjKe25vfddPTWrztsO/UX5iGGkgcceOGuRXYfwVUoqDoFxuw hcvXGO7DYdGYFC/cCB9Y00K2BuaYbzG2m3XC7wb0XTzYd64nJYYe/MpVPzX6RIwSfaFpHI /vuS3tVm90hfMXV0WSDWKRN1NTVVHQra/BUr0pbCkXffaog4CpBhd5kLkHYAYRmhQ+gzEt Kcu58dVRY5idAsYRngfajvPqMW527xT5UvDc/3Q5clSutQr6080265Ie9TmtsxNUU+iRSf cSUQhFM9BHlzdCEkV1HKhQ+tz7ySKa8WT2xAm7nf/QJf0x4Xou2osvjmiEzhQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWVX86MvgzyjF; Tue, 23 Sep 2025 19:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NJXiMh058653; Tue, 23 Sep 2025 19:33:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NJXi2Q058650; Tue, 23 Sep 2025 19:33:44 GMT (envelope-from git) Date: Tue, 23 Sep 2025 19:33:44 GMT Message-Id: <202509231933.58NJXi2Q058650@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: d5a5975f8430 - main - newsyslog: remove leftovers of 20-year old debugging code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5a5975f8430b15d3b40e4c54214701106b23b83 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d5a5975f8430b15d3b40e4c54214701106b23b83 commit d5a5975f8430b15d3b40e4c54214701106b23b83 Author: Gleb Smirnoff AuthorDate: 2025-09-23 09:51:33 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-23 19:32:26 +0000 newsyslog: remove leftovers of 20-year old debugging code --- usr.sbin/newsyslog/newsyslog.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 7ebdd7cbc0dd..0c8c2c85b893 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -837,13 +837,6 @@ parse_doption(const char *doption) return (1); /* successfully parsed */ } - /* XXX - This check could probably be dropped. */ - if ((strcmp(doption, "neworder") == 0) || (strcmp(doption, "oldorder") - == 0)) { - warnx("NOTE: newsyslog always uses 'neworder'."); - return (1); /* successfully parsed */ - } - warnx("Unknown -D (debug) option: '%s'", doption); return (0); /* failure */ } From nobody Tue Sep 23 19:37:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWVcj4dWRz67q6q; Tue, 23 Sep 2025 19:37:41 +0000 (UTC) (envelope-from des@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWVcj3vVNz3TMT; Tue, 23 Sep 2025 19:37:41 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758656261; 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=MCIlrnY5pVl5l3BTU0BI1qq+mBD2C0iuDtpQtteC7II=; b=p5fvSyMCg0FdKE6aH3fmgcdCr5G3s023Lm4POIKUTg4xt6YbwGqaMzGEWJb1560K7nwddg UJMTKviDKiXlJhg3IqsZcI4/kCUQOlEGOkKtpsf0ptERygMr1IdWlvVQDOlfHr99HOgbem 9Kc2iVWOOt1Cc8QuhYhOAwxCyzZhxO78dUMfzW53tos5UQ+7l/JE35BZtnsA1OgCmSupdl pdv6r7Fg1ByTDcJqXCStcRNI0ejC/zuEOhXVnBrUKEFBAoz2tqF9wXapt86yMbfHohjS08 W4yEj3P2h6cSuT/wl2l3oXAjKOLYi6WV76LXQzxFehka+lgxzL6MHqC+tC3F5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758656261; 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=MCIlrnY5pVl5l3BTU0BI1qq+mBD2C0iuDtpQtteC7II=; b=TpAbDdb1wp6BeDq9c1AoPk9Ag7DqSwN5zDd2Hse4UqfB+Lph1KT1dT10uCuyH4X8BW7kBi VKhE+Qg2lNuT3G2Q5mQCxZjhqM8aHpNJUNabyFCfTdvlk8z+2bnf9GU6UJreyEgkpWpJwy WznD9vKWIg6ER26hgDqbMSdNXOAKtQuCxGx6182PwWzOG+HlW+GQTOGwHcKV33/WmSxu0p zeBAKTtbu9j42c+x6GFHRTrjpohUzb6dIQN8RevfCO5sTuy0AbM4dVqdSJO0FWImwEgu6u Ygg1dLcO1xNzYgViBrs5dYTTux7d1azhScR6imXfQpx/r9bIj0PRHiNwAVIoXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758656261; a=rsa-sha256; cv=none; b=bhKshBpAHvgiG5OW3AUsMJOLDY1BBnkRS11nwGUhA7D/4ow4IuhZ+7+RzWEfU/RlJ2KwRe 2DhLtay5oKADOFPZYMQVdLD2nckyTKuctjjzpXD6gG9n7yeJLHIpT6DRKBXaOyGNd+xg8A vVJpFHoaY51FMCW7Yv+nifjssRCAsHAoX2bFcvmH7YU2ElRY16GArLX1FZzzx6J1eZSbyn 8l0TAum8iQdORoTCuS5Zy3DeVwarKYphvXJCfUl/5Nk0mHQ7lrAOIx6Ofh4cdBZYNV9I0R gDWl2BWmzq0D0Wx58YLNIihUBagnM5o6jBBR1XTprQPgXBq/o///KYnqt5rwRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (unknown [IPv6:2a01:e0a:c54:bed0:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWVcj2WmLz2Cg; Tue, 23 Sep 2025 19:37:41 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 2D8BF88691; Tue, 23 Sep 2025 21:37:40 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 23e69b54973f - main - pkgbase: set origin for each packages as base/FreeBSD-* In-Reply-To: <202509231314.58NDE7Ir042112@gitrepo.freebsd.org> (Baptiste Daroussin's message of "Tue, 23 Sep 2025 13:14:07 GMT") References: <202509231314.58NDE7Ir042112@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 23 Sep 2025 21:37:40 +0200 Message-ID: <86ldm5c64b.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Baptiste Daroussin writes: > pkgbase: set origin for each packages as base/FreeBSD-* >=20=20=20=20=20 > MFC After: 3 day > Reviewed by: ivy > Differential Revision: https://reviews.freebsd.org/D52689 I'm not convinced this was a good idea. Having the same origin made it trivial to identify base packages in filter expressions ('%o =3D base'). I understand that some people think package origins should be unique and complained loudly on the mailing lists, but subpackages already share the same origin. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Tue Sep 23 20:02:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWW9K3Jc1z67rm7; Tue, 23 Sep 2025 20:02:29 +0000 (UTC) (envelope-from bapt@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWW9K2jP3z3X9c; Tue, 23 Sep 2025 20:02:29 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758657749; 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=iBEA4cCABwu9bm+KRdJK6ur246u9Et8RqJeoYUv67Aw=; b=xtK540w0AFRiXFO4oANcWic6NJsVpDuQdl/EPv4FXB/2S2zciNEIi+4mlQW1KWlpyZpRI0 ozrTAQnejonZNlSzw8eH+atN39AgPLF7jKgfUyKbOaOlIfrovYfJ1E3KIdE42hbXT15wbv a3xjtM2+g2XnOdD2HZlhyZIwQ6xr+ZBj+mU5ey4YYyQJlzxOt5tC4+nAO+AYSV/rkPru3F //VrGitFLJAjn+cTRkxyOdXTJDGfAGBE1jVk+6n6W9QZXHaOwjDdd0dzQnozR3hSGt4Zan Rr1zwGN5jIvmt8t/jyg+iYGaWTAto/XR9ZOf+h2oRiDy8pErr2q0YAgU4MFRxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758657749; 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=iBEA4cCABwu9bm+KRdJK6ur246u9Et8RqJeoYUv67Aw=; b=gDXJz4M/otKQyXY0iOxSdutTTLPGRbq/rrPVgh2DIBiB7DHsGG4ERv06cFiPsi6NLs/V+w UutntD/2ZwkQjshCBrcNnRGKZdagk8EX2oCSNg3PpS9aMAABK6bW9EPYY2iSgh/DIfW3p2 w2kp5RPLpFQizI3t5N7SeaCG3SfmDnVtF5HyxnODr/hOsj041nPQYuEl6YHOHrvxlzOEkj 9zXEbdcklWhDBAB6oJdV/a4CA9oR/wmwHIRJe+KYVP/EnnAH7Vf53NTu1k585PAkodUi/t powhTEhqym4U6GwqvLO6MK9Z+naJMXdi0CO8PLQW6RgoUjbao01i0vZmF4z/aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758657749; a=rsa-sha256; cv=none; b=cJGZqQIlz4rCDE8hm7EAVbAXtj3olIQ9O2GArEHcLKlDIsIOlj3COuEJt0eBmB7o58jesp 3niNw6QdqB3NNZoYxy5gVg/WtogdA2zlHJBtICgC+UuNZQy/fRUeqPRKRrO6IpI5dyHnP8 3AXsNY6r7k/0hC3B74dFeXIbJQLrQdrezdSWymgEDw9T4eUHBex8Pq6bAQBXHIawYi1jMa dEceppz31sljKiwAxIeMklF9d10h+iyRO3/wZFPtXNHNcNwXq4FK0zSbaZLYLatBg/eV91 lcDnqI1gwgiQVjhxultSa1RaqtSWS2GOIYCihqx63qiH5osw9cC36lJx6eSA3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from b.nours.eu (b.nours.eu [IPv6:2001:41d0:303:5e39::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) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cWW9K1LnJzZ3; Tue, 23 Sep 2025 20:02:29 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by b.nours.eu (Postfix, from userid 1001) id 9CB5A2955C; Tue, 23 Sep 2025 22:02:25 +0200 (CEST) Date: Tue, 23 Sep 2025 22:02:25 +0200 From: Baptiste Daroussin To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 23e69b54973f - main - pkgbase: set origin for each packages as base/FreeBSD-* Message-ID: References: <202509231314.58NDE7Ir042112@gitrepo.freebsd.org> <86ldm5c64b.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86ldm5c64b.fsf@ltc.des.dev> On Tue 23 Sep 21:37, Dag-Erling Smørgrav wrote: > Baptiste Daroussin writes: > > pkgbase: set origin for each packages as base/FreeBSD-* > > > > MFC After: 3 day > > Reviewed by: ivy > > Differential Revision: https://reviews.freebsd.org/D52689 > > I'm not convinced this was a good idea. Having the same origin made it > trivial to identify base packages in filter expressions ('%o = base'). > I understand that some people think package origins should be unique and > complained loudly on the mailing lists, but subpackages already share > the same origin. > > DES > -- > Dag-Erling Smørgrav - des@FreeBSD.org Still doable via %o ~ base/* also now pkg info -x base/ do work while it did not before same for pkg info -g base/* best regards, bapt From nobody Tue Sep 23 20:17:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWWW03pvHz67sjc for ; Tue, 23 Sep 2025 20:17:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic309-21.consmr.mail.gq1.yahoo.com (sonic309-21.consmr.mail.gq1.yahoo.com [98.137.65.147]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWWW01Zycz3Z9F for ; Tue, 23 Sep 2025 20:17:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=eVPvD0uD; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758658662; bh=ArRSELNLxdN6kPl/RgHvrS/jESnVb1S09A2ClQrv36w=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=eVPvD0uDBThAJBqUtqa/os26TC5IPDlF52A7r9sFJ/+cAxy5U42UWqD5JfrZMfF68jSoTVUOPkEqEE3weQdWcBo7/XTuBSU7SmxCNJqr6nOLwePbqXhIuBXX1vmv5mNlEOrlLqn1gac/uw8ZB8UHQBonAwKsm5SSaFK3PwcjnmFKJfMc6UItvxxY+gXlKhWhB+zUEUNbtYVWNudZPMn183Q3KN+KBzdlRLOGbBF0dKJTxUhd/zvwtJxYiPSa5Fo1XQaq7g+w+5H6Lq9ZDsFvR/HApiemfVnP4kGdhl1obs65KO7aw4GoCXuxDyPzxeHGE3adkNubdE0M/jcA6VuL+w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758658662; bh=VCjGIiaBmuwQjmon88EnL7LPBMp12ysPo02Y7Qx+fiv=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=nqUdSjBnReLht5vlpBQA5fJbslorHCiSAzTbr6zBAvf7vI+e72qMXGiSwvYYZ9gSZXrM5i3+1Dflc2jN6nsbo9x9uEXJUfH8GkD6WayRtzlCY2iJYmgqbJV65HFsTgipCgX1I9l7qaqfEnr0VRw9HXexuWRT3XB/sTm213BkybGk70HzwT2YdSNyhxyqcG0uoCP7Z1WeYBq/4K9hdvacUhjMl1JJom+e+E9145x8VWCxzgDTqrR4PYzgvppP5FHo82ofN8xakJAsb4W+rLcDles0VZn2F5xt7DonFXoAlv+Vo3zhajOnlVUHyvY62MwdnjAToNmIPkHyaE+R6aV7vw== X-YMail-OSG: mYemnk4VM1k_28Phj_R8d1hJ1qvDfod3eyHNM9GVURR37haIpKOZbarN9zT12uU PEIcTSiqd6MzqqSpcwUceyz0kweNzb7dgRUiNsLAca57n4B.94gdMZgfG8HNZE3rlfcE4UMJpxwy RprvlXJa1g5b5k5DmotcwitKT8iy0TdL9lOCoxZGIfg55pe2a_qqJQAxTT7gungy2GzblcKo5497 udZk4mcULDtR0CgUPi1QhxaH_Akn53PFjkVBtrmMW8Svu1ulQpLHr2d027xsyAePVaZvpxfBcANz e5wlyEuhGOG..4Of6BMrx0NAy.h.nw_9HWR5zBElLeEVdrcqfUjUI_0mWgPm5imTSQ_7VQehWDbI tP838ptjsZx.S47MirXjQ4bFTb25MK0bJX_dfuEl5sl7W7gTPjnsaz9VPGodrFjjsibTwWlWvVB4 1sxGUhxnEmGEo8UaL3Ll8TCq8AuvkMUpwe_2CLXXKeOp_AF38wa2BGX5RJ0HH3NW1a.2uL2Fijjs AmS5ZU32PQzeeRmFA68CrbS_RKYff37HnplBClczyf5zlKGoaqj9sN1XI3IZXtcXuwmFUxN0GsYU CgGlBbt.NcTZZCuNrEX2nE04bWF_.zwKjP7JiM6_mZDAgCWs09.MDR_V1E0pGPv6qcQ.vSedHx3_ xJZA._ZaAQUhNDUMdn1IC1pRvoa7QJmn85ASnHzPzyWWtaO0GKd66wKlWonwqngQ1P86SuIKCwMy 0t2_TqLzUh4z2Y5_gdQx4FOyhv86OL3dSj97901WYkEqKHMGAOdoQf0ZT_77fRHhAu9PfyJ.lNO1 2_.p2YQLW1tWDFXGXxoLgbM.T1qyZjKCnsuu9sbXaAyl3ftsMVSQ5OQcd1FnAc6hsWExER01Mn6s jKIM2ElTcxSJ5s3zU3eOIedhsuMj9CjeKZUipQbA94HUZHIiFgZ9Ncyu5hx9t2ZZNVwajqvwLizQ tYs8QtAjwqNDW6tLiFUNMnvlaiVKHGlbFsag1zddTJu21yliwYsI.zCn9jjkXjQ6M2TS0AeiIk0M LI0I7jJJf8PUydWjAgyXX1zNkZEIvbI1DaBo.xTVVypvG0Q2o6GkSomnNYJ6Yl_VgiajsznGDRrs xBByGwHUyTiXGFBkQnNVAD7S7xHzuqVJpblcyK0rirs8bn.cnS2tE_zz_WPU3KlSOpgLkmVogkFu s.k.CXY.hloRUZtAfk9IWXDdf2rGYY.J6PFnksxxHd3hJt7yrKNiJ027x4LXD6.B_YyAwQDfdpB. WZNJZz.l1sTVmfTNTfLWkGdOTdRAPub.8GpK1SaCcftPlbiqFq6WuYfeaaBEG4iWqwdr1maK4Zbp OtogCNiI.kxXDX0PSqCy7u6kF7MpEaeegPgeaU4LegUgFF8T5t8txYrqWywSOxAI4JQPY29wjoc_ EXr6l3KH3ioqrHQ6D_sp2ymBHZ7SiH.TWhPf8CDEYnue_LRQUafZMBMQBROS9yUejkYz9HVBqKaD Gt5MwQ8z2QscDF0BpX657AinYUXaKZ_WZrsS9A8Ls4dO14sQrlntsVjYcqA131NUGkv01pSRFVY4 d1MOgCp2wuWqBhWyot4uNhGaJOAMVTkD5OYhZQpngEB3dSs8QQrPdCZoxt_blEzVhYoJBucyN3P3 ysGSWCUuGQjPqX.KTcrPLJSe3Z0FiFUQGSdMrfbuJaAxgHtrszVLF9_i75ALwc9yAJxjyFxfM79g 5Xc5JC.iQ91lvwE_OJ9Me3TardW0V_CCXE2V.lBTb9e6.MtSTIj0mh7gfmARji_Xhf_2qSkmlBNR uOKI5ta9_XDMsQyS8ZJIkLQjtaWZ3KnuP21kbM7nOVBu.91fmKR1VIungW_.s2ZrQCAZAmumHjgO 8NZY.gxn1OiJzbs8.E5Uh2xULz4UUAOUlJ3TefAMpIA2eAa04ZdWh1DP1mbMlTvMne0UK7buUcp7 T9H_pf.SLgUz7OxYycCHnNSKPsuxD11LavmWP8mQ6frK9I2SV5_V2CcqZuS4OSpZyk1oIwPbkl0z ZOAjP5EKAvVOZ3YbqBM64FK5CHkcpBUOga4EZM1b0TGiNf.dld60uwWpUH_p4QEASKEHf6gVBtEO YI9k5yfdqm4iTUDOTejH_REA0hXW8PdBMALLDli8mANuunJVc9HCtYhpub4RiTcsbfkLU7IEgLBi 983nPISpbV4JoRjFDtYB4CmtBPVN4JVi8vVxYjB1EKYhmm1bzyv7DQ3EklBIosXtcbEMnK48Td9l GwtD0uhzj9ELTpQKCU2SrddcHTdVW8TkCsELQN9Ana6oxMowYUpBwhPVYZcyOjJqnBhVNNnvtk_V Sig-- X-Sonic-MF: X-Sonic-ID: 60882e31-c599-4eff-b41c-8de316d04fb3 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.gq1.yahoo.com with HTTP; Tue, 23 Sep 2025 20:17:42 +0000 Received: by hermes--production-gq1-6f9f7cb74b-bkd6q (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 47a57141ae3cd5cfffbf9c3eb69060c4; Tue, 23 Sep 2025 20:17:37 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 23e69b54973f - main - pkgbase: set origin for each packages as base/FreeBSD-* Message-Id: Date: Tue, 23 Sep 2025 13:17:27 -0700 To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3826.700.81) References: X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.147:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.147:from] X-Rspamd-Queue-Id: 4cWWW01Zycz3Z9F Dag-Erling_Sm=C3=B8rgrav wrote on Date: Tue, 23 Sep 2025 19:37:40 UTC : > Baptiste Daroussin writes: > > pkgbase: set origin for each packages as base/FreeBSD-* > >=20 > > MFC After: 3 day > > Reviewed by: ivy > > Differential Revision: https://reviews.freebsd.org/D52689 >=20 > I'm not convinced this was a good idea. Having the same origin made it > trivial to identify base packages in filter expressions ('%o =3D = base'). Note: Do not take the below as any solid preference for one over the other. It is more narrowly technically focused. Why would '%o~base/*' be insufficient for that specific purpose? For example: # pkg query -a -e '%o ~ base/*' "%o %n-%v" or: # pkg rquery -a -e '%o ~ base/*' "%o %n-%v" Just the issue of the old ports category that was removed? (I'm ignoring the period over which there are some older base packages that have not yet been regenerated that used the old origin naming and others that have been regenerated that have the newer origin naming.) > I understand that some people think package origins should be unique = and > complained loudly on the mailing lists, but subpackages already share > the same origin. Hmm. Will there ever be subpackages of a base package? (Nested sharing of a common base would result as things are?) (For all I know, it may well be that only port packages will ever have subpackages as a possibility.) =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Tue Sep 23 21:03:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWXX700CHz67wZh; Tue, 23 Sep 2025 21:03: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWXX66Qxxz3gxp; Tue, 23 Sep 2025 21:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758661430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SlG7zhdpGVJoEUQjonLo6s4KkrTVtzOE0GgzKmQIbyM=; b=IxlSVDSFBQkKzlqR3OdhXrcCmKKKyKiyC0MlcJORw4wsuaKrypDbNUlE5XzwSoQxfLt3GG Cu8ikvEzMvFx+Rt99sEuJI8sXEk0PztdNLd/vIExYMY0m8PZmh9q8pQj08ehlmoOZoSKjf 9u2XTUJ7nR5GrUEANuplxYIET0cUk8sOuYatbqPM8bViyNzOe/dEoIPXEAwVw4TzUTnLP8 VZYcEUa4QPqZ8Hs0NySyZkz+HG3w5jEgtrRra3r9/pztdm35vLNRkKJUc1WODqzmrjvXal J5Cpif7IyK0I2lLZv0jrJHB2kipo0WzUzL4gfFqqMzcQL2rNZE4aw4F7onZNLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758661430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SlG7zhdpGVJoEUQjonLo6s4KkrTVtzOE0GgzKmQIbyM=; b=etVO/+aUI1hbqDqVB4AWjWC/xq6EKyQOibxaqw/dbbZfn/V4u7xT6vSLITGsTPDruYeHz0 42L1a4+03A8+9t20Z4XXcDsKV8DHce9cq9l5Q6S5wGMnjI5SSeKXg3/XBOupaB/dmZz/AH gqtWfdXGRCUVF0uuNbU9tfBfUwgKsJYAx+zgT7OUQ4YkWanX8zEODyCrDU7fW2Y4Myxykl ocmxp/yrKdDwojtEOWKRzd9ZB+LoZuUG76rA4fGYmFttthrjEmPd7PwGJahiHzp1eZOdX9 R7uyQdmfzcDVNhq2Dm11aDY0Yh9wW6qA+hby8vXEKGiC1gysV08AWjmyz5uBBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758661430; a=rsa-sha256; cv=none; b=gtt59S7wZow6mG0oX/Vd5Mltv4Miwsyf3bes/a8UxS4fLvM05WZ/YCOtGagnDu5fgUbu78 Mud7/fRw2QFSA04MbwqC/l4ZKt0DFwTItAfvScKLWKQi2XOZj6HlRpzEcp5BJSvL1v4S7a yTnP85o//ragNIDQCyt5vsQ3H3o3TBcvae7SHS1yu+nGryDngjnRmP0oe9wTV+I987Of6Y up62T+HV2ORlLND1NyMHQrmQsmoNPo5Ug1QQqLHLDPRNJeIEHvoL3Vqp47dbw87KbaAGs2 lpbK72H2GQ5nZwroldUapKJTcUHiXNX/x/fjj3g2BxebdXt3NSU4dsv6bS3VnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWXX661Gvz12X8; Tue, 23 Sep 2025 21:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NL3oWT028915; Tue, 23 Sep 2025 21:03:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NL3oBW028912; Tue, 23 Sep 2025 21:03:50 GMT (envelope-from git) Date: Tue, 23 Sep 2025 21:03:50 GMT Message-Id: <202509232103.58NL3oBW028912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 155290b23f0b - main - tzcode: Expose and document offtime() and offtime_r() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 155290b23f0b503b9db675d6a45f85b189ee1926 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=155290b23f0b503b9db675d6a45f85b189ee1926 commit 155290b23f0b503b9db675d6a45f85b189ee1926 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-23 18:52:10 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-23 19:38:49 +0000 tzcode: Expose and document offtime() and offtime_r() Includes diff reduction to upstream version of this patch. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: philip Differential Revision: https://reviews.freebsd.org/D39715 --- contrib/tzcode/localtime.c | 2 +- contrib/tzcode/private.h | 2 +- include/time.h | 2 ++ lib/libc/stdtime/ctime.3 | 39 +++++++++++++++++++++++++++++++++------ 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index 7ba72d730648..a8f97e31a4bb 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -2021,7 +2021,7 @@ offtime_key_init(void) } #endif /* __FreeBSD__ */ struct tm * -offtime(const time_t *timep, long offset) +offtime(time_t const *timep, long offset) { # if !SUPPORT_C89 static struct tm tm; diff --git a/contrib/tzcode/private.h b/contrib/tzcode/private.h index 532d9ddc81c8..e6b206690b73 100644 --- a/contrib/tzcode/private.h +++ b/contrib/tzcode/private.h @@ -823,7 +823,7 @@ extern long altzone; struct tm *offtime(time_t const *, long); # endif # if TZ_TIME_T || !defined offtime_r -struct tm *offtime_r(time_t const *, long, struct tm *); +struct tm *offtime_r(time_t const *restrict, long, struct tm *restrict); # endif # if TZ_TIME_T || !defined timelocal time_t timelocal(struct tm *); diff --git a/include/time.h b/include/time.h index 89a76ca5fd93..9e71a85f6a9a 100644 --- a/include/time.h +++ b/include/time.h @@ -174,6 +174,8 @@ time_t timegm(struct tm * const); int timer_oshandle_np(timer_t timerid); time_t time2posix(time_t t); time_t posix2time(time_t t); +struct tm *offtime(const time_t *, long); +struct tm *offtime_r(const time_t *__restrict, long, struct tm *__restrict); #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) diff --git a/lib/libc/stdtime/ctime.3 b/lib/libc/stdtime/ctime.3 index 96b7f775535a..6384e8bd959b 100644 --- a/lib/libc/stdtime/ctime.3 +++ b/lib/libc/stdtime/ctime.3 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 26, 2024 +.Dd September 23, 2025 .Dt CTIME 3 .Os .Sh NAME @@ -41,6 +41,8 @@ .Nm localtime , .Nm localtime_r , .Nm mktime , +.Nm offtime , +.Nm offtime_r , .Nm timegm .Nd transform binary date and time values .Sh LIBRARY @@ -68,14 +70,19 @@ .Fn localtime_r "const time_t *clock" "struct tm *result" .Ft time_t .Fn mktime "struct tm *tm" +.Ft struct tm * +.Fn offtime "const time_t *clock" "long offset" +.Ft struct tm * +.Fn offtime_r "const time_t *clock" "long offset" "struct tm *result" .Ft time_t .Fn timegm "struct tm *tm" .Sh DESCRIPTION The .Fn ctime , .Fn gmtime , +.Fn localtime , and -.Fn localtime +.Fn offtime functions all take as argument a pointer to a time value representing the time in seconds since the Epoch (00:00:00 UTC on January 1, 1970; see @@ -123,6 +130,18 @@ adjustment, and returns a pointer to a .Vt struct tm . .Pp The +.Fn offtime +function similarly converts the time value with a time zone adjustment +corresponding to the provided +.Fa offset , +which is expressed in seconds, with positive values indicating a time +zone ahead of UTC (east of the Prime Meridian). +It does not call +.Xr tzset 3 +or modify +.Va tzname . +.Pp +The .Fn ctime function adjusts the time value for the current time zone in the same manner as @@ -155,13 +174,15 @@ except the caller must provide the output buffer .Fa buf , which must be at least 26 characters long, to store the result in. The -.Fn localtime_r +.Fn localtime_r , +.Fn gmtime_r , and -.Fn gmtime_r +.Fn offtime_r functions provide the same functionality as -.Fn localtime +.Fn localtime , +.Fn gmtime , and -.Fn gmtime +.Fn offtime respectively, except the caller must provide the output buffer .Fa result . .Pp @@ -368,6 +389,12 @@ and .Fn localtime_r functions have been available since .Fx 8.0 . +The +.Fn offtime +and +.Fn offtime_r +functions were added in +.Fx 15.0 . .Sh BUGS Except for .Fn difftime , From nobody Tue Sep 23 21:05:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWXZC130Pz67x5R; Tue, 23 Sep 2025 21:05: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWXZC0RVLz3h8Y; Tue, 23 Sep 2025 21:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758661539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I0yXcTLpU20k+JGKPB76CwpVhPyME9EI4Ux97JajwQU=; b=uVcN87l1zPlSXPxwsmicgvG6yWb0GPdol4CGYpo3YUw0uHyl/cYB8pFARb3Gt51dLnG0r+ Xfw3P7pRtkFRz6L6FFIpZWp1Vl+avrz4YohGnUcdwN122hmyI9mruObE1FgATpoOM+UBON 3yVTxsoHfgrtLdLzM9w+Z4Y7Sozkh4Q2v89RUKywfkDWGI9bwM1jQs2xQF8Mhwrc+7DXuR ESuJvbqI+RaDdGMphySSnlGIV8D5e5iNU6MaGnK/Sx7kc+i/9ajDQnz2Fdjxm2kd+BFkjM enmTHcNpKrLHiSiCkwIA8R9SLwkEFsZB7or3PmA3E0BIuLnvtxOB7MqA973FyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758661539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I0yXcTLpU20k+JGKPB76CwpVhPyME9EI4Ux97JajwQU=; b=qX0hDDRmuewQz+UPBA9n/pWZ1SBHwWupSE37TR++Insrw0k03Q/UlRLfadFYmGC322HvzF waRUYwLpZXYBmwGPCVIAhdmheWSTOInK935OnV/WvvVRX/cyjUL+4d4iDPAq/6nZvTwUTF lHOZQQzGj5er9+pIISBEp319akYsvkfg/J46972rrHTrevYJ/tMJptfuCKBkJSLWPqk8Wi mMJTmc2ZkdIotH59mX6+OkXJZyqb5Z1UmCVowyUbp522QLSOHwi4J3OR98AnjrCMnFLn7y FBU8rHWiZdmLygft/yR6rJYxiBwNJWMTUO/H9c2R9/kQ9xVy1EB6ntc0+SUoiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758661539; a=rsa-sha256; cv=none; b=juLqx5t/zEgHrCEc97pUu71ZIxe3stTD82sQmj35mXu68eYfEOvVAIdYZ1RKM5IYsMgyvf 1Kl8jaEyn/m/lRCaYJ8rA93gy+YqWYag9R3TLlcGcnMZIpMOSutX0Ekat6qetD5lVkvrPJ yuOcwO5MA5RfQvUVnyhyK1NT33MtLcHQ45N2eTlOjREblYS5E3jS2ZrYaQkNzPW4FPOEJZ LucpKqHs0jVrxSTKUnnNOfwW8y5ETrECjepW6SmWQ6v0prsoyujswVM00oPWxwBaCZGv8k H4xsi9YIt2VjAgr/7YJG25nLvXTCrBhlNJfO1kmvkpo2x1pptLnucbfNQkflag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWXZC00N7z1251; Tue, 23 Sep 2025 21:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NL5c2h029684; Tue, 23 Sep 2025 21:05:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NL5cnq029681; Tue, 23 Sep 2025 21:05:38 GMT (envelope-from git) Date: Tue, 23 Sep 2025 21:05:38 GMT Message-Id: <202509232105.58NL5cnq029681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 7ece602e00e8 - main - freebsd-update: Library ordering List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ece602e00e85195fc426a2401c49921cd39735e Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7ece602e00e85195fc426a2401c49921cd39735e commit 7ece602e00e85195fc426a2401c49921cd39735e Author: Colin Percival AuthorDate: 2025-09-23 06:55:08 +0000 Commit: Colin Percival CommitDate: 2025-09-23 21:05:27 +0000 freebsd-update: Library ordering Upgrading from 14.x to 15.x with freebsd-update broke because libc depends on the new libsys library; freebsd-update installed the new libc before creating libsys, and every step after that failed because all the tools (including gunzip and install) are dynamically linked and need a working libc. Enforce ordering when installing shared objects: First libsys, then libc, then libthr, and then all the rest of the shared object files. This is a candidate for an Errata Notice since the issue this fixes breaks upgrades. PR: 289769 Reported by: Graham Perrin Reviewed by: kib MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52688 --- usr.sbin/freebsd-update/freebsd-update.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index b3775382f66c..143d93a6dcc0 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3111,10 +3111,28 @@ Kernel updates have been installed. Please reboot and run grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 - # Install new shared libraries next + # Next, in order, libsys, libc, and libthr. grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | + grep -E '^[^|]*/lib/libsys\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | + grep -E '^[^|]*/lib/libc\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | + grep -E '^[^|]*/lib/libthr\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + + # Install the rest of the shared libraries next + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | + grep -vE '^[^|]*/lib/(libsys|libc|libthr)\.so\.[0-9]+\|' | grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 From nobody Tue Sep 23 22:06:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWYww2qS2z681Wm; Tue, 23 Sep 2025 22:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWYww2C2dz3npn; Tue, 23 Sep 2025 22:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EFgFPOqZvZh1uGF49RUmYQAt2758SFsrjFGW4/a5Q58=; b=B3YwbCLLCwjtgdKL2BIPYwWHt6yIuag2i8VRuwculOOre3OtkhMkK/QP2UXmkedcgl5+Mx hwE9UPn5xFscpT8siEJckZ5dpVKslrWqWs64GmlxMh1zyZ9m3bBiOzusMexqDvfnEzP2EI jeHCNldpj5AAZVPCxgSRGjIJDN7Oq+aM5PzQRgwoUnWBLhCgqHe/Z4zNZkrTkpf94DOIF0 cflz8wTxgCW82Gcn6EFARfypwUdF+zIv7ET5TBDEGDcy+j17EriN915J42uItpOYXZno7C 9SMF6WnpGdJvvG5jsfKh693avcK63dGfmsRGu5KjxHcTEoIA9aW0XSvsK0tBKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EFgFPOqZvZh1uGF49RUmYQAt2758SFsrjFGW4/a5Q58=; b=Vp+/FNIoVTs528PKYdJ3ja5KU93aL+WNrxij/+O4X/GagOdcjk+40ZnG3bNIeeCfEBB4fA i3eZpKj7YgWJZF9/kAUf/jXI8D+oNBkYR2w1I766WlW7djookGilafokHKi95m2JfD6imd iuoqdrTyrJK/1NHBA3Boo3RCu4Akdn9TdBPpeT3Vu6ekzmdui3DnCI9hqe3maoVKerNDbI 6QY1kUcLRopq+QhvfbyBgLGaka4aG1+2gZxGnoscRc1dmCEH8R2xmKq51RnLavyyrzlnS7 34WJFTd2kDxDPppKxvUCAx6nda3TSAIPc7PL2pam+HoaR8MFIyb6Vhkwpt0iIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758665216; a=rsa-sha256; cv=none; b=rRUgSkpb8fKKEkSBKs3j+zK3mJ4JVoc6ifCcPxPPZ/sgzl0hCHxo7Ekmoeew2HGRApVjk3 5RJnKCQEWLyTUB6iCojtprywenH3on3pwdK1qgOamoAlKIkm/NxCpCxvthhgNDOrAyTsKH PwG3FGppfvy30+AVEspdB2xhEjVA+JqVr0E/+6I82os53e9uNc/BKeXRjtmT7koNAiK5Nb ieq+ndDIRbt7XmglOaPYSJk7a7EMEnRqUgjAfMHzLAi/9a2NKd+XGs/hg4KBCZH5xWZYb1 qdwLevZcRq/qssWEbwwNUsll+0cUoMNEnD4lqTHxnF5z+cgZF4QTwhu4F84E0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWYww19CFz13yn; Tue, 23 Sep 2025 22:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NM6uiK043220; Tue, 23 Sep 2025 22:06:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NM6uhq043217; Tue, 23 Sep 2025 22:06:56 GMT (envelope-from git) Date: Tue, 23 Sep 2025 22:06:56 GMT Message-Id: <202509232206.58NM6uhq043217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 5efd371bba15 - main - packages: Move powerd to its own package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5efd371bba1508ed94faed2afbd11936f5fe4dac Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=5efd371bba1508ed94faed2afbd11936f5fe4dac commit 5efd371bba1508ed94faed2afbd11936f5fe4dac Author: Lexi Winter AuthorDate: 2025-09-23 21:05:05 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:32 +0000 packages: Move powerd to its own package Nearly everyone wants powerd to manage CPU frequency scaling on real hardware, even if -utilities isn't installed. Conversely, very small jails might want -utilities but don't need powerd. Move it to its own package and add it to the minimal set. MFC after: 1 day Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D52645 --- UPDATING | 7 +++++++ libexec/rc/rc.d/Makefile | 5 ++++- release/packages/ucl/powerd-all.ucl | 11 +++++++++++ usr.sbin/powerd/Makefile | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 82ae24814e02..23c2da62db63 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.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".) +20250923: + powerd has been moved to a new FreeBSD-powerd package. If you have + FreeBSD-set-minimal installed, the new package will be installed + automatically, otherwise you may want to install it by hand. + + This only affects pkgbase users. + 20250918: mandoc (including /usr/bin/man) has been moved to a new package, FreeBSD-mandoc. If you have the minimal set installed, this package diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index e5ee34e62185..d072039836d0 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -50,7 +50,6 @@ CONFS= DAEMON \ ${_nscd} \ ${_opensm} \ os-release \ - powerd \ pppoed \ pwcheck \ quota \ @@ -127,6 +126,10 @@ CONFGROUPS+= NEWSYSLOG NEWSYSLOG= newsyslog NEWSYSLOGPACKAGE= newsyslog +CONFGROUPS+= POWERD +POWERD= powerd +POWERDPACKAGE= powerd + CONFGROUPS+= SYSLOGD SYSLOGD= syslogd SYSLOGDPACKAGE= syslogd diff --git a/release/packages/ucl/powerd-all.ucl b/release/packages/ucl/powerd-all.ucl new file mode 100644 index 000000000000..b6a2b3034f89 --- /dev/null +++ b/release/packages/ucl/powerd-all.ucl @@ -0,0 +1,11 @@ +comment = "System power control utility" + +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 2e45f2076528 - main - elfdump: Move to the toolchain package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e45f207652842f03101d250d6e542e5e89b6e4a Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=2e45f207652842f03101d250d6e542e5e89b6e4a commit 2e45f207652842f03101d250d6e542e5e89b6e4a Author: Lexi Winter AuthorDate: 2025-09-23 21:16:12 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:32 +0000 elfdump: Move to the toolchain package MFC after: 1 day Reviewed by: manu, imp, emaste Differential Revision: https://reviews.freebsd.org/D52648 --- usr.bin/elfdump/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/elfdump/Makefile b/usr.bin/elfdump/Makefile index 5b48a8b6174d..40dc04ab688e 100644 --- a/usr.bin/elfdump/Makefile +++ b/usr.bin/elfdump/Makefile @@ -1,3 +1,4 @@ +PACKAGE=toolchain PROG= elfdump .include From nobody Tue Sep 23 22:06:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWYwy5c0Wz681pD; Tue, 23 Sep 2025 22:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWYwy3YXZz3p1T; Tue, 23 Sep 2025 22:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s4dfcIOE15Iwr2LbbuVKMkiky2QZo7l+ExK70W/BMcc=; b=GhYSp8Qek0r3Gkp+lWZG3uWw888yyh3kGcWnY+69Imzj8exk18IC4tnMqS6A8iOy9Za1j8 1H6+/QuBu6e22iHt+pPuO+ZbwKGF0aacr7eZN6tSXRf79KbF5iAax9LNsxG6XWAzEyuXX1 TegGhdNK0YTjob+nsT9avO7jt5JBRIod3P/GbpJXozAdzGrhzgIL8uXfZeQkdfd3doxj1G zf3I2XPdqYBSliyeBUR3CcnYOZ20CdIW5QEr+5iXwvhGTnCLKaKEK+bICl5ITWc0PNG0LL Gxu8sfsHcyiuazkhF87rre6jmDdgpSpOb3BzS0MrXZoDai4PTa28/YXXR/6vDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s4dfcIOE15Iwr2LbbuVKMkiky2QZo7l+ExK70W/BMcc=; b=x2EbKWmGJAFNbWJGXkz1yWxPrZwqDLsyVMMSunPVjFOax0R2zNgKjhV1njghkFL7ywSck/ s8bglWgsD8j0sWnIbhmSeJeqrV6JVaFmOf+VDafJsR99t2vAqHd5gchoCDbpVchuEWAABr 9Gsfl2MJ7hk76YmHU8mPCtdSYabtgXVnhxf9C2/faU4hUQ+pXjoxdEBxY6eS0jD23trq/1 R6FdGzsB1aAwODE4KxH16NaZQIdYMKPkc7gIF7kCEJJTidsiQJqxZKXbg6GGqg50sTIFZJ Czy2hZs80QW6n20gC8AjVMfsGmOuzF5B6mCN7OsIKE03pUVPR1+RYeZKp4sSXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758665218; a=rsa-sha256; cv=none; b=Y17G8yM2la/dpHnzSzn1bH0YjWS4QJ/S1LpKeLzRZCLQ7ndUi4TX7/RtQqy+I4u3HgJG4J SY2Xqzoh493bqDgRDIwkSNcNZ1N8yUpi2C3ORkHaD6q2vbTX1xQKAscOwEM8oL1S+D2dBb WNBSSBI42IDS9rAVG9tpK2/bpHl1OSeWfWiuE3tRYw/w11AVFFrAjaLIAcSkXLy8P/m+ms CWb7z6/Y9qvllN8DBHUKwJCq3PEdIPS/UinS7I3LRO/dyK5wM30mtG2/7qm4OAmT6vR9WU w9HCcX1eVlQ5Cs3pjpmeIDcv/KssXAR2E1sCLe1Pmqw7Oj0NZ1HJjjkXLx3wzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWYwy2d1Tz142D; Tue, 23 Sep 2025 22:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NM6w1T043296; Tue, 23 Sep 2025 22:06:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NM6wNa043293; Tue, 23 Sep 2025 22:06:58 GMT (envelope-from git) Date: Tue, 23 Sep 2025 22:06:58 GMT Message-Id: <202509232206.58NM6wNa043293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: eb373ef459cd - main - chat, pppoed: Move to the ppp package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb373ef459cd87dd9fcab63dc72f3e53c7493758 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=eb373ef459cd87dd9fcab63dc72f3e53c7493758 commit eb373ef459cd87dd9fcab63dc72f3e53c7493758 Author: Lexi Winter AuthorDate: 2025-09-23 21:20:25 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:32 +0000 chat, pppoed: Move to the ppp package MFC after: 1 day Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D52650 --- libexec/pppoed/Makefile | 1 + libexec/rc/rc.d/Makefile | 5 ++++- usr.bin/chat/Makefile | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libexec/pppoed/Makefile b/libexec/pppoed/Makefile index b1b88c4c1b6c..26339249c3b5 100644 --- a/libexec/pppoed/Makefile +++ b/libexec/pppoed/Makefile @@ -1,3 +1,4 @@ +PACKAGE=ppp PROG= pppoed LIBADD= netgraph MAN= pppoed.8 diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index d072039836d0..896d5bd8ae09 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -50,7 +50,6 @@ CONFS= DAEMON \ ${_nscd} \ ${_opensm} \ os-release \ - pppoed \ pwcheck \ quota \ random \ @@ -130,6 +129,10 @@ CONFGROUPS+= POWERD POWERD= powerd POWERDPACKAGE= powerd +CONFGROUPS+= PPPOED +PPPOED= pppoed +PPPOEDPACKAGE= ppp + CONFGROUPS+= SYSLOGD SYSLOGD= syslogd SYSLOGDPACKAGE= syslogd diff --git a/usr.bin/chat/Makefile b/usr.bin/chat/Makefile index dfe76f71aba7..1b53d2abb1f7 100644 --- a/usr.bin/chat/Makefile +++ b/usr.bin/chat/Makefile @@ -1,6 +1,7 @@ # I once used this extensively, but no longer have a modem. Feel free # to ask me questions about it, but I disclaim ownership now. -Peter +PACKAGE=ppp PROG= chat MAN= chat.8 From nobody Tue Sep 23 22:06:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWYx01bPmz681Wt; Tue, 23 Sep 2025 22:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWYwz4JfNz3nwC; Tue, 23 Sep 2025 22:06:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vrF4+jmyyxOUhI1tRe+Ul4TCLjHhtPp87HWb7/VSa5E=; b=sOD1nvGd/lWXYRtq8YyLGkvVMc4ww1WucBqWJo0XInKlIX/U4zJSftlGXjZYBW2pfR+B3R ejTzSG8sbQa5hV6eawUhTeJSi93PbkzholXBVcdextoXtDb0W0lvOAl2PFiXZ4gzG2R9Jj H5aLVFOSKp9HKr429mFvR+wTHR90lHoB4/zryri2pN79OD2n7FaE95niKLU6ml4CTgUA8t GwhVQmj05yJvZy4qEJ+891ZW++2ibqEbc1AXxvhe0UR6z1cCQSXfnC+5uhSq7jALzKdVs0 5jdR5axb3EeN2m6aeX38gsGcF0G7J9iz3DOWx3NhhYZR+OcgcEuewb4AuJVv3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vrF4+jmyyxOUhI1tRe+Ul4TCLjHhtPp87HWb7/VSa5E=; b=OvNALyFYsIxczHmrfJFCIQ9Qph0egWYqlPdX3V39o/FmkuqhOmLKCbQ+eXdxFgCSYj2IsO PsZIys/I+6Tynn2SuJEM5zSqI9ZQm9W1e0h/VB/gFZ/uhqYEHxwkEknB9k6VF9xnSTHjtu f36vgBQ/oOlFb3zHh18ZE1M1r9h+FPFCHBFU5P0u94DbIVK6+ZcDkifVHsUEfEYY/5rP2+ klzgn7+r9l4g2qNsXqhMm7057NiRtILh6RMOxpH2NgqkDygpsDymwrcDeYdxAm7hfAN2mD x8ZOx4kn+9Yr5VuFcC1dWQ3O0pXHau/kl1Hp7l0hff2bGYyryKXKYTegStEWhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758665219; a=rsa-sha256; cv=none; b=U/QVYgu3e4HkVuOJ293TAgIIriG2IqHKI9/Iy9rHXDzWDcpm7tzu6dq8/V5RX5PnEEZQ3M klNv8NYWihW9X66Tkyd7jOrddJX8sVxWdEvEwn4ZvRJc8jN+u1hlFiDNZCUDxdfVTHU2s7 gjnJnktr1shkE2Du0CTBO0xdZ3zsMFzKQnG6uJNBX/mN12mZo5MvZfM9kglfxkECIaX8QL ++9HJhkHjSE1RA2M2D5gXOTk4X0WwXOHAbZB7GSe05dyZveHKR+fovWCAU6wDqksB5E1wK H9LYC3mKusQCvVYSLYkw5HyMmCifAxTQn8KgYUYj2dyVYUCzlTgSCmW649ksQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWYwz3cXVz13bc; Tue, 23 Sep 2025 22:06:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NM6xiB043331; Tue, 23 Sep 2025 22:06:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NM6xPE043328; Tue, 23 Sep 2025 22:06:59 GMT (envelope-from git) Date: Tue, 23 Sep 2025 22:06:59 GMT Message-Id: <202509232206.58NM6xPE043328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: ef4b08a7ed17 - main - who: Move back to the utilities package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef4b08a7ed17b84b7d9c5b1dd4781bf4d90f90df Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=ef4b08a7ed17b84b7d9c5b1dd4781bf4d90f90df commit ef4b08a7ed17b84b7d9c5b1dd4781bf4d90f90df Author: Lexi Winter AuthorDate: 2025-09-23 21:21:21 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:33 +0000 who: Move back to the utilities package This was moved to -acct along with the rest of the accounting tools. While it does work with accounting data, it's also a core Unix tool that users would expect to be installed without having to install the whole accounting system. Move it back to -utilities, which is also where w(1) lives. MFC after: 1 day Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D52653 --- usr.bin/who/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/who/Makefile b/usr.bin/who/Makefile index 77626f51824a..c7c455d5261c 100644 --- a/usr.bin/who/Makefile +++ b/usr.bin/who/Makefile @@ -1,4 +1,3 @@ PROG= who -PACKAGE= acct .include From nobody Tue Sep 23 22:07:01 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWYx215z8z681sh; Tue, 23 Sep 2025 22:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWYx15rQSz3nlT; Tue, 23 Sep 2025 22:07:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HPcmOXSSL9//FryJGcR16w8JfrrIbzelJJNyGE/VQRE=; b=xCc0g+tr64AheaVV9eHSlm6ugngEmJsSITl8vtBTuW1Mxd3Ho5m9VoiVYwVrwZboDAxwBj qUMNh+RuwhfdtKboJ3IMB6NOoyeGlZgR72UlRnRKnfM39Xo8+yzNBtEyiH4ybIFlw9NeUC kFUhsjgbR08qPy397p9zmPNWHftGlvcGJxNZloqSqUEmloJ614rN70YQ7q9eaNIWPQ+QGg vDeMY2mVSsDN1B0R13nT7Y9iXApVtyNZCKL1KrE8HL1rRAOmpOCPhfoalI5/jgn98cdhGU tuPyePqh708c9tB2074/Q9uRo29Mjw3lu9geAHN00i4XteG5KH3JcdKZLdoZ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HPcmOXSSL9//FryJGcR16w8JfrrIbzelJJNyGE/VQRE=; b=PC935KiiOvorHYmBCqw+lus5iJa963XyRJR5+OkDJlKrRKv/XzlylQtSGMnwHmxAXpuxXQ 6A88DKwqQSsXP6DUDfN0gDpKyGx4BQxTNewRyIPo3IQjQ6jZRXSpgwQNqG6Kllu100QXhM WybeQsusl0SxzoPTfU/YZ6c+Dbt5Fsvm+b2ucr1XDRZAnX2SGcuQfvu8duNG0bihUj9b1/ kMSV3dliRQCkdmPCeZ8xNzD6EaFUVZYXY2BosnpxyIsReP448QFxkGKEipE6750ah9URQx zk4LD82hsf+0ZSaJMWK34GnJG6O6BiBPd522GUkrEyph97BtcocMw37BGBT9+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758665221; a=rsa-sha256; cv=none; b=nl9P6yB5ElnSb3fecuCFJaICPbDxxM5NKUIUD4tj8AdM6bAY+OEGXFvCfWiCPhfL+eXkJR V0/pmQJSs9Ax1D42rbXhMnS2a189OSPkmhOr8SZsH/YDf10zIR7RMPNaDjI58mqedx3wbH 8oHMVUua31GhranSk1zDeqVtJ1YfuDefTtgwiFSCHPnLFtrJSCTb4cfAVQXaZwqkY8rse4 /SVwYwYniwbY6jPnqULvKuRDovA0gz+3xzvRXEn7572mKJVE4/oMOg9taALloFTWzJgGHV 9sK5FneGj8c16anzv5+1y11etpWXRojCvo6/UGZDOLRagGm/rLljkMF6TCFUzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWYx151k5z13X4; Tue, 23 Sep 2025 22:07:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NM71Iw043409; Tue, 23 Sep 2025 22:07:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NM714e043405; Tue, 23 Sep 2025 22:07:01 GMT (envelope-from git) Date: Tue, 23 Sep 2025 22:07:01 GMT Message-Id: <202509232207.58NM714e043405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 61ca69110f26 - main - packages: Replace libbz2 package with a bzip2 package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61ca69110f2676b7dd3c7ff8dea899615d341e1e Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=61ca69110f2676b7dd3c7ff8dea899615d341e1e commit 61ca69110f2676b7dd3c7ff8dea899615d341e1e Author: Lexi Winter AuthorDate: 2025-09-23 21:37:06 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:33 +0000 packages: Replace libbz2 package with a bzip2 package Currently libbz2 is in the libbz2 package, while bzip2 itself is in -utilities, which is inconsistent. Move both the library and the utility to a new -bzip2 package, and use LIB_PACKAGE to create a separate -bzip2-lib package for runtime dependencies. Add the bzip2 package to the minimal set, and since newsyslogd uses bzip2 for logfile compression, add a dependency from there. MFC after: 1 day Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D52663 --- UPDATING | 7 +++++++ lib/libbz2/Makefile | 4 +++- release/packages/ucl/bzip2-all.ucl | 12 ++++++++++++ release/packages/ucl/libbz2-all.ucl | 5 ----- release/packages/ucl/newsyslog.ucl | 7 +++++++ usr.bin/bzip2/Makefile | 2 ++ usr.bin/bzip2recover/Makefile | 2 ++ 7 files changed, 33 insertions(+), 6 deletions(-) diff --git a/UPDATING b/UPDATING index f6412666564a..73d3eddc2941 100644 --- a/UPDATING +++ b/UPDATING @@ -38,6 +38,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: FreeBSD-pmc package. If you use these, you may want to install the package. + The libbz2 package has been renamed to bzip2, and /usr/bin/bzip2 has + been moved to the new package. If you have set-minimal installed, + the new package will be added automatically, otherwise you may want + to manually install it. + + This only affects pkgbase users. + 20250918: mandoc (including /usr/bin/man) has been moved to a new package, FreeBSD-mandoc. If you have the minimal set installed, this package diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile index f7ea21b1a085..d773f202dd67 100644 --- a/lib/libbz2/Makefile +++ b/lib/libbz2/Makefile @@ -1,4 +1,6 @@ -PACKAGE= lib${LIB} +PACKAGE= bzip2 +LIB_PACKAGE= + BZ2DIR= ${SRCTOP}/contrib/bzip2 .PATH: ${BZ2DIR} diff --git a/release/packages/ucl/bzip2-all.ucl b/release/packages/ucl/bzip2-all.ucl new file mode 100644 index 000000000000..5bf1ef0c70fa --- /dev/null +++ b/release/packages/ucl/bzip2-all.ucl @@ -0,0 +1,12 @@ +comment = "A block-sorting data compressor" + +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 67c3c3a27446 - main - libpmc: Move libpmc and utils to a new pmc package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67c3c3a274468d09925af3cf64da3f9cf878cc80 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=67c3c3a274468d09925af3cf64da3f9cf878cc80 commit 67c3c3a274468d09925af3cf64da3f9cf878cc80 Author: Lexi Winter AuthorDate: 2025-09-23 21:30:49 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:33 +0000 libpmc: Move libpmc and utils to a new pmc package Due to the size of libpmc.so.5, this reduces the size of the -utilities package by 10%. MFC after: 1 day Reviewed by: manu, adrian, emaste Differential Revision: https://reviews.freebsd.org/D52662 --- UPDATING | 6 +++++- lib/libpmc/Makefile | 4 ++-- release/packages/ucl/pmc-all.ucl | 12 ++++++++++++ usr.sbin/pmc/Makefile | 1 + usr.sbin/pmcannotate/Makefile | 4 +--- usr.sbin/pmccontrol/Makefile | 4 +--- usr.sbin/pmcstat/Makefile | 4 +--- usr.sbin/pmcstudy/Makefile | 1 + 8 files changed, 24 insertions(+), 12 deletions(-) diff --git a/UPDATING b/UPDATING index 23c2da62db63..f6412666564a 100644 --- a/UPDATING +++ b/UPDATING @@ -28,11 +28,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20250923: + Several changes which affect pkgbase users (only): + powerd has been moved to a new FreeBSD-powerd package. If you have FreeBSD-set-minimal installed, the new package will be installed automatically, otherwise you may want to install it by hand. - This only affects pkgbase users. + libpmc and related utilities (/usr/sbin/pmc*) have moved to the new + FreeBSD-pmc package. If you use these, you may want to install the + package. 20250918: mandoc (including /usr/bin/man) has been moved to a new package, diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 8728b0c1c76d..590f719ebff4 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -1,5 +1,5 @@ -LIB_CXX= pmc - +PACKAGE=pmc +LIB_CXX=pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h diff --git a/release/packages/ucl/pmc-all.ucl b/release/packages/ucl/pmc-all.ucl new file mode 100644 index 000000000000..5c8e44d264b2 --- /dev/null +++ b/release/packages/ucl/pmc-all.ucl @@ -0,0 +1,12 @@ +comment = "Support for hardware performance counters" + +desc = < +PACKAGE= pmc PROG_CXX= pmc MAN= CWARNFLAGS.gcc+= -Wno-redundant-decls diff --git a/usr.sbin/pmcannotate/Makefile b/usr.sbin/pmcannotate/Makefile index 8f408590a743..9c0eecbcafe3 100644 --- a/usr.sbin/pmcannotate/Makefile +++ b/usr.sbin/pmcannotate/Makefile @@ -1,6 +1,4 @@ -# -# - +PACKAGE=pmc PROG= pmcannotate MAN= pmcannotate.8 diff --git a/usr.sbin/pmccontrol/Makefile b/usr.sbin/pmccontrol/Makefile index de6224979a60..976ff05fb457 100644 --- a/usr.sbin/pmccontrol/Makefile +++ b/usr.sbin/pmccontrol/Makefile @@ -1,6 +1,4 @@ -# -# - +PACKAGE= pmc PROG_CXX= pmccontrol MAN= pmccontrol.8 diff --git a/usr.sbin/pmcstat/Makefile b/usr.sbin/pmcstat/Makefile index 7e0c671e38ac..d09b05a445ec 100644 --- a/usr.sbin/pmcstat/Makefile +++ b/usr.sbin/pmcstat/Makefile @@ -1,6 +1,4 @@ -# -# - +PACKAGE= pmc PROG_CXX= pmcstat MAN= pmcstat.8 diff --git a/usr.sbin/pmcstudy/Makefile b/usr.sbin/pmcstudy/Makefile index ca0efde8d61a..4e2355be3683 100644 --- a/usr.sbin/pmcstudy/Makefile +++ b/usr.sbin/pmcstudy/Makefile @@ -1,3 +1,4 @@ +PACKAGE=pmc PROG= pmcstudy MAN= pmcstudy.8 SRCS= pmcstudy.c eval_expr.c From nobody Tue Sep 23 22:07:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWYx33w6Vz681pN; Tue, 23 Sep 2025 22:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWYx268xxz3nlb; Tue, 23 Sep 2025 22:07:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DA0erIZiROWt87dz/WYh40lRUvu2hxaK6Oz8ufRQDI0=; b=vlnPE4XGwRshD6DIJHQA2toxR/t3+07fjwbFSVY62zi0DtuT7B5jiplJRDGopk/yuaG338 ajZk9KU6o8Rw1zCbHn0VHQrFQpGgyc1yTKAYNYccGVem72vcwhBMzpQBrdZICEpmBt05vE kt7zrpzT90QEqJqwdoq+7/WokeNPO0YoksSN6fArmcCBEvgx+3Nb7YRT9c3Ip10UmLVGb+ ElrW7uIRBJrnyvAWCnivt0qSD/yx7bwJ9hu8R4opBvAE+hmI+iDBHESBhbdvWHae8etWQ2 aAyn17pvc6ffliJavbXwbtBjHy8XlG8L6obPCXDn0LARgHJGbYt6dJ9T8YkcUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DA0erIZiROWt87dz/WYh40lRUvu2hxaK6Oz8ufRQDI0=; b=Ihv4L5eXcP8S2ad+XpHH5ZesmJMiuSOTs5NUVpx3Msdab1tdLo6U7wFUaloNAe7G4X2l7F /n95KNX8zce3tEAVIjNAYWgP2+8GJJ9cFGqL6+hIKzEr6V759zSsPfuXjkXVKmV894uGWM OVE1qTJTQZ2P4eJcwJFA/Cgg2BudnhFHlisJRimZ641hQXEtY8VwQLErULeA5h+VZOjSjI EHEcSz5EYZYqv3SUwsvHwdGXChcGijxN+okJ07eOo6KTCl04Pxa1K0JZHzqCy6CPcatngb TH1qxM8e0wgVad65CYwnAoQ+cjmDweyfwfMx/lbPKuU76J0ewbJW+C3uOY70mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758665223; a=rsa-sha256; cv=none; b=JbF+h/7EjJp/IVV/+ESMCIsvbMV0k0mN3MB/Jd9BBMfTxmv4X15vp+me8BrdKyrekn1DNh PfS30kGxHvLfJ6Heei/dlU8q/kyU19m6TR4OaJ68cVTXxopv2e4N9pqnst7871c3CGAnhz 7T43F3qbbgLEiEppU+HgSwJfqzTNEiLU3341m5zUATlPIFvGuIBLQNdeA05lqJBIVqToI5 Ukg6cIhgLWFj6GgkOQPOlGVEfDvsSsFyqlQjADJVRM4DgZjjI3Z+wHd5/ei3pVNPpYWGFR N9PU+pe7IySaIBp4TcTwsawvX8ZuDfj5A5dVf2MVRUQmZDrf6nSzoWvc4VuCRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWYx25cRpz142F; Tue, 23 Sep 2025 22:07:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NM72vL043443; Tue, 23 Sep 2025 22:07:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NM72J8043440; Tue, 23 Sep 2025 22:07:02 GMT (envelope-from git) Date: Tue, 23 Sep 2025 22:07:02 GMT Message-Id: <202509232207.58NM72J8043440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: f6d1cdabdd6f - main - Makefile.inc1: Handle pkg development versions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f6d1cdabdd6fe5b26bda58348647d891ad138471 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d1cdabdd6fe5b26bda58348647d891ad138471 commit f6d1cdabdd6fe5b26bda58348647d891ad138471 Author: Lexi Winter AuthorDate: 2025-09-23 21:41:20 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:33 +0000 Makefile.inc1: Handle pkg development versions Development versions of pkg have a version like "2.3.0-d8bbde1c3-dirty", which is not handled by PKG_BIN_VERSION, so PKG_EXT ends up being "tar" and this breaks update-packages. Fix the PKG_BIN_VERSION logic, and while here, remove backwards compat for pkg versions prior to 2.0, which no one should be using to build main or stable/15. This means nothing is left to use PKG_BIN_VERSION, but continue to set it, since we might need it again in the future. MFC after: 1 day Reviewed by: manu, kevans Differential Revision: https://reviews.freebsd.org/D52666 --- Makefile.inc1 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 6744a25965c6..94c33ca791fd 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2004,12 +2004,8 @@ _pkgbootstrap: .PHONY .endif PKG_BIN_VERSION!=${PKG_CMD} --version /dev/null |\ - awk -F. '/^[0-9.]+$$/ {print $$1 * 10000 + $$2 * 100 + $$3}' -.if ${PKG_BIN_VERSION} < 11700 -PKG_EXT= ${PKG_FORMAT} -.else + awk -F. '/^[0-9.]+(-.*)?$$/ {print $$1 * 10000 + $$2 * 100 + $$3}' PKG_EXT= pkg -.endif .if !defined(PKG_VERSION_FROM) && make(real-update-packages) && \ exists(${PKG_ABI_FILE}) && exists(${REPODIR}/${PKG_ABI}/latest) @@ -2371,9 +2367,6 @@ sign-packages: .PHONY real-sign-packages: _pkgbootstrap .PHONY printf "version = 2;\n" > ${WSTAGEDIR}/meta -.if ${PKG_BIN_VERSION} < 11700 - printf "packing_format = \"${PKG_FORMAT}\";\n" >> ${WSTAGEDIR}/meta -.endif @${PKG_CMD} -o ABI=${PKG_ABI} -o OSVERSION="${SRCRELDATE}" \ -o WORKERS_COUNT=${PKG_WORKERS_COUNT} repo \ -m ${WSTAGEDIR}/meta \ From nobody Tue Sep 23 22:07:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWYx461TXz681sn; Tue, 23 Sep 2025 22:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWYx36k2xz3ntT; Tue, 23 Sep 2025 22:07:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rdI98b9mqLkL6e/zXDCU7esDKVhemxifriO/OL03VMg=; b=DOkW97roDJiV74nSPyazo9gTWR7NpxubxtikZD53hz3BiDC3KtRpUxj0olfwQJXKPKt4as o9CLkiViGukEJvYKb/rMKUTdrI5zsNS7cUTllgRoDmJsJhzV+9cAP81r0plML1REYUVTPM TjNaHe+1YqkZTSEaFU9Ui2lNFFrjN9Uli9nequHsgwJoAQrKFkl9XrNmgS1S88daWjCQHO eyEJiywPlfZ2lB/xLRIN1SWjZwJFpfSTxy4sb5tlNimSh0fiOTeQMJr35ZWHWR3AWEhfbE 60fh+9oSxtWn/mC/rdlqoSvfwX/ZuhEG+HVomfuzewAMXdCMtoFmo3mO+U40GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rdI98b9mqLkL6e/zXDCU7esDKVhemxifriO/OL03VMg=; b=yGqJdXkyngTCbZ0XL6hw9XjDzJoNymGzOUOVHOsTHdE3NDyhluCxrkCwzhNDPMuuAXTals wk/bXIu9UT+JvHYrRMO2CCV+TsISKK3bCSwwMMFsrG9KHUC740sLWWKsoLMH8ZkYwH+kH0 Ilu0uyYyBRWWzN6iD2CHfPqoPQN36QeZKaDzmkfYSc+Dwrap9InRg2KkxOt27kUcEK/ZK/ 9k52AvjG3c5BSnu4zJpTmwGv+JwhI8h7ot5a5xHzNPxvjR8fgu/oZHfE6YQsgWtSqb7+IK 0PYnlF5wpdsSNWGa+jz4vAPhKyBrihKU/vppQEObDifei+9o3+arFxma4pOyzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758665223; a=rsa-sha256; cv=none; b=VfCZTnAAvM8RFFxVvZ8PgWKROS8krGUrgi6lG8PoMmSEggZmo7OLOxSxstx2mGmvrz0RlM HfBKop8TmM1kCoxBbKlcpnfzYzHwgyFpJWFBu62qE/2WCQZVJ2Ky8wiTDiRUHODAiDs/v5 xEEz/rGfi3hKmdxqhkGoD46BFbeBUYW5bOC/utIQ8KBWiqTT+jOy9kl3ipcQA2UvdZLbLa 70xkAgnu/dhb8rFi76a6WWKZjca23zsrqbqOlQFlG6BmbbDivsXYbO7oow+CypdUoOekWb DQhz6zaWoEybZHUgDuJM1EttCd7i6D1+QzaVl0YfoFuvRGkzpE3I4FRzAK4NtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWYx36GDFz14Fs; Tue, 23 Sep 2025 22:07:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NM73KP043480; Tue, 23 Sep 2025 22:07:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NM73To043477; Tue, 23 Sep 2025 22:07:03 GMT (envelope-from git) Date: Tue, 23 Sep 2025 22:07:03 GMT Message-Id: <202509232207.58NM73To043477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: ab50101456cd - main - packages: Add devd to the minimal-jail set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab50101456cded4c9d86065dd59d91c601445d91 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=ab50101456cded4c9d86065dd59d91c601445d91 commit ab50101456cded4c9d86065dd59d91c601445d91 Author: Lexi Winter AuthorDate: 2025-09-23 21:56:21 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:33 +0000 packages: Add devd to the minimal-jail set I didn't add this originally since many jails don't require devd, but it's very small (~90kB) and has no dependencies other than clibs and runtime, so we may as well include it for parity between minimal and minimal-jail. While here, improve the package description. Requested by: imp MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D52679 --- release/packages/ucl/devd-all.ucl | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/release/packages/ucl/devd-all.ucl b/release/packages/ucl/devd-all.ucl index a78718955f24..573343aa758e 100644 --- a/release/packages/ucl/devd-all.ucl +++ b/release/packages/ucl/devd-all.ucl @@ -1,9 +1,40 @@ -comment = "Devd Utility and scripts" +/* + * Copyright (c) 2002 M. Warner Losh + * + * 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. + */ + +comment = "Kernel event handling daemon" desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 49e44e06d1ad - main - man7: Move atf.7 and tests.7 to the right package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49e44e06d1ade850cff5e84bf8c5fc425e4411c8 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=49e44e06d1ade850cff5e84bf8c5fc425e4411c8 commit 49e44e06d1ade850cff5e84bf8c5fc425e4411c8 Author: Lexi Winter AuthorDate: 2025-09-23 21:57:10 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:33 +0000 man7: Move atf.7 and tests.7 to the right package atf.7 should be in -atf, and tests.7 should be in -tests. MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D52661 --- share/man/man7/Makefile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index 1e50242a1754..ef8a5a555a07 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -1,5 +1,7 @@ .include +MANGROUPS= MAN + #MISSING: eqnchar.7 ms.7 term.7 MAN= arch.7 \ ascii.7 \ @@ -31,7 +33,6 @@ MAN= arch.7 \ stats.7 \ stdint.7 \ sticky.7 \ - tests.7 \ tracing.7 \ tuning.7 @@ -54,14 +55,21 @@ MLINKS+= networking.7 wifi.7 .endif .if ${MK_TESTS} != "no" -ATF= ${SRCTOP}/contrib/atf -.PATH: ${ATF}/doc -MAN+= atf.7 +MANGROUPS+= ATF TESTS + +TESTS= tests.7 +TESTSPACKAGE= tests + +ATF= atf.7 +ATFPACKAGE= atf + +ATFPATH= ${SRCTOP}/contrib/atf +.PATH: ${ATFPATH}/doc CLEANFILES+= atf.7 atf.7: atf.7.in sed -e 's,__DOCDIR__,/usr/share/doc/atf,g' \ - <"${ATF}/doc/atf.7.in" >atf.7 + <"${ATFPATH}/doc/atf.7.in" >atf.7 .endif .include From nobody Tue Sep 23 22:07:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWYx6334mz681qt; Tue, 23 Sep 2025 22:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWYx60czqz3p6m; Tue, 23 Sep 2025 22:07:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sL0syDaH0h7kCAnW8zFYLb931gkEEeC2M/rxy0ciWyc=; b=yI1U0Qu99aN+GiQfAiQqxdJy3aknafXeMfXPtKRBhtNMaZjvr4vyivVXtRnqdqy6d5mnUO 1th6yfDfBMdWQFJxH2uspIgsryQDBY1tM9LuzjjqHUCVgWe7vhVRLACsuMw8SB9A4muzKW K9NYHHeD659/HHMiEeFHlsHeOwPgLxTQqqYHYb9V7T0T8F6C2zqPU9Wwp52PRNkSctLmmC 0WC+6lLexE75YjiRUbxG9qAL6UDK+A73A9RWioGNyqcqxmOE5LS9Wmgo0uIjxIf65B5am2 hQ30slqeyAEHAwyJceY6zoxy5UXw5wJzpsG+UshdZS7lqyTnvJHKbnAQWTeYzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758665226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sL0syDaH0h7kCAnW8zFYLb931gkEEeC2M/rxy0ciWyc=; b=KTPkHj8T5qz36quUAS6eKXkpokb16JFghCDQJe7+nHXAlwLjVVNjg6mF6tPTZz8aSeqJMp H4QYHZ+o52Q5hzC/BVbfVpyonp35NyzBOCjDsGN7bGDKbmqjCWDwOT9xlNLLZqZQYWcDZo 9JyrUbfDjvYDA8fESv6K07f3q4svpzflJjljsq8eUd3u/LohJ943kCtK+xDAnmotpFe0sU XvXg/G1xvyK/mO/g3wKmlHsJc+aFdiDqvd7wpCsPcI7vtVIQSWYyW6Z5qfX+URMzi/LIQH 77SJUWa2ALh64omCj7RJO/ZDjKfYSHL6CFiEMdVDnFeoO/QIPATkAhhj+vL5dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758665226; a=rsa-sha256; cv=none; b=jnV7zkR8jDEmMbF9DVLr8Cp2TMN7xHE8cEaPd7iqTdkVNIrL3RspQ54KFLekupYV1aChHl OlQV8M1dCSjBqGIe5ZNOszFW7uoik4RfAr1GEcEfXY2vcIOBxCi4ClYfswO70bwGQyq35e oGr1b5YB/G9BRdn5xsYOQzsBq0LCHSTc3lJhWyX56cVa2dOCU8Y6rHGe+u+uEf8f4SSrSV W062c0LDb44fyimHxnXus2YVsVBV/7BwI6+Aoy1y1GWKFR8pPUyQRQEW2+PT6kTo5QQ8/1 mNd9I6BayjINe9MSk2UA28tHhSqfGDupybIh6/vbBocyalXJ1OmXR2UcATAhPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWYx60BvKz13mY; Tue, 23 Sep 2025 22:07:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58NM75jJ043550; Tue, 23 Sep 2025 22:07:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58NM75vV043547; Tue, 23 Sep 2025 22:07:05 GMT (envelope-from git) Date: Tue, 23 Sep 2025 22:07:05 GMT Message-Id: <202509232207.58NM75vV043547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 9f8114a6d8cb - main - packages: Add a dependency from -rc to -runtime List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f8114a6d8cb781f155273ef173c29648a1013e6 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9f8114a6d8cb781f155273ef173c29648a1013e6 commit 9f8114a6d8cb781f155273ef173c29648a1013e6 Author: Lexi Winter AuthorDate: 2025-09-23 21:57:46 +0000 Commit: Lexi Winter CommitDate: 2025-09-23 22:06:33 +0000 packages: Add a dependency from -rc to -runtime rc(8), as well as rc scripts themselves, require /bin/sh and basic shell utilities to work. Currently -rc has an implicit dependency on -runtime because of libutil, but this might change in the future if libutil were moved to a different package. Add an explicit dep to ensure -runtime is installed. MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D52654 --- release/packages/ucl/rc.ucl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/release/packages/ucl/rc.ucl b/release/packages/ucl/rc.ucl new file mode 100644 index 000000000000..1a734aaa187c --- /dev/null +++ b/release/packages/ucl/rc.ucl @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +deps { + "runtime": { + version = "${VERSION}" + origin = "base" + } +} + From nobody Wed Sep 24 00:34:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWdCT5dBFz68BKT; Wed, 24 Sep 2025 00: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWdCT56pkz45pL; Wed, 24 Sep 2025 00:34:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758674085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shbSFCQwQ+kKhzzb0Vc0jdtXxFs5iv576YZIjA5CtFg=; b=V4pVcqH/b+PQqTDkkPN5fha0BWnv+6OywvAlTXp2kX2EFu90lHcuD3hfO2UyfThw7TnZOX lCtLZMEl4iuvnF3iOsuTwuLN0bVze3iRqHc+a1GOJ+1GAqMPvW7U3UdkJWnARDei/g8bJ2 BwB/Fm0cc09sQ37ZAikNtu2F73dn4dQeCdbFV3IpxTPhEnPyNKdf3sFxEGpsX465N55mzl d/evwwAM1sAhWh1Lh8wT/PxMqYY1HmmkbV2r7YYVeV3BqCP0t5puTBosDKfOMA9SBIFBsv PJo7slIR9BrjG79LRrExolN5BeHB//CfxWa7Oxa9vXR0Ouh5FcktU/XkV+6NsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758674085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shbSFCQwQ+kKhzzb0Vc0jdtXxFs5iv576YZIjA5CtFg=; b=WOUGObtKGISl6+kSjSAsqYgA49LyafrqxbCVE03gvOHIaio4X00ztupXzOnvDvf5kkDcsG 2NAhF+PvHRkBvW17u+LKI82YNbzOhU7aSYcQWUaI9L7blxqii4QsDdERtDDKc129i/KFrW yM/soMbZg+XfJAF/9eCRN4a2lykTw4HbtzC1M8IzGriDPQQRER9C8RXNahSD20qd/BxxqP 4vulbgDp7GurxXYj8whL1xkIgqXlltBqUN/0eFNWTzeKBBxTMKFp1srjJNGuyUi40k43qh pVOYh+pjNqKUyyrfLSc72kcq+dwFU617XwLywXYuk4myvUsmXEjA51P0Wl3Oig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758674085; a=rsa-sha256; cv=none; b=ZNzrrutPmeIfMaglKu1zs2cL8Lp4N5S9pzD+LzVCjV5BU9Yfl5UG8rWDmLXbPOGBN99zM0 wpZKVxMxtLe5jj3CkfikL7JDqANpc8Dz1qmV43QHqYg81F0AgizC5OLDxKkvVQ7eFgE+Hl QG50ScTv0YYplBSOJHhiak519GKSpGrhAlCFnGFzd0X0g4poz02pBmTHmIMP1zM0AOVOq/ 6Y2UNtweJwppM8ANQzBelydyot/sYPKNzlHfy8kjA/Du0HbYO3YbgIS6I3JT/3AxKEAuP6 uJayyKmq9E4At4zk2/NPn+YGyLOxZmHSIXrw7u7zpbtI3HdTYUe+Khy86/0gSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWdCT4P2sz17Kp; Wed, 24 Sep 2025 00:34:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O0Yjut022666; Wed, 24 Sep 2025 00:34:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O0YjaL022663; Wed, 24 Sep 2025 00:34:45 GMT (envelope-from git) Date: Wed, 24 Sep 2025 00:34:45 GMT Message-Id: <202509240034.58O0YjaL022663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 723445fdeee7 - main - release.sh: Pass through NO_ROOT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 723445fdeee741750a9a3fbd116b540bf605d93a Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=723445fdeee741750a9a3fbd116b540bf605d93a commit 723445fdeee741750a9a3fbd116b540bf605d93a Author: Colin Percival AuthorDate: 2025-09-24 00:32:27 +0000 Commit: Colin Percival CommitDate: 2025-09-24 00:32:27 +0000 release.sh: Pass through NO_ROOT To be specific, set NO_ROOT=1 WITHOUT_QEMU=1 (those options go together and it is an error to specify one without the other) if NO_ROOT is defined in release.conf. MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva --- release/release.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/release.sh b/release/release.sh index 0815c7c78d14..f0226e4cd3c5 100755 --- a/release/release.sh +++ b/release/release.sh @@ -200,6 +200,9 @@ env_check() { WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ WITH_CLOUDWARE=${WITH_CLOUDWARE} WITH_OCIIMAGES=${WITH_OCIIMAGES} \ XZ_THREADS=${XZ_THREADS} NOPKGBASE=${NOPKGBASE}" + if [ -n "${NO_ROOT}" ]; then + RELEASE_RMAKEFLAGS="${RELEASE_RMAKEFLAGS} NO_ROOT=1 WITHOUT_QEMU=1" + fi return 0 } # env_check() From nobody Wed Sep 24 01:17:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWf8V53hpz68F61; Wed, 24 Sep 2025 01:17: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWf8V4QKgz49jC; Wed, 24 Sep 2025 01:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758676634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=93V5AJN9ybYNR2SIr8SK5Jsrorc39OdFW6gwe0vaI1E=; b=YA9ggLvLCoNNEpFuN9aY5cWZ7sR1UOyYWRFnBAlLW9So64lXNoGtoCTyCgWeCBaqKKnDPg LetktQk5m60Yjo0PINhoTjSjC2DDOw29hfPTCDsMtolnT6Lfl48ne6FA+vwUfE70fNbQaf fLvCKG24bxyCv6a7Ddjsb82CaqN9SNG9SMnLZ3igAoJ5Js/+OwnvCe9shDo56Zz+MVd0Dz 8OHrf+J9mRDlAQA+WZb3j3sJi819NQOfQvo4hfpFzCxmXAmo9auS/PSFj65uxMdwvIqppY U/et4qTLDYTzjQKTIUdr0oz1awwSmW6vcYmcKYmL126NFn1MaFybqAoJ/eo2WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758676634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=93V5AJN9ybYNR2SIr8SK5Jsrorc39OdFW6gwe0vaI1E=; b=Z2hGfD7jk1ltk2boCZb1L+08n4LoBupVSvCZNmAoxp+sSCbjCWjHR0fraVO4lGFEqYkLSc FRwEPzCTpLU0T8x5Zcdt8XxnIWE9zj6DCSao87kwnELR9p93KY6pAh2S+HImrR5QzMgr5i S7WqM7bvgs0CAHY5srR23LQhwQx88tpCjdddjKTCwJNMwYY83qUmz3f14+sqlRAE82icfW kl4iN3pVUMg+ntwFOHPOVGFaGWwYi1OtOKHRNHww0TfnCzsKPr55vpL4ohWAIpxYezNaqm MQ3/lyiULA5co8+4CIV2oFVWZZEddFXsfAOgiD2lL1LOATuJKmIkMxlOHdAhaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758676634; a=rsa-sha256; cv=none; b=xaX0N+TItspShjaMUsLBPqFLYkQO7GHPKPdFccNkmESEryn38bWv23B7Nt7T526Z/Gk3qQ Bz2/dQQX++JKw637OaECOfHYL4l4LICWSNKdXHCvnhHBGWWyZUZvXYwbv/TJDTp25YhLEp Egg5QbCL/NqtSn0APeyb4/XkJtXhXSj5Waw1JTuR3RIPY/cnWQDG1tHzhczI80u4tjmTRC +ZqZG+tZb9Nw9Evh5kzzP6JM65OrNIpvt9lg/Dl3fr6w2+I8ED9GRT4+HQmQ6ybfXqYCmi jnL4zRDDATQ5db7M/k3hp0jlznVdelMR5XcLYh+GYtolZ8Unj0LPEobPYukBxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWf8V3jzVz18N3; Wed, 24 Sep 2025 01:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O1HEG1098995; Wed, 24 Sep 2025 01:17:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O1HEkD098991; Wed, 24 Sep 2025 01:17:14 GMT (envelope-from git) Date: Wed, 24 Sep 2025 01:17:14 GMT Message-Id: <202509240117.58O1HEkD098991@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: 33ceb31e256e - main - tcp: Fix expiring and purging hostcache entries of vnet jails List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 33ceb31e256e386da5a42cc7ca2ef8d4b81b6eda Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=33ceb31e256e386da5a42cc7ca2ef8d4b81b6eda commit 33ceb31e256e386da5a42cc7ca2ef8d4b81b6eda Author: Zhenlei Huang AuthorDate: 2025-09-24 01:16:13 +0000 Commit: Zhenlei Huang CommitDate: 2025-09-24 01:16:13 +0000 tcp: Fix expiring and purging hostcache entries of vnet jails A jailed process, `sysctl -j foo` or `jexec foo sysctl`, do not have privilege to write to non-vnet sysctls but only to those marked as jail writable, aka sysctls those marked with CTLFLAG_VNET flag. Without this change we will get EPERM when trying to expire and purge hostcache entries of vnet jails via the net.inet.tcp.hostcache.purgenow sysctl. Fix that by adding a CTLFLAG_VNET flag. Reviewed by: tuexen, #transport, #network Fixes: 264563806496 Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire ... MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52692 --- sys/netinet/tcp_hostcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index dbc966acc56b..36a4f813d590 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -202,7 +202,7 @@ SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, histo, "Print a histogram of hostcache hashbucket utilization"); SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, purgenow, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, sysctl_tcp_hc_purgenow, "I", "Immediately purge all entries"); From nobody Wed Sep 24 01:17:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWf8W5KhDz68Djg; Wed, 24 Sep 2025 01:17: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWf8W4RTNz49gJ; Wed, 24 Sep 2025 01:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758676635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uAIV634YrQmWOrEVKausaOqxkV7rEMkJZ95NQWf/zCk=; b=IqTaV+x24y2b875e+Vna6pLFShWvvTJZ6j4gPPAtSDenrHpMmXha1QwQOs5vobHFStas20 T4jMDZieccqrSjAMjjP92J2dIAKuJqU/DGYLFErvaPDmwO95TOrak04SjzQlKhNp6pxEvy CHvWW4/Jb5BsT49siglB6tJ+xRULfyLkzFjKNrSX1gDL8KNWIbwZM0DNQOoAUGoC6MEKND mJeYUoSrm5xws9hRPdM8vhdVeZPdSBtCKJXFLRAFrtABet8Xz/M9JncxO+gNTjAnrRVQJV U5XCDwiJdxuhUjxJfbixFSGSNwmlTRHzoNHpkVWjhuYKbRrlOsn4ypx8L95Sdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758676635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uAIV634YrQmWOrEVKausaOqxkV7rEMkJZ95NQWf/zCk=; b=ZHVmCb5oj7zw0qMecfP5DZYHtm2onK9q4xPCE75KlCRgtIHLm3yAF6soP5BSIOLFWCfL6V fm6+Hg8ZV2RIVqBNnlZ2vuSh34oRdvhvTAxsvk6JFAn8Uu35qDHliNQGmGnp/0Kq0M66KU WtEIgzcisdel/dFqUm4Rk3JhamIiybvl18aZ0GmqU/nMyCPCh5oW2rg9/j/UUPq34NkJsR fSfKJ8PEu3Lgd8LjMzH44FhVxtgcE36cw7DD26SCkYnJhA4Wx3waaIa8ocPwEnm+zVu5QZ 9lGqjD44mXmUOqiOkk1YaA5nk6Ypc/K7PTFYU2oTlO3yoVrRsEXVYwWvMRDD9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758676635; a=rsa-sha256; cv=none; b=TlA8I/pJHksAcuSW30naycQaBSy6ep64gtOcO05BWHOaE0e/4/OtRwW8hgvCZPnJq3SRI7 N7d+W9ea+TiL2AjiF9qpWAO7NLNWbHuHO8q/K7nU38fzF6MNbomIibRXrGjvbuTM2gW6Wy M3KsOgRZTQ4K7jWBQjS8vCdHJ+7TWcnNV0a5AIhE6QmsEhQjxm6i8ReQUs/dF40F5IbAnP NPCI2tMOleSkKUTnotSb1W/ViKXBKXW4Lxx2qDAe/dXbQLNiM4MZXm7+VCpSlQjQa1dkqP 2I0akjYdl1HVJ0QDYhdrL/I6fDfOgj8J2E+5cPp/vakP5mq0r3vP17riv3unCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWf8W42X7z18N4; Wed, 24 Sep 2025 01:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O1HFSB099027; Wed, 24 Sep 2025 01:17:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O1HFcc099024; Wed, 24 Sep 2025 01:17:15 GMT (envelope-from git) Date: Wed, 24 Sep 2025 01:17:15 GMT Message-Id: <202509240117.58O1HFcc099024@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: b1f96169cfb5 - main - tcp: Add CTLFLAG_VNET flag to some sysctls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b1f96169cfb50a7b65aee115b2c9ad2f00797bbf Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b1f96169cfb50a7b65aee115b2c9ad2f00797bbf commit b1f96169cfb50a7b65aee115b2c9ad2f00797bbf Author: Zhenlei Huang AuthorDate: 2025-09-24 01:16:13 +0000 Commit: Zhenlei Huang CommitDate: 2025-09-24 01:16:13 +0000 tcp: Add CTLFLAG_VNET flag to some sysctls The two sysctls net.inet.tcp.hostcache.list and net.inet.tcp.hostcache.histo are readonly and are to operate hostcache of vnet jails. Add CTLFLAG_VNET flag to them since they are per-vnet sysctls. This change does not have any impact on reading the two sysctls, but `sysctl -ANV net.inet.tcp.hostcache` will report them correctly. Reviewed by: tuexen, #transport, #network MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52693 --- sys/netinet/tcp_hostcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 36a4f813d590..df639876a85c 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -192,12 +192,12 @@ SYSCTL_INT(_net_inet_tcp_hostcache, OID_AUTO, purge, CTLFLAG_VNET | CTLFLAG_RW, "Expire all entries on next purge run"); SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, list, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, 0, 0, sysctl_tcp_hc_list, "A", "List of all hostcache entries"); SYSCTL_PROC(_net_inet_tcp_hostcache, OID_AUTO, histo, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, 0, 0, sysctl_tcp_hc_histo, "A", "Print a histogram of hostcache hashbucket utilization"); From nobody Wed Sep 24 07:52:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWpwH51XHz68grY; Wed, 24 Sep 2025 07:52: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWpwH4SqNz3kmx; Wed, 24 Sep 2025 07:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758700335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZSOJIB5l0DAPsMWniLHee2BXGfRPm7vIvcSOQ05kqGw=; b=xz6bbhGlxpE3UoJQ+ObEVJd3rKZvOedcPJEOGrp9BmmKTfWgr1EuKHF8EW+dmZAJs0lw3o czHj1PNSWhPTwWJJb3whQ1WTIkZXfkpqC4kSRKwVSyOCOgkTfT2VVwoY9rReJNhHAgbSwv qxrr/0qttgiTYMcvEkMYFyVhqlCiVI4u1NFgfvPo1yykIYAFfV0YoF4uUtMsCky2+T2YjT dH+ABZbXB/IKLDQh5yoeYXMuGVmhJ7wAOqRZpnt5gbc1/Qcf6rzeCAVsAKAYof+on4yb2r 3y3Lp0zI7FvS4nBMbaHuG6HFprgTsLgza6efwig1qeYmPyEkP60kL5nCDoEq0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758700335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZSOJIB5l0DAPsMWniLHee2BXGfRPm7vIvcSOQ05kqGw=; b=Vk8xusbGXPgOITyfC5C7Vz5mWCrl4WyBsdPiZAqgs4yXAgPyFwRpZqZwf64o5cDAt+T7M/ UcwMT/3Mlx5+shHIgHHAkQKxdqGhEkdGKkyO5z+2ueTE3QS32yIUX8BxXrKy22vDTBMN7P WjWE3SMHsrYgmzOpTwuu+uxQ6NEPd6/z7JlPGXY68t7prpeDw7ernPGi6OY0Y1tIhXS2aB 9oCsovOqe1zdnCEWAIZWvai+tI4SnWnl+OsemwbCXUlEI6HALraoUj384ToZfOJ0AtryQj CBzGfB8BPhAQhwG/w9xeyCLJMxJSCK5sLkueCq0mRFOoX5hF0I6RUGZAkiiCoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758700335; a=rsa-sha256; cv=none; b=s94JrZix4vGrL0OZZ30GWZ/Rhuw1RtHRYfzt1zIyaXMO/sClyDDdUtetA0r3UjXgG9jbbW guEgR+B4KxWmuQDtqqbR0enJ5OQObL1nLUz2NNXANtqgQ2spJCBj6PG/STTfr9nAGg1vQU 24wa4BvF9PkHuvgQmBfv2V8QVjG2+sgsIkvknR+NYec4IoE7yh2h5G0pn/Fn1YfiCtFOlE Juf1FhksMVbAVWY/cIsZeQZ/h/za1okIqeyrA5VH308sL5hMfo0fOC+LeR6B66nE6GhhNT 8h9+2geJDI4HSH4fnDhSPoUJualVpIusJ88Fmzm2OTRwDYC+ugt+fhYSY0gVKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWpwH3ljNz77v; Wed, 24 Sep 2025 07:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O7qFH7046769; Wed, 24 Sep 2025 07:52:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O7qFD8046766; Wed, 24 Sep 2025 07:52:15 GMT (envelope-from git) Date: Wed, 24 Sep 2025 07:52:15 GMT Message-Id: <202509240752.58O7qFD8046766@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: ba05cddcc634 - main - d.7: Fix synopsis List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba05cddcc634ac235beb252bd505deb83dcd99f1 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=ba05cddcc634ac235beb252bd505deb83dcd99f1 commit ba05cddcc634ac235beb252bd505deb83dcd99f1 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-09-24 05:42:49 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-09-24 07:42:52 +0000 d.7: Fix synopsis A predicate cannot be used without an action. MFC after: 3 days Event: EuroBSDCon DevSummit 2025 --- share/man/man7/d.7 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/man/man7/d.7 b/share/man/man7/d.7 index f4686d98b1d1..c098958ffa56 100644 --- a/share/man/man7/d.7 +++ b/share/man/man7/d.7 @@ -3,7 +3,7 @@ .\" .\" Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org> .\" -.Dd June 14, 2025 +.Dd September 24, 2025 .Dt D 7 .Os .Sh NAME @@ -18,12 +18,14 @@ .Sm on .Sm off .Oo +.Oo .Cm / .Ar predicate .Cm / .Sm on .Oc -.Op Cm \&{ Ns Ar action Ns Cm \&} +.Cm \&{ Ns Ar action Ns Cm \&} +.Oc .Sh DESCRIPTION .Nm D is the From nobody Wed Sep 24 08:04:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWqBj0rcQz68hTj; Wed, 24 Sep 2025 08: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWqBj0LRCz3lpB; Wed, 24 Sep 2025 08: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=1758701085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vo7YsN5pFdFip3Q2/DaKhbIx9ROq5+AvQzK9HB7PZYg=; b=qlsef9ARJdr/rcmNh35ibW/JM1n07ykGNYgdXhl5mtRXqfGHyuFSlPmpbnOQh1xagptXzB eHTpR6UKfkapqz2XyG2IMsSv5SRaBgmiHZOcTvHYb9lUacmhQ3/Q3GbuHBQ0D5i8oerFd7 Tj1zazYoSduovvSBTLuVb40F9kyiY1Q8L3Cw1zH80zD30HSkmp4XF12WGXqHF0RBIoSAQN mxNtEjDVnlNhlQuv3n/jBcVJYm2/bZZqq6gw3qbidyatG2mck0/QpsUyVqOCS35NuOJ+1J 6RkgM07kyxqSzQswle2ZgOYbdsWZoLTzly3r9V1N+qdxR/NjPaF4QDyxjORn/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758701085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vo7YsN5pFdFip3Q2/DaKhbIx9ROq5+AvQzK9HB7PZYg=; b=mFvQ+rxxPQT2YsO9RrJd9DlZFBNJITR4Wkjmx+hiqTEiUiv8PIoXi5WP2s0A0zF23NN9eT D8jZYJ8Y/a6oF1Dhhu8h0CFlNPJghLtbcd7EWWh/xbGnbZ81PSreh692RIJyduLhoD11/O XoiBA1FuGrrDtRKHMwnHN34aogJzMVSjCF3Mz2mMQ++oR5DOwKwIiDJP+2N0/cx/zHqj6M 8Jg0B54loY61KPdVxaZgIL1g7hRVzRfdScQzvdpt4x4qkbHMcEWfS6NLgXoKkZgimRWMk9 YUriE3dxyHob13zM9UCZ0/p/No9Ct5ody5apHsaLs+swF8Cd4LO7df8J72mPww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758701085; a=rsa-sha256; cv=none; b=SZoby+Tgm13jGOeJLhlKVsTeCS2m4T8GEwlOP71/TFIkqDW0vwyrqZ9yDnvAGFzNxRJUAI 8XC8i/w7Aab1sn1KlTpqNX/TDI7uRFMffznNBwb/EUWbIvUQiNYTeJYdlur3EQ/hlvHZum 8dVf0bs+CHroP4q5lE1lRBTSgh7HbnOVIKHB76rh2wMJGRXLN7ApygTziQT5BMOwNhOjeI zLdfFz1k5UZVUN92EgP4EOYONSwPU5NQ8YAjIaOfTq1I4WfOMkgcDQ+9BehPWH6bqEiq37 jGsubrBFsQ3ThTkp7xtmrJAThIYWJ90RCyO8/+2GND3cp/u2DRPvQtTlgFA1vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWqBh6zQfz7ZM; Wed, 24 Sep 2025 08:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O84iW0068570; Wed, 24 Sep 2025 08:04:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O84i87068567; Wed, 24 Sep 2025 08:04:44 GMT (envelope-from git) Date: Wed, 24 Sep 2025 08:04:44 GMT Message-Id: <202509240804.58O84i87068567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: 22886d3af065 - main - vnet.9: Remove references to non-existant macros and update how to virtualize sysctls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22886d3af0657dae3b547b21e612642bb47e0321 Auto-Submitted: auto-generated The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=22886d3af0657dae3b547b21e612642bb47e0321 commit 22886d3af0657dae3b547b21e612642bb47e0321 Author: Brad Davis AuthorDate: 2025-09-19 14:38:20 +0000 Commit: Brad Davis CommitDate: 2025-09-24 08:04:08 +0000 vnet.9: Remove references to non-existant macros and update how to virtualize sysctls Approved by: bcr, ziaee MFC after: 1 week MFC to: stable/14, stable/15 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D52620 --- share/man/man9/VNET.9 | 52 ++++----------------------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/share/man/man9/VNET.9 b/share/man/man9/VNET.9 index 28e28bfd3242..679ccc3f9a06 100644 --- a/share/man/man9/VNET.9 +++ b/share/man/man9/VNET.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 10, 2020 +.Dd September 19, 2025 .Dt VNET 9 .Os .Sh NAME @@ -162,26 +162,6 @@ .Fa "int priority" .Fc .\" ------------------------------------------------------------ -.Ss "Sysctl Handling" -.Fo SYSCTL_VNET_INT -.Fa parent nbr name access ptr val descr -.Fc -.Fo SYSCTL_VNET_PROC -.Fa parent nbr name access ptr arg handler fmt descr -.Fc -.Fo SYSCTL_VNET_STRING -.Fa parent nbr name access arg len descr -.Fc -.Fo SYSCTL_VNET_STRUCT -.Fa parent nbr name access ptr type descr -.Fc -.Fo SYSCTL_VNET_UINT -.Fa parent nbr name access ptr val descr -.Fc -.Fo VNET_SYSCTL_ARG -.Fa req arg1 -.Fc -.\" ------------------------------------------------------------ .Sh DESCRIPTION .Nm is the name of a technique to virtualize the network stack. @@ -250,9 +230,6 @@ The .Fn VNET_NAME macro returns the offset within the memory region of the virtual network stack instance. -It is usually only used with -.Fn SYSCTL_VNET_* -macros. .\" ------------------------------------------------------------ .Ss "Virtual Instance Selection" .\" @@ -459,30 +436,9 @@ call will be ignored. .\" A .Xr sysctl 9 -can be virtualized by using one of the -.Fn SYSCTL_VNET_* -macros. -.Pp -They take the same arguments as the standard -.Xr sysctl 9 -functions, with the only difference, that the -.Fa ptr -argument has to be passed as -.Ql &VNET_NAME(foo) -instead of -.Ql &foo -so that the variable can be selected from the correct memory -region of the virtual network stack instance of the caller. -.Pp -For the very rare case a sysctl handler function would want to -handle -.Fa arg1 -itself the -.Fn VNET_SYSCTL_ARG req arg1 -is provided that will translate the -.Fa arg1 -argument to the correct memory address in the virtual network stack -context of the caller. +can be virtualized by adding the +.Dv CTLFLAG_VNET +control flag to the ctlflags bitmask of the macros. .\" ------------------------------------------------------------ .Sh SEE ALSO .Xr jail 2 , From nobody Wed Sep 24 08:23:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWqcG5TfMz68j8D; Wed, 24 Sep 2025 08:23: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWqcG4gy5z3n8s; Wed, 24 Sep 2025 08:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758702206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfO01RvoG61GC+kIKB0kwebRctUddUK4HTd7oqqJtPc=; b=tKROrZdzMWkJ5Vy/CoOvMDEipLFQEAzyGQiR41/S2BulD65ERhtz0fKaDByu4kXaoL/OZd adj+JBY3BZugilOfqnMzF8nGZtTaT2v0Is2ckbWS0EqUuuIqq3PPENwQn3ZHeMUP5Y0WYg Ulju6sWTGHDjZs2dROveDJiXsNPL49yU0Y1fDfEKnk7Q15m7gHcsT7ATpJwAWI8lBChk1u Yd73qj6t5tvl7lzRjtKR4Vr+oQToCkF2AfA0yx3xTyavix4ZqxQ7GUNSpXboDxfKOWRQYX 3rCuAmviZDVpy4pABtJdLJnPHoYmeLFUZYWpO9gmLsqRXRSjtzE7otLaPmpxLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758702206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vfO01RvoG61GC+kIKB0kwebRctUddUK4HTd7oqqJtPc=; b=llkfEEbB+4E9HVOFedqy1WuFQY9CvapG25xbckAvsxW1227OAh6CMGRJl5x0nPU//mCV+6 H1WM8KAe2tyJzCl88kyxXWrVfmRIrR9jJ6FrjaxP8TfbpJyF42Q9Jwhee1EVgcV1G/F+Ya 6ngAqfZap38NjTcUwJ+15ED4GmDxB5fBwA+N2VWK3xU7gUc3NcDkQdEklQ9T/VbNeGisQb 9QxYdgHOc78CuyVh344SWHazfdBcAlMUaWLdzgTz7mgbx11bsnOzp3xfwliZX045a2Q5WA 1VK8VD20KHNotGVPeKDQcIxWdGF1DoIl451JpEI6p8MwHMrBJIv7Nc+BGou7Yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758702206; a=rsa-sha256; cv=none; b=BMAefDu81R++FsHApgiOoVoyjwyWzkLN56uA4PPSCO3JH4igfV2p0QTxcrkthW2klzui8w hUc4uxFf/U018VY0j55lBA7dyfAvFxZ/WsAxx3v1XMoZaF2I0E/U/j58/9HkKlhsYhAUb5 avR+UWOfwrUe1rkJ8SFeAOqCYA3bDQTSBu7MGUMdPfdwf0ClZNxhUB9oW/OiNP+h6KI7de hvxS48eYe8exO5Axkz2uGyCGxnOxucnEuOeJNwWg8/33+tvimtkAvTkgLuHbWfnCuLx+Mf gaV6sJNXpZA5MdY5Ghw62LjkUpWmj849/BpizeixwjzyAMncd9CcAjmY6DssCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWqcG4BVNz7tn; Wed, 24 Sep 2025 08:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O8NQhX004882; Wed, 24 Sep 2025 08:23:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O8NQw2004879; Wed, 24 Sep 2025 08:23:26 GMT (envelope-from git) Date: Wed, 24 Sep 2025 08:23:26 GMT Message-Id: <202509240823.58O8NQw2004879@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: 185c2c3dab36 - main - vfs: reduce indentation in vput_final List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 185c2c3dab3627bac929143795cec2d78d0aceab Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=185c2c3dab3627bac929143795cec2d78d0aceab commit 185c2c3dab3627bac929143795cec2d78d0aceab Author: Mateusz Guzik AuthorDate: 2025-09-22 14:09:51 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-24 08:23:21 +0000 vfs: reduce indentation in vput_final nfc --- sys/kern/vfs_subr.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index fe299ecc9c56..9818c60ca387 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3644,26 +3644,26 @@ vput_final(struct vnode *vp, enum vput_op func) } break; } - if (error == 0) { - if (func == VUNREF) { - VNASSERT((vp->v_vflag & VV_UNREF) == 0, vp, - ("recursive vunref")); - vp->v_vflag |= VV_UNREF; - } - for (;;) { - error = vinactive(vp); - if (want_unlock) - VOP_UNLOCK(vp); - if (error != ERELOOKUP || !want_unlock) - break; - VOP_LOCK(vp, LK_EXCLUSIVE); - } - if (func == VUNREF) - vp->v_vflag &= ~VV_UNREF; - vdropl(vp); - } else { + if (error != 0) { vdefer_inactive(vp); + return; + } + if (func == VUNREF) { + VNASSERT((vp->v_vflag & VV_UNREF) == 0, vp, + ("recursive vunref")); + vp->v_vflag |= VV_UNREF; } + for (;;) { + error = vinactive(vp); + if (want_unlock) + VOP_UNLOCK(vp); + if (error != ERELOOKUP || !want_unlock) + break; + VOP_LOCK(vp, LK_EXCLUSIVE); + } + if (func == VUNREF) + vp->v_vflag &= ~VV_UNREF; + vdropl(vp); return; out: if (func == VPUT) From nobody Wed Sep 24 09:01:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWrSD3lsXz68lhs; Wed, 24 Sep 2025 09:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWrSD3Bgtz3ttP; Wed, 24 Sep 2025 09:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758704492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+TZwyYnHja/QX5t9Dm5vODU/NTnvxAhF8KlBrfhz0h4=; b=VGLL/fS6X+TS89YyEmElixEeIHqfSt3TiOopjsyjCLEoWmXw08maFCRZ3jBXhH5gIINbuR 7dy8wi9OI0HZlQ/zong1Xw+O2Em3sqxhy8sDPotK1PrKl3MmMaPTx4KgijIxEUr9B0MeOL 1GN/4gyZi9hOvRuEyO4Hq/K7AFhPexqeY+sJpH7pJ2nPz5c/mWEnZMqdk7JLGaI5QsoC1E JIzd64B3bmerRQ/QFyqFQchwqMSEAMS8Bc5rFNdAUP1PksZdjxvYiylOzLFuBCRQdPpOkY RDqj8ls2WA0A4UNJKmnB8aYk2ONnMeS8yPd+Rj+zMPZgSVbCECvnShz5/4xFLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758704492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+TZwyYnHja/QX5t9Dm5vODU/NTnvxAhF8KlBrfhz0h4=; b=SyFTKFEfMaGp6e8hbeRY7VjAHUAoKZ3GPablMnyARmM03Pacwkg6uFVmGKTN/j8GeLuV2N xWKdbktbv0UnbkQDCu1X3CFM2H4I1GFevDBvnJT3bR/PFRSlRzWC7jWaC1lMf8ORxQkLKP vMH/BaIxu5+5vYe22MOFPgsIlGkFTj+Ybg3dGyjfjSCKE8rl0b3p+SyFl72gRzUUYjWplq GCoWp23pp50my6YSud7ULXXb7b1XqGm71ivguwPLU9M+DW4d4jVWwKsho45+pFAJ1fBD0g ZDzNHVf6Aa0eZaminhGHhMw5SUpoDPPOpME97vVESmoxxCuJarmUUHN1yG/4jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758704492; a=rsa-sha256; cv=none; b=D3s4ibkA9HvkfSz9yRZVOMB1JmIYx2ZhZ5iQJdoBZ+4zpH7GmfFguFUDY+GHoKYrlJ8MHh MI/+TkQ2L5j2I+JJ3e9MtRzsTXESCYJyOXOsYoE5ON6HMPZ9Nw8tIPGc/RG/gyMdB7OFxI iKW/4+7lt/zx3rpbJbKt2tQihF1LDfJ9kgbi2Vb9xWB7RL3KbwjoeAEydgmowehqGiskGn BY/Pk1B6yCm4eb3krpmUayFOksEvT/jHXl+3j43Twlp8vjeIKiOVPrraXjQXjmVCMAlVbo jKl43jt8cZaaxJaSjiPCUiFltXdnrTcYWV5BdnfhvYPP06IGg/0MjC/mp5Y7SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWrSD2kWzz9Dt; Wed, 24 Sep 2025 09:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O91WLL079167; Wed, 24 Sep 2025 09:01:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O91WZ1079164; Wed, 24 Sep 2025 09:01:32 GMT (envelope-from git) Date: Wed, 24 Sep 2025 09:01:32 GMT Message-Id: <202509240901.58O91WZ1079164@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: 21d42c8d9022 - main - vfs: let the compiler catch unhandled vgetstate values in vget_abort List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21d42c8d902235b90b59d1aea6203b12e40c6c1b Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=21d42c8d902235b90b59d1aea6203b12e40c6c1b commit 21d42c8d902235b90b59d1aea6203b12e40c6c1b Author: Mateusz Guzik AuthorDate: 2025-09-24 08:52:28 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-24 08:52:28 +0000 vfs: let the compiler catch unhandled vgetstate values in vget_abort --- sys/kern/vfs_subr.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 9818c60ca387..73e110c05bc1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3352,13 +3352,22 @@ vget_abort(struct vnode *vp, enum vgetstate vs) switch (vs) { case VGET_USECOUNT: vrele(vp); - break; + goto out_ok; case VGET_HOLDCNT: vdrop(vp); + goto out_ok; + case VGET_NONE: break; - default: - __assert_unreachable(); } + + __assert_unreachable(); + + /* + * This is a goto label should the cases above have more in common than + * just the 'return' statement. + */ +out_ok: + return; } int From nobody Wed Sep 24 09:16:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWrnv0Qtjz68mPG; Wed, 24 Sep 2025 09:16: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWrnt6pLwz3wgZ; Wed, 24 Sep 2025 09:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5VenBGyvuXMX35k4sU5HOQaTAmlmruKBFQya5KVDViU=; b=jx7wutcxCFID7EJ6RAX7LSgJzcJu8CF20K7AK3J1EOnznm2XhnouCNTyRh9mHH01PD35IW D1ZtF5R6+pmHC6gDmPRIDbqzaDmmCI0q3fKDqmhw26lcTNckCoFzDvZehNrQlA86nsqzfn bRHmBBVUiRAXm+fySQRAddtq5p/nYVJPNm+PUO6cRyf120suYDk4zMZseJEwFPxXg5nkYz /KNsN4Jz3dZxzKfRzMKHtV699SsTf/EqyG6yByZpdtw2jnZokCmv3234bmkqai9AhG0fJo EhYCNI4z87GFNGmDDELCDFmohtz03luuwrugFUFj5HKyEYeWLhApEg08TPnS3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5VenBGyvuXMX35k4sU5HOQaTAmlmruKBFQya5KVDViU=; b=wlCiTQ5EJwfMer2wRc7CZpsO7MHuk2QgTF1bt2aUubrB7x1lPmbvomIz20wQu01SVNmceb qnI5+lwWYslonQJDfdKSfoy+tvUF+ZqnUfPrcJHgfMe+llyI5MxxlGR+QdCH2ACwi4+PLE 6haLaXp5XBISQr+B/LQBZiVwsDXDtI/GeqCa7kr8fad9ToizDgeSgIT7Hd8Dq8j41bBhCH aFz9lZ48gLUAw9IQ/RQjYX31uIsuQGwSiQw/eZoAGmfmzD7IRBEvl44YS3+WQO1eVdzNKv Q5l7BHzbxfs/yuc60DsiRpcDBC1tTaIlmC1pyUICVQCV9ySXPUrla8EuKYlavQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758705411; a=rsa-sha256; cv=none; b=IFPsEZQ5HuwBW2OttbuKRc/8Xqw91YQd4vK6pxrLtA+EOkvoQEsOTWOovbeJ/NYCg26xlg zFzYipPlXdvlinoydFOwL0Ofs3SMuTVd5fgWbdBAqLhVrRNOSpHmsWtqAycknoLNroYG27 MgQ4XtPppebL15S2BINgnGRCMo7xFAlBaC8wRkCjmmi79Gn6FP54retD3wbYxJsx/Nmi+P FlPxJP1lNfume+JcD3EYazfLItJBe8EaS63H7D1awPu1oPwu3EEyZLccr/FvxpfoOPxWNl PVPIfKHZPdgHlZMd2PFRdJdV6Shus8Lc7u5Kj8a46pKHxPWFXHFlQGVoGE8ORA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWrnt6FtHz8dK; Wed, 24 Sep 2025 09:16:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O9GoPW001582; Wed, 24 Sep 2025 09:16:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O9Gong001576; Wed, 24 Sep 2025 09:16:50 GMT (envelope-from git) Date: Wed, 24 Sep 2025 09:16:50 GMT Message-Id: <202509240916.58O9Gong001576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: f259daa708f5 - main - Makefile.inc1: Fix package-pkg with a non-default LOCALBASE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f259daa708f507d3ff450d2eb8c05065674339ec Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=f259daa708f507d3ff450d2eb8c05065674339ec commit f259daa708f507d3ff450d2eb8c05065674339ec Author: Lexi Winter AuthorDate: 2025-09-23 22:15:35 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 09:16:12 +0000 Makefile.inc1: Fix package-pkg with a non-default LOCALBASE package-pkg (via make-pkg-package.sh) passes CONFIGURE_ARGS to make when building ports-mgmt/pkg, which overrides the port's default configure args that are supposed to set --prefix. This means that pkg is always built with the default prefix of /usr/local, which then fails when ports tries to package it from LOCALBASE. Work around this by explicitly adding --prefix to CONFIGURE_ARGS. MFC after: 1 day Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52634 --- Makefile.inc1 | 2 +- release/scripts/make-pkg-package.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 94c33ca791fd..e98b5f233b51 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2049,7 +2049,7 @@ package-pkg: _pkgbootstrap _repodir .PHONY env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \ PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \ WSTAGEDIR=${WSTAGEDIR} \ - OSVERSION="${SRCRELDATE}" \ + OSVERSION="${SRCRELDATE}" LOCALBASE=${LOCALBASE} \ sh ${.CURDIR}/release/scripts/make-pkg-package.sh .endif .endif diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh index ee75e7d68d14..a1e006bd6964 100755 --- a/release/scripts/make-pkg-package.sh +++ b/release/scripts/make-pkg-package.sh @@ -13,7 +13,7 @@ export DISTDIR=/tmp/distfiles export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR) make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \ + CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION} --prefix=${LOCALBASE}" \ I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES \ BATCH=YES stage create-manifest From nobody Wed Sep 24 09:16:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWrnw1bQPz68mq7; Wed, 24 Sep 2025 09:16: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWrnw02kgz3wmJ; Wed, 24 Sep 2025 09:16:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aKSJExtfpbLDvlHL7okf5IK0MHkxzUiNhDuHByvykek=; b=s6KJPpcD95F5kYWYRl69F/pcOaJNsBzBC+SkGAiPvHWkPpPsuMyQhy26dLzb2eWa1CY4c0 70396SuP2Locot3jTwD4oUlOJof/Mn3K7IHW6UsrDVC9l2a9DZHrzrF8aDMDysi/Au3kPr qfJqA0KIPwZtO7b/G2a+J2odeB/+8F2MKNvzPdRFBPToDzx1RJ1l8LQMFjO72OEULG/rrr /t1zhix0yPPuuNLVjUMJ7X/B53BpXceCdImxlhKVk7SNhMoKnGNwM3eOMG2MD8YIUG/Hai GMSVuLfwsdIkBOyn/RAuaoDZHfT4h/Bu3/KM+JCuR9+fhDGrlBi4bMQMK3UN5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aKSJExtfpbLDvlHL7okf5IK0MHkxzUiNhDuHByvykek=; b=j2f0Dwf8JufuqvSywa7aWL5z8402Q96oD66Ja+VbWnjziGpSJCDh02bwGdGo6waI7DfYcy DN2BjhEqHT0s5Vns/cYbrla7PkWQTbCVKJseYki+Ijc/1fX0KjZRtI2xCj/pEZwDcVO5h8 UYIBFywGANj6th6pZtQcGk+e02U/3Cccq+e9fNQK8VIwVadfXYGJIknam3RcXP4wbP4qEg d7hFKCFSdER0Qtl0AiCFrOnRtA7HcJ6q//7UOyQ+F2G6jUUCyYdubGegdscCtYcDK1Gc9h DkvqzP+aFyr6Z9y45bRsYsWqkkAn1T1o5maIXel6dM3QDpNWrfHwcYp2B4SkQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758705412; a=rsa-sha256; cv=none; b=bDB2xc0E1APmTK8ViytceX11Zkmpt8+6o8hi1oFH1l2Fi4cqMwmPU75XEJUwqCIiSE76lA atWCLXoUZzF0vStjOwP+oujZ1IODpY+wCzG46Bp4R9d1gtaAnH94IOeiklowJ9DFq0hEpF bljI6V+p8caFk4XVo2/cEi+wOrSXbqJ8gs0wnjlnEqAJZUJpDb/5JLUYHElxDMzmEyOy4p TPSuUGvcJVYTbMRs03HaHOw8DcTlalQ8ylgFTov5Jgcz61Re9nLeip9+OubF3JClAIcTnY Ep2na/8jWiNbf7bIlDwE7xItY2mp3Ln0ibu5JjNF3HOwaNh/dvTuUEIWJvQKLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWrnv6lwvz9cw; Wed, 24 Sep 2025 09:16:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O9Gpds001622; Wed, 24 Sep 2025 09:16:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O9GpLb001619; Wed, 24 Sep 2025 09:16:51 GMT (envelope-from git) Date: Wed, 24 Sep 2025 09:16:51 GMT Message-Id: <202509240916.58O9GpLb001619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 8654315ae8d3 - main - release: Fail the build if pkg can't be installed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8654315ae8d368ce47232bde1f2593e256224e56 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=8654315ae8d368ce47232bde1f2593e256224e56 commit 8654315ae8d368ce47232bde1f2593e256224e56 Author: Lexi Winter AuthorDate: 2025-09-23 22:17:46 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 09:16:13 +0000 release: Fail the build if pkg can't be installed If we can't install pkg(8) on the media, instead of ignoring the error, fail the build. This avoids silently creating media which doesn't have pkg(8) on, and therefore can't be used for a pkgbase install. Installing pkg(8) can still be entirely disabled by setting NOPKG. MFC after: 1 day Reviewed by: ifreund_freebsdfoundation.org, cperciva Differential Revision: https://reviews.freebsd.org/D52635 --- release/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release/Makefile b/release/Makefile index b4da9c68eca1..296ce83f6dac 100644 --- a/release/Makefile +++ b/release/Makefile @@ -238,7 +238,7 @@ disc1: ${PKGBASE_REPO} .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} pkg || true + ${PKG_INSTALL} pkg ${PKG_INSTALL} wifi-firmware-kmod-release || true ${PKG_CLEAN} || true .endif @@ -279,7 +279,7 @@ bootonly: .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} pkg || true + ${PKG_INSTALL} pkg ${PKG_INSTALL} wifi-firmware-iwlwifi-kmod wifi-firmware-rtw88-kmod || true ${PKG_CLEAN} || true .endif @@ -333,7 +333,7 @@ dvd: ${PKGBASE_REPO} .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. - ${PKG_INSTALL} pkg || true + ${PKG_INSTALL} pkg ${PKG_INSTALL} wifi-firmware-kmod-release || true ${PKG_CLEAN} || true .endif From nobody Wed Sep 24 09:16:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWrnx1zc0z68mh0; Wed, 24 Sep 2025 09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWrnx0hj1z3wb7; Wed, 24 Sep 2025 09: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=1758705413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1NHEsMdVebJerSM6geVp7PAc2zFFO9ri5qS4aM64KIQ=; b=MOjwfcZ2M/dfj/Hcbz4y3bbT25U9SKwFJaJmT9Qih1f+fUWs8ExxtLi3qdbrO/thzCFum6 Z/GPfYt9l4zMLPIMU7ADvPIXGcamLXH+nHXnn6FfF7iew7GhcOzpWx6p2c4M7IQRQJn48G 0J9hX85MFV0kfYzT2tV8s9NDAQUU+J4ExU9SZUYsYOxCyNSOceW+ZVnQ7QQwYV/Dyjj4Bb RKRtymoki3dUOiFIZXd5MBa/CPEHM8sEMCWlIGhfDzVoLqgdebmzDvgWEZ/iZRW5Rc40no jpDqdl14Fl5TjD0g3uW9vS4aBnsQR1r3zS+zHgX+Ofi0ZWojbastddT5FJG6/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1NHEsMdVebJerSM6geVp7PAc2zFFO9ri5qS4aM64KIQ=; b=xi5boLzAZe+SSgYVSMXKhG/FCG1kNHPuhFlkro+h9wlUmR9B0wCdQK6/54kO8FoEZfU0Im LaCNYEaRXqV+/DdMTaaCvRMH89k3oWltBGnKL6LXjixaaUPjmg3pCVNcs1qDA47wZDJMff EmnMEPngLZC6/45vhk4MRcIrLl3MhMUAUVgOpAtTKyXV05XoMA9kG5LtTPqDtB6ijGkQwt uDbbBhguyg3dcr4F0SGIA8R8xG1lGZBt9JNR28JA7A4ZQoAWPXrH+hEt7XjgC5JswJYoKb q8qOMC+k8bVFWvbFSNrQwn/W+h4XaPBiBUS5pvCL5Wt3yK2S2MVZ3u5VCLBmBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758705413; a=rsa-sha256; cv=none; b=Zk6OC7paUvRwWVkP8xPavfz7+m/OmQQ1iZfnITOz9NlhlH45C7bWDXDuUSUQLG7bYctxzH k90tKH27ywNMEnGn4vRbHBACQcjOgnrqNPnZbMhEtVSh8SomFZxtm2NtBm9LNKRfKtUmPT /qVCLvKLAd48yf6ieu+km7iot0Ti8us0j/a8NB0sq2D8HFmOjMaAkBpIzff4WTUkfV1v3b 9k60ydY32eJw8NbRwdTd4HI1Vdg4vnIx32JfwDGIeNstzJuO6lDYPNOB3rKOyQMhWwf7HM LzmGGyGhpV1w15QyCPiFF84K90AEMhhjXB5l3sLNo5rW4Vt54bAcAm7I0K4Znw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWrnx0J5Zz9ZS; Wed, 24 Sep 2025 09:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O9GqXF001664; Wed, 24 Sep 2025 09:16:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O9Gqjn001660; Wed, 24 Sep 2025 09:16:52 GMT (envelope-from git) Date: Wed, 24 Sep 2025 09:16:52 GMT Message-Id: <202509240916.58O9Gqjn001660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 5bb96dab061a - main - pkgbase-stage.lua: Add pkg package to the offline repo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bb96dab061af5f44e6090831f1b2724196828b8 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=5bb96dab061af5f44e6090831f1b2724196828b8 commit 5bb96dab061af5f44e6090831f1b2724196828b8 Author: Lexi Winter AuthorDate: 2025-09-23 22:34:03 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 09:16:13 +0000 pkgbase-stage.lua: Add pkg package to the offline repo We need a pkg package on the media so we can install it for offline installations; copy this package from the staging repository to the pkgbase offline repository on the media. MFC after: 1 day Reviewed by: ifreund_freebsdfoundation.org, cperciva Differential Revision: https://reviews.freebsd.org/D52636 --- release/scripts/pkgbase-stage.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua index 9e968fd150f8..94dec96673de 100755 --- a/release/scripts/pkgbase-stage.lua +++ b/release/scripts/pkgbase-stage.lua @@ -33,13 +33,17 @@ local function select_packages(pkg, media, all_libcompats) components["kernel-dbg"] = package elseif package:match("^FreeBSD%-kernel%-generic.*") then components["kernel"] = package + elseif package == "pkg" then + components["pkg"] = package end end assert(components["kernel"]) assert(components["base"]) + assert(components["pkg"]) local selected = {} if media == "disc" then + table.insert(selected, components["pkg"]) table.insert(selected, components["base"]) table.insert(selected, components["kernel"]) table.insert(selected, components["kernel-dbg"]) @@ -50,6 +54,7 @@ local function select_packages(pkg, media, all_libcompats) end else assert(media == "dvd") + table.insert(selected, components["pkg"]) table.insert(selected, components["base"]) table.insert(selected, components["base-dbg"]) table.insert(selected, components["kernel"]) From nobody Wed Sep 24 09:16:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWrnz5sXlz68mm6; Wed, 24 Sep 2025 09:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWrnz284Xz3wpN; Wed, 24 Sep 2025 09:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZIYtludxZ/NL93ZVPelPXC7Rv8qpov1TyYeVIfURZ0=; b=PLiQ98i5UC/rl4wkQuecaOrLIl7xC2YCnHKp9B+xJTYI+i+xwjfZqKgjPkW0yt2X9+/uwV kBEZrw0T3XlP2ZqJ03BpYvVj8Hipq+wuyAfscWDePHUFC4I93CIEKuxH6QGZJeIuKqXOfi d9j/wmbU5EOEkyczjMenXiHvGEdoy0jF2tSPTND0PkgGG2oYxi+01zICqpb0s4J9ET8UpI QAyFIUN4SqJxcQybLWSqe5TZqUhEsInwJokf8uhXrzlmGfIzOgRdx179gPrY9FKlYvKgZ3 YsiS2vveM81MM2TZmSznaRwGWTiiSxRj6YPi0H1JDTk9HKqaeoM8pnRCNDhMxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZIYtludxZ/NL93ZVPelPXC7Rv8qpov1TyYeVIfURZ0=; b=T0XGWG8wtOeKhiZ+56MniulTiimYoafBfD39GhCB4XcDKUIPUifUuDdpuXO3F5z4aOhwF7 6Fh3lQz3m0aB28gzuMUIzVPgw84Ba9s4ads1S1Bt0EQE9FXEv4kTakFiBVA667Z8UcPVWJ 1EHHZVimn37Qf0P84AACxbcu7lkK+pFNdi8paWw10O3dUwaPnoDAzi/DgiUb3bMmYjmRyQ uiODArmd0tOF8PVzwLjTam6vg1Qbnvc/99pfdsEzrEdYsk1bx26D1GZMj9xipUzBnq0WFF OAIfZmtWjrYjDXxDPKDb77fpuOqdn4lRXv69MQN9XSBWdluMALmLW+SmwwI7Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758705415; a=rsa-sha256; cv=none; b=p0ZtHMgrh8a14sxVVdvN38ql2+/l2lkRy8yr09guYBBzYa4ZP9PbLZ36eEIs800I2aloOb zkMrUsyH5MmThJo5n8fI9Yh/dTAjftppL+bKAUS50GfB0JVkX2j69YLkufl5ahr/l17HUs 2atpI40f7dp1SNwdEdNiyWvYFj8jUH13n8rEDOPlPkM03iobUtFnAYIvnu/9yCXrLuml2y krpt7vd6wwZVldc2rvr8ci90feeyzN1VzWgyo9VErYGEqJZyI/L2xibc6jk/cdCLFVxVsg n9MIWXLyZmSMRY/384S5ubcqdlM/KW6BR5cjc1+nmeIlQp1XtfN3rKWqDScVAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWrnz1fjRz9ZT; Wed, 24 Sep 2025 09:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O9GtLk001738; Wed, 24 Sep 2025 09:16:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O9GtWD001733; Wed, 24 Sep 2025 09:16:55 GMT (envelope-from git) Date: Wed, 24 Sep 2025 09:16:55 GMT Message-Id: <202509240916.58O9GtWD001733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 3f5385beeacf - main - release: Improve kernel package handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f5385beeacf49d0edb563ccc712841bcfd6b158 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=3f5385beeacf49d0edb563ccc712841bcfd6b158 commit 3f5385beeacf49d0edb563ccc712841bcfd6b158 Author: Lexi Winter AuthorDate: 2025-09-23 23:06:30 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 09:16:13 +0000 release: Improve kernel package handling Although support for PowerPC kernels (GENERIC64 and GENERIC64LE) was added to pkgbase-stage.lua, the equivalent support was missing from bsdinstall, so the installer would fail at runtime since it wouldn't find a kernel package. Improve the pkgbase-stage logic to have a specific list of kernels we want to support (which avoids breaking if multiple kernels are available), and use the same logic in both bsdinstall and pkgbase-stage. MFC after: 1 day Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52638 --- release/scripts/pkgbase-stage.lua | 19 +++++++++++++------ usr.sbin/bsdinstall/scripts/pkgbase.in | 23 ++++++++++++++--------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua index 94dec96673de..6845e0079b05 100755 --- a/release/scripts/pkgbase-stage.lua +++ b/release/scripts/pkgbase-stage.lua @@ -20,19 +20,26 @@ end -- Returns a list of packages to be included in the given media local function select_packages(pkg, media, all_libcompats) + -- Note: if you update this list, you must also update the list in + -- usr.sbin/bsdinstall/scripts/pkgbase.in. + local kernel_packages = { + -- Most architectures use this + ["FreeBSD-kernel-generic"] = true, + -- PowerPC uses either of these, depending on platform + ["FreeBSD-kernel-generic64"] = true, + ["FreeBSD-kernel-generic64le"] = true, + } + local components = {} local rquery = capture(pkg .. "rquery -U -r FreeBSD-base %n") for package in rquery:gmatch("[^\n]+") do local set = package:match("^FreeBSD%-set%-(.*)$") if set then components[set] = package - -- Kernels other than FreeBSD-kernel-generic are ignored - -- Note that on powerpc64 and powerpc64le the names are - -- slightly different. - elseif package:match("^FreeBSD%-kernel%-generic.*-dbg") then - components["kernel-dbg"] = package - elseif package:match("^FreeBSD%-kernel%-generic.*") then + elseif kernel_packages[package] then components["kernel"] = package + elseif kernel_packages[package:match("(.*)%-dbg$")] then + components["kernel-dbg"] = package elseif package == "pkg" then components["pkg"] = package end diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index c06a3f789791..3ba6a3474e0f 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -182,6 +182,16 @@ local function select_packages(pkg, options) ["debug"] = {}, } + -- Note: if you update this list, you must also update the list in + -- release/scripts/pkgbase-stage.lua. + local kernel_packages = { + -- Most architectures use this + ["FreeBSD-kernel-generic"] = true, + -- PowerPC uses either of these, depending on platform + ["FreeBSD-kernel-generic64"] = true, + ["FreeBSD-kernel-generic64le"] = true, + } + local rquery = capture(pkg .. "rquery -U -r FreeBSD-base %n") for package in rquery:gmatch("[^\n]+") do local setname = package:match("^FreeBSD%-set%-(.+)$") @@ -189,15 +199,10 @@ local function select_packages(pkg, options) if setname then components[setname] = components[setname] or {} table.insert(components[setname], package) - elseif package:match("^FreeBSD%-kernel%-.*") and - package ~= "FreeBSD-kernel-man" - then - -- Kernels other than FreeBSD-kernel-generic are ignored - if package == "FreeBSD-kernel-generic" then - table.insert(components["kernel"], package) - elseif package == "FreeBSD-kernel-generic-dbg" then - table.insert(components["kernel-dbg"], package) - end + elseif kernel_packages[package] then + table.insert(components["kernel"], package) + elseif kernel_packages[package:match("(.*)%-dbg$")] then + table.insert(components["kernel-dbg"], package) end end From nobody Wed Sep 24 09:16:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWrnz02NZz68mcw; Wed, 24 Sep 2025 09:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWrny1Bsjz3wbK; Wed, 24 Sep 2025 09:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nXfJZOMZzszljjRjAnJWJF4cATDH+VxhRtGhfX7Usko=; b=H/SvonYVDtbtshdA4u4imFYDsRc84npXExDMMQbNVQYmhpxfyJNXXHsw0Xglu4sFT1RfUz mFwxqSbSFGmGagpG4yYJTwCEoLuYnK1Jb8pOEZk+RKnko5gDZspHJWse/AzVAJ8IoVpRzt fz/buv4yuntOWbrlnStU99Ilr8x+GCidR6h8RMbQkIIDP8VKF/t0+NvAXi+gCwl6IPN7RA quVZmJsv5yGgtrR96DCCtEmI9X6KUEqqZjPQP/53g5KJtzwa/1KL4cgZTsROWmFoHqsapp is2gCv8W4Kt9xsauIf8otKR0q2GuUkuvTFX6iPNZW5Y5NG6j1FPjnUZ8chCCng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nXfJZOMZzszljjRjAnJWJF4cATDH+VxhRtGhfX7Usko=; b=Aj5GskUT97ftPn1Nd7kLW2HwMfdiBYF0+fGXbE3yimOsWdHEdeDIuQdNaPBuOk5dZTomY5 7/ZMFIpA71T8fDZmci2buwhrrgtCj1Wc/NVtIlS517df7fNyQrn4m5ewdBoJKaXvCvP2tE 0sJxocwYF4gBRjTXNvuVxDxGcN8EUBTWvJbUw94SDzvFLSus6jZ0kHKHB4Xa/cAy2D0J3T YS7LZCFbhD5s7Z6Xuq24NSHCcpUzFSd31957CyI/7U+xNs6GY80ResJNHxMzUCHBy3nFgO fpTim4uqlQ2jhum+O6q/F1CnEYVY9pnQaxDOHVXS/Jl+kyaDgDf8WIDdmaIE5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758705414; a=rsa-sha256; cv=none; b=HF8OK5c29c7oYY1ry2JmE1Dwswv3sVNmw+ODAN2b/DRdZFwiFggK0qRcZwZ930A128X7WU JApopWUc3y1gpu3rSLZ8VDatLxsoFmNqnbYrSLfmXRC6cgF0+iQzeQ+RuY+lruxQusSQ84 d8WfjIN+cGt+p5Y0da6Fh3BSii6o37tdPslGnINzmh7jGos1W/CBk1qkHs7weBenea+pae YKUq36uPY8oG8Q+ZRFHO9L92Igd6Xj9tHy0X81wQOCH2bKHmXXlnXsfbhDf7byyTrdMjSl O4kj/I+Fs7h6O/CClNe11n6encwlly47p/n/suIuFXaDt9F+SCkPQBCgh/tnTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWrny0glxz9DV; Wed, 24 Sep 2025 09:16:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O9GsSV001700; Wed, 24 Sep 2025 09:16:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O9Gstq001696; Wed, 24 Sep 2025 09:16:54 GMT (envelope-from git) Date: Wed, 24 Sep 2025 09:16:54 GMT Message-Id: <202509240916.58O9Gstq001696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: aba986215fc9 - main - release: Install pkg from the pkgbase repo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aba986215fc99d09655d4dcfc5e37f8b1ac83edf Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=aba986215fc99d09655d4dcfc5e37f8b1ac83edf commit aba986215fc99d09655d4dcfc5e37f8b1ac83edf Author: Lexi Winter AuthorDate: 2025-09-23 22:37:26 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 09:16:13 +0000 release: Install pkg from the pkgbase repo If we're building pkgbase media, install the pkg package from the pkgbase repository we already created, not from pkg.freebsd.org. Aside from being more desirable, this also fixes make release for version/architecture combinations which are missing repository on pkg.f.o (which is nearly all of them at the time of writing). This doesn't yet work for bootonly, since we don't build the pkgbase repository there. For now, restore the old behaviour of attempting to install pkg from pkg.freebsd.org for bootonly. MFC after: 1 day Reviewed by: ifreund_freebsdfoundation.org, cperciva (previous version) Differential Revision: https://reviews.freebsd.org/D52637 --- release/Makefile | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/release/Makefile b/release/Makefile index 296ce83f6dac..491c343398b4 100644 --- a/release/Makefile +++ b/release/Makefile @@ -79,11 +79,16 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} PKG_ENV+= INSTALL_AS_USER=yes PKG_ENV+= ASSUME_ALWAYS_YES=yes PKG_ARGS+= -o METALOG=METALOG -PKG_ARGS+= -r ${.TARGET} -o REPOS_DIR=${.CURDIR}/pkg_repos +PKG_ARGS+= -r ${.TARGET} +PKG_REPO_ARGS= -o REPOS_DIR=${.CURDIR}/pkg_repos +PKGBASE_REPO_ARGS=-o REPOS_DIR=${.OBJDIR}/pkgbase-repo-conf # Pass -f to make sure pkg writes to the METALOG even if the package # is already installed from a previous build -PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} install -f -PKG_CLEAN= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} clean -a +PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKG_REPO_ARGS} install -f +PKG_CLEAN= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKG_REPO_ARGS} clean -a +# This installs from the pkgbase repo we created during build. +PKGBASE_INSTALL=env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKGBASE_REPO_ARGS} install -f +PKGBASE_CLEAN= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKGBASE_REPO_ARGS} clean -a .endif .if !defined(VOLUME_LABEL) || empty(VOLUME_LABEL) @@ -238,7 +243,12 @@ disc1: ${PKGBASE_REPO} .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. +.if !defined(NOPKGBASE) || empty(NOPKGBASE) + ${PKGBASE_INSTALL} pkg + ${PKGBASE_CLEAN} +.else ${PKG_INSTALL} pkg +.endif ${PKG_INSTALL} wifi-firmware-kmod-release || true ${PKG_CLEAN} || true .endif @@ -278,8 +288,7 @@ bootonly: echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) -# Install packages onto release media. - ${PKG_INSTALL} pkg + ${PKG_INSTALL} pkg || true ${PKG_INSTALL} wifi-firmware-iwlwifi-kmod wifi-firmware-rtw88-kmod || true ${PKG_CLEAN} || true .endif @@ -333,7 +342,12 @@ dvd: ${PKGBASE_REPO} .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) # Install packages onto release media. +.if !defined(NOPKGBASE) || empty(NOPKGBASE) + ${PKGBASE_INSTALL} pkg + ${PKGBASE_CLEAN} +.else ${PKG_INSTALL} pkg +.endif ${PKG_INSTALL} wifi-firmware-kmod-release || true ${PKG_CLEAN} || true .endif From nobody Wed Sep 24 09:16:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWrp10wJdz68mk4; Wed, 24 Sep 2025 09:16: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWrp02y0bz3wpf; Wed, 24 Sep 2025 09: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=1758705416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hfgPL9YHMpyDrLL0GianrBEmU+ZHsRn6XBTU40Mqbbs=; b=iR8ev6F2/RblnebHQsvsHhlxFV/PInOZRoh+GR9IBuZ0IBlOQdg+fQ/hqtM9lrvE25UzLk ePyULgQD19KtnSSNhY32zT18bhWArg+jmmToIt7DuFPF+ZOL2gTyGR5kNEIoVjjtkjmd3Z KKNBwXzVWc21NR5BolNeDw/xZe1nJA5cX4G+YXJu4MoeggLWz0QYKLHD+xc36VSubsZd87 7H6EDOJmMYzIT7v+3os4NvXODB7ofnw6ckEot+7FhJrns4GCMTsd8YVuiRf5SAJ9XyDQR2 CkXHwjULk7NnWC9EFrbdb5IPLNYwlmhH3nTLsESIc0ZZ/3DXSvJorhJ0VYsfLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758705416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hfgPL9YHMpyDrLL0GianrBEmU+ZHsRn6XBTU40Mqbbs=; b=yEJTGRr38bW9V7b5UkJqNogEAx/ZGLmvJIJU4CLHgzMXIELKUCqcvY0GaLsJRnbC01oPRa dXcBda5lJ72EYbXbiwy64uEXKZYdIQ0Hg9h9Q0Q+75pLibuqBHoSQVnSkJKDKqjwc66lF5 y83mB/sger1XYdKQV/MqOtEoQlYo5EmgCcbpkGM+R086FsWXdAtEo+WMDrF19G3aChcYNo IgZnLXmO7BtOeMKkV0i+Qz7nJKJvxhTgMp61821TEMbFgliDNP42MXmgqMJDrPU6hTvbwh /EutDM1jBZxdpZ0sUu6cN+Ff6BjcJE3bDvs4JgaK06I7BZdAJEHBnBtm/kLUbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758705416; a=rsa-sha256; cv=none; b=Rn3v6ls67S3UYgDmeKfePuY8T7cka4iIJZ30buAKoTPuXVqGzpKuWhdIcjVYZZy94GSv3a crl5CsON7ZPbBXVPXoLzY0lSw8QVRTNbP2Oj1tshzAAgZyJhqIgET0KKyTflmfJ4D5iny4 CtnlrKaxc25lyX0DFHUzsByZr1ZureVPHxTaEmlNKY+8MK/ZF1jDZYzEUn50QCd+NYNtOx kH1RD9pED1a7wUhm6nHQazqg2uqV1TNi91f8EOr/tp6v9Q8fRlJpQk3uM2xnESWMuNNGlz aHEJZr7Jq09Og2Etdrmwb1GY2QK1q40vbsn5G6rA2fNv1vzvXCTnKF+iBjfVKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWrp02J71z9ZV; Wed, 24 Sep 2025 09:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58O9Gup7001773; Wed, 24 Sep 2025 09:16:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58O9GuZt001770; Wed, 24 Sep 2025 09:16:56 GMT (envelope-from git) Date: Wed, 24 Sep 2025 09:16:56 GMT Message-Id: <202509240916.58O9GuZt001770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 4422265c67b8 - main - bsdinstall: Install pkg if it's available List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4422265c67b8a4e19da08fdf5504a7b5e278f815 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=4422265c67b8a4e19da08fdf5504a7b5e278f815 commit 4422265c67b8a4e19da08fdf5504a7b5e278f815 Author: Lexi Winter AuthorDate: 2025-09-24 00:10:02 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 09:16:13 +0000 bsdinstall: Install pkg if it's available Now that the pkg package is shipped on the pkgbase release media, install it by default for a pkgbase install if it's present. If it's not available (e.g., when running bsdinstall from a repository built from src alone, without ports), skip it and assume the user will install it another way. MFC after: 1 day Reviewed by: ifreund_freebsdfoundation.org, cperciva Differential Revision: https://reviews.freebsd.org/D52639 --- usr.sbin/bsdinstall/scripts/pkgbase.in | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index 3ba6a3474e0f..0b7554644028 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -103,7 +103,8 @@ local function select_components(components, options) for component, _ in pairs(components) do -- Decide which sets we want to offer to the user: -- - -- "minimal" is not offered since it's always included. + -- "minimal" is not offered since it's always included, as is + -- "pkg" if it's present. -- -- "-dbg" sets are never offered, because those are handled -- via the "debug" component. @@ -113,7 +114,8 @@ local function select_components(components, options) -- -- Sets whose name ends in "-jail" are intended for jails, and -- are only offered if no_kernel is set. - if not component:match("^minimal") and + if component ~= "pkg" and + not component:match("^minimal") and not component:match("%-dbg$") and not (component == "kernels") and not (not options.no_kernel and component:match("%-jail$")) then @@ -161,6 +163,13 @@ local function select_components(components, options) -- autoremove then trying to remove minimal. local selected = {"minimal"} + -- If pkg is available, always install it so the user can manage the + -- installed system. This is optional, because a repository built + -- from src alone won't have a pkg package. + if components["pkg"] then + table.insert(selected, "pkg") + end + if not options.no_kernel then table.insert(selected, "kernel") end @@ -203,6 +212,9 @@ local function select_packages(pkg, options) table.insert(components["kernel"], package) elseif kernel_packages[package:match("(.*)%-dbg$")] then table.insert(components["kernel-dbg"], package) + elseif package == "pkg" then + components["pkg"] = components["pkg"] or {} + table.insert(components["pkg"], package) end end From nobody Wed Sep 24 11:45:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWw5C1qHlz67jG6; Wed, 24 Sep 2025 11:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWw5C0mMWz3LDN; Wed, 24 Sep 2025 11:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758714319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNmwn0b+PM2unzXqAnI/hIBGdJUYpj2trZq9PUkcUAw=; b=OPsiq6Qty9QddxKc5oe8fxAY114PJB0JX6hR/wSDaHDPhoeIUVUQ5n3DWpedWWDE2mn/Zn zl2cE/ivAdTzfDHCpVn/NBEcpMtLXsez5UmbS+KHdtFxGxnRNJLKFbjuIxAw7na0gfXaO8 5BgD9cMOLtAOr9TQzUOz7Mv39dqh/ddyGSOxP0lfwwv5GX4GpHKKlzR5f62XOEgPx9UrIn CLP+EBqDCrt3yB1+yfJgdvCAzczwwAmu9ItR2McwONlh4k/IX/dyjKuiWI3Bm6gPSqquRw fo535XLDLAiBsdtcJKNABrakVuGFJFMnYNinKsl58eziMBhbBh9+pnKSUj+tRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758714319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNmwn0b+PM2unzXqAnI/hIBGdJUYpj2trZq9PUkcUAw=; b=pjFQzHTvB89TSIeBkL1r5ex56RFm51QTNSBqJj2qGPg7CqrqNV1ahYV9Oxj3OCGPS3VMUf IcE6KiuagbgzBrbqu4Wz+5HlikDAezIj8fo7/NnLoa2G2NFgD6EDS9NEsn1PS96NC7Ihq3 Rc9SC69aqtbEmiXs1rerehZaE/lzTm13RCy4RkT9A9YZ/gn7hxFwFObgijgaFaZKhEPhBz mSRkvvDJuV6m83MropqvIopTsQPFoJf3LFxllPrJEcLsaYt++6KdqupgLVfadWruNXPIK6 r6t7AX6nPydzoUzAGdJHDp8D49nXnR/CWo1Sx+6ktKV77TfpVUhk3Iw0R6ObCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758714319; a=rsa-sha256; cv=none; b=aeip8uEmOd4cyryZXQZFXWIXrSvzRwqNK1f4yavZapXbGS8Seo47IIkL7qIxTIcCHzlNyn giBogS32vLs7zcTW5iYFzDCXEDySBQFVsnhj/NcpN2L9vJnc3n5lcF1+DWWF05BoJVeguF wauTRE6RoPDLxDryTeKLvG50wxjnLcv0w0q2WuyRmvDUmyrYqSIe+g+fJUslSUrZVpZJB+ yeKDjQYh1XHiwX7UdL7PUcQbUom2FtAefhpWdT6wboOST5zFWK5yvq2WmOVkviWQBHN8Hs d5+dm+Rwudj+D5036y/lf5urWynxbPGu6k7kFrg0jHu8a8TRXrPaJxLF8TntcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWw5C084QzVb7; Wed, 24 Sep 2025 11:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OBjIug083117; Wed, 24 Sep 2025 11:45:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OBjIjF083114; Wed, 24 Sep 2025 11:45:18 GMT (envelope-from git) Date: Wed, 24 Sep 2025 11:45:18 GMT Message-Id: <202509241145.58OBjIjF083114@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: dc0cf0648c8d - main - pf: check if a group has a kif before dereferencing it List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc0cf0648c8d28ab4914c798a4cff8256ae94ee5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dc0cf0648c8d28ab4914c798a4cff8256ae94ee5 commit dc0cf0648c8d28ab4914c798a4cff8256ae94ee5 Author: Kristof Provost AuthorDate: 2025-09-02 08:46:26 +0000 Commit: Kristof Provost CommitDate: 2025-09-24 11:44:54 +0000 pf: check if a group has a kif before dereferencing it It's possible for interface groups to not have had a pfi_kkif assigned to them, so before we pass that pointer to pfi_kkif_update() we must check if it's actually set. We've seen panics such as this, where we get an address update for an interface that belongs to a group without associated pfi_kkif: Tracing pid 12 tid 100034 td 0xfffff80100d2a000 kdb_enter() at kdb_enter+0x33/frame 0xfffffe0067eed340 panic() at panic+0x43/frame 0xfffffe0067eed3a0 trap_pfault() at trap_pfault+0x3c9/frame 0xfffffe0067eed3f0 calltrap() at calltrap+0x8/frame 0xfffffe0067eed3f0 --- trap 0xc, rip = 0xffffffff8102ebd5, rsp = 0xfffffe0067eed4c0, rbp = 0xfffffe0067eed500 --- pfi_kkif_update() at pfi_kkif_update+0x15/frame 0xfffffe0067eed500 pfi_kkif_update() at pfi_kkif_update+0x1fc/frame 0xfffffe0067eed550 pfi_ifaddr_event() at pfi_ifaddr_event+0x82/frame 0xfffffe0067eed5a0 srcaddr_change_event() at srcaddr_change_event+0xa7/frame 0xfffffe0067eed610 in6_update_ifa() at in6_update_ifa+0xd52/frame 0xfffffe0067eed790 in6_ifadd() at in6_ifadd+0x29a/frame 0xfffffe0067eed8b0 nd6_ra_input() at nd6_ra_input+0xf65/frame 0xfffffe0067eeda90 icmp6_input() at icmp6_input+0x3c8/frame 0xfffffe0067eedc10 ip6_input() at ip6_input+0xa15/frame 0xfffffe0067eedcf0 sppp_input() at sppp_input+0x502/frame 0xfffffe0067eedd80 pppoe_data_input() at pppoe_data_input+0x1e7/frame 0xfffffe0067eeddf0 swi_net() at swi_net+0x128/frame 0xfffffe0067eede60 ithread_loop() at ithread_loop+0x239/frame 0xfffffe0067eedef0 fork_exit() at fork_exit+0x7b/frame 0xfffffe0067eedf30 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0067eedf30 Note that pf doesn't assign pfi_kkif objects to groups created before pf has fully started (see V_pf_vnet_active check in pfi_attach_group_event()), which is one possible way for this to happen. Reported by: garga Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_if.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index e2200c15c704..f3be036ef745 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -655,8 +655,10 @@ pfi_kkif_update(struct pfi_kkif *kif) /* again for all groups kif is member of */ if (kif->pfik_ifp != NULL) { CK_STAILQ_FOREACH(ifgl, &kif->pfik_ifp->if_groups, ifgl_next) - pfi_kkif_update((struct pfi_kkif *) - ifgl->ifgl_group->ifg_pf_kif); + if (ifgl->ifgl_group->ifg_pf_kif) { + pfi_kkif_update((struct pfi_kkif *) + ifgl->ifgl_group->ifg_pf_kif); + } } } From nobody Wed Sep 24 11:45:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWw5D2zfKz67jG9; Wed, 24 Sep 2025 11:45:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWw5D1kmQz3L9q; Wed, 24 Sep 2025 11:45:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758714320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L11JfRoCnrM34pUvNqnABs9NzOfShlw0gprq9hEEFrE=; b=azfD39R1E//XI4FFq6SdJ7KhjzSlG7MiP6pjvbPkIfk5pWD1aoPYQEM5CBtuCZU4wtOqSY b9+tmpXnvcFfbJacpqNPTQ1KNT5lwVJvcKa+XlbhTUg3p2RmgGx/pWzEiPvkPvIoguzsvl Uwa2gAFc+HPPCs/3vbbuMhfh1IxuXXWclOIUA/55dSdyLQ6RGtWqZeYulz0ID5WqO8ZuaZ DJ7c7Ti9mXnKgccWqssEO/8xV+ROx9UJzB2CssKVN6QhRaY/aEFjOaC9zdgh9qvfc3e00c 1wf/uoz/sswWxExgv9mZwIf3KFPqdqXbjhjdcdHkENMTyc1nh/Q6Rt0C5FnkiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758714320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L11JfRoCnrM34pUvNqnABs9NzOfShlw0gprq9hEEFrE=; b=JsMYioX8HA2a3jfoj3FWSJda3qqVUavJLPpy+9g1PbYiWZh4fvhNBPXVk9rMCGJYofdno1 QTlchgEYAUq4Os5Q+JBa1pDk4/t+hEJAPB+TxpBY2EQUYjWF5RnBxJJFtcNe8kBkAMmikN pWTozoE52gc1ZTMwW6Re1XupckbsnELz6dBtN0RN/a1deITZPngD7BSmTAH1D6BMhORu60 skTGBJVUW3tMdjRD494fLGUh/sPwLtiB93jR5LXYMr9R0lhqFNEb7uQ0yDizQTKucCPUFM oC5TCoTvpAEHlvazDK4vdi2VbFH+qsq8SQmD2V9uDTvugh7ypi4bZV024is3CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758714320; a=rsa-sha256; cv=none; b=k0Hc1CpxfTGXQ31/klh9seBd/nYlPxD9JHgcYhDiFUhrTgOS1O11Af6JCL3QLYi+evsIMf skWxh8Q/qeQzuuE5uXhTGRrxmBGCkK0cu7s6LxLTLZVMhbvqgd2824ycFaIAqyQpC1Md5P 1r+P2jfEdMoi7LzlviAKm+AK2dW42TKETKYqeSOGq7ZhnCJ7Xf5Xi8Ijt4kjrbWbAR4t8Z QdlCm19PzdT6sSlrjxbMUf9PuB6qivWE+sHHnZbi86V4Ebaj7myUKHts1Rny7HIIL8OnAr w9aWsOmYIYgcMNJWQzZZ7gQw4/ADIeTkRTjIZFGO/hPweFJJRPizj8p0Fv27TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWw5D19DjzVZx; Wed, 24 Sep 2025 11:45:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OBjKRO083153; Wed, 24 Sep 2025 11:45:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OBjKI8083150; Wed, 24 Sep 2025 11:45:20 GMT (envelope-from git) Date: Wed, 24 Sep 2025 11:45:20 GMT Message-Id: <202509241145.58OBjKI8083150@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: 7ec06143964a - main - pf: pass pre-NAT addresses to dummynet List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ec06143964a949ebf6885ac120fdf839ad29eab Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7ec06143964a949ebf6885ac120fdf839ad29eab commit 7ec06143964a949ebf6885ac120fdf839ad29eab Author: Kristof Provost AuthorDate: 2025-09-04 12:49:00 +0000 Commit: Kristof Provost CommitDate: 2025-09-24 11:44:54 +0000 pf: pass pre-NAT addresses to dummynet When we're NAT-ing give dummynet (via its struct ip_fw_args) the pre-NAT source and destination addresses. That's what we used to do, but that got unintentionally changed during the nat64 work. The pre-NAT addresses make somewhat more sense, in that it enables limiting based on specific LAN clients. See also: https://redmine.pfsense.org/issues/15770 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 39 +++++++++++++++++++++++++++++++++------ tests/sys/netpfil/pf/nat.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index a57905df0c69..be00aff1f5cb 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9760,6 +9760,7 @@ pf_pdesc_to_dnflow(const struct pf_pdesc *pd, const struct pf_krule *r, const struct pf_kstate *s, struct ip_fw_args *dnflow) { int dndir = r->direction; + sa_family_t af = pd->naf; if (s && dndir == PF_INOUT) { dndir = s->direction; @@ -9800,20 +9801,46 @@ pf_pdesc_to_dnflow(const struct pf_pdesc *pd, const struct pf_krule *r, dnflow->f_id.proto = pd->proto; dnflow->f_id.extra = dnflow->rule.info; - switch (pd->naf) { + if (s) + af = s->key[PF_SK_STACK]->af; + + switch (af) { case AF_INET: dnflow->f_id.addr_type = 4; - dnflow->f_id.src_ip = ntohl(pd->src->v4.s_addr); - dnflow->f_id.dst_ip = ntohl(pd->dst->v4.s_addr); + if (s) { + dnflow->f_id.src_ip = htonl( + s->key[PF_SK_STACK]->addr[pd->sidx].v4.s_addr); + dnflow->f_id.dst_ip = htonl( + s->key[PF_SK_STACK]->addr[pd->didx].v4.s_addr); + } else { + dnflow->f_id.src_ip = ntohl(pd->src->v4.s_addr); + dnflow->f_id.dst_ip = ntohl(pd->dst->v4.s_addr); + } break; case AF_INET6: - dnflow->flags |= IPFW_ARGS_IP6; dnflow->f_id.addr_type = 6; - dnflow->f_id.src_ip6 = pd->src->v6; - dnflow->f_id.dst_ip6 = pd->dst->v6; + + if (s) { + dnflow->f_id.src_ip6 = + s->key[PF_SK_STACK]->addr[pd->sidx].v6; + dnflow->f_id.dst_ip6 = + s->key[PF_SK_STACK]->addr[pd->didx].v6; + } else { + dnflow->f_id.src_ip6 = pd->src->v6; + dnflow->f_id.dst_ip6 = pd->dst->v6; + } break; } + /* + * Separate this out, because while we pass the pre-NAT addresses to + * dummynet we want the post-nat address family in case of nat64. + * Dummynet may call ip_output/ip6_output itself, and we need it to + * call the correct one. + */ + if (pd->naf == AF_INET6) + dnflow->flags |= IPFW_ARGS_IP6; + return (true); } diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 5ea1dd6d8b2f..170d813d57fe 100644 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -810,6 +810,50 @@ empty_pool_cleanup() pft_cleanup } +atf_test_case "dummynet_mask" "cleanup" +dummynet_mask_head() +{ + atf_set descr 'Verify that dummynet uses the pre-nat address for masking' + atf_set require.user root +} + +dummynet_mask_body() +{ + dummynet_init + + epair_srv=$(vnet_mkepair) + epair_cl=$(vnet_mkepair) + + ifconfig ${epair_cl}b 192.0.2.2/24 up + route add default 192.0.2.1 + + vnet_mkjail srv ${epair_srv}a + jexec srv ifconfig ${epair_srv}a 198.51.100.2/24 up + + vnet_mkjail gw ${epair_srv}b ${epair_cl}a + jexec gw ifconfig ${epair_srv}b 198.51.100.1/24 up + jexec gw ifconfig ${epair_cl}a 192.0.2.1/24 up + jexec gw sysctl net.inet.ip.forwarding=1 + + jexec gw dnctl pipe 1 config delay 100 mask src-ip 0xffffff00 + jexec gw pfctl -e + pft_set_rules gw \ + "nat pass on ${epair_srv}b inet from 192.0.2.0/24 to any -> (${epair_srv}b)" \ + "pass out dnpipe 1" + + atf_check -s exit:0 -o ignore \ + ping -c 3 198.51.100.2 + + # Now check that dummynet looked at the correct address + atf_check -s exit:0 -o match:"ip.*192.0.2.0/0" \ + jexec gw dnctl pipe show +} + +dummynet_mask_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "exhaust" @@ -828,4 +872,5 @@ atf_init_test_cases() atf_add_test_case "binat_compat" atf_add_test_case "binat_match" atf_add_test_case "empty_pool" + atf_add_test_case "dummynet_mask" } From nobody Wed Sep 24 12:23:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWwxJ1pgVz67ldD; Wed, 24 Sep 2025 12:23: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWwxH6HWyz3QqC; Wed, 24 Sep 2025 12: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=1758716611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+nQZnjctCSiQbQjHIFABGUZu/BG2XvtJyPSj9B3Az0o=; b=yP1HHsLCtt26cDTSYiTx1CDrIobWq7cpYxAwRnd/NO4STXcdiXwD4HDRfYKK8GdB0KjlD+ scK80M6+xabgQl8xYSEs9YlGj50rMClXPc5bFxRa8y4Zhpo0hkQEwAWS5tuqlORz7SQY8H Kn1aBijpvyE/6S9vtvt5v2/CzbgB34JVcgPr2b0XN86wWNWm6feuSuxokjTpoUHVxjhSc2 WPzrRhhA+eck3vgJXL7X7HeRC7PZnEd+1usInZ5C1Ltl527K/F+uRTTaoCeRPDyXBJEXAX A7Q42ogrvDzbzQo6oXqXhL+BOMUOeVbH2bes7F22e9iLQ7wzcCC2jrm33D8C/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758716611; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+nQZnjctCSiQbQjHIFABGUZu/BG2XvtJyPSj9B3Az0o=; b=TaTWpTPQg8FhCFQz6iq9wXR70IBj8bv6aNNW3m4h9qXchJp1e4EvhnoyHSu5yU6CKaFr6F tEjSVibne2GbLoUDq8QS+mtRs+M0ti8QjMJwSzi2tRrS0TjCdliaAcOyGySEXx+RUXaCBX 7w9PucV+tPcWihU+yNndvPDK6GzeizfLqO5vSNqpK+Ydmr+vc0FJTYz+mzi6gksWdR9smL aDX2Xhgn/BuJAMmZdLe1pPyL9ea6PWh0FrRy1lycOVmPmPjE6AuIuoaI2xZyBXTe1m9Wq7 rE4CfMbLKqE+GbpGh3AqbCWkxd3HcqBl3vqw8VwSkbdstRCk1A9URviMYHyvyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758716611; a=rsa-sha256; cv=none; b=bqyLaYenO7rtDRDlPrWSmE7mnOqG1Mt82zhzAyxH+oVKfMVbcD5e5g2uF46iEBdyCHLlEo Kp7gHs3f9jNXrdoLaYRpmRAGzuRx6YxrFf3eHDNx71pJanAXBbzZ/4umOSDgAoChevNdCU dTpotxFuWDV3zYefjCtkaWITx04Gn2yzzskp39dNdEtcHNcI2DQ47z/BSLkrhF+dDSIdIw Uic7y2YTR96ZKoqlNDgGxd+S6o+hLFs6mAnYy65np060NRS0vG1l/DOQ4VQ13SCvZ4vXou OQEKlXOjlAiLpf0jMM6a4FMFLwlFmzQQrNjrPMK2peyBqnTji7S6LeC0x0C2Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWwxH5l7xzXY6; Wed, 24 Sep 2025 12:23:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OCNVnj057979; Wed, 24 Sep 2025 12:23:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OCNVaF057976; Wed, 24 Sep 2025 12:23:31 GMT (envelope-from git) Date: Wed, 24 Sep 2025 12:23:31 GMT Message-Id: <202509241223.58OCNVaF057976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: f9a71840d8ee - main - blackhole.4: Describe even better List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9a71840d8ee0cfff4ec983a589be53648e7017d Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=f9a71840d8ee0cfff4ec983a589be53648e7017d commit f9a71840d8ee0cfff4ec983a589be53648e7017d Author: Alexander Ziaee AuthorDate: 2025-09-24 12:22:47 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-24 12:22:48 +0000 blackhole.4: Describe even better Rewrite the document description to omit ficticious "UDP connections". Fixes: 38f6a4467419 (blackhole.4: Describe better) MFC after: 3 days Reviewed by: tuexen Reported by: tuexen, zi Differential Revision: https://reviews.freebsd.org/D52696 --- share/man/man4/blackhole.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index 56b1b52b9212..afa1c37709f3 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -15,7 +15,7 @@ .Os .Sh NAME .Nm blackhole -.Nd quietly drop refused SCTP, TCP, or UDP connections +.Nd quietly respond to refused SCTP, TCP, or UDP packets .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" .Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" From nobody Wed Sep 24 12:28:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWx3M3xKdz67mXt; Wed, 24 Sep 2025 12:28: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWx3M3Lnrz3R8C; Wed, 24 Sep 2025 12:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758716927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qwTokxt/OMnrdU/d9/96/+7lH/iXBaxj9ouqhoP5E94=; b=sxSKKjgv3AaJGhova9qYnVnZRPlJYOk7ioaTTphtUYMXtRGKZbuXMejJgAAEXKGTqzF93e z4mkBEShGLHFxdli9josO83X87ojI6st43pVY4GK6KLAjPlb8DWyhBGOO/o6OyYtY/Mfuf saQJzY7REu7xn/F9+zd78RCU6W1uYMlnFACEG8urH4xbEQjRiE9ItiuImReO22LPk8I438 9svFF87iyyhFWN1w1vEyJHSP5rbLTR/AlE7vRbrV1GsvydVihT9K9sd1cuc1+2lnvisHhl uME70Hx0YVQsJ+eM2EjH1LJ3JmiRujIkb7fgqtMzXQ5P33IeKMxv8Atj0Kxu2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758716927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qwTokxt/OMnrdU/d9/96/+7lH/iXBaxj9ouqhoP5E94=; b=hG7haLb/g2BmufEoc6TEpGrAEzBsBT4JvR84QHI4P8Lk7L2gU1YldQUorvK+6WQOvjlO69 W6Ffh58vZZl7G9kH7xNd4V3DNqxqy3F8kfXeX1ffotVXUIgAB/a9SsIqgpOIfMj4JWDm/T Z0BWFnHsd5dmDYKnLuPmVtT/XDTzhSaqP7ua0axEcJ2E+eLLIdHNcsqYlMjRu7RpVzsNeD yBH6mPSo7JLChXWaM82XE1NBOC7wQhnsB3UnfFUp3ubM5JzLE2DCWkU0hhWhE4G+r++y9c +qX1zMKfZwZCATu6kSoBwNe77SBuu5Lo02xRkag+LvOV22oqt2UajsXfh8Kokg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758716927; a=rsa-sha256; cv=none; b=mdaA2kh2T2bQFTPffpxboEJYsMLXkIgWtGO/03LtIfJP9lfFBP8qtfGSEhuJ4ynP8/a0xy bBTUQu7kqOUEMgpyPIZ8NMuNDK1Zuzb/5bxxzd06Zi8O5IKWHQRiCSL+Vhc+VMS4ad1c6W PwPXdtvGCVNYSPhNgeZtSqeSKCgHhAfGf9tp1XytIVqau2gsf4++D3IvBDq/Rqk5/u4l0/ hkHvJbSp9u1wmGX7xWMlv3tIfVlNwM+79zV2ZWbD8iZqljvvsyJuitfpBmvKutwvMr33Tr zlB0lAhbn++T0LzTbhRNi+C4XzcgfastLLfCmH6zNm2B52obGV7sNbXKoDMLDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWx3M2t16zXZR; Wed, 24 Sep 2025 12:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OCSl1d059544; Wed, 24 Sep 2025 12:28:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OCSlkv059541; Wed, 24 Sep 2025 12:28:47 GMT (envelope-from git) Date: Wed, 24 Sep 2025 12:28:47 GMT Message-Id: <202509241228.58OCSlkv059541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 1a9ec72022dd - main - blackhole.4: Describe even better, take two List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a9ec72022ddce0cacb9aedda3d69aa95cd45ed0 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=1a9ec72022ddce0cacb9aedda3d69aa95cd45ed0 commit 1a9ec72022ddce0cacb9aedda3d69aa95cd45ed0 Author: Alexander Ziaee AuthorDate: 2025-09-24 12:26:14 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-24 12:28:24 +0000 blackhole.4: Describe even better, take two I meant to change this to tuexen's suggestion upon commit but failed. MFC after: 3 days Fixes: 9e02de4ad6c3 (blackhole.4: Describe even better) --- share/man/man4/blackhole.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index afa1c37709f3..777a38eedc86 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,12 +10,12 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd September 23, 2025 +.Dd September 24, 2025 .Dt BLACKHOLE 4 .Os .Sh NAME .Nm blackhole -.Nd quietly respond to refused SCTP, TCP, or UDP packets +.Nd quietly drop refused SCTP, TCP, or UDP packets .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" .Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" From nobody Wed Sep 24 12:34:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWx9l6hXGz67n9N; Wed, 24 Sep 2025 12:34: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWx9l5x8Cz3RpS; Wed, 24 Sep 2025 12:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758717259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g+J6O5edePIILXl+Bb9YXX82KNjYvZlqUiTceoEpj3c=; b=i503FOznIVQMId3hGGUprJzgs/cFuQmMy+h9JV+Q72eZbmR7qeZteWiv0gE4WA6PYyE5PU /On14HmD+4IDGO//zB6aJTlz7VRXcmbFYZ1mpYANlwKYmnFZB1ZKX3debbi+KeAVLvEa3L waIS1a/33qpAxPEYbAvACedX5CM5ljdCYI+W+Me0ZO1GwuiuyOI80i6uQyq/diYLqsiKTd 7cEKup+T9MqoeDD5BMk4Gn+ufepgQiaxsive7oBNAoIBohs2uRrb6kDL5V9lEBhS+kpyVq PbXkwdUojzu9S96O2Ib9EE+XjZG9WYMJi4DjWL4DnCfDcxJ7PSeOa4nAovNXQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758717259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g+J6O5edePIILXl+Bb9YXX82KNjYvZlqUiTceoEpj3c=; b=Sz2x9FBIClZVcsKbP9eOsc9U82o2qoqAFy7B9kACqGhBEuhaj/bRd7M7cIrqyL9JVb7yOH UoBxDmD20waEIzqQ+6XbQSaoxll8LfkN4959Smtm5FCNTTjcTLbweESU85UdKgDhP/rex+ 5v7N0Fek8NRqeeQgNF8WF2WX+nSZ6m4xAvqR/N6w8Hhhgn4f5G1vz6TmskZfO/0o5Lp/5J H9vQztcv70iyfUlEw3JkkWeinVS0PzGvtq5CN1PZYLoQDJBGDkf4CB7NEMzye3RuEMZuo8 E4icKJ5tPV3yHNZnaoyBwHTO8ya77mv+sZgvw2pPmjCeKyaFrJGARSM2swk1pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758717259; a=rsa-sha256; cv=none; b=bnQNMcm1O7LvBhdxb8Q3caNaEV8XvtL77IwihNbaSnBfLy1ZI6nHJB20IeSzBUo+XcHlOe 76cDBeusQJCd2klX1l+kQwDMlGMPv8WdMYZznH3kBNCqUIdZ6MYtGIXvfqnBn9o7BHjr9/ EBUUg6fHxzV6GFENCj6My9eZHp1jeHadXdWyH48mjy7udm1M8RFapS280VcGdruFEhmBA8 bjEl5b3V/vdiF5VWhL32EReP1wQ++ba/kqsG6Odhwlmz07dyYKoQ7rQk2IPGKtT1tkyGHG xUSEyn7Mv5grLQqAjCsUlXfJrO67PHebzpMFFtFsgovP/YLvZLXesh4vTbk7IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWx9l5JYlzY1q; Wed, 24 Sep 2025 12:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OCYJ8M076866; Wed, 24 Sep 2025 12:34:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OCYJ7H076863; Wed, 24 Sep 2025 12:34:19 GMT (envelope-from git) Date: Wed, 24 Sep 2025 12:34:19 GMT Message-Id: <202509241234.58OCYJ7H076863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 14cc3e658c4c - main - recoverdisk.1: Fix typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14cc3e658c4ccc382139732b00d5976070300adf Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=14cc3e658c4ccc382139732b00d5976070300adf commit 14cc3e658c4ccc382139732b00d5976070300adf Author: Poul-Henning Kamp AuthorDate: 2025-09-24 12:33:32 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-09-24 12:34:10 +0000 recoverdisk.1: Fix typo Spotted by: lme@ --- sbin/recoverdisk/recoverdisk.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/recoverdisk/recoverdisk.1 b/sbin/recoverdisk/recoverdisk.1 index 90849755ea0c..2eb7ba98348f 100644 --- a/sbin/recoverdisk/recoverdisk.1 +++ b/sbin/recoverdisk/recoverdisk.1 @@ -182,7 +182,7 @@ Keep the drive cool with a fan. .It If possible, power the drive from a laboratory power supply. .It -Do not loose patience: Let +Do not lose patience: Let .Nm run as long as possible. .It From nobody Wed Sep 24 12:46:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWxRJ0wTzz67nnG; Wed, 24 Sep 2025 12:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWxRJ09CCz3TMj; Wed, 24 Sep 2025 12:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758717964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFnKhSw5A9XAzdHLGYaD3lDHxI9DQ9+jWO9zunyc+hQ=; b=Bcp2VEj3fWN+nAPwfBgeQExwIY3NF7SJ2myT4l5xrUsn9l7ttEW5CDbPzvcRR9G9L4enSe kCw2w/t+1L0iEwL2sJ8RVVPsdtZovHcjwj6noyPO6qWQv1YX+tlpjjgC1EbhOfb5BhvpMQ 9UrZcpGAA/aFT6k2VyQpxL6kHleSqIzbzlK7mn47IqnGbb6vCjbkGmvJzhuCResXiZ1iEA BUwjzEwQogSfiAa3lcQ2tM6JnjRkoSf6lZtBRq/utXjjVPKMjS8Bh54eJHqFtwFv7VnY3Z oSH91Slxs0fkkE/3lU8xVi1Mdo2opjQnLmD36IFzf31ydbu4IeGtJI6bBTAjxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758717964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFnKhSw5A9XAzdHLGYaD3lDHxI9DQ9+jWO9zunyc+hQ=; b=goo7iYExCBBeFoTX6e2Ix+Vd0znFNFrKZ+zaTUK6yLF5V9xXmSH+NF4/VGFp5kKhybdouX TMMZ6G0/4zqAmDXmI8wqqSA/9eX0IDydyULurS2JNRQeh9UUMi0BtB0blf5PyArmTTPMWi jvUCOie1JKdvZPDzExxlIGiYrSuFPM3Q+yvoEVvla2F5ssuuu9otAv8MxIetxGE0vGtkQJ X+WAni9XBTwFZLVg8fTvea6u4XuTDcgJBpf/Iwx0lTxYibqUBkdOlJtdLoAi2as//d4+CI 1g/AUSlP/6uYw2B4RQS17T7wEkBldKkBLBuhKX+WctfR3oBWvbfYQDvfBKjnmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758717964; a=rsa-sha256; cv=none; b=hHX8OABi0fc134bsCLhwT4yvcrpaIX33c+rnm5LQwmKbT7f0ptIsimJrVb0O7cJf6FrU0s 2iwls6N/tgcuMwkNqNrxxWQUByBqpU2cSY51tjeCod5v/dIs8XeuUV48WCKw8V0xMryiZ8 N0YmUrdOWsdMLAQZKt4ZaH5RSmIPLfkoUCLlbky+M4UTgdW55PV89wSH3sNdMYpG3L3t8/ 4dfdRBke/3s/Io3vMFtqgd/wOQE59CuVCVhQoCYFiQF5w6SIYXgXC+I8n9EgtZE1gBpsN7 avXJQdJTyrV9hn/DJd5Xu19+LeFrwQc0I4nddY8WVrWpi/7sz10Kc2z4OdVbdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWxRH6jTCzXdk; Wed, 24 Sep 2025 12:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OCk3YM096333; Wed, 24 Sep 2025 12:46:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OCk3Y3096330; Wed, 24 Sep 2025 12:46:03 GMT (envelope-from git) Date: Wed, 24 Sep 2025 12:46:03 GMT Message-Id: <202509241246.58OCk3Y3096330@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 86114bae092b - main - release: Build all cloudware regardless of noroot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86114bae092bd023165e5b9df244fc0849172429 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=86114bae092bd023165e5b9df244fc0849172429 commit 86114bae092bd023165e5b9df244fc0849172429 Author: Colin Percival AuthorDate: 2025-09-24 12:42:11 +0000 Commit: Colin Percival CommitDate: 2025-09-24 12:42:11 +0000 release: Build all cloudware regardless of noroot There are still some minor breakage with NO_ROOT (aka WITHOUT_QEMU) builds but turning all the cloudware on unconditionally will allow for more testing of the build process concurrently with the final bug fixes landing. Discussed with: markj MFC after: 1 week Sponsored by: https://www.patreon.com/cperciva --- release/Makefile.vm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 25c37ade1121..479547f76da1 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -19,10 +19,6 @@ VMDK_DESC= VMWare, VirtualBox disk image QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image -.if defined(WITHOUT_QEMU) -CLOUDWARE_TYPES?= \ - BASIC-CI -.else CLOUDWARE_TYPES?= AZURE \ BASIC-CI \ BASIC-CLOUDINIT \ @@ -30,7 +26,6 @@ CLOUDWARE_TYPES?= AZURE \ GCE \ ORACLE \ VAGRANT -.endif AZURE_FORMAT= vhdf AZURE_FSLIST?= ufs zfs AZURE_DESC= Microsoft Azure platform image From nobody Wed Sep 24 13:02:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWxpZ4hzNz67pZj; Wed, 24 Sep 2025 13:02: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWxpZ41HYz3WML; Wed, 24 Sep 2025 13:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758718966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=frh/NMbS1RzDxnxq6SaMC/A9kQ9VYSpO3JQ5zAvaRzk=; b=BHRuG3bOc1PBwsRmY+x1Ejt/f0YPFYes5U4yxIBojaVqSERnUCN+aCi8Jt5r/Cik6VRgpe UWko07GeBFSDI8TMvnSDxQ9eqkLj76PuwvD7ncrzOG7bn5PsLDsgSbhKxBX9ho71D1ery9 YREpIS6zqkmdZ1fpBt8M5+sf/Xvr6AkgvlKOV9UZRO01QfJDTxWd3/RhbplEte1QlrnNWz VP8JLHhDr1yNRYeP1AjeKOkngLufSogaMfY+GvaVo9zxEB0pYaJIQJyxX090w56eUTJwNu WWTkGW5nrUda62lq+g7g0vPs+b8yrcFin+vOrgqOaQPxRk3240hU2xILs7pcTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758718966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=frh/NMbS1RzDxnxq6SaMC/A9kQ9VYSpO3JQ5zAvaRzk=; b=rnx+buB2k80Jt4Zsr3MWYPabqdEz31MuL6CPzW+k9W+mjV8B6Pe66NPuk9KIWpSMwafvIB ptqoK57uqYXimbNAs/RvWojNU/SbHLbdHduFsTU+71W36OXj/w11E5V7cRb2LSB2/uzhyB VBa6zEyw4/brUmm196uuGY8MsqHfexUcVDa4oTgmCMW2Udye/ShA/sBqXt8Sm7FCMNNKFH 4kJXt2FP9Uj6hkk7suKBDR9K7Pcq36pwqrtB9jX9Dhj9jtcG6LACE9cEMVDQfkIzkiwsWc pVvhK/HLtV+oN9l1l8D3B1DVLbuENiDUuZuIWsFjgyi1aeKglGPVPkRVabAt0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758718966; a=rsa-sha256; cv=none; b=wr0UFxIc9zD9cQrdkfbbs8xo3+Fu00s9/HJGDDEJHHMjRXDFYFnQNgKzLlSHIIrjMEY3b0 GS4oEpagN0XzmNkNY10b11bWp7TTviUW+8AMYXatt19Tl81CbQr2ERTZxJz7X4x4h6zYhx j677zbrW+ppxBrhn3m40Vbfayjqg8IdsEx+ZMCn363HPNo6Frlw/MLp6HmDNUz4NCox9IR vP2uda6cl6Caz1sa3Fqm+wbJyY5TbpQ0gy20iNyS0oWpkJ1EmYByOzppokGE0FibCKke2S 2pCVdORWq4AYHBS+ayYZBv+0KiPjENy2ROoi294HJfEWM7iZ1jKim1xrzUD+rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWxpZ3bFkzYq2; Wed, 24 Sep 2025 13:02:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OD2kfe034404; Wed, 24 Sep 2025 13:02:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OD2kpJ034401; Wed, 24 Sep 2025 13:02:46 GMT (envelope-from git) Date: Wed, 24 Sep 2025 13:02:46 GMT Message-Id: <202509241302.58OD2kpJ034401@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: 50ee990e1874 - main - amd64 cpufunc.h: add rcs(), to read code selector List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50ee990e1874d6d40b8e3dc359c37e2ef2ebf477 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=50ee990e1874d6d40b8e3dc359c37e2ef2ebf477 commit 50ee990e1874d6d40b8e3dc359c37e2ef2ebf477 Author: Konstantin Belousov AuthorDate: 2025-09-19 02:37:14 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-24 13:02:27 +0000 amd64 cpufunc.h: add rcs(), to read code selector Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52607 --- sys/amd64/include/cpufunc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index e6c9f47ea261..9a4c82275a99 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -572,6 +572,15 @@ rss(void) return (sel); } +static __inline u_short +rcs(void) +{ + u_short sel; + + __asm __volatile("movw %%cs,%0" : "=rm" (sel)); + return (sel); +} + static __inline void load_ds(u_short sel) { From nobody Wed Sep 24 13:02:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cWxpc04tlz67pXN; Wed, 24 Sep 2025 13:02: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cWxpb4ygwz3WVF; Wed, 24 Sep 2025 13:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758718967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9hcztIR17zFgXZjL7BNnhEfbKmoP+5hx4xDH1VAGMc=; b=bHIIjyMkrp5GnAWuAOhJ+OVoDqRyPQ0GHc/vaZPlWf8784eiCZhyJwJ3XkQDgGDWL8Q6yI XicI6tnJVKDXoEpgKhQOa85EtXjnwY7XWCEKj1ZWxDZu/n+3Y3nrfTbR3C7AoJ/UsGJSGF St9zXPCK9DjxuL3doJqI9u8XQQf7TDbYl03TDi4NtE2cnpZdsD5OaXfWK2GDb5m3G8g+4M PTWIYBF/hfPEfyEm7Q0KUXvzsOWJKjZcRhq1pFViSOJiQNh+XiJ+BOTwvnrEHBbwaoUkpa mqFZCZzrNN5/5M8PqS5vgpgWmDaUDm2lLsXNX4NriaUX38KwIqn6QLn7VsL1Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758718967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9hcztIR17zFgXZjL7BNnhEfbKmoP+5hx4xDH1VAGMc=; b=X4GsO9BEJVJ9fbzFfsTTYeR1TeEULSGxIcCIlDdLz1AezbNUKRUJmN83YXhwGCdY+7G1lg jNpAHLOv/0uiMemJ4KpkWevK1oIs38lAYY4QCVaLaCJwvokgmt6Cwr9e2GzI+JnZrIzWo5 vh0bachpVcvZ8W93ZRP1j1VYDp8eg9sYbSdmvki63E8zqGELtohwxb+v4HWjWd2OFvXTPn +HRXeCsKdDXbVSquE6+N2ZnmuZxxUrRD6IHSgyKdwY5vNAicrjAwg2CjrCUCbL26l/Bodh zv9kJgmqqSaNg43C2JrKwgMlUV9rWwbovfueD70G6VCP8jXtCjnAHwWN/14l6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758718967; a=rsa-sha256; cv=none; b=j/wptdkebQpD8oPWvqA0KEc9+70mJhEUw8JnJJfpP4hZ61bSi/edlaZo+wYrcs/41OVxmo 2UjZTjdKdiwCAeauJQwUJGcLX4bCSuT3Q8/4ReMFv/gf84Oh396zphyhtEw3NBLGfQzeOq +T6gsSAXRkEmqepUyoGaBnAu6nVRXbOqWTd2phkW2god3gk8gqWK+5eOjeTPVPd1QqRQot r7t+A6CRVgVKZUkpGmLUrx/8iO1Ak2KsKrzBBFmmm5Igu7I9+n/c6N3WCmk6FMQklbIhCc e7Hq0tV1rd10o0ITV+4pIzwBMFn2sUNxD0QERqvHdLqbk7Rb2KADY+3qMREOOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cWxpb4Y8dzYvL; Wed, 24 Sep 2025 13:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OD2lsl034440; Wed, 24 Sep 2025 13:02:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OD2lKo034437; Wed, 24 Sep 2025 13:02:47 GMT (envelope-from git) Date: Wed, 24 Sep 2025 13:02:47 GMT Message-Id: <202509241302.58OD2lKo034437@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: a31969687545 - main - amd64: add wrmsr_early_safe(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a319696875451229f492b6c15e58a0ac54dbcda1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a319696875451229f492b6c15e58a0ac54dbcda1 commit a319696875451229f492b6c15e58a0ac54dbcda1 Author: Konstantin Belousov AuthorDate: 2025-09-18 21:55:19 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-24 13:02:27 +0000 amd64: add wrmsr_early_safe(9) The variant of wrmsr_safe(9) that might work before IDT and curpcb are initialized. Assumes BSP, and that all APs are parked. Before calling wrmsr_early_safe(), the wrmsr_early_safe_start() should be called, afterward wrmsr_early_safe_end() restores the bootenv IDT. Reviewed by: markj Tested by: glebius Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52607 --- sys/amd64/amd64/machdep.c | 33 +++++++++++++++++++++++++++++++++ sys/amd64/amd64/support.S | 16 ++++++++++++++++ sys/amd64/include/md_var.h | 4 ++++ 3 files changed, 53 insertions(+) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 9ff60439d1ec..2fce1a7e64b6 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1822,6 +1822,39 @@ clear_pcb_flags(struct pcb *pcb, const u_int flags) : "cc", "memory"); } +extern const char wrmsr_early_safe_gp_handler[]; +static struct region_descriptor wrmsr_early_safe_orig_efi_idt; + +void +wrmsr_early_safe_start(void) +{ + struct region_descriptor efi_idt; + struct gate_descriptor *gpf_descr; + + sidt(&wrmsr_early_safe_orig_efi_idt); + efi_idt.rd_limit = 32 * sizeof(idt0[0]); + efi_idt.rd_base = (uintptr_t)idt0; + lidt(&efi_idt); + + gpf_descr = &idt0[IDT_GP]; + gpf_descr->gd_looffset = (uintptr_t)wrmsr_early_safe_gp_handler; + gpf_descr->gd_hioffset = (uintptr_t)wrmsr_early_safe_gp_handler >> 16; + gpf_descr->gd_selector = rcs(); + gpf_descr->gd_type = SDT_SYSTGT; + gpf_descr->gd_p = 1; +} + +void +wrmsr_early_safe_end(void) +{ + struct gate_descriptor *gpf_descr; + + lidt(&wrmsr_early_safe_orig_efi_idt); + + gpf_descr = &idt0[IDT_GP]; + memset(gpf_descr, 0, sizeof(*gpf_descr)); +} + #ifdef KDB /* diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 870cd255abb7..27694a95653c 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -1565,6 +1565,22 @@ msr_onfault: POP_FRAME_POINTER ret +ENTRY(wrmsr_early_safe) + movl %edi,%ecx + movl %esi,%eax + sarq $32,%rsi + movl %esi,%edx + wrmsr + xorl %eax,%eax +wrmsr_early_faulted: + ret + +ENTRY(wrmsr_early_safe_gp_handler) + addq $8,%rsp + movl $EFAULT,%eax + movq $wrmsr_early_faulted,(%rsp) + iretq + /* * void pmap_pti_pcid_invalidate(uint64_t ucr3, uint64_t kcr3); * Invalidates address space addressed by ucr3, then returns to kcr3. diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index b6ddc6eaaebe..b6d8c469cdf6 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -99,6 +99,10 @@ void get_fpcontext(struct thread *td, struct __mcontext *mcp, int set_fpcontext(struct thread *td, struct __mcontext *mcp, char *xfpustate, size_t xfpustate_len); +void wrmsr_early_safe_start(void); +void wrmsr_early_safe_end(void); +int wrmsr_early_safe(u_int msr, uint64_t data); + #endif /* !_MACHINE_MD_VAR_H_ */ #endif /* __i386__ */ From nobody Wed Sep 24 14:49:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX0B84YGCz67yrw; Wed, 24 Sep 2025 14:49: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX0B83csSz3lFd; Wed, 24 Sep 2025 14:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758725392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aSESLhQ5w4O3Q6ZorUhS40glrDiBIOCrXmSuSzUQ9L4=; b=In50l4l9RixysdoHGdSp9M+4YVPmto1T/LT8qB1mziPQD/3EEAjMmRnGh4kF1anPPYhD9+ XjQyDIHAy3qViOL1HwH5q0XEa/Z+LMjSL0vpIY0Xq8uqBbjfDfFPABqMJDidP0EwfscSCZ uHlXwhZfOAOn7k0JCKUU0LkQ5qkpVIvdadPl6aanaLmKVOskX4DSv0ofspSG/m6hP1S0MP 20l5lFmouu+d7zvh/30Z10fKCJkuaWuqur8xjpUENS+fbYYwveteDD8KyLp0Mg9eDTbguZ G7JnNS3abI/Im5FDFZyTAJf8tHATcaNhGb3bIStQXwvgC3ImWQFaYhKoBSWpvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758725392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aSESLhQ5w4O3Q6ZorUhS40glrDiBIOCrXmSuSzUQ9L4=; b=UNNOGBhVoSACEpuJEJ9rciFFj7Z0G+tB1ncbdp6Ykj9av9YG5zULWTTCBM0E+daWTvQ5XG E0qA+mkksvFIdawC58jMUoB7AeBGjq+peM6mXZk4+/yqTZ+4ALUQqrn5oQQTdHF7j5Eiu6 bX71tKo3ZuwbwoRu/ImkWjPuCF4HL+zgU1swKvXkNaQ5JdZ11Font5PU2P8evVq9TFfP/i vseoC0oObF15jAR6O9Tq/WJ7HEMt1IQtpfoiDhp/RPy89mjeSUi4YgwE/wx4KnMMEVFrHG yDKVr574WefwIerVZw6UKCVZ73LoJsUG08Pc8mpn0adqitcwCdfBYLGYj7OoJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758725392; a=rsa-sha256; cv=none; b=vbHDanwsaRY08qj4K6f6QU++oZnj23Sh+HetgWS3oRcJYffuT3w8zPd+Ll+W7JAwRCy9ye hQCiIvXEe3KyaPN741+t5uT9YqOlSZvUIqVgcMagamjbTVAFf+egv9k7GmPn1sPxv7DPwc vC95+YvknFt9L8GKpigNPR09Td9J2VO3oikgRSvoWobZZdKvcP/1yvQpknKKy3apmnjzKQ yy8+lbD/uukg2wz3wO0gmfL5N228b4IeW1XiCExa+dHUG4yLX2riKuoIxOAvanfYAgnIvL Ys7AuAJDmy8ZvHe33kdRO0tNnm3vAXzLpmfkqk0z9FMaIRekoOBaNiPSgw2JMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX0B835zBzc5Q; Wed, 24 Sep 2025 14:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OEnqjo023742; Wed, 24 Sep 2025 14:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OEnqLh023739; Wed, 24 Sep 2025 14:49:52 GMT (envelope-from git) Date: Wed, 24 Sep 2025 14:49:52 GMT Message-Id: <202509241449.58OEnqLh023739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Benedict Reuschling Subject: git: 2f031534d134 - main - recoverdisk.1: Break lines at sentence stops List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bcr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f031534d1347816a7889674b363975d181f8449 Auto-Submitted: auto-generated The branch main has been updated by bcr: URL: https://cgit.FreeBSD.org/src/commit/?id=2f031534d1347816a7889674b363975d181f8449 commit 2f031534d1347816a7889674b363975d181f8449 Author: Benedict Reuschling AuthorDate: 2025-09-24 14:47:56 +0000 Commit: Benedict Reuschling CommitDate: 2025-09-24 14:47:56 +0000 recoverdisk.1: Break lines at sentence stops While here, remove whitespaces at end of lines. Event: EuroBSDcon 2025 Devsummit --- sbin/recoverdisk/recoverdisk.1 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sbin/recoverdisk/recoverdisk.1 b/sbin/recoverdisk/recoverdisk.1 index 2eb7ba98348f..76085f3ceb41 100644 --- a/sbin/recoverdisk/recoverdisk.1 +++ b/sbin/recoverdisk/recoverdisk.1 @@ -55,7 +55,7 @@ sessions can be resumed, for instance when a marginal source hard-disk shuts down. .Pp The work-list is initialized with a single item which covers the entire -.Ar source +.Ar source and .Nm always chips away at the first item on the work-list. @@ -71,9 +71,9 @@ is specified, the corresponding range is filled with '_UNREAD_'. .Pp The first pass attempts to read everything in "big-size" chunks, the second pass reads in "medium-size" chunks and third and subsequent -passes read in "small-size" chunks. This three stage process is -an attempt to optimize the case where only a few bad blocks exist -on +passes read in "small-size" chunks. +This three stage process is an attempt to optimize the case where only +a few bad blocks exist on .Ar source . If too many read-errors are encountered, .Nm @@ -103,7 +103,8 @@ every minute. .It Fl l Ar log-file Each successful read is logged with timestamp, offset and length. .It Fl t Ar totalsize -How many bytes should be recovered. The default is what +How many bytes should be recovered. +The default is what .Dv DIOCGMEDIASIZE reports for character and block devices or .Dv st_size @@ -117,14 +118,16 @@ this long between reads. This reduces the load on the device and the system in general. .It Fl p Ar pause .Xr sleep 3 -this long whenever a read fails. This makes the +this long whenever a read fails. +This makes the .Ar source device look less sick to the operating system. .It Fl u Ar pattern By default blocks which cannot be read are filled with the pattern .Ql _UNREAD_ -in the output file. This option can be used to specify a different -pattern. If the pattern is the empty string, nothing is written. +in the output file. +This option can be used to specify a different pattern. +If the pattern is the empty string, nothing is written. .It Fl v Produce a detailed progress report with ANSI escapes and UTF-8. .El @@ -192,7 +195,7 @@ is a problem, use a USB-(S)ATA adapter instead. The .Nm source code is deliberately written to be easily portable to -older versions of +older versions of .Fx and to other operating systems. .It @@ -233,7 +236,7 @@ to the size of a track. The .Nm utility first appeared in -.Fx 7.0 +.Fx 7.0 because Somebodyâ„¢ forgot to make a backup copy. .Sh AUTHORS .An -nosplit From nobody Wed Sep 24 15:04:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX0W16QVJz6808f; Wed, 24 Sep 2025 15:04: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX0W15rBMz3nPQ; Wed, 24 Sep 2025 15:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758726269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyPVVN8OIPoIFXLax/+A6ElQn9w4H0w8GDnMNzBzj/U=; b=kiiKsjWGcYnpl8OkBtbhYmiGnWAuwhcVsJ3EJr+Mg5kjaE7ikzABz80j6xRV/yuofcsoBr 07btbUtW+SpjTwtLk/HlkBoyrpjvZ4jHp3DWZ1NvIarcyh6eqI+ihNmuKkXBH5/Cfp0Jlu YyV5dWl21xgm4+avwBFMsOZeeYWrFFefikf3FJAuj5y5OmSvTnHb7hygoIClXeUAqYHuGK P73/TngI16N4GvSBeOBY0/8Hoy8g1LqKgPXs3cwudAhPXBAmVCDPqbdr4eU2G6ELlDnlZq I5KQEh5ETFrKQ3gzvCMOSPdKsStK2hZl0mod9dNvH3G9xOLOX4rGz/mA3jBS2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758726269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyPVVN8OIPoIFXLax/+A6ElQn9w4H0w8GDnMNzBzj/U=; b=vp031jg74WFSaC92UVexhnaKGIIUeWCuxWNOxcBfGtGOilUV81opHArejdyLcdmv+IYq+i mnLUVKzpVOMlyuZlV2xOgd4CkhVfFE67G788lEvSlGjsZuxatN+zfg2t9BBrU9ozjIp1Xi ACyJN/vHnQK2c1vofRXpgn5N4HA45q/RiQwvtTfx7a20gVEk+6j9wcifMcE0YyAY8vcHu6 Zg6DpPN+/v3bBXvlB5FdrXzDIIjWZzYhODvNqaqDjeJuDTbrzICmHRxHY9qHIMgNk1iQoH XYujA7SuBnMahkey5CVug2cuci/Z0fcRLl5eIe91tm9VMJigta5Kd8VdgK05NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758726269; a=rsa-sha256; cv=none; b=BpbIw7v7hqFviF6ac7FtX21/BV+fqZdCjMHG4po+n1kquQ46T1Gw3IhOdjmyG4YYWwvKXt EpIHVr5K0jO1ekrlsDmUm04f1ufnXA72ibEfiR8JNzsx5rA365cWX0DaHgfF6sInBokdyZ 5qcD+n6JmpGXz90x6jHSWMKzhDIwJDCRUbhNA5tAXH9nLMWX4QsLu32+pH9I+acuUNl2NN 4YUYmsmnukfGFi3R4Y5R8+H0yVKw9SPNi0vPjL8QgM45FaYGOGhzvG6EavkKjTuS4SCnHo 0KAEUP0D5BFuKhhLUSBdgC0vUMqcpMdgQc2Y++9DOmS5DsfM84DTbAXNiQPJVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX0W15Q8Yzd1Q; Wed, 24 Sep 2025 15:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OF4Th9060370; Wed, 24 Sep 2025 15:04:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OF4TLU060367; Wed, 24 Sep 2025 15:04:29 GMT (envelope-from git) Date: Wed, 24 Sep 2025 15:04:29 GMT Message-Id: <202509241504.58OF4TLU060367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 57d5a8feda3f - main - ng_tty: don't increment m_data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57d5a8feda3fd25a650eaab5998db13633d62d2d Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=57d5a8feda3fd25a650eaab5998db13633d62d2d commit 57d5a8feda3fd25a650eaab5998db13633d62d2d Author: Ahmad Khalifa AuthorDate: 2025-09-24 15:01:57 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-24 15:03:12 +0000 ng_tty: don't increment m_data Stop incrementing m_data so the callee can read the mbuf. MFC after: 3 days Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D52702 --- sys/netgraph/ng_tty.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index 6f8667c664bb..c7d8a1b64eac 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -485,9 +485,7 @@ ngt_rint(struct tty *tp, char c, int flags) } /* Add char to mbuf */ - *mtod(m, u_char *) = c; - m->m_data++; - m->m_len++; + *(u_char *)mtodo(m, m->m_len++) = c; m->m_pkthdr.len++; /* Ship off mbuf if it's time */ From nobody Wed Sep 24 16:44:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX2kq1dgDz686k8; Wed, 24 Sep 2025 16:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX2kq0vmZz40Tq; Wed, 24 Sep 2025 16:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758732291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KBbi0zuKA/CCp+WUfrr7SPvX+oqaZtyDUwi9kmLAJf8=; b=igDaUqSm4/38g6JOHv0Rx+FDJcjdDTDRBIhdJmbV9I/7fUf5rUv8yjlP0ryM8fcDF13laR E8qRcSc26q0/Cuw1g5vlf2v+d9cWmIaTtdhhp0P+LBvKjGikB+PwCMRz2PYS8ELsVz3ChA qmI3fU11R+WhUQasroypxtMf3CDbiZISJXHlegMkqGnVVGOmhW7QAFsZYCrKkNkkGrc1Xv w7K/vHXF3baHugevkgYLPuMP7vSIqn01CZigd0g9klmSZx4PV5VOaJmEj6CWkTYFBiqqS6 wU1wBsu/pvuO+oIfGueZ347Eavud03FFcEDQPQ2GgCoDEDvxzbMLKH/SbVwoLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758732291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KBbi0zuKA/CCp+WUfrr7SPvX+oqaZtyDUwi9kmLAJf8=; b=W289oUNImufsKL8HGkgpYXq37v48x7FFWIfD7ecnXg+GBMZJLlNjpLyUDhpa4hsAXK0h4u Q3bDzzSacv9BiUlPrAaV4aZtwVdlh1rnxW6/sWphL3sCDstzLqTwuA72ockkFeHt5sKelE bmsfBD+eOmQNAqlOS8AQ1OlM7py1G0ItlsPtKBvVYXNB5cbchcsNvf0bOsD3Pa8Obw5enI YeJ1ZcTY6C5x3YrkjR+M5wf2jBT456TZLYjx+HH5sM6I+BbesoaBUmIE8b/p8gimWDQb1T sShBmHlOzlz87LRRYyNymscmqe5ispIhXGEefWJnwv6e3XtPC7J0cOGpbR6q5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758732291; a=rsa-sha256; cv=none; b=xus9ADphNScpvP6qXAa3thMyHu7wAn9ss+SHIunK69IU379/nSa0XtwTi/PcVgB6Txf3OZ iUePXhhNkQ0Jo28/7vsIuz8VX1M7lOvsi1fwrE7tOC/Y8AQJKFp41ubIdeRosKUQmi2IcR i3NOQ3LFxy1lkz8GHOgf9nhSyxr/EFU7iMoPH/X/OeYNOj8f+KMNdE3aTzYZrqRFZrsjRP 8h6eFtR7I7TH96ovzR+ygJMVKwRmBOC2W/c+u7nOxutQCxkY0qrrNmrKyQU8lirZOeEeAz Hz8glJzVZvWW7J+WcE2lUOrrOVohzzh/lvnoy1w4uBH94z9cPIbbSblZR+Fuig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX2kq0VK5zgln; Wed, 24 Sep 2025 16:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OGioHq048011; Wed, 24 Sep 2025 16:44:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OGio1p048008; Wed, 24 Sep 2025 16:44:50 GMT (envelope-from git) Date: Wed, 24 Sep 2025 16:44:50 GMT Message-Id: <202509241644.58OGio1p048008@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: 2352b89d2f73 - main - nanobsd: Fix regressions from last cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2352b89d2f732e3fa33fbd494267f0d4cb917e51 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2352b89d2f732e3fa33fbd494267f0d4cb917e51 commit 2352b89d2f732e3fa33fbd494267f0d4cb917e51 Author: Warner Losh AuthorDate: 2025-09-24 15:43:42 +0000 Commit: Warner Losh CommitDate: 2025-09-24 15:43:42 +0000 nanobsd: Fix regressions from last cleanup c99bb5747f5e changed ( ) grouping into { }, but in these cases we chdir and depended on the subshell not changing it for the caller. Restore the old behavior. It seems to work w/o this change, true, but the old code was intentionally like this. Fixes: c99bb5747f5e Sponsored by: Netflix --- tools/tools/nanobsd/defaults.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 4f0cc2fa99bd..588758154c98 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -253,13 +253,13 @@ nano_global_make_env() { # Create empty files in the target tree, and record the fact. All paths # are relative to NANO_WORLDDIR. # -tgt_touch() { +tgt_touch() ( cd "${NANO_WORLDDIR}" for i; do touch $i echo "./${i} type=file" >> ${NANO_METALOG} done -} +) # # Convert a directory into a symlink. Takes two arguments, the @@ -267,7 +267,7 @@ tgt_touch() { # directory is removed and a symlink is created. If we're doing # a nopriv build, then append this fact to the metalog # -tgt_dir2symlink() { +tgt_dir2symlink() ( local dir=$1 local symlink=$2 @@ -277,7 +277,7 @@ tgt_dir2symlink() { if [ -n "$NANO_METALOG" ]; then echo "./${dir} type=link mode=0777 link=${symlink}" >> ${NANO_METALOG} fi -} +) # run in the world chroot, errors fatal CR() { @@ -766,14 +766,14 @@ cust_allow_ssh_root() { ####################################################################### # Install the stuff under ./Files -cust_install_files() { +cust_install_files() ( cd "${NANO_TOOLS}/Files" find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio ${CPIO_SYMLINK} -Ldumpv ${NANO_WORLDDIR} if [ -n "${NANO_CUST_FILES_MTREE}" -a -f ${NANO_CUST_FILES_MTREE} ]; then CR "mtree -eiU -p /" <${NANO_CUST_FILES_MTREE} fi -} +) ####################################################################### # Install packages from ${NANO_PACKAGE_DIR} From nobody Wed Sep 24 18:54:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX5cd4RMtz68HfV; Wed, 24 Sep 2025 18:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX5cd3fwhz4Cc2; Wed, 24 Sep 2025 18:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758740081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I0m2VESsZO876cs4zV43aS02lObJYvvdyWckzTHUxGU=; b=yFzbpyfT/N2ygWHZj5oCFYt9oKuUV+UJs8kZ934/QjdIE67QxrCEptNMEwQkRW6v7k8LzL 20FI4lUOMrIHorZ+HO0e90A0orRImt6fJ3CmtsCpvTTekoNx3/55yYDLPgJ4hnSprByBdr 7O9XHuIZuHdowvJNrI+U7WhgUpHhtv0pXgU+aNVg5JeDYO+04RVe91TUMuMkb+LWlbKPs0 P1i9ObZn2nnwuI10jzc9+n2Y5+Ry+ynVxn9hJZ6nZ4ATYX1+H8eqTFkZKReqjZd7rqCgEb P37KKIFkmD4EiyU8ds39ZLOTQV9GNNJfOR9yfdDsLUoR05VvvMxbueoWpiyXVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758740081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I0m2VESsZO876cs4zV43aS02lObJYvvdyWckzTHUxGU=; b=gzvoDlyt0r/eFz7CrxPBHqo7ttTfyy9gbSsnIZngKrEAcdu1duvxhAUSwxL2SHPhirnV1d bc9dfbiIyaTMB8qm/1o6CXq/eQ4mh57DQChwB2gekR05EuyMcW3q3UXLdxt00j/rcE6CZf F1BMzyBTLnDwtLSVG1fI92MvBtrfpn+mb/Zr8hduWvWIBNHuuoF+htZbgh/P6mpndAr3Ae f4Dg1rL9XnnUCrkvb1JMPtUDthUScJ+hqq3LX48mUb4B+J+M/uPfYAEd7THk5nH5hoFREb CVNB4c44oiALgGZA8GIeRb3BOE9pwYmsDS3CgTolHG0Wy8g9DYskBLcUpP9SEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758740081; a=rsa-sha256; cv=none; b=QDlf0GAvOJgHwNvgbbYqvuQSWm0ySNlv29fjW6hVeNxtZ4X5+mYFnWUBo21RJk8/ZO3FqF ueu+fuczZ2RLIWwoQc/0vTteLbYYBhtPIn8Q4k4GUfH1TIFEcp6VYH+mHK4kid2eZL4HiT UIBktY7+rB7v3olyLr5zvOcDBIkmsSOj+CRC/8QR2j03nextsQE4yRFBZQqzgYyBkXbfKX 7i2QFz9hsyL6EGdNcMsL8nAmx+4xsyjvReen6ZhED5G6NM6tvBi2neMg9kTYQs4oXcio9G D3NE7ACWbvZmhJl+Gh4Op2C2HDQovTYkZgRadvCFvY3eMSsSeyJS6XRs6t3x8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX5cd2nkMzk6R; Wed, 24 Sep 2025 18:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OIsftG092315; Wed, 24 Sep 2025 18:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OIsfga092312; Wed, 24 Sep 2025 18:54:41 GMT (envelope-from git) Date: Wed, 24 Sep 2025 18:54:41 GMT Message-Id: <202509241854.58OIsfga092312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 014647a30ff4 - main - packages: Add some missing dependencies List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 014647a30ff4c76a99962ee6b079db0d9cdf5949 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=014647a30ff4c76a99962ee6b079db0d9cdf5949 commit 014647a30ff4c76a99962ee6b079db0d9cdf5949 Author: Lexi Winter AuthorDate: 2025-09-24 18:39:35 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 18:39:35 +0000 packages: Add some missing dependencies * at requires cron, since atrun is started by cron and won't work without it, and also requires runtime because at runs jobs under /bin/sh. * bluetooth requires ppp for rfcomm_pppd (a very common use case). * bsdconfig and bsdinstall are written in shell script and therefore require /bin/sh. * devd requires /bin/sh to invoke its hooks. While here, document the policy for adding dependencies in the README. This will hopefully ensure we end up with consistent dependencies. MFC after: 1 day Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52699 --- release/packages/ucl/README | 29 +++++++++++++++++++++++++++++ release/packages/ucl/at.ucl | 33 +++++++++++++++++++++++++++++++++ release/packages/ucl/bluetooth.ucl | 28 ++++++++++++++++++++++++++++ release/packages/ucl/bsdconfig.ucl | 25 +++++++++++++++++++++++++ release/packages/ucl/bsdinstall.ucl | 25 +++++++++++++++++++++++++ release/packages/ucl/devd.ucl | 25 +++++++++++++++++++++++++ 6 files changed, 165 insertions(+) diff --git a/release/packages/ucl/README b/release/packages/ucl/README index 85b6130c0488..6f1bdb065764 100644 --- a/release/packages/ucl/README +++ b/release/packages/ucl/README @@ -19,3 +19,32 @@ In general, dependencies and post-install scripts should be added in the package-specific manifests, while comment and description should be set in the "-all" manifest. +Policies for package dependencies: + +* If a package requires a shared library from another package, do not add a + dependency, unless pkg(8) doesn't detect the dependency automatically for + some reason (which may happen if the library is loaded with dlopen() at + runtime). + +* If a package contains rc(8) scripts, do not add a dependency on "rc". + Installing "rc" is optional. + +* If a package contains hooks intended to be invoked from devd, do not add + a dependency on "devd". Like rc, devd is optional. The exception is if + the package doesn't work at all without devd, in which case a dependency + is warranted. + +* If a package contains cron(8) jobs in /etc/cron.d, do not a dependency + on "cron", unless the package doesn't work at all without cron. + +* If a package contains periodic(8) reports, do not add a dependency on + "periodic", unless the package only contains periodic reports. + +* If a package contains shell scripts, and the script is *not* one of the + previously mentioned examples (rc, devd, etc.), add a dependency on + "runtime" for /bin/sh. + +* Otherwise, if one component of a package requires another package to work, + add a dependency on the other package even if not everything in the package + requires that dependency. Users expect that all of a package will work + after installing it. diff --git a/release/packages/ucl/at.ucl b/release/packages/ucl/at.ucl new file mode 100644 index 000000000000..25724adfd7af --- /dev/null +++ b/release/packages/ucl/at.ucl @@ -0,0 +1,33 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +deps { + # atrun relies on cron to work. + "cron" { + version = "${VERSION}" + origin = "base" + }, + + # at(1) passes the command to /bin/sh + "runtime" { + version = "${VERSION}" + origin = "base" + }, +} + + diff --git a/release/packages/ucl/bluetooth.ucl b/release/packages/ucl/bluetooth.ucl new file mode 100644 index 000000000000..c87d5e9c8420 --- /dev/null +++ b/release/packages/ucl/bluetooth.ucl @@ -0,0 +1,28 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +deps { + # rfcomm_pppd(8) uses ppp(8) + "ppp" { + version = "${VERSION}" + origin = "base" + }, +} + + + diff --git a/release/packages/ucl/bsdconfig.ucl b/release/packages/ucl/bsdconfig.ucl new file mode 100644 index 000000000000..752c352ae904 --- /dev/null +++ b/release/packages/ucl/bsdconfig.ucl @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +deps { + # bsdconfig is written in shell script, so it needs /bin/sh + "runtime" { + version = "${VERSION}" + origin = "base" + }, +} diff --git a/release/packages/ucl/bsdinstall.ucl b/release/packages/ucl/bsdinstall.ucl new file mode 100644 index 000000000000..6e5cbce4e342 --- /dev/null +++ b/release/packages/ucl/bsdinstall.ucl @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +deps { + # bsdinstall is written in shell script, so it needs /bin/sh + "runtime" { + version = "${VERSION}" + origin = "base" + }, +} diff --git a/release/packages/ucl/devd.ucl b/release/packages/ucl/devd.ucl new file mode 100644 index 000000000000..8d83ab9ee020 --- /dev/null +++ b/release/packages/ucl/devd.ucl @@ -0,0 +1,25 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +deps { + # devd uses /bin/sh to invoke hooks. + "runtime" { + version = "${VERSION}" + origin = "base" + }, +} From nobody Wed Sep 24 18:54:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX5cf4pwCz68HXY; Wed, 24 Sep 2025 18:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX5cf3dY5z4CW1; Wed, 24 Sep 2025 18:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758740082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jr7pBldjN9mDy/XOay14v2ZS5vhykkv/jWt9+h/yQ+8=; b=ssggg+kRUkOfNoYN4TtZ0qstXQca1GL5OvHByXBBaKRZ0AHn7TQ2/CnUwy1IxchmauXC5+ eiMnBxYDDBcpQuezG1mQWzBDTqDcKxF/xIO0CNoxpRqg3pE1p/srkZZ4EUzOj5cE8SKnoc 1XxiNdRdCsP+itk/0KiHRRJtZ12MrO4eTyxGgw8BGaO4Fj1YHZh/0hqyp6k60wkvC7bRhy pyYcVna0jy0okE21PYY15ENvFxm15nQAgBW+ZifixZDA8qiZN9JjfseoSdjtk2tNPvSCBh FVp3+qSg7eJlDZVBpUxyCl4Z7ezApVGJJVjY6p/aSyaDoiN6eKgJXrq/oLM5LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758740082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jr7pBldjN9mDy/XOay14v2ZS5vhykkv/jWt9+h/yQ+8=; b=Zk1EmBtxfURmOM9tLeIICcnmyfuO8wxOjYbxvvOaa1t9UV4q+TVzPy2mzV3wi7BWWqSI+/ LNsVq2GyeL09AE7lvSKM4ddcPUPMoLmI4qF9CqbuwwfER/4U9slCb+hbWb3Ysd9UJgRwem gEZloQAZFvo11HEZqT9bxfwYReYYkrtihz8NollPUE0kbejh0MbJG+tLzQbLinEdk1p9h9 B/NCWtHxSEDwczvtMNkjH+lqTNs4cmXhT7SWcSPJUfKrgJeMtB5w3nGmniCZkYc/f4w3p1 z/9GJ0g7PKBDYkMbA0XQ05HCisrUC8FlFuLM1XfCfN20mjTIkxMjBiSycqGgTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758740082; a=rsa-sha256; cv=none; b=mk3SoPsANlIwNhz6DyMLrrpKrackEa2SxJJRfNneBF/diEUEnv7XHEPSrK7tvuuLs6oSsi YVhA0IE4vBoybsJOwvSM2d98T+Gb06QO4ci6FSqGfun5DYBxleWRSPqhz+m7ggYefA7mN6 i+NypytZri3yJ7znJLcwHwDvnGuT71HiqA3L6u+VgJ3wKc+X/6S910K6kQqjQ0NLDEnFLK lxtQzIsJktcg8X5DqjnHXNSk8/d2Gmo0VhnQorpfIJdJMn6T+kzrvhm/piVghn5CTug02a 6DljqG/TuC+LODpkmrHzCxFLnD8C5fTRa5eVfCQXc9HkDUdQPGkwIK0j4vmOww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX5cf3D8gzkQ6; Wed, 24 Sep 2025 18:54:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OIsgwg092350; Wed, 24 Sep 2025 18:54:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OIsgFs092347; Wed, 24 Sep 2025 18:54:42 GMT (envelope-from git) Date: Wed, 24 Sep 2025 18:54:42 GMT Message-Id: <202509241854.58OIsgFs092347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: c7a4cdd09f46 - main - packages: Add descriptions for all packages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7a4cdd09f462922510c24dc49010b1c603c3c1a Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=c7a4cdd09f462922510c24dc49010b1c603c3c1a commit c7a4cdd09f462922510c24dc49010b1c603c3c1a Author: Lexi Winter AuthorDate: 2025-09-24 18:41:39 +0000 Commit: Lexi Winter CommitDate: 2025-09-24 18:41:39 +0000 packages: Add descriptions for all packages Provide at least a basic description of every package we build. Where possible, the description is taken from a relevant manpage; when there was no suitable text in the manpage, I wrote a new description. Since the UCL files now contain a significant amount of English prose which is almost certainly subject to copyright in at least some jurisdictions, add a copyright header to every file. Where the text was taken from a manpage, the copyright and license are also taken from the manpage. A few files don't have copyright headers added because the origin of the text is unclear, or because the files were written by someone else. While here, remove some orphaned UCL files for packages we no longer ship. MFC after: 1 day Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52690 --- release/packages/ucl/acct-all.ucl | 31 ++++++++++++++- release/packages/ucl/acpi-all.ucl | 36 +++++++++++++++++- release/packages/ucl/amd-all.ucl | 4 -- release/packages/ucl/apm-all.ucl | 29 +++++++++++++- release/packages/ucl/at-all.ucl | 29 +++++++++++++- release/packages/ucl/atf-all.ucl | 27 ++++++++++++++ release/packages/ucl/audit-all.ucl | 42 ++++++++++++++++++++- release/packages/ucl/autofs-all.ucl | 29 +++++++++++++- release/packages/ucl/bhyve-all.ucl | 42 ++++++++++++++++++++- release/packages/ucl/blocklist-all.ucl | 28 +++++++++++++- release/packages/ucl/bluetooth-all.ucl | 26 ++++++++++++- release/packages/ucl/bmake-all.ucl | 18 +++++++++ release/packages/ucl/bootloader-all.ucl | 25 ++++++++++++- release/packages/ucl/bsdconfig-all.ucl | 26 ++++++++++++- release/packages/ucl/bsdinstall-all.ucl | 37 +++++++++++++++++- release/packages/ucl/bsnmp-all.ucl | 42 ++++++++++++++++++++- release/packages/ucl/caroot-all.ucl | 32 +++++++++++++++- release/packages/ucl/ccdconfig-all.ucl | 19 ++++++++++ release/packages/ucl/certctl-all.ucl | 33 +++++++++++++++- release/packages/ucl/certctl.ucl | 18 +++++++++ release/packages/ucl/clang-all.ucl | 27 +++++++++++++- release/packages/ucl/clibs-all.ucl | 23 +++++++++++- release/packages/ucl/console-tools-all.ucl | 31 ++++++++++++++- release/packages/ucl/cron-all.ucl | 27 +++++++++++++- release/packages/ucl/csh-all.ucl | 40 +++++++++++++++++++- release/packages/ucl/ctf-tools-all.ucl | 34 ++++++++++++++++- release/packages/ucl/ctl-all.ucl | 41 +++++++++++++++++++- release/packages/ucl/cxgbe-tools-all.ucl | 27 +++++++++++++- release/packages/ucl/devmatch-all.ucl | 18 +++++++++ release/packages/ucl/dhclient-all.ucl | 45 +++++++++++++++++++++- release/packages/ucl/dma-all.ucl | 36 ++++++++++++++++++ release/packages/ucl/docs-all.ucl | 4 -- release/packages/ucl/dtrace-all.ucl | 29 +++++++++++++- release/packages/ucl/dwatch-all.ucl | 37 +++++++++++++++++- release/packages/ucl/ee-all.ucl | 25 ++++++++++++- release/packages/ucl/efi-tools-all.ucl | 37 +++++++++++++++++- release/packages/ucl/examples-all.ucl | 26 ++++++++++++- release/packages/ucl/fd-all.ucl | 28 +++++++++++++- release/packages/ucl/fetch-all.ucl | 27 +++++++++++++- release/packages/ucl/firmware-iwm-all.ucl | 18 +++++++++ release/packages/ucl/ftp-all.ucl | 24 +++++++++++- release/packages/ucl/fwget-all.ucl | 28 +++++++++++++- release/packages/ucl/games-all.ucl | 26 ++++++++++++- release/packages/ucl/geom-all.ucl | 18 +++++++++ release/packages/ucl/ggate-all.ucl | 32 +++++++++++++++- release/packages/ucl/gssd-all.ucl | 19 ++++++++++ release/packages/ucl/hast-all.ucl | 23 +++++++++++- release/packages/ucl/hostapd-all.ucl | 26 ++++++++++++- release/packages/ucl/hyperv-tools-all.ucl | 18 +++++++++ release/packages/ucl/inetd-all.ucl | 18 +++++++++ release/packages/ucl/ipf-all.ucl | 23 ++++++++++++ release/packages/ucl/ipfw-all.ucl | 28 +++++++++++++- release/packages/ucl/iscsi-all.ucl | 26 +++++++++++-- release/packages/ucl/jail-all.ucl | 32 +++++++++++++++- release/packages/ucl/kerberos-all.ucl | 34 ++++++++++++++++- release/packages/ucl/kerberos-kdc-all.ucl | 28 +++++++++++++- release/packages/ucl/kernel-man.ucl | 18 +++++++++ release/packages/ucl/kyua-all.ucl | 34 +++++++++++++++++ release/packages/ucl/lib9p-all.ucl | 21 ++++++++++- release/packages/ucl/libarchive-all.ucl | 34 ++++++++++++++++- release/packages/ucl/libbegemot-all.ucl | 41 ++++++++++++++++++++ release/packages/ucl/libblocksruntime-all.ucl | 23 +++++++++++- release/packages/ucl/libbsdstat-all.ucl | 19 ++++++++++ release/packages/ucl/libbsm-all.ucl | 34 ++++++++++++++++- release/packages/ucl/libcasper-all.ucl | 25 ++++++++++++- release/packages/ucl/libcompat-all.ucl | 22 ++++++++++- release/packages/ucl/libcuse-all.ucl | 30 +++++++++++++++ release/packages/ucl/libdwarf-all.ucl | 28 ++++++++++++++ release/packages/ucl/libevent1-all.ucl | 19 ++++++++++ release/packages/ucl/libexecinfo-all.ucl | 19 ++++++++++ release/packages/ucl/libldns-all.ucl | 26 +++++++++++-- release/packages/ucl/liblzma-all.ucl | 19 ++++++++++ release/packages/ucl/libmagic-all.ucl | 23 +++++++++++- release/packages/ucl/libpathconv-all.ucl | 19 ++++++++++ release/packages/ucl/librpcsec_gss-all.ucl | 42 ++++++++++++++++++++- release/packages/ucl/librss-all.ucl | 1 + release/packages/ucl/libsdp-all.ucl | 19 ++++++++++ release/packages/ucl/libsqlite3-all.ucl | 19 ++++++++++ release/packages/ucl/libstdbuf-all.ucl | 35 +++++++++++++++-- release/packages/ucl/libstdthreads-all.ucl | 22 ++++++++++- release/packages/ucl/libthread_db-all.ucl | 21 ++++++++++- release/packages/ucl/libucl-all.ucl | 19 ++++++++++ release/packages/ucl/libvgl-all.ucl | 54 ++++++++++++++++++++++----- release/packages/ucl/libvmmapi-all.ucl | 21 ++++++++++- release/packages/ucl/liby-all.ucl | 25 +++++++++++-- release/packages/ucl/libyaml-all.ucl | 19 ++++++++++ release/packages/ucl/lld-all.ucl | 25 ++++++++++++- release/packages/ucl/lldb-all.ucl | 19 ++++++++++ release/packages/ucl/locales-all.ucl | 22 ++++++++++- release/packages/ucl/lp-all.ucl | 29 +++++++++++++- release/packages/ucl/mandoc-all.ucl | 22 ++++++++++- release/packages/ucl/manuals-all.ucl | 4 -- release/packages/ucl/mlx-tools-all.ucl | 35 ++++++++++++++++- release/packages/ucl/mtree-all.ucl | 28 +++++++++++++- release/packages/ucl/natd-all.ucl | 28 +++++++++++++- release/packages/ucl/netmap-all.ucl | 29 +++++++++++++- release/packages/ucl/newsyslog-all.ucl | 22 +++++++++++ release/packages/ucl/nfs-all.ucl | 34 ++++++++++++++++- release/packages/ucl/ntp-all.ucl | 39 ++++++++++++++++++- release/packages/ucl/nuageinit-all.ucl | 27 +++++++++++++- release/packages/ucl/nvme-tools-all.ucl | 25 ++++++++++++- release/packages/ucl/openssl-all.ucl | 37 +++++++++++++++++- release/packages/ucl/periodic-all.ucl | 18 +++++++++ release/packages/ucl/periodic.ucl | 18 +++++++++ release/packages/ucl/pf-all.ucl | 30 +++++++++++++++ release/packages/ucl/pkg-bootstrap-all.ucl | 22 ++++++++++- release/packages/ucl/ppp-all.ucl | 20 +++++++++- release/packages/ucl/quotacheck-all.ucl | 35 +++++++++++++++++ release/packages/ucl/rc-all.ucl | 18 +++++++++ release/packages/ucl/rcmds-all.ucl | 19 ++++++++++ release/packages/ucl/rcmds.ucl | 18 +++++++++ release/packages/ucl/rdma-all.ucl | 25 ++++++++++++- release/packages/ucl/rescue-all.ucl | 22 ++++++++++- release/packages/ucl/resolvconf-all.ucl | 18 +++++++++ release/packages/ucl/rip-all.ucl | 21 ++++++++++- release/packages/ucl/runtime-all.ucl | 18 +++++++++ release/packages/ucl/sendmail-all.ucl | 19 ++++++++++ release/packages/ucl/sendmail.ucl | 18 +++++++++ release/packages/ucl/smbutils-all.ucl | 28 +++++++++++++- release/packages/ucl/src-all.ucl | 19 ++++++++++ release/packages/ucl/src-sys-all.ucl | 19 ++++++++++ release/packages/ucl/ssh-all.ucl | 36 +++++++++++++++++- release/packages/ucl/syscons-data-all.ucl | 19 ++++++++++ release/packages/ucl/syslogd-all.ucl | 25 ++++++++++++- release/packages/ucl/tcpd-all.ucl | 33 +++++++++++++++- release/packages/ucl/telnet-all.ucl | 29 +++++++++++++- release/packages/ucl/tests-all.ucl | 18 +++++++++ release/packages/ucl/toolchain-all.ucl | 21 ++++++++++- release/packages/ucl/ufs-all.ucl | 35 ++++++++++++++++- release/packages/ucl/unbound-all.ucl | 30 ++++++++++++++- release/packages/ucl/utilities-all.ucl | 21 ++++++++++- release/packages/ucl/vi-all.ucl | 18 +++++++++ release/packages/ucl/vt-data-all.ucl | 18 +++++++++ release/packages/ucl/wpa-all.ucl | 44 +++++++++++++++++++++- release/packages/ucl/yp-all.ucl | 21 ++++++++++- release/packages/ucl/yp.ucl | 18 +++++++++ release/packages/ucl/zfs-all.ucl | 44 +++++++++++++++++++++- release/packages/ucl/zoneinfo-all.ucl | 18 +++++++++ 138 files changed, 3403 insertions(+), 182 deletions(-) diff --git a/release/packages/ucl/acct-all.ucl b/release/packages/ucl/acct-all.ucl index ac4bd8868511..a96e3cc08471 100644 --- a/release/packages/ucl/acct-all.ucl +++ b/release/packages/ucl/acct-all.ucl @@ -1,4 +1,31 @@ -comment = "System Accounting Utilities" +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "System resource accounting" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Advanced Configuration and Power Interface (ACPI) utilities" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Intel / Microsoft APM BIOS utility" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Scheduled and batch command utilities" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "File system automounter" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Network blocklist daemon" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Bluetooth support" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Program maintenance utility" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "System boot loader" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "System configuration utility" + desc = < All rights reserved. + * Copyright (c) 2018 Roberto Fernandez Cueto + * Copyright (c) 2024 The FreeBSD Foundation + * + * Portions of this documentation were written by Björn Zeeb + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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. + */ + +comment = "System installer" + desc = < + * + * 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. + */ + +comment = "Simple and extensible SNMP daemon" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Mozilla Root Store trusted TLS certificates" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Concatenated disk driver (ccd) configuration utility" + desc = < + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted providing 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. + */ + +comment = "Tool for managing trusted and untrusted TLS certificates" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + deps { "openssl": { version = "${VERSION}" diff --git a/release/packages/ucl/clang-all.ucl b/release/packages/ucl/clang-all.ucl index e0fe8f35f40e..e0372940ed42 100644 --- a/release/packages/ucl/clang-all.ucl +++ b/release/packages/ucl/clang-all.ucl @@ -1,7 +1,30 @@ -comment = "Clang Utilities" +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "The Clang C, C++, and Objective-C compiler" + desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Core runtime libraries" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF *** 3934 LINES SKIPPED *** From nobody Wed Sep 24 19:56:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX6zt497hz68MSW; Wed, 24 Sep 2025 19:56: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX6zt3W31z4JQd; Wed, 24 Sep 2025 19:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758743786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kO348Wiw5Up5ZbURAwNIYCln13j7xP5i1z7GR7nBC9w=; b=vW4h/6UImoWzXWtyhIckUAey4VZJwHx+FSD3r/+bqlLoVEMCK6Ecxixr/DvoejgsyLK7hl fOa1Za9Y7WhZ6Ts/OHs1hMzOzu7arzzu5DOhQZNsJ+a+SOTa1IqJYf4yzbxa7GvoRy335D 3zY+6T4/Wa8QIbHYxI/oedJgzhEoonLvP0xadayAOJUCHM7x9FsOS8dt3MVh0skz79Iz3S c7jyQhnFV8hhiPu2ZqtMVkE5Sv0ksAUgx7bSeQqi/jAjTIYqWzX4PL/U/2iQO/3dWvS6VA wGJUMIYfhh3A6nTuzl3nHJrt55ZvcF6snR5wO3/bqu24avmV2DgJGOxGOBXTpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758743786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kO348Wiw5Up5ZbURAwNIYCln13j7xP5i1z7GR7nBC9w=; b=Mmo4Z241sCuTPRWSRVz3CccMNJ6EQpDc2dvoDej6rTrLJmIB923SAvO5uW2BHbpY39r7z8 vD5k88gHKegwS2Zj7DCnWaTmHnf/gaNDUkXX8ESmdk6zea6/DydPyG3WWA9QgNytb+Xhb/ FSLHONO8Ux9K4WDCB4MiJHtRzzpjtK4fDnZxISvCcNuQ4wnORWfEpKphYFSDqmoK40OMjv 4r5T1WH/D8hQT/9EBk8fK1ZY4MZGS5OQTOTyWk9L0lhhlt27JOsIqzWyXDHFXMSNbQHTdc eq/q8wagD5JsqB/I0tAd+ZlDnD5o+mWxNte54fphOLV7BjgpB0HoZe54maQt6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758743786; a=rsa-sha256; cv=none; b=Ak3LwE3++jVyqTShsyEeI2DOx50Zh1n1yB1ziDP4ZzpEApO/29TKUCjnNxFBDRevvXsgZ+ GKffSgQjvEDWdabY78qpbQjtcxwYVp4Ez1HHPBo7+v9JkcIyAPCLHxU2qvgMDww9aluKNa 3AYKvjyXxLmfvitVSlMcQJXVGEj42lNVI91PQFgZ+1IJxVu+OuTMGu1yfL+4rmgLIL81WF CfHoWrVpIxirhTILR87FnMhfQ7Ai6Ko4P/qHEbuVlYNGeBml5Uzq8imXp1vGwUZki/g8a0 E3HsphvAQaHEz1onD2BH5vOqaFJx45xoTnVYM3x6h9aqJpePZMy7FcgViLxu3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX6zt33qbzmdJ; Wed, 24 Sep 2025 19:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OJuQXS005477; Wed, 24 Sep 2025 19:56:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OJuQZh005474; Wed, 24 Sep 2025 19:56:26 GMT (envelope-from git) Date: Wed, 24 Sep 2025 19:56:26 GMT Message-Id: <202509241956.58OJuQZh005474@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: d466cb731a23 - main - make packages: Fix edge case of no kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d466cb731a2317ec91a89684e9d6a915fdfcc2ff Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d466cb731a2317ec91a89684e9d6a915fdfcc2ff commit d466cb731a2317ec91a89684e9d6a915fdfcc2ff Author: Warner Losh AuthorDate: 2025-09-24 18:41:29 +0000 Commit: Warner Losh CommitDate: 2025-09-24 19:54:51 +0000 make packages: Fix edge case of no kernel When NO_INSTALLKERNEL and NO_INSTALLEXTRAKERNELS are set, or when BUILDKERNELS is empty, we can fail to define the create-kernel-packages make target, which we call unconditionally. So if do not have a kernel staging dir, go ahead and provide an empty create-kernel-packages so that when it's used elsewhere, the build succeeds. This lets me build a tree and package it when I don't have a kernel, for jails and other similar environments. There's no change if any kernels are built, since that will provide the necessary make target that does useful things for that case. Sponsored by: Netflix --- Makefile.inc1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index e98b5f233b51..92570d1d2fb9 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2314,6 +2314,9 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap -r ${KSTAGEDIR}/${DISTDIR} \ -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR} . endfor +.else +create-kernel-packages: .PHONY + .endif .if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes" . for _kernel in ${BUILDKERNELS:[2..-1]} From nobody Wed Sep 24 20:18:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX7TJ0ZTLz68Nsg for ; Wed, 24 Sep 2025 20:18:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-32.consmr.mail.ne1.yahoo.com (sonic301-32.consmr.mail.ne1.yahoo.com [66.163.184.201]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX7TH5nBlz4L76 for ; Wed, 24 Sep 2025 20:18:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=H7e+VrXV; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 66.163.184.201 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758745101; bh=Ikl/NsRXrBX+n9R6iNzWZdr4RwGo7gst253QvZR55D0=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=H7e+VrXVG+QVBsztGTX13jQO+289B3d6cipMyRwuK0lldrnwA+5ZzTyT3cz3FI34hE7plIBQ7xCw3okKNG44XomRvtgBFqzwoTZfqrZF/aA00NpxzRqy97Uwg3YzgS52UrWfiMG9Fp6jD6RAR/i/MW8p1c3BMjvd4Je0wbKXNQ2cLIoxa9T4LqNAZPxeAKYVHXo+9oxjS7jRsMeIerNSyXMsE1NGAzGEbFp6HOG3ybD7ys3VjadsI9GuX7lQZ4Lq7ffMRFmJBLQxcCHEatZSLBvY3vdwtkUG1lH+GZxNRNsjmDKqnRq4w/g+W7xKTm/FiPgDbEh8+xZ8UHzJjfjr3g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758745101; bh=TgNxiZMxBLLTQ9/p8ybahjbm2ARtIyz4Dk0UCA5B+OY=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=Xk0Rjz+QXk0C1ikjjz6ZLOoUoVE8xFYyuwHPQvkOWpCCR3iiiluCmvXqYIv3Ut0K0Pdfv9jzVWlNMnAWwqSu+d2L3JFtSMAUMcCZ0lQU1B292TcQNOwhVugZaOIlm2kRhhrE5oMeaRoaa0KGTZv0RrhXbJAneIE1IBc9NplyFwCT9NQ7JkGnsEDhvYLcfRlFIG1q1hALBwEbgCMGnN9Oo5nnpz0iUWBhKgucEiLYoccIAel5+tyFe3i92ZpWlJjR/94rBpnuMc1UKNvDuRu5xDN9rAOsCbOxJrnbOWq6o8KhklT8vIRXuXH5SBvi65ExhIfqI25lvuZjoQsYMj9I6w== X-YMail-OSG: 8H8vr8wVM1mbPuWXE1LlaneEjDuqjh65P5N_XVWKLDrQep7XiQgurUEgMWDSY9H 6BO4GMcFrDKmmvdG1EJO1JYBpwF60FZ5wV8f3MMY.I1URXpqb.zYqTYqet2hGpnBN7feflLi_5w6 .PA2q1fozI0WnKQcenUCUGLFGArJ8N9h0S_OyKWjQwgYNVBN821HHNeNcLyVCx4MK9gQ9PsUTpG_ oTXvN.FevsR84ErNezxJlEw9lsG2UyyVniagG7Goc6LV00YPRo60S2gx1EdNDmGXfojF21iqzX0p _xb7XbgJk0KLSAHTISE9ko2lI42OxreD6wqYURpmmuQ2IfKeOkj7E0SC6MyBJgystOtWWrv8YO.2 0EUzfQ2Pbwg65kpyLFN01BAZKAaSB0C2IgDsU3xOOWJhTG2tiDhvUNdMZvuwBqcheHkz4yLdRfQk bUAylt_vwOPSnGYZSiXNiQ3R0PH.UV29CD6QH_Zuz0fIuTia0Jh3ZbKT0MR1rOFAZVfUzQXdeD06 hsioxIk0Pua_SzX5RQ1uLDuzSK_vE6qKW4kwFfYWuEHRe3H.tI6RucXKamFfejndnunWAVltUOjm Q6tnq7NDh09jnMYy1vcBa4.sSafHayCOGErkjh6H7.h143bxLfvwsYBzZkT4ODz0hfnvtgjw7acU 8DSOZJr9WFERnf3biyLvlz7vjqZQDZoCBGqlBDHPLuJpxGoUeckUOq9j5SZlgwcamgMBNl3VEvEG JMquqNdZA.W8sl1odEKMx19OHKxdH9QwRwfVSmUQN5hUmK.OEO7BbkgfHbcVlyRB_oN1oDJ.uE4z UOhsyXJzCGI1K0wWxR0oETHCgryne17rgxgPiycTbty7cE4ECibfEzD2uxGTi8JiYXZ0snrYuogU lYZtsEnXvAZIKfxJM4d2i6gLdYNHw7isXIKA9Zb04coBrof_wO9mTESjOCtY7V.DxcsrVW1IXck0 LNziBwpTdiTajfB0qErnVXZD8HFnftDwGKDXupgm7a92oMjFnwhhr6fnDNtEmMqWla5U0TG0tDju 1ULZyuVUbPflZc8CjtLbXQ6NRVqwoipxrXCdiOPKI5wmhn9FgCt_GlnlNkh_DVb.SuxEVjLFh8A9 hAuI_xeogikT6z4s2czYv09c27mAEtLFiG_joityYMwbYx9ydfxAux1hxH4EL9ufGUAzGd9Ah4lx BT.sMv4cHOqd.5N8TiV_3kryoElv324o7mV70r_H6ZNw19AfcbZ3fv9YhTyETQsI8NcYa3vNV2UL 4u_7zUBL16nqwrb6s5RXxgXOTOYsd4ET7F2tAWrRTY250ahi0OuRm1t7hCKQlAS1rDDyL.8k4xpR efRN96TywGdTaJU_cbJSvrXgjtgoxS8yX8Qh0_y821Kl4vOt0z83K64pztqYhDVSw4_OdEGql3FX GlMfWuW8jgwHkvEAVxRkTKN_KwObLzNglpF7Klf4Y4dBV6U7vZB0_1YTydo.CqeMVci9YTPG1tEJ LR_iJ0P..m1qQX_iFOh55A_o9eGd7aeo0UYfFDA0latJI_KitSd.XQlRgBeuctIubAQEUoHXYId9 ZXd9_b9wjtEdmR7B2TmGdrZ87hVIWk6TVKgri_EdGigY.aYn7N6Bk2huBxzPUP596dgdXgFTdXLo 5HGBG1j9y2GwdLYiUSubuoqV9bi745Eky95yWO8ndTVmNNZNiMPbI9k5RhlT6x6NkOeUkws.pQSg GRdv3t6g6ciO_W6zZ.e1fjvQnl7R4wIlumTQFZ9fIKeZk_W2EwQaFj0FQPrH_bJ9K4nY0dm9qXrm 3VOeTxReuf_m2RTzbfknxHOBFYluqg2lWu_hv0kBAOQ_FansiVnBquuWELUTOgYpXTPp_2DxQiHf 65kFGwbAm06AilkFJeskOfXe.mM9T5Rq5fSXWugTXA.wBYY7ig9MYdlFtTVHgQ3nWQbBL4lSlYin mOSI15AbnMlxhFLRpSxbpkqU0mFGVJt5dIVNFPPxFE0sNBvE9i._LcA3hbuzqwjDXhiRX1lv.5Jt oEEXApJxEEK5x5VYeSeT9AgPonXlyXDgJqVE_uJkoGiVzKgbAqIhsvnvhVOw_3TbDqD5A67DRJtK 9LfSnT2szpQJzmpeS8gzlRMNDhELa1kytczGozCdTFWJZ1ALGn2AYNYsetPbuAvjpfslZ3_cofbU 0OPIW7CLgvTbK0XdbBhvLeU7GSZbLs0MjKnYk31TDtFA.fZ8Zlff7Vnemi0L8TqRLqs3hR6hkRnF XdV_jGK9CDKwgvG.4d4W2MMdO1Junh4Xn_Hd_Hm49u75ogExKDb_9M6Y- X-Sonic-MF: X-Sonic-ID: 2af4e511-c75a-450d-88f0-94e92c03031d Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Wed, 24 Sep 2025 20:18:21 +0000 Received: by hermes--production-gq1-6f9f7cb74b-kxr8c (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 59bdb76925d68e5096391a736a149193; Wed, 24 Sep 2025 20:18:16 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: RE: git: d466cb731a23 - main - make packages: Fix edge case of no kernel Message-Id: <050DDA9D-5981-4D37-A7A8-8E8B926A2EF4@yahoo.com> Date: Wed, 24 Sep 2025 13:18:06 -0700 Cc: Lexi Winter To: Warner Losh , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3826.700.81) References: <050DDA9D-5981-4D37-A7A8-8E8B926A2EF4.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.993]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; SUBJECT_ENDS_SPACES(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[66.163.184.201:from]; RCVD_IN_DNSWL_NONE(0.00)[66.163.184.201:from] X-Rspamd-Queue-Id: 4cX7TH5nBlz4L76 Warner Losh wrote on Date: Wed, 24 Sep 2025 19:56:26 UTC : > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dd466cb731a2317ec91a89684e9d6a915= fdfcc2ff >=20 > commit d466cb731a2317ec91a89684e9d6a915fdfcc2ff > Author: Warner Losh > AuthorDate: 2025-09-24 18:41:29 +0000 > Commit: Warner Losh > CommitDate: 2025-09-24 19:54:51 +0000 >=20 > make packages: Fix edge case of no kernel >=20 > When NO_INSTALLKERNEL and NO_INSTALLEXTRAKERNELS are set, or when > BUILDKERNELS is empty, we can fail to define the = create-kernel-packages > make target, which we call unconditionally. So if do not have a kernel > staging dir, go ahead and provide an empty create-kernel-packages so > that when it's used elsewhere, the build succeeds. >=20 > This lets me build a tree and package it when I don't have a kernel, = for > jails and other similar environments. There's no change if any kernels > are built, since that will provide the necessary make target that does > useful things for that case. >=20 > Sponsored by: Netflix > --- . . . Probable MFC? =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Wed Sep 24 20:23:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX7Zt0DtRz68PC9; Wed, 24 Sep 2025 20:23: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX7Zs74r1z4MGm; Wed, 24 Sep 2025 20:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758745398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Qz3MWYO+pasDx7fETBAEJIkbml//uU+8jK1NaIaabk=; b=DC0JabxlX2IyfB3a/lurKC+WSDXR7hZ/8oPrYYQVq6NZvaMlfO1A7YMdSjJ2HXnEPGC6p6 JSWInLUiecrlNiTb7d7bp53R2YhcNIeVejkHIS1UTWLtRbv2fvK/9h2Q6SZCLw/3dysXFz eXrCsB+8RLePpkXswFVUT0kmImvNXhlOA/Is43dKkCYDvIBbxzj6UkUxXrA7UasV0woN9K wXioRC46tAfjJtOONGDYhEQoS2MzkewCxs77tRxyK0sX/BBO4XtlQJjakBZtQHMx1tFDk0 dvR4aa3OYD+5839IdjzfY3mIZKJELrZ1rWQ/dmaW2go/GBLpZ9NSJnj2YshRbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758745398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Qz3MWYO+pasDx7fETBAEJIkbml//uU+8jK1NaIaabk=; b=ftyOb5vBZEj+RI5ozXZHt1zZimTt2JFzpZ6ujwxGO0e6TLTFfaooPkBJgXpDFxNBOBx/aF zXpX9DA809H3ijNR3H4VtYzTlBOgnedvpXEukw6KMgRtZX64Sz037+WSro+JQUtbXnaU8m Qu9fuyIP6saHrhxAfbc22VzJLqnfoKX/Iy2wRA3cKuvK48YMwEIqtU9hp/eDEH1ycleCv0 Sw1ZHjpXd9/5V8rldyjF1vNahsyCUXrWMZuXpJwUaHc+QAQSErKribo6K/V02ImA1uSxlE BJ/MBmAH4S8rGr22ZPxi5Pp5l7GkIRH6jCnYMBAeuqph5FcqHbvFbAoeW0ZkFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758745398; a=rsa-sha256; cv=none; b=kGazSHGbef4Cjd9h3DVatNz0FGN4f9lc16IErTL/M9gl6/NAN6BoDMOlENMLKE7f8U3Se8 G/LIGCITlczC41wZyq/XCoQMzAJ+0m4nyINie5sCxXLtUJ9Q6qAjjsJ3sRJnL96KJ0pPPe gpCwV0bqGv7vWzJiKEDK6AtBUetjMmdKhQuhVDy9SgJTTCxbeBLFloha9YhayWEXw3Z6dS XWo3eclO1NkzzfIHJFKvrR5umVIj908+wCJHLFZqSitvB4HKVGwJ3MHMQpOUAt9huARsGv AowPUmZZh0MPKsXC0jfZgrAYWCc0bnT12JalAAcWiyKIIWiHRo85URQxbbk/9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX7Zs6gwnzn7q; Wed, 24 Sep 2025 20:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OKNHVs061943; Wed, 24 Sep 2025 20:23:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OKNHGg061940; Wed, 24 Sep 2025 20:23:17 GMT (envelope-from git) Date: Wed, 24 Sep 2025 20:23:17 GMT Message-Id: <202509242023.58OKNHGg061940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 275f61111f43 - main - build/development.7: System building examples List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 275f61111f43507a01eef064efc660f1fa72b6a9 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=275f61111f43507a01eef064efc660f1fa72b6a9 commit 275f61111f43507a01eef064efc660f1fa72b6a9 Author: Alexander Ziaee AuthorDate: 2025-09-24 20:06:56 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-24 20:22:28 +0000 build/development.7: System building examples Consolidate examples to build the system in the build(7) manual where the details about the syntax involved is documented. Remove them from development(7), instead adding examples for patching the trees. They are left in UPDATING for now, to hopefully be removed eventually. Reduce documentation proliferation and create consistent, maintainable doc about building the system, eventually removing the COMMMON ITEMS section of UPDATING so there is a single source of truth in the cannon and well-integrated location, the in-band system reference manual. + Example 1: Build and upgrade system in place + Example 2: Build and upgrade a custom kernel in place + Example 3: Build and upgrade a single piece of userspace + Example 4: Build and upgrade a loadable kernel module + Example 5: Quickly rebuild a kernel in place + Example 6: Cross-compiling for different architectures The examples section of development(7) now contains examples for applying patches to the trees. There is certainy much more to do here, but it needs to be chunked. MFC after: 3 days Reviewed by: imp (previous version), ivy (previous version) Discussed with: emaste, imp, jhb, ivy Differential Revision: https://reviews.freebsd.org/D48693 --- share/man/man7/build.7 | 245 +++++++++++++++++++++++++++++++++++-------- share/man/man7/development.7 | 113 ++++++++------------ 2 files changed, 241 insertions(+), 117 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 45a3034843d8..bfe464d4448e 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2000 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 13, 2025 +.Dd September 24, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -36,34 +36,28 @@ system .Sh DESCRIPTION The sources for the .Fx -system and its applications are contained in three different directories, -normally -.Pa /usr/src , -.Pa /usr/doc , -and -.Pa /usr/ports . -These directories may be initially empty or non-existent until updated with -Git -.Po installed from packages with -.Xr pkg 7 -or from -.Xr ports 7 Pc . -Directory -.Pa /usr/src -contains the -.Dq "base system" -sources, which is loosely defined as the things required to rebuild -the system to a useful state. -Directory -.Pa /usr/doc -contains the source for the system documentation, excluding the manual -pages. -Directory -.Pa /usr/ports -contains a tree that provides a consistent interface for building and -installing third party applications. -For more information about the ports build process, see -.Xr ports 7 . +system and its applications are contained in three directories, +normally: +.Bl -tag -width "/usr/ports" +.It Pa /usr/src +.Dq base system , +loosely defined as everything required to build the system +to a useful state +.It Pa /usr/doc +system documentation, excluding manual pages +.It Pa /usr/ports +third-party software, with a consistent interface for building and +installing them; see +.Xr ports 7 +.El +.Pp +These directories may be initially empty or non-existent until updated +with Git +.Po Pa devel/git +from the +.Fx +Ports Collection +.Pc . .Pp The .Xr make 1 @@ -92,7 +86,9 @@ The canonical object directory is described in the documentation for the .Cm buildworld target below. .Pp -The build may be controlled by defining +The +.Nm +may be controlled by defining .Xr make 1 variables described in the .Sx ENVIRONMENT @@ -406,7 +402,7 @@ The target directory under .Pa ${DESTDIR} may be modified using the .Va INSTKERNNAME -and +or .Va KODIR .Xr make 1 variables. @@ -563,6 +559,9 @@ should be set to the name of the package. LLVM toolchain packages use the name llvm. GCC toolchains provide separate packages for each architecture and use the name ${MACHINE_ARCH}-gcc. +.It Va INSTKERNNAME +If set, specify an alternative name to build and install for the various +kernel make targets. .It Va KERNCONF Overrides which kernel to build and install for the various kernel make targets. @@ -597,6 +596,9 @@ then .Va KERNCONF is set to the value of .Va KERNFAST . +.It Va KODIR +If set, +this variable specifies an alternative directory to install the kernel. .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the @@ -945,26 +947,159 @@ fringe uses that do not have a wide appeal. .It Pa /usr/doc/share/mk/doc.project.mk .It Pa /usr/ports/Mk/bsd.port.mk .It Pa /usr/ports/Mk/bsd.sites.mk -.It Pa /usr/share/examples/etc/make.conf .It Pa /usr/src/Makefile .It Pa /usr/src/Makefile.inc1 +.Xr make 1 +infrastructure for each tree +.It Pa /usr/ports/UPDATING +.It Pa /usr/src/UPDATING +notable changes in each tree +.It Pa /usr/share/examples/etc/make.conf +example +.Xr make.conf 5 +.It Pa /etc/src.conf +src build configuration, see +.Xr src.conf 5 .El .Sh EXAMPLES -For an -.Dq approved -method of updating your system from the latest sources, please see the -.Sx COMMON ITEMS -section in -.Pa src/UPDATING . +This section describes best practices for common situations. +When manual intervention is necessary, it will be mentioned in +.Pa UPDATING . +Make sure you have full backups before proceeding! +.Ss Example 1: Build and upgrade system in place +If using installed drivers such as graphics or virtual machine guest +drivers, check out the +.Xr ports 7 +tree, and specify the drivers in +.Xr src.conf 5 +so they are built and installed automatically after the kernel: +.Bd -literal -offset indent +git clone https://git.FreeBSD.org/ports.git /usr/ports +cat << EOF >> /etc/src.conf +PORTS_MODULES+=graphics/drm-kmod emulators/virtualbox-ose-kmod +EOF +.Ed +.Pp +Check out the CURRENT branch, build it, and install, +overwriting the current system: +.Bd -literal -offset indent +git clone https://git.FreeBSD.org/src.git /usr/src +cd /usr/src +make buildworld buildkernel +make installkernel +shutdown -r now +.Ed .Pp -The following sequence of commands can be used to cross-build the system for -the arm64 (aarch64) architecture on a different host architecture, such as -amd64: +For major version upgrades, boot into single-user mode. +After restarting, install userspace, and merge configurations. +After verifying that you do not need them, delete old files +and libraries: .Bd -literal -offset indent cd /usr/src -make TARGET=arm64 buildworld buildkernel -make TARGET=arm64 DESTDIR=/clients/arm64 installworld installkernel +etcupdate -p +make installworld +etcupdate -B +make delete-old delete-old-libs +shutdown -r now +.Ed +.Ss Example 2: Build and upgrade a custom kernel in place +Create a custom kernel configuration, +.Va MYKERNEL , +by including an existing configuration and using +.Cm device Ns / Ns Cm nodevice +and +.Cm options Ns / Ns Cm nooption +to select and configure components: +.Bd -literal -offset indent +cd /usr/src +cat << EOF > sys/amd64/conf/MYKERNEL +include GENERIC +ident MYKERNEL +nodevice sound +EOF +.Ed +.Pp +After creating the new kernel configuration, build a fresh toolchain, +build the kernel, and install it, moving the old kernel to +.Pa /boot/kernel.old/ : +.Bd -literal -offset indent +make kernel-toolchain +make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=MYKERNEL +make -DALWAYS_CHECK_MAKE installkernel KERNCONF=MYKERNEL +shutdown -r now .Ed +.Pp +To build the kernel to an alternate location, use the +.Va INSTKERNNAME +variable and boot it once to test via +.Xr nextboot 8 : +.Bd -literal -offset indent +make installkernel KERNCONF=MYKERNEL INSTKERNNAME=testkernel +nextboot -k testkernel +shutdown -r now +.Ed +.Ss Example 3: Build and upgrade a single piece of userspace +Rebuild and reinstall a single piece of userspace, in this case +.Xr ls 1 : +.Bd -literal -offset indent +cd /usr/src/bin/ls +make clean all +make install +.Ed +.Ss Example 4: Build and upgrade a loadable kernel module +Rebuild and reinstall a single loadable kernel module, in this case +.Xr sound 4 : +.Bd -literal -offset indent +cd /usr/src/sys/modules/sound +make all install clean cleandepend KMODDIR=/boot/kernel +.Ed +.Ss Example 5: Quickly rebuild a kernel in place +Quickly rebuild and reinstall the kernel, only recompiling the files +changed since last build; note that this will only work if the full +kernel build has been completed in the past, not on a fresh source tree: +.Bd -literal -offset indent +cd /usr/src +make kernel KERNFAST=1 +.Ed +.Ss Example 6: Cross-compiling for different architectures +To rebuild parts of +.Fx +for another CPU architecture, +first prepare your source tree by building the cross-toolchain: +.Bd -literal -offset indent +cd src +make toolchain TARGET_ARCH=aarch64 +.Ed +.Pp +The following sequence of commands can be used to cross-build the system +for the arm64 (aarch64) architecture on a different host architecture, +such as amd64: +.Bd -literal -offset indent +cd /usr/src +make TARGET_ARCH=aarch64 buildworld buildkernel +make TARGET_ARCH=aarch64 DESTDIR=/armclient installworld installkernel +.Ed +.Pp +Afterwards, to build and install a single piece of userspace, use: +.Bd -literal -offset indent +cd src/bin/ls +make buildenv TARGET_ARCH=aarch64 +make clean all install DESTDIR=/armclient +.Ed +.Pp +Likewise, to quickly rebuild and reinstall the kernel, use: +.Bd -literal -offset indent +cd src +make buildenv TARGET_ARCH=aarch64 +make kernel KERNFAST=1 DESTDIR=/armclient +.Ed +.Sh DIAGNOSTICS +.Bl -diag +.It Bad system call (core dumped) +.It rescue/sh check failed, installation aborted +.Pp +The kernel was not updated due to incorrect build procedure. +Study the examples above. .Sh SEE ALSO .Xr cc 1 , .Xr install 1 , @@ -979,7 +1114,7 @@ make TARGET=arm64 DESTDIR=/clients/arm64 installworld installkernel .Xr tests 7 , .Xr config 8 , .Xr etcupdate 8 , -.Xr reboot 8 , +.Xr nextboot 8 , .Xr shutdown 8 .Sh HISTORY The @@ -988,3 +1123,23 @@ manpage first appeared in .Fx 4.3 . .Sh AUTHORS .An Mike W. Meyer Aq Mt mwm@mired.org +.Sh CAVEATS +Old objects can cause obscure build problems; try +.Ql make cleandir cleandir . +.Pp +Environment poisioning can cause obscure build problems; try prefixing +.Xr make 1 +commands with +.Ql env -i +.Pp +When doing a major release upgrade, +booting into single user mode for +.Cm installworld +is required. +.Pp +Updating the boot +.Xr loader 8 +is architecture specific. +Consult +.Xr boot 8 +for your architecture for more details. diff --git a/share/man/man7/development.7 b/share/man/man7/development.7 index 1b875fb14bda..348302a50ee7 100644 --- a/share/man/man7/development.7 +++ b/share/man/man7/development.7 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Edward Tomasz Napierala @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 19, 2025 +.Dd September 24, 2025 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -75,13 +75,14 @@ There is also a list of public, read-only Git mirrors at: The .Ql main Git branch represents CURRENT; -all changes are first committed to CURRENT and then usually cherry-picked -back to STABLE, which refers to Git branches such as -.Ql stable/13 . +all changes are first committed to CURRENT and then usually +cherry-picked back to STABLE, which refers to Git branches such as +.Ql stable/14 . Every few years a new STABLE is branched from CURRENT, with an incremented major version number. -Releases are then branched off STABLE and numbered with consecutive minor -numbers. +Releases are then branched off STABLE and numbered with consecutive +minor numbers such as +.Ql releng/14.3 .Pp The layout of the source tree is described in its .Pa README.md @@ -107,12 +108,16 @@ such as freebsd-arch@ and freebsd-hackers@: To get your patches integrated into the main .Fx repository use Phabricator; -it is a code review tool that allows other developers to review the changes, -suggest improvements, and, eventually, allows them to pick up the change and -commit it: +it is a code review tool that allows other developers to +review the changes, suggest improvements, and, eventually, +allows them to pick up the change and commit it: .Pp .Lk https://reviews.FreeBSD.org .Pp +Or Github: +.Pp +.Lk https://github.com/freebsd +.Pp To check the latest .Fx build and test status of CURRENT and STABLE branches, @@ -120,77 +125,41 @@ the continuous integration system is at: .Pp .Lk https://ci.FreeBSD.org .Sh FILES -.Bl -compact -tag -width "/usr/src/tools/tools/git/git-arc.sh" +.Bl -tag -compact -width "/usr/ports/devel/freebsd-git-devtools" .It Pa /usr/src/CONTRIBUTING.md .Fx contribution guidelines .It Pa /usr/src/tools/tools/git/git-arc.sh Phabricator review tooling +.It Pa /usr/ports/devel/freebsd-git-devtools +Phabricator review tooling as a port .El .Sh EXAMPLES -Check out the CURRENT branch, build it, and install, overwriting the current -system: -.Bd -literal -offset indent -git clone https://git.FreeBSD.org/src.git src -cd src -make -sj8 buildworld buildkernel installkernel -shutdown -r now -.Ed -.Pp -After reboot: -.Bd -literal -offset indent -cd src -make -j8 installworld -reboot -.Ed -.Pp -Rebuild and reinstall a single piece of userspace, in this -case -.Xr ls 1 : -.Bd -literal -offset indent -cd src/bin/ls -make clean all install -.Ed -.Pp -Rebuild and reinstall a single loadable kernel module, in this case -.Xr sound 4 : -.Bd -literal -offset indent -cd src/sys/modules/sound -make all install clean cleandepend KMODDIR=/boot/kernel -.Ed -.Pp -Quickly rebuild and reinstall the kernel, only recompiling the files -changed since last build; note that this will only work if the full kernel -build has been completed in the past, not on a fresh source tree: -.Bd -literal -offset indent -cd src -make -sj8 kernel KERNFAST=1 -.Ed -.Pp -To rebuild parts of -.Fx -for another CPU architecture, -first prepare your source tree by building the cross-toolchain: -.Bd -literal -offset indent -cd src -make -sj8 toolchain TARGET_ARCH=aarch64 -.Ed -.Pp -Afterwards, to build and install a single piece of userspace, use: -.Bd -literal -offset indent -cd src/bin/ls -make buildenv TARGET_ARCH=aarch64 -make clean all install DESTDIR=/clients/arm -.Ed -.Pp -Likewise, to quickly rebuild and reinstall the kernel, use: -.Bd -literal -offset indent -cd src -make buildenv TARGET_ARCH=aarch64 -make -sj8 kernel KERNFAST=1 DESTDIR=/clients/arm -.Ed +Apply a patch from Github pull #1234, using +.Pa devel/gh : +.Pp +.Dl gh pr checkout 1234 +.Pp +Apply a patch from Phabricator review D1234, using +.Xr git-arc 1 : +.Pp +.Dl git arc patch -c D1234 +.Pp +Apply a manually downloaded +.Xr git-format-patch 1 , +.Pa draft.patch , +from Bugzilla or mail: +.Pp +.Dl git am draft.patch +.Pp +Apply a manually downloaded patch, +.Pa draft.diff , +from Bugzilla or mail: +.Pp +.Dl git apply draft.diff .Sh SEE ALSO .Xr git 1 , +.Xr git-arc 1 , .Xr witness 4 , .Xr build 7 , .Xr hier 7 , From nobody Wed Sep 24 21:25:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cX8yl5SQwz68Smg; Wed, 24 Sep 2025 21:25: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cX8yl59kSz3DFL; Wed, 24 Sep 2025 21:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758749135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QnRL7ssP3gnjk4pI1tvXvQOkM18RFkJAR0/k0n+zTY=; b=yOMSkVsPbhKptUd5O5vdWNqR40GFUI3IpRqcqW9vZsB1rVCyFHOHy8cEuScq3oiu+xBfum wRKGWtS81cXeprfdQ9f/7aozEzyepE/VcREIOy7Sk+TPOObtscHVZlumYqwAeGXJzhME4v NZYi0OsS1J1RQRthoRGNSk28rElA/96pSS4MA5LXvxdGVsv8a3E4L7SNKHSlM3bsbIPH4c Mcd6cwki2/shpyjGLnucrsaBde+KphSei53kXvcA43uwXVp2Dm+HCa/4R6e40g+PebUsuC dXCNlgzM2ElWa7m/cMPZkAbbCQBPpEP9QxF+oUQiDaXJxaVdx3a77iB6hw+bRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758749135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8QnRL7ssP3gnjk4pI1tvXvQOkM18RFkJAR0/k0n+zTY=; b=jhI0OdrcFPKlmOvMJ9GKSX/B7zODJ7PfWW3TpCHYpODmBYACxB+aq2gXthgCP2FSJp4l8M DuWbKm9KGgTBsX+Sch7Hwnx2LasFChI7784FgurKkuCPgutWk/W/9L8lRl7oJrxpecvkCs 8hlJQ7/2+onijn+jsvI/2r+WhquSnZUzA0SBg4UINX1Ki46q+fOdP8L3T+EWC9T2Uc2au+ aKxvwjYLPPTeu8oMw1Us5WgHf2B/2JIKc2+mf9lsuVFEG2LQm7EPtw35+0YbjSKaHY8Fy/ pXuPteoGtyz3du3LNVnwz+TfWR4IlgPG1T4ztclKiqwpuskKAz7nj9WsYmilIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758749135; a=rsa-sha256; cv=none; b=rA4gwVYKMc7u1himiU+Gd9obWhhju9UBE2zJsasGpxxaZbhOsmdTyLOBdm0sU2c2Nwhj6c W3id7N7pxcjMMmpHcVB2Cej+Bhtg+M+riOrT16OBGaQEgyG+mu9le0brCip2KxBZ+giA/h isV8371G60Ft/B2Uwrf7Fc31/H+ulwc61oc4ccUvu8FQqddBQpBW2tYGt0Zdyqq9m6hCGR GiKwvzfLil37byk/nAErbexcZ2ldxkSkOgc+k+xl4T3woyynMozaqXK9Wzgis0i7g81Ftl wwmL9joSxJZSo+m16dE5u6dTW6hItoYhQTtP6U/UdBF7Q7gW1CSxixpdOANylw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cX8yl4mfHznts; Wed, 24 Sep 2025 21:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58OLPZbf075991; Wed, 24 Sep 2025 21:25:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58OLPZ2L075985; Wed, 24 Sep 2025 21:25:35 GMT (envelope-from git) Date: Wed, 24 Sep 2025 21:25:35 GMT Message-Id: <202509242125.58OLPZ2L075985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 113e60742ef6 - main - zfs: merge openzfs/zfs@b2196fbed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 113e60742ef6ba5c069aa737ee57ba3c2f88b248 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=113e60742ef6ba5c069aa737ee57ba3c2f88b248 commit 113e60742ef6ba5c069aa737ee57ba3c2f88b248 Merge: 275f61111f43 b2196fbedf5d Author: Martin Matuska AuthorDate: 2025-09-24 20:54:28 +0000 Commit: Martin Matuska CommitDate: 2025-09-24 20:54:28 +0000 zfs: merge openzfs/zfs@b2196fbed Notable upstream pull request merges: #17705 545d66204 Fix a printf format specifier on FreeBSD/i386 #17708 3387d3409 Fix atomic-alignment warnings in libspl on FreeBSD/i386 #17719 f319ff357 vdev_disk_close: take disk write lock before destroying it #17732 1d2d81298 Refactor `zhack label repair` and fix `-c` regression on nonzero TXG #17764 ea37c30fc zdb: Fix asize overflow in verify_livelist_allocs() Obtained from: OpenZFS OpenZFS commit: b2196fbedf5dbfb8593288f5f9ba712e31429a84 .../.github/workflows/scripts/qemu-2-start.sh | 2 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 2 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 8 +- sys/contrib/openzfs/cmd/zhack.c | 134 ++++++++++++--------- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 10 +- sys/contrib/openzfs/config/Shellcheck.am | 12 +- sys/contrib/openzfs/config/always-arch.m4 | 1 + .../openzfs/config/always-compiler-options.m4 | 21 ++++ .../openzfs/config/kernel-dentry-operations.m4 | 25 ++++ sys/contrib/openzfs/config/zfs-build.m4 | 1 + .../contrib/dracut/90zfs/module-setup.sh.in | 3 +- sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 1 + sys/contrib/openzfs/include/sys/dmu.h | 6 +- sys/contrib/openzfs/lib/libspl/Makefile.am | 3 + sys/contrib/openzfs/man/Makefile.am | 17 ++- sys/contrib/openzfs/man/man4/zfs.4 | 45 ++++++- sys/contrib/openzfs/man/man7/zfsprops.7 | 24 ++-- sys/contrib/openzfs/man/man8/zpool-attach.8 | 20 +-- .../openzfs/module/os/linux/zfs/vdev_disk.c | 6 +- .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 6 + .../openzfs/module/os/linux/zfs/zpl_super.c | 85 ++++++++++++- sys/contrib/openzfs/scripts/mancheck.sh | 17 ++- sys/contrib/openzfs/scripts/zfs-helpers.sh | 7 ++ sys/contrib/openzfs/tests/runfiles/common.run | 4 +- .../openzfs/tests/zfs-tests/include/libtest.shlib | 2 +- .../tests/functional/cli_root/zhack/library.kshlib | 80 +++++++----- .../cli_root/zhack/zhack_label_repair_001.ksh | 15 ++- .../functional/fault/auto_replace_001_pos.ksh | 2 +- .../functional/fault/auto_replace_002_pos.ksh | 2 +- .../functional/fault/suspend_on_probe_errors.ksh | 2 +- sys/modules/zfs/zfs_config.h | 7 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 32 files changed, 424 insertions(+), 148 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index 77d08862dcd5,000000000000..c595030ed4a0 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,879 -1,0 +1,882 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* __assign_str() has one arg */ +/* #undef HAVE_1ARG_ASSIGN_STR */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* backtrace() is available */ +/* #undef HAVE_BACKTRACE */ + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_file_open_by_path() exists */ +/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* bdev_nr_bytes() is available */ +/* #undef HAVE_BDEV_NR_BYTES */ + +/* bdev_open_by_path() exists */ +/* #undef HAVE_BDEV_OPEN_BY_PATH */ + +/* bdev_release() exists */ +/* #undef HAVE_BDEV_RELEASE */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* __blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */ + +/* __blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */ + +/* blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() exists */ +/* #undef HAVE_BLKDEV_PUT */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* struct queue_limits has a features field */ +/* #undef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_disk() exists and takes 2 args */ +/* #undef HAVE_BLK_ALLOC_DISK_2ARG */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue hardware context is cached in struct request */ +/* #undef HAVE_BLK_MQ_RQ_HCTX */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* backing_dev_info is available through queue gendisk */ +/* #undef HAVE_BLK_QUEUE_DISK_BDI */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* 3-arg dequeue_signal() takes a type argument */ +/* #undef HAVE_DEQUEUE_SIGNAL_3ARG_TYPE */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* dops->d_revalidate() takes 4 args */ +/* #undef HAVE_D_REVALIDATE_4ARGS */ + +/* Define if d_set_d_op() is available */ +/* #undef HAVE_D_SET_D_OP */ + +/* Define to 1 if you have the 'execvpe' function. */ +#define HAVE_EXECVPE 1 + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* file->f_version exists */ +/* #undef HAVE_FILE_F_VERSION */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* GENHD_FL_EXT_DEVT flag is available */ +/* #undef HAVE_GENHD_FL_EXT_DEVT */ + +/* GENHD_FL_NO_PART flag is available */ +/* #undef HAVE_GENHD_FL_NO_PART */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the 'gettid' function. */ +/* #undef HAVE_GETTID */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* mnt_idmap does not have user_namespace */ +/* #undef HAVE_IDMAP_NO_USERNS */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_atime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_ATIME */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* inode_get_mtime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_MTIME */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_atime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_ATIME_TO_TS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_mtime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_MTIME_TO_TS */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() returns struct dentry* */ +/* #undef HAVE_IOPS_MKDIR_DENTRY */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_get_pages2() is available */ +/* #undef HAVE_IOV_ITER_GET_PAGES2 */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* Define to 1 if you have the 'issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* iter_is_ubuf() is available */ +/* #undef HAVE_ITER_IS_UBUF */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel defines intptr_t */ +/* #undef HAVE_KERNEL_INTPTR_T */ + +/* kernel has kernel_neon_* functions */ +/* #undef HAVE_KERNEL_NEON */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* strlcpy() exists */ +/* #undef HAVE_KERNEL_STRLCPY */ + +/* kernel has kmap_local_page */ +/* #undef HAVE_KMAP_LOCAL_PAGE */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [unwind] */ +/* #undef HAVE_LIBUNWIND */ + +/* libunwind has unw_get_elf_filename */ +/* #undef HAVE_LIBUNWIND_ELF */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* building against unsupported kernel version */ +/* #undef HAVE_LINUX_EXPERIMENTAL */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Define to 1 if you have the 'mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* PG_error flag is available */ +/* #undef HAVE_MM_PAGE_FLAG_ERROR */ + +/* page_mapping() is available */ +/* #undef HAVE_MM_PAGE_MAPPING */ + +/* page_size() is available */ +/* #undef HAVE_MM_PAGE_SIZE */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* readahead_page() exists */ +/* #undef HAVE_PAGEMAP_READAHEAD_PAGE */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* pin_user_pages_unlocked() is available */ +/* #undef HAVE_PIN_USER_PAGES_UNLOCKED */ + +/* proc_handler ctl_table arg is const */ +/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* If available, contains the Python version number currently in use. */ +/* #undef HAVE_PYTHON */ + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_sz exists */ +/* #undef HAVE_REGISTER_SYSCTL_SZ */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + ++/* Define if set_default_d_op() is available */ ++/* #undef HAVE_SET_DEFAULT_D_OP */ ++ +/* shrinker_register exists */ +/* #undef HAVE_SHRINKER_REGISTER */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* sops->free_inode() exists */ +/* #undef HAVE_SOPS_FREE_INODE */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* STACK_FRAME_NON_STANDARD asm macro is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD_ASM */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* statx() is available */ +/* #undef HAVE_STATX */ + +/* STATX_MNT_ID is available */ +/* #undef HAVE_STATX_MNT_ID */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the 'strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* have super_block s_shrink */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ + +/* have super_block s_shrink pointer */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ + +/* have super_block s_wb_err */ +/* #undef HAVE_SUPER_BLOCK_S_WB_ERR */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* timer_delete_sync is available */ +/* #undef HAVE_TIMER_DELETE_SYNC */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the 'udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +#ifdef __amd64__ +/* Define if host toolchain supports VAES */ +#define HAVE_VAES 1 +#endif + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* migratepage exists */ +/* #undef HAVE_VFS_MIGRATEPAGE */ + +/* migrate_folio exists */ +/* #undef HAVE_VFS_MIGRATE_FOLIO */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->remap_file_range() is available */ +/* #undef HAVE_VFS_REMAP_FILE_RANGE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* splice_copy_file_range() is available */ +/* #undef HAVE_VFS_SPLICE_COPY_FILE_RANGE */ + +/* address_space_operations->writepage exists */ +/* #undef HAVE_VFS_WRITEPAGE */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +#ifdef __amd64__ +/* Define if host toolchain supports VPCLMULQDQ */ +#define HAVE_VPCLMULQDQ 1 +#endif + +/* int (*writepage_t)() takes struct folio* */ +/* #undef HAVE_WRITEPAGE_T_FOLIO */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() takes mnt_idmap */ +/* #undef HAVE_XATTR_SET_IDMAP */ + +/* xattr_handler->set() takes user_namespace */ +/* #undef HAVE_XATTR_SET_USERNS */ + +/* Define if host toolchain supports XSAVE */ +#define HAVE_XSAVE 1 + +/* Define if host toolchain supports XSAVEOPT */ +#define HAVE_XSAVEOPT 1 + +/* Define if host toolchain supports XSAVES */ +#define HAVE_XSAVES 1 + +/* ZERO_PAGE() is GPL-only */ +/* #undef HAVE_ZERO_PAGE_GPL_ONLY */ + +/* Define if you have [z] */ +#define HAVE_ZLIB 1 + +/* libunwind is llvm libunwind */ +/* #undef IS_LIBUNWIND_LLVM */ + +/* kernel exports FPU functions */ +/* #undef KERNEL_EXPORTS_X86_FPU */ + +/* TBD: fetch(3) support */ +#if 0 +/* whether the chosen libfetch is to be loaded at run-time */ +#define LIBFETCH_DYNAMIC 1 + +/* libfetch is fetch(3) */ +#define LIBFETCH_IS_FETCH 1 + +/* libfetch is libcurl */ +#define LIBFETCH_IS_LIBCURL 0 + +/* soname of chosen libfetch */ +#define LIBFETCH_SONAME "libfetch.so.6" +#endif + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* make_request_fn() return type */ +/* #undef MAKE_REQUEST_FN_RET */ + +/* using complete_and_exit() instead */ +/* #undef SPL_KTHREAD_COMPLETE_AND_EXIT */ + +/* Defined for legacy compatibility. */ +#define SPL_META_ALIAS ZFS_META_ALIAS + +/* Defined for legacy compatibility. */ +#define SPL_META_RELEASE ZFS_META_RELEASE + +/* Defined for legacy compatibility. */ +#define SPL_META_VERSION ZFS_META_VERSION + +/* pde_data() is PDE_DATA() */ +/* #undef SPL_PDE_DATA */ + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define SYSTEM_FREEBSD 1 + +/* True if ZFS is to be compiled for a Linux system */ +/* #undef SYSTEM_LINUX */ + +/* Version number of package */ +/* #undef ZFS_DEBUG */ + +/* /dev/zfs minor */ +/* #undef ZFS_DEVICE_MINOR */ + +/* Define the project alias string. */ - #define ZFS_META_ALIAS "zfs-2.4.99-52-FreeBSD_g3f4312a0a" ++#define ZFS_META_ALIAS "zfs-2.4.99-72-FreeBSD_gb2196fbed" + +/* Define the project author. */ +#define ZFS_META_AUTHOR "OpenZFS" + +/* Define the project release date. */ +/* #undef ZFS_META_DATA */ + +/* Define the maximum compatible kernel version. */ +#define ZFS_META_KVER_MAX "6.16" + +/* Define the minimum compatible kernel version. */ +#define ZFS_META_KVER_MIN "4.18" + +/* Define the project license. */ +#define ZFS_META_LICENSE "CDDL" + +/* Define the libtool library 'age' version information. */ +/* #undef ZFS_META_LT_AGE */ + +/* Define the libtool library 'current' version information. */ +/* #undef ZFS_META_LT_CURRENT */ + +/* Define the libtool library 'revision' version information. */ +/* #undef ZFS_META_LT_REVISION */ + +/* Define the project name. */ +#define ZFS_META_NAME "zfs" + +/* Define the project release. */ - #define ZFS_META_RELEASE "52-FreeBSD_g3f4312a0a" ++#define ZFS_META_RELEASE "72-FreeBSD_gb2196fbed" + +/* Define the project version. */ +#define ZFS_META_VERSION "2.4.99" + +/* count is located in percpu_ref.data */ +/* #undef ZFS_PERCPU_REF_COUNT_IN_DATA */ diff --cc sys/modules/zfs/zfs_gitrev.h index 585e308e72d5,000000000000..9eae1e8573c0 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_gitrev.h +++ b/sys/modules/zfs/zfs_gitrev.h @@@ -1,1 -1,0 +1,1 @@@ - #define ZFS_META_GITREV "zfs-2.4.99-52-g3f4312a0a" ++#define ZFS_META_GITREV "zfs-2.4.99-72-gb2196fbed" From nobody Wed Sep 24 22:27:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXBLB5lC9z68Xph for ; Wed, 24 Sep 2025 22:27:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXBLB3kfkz3N8Q for ; Wed, 24 Sep 2025 22:27:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-330469eb750so368713a91.2 for ; Wed, 24 Sep 2025 15:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758752844; x=1759357644; darn=freebsd.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=81viuf+VS6tPZdbhBDl4HJTnobTf6z9SnW53V8IjgRE=; b=myaN/QY6q82j1OBoOHRCfH9vBa56aAbS4enQrcwxYjUk9TmbMiN05tYN874XPdeLBL C2YCsUAD0hyQIn/DdSfaKdqhXDvvB/+hJEEB6VwZmNul3OCDmXSq4PtpqBzZwiZQbYCj 6ew5svZEpFK43ROerP/Jy4hH8S3Q6unLxfCeYaLnl45Kr1mx/Xrnnte3iKxyFhBSw84s eDLKfzsxcZA7nQdzVWZE6p1WFQCET7rtEewAT8fCUgCy5BLMzjfF5GxBMa0N3TPxxPA7 5WeCyLp21gAjHdNz0K2iSFbsaMiAIW3z0+ZKnlzd7jtJm55lVWDu02FpctXAsG2w2KKt 4YhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758752844; x=1759357644; 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=81viuf+VS6tPZdbhBDl4HJTnobTf6z9SnW53V8IjgRE=; b=rTfc99xv5nS3n+MaN+Hp8GNNGFbYKMPMgVjDnl8DSUJaEJRuYqL/VqbdRtKNyDRSE/ tFdm0MyeR0XmYe1TsQGYB0J2SKcJObugVAkI7H8rt05HuTu8s/QvSbcWzCWBPal6BRD2 wUCt4jyw+qXz8SN5GNJn+gIS0Osg8/EJnJqWMky3s0oF/ZFHeA9RXYgdUkY6jbZ8trIn q3Df8n5PyasBCCwdNUdmtLUe4MdEZUX05dx6xgUKBBENVVdT45TqtzVIKvrLTGvHRKJS oqaza3R+JAUAAQNKp+HbbvZOSPMDIeFII1Uw9nqcMTq1GR7h3aXpnemrYcghL1zqB2YI li8w== X-Forwarded-Encrypted: i=1; AJvYcCUnRPCa0BLhZOy8vZLgaj5m1S84Hl/R8DAiOk3aYCXHV7M7HLcbk3LktwuS411ie2QTIPq4nDtmhYRYRCg5K+sHCBCQ4w==@freebsd.org X-Gm-Message-State: AOJu0YwLybS4MZ2mHqD/3Xa8Q2dCN0KtbXuUISIT179uLMsEyDG1aC82 HwxM+DC+l0u3S01jIb7CakyhRrbg25FNZ4c+s8bwn7VEaVcfJv0iCeRxiQ8vWuVk X-Gm-Gg: ASbGncsyuWrR0SmVfWRjC82hiRaumY/FMSBh0c8zs+xrwSgxddCYhaM8JJmVgLXlQTN XVMPyzJz7BQZoyz5jwQJex2PowEhB3I7GP54TB8v3UukO+w1CrVOsCkB82mQjc3OAGQFPA4IeL8 3UDiPdf/9fHsXXl/Z4os64b0ptv4sunk05FZzPGAVD9CFztU3eXR+L87bGi3P+VzIXJQ0dyFPxN 4AmAaYa/tP6a1DykbFM1rvDopexn5V1eK+ZAAuZA9QviBU715KLEdCTs3FfMdkLRSAvzrPffLOW nKlHflGBjjuU1KHFfDqNU1KX52RHczyErgNO3638TUFuXtIw1D2IN7q3/m9qdjuZZwLskSwgj+j fxY4TVBnGU8L42CZ1uJYm0vLTMbHVVXZ4xZH9/ITiMlIkUzMF3eT/0sFTCQ== X-Google-Smtp-Source: AGHT+IGj/mnTdNunntkFhu5T5OYV/engYbKCDESQMvWeZh/bZdwdcesEESScq3xRnOkoepmx1Dp4iA== X-Received: by 2002:a17:90b:4a92:b0:32e:e18a:368c with SMTP id 98e67ed59e1d1-3342a257491mr1189443a91.7.1758752844332; Wed, 24 Sep 2025 15:27:24 -0700 (PDT) Received: from smtpclient.apple ([84.39.151.13]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-33473f7bebasm98742a91.13.2025.09.24.15.27.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Sep 2025 15:27:23 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 2352b89d2f73 - main - nanobsd: Fix regressions from last cleanup From: "Enji Cooper (yaneurabeya)" In-Reply-To: <202509241644.58OGio1p048008@gitrepo.freebsd.org> Date: Wed, 24 Sep 2025 15:27:13 -0700 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <9DCA5700-4BD1-4C7C-9510-B0A79D41265E@gmail.com> References: <202509241644.58OGio1p048008@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3826.700.81) 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-Rspamd-Queue-Id: 4cXBLB3kfkz3N8Q > On Sep 24, 2025, at 9:44=E2=80=AFAM, Warner Losh = wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2352b89d2f732e3fa33fbd494267f0d4= cb917e51 >=20 > commit 2352b89d2f732e3fa33fbd494267f0d4cb917e51 > Author: Warner Losh > AuthorDate: 2025-09-24 15:43:42 +0000 > Commit: Warner Losh > CommitDate: 2025-09-24 15:43:42 +0000 >=20 > nanobsd: Fix regressions from last cleanup >=20 > c99bb5747f5e changed ( ) grouping into { }, but in these cases we = chdir > and depended on the subshell not changing it for the caller. = Restore the > old behavior. It seems to work w/o this change, true, but the old = code > was intentionally like this. >=20 > Fixes: c99bb5747f5e > Sponsored by: Netflix Thank you for fixing my faux pas Warner :/. I was actually considering = leaving the curly braces in place and just adding ellipses around the = affected instructions (it would have made the sub-shell scope explicit), = but this is a great fix too. -Enji= From nobody Wed Sep 24 23:24:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXCcL4ymkz68bh6; Wed, 24 Sep 2025 23:24: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXCcL4N3vz3T0F; Wed, 24 Sep 2025 23:24:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758756290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Mt4s7nzrgwu3S74SmD5bLUA0dubDEAQM8ykVjkJB3g=; b=lCfm0J94m9GboN7CSutpyjT39zuqROTOGDnN2ORk8yi32ecQkSEfXVdSw02RCFF8+FGw+c UhDytAc8+6oAK1WLq3LYh1Rt2zMuGkjeObZnY4BzI/h6S572eZgepcU/PrlAeOrjKsOo9/ mLGMs1OIFyVxZv3ncdsMpnCkLhynSOk26VsgLXWtPi92K0/9rBxuHzYQVPkOLxPOfLQ5F+ zfePVNZjmr7AnZYxy5E/Mli0ImE94PTbvqcGUzQcwdAfjPSy2/bdFdAV0iJDYRwFnfBjBH S4Pi68u7d1PEGMkhHg7pq9jj0kC1aYPSXLlJ63Z54nWG/v4mfdgxz42edtLjvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758756290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Mt4s7nzrgwu3S74SmD5bLUA0dubDEAQM8ykVjkJB3g=; b=VeAzY7J9rfs0OtCyytKRlYOHaWXaCAaMsmPUGk11gOGl4RNMLHOB4ncfq0ICcSzZR/W/Bf v+ZeNFCyxZ2tqvzTsP3xi3rUsqmUdsPqWgDeKw4JqDFanD3n9K162DMgtNMpsMcJbB4OGx 5sLafaDG6beceXV2LiFnx/Ab1ADxBe8dH11qQ7ifea9hRCf1A/DhSTG2y398B+7J9RfpIs gvvFk6p5MOmEYKmr7nZWYb2A1rwPo5fCKLbsvXZqHFZ20wXIYbzECDsVAP6Pw/31BwFuFF KJIcWiHSVlGDkjXK955BNLufxTU41WaELlS6eTGWLAIraT2A21VkcgyZIngv3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758756290; a=rsa-sha256; cv=none; b=crknyBN9mExTh28xIeRn8+qvsKsWL2HuHWRO+dXBq5+akK1KRbOBi3lBpJjsmvkW8zEuY8 r/SmiXjQl9LlryaxFQjmqAWSS6VTWPvYbCzpq1lolXVNgGGtUqXGtR1SXjTKyneKz8XAsg WNyedqFg+KkNe1rH0pWf+PtJqXyDEDT7l9Bt1t6Mxtxh7fpPs2f4pEmuKf8BmKI5PYKMsq t7IjDwlFmUTldhUjqP6kBLH/JsBcCqzE1VtS6gmtKVU7UqImBNTLa3wp7M1acsiNBPJSoK Lzcr5MArQFGsLrpmWk7HrTi/oqRwoNka36NpjSyNPzONM8guxyRoctld4RDZ5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXCcL3g4vzslZ; Wed, 24 Sep 2025 23:24:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58ONOoB7001745; Wed, 24 Sep 2025 23:24:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58ONOoYO001742; Wed, 24 Sep 2025 23:24:50 GMT (envelope-from git) Date: Wed, 24 Sep 2025 23:24:50 GMT Message-Id: <202509242324.58ONOoYO001742@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 56e01d0d7e0f - main - release: Make toolchain OCI container use pkg set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56e01d0d7e0f7c2129c05467ca99d5f5538f52bc Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=56e01d0d7e0f7c2129c05467ca99d5f5538f52bc commit 56e01d0d7e0f7c2129c05467ca99d5f5538f52bc Author: Colin Percival AuthorDate: 2025-09-24 23:12:57 +0000 Commit: Colin Percival CommitDate: 2025-09-24 23:24:37 +0000 release: Make toolchain OCI container use pkg set This also indirectly addresses the lack of FreeBSD-lldb package on the riscv64 platform by relying on that package being part of the FreeBSD-set-devel set iff it exists. A subsequent commit will adjust the "notoolchain" OCI container image to also use a package set, which will indirectly affect the contents of the "toolchain" container (which is an explicit superset of the "notoolchain" container). MFC after: 1 day Co-authored-by: dch --- release/tools/oci-image-toolchain.conf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/release/tools/oci-image-toolchain.conf b/release/tools/oci-image-toolchain.conf index b3b7eed8e8d1..984fb3fbfbfe 100644 --- a/release/tools/oci-image-toolchain.conf +++ b/release/tools/oci-image-toolchain.conf @@ -1,16 +1,11 @@ #! /bin/sh -# Build Open Container Initiative (OCI) container image with almost all of FreeBSD base.txz +# Build OCI container images with almost all packages for running and building FreeBSD. OCI_BASE_IMAGE=notoolchain oci_image_build() { set_cmd ${workdir} /bin/sh install_packages ${abi} ${workdir} \ - FreeBSD-clang \ - FreeBSD-ctf-tools \ - FreeBSD-lld \ - FreeBSD-lldb \ - FreeBSD-toolchain \ - FreeBSD-*-dev + FreeBSD-set-devel } From nobody Thu Sep 25 07:55:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXQxT566sz685KN; Thu, 25 Sep 2025 07:55: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXQxT4Lkmz3V74; Thu, 25 Sep 2025 07:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758786925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HOAQsZXCDCxCzwG95BT6J81pJtZO2Nbr13LmM6ezSfw=; b=QQOs0EP5icfeaauOxiVV2fS+7MEUUioAB29GvX2/eseJUpcSF8jdmnvV2GJiSMqKkit34C yjz1bRSYRwKt+3OO1Pcq1+qayKOeJ96Zs+B8Ww0qYfOd9r/WUxF228CxC+RxHqvUN3FXxZ HbNPo27OG1eRQIqo77zhDjTHdsR2flQuVCJLWuuOWHwIQroRf6jHQa3RiTGqu9vfyL7wQK u0frfb7PR6iXY+BBVUgXQmLpr7Ou4POwVdHUVuYAwd5ioQDBCEU2VXRAdXIT8deYPMkbek OPeF9Z1yLBIePT3royAltta8tPpDTz5TVIUtE/iTfgYGtPngHKlRNNPesXsfGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758786925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HOAQsZXCDCxCzwG95BT6J81pJtZO2Nbr13LmM6ezSfw=; b=p90zqDwOuc6MDLVqs9LDsaGaOpT2kL2qH1a91I3jxlRbsWwvEvx5ti0Tv9WM+52NMDDNzj 3AFseU4aHUk5E9nR0mbV189UshIRhGGO2VvnrRA/RxzcPKzssDm/jMcZYhEJ8QVI7CEOTh 6x6a0/dO2HqLTOA1BjIN5dUw2lFyqOdyELRvGLxczPDsefXViuvvo5J0t9mdRazI9mTYCh b4hgNkT2EWd9RqVIA9UQ6/WPu7fRX3qGtR4QQZZRcJW9V2DPNtCJsto37Kp2wj2yPXcmrl i11VKiFtpJ5KLr21QwR38oflqEOSJZ0c61Bcx7pvaJ3/dWiOcgvrRj1Xwu8ZSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758786925; a=rsa-sha256; cv=none; b=hIDZoJZ8it7F1vHilduPoChENlgJC4ZtoLQQGdS6DOEWJb43BWZRwCKhZZv7f+qsoKeQhX jKNbYRcRFgu1kZdFK4WlXW3gbpc3QFnbh6nwbJHfQqVL8CJmdDmQmg/GFmbR5B2RqcwjDI f1BktyULKxyN3sEa0QYS5qJDTlYsQo/CaUspxWTpieX7fD2+lhZDdB9emftEjYN71m1hfU tmQ+YdIJzqXdLNaun/m3Uqcq2PCK/63iyLBPF0RNmnRfGOQUCCnRKfQhhgods1ux130T/W 05ec49Tsx/zPHVkpXqwGkK6M1EbadPNQBKOsOQ1AgECycLUNeUjSNpPmRfSZUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXQxT3Ltzz17WM; Thu, 25 Sep 2025 07:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P7tPW1060930; Thu, 25 Sep 2025 07:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P7tPrf060927; Thu, 25 Sep 2025 07:55:25 GMT (envelope-from git) Date: Thu, 25 Sep 2025 07:55:25 GMT Message-Id: <202509250755.58P7tPrf060927@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: 186e433300fe - main - u2f(4): Use taskqueue to start USB transfers from kqueue context List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 186e433300fed9093dd9716baa20e838eb3b51b6 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=186e433300fed9093dd9716baa20e838eb3b51b6 commit 186e433300fed9093dd9716baa20e838eb3b51b6 Author: Vladimir Kondratyev AuthorDate: 2025-09-25 07:54:19 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-09-25 07:54:19 +0000 u2f(4): Use taskqueue to start USB transfers from kqueue context to avoid recursion on u2f mutex and taking of hidbus sleepable lock. Tested by: emaste PR: 289494 MFC after: 2 days --- sys/dev/hid/u2f.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sys/dev/hid/u2f.c b/sys/dev/hid/u2f.c index ac2eba7a499d..39610845c5fb 100644 --- a/sys/dev/hid/u2f.c +++ b/sys/dev/hid/u2f.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -78,6 +79,7 @@ struct u2f_softc { struct cdev *dev; struct mtx sc_mtx; /* hidbus private mutex */ + struct task sc_kqtask; /* kqueue task */ void *sc_rdesc; hid_size_t sc_rdesc_size; hid_size_t sc_isize; @@ -121,6 +123,7 @@ static device_probe_t u2f_probe; static device_attach_t u2f_attach; static device_detach_t u2f_detach; +static void u2f_kqtask(void *context, int pending); static int u2f_kqread(struct knote *, long); static void u2f_kqdetach(struct knote *); static void u2f_notify(struct u2f_softc *); @@ -174,6 +177,7 @@ u2f_attach(device_t dev) mtx_init(&sc->sc_mtx, "u2f lock", NULL, MTX_DEF); knlist_init_mtx(&sc->sc_rsel.si_note, &sc->sc_mtx); + TASK_INIT(&sc->sc_kqtask, 0, u2f_kqtask, sc); make_dev_args_init(&mda); mda.mda_flags = MAKEDEV_WAITOK; @@ -217,6 +221,7 @@ u2f_detach(device_t dev) destroy_dev(sc->dev); } + taskqueue_drain(taskqueue_thread, &sc->sc_kqtask); hid_intr_stop(sc->sc_dev); knlist_clear(&sc->sc_rsel.si_note, 0); @@ -519,6 +524,14 @@ u2f_kqfilter(struct cdev *dev, struct knote *kn) return (0); } +static void +u2f_kqtask(void *context, int pending) +{ + struct u2f_softc *sc = context; + + hid_intr_start(sc->sc_dev); +} + static int u2f_kqread(struct knote *kn, long hint) { @@ -533,7 +546,7 @@ u2f_kqread(struct knote *kn, long hint) } else { ret = sc->sc_state.data ? 1 : 0; if (!sc->sc_state.data) - hid_intr_start(sc->sc_dev); + taskqueue_enqueue(taskqueue_thread, &sc->sc_kqtask); } return (ret); From nobody Thu Sep 25 07:55:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXQxV6fj0z685H8; Thu, 25 Sep 2025 07:55: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXQxV4Wc3z3V5T; Thu, 25 Sep 2025 07:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758786926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xnBgEssCrFM+YxQawInQvBVxG1SIiwrZWFveIlMdRcQ=; b=YU72iolwbBv1TqlWlyfst+QFXB8BBOeX9GxjxE2q5ntlQM1hcJZfJvvBvntR1J7ZneY4xb 3a1VuT1072W1V4Zm648cbsBGRB2gZooo2kk4TV2vqxTlt0xYTkzymazU8LCCdk7pU883NE ToTwBXDtluetvwOjbcrXjNJiO+z0cl7K4OiqdVhr8BgmS4Jl6ZC0KfHmDbvd4dxRNO0Sgf XthjoaWqb9WjQLUCerrSsDXJQWjczsijhu3QqpCCBmaqiU+ad7ujvlRHzaGM39yJAqBLNq t3lA5YfaZIoba1hwzixtHovRV5ThzVX8sJUNpSVwdOAAKVV5eM7EUeDbBFXVgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758786926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xnBgEssCrFM+YxQawInQvBVxG1SIiwrZWFveIlMdRcQ=; b=Dy2v8QzRc0KJekzlj9Lo6BK3YnfePuDTYYdHibLOLAQ0FyUxfu45ojVwfkB5w/KJgf0INm g/JyYL5ZUtTMLrCZdoMkQ5h2Q5XQ+iOQcufl1qbkP/KLnt0wZMRzgmIMTh6M3qcfHrEN2F 4QsLeAuVmmRpzxZVYk8AZ1PI4xZL3ivtSEyFzZ5ME1kDnrVE3Sls0tDKSWIAtkR+8QwGAO Q2YWUKRhJtFQHqZokRDPX+1u3M5aQhCcLXADDmS0tSm6cQMI2mEqi/ANUihBwPJo5odrzy meMjNukOFMGh9XqdaCTl9a6i7O3ao4mEKJLz84ofEu+MGg9QPaw1kCoPy8SwdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758786926; a=rsa-sha256; cv=none; b=hRbd2bXmwODBANAveJcjLHoTirdcd1ABVwNxZGH1ENU1HKPeLEc9KbA8w9K8LOsv72dR1Q nx90dhrpFDOfR52xqE/UJ92EkbCi2T1WzEzMA3fG3EqZxNDtb+U+2TE4F0jzuyzvCEiGV8 8ABUgNlBtvXCfPBm01jF4ctW5v0Sn8ADaB1u95mQive4U26Yz/9klsF7AMo1y6Lf+9gc1g 8PM1p07X9dnL+IuGt8IuTViWetOgIQyNRnY7w0jR24ecPtM+3Tmkr9p587zH/3uFXM3Id4 W7/2Vdb4XxXl6R9U0Rk1RDrumvZRYxlMmqFL6yD75d2DXvUy65Tzd2o16Yrh0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXQxV46sMz17QF; Thu, 25 Sep 2025 07:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P7tQoA060963; Thu, 25 Sep 2025 07:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P7tQoP060960; Thu, 25 Sep 2025 07:55:26 GMT (envelope-from git) Date: Thu, 25 Sep 2025 07:55:26 GMT Message-Id: <202509250755.58P7tQoP060960@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: e43fbf27976d - main - u2f(4): Invert U2F_MAKE_UHID_ALIAS kernel build option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e43fbf27976df17991d32c72c41e43fda66fb262 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e43fbf27976df17991d32c72c41e43fda66fb262 commit e43fbf27976df17991d32c72c41e43fda66fb262 Author: Vladimir Kondratyev AuthorDate: 2025-09-25 07:54:19 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-09-25 07:54:19 +0000 u2f(4): Invert U2F_MAKE_UHID_ALIAS kernel build option This makes non-GENERIC kernel configs easier to maintain. Requested by: glebius MFC after: 2 days --- sys/amd64/conf/GENERIC | 1 - sys/arm/conf/GENERIC | 1 - sys/arm64/conf/std.dev | 1 - sys/conf/NOTES | 3 ++- sys/conf/options | 2 +- sys/dev/hid/u2f.c | 8 ++++---- sys/i386/conf/GENERIC | 1 - sys/powerpc/conf/GENERIC64 | 1 - sys/powerpc/conf/GENERIC64LE | 1 - sys/riscv/conf/GENERIC | 1 - 10 files changed, 7 insertions(+), 13 deletions(-) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index d5a1adb2dc65..2e41ed26403a 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -386,7 +386,6 @@ options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus options IICHID_SAMPLING # Workaround missing GPIO INTR support -options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ # EFI devices device efidev # EFI pseudo-device diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 26b0c7bf0294..7394f3842d43 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -261,7 +261,6 @@ device aw_thermal # Allwinner Thermal Sensor Controller # HID support device hid # Generic HID support device hidbus # Generic HID Bus -options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ # Flattened Device Tree options FDT # Configure using FDT/DTB data diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev index 719f272426dd..c5c364ffda04 100644 --- a/sys/arm64/conf/std.dev +++ b/sys/arm64/conf/std.dev @@ -115,7 +115,6 @@ device mmcsd # mmc/sd flash cards options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus -options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ # Firmware device mmio_sram # Generic on-chip SRAM diff --git a/sys/conf/NOTES b/sys/conf/NOTES index c7a8862fb906..ea9b2667607e 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2447,7 +2447,8 @@ device hpen # Generic pen driver device hsctrl # System controls device ps4dshock # Sony PS4 DualShock 4 gamepad driver device u2f # FIDO/U2F authenticator -options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ +options U2F_DROP_UHID_ALIAS # Do not install /dev/uhid alias for + # /dev/u2f/ and rename driver from uhid to u2f device xb360gp # XBox 360 gamepad driver ##################################################################### diff --git a/sys/conf/options b/sys/conf/options index 66f7f2ee2d7e..b48ad1cf42cf 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -1004,7 +1004,7 @@ IICHID_DEBUG opt_hid.h IICHID_SAMPLING opt_hid.h HKBD_DFLT_KEYMAP opt_hkbd.h HIDRAW_MAKE_UHID_ALIAS opt_hid.h -U2F_MAKE_UHID_ALIAS opt_hid.h +U2F_DROP_UHID_ALIAS opt_hid.h # kenv options # The early kernel environment (loader environment, config(8)-provided static) diff --git a/sys/dev/hid/u2f.c b/sys/dev/hid/u2f.c index 39610845c5fb..08f1a5ceedba 100644 --- a/sys/dev/hid/u2f.c +++ b/sys/dev/hid/u2f.c @@ -193,7 +193,7 @@ u2f_attach(device_t dev) u2f_detach(dev); return (error); } -#ifdef U2F_MAKE_UHID_ALIAS +#ifndef U2F_DROP_UHID_ALIAS (void)make_dev_alias(sc->dev, "uhid%d", device_get_unit(dev)); #endif @@ -587,10 +587,10 @@ static device_method_t u2f_methods[] = { }; static driver_t u2f_driver = { -#ifdef U2F_MAKE_UHID_ALIAS - "uhid", +#ifdef U2F_DROP_UHID_ALIAS + "uf2", #else - "u2f", + "uhid", #endif u2f_methods, sizeof(struct u2f_softc) diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index ac0cc4ba74e7..06738a7ed506 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -343,4 +343,3 @@ options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus options IICHID_SAMPLING # Workaround missing GPIO INTR support -options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 48f9df5b7e38..91c91d58d058 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -293,4 +293,3 @@ device virtio_balloon # VirtIO Memory Balloon device options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus -options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index 9af71f30626d..5fb9715de655 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -274,4 +274,3 @@ device virtio_balloon # VirtIO Memory Balloon device options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus -options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 2ff711e80127..a8500fe80019 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -132,7 +132,6 @@ device umass # Disks/Mass storage - Requires scbus and da options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus -options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ # Serial (COM) ports device uart # Generic UART driver From nobody Thu Sep 25 08:19:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXRSh6VRXz686rV; Thu, 25 Sep 2025 08:19: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXRSh61lLz3YM6; Thu, 25 Sep 2025 08:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758788340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BpzUnQ5NOzf/GRsLfRrP2QC8+BXWZEzc/BJ0AFFvJos=; b=TMhvBv4LkZgZ8GbLENu/HenMQy7fFB/UeW5WvKdVCMio/pE6qTJJVboF5De2GvNLm7mk2Q DLseL+5vlfcvQ2XNwJKBDSn2npNmUP0A7NEtXCkEq4UoYpaCRYcza6Pi7uP4Uzhi9daZWT rT+qgefRMdsZbzt9ZyYY8Wyl8YbTzQkpMWtv9xyIx3On1lsT18iuhZPcMV6WBMDVpVRJu6 FlrMugeK5vYQvwzhrFyzCnAasrhCD2ayJNjzuQK0AITYVSC2JMXKU5nDZpMnc6zcUdYucK mCKVDaQkwdYepXTpXwmn0Hg/cWc2QmpdvH+XxJ+jw/G74PSB9DjN+vE0DxvF5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758788340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BpzUnQ5NOzf/GRsLfRrP2QC8+BXWZEzc/BJ0AFFvJos=; b=X6K+TzwiBPaiyNpvw8sIHb7X0kKsqQioyY4zN0pjudpiWMSNQ6h6zCHd6lxEZA4pLcS950 FnNp3aXeDWkgcwkDxWmCgNFtt/M4MB98O0VYBeH3ukWs91aGtwpNrj4c7dqkaEbP2PTZOd ac6YSlGLQvJ9v25Vtjq+SrQ+vZbi1ZmecuMPCOaVXArdxZ8THKZCcYpSFpxw2QLlkhNEhb vNIw51ADkXgxNCv/Wrh/afR46Rm0/XZcr2GRB2ExTCrgzm6W4IsMNa3H782jvcaGp0U9y1 h3amGZUrI8Rc65GWE2COamO21Z5Hu+jFciy8iy4htayRcqErbVfbfRkEuFfdUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758788340; a=rsa-sha256; cv=none; b=P/w5mEcoy0c3g7lGdHpE47xH+QJx3EtfEi5NSmdZCWxjMqy3zx5IM1zVTlFnWX46qpmSMx zvv/trI94zWkw+OMP/rhQSB7x/YAjBbxLGMGbLo3UKanwlwC2eBA5+0oRW2QeU9Cd9RJVb KurpjMKf81At3vtbrQaInbyTDAO0Rs0z37TykI8/SLXezVT1O4z1qBnJAZ0xPmfzT6UeyE k5hsz8mf9MRHn481TKcIN8Ry2LSrPAtMaYsCwBdMKkaV/HTT7X00fxi+X0OsFnyyyuL/T3 nyBkCG0azuReRiRqojlrDDTAalw7SD4YyFldKQSTBkwA2smTND7fImXsp5CfAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXRSh5KVBz188s; Thu, 25 Sep 2025 08:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P8J0BR000878; Thu, 25 Sep 2025 08:19:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P8J09S000875; Thu, 25 Sep 2025 08:19:00 GMT (envelope-from git) Date: Thu, 25 Sep 2025 08:19:00 GMT Message-Id: <202509250819.58P8J09S000875@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: b00e65ff70a4 - main - newsyslog: use str2sig() instead of own implementation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b00e65ff70a4613b3bf2fd2781d174fa437fbfbe Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b00e65ff70a4613b3bf2fd2781d174fa437fbfbe commit b00e65ff70a4613b3bf2fd2781d174fa437fbfbe Author: Gleb Smirnoff AuthorDate: 2025-09-25 08:18:29 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-25 08:18:29 +0000 newsyslog: use str2sig() instead of own implementation Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D52697 --- usr.sbin/newsyslog/newsyslog.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 0c8c2c85b893..e24e2db1155d 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -309,7 +309,6 @@ static int age_old_log(const char *file); static void savelog(char *from, char *to); static void createdir(const struct conf_entry *ent, char *dirpart); static void createlog(const struct conf_entry *ent); -static int parse_signal(const char *str); /* * All the following take a parameter of 'int', but expect values in the @@ -1485,8 +1484,7 @@ no_trimat: working->sig = SIGHUP; if (q && *q) { got_sig: - working->sig = parse_signal(q); - if (working->sig < 1 || working->sig >= sys_nsig) { + if (str2sig(q, &working->sig) != 0) { badline( "illegal signal in config file:\n%s", errline); @@ -2884,28 +2882,3 @@ change_attrs(const char *fname, const struct conf_entry *ent) warn("can't chflags %s NODUMP", fname); } } - -/* - * Parse a signal number or signal name. Returns the signal number parsed or -1 - * on failure. - */ -static int -parse_signal(const char *str) -{ - int sig, i; - const char *errstr; - - sig = strtonum(str, 1, sys_nsig - 1, &errstr); - - if (errstr == NULL) - return (sig); - if (strncasecmp(str, "SIG", 3) == 0) - str += 3; - - for (i = 1; i < sys_nsig; i++) { - if (strcasecmp(str, sys_signame[i]) == 0) - return (i); - } - - return (-1); -} From nobody Thu Sep 25 08:20:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXRV370Bkz686hV; Thu, 25 Sep 2025 08:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXRV36Q9Yz3Ykj; Thu, 25 Sep 2025 08:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758788411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=698gDmAwrXQ67HTSeO3YjvTYgp1u4w4diTRvBTBBYpM=; b=E8LNUFLmdA7c33PSr18C7eppCnN0TYZjhi/owybHwh5D3adDNmjCbNRwQIwsywz2xW9KV7 9uhmvB0tXwKi/27TRNuF3KEHPi170OyEILJ53dq+IP0PQ5ew3Vx4u9h8PTZWmxF2sMMXm8 TuMeYsC+5IafCBjTH1ANm9pSRhNj7bg0KBcD/jRvAH/9R/H/o4OZEfgOv8MLQ6qUxEQzgd fSXiVwEmC+9q1NqrxkvOkAhxhu1NxIdhUq4EpbAzPKf62wCiXc2S6P5/TFH492P8Run2Wp uEPsTUy2T7cLH/+ir89kIBMejk0pt3FqkgUTimYIu8N8hH56vn+rIW1B1GjQeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758788411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=698gDmAwrXQ67HTSeO3YjvTYgp1u4w4diTRvBTBBYpM=; b=dBp2S5gRCYMerwaQt/6lB8rRwe82UENtnLn9XRf8bNrTH/7FFMfu/ycb++YYz2+VKd011c r+C2/nggJduUGgTpQug3+MyrWkF33iFCQobvTAZyUx/7aSjJsqwjTipncp0X0LSAMkTiOX kaWJ/A1rg3LVx2ZJ0583V4SplbGLSxQmFhWb2Rm2i9XoCK1BtanPfLrpWg/3eMT4xR2AOJ X7iw0ARUqulF2S3Y+wof+LN+a/zKtJlmEbZcK+6ojwRQvI1+bikDNKmH16MsTs1RWkA8h+ naUTc5HsZ9RPrXLPiHCH3VvdO38sEtmxTFY+MAoIcIpoPdYaSEAEzvyCqp5kXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758788411; a=rsa-sha256; cv=none; b=AXu15K+SzR5GcfPerVhJBYaGSs6WSnEoE/l8dj1RHZWL1XrRLEN7636xepKsZN76LZ8w0X Awfq91g3sPyKCykOYQ14SlSUoyObzn5nj0kbq8hM+r2s1s2oVhM30dC+1Zr/ETeTs0Q8Fh 2G9lWGQ2BJxUjG3ltX3uJqyuKVOf1okTBPO60e36ywBKznRkKPSc0srnEdtIRRfGdzdF3R xsUoe+z8dTCOIw82VDDfCYV3XGoHhiGBCINYfEVqdTfNTTsma4zC+nyfuIJ0LvDxThOhO3 cXqKeED4uepH4KrwT8tMdLONWTjRUvKUg3wsp2y2tPnM67k3FVsYkFvR/roYqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXRV35qfpz188t; Thu, 25 Sep 2025 08:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58P8KBnH006324; Thu, 25 Sep 2025 08:20:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58P8KBkE006319; Thu, 25 Sep 2025 08:20:11 GMT (envelope-from git) Date: Thu, 25 Sep 2025 08:20:11 GMT Message-Id: <202509250820.58P8KBkE006319@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: b0091036f724 - main - psignal(3): document return values of sig2str() and str2sig List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0091036f7240ab244e86a087b18459185a260de Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b0091036f7240ab244e86a087b18459185a260de commit b0091036f7240ab244e86a087b18459185a260de Author: Gleb Smirnoff AuthorDate: 2025-09-25 08:19:46 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-25 08:19:46 +0000 psignal(3): document return values of sig2str() and str2sig Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D52698 --- lib/libc/gen/psignal.3 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/psignal.3 b/lib/libc/gen/psignal.3 index 098b7b02a9b9..bf6a99b4b113 100644 --- a/lib/libc/gen/psignal.3 +++ b/lib/libc/gen/psignal.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 10, 2025 +.Dd September 23, 2025 .Dt PSIGNAL 3 .Os .Sh NAME @@ -141,6 +141,13 @@ The name in can be either the name of the signal, with or without the .Dq SIG prefix, or a decimal number. +.Sh RETURN VALUES +The +.Fn sig2str +and +.Fn str2sig +return 0 on success and -1 on translation failure. +In the latter case the memory to store the translation result is left intact. .Sh SEE ALSO .Xr sigaction 2 , .Xr perror 3 , From nobody Thu Sep 25 11:51:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXX9R10QRz68P4l; Thu, 25 Sep 2025 11:51: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXX9R0VySz3w6S; Thu, 25 Sep 2025 11:51:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758801067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPqO3uZAk1cEnoabWJns4X+iF9+lKEiPDygksRRFT+w=; b=ZbmCHfOmXX/xJA0kifhPn4++O8l+jl34vHun5edD+ies6W+W/jv3EZ8YA5w1CmsNwjlyKp 7skRCHq1gIs6jQMCrFm8jAkVYi9XJkI+BX8vN3Bpi8UE7Xf4vQ1KHoO58S5agD15O3HPWM 0MxPLJVqfY3iPyKJZSWZOW5RgMuA15JQoELvh4p2Sry8MieJxxlg5NUtCI8aY/6rpcElGp p+jTrzdybIx2PAL9djRLpxYGZUsNTrmJCjeUsWZPMxMnhPzHurSAFSl5MX1JQTtsUUkyQC t6EdVlFktU1YjWnA6daGyx/2Wm7XkcQiUON66gewMRyhudbAskbea8PjmLv1HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758801067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPqO3uZAk1cEnoabWJns4X+iF9+lKEiPDygksRRFT+w=; b=XIlA83FXsw0TmfZ1k0g3JePX7QX7uG1vvrMkTDfjkGWPngx/e9v8f0gMd5t4tzxmSkzYZl DOj8xju6PmWzW4u/OD9q+TlExkQ1v3ZmNN7BmRy7rh+AA4Grw8lNTMwuV1IL0yuXlJIdsB 3tlX87iE5Dg2PSvzVzkMsKZRQA4kI5ewSQTq5ggtDxdvBFy4mv54vgoVsp0DOlvzVEckJQ hGyrDf6wbHIcBGVWfYTxKyaj8rt3wIk+6Xd/VebWpPiNizKK4e3p7KOzYjL0jfhmjK2Qd/ LbpuqRT8ZReSzqjgY+E8KI+RDi9jJa8nTZA7g0nFb9H5CfJ4fMrWFAzXK3v7pQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758801067; a=rsa-sha256; cv=none; b=lN0S+MlSjbm4hk81diybVWw6iWipG//BWlbV/Hv/Dn3/HyWleg11UM+m4avfLEGKJQ4Rv1 xIiph7f/mPgBb+9IqTk+4FCEVybS0FQaYXgX/ekSHiJFDAOlhlZ++2ysVS8ro2IHnXBQlq 8EQwy+ymsfwg8vKLddaTuhi/5NY9slMRQc+lVvzZL+DhWiwvkT9SOZnDy/tiYzBmYcamJm YSkhpOsAg77G/pa3+kKXLqBqz1TTwXa+lqyDMlpGWvTgR22IdF7nz9PlMXhzy7sPyyi1a4 92m1EDkog4bVBP2WhvqPmiCphq/HsnczaIkJLNIntuHRtioyay9wwhdCJI4NrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXX9R00Hvz1Fr2; Thu, 25 Sep 2025 11:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PBp67T006610; Thu, 25 Sep 2025 11:51:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PBp6Qx006607; Thu, 25 Sep 2025 11:51:06 GMT (envelope-from git) Date: Thu, 25 Sep 2025 11:51:06 GMT Message-Id: <202509251151.58PBp6Qx006607@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: a15f2c5cc58f - main - proc: perform P_CONTROLT check on fork without SESS_LOCK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a15f2c5cc58f403407daf797a2e6963adffa6c2c Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a15f2c5cc58f403407daf797a2e6963adffa6c2c commit a15f2c5cc58f403407daf797a2e6963adffa6c2c Author: Mateusz Guzik AuthorDate: 2025-09-25 11:50:01 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-25 11:50:55 +0000 proc: perform P_CONTROLT check on fork without SESS_LOCK The flag is guarded by proc lock which is already held. After tracing poudriere for over 4 hours like so: dtrace -n 'fbt::do_fork:entry { @[curthread->td_proc->p_flag & 0x2] = count(); }': 2 15605151 0 20074116 Over 56% of cases did not have P_CONTROLT set and could have avoided the lock. This reduces hold time of the proctree lock. --- sys/kern/kern_fork.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 2ab9b363f8b5..7f6abae187b3 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -610,10 +610,12 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread * p2->p_flag |= p1->p_flag & P_SUGID; td2->td_pflags |= td->td_pflags & (TDP_ALTSTACK | TDP_SIGFASTBLOCK); td2->td_pflags2 |= td->td_pflags2 & TDP2_UEXTERR; - SESS_LOCK(p1->p_session); - if (p1->p_session->s_ttyvp != NULL && p1->p_flag & P_CONTROLT) - p2->p_flag |= P_CONTROLT; - SESS_UNLOCK(p1->p_session); + if (p1->p_flag & P_CONTROLT) { + SESS_LOCK(p1->p_session); + if (p1->p_session->s_ttyvp != NULL) + p2->p_flag |= P_CONTROLT; + SESS_UNLOCK(p1->p_session); + } if (fr->fr_flags & RFPPWAIT) p2->p_flag |= P_PPWAIT; From nobody Thu Sep 25 12:36:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXY9S3GZfz68Rts; Thu, 25 Sep 2025 12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXY9S0gXcz41mL; Thu, 25 Sep 2025 12:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758803772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cGSSe+KypJ6DgeVZsIMnhe2xny7WjW5FdxaWOkNFy7I=; b=ZNh1FrRh0hcnPsX3N4XPUMg5/S7MM9okfLJTL3JmP6JYwVKDnrCYr+qHgKLMeuQkfqN9lU s54Om3pav6Zhn8QutbDBjXU0hpoz5JDUuNBzz+3ymsH6T6H3EseuMQFkgmengaa+Unnd/s 1GoLlTwbjLvMW+jaVXzJQGnuJiBMMMde9s5If2loSHrkiQKw81N5QyubVxD24a3V6BEpsu M7nP5EJzmeYWPcOqHKiLmRNb0wdBBIYNjhEqWAPQQbOseNfx2F0sBfLEX+cWjzDxWKHVTr cHmBEvgx9vAHiNJnGmk5ksskl6XypeGj07UpCArDZQ9DJ6250Dxc2RALys7hKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758803772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cGSSe+KypJ6DgeVZsIMnhe2xny7WjW5FdxaWOkNFy7I=; b=RDCJEKw3AfXaXO8t69YdNt2A3bh2vsaIeRkVzNrZB8dBk3uVYFL+wi4BXNyZAMpDL+MOD8 h+JtDpV4gike6Tj9ktSc9j1+JTg+NeiTA2Owkou1iJzqtGMLrtRrsPg3HRUhGkfvkzzBoY B59IkpyqD4RkPtSLjxZ5y2H4qB1o7QpEvX9oG6KH8/vqSfU1vz7D/9KYSc6O+27PnIzg/o sXWNIRaG+drvK7h178+1UJ2+p6icKcenV4Epi8TRcDd61/nDWHHKYWGy1HUYESw/mw4NR7 9r84gmQXlbLyJDXq6p3mVaQksX8nSuvMpmREpJt9B8BgtttGkWSWtjud2lL7Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758803772; a=rsa-sha256; cv=none; b=QCowByVYWK7FuBeHx15UStgGrnm4Tas48Sr5VUKY7boWRRYF/lLJ8QwYW4e8FQ2Kpy9DQi dIfKe8dzkveZ2YMJoCrCuC6yKOXKJbwyDUN08dvL+nr7YVeJDkJNC7ri+0b7wBLB6RvXX7 KxRu0XrQCiOQbaocK7vspre4aFgo9WMwydHjW4z6Sg/1IPPdJe9kShGj7+RNdubxS2wKI/ 4p3FQ7wvNqXEQsSYNY2gQ3YcNdeKpUK9Qs6uYt1BK+4Ce+LzvfsKhGYOQkfCP5ytumjHqs XLEqnqsVlmDmw2BpxFYOUwqEQC7k7VgNNf3VHYxb6RmstHVlIiUiTpg9OI17bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXY9S06fyz1Grv; Thu, 25 Sep 2025 12:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCaBmA088213; Thu, 25 Sep 2025 12:36:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCaBEN088210; Thu, 25 Sep 2025 12:36:11 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:36:11 GMT Message-Id: <202509251236.58PCaBEN088210@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: f4f0308440d2 - main - release: create pkgbase repo config from Makefile List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4f0308440d2321fa9172dab1029f16a70289e4e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f0308440d2321fa9172dab1029f16a70289e4e commit f4f0308440d2321fa9172dab1029f16a70289e4e Author: Isaac Freund AuthorDate: 2025-07-24 08:43:33 +0000 Commit: Ed Maste CommitDate: 2025-09-25 12:35:54 +0000 release: create pkgbase repo config from Makefile This will allow the VM image build scripts to use the same repository config file for installing base system packages at build time. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51482 --- release/Makefile | 22 +++++++++++++++------- release/scripts/pkgbase-stage.lua | 18 ++++-------------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/release/Makefile b/release/Makefile index 491c343398b4..fb2a60130700 100644 --- a/release/Makefile +++ b/release/Makefile @@ -133,7 +133,7 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif -CLEANDIRS= dist pkgdb pkgbase-repo pkgbase-repo-conf ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd +CLEANDIRS= dist pkgdb pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd beforeclean: chflags -R noschg . .include @@ -194,8 +194,10 @@ dvd: packagesystem .endif .if !defined(NOPKGBASE) || empty(NOPKGBASE) -PKGBASE_REPO= pkgbase-repo -PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${.TARGET}/usr/bin/uname config ABI) +PKGBASE_REPO_DIR= pkgbase-repo-dir +WSTAGEDIR!= ${IMAKE} -f Makefile.inc1 -C ${WORLDDIR} -V WSTAGEDIR +PKG_ABI_FILE= ${WSTAGEDIR}/usr/bin/uname +PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI) .endif pkgbase-repo: @@ -204,7 +206,13 @@ pkgbase-repo: ( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo \ INCLUDE_PKG_IN_PKGBASE_REPO=YES BOOTSTRAP_PKG_FROM_PORTS=YES ) -disc1: ${PKGBASE_REPO} +pkgbase-repo-dir: pkgbase-repo + mkdir -p pkgbase-repo-dir + printf "FreeBSD-base: { url: "file://%s", enabled: yes }" \ + ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \ + > pkgbase-repo-dir/FreeBSD-base.conf + +disc1: ${PKGBASE_REPO_DIR} # Install system mkdir -p ${.TARGET} ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ @@ -218,7 +226,7 @@ disc1: ${PKGBASE_REPO} # Create offline pkgbase repo on release media mkdir -p ${.TARGET}/usr/freebsd-packages/repos/ ${.CURDIR}/scripts/pkgbase-stage.lua disc \ - ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \ + ${.OBJDIR}/pkgbase-repo-dir \ ${.TARGET}/usr/freebsd-packages/offline \ "${_ALL_libcompats}" ${PKG_ABI} cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \ @@ -308,7 +316,7 @@ bootonly: echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG -dvd: ${PKGBASE_REPO} +dvd: ${PKGBASE_REPO_DIR} # Install system mkdir -p ${.TARGET} ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ @@ -318,7 +326,7 @@ dvd: ${PKGBASE_REPO} # Create offline pkgbase repo on release media mkdir -p ${.TARGET}/usr/freebsd-packages/repos/ ${.CURDIR}/scripts/pkgbase-stage.lua dvd \ - ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \ + ${.OBJDIR}/pkgbase-repo-dir \ ${.TARGET}/usr/freebsd-packages/offline \ "${_ALL_libcompats}" ${PKG_ABI} cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \ diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua index 6845e0079b05..80de4ec80d20 100755 --- a/release/scripts/pkgbase-stage.lua +++ b/release/scripts/pkgbase-stage.lua @@ -81,28 +81,18 @@ local function main() -- Determines package subset selected local media = assert(arg[1]) assert(media == "disc" or media == "dvd") - -- Local repository to fetch from - local source = assert(arg[2]) + -- Directory containing FreeBSD-base repository config + local repo_dir = assert(arg[2]) -- Directory to create new repository local target = assert(arg[3]) - -- =hitespace separated list of all libcompat names (e.g. "32") + -- Whitespace separated list of all libcompat names (e.g. "32") local all_libcompats = assert(arg[4]) -- ABI of repository local ABI = assert(arg[5]) - assert(os.execute("mkdir -p pkgbase-repo-conf")) - local f = assert(io.open("pkgbase-repo-conf/FreeBSD-base.conf", "w")) - assert(f:write(string.format([[ - FreeBSD-base: { - url: "file://%s", - enabled: yes - } - ]], source))) - assert(f:close()) - local pkg = "pkg -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes " .. "-o ABI=" .. ABI .. " " .. - "-o INSTALL_AS_USER=1 -o PKG_DBDIR=./pkgdb -R ./pkgbase-repo-conf " + "-o INSTALL_AS_USER=1 -o PKG_DBDIR=./pkgdb -R " .. repo_dir .. " " assert(os.execute(pkg .. "update")) From nobody Thu Sep 25 12:41:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHd33nlz68ScD; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHd2YBRz42S0; Thu, 25 Sep 2025 12:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Iv67bnD/EpW112cS+k4NUdHXqa99dBdwbM3LA+ubp8=; b=NCBtyvSvsrrt1TjKgLukzUE1Ybjz+7LE9kmrx/AxkniGUj1JELm7uUTBHywejEnyPK0LUW oL1tp5HxLoRBOs6ZgyHjjvKRqZRyPYPJIFTGD4LyPDtrNAI7Ad8hMcLaJ3ANPcWrUq4Y5Q hsaVHyLeO+jdCinLwMj+LfUEUZXOsS9I9ydHCUnxBJJBorVO76c6vUW6phCFqbrbx/KZmP mcNMBIazxsCQA2rm9pLyGb8Gst/1MoAFAsA1+q9Q3IideD8G7CekP7aanxkr+8dXCGEZsW JmcyuwMGQMMoFN4nSmP7s0RQBzA9+0cyRYnY3l8FZuC7k9GabhEhk0RWFfEETQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Iv67bnD/EpW112cS+k4NUdHXqa99dBdwbM3LA+ubp8=; b=FNiAP58fABPdymvmzewTNLCS3Z9q/huF+Lz6JsgXd8Rb+LCuLvfgeq7M4EPjqAWKr6ilAx vPNkGmSztjpkG47ay9yDpScyUCwB1zk7CI9BuCym6DvcXx9BhD3Q+p7eiQb9OOxlgXpm7u 5ytn/UGMFlZ49L37wlaac/AyiESz22LX8alstSfwGLWcQD7hMpoBy31j8NTUwLYS+ZOL8j sOBGow/BPL++IS51F8KLv7OdktLalEjj0AhyMm6Xr2/sCxzgvlU/B73a0iiWtb8W++Ej/5 zkUCZlxnAwz8zINwy0dXAtJhXoRjps+YSO3ZDj1o+0HR2MAf0QC/MBGuMsevRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804093; a=rsa-sha256; cv=none; b=RG9sqn47OySNmXX2td2gfltZXu5JXfiHAiXIHm1EAIbX24xq9iIEkzdc5qYQmLFKheN5gE XOaVMDfXA9muzBjsnh+Ff98dtWkagb1nUuPIj3KGyW95kOp+vmfrOQj+drhF1d0ZL5pSXb imLgxmXQgK6gRiobOlJOt9HfwgpRxTFpjbdcz/ViSulDdQHkpoIuB2NRClgVTXeasg9jcx tfrmWDF/jT2jk2YAhxeP80rWpnxTkmQRZvxCQ4hvYZ9uuigjFZ19d/kXHI72YnQzF6g/nS sl3FI2S5/pAtGwPWYxol6ra+TleTMq+qiXao0tmICfdB5lkjjw47yuaw0ztSbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHd1phCz1GsN; Thu, 25 Sep 2025 12:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfXHY000784; Thu, 25 Sep 2025 12:41:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfXlb000781; Thu, 25 Sep 2025 12:41:33 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:33 GMT Message-Id: <202509251241.58PCfXlb000781@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: af922319e813 - main - pf: support one shot rules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af922319e8136a818bc6c38440d98a574c5df7a9 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=af922319e8136a818bc6c38440d98a574c5df7a9 commit af922319e8136a818bc6c38440d98a574c5df7a9 Author: Kristof Provost AuthorDate: 2025-08-27 10:02:51 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:07 +0000 pf: support one shot rules Add support for one shot rules that remove themselves from an active ruleset after match. This is an extremely handy technique for firewall proxies. ok henning, mcbride Note that the FreeBSD implementation differs significantly from the OpenBSD version due to locking differences. We do not remove the rule, but mark it as having fired previously so we can skip it. Obtained from: OpenBSD, mikeb , c981122504 Obtained from: OpenBSD, sashan , a21b78cad0 (partial) Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 19 +++++++++++++++++++ sys/netpfil/pf/pf.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index be00aff1f5cb..450e465e926a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5633,6 +5633,9 @@ pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) *ctx->rm = ctx->pd->related_rule; break; } + PF_TEST_ATTRIB(r->rule_flag & PFRULE_EXPIRED, + TAILQ_NEXT(r, entries)); + /* Don't count expired rule evaluations. */ pf_counter_u64_add(&r->evaluations, 1); PF_TEST_ATTRIB(pfi_kkif_match(r->kif, pd->kif) == r->ifnot, r->skip[PF_SKIP_IFP]); @@ -5736,6 +5739,21 @@ pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) if (r->tag) ctx->tag = r->tag; if (r->anchor == NULL) { + + if (r->rule_flag & PFRULE_ONCE) { + uint32_t rule_flag; + + rule_flag = r->rule_flag; + if ((rule_flag & PFRULE_EXPIRED) == 0 && + atomic_cmpset_int(&r->rule_flag, rule_flag, + rule_flag | PFRULE_EXPIRED)) { + //r->exptime = gettime(); + } else { + r = TAILQ_NEXT(r, entries); + continue; + } + } + if (r->action == PF_MATCH) { /* * Apply translations before increasing counters, @@ -5813,6 +5831,7 @@ pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) r = TAILQ_NEXT(r, entries); } + return (ctx->test_status); } diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index 54ffdbed3de5..bcd66fd17d5d 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -637,6 +637,8 @@ struct pf_rule { #define PFRULE_PFLOW 0x00040000 #define PFRULE_ALLOW_RELATED 0x00080000 #define PFRULE_AFTO 0x00200000 /* af-to rule */ +#define PFRULE_ONCE 0x00400000 /* one shot rule */ +#define PFRULE_EXPIRED 0x00800000 /* one shot rule hit by pkt */ #ifdef _KERNEL #define PFRULE_REFS 0x0080 /* rule has references */ From nobody Thu Sep 25 12:41:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHf744bz68SCm; Thu, 25 Sep 2025 12:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHf3Zv9z42gl; Thu, 25 Sep 2025 12:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lRT/SOvsa77bY7AoukUKrNYqkIMQV+4ciP7qTVxYzAA=; b=IUZExYdZv/8SrDRE6Jy+hGbKd+WC7BRacwQo3HPvByHISf1IqxpqKKwYY9IFwH9PrvjQCY 1lZ6cMVfjfD/SDaZJa23GbxP4hckK9rXDF2UbYECQAjbtuy6e/JgKfrJOyDxolLR+vMUGb iqKL7XB7RRqzo+6AJq2hraPMDMgXtN5s/BFYXRZvm6mm7YdDxsBwf7W5Lvl96XYjpJj1V8 jC8N1zbtlqaJ6Lp6E8J5qDgV0ZsJSnei8GNQNR01QQufzT4+IJzVKs1MIa48pWJr+72JVe Xnl3nwxwV24xF4iZFz2kZ72fbABEFMOhJxwhxnVx2lc7rcSXakZhaWT0tq2pmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lRT/SOvsa77bY7AoukUKrNYqkIMQV+4ciP7qTVxYzAA=; b=HBacz4NotpZZEa9fd9psipuDjgDA99xQNt0kuJVg1pm1cWsZSwSsioyOF7aRCkluC+PzH4 OFoULYhUFbdJaVZPcRa/twZYGTJEcK3M0KtWw3ASmPjL7hvImI2W8hehCyOBbCIIa4+sNu IxPM1jsGmDur45AojZybdKJXS2eGmPHCRpRod/AP5GT/ZW6b4rwK7WMGBf+gDgnvkSaOcL 8Ngf2kPZlnsfR2fykHlhdCQA6nKIa4gnCMnSKSbCVkkaH31EKEQEDywfLVe2bdH3pzvGvo MzRPhFpayZHTIT139DpNxucxjceYF+kiSI88DA3v6W80SmUHG8QZjCFS5uxvOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804094; a=rsa-sha256; cv=none; b=v3JjjUcIqfNmeJwKbjx/n/ESIL5o83SdtH5v1U5ajIpI5KrtdP2qr9IOfytewivSdy7tEQ I0jRJPdIqEkgR29AF8G6QuaFDMfqstipj0o31HwjhWHyet7rZKiVcK+oh5gHyEDvQaS8jY D9AiJram+Brbuol2sYdlLk3q7biEGdt15xzSTP7duDK7lOc34XZpolfV4cxf2THc+skOpm MYR4drw9Ck0z2Y0T5qLCtDGdanVGLlm50ATx2Wofmh7LObdzEz3Fd8kbtDTXKaja/ufl6n ZQdLsqfj7Ip/NpcPICXUpGa2f3x7tiVRTYGZII3eC1T1kFDFeUJOZOWczvCV0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHf30QHz1GsP; Thu, 25 Sep 2025 12:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfY9f000818; Thu, 25 Sep 2025 12:41:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfY5M000815; Thu, 25 Sep 2025 12:41:34 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:34 GMT Message-Id: <202509251241.58PCfY5M000815@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: 882121672704 - main - pfctl: One shot rules can be used in pf.conf by specifying a "once" filter option. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8821216727043dde9cb23a66b884f7918c80063c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8821216727043dde9cb23a66b884f7918c80063c commit 8821216727043dde9cb23a66b884f7918c80063c Author: Kristof Provost AuthorDate: 2025-08-27 13:41:07 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:08 +0000 pfctl: One shot rules can be used in pf.conf by specifying a "once" filter option. ok henning, mcbride Obtained from: OpenBSD, mikeb , 44b1b5a8a9 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 17 +++++++++++++++-- sbin/pfctl/pfctl_parser.c | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 0628b387b4b3..c35460f5443d 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -267,7 +267,7 @@ static struct filter_opts { #define FOM_SETTOS 0x0100 #define FOM_SCRUB_TCP 0x0200 #define FOM_SETPRIO 0x0400 -#define FOM_ONCE 0x1000 /* not yet implemmented */ +#define FOM_ONCE 0x1000 #define FOM_PRIO 0x2000 #define FOM_SETDELAY 0x4000 #define FOM_FRAGCACHE 0x8000 /* does not exist in OpenBSD */ @@ -541,7 +541,7 @@ int parseport(char *, struct range *r, int); %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME %token UPPERLIMIT QUEUE PRIORITY QLIMIT HOGS BUCKETS RTABLE TARGET INTERVAL %token DNPIPE DNQUEUE RIDENTIFIER -%token LOAD RULESET_OPTIMIZATION PRIO +%token LOAD RULESET_OPTIMIZATION PRIO ONCE %token STICKYADDRESS ENDPI MAXSRCSTATES MAXSRCNODES SOURCETRACK GLOBAL RULE %token MAXSRCCONN MAXSRCCONNRATE OVERLOAD FLUSH SLOPPY PFLOW ALLOW_RELATED %token TAGGED TAG IFBOUND FLOATING STATEPOLICY STATEDEFAULTS ROUTE SETTOS @@ -1061,6 +1061,12 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto } } + if ($9.marker & FOM_ONCE) { + yyerror("cannot specify 'once' " + "on anchors"); + YYERROR; + } + if (filteropts_to_rule(&r, &$9)) YYERROR; @@ -2390,6 +2396,9 @@ pfrule : action dir logquick interface route af proto fromto r.quick = $3.quick; r.af = $6; + if ($9.marker & FOM_ONCE) + r.rule_flag |= PFRULE_ONCE; + if (filteropts_to_rule(&r, &$9)) YYERROR; @@ -3036,6 +3045,9 @@ filter_opt : USER uids { } filter_opts.max_pkt_size = $2; } + | ONCE { + filter_opts.marker |= FOM_ONCE; + } | filter_sets ; @@ -6725,6 +6737,7 @@ lookup(char *s) { "no-route", NOROUTE}, { "no-sync", NOSYNC}, { "on", ON}, + { "once", ONCE}, { "optimization", OPTIMIZATION}, { "os", OS}, { "out", OUT}, diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 9609e880584f..ce493570a25e 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1234,6 +1234,8 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer printf(" %s %d", r->free_flags & PFRULE_DN_IS_PIPE ? "dnpipe" : "dnqueue", r->dnpipe); + if (r->rule_flag & PFRULE_ONCE) + printf(" once"); if (r->qname[0] && r->pqname[0]) printf(" queue(%s, %s)", r->qname, r->pqname); else if (r->qname[0]) From nobody Thu Sep 25 12:41:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHh0q6lz68SJ5; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHg4Tcfz42Xg; Thu, 25 Sep 2025 12:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QgOI+OLo2tYWvj1d24nACZCZObNhsRSqdkVvC86w/cQ=; b=VR32mesLUASh8ZATnhykB+DzEgKnrf/PTg60e6lCV2HBsiwiUxjwMfZTOdcDuvWAAEkdpi cCE9PVeN2jKGECZ6VP7EO6rXZzzY6bcKl2ltLsS3AYAXtBPXUO4n8HIDo6PTS9fAIJCpUj MH/q7Za1VF4hqmKKXFlDZ9LVs1SjL+gwhM4Amhp6KNYyZWUJsR4bhPanGQNX6owrS682vl W6uAZ5n2DbT5/50s+n+C3KoveYi5Z6mZ79RXdR3mHQuzuVtnTFALkfYWU2gQTEZB3qUrKL asnxQM8YL1to8lBAicc4AtH9qjbfao/ZDwW6KgGbASNb7U1jgKwQXhqO26Pahw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QgOI+OLo2tYWvj1d24nACZCZObNhsRSqdkVvC86w/cQ=; b=KmrV58qwlinSjjX87xcH07nxp5RcuhKH+qqalL2yRF/heMRmwzQK1YS93ummryjc0Uh5pt HJwEZ6Aro8ty8Nw9R3zNh9MYqtEhZAYAAiBsK34G2+Q3+2umHECzRa63HcaTRQjiUdxSjx t630jXbB43FGWnFZEErFdm4s4CKleULUS5s04Db9h0ArUec9P2Fr0c+nST2w93Q/GmWBye GJgAE3h5nVbB7bX189orgx/qQhgOkur8tFI9JNJEm4WEs91o5Dz4m5SnwlZCTLIAuw3kxk t4fibAaDZWs7Eo3M/nbvVO0AwdLlcICuQDHf7Dxti6R0GBENBZEH9gGx6i6XXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804095; a=rsa-sha256; cv=none; b=sV4UWij7+VYiPC9IsNxsCVJ5s/9ocg2rqPeokIkOP0wza8JXs+TLcR6D0RUo9SPC4m04ax xdcDng5bkxXZqbGI3D7eYocSDjppN3Djh2ursv7fF+fHC3avqJEMIdYoR42BYW+gwZXRQQ /qUb7ByqEIzdZ5uOynmm8dHdLOgzw9ZTAx1lhqma1e5dnB+D9fFmOAV3zyrimu436hZYgx jGDjj9xHyBhApNqa+k2CHB0Ag/R/sx8/LK2m1oAHr4KZ/Mrd8zKmIXPaLrIl3Ua6krn21s hIiVuEjRwMJ9B70uhqq9YodWdLrD0Lt7C+HsqkhxHY2XWE4/fr3VHAr8RITF9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHg3wgXz1GsR; Thu, 25 Sep 2025 12:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfZRO000852; Thu, 25 Sep 2025 12:41:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfZ2i000849; Thu, 25 Sep 2025 12:41:35 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:35 GMT Message-Id: <202509251241.58PCfZ2i000849@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: 8a4386142d05 - main - pfctl tests: basic 'once' rule test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a4386142d05d34a0f8fdce9b4dc2bf5fcfacf8b Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a4386142d05d34a0f8fdce9b4dc2bf5fcfacf8b commit 8a4386142d05d34a0f8fdce9b4dc2bf5fcfacf8b Author: Kristof Provost AuthorDate: 2025-08-27 13:56:02 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:08 +0000 pfctl tests: basic 'once' rule test Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/tests/files/pf1075.in | 1 + sbin/pfctl/tests/files/pf1075.ok | 1 + sbin/pfctl/tests/pfctl_test_list.inc | 1 + 3 files changed, 3 insertions(+) diff --git a/sbin/pfctl/tests/files/pf1075.in b/sbin/pfctl/tests/files/pf1075.in new file mode 100644 index 000000000000..835a31a25c6a --- /dev/null +++ b/sbin/pfctl/tests/files/pf1075.in @@ -0,0 +1 @@ +pass inet from (lo0)/24 once diff --git a/sbin/pfctl/tests/files/pf1075.ok b/sbin/pfctl/tests/files/pf1075.ok new file mode 100644 index 000000000000..2369c9410cda --- /dev/null +++ b/sbin/pfctl/tests/files/pf1075.ok @@ -0,0 +1 @@ +pass inet from (lo0)/24 to any flags S/SA keep state once diff --git a/sbin/pfctl/tests/pfctl_test_list.inc b/sbin/pfctl/tests/pfctl_test_list.inc index 8bfccddf50e5..9dd4a590ad8f 100644 --- a/sbin/pfctl/tests/pfctl_test_list.inc +++ b/sbin/pfctl/tests/pfctl_test_list.inc @@ -183,3 +183,4 @@ PFCTL_TEST(1071, "mask length on (lo0)") PFCTL_TEST_FAIL(1072, "Invalid port range") PFCTL_TEST(1073, "Filter AF different than route-to AF, with prefer-ipv6-nexthop") PFCTL_TEST_FAIL(1074, "Filter AF different than route-to AF, without prefer-ipv6-nexthop") +PFCTL_TEST(1075, "One shot rule") From nobody Thu Sep 25 12:41:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHj1drCz68SG3; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHh4yVnz42S6; Thu, 25 Sep 2025 12:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KlD81na3J/4XOBr/uchZjdGkHjP74h4pnf7T0Up9VAw=; b=UfEOcn5oKvZeK4QlsRXk5ngRvapkHW1PvR5NkIJHLkNRQdRPGzE0XU5ReYJJqYMSNH49ca QuLq1j/v49ROu443Bj/hImlf7aCr/6qLpub4SbqZMxb2xhXRY8gQmv1OFWTdZpcTgwtJlb 08l0wWWFsAuYsqFB6lHyMViERnHYlorEudkDYFF+YhOMkdE6NX6pQjwW35MCAG0ZLCXj5O 2RI9WOsgUnVsU2Co08c0tnJZqtLJvg/wzaBP1gxAK6V0YXpxoDHT1ByoVBNfPyCAWRGvpm cBznC3R+zGkCGDV7E/OpmjNOdWYl3FAtYchAnLOP36mRCKPd18zDVBhMIF+toA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KlD81na3J/4XOBr/uchZjdGkHjP74h4pnf7T0Up9VAw=; b=X0j5Znq2JVqGWpAcp5wMeZjW5BZoCN1i260kSokQoM/5TKna7bDEmZ9zTQZhposbZ13FIJ OqaiTP0THzBj2SYapgo32urwyDOJZrVmm/KecWhJU8Vi14eeUSzoWaFEMMlJI1zdHv6wdz dXEB3SlW1+/QYZwGSBTyY6+EZXMsQqItxVhn2wuhjjp4GmTUP+1cs7DI+gwKNt6KFCyzzr 5Xcdn8Lzha2kc21mi9bxtGhdcuN2ihDCppw2mNmit+MGlXUYHXUg68kaxyX50NHhHZljmD Oufxh/w333+IfyvFiN6qo+dnNP/fE0WuAeYKTQi7Y/6xUTRJQwFNRXJ+cnjQ+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804096; a=rsa-sha256; cv=none; b=e+4jOBV0N208Rr/X5WzOSGRNIMy/coNMTFQhl5MfIJEXPknqZ9O1Td56+xmWXx5onPPjMj YnivjVPDTzxgY6oeVCp8fGQDVgEFeMD9yRZTvbic9VTjHPoBLemMYcAAJ/TwqGAwI6VBAW QtNPjR512X14hXMbuqdzw+xuCAfVRDuWPw5Bpip/ZqA7ChIo5uL0Dt5M0Yl1MN7i0CFDGU WxnXnLeLW4yrNoGEGjSt36VrrBSMhLB8nOfsIcM3UA5g+U+2a90cI5Y7Kdw5oriHuAHB9q gfIMZOuWeix0aCkFCtn3ZdN2evoIEYF24efgtleyiTnf5nVNVt2khIQA2aHBTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHh4Qdgz1GxB; Thu, 25 Sep 2025 12:41:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfa0Q001835; Thu, 25 Sep 2025 12:41:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfaaq001832; Thu, 25 Sep 2025 12:41:36 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:36 GMT Message-Id: <202509251241.58PCfaaq001832@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: b7ff11b380bf - main - pf.conf.5: Document a "once" filter option used to create one shot rules. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7ff11b380bf6ffaa5181596766e2f21a1eec962 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b7ff11b380bf6ffaa5181596766e2f21a1eec962 commit b7ff11b380bf6ffaa5181596766e2f21a1eec962 Author: Kristof Provost AuthorDate: 2025-08-27 13:58:40 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:08 +0000 pf.conf.5: Document a "once" filter option used to create one shot rules. ok henning, mcbride, jmc Obtained from: OpenBSD, mikeb , 355f9a50c1 Sponsored by: Rubicon Communications, LLC ("Netgate") --- share/man/man5/pf.conf.5 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 02114b3eaf3c..b87401f8bb34 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 25, 2025 +.Dd August 27, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -2258,6 +2258,10 @@ When the rate is exceeded, all ICMP is blocked until the rate falls below .It Ar max-pkt-size Aq Ar number Limit each packet to be no more than the specified number of bytes. This includes the IP header, but not any layer 2 header. +.It Ar once +Creates a one shot rule that will remove itself from an active ruleset after +the first match. +.Pp .It Xo Ar queue Aq Ar queue .No \*(Ba ( Aq Ar queue , .Aq Ar queue ) @@ -3443,7 +3447,7 @@ filteropt = user | group | flags | icmp-type | icmp6-type | "tos" tos | [ "(" state-opts ")" ] | "fragment" | "no-df" | "min-ttl" number | "set-tos" tos | "max-mss" number | "random-id" | "reassemble tcp" | - fragmentation | "allow-opts" | + fragmentation | "allow-opts" | "once" | "label" string | "tag" string | [ "!" ] "tagged" string | "max-pkt-rate" number "/" seconds | "set prio" ( number | "(" number [ [ "," ] number ] ")" ) | From nobody Thu Sep 25 12:41:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHk4Hd4z68SCt; Thu, 25 Sep 2025 12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHj5cZ5z42bX; Thu, 25 Sep 2025 12: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=1758804097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XIRe8P+ooCPWmt33sxsjjlsJlpnOUfRI+eLloQyRA+Q=; b=dG+Y1aiNKSWsjWQ28MdjfeP3PVQ8Jr4ddzU3f4H+E41r+S6qMbNXtTEgQYo7xRS/374yEr ulgBdnENqMhQDeqP1LsPu9Uzh3RVNtMH2Q1eHQz40tzuQKlZcZUWOX0TV1vnmqLNb0T1Kp lvAW/QV9J1o9yCvyEomqEQpS3R9bAIBwW1UyoJFKRq8NyxmcE6ppbj4Zyr9qWQn/c7rh9d KBWu7o5Ix1WIZNKY2RNqveSa+VaH9Ctn3Bl1ret1wIHaxRBnsTG69HdkuNNomGSAPZLP/F /StUiU9Py3DWLbayb21luVyeCU4Lxa9YTxU84g4J9YgKfbc/pH953Y4wFp4OHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XIRe8P+ooCPWmt33sxsjjlsJlpnOUfRI+eLloQyRA+Q=; b=OlGuouBLWe6RJsQipOcIQNIXEezcoJmMcrxGGgxr/aIuJHJMjV1PDzGHNfJ2BMEREz+Dnm Fn1FCDbWUsm7DWD11JqKaFIdro3y40GLoORE3bSNDxz8CAeZlExzC+mEnS+ygJh9FrhQjp av/n/XfI65uA7r9bOkYN1uh0sHptXbe5JKS9KRn+KHs1uzB5K6aZ2rmjwknCLf+74OFhGt 4l0/juCazEdtF9C7FkSlo2G1riKTi5O5mpRgqwmekYJsR36e6WlKiqrN1FL6wMxeZ91I/a d7UJQd5VaQyHib+/jOLBPD2AYAdQHmiDad1r3nOvIBVrPfk6paUxvwFLurCmDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804097; a=rsa-sha256; cv=none; b=ekI6tX0sAXKf1PBVVa/A10Xjtllshun0Lqas1IyzuLJDNhQGIx4h3N6OUE/P0np9Xxhbyk 4Gc6gZtsJ7+Dk0sQRD8nG22de6xIhtoizRQ2ox7g6qBQl3j4fXOTCQutfjjg9NxC7aFSo3 c/sGHvCHDt80exS8/UPXLL54Z632V8Q1fkhTPTd9ClVi34b7TAZoXT4RnMcEmUiKocmQxB QPur1Ix4Ju+p42nD1er+08XN4mkpyVVZWTxCF05Rfmfk4l8Fje69EmKJWGbJQfJ2E/ydmA gYHsB8ptJovnp7inEigGxGhZiHJQNPDRq9ruFcR/QCN4yxnvjM7dmfKlLit/sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHj4zWsz1GmV; Thu, 25 Sep 2025 12:41:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfbRo003228; Thu, 25 Sep 2025 12:41:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfbvF003218; Thu, 25 Sep 2025 12:41:37 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:37 GMT Message-Id: <202509251241.58PCfbvF003218@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: d3b73a944b11 - main - pfctl: deny "once" flags for match rules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d3b73a944b11311b8428f30b019802ebe7aeaef8 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d3b73a944b11311b8428f30b019802ebe7aeaef8 commit d3b73a944b11311b8428f30b019802ebe7aeaef8 Author: Kristof Provost AuthorDate: 2025-08-27 14:00:38 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:08 +0000 pfctl: deny "once" flags for match rules ok henning Obtained from: OpenBSD, mikeb , 47068a62ee Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index c35460f5443d..c8c6f6047fa5 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -2396,8 +2396,14 @@ pfrule : action dir logquick interface route af proto fromto r.quick = $3.quick; r.af = $6; - if ($9.marker & FOM_ONCE) + if ($9.marker & FOM_ONCE) { + if (r.action == PF_MATCH) { + yyerror("can't specify once for " + "match rules"); + YYERROR; + } r.rule_flag |= PFRULE_ONCE; + } if (filteropts_to_rule(&r, &$9)) YYERROR; From nobody Thu Sep 25 12:41:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHl5Kb1z68SjH; Thu, 25 Sep 2025 12:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHk6mhsz42SX; Thu, 25 Sep 2025 12:41:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kq4e6hxMJ/FrWRCwP+gqyM9NBBVWJjxnpOln5DgnoZQ=; b=jpA/0cLwh41n+Gt9u0/fSfDhwv1ivkoU8CBP2Ox1oJZ7Qv4JWj71IgkrxKWYlEKHyKHhNp 2XljDy6govmLl1QXPgLlvb/0fIEc6Uyd/jeTVfKL+/n3UN9d508L66+q4VfdqGJEmZDk8/ qwNOoKFTbP87bNyzKZGan23EO3VbgqUS3iu7zw3jQSMEtCibqUQh/XqDql9JHYAH0JttSK I/85ByBVBP4xmDE7JBzCnpEL8EG9boQoKzgNxVzUHCHBYCTRgTXrxQ8+sSXF3Obfgl8hqP /Gp5F/qy0FkRPlNtBr6U099geYqe9quw1y7/yN5NARK5WQVPOAtcpnl8RNZm5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804099; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kq4e6hxMJ/FrWRCwP+gqyM9NBBVWJjxnpOln5DgnoZQ=; b=RX3dG0aF+QWhk8kOoJVY9GQaeRZD9rSNehjFwCtdZ2h/WTDrmyxbAK+iJPYwjm+S4x8Av/ M0Ko+iOjuvY7+1lpbmirxw1uGLrjTi+U0nD2rPh/xew4QjMG4jOincs/uq3l9GUIDTNKwD fHO5EROWzm9lJ6Crlei/rTCoMatv5qQslY4AQXiNgevRZM6jmfDllde2AS8hEmxJb/iC8/ DFY2j5oQyFENv43bPm928LF1ebk8m7wPKxl9Zuw2sB6n5nlQBZN+iOYQNVZM9O3/ERPxVj sKmCI1lNUQTpzrDa7YkU5gwcDcVU1EZKjXuyG37xvHQEJxyHEIOTji4pV9c+3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804099; a=rsa-sha256; cv=none; b=miEWMea0xdHvzqmsAxVXILWOsR8EriowFFhlM+GIRiN0ik0nDCcL/bJF0U2UjgAyGhu3UJ gKoPvCLDY8MRWHAQNaky8BrBU9G8YnanCdwgPokbVWF2wumwm6OoBASRNMMzZpGTRfOxUf yDTeZh9oRRjuQKb5oS8tBk0HO+F/yFTsnRfVBHIyT3KG9dvQ6EGowTC0+tyYiTwEtzzHOQ mGgBu3w5pRr9jl8liqirMBDG6gyP5U563olulir03m3ml5Ra8nZ3oLE55CbE94l7Rzv2es zmeijgBQb3Hzr8pyslkIgKf36nBQ1AsPSNVn09OS9Fmomhn1AaMydC0xWxsU3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHk5lcrz1H7R; Thu, 25 Sep 2025 12:41:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfcoA004539; Thu, 25 Sep 2025 12:41:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfcb7004495; Thu, 25 Sep 2025 12:41:38 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:38 GMT Message-Id: <202509251241.58PCfcb7004495@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: b9d652bb75ff - main - pf: print 'once' rule expire time List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9d652bb75ffa0945a3bebf68d6d82de26efd269 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b9d652bb75ffa0945a3bebf68d6d82de26efd269 commit b9d652bb75ffa0945a3bebf68d6d82de26efd269 Author: Kristof Provost AuthorDate: 2025-08-27 15:51:29 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:09 +0000 pf: print 'once' rule expire time Obtained from: OpenBSD, sashan , 8cf23eed7f Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 1 + lib/libpfctl/libpfctl.h | 2 ++ sbin/pfctl/pfctl.c | 11 ++++++++++- sbin/pfctl/pfctl_parser.c | 3 +++ sys/net/pfvar.h | 1 + sys/netpfil/pf/pf.c | 2 +- sys/netpfil/pf/pf_nl.c | 1 + sys/netpfil/pf/pf_nl.h | 1 + 8 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index b96b973ddc7c..e38469643571 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1699,6 +1699,7 @@ static struct snl_attr_parser ap_getrule[] = { { .type = PF_RT_MAX_PKT_SIZE, .off =_OUT(r.max_pkt_size), .cb = snl_attr_get_uint16 }, { .type = PF_RT_TYPE_2, .off = _OUT(r.type), .cb = snl_attr_get_uint16 }, { .type = PF_RT_CODE_2, .off = _OUT(r.code), .cb = snl_attr_get_uint16 }, + { .type = PF_RT_EXPTIME, .off = _OUT(r.exptime), .cb = snl_attr_get_uint64 }, }; #undef _OUT SNL_DECLARE_PARSER(getrule_parser, struct genlmsghdr, snl_f_p_empty, ap_getrule); diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index dd76cab163b5..5880e1a88371 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -285,6 +285,8 @@ struct pfctl_rule { struct pf_addr addr; uint16_t port; } divert; + + time_t exptime; }; TAILQ_HEAD(pfctl_rulequeue, pfctl_rule); diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index b29d992b1cda..7e1195fdf2f0 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1142,6 +1142,9 @@ pfctl_print_rule_counters(struct pfctl_rule *rule, int opts) printf(" [ queue: qname=%s qid=%u pqname=%s pqid=%u ]\n", rule->qname, rule->qid, rule->pqname, rule->pqid); + if (rule->rule_flag & PFRULE_EXPIRED) + printf(" [ Expired: %lld secs ago ]\n", + (long long)(time(NULL) - rule->exptime)); } if (opts & PF_OPT_VERBOSE) { printf(" [ Evaluations: %-8llu Packets: %-8llu " @@ -1411,7 +1414,13 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; print_rule(&rule, anchor_call, rule_numbers, numeric); - printf("\n"); + /* + * Do not print newline, when we have not + * printed expired rule. + */ + if (!(rule.rule_flag & PFRULE_EXPIRED) || + (opts & (PF_OPT_VERBOSE2|PF_OPT_DEBUG))) + printf("\n"); pfctl_print_rule_counters(&rule, opts); break; case PFCTL_SHOW_NOTHING: diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index ce493570a25e..54d3e7c8dc79 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -865,6 +865,9 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer int i, ropts; char *p; + if ((r->rule_flag & PFRULE_EXPIRED) && (!verbose)) + return; + if (verbose) printf("@%d ", r->nr); if (anchor_call[0]) { diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index d7d69615151d..c6a3448584ac 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -901,6 +901,7 @@ struct pf_krule { LIST_ENTRY(pf_krule) allrulelist; bool allrulelinked; #endif + time_t exptime; }; struct pf_krule_item { diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 450e465e926a..ec6960180413 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5747,7 +5747,7 @@ pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) if ((rule_flag & PFRULE_EXPIRED) == 0 && atomic_cmpset_int(&r->rule_flag, rule_flag, rule_flag | PFRULE_EXPIRED)) { - //r->exptime = gettime(); + r->exptime = time_uptime; } else { r = TAILQ_NEXT(r, entries); continue; diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 5c8f56ea4567..ff3edd43e3a5 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1025,6 +1025,7 @@ pf_handle_getrule(struct nlmsghdr *hdr, struct nl_pstate *npt) nlattr_add_u64(nw, PF_RT_SRC_NODES_NAT, counter_u64_fetch(rule->src_nodes[PF_SN_NAT])); nlattr_add_u64(nw, PF_RT_SRC_NODES_ROUTE, counter_u64_fetch(rule->src_nodes[PF_SN_ROUTE])); nlattr_add_pf_threshold(nw, PF_RT_PKTRATE, &rule->pktrate); + nlattr_add_u64(nw, PF_RT_EXPTIME, time_second - (time_uptime - rule->exptime)); error = pf_kanchor_copyout(ruleset, rule, anchor_call, sizeof(anchor_call)); MPASS(error == 0); diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index b769421bbfcc..38891339450e 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -285,6 +285,7 @@ enum pf_rule_type_t { PF_RT_MAX_PKT_SIZE = 83, /* u16 */ PF_RT_TYPE_2 = 84, /* u16 */ PF_RT_CODE_2 = 85, /* u16 */ + PF_RT_EXPTIME = 86, /* u64 */ }; enum pf_addrule_type_t { From nobody Thu Sep 25 12:41:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHm4HBQz68SYX; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHm0MbLz42kV; Thu, 25 Sep 2025 12:41:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gk3gPVQOHRqxaKjckJkY18tvF3/fgIEcLOHH2rNbwHc=; b=Wb/gfgDTxXMgcp5hhiRRqgTvErusZrRcEcK7gHf0S1mQmJ7NNPqm+RLx8qQUEXV2GJ99Uo wjr+sAKNq6KIOsQ0B4NY5oqvjtgSFutpESQjM3fMsQt3ZEF80itslhZfBTwgMVfrBb2nID Khja8LVNKs7CM9JgclPZtrwC+r6xBBfmHwrW4Nmm6EgIEEzU4m1mjKEjvZAI8edELX+GPW FCaX4glreW/WOfONYfy6J9NpSBhigq6MLePxK5sgTb/fkpXw8DNpCGnyGGuVUQLkgWdIIa v29PIvrregA83XztOt1FgvaP5IDYteTWiaaitoXjpYBuS3mWgj5a/+iYrMOGyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gk3gPVQOHRqxaKjckJkY18tvF3/fgIEcLOHH2rNbwHc=; b=IkxbkHkV8f/Zgj5A7Z4xvVjj6Te8WRj5Tdruv53skd3nTB9O4zCzPGbsGmc3KuZNAPE+KB 59yVlb/SaBS6sLX0DcQp1fN6vc78Hjyakdbqta4fQ1U/aPsQnl+fURvzy9ZBDEKKyedjAx PJRk1bCue8JFtxEPmGJllpS9veaRTF2oWe3vyPWWUq1RvXyDI8+8wKwKnn7vme72gKql7l rlAeLXTZXp6tGMxNkZq3O5EyVC0Xfj8JHaHAiXQ21Hxi4a8e0lFH5XIHLAS15wLRbCjMmm 5gcoDf1p3/K9/u3WKjpPIVLvGnL16ZfyeNkfWBHG8myzgMZGsaEzP7lQKhKsfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804100; a=rsa-sha256; cv=none; b=cU0/gpJKVis2J/b6mfZhM8ry2knzfJu/xhPhTWcmr991cQH1N5a1DpQovmUkZkW6Ov9rsx yI9ZNy8FTIvTRS/okBICWEptokmydABq/ZcH0VzFNxdZl7eFmWWzxsYIcMBU+uKr+Ki8O3 eCSvSwNk6qJ6ZQI0s/1n3qeT8y+ac76ljqyZJHq26/zz8xn4LSN6GigNHAA663XtMo0ZL/ k5D2Sl7cBguV1lYDu/Aj17ryC/4Rz2DzOI66QnUo07Ok5JHzlm7b0Q0EhrSG3ldbJQM3Pk UR3JSlF1ZQ++CGHG07zEzlM6ZhN814hTURs720IUvuDKh3RUh4fcUwXwfGNwpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHl6zgSz1Gvf; Thu, 25 Sep 2025 12:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfdfJ004606; Thu, 25 Sep 2025 12:41:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfdEu004601; Thu, 25 Sep 2025 12:41:39 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:39 GMT Message-Id: <202509251241.58PCfdEu004601@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: 59f3838b0a94 - main - pfctl: reduce duplicate code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59f3838b0a942b44397063ffb63a4e4d569129f1 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=59f3838b0a942b44397063ffb63a4e4d569129f1 commit 59f3838b0a942b44397063ffb63a4e4d569129f1 Author: Kristof Provost AuthorDate: 2025-08-27 16:13:50 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:09 +0000 pfctl: reduce duplicate code * Merge `once' handling from `anchorrule' and `pfrule' * Remove/shorten duplicate code block OK sashan Obtained from: OpenBSD, kn , d114b77333 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index c8c6f6047fa5..c75632c740b3 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1061,12 +1061,6 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto } } - if ($9.marker & FOM_ONCE) { - yyerror("cannot specify 'once' " - "on anchors"); - YYERROR; - } - if (filteropts_to_rule(&r, &$9)) YYERROR; @@ -2396,15 +2390,6 @@ pfrule : action dir logquick interface route af proto fromto r.quick = $3.quick; r.af = $6; - if ($9.marker & FOM_ONCE) { - if (r.action == PF_MATCH) { - yyerror("can't specify once for " - "match rules"); - YYERROR; - } - r.rule_flag |= PFRULE_ONCE; - } - if (filteropts_to_rule(&r, &$9)) YYERROR; @@ -7757,6 +7742,14 @@ node_mac_from_string_mask(const char *str, const char *mask) int filteropts_to_rule(struct pfctl_rule *r, struct filter_opts *opts) { + if (opts->marker & FOM_ONCE) { + if (r->action != PF_PASS && r->action != PF_MATCH) { + yyerror("'once' only applies to pass/block rules"); + return (1); + } + r->rule_flag |= PFRULE_ONCE; + } + r->keep_state = opts->keep.action; r->pktrate.limit = opts->pktrate.limit; r->pktrate.seconds = opts->pktrate.seconds; From nobody Thu Sep 25 12:41:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHp645hz68SZ7; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHp2CB6z42WF; Thu, 25 Sep 2025 12:41:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTzwiz+xIKfcEc7FEf/as45Brl4vwQM6yfufjlhKXhY=; b=Gx39WGU2iOizvA69m7IIWFk1aN/bZbLDc4rg3Be1r8ScDI4cm1MPttZQbvrisOaCFiM92R ehGvv9qidbMvaWuBPuVBLJ6Xwi4P0WLfmuG1F7/1M7gMvCv569qhTTJO1BbZkzfLxmuMs1 19orwCDvlXE5dTXTf6CQ3Cy3cmNEWIpbxz8bjqMMZ0wDf9cTi6MYVjPvkldhfGo6nIaW8e IZkBhBIwqVcrqfsGbb+oyovT+5GK5ZID+JRvYIlnAN11kNMIOmPQllvGYp62cI1D2e1sDa wiC/TwbAY1UyU8VL6aQ7WWHuVItXPeQkkLufv4c4H9IvAW4mn+rKBSBtNgQxBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804102; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTzwiz+xIKfcEc7FEf/as45Brl4vwQM6yfufjlhKXhY=; b=RedH7avXCowB4d3/aB3coBLCcYw4vloVSRCw4iG9HVnQedA2iaFBqiKwWruwhY2uCNGhIc dMKvqqM1eUJfbI33YvULdS/xPcmXnM+HMlAKx1EGrkVcxu15OeDwwJy+jE0LlYcgFTVxtY 3KdWzkYuKwUDDZqFVWoaGaSllMqC3qLclb7TwIl8G9qUBF4zDcn4G0sXW2mnRCMOS1h2GQ 0YpuZ2Fudom0Yj9oP7Kzjf0aWEyyNAASOi1ZLGlDthxgZn1MHVM9Gp/GUGPlnZa33YbKNI mZlHmTdZvb0hPS7E31tT9fRHtCPnYG9IOGtQe6XDqmgG6B+ElqWl8xjheFqjPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804102; a=rsa-sha256; cv=none; b=AMEapJOAio9kCb2buy8A4QmjvZ6jg/QWpPciIJJq+HHnDKaKqOJq1+ir7H9XR6fa+St2Ik EntzCP93/MDSjCQdt6iehek734RF+92f+4s/2VqgmbAQQ64suopH7BmSHiawvZvSMdmMPv cppbgoO+zpeUY6tbCigyWbpgtIALFFy7B+jS7VtAAHIORV2xykXcw6cjhsTAOlSeAtVX2I k6j9dWMDSHd3EK8cp/NOERYPOSphD07XKE5hhZPyJowNIt+9e1NsfHaRPpG26hJ2E+5qtz ak4qOl325WdO/Kg6zfAlmDYgC8hRp22urtm/sL+7M5pxcDu5IlwVLANougM+Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHp1hchz1GmY; Thu, 25 Sep 2025 12:41:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfgxf004680; Thu, 25 Sep 2025 12:41:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfgmj004677; Thu, 25 Sep 2025 12:41:42 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:42 GMT Message-Id: <202509251241.58PCfgmj004677@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: de8af57c6f41 - main - pf: simplify expiration of 'once' rules. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de8af57c6f4155caa540a68387fdb02514d7e815 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=de8af57c6f4155caa540a68387fdb02514d7e815 commit de8af57c6f4155caa540a68387fdb02514d7e815 Author: Kristof Provost AuthorDate: 2025-08-28 09:20:40 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:09 +0000 pf: simplify expiration of 'once' rules. let packet to mark 'once' rule as expired. The rule will be removed by pfctl(8) when rules are updated. OK kn@ Obtained from: OpenBSD, sashan , a21b78cad0 Obtained from: OpenBSD, jmc , 588f4160c8 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 3 +++ share/man/man5/pf.conf.5 | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 54d3e7c8dc79..edbc924341e0 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1291,6 +1291,9 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer r->rdr.proxy_port[1], PF_RDR); } } + + if (r->rule_flag & PFRULE_EXPIRED) + printf(" # expired"); } void diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index b87401f8bb34..cb7fea467c2e 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 27, 2025 +.Dd August 28, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -2259,8 +2259,12 @@ When the rate is exceeded, all ICMP is blocked until the rate falls below Limit each packet to be no more than the specified number of bytes. This includes the IP header, but not any layer 2 header. .It Ar once -Creates a one shot rule that will remove itself from an active ruleset after -the first match. +Creates a one shot rule. +The first matching packet marks the rule as expired; +any expired rules are no longer evaluated. +Expired rules are only shown in verbose mode (-vv): +.Xr pfctl 8 +will append '# expired' to note any once rules which have already been hit. .Pp .It Xo Ar queue Aq Ar queue .No \*(Ba ( Aq Ar queue , From nobody Thu Sep 25 12:41:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHp1KBDz68SZ4; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHn16BKz42Yc; Thu, 25 Sep 2025 12:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C3qh3FhBzFw8kL15RnTDrQ0h7vzV7tJuR3THky6uKyU=; b=S7KLWXGitllZadWqU9UD3AnAPop2RSkmk55Lmnfow1qakuZJGwDPZvEpVAbxvUJdHuN3q5 JQnuyHO6HdlUV1LnHu/tgoXZMARpvrPa2A2s1n4IQfpefryDRKirSlb69uNelfJeF1Y7Iu AXjdRN0662ZtCCQLw8hGiGfxxnh9tdXlld39RALGVGxqfccP7H/TBsaeFWfAGXu4TM1lYU DCwxv4zDXyY0yNysiJBXB8zmYY8mcKyKHJvLKNaKiWaApSMxb9sXTEX9pbS/il8goR8UP3 akwihXjcuAvN7t7RS/VHwoHYMpgdlJBDJsk7ZdPfzsTuVRZCFSe14Dt3Vvb4EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C3qh3FhBzFw8kL15RnTDrQ0h7vzV7tJuR3THky6uKyU=; b=oEOcej+svr1qWiqFEcgbXSBZUFu5jWxuEeYBfgm4n2l5zuTKmDAVvT63Xv0kVZ/3ApI1YM kCE+Zy529OCfqHZ1d28IOnKtNp1YR/AwsAzSoXVL+wS7uRKB2agGtB9nNbloSpxYVEy7LM jVezz8KtJNK0g1XdLhEHs4vEyQEExftt8p3OfB5e5B813ziJPlIZ52Ywc9r0CVkK4GRQvV 7bhvo/BIjDBRunrsBmxNCD5hqHRkmmP1mB5IHSvR3d/K3q98VHgwHHOEr7Uxc3cdtOfaP1 CopqQp6tq7OymNQA/vkrIqppZInesE4QUaQ474Fi0uCCUxtsf3DjfAZZTR9SRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804101; a=rsa-sha256; cv=none; b=odYUX3RC6i9miduA8DypmG79KRRzyiF1QXv/AkOx3VcVMI+iHCLr3PqMyk07nEVnVeaXe9 eeCTz7d381RrlRzSOcP5vgdgUaT44uN+k996qrhr8kocHLzfGwGmY/CXQQf8x1UnAYfxZc mL0mTytsO/uTI5LsUKl55/9dXUCVcFJ+5F/lyLdAEtPjn3kdVNBoJuD/6IQO0ZjvTH1uKQ aDxsb+TQPMN5ggOcIw0pBme6BnZk+JPgIvi5nH0fvL5s18yfr1EPOq+FlZyzqUf/OaDUz3 W+5YV4ufc/ZISNHWcs8MZP5eBci/BuNqzvluKq+7AwLCRj96UN4XvhMTqOhMRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHn0dmqz1Gvg; Thu, 25 Sep 2025 12:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfeUn004640; Thu, 25 Sep 2025 12:41:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfeEK004637; Thu, 25 Sep 2025 12:41:40 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:40 GMT Message-Id: <202509251241.58PCfeEK004637@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: 2be46b52f5db - main - pfctl: fix once rules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2be46b52f5db0630550ec60ad8f92a7e7d7d78ab Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2be46b52f5db0630550ec60ad8f92a7e7d7d78ab commit 2be46b52f5db0630550ec60ad8f92a7e7d7d78ab Author: Kristof Provost AuthorDate: 2025-08-27 19:32:33 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:09 +0000 pfctl: fix once rules parse.y revision 1.682 from 16.07.2018 errornously allowed `match once' and `anchor "a" once'. Fix both by checking for PF_DROP not PF_MATCH and creating anchors in the parser already such that they can be used to distinguish anchor rules in the same check as well. Found and fixed by Petr Hoffmann , thanks! While here, remove an unneeded cast and make pfctl_add_rule() void as it always returned 0. OK sashan Obtained from: OpenBSD, kn , 6da84b37b3 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 69 +++++++++++++++++++++++++++++++---------------- sbin/pfctl/pfctl.c | 30 ++------------------- sbin/pfctl/pfctl_parser.h | 2 +- 3 files changed, 49 insertions(+), 52 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index c75632c740b3..babe6b99013e 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -372,8 +372,8 @@ int validate_range(uint8_t, uint16_t, uint16_t); int disallow_table(struct node_host *, const char *); int disallow_urpf_failed(struct node_host *, const char *); int disallow_alias(struct node_host *, const char *); -int rule_consistent(struct pfctl_rule *, int); -int filter_consistent(struct pfctl_rule *, int); +int rule_consistent(struct pfctl_rule *); +int filter_consistent(struct pfctl_rule *); int nat_consistent(struct pfctl_rule *); int rdr_consistent(struct pfctl_rule *); int process_tabledef(char *, struct table_opts *, int); @@ -403,7 +403,7 @@ void expand_rule(struct pfctl_rule *, bool, struct node_if *, struct node_proto *, struct node_os *, struct node_host *, struct node_port *, struct node_host *, struct node_port *, struct node_uid *, struct node_gid *, struct node_if *, - struct node_icmp *, const char *); + struct node_icmp *); int expand_altq(struct pf_altq *, struct node_if *, struct node_queue *, struct node_queue_bw bwspec, struct node_queue_opt *); @@ -994,6 +994,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto { struct pfctl_rule r; struct node_proto *proto; + char *p; if (check_rulestate(PFCTL_STATE_FILTER)) { if ($2) @@ -1039,6 +1040,30 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto "rules must specify a name"); YYERROR; } + /* + * Don't make non-brace anchors part of the main anchor pool. + */ + if ((r.anchor = calloc(1, sizeof(*r.anchor))) == NULL) { + err(1, "anchorrule: calloc"); + } + pf_init_ruleset(&r.anchor->ruleset); + r.anchor->ruleset.anchor = r.anchor; + if (strlcpy(r.anchor->path, $2, + sizeof(r.anchor->path)) >= sizeof(r.anchor->path)) { + errx(1, "anchorrule: strlcpy"); + } + if ((p = strrchr($2, '/')) != NULL) { + if (strlen(p) == 1) { + yyerror("anchorrule: bad anchor name %s", + $2); + YYERROR; + } + } else + p = $2; + if (strlcpy(r.anchor->name, p, + sizeof(r.anchor->name)) >= sizeof(r.anchor->name)) { + errx(1, "anchorrule: strlcpy"); + } } r.direction = $3; r.quick = $4.quick; @@ -1075,8 +1100,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto expand_rule(&r, false, $5, NULL, NULL, NULL, $7, $8.src_os, $8.src.host, $8.src.port, $8.dst.host, - $8.dst.port, $9.uid, $9.gid, $9.rcv, $9.icmpspec, - pf->astack[pf->asd + 1] ? pf->alast->name : $2); + $8.dst.port, $9.uid, $9.gid, $9.rcv, $9.icmpspec); free($2); pf->astack[pf->asd + 1] = NULL; } @@ -1099,7 +1123,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto expand_rule(&r, false, $3, NULL, NULL, NULL, $5, $6.src_os, $6.src.host, $6.src.port, $6.dst.host, - $6.dst.port, 0, 0, 0, 0, $2); + $6.dst.port, 0, 0, 0, 0); free($2); } | RDRANCHOR string interface af proto fromto rtable { @@ -1142,7 +1166,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto expand_rule(&r, false, $3, NULL, NULL, NULL, $5, $6.src_os, $6.src.host, $6.src.port, $6.dst.host, - $6.dst.port, 0, 0, 0, 0, $2); + $6.dst.port, 0, 0, 0, 0); free($2); } | BINATANCHOR string interface af proto fromto rtable { @@ -1178,7 +1202,7 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto decide_address_family($6.src.host, &r.af); decide_address_family($6.dst.host, &r.af); - pfctl_append_rule(pf, &r, $2); + pfctl_append_rule(pf, &r); free($2); } ; @@ -1465,7 +1489,7 @@ scrubrule : scrubaction dir logquick interface af proto fromto scrub_opts expand_rule(&r, false, $4, NULL, NULL, NULL, $6, $7.src_os, $7.src.host, $7.src.port, $7.dst.host, - $7.dst.port, NULL, NULL, NULL, NULL, ""); + $7.dst.port, NULL, NULL, NULL, NULL); } ; @@ -1630,7 +1654,7 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { if (h != NULL) expand_rule(&r, false, j, NULL, NULL, NULL, NULL, NULL, h, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, ""); + NULL, NULL, NULL, NULL, NULL); if ((i->ifa_flags & IFF_LOOPBACK) == 0) { bzero(&r, sizeof(r)); @@ -1653,7 +1677,7 @@ antispoof : ANTISPOOF logquick antispoof_ifspc af antispoof_opts { expand_rule(&r, false, NULL, NULL, NULL, NULL, NULL, NULL, h, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, ""); + NULL, NULL, NULL, NULL); } else free(hh); } @@ -2736,7 +2760,7 @@ pfrule : action dir logquick interface route af proto fromto expand_rule(&r, false, $4, $9.nat, $9.rdr, $5.redirspec, $7, $8.src_os, $8.src.host, $8.src.port, $8.dst.host, - $8.dst.port, $9.uid, $9.gid, $9.rcv, $9.icmpspec, ""); + $8.dst.port, $9.uid, $9.gid, $9.rcv, $9.icmpspec); } ; @@ -4871,7 +4895,7 @@ natrule : nataction interface af proto fromto tag tagged rtable expand_rule(&r, false, $2, NULL, $9, NULL, $4, $5.src_os, $5.src.host, $5.src.port, $5.dst.host, - $5.dst.port, 0, 0, 0, 0, ""); + $5.dst.port, 0, 0, 0, 0); } ; @@ -5050,7 +5074,7 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag free($13); } - pfctl_append_rule(pf, &binat, ""); + pfctl_append_rule(pf, &binat); } ; @@ -5277,7 +5301,7 @@ disallow_alias(struct node_host *h, const char *fmt) } int -rule_consistent(struct pfctl_rule *r, int anchor_call) +rule_consistent(struct pfctl_rule *r) { int problems = 0; @@ -5287,7 +5311,7 @@ rule_consistent(struct pfctl_rule *r, int anchor_call) case PF_DROP: case PF_SCRUB: case PF_NOSCRUB: - problems = filter_consistent(r, anchor_call); + problems = filter_consistent(r); break; case PF_NAT: case PF_NONAT: @@ -5306,7 +5330,7 @@ rule_consistent(struct pfctl_rule *r, int anchor_call) } int -filter_consistent(struct pfctl_rule *r, int anchor_call) +filter_consistent(struct pfctl_rule *r) { int problems = 0; @@ -6346,7 +6370,7 @@ expand_rule(struct pfctl_rule *r, bool keeprule, struct node_os *src_oses, struct node_host *src_hosts, struct node_port *src_ports, struct node_host *dst_hosts, struct node_port *dst_ports, struct node_uid *uids, struct node_gid *gids, - struct node_if *rcv, struct node_icmp *icmp_types, const char *anchor_call) + struct node_if *rcv, struct node_icmp *icmp_types) { sa_family_t af = r->af; int added = 0, error = 0; @@ -6513,11 +6537,11 @@ expand_rule(struct pfctl_rule *r, bool keeprule, error += check_binat_redirspec(src_host, r, af); } - if (rule_consistent(r, anchor_call[0]) < 0 || error) + if (rule_consistent(r) < 0 || error) yyerror("skipping rule due to errors"); else { r->nr = pf->astack[pf->asd]->match++; - pfctl_append_rule(pf, r, anchor_call); + pfctl_append_rule(pf, r); added++; } @@ -6533,8 +6557,7 @@ expand_rule(struct pfctl_rule *r, bool keeprule, expand_rule(&rdr_rule, true, interface, NULL, rdr_redirspec, NULL, proto, src_os, dst_host, dst_port, - rdr_dst_host, src_port, uid, gid, rcv, icmp_type, - ""); + rdr_dst_host, src_port, uid, gid, rcv, icmp_type); } if (osrch && src_host->addr.type == PF_ADDR_DYNIFTL) { @@ -7743,7 +7766,7 @@ int filteropts_to_rule(struct pfctl_rule *r, struct filter_opts *opts) { if (opts->marker & FOM_ONCE) { - if (r->action != PF_PASS && r->action != PF_MATCH) { + if ((r->action != PF_PASS && r->action != PF_DROP) || r->anchor) { yyerror("'once' only applies to pass/block rules"); return (1); } diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 7e1195fdf2f0..b8f4305a3e38 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1861,14 +1861,12 @@ pfctl_init_rule(struct pfctl_rule *r) TAILQ_INIT(&(r->route.list)); } -int -pfctl_append_rule(struct pfctl *pf, struct pfctl_rule *r, - const char *anchor_call) +void +pfctl_append_rule(struct pfctl *pf, struct pfctl_rule *r) { u_int8_t rs_num; struct pfctl_rule *rule; struct pfctl_ruleset *rs; - char *p; rs_num = pf_get_ruleset_number(r->action); if (rs_num == PF_RULESET_MAX) @@ -1876,29 +1874,6 @@ pfctl_append_rule(struct pfctl *pf, struct pfctl_rule *r, rs = &pf->anchor->ruleset; - if (anchor_call[0] && r->anchor == NULL) { - /* - * Don't make non-brace anchors part of the main anchor pool. - */ - if ((r->anchor = calloc(1, sizeof(*r->anchor))) == NULL) - err(1, "pfctl_append_rule: calloc"); - - pf_init_ruleset(&r->anchor->ruleset); - r->anchor->ruleset.anchor = r->anchor; - if (strlcpy(r->anchor->path, anchor_call, - sizeof(rule->anchor->path)) >= sizeof(rule->anchor->path)) - errx(1, "pfctl_append_rule: strlcpy"); - if ((p = strrchr(anchor_call, '/')) != NULL) { - if (!strlen(p)) - err(1, "pfctl_append_rule: bad anchor name %s", - anchor_call); - } else - p = (char *)anchor_call; - if (strlcpy(r->anchor->name, p, - sizeof(rule->anchor->name)) >= sizeof(rule->anchor->name)) - errx(1, "pfctl_append_rule: strlcpy"); - } - if ((rule = calloc(1, sizeof(*rule))) == NULL) err(1, "calloc"); bcopy(r, rule, sizeof(*rule)); @@ -1910,7 +1885,6 @@ pfctl_append_rule(struct pfctl *pf, struct pfctl_rule *r, pfctl_move_pool(&r->route, &rule->route); TAILQ_INSERT_TAIL(rs->rules[rs_num].active.ptr, rule, entries); - return (0); } int diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index e96ff0195e03..44ddfb45fbe1 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -288,7 +288,7 @@ int pfctl_rules(int, char *, int, int, char *, struct pfr_buffer *); int pfctl_optimize_ruleset(struct pfctl *, struct pfctl_ruleset *); void pfctl_init_rule(struct pfctl_rule *r); -int pfctl_append_rule(struct pfctl *, struct pfctl_rule *, const char *); +void pfctl_append_rule(struct pfctl *, struct pfctl_rule *); int pfctl_append_eth_rule(struct pfctl *, struct pfctl_eth_rule *, const char *); int pfctl_add_altq(struct pfctl *, struct pf_altq *); From nobody Thu Sep 25 12:41:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHq6WXvz68Sch; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHq31P0z42hm; Thu, 25 Sep 2025 12:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8n/yQDg5NE1KSNAiFUS6v0ty5V/3YoU5b5LG3tkEnUg=; b=OKjcFOxY0VrSbQQUYlILCxp61X8hlRUr0ldhyMjaDBBDqkDxHBKfHRNwyJ0CmBk+eNGwZW YtKBZJduAQh8EmQehH7CSBDituTNihwKlhOF1pxVOfsQbD2FGXiUclJv8aAHpiCl/yh5Eo jUSg6o8zVG+qOxwRY6SKW/VLvtbADcepSN0xU2G/Ovo0SsOZpVeYclh4h5H3rtCdhhWUep NyBiDmDo/P+2d9ImjIMkH5cV4BUGTeW0BAb0b3PgVFo+iwKqim3p0wBzyA2rHeGc+O3JCH 6lg8sSfEwtDGjE6/jBXwTpqrwMH0weJABR3HV1jUR2HF7QUUL8t+S4uLzqXHIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8n/yQDg5NE1KSNAiFUS6v0ty5V/3YoU5b5LG3tkEnUg=; b=VzxIMpF0rnickY2X4jTH80Bzf6Ckc76lxGdVh6eG4YYwOvKQf00MClvt7/Q11ybkEJsNbk k/CJf8nIGCYmLxBIqYTCo3isPJJf6nlwyK8sk4Y5mlNMmXlwqYCYTWmod0x8xz0dGuGdsq Zz/vKvG3dRbRhz6ZOJBeS1Dq7mkXPE6oL7hmpXUrTyhPOKk0avR7y50tutjZv9P6Ow+2Qp oVuQVDbJgi0U3+G+KpR5zppllUpO8qOjO+foIDtTmgK9oBFAEO4WIOCFoBAnoXqPJsifmD NJupubRQKE7j4O28vIrFGbID/ZvukvNIpoGHMoBPQ+D2nehbdMRYghmz1HEPBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804103; a=rsa-sha256; cv=none; b=Dsbj/e20VxcXMJ86W3VChrXSQvWG43pZM2Jl7dTrsT3OZZWa/x6HgjhbpnIq5WLTIGDk7g +yjuMXBOWUS1ZCro69NmREildzgF5nNmER1pdjbLk5qqJ3/L0u+Ly3ZNEbXR5vPeMkqqgS 1LdFpFm/Zlb1ih0i4XDpaqP5KWeCXSVN2PDQr+qlIvEbjVEROGQJYdnGCGl1jpNxZxszHM tGIm4k4e3PjBaYA94FZZ1BpcVHY7J4ULbHlQBjWz6Ah3Rwyg7CH7K6F4N23Oz87d71DHSr eOiHY9qcE9POrppKrWsEl3+SPvm+cLzz3lxRtsfHzVXagwOcCqqNtnuzpDls8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHq24xtz1Gpt; Thu, 25 Sep 2025 12:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfhKd004715; Thu, 25 Sep 2025 12:41:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfhsf004712; Thu, 25 Sep 2025 12:41:43 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:43 GMT Message-Id: <202509251241.58PCfhsf004712@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: cc97633b4b7a - main - pfctl.8/pf.conf.5: Improve "once" bits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc97633b4b7a3b670d6223b1cd79a0d807dcebbd Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cc97633b4b7a3b670d6223b1cd79a0d807dcebbd commit cc97633b4b7a3b670d6223b1cd79a0d807dcebbd Author: Kristof Provost AuthorDate: 2025-08-28 09:37:11 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:10 +0000 pfctl.8/pf.conf.5: Improve "once" bits - use imperative tense in the pf.conf(5) "once" part - leave printing implementation details to pfctl(8)'s "-s rules" part - use more markup - debug mode also prints expired rules OK jmc sashan Obtained from: OpenBSD, kn , 1f1797aba7 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.8 | 9 ++++++++- share/man/man5/pf.conf.5 | 9 ++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8 index f1a2bbef6236..58de54cdf923 100644 --- a/sbin/pfctl/pfctl.8 +++ b/sbin/pfctl/pfctl.8 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 25, 2025 +.Dd August 28, 2025 .Dt PFCTL 8 .Os .Sh NAME @@ -463,6 +463,13 @@ When used together with .Fl v , the per-rule statistics (number of evaluations, packets, and bytes) are also shown. +When used together with +.Fl g +or +.Fl vv , +expired rules +.Pq marked as Dq # expired +are also shown. Note that the .Dq skip step optimization done automatically by the kernel diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index cb7fea467c2e..da02f10aac01 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -2259,12 +2259,11 @@ When the rate is exceeded, all ICMP is blocked until the rate falls below Limit each packet to be no more than the specified number of bytes. This includes the IP header, but not any layer 2 header. .It Ar once -Creates a one shot rule. -The first matching packet marks the rule as expired; -any expired rules are no longer evaluated. -Expired rules are only shown in verbose mode (-vv): +Create a one shot rule. +The first matching packet marks the rule as expired. +Expired rules are skipped and hidden, unless .Xr pfctl 8 -will append '# expired' to note any once rules which have already been hit. +is used in debug or verbose mode. .Pp .It Xo Ar queue Aq Ar queue .No \*(Ba ( Aq Ar queue , From nobody Thu Sep 25 12:41:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHr6rbMz68SZG; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHr3dz1z42pq; Thu, 25 Sep 2025 12:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acKPsrHgH7obVC+oTP/nWL2li0qFRpBJzBji2OuOu3o=; b=FcFALHfPQIWLLxh8jn2GNekR6ts9QQq4Gi82ld6bparYng6hNaLBAz2aUlt0hs3QzfLhU8 aYVDl5QVeeFGtwAdXUUeNr8BsFUitRXkIjTMhJijIIJGgIoG5BpkoZj37CPqQjqRqoaqei UQX6uJ7UA5Wod/UAJpskGd3pPEuxxROEfyUb3U3MVGgTA18Im+6hfyjMA+EK2IJrUAqjqI u7ldhnMxtWMMzgYHn4PsBPyodle5PyoO+MS8duJA6layC7zrd8zaKDPRotumgAAKor0pMh X6sdkOiFr6l9/ZrXm7aAHhj7EcnAQ9MemdwJ7qwhjE2NdLo0FwkLPPWV/K4l4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acKPsrHgH7obVC+oTP/nWL2li0qFRpBJzBji2OuOu3o=; b=jtGWHTK7DRZ26ZuNJkpLAsMniE4C+1fCuFurIdSDG8l5jt2B4E7Ijp5cu6BCYOvxIliU8Z U75RnRKX62clfgdBDDRi/mA/7GvdAefI/l2kq7kfD7+P9hSy3KZ9MUWAJG1x74Dlx7e4jR QpGhANFtG5WiyFGIpJrVs8vDS1pARWoeon/2MzDUyQVhE60j6hd9C9fVR5x0m9+kSF5uNt 6S5nOgJqqkMMhwJ+C0M4rYPGZN+Wj1s2ex/EvTZvm8bTpKagRH853MVfYSSCnkrp2xZ1ha hln2XurmnMtoELhQdA7Isnwy1GidpUWtMV/7UYypX0pHvP2SaupiIZmJhH0ePA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804104; a=rsa-sha256; cv=none; b=YnGsfTj8Z5f1I3YzPl8ijvHan47QJLhLO2Hjkf3qV5yQFSQAWmEKr6kuYaSUWPjFw1q99J Sg0TThYso9BJ2G+el+++RlN4RCxsZraVZmLhplYC/Rebll0HO65smC01CvDJ+tlsl8qaDJ M9TVtHTbvC+KUs+07OgJq1J7dT9LMqFEf3OqNDOdcr6hoGvn//O7D5BDax63BYDuDLUltN fV77J551MHpZiq4iZRewFSZY1cTE6HqNuWCxU8Q+Fsju6EVaBdwhoDm4B5hstHlg/n95Zs 4tisVlcOrCFRPHhE5s9yvvzRuyehue7n4TxBYYqCQVhlZXgM5AvEvZ6cq+ECEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHr34fYz1GsW; Thu, 25 Sep 2025 12:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfiGj004752; Thu, 25 Sep 2025 12:41:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfi6X004749; Thu, 25 Sep 2025 12:41:44 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:44 GMT Message-Id: <202509251241.58PCfi6X004749@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: ceff35a3aeef - main - pfctl: fix anchor handling for nat/rdr/binat anchors List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ceff35a3aeef822976bd159c8bc403b68d5571ff Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ceff35a3aeef822976bd159c8bc403b68d5571ff commit ceff35a3aeef822976bd159c8bc403b68d5571ff Author: Kristof Provost AuthorDate: 2025-08-28 14:26:59 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:10 +0000 pfctl: fix anchor handling for nat/rdr/binat anchors After the refactoring in 'pfctl: fix once rules' we broke nat/rdr/binat rules. These no longer exist on OpenBSD, so were not considered in that patch. Factor out the common code and call it from all anchor types. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 141 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 79 insertions(+), 62 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index babe6b99013e..0f7702fc4630 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -432,6 +432,7 @@ int filteropts_to_rule(struct pfctl_rule *, struct filter_opts *); struct node_mac* node_mac_from_string(const char *); struct node_mac* node_mac_from_string_masklen(const char *, int); struct node_mac* node_mac_from_string_mask(const char *, const char *); +static bool pfctl_setup_anchor(struct pfctl_rule *, struct pfctl *, char *); static TAILQ_HEAD(loadanchorshead, loadanchors) loadanchorshead = TAILQ_HEAD_INITIALIZER(loadanchorshead); @@ -994,7 +995,6 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto { struct pfctl_rule r; struct node_proto *proto; - char *p; if (check_rulestate(PFCTL_STATE_FILTER)) { if ($2) @@ -1003,68 +1003,9 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto } pfctl_init_rule(&r); + if (! pfctl_setup_anchor(&r, pf, $2)) + YYERROR; - if (pf->astack[pf->asd + 1]) { - if ($2 && strchr($2, '/') != NULL) { - free($2); - yyerror("anchor paths containing '/' " - "cannot be used for inline anchors."); - YYERROR; - } - - /* Move inline rules into relative location. */ - pfctl_anchor_setup(&r, - &pf->astack[pf->asd]->ruleset, - $2 ? $2 : pf->alast->name); - - if (r.anchor == NULL) - err(1, "anchorrule: unable to " - "create ruleset"); - - if (pf->alast != r.anchor) { - if (r.anchor->match) { - yyerror("inline anchor '%s' " - "already exists", - r.anchor->name); - YYERROR; - } - mv_rules(&pf->alast->ruleset, - &r.anchor->ruleset); - mv_tables(pf, &pfr_ktables, r.anchor, pf->alast); - } - pf_remove_if_empty_ruleset(&pf->alast->ruleset); - pf->alast = r.anchor; - } else { - if (!$2) { - yyerror("anchors without explicit " - "rules must specify a name"); - YYERROR; - } - /* - * Don't make non-brace anchors part of the main anchor pool. - */ - if ((r.anchor = calloc(1, sizeof(*r.anchor))) == NULL) { - err(1, "anchorrule: calloc"); - } - pf_init_ruleset(&r.anchor->ruleset); - r.anchor->ruleset.anchor = r.anchor; - if (strlcpy(r.anchor->path, $2, - sizeof(r.anchor->path)) >= sizeof(r.anchor->path)) { - errx(1, "anchorrule: strlcpy"); - } - if ((p = strrchr($2, '/')) != NULL) { - if (strlen(p) == 1) { - yyerror("anchorrule: bad anchor name %s", - $2); - YYERROR; - } - } else - p = $2; - if (strlcpy(r.anchor->name, p, - sizeof(r.anchor->name)) >= sizeof(r.anchor->name)) { - errx(1, "anchorrule: strlcpy"); - } - } r.direction = $3; r.quick = $4.quick; r.af = $6; @@ -1113,6 +1054,8 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto } pfctl_init_rule(&r); + if (! pfctl_setup_anchor(&r, pf, $2)) + YYERROR; r.action = PF_NAT; r.af = $4; @@ -1135,6 +1078,8 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto } pfctl_init_rule(&r); + if (! pfctl_setup_anchor(&r, pf, $2)) + YYERROR; r.action = PF_RDR; r.af = $4; @@ -1178,6 +1123,8 @@ anchorrule : ANCHOR anchorname dir quick interface af proto fromto } pfctl_init_rule(&r); + if (! pfctl_setup_anchor(&r, pf, $2)) + YYERROR; r.action = PF_BINAT; r.af = $4; @@ -7860,3 +7807,73 @@ filteropts_to_rule(struct pfctl_rule *r, struct filter_opts *opts) return (0); } + +static bool +pfctl_setup_anchor(struct pfctl_rule *r, struct pfctl *pf, char *anchorname) +{ + char *p; + + if (pf->astack[pf->asd + 1]) { + if (anchorname && strchr(anchorname, '/') != NULL) { + free(anchorname); + yyerror("anchor paths containing '/' " + "cannot be used for inline anchors."); + return (false); + } + + /* Move inline rules into relative location. */ + pfctl_anchor_setup(r, + &pf->astack[pf->asd]->ruleset, + anchorname ? anchorname : pf->alast->name); + + if (r->anchor == NULL) + err(1, "anchorrule: unable to " + "create ruleset"); + + if (pf->alast != r->anchor) { + if (r->anchor->match) { + yyerror("inline anchor '%s' " + "already exists", + r->anchor->name); + return (false); + } + mv_rules(&pf->alast->ruleset, + &r->anchor->ruleset); + mv_tables(pf, &pfr_ktables, r->anchor, pf->alast); + } + pf_remove_if_empty_ruleset(&pf->alast->ruleset); + pf->alast = r->anchor; + } else { + if (! anchorname) { + yyerror("anchors without explicit " + "rules must specify a name"); + return (false); + } + /* + * Don't make non-brace anchors part of the main anchor pool. + */ + if ((r->anchor = calloc(1, sizeof(*r->anchor))) == NULL) { + err(1, "anchorrule: calloc"); + } + pf_init_ruleset(&r->anchor->ruleset); + r->anchor->ruleset.anchor = r->anchor; + if (strlcpy(r->anchor->path, anchorname, + sizeof(r->anchor->path)) >= sizeof(r->anchor->path)) { + errx(1, "anchorrule: strlcpy"); + } + if ((p = strrchr(anchorname, '/')) != NULL) { + if (strlen(p) == 1) { + yyerror("anchorrule: bad anchor name %s", + anchorname); + return (false); + } + } else + p = anchorname; + if (strlcpy(r->anchor->name, p, + sizeof(r->anchor->name)) >= sizeof(r->anchor->name)) { + errx(1, "anchorrule: strlcpy"); + } + } + + return (true); +} From nobody Thu Sep 25 12:41:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHt21Hpz68SjN; Thu, 25 Sep 2025 12:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHs4nBRz42sK; Thu, 25 Sep 2025 12:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ihCjq+u/lhqYBPiAFKgRm4+jiREqVdgZdJhc6gt+g3s=; b=F66PYG0sm0D37ZoYoIY0125V5UQ8ErdaWg3nr428px/hwCB9G31wxHB3gf4G7SBbyob5SE N+n4Ovr5jbEyni+xjsUQ3+4404Tp39puzOX41yDYzmrPFYfhBhpvt8NBahuTpXn+XAhcVi 53+AKF0qTRE3rwZTiXk7UnGQKv6mWkX0U4CEd5Y8Iz7kL7/kCGVpeeBQxBtvKKwOKvZOb9 kU6hTA52EQ2zqbcvhzXtjJ/q908y3tCfhm7ghP3MyZ9r+UfLhiljrb0cyLCCZK8PUKkx1N kKN+TUxv6OfNYrxx988Ox9fXv2EGKOvN+7YaD+eTxtJmBwMAtuC9nb+hQazuYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ihCjq+u/lhqYBPiAFKgRm4+jiREqVdgZdJhc6gt+g3s=; b=HDsuHOQe0E3iEeaawwTS/M0J9YTPBj3HLQ5lg7WeWIi4mQL3BpI1ySM7TsMHPtCAWc1DXe 5/KnY7EgJ15pTK209BtVPoQuxxch2ZBGxMd0QMe+a6ooXmFJ5uddgogNMzVlt4f7J7ekoW ie9JqxiiWhv8+fqHoKMMLhf30ViLLwYlI3TroHt8NIJ3Va4gExjLrz3nLSxByQ1HoWbsaX byBp54bKURKo1ggshOCumjqDzvvtuW8CZmSvjPRSixEFYkLfl7yd4qpGfDJEtD0X5iI+Jv A/phZKAe4njeSOlR/HPkhKip5/7QaPQZVp/dFkyOPKii60Sjpw/X/ee0vREopA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804105; a=rsa-sha256; cv=none; b=rjbdZH7yTSCLN9cC/EN1LjVjMhxktkqsbLDhWN/UZT0mH8CzN6j4KaT2EhNoJ28dr2UNy4 G2oDhu+Z9z3heMUprIUqMbYdZmeh1h+2yi5G1//gCpmCGHb4UlsAyYT1PhtjcyuvnSx6sG hpD8l8/stc3GQ9gk7CWnij91MF1yH8Uenu14z6s9gA5qAJJr4LkI8AUb0GDt2UlyVAehqq 7JKWwoNmrm85oR8ycCR8SBBeX76RNEsOJZ5J8ZK7ZVYuHJM3OtzQYqOxDtoAXO+j/pmG9I YVl91O8/oO/fvOfNF6kUGbdovQSHYfBWBnAMbZWgO7kYnw9ureWfStitsZepDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHs4Jcdz1H6Z; Thu, 25 Sep 2025 12:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfj5v004786; Thu, 25 Sep 2025 12:41:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfjh3004783; Thu, 25 Sep 2025 12:41:45 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:45 GMT Message-Id: <202509251241.58PCfjh3004783@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: c913959e9e03 - main - pf tests: basic 'once' test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c913959e9e03ccc979caacda520568c084714f48 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c913959e9e03ccc979caacda520568c084714f48 commit c913959e9e03ccc979caacda520568c084714f48 Author: Kristof Provost AuthorDate: 2025-08-28 15:14:14 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:10 +0000 pf tests: basic 'once' test Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/once.sh | 83 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 9f993eec61d0..7ddeb5369f47 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -30,6 +30,7 @@ ATF_TESTS_SH+= altq \ names \ nat \ nat64 \ + once \ pass_block \ pflog \ pflow \ diff --git a/tests/sys/netpfil/pf/once.sh b/tests/sys/netpfil/pf/once.sh new file mode 100644 index 000000000000..50ccb17e16c6 --- /dev/null +++ b/tests/sys/netpfil/pf/once.sh @@ -0,0 +1,83 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 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)/utils.subr + +atf_test_case "basic" "cleanup" +basic_head() +{ + atf_set descr 'Basic one shot rule test' + atf_set require.user root +} + +basic_body() +{ + pft_init + + epair=$(vnet_mkepair) + + vnet_mkjail alcatraz ${epair}a + jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up + + ifconfig ${epair}b 192.0.2.2/24 up + + # Sanity checks + atf_check -s exit:0 -o ignore \ + ping -c 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "block" \ + "pass in from 192.0.2.2 once" + + # First once succeeds + atf_check -s exit:0 -o ignore \ + ping -c 3 192.0.2.1 + + # Check for '# expired' + atf_check -s exit:0 -e ignore \ + -o match:'pass in inet from 192.0.2.2 to any flags S/SA keep state once # expired' \ + jexec alcatraz pfctl -sr -vv + + # The second one does not + atf_check -s exit:2 -o ignore \ + ping -c 3 192.0.2.1 + + # Flush states, still shouldn't work + jexec alcatraz pfctl -Fs + atf_check -s exit:2 -o ignore \ + ping -c 3 192.0.2.1 +} + +basic_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "basic" +} From nobody Thu Sep 25 12:41:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHv2rBHz68SjP; Thu, 25 Sep 2025 12:41: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHt5gwvz42q5; Thu, 25 Sep 2025 12:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wE/1q12brrBm+d6BAtqs2NuRI02sj9D6cZgF59gzpV0=; b=MzyhfnGE+gHxtJgSuVBGtTFtAzdAXXQNEw3j0A+l8yWq/eLciOeNTJb0K+tG4n9SjMnCTa MKjHrOrnRt34NCCk6ezMUor5FoIXBh+XzjyQ3UAA+jlJG9PVfcwPPExlxkLNhBmirbVB5E qN4aKi6+piXqk0oHvvHVtz/rltGYnX4kF72adeaExDdigPMINLSxoKyY6qzvwX8Rc0ny85 45GaGAcjerTDytigC/rG+pWlMS0gIV4FFUyhOGDlsMGdDAzvhEAt6hNTYp78EdTrgbKLCX 3mhKbuev819lROKKgcMGaBXC0FDoo8k9iVXa0YuFrUlajyFVMKezQO6wed9jfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wE/1q12brrBm+d6BAtqs2NuRI02sj9D6cZgF59gzpV0=; b=DI6vhn0JRnfamnhsy2JLkfK7R0JGcgu5kZz0e+P8Y7BcrGNGIx2BtpSN+OuOULSimc9tcC bJY9/201Pk/PTT23eAYknjdNO1CupMNCog7gc27qkQ77wTV9Kz/EfZJUNB3r0DJ2d+d0dG 3SkTClrlQEScb/Qyjpr4dZOpdv917k39gOrkKXKM8vPkSIM5+KI+CmmsxUhIlN1fkXQJwX x3qTR29v+iBmfAkcVODE3FedIpdTMsnfxf1Ax+z36lHTsjpDg+x8DwjTiFcR2QdG5/9LRN La1xcDqXBWqBuYN7K5RkhmRrUwFybtvv15bgp8qFLhPqmLaZ+sh34j2Bv2bs/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804106; a=rsa-sha256; cv=none; b=UYousQpM+0aDCYT8wRLHwDP2SYRgvxRlbc9+/Cs5LeJr4i5kBTh//uEuXdQ/UoY1HsEHhE GZuhXgfDhWIk4cawUOYI5Ow2QO4qwXY9kgfh6KlNiQQgJh3ukXLjuZwg7pZbOSw1XO2DKl G/ZwlPJquRs9Ck5HoE3ZT0EKQje5eDmV5mfCuflElgozJNz9EH2nGJbeCXKoeyc1Tt/Mxl lcf6I/R5d5z50FGRJ845j+pEzht4y6WGx00CsH7YWpKqfWEmquyuWGu3WOCRNQtiHp1dj9 TQRCxFWGJCpEFlqLSmEjaGVmJwagXh5CsVzUmXZ1xQLZiB7FBfg6tpR9xL3nng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHt5G0xz1Gvk; Thu, 25 Sep 2025 12:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfkFv004819; Thu, 25 Sep 2025 12:41:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfkZI004816; Thu, 25 Sep 2025 12:41:46 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:46 GMT Message-Id: <202509251241.58PCfkZI004816@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: 2c53e251601c - main - pf tests: test once rule inside an anchor List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c53e251601c1fcd558f42a16f6030ba75b7e8df Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c53e251601c1fcd558f42a16f6030ba75b7e8df commit 2c53e251601c1fcd558f42a16f6030ba75b7e8df Author: Kristof Provost AuthorDate: 2025-08-28 15:36:03 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:10 +0000 pf tests: test once rule inside an anchor Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/once.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/sys/netpfil/pf/once.sh b/tests/sys/netpfil/pf/once.sh index 50ccb17e16c6..54dbb030dbe6 100644 --- a/tests/sys/netpfil/pf/once.sh +++ b/tests/sys/netpfil/pf/once.sh @@ -77,7 +77,56 @@ basic_cleanup() pft_cleanup } +atf_test_case "anchor" "cleanup" +anchor_head() +{ + atf_set descr 'Test one shot rule in anchors' + atf_set require.user root +} + +anchor_body() +{ + pft_init + epair=$(vnet_mkepair) + + vnet_mkjail alcatraz ${epair}a + jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up + + ifconfig ${epair}b 192.0.2.2/24 up + + # Sanity checks + atf_check -s exit:0 -o ignore \ + ping -c 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "block" \ + "anchor \"once\" {\n + pass in from 192.0.2.2 once\n + }" + + # First once succeeds + atf_check -s exit:0 -o ignore \ + ping -c 3 192.0.2.1 + + # Check for '# expired' + jexec alcatraz pfctl -sr -vv -a "*" + atf_check -s exit:0 -e ignore \ + -o match:'pass in inet from 192.0.2.2 to any flags S/SA keep state once # expired' \ + jexec alcatraz pfctl -sr -vv -a "*" + + # The second one does not + atf_check -s exit:2 -o ignore \ + ping -c 3 192.0.2.1 +} + +anchor_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" + atf_add_test_case "anchor" } From nobody Thu Sep 25 12:41:48 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHx5Fj8z68Scy; Thu, 25 Sep 2025 12:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHx0C04z42yR; Thu, 25 Sep 2025 12:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NRrJf2hawEfU78gQLy6pyIeIQ+YRCw7irzAsSEZ+4Pg=; b=TOx9alb8RVIYoFQXizMeEp/Uj//09mvErFxsaEz2Y9DFXGv9PQOYrY81UByfx9WcaRXzZq PobqAXct/ei+kWKsNeTXT/sZdcn/KoTBV79T2hFixrBtBsJXWkoCtcCXR+Dgmd1fhFprug /fa1G96tPaoXLr2t9iU34PpyYTpnQ5PtZASvR47Rx5PdH/5/gWSw1Y0VOOYlfPwGwRo34N 7BOy6iXJzU9a5XeOSVLqTQgq8VPDIQt5LubG62mGgecJvQa7abbxajwI9ZvjQbklSgtVZZ pO37MpXW1cV4LvvLQgAW02/AQ0HwyeYMwLNlUPVxRJ65qxNWBukFDIIz/zb/XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NRrJf2hawEfU78gQLy6pyIeIQ+YRCw7irzAsSEZ+4Pg=; b=WWCKYQZmm3pnsU8BSx9W5XI7/zeUHXzpqB2XdX0/3MxEIuj0ZpWhiPjSMc8/dmRptD2Bhx 2+a+3S4YUKuwf2MO9Nzy1+mvZRmuMgw9QWlfnow9UkdCg1X85uUq64RNygKTpwqg68eTtb Rw5ZZa1oxuHdihbE2yA16vGXa8+gbgAFYqo8MfnpTgsVQHvaPmvSmv3FnoCKxq46CXu1p1 NyjZK8yKHux5mtIObBK8fkNkJ06wCg3eoPkOR0YHQBz+6+bq/a1FCkjcT01ciej75Q0On0 3ey5n9tvseTF1pG/rt8XoiSOaAaxHBSbzLDZTyZzxd47sxbVTF2ubKpCpT3VXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804109; a=rsa-sha256; cv=none; b=qFRGrm+gvKd3DAmFRnNMF1xDoaYwaJ9MrWX2UwaZvwN/bXh4Cn23YBp8MEYcSCyGTPrTMp o7evnvHJDAWjdcnLatjBsbPTairp7ZK9Fsl/FKcnyEwknQvbu56ZAmvWL327lGK5yoym8B MQbBGHzXQTJ9MkROEn5Kb5Y83MmH8mbTaMTO84OCWt7wjvTCRm5pgqpP8mq3upHohhfPFx mdEPP/0jaRp5DCJKyNcRgMqlPwP7pomHJDkxoJbHOxhqFmZ/8XJPM01WqfN+fH1ECxAiEs GEA/8zSB9APObaiLcwvp9N0WVgQNbXSFty4OQixF7heJ+KUesa3QTgpGcifJkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHw6m2Dz1Gpw; Thu, 25 Sep 2025 12:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfmbm004888; Thu, 25 Sep 2025 12:41:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfmkH004885; Thu, 25 Sep 2025 12:41:48 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:48 GMT Message-Id: <202509251241.58PCfmkH004885@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: 08fbad1b135b - main - pfctl: refactor 'rule_numbers' variable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08fbad1b135b0efcfc82f793999463def9f95610 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=08fbad1b135b0efcfc82f793999463def9f95610 commit 08fbad1b135b0efcfc82f793999463def9f95610 Author: Kristof Provost AuthorDate: 2025-08-28 15:52:18 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:11 +0000 pfctl: refactor 'rule_numbers' variable The 'rule_numbers' is used for more than just displaying rule numbers. Rename it and move the actual opts checking into the relevant functions. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.c | 5 ++--- sbin/pfctl/pfctl_parser.c | 11 +++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index b8f4305a3e38..21562fa03e0d 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1315,7 +1315,6 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, struct pfctl_rule rule; char anchor_call[MAXPATHLEN]; u_int32_t nr, header = 0; - int rule_numbers = opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG); int numeric = opts & PF_OPT_NUMERIC; int len = strlen(path), ret = 0; char *npath, *p; @@ -1413,7 +1412,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, case PFCTL_SHOW_RULES: if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; - print_rule(&rule, anchor_call, rule_numbers, numeric); + print_rule(&rule, anchor_call, opts, numeric); /* * Do not print newline, when we have not * printed expired rule. @@ -1492,7 +1491,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum pfctl_show format, if (rule.label[0][0] && (opts & PF_OPT_SHOWALL)) labels = 1; INDENT(depth, !(opts & PF_OPT_VERBOSE)); - print_rule(&rule, anchor_call, rule_numbers, numeric); + print_rule(&rule, anchor_call, opts, numeric); /* * If this is a 'unnamed' brace notation diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index f04bc93436d8..b8531067d3f6 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -389,9 +389,11 @@ print_flags(uint16_t f) void print_fromto(struct pf_rule_addr *src, pf_osfp_t osfp, struct pf_rule_addr *dst, - sa_family_t af, u_int8_t proto, int verbose, int numeric) + sa_family_t af, u_int8_t proto, int opts, int numeric) { char buf[PF_OSFP_LEN*3]; + int verbose = opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG); + if (src->addr.type == PF_ADDR_ADDRMASK && dst->addr.type == PF_ADDR_ADDRMASK && PF_AZERO(&src->addr.v.a.addr, AF_INET6) && @@ -854,7 +856,7 @@ print_eth_rule(struct pfctl_eth_rule *r, const char *anchor_call, } void -print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numeric) +print_rule(struct pfctl_rule *r, const char *anchor_call, int opts, int numeric) { static const char *actiontypes[] = { "pass", "block", "scrub", "no scrub", "nat", "no nat", "binat", "no binat", "rdr", "no rdr", @@ -862,7 +864,8 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer static const char *anchortypes[] = { "anchor", "anchor", "anchor", "anchor", "nat-anchor", "nat-anchor", "binat-anchor", "binat-anchor", "rdr-anchor", "rdr-anchor" }; - int i, ropts; + int i, ropts; + int verbose = opts & (PF_OPT_VERBOSE2 | PF_OPT_DEBUG); char *p; if ((r->rule_flag & PFRULE_EXPIRED) && (!verbose)) @@ -988,7 +991,7 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer printf(" proto %u", r->proto); } print_fromto(&r->src, r->os_fingerprint, &r->dst, r->af, r->proto, - verbose, numeric); + opts, numeric); if (r->rcv_ifname[0]) printf(" %sreceived-on %s", r->rcvifnot ? "!" : "", r->rcv_ifname); From nobody Thu Sep 25 12:41:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHw2lDfz68Sg4; Thu, 25 Sep 2025 12:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHv6wH1z42q9; Thu, 25 Sep 2025 12:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91Zx00m7dj44ugVsGWv/utvdMe6UfF/k84r9P7FI6Z8=; b=hpA42SPSM0X/XUKgjO3HGqafNtXaU0litUQZefe5RqsOLKSf10lir6WCxsBcI5qRpHpOGi FrhW4pWW1besZogXgX3AiWISWbGltMHS3JOTNktbsYXy9bgW2y2L3rFJauuhk082farJRs MgYyIe7CJnWS2ZnqVCiIBaJPLc7pWDxTpXRQZcjcIqHZ0QBxHyawY5JLhaH+08SFfxwb6u W5Nq3Z6FgECkbDL+YQZHMPNo2uFOh9jTdKuR52hkXCQUBBDkKjvntHaKISUlqQunAzzrDB FETkhgRa1N69QiyPtIcg9YZx7zJuSYKvEatdAcWibMUnzO57VadMopvk4JU3jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=91Zx00m7dj44ugVsGWv/utvdMe6UfF/k84r9P7FI6Z8=; b=cXamUlHkaBPY1LH/NsO+IeaHB8CcsQ8zcFoxJTAt16kke+JKiOyq+ap6poThBe1K89X9mH M/sc82sVW/RcEzYJII/Qn4lkS5FUOj5Mqb/Xja+E0QW2Yg2YQVu6S9GBZTeQDcRwzpdtpu 7nVpz3wiFnt0zISSwvdWUMrzWrcYy8TkIPDXS5GPpI80LpAzMY8XiVWZByrqpLVdAvsCBj R535bTaxl031xNsGY5Q0zm1/lIZbupibKfalR/6A4bJ5fSCObgxregX5r8skcZ4nDV8Sib 8P5YSZA88KxsP0EqoISlKpwwCzDb5IGd3Ec6XSHxPPCb9r6mE3o5KIjTe9s5+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804108; a=rsa-sha256; cv=none; b=jHl8LFY+lj08MMskVOOZfufBlVaACFApS7o1lQt+7blopUt2XqZ2oiQG3r1EVoZrT2M72f ixDUzolPWGaShk8j/lpAsKQU62hBVOUnRUeyjg1Df2COEDvU7TxochyKdhfld1/aLI+8Hp u4JICaFIAeH+c2qcjRdX2BI7zV6MJzNjWJmCijudE5YHtOwR8FrsGP5B0BTihIndeaPUoB vfhN7v9+GoEr5Pj5WPitGfuUbTJiPYKBpBRAMxQXFOMuVuoBDMqt0mbEezyV09/lTzWprk HUGceVpjSADREDMwnkFjRJQz06PiLS/6yROdQKqdEzqbTAjLfeAALj6KaZVvMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHv6BjLz1H9k; Thu, 25 Sep 2025 12:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfl8d004852; Thu, 25 Sep 2025 12:41:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCflSw004849; Thu, 25 Sep 2025 12:41:47 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:47 GMT Message-Id: <202509251241.58PCflSw004849@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: 64bfb82f1741 - main - pfctl: print once shot rule expiration time List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64bfb82f17417660f3d1a2d10b381b293b780b21 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=64bfb82f17417660f3d1a2d10b381b293b780b21 commit 64bfb82f17417660f3d1a2d10b381b293b780b21 Author: Kristof Provost AuthorDate: 2025-08-28 15:50:54 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:11 +0000 pfctl: print once shot rule expiration time We already track this in the kernel and pass it to userspace, we may as well show users. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl_parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index edbc924341e0..f04bc93436d8 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1292,8 +1292,12 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer } } - if (r->rule_flag & PFRULE_EXPIRED) + if (r->rule_flag & PFRULE_EXPIRED) { printf(" # expired"); + + if (r->exptime != 0) + printf(" %s", ctime(&r->exptime)); + } } void From nobody Thu Sep 25 12:41:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYHy2N6Gz68SGk; Thu, 25 Sep 2025 12:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYHy0h4zz42qb; Thu, 25 Sep 2025 12:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q3O/hT+PZYuA6Kt4AbGPsqbMkSq7nkmF+erSu7vKoTE=; b=f9VHZ+5gnqaJdG128EpV2u2t2Yy7jH5elqJUk+k3tknU4DnowxG5yXMpfFfRBvg5XMoQF+ 12AYO2TPfWFeUJych0i6RdQUY+FrpIc+bqmmrcSZFOY4DAqa9amNCrCtAB46KlIavnt17l /xWBzqxKbHlia+rU/XT0/RyZETPToNmsoM4rIqEih4KKJxDIpid+tMs0AAEJmQbjz5hPci TF+mJEbqD0/MINHxCmqc2HtCWZ/ujsSFcCNzemCy6r11xB4LRrdj8/VPZ3LcbsV9sA2lH4 EobHz7EJQ0Hc4BTrHhHJXGAbFKKFgXaVrEqLXebDA+QWLCBna0ZmNaYLfn1PdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758804110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q3O/hT+PZYuA6Kt4AbGPsqbMkSq7nkmF+erSu7vKoTE=; b=EUw7Ywa6kTIjf6vIRPSFIiVo9Ut+bc97w1VqKeVbJWJO5psQqMXZTwvw86zHKmmW7uDOfc wdlE5b2peJyj4ODP++IMTHnJS5xiOEjXMAnoJGH+je+ouMvbRSuUxNER+91gmBideBi3JO Wgg1uQLZyBhArkApQIjdP1Tr3QncE+fGaacboV9GiUW0H8QID9v0G1BBNJikSYoEPPTgUr SeUOO3eFPNmBp+yWqoDTWByCSHU6ACmyW3wG3iBzmySmtdrYZtpKSwG/T6dQEQLemgnMrX k91+h2Mmct+GeRiDCn+e/+vlgdf4FX3Hyawew6hlev1J0u4CT/HvpDwjscXVcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758804110; a=rsa-sha256; cv=none; b=oHcsqBQ1oSjIMSWZ+gbuaKJ+wsTGhxjKNE8lmjPLhPcgB9/UlcSyyUw/WeObhSuBfmEyRp sPwUhJNn9lt1M9j6/DsP2B0di+EwS757AiXbF3aMT9ZU8OKWs21wQVGfYuDtyURQBgMHMB NZ26+WszT7keElJpqEfymweEhwEENeirTXnWDpigHDUNDlzIOppOl8BUtR218m4UXQXEmN /wE701HMK1TV0yzx7naTgbWN13himnhCNoehUdIGXp7lQW2T5M48XpmEC+lh7iIU/r/ubC 1Wor0CyYu5x/R2RibNSgqMONgu+XOK/LHyFmTvS80pbTAJpDm2pV/tHZ4dz3aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYHy0BrRz1H6b; Thu, 25 Sep 2025 12:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PCfnkP004927; Thu, 25 Sep 2025 12:41:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PCfncS004924; Thu, 25 Sep 2025 12:41:49 GMT (envelope-from git) Date: Thu, 25 Sep 2025 12:41:49 GMT Message-Id: <202509251241.58PCfncS004924@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: b84666f798e8 - main - pf: export expiration time as time_t List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b84666f798e872efd356c5743640e3683ab82f9d Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b84666f798e872efd356c5743640e3683ab82f9d commit b84666f798e872efd356c5743640e3683ab82f9d Author: Kristof Provost AuthorDate: 2025-08-28 16:49:06 +0000 Commit: Kristof Provost CommitDate: 2025-09-25 12:41:11 +0000 pf: export expiration time as time_t time_t has a different size on different platforms (i.e. 32-bit on i386, 64-bit on others). Rather than always exporting it as 64-bits use the platform-native size. This means we can safely write directly into a time_t variable, which we can't do on i386 eif we export 64 bits. Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 2 +- sys/netlink/netlink_message_writer.h | 6 ++++++ sys/netlink/netlink_snl.h | 11 +++++++++++ sys/netpfil/pf/pf_nl.c | 2 +- sys/netpfil/pf/pf_nl.h | 2 +- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e38469643571..4b579de38ad0 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1699,7 +1699,7 @@ static struct snl_attr_parser ap_getrule[] = { { .type = PF_RT_MAX_PKT_SIZE, .off =_OUT(r.max_pkt_size), .cb = snl_attr_get_uint16 }, { .type = PF_RT_TYPE_2, .off = _OUT(r.type), .cb = snl_attr_get_uint16 }, { .type = PF_RT_CODE_2, .off = _OUT(r.code), .cb = snl_attr_get_uint16 }, - { .type = PF_RT_EXPTIME, .off = _OUT(r.exptime), .cb = snl_attr_get_uint64 }, + { .type = PF_RT_EXPTIME, .off = _OUT(r.exptime), .cb = snl_attr_get_time_t }, }; #undef _OUT SNL_DECLARE_PARSER(getrule_parser, struct genlmsghdr, snl_f_p_empty, ap_getrule); diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h index 83f925e8d93d..ad2099a4d636 100644 --- a/sys/netlink/netlink_message_writer.h +++ b/sys/netlink/netlink_message_writer.h @@ -283,6 +283,12 @@ nlattr_add_s64(struct nl_writer *nw, uint16_t attrtype, int64_t value) return (nlattr_add(nw, attrtype, sizeof(int64_t), &value)); } +static inline bool +nlattr_add_time_t(struct nl_writer *nw, uint16_t attrtype, time_t value) +{ + return (nlattr_add(nw, attrtype, sizeof(time_t), &value)); +} + static inline bool nlattr_add_flag(struct nl_writer *nw, uint16_t attrtype) { diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 586716776bc5..6dd8a9cbdb35 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -630,6 +630,17 @@ snl_attr_get_int64(struct snl_state *ss, struct nlattr *nla, const void *arg, return (snl_attr_get_uint64(ss, nla, arg, target)); } +static inline bool +snl_attr_get_time_t(struct snl_state *ss __unused, struct nlattr *nla, + const void *arg __unused, void *target) +{ + if (NLA_DATA_LEN(nla) == sizeof(time_t)) { + memcpy(target, NLA_DATA_CONST(nla), sizeof(time_t)); + return (true); + } + return (false); +} + static inline bool snl_attr_get_string(struct snl_state *ss __unused, struct nlattr *nla, const void *arg __unused, void *target) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index ff3edd43e3a5..082b9b565153 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1025,7 +1025,7 @@ pf_handle_getrule(struct nlmsghdr *hdr, struct nl_pstate *npt) nlattr_add_u64(nw, PF_RT_SRC_NODES_NAT, counter_u64_fetch(rule->src_nodes[PF_SN_NAT])); nlattr_add_u64(nw, PF_RT_SRC_NODES_ROUTE, counter_u64_fetch(rule->src_nodes[PF_SN_ROUTE])); nlattr_add_pf_threshold(nw, PF_RT_PKTRATE, &rule->pktrate); - nlattr_add_u64(nw, PF_RT_EXPTIME, time_second - (time_uptime - rule->exptime)); + nlattr_add_time_t(nw, PF_RT_EXPTIME, time_second - (time_uptime - rule->exptime)); error = pf_kanchor_copyout(ruleset, rule, anchor_call, sizeof(anchor_call)); MPASS(error == 0); diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index 38891339450e..c46c8f2b2592 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -285,7 +285,7 @@ enum pf_rule_type_t { PF_RT_MAX_PKT_SIZE = 83, /* u16 */ PF_RT_TYPE_2 = 84, /* u16 */ PF_RT_CODE_2 = 85, /* u16 */ - PF_RT_EXPTIME = 86, /* u64 */ + PF_RT_EXPTIME = 86, /* time_t */ }; enum pf_addrule_type_t { From nobody Thu Sep 25 13:12:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXYyx5rWDz68VZ0; Thu, 25 Sep 2025 13:12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXYyx3g7sz3CK7; Thu, 25 Sep 2025 13:12:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758805929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LvcIkGRIlXIX7FZ8oS90YBFEP4usGdR4u1aEIQ0uv7Q=; b=naDZhBQYqs8do0THbEVjW2c2YhnjBhtXD7Zq66e/nuyjuxqnHrISkUxHltOe06jgXyAGed f9pb3EcwzPV3e2tlF/XoCtl/xQLJf3l7xIv248mTXVQsaYSnIx4n8HmVqkBxTS8n/lydIk jbkD9mSiwGC2dUzNoQfRx73J9L7wyv8Z40Mvr5ZCG1tJBgs4ZisRbsvl1WparJ1S5tONJV b7lFLxCbxkoCRa9tFaOkTxAivNw7wvhyokAgaQ0Cw0rtdVDRiQPW4DxGaszloDKcshwSzN 12LeMJrdxNoxVk2udzt3AcGzYA1KJUB0u12oIF0obPX0N0Oz0mu39Av1LFuEhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758805929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LvcIkGRIlXIX7FZ8oS90YBFEP4usGdR4u1aEIQ0uv7Q=; b=Wsoz8AxpUxvY6eHIJ3YK9ul30vw8568jFgr0N5dUCvsmH+/3H7SC9r+jRRssBNf6ThzIuL W7sS1oZifj6ggTily3xTc5myeEO9YwM4EQI57eu9ZX5tUwZERIYsl+iRoCAkG4y31mwZLy M5keu7VZUpPUEeKWRvi/V4IHIfKx/NJt6q7lgpU7DewC7FSVqPFnzN40to5FOGXgvhNXXl MhldFKAKrCDmz7s41rLU2B7mZm2maVOXAujqiyNTlcSd9tQcRQNSLoTQIE9ecGdYPxN2E3 8UXlumtWlOycHJ5xj0ngAY+v8qg8Pev0h8XEgVIb3ce/1pzQXUZ2ByfiPEwgWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758805929; a=rsa-sha256; cv=none; b=xLD9D05nDFMn0NjRPFvH0BPSt7l1m6Q+9l9QHeygmWSCs1RB4IMczZdy09A3dieFJrJdsC +bfGSxc+PCyFYBe2muy7YFH8tv6OsXD6FUpVaFleE9zvpyVa4bpo4Pdq2TCUDAjrsTKKzu ixnzFrS9IlmzLBXMSzbjmUJKRm2ixlNRm4PzK3K52zwqPvN23t+suDMbvuyBTIp++Fogdo uri0ngkyVZHqAHxvz357W2drnu7qn59vkcu01QC52KA5yGeTjtFXxnwzhZfXhD0B0O2CV6 3vFK1R3L5LxIeSuvrWBKY/8Solgy61iaO0UOFq1hLjORwXc56DNC3IiekoscwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXYyx3DwZz1Hj1; Thu, 25 Sep 2025 13:12:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PDC9D2061278; Thu, 25 Sep 2025 13:12:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PDC9SU061275; Thu, 25 Sep 2025 13:12:09 GMT (envelope-from git) Date: Thu, 25 Sep 2025 13:12:09 GMT Message-Id: <202509251312.58PDC9SU061275@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: 4227d51b6e09 - main - release: create pkgbase VM and cloud images List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4227d51b6e09ceaaae0f5832c85ec700d80ef18f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4227d51b6e09ceaaae0f5832c85ec700d80ef18f commit 4227d51b6e09ceaaae0f5832c85ec700d80ef18f Author: Isaac Freund AuthorDate: 2025-07-24 08:43:43 +0000 Commit: Ed Maste CommitDate: 2025-09-25 12:55:56 +0000 release: create pkgbase VM and cloud images VM and cloud images are now built as packaged base systems by default, matching the default for installation media. Setting -DNOPKGBASE allows building as non-pkgbase systems. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51483 --- release/Makefile | 3 ++- release/Makefile.vm | 8 ++++++-- release/tools/ec2-builder.conf | 9 +++++++++ release/tools/ec2-small.conf | 9 +++++++++ release/tools/vmimage.subr | 36 ++++++++++++++++++++++++++++++++---- 5 files changed, 58 insertions(+), 7 deletions(-) diff --git a/release/Makefile b/release/Makefile index fb2a60130700..d131a36157d7 100644 --- a/release/Makefile +++ b/release/Makefile @@ -23,7 +23,8 @@ # (by default, the directory above this one) # NODISTSETS: if set, do not include dist sets or MANIFEST # NOPKGBASE: if set, include dist tarballs rather than pkgbase packages in -# disc1 and dvd1 installation media +# disc1 and dvd1 installation media and build VM/cloud images using +# make installkernel installworld. # PORTSDIR: location of ports tree to distribute (default: /usr/ports) # XTRADIR: xtra-bits-dir argument for /mkisoimages.sh # NOPKG: if set, do not distribute third-party packages diff --git a/release/Makefile.vm b/release/Makefile.vm index 479547f76da1..eafd1d6abf71 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -126,7 +126,7 @@ ${_CW:tu}${_FS:tu}${_FMT:tu}IMAGE= ${_CW:tl}.${_FS}.${_FMT} cw-${_CW:tl}-${_FS}-${_FMT}: cw-ec2-base-${_FS}-${_FMT} .endif -cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} +cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} ${PKGBASE_REPO_DIR} mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} SWAPSIZE=${SWAPSIZE} \ QEMUSTATIC=${QEMUSTATIC} \ @@ -137,6 +137,8 @@ cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} PKG_REPOS_DIR=${PKG_REPOS_DIR:U${.OBJDIR}/${.TARGET}/etc/pkg} \ PKG_REPO_NAME=${PKG_REPO_NAME:UFreeBSD-ports} \ PKG_INSTALL_EPOCH=${PKG_INSTALL_EPOCH:U${GITEPOCH}} \ + NOPKGBASE=${NOPKGBASE} \ + PKGBASE_REPO_DIR=${.OBJDIR}/pkgbase-repo-dir \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ -F ${"${_CW:MEC2-BUILDER}" != "":?ufs:${_FS}} \ @@ -180,7 +182,7 @@ CLEANFILES+= ${VMBASE}.${FS}.${FORMAT} vm-base: vm-image -vm-image: ${QEMUTGT} +vm-image: ${QEMUTGT} ${PKGBASE_REPO_DIR} .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) . for FORMAT in ${VMFORMATS} . for FS in ${VMFSLIST} @@ -193,6 +195,8 @@ vm-image: ${QEMUTGT} PKG_REPOS_DIR=${PKG_REPOS_DIR:U${.OBJDIR}/${.TARGET}-${FORMAT}-${FS}/etc/pkg} \ PKG_REPO_NAME=${PKG_REPO_NAME:UFreeBSD-ports} \ PKG_INSTALL_EPOCH=${PKG_INSTALL_EPOCH:U${GITEPOCH}} \ + NOPKGBASE=${NOPKGBASE} \ + PKGBASE_REPO_DIR=${.OBJDIR}/pkgbase-repo-dir \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr \ -d ${.OBJDIR}/${.TARGET}-${FORMAT}-${FS} -F ${FS} \ diff --git a/release/tools/ec2-builder.conf b/release/tools/ec2-builder.conf index 993dffc565eb..cf4276fc80ec 100644 --- a/release/tools/ec2-builder.conf +++ b/release/tools/ec2-builder.conf @@ -11,6 +11,15 @@ export VMSIZE=8000m export INSTALLOPTS="WITHOUT_DEBUG_FILES=YES WITHOUT_KERNEL_SYMBOLS=YES \ WITHOUT_LIB32=YES WITHOUT_TESTS=YES WITHOUT_LLDB=YES" +# Equivalent to INSTALLOPTS for pkgbase +vm_extra_filter_base_packages() { + grep -v \ + -e '.*-dbg$' \ + -e '.*-lib32$' \ + -e '^FreeBSD-tests.*' \ + -e '^FreeBSD-lldb.*' +} + # Packages to install into the image we're creating. In addition to packages # present on all EC2 AMIs, we install: # * ec2-scripts, which provides a range of EC2ification startup scripts, diff --git a/release/tools/ec2-small.conf b/release/tools/ec2-small.conf index e2a348d6ba8f..32d02cbb79e4 100644 --- a/release/tools/ec2-small.conf +++ b/release/tools/ec2-small.conf @@ -14,6 +14,15 @@ export VMSIZE=5000m export INSTALLOPTS="WITHOUT_DEBUG_FILES=YES WITHOUT_KERNEL_SYMBOLS=YES \ WITHOUT_LIB32=YES WITHOUT_TESTS=YES WITHOUT_LLDB=YES" +# Equivalent to INSTALLOPTS for pkgbase +vm_extra_filter_base_packages() { + grep -v \ + -e '.*-dbg$' \ + -e '.*-lib32$' \ + -e '^FreeBSD-tests.*' \ + -e '^FreeBSD-lldb.*' +} + # Packages to install into the image we're creating. In addition to packages # present on all EC2 AMIs, we install: # * ec2-scripts, which provides a range of EC2ification startup scripts, diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index b3187efd6526..577abaac73cf 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -70,13 +70,41 @@ vm_copy_base() { return 0 } +vm_filter_base_packages() { + # Reads a list of all base system packages from stdin. + # Writes a list of base system packages to install to stdout. + grep -v -e '^FreeBSD-src.*' -e '^FreeBSD-kernel.*' + # There are several kernel variants available in separate packages. + # For VMs it is sufficient to install only the generic kernel. + echo "FreeBSD-kernel-man" + echo "FreeBSD-kernel-generic" + echo "FreeBSD-kernel-generic-dbg" +} + +vm_extra_filter_base_packages() { + # Prototype. When overridden, allows further filtering of base system + # packages, reading package names from stdin and writing to stdout. + cat +} + vm_install_base() { # Installs the FreeBSD userland/kernel to the virtual machine disk. - cd ${WORLDDIR} && \ - make DESTDIR=${DESTDIR} ${INSTALLOPTS} \ - installworld installkernel distribution || \ - err "\n\nCannot install the base system to ${DESTDIR}." + if [ -z "${NOPKGBASE}" ]; then + local pkg_cmd + pkg_cmd="pkg --rootdir ${DESTDIR} --repo-conf-dir ${PKGBASE_REPO_DIR} + -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes + -o INSTALL_AS_USER=yes " + $pkg_cmd update + selected=$($pkg_cmd rquery -U -r FreeBSD-base %n | \ + vm_filter_base_packages | vm_extra_filter_base_packages) + $pkg_cmd install -U -r FreeBSD-base $selected + else + cd ${WORLDDIR} && \ + make DESTDIR=${DESTDIR} ${INSTALLOPTS} \ + installworld installkernel distribution || \ + err "\n\nCannot install the base system to ${DESTDIR}." + fi # Bootstrap etcupdate(8) database. mkdir -p ${DESTDIR}/var/db/etcupdate From nobody Thu Sep 25 13:53:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXZv35nwLz68Y0K; Thu, 25 Sep 2025 13:53: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXZv34t8Mz3J2g; Thu, 25 Sep 2025 13:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758808431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+r6JZpE2egsiFm7yU89cYpxiS3L5KYjblPccOXx+LlY=; b=ibaPJD4e459+XB/njCqZT4XtlMNSLphrN1PnRJoDj0wFM1A6pzPQCKJns/H2enKgi2f0nw OopJmS8wWXNiF0vjXCJtfaxZUHXCFm6wB9U+LU47PkTNDiryq6Eh4n1U1UGQpRkQzP3ZCz YufBp93CM/C5vg9xyPjUhgKWRU6xLrhY5dW1Md3gIfUq+mDUdX9/vN5L+s7fjBqd1oALtr 4M8pqMGAgsmR8cJCv/DLNUqLVIv2PJ9qZ7cIu9Cx4lHIlT/hc2i/NXGjapmp0HuvGEgf8u 0SGOl1ZQYimL2GOvynEayVNcaEleUFh85nkW2G517UeuJTpATXJk9TNnFcNdog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758808431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+r6JZpE2egsiFm7yU89cYpxiS3L5KYjblPccOXx+LlY=; b=bv2xZlWG2k1vb7Dv/81dWHhsp7yodCqu797TiZuu+6IgahT+YD5eCFjr8duyHBOXGA7XhJ lybSvav1g6fqX5HtGlaW5aQkcpkddwNO7RSZLKfI6y9T337oA04BGDYb2RON5Pei+DnZIz oGhrocnSwpoHfnCxZ6Hd2u8NnBdbRxDsINC4Nnv09cd/up5+MHWJIcqha/Qw5BnMRZdOYl Pnid/yUD72Poijxi7BqeGq9jD57NVXrcPpkMYFdVDIB1SHK8RJuVipybYi0/ZLJvi4EDJn xQJT11ZfXmSJ4Q6fSQSW5JcRV7NzhkWskfdYRWc7hXoSRbVnlmDkKO8lI3Rczg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758808431; a=rsa-sha256; cv=none; b=TuqT6pdO+Qh6NlWlKGmUT8IirwrZlqQaDS1+OXPiE34se6f+GdW8uIo+vQ8Kvh2sf+gaJD wGtp03SumCw0H724G063S7qwV6A1pEW8YObOhtjzobG/TLYwLV9oaJqgxCEQymMsT6+9rp 0k8aztQY3QJj/MbhqR6mCtSop5VocFoQzquYTR+MmVILG7zlvTZdcfKm+HzYLFJ4j2RRVs 1pln9PhfzeZrFb81jzDFlpTz7dlrEECqgrKpk2dqvsYTPDl5YOxUBY+BDkpAlCwlxjpEW0 SZkwhIO49FVnBb5Bw4N/2afaGUHfQhn+LziJUONZqJ2JoSFhEuoVb98PKrWNDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXZv34NTxz1JLR; Thu, 25 Sep 2025 13:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PDrpaI038409; Thu, 25 Sep 2025 13:53:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PDrp5w038406; Thu, 25 Sep 2025 13:53:51 GMT (envelope-from git) Date: Thu, 25 Sep 2025 13:53:51 GMT Message-Id: <202509251353.58PDrp5w038406@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: 904ac13eed05 - main - watchdog: Update man page for new API List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 904ac13eed05fa6153393d692f8ecd45b5dabe11 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=904ac13eed05fa6153393d692f8ecd45b5dabe11 commit 904ac13eed05fa6153393d692f8ecd45b5dabe11 Author: Justin Hibbits AuthorDate: 2025-09-25 13:52:29 +0000 Commit: Justin Hibbits CommitDate: 2025-09-25 13:55:56 +0000 watchdog: Update man page for new API Update man page to account for chnage in timeout representation (sbintime_t vs power-of-2 nanoseconds), and addition of new WDIOC_CONTROL ioctl. Reviewed by: ziaee MFC after: 3 days Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D52479 --- share/man/man4/watchdog.4 | 62 +++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/share/man/man4/watchdog.4 b/share/man/man4/watchdog.4 index b74640de8469..fc2d600328dd 100644 --- a/share/man/man4/watchdog.4 +++ b/share/man/man4/watchdog.4 @@ -41,24 +41,22 @@ The device supports several optional .Xr ioctl 2 calls for configuration, and -responds to a single operational +responds to a set of operational .Xr ioctl 2 -call, -.Dv WDIOCPATPAT . -It takes a single argument which represents a timeout value specified as a -power of two nanoseconds, or-ed with a flag selecting active or passive control -of the watchdog. +calls: +.Bl -tag -width "WDIOC_CONTROL int " +.It Dv WDIOCPATPAT +Pat the watchdog. +.It Dv WDIOC_CONTROL +Enable, disable, or reset the watchdog. +.El .Pp -.Dv WD_ACTIVE -indicates that the -.Nm -will be kept from timing out from userland, for instance by the -.Xr watchdogd 8 -daemon. -.Dv WD_PASSIVE -indicates that the -.Nm -will be kept from timing out from the kernel. +The +.Dv WDIOCPATPAT +.Xr ioctl 2 +call takes a single argument which represents a timeout value specified as a +.Vt sbintime_t +of the timeout period for the watchdog. .Pp The .Dv WDIOCPATPAT @@ -77,27 +75,43 @@ none of implementations support the timeout length, all watchdogs are disabled and must be explicitly re-enabled. .Pp -To disable the watchdogs pass -.Dv WD_TO_NEVER . +To disable the watchdogs use the +.Dv WDIOC_CONTROL +.Xr ioctl 2 +call with the +.Dv WD_CTRL_DISABLE +flag. If disarming the watchdog(s) failed an error is returned. The watchdog might still be armed! +To reenable the watchdogs use the +.Dv WDIOC_CONTROL +.Xr ioctl 2 +call with the +.Dv WD_CTRL_ENABLE +flag. +Another way to pat the watchdog is with the +.Dv WDIOC_CONTROL +.Xr ioctl 2 +call passing the +.Dv WDIOC_CTRL_RESET +flag. .Pp The optional configuration .Xr ioctl 2 commands are listed here, along with the type of the parameter used. Examples of their use can be found in .Xr watchdogd 8 . -.Bl -tag -width "WDIOC_SETSOFTTIMEOUTACT int " -.It Dv WDIOC_SETTIMEOUT Fa int +.Bl -tag -width "WDIOC_GETPRETTIMEOUT sbintime_t" +.It Dv WDIOC_SETTIMEOUT Fa sbintime_t set/reset the timer -.It Dv WDIOC_GETTIMEOUT Fa int +.It Dv WDIOC_GETTIMEOUT Fa sbintime_t get total timeout -.It Dv WDIOC_GETTIMELEFT Fa int +.It Dv WDIOC_GETTIMELEFT Fa sbintime_t get time left -.It Dv WDIOC_GETPRETIMEOUT Fa int +.It Dv WDIOC_GETPRETIMEOUT Fa sbintime_t get the pre-timeout -.It Dv WDIOC_SETPRETIMEOUT Fa int +.It Dv WDIOC_SETPRETIMEOUT Fa sbintime_t set the pre-timeout .It Dv WDIOC_SETPRETIMEOUTACT Fa int Set the action when a pre-timeout occurs (see From nobody Thu Sep 25 16:57:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXfzS63Tqz68J1t; Thu, 25 Sep 2025 16:57: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXfzS4wXWz3jXL; Thu, 25 Sep 2025 16:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758819476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Qp5ZNZrxVbX/0xJMtPRJuIqCqxqJe/DD15UAIzRYjw=; b=ZOIPYc5qi4ZXvuQx/F+ypv9hIxzIaPsiUs6L4nxeGsxsVdOc20DVoyuWQVRhTT5ZEk9oFG tIyZwo01OoLMKPdT5CBUFQBwh9sjXDDQERxbEe5bMLLtXyUcBEj9OqHeCEtrS1BWRmLO1W dGO4tSziOi0exOte7YsmOpP4k4cK+amcJPZ5BcF/Wx2FbQGQ9TYcVL6y7AKzsgbeezVLug 9h+l9ipyDHIyjKhVowQgm14QL9BGRSta1NNsoqMyJ0+95g6+ryhDSgaPUfTWacZfBiiuU3 pSuLod+AguuLcO0Bb8XHU5NQxtcPjq9jNvLAhvV4bhuaSci8J13/ul7CnMeWTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758819476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Qp5ZNZrxVbX/0xJMtPRJuIqCqxqJe/DD15UAIzRYjw=; b=cvdXBjABBPePpqUVNWzGtMY2W9VP2piThLDEGghu1BMlw6o7Y8XpHxvueZiE6EgOgrXbbI BGDDw+ce4vLUZEV40tZKqgwbK0nbEEsVG5nwA5uzjMVm48PfhJkk8MsrvkMq42aEmJcBWu Dv9C3VHN9XwKtLyVtIzXBXlYCfB9g6Mcu2VzwB6apM3JWZFLr498mtJbzZ0WwhMQFhlBxJ 7MrnAhtiK13GknApzO90TbqZ7emZxnQLc2c5dhsHxuoWqzmkx6KBY2G1FCPEbrP26PTUfh D1g0conZBC5RssumlNRViVjOIBFywBvBoftDurWrno7yojUODAbIaRPcvPcXyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758819476; a=rsa-sha256; cv=none; b=yai9m1F/Ztj+J7pALYVHuBAKNTpcNdkwd7nddq/cNOLDgpJeJ89kR4RvJiNJiVZ9MWBWp/ XfI+X8JxsZ8Ueyd92dSTvUgo40Nl2sw9ABwKvJQFfe23ZX+OJ2H2XpW1IL2h/nqGfVfNEy gWe3PSoVRsNiMPiOps49v15Si+kFpM0hNZXHLlJnnBQthri5lXy2sf/9UYsei85tS3yFzA SBt6UY3MEO28UBQrM0chRVZTuBpv89USBF70AatZw1EiICRUINnxDt42ITKE19ttOP+qO4 I6/NOxDrtG+llLbEgD+K20WPTWdzt/SemYFkyUBqh4GVL+++AaEDZBq5hfsuXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXfzS4Qhwz1PXC; Thu, 25 Sep 2025 16:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PGvuIv079558; Thu, 25 Sep 2025 16:57:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PGvujh079555; Thu, 25 Sep 2025 16:57:56 GMT (envelope-from git) Date: Thu, 25 Sep 2025 16:57:56 GMT Message-Id: <202509251657.58PGvujh079555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: e05521121f05 - main - ng_tty: copy to the correct mbuf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e05521121f05a1b1e0d7c7b5fbe79f83fc303cd0 Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=e05521121f05a1b1e0d7c7b5fbe79f83fc303cd0 commit e05521121f05a1b1e0d7c7b5fbe79f83fc303cd0 Author: Ahmad Khalifa AuthorDate: 2025-09-25 16:54:28 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-25 16:55:28 +0000 ng_tty: copy to the correct mbuf memcpy should copy to the current mbuf, otherwise we're copying to the first mbuf in the chain over and over. Reported by: kevans Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52713 --- sys/netgraph/ng_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index c7d8a1b64eac..0e3230a66f66 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -427,7 +427,7 @@ ngt_rint_bypass(struct tty *tp, const void *buf, size_t len) for (mb = m; mb != NULL; mb = mb->m_next) { length = min(M_TRAILINGSPACE(mb), len - total); - memcpy(mtod(m, char *), (const char *)buf + total, length); + memcpy(mtod(mb, char *), (const char *)buf + total, length); mb->m_len = length; total += length; m->m_pkthdr.len += length; From nobody Thu Sep 25 17:48:01 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXh5F4P4sz68MQs; Thu, 25 Sep 2025 17:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXh5F3fBJz3nQC; Thu, 25 Sep 2025 17:48:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758822481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cfrjc6qFNDsD4UYPpvw4Ys9qyNQhIdZTtszgUsyhKDQ=; b=KRYfgb+BVQV/C1AZZxLLXzc+/Yu1YnqLnfhgjEsE+H8TaVeXpTfIqxEbA1JhKL8hMpqopG Y02Ky7OzMFhBdC8ATlERri71ubfhfmi3jlIMJoBXvtLzciZLVF9jLvpzAb3C3F5paXE2kp Wu73tLWJhLEbiaKN/7o0S0DnJhFY4K6pAKbZ2+X380e5Bg22VBwkAHmSbWHlTtWaqp8I8Y B/ke2e8kpik11hhnZldKPwbwRRhHami2X2a1gONfLQjCXgctAUk35o/6/c2wmtWvLjQxfa 0eZIwPTL3xfRrZhUeIzENA5renDodlU/YcnE4EXpHDI5ypmRl5JkTRtIbJ4dOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758822481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cfrjc6qFNDsD4UYPpvw4Ys9qyNQhIdZTtszgUsyhKDQ=; b=HPhyKRnQjWfGqR8g517MRlaGIditdRGZ0XsgMlGU0VEOR/FzfCN8rx+k50rQzpjDvo5Nq5 rp8TmerYIiEElcQ7XNbLgJlNqzGmK/WLDpelvAK9OdPzoFrM2kXMBeLpAMT8nsc/JuRl/P t5sYr8jD4/nxdou30ia6zc2b4k0t6HGscwRcyzgG/qDs2V5ei8PhKW9HXNtX7JW3Fewd1b e3gRlmdvtd30putHSrM4JX6/ufsoJL3sT7Siri9ZExLSDdTpa35F+wO9EBMmpuUGrzenHi wa8Z0n29smUH8OQTr/g3uf3y+2mm16qU50wH/jt/q57j2JGpr1ND7Uq2tbxWeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758822481; a=rsa-sha256; cv=none; b=LLZ7NTdU0cEWMVU8kIWAsdTkDS5w39FYlbnh3ImxRCUk8nOJmeYP6b2TLve5DR+gH0r1OV +WpyZf7/xGc0FpI0LzewxwMejPj6imxamfE2nutwGz7INo6cwOoYOPCJVs4cXCWJK1QSBs fuIGmnuO2SQApTyMw8H/GMp9LtUV0cJWKBTLYWSaLInVB1+TB/njMPqVhnS/BtRZps8H8D 3KlmN7dfJcGT/vwz9Q4JA11ShdIJnIPDQbhyfXnX/QnLEwjxUFY4tjQSOcAqEQuq/8zu+Y Dhpi90M906xOCck9Wh1umT82Ap/4dyhkYAa+Bp6NCKdUCviKB2bQKmv8kKQkFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXh5F3DN8z1QcD; Thu, 25 Sep 2025 17:48:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PHm1og073955; Thu, 25 Sep 2025 17:48:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PHm1dt073952; Thu, 25 Sep 2025 17:48:01 GMT (envelope-from git) Date: Thu, 25 Sep 2025 17:48:01 GMT Message-Id: <202509251748.58PHm1dt073952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 34ec8c9ccaa4 - main - rk_gpio: Fix register read/write on rk3568 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34ec8c9ccaa473d2d0c177a92c041bb8fdb083db Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=34ec8c9ccaa473d2d0c177a92c041bb8fdb083db commit 34ec8c9ccaa473d2d0c177a92c041bb8fdb083db Author: Evgenii Ivanov AuthorDate: 2025-09-25 17:15:01 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-25 17:26:55 +0000 rk_gpio: Fix register read/write on rk3568 Not all registers have a write mask with high/low register on rk3568. Reviewed by: vexeduxr MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D52512 --- sys/arm64/rockchip/rk_gpio.c | 99 ++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 45 deletions(-) diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 61614f532634..7358239a7c35 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -90,6 +90,11 @@ struct rk_pin_irqsrc { uint32_t mode; }; +struct rk_gpio_reg { + uint8_t single; + uint8_t offset; +}; + struct rk_gpio_softc { device_t sc_dev; device_t sc_busdev; @@ -103,7 +108,7 @@ struct rk_gpio_softc { uint32_t swporta_ddr; uint32_t version; struct pin_cached pin_cached[RK_GPIO_MAX_PINS]; - uint8_t regs[RK_GPIO_REGNUM]; + struct rk_gpio_reg regs[RK_GPIO_REGNUM]; void *ihandle; struct rk_pin_irqsrc isrcs[RK_GPIO_MAX_PINS]; }; @@ -138,14 +143,15 @@ static int rk_gpio_detach(device_t dev); static int rk_gpio_read_bit(struct rk_gpio_softc *sc, int reg, int bit) { - int offset = sc->regs[reg]; + struct rk_gpio_reg *rk_reg = &sc->regs[reg]; uint32_t value; - if (sc->version == RK_GPIO_TYPE_V1) { - value = RK_GPIO_READ(sc, offset); + if (rk_reg->single) { + value = RK_GPIO_READ(sc, rk_reg->offset); value >>= bit; } else { - value = RK_GPIO_READ(sc, bit > 15 ? offset + 4 : offset); + value = RK_GPIO_READ(sc, bit > 15 ? + rk_reg->offset + 4 : rk_reg->offset); value >>= (bit % 16); } return (value & 1); @@ -154,50 +160,53 @@ rk_gpio_read_bit(struct rk_gpio_softc *sc, int reg, int bit) static void rk_gpio_write_bit(struct rk_gpio_softc *sc, int reg, int bit, int data) { - int offset = sc->regs[reg]; + struct rk_gpio_reg *rk_reg = &sc->regs[reg]; uint32_t value; - if (sc->version == RK_GPIO_TYPE_V1) { - value = RK_GPIO_READ(sc, offset); + if (rk_reg->single) { + value = RK_GPIO_READ(sc, rk_reg->offset); if (data) value |= (1 << bit); else value &= ~(1 << bit); - RK_GPIO_WRITE(sc, offset, value); + RK_GPIO_WRITE(sc, rk_reg->offset, value); } else { if (data) value = (1 << (bit % 16)); else value = 0; value |= (1 << ((bit % 16) + 16)); - RK_GPIO_WRITE(sc, bit > 15 ? offset + 4 : offset, value); + RK_GPIO_WRITE(sc, bit > 15 ? + rk_reg->offset + 4 : rk_reg->offset, value); } } static uint32_t rk_gpio_read_4(struct rk_gpio_softc *sc, int reg) { - int offset = sc->regs[reg]; + struct rk_gpio_reg *rk_reg = &sc->regs[reg]; uint32_t value; - if (sc->version == RK_GPIO_TYPE_V1) - value = RK_GPIO_READ(sc, offset); + if (rk_reg->single) + value = RK_GPIO_READ(sc, rk_reg->offset); else - value = (RK_GPIO_READ(sc, offset) & 0xffff) | - (RK_GPIO_READ(sc, offset + 4) << 16); + value = (RK_GPIO_READ(sc, rk_reg->offset) & 0xffff) | + (RK_GPIO_READ(sc, rk_reg->offset + 4) << 16); return (value); } static void rk_gpio_write_4(struct rk_gpio_softc *sc, int reg, uint32_t value) { - int offset = sc->regs[reg]; + struct rk_gpio_reg *rk_reg = &sc->regs[reg]; - if (sc->version == RK_GPIO_TYPE_V1) - RK_GPIO_WRITE(sc, offset, value); + if (rk_reg->single) + RK_GPIO_WRITE(sc, rk_reg->offset, value); else { - RK_GPIO_WRITE(sc, offset, (value & 0xffff) | 0xffff0000); - RK_GPIO_WRITE(sc, offset + 4, (value >> 16) | 0xffff0000); + RK_GPIO_WRITE(sc, rk_reg->offset, + (value & 0xffff) | 0xffff0000); + RK_GPIO_WRITE(sc, rk_reg->offset + 4, + (value >> 16) | 0xffff0000); } } @@ -313,31 +322,31 @@ rk_gpio_attach(device_t dev) switch (sc->version) { case RK_GPIO_TYPE_V1: - sc->regs[RK_GPIO_SWPORTA_DR] = 0x00; - sc->regs[RK_GPIO_SWPORTA_DDR] = 0x04; - sc->regs[RK_GPIO_INTEN] = 0x30; - sc->regs[RK_GPIO_INTMASK] = 0x34; - sc->regs[RK_GPIO_INTTYPE_LEVEL] = 0x38; - sc->regs[RK_GPIO_INT_POLARITY] = 0x3c; - sc->regs[RK_GPIO_INT_STATUS] = 0x40; - sc->regs[RK_GPIO_INT_RAWSTATUS] = 0x44; - sc->regs[RK_GPIO_DEBOUNCE] = 0x48; - sc->regs[RK_GPIO_PORTA_EOI] = 0x4c; - sc->regs[RK_GPIO_EXT_PORTA] = 0x50; + sc->regs[RK_GPIO_SWPORTA_DR] = (struct rk_gpio_reg){ 1, 0x00 }; + sc->regs[RK_GPIO_SWPORTA_DDR] = (struct rk_gpio_reg){ 1, 0x04 }; + sc->regs[RK_GPIO_INTEN] = (struct rk_gpio_reg){ 1, 0x30 }; + sc->regs[RK_GPIO_INTMASK] = (struct rk_gpio_reg){ 1, 0x34 }; + sc->regs[RK_GPIO_INTTYPE_LEVEL] = (struct rk_gpio_reg){ 1, 0x38 }; + sc->regs[RK_GPIO_INT_POLARITY] = (struct rk_gpio_reg){ 1, 0x3c }; + sc->regs[RK_GPIO_INT_STATUS] = (struct rk_gpio_reg){ 1, 0x40 }; + sc->regs[RK_GPIO_INT_RAWSTATUS] = (struct rk_gpio_reg){ 1, 0x44 }; + sc->regs[RK_GPIO_DEBOUNCE] = (struct rk_gpio_reg){ 1, 0x48 }; + sc->regs[RK_GPIO_PORTA_EOI] = (struct rk_gpio_reg){ 1, 0x4c }; + sc->regs[RK_GPIO_EXT_PORTA] = (struct rk_gpio_reg){ 1, 0x50 }; break; case RK_GPIO_TYPE_V2: - sc->regs[RK_GPIO_SWPORTA_DR] = 0x00; - sc->regs[RK_GPIO_SWPORTA_DDR] = 0x08; - sc->regs[RK_GPIO_INTEN] = 0x10; - sc->regs[RK_GPIO_INTMASK] = 0x18; - sc->regs[RK_GPIO_INTTYPE_LEVEL] = 0x20; - sc->regs[RK_GPIO_INTTYPE_BOTH] = 0x30; - sc->regs[RK_GPIO_INT_POLARITY] = 0x28; - sc->regs[RK_GPIO_INT_STATUS] = 0x50; - sc->regs[RK_GPIO_INT_RAWSTATUS] = 0x58; - sc->regs[RK_GPIO_DEBOUNCE] = 0x38; - sc->regs[RK_GPIO_PORTA_EOI] = 0x60; - sc->regs[RK_GPIO_EXT_PORTA] = 0x70; + sc->regs[RK_GPIO_SWPORTA_DR] = (struct rk_gpio_reg){ 0, 0x00 }; + sc->regs[RK_GPIO_SWPORTA_DDR] = (struct rk_gpio_reg){ 0, 0x08 }; + sc->regs[RK_GPIO_INTEN] = (struct rk_gpio_reg){ 0, 0x10 }; + sc->regs[RK_GPIO_INTMASK] = (struct rk_gpio_reg){ 0, 0x18 }; + sc->regs[RK_GPIO_INTTYPE_LEVEL] = (struct rk_gpio_reg){ 0, 0x20 }; + sc->regs[RK_GPIO_INTTYPE_BOTH] = (struct rk_gpio_reg){ 0, 0x30 }; + sc->regs[RK_GPIO_INT_POLARITY] = (struct rk_gpio_reg){ 0, 0x28 }; + sc->regs[RK_GPIO_INT_STATUS] = (struct rk_gpio_reg){ 1, 0x50 }; + sc->regs[RK_GPIO_INT_RAWSTATUS] = (struct rk_gpio_reg){ 1, 0x58 }; + sc->regs[RK_GPIO_DEBOUNCE] = (struct rk_gpio_reg){ 0, 0x38 }; + sc->regs[RK_GPIO_PORTA_EOI] = (struct rk_gpio_reg){ 0, 0x60 }; + sc->regs[RK_GPIO_EXT_PORTA] = (struct rk_gpio_reg){ 1, 0x70 }; break; default: device_printf(dev, "Unknown gpio version %08x\n", sc->version); @@ -394,7 +403,7 @@ rk_gpio_detach(device_t dev) mtx_destroy(&sc->sc_mtx); clk_disable(sc->clk); - return(0); + return (0); } static device_t @@ -471,7 +480,7 @@ rk_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) { if (pin >= RK_GPIO_MAX_PINS) - return EINVAL; + return (EINVAL); *caps = RK_GPIO_DEFAULT_CAPS; return (0); From nobody Thu Sep 25 17:48:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXh5G670Cz68MMl; Thu, 25 Sep 2025 17:48: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXh5G4q5Yz3nMG; Thu, 25 Sep 2025 17:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758822482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LvoxV7zAUBoQDaUD4YHA7Kfhzx99qZIN5QXQLySpmrw=; b=wKs4VEQX9V4v/Rdq59mYTp6W7mWYxkfg+NFNNBEzWXfnlL6BBw3zfvHpzCKiQRHL0z+UdP tBaTdiKsi58OGqG7PLiwscNX6wZtzPMhuxpMGRiBHfaLQiPvSbaCb0BBfQJqI4xYfu/n/D +Hjmhzr40Wl33Hzz87bJZBBzQeKy/9b6xSPAmi6TZ4HCuefpW+f4PyC6rrPnfn0FDnOTHk 51D0XyDN7cXAgOJcnutvVyxd9p2sU9AacOWNVNfhMR0es+doH9ybvq8U4nXq/cyplI2wnk lkHMtyV9wJ/7UMpBlYeh3vMMMthXts2QGN3yxVO2IKDRas+hxUmThpwYFiuJSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758822482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LvoxV7zAUBoQDaUD4YHA7Kfhzx99qZIN5QXQLySpmrw=; b=tBVgs6NRqAXeJ87Aj5Fm2vb6SAUAe+L/LysIexTIbnCCxiJ2v5k/06ncv652+T+Aeqb5xP 50/w/EaPr7M8q8GwUj6vf9SpSams6JQek189nmLe993oJfe//8TrWEFXStVJjXFsVjmLUJ 6ZxNTMtxQD4AFmWIujgg2NiN1pdnBahM/jgsuOwTzRT4KYIWaaVDwqCjSzJE/QnAC2qnqw pauJanHGiV9NBuCxeDNhZc+C8B/MzC6lhqUHks4Jhh5w60k8jvdXtSH7KZ4QjfVgN68Vbd rAJfTOrvsoQ/2paVWFKPba6y/pcTfESIp/ce54h/sX6twQjtnClEXC4F1q9vOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758822482; a=rsa-sha256; cv=none; b=g4DTyCCyvyyivPdwxGN4RVIG9z3zfwHIDe98dG+ifI0aizN78ViIohRN7TAs+ZiO9Tn7Pp MHDZf2rnWwOL9EdwIYUYzBRVZ4jGIHNSv71G+58yx5dlGayv6uTmbnWPANKix4SV0MlYB0 UipTADdH4B+fKEvDC2diUUpzcq+GPiuxhkZJ3b/P424bjz7Y3mt/pBKc612avXx/aeb4Sl Ymm8XvjmqtKkNLqwgigmCamrWbdChAdUpC+Q2iTw8ciJqM4A7JUkOm+WKZCSjNd+1tLjZw G7H9k+AsRTH0kcEzyZjToyZPKL4XVX3NGI10PzkoZ9uffbjOvNDUlCy+y5SgUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXh5G4Hq2z1Qm1; Thu, 25 Sep 2025 17:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PHm2fb073992; Thu, 25 Sep 2025 17:48:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PHm2dR073989; Thu, 25 Sep 2025 17:48:02 GMT (envelope-from git) Date: Thu, 25 Sep 2025 17:48:02 GMT Message-Id: <202509251748.58PHm2dR073989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: ace98a8fb8fe - main - rk_gpio: Enable gpio allocation via fdt List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ace98a8fb8fe18d47ccbb55619a9ffd4ac10f98c Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=ace98a8fb8fe18d47ccbb55619a9ffd4ac10f98c commit ace98a8fb8fe18d47ccbb55619a9ffd4ac10f98c Author: Evgenii Ivanov AuthorDate: 2025-09-25 17:15:08 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-25 17:28:37 +0000 rk_gpio: Enable gpio allocation via fdt The code is based on bcm2835_gpio.c. This enables allocating gpio interrupts via interrupts property in fdt. Reviewed by: vexeduxr MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D52513 --- sys/arm64/rockchip/rk_gpio.c | 98 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 80 insertions(+), 18 deletions(-) diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 7358239a7c35..145d9769f35f 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -663,46 +663,108 @@ rk_gpio_get_node(device_t bus, device_t dev) } static int -rk_pic_map_intr(device_t dev, struct intr_map_data *data, - struct intr_irqsrc **isrcp) +rk_gpio_pic_map_fdt(struct rk_gpio_softc *sc, + struct intr_map_data_fdt *daf, + u_int *irqp, uint32_t *modep) { - struct rk_gpio_softc *sc = device_get_softc(dev); - struct intr_map_data_gpio *gdata; uint32_t irq; + uint32_t mode; - if (data->type != INTR_MAP_DATA_GPIO) { - device_printf(dev, "Wrong type\n"); - return (ENOTSUP); - } - gdata = (struct intr_map_data_gpio *)data; - irq = gdata->gpio_pin_num; + if (daf->ncells != 2) + return (EINVAL); + + irq = daf->cells[0]; + if (irq >= RK_GPIO_MAX_PINS) + return (EINVAL); + + /* Only reasonable modes are supported. */ + if (daf->cells[1] == 1) + mode = GPIO_INTR_EDGE_RISING; + else if (daf->cells[1] == 2) + mode = GPIO_INTR_EDGE_FALLING; + else if (daf->cells[1] == 3) + mode = GPIO_INTR_EDGE_BOTH; + else if (daf->cells[1] == 4) + mode = GPIO_INTR_LEVEL_HIGH; + else if (daf->cells[1] == 8) + mode = GPIO_INTR_LEVEL_LOW; + else + return (EINVAL); + + *irqp = irq; + if (modep != NULL) + *modep = mode; + return (0); +} + +static int +rk_gpio_pic_map_gpio(struct rk_gpio_softc *sc, + struct intr_map_data_gpio *dag, + u_int *irqp, uint32_t *modep) +{ + uint32_t irq; + irq = dag->gpio_pin_num; if (irq >= RK_GPIO_MAX_PINS) { - device_printf(dev, "Invalid interrupt %u\n", irq); + device_printf(sc->sc_dev, "Invalid interrupt %u\n", + irq); return (EINVAL); } - *isrcp = RK_GPIO_ISRC(sc, irq); + + *irqp = irq; + if (modep != NULL) + *modep = dag->gpio_intr_mode; return (0); } +static int +rk_gpio_pic_map(struct rk_gpio_softc *sc, struct intr_map_data *data, + u_int *irqp, uint32_t *modep) +{ + switch (data->type) { + case INTR_MAP_DATA_FDT: + return (rk_gpio_pic_map_fdt(sc, + (struct intr_map_data_fdt *)data, irqp, modep)); + case INTR_MAP_DATA_GPIO: + return (rk_gpio_pic_map_gpio(sc, + (struct intr_map_data_gpio *)data, irqp, modep)); + default: + device_printf(sc->sc_dev, "Wrong type\n"); + return (ENOTSUP); + } +} + +static int +rk_pic_map_intr(device_t dev, struct intr_map_data *data, + struct intr_irqsrc **isrcp) +{ + int error; + struct rk_gpio_softc *sc = device_get_softc(dev); + uint32_t irq; + + error = rk_gpio_pic_map(sc, data, &irq, NULL); + if (error == 0) + *isrcp = RK_GPIO_ISRC(sc, irq); + return (error); +} + static int rk_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc, struct resource *res, struct intr_map_data *data) { struct rk_gpio_softc *sc = device_get_softc(dev); struct rk_pin_irqsrc *rkisrc = (struct rk_pin_irqsrc *)isrc; - struct intr_map_data_gpio *gdata; uint32_t mode; - uint8_t pin; + uint32_t pin; if (!data) { device_printf(dev, "No map data\n"); return (ENOTSUP); } - gdata = (struct intr_map_data_gpio *)data; - mode = gdata->gpio_intr_mode; - pin = gdata->gpio_pin_num; - if (rkisrc->irq != gdata->gpio_pin_num) { + if (rk_gpio_pic_map(sc, data, &pin, &mode) != 0) + return (EINVAL); + + if (rkisrc->irq != pin) { device_printf(dev, "Interrupts don't match\n"); return (EINVAL); } From nobody Thu Sep 25 18:24:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXhvd2DN0z68Q2F; Thu, 25 Sep 2025 18: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXhvc741nz3sNq; Thu, 25 Sep 2025 18: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=1758824685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ddfwANhMRwsSiviZyMM7m5du2fx81oupfxd4iXoce+4=; b=bE0fmNdb/0ScmwCWcgSzxBSNXMYvLh+SDtqeBjj2EpFSzC428FxbjvqrdK2Q11jvEFc6RL lsLyHLs7mpuTweZ6f8J507OERbC3IOL2xQ2cVO0B4sGBynVQRf8JlFjizrZ3QpT3t3EI6o sWjwtYM8GqmFXNfVzsg4bvU1AzSyoGW6i+DMrJ6x+kX9vHckUfCX4solgKe3Ygs/Jcj2aG rSR9cs25tV9PUuI+D91TAzG3Yk2r84AQ8aheBTZ721JV1jYd+ke71/oXGjjfY8FgC1My97 b99m+8yUbSItd23APXyACEKU6TTLJjIlWtPBBb43g7k3upYLZeKpLwK3pK7pOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758824685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ddfwANhMRwsSiviZyMM7m5du2fx81oupfxd4iXoce+4=; b=fs5eooGoypue4ibUbizEB/OtfrktQ5NAzyKLNjRn81Bx4tUT/KCsTkdfL6sb9q7cvmxvE4 4XijkgsQHomVlU9AQwvmNwHXL93EHH2YrW/odv6LY+7ysQ4q+8skcEwELgB6mX0XiUX79K PfboNcl+vBj9/3g9kBSDiKXwKt9FF2U90l+ySC+6qSQnj/e2msZPnY2Lxd1D0++tJa5GXC KGZpALGOV1dVTdOEyI395+6+5EJvp9VYzB4IQKJuJIVzKdIf4n6Hu1tnkYWC9TEKKqDh7q EIeu8YxHBWoDb0rTLpxcDAZXHugZ+ZwTtDqWkZhLgDA9xYBK9oRN4wBlr9lMFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758824685; a=rsa-sha256; cv=none; b=eWZ193Ho5GXqwnBk8T9IEMUHd2MKq8F0qbDRfagDB3p88ySsoOA86ABBZrYlY6fpJHFI5/ e7CuQSzCrglKhi1p3zIcnbV2UP+BQpLxVHdHtCqkn/jRur6Bn8Pj/8hdVGDtXGTZLIcac9 tS4FnE8s9PkCfRTUhFZm8nnPDWhWtmCpoy+JHvHQiRQfLcZIsevEFMwQG+wp95evLnXHX4 GtYq4J0H+1byKiHaqZb+dZX1a+CNPw20sEy19K36k2Vx88GfAlMZcPABPnM7tcXPHviWd4 CCqWsLUXDfg873S7neiTRoIguB4oalFxNGcyoUvMaGK5H8gVjnrz16h8PXgLbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXhvc6DD3z1RHB; Thu, 25 Sep 2025 18:24:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PIOidv047574; Thu, 25 Sep 2025 18:24:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PIOiEa047571; Thu, 25 Sep 2025 18:24:44 GMT (envelope-from git) Date: Thu, 25 Sep 2025 18:24:44 GMT Message-Id: <202509251824.58PIOiEa047571@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: 40417930f6ba - main - tcp: whitespace cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40417930f6ba50f61990fb995dd071c6fd42d080 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=40417930f6ba50f61990fb995dd071c6fd42d080 commit 40417930f6ba50f61990fb995dd071c6fd42d080 Author: Michael Tuexen AuthorDate: 2025-09-24 08:51:06 +0000 Commit: Michael Tuexen CommitDate: 2025-09-25 01:39:27 +0000 tcp: whitespace cleanup No functional change intended. MFC after: 3 days Sponsored by: Netflix, Inc. --- sys/netinet/tcp_syncache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_syncache.h b/sys/netinet/tcp_syncache.h index 55e062e35a54..a336571f12c9 100644 --- a/sys/netinet/tcp_syncache.h +++ b/sys/netinet/tcp_syncache.h @@ -50,7 +50,7 @@ int syncache_pcblist(struct sysctl_req *); struct syncache { TAILQ_ENTRY(syncache) sc_hash; - struct in_conninfo sc_inc; /* addresses */ + struct in_conninfo sc_inc; /* addresses */ int sc_rxttime; /* retransmit time */ u_int16_t sc_rxmits; /* retransmit counter */ u_int16_t sc_port; /* remote UDP encaps port */ @@ -59,7 +59,7 @@ struct syncache { u_int32_t sc_flowlabel; /* IPv6 flowlabel */ tcp_seq sc_irs; /* seq from peer */ tcp_seq sc_iss; /* our ISS */ - struct mbuf *sc_ipopts; /* source route */ + struct mbuf *sc_ipopts; /* source route */ u_int16_t sc_peer_mss; /* peer's MSS */ u_int16_t sc_wnd; /* advertised window */ u_int8_t sc_ip_ttl; /* TTL / Hop Limit */ From nobody Thu Sep 25 18:24:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXhvf1qwfz68Q2H; Thu, 25 Sep 2025 18: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXhvf0nTwz3sNr; Thu, 25 Sep 2025 18: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=1758824686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MUf+Gd5yRG71BV/fIk8QWiL0FWKJBNQvJCtVKeYTkx0=; b=ezb3D6ePExaKancHd/bd7troHG5diVOUWKIy3wabhOZKuBC28t2Na6TBrbKjU0UypEJIRt CHW3ZJeeszL6LbdCfTk5cltN34ANakNUpeOi2n+XkDIfoXL3qO4C3VR592GlOaO2Evsd7V hgAk4+0/HYTh+HN553HgiecqqgSPhUR1aj255j0ROI03uI7YY+vdhP9ycfGvxzv2VXh6s6 2BRaGeFQ6dX/702x0IgLuiRP9c5G6/nU/eNdTEGwH0i336aWMj9DS7qQES0dN1ijgtsouI lPuPW7cI2Mxn46xXu/Qg/VO5JH7KvwaQoCCx44orERQq1o6D2fS13BVkz56J/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758824686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MUf+Gd5yRG71BV/fIk8QWiL0FWKJBNQvJCtVKeYTkx0=; b=aSPqHH35MrAFyxM4iV6LLjqkgI9dXc3ik/ASCZLYjiSoLRCxUglq1UkZgcaVlGGc+8IZMq xihpQMteihA1qw+NJnw4SHHt/vxoRnu0eVBBJHrddTKy2+iLZ3Tb21aqCSGSP7gl4juKP6 Mhv9dXQdZptmeGCwZWeUk+uhJPlwYSnE99W3v3YQXxbuij9McCtRVC0ao/eJP1HI2sutt3 5bePhf3jnEq7044ponP/7l6UI7hQvVZqlMd4qLsUs9v/3cG6+bGfWWF4VMNMuUKrsAE42w hNSvRMR8p/uGbss8Oan6u2w9gh91TaZ6JlEyHHdIAH1G5/PcD7KnpZL7KeFlUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758824686; a=rsa-sha256; cv=none; b=Qf2734oszPBRC+n7IDePxFSY8LGqUjfKxsiVwEvzNgypofQfxikUzyppce9p59vRVy638d D5ptvKc/FpWx4GM5dK5ET67pW4V0No+aN2LSJeeHEuW3wJfocgbUj/XaRShZUCyTJwf57A 5k83N7Kov/zDbAisSvkiTFqGDG8osiruQRRPow0sK8G1IHdaqu3iFryrE7vK2CLqy13Nk4 RGkXcCpgIZOh91h+4bRUGxtnjFrHaJEneQmp/IXcPaanC+r0jJgy9LKGrUbtlTXbt1D2zt 3e9LcUfYYyYjP0KRtipGXU69R+qU8Wjkxtbdm5Hm+VdNfZp5XkpG86DfAKcJhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXhvd6ZGFz1RlB; Thu, 25 Sep 2025 18:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PIOjvM047611; Thu, 25 Sep 2025 18:24:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PIOjDq047609; Thu, 25 Sep 2025 18:24:45 GMT (envelope-from git) Date: Thu, 25 Sep 2025 18:24:45 GMT Message-Id: <202509251824.58PIOjDq047609@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: db37256ce543 - main - tcp: refactor tcp_send_challenge_ack() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db37256ce5437e6c667a537afff0fd9f59576514 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=db37256ce5437e6c667a537afff0fd9f59576514 commit db37256ce5437e6c667a537afff0fd9f59576514 Author: Michael Tuexen AuthorDate: 2025-09-25 01:40:33 +0000 Commit: Michael Tuexen CommitDate: 2025-09-25 01:40:33 +0000 tcp: refactor tcp_send_challenge_ack() Refactor tcp_send_challenge_ack() such that the logic checking whether a challenge ACK is sent or not is available in the separate function tcp_challenge_ack_check(). This new function will also be used for sending challenge ACKs in the SYN-cache code, which will be added in upcoming commits. No functional change intended. Reviewed by: cc, Nick Banks, Peter Lei MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52717 --- sys/netinet/tcp_subr.c | 42 +++++++++++++++++++++++++++--------------- sys/netinet/tcp_var.h | 1 + 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index cc83a21773a8..c817c79881d6 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2148,14 +2148,16 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, } /* - * Send a challenge ack (no data, no SACK option), but not more than - * V_tcp_ack_war_cnt per V_tcp_ack_war_time_window (per TCP connection). + * Check that no more than V_tcp_ack_war_cnt per V_tcp_ack_war_time_window + * are sent. *epoch_end is the end of the current epoch and is updated, if the + * current epoch ended in the past. *ack_cnt is the counter used during the + * current epoch. It might be reset and incremented. + * The function returns true if a challenge ACK should be sent. */ -void -tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) +bool +tcp_challenge_ack_check(sbintime_t *epoch_end, uint32_t *ack_cnt) { sbintime_t now; - bool send_challenge_ack; /* * The sending of a challenge ACK could be triggered by a blind attacker @@ -2164,29 +2166,39 @@ tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) * would have guessed wrongly. */ (void)badport_bandlim(BANDLIM_TCP_RST); + if (V_tcp_ack_war_time_window == 0 || V_tcp_ack_war_cnt == 0) { /* ACK war protection is disabled. */ - send_challenge_ack = true; + return (true); } else { /* Start new epoch, if the previous one is already over. */ now = getsbinuptime(); - if (tp->t_challenge_ack_end < now) { - tp->t_challenge_ack_cnt = 0; - tp->t_challenge_ack_end = now + - V_tcp_ack_war_time_window * SBT_1MS; + if (*epoch_end < now) { + *ack_cnt = 0; + *epoch_end = now + V_tcp_ack_war_time_window * SBT_1MS; } /* * Send a challenge ACK, if less than tcp_ack_war_cnt have been * sent in the current epoch. */ - if (tp->t_challenge_ack_cnt < V_tcp_ack_war_cnt) { - send_challenge_ack = true; - tp->t_challenge_ack_cnt++; + if (*ack_cnt < V_tcp_ack_war_cnt) { + (*ack_cnt)++; + return (true); } else { - send_challenge_ack = false; + return (false); } } - if (send_challenge_ack) { +} + +/* + * Send a challenge ack (no data, no SACK option), but not more than + * V_tcp_ack_war_cnt per V_tcp_ack_war_time_window (per TCP connection). + */ +void +tcp_send_challenge_ack(struct tcpcb *tp, struct tcphdr *th, struct mbuf *m) +{ + if (tcp_challenge_ack_check(&tp->t_challenge_ack_end, + &tp->t_challenge_ack_cnt)) { tcp_respond(tp, mtod(m, void *), th, m, tp->rcv_nxt, tp->snd_nxt, TH_ACK); tp->last_ack_sent = tp->rcv_nxt; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 53856bae9a66..c3be95c80798 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1462,6 +1462,7 @@ int tcp_default_output(struct tcpcb *); void tcp_state_change(struct tcpcb *, int); void tcp_respond(struct tcpcb *, void *, struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, uint16_t); +bool tcp_challenge_ack_check(sbintime_t *, uint32_t *); void tcp_send_challenge_ack(struct tcpcb *, struct tcphdr *, struct mbuf *); bool tcp_twcheck(struct inpcb *, struct tcpopt *, struct tcphdr *, struct mbuf *, int); From nobody Thu Sep 25 18:25:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXhwR0T89z68QK4; Thu, 25 Sep 2025 18:25: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXhwQ5Sd4z3tJS; Thu, 25 Sep 2025 18:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758824726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWj6ZATwMV6jOCAcUcmSIWCle+oOZf5ZK4YmaK/9F3k=; b=hsWITVuJugNFyoc9Qgz6hH48edykwzbH92VMLziRL/5tWHxcGPBaNzDkNv93pizeKE7wOX ZN/SeRRDKnJ19WwtaERHBkurLKnRvlrBntuPp4mEW9r/VYYM8Xr15rWbpCzqybtWULNhkT Vq1lgRy06yX2ksSeQanIipI60r2dmva3CUZK3lFEbhHw5Q9jFRNq4m0pF79KMgtxWrAvq2 gCB1FesJDcAk9WUAgoQ3XsZoiHF3t1Y5dh/45P/Xp98KuubC+UxfXcrxfOt/r4jLnwbKxF 0pQboTC4Nn1vb1/kgI3dxpkboelsORjVJ11xzbTwGSgakanggbO/dvBTOKtG+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758824726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KWj6ZATwMV6jOCAcUcmSIWCle+oOZf5ZK4YmaK/9F3k=; b=KL0UvgfTmxb8Doba58xUFlkprxItW3bSlzL6jwHyI3evgxnZA0P4tXI5kJJ3jf9zXJOeAX C8X6UTFWy6bR3nRhFaj0PDo/PzLWDeVxuGvkFOhEesmsSA3coRyXlcVzMraay2nkmRcw3z U/bp9/7HW42XrXaztFo3Kz2ebxyEI/mAB/7QhwbRPDpI9OA6uEAnJReWDVh91nY8C/dXBT ZDfRM9PDF9T3cRFCjwHWo7evvdEkoks48Xxskznj9fA472N5AAy2W0s26pMoH+bSKufA/+ ZAzfFKfJ8T+KGwLzYev3EZcUH8E/jlOsMOVbw4zHbY1ZGP3Htyni9mrqR7jKSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758824726; a=rsa-sha256; cv=none; b=tPrH/a+2xUTg5qWsUdKVcFTDVOtiMiDi7UqP27PRIo0oL280q8V9hGPzgPLmapCPbGYA9+ VUg2SzZ6dTLIG5hpxgWcgfTPwraC1H/mrW2L2aASUbw5BV0Z4kHKkg9ZPF2V5UkYs5sgtU IAjEKIt9CfxJ98ZY1pYfg6KXxHVJ2YbcvMH4pUxrTYZa0nQ6LEs792agoXTQFznW94/FxX Z/9pajXvHIfQ4JWZnZsEWHV1vpmY4UQaOkgyLS1SwtAxhLthkcDm0NVHhTXfp2UJ8XaE3x Hcec7LqiHTQ55uHLYOVjnBdx5ViTZas162J3kLnDuaeHEkjV6VosqLv7UCBoUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXhwQ52xGz1S51; Thu, 25 Sep 2025 18:25:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PIPQH0047963; Thu, 25 Sep 2025 18:25:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PIPQU0047960; Thu, 25 Sep 2025 18:25:26 GMT (envelope-from git) Date: Thu, 25 Sep 2025 18:25:26 GMT Message-Id: <202509251825.58PIPQU0047960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 31d00ac6c9ec - main - packages: Add a base-jail set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31d00ac6c9ec342312ca4075d2e6dc0a68b5263d Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=31d00ac6c9ec342312ca4075d2e6dc0a68b5263d commit 31d00ac6c9ec342312ca4075d2e6dc0a68b5263d Author: Lexi Winter AuthorDate: 2025-09-25 17:31:38 +0000 Commit: Lexi Winter CommitDate: 2025-09-25 18:25:09 +0000 packages: Add a base-jail set This is base, but without packages which are not generally useful in jails. The following packages are excluded: * Support for hardware not present in a jail: acpi, apm, bluetooth, ccdconfig, console-tools, cxgbe-tools, efi-tools, fd, hostapd, mlx-tools, nvme-tools, wpa * Kernel facilities that don't work in a jail: dtrace, dwatch, ggate, hast, iscsi, libcuse, smbutils All library packages are included in base-jail, even if they might not work, because the user may have executables linked with them. While here, remove the set-minimal dependency from set-devel, since this will cause unnecessary packages to be installed in jails. This means users will need to install set-devel in addition to their base set (minimal or base), which bsdinstall already handles correctly. Add a license to all the set UCL files, so people can redistribute them. MFC after: 6 hours Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D52719 --- release/packages/sets/base-dbg.ucl | 18 +++++++++++++ release/packages/sets/base-jail-dbg.ucl | 34 ++++++++++++++++++++++++ release/packages/sets/base-jail.ucl | 37 +++++++++++++++++++++++++++ release/packages/sets/base.ucl | 18 +++++++++++++ release/packages/sets/devel-dbg.ucl | 25 +++++++++++++----- release/packages/sets/devel.ucl | 25 +++++++++++++----- release/packages/sets/kernels-dbg.ucl | 18 +++++++++++++ release/packages/sets/kernels.ucl | 18 +++++++++++++ release/packages/sets/lib32-dbg.ucl | 18 +++++++++++++ release/packages/sets/lib32.ucl | 18 +++++++++++++ release/packages/sets/minimal-dbg.ucl | 18 +++++++++++++ release/packages/sets/minimal-jail-dbg.ucl | 18 +++++++++++++ release/packages/sets/minimal-jail.ucl | 18 +++++++++++++ release/packages/sets/minimal.ucl | 18 +++++++++++++ release/packages/sets/src.ucl | 18 +++++++++++++ release/packages/sets/tests.ucl | 18 +++++++++++++ release/packages/ucl/acct-all.ucl | 4 +++ release/packages/ucl/atf-all.ucl | 4 +++ release/packages/ucl/audit-all.ucl | 4 +++ release/packages/ucl/autofs-all.ucl | 4 +++ release/packages/ucl/bhyve-all.ucl | 4 +++ release/packages/ucl/blocklist-all.ucl | 4 +++ release/packages/ucl/bsdconfig-all.ucl | 4 +++ release/packages/ucl/bsdinstall-all.ucl | 4 +++ release/packages/ucl/bsnmp-all.ucl | 4 +++ release/packages/ucl/csh-all.ucl | 4 +++ release/packages/ucl/dma-all.ucl | 4 +++ release/packages/ucl/ee-all.ucl | 4 +++ release/packages/ucl/examples-all.ucl | 4 +++ release/packages/ucl/ftp-all.ucl | 4 +++ release/packages/ucl/games-all.ucl | 4 +++ release/packages/ucl/gssd-all.ucl | 4 +++ release/packages/ucl/inetd-all.ucl | 4 +++ release/packages/ucl/ipf-all.ucl | 4 +++ release/packages/ucl/ipfw-all.ucl | 4 +++ release/packages/ucl/jail-all.ucl | 4 +++ release/packages/ucl/kerberos-all.ucl | 4 +++ release/packages/ucl/kerberos-kdc-all.ucl | 4 +++ release/packages/ucl/kyua-all.ucl | 4 +++ release/packages/ucl/lib9p-all.ucl | 4 +++ release/packages/ucl/libarchive-all.ucl | 4 +++ release/packages/ucl/libbegemot-all.ucl | 4 +++ release/packages/ucl/libblocksruntime-all.ucl | 4 +++ release/packages/ucl/libbsdstat-all.ucl | 4 +++ release/packages/ucl/libbsm-all.ucl | 4 +++ release/packages/ucl/libcasper-all.ucl | 4 +++ release/packages/ucl/libcompat-all.ucl | 4 +++ release/packages/ucl/libcompiler_rt-all.ucl | 4 +++ release/packages/ucl/libcuse-all.ucl | 4 +++ release/packages/ucl/libdwarf-all.ucl | 4 +++ release/packages/ucl/libevent1-all.ucl | 4 +++ release/packages/ucl/libexecinfo-all.ucl | 4 +++ release/packages/ucl/libipt-all.ucl | 4 +++ release/packages/ucl/libldns-all.ucl | 4 +++ release/packages/ucl/liblzma-all.ucl | 4 +++ release/packages/ucl/libmagic-all.ucl | 4 +++ release/packages/ucl/libmilter-all.ucl | 4 +++ release/packages/ucl/libpathconv-all.ucl | 4 +++ release/packages/ucl/librpcsec_gss-all.ucl | 4 +++ release/packages/ucl/librss-all.ucl | 4 +++ release/packages/ucl/libsdp-all.ucl | 4 +++ release/packages/ucl/libsqlite3-all.ucl | 4 +++ release/packages/ucl/libstdbuf-all.ucl | 4 +++ release/packages/ucl/libstdthreads-all.ucl | 4 +++ release/packages/ucl/libthread_db-all.ucl | 4 +++ release/packages/ucl/libucl-all.ucl | 4 +++ release/packages/ucl/libvgl-all.ucl | 4 +++ release/packages/ucl/libvmmapi-all.ucl | 4 +++ release/packages/ucl/liby-all.ucl | 4 +++ release/packages/ucl/libyaml-all.ucl | 4 +++ release/packages/ucl/lp-all.ucl | 4 +++ release/packages/ucl/natd-all.ucl | 4 +++ release/packages/ucl/netmap-all.ucl | 4 +++ release/packages/ucl/nfs-all.ucl | 4 +++ release/packages/ucl/ntp-all.ucl | 4 +++ release/packages/ucl/openssl-all.ucl | 4 +++ release/packages/ucl/pf-all.ucl | 4 +++ release/packages/ucl/pmc-all.ucl | 4 +++ release/packages/ucl/quotacheck-all.ucl | 4 +++ release/packages/ucl/rcmds-all.ucl | 4 +++ release/packages/ucl/rdma-all.ucl | 4 +++ release/packages/ucl/rip-all.ucl | 4 +++ release/packages/ucl/sendmail-all.ucl | 4 +++ release/packages/ucl/ssh-all.ucl | 4 +++ release/packages/ucl/tcpd-all.ucl | 4 +++ release/packages/ucl/telnet-all.ucl | 4 +++ release/packages/ucl/unbound-all.ucl | 4 +++ release/packages/ucl/yp-all.ucl | 4 +++ 88 files changed, 611 insertions(+), 14 deletions(-) diff --git a/release/packages/sets/base-dbg.ucl b/release/packages/sets/base-dbg.ucl index c34e8b575834..d9eeb2c49677 100644 --- a/release/packages/sets/base-dbg.ucl +++ b/release/packages/sets/base-dbg.ucl @@ -1,3 +1,21 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Base system debug symbols (metapackage)" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Base jail system debug symbols (metapackage)" + +desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Base jail system (metapackage)" + +vital = true + +desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Base system (metapackage)" vital = true diff --git a/release/packages/sets/devel-dbg.ucl b/release/packages/sets/devel-dbg.ucl index c3fcd9806272..f454bd1d634d 100644 --- a/release/packages/sets/devel-dbg.ucl +++ b/release/packages/sets/devel-dbg.ucl @@ -1,13 +1,24 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Development tools debugging symbols (metapackage)" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Development tools (metapackage)" vital = true @@ -6,10 +24,3 @@ desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Base system kernels debugging symbols (metapackage)" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Base system kernels (metapackage)" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "32-bit compatibility library debugging symbols (metapackage)" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "32-bit compatibility libraries (metapackage)" vital = true diff --git a/release/packages/sets/minimal-dbg.ucl b/release/packages/sets/minimal-dbg.ucl index 606394001696..aa2034c90548 100644 --- a/release/packages/sets/minimal-dbg.ucl +++ b/release/packages/sets/minimal-dbg.ucl @@ -1,3 +1,21 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Basic multi-user system debugging symbols (metapackage)" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Basic multi-user jail debugging symbols (metapackage)" desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Basic multi-user jail system (metapackage)" vital = true diff --git a/release/packages/sets/minimal.ucl b/release/packages/sets/minimal.ucl index f2338f4c2e3b..37e7df8e7e68 100644 --- a/release/packages/sets/minimal.ucl +++ b/release/packages/sets/minimal.ucl @@ -1,3 +1,21 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "Basic multi-user system (metapackage)" vital = true diff --git a/release/packages/sets/src.ucl b/release/packages/sets/src.ucl index 7ab94eb420df..997335a19768 100644 --- a/release/packages/sets/src.ucl +++ b/release/packages/sets/src.ucl @@ -1,3 +1,21 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "System source code" vital = yes diff --git a/release/packages/sets/tests.ucl b/release/packages/sets/tests.ucl index 07b463fb7d69..3829dae11b3e 100644 --- a/release/packages/sets/tests.ucl +++ b/release/packages/sets/tests.ucl @@ -1,3 +1,21 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + comment = "System test suite" vital = yes diff --git a/release/packages/ucl/acct-all.ucl b/release/packages/ucl/acct-all.ucl index a96e3cc08471..f4c7119af798 100644 --- a/release/packages/ucl/acct-all.ucl +++ b/release/packages/ucl/acct-all.ucl @@ -29,3 +29,7 @@ lastcomm(1) command to view this information. However, system accounting is not intended as a security auditing mechanism; use the OpenBSM auditing system provided in the $PKG_NAME_PREFIX-audit package for that. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/atf-all.ucl b/release/packages/ucl/atf-all.ucl index 4d4bf8b6b69b..3014163c95bd 100644 --- a/release/packages/ucl/atf-all.ucl +++ b/release/packages/ucl/atf-all.ucl @@ -33,3 +33,7 @@ test programs in a variety of languages. These libraries all offer similar functionality and any test program written with them exposes a consistent user interface. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/audit-all.ucl b/release/packages/ucl/audit-all.ucl index c7c437d24476..43074b3bf299 100644 --- a/release/packages/ucl/audit-all.ucl +++ b/release/packages/ucl/audit-all.ucl @@ -42,3 +42,7 @@ system. This packages provides the auditing daemon auditd(8) and various utilities used to manage the auditing system and work with audit data. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/autofs-all.ucl b/release/packages/ucl/autofs-all.ucl index a51292e78faf..63261b9ce8d1 100644 --- a/release/packages/ucl/autofs-all.ucl +++ b/release/packages/ucl/autofs-all.ucl @@ -27,3 +27,7 @@ or to provide automated access to NFS servers via the /net mountpoint. This package provides the automountd(8) daemon which is responsible for managing this, as well as the management utility automount(8). EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/bhyve-all.ucl b/release/packages/ucl/bhyve-all.ucl index ac250b0f2ad4..c4e450a47934 100644 --- a/release/packages/ucl/bhyve-all.ucl +++ b/release/packages/ucl/bhyve-all.ucl @@ -40,3 +40,7 @@ loader. An example script is also provided in /usr/share/examples/bhyve/vmrun.sh which can be used to run simple virtual machines. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/blocklist-all.ucl b/release/packages/ucl/blocklist-all.ucl index 6acc6c548103..6e94b3822cf0 100644 --- a/release/packages/ucl/blocklist-all.ucl +++ b/release/packages/ucl/blocklist-all.ucl @@ -26,3 +26,7 @@ system packet filter. blacklistd(8) relies on each network daemon to report access attempts, so only daemons which have had blacklist support added will work. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/bsdconfig-all.ucl b/release/packages/ucl/bsdconfig-all.ucl index ba34e5b96fe9..944dc0a259da 100644 --- a/release/packages/ucl/bsdconfig-all.ucl +++ b/release/packages/ucl/bsdconfig-all.ucl @@ -25,3 +25,7 @@ configuration, including services, networking and disks. This package also provides sysrc(8), a command-line utility for managing the rc.conf(5) configuration. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/bsdinstall-all.ucl b/release/packages/ucl/bsdinstall-all.ucl index cfa303bc2ba4..2e01cbcb51ca 100644 --- a/release/packages/ucl/bsdinstall-all.ucl +++ b/release/packages/ucl/bsdinstall-all.ucl @@ -35,3 +35,7 @@ bsdinstall is used for installation of new systems, both for system setup from installation media, e.g., CD-ROMs, and for use on live systems to prepare VM images and jails. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/bsnmp-all.ucl b/release/packages/ucl/bsnmp-all.ucl index 683b6ff51a53..88a777b3181d 100644 --- a/release/packages/ucl/bsnmp-all.ucl +++ b/release/packages/ucl/bsnmp-all.ucl @@ -40,3 +40,7 @@ Protocol). It is intended to serve only the absolute basic MIBs and implement all other MIBs through loadable modules. In this way the bsnmpd can be used in unexpected ways. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/csh-all.ucl b/release/packages/ucl/csh-all.ucl index a158b5cd4fcb..787c43bdb82b 100644 --- a/release/packages/ucl/csh-all.ucl +++ b/release/packages/ucl/csh-all.ucl @@ -38,3 +38,7 @@ interactive login shell and a shell script command processor. It includes a command-line editor, programmable word completion, spelling correction, a history mechanism, job control, and a C-like syntax. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/dma-all.ucl b/release/packages/ucl/dma-all.ucl index 9abc83e8ee60..7b52c48a6def 100644 --- a/release/packages/ucl/dma-all.ucl +++ b/release/packages/ucl/dma-all.ucl @@ -46,3 +46,7 @@ systems, nor act as a mail exchanger for other hosts. If an SMTP server is required, or when more advanced mail routing is needed, consider using the $PKG_NAME_PREFIX-sendmail package instead. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/ee-all.ucl b/release/packages/ucl/ee-all.ucl index 2caa658c40f3..fbad921e7ef8 100644 --- a/release/packages/ucl/ee-all.ucl +++ b/release/packages/ucl/ee-all.ucl @@ -23,3 +23,7 @@ The Easy Editor, ee(1), is a simple, user-friendly text editor. It provides a full-screen editing interface similar to vi(1), but is easier to learn for new users. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/examples-all.ucl b/release/packages/ucl/examples-all.ucl index fe7ce1c461b4..027c65427924 100644 --- a/release/packages/ucl/examples-all.ucl +++ b/release/packages/ucl/examples-all.ucl @@ -24,3 +24,7 @@ The examples are provided as self-contained C source code. Some useful graphics data related to the "Beastie" mascot are also provided. EOD + +annotations { + set = "base,base-jail" +} diff --git a/release/packages/ucl/ftp-all.ucl b/release/packages/ucl/ftp-all.ucl index a8eac7b57946..285bf72529b5 100644 --- a/release/packages/ucl/ftp-all.ucl +++ b/release/packages/ucl/ftp-all.ucl @@ -22,3 +22,7 @@ desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 791fc275dbc3 - main - packages: Remove inetd from the minimal set List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 791fc275dbc37ccb3cd4d33a087b69e399019572 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=791fc275dbc37ccb3cd4d33a087b69e399019572 commit 791fc275dbc37ccb3cd4d33a087b69e399019572 Author: Lexi Winter AuthorDate: 2025-09-25 17:36:30 +0000 Commit: Lexi Winter CommitDate: 2025-09-25 18:25:09 +0000 packages: Remove inetd from the minimal set Although inetd is widely used, none of the base daemons which require or support inetd (e.g. fingerd, tftpd, sshd) are in the minimal set, and it's fairly uncommon to enable inetd's built-in servers nowadays. MFC after: 6 hours Reviewed by: manu, bapt, emaste Differential Revision: https://reviews.freebsd.org/D52715 --- release/packages/ucl/inetd-all.ucl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/release/packages/ucl/inetd-all.ucl b/release/packages/ucl/inetd-all.ucl index 75c4ca7cf6da..bf70f8a7458d 100644 --- a/release/packages/ucl/inetd-all.ucl +++ b/release/packages/ucl/inetd-all.ucl @@ -23,7 +23,3 @@ The inetd(8) server listens for incoming network connections and spawns a process to handle the connection based on its configuration file. Some built-in servers for basic services are also provided. EOD - -annotations { - set = "minimal,minimal-jail" -} From nobody Thu Sep 25 18:25:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXhwS1XRkz68QK5; Thu, 25 Sep 2025 18:25: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXhwR6TMTz3sx1; Thu, 25 Sep 2025 18:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758824727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OEupS+AdbHaQZET9z3ePLlZi1+T3oGyD1J4UAxiFZeA=; b=QTDZkEkGfHzcGjMQS0lahBB81h5HNGITquDkRA7ZP+2OwKs3mvZuzdNjoPQ/CVZaP/bmBj GcPOBpYFjDofYBlkPQGmXvnmhd6B4z+Oq43bjCJWMZ+eHJ1FhszozNz1rW+Pzx49wckvnL f1G8gOQkGtgyj/3w0qnwDHz5XJ1fA0xL/9mmwt31M7sTQanGvlUqIF0SLxV3MawCcpBiQ1 yaqmSPjYwKAWOVS1V5nQwMxuTXGfMF7sXW2hGQl0itYXlTcDGmZOmR/Ad3ZWwCZzu1CBsa o8MIVISdoI0x6AerDhUuypE1KQTveGxeX6EIHQZxI3F569WT3NjIU4uj0qpiWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758824727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OEupS+AdbHaQZET9z3ePLlZi1+T3oGyD1J4UAxiFZeA=; b=jVVhzc+YdahhTxdaBuPm206QCPQsh0a3gY9L6fJLA0ng+vvhg1BhL2+4u8Qgyru4URdoZj gfSjdcyxwCZvi1LP8yeUR3F8VHERISCQtJe1dF8a2Ipc/MM0WFOjMHE3T0Qwp9sqpKB7rf G/LKmDKj9cjPVfMAHd2hbGHqbnu0TObZSuOb4TECh/ZfNodalTEnDZ4RJJ7i6yCIewyViW 4+FBgHBGjoGbS8R8Tc8rkV3usrNbZ+Vm+qrVMrwjC9OY88HKtUxtfMf5Mbed4LJdiG33v2 hVP572BBvWVLJUOTf/klB7yCszA7JQMGP9HzEoxmYzC7mPSCcnGdCQs1TOp0pQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758824727; a=rsa-sha256; cv=none; b=eFVHLifuapgMWEMfxXhUepApePNxguckjywMt9dRYXDrxuMQBzvG+frAnJSJ+WToBSv93f bRSGklj4vnZIMVukXpYLxcE7o1uRRWXwWHi8cdxx+zeYCy05/fDwdSbI1RS6cKleZ8NtIE lyweq45CHQrtTmaHBRryQdEAUKp2vYtfp1WlpCa954GFJ+tMJlsdZy9SuW2lIDJZomkekh aaYjxA9p83sEKk2oKc8ANzuoY3sJ6052DiIotUxzHRj4hjLworsKdHqCt3XsUbJ5F4QK+C n1+soMLf1nAGwFXadqil24NkUojtYOHxFlkvol83sP/IhsrHlSHHbCZPjAoqsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXhwR646Rz1RhV; Thu, 25 Sep 2025 18:25:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PIPRFT047996; Thu, 25 Sep 2025 18:25:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PIPRIq047993; Thu, 25 Sep 2025 18:25:27 GMT (envelope-from git) Date: Thu, 25 Sep 2025 18:25:27 GMT Message-Id: <202509251825.58PIPRIq047993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 72bf56e273cb - main - freebsd-base.7: New manpage describing pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72bf56e273cb914e3b00f98e35e7270efd4edddb Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=72bf56e273cb914e3b00f98e35e7270efd4edddb commit 72bf56e273cb914e3b00f98e35e7270efd4edddb Author: Lexi Winter AuthorDate: 2025-09-25 17:41:00 +0000 Commit: Lexi Winter CommitDate: 2025-09-25 18:25:10 +0000 freebsd-base.7: New manpage describing pkgbase This covers the basic structure of pkgbase, how packages are distributed, how package sets work, and provides a few example of actually using pkgbase. MFC after: 6 hours Approved by: re (cperciva) Reviewed by: ziaee, cperciva Differential Revision: https://reviews.freebsd.org/D52644 --- share/man/man7/Makefile | 2 + share/man/man7/freebsd-base.7 | 189 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 191 insertions(+) diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index ef8a5a555a07..6a426cc29b15 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -23,6 +23,7 @@ MAN= arch.7 \ named_attribute.7 \ operator.7 \ orders.7 \ + freebsd-base.7 \ ports.7 \ release.7 \ sdoc.7 \ @@ -38,6 +39,7 @@ MAN= arch.7 \ MLINKS= intro.7 miscellaneous.7 MLINKS+= growfs.7 growfs_fstab.7 +MLINKS+= freebsd-base.7 pkgbase.7 MLINKS+= security.7 securelevel.7 MLINKS+= c.7 c78.7 MLINKS+= c.7 c89.7 diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 new file mode 100644 index 000000000000..f84cc7239a1d --- /dev/null +++ b/share/man/man7/freebsd-base.7 @@ -0,0 +1,189 @@ +.\" SPDX-License-Identifier: ISC +.\" +.\" Copyright (c) 2025 Lexi Winter. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd September 25, 2025 +.Dt FREEBSD-BASE 7 +.Os +.Sh NAME +.\" .Nm pkgbase +.Nm freebsd-base +.Nd base system packages +.Sh DESCRIPTION +The +.Fx +base system may be installed as a set of +.Xr pkg 8 +packages, which supersedes the traditional method of installing using +.Xr tar 1 +archives. +.Pp +All base packages have names beginning with the string +.Dq "FreeBSD-" , +and have an origin beginning with +.Dq base/ . +In the default system configuration, the repository containing these +packages is called +.Dq FreeBSD-base , +but any name may be used. +The repository name can be used with +.Xr pkg 8 +to restrict package operations to the base system packages. +.Pp +Packages for all supported +.Fx +releases as well as active +.Dq STABLE +and +.Dq CURRENT +.\" re@ will provide their own repository before release, at which +.\" point this text will need updating. +branches are hosted on the Internet at +.Lk https://pkg.freebsd.org . +These packages are updated when new errata or security updates are +released (for supported release versions), or twice daily for +development branches. +.Pp +Alternatively, packages may be built from the system source tree +according to the instructions in +.Xr build 7 , +allowing the system to be updated from source code using packages. +.Sh PACKAGE ORGANISATION +To allow customisation of the installed system, each package is split +into several subpackages which contain different components of the +package. +For the package +.Sy FreeBSD-foo , +the following subpackages may be available: +.Bl -column "FreeBSD-foo-dev-lib32" "Description" +.It Sy "Package name" Ta Sy "Description" +.It FreeBSD-foo Ta Base files for the package (typically executables) +.It FreeBSD-foo-lib Ta Native runtime libraries +.It FreeBSD-foo-lib32 Ta 32-bit compatibility runtime libraries +.It FreeBSD-foo-dev Ta Development files (headers and static libraries) +.It FreeBSD-foo-dev-lib32 Ta 32-bit development files +.It FreeBSD-foo-dbg Ta Debugging symbols +.It FreeBSD-foo-man Ta Manual pages. +Manual pages are only packaged separately if the +.Sy WITH_MANSPLITPKG +.Xr src.conf 5 +option was enabled when building the system, which is not the default. +.El +.Pp +The exact set of available subpackages differs for each individual +package. For example, some packages may not provide any development +files, in which case the +.Sy -dev +subpackage is not present. +.Sh PACKAGE SETS +Package sets are meta-packages which do not contain any files +themselves, but depend on a selection of other packages, such that each +package set allows the complete set of packages for a supported workload +to be installed. +.Pp +Package sets are provided as packages named +.Sy FreeBSD-set- . +The following package sets are available in the base system: +.Bl -tag -width "minimal-jail" +.It minimal +The minimal set of packages required to bring up a multi-user +.Fx +system. +This includes the core system, along with packages required for +hardware support (such as +.Xr devmatch 8 +and downloadable firmware), and basic networking, including DHCP and +IEEE Std 802.11\(tm wireless networks. +.It minimal-jail +The equivalent of +.Sy minimal +for systems running in a +.Xr jail 8 +environment. +This set excludes hardware support not typically required for jails. +.It devel +Development tools, including C/C++ compilers, the link loader, and +other tools such as +.Xr ar 1 +and +.Xr nm 1 . +This set also includes native development files (headers and static +libraries) for all packages. +.It lib32 +32-compatibility libraries, for running 32-bit applications on a +64-bit host system. +This set includes both runtime libraries and development files. +.It base +The complete base system, excluding tests, the system source code, +and debugging symbols. +.It base-jail +The equivalent of +.Sy base +for systems running in a +.Xr jail 8 +environment. +This set excludes system functionality which typically does not work +or is not useful in a jail. +.It src +The system source tree for the userland and kernel, installed in +.Pa /usr/src . +.It tests +The system test suite, installed in +.Pa /usr/tests . +.It kernels +All available system kernels. +.El +.Sh EXAMPLES +Install the +.Xr vi 1 +text editor on the running system: +.Bd -literal -offset indent +pkg install FreeBSD-vi +.Ed +.Pp +Install a new +.Xr jail 8 +system using the +.Sy minimal-jail +package set: +.Bd -literal -offset indent +pkg -r /jails/myjail install FreeBSD-set-minimal-jail +.Ed +.Pp +Install C/C++ compilers on the running system: +.Bd -literal -offset indent +pkg install FreeBSD-set-devel +.Ed +.Pp +Apply available updates to the running system: +.Bd -literal -offset indent +pkg update -r FreeBSD-base +.Ed +.Pp +Install the development toolchain for FreeBSD/powerpc64le in an +alternate root (for example, to support cross-compiling software +for a different target than the host system): +.Bd -literal -offset indent +pkg -r /ppcdev -oABI=FreeBSD:16:powerpc64le \e + install -r FreeBSD-set-devel +.Ed +.Sh SEE ALSO +.Xr build 7 , +.Xr pkg 8 , +.Xr src.conf 5 +.Sh HISTORY +Support for installing the base system as packages was introduced in +.Fx 15.0 . +Earlier releases supported a subset of this functionality. From nobody Thu Sep 25 18:49:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXjS10Dldz68RgR for ; Thu, 25 Sep 2025 18:49:21 +0000 (UTC) (envelope-from ahmadkhalifa570@gmail.com) Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXjRz2C9Zz3wdx for ; Thu, 25 Sep 2025 18:49:19 +0000 (UTC) (envelope-from ahmadkhalifa570@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=MUFpz79l; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ahmadkhalifa570@gmail.com designates 2607:f8b0:4864:20::1130 as permitted sender) smtp.mailfrom=ahmadkhalifa570@gmail.com Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-71d603acc23so12962067b3.1 for ; Thu, 25 Sep 2025 11:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758826157; x=1759430957; darn=freebsd.org; h=cc:to:subject:message-id:date:in-reply-to:references:from :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9dbIQgdhupUMBqcwIO+ckxFLXSrd+izAuVjWMCR0cKU=; b=MUFpz79l3gQEu7onvf1vYL6d61Hm1Bm0SDzH7WEqqXb2FurTrAa8Z5hAUMGEXnbDP4 DpdS0LMlZRw7p3sgi2nxNGAoLSDCaXjw3XYS7YUJpr3Fhp0vdyI27G3GASakq6nM6Llq MXiUkBN+bw94vPK8/54VqHEDanwl7oV6LjscdwwXaKdwW2Y8zCiPUITrZzhqCiRjyROG FRe7wjou0XACjPPY4KogUz2NDijMi2Uii43qFx69BodyP0ElPIcCRnUIbvjBm1AuZ2Ft dgzfHObj/M8Ra4jslRFS85zEz6NuIB6vY9Rr2ED4E0mdgErrWezWaJ5fSmm6OplBy82q MUkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758826157; x=1759430957; h=cc:to:subject:message-id:date:in-reply-to:references:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9dbIQgdhupUMBqcwIO+ckxFLXSrd+izAuVjWMCR0cKU=; b=S8s3iQErE3YlNCYwoDHgyGkI0C/ab6Bsj5v8+R3XPMqWyxjKqGXFkCnewM5laehS0R OE9Ah+3fZjn7T4sNRdz0DD5sVXmO17hDmhVq2UD2NNAid4IfMiFQ33fCZL/VLi7kA9NN T6CZ2LV+ISMWHi0quiUzoCwDHBR3zPJnWl0oLPAvT2k63r/LLSX3soaC4jWrJ1LFafDk qmh+nIQ6YpbYS1ECP4tdzvQ+Z9DWKPaDMVDkFGPwY+TzDXwCzl04tEfC90A6zHoO1xdZ xoXUlkbwZC2vMICSiJKe6rRNpcWtQR/MHDrZWj07aMEO6QJzYLnCJo3C42Uhc+/gkm2y ac1w== X-Forwarded-Encrypted: i=1; AJvYcCV57ayrTW/ZVP9hef7V7K1Iz+pQpvnlfyibH63br77KmWD1sbMPkxaYNGRoXiOZF32ZUnZBzO3WbyluFxLdVIIGMKRsaA==@freebsd.org X-Gm-Message-State: AOJu0YzkJgBQ33gSkEECObBUitSO+xyfKlHlfH2Q3Mx1yknAlUEg7jRq cljoXdTOE0LHo6yU61eBTSsyM70ggYt165n8ynh3u+mXx8cmiMI7DEA3085y/R42WAVB7bA95j1 F6xUSk3htKcwn4j3JTAnrjHML6ts14oFrhJHb X-Gm-Gg: ASbGncvMGmc8C1eSnd1xL+e5vrLzR2peqllRURUMjq52rHpsNCvBKczIqDQlxDgb9ZA hQAWTx4cJpz2WohT+P5aQqrIryFvFMvEGMCe55a7N2PgHZuqGe4eBLxxQM1TduCh91kSfJ2pFWD YkS5jAp67HT2hc1t3G2WTHAwgiazcqiM17De0JsgQw6yzhWXsSxkFHnbNVxCFB5ADyldrMEXB8B WKLNPF+wA== X-Google-Smtp-Source: AGHT+IFPvQKRWXYqYtK/kCbRVg5Wyj71GfJoDkjTQ1fmswhijb1KRsMS8fB6dRvMSgskNmsxImvt4Qj1dVvLYfK7hlY= X-Received: by 2002:a05:690e:2442:b0:628:2e16:6566 with SMTP id 956f58d0204a3-6361a5ef399mr2622803d50.0.1758826157316; Thu, 25 Sep 2025 11:49:17 -0700 (PDT) Received: from 490177373942 named unknown by gmailapi.google.com with HTTPREST; Thu, 25 Sep 2025 11:49:16 -0700 Received: from 490177373942 named unknown by gmailapi.google.com with HTTPREST; Thu, 25 Sep 2025 11:49:16 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 From: Ahmad Khalifa X-Mailer: aerc 0.21.0 References: <202509231709.58NH9XaU077251@gitrepo.freebsd.org> In-Reply-To: <202509231709.58NH9XaU077251@gitrepo.freebsd.org> Date: Thu, 25 Sep 2025 11:49:16 -0700 X-Gm-Features: AS18NWDZfpONaI0aInDzIMUrwYyE_AKGhj8p6vxI3NP_j9miz8TbqFtFBgghZz8 Message-ID: Subject: Re: git: f38792ffc2db - main - arm64/vmm: Clean up enabling guest timer access To: Andrew Turner 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-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1130:from]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4cXjRz2C9Zz3wdx On Tue Sep 23, 2025 at 8:09 PM +0300, Andrew Turner wrote: > The branch main has been updated by andrew: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f38792ffc2db67ca82026eb4861f37fe7ac7c38e > > commit f38792ffc2db67ca82026eb4861f37fe7ac7c38e > Author: Andrew Turner > AuthorDate: 2025-09-22 17:08:06 +0000 > Commit: Andrew Turner > CommitDate: 2025-09-23 17:08:36 +0000 > > arm64/vmm: Clean up enabling guest timer access > > Clean up the name of CNTHCTL_EL2 field macros and expand to include > more fields. This makes it easier to see which accesses are trapped or > not trapped. > > While here set the register directly. We already set it in locore.S so > there is no need to read that and modify it. > > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D51817 > --- > sys/arm64/arm64/locore.S | 4 +-- > sys/arm64/include/hypervisor.h | 79 ++++++++++++++++++++++++++++++++++++------ > sys/arm64/vmm/io/vtimer.c | 31 ++++++++++------- > 3 files changed, 88 insertions(+), 26 deletions(-) > > diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S > index 50a3eda846da..d35e334905a7 100644 > --- a/sys/arm64/arm64/locore.S > +++ b/sys/arm64/arm64/locore.S > @@ -418,7 +418,7 @@ LENTRY(enter_kernel_el) > > msr SCTLR_EL12_REG, x2 > mov x2, xzr /* CPTR_EL2 is managed by vfp.c */ > - ldr x3, =(CNTHCTL_E2H_EL1PCTEN | CNTHCTL_E2H_EL1PTEN) > + ldr x3, =(CNTHCTL_E2H_EL1PCTEN_NOTRAP | CNTHCTL_E2H_EL1PTEN_NOTRAP) > ldr x5, =(PSR_DAIF | PSR_M_EL2h) > b .Ldone_vhe Just an FYI: The clang-14 cross build fails on this. Seems like it doesn't like having a suffix on the integer literal. /home/runner/work/freebsd-src/freebsd-src/sys/arm64/arm64/locore.S:421:16: error: expected ')' ldr x3, =((0x1ul << 10) | (0x1ul << 11)) ^ /home/runner/work/freebsd-src/freebsd-src/sys/arm64/arm64/locore.S:432:16: error: expected ')' ldr x3, =((0x1ul << 0) | (0x1ul << 1)) ^ --- locore.o --- *** [locore.o] Error code 1 https://github.com/freebsd/freebsd-src/actions/runs/18014912022/job/51257258696 From nobody Thu Sep 25 19:07:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXjrS2xVgz68T4W; Thu, 25 Sep 2025 19:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXjrS2H0Wz40yC; Thu, 25 Sep 2025 19:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758827224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4SrsVxu3OK8Qsb4PkyXzTqGGyfAxR2vczXjeF2pR6BQ=; b=o1wzTlvseZ64MPp/Al3iFSrw5V1fTGdctWhdKzGeK2CNKN4+Qvd61UcX6ES7UJzHE6b9nf DQMFWwAZNL661fMUO6ThAgWiFy+2aS5BtryhEM1b4EqmPaSaMThI41CvUulYzy8wFAFLah kWU0mvA8MPcV8d7aFrMeT6IIA+La+hAVjsBACiQN/rYdYDwv2jXYO2ELzTnpFdKFYvGNsn NgrAl0iXxbfOb9KmB0dFhtfmpozxYK3RLy5OAWyKvhF5cazfXJQX1N9NdQAH39rxBE9vTq sc/ghT+2XW7+Io5+7SUhO5NHPumqGBd/chdvtj8fUtfTvkrH3quxopeukIOHlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758827224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4SrsVxu3OK8Qsb4PkyXzTqGGyfAxR2vczXjeF2pR6BQ=; b=gAIwX8UTaWbTwm8gLzZZwuejettcIFR45YOZKYekaJ2TRYNIRBs4KZBoTcwFclzQmDPWpJ uLa7/fvf3wFm3jY/kH6wflw4B8Pd98jxto74C5eJUTqLtajxh+gbISVczB24y2JBL8BZq3 GvumX3Hfo902gtysmr2Gnp2uYWdx8/EG6FNZB0yoJzDLKzSG68x6BANzWWLPFuCGNKnXEP rE52Ucp4BW3zHRvCpffA7Si9VIEpdf319VsExR0aRES24adrFwVS5rCSU1dATPJaJhgisP ZdvUiyZeIjuivIIg6uahgLCKJ/Ci9gBMHVdDOZAxFs0gQqPEGyUQ6jTvR2AHjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758827224; a=rsa-sha256; cv=none; b=yxIX+ksn9NRYyVgBmHTMAJwbjyfpMgRfeqhk67rUMhFJpoVjYkCpgNnog8yOs8NxuADnWT +uxaG7EbXKnIA8TwxLxwoUGVWBFHXdjmzZzrinLT271Nxap/Bh37WFhNtGTSRwLrPlaZ57 gZ8o8xrsgnhzBn08SLpe+e9BkWxf1sCglQ8IK2Lt3mfH5V7auBqCe5s7B0m4BA9S7oJEM6 NnUON9D7nVQsyPdUzslctuOjY9TJuY7wLjyIDjVl3vyGu7InyXP1CP7fv3FbLAI+yD+s7w ca29sHVT7mr0r1VOpo6/74ZvZdJmzIyP18/lvxKgt+u5qsQJxSQ4t0uZsThezQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXjrS1YnwzTC; Thu, 25 Sep 2025 19:07:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PJ744X021638; Thu, 25 Sep 2025 19:07:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PJ74lT021635; Thu, 25 Sep 2025 19:07:04 GMT (envelope-from git) Date: Thu, 25 Sep 2025 19:07:04 GMT Message-Id: <202509251907.58PJ74lT021635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: cd813380ad83 - main - kerneldocs: Update latex package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd813380ad832a0bfa5b99f22012092cc9d373b1 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=cd813380ad832a0bfa5b99f22012092cc9d373b1 commit cd813380ad832a0bfa5b99f22012092cc9d373b1 Author: Minsoo Choo AuthorDate: 2025-09-25 02:12:37 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-25 19:06:56 +0000 kerneldocs: Update latex package MFC after: 3 days Reviewed by: ziaee Signed-off-by: Minsoo Choo Closes: https://github.com/freebsd/freebsd-src/pull/1853 --- tools/kerneldoc/subsys/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kerneldoc/subsys/README b/tools/kerneldoc/subsys/README index 6679d5cb9055..2ad9a00625ae 100644 --- a/tools/kerneldoc/subsys/README +++ b/tools/kerneldoc/subsys/README @@ -20,12 +20,12 @@ The following environment variables can be used in the Doxyfile: For the PDF generation you may have to change some limits in the latex configuration (the build may fail and an error about e.g. "pool size" is -shown), for print/teTeX this is done in +shown), for print/texlive-full this is done in /usr/local/share/texmf/web2c/texmf.cnf Programs needed to generate the API docs: - devel/doxygen - - print/teTeX + - print/texlive-full - graphics/graphviz -- From nobody Thu Sep 25 19:15:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXk1q2YKXz68T8k; Thu, 25 Sep 2025 19:15: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXk1q1SHMz41bG; Thu, 25 Sep 2025 19:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758827711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlIBjju8wwwePabyul9Eayv4eZ4TKaqeKN58rOUG9h4=; b=irnBPzaIUphN4AbyVwnynpqeqXsCvyBaq+TGWt5GtTOPLNpiRqxRE4PNmu6uko1nNMhuEs 22Q2WFuqJtnIKz5QHDVL/Mzcrx+nzSAaBqT80xTxeH0re83jZVlGg0E71wejhzqaxLuwRY TlZEf2AQ2anpo6TuS7I9PudzYNLqxALkC2AiSLNq/9PnO1DRJKbppcE8PYzhYMlU+fEA6U wTLueuT/FTr7bceMNUSRxd1vb56WoNzGaK4rASEZTHkKhMGrIlFE8zSPBjTW8NotHFALaG XHnwkzovSajSvSR+NYftshPbP8oCim0Dpkum/IG0wiqah5m1aHbGjuQq+ILyjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758827711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlIBjju8wwwePabyul9Eayv4eZ4TKaqeKN58rOUG9h4=; b=qrUAWCu2awjZ5fmha6du4h2q4GTF3SryIQ2i+XFLa0W6AF40CDtAYTEB+4uRzSkd48FyQ3 KUTWVfRwr1njSMi5HJZYTB2rbCCteabYRxrVBB/C7XZZljXJlY9uFyCTx2xi2qhW4h5LLy 4EV5GdnBMZlOYQQD6cf8Czf5rKDIUwZWYCHAcLwzpLAnRHXCFLSO5X1yLGczfhF45kgB8e fzlUh8Cc0Ti+m5aRWkPVUj8OtwuB0zW8LizZKKRYyQV2h+93LGA2xbaT8eJW7CZgZ2ztQU qp5AH+lB3zV0SL8n835O3iWhQyhuaS3WWJ03pjepuG1KL8xsCHbR1o3nQiJeGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758827711; a=rsa-sha256; cv=none; b=nlGNfazjxmaFGJHUsdgWhDYVQu8J8sC5J9cgOJAMB+AKjwPBLXJCwlcyJP5LfRf6XELEz0 Ij7ujwl3I2R02DGYgLj00DYl3LNjaklU0ErwvesiFlY+sdCkY4+2GeRKgOVcRSAiPrkXZ2 Hr3m8CAnNyASiSf01CGpKb24UJ9WZl8wVT2YjW5deUdqVsRBetth3QCM2vDmNm1PzZGEOM 4OSsHpZSnljOMyvx8ZQkW5EWkoRQILRjVIN+uobTp0Uk7f/p2V+wyzAQb/qHew1IV51I2A nk6ZBStSPtk0ofWdjvWPgWcDXoG8SvFUW9rTN+3RBPuWeFig2Nkhzts1QclTfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXk1q0yGmzK8; Thu, 25 Sep 2025 19:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PJFBD8040415; Thu, 25 Sep 2025 19:15:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PJFBjB040412; Thu, 25 Sep 2025 19:15:11 GMT (envelope-from git) Date: Thu, 25 Sep 2025 19:15:11 GMT Message-Id: <202509251915.58PJFBjB040412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 7e8fb7756c3e - main - build.7: Improve building pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e8fb7756c3ed89a2141b923e6da1b6fd96f509c Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=7e8fb7756c3ed89a2141b923e6da1b6fd96f509c commit 7e8fb7756c3ed89a2141b923e6da1b6fd96f509c Author: Alexander Ziaee AuthorDate: 2025-09-25 12:19:52 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-25 19:14:26 +0000 build.7: Improve building pkgbase The packages target was previously listed under kernel, move it to the general source make targets listing. Add the update-packages target as well. Adjust the release building targets with package in their names to clarify they are unrelated to pkgbase. Add the OBJROOT and REPODIR variables to ENVIRONMENT. MFC after: 3 days Reviewed by: ivy, markj (both previous versions) Suggestions by: des, emaste, ivy, kevans, markj Fixes: 1d26746cfd4a (Document the packages target) Fixes: 0ac8aa55da1c (Add incremental packages) Fixes: 26490d9b74f0 (allow update-packages for first) Differential Revision: https://reviews.freebsd.org/D50289 --- share/man/man7/build.7 | 75 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index bfe464d4448e..5e15a528246b 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 24, 2025 +.Dd September 25, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -278,13 +278,31 @@ defaults to and .Sy TARGET_ARCH must be defined. +.It Cm packages +Create a +.Xr freebsd-base 7 +package repository containing packages that can be +used to install or upgrade the base system. +The repository is created in the object directory, under +.Pa ${REPODIR}/${PKG_ABI} +where +.Ev REPODIR +is the base directory where the repository will be created, and +.Va PKG_ABI +is the +.Xr pkg 7 +ABI for the build target, for example, +.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packageworld Archive the results of .Cm distributeworld , placing the results in .Va DISTDIR . -This target is used while building a release; see -.Xr release 7 . +This target is used while building a +.Xr release 7 +and is unrelated to building +.Xr freebsd-base 7 +packages. .It Cm installworld Install everything built by a preceding .Cm buildworld @@ -365,6 +383,14 @@ and .Va XDDIR defaults to .Pa ${TARGET_ARCH}-freebsd . +.It Cm update-packages +Create or update the +.Xr freebsd-base 7 +package repository for the base system. +If an old repository is being updated, +then packages whose contents have not changed since the previous version +will be copied into the new repository to avoid needless updating of the +version number. .It Cm xdev-build Builds for the .Cm xdev @@ -411,26 +437,16 @@ Install the kernel to the directory .Pa ${DISTDIR}/kernel/boot/kernel . This target is used while building a release; see .Xr release 7 . -.It Cm packages -Create a -.Xr pkg 7 -repository containing packages that can be used to create or upgrade an -installation of the base system. -The output repository is placed in the object directory, under -.Pa repo/${PKG_ABI} -where -.Va PKG_ABI -is the -.Xr pkg 7 -ABI for the build target, for example, -.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packagekernel Archive the results of .Cm distributekernel , placing the results in .Va DISTDIR . -This target is used while building a release; see -.Xr release 7 . +This target is used while building a +.Xr release 7 +and is unrelated to building +.Xr freebsd-base 7 +packages. .It Cm kernel Equivalent to .Cm buildkernel @@ -658,11 +674,15 @@ If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the .Cm cross-tools target. +.It Va OBJROOT +The object directory root is defined as +.Pa ${OBJDIR}/${SRCDIR}/ . +See +.Pa share/mk/src.sys.obj.mk . .It Va PKG_FORMAT Specify a package compression format when building -.Pa src -into -.Cm packages . +.Xr freebsd-base 7 +packages. Default: .Ql tzst . Consider using @@ -680,9 +700,8 @@ and .Cm installkernel process. This is currently incompatible with building -.Pa src -into -.Cm packages . +.Xr freebsd-base 7 +packages. Each port must be specified as .Ar category Ns Li / Ns Ar port Ns Op Li @ Ns Ar flavor , e.g. @@ -711,6 +730,13 @@ Specify a file to override the default The src.conf file controls the components to build. See .Xr src.conf 5 +.It Va REPODIR +The root directory used to create the package repository for building +.Xr packges 7 . +Defaults to +.Pa ${OBJROOT}/repo/ . +This can also be set in +.Xr src-env.conf 5 . .It Va STRIPBIN Command to use at install time when stripping binaries. Be sure to add any additional tools required to run @@ -1108,6 +1134,7 @@ Study the examples above. .Xr src.conf 5 , .Xr arch 7 , .Xr development 7 , +.Xr freebsd-base 7 , .Xr pkg 7 , .Xr ports 7 , .Xr release 7 , From nobody Fri Sep 26 06:40:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY1F64M4Nz69JGj; Fri, 26 Sep 2025 06:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cY1F63nK2z3w12; Fri, 26 Sep 2025 06:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758868858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fjIJUjOb5onGVodHqElnEkEX9TtjxpVHbdTksRGu2Lk=; b=GEbBXBG7wjWLcD1eEgt5M/M7wsJ6jSFl7dFcr3YC2whWIWhAEEhFo8BrUhW58c7JeIGDxt U2ZZUF22XfLwMpdDjeAcipxU5nQq2iqlj3zKEwAA4V8xg+fCAcPUM3COCNtBMKkw0QKUKV 0u8zYAo3p9VHdJX0sZocdgl3m2ZV0EL8K3jVAJ/rjVytIx3m8oenxCNKJTdloRcX9AhPgM RbxmutrrfKJubh9tDq/Y0ggZeKAsHy/eTE2WC9+xPDrqDAtC3oJtCVkua4oa+w5jNA4hvK hXMovn+0wiFq3YjbUbDoSQ6bcCxWFeEsN+WddD+Yeyh5ZcIep6UFI3oejVb4Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758868858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fjIJUjOb5onGVodHqElnEkEX9TtjxpVHbdTksRGu2Lk=; b=xvl3je4CN5eBCGRPq8klfZrvLERMfqb6bH6vb5kfhgfzq2Wdk+4JAb1RNRL3LApw53DKOX O6jPi/G24SXYPLc2p+hL5uPn7zE8ECfwMYo9ZLM/DJv+Xfmp3m2M14b9GPJwS+2QiygvgF u79V9SSqzNzojTZd/fMd6tQGjdQ+fbku801HudrKd0HzARaWpsSo8LAgwygzia84w8ZEl7 Lznw0pv0kpN1yskOwJy8vd4CnvBJEeD9SFtreKJZvn1pidhp/m8nz6EUFEACzFWDF4EmXI v5EfojDO7RUhnmCsBS/Rqh7ZVjnTjg1OKUCqQehu/+kbmLYtyBCMPR6HtsmJhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758868858; a=rsa-sha256; cv=none; b=MmiaGb0zhmNJWLbncb7KGS6EjaMD1sZRXEAy1kQno7fCbXPI59NPjs7RrY7YW04T3y1XUY fOGpRLsuC6wbwJt/Lm2H1qxuMEQvUPo872cqib+gx/Bxx/+lAwriq3ZKLuPW4OfFUJDgyQ WeMk/jW5Q8LxOA7THParZrAUPFBYe7su5LjDL7NBMd0Ckzl2MraMd5MjmlcRz37S5W1LfC /HnMFz7RW7wwFv4d2gPx5x4ayxpIyG67fOEy8xCkLKqJVSMtAmQFU58Ubo/jyHldkA1Uj4 XDPsuinIizzPtM5E7dvfkX/9WsjK/ttose+tBmSOy3O4OebxOMNlDyg7iOoCpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY1F63N5pzcC1; Fri, 26 Sep 2025 06:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q6ewCI025202; Fri, 26 Sep 2025 06:40:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q6ewP6025199; Fri, 26 Sep 2025 06:40:58 GMT (envelope-from git) Date: Fri, 26 Sep 2025 06:40:58 GMT Message-Id: <202509260640.58Q6ewP6025199@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: 84d688af4e62 - main - mlx5 ipsec: Add VLAN tag to IPSec rules to prevent duplicates List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84d688af4e625e159af65cd2432af88609d4962a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=84d688af4e625e159af65cd2432af88609d4962a commit 84d688af4e625e159af65cd2432af88609d4962a Author: Ariel Ehrenberg AuthorDate: 2025-09-17 13:17:46 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-26 06:32:10 +0000 mlx5 ipsec: Add VLAN tag to IPSec rules to prevent duplicates Include VLAN tag in policy and SA outbound rules so that rules from VLAN interfaces differ from physical interface rules, preventing duplicate rule creation in VLAN configurations. Sponsored by: Nvidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c index fb9ca94278db..d1f454a5ec41 100644 --- a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c +++ b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec_fs.c @@ -1134,6 +1134,11 @@ static int tx_add_kspi_rule(struct mlx5e_ipsec_sa_entry *sa_entry, setup_fte_no_frags(spec); setup_fte_reg_a_with_tag(spec, sa_entry->kspi); + if (sa_entry->vid != VLAN_NONE) + setup_fte_vid(spec, sa_entry->vid); + else + setup_fte_no_vid(spec); + rule = mlx5_add_flow_rules(tx->ft.sa_kspi, spec, flow_act, dest, num_dest); if (IS_ERR(rule)) { err = PTR_ERR(rule); @@ -1169,6 +1174,10 @@ static int tx_add_reqid_ip_rules(struct mlx5e_ipsec_sa_entry *sa_entry, flow_act->flags |= FLOW_ACT_IGNORE_FLOW_LEVEL; if(attrs->reqid) { + if (sa_entry->vid != VLAN_NONE) + setup_fte_vid(spec, sa_entry->vid); + else + setup_fte_no_vid(spec); setup_fte_no_frags(spec); setup_fte_reg_c0(spec, attrs->reqid); rule = mlx5_add_flow_rules(tx->ft.sa, spec, flow_act, dest, num_dest); @@ -1181,6 +1190,11 @@ static int tx_add_reqid_ip_rules(struct mlx5e_ipsec_sa_entry *sa_entry, memset(spec, 0, sizeof(*spec)); } + if (sa_entry->vid != VLAN_NONE) + setup_fte_vid(spec, sa_entry->vid); + else + setup_fte_no_vid(spec); + if (attrs->family == AF_INET) setup_fte_addr4(spec, &attrs->saddr.a4, &attrs->daddr.a4); else @@ -1322,6 +1336,11 @@ static int tx_add_policy(struct mlx5e_ipsec_pol_entry *pol_entry) goto err_mod_header; } + if (attrs->vid != VLAN_NONE) + setup_fte_vid(spec, attrs->vid); + else + setup_fte_no_vid(spec); + flow_act.flags |= FLOW_ACT_NO_APPEND; dest[dstn].ft = tx->ft.sa; dest[dstn].type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE; From nobody Fri Sep 26 08:47:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY42y3v0yz67xqp; Fri, 26 Sep 2025 08:47: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cY42y3Bltz46s5; Fri, 26 Sep 2025 08:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758876442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=di/CDraodrwTRgX+ER7igAhLHUWHLgDSSb70m1feqk0=; b=x2uPMY8YwxesIBK5Uj32WD0rw25QLd7ugXIJPPpuldVr3uKuoZ5YbWJ3+RndV8wxqNY+UR 0UYffrzjOFZ2QjnhU5FnZRB9OTGQ3hcqBUpocQU8cmarHfc3vG1xRbNQ8GapCDpxofl7hk Di/zWovH002k9nbb/iYMKa27YHPCZvhTFZxsEoxK2g/S6ObPGwNikWnJheaxudAJNvYS2n hUu0VhR9I9JxYeduE7gtOQ4jdtBjAN6hFytMDGKwNoxpUqeeblnN5EoX1mcgW8NaxV1AQb sJazPHiaA/+xNNkyQabYLuPlPDsUH6UdBOLIEtR7iQkJ6BOmYQyt8RPwXorx3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758876442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=di/CDraodrwTRgX+ER7igAhLHUWHLgDSSb70m1feqk0=; b=oSzMQGBLg/NTMmmeJ8mTpezgJvpyPzdy6I4tjgmkFfl6yTDMZKqm67Yz1TqAX7iyqajTq8 mRCoLJ6HsKUuKkd3PnOvZZGZ0L7z7IX1yVIDEs2KkOQqwFyGibBd49ttr3LRkspN5L3H3B sKP/d9FfCxHRdIxLctQGPCkuTTpvYpy6WzLre+zEwl+5muxn41oZVOFZIlB9SJ5IKpNchP yh1f1/6Nik484biPWRU/y4wwVnWHdgFbAlPx9f+gAshSM/dsjIwBrk+2kOZSsmXj/Mm0AU 3QVw7WCSHbUtvkp9JcMyDw4A2thNQdWjHbctbRCXyHADaeVtxMf6/SeWF9FftA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758876442; a=rsa-sha256; cv=none; b=NkuAfK3GnuMVYLtD9CqGtJjR72omR3pKc5xIKhzkcgLNy7KTdcRIsVy+p6UHZbPpO8KFvf 3XEPOnLMmblbUcD58cQr+z2dN0CPSn367CL6bMvpdkWVJNCUUKPAZ0mDV0vqVZK75wX6g7 rn1stHv29nRbBTZrPXCxk3V8tNRi+zjkpCJtBQhwKiypQlQt9TCoTtppZBmeM22rQcwPKA VwCpLFT2WFLJLpMwD2mSGLDk69x+dnRPni3Igm11L1v3w2NFV0/I76jYz/OK7GpnVdeJS5 uRKYjHUfSDPYLsyBFbGSJ5FEL4vMVStNX1+7G0KHPomhXi7GKmT3p2bYMuEm8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY42y2hhpzgrR; Fri, 26 Sep 2025 08:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q8lMPf053445; Fri, 26 Sep 2025 08:47:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q8lMM8053442; Fri, 26 Sep 2025 08:47:22 GMT (envelope-from git) Date: Fri, 26 Sep 2025 08:47:22 GMT Message-Id: <202509260847.58Q8lMM8053442@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: f15d3694db60 - main - libc: un-namespace gen-compat.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f15d3694db60d0256d236320fcb9e2c6d871b0a1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f15d3694db60d0256d236320fcb9e2c6d871b0a1 commit f15d3694db60d0256d236320fcb9e2c6d871b0a1 Author: Konstantin Belousov AuthorDate: 2025-09-25 00:58:33 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-26 06:51:28 +0000 libc: un-namespace gen-compat.h There are no symbols that needs to be namespaced in the header, and it would not allow to use proper raw syscall names later, where they are needed. Reviewed by: olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52687 --- lib/libc/gen/fts-compat.c | 2 +- lib/libc/gen/fts-compat11.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c index f87cabf085f7..62a1e0a81f62 100644 --- a/lib/libc/gen/fts-compat.c +++ b/lib/libc/gen/fts-compat.c @@ -44,9 +44,9 @@ #include #include #include -#include "gen-compat.h" #include "fts-compat.h" #include "un-namespace.h" +#include "gen-compat.h" #include "gen-private.h" diff --git a/lib/libc/gen/fts-compat11.c b/lib/libc/gen/fts-compat11.c index 0351ce5ac690..5abb378f5f08 100644 --- a/lib/libc/gen/fts-compat11.c +++ b/lib/libc/gen/fts-compat11.c @@ -43,9 +43,9 @@ #include #include #include -#include "gen-compat.h" #include "fts-compat11.h" #include "un-namespace.h" +#include "gen-compat.h" #include "gen-private.h" From nobody Fri Sep 26 08:47:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY42z4wP1z67xsp; Fri, 26 Sep 2025 08:47: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cY42z4Dzmz46YH; Fri, 26 Sep 2025 08:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758876443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dE+g7s0FT6vcCjYYnarTzYAb5GBGBhEhcmmNBlrNbqU=; b=drGmg+2/yVomDwzo65cAd18+drK9UXxUcDTltEyHWbuEi37lfXat4IWfIvOowWQuwFHR/m oCuWSdTY4VxdvHPwoCJPdVECx1o3lPYST33huakx1H1oam00Zpaa90VGmrDj6j4+75i0kn ijXr2pM7oik7rqAcZEr1s/036nmHHgzA66YIlqei3PEkC0eKuk+godBo5EEhMghXqXXlj+ AVNf0FUqAQUx9wYIPscgNK+jbFM0qp3JfUBReUz3M1TqhNpHWkqdV1PZzmGbPXbN5N4LES gHd+HI5+UuBcvmCRUL5RyCj/yNoIuEdWKeTK91Sw1uja85HrBNC44B0SlvyPAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758876443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dE+g7s0FT6vcCjYYnarTzYAb5GBGBhEhcmmNBlrNbqU=; b=KzqARI2kV5zRGFXMKvekxAh0ODo+eWBifrCrX++t/yTpm5XDUlSXPN2yCYV1IjCSuY/Q4k po842MEgPh1usUuJQdrRWiyAJplbw1CotI/60uobwb/p4p9sx5H8xG+ef1B4aBVOEjF+Q2 bnsGOQYME6uVK5txjJS2LQED8wEiUrQSiHvTwZVtol4t+bfSR/6WkqHP18RQ+kSSldStWn uX+c4bEIm2TMzPungDvR3g+qpMhBVQXN+58M5Tcp96LsTh7+O+AdYTNf2b3Mhyvjn/yBgJ 7J22n5ybix8PPOL8WcIn9XiP7zkmZ+gTnw2hxxMW7E6ChuPxXQejweNWKztyIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758876443; a=rsa-sha256; cv=none; b=A2xSNH8DH6c1Tjm2xh8nag9xboIJZ6Ps3Up/4q/q+VtBg959GD4ttikluNVa+nayRrmCKg VReWub8IR6Tgy/772MEJlLJ3uPQ2otSfFWfg9XP/EJHHEoeEHZtFh3MzAbUc4WysTrkpIr xoB0VMjTUjo+UnRtdODHIeA7qjN+n+sa2yQ6oQxMD/yK0aGpHxNkFNClNFVXA/0/Erliy1 Q5b9AwP3ycocv6KNhFWelRPwJwT3pTG1uxpgn8EDwKMA3IyllxGN8Gn2jWZA01FqsoVU8p TWHdsW1kRXLUimznB0Ndp4OotP2QYBvNlDVDF3DiqsIcfyHXrKxnVMSl8nIb5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY42z3f5vzh7X; Fri, 26 Sep 2025 08:47:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q8lNFY053478; Fri, 26 Sep 2025 08:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q8lN8e053475; Fri, 26 Sep 2025 08:47:23 GMT (envelope-from git) Date: Fri, 26 Sep 2025 08:47:23 GMT Message-Id: <202509260847.58Q8lN8e053475@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: e194103bd35d - main - libc: properly forward the compat syscall references to libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e194103bd35d9e08a5d271d814d6184ec159eadf Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e194103bd35d9e08a5d271d814d6184ec159eadf commit e194103bd35d9e08a5d271d814d6184ec159eadf Author: Konstantin Belousov AuthorDate: 2025-09-22 23:27:05 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-26 06:51:28 +0000 libc: properly forward the compat syscall references to libsys same as it was done for setgroups@FBSD_1.0. Switch from weakref to symver, since GNU as cannot handle version spec with weakref. Reviewed by: olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52687 --- lib/libc/gen/gen-compat.h | 48 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/lib/libc/gen/gen-compat.h b/lib/libc/gen/gen-compat.h index 74678301af6f..19b9addb4321 100644 --- a/lib/libc/gen/gen-compat.h +++ b/lib/libc/gen/gen-compat.h @@ -40,24 +40,50 @@ struct freebsd11_statfs; struct freebsd11_dirent *freebsd11_readdir(DIR *); int freebsd11_readdir_r(DIR *, struct freebsd11_dirent *, struct freebsd11_dirent **); -int freebsd11_stat(const char *, struct freebsd11_stat *); -int freebsd11_lstat(const char *, struct freebsd11_stat *); -int freebsd11_fstat(int, struct freebsd11_stat *); -int freebsd11_fstatat(int, const char *, struct freebsd11_stat *, int); -int freebsd11_statfs(const char *, struct freebsd11_statfs *); -int freebsd11_getfsstat(struct freebsd11_statfs *, long, int); int freebsd11_getmntinfo(struct freebsd11_statfs **, int); char *freebsd11_devname(__uint32_t dev, __mode_t type); -char *freebsd11_devname_r(__uint32_t dev, __mode_t type, char *buf, int len); +char *freebsd11_devname_r(__uint32_t dev, __mode_t type, char *buf, + int len); -#define F14SG int freebsd14_setgroups(int gidsize, const __gid_t *gidset) +/* + * We want freebsd11_fstat in C source to result in resolution to + * - fstat@FBSD_1.0 for libc.so (but we do not need the _definition_ + * of this fstat, it is provided by libsys.so which we want to use). + * - freebsd11_fstat for libc.a (since if we make it fstat@FBSD_1.0 + * for libc.a, then final linkage into static object ignores version + * and would reference fstat, which is the current syscall, not the + * compat syscall). libc.a provides the freebsd11_fstat implementation. + * Note that freebsd11_fstat from libc.a is not used for anything, but + * we make it correct nonetheless, just in case it would. + * This is arranged by COMPAT_SYSCALL, and libc can just use freebsd11_fstat. + */ #ifdef PIC -static F14SG __attribute__((__weakref__("setgroups@FBSD_1.0"))); +#define COMPAT_SYSCALL(rtype, fun, args, sym, ver) \ + rtype fun args; __sym_compat(sym, fun, ver); #else -F14SG; +#define COMPAT_SYSCALL(rtype, fun, args, sym, ver) \ + rtype fun args; #endif -#undef F14SG + +COMPAT_SYSCALL(int, freebsd11_stat, (const char *, struct freebsd11_stat *), + stat, FBSD_1.0); +COMPAT_SYSCALL(int, freebsd11_lstat, (const char *, struct freebsd11_stat *), + lstat, FBSD_1.0); +COMPAT_SYSCALL(int, freebsd11_fstat, (int, struct freebsd11_stat *), + fstat, FBSD_1.0); +COMPAT_SYSCALL(int, freebsd11_fstatat, (int, const char *, + struct freebsd11_stat *, int), fstatat, FBSD_1.1); + +COMPAT_SYSCALL(int, freebsd11_statfs, (const char *, + struct freebsd11_statfs *), statfs, FBSD_1.0); +COMPAT_SYSCALL(int, freebsd11_getfsstat, (struct freebsd11_statfs *, long, + int), getfsstat, FBSD_1.0); + +COMPAT_SYSCALL(int, freebsd14_setgroups, (int gidsize, const __gid_t *gidset), + setgroups, FBSD_1.0); + +#undef COMPAT_SYSCALL #endif /* _GEN_COMPAT_H_ */ From nobody Fri Sep 26 08:47:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY4313kwkz67xkk; Fri, 26 Sep 2025 08:47: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cY43053vlz46nF; Fri, 26 Sep 2025 08:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758876444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5CmTUHHplqs6KSWoQtjZ6Tbi5VPM59xuZkIoGB45Aao=; b=LdgMpnblvF/5KJHX58Tzw9TkWHFOWQTC77hZG38+HIJGlEmvL5iOAF9FHOag2lSZ2Lch5I bKrCfUT0B+Cv528N5a/BskXHkOmo/6UBGSS5W0yF41PKXyhUeftRDPb7C/gUEZ1bkieiO6 7b9aEjyPeH2Gj6/gtFqocV+5PEJE4SmfcAYJqkN3Bs3vK1HtaR8FeLS/oh3rEwwB6f4mlX r4Vr9Hzz6u3y2GTjDTkS4mZCJLixWZfMsf2cMSiYQtYvxBahYuWVTPxp12cYN64OqkJAhp sG9jVGY4uKVnEcXZ7m5grxJJZPJglOq/Et2Cojd9JS2HfXcjYVM7P1T5d0SywA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758876444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5CmTUHHplqs6KSWoQtjZ6Tbi5VPM59xuZkIoGB45Aao=; b=PQl6Uo3rIesJ4gdOiULZQNeL7+AbF9o9W53M30ix4xalyASuN8X7wp6kQG+BQ86UCDQswA dcTKKZ5p5MqH/yhbG35vrpicLCvkY4B/3wZlQ4O37od4MZLCojjFZFX4+txy7W5DV8BCE4 WaLmWkHb3t0xXINa7lhOPlqPXSUqBmBtpBdo1JsuzrqkwBu3h9n3gcw+dVHstxwhZFzWg/ HfOL7tT0PLkdc/c5hAWWVTIpkz7EJ+TnCwKNNiK/ygu6sY60DmEx2KTsJt6LQvOonKAKiA +09Xl8Y6k8Ii2pWXrgAn/UyeoqoSMPt5qOyLzBARXdZcBke+u5epNbxMLSH2Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758876444; a=rsa-sha256; cv=none; b=JW7zthOwQrDCzBe5Khi6tABQqrnHA7XY//BFgOl0TCnytnPpuGlP6GH2mFaE+WRsAhy3TW EClgIq2NiqfGLgHXu8Em0kxWvsFfJGXTxPaeLS7Q979qFLDvROi2Hyj4QD7Bv3hA4LJj5T Kw3dn6g7ljg4W+KtK3z8mDrTF5kuPNAwdYm81YKAjpTJ3fxyZzCTOpqp+cqgca6P0ZpmkX DdupxuLers+E4kNGhOdNFp6mFKVjsiBH9X/OxFDgfiQo0ngyvtbyUCMk+trNYlAucdUo6v Frp2LCAgKpxcQSZHIizK0LPU3l1pvwJuv5icmBUgdFXX+SYR5x7w8M7NJJ4VEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY4304Y41zgwW; Fri, 26 Sep 2025 08:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q8lOdZ053511; Fri, 26 Sep 2025 08:47:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q8lO89053508; Fri, 26 Sep 2025 08:47:24 GMT (envelope-from git) Date: Fri, 26 Sep 2025 08:47:24 GMT Message-Id: <202509260847.58Q8lO89053508@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: 495813bfd7a2 - main - libsys: drop private exports no longer needed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 495813bfd7a28759b23204d66826ff9b3ee7ab61 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=495813bfd7a28759b23204d66826ff9b3ee7ab61 commit 495813bfd7a28759b23204d66826ff9b3ee7ab61 Author: Konstantin Belousov AuthorDate: 2025-09-22 23:34:34 +0000 Commit: Konstantin Belousov CommitDate: 2025-09-26 06:51:28 +0000 libsys: drop private exports no longer needed after libc is switched to use public symbols for pre-ino64 syscalls. Reviewed by: olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52687 --- lib/libsys/Symbol.map | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/libsys/Symbol.map b/lib/libsys/Symbol.map index eb71c813ae86..ae12124ca210 100644 --- a/lib/libsys/Symbol.map +++ b/lib/libsys/Symbol.map @@ -4,10 +4,4 @@ FBSDprivate_1.0 { __getosreldate; __libsys_interposing_slot; _elf_aux_info; - freebsd11_fstat; - freebsd11_fstatat; - freebsd11_getfsstat; - freebsd11_lstat; - freebsd11_stat; - freebsd11_statfs; }; From nobody Fri Sep 26 09:05:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY4Rx08VCz67ylg; Fri, 26 Sep 2025 09:05: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cY4Rw6XX3z49X3; Fri, 26 Sep 2025 09:05:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758877533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MccYAmNgVt0vKcv3DxYteiZVKK5k2lklGm8ykSKcUkU=; b=c8+l/T78/909lFrY2VWWxRRIWxx5JTaoqH8XU5wdDgrLOlASWk7Z+4iiMmCv6KNay4yTqE PUcEVRqiAcg2JEUI0RlXCJ+qtwRd6kW2FKm182tEi+guy4ldMHf21seSqhmbMNSlpGkFaM SkM9RJClQtZ8mX+USuVRWbKSsdM+S3ZeE+ItaULKoBaC27zd7X0ovTatXTokuBaTdQbRpt yYVJ96w/gk93rSQIXx61qD18a090wwd5CZpEwHc9rLUBHbtNcnt4QQTdwJ8evFnkBjxEFX FmCwaBXdayc+6yv1tOh+B69+qChzDf4GdTAkP6yFDCz3Bu54SdjKquCfbN8MMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758877533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MccYAmNgVt0vKcv3DxYteiZVKK5k2lklGm8ykSKcUkU=; b=a9au0zZnNptb6/a+kpIU4d+jpDMvt+g6n5XV+/JxFgZUMW2Q7m8CghldV9FONgelIDZHIm Rn8OG9Oao5D9/f6L86qHa4w9fd148P3ok7rmNiPKQKzsO4V+2711ZdDVrseQPlH7H2Ophl zZDd0sotehDPGlWls363nA4VjuriMQkQBLiT74gCHcRKCOdskrHHMSY4lwuk+GTJsor2Ne 9FREXhuz6pITEj4zoCJIkInjbMo3o/q7RYcVV0lXKG5wHZ1XUUBmGveb4AyYFMRDQJU28m 46FSmzTYjPxqRlTCKxrbP0kUYDrkyhhEilk2dcwUM9NhDsKkOzQL5PX5YvptsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758877533; a=rsa-sha256; cv=none; b=NHaT+WWsiHwpQwAbluOK6IVdafmT9Am0p17kgXFRtvAxjdbOx//SV+OxC8b6dcnaPuKgDL cwaDonjbfJlgvWMAELdULTqO2HPoTeygOgx42BEXDk08DnhRY+K7iYViDi1CvNepcmsg5o 9Ajz8CvUwoLRqgrXf1li/jrhQ7XnFwg0em8tDMfzt64wV1quRpsubIZd2PaiZOydjo1q+R 4ZDSK8EnhTIjki+LPMexLizZI+vlEAO2vLjK0icOqcFNKDDt2lc5Qs1Q1gKg8l9myyNTnU 7OLXqdbaydJiF+qOG5uPXZMdShQ0u2R86TlcWCZnRDF1i/8XS34L+DcYTfu94w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY4Rw67qBzhws; Fri, 26 Sep 2025 09:05:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58Q95WA4090464; Fri, 26 Sep 2025 09:05:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58Q95WTV090461; Fri, 26 Sep 2025 09:05:32 GMT (envelope-from git) Date: Fri, 26 Sep 2025 09:05:32 GMT Message-Id: <202509260905.58Q95WTV090461@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 7feac79331bc - main - libc/aarch64: fix ELF size of timingsafe_memcmp List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7feac79331bc8c77e2f8a3e71d6ea087fa17b61d Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=7feac79331bc8c77e2f8a3e71d6ea087fa17b61d commit 7feac79331bc8c77e2f8a3e71d6ea087fa17b61d Author: Paul Floyd AuthorDate: 2025-09-25 19:49:08 +0000 Commit: Robert Clausecker CommitDate: 2025-09-26 09:04:54 +0000 libc/aarch64: fix ELF size of timingsafe_memcmp Looks like a copy and paste error. The ELF size of 0 prevents Valgrind from redirecting this function. PR: 289845 Reviewed by: fuz Fixes: 3f224333af163d5fcd7547a20993dcf18f19076c See also: https://bugs.kde.org/show_bug.cgi?id=509406 Pull Request: https://github.com/freebsd/freebsd-src/pull/1854 MFC after: 1 day Event: EuroBSDcon 2025 --- lib/libc/aarch64/string/timingsafe_memcmp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/aarch64/string/timingsafe_memcmp.S b/lib/libc/aarch64/string/timingsafe_memcmp.S index 28fdd911a387..4cc10a152aa8 100644 --- a/lib/libc/aarch64/string/timingsafe_memcmp.S +++ b/lib/libc/aarch64/string/timingsafe_memcmp.S @@ -114,4 +114,4 @@ ENTRY(timingsafe_memcmp) csetm w0, lo csinc w0, w0, wzr, ls ret -END(timingsafe_bcmp) +END(timingsafe_memcmp) From nobody Fri Sep 26 10:35:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY6SF5bWqz686NM; Fri, 26 Sep 2025 10:35: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cY6SF4v04z3K4g; Fri, 26 Sep 2025 10:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758882957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eZhYdd8LVVsbjuPDQReywqecn4cqxCWWIxea+KO6mn0=; b=TC5Zq0pHwBrhNaNwEs9BTOyHIPf3hYsvkDIL+Tqm08eEnhyS5+an8LQuNrfLfy72kbQz2K i3UavliNlM9tZsPY0+hwzskQC2TQyh/QiKOxAib0qmrNOtZbh49a8tflZgUbPjRkbQK6/H Ar7os4LsJiAPS8IusrnjBOkn895WItsSGW4Za6u/RvG623U3oq/qlH3VspDH1oHlDDYw/D mwxZovsljPNoMvJuzIvrPSWo94zrxoktd2rFZD7dCJ9uOkJcJIw/j/PD0z4BY5NyuqLVmu LJZed7eg+OXxxEqnGY6pp8dT4Zjz41UbXO9UmgXc5oD5X2GLqA5IFXdnw3ltMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758882957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eZhYdd8LVVsbjuPDQReywqecn4cqxCWWIxea+KO6mn0=; b=BZp2JMujZhY1HerrDJvxwAcgT0IQUcTFSIRASr4TB0O/Z2WQ6Eca/kt0DVmKm9Es/fnh2v 9ooJQx3BW9tYH3ixf4rqMKVfXZlfFthIkZv8evqS9wVEBG/h/ja2ngQLCf72kICTTFf3yJ 1xa5nnz54B7gvXI1S84bW+bWLo7U1JUqzfvVl6SaNIM7uvoF0O1mI+T+dYspNZ/3l9iXBd iTIwimH9bqBCLKFlFuj554Imvu20mr60Pc5xRy6HJ+hwfmcJcdO6j2zovK7dx7hWdXypJY NC3IqfMITmxJLCkdWSev6E9mV8HxZ0JYV6j4e250Mff+lEzZUPf7SsJPykX8Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758882957; a=rsa-sha256; cv=none; b=C+gIu+BSav7WaBnbGdCgYYl5ie4ziYAVWtu3kIYIJKvb9MQ+zC4mJZkkwLCLhHAECTkeH7 MM58Bc7miIxE0q7ogqUQcFJrj0rleYWdse6S0QgF8qmZQ9ckGnrVo3/+plvdxC/oYgwTto YslucQH2XPDyeGou48xR8zWObR7118VibKp5CUlYQA0h36zFfV7F7paKo0BZMZB2B7ZjY5 cE/XtpKPKsWUHxgAeLosUe/uzVhLAgsc3JUZ5ytbetfrLEbgs2yPwONg5xTrCB9eXCsKbU E+Le75yRRWx+7ChwPr4F2TxJBxKXJSMQBsPrw/EqRQHqTPAy/Ra7sWC3KINVXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cY6SF4JzVzkmH; Fri, 26 Sep 2025 10:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58QAZvLi053630; Fri, 26 Sep 2025 10:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58QAZvkX053627; Fri, 26 Sep 2025 10:35:57 GMT (envelope-from git) Date: Fri, 26 Sep 2025 10:35:57 GMT Message-Id: <202509261035.58QAZvkX053627@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: eaf619fddcb2 - main - vtnet: improve interface capability handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eaf619fddcb21859311b895a0836da3171a01531 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=eaf619fddcb21859311b895a0836da3171a01531 commit eaf619fddcb21859311b895a0836da3171a01531 Author: Michael Tuexen AuthorDate: 2025-09-26 09:45:12 +0000 Commit: Michael Tuexen CommitDate: 2025-09-26 10:12:51 +0000 vtnet: improve interface capability handling Enable the handling of the IFCAP_RXCSUM_IPV6 handling by handling IFCAP_RXCSUM and IFCAP_RXCSUM_IPV6 as a pair. Also make clear, that software and hardware LRO require receive checksum offload. Reviewed by: Timo Völker MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52682 --- share/man/man4/vtnet.4 | 4 +++- sys/dev/virtio/network/if_vtnet.c | 31 +++++++++++-------------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 0594ca70e99a..636ce4cc9b60 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 16, 2025 +.Dd September 26, 2025 .Dt VTNET 4 .Os .Sh NAME @@ -54,6 +54,8 @@ TCP segmentation offload (TSO), TCP large receive offload (LRO), hardware VLAN tag stripping/insertion features, a multicast hash filter, as well as Jumbo Frames (up to 9216 bytes), which can be configured via the interface MTU setting. +TCP/UDP receive checksum offload cannot be configured independently for IPv4 +and IPv6. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit Jumbo Frames. diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 528ff3372097..a4bb57adc609 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1153,11 +1153,9 @@ vtnet_setup_interface(struct vtnet_softc *sc) } if (virtio_with_feature(dev, VIRTIO_NET_F_GUEST_CSUM)) { - if_setcapabilitiesbit(ifp, IFCAP_RXCSUM, 0); -#ifdef notyet /* BMV: Rx checksums not distinguished between IPv4 and IPv6. */ + if_setcapabilitiesbit(ifp, IFCAP_RXCSUM, 0); if_setcapabilitiesbit(ifp, IFCAP_RXCSUM_IPV6, 0); -#endif if (vtnet_tunable_int(sc, "fixup_needs_csum", vtnet_fixup_needs_csum) != 0) @@ -1370,27 +1368,20 @@ vtnet_ioctl_ifcap(struct vtnet_softc *sc, struct ifreq *ifr) if ((mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO)) == IFCAP_LRO && vtnet_software_lro(sc)) reinit = update = 0; - - if (mask & IFCAP_RXCSUM) + /* + * VirtIO does not distinguish between receive checksum offload + * for IPv4 and IPv6 packets, so treat them as a pair. + */ + if (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { if_togglecapenable(ifp, IFCAP_RXCSUM); - if (mask & IFCAP_RXCSUM_IPV6) if_togglecapenable(ifp, IFCAP_RXCSUM_IPV6); + } if (mask & IFCAP_LRO) if_togglecapenable(ifp, IFCAP_LRO); - - /* - * VirtIO does not distinguish between IPv4 and IPv6 checksums - * so treat them as a pair. Guest TSO (LRO) requires receive - * checksums. - */ - if (if_getcapenable(ifp) & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) { - if_setcapenablebit(ifp, IFCAP_RXCSUM, 0); -#ifdef notyet - if_setcapenablebit(ifp, IFCAP_RXCSUM_IPV6, 0); -#endif - } else - if_setcapenablebit(ifp, 0, - (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO)); + /* Both SW and HW TCP LRO require receive checksum offload. */ + if ((if_getcapenable(ifp) & + (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) == 0) + if_setcapenablebit(ifp, 0, IFCAP_LRO); } if (mask & IFCAP_VLAN_HWFILTER) { From nobody Fri Sep 26 11:10:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cY7Dx72Tmz688Kn for ; Fri, 26 Sep 2025 11:11:13 +0000 (UTC) (envelope-from jessicawuttig83@gmail.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cY7Dx2DJtz3N7t for ; Fri, 26 Sep 2025 11:11:13 +0000 (UTC) (envelope-from jessicawuttig83@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=bAQbKkGy; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of jessicawuttig83@gmail.com designates 2a00:1450:4864:20::130 as permitted sender) smtp.mailfrom=jessicawuttig83@gmail.com Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-57bd482dfd2so2444406e87.2 for ; Fri, 26 Sep 2025 04:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1758885066; x=1759489866; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=/BpFiPyXa7acb7VVyriqpYqLSyrJyMRQZIZR54dHfKk=; b=bAQbKkGyANiYMHcMqhz2XoJqDP1LhPKx09o7cDnYrbrpUcOz3xlLEor529ZLiTTLFY vUNRYO7bw1ZBV2i7I4dh+PWJaB+bcKK7daSiX/qLmEOPkrQvJdBcDyRZSnhb2DUOiB+f WGT+Rk7ebxeRoDl66eWh24LQdolCVkDbQArLGSc3ikaR8WJ/NsUXznysyEYglHmCqoPZ 6KIU9VgxUG0AWu3EwXLJztXkVufBtf0i2nCktgqBrbhDfdRhGZhOf5B5E5b1kiCEPCeX bFOaU5N+7ak+mAwJbElBTRRXZB8w6NB04UjkL+V9FDECgqqYCKivONsnUuKF5j5ozwCX UbPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758885066; x=1759489866; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/BpFiPyXa7acb7VVyriqpYqLSyrJyMRQZIZR54dHfKk=; b=YG5yij5BNpnyCZhvbxHBIaJwV2XsHwHBY/ZSILPGeJpjsJhrvISOObuZI3aZfu67aF ZBkOg3zNXdy1QefUY0dwEguJrIbTPw0TLmCxvUx4oTt4LFCfbK8KUPmSnE88wUU53n9j JXygrPQlQCi65eiMdG/77o6gHOiSH9iekP7CI4Ir3Tdtomf6OAN8vxInWcsz6tStUeVc YDMbQr7HukVkP8CBSX4iUPbSKEZmM9Uf9Px47d34yFJ10YUFt//8BGOx4zqWRl2h2KxZ JCDpk+CYTbtdinxu3eYfWHeFqejZL5MU4IwmV4Q5To7sy7qcap6/LVB0u+oegnmfMUK/ Rgyw== X-Gm-Message-State: AOJu0YyoCCGf2lQH5r8tc0LVx18u8rYbvdkkuXkVGiiQbogZk6uZzsEH PI8ZC1fhIx0hwX7KDwLaOn4/1RMDOGkZmWrK1TyO0K5nfyUcIkG2dg+CZv5RnT3qsvR3PHhKolb BbV1Rwrm82lbieV2/W9ORDt7gqNF++sbhncMSVHdXOaw8 X-Gm-Gg: ASbGncvOWly4yx6ApGNaLC/+AF1clxaNpUxfKI3X4yVBwVPZkLaducQ2zLc7xo/Oh3+ geyOgFKJmKtzl0t7rahMNiSYLx9t3QqGuBqH1kJso8BNXsyONmLfPlERNDDHBPRx+63id70rNix wjNQd9SqNxX4iK2hwY08/cURp+y+x9I+3OnsO1lfZQYVQUVH3czAtXt8ItmIOrg03rbKeD4OGHM Dhj2LkI+RFOIvPlcIlbP0sl5bJWx/fRNo/JE6o= X-Google-Smtp-Source: AGHT+IFU7/4Ksp+7XSXLOfKBNtyCaOghquVGrCm46K4LUH6YVmO5aEPF+dt/WVwO3LcNU+QUBE6gNLbpI4QZMx+Gj0w= X-Received: by 2002:ac2:4c90:0:b0:585:1ca7:1b7b with SMTP id 2adb3069b0e04-5851ca71dc6mr80911e87.31.1758885065741; Fri, 26 Sep 2025 04:11:05 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 From: Jessica Wuttig Date: Fri, 26 Sep 2025 12:10:53 +0100 X-Gm-Features: AS18NWDMVG82w78koj0xAkUpsC1DjLKjTnLbnwXqubfIHNILZRB_o3qAcfa79T4 Message-ID: Subject: =?UTF-8?B?2KPZgdi22YQgMTAg2YXZiNin2YLYuSDZhNmE2KjYrdirINi52YYg2LnZhdmEINmB2Yog?= =?UTF-8?B?2KfZhNmF2LrYsdioICgyMDI1KQ==?= To: dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000008b587a063fb2575d" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.41 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.51)[-0.509]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_BASE64_TEXT(0.10)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::130:from] X-Rspamd-Queue-Id: 4cY7Dx2DJtz3N7t --0000000000008b587a063fb2575d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 2KPZgdi22YQgMTAg2YXZiNin2YLYuSDZhNmE2KjYrdirINi52YYg2LnZhdmEINmB2Yog2KfZhNmF 2LrYsdioICgyMDI1KQ0KDQrZgdix2LUg2LnZhdmEINmF2YbYp9iz2KjYqSDZgdmKINis2YXZiti5 INin2YTZhdiv2YYg2YjYp9mE2YLYt9in2LnYp9iqDQrZhdmC2K/ZhdipDQoNCtmB2Yog2LjZhCDY p9mE2YXZhtin2YHYs9ipINin2YTYtNiv2YrYr9ipINmI2KrYstin2YrYryDYo9i52K/Yp9ivINin 2YTYqNin2K3Yq9mK2YYg2LnZhiDYudmF2YTYjCDYo9i12KjYrSDYp9mE2KrZiNi42YrZgSDZgdmK INin2YTZhdi62LHYqA0K2YrYudiq2YXYryDYqNi02YPZhCDZg9io2YrYsSDYudmE2Ykg2YXZiNin 2YLYuSDYqtmI2LjZitmBINil2YTZg9iq2LHZiNmG2YrYqSDZhdiq2K7Ytdi12KkuINiq2YjZgdix INmH2LDZhyDYp9mE2YXZhti12KfYqiDZgdix2LXZi9inDQrYrdmC2YrZgtmK2Kkg2YTZgCDYudix 2YjYtiDYp9mE2KrZiNi42YrZgSDZgdmKINmF2KzYp9mE2KfYqiDZhdiq2LnYr9iv2KnYjCDYs9mI 2KfYoSDZgdmKINin2YTZgti32KfYuSDYp9mE2K7Yp9i1INij2Ygg2KfZhNiq2YjYuNmK2YENCtin 2YTYudmF2YjZhdmK2Iwg2YjYqti02YXZhCDZhdiv2YbZi9inINmD2KjYsdmJINmF2KvZhCDYp9mE 2K/Yp9ixINin2YTYqNmK2LbYp9ih2Iwg2KfZhNix2KjYp9i32Iwg2YXYsdin2YPYtCDZiNi32YbY rNipLg0KDQrYpdiw2Kcg2YPZhtiqINiq2KjYrdirINi52YYg2YjYuNmK2YHYqSDYudmGINio2LnY ryDYo9mIINiq2YjYuNmK2YEg2YHZiNix2YrYjCDZitmF2YPZhtmDINin2YTYp9i52KrZhdin2K8g 2LnZhNmJINmF2YbYtdipINmF2LHZhg0K2YTZhNiq2YjYuNmK2YHYjCDZhdmI2YLYuSDZhdix2KzY p9mGINmE2YTYqtmI2LjZitmB2Iwg2KPZiCDYrdiq2YkgbGlua2VkaW4g2YTZhNiq2YjYuNmK2YEu INmD2YXYpyDYqtmC2K/ZhSDYtNix2YPYp9iqINmD2KjYsdmJDQrZhdir2YQg2KfZhNmF2LHYp9i5 2Yog2KrZiNi42YrZgdiMINiq2YjYuNmK2YEg2YbZiNmGINmI2YbZitmI2YUg2KrZiNi42YrZgSDZ gdix2LXZi9inINmF2YXZitiy2KkuDQoNCtmF2YYg2K7ZhNin2YQg2YfYsNmHINio2YjYp9io2KfY qiDYp9mE2KrZiNi42YrZgdiMINmK2YXZg9mG2YMg2KfZhNmI2LXZiNmEINio2LPZh9mI2YTYqSDY pdmE2Ykg2YjYuNin2KbZgSDYtNix2YPYp9iq2Iwg2KXYudmE2KfZhtin2KoNCtiq2YjYuNmK2YHY jCDZiNit2KrZiSDZiNi42KfYptmBINit2YPZiNmF2YrYqdiMINmF2YXYpyDZitis2LnZhNmH2Kcg 2KPYr9mI2KfYqiDYttix2YjYsdmK2Kkg2YTYo9mKINi52KfYt9mEINmE2YTYqtmI2LjZitmBINmK 2KjYrdirINi52YYNCtmB2LHYtdipINit2YLZitmC2YrYqS4NCiAxLiBUQVJHSVIuYyA8aHR0cHM6 Ly93d3cudGFyZ2lyLmNvbS8+b20g4oCTINij2YjZhCDZhdmG2LXYqSDZhdi62LHYqNmK2KkNCjxo dHRwczovL3d3dy50YXJnaXIuY29tLz4g2LTYp9mF2YTYqSDZhNmE2KrZiNi42YrZgQ0KDQrZitmP 2LnYryDZhdmI2YLYuSBUQVJHSVIg2YXZhiDYo9it2K/YqyDZiNij2LPYsdi5INmF2YbYtdin2Kog 2KfZhNiq2YjYuNmK2YEg2YbZhdmI2YvYpyDZgdmKINin2YTZhdi62LHYqNiMINit2YrYqyDZitis 2YXYuSDYqNmK2YYNCtmB2LHYtSDZiNi42YrZgdmK2Kkg2YXYqti52K/Yr9ipINiq2LTZhdmEINin 2YTYqNit2Ksg2LnZhiDYudmF2YTYjCDYqNix2KfZhdisINin2YTYqtiv2LHZitio2Iwg2YjYp9mE 2KrZiNis2YrZhyDYp9mE2YXZh9mG2YouINmK2KrZititDQrYp9mE2YXZiNmC2Lkg2KfZhNmI2LXZ iNmEINil2YTZiSDYqtmI2LjZitmBINi02LHZg9in2Kog2YPYqNix2Ykg2YXYq9mEINmF2YPYqtio 2Kkg2KzYsdmK2LEg2KrZiNi42YrZgdiMINiz2KfYqNmDINiq2YjYuNmK2YHYjCDZiNi02LHZg9ip DQrYqNmK2LHZitmGINiq2YjYuNmK2YHYjCDZg9mF2Kcg2YrZj9i52KrYqNixINio2YjYp9io2Kkg 2YHYudin2YTYqSDZhNmE2LHYp9i62KjZitmGINmB2Yog2KrZgtiv2YrZhSDYt9mE2Kgg2KrZiNi4 2YrZgSDZhNiv2Ykg2YjYstin2LHYqQ0K2KfZhNiz2YrYp9it2KnYjCDYo9mIINi52KjYsSDYp9mE 2YXZhti12Kkg2KfZhNmI2LfZhtmK2Kkg2YTZhNiq2YjYuNmK2YEuDQoNCtiz2YjYp9ihINmD2YbY qiDYqtio2K3YqyDYudmGINmI2LjYp9im2YEg2YXZhiDYp9mE2YXZhtiy2YQg2YTZhNiz2YrYr9in 2KrYjCDYo9mIINiq2LHYutioINmB2Yog2KrZiNi42YrZgSDYudmGINio2LnYryDZhNmE2YbYs9in 2KHYjA0K2KPZiCDYrdiq2Ykg2KrZiNi42YrZgSDZgdmI2LHZiiDZgdmKINi02LHZg9in2Kog2YXY q9mEINmD2YbYqtin2YPZitiMINiz2YrZgdmI2LHYp9iMINij2Ygg2KfZhNiu2LfZiNi3INin2YTY s9i52YjYr9mK2KnYjCDZgdil2YYNClRBUkdJUiDZitmC2K/ZhSDYrdmE2YjZhNmL2Kcg2LDZg9mK 2Kkg2YjYs9ix2YrYudipLiDZg9mF2Kcg2YrYqtmK2K0g2YTZgyDYp9mE2KrZgtiv2YrZhSDYudmE 2Ykg2YjYuNin2KbZgSDZhNiv2Ykg2LTYsdmD2KkNCtij2LHYp9mF2YPZiNiMINi02LHZg9ipINin 2YTZhdis2KfZhCDZhNmE2KrZiNi42YrZgSDYp9mE2YbYs9in2KbZitiMINmI2LTYsdmD2Kkg2LnY qNiv2KfZhNmE2LfZitmBINis2YXZitmEINiq2YjYuNmK2YHYjCDZiNi62YrYsdmH2Kcg2YXZhg0K 2KPYqNix2LIg2YXZiNin2YLYuSDYp9mE2KrZiNi42YrZgSDZgdmKINin2YTZhdi62LHYqCDZiNin 2YTYrtmE2YrYrC4NCtmF2YXZitiy2KfYqiBUQVJHSVI6DQoNCtil2LnZhNin2YbYp9iqINiq2YjY uNmK2YEg2YXYrdiv2KvYqSDZitmI2YXZitmL2Kcg2YHZiiDZhdiu2KrZhNmBINin2YTZgti32KfY udin2KouDQoNCtmI2KfYrNmH2Kkg2KfYs9iq2K7Yr9in2YUg2LPZh9mE2Kkg2YjZhdiu2LXYtdip INit2LPYqCDYp9mE2YXYr9mK2YbYqSDYo9mIINin2YTZhdis2KfZhC4NCg0K2K7Yr9mF2KfYqiDZ hdis2KfZhtmK2Kkg2YTYpdmG2LTYp9ihINiz2YrYsdipINiw2KfYqtmK2Kkg2KfYrdiq2LHYp9mB 2YrYqS4NCg0K2KXZhdmD2KfZhtmK2Kkg2KrZhNmC2Yog2KrZhtio2YrZh9in2Kog2KrZhNmC2KfY ptmK2Kkg2K3ZiNmEINin2YTZiNi42KfYptmBINin2YTZhdmG2KfYs9io2KkuDQoNCtmK2Y/Yudiv INmH2LDYpyDYp9mE2YXZiNmC2Lkg2KfZhNmF2KvYp9mE2Yog2YTZhdmGINmK2KjYrdirINi52YYg 2YjYuNin2KbZgSDZgdmKINin2YTZhdi62LHYqNiMINiu2LXZiNi12YvYpyDZgdmKINmF2KzYp9mE 2KfYqg0K2KfZhNmF2KjZiti52KfYqtiMINin2YTYpdiv2KfYsdip2Iwg2KfZhNiq2LnZhNmK2YXY jCDZiNin2YTYrtiv2YXYp9iqLiDZitmI2YHYsSDYp9mE2YXZiNmC2Lkg2YHYsdi12YvYpyDZhdiq 2YbZiNi52Kkg2KrYtNmF2YQg2KXYudmE2KfZhtin2KoNCtin2YTYqtmI2LjZitmBINmB2Yog2LTY sdmD2KfYqiDZg9io2LHZiSDZhdir2YQga3BjINiq2YjYuNmK2YHYjCBtYXhpbXVzINiq2YjYuNmK 2YHYjCDZiG5naGEg2KrZiNi42YrZgdiMINio2KfZhNil2LbYp9mB2KkNCtil2YTZiSDZgdix2LUg 2LnYqNixINmF2YbYtdipIHVlcCDZhNmE2KrZiNi42YrZgS4NCg0K2YPZhdinINmK2LrYt9mKINin 2YTZhdmI2YLYuSDZiNi42KfYptmBINmB2Yog2KfZhNmC2LfYp9i52YrZhiDYp9mE2LnYp9mFINmI 2KfZhNiu2KfYtdiMINmF2Lkg2LHYqNi3INmF2KjYp9i02LEg2KjZhdmG2LXYp9iqINmF2KvZhA0K 2KPYqNi02LEg2YTZhNiq2YjYuNmK2YHYjCDYp9mE2KrZiiDYqtmC2K/ZhSDZiNi42KfYptmBINmB 2Yog2KfZhNmF2KzYp9mE2KfYqiDYp9mE2KPZhdmG2YrYqSDZiNin2YTYrNmI2KfYstin2Kog2YjY p9mE2K/Zgdin2Lkg2KfZhNmF2K/ZhtmKLg0K2YrZhdmD2YbZgyDYo9mK2LbZi9inINin2YTYp9i3 2YTYp9i5INi52YTZiSDYpdis2LHYp9ih2KfYqiDYp9mE2KrZiNi42YrZgSDZgdmKINmF2K7YqtmE 2YEg2KfZhNmF2KTYs9iz2KfYqiDZhdir2YQg2YjYstin2LHYqSDYp9mE2KrYsdio2YrYqQ0K2YjY p9mE2KrYudmE2YrZhSDZiNmF2LPYqti02YHZiSDYp9mE2YXZhNmDINmB2YrYtdmEINin2YTYqtiu 2LXYtdmKLg0KDQrZiti02YXZhCDYp9mE2YXZiNmC2Lkg2YHYsdi12YvYpyDZgdmKINi02LHZg9in 2Kog2LnYp9mE2YXZitipINmF2KvZhCDYtNmE2YXYqNix2KzZitixINiq2YjYuNmK2YHYjCDYo9ix 2KfZhdmD2Ygg2KfZhNiq2YjYuNmK2YENCtin2YTZhdio2KfYtNix2Iwg2YjYpdiv2KfYsdipINio 2YbYr9mHINmE2YTYqtmI2LjZitmBLiDZg9mF2Kcg2YrYqtmK2K0g2YTZgyDZhdiq2KfYqNi52Kkg 2KLYrtixINin2YTZiNi42KfYptmBINin2YTYrdmD2YjZhdmK2KkNCtin2YTZhdi52YTZhiDYudmG 2YfYp9iMINmI2KXYudmE2KfZhtin2Kog2KrZiNi42YrZgSAyMDIyINmB2Yog2YXYrtiq2YTZgSDY p9mE2YLYt9in2LnYp9iqINmE2LbZhdin2YYg2YHYsdi1INiq2YjYuNmK2YEg2YHZiNix2YoNCtmF 2YbYp9iz2KjYqS4NCg== --0000000000008b587a063fb2575d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+PGgxIHN0eWxlPSJ0ZXh0LWFsaWduOnJpZ2h0Ij48c3BhbiBzdHlsZT0i Y29sb3I6cmVkO2ZvbnQtc2l6ZTptZWRpdW0iPtij2YHYttmEIDEwINmF2YjYp9mC2Lkg2YTZhNio 2K3YqyDYudmGINi52YXZhCDZgdmKINin2YTZhdi62LHYqCAoMjAyNSk8L3NwYW4+PC9oMT48cCBz dHlsZT0idGV4dC1hbGlnbjpyaWdodCI+PHNwYW4gc3R5bGU9ImZvbnQtc2l6ZTptZWRpdW0iPtmB 2LHYtSDYudmF2YQg2YXZhtin2LPYqNipINmB2Yog2KzZhdmK2Lkg2KfZhNmF2K/ZhiDZiNin2YTZ gti32KfYudin2Ko8L3NwYW4+PC9wPjxoMyBzdHlsZT0idGV4dC1hbGlnbjpyaWdodCI+PHNwYW4g c3R5bGU9ImNvbG9yOnJnYig1NiwxMTgsMjkpO2ZvbnQtc2l6ZTptZWRpdW0iPtmF2YLYr9mF2Kk8 L3NwYW4+PC9oMz48cCBzdHlsZT0idGV4dC1hbGlnbjpyaWdodCI+PHNwYW4gc3R5bGU9ImZvbnQt c2l6ZTptZWRpdW0iPtmB2Yog2LjZhCDYp9mE2YXZhtin2YHYs9ipINin2YTYtNiv2YrYr9ipINmI 2KrYstin2YrYryDYo9i52K/Yp9ivINin2YTYqNin2K3Yq9mK2YYg2LnZhiDYudmF2YTYjCDYo9i1 2KjYrSDYp9mE2KrZiNi42YrZgSDZgdmKINin2YTZhdi62LHYqCDZiti52KrZhdivINio2LTZg9mE INmD2KjZitixINi52YTZiSDZhdmI2KfZgti5INiq2YjYuNmK2YEg2KXZhNmD2KrYsdmI2YbZitip INmF2KrYrti12LXYqS4g2KrZiNmB2LEg2YfYsNmHINin2YTZhdmG2LXYp9iqINmB2LHYtdmL2Kcg 2K3ZgtmK2YLZitipINmE2YAg2LnYsdmI2LYg2KfZhNiq2YjYuNmK2YEg2YHZiiDZhdis2KfZhNin 2Kog2YXYqti52K/Yr9ip2Iwg2LPZiNin2KEg2YHZiiDYp9mE2YLYt9in2Lkg2KfZhNiu2KfYtSDY o9mIINin2YTYqtmI2LjZitmBINin2YTYudmF2YjZhdmK2Iwg2YjYqti02YXZhCDZhdiv2YbZi9in INmD2KjYsdmJINmF2KvZhCDYp9mE2K/Yp9ixINin2YTYqNmK2LbYp9ih2Iwg2KfZhNix2KjYp9i3 2Iwg2YXYsdin2YPYtCDZiNi32YbYrNipLjxicj48YnI+2KXYsNinINmD2YbYqiDYqtio2K3YqyDY udmGINmI2LjZitmB2Kkg2LnZhiDYqNi52K8g2KPZiCDYqtmI2LjZitmBINmB2YjYsdmK2Iwg2YrZ hdmD2YbZgyDYp9mE2KfYudiq2YXYp9ivINi52YTZiSDZhdmG2LXYqSDZhdix2YYg2YTZhNiq2YjY uNmK2YHYjCDZhdmI2YLYuSDZhdix2KzYp9mGINmE2YTYqtmI2LjZitmB2Iwg2KPZiCDYrdiq2Ykg bGlua2VkaW4g2YTZhNiq2YjYuNmK2YEuINmD2YXYpyDYqtmC2K/ZhSDYtNix2YPYp9iqINmD2KjY sdmJINmF2KvZhCDYp9mE2YXYsdin2LnZiiDYqtmI2LjZitmB2Iwg2KrZiNi42YrZgSDZhtmI2YYg 2YjZhtmK2YjZhSDYqtmI2LjZitmBINmB2LHYtdmL2Kcg2YXZhdmK2LLYqS48YnI+PGJyPtmF2YYg 2K7ZhNin2YQg2YfYsNmHINio2YjYp9io2KfYqiDYp9mE2KrZiNi42YrZgdiMINmK2YXZg9mG2YMg 2KfZhNmI2LXZiNmEINio2LPZh9mI2YTYqSDYpdmE2Ykg2YjYuNin2KbZgSDYtNix2YPYp9iq2Iwg 2KXYudmE2KfZhtin2Kog2KrZiNi42YrZgdiMINmI2K3YqtmJINmI2LjYp9im2YEg2K3Zg9mI2YXZ itip2Iwg2YXZhdinINmK2KzYudmE2YfYpyDYo9iv2YjYp9iqINi22LHZiNix2YrYqSDZhNij2Yog 2LnYp9i32YQg2YTZhNiq2YjYuNmK2YEg2YrYqNit2Ksg2LnZhiDZgdix2LXYqSDYrdmC2YrZgtmK 2KkuPC9zcGFuPjxzcGFuIHN0eWxlPSJjb2xvcjpyZ2IoNTYsMTE4LDI5KTtmb250LXNpemU6bWVk aXVtIj7CoDwvc3Bhbj48L3A+PGgyIHN0eWxlPSJ0ZXh0LWFsaWduOnJpZ2h0Ij48c3BhbiBzdHls ZT0iY29sb3I6cmdiKDU2LDExOCwyOSk7Zm9udC1zaXplOm1lZGl1bSI+wqAxLiA8YSBocmVmPSJo dHRwczovL3d3dy50YXJnaXIuY29tLyI+VEFSR0lSLmM8L2E+b20g4oCTIDxhIGhyZWY9Imh0dHBz Oi8vd3d3LnRhcmdpci5jb20vIj7Yo9mI2YQg2YXZhti12Kkg2YXYutix2KjZitipPC9hPiDYtNin 2YXZhNipINmE2YTYqtmI2LjZitmBPC9zcGFuPjwvaDI+PHAgc3R5bGU9InRleHQtYWxpZ246cmln aHQiPjxzcGFuIHN0eWxlPSJjb2xvcjpyZ2IoNTYsMTE4LDI5KTtmb250LXNpemU6bWVkaXVtIj7Z itmP2LnYryDZhdmI2YLYuSBUQVJHSVIgPC9zcGFuPjxzcGFuIHN0eWxlPSJmb250LXNpemU6bWVk aXVtIj7ZhdmGINij2K3Yr9irINmI2KPYs9ix2Lkg2YXZhti12KfYqiDYp9mE2KrZiNi42YrZgSDZ htmF2YjZi9inINmB2Yog2KfZhNmF2LrYsdio2Iwg2K3ZitirINmK2KzZhdi5INio2YrZhiDZgdix 2LUg2YjYuNmK2YHZitipINmF2KrYudiv2K/YqSDYqti02YXZhCDYp9mE2KjYrdirINi52YYg2LnZ hdmE2Iwg2KjYsdin2YXYrCDYp9mE2KrYr9ix2YrYqNiMINmI2KfZhNiq2YjYrNmK2Ycg2KfZhNmF 2YfZhtmKLiDZitiq2YrYrSDYp9mE2YXZiNmC2Lkg2KfZhNmI2LXZiNmEINil2YTZiSDYqtmI2LjZ itmBINi02LHZg9in2Kog2YPYqNix2Ykg2YXYq9mEINmF2YPYqtio2Kkg2KzYsdmK2LEg2KrZiNi4 2YrZgdiMINiz2KfYqNmDINiq2YjYuNmK2YHYjCDZiNi02LHZg9ipINio2YrYsdmK2YYg2KrZiNi4 2YrZgdiMINmD2YXYpyDZitmP2LnYqtio2LEg2KjZiNin2KjYqSDZgdi52KfZhNipINmE2YTYsdin 2LrYqNmK2YYg2YHZiiDYqtmC2K/ZitmFINi32YTYqCDYqtmI2LjZitmBINmE2K/ZiSDZiNiy2KfY sdipINin2YTYs9mK2KfYrdip2Iwg2KPZiCDYudio2LEg2KfZhNmF2YbYtdipINin2YTZiNi32YbZ itipINmE2YTYqtmI2LjZitmBLjxicj48YnI+2LPZiNin2KEg2YPZhtiqINiq2KjYrdirINi52YYg 2YjYuNin2KbZgSDZhdmGINin2YTZhdmG2LLZhCDZhNmE2LPZitiv2KfYqtiMINij2Ygg2KrYsdi6 2Kgg2YHZiiDYqtmI2LjZitmBINi52YYg2KjYudivINmE2YTZhtiz2KfYodiMINij2Ygg2K3YqtmJ INiq2YjYuNmK2YEg2YHZiNix2Yog2YHZiiDYtNix2YPYp9iqINmF2KvZhCDZg9mG2KrYp9mD2YrY jCDYs9mK2YHZiNix2KfYjCDYo9mIINin2YTYrti32YjYtyDYp9mE2LPYudmI2K/Zitip2Iwg2YHY pdmGIFRBUkdJUiDZitmC2K/ZhSDYrdmE2YjZhNmL2Kcg2LDZg9mK2Kkg2YjYs9ix2YrYudipLiDZ g9mF2Kcg2YrYqtmK2K0g2YTZgyDYp9mE2KrZgtiv2YrZhSDYudmE2Ykg2YjYuNin2KbZgSDZhNiv 2Ykg2LTYsdmD2Kkg2KPYsdin2YXZg9mI2Iwg2LTYsdmD2Kkg2KfZhNmF2KzYp9mEINmE2YTYqtmI 2LjZitmBINin2YTZhtiz2KfYptmK2Iwg2YjYtNix2YPYqSDYudio2K/Yp9mE2YTYt9mK2YEg2KzZ hdmK2YQg2KrZiNi42YrZgdiMINmI2LrZitix2YfYpyDZhdmGINij2KjYsdiyINmF2YjYp9mC2Lkg 2KfZhNiq2YjYuNmK2YEg2YHZiiDYp9mE2YXYutix2Kgg2YjYp9mE2K7ZhNmK2KwuwqA8L3NwYW4+ PC9wPjxoMyBzdHlsZT0idGV4dC1hbGlnbjpyaWdodCI+PHNwYW4gc3R5bGU9ImNvbG9yOnJnYigx OSw3OSw5Mik7Zm9udC1zaXplOm1lZGl1bSI+2YXZhdmK2LLYp9iqIFRBUkdJUjrCoDwvc3Bhbj48 L2gzPjxwIHN0eWxlPSJ0ZXh0LWFsaWduOnJpZ2h0Ij48c3BhbiBzdHlsZT0iZm9udC1zaXplOm1l ZGl1bSI+2KXYudmE2KfZhtin2Kog2KrZiNi42YrZgSDZhdit2K/Yq9ipINmK2YjZhdmK2YvYpyDZ gdmKINmF2K7YqtmE2YEg2KfZhNmC2LfYp9i52KfYqi7CoDwvc3Bhbj48L3A+PHAgc3R5bGU9InRl eHQtYWxpZ246cmlnaHQiPjxzcGFuIHN0eWxlPSJmb250LXNpemU6bWVkaXVtIj7ZiNin2KzZh9ip INin2LPYqtiu2K/Yp9mFINiz2YfZhNipINmI2YXYrti12LXYqSDYrdiz2Kgg2KfZhNmF2K/ZitmG 2Kkg2KPZiCDYp9mE2YXYrNin2YQuPC9zcGFuPjwvcD48cCBzdHlsZT0idGV4dC1hbGlnbjpyaWdo dCI+PHNwYW4gc3R5bGU9ImZvbnQtc2l6ZTptZWRpdW0iPtiu2K/Zhdin2Kog2YXYrNin2YbZitip INmE2KXZhti02KfYoSDYs9mK2LHYqSDYsNin2KrZitipINin2K3Yqtix2KfZgdmK2KkuPC9zcGFu PjwvcD48cCBzdHlsZT0idGV4dC1hbGlnbjpyaWdodCI+PHNwYW4gc3R5bGU9ImZvbnQtc2l6ZTpt ZWRpdW0iPtil2YXZg9in2YbZitipINiq2YTZgtmKINiq2YbYqNmK2YfYp9iqINiq2YTZgtin2KbZ itipINit2YjZhCDYp9mE2YjYuNin2KbZgSDYp9mE2YXZhtin2LPYqNipLjwvc3Bhbj48L3A+PHAg c3R5bGU9InRleHQtYWxpZ246cmlnaHQiPjxzcGFuIHN0eWxlPSJmb250LXNpemU6bWVkaXVtIj7Z itmP2LnYryDZh9iw2Kcg2KfZhNmF2YjZgti5INin2YTZhdir2KfZhNmKINmE2YXZhiDZitio2K3Y qyDYudmGINmI2LjYp9im2YEg2YHZiiDYp9mE2YXYutix2KjYjCDYrti12YjYtdmL2Kcg2YHZiiDZ hdis2KfZhNin2Kog2KfZhNmF2KjZiti52KfYqtiMINin2YTYpdiv2KfYsdip2Iwg2KfZhNiq2LnZ hNmK2YXYjCDZiNin2YTYrtiv2YXYp9iqLiDZitmI2YHYsSDYp9mE2YXZiNmC2Lkg2YHYsdi12YvY pyDZhdiq2YbZiNi52Kkg2KrYtNmF2YQg2KXYudmE2KfZhtin2Kog2KfZhNiq2YjYuNmK2YEg2YHZ iiDYtNix2YPYp9iqINmD2KjYsdmJINmF2KvZhCBrcGMg2KrZiNi42YrZgdiMIG1heGltdXMg2KrZ iNi42YrZgdiMINmIbmdoYSDYqtmI2LjZitmB2Iwg2KjYp9mE2KXYttin2YHYqSDYpdmE2Ykg2YHY sdi1INi52KjYsSDZhdmG2LXYqSB1ZXAg2YTZhNiq2YjYuNmK2YEuPGJyPjxicj7Zg9mF2Kcg2YrY uti32Yog2KfZhNmF2YjZgti5INmI2LjYp9im2YEg2YHZiiDYp9mE2YLYt9in2LnZitmGINin2YTY udin2YUg2YjYp9mE2K7Yp9i12Iwg2YXYuSDYsdio2Lcg2YXYqNin2LTYsSDYqNmF2YbYtdin2Kog 2YXYq9mEINij2KjYtNixINmE2YTYqtmI2LjZitmB2Iwg2KfZhNiq2Yog2KrZgtiv2YUg2YjYuNin 2KbZgSDZgdmKINin2YTZhdis2KfZhNin2Kog2KfZhNij2YXZhtmK2Kkg2YjYp9mE2KzZiNin2LLY p9iqINmI2KfZhNiv2YHYp9i5INin2YTZhdiv2YbZii4g2YrZhdmD2YbZgyDYo9mK2LbZi9inINin 2YTYp9i32YTYp9i5INi52YTZiSDYpdis2LHYp9ih2KfYqiDYp9mE2KrZiNi42YrZgSDZgdmKINmF 2K7YqtmE2YEg2KfZhNmF2KTYs9iz2KfYqiDZhdir2YQg2YjYstin2LHYqSDYp9mE2KrYsdio2YrY qSDZiNin2YTYqti52YTZitmFINmI2YXYs9iq2LTZgdmJINin2YTZhdmE2YMg2YHZiti12YQg2KfZ hNiq2K7Ytdi12YouPGJyPjxicj7Ziti02YXZhCDYp9mE2YXZiNmC2Lkg2YHYsdi12YvYpyDZgdmK INi02LHZg9in2Kog2LnYp9mE2YXZitipINmF2KvZhCDYtNmE2YXYqNix2KzZitixINiq2YjYuNmK 2YHYjCDYo9ix2KfZhdmD2Ygg2KfZhNiq2YjYuNmK2YEg2KfZhNmF2KjYp9i02LHYjCDZiNil2K/Y p9ix2Kkg2KjZhtiv2Ycg2YTZhNiq2YjYuNmK2YEuINmD2YXYpyDZitiq2YrYrSDZhNmDINmF2KrY p9io2LnYqSDYotiu2LEg2KfZhNmI2LjYp9im2YEg2KfZhNit2YPZiNmF2YrYqSDYp9mE2YXYudmE 2YYg2LnZhtmH2KfYjCDZiNil2LnZhNin2YbYp9iqINiq2YjYuNmK2YEgMjAyMiDZgdmKINmF2K7Y qtmE2YEg2KfZhNmC2LfYp9i52KfYqiDZhNi22YXYp9mGINmB2LHYtSDYqtmI2LjZitmBINmB2YjY sdmKINmF2YbYp9iz2KjYqS48L3NwYW4+PC9wPjwvZGl2Pg0K --0000000000008b587a063fb2575d-- From nobody Fri Sep 26 15:09:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYDWZ1jJJz68RqM; Fri, 26 Sep 2025 15:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYDWZ0zBGz3kTB; Fri, 26 Sep 2025 15:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758899354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sQlvNI6m4BLvalHWarGk+CxXL0Uirz+hlKYkRggLhVw=; b=tuctzO4Q/91GNwCp716hDLrEikiJLXV5EoS71MVHlpgmunl0BdhMMIFweGFRazLpPSBiqz lYQ7WN/ZZsQQZzss8WVCAZhWQmoxInd+g8T0zE9FqBqAf1RUjaxa55VGPG6OZdYsrYl1T1 ScFiVsrsQjmcF0bEdrBazsVI9m+LJTeu5T8Zcc+y2xAZGAPOXuGMdqIYh9jUsrNRAxlaav MbBueM/c+zEqsB8P88A/EbJoDnl0MmHPLJx1bDW+f1YTV5TPZ/qNzHZVW+J1lmjYaFlDa1 vnuMCQ2W+jaF6+3RxmooIUKvlRZXUYio5onl0pwO/zfowZkzuS4N8Uc7YLXvkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758899354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sQlvNI6m4BLvalHWarGk+CxXL0Uirz+hlKYkRggLhVw=; b=ukJKQcJs/Ue8uGAebgHjCpcOlq1z1BUmurqH862rTONG1M/qxXqXxWr6x1NamN3UuFLODZ KGVz4UwC6ae8yCvvQb0qwIgpauJwJiMFdThQ5zVEvmVMu5xBpBu9sAFem+0c0GpHhr0Hek cnuOoEdNaKWVLADU2/rd7oaDTE3GZWinJoFmXhsHjKU1i+OiX427yvUxCYIbxKWzX/FVA0 slJTyA/xutXFYrM+MhvJXxiDnfso++B1O+dS+f57K15M2+fq+J9/HzhqfzbqiA1oRG3glo lSQqafUP4iDZbkQws+VSqNdeKsbieb6uVOVZe/imrJJv/mzW70djrCEnBhrMLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758899354; a=rsa-sha256; cv=none; b=WEoPz11urLD5Bhbq7a697ebJYdTAg8XadskEzbll99KFoi2rNSxVGXOVBXpyN3MXqxtYGX vq67zArSoFGvCZQPpShCW9faNAl8Cd6/lsxFKquCayU4puAoetZBspRxTq+WfrwbkLgkFp gCUJczTi1i0rKpvWSfdW97K8d4wgHGjWRcqwJyBLrlgJC4tyI53GMcLa4fh9L7EL3eHn4F qj54UL4KecNaukNBWaIBWdMAHdMHqUgZc8fVgIPVOP6GoTGXQVO8Thmn/xQw6CY1kKGGbU RrCwqHgQYUpJ1Vv6bOFK14tKLssmRUKKjmM2Gw5IezIX0COCI7V68g0BnbApfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYDWZ0PRBzsrH; Fri, 26 Sep 2025 15:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58QF9DFJ058125; Fri, 26 Sep 2025 15:09:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58QF9DuY058123; Fri, 26 Sep 2025 15:09:13 GMT (envelope-from git) Date: Fri, 26 Sep 2025 15:09:13 GMT Message-Id: <202509261509.58QF9DuY058123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: cee4802d0e2a - main - arm64: Mark EFI memory as userspace non-executable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cee4802d0e2a4f55cecb270f3ab00febe4c220db Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=cee4802d0e2a4f55cecb270f3ab00febe4c220db commit cee4802d0e2a4f55cecb270f3ab00febe4c220db Author: Andrew Turner AuthorDate: 2025-09-26 15:06:42 +0000 Commit: Andrew Turner CommitDate: 2025-09-26 15:07:41 +0000 arm64: Mark EFI memory as userspace non-executable FEAT_PAN3 adds the SCTLR_EL1.EPAN field. This tells the hardware to raise a permission abort when userspace could execute a page, i.e. the ATTR_S1_UXN field is clear in the page table. This causes issues for the EFI runtime as we only mark non-executable pages with this flag leading to a permission fault when accessing it. Fix this by marking all EFI mappings with ATTR_S1_UXN. The kernel already had this field set so was already safe. Reported by: tuexen Reviewed by: tuexen Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52750 --- sys/arm64/arm64/efirt_machdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/efirt_machdep.c b/sys/arm64/arm64/efirt_machdep.c index 0301eb91c9ef..f814d45f5dd0 100644 --- a/sys/arm64/arm64/efirt_machdep.c +++ b/sys/arm64/arm64/efirt_machdep.c @@ -218,8 +218,9 @@ efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) p->md_phys, mode, p->md_pages); } - l3_attr = ATTR_AF | pmap_sh_attr | ATTR_S1_IDX(mode) | - ATTR_S1_AP(ATTR_S1_AP_RW) | ATTR_S1_nG | L3_PAGE; + l3_attr = ATTR_S1_UXN | ATTR_AF | pmap_sh_attr | + ATTR_S1_IDX(mode) | ATTR_S1_AP(ATTR_S1_AP_RW) | + ATTR_S1_nG | L3_PAGE; if (mode == VM_MEMATTR_DEVICE || p->md_attr & EFI_MD_ATTR_XP) l3_attr |= ATTR_S1_XN; From nobody Fri Sep 26 15:09:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYDWb27glz68Rnm; Fri, 26 Sep 2025 15:09: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYDWb1XQRz3kTF; Fri, 26 Sep 2025 15:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758899355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iqHOrS82ZGijAAwrPwXTkQNDkzKxJ5QznllBCSbeink=; b=Q6BQe9KnGMrT0AxEE9KDoQ787E9z3pQs3h89f6Nh/E36/shaYA0x5fZL9CklH93iqMEgrE 59NnsMuq4RA1qBiyGKIZ8qPmoBZzSdiAekCOjYkfJKuJAtsqRMOJHu//YgReafyV4M449N 9m/30L8QaR4Jc7XwigejMEQrosQKWXmggWgHm2kSbE+vcbPO7enOVHakRovWDsv5P2UZwd RaMQ5DRjD+THqG5O/fD7rtzmXOfiHfAV4tY4Kb4vdwUEf6eZ7E7AHXgcXDVT3YOA+I3IPz 0SKICrLorcxbDLKa1wrnT5rVCM2YmWfWleHSqOrnZG9myssjZiRdbqma4SGdXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758899355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iqHOrS82ZGijAAwrPwXTkQNDkzKxJ5QznllBCSbeink=; b=lYCBhMW9LEhKU4MujARu1kPVqL2QyhuL3Ry0SW5HPKnwaE8I7ILvxIA8CaRPqCqiy28vmU R3Jn83Ev17KDrJ4yMEv+k/0+vZP8hX1E9lpVWsvr8RvAbU08ESQCeqswT0u95dhnlSdYyi NOdLqd4y9lmwThBg5xaEt5nV0Q+DVN/TRYd3s+g8LCgfyezolpKOv5nrtT8YiGnbcGfz7i ICCjZDJgxwJfywM2O4pGtCEBCufxvhrt/BCUcgtVGDaXOoEdfsQliY1VtiiuKJ+MOECvnN vDizpTZ5yfp8D8qoAoGccgkJIK72bUItjBw4yFlX8CHvlpu/AEuEp0NmQwQ5fQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758899355; a=rsa-sha256; cv=none; b=XlzHa/RmruAtPLed0oZrlkVtCYG28b9bl6yKsdOTqBTOixjwyQZ2z40pge1uX+lC8msZa2 nH7MfpwnNk3klqabBInLqEtcBTkPQyKmdbjudrjkSZlYFlOKNgEa1OFLfG9RDy6GQMXk+p RNu7UuOkSW3T4lI6lc29XTwtZukNOvJO51AIN/vFhQzeL7J25Vw6QfDjAePJuk/gzQz336 V9gokdwplSWTgQbInqYH49yDSDY3hXjMsabt9wtrXw1Ao3U9Pv5N7A6YCfKFbpNsE+THih ttKAbrMBPjW8HJwpMW2EisnkubfQ0Ycu1tu9YDUz4seQ53/qHuyeaP22P+HLXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYDWb0ztKzsRC; Fri, 26 Sep 2025 15:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58QF9FK8058159; Fri, 26 Sep 2025 15:09:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58QF9FaV058156; Fri, 26 Sep 2025 15:09:15 GMT (envelope-from git) Date: Fri, 26 Sep 2025 15:09:15 GMT Message-Id: <202509261509.58QF9FaV058156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 2554148bd85b - main - arm64: Add table attributes to the EFI maps List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2554148bd85b172afcc1431df3272f920c82ebce Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2554148bd85b172afcc1431df3272f920c82ebce commit 2554148bd85b172afcc1431df3272f920c82ebce Author: Andrew Turner AuthorDate: 2025-09-26 15:06:58 +0000 Commit: Andrew Turner CommitDate: 2025-09-26 15:07:41 +0000 arm64: Add table attributes to the EFI maps Use table attributes to also limit unprivileged access to the EFI runtime mappings. This is mostly for parity with pmap as this is never mapped while userspace could execute. Reviewed by: tuexen Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52751 --- sys/arm64/arm64/efirt_machdep.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/efirt_machdep.c b/sys/arm64/arm64/efirt_machdep.c index f814d45f5dd0..bde0d4f784dc 100644 --- a/sys/arm64/arm64/efirt_machdep.c +++ b/sys/arm64/arm64/efirt_machdep.c @@ -106,7 +106,8 @@ efi_1t1_l3(vm_offset_t va) if (*l0 == 0) { m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); - *l0 = PHYS_TO_PTE(mphys) | L0_TABLE; + *l0 = PHYS_TO_PTE(mphys) | TATTR_UXN_TABLE | + TATTR_AP_TABLE_NO_EL0 | L0_TABLE; } else { mphys = PTE_TO_PHYS(*l0); } @@ -117,7 +118,8 @@ efi_1t1_l3(vm_offset_t va) if (*l1 == 0) { m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); - *l1 = PHYS_TO_PTE(mphys) | L1_TABLE; + *l1 = PHYS_TO_PTE(mphys) | TATTR_UXN_TABLE | + TATTR_AP_TABLE_NO_EL0 | L1_TABLE; } else { mphys = PTE_TO_PHYS(*l1); } @@ -128,7 +130,8 @@ efi_1t1_l3(vm_offset_t va) if (*l2 == 0) { m = efi_1t1_page(); mphys = VM_PAGE_TO_PHYS(m); - *l2 = PHYS_TO_PTE(mphys) | L2_TABLE; + *l2 = PHYS_TO_PTE(mphys) | TATTR_UXN_TABLE | + TATTR_AP_TABLE_NO_EL0 | L2_TABLE; } else { mphys = PTE_TO_PHYS(*l2); } From nobody Fri Sep 26 16:03:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYFkY2xr1z68Vpc; Fri, 26 Sep 2025 16:03: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYFkY2cVHz3qM1; Fri, 26 Sep 2025 16:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758902629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHDMAm29bC4IPrbrmUzULOS4K5TIpjEyWCRhzKcE8Jk=; b=k8ukUTMeooiD4DSUAm3wIeLOmwpoYJVwfJtj6LZ5i3UMygs0nKMp4SOPBYCdh9K/TGyHSV ibeaPOoWOK+y4P/Fo4rgrlB5y+XNpBmhV5abY70oa6qvV5uYPCBdPcpljzgWLKrn5T8iEh WtL2S+EbeTcJ/jvZg6W6SHwJ5Z5qc30VJxKzqySfmgJhpQKF+9gCsbLU/bSWNlnbSo+zln C/p3SMrqIeKQK4ax+IpOHwGPnJ8qE3vBEKMYv1sG5fAGbphnD8u7EbD+ulWd3/DSQ9gNd6 jN12gvkulxk8PsoC1U0mvN5HMFVu4ingvVboSy9y1amHAXeU7ljMlKIeoOxF+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758902629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YHDMAm29bC4IPrbrmUzULOS4K5TIpjEyWCRhzKcE8Jk=; b=mqHtefWtxHLsgsjQh2Qcc5IMv8FiBwDJRCZz1IZB4XN5r5CbLWaqqHKtJ555VbDIK2bFZb 7KjfjrCQbDrlxJ3PwufqbbncaIyokiTMTKzic10zK+W+eeNLfmwhfYQE+gFXb4Csqvn1U9 kffmul8YkLt/bGK+AK6BZVIAwCjn8uAhhmzSL4ijbtS0WkRoCu/++ANr8RUHzH5LYQTX1q bgnr4BC6lvzPWopbVKoJHYjtTZ7n5tnoVhg5ldSt8V/vvT12vL+Jm3ymQmgrzY4oT+mEd3 w09KXmMiOIrx7keEUj0ZWyURvR/VyIK/xOKYPIwHnQLtnxa0SDRy/XTUZ5yxBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758902629; a=rsa-sha256; cv=none; b=Zi0r2gmJJdgk3gFj+jwaO+VuvPY9KunZL4C3WIHr6h+Cwftysan/c0eAPE4IwrrAwRRDMW hyQQVSuARirNgfrUu6GIuTGg86BLoFbQg9FW0yXyssZJuS+UgUebOtLia6XXxRqRn5vE5A Dvz92mqbsTFAxySvb2ugtXIFPFWVYnnB35mrekM0zdZmCUVxti3ZcioNLMz2T0PGIpU/SS GwHf5cjUOZ52Uz26v7NWbmWc4dXf9DrJr0JT/vGf62Mkdr/j4/e0k5/9HTPtbGlG7BgoXX bVfBk0uTAsavPgKPoHi8CxZQraGc83M4suQQUShrViZfl5TFx2P2RFIfPgGe6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYFkY2CMSzv6C; Fri, 26 Sep 2025 16:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58QG3nMu069221; Fri, 26 Sep 2025 16:03:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58QG3nAb069218; Fri, 26 Sep 2025 16:03:49 GMT (envelope-from git) Date: Fri, 26 Sep 2025 16:03:49 GMT Message-Id: <202509261603.58QG3nAb069218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 97d152698f48 - main - acpi: Use sleep types defined in sys/power.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97d152698f4831db5a94d55c15233330c188feda Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=97d152698f4831db5a94d55c15233330c188feda commit 97d152698f4831db5a94d55c15233330c188feda Author: Aymeric Wibo AuthorDate: 2025-09-26 15:47:05 +0000 Commit: Aymeric Wibo CommitDate: 2025-09-26 16:02:35 +0000 acpi: Use sleep types defined in sys/power.h This is as opposed to using ACPI sleep states directly (`ACPI_STATE_S*`). We now use `POWER_STYPE_*` added in D52036. This is in preparation for adding support for s2idle, which is not an ACPI sleep state, but needs to be handled specially by `acpi_EnterSleepState`. Reviewed by: cy Approved by: cy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52705 Event: EuroBSDcon 2025 Devsummit --- sys/dev/acpica/acpi.c | 385 +++++++++++++++++++++++++++++----------------- sys/dev/acpica/acpi_lid.c | 4 +- sys/dev/acpica/acpivar.h | 15 +- sys/x86/acpica/acpi_apm.c | 25 +-- 4 files changed, 268 insertions(+), 161 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 574d3aacbcde..f9003a951d45 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -102,6 +102,11 @@ struct acpi_interface { int num; }; +struct acpi_wake_prep_context { + struct acpi_softc *sc; + enum power_stype stype; +}; + static char *sysres_ids[] = { "PNP0C01", "PNP0C02", NULL }; /* Global mutex for locking access to the ACPI subsystem. */ @@ -111,8 +116,9 @@ struct callout acpi_sleep_timer; /* Bitmap of device quirks. */ int acpi_quirks; -/* Supported sleep states. */ -static BOOLEAN acpi_sleep_states[ACPI_S_STATE_COUNT]; +/* Supported sleep states and types. */ +static bool acpi_supported_stypes[POWER_STYPE_COUNT]; +static bool acpi_supported_sstates[ACPI_S_STATE_COUNT]; static void acpi_lookup(void *arg, const char *name, device_t *dev); static int acpi_modevent(struct module *mod, int event, void *junk); @@ -169,21 +175,28 @@ static ACPI_STATUS acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status); static void acpi_sleep_enable(void *arg); static ACPI_STATUS acpi_sleep_disable(struct acpi_softc *sc); -static ACPI_STATUS acpi_EnterSleepState(struct acpi_softc *sc, int state); +static ACPI_STATUS acpi_EnterSleepState(struct acpi_softc *sc, + enum power_stype stype); static void acpi_shutdown_final(void *arg, int howto); static void acpi_enable_fixed_events(struct acpi_softc *sc); static void acpi_resync_clock(struct acpi_softc *sc); -static int acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate); -static int acpi_wake_run_prep(ACPI_HANDLE handle, int sstate); -static int acpi_wake_prep_walk(int sstate); +static int acpi_wake_sleep_prep(struct acpi_softc *sc, ACPI_HANDLE handle, + enum power_stype stype); +static int acpi_wake_run_prep(struct acpi_softc *sc, ACPI_HANDLE handle, + enum power_stype stype); +static int acpi_wake_prep_walk(struct acpi_softc *sc, enum power_stype stype); static int acpi_wake_sysctl_walk(device_t dev); static int acpi_wake_set_sysctl(SYSCTL_HANDLER_ARGS); -static void acpi_system_eventhandler_sleep(void *arg, int state); -static void acpi_system_eventhandler_wakeup(void *arg, int state); -static int acpi_sname2sstate(const char *sname); -static const char *acpi_sstate2sname(int sstate); static int acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); +static void acpi_system_eventhandler_sleep(void *arg, + enum power_stype stype); +static void acpi_system_eventhandler_wakeup(void *arg, + enum power_stype stype); +static enum power_stype acpi_sstate_to_stype(int sstate); +static int acpi_sname_to_sstate(const char *sname); +static const char *acpi_sstate_to_sname(int sstate); static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); +static int acpi_stype_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_debug_objects_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_stype_to_sstate(struct acpi_softc *sc, enum power_stype stype); static int acpi_pm_func(u_long cmd, void *arg, enum power_stype stype); @@ -477,6 +490,7 @@ acpi_attach(device_t dev) UINT32 flags; UINT8 TypeA, TypeB; char *env; + enum power_stype stype; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -589,31 +603,30 @@ acpi_attach(device_t dev) SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "power_button_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_power_button_sx, 0, acpi_sleep_state_sysctl, "A", + &sc->acpi_power_button_stype, 0, acpi_stype_sysctl, "A", "Power button ACPI sleep state."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "sleep_button_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_sleep_button_sx, 0, acpi_sleep_state_sysctl, "A", + &sc->acpi_sleep_button_stype, 0, acpi_stype_sysctl, "A", "Sleep button ACPI sleep state."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "lid_switch_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_lid_switch_sx, 0, acpi_sleep_state_sysctl, "A", - "Lid ACPI sleep state. Set to S3 if you want to suspend your laptop when close the Lid."); + &sc->acpi_lid_switch_stype, 0, acpi_stype_sysctl, "A", + "Lid ACPI sleep state. Set to s2idle or s2mem if you want to suspend " + "your laptop when close the lid."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "standby_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_standby_sx, 0, acpi_sleep_state_sysctl, "A", ""); - SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), - OID_AUTO, "suspend_state", - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, - &sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", ""); + &sc->acpi_standby_sx, 0, acpi_sleep_state_sysctl, "A", + "ACPI Sx state to use when going standby (S1 or S2)."); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "sleep_delay", CTLFLAG_RW, &sc->acpi_sleep_delay, 0, "sleep delay in seconds"); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), - OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0, "S4BIOS mode"); + OID_AUTO, "s4bios", CTLFLAG_RW, &sc->acpi_s4bios, 0, + "Use S4BIOS when hibernating."); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "verbose", CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode"); SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), @@ -659,31 +672,38 @@ acpi_attach(device_t dev) sc->acpi_s4bios = 1; #endif - /* Probe all supported sleep states. */ - acpi_sleep_states[ACPI_STATE_S0] = TRUE; - for (state = ACPI_STATE_S1; state < ACPI_S_STATE_COUNT; state++) + /* + * Probe all supported ACPI sleep states. Awake (S0) is always supported. + */ + acpi_supported_sstates[ACPI_STATE_S0] = TRUE; + acpi_supported_stypes[POWER_STYPE_AWAKE] = true; + for (state = ACPI_STATE_S1; state <= ACPI_STATE_S5; state++) if (ACPI_SUCCESS(AcpiEvaluateObject(ACPI_ROOT_OBJECT, __DECONST(char *, AcpiGbl_SleepStateNames[state]), NULL, NULL)) && - ACPI_SUCCESS(AcpiGetSleepTypeData(state, &TypeA, &TypeB))) - acpi_sleep_states[state] = TRUE; + ACPI_SUCCESS(AcpiGetSleepTypeData(state, &TypeA, &TypeB))) { + acpi_supported_sstates[state] = TRUE; + acpi_supported_stypes[acpi_sstate_to_stype(state)] = true; + } /* - * Dispatch the default sleep state to devices. The lid switch is set + * Dispatch the default sleep type to devices. The lid switch is set * to UNKNOWN by default to avoid surprising users. */ - sc->acpi_power_button_sx = acpi_sleep_states[ACPI_STATE_S5] ? - ACPI_STATE_S5 : ACPI_STATE_UNKNOWN; - sc->acpi_lid_switch_sx = ACPI_STATE_UNKNOWN; - sc->acpi_standby_sx = acpi_sleep_states[ACPI_STATE_S1] ? - ACPI_STATE_S1 : ACPI_STATE_UNKNOWN; - sc->acpi_suspend_sx = acpi_sleep_states[ACPI_STATE_S3] ? - ACPI_STATE_S3 : ACPI_STATE_UNKNOWN; - - /* Pick the first valid sleep state for the sleep button default. */ - sc->acpi_sleep_button_sx = ACPI_STATE_UNKNOWN; - for (state = ACPI_STATE_S1; state <= ACPI_STATE_S4; state++) - if (acpi_sleep_states[state]) { - sc->acpi_sleep_button_sx = state; + sc->acpi_power_button_stype = acpi_supported_stypes[POWER_STYPE_POWEROFF] ? + POWER_STYPE_POWEROFF : POWER_STYPE_UNKNOWN; + sc->acpi_lid_switch_stype = POWER_STYPE_UNKNOWN; + + sc->acpi_standby_sx = ACPI_STATE_UNKNOWN; + if (acpi_supported_sstates[ACPI_STATE_S1]) + sc->acpi_standby_sx = ACPI_STATE_S1; + else if (acpi_supported_sstates[ACPI_STATE_S2]) + sc->acpi_standby_sx = ACPI_STATE_S2; + + /* Pick the first valid sleep type for the sleep button default. */ + sc->acpi_sleep_button_stype = POWER_STYPE_UNKNOWN; + for (stype = POWER_STYPE_STANDBY; stype <= POWER_STYPE_HIBERNATE; stype++) + if (acpi_supported_stypes[stype]) { + sc->acpi_sleep_button_stype = stype; break; } @@ -708,7 +728,7 @@ acpi_attach(device_t dev) /* Flag our initial states. */ sc->acpi_enabled = TRUE; - sc->acpi_sstate = ACPI_STATE_S0; + sc->acpi_stype = POWER_STYPE_AWAKE; sc->acpi_sleep_disabled = TRUE; /* Create the control device */ @@ -768,6 +788,36 @@ acpi_stype_to_sstate(struct acpi_softc *sc, enum power_stype stype) return (ACPI_STATE_UNKNOWN); } +/* + * XXX It would be nice if we didn't need this function, but we'd need + * acpi_EnterSleepState and acpi_ReqSleepState to take in actual ACPI S-states, + * which won't be possible at the moment because suspend-to-idle (which is not + * an ACPI S-state nor maps to one) will be implemented here. + * + * In the future, we should make generic a lot of the logic in these functions + * to enable suspend-to-idle on non-ACPI builds, and then make + * acpi_EnterSleepState and acpi_ReqSleepState truly take in ACPI S-states + * again. + */ +static enum power_stype +acpi_sstate_to_stype(int sstate) +{ + switch (sstate) { + case ACPI_STATE_S0: + return (POWER_STYPE_AWAKE); + case ACPI_STATE_S1: + case ACPI_STATE_S2: + return (POWER_STYPE_STANDBY); + case ACPI_STATE_S3: + return (POWER_STYPE_SUSPEND_TO_MEM); + case ACPI_STATE_S4: + return (POWER_STYPE_HIBERNATE); + case ACPI_STATE_S5: + return (POWER_STYPE_POWEROFF); + } + return (POWER_STYPE_UNKNOWN); +} + static void acpi_set_power_children(device_t dev, int state) { @@ -820,6 +870,7 @@ acpi_resume(device_t dev) static int acpi_shutdown(device_t dev) { + struct acpi_softc *sc = device_get_softc(dev); bus_topo_assert(); @@ -830,7 +881,7 @@ acpi_shutdown(device_t dev) * Enable any GPEs that are able to power-on the system (i.e., RTC). * Also, disable any that are not valid for this state (most). */ - acpi_wake_prep_walk(ACPI_STATE_S5); + acpi_wake_prep_walk(sc, POWER_STYPE_POWEROFF); return (0); } @@ -2063,7 +2114,7 @@ acpi_device_pwr_for_sleep(device_t bus, device_t dev, int *dstate) * Note illegal _S0D is evaluated because some systems expect this. */ sc = device_get_softc(bus); - snprintf(sxd, sizeof(sxd), "_S%dD", sc->acpi_sstate); + snprintf(sxd, sizeof(sxd), "_S%dD", acpi_stype_to_sstate(sc, sc->acpi_stype)); status = acpi_GetInteger(handle, sxd, dstate); if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { device_printf(dev, "failed to get %s on %s: %s\n", sxd, @@ -3161,9 +3212,9 @@ acpi_sleep_force_task(void *context) { struct acpi_softc *sc = (struct acpi_softc *)context; - if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) - device_printf(sc->acpi_dev, "force sleep state S%d failed\n", - sc->acpi_next_sstate); + if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_stype))) + device_printf(sc->acpi_dev, "force sleep state %s failed\n", + power_stype_to_name(sc->acpi_next_stype)); } static void @@ -3190,24 +3241,24 @@ acpi_sleep_force(void *arg) * acks are in. */ int -acpi_ReqSleepState(struct acpi_softc *sc, int state) +acpi_ReqSleepState(struct acpi_softc *sc, enum power_stype stype) { #if defined(__amd64__) || defined(__i386__) struct apm_clone_data *clone; ACPI_STATUS status; - if (state < ACPI_STATE_S1 || state > ACPI_S_STATES_MAX) + if (stype < POWER_STYPE_AWAKE || stype >= POWER_STYPE_COUNT) return (EINVAL); - if (!acpi_sleep_states[state]) + if (!acpi_supported_stypes[stype]) return (EOPNOTSUPP); /* * If a reboot/shutdown/suspend request is already in progress or * suspend is blocked due to an upcoming shutdown, just return. */ - if (rebooting || sc->acpi_next_sstate != 0 || suspend_blocked) { + if (rebooting || sc->acpi_next_stype != POWER_STYPE_AWAKE || + suspend_blocked) return (0); - } /* Wait until sleep is enabled. */ while (sc->acpi_sleep_disabled) { @@ -3216,12 +3267,12 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state) ACPI_LOCK(acpi); - sc->acpi_next_sstate = state; + sc->acpi_next_stype = stype; /* S5 (soft-off) should be entered directly with no waiting. */ - if (state == ACPI_STATE_S5) { + if (stype == POWER_STYPE_POWEROFF) { ACPI_UNLOCK(acpi); - status = acpi_EnterSleepState(sc, state); + status = acpi_EnterSleepState(sc, stype); return (ACPI_SUCCESS(status) ? 0 : ENXIO); } @@ -3237,7 +3288,7 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state) /* If devd(8) is not running, immediately enter the sleep state. */ if (!devctl_process_running()) { ACPI_UNLOCK(acpi); - status = acpi_EnterSleepState(sc, state); + status = acpi_EnterSleepState(sc, stype); return (ACPI_SUCCESS(status) ? 0 : ENXIO); } @@ -3252,7 +3303,7 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state) ACPI_UNLOCK(acpi); /* Now notify devd(8) also. */ - acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, state); + acpi_UserNotify("Suspend", ACPI_ROOT_OBJECT, stype); return (0); #else @@ -3275,17 +3326,17 @@ acpi_AckSleepState(struct apm_clone_data *clone, int error) struct acpi_softc *sc; int ret, sleeping; - /* If no pending sleep state, return an error. */ + /* If no pending sleep type, return an error. */ ACPI_LOCK(acpi); sc = clone->acpi_sc; - if (sc->acpi_next_sstate == 0) { + if (sc->acpi_next_stype == POWER_STYPE_AWAKE) { ACPI_UNLOCK(acpi); return (ENXIO); } /* Caller wants to abort suspend process. */ if (error) { - sc->acpi_next_sstate = 0; + sc->acpi_next_stype = POWER_STYPE_AWAKE; callout_stop(&sc->susp_force_to); device_printf(sc->acpi_dev, "listener on %s cancelled the pending suspend\n", @@ -3315,7 +3366,7 @@ acpi_AckSleepState(struct apm_clone_data *clone, int error) ACPI_UNLOCK(acpi); ret = 0; if (sleeping) { - if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_sstate))) + if (ACPI_FAILURE(acpi_EnterSleepState(sc, sc->acpi_next_stype))) ret = ENODEV; } return (ret); @@ -3372,24 +3423,27 @@ enum acpi_sleep_state { * Currently we support S1-S5 but S4 is only S4BIOS */ static ACPI_STATUS -acpi_EnterSleepState(struct acpi_softc *sc, int state) +acpi_EnterSleepState(struct acpi_softc *sc, enum power_stype stype) { register_t intr; ACPI_STATUS status; ACPI_EVENT_STATUS power_button_status; enum acpi_sleep_state slp_state; + int acpi_sstate; int sleep_result; - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype); - if (state < ACPI_STATE_S1 || state > ACPI_S_STATES_MAX) + if (stype <= POWER_STYPE_AWAKE || stype >= POWER_STYPE_COUNT) return_ACPI_STATUS (AE_BAD_PARAMETER); - if (!acpi_sleep_states[state]) { - device_printf(sc->acpi_dev, "Sleep state S%d not supported by BIOS\n", - state); + if (!acpi_supported_stypes[stype]) { + device_printf(sc->acpi_dev, "Sleep type %s not supported on this " + "platform\n", power_stype_to_name(stype)); return (AE_SUPPORT); } + acpi_sstate = acpi_stype_to_sstate(sc, stype); + /* Re-entry once we're suspending is not allowed. */ status = acpi_sleep_disable(sc); if (ACPI_FAILURE(status)) { @@ -3398,7 +3452,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) return (status); } - if (state == ACPI_STATE_S5) { + if (stype == POWER_STYPE_POWEROFF) { /* * Shut down cleanly and power off. This will call us back through the * shutdown handlers. @@ -3426,16 +3480,16 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) #endif /* - * Be sure to hold Giant across DEVICE_SUSPEND/RESUME + * Be sure to hold bus topology lock across DEVICE_SUSPEND/RESUME. */ bus_topo_lock(); slp_state = ACPI_SS_NONE; - sc->acpi_sstate = state; + sc->acpi_stype = stype; /* Enable any GPEs as appropriate and requested by the user. */ - acpi_wake_prep_walk(state); + acpi_wake_prep_walk(sc, stype); slp_state = ACPI_SS_GPE_SET; /* @@ -3452,7 +3506,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) } slp_state = ACPI_SS_DEV_SUSPEND; - status = AcpiEnterSleepStatePrep(state); + status = AcpiEnterSleepStatePrep(acpi_sstate); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepStatePrep failed - %s\n", AcpiFormatException(status)); @@ -3465,9 +3519,9 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) suspendclock(); intr = intr_disable(); - if (state != ACPI_STATE_S1) { - sleep_result = acpi_sleep_machdep(sc, state); - acpi_wakeup_machdep(sc, state, sleep_result, 0); + if (stype != POWER_STYPE_STANDBY) { + sleep_result = acpi_sleep_machdep(sc, acpi_sstate); + acpi_wakeup_machdep(sc, acpi_sstate, sleep_result, 0); /* * XXX According to ACPI specification SCI_EN bit should be restored @@ -3478,10 +3532,10 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) * This hack is picked up from Linux, which claims that it follows * Windows behavior. */ - if (sleep_result == 1 && state != ACPI_STATE_S4) + if (sleep_result == 1 && stype != POWER_STYPE_HIBERNATE) AcpiWriteBitRegister(ACPI_BITREG_SCI_ENABLE, ACPI_ENABLE_EVENT); - if (sleep_result == 1 && state == ACPI_STATE_S3) { + if (sleep_result == 1 && stype == POWER_STYPE_SUSPEND_TO_MEM) { /* * Prevent mis-interpretation of the wakeup by power button * as a request for power off. @@ -3507,20 +3561,20 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) intr_restore(intr); /* call acpi_wakeup_machdep() again with interrupt enabled */ - acpi_wakeup_machdep(sc, state, sleep_result, 1); + acpi_wakeup_machdep(sc, acpi_sstate, sleep_result, 1); - AcpiLeaveSleepStatePrep(state); + AcpiLeaveSleepStatePrep(acpi_sstate); if (sleep_result == -1) goto backout; - /* Re-enable ACPI hardware on wakeup from sleep state 4. */ - if (state == ACPI_STATE_S4) + /* Re-enable ACPI hardware on wakeup from hibernate. */ + if (stype == POWER_STYPE_HIBERNATE) AcpiEnable(); } else { - status = AcpiEnterSleepState(state); + status = AcpiEnterSleepState(acpi_sstate); intr_restore(intr); - AcpiLeaveSleepStatePrep(state); + AcpiLeaveSleepStatePrep(acpi_sstate); if (ACPI_FAILURE(status)) { device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); @@ -3537,13 +3591,13 @@ backout: if (slp_state >= ACPI_SS_SLP_PREP) resumeclock(); if (slp_state >= ACPI_SS_GPE_SET) { - acpi_wake_prep_walk(state); - sc->acpi_sstate = ACPI_STATE_S0; + acpi_wake_prep_walk(sc, stype); + sc->acpi_stype = POWER_STYPE_AWAKE; } if (slp_state >= ACPI_SS_DEV_SUSPEND) DEVICE_RESUME(root_bus); if (slp_state >= ACPI_SS_SLP_PREP) - AcpiLeaveSleepState(state); + AcpiLeaveSleepState(acpi_sstate); if (slp_state >= ACPI_SS_SLEPT) { #if defined(__i386__) || defined(__amd64__) /* NB: we are still using ACPI timecounter at this point. */ @@ -3552,7 +3606,7 @@ backout: acpi_resync_clock(sc); acpi_enable_fixed_events(sc); } - sc->acpi_next_sstate = 0; + sc->acpi_next_stype = POWER_STYPE_AWAKE; bus_topo_unlock(); @@ -3578,7 +3632,7 @@ backout: /* Run /etc/rc.resume after we are back. */ if (devctl_process_running()) - acpi_UserNotify("Resume", ACPI_ROOT_OBJECT, state); + acpi_UserNotify("Resume", ACPI_ROOT_OBJECT, stype); return_ACPI_STATUS (status); } @@ -3629,8 +3683,10 @@ acpi_wake_set_enable(device_t dev, int enable) } static int -acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate) +acpi_wake_sleep_prep(struct acpi_softc *sc, ACPI_HANDLE handle, + enum power_stype stype) { + int sstate; struct acpi_prw_data prw; device_t dev; @@ -3639,6 +3695,8 @@ acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate) return (ENXIO); dev = acpi_get_device(handle); + sstate = acpi_stype_to_sstate(sc, stype); + /* * The destination sleep state must be less than (i.e., higher power) * or equal to the value specified by _PRW. If this GPE cannot be @@ -3649,22 +3707,24 @@ acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate) if (sstate > prw.lowest_wake) { AcpiSetGpeWakeMask(prw.gpe_handle, prw.gpe_bit, ACPI_GPE_DISABLE); if (bootverbose) - device_printf(dev, "wake_prep disabled wake for %s (S%d)\n", - acpi_name(handle), sstate); + device_printf(dev, "wake_prep disabled wake for %s (%s)\n", + acpi_name(handle), power_stype_to_name(stype)); } else if (dev && (acpi_get_flags(dev) & ACPI_FLAG_WAKE_ENABLED) != 0) { acpi_pwr_wake_enable(handle, 1); acpi_SetInteger(handle, "_PSW", 1); if (bootverbose) - device_printf(dev, "wake_prep enabled for %s (S%d)\n", - acpi_name(handle), sstate); + device_printf(dev, "wake_prep enabled for %s (%s)\n", + acpi_name(handle), power_stype_to_name(stype)); } return (0); } static int -acpi_wake_run_prep(ACPI_HANDLE handle, int sstate) +acpi_wake_run_prep(struct acpi_softc *sc, ACPI_HANDLE handle, + enum power_stype stype) { + int sstate; struct acpi_prw_data prw; device_t dev; @@ -3678,6 +3738,8 @@ acpi_wake_run_prep(ACPI_HANDLE handle, int sstate) if (dev == NULL || (acpi_get_flags(dev) & ACPI_FLAG_WAKE_ENABLED) == 0) return (0); + sstate = acpi_stype_to_sstate(sc, stype); + /* * If this GPE couldn't be enabled for the previous sleep state, it was * disabled before going to sleep so re-enable it. If it was enabled, @@ -3701,26 +3763,29 @@ acpi_wake_run_prep(ACPI_HANDLE handle, int sstate) static ACPI_STATUS acpi_wake_prep(ACPI_HANDLE handle, UINT32 level, void *context, void **status) { - int sstate; + struct acpi_wake_prep_context *ctx = context; /* If suspending, run the sleep prep function, otherwise wake. */ - sstate = *(int *)context; if (AcpiGbl_SystemAwakeAndRunning) - acpi_wake_sleep_prep(handle, sstate); + acpi_wake_sleep_prep(ctx->sc, handle, ctx->stype); else - acpi_wake_run_prep(handle, sstate); + acpi_wake_run_prep(ctx->sc, handle, ctx->stype); return (AE_OK); } /* Walk the tree rooted at acpi0 to prep devices for suspend/resume. */ static int -acpi_wake_prep_walk(int sstate) +acpi_wake_prep_walk(struct acpi_softc *sc, enum power_stype stype) { ACPI_HANDLE sb_handle; + struct acpi_wake_prep_context ctx = { + .sc = sc, + .stype = stype, + }; if (ACPI_SUCCESS(AcpiGetHandle(ACPI_ROOT_OBJECT, "\\_SB_", &sb_handle))) AcpiWalkNamespace(ACPI_TYPE_DEVICE, sb_handle, 100, - acpi_wake_prep, NULL, &sstate, NULL); + acpi_wake_prep, NULL, &ctx, NULL); return (0); } @@ -3879,31 +3944,35 @@ out: /* System Event Handlers (registered by EVENTHANDLER_REGISTER) */ static void -acpi_system_eventhandler_sleep(void *arg, int state) +acpi_system_eventhandler_sleep(void *arg, enum power_stype stype) { struct acpi_softc *sc = (struct acpi_softc *)arg; int ret; - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype); /* Check if button action is disabled or unknown. */ - if (state == ACPI_STATE_UNKNOWN) + if (stype == ACPI_STATE_UNKNOWN) return; - /* Request that the system prepare to enter the given suspend state. */ - ret = acpi_ReqSleepState(sc, state); + /* + * Request that the system prepare to enter the given suspend state. We can + * totally pass an ACPI S-state to an enum power_stype. + */ + ret = acpi_ReqSleepState(sc, stype); if (ret != 0) device_printf(sc->acpi_dev, - "request to enter state S%d failed (err %d)\n", state, ret); + "request to enter state %s failed (err %d)\n", + power_stype_to_name(stype), ret); return_VOID; } static void -acpi_system_eventhandler_wakeup(void *arg, int state) +acpi_system_eventhandler_wakeup(void *arg, enum power_stype stype) { - ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype); /* Currently, nothing to do for wakeup. */ @@ -3917,14 +3986,14 @@ static void acpi_invoke_sleep_eventhandler(void *context) { - EVENTHANDLER_INVOKE(acpi_sleep_event, *(int *)context); + EVENTHANDLER_INVOKE(acpi_sleep_event, *(enum power_stype *)context); } static void acpi_invoke_wake_eventhandler(void *context) { - EVENTHANDLER_INVOKE(acpi_wakeup_event, *(int *)context); + EVENTHANDLER_INVOKE(acpi_wakeup_event, *(enum power_stype *)context); } UINT32 @@ -3940,7 +4009,7 @@ acpi_event_power_button_sleep(void *context) #if defined(__amd64__) || defined(__i386__) if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, - acpi_invoke_sleep_eventhandler, &sc->acpi_power_button_sx))) + acpi_invoke_sleep_eventhandler, &sc->acpi_power_button_stype))) return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); #else shutdown_nice(RB_POWEROFF); @@ -3957,7 +4026,7 @@ acpi_event_power_button_wake(void *context) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, - acpi_invoke_wake_eventhandler, &sc->acpi_power_button_sx))) + acpi_invoke_wake_eventhandler, &sc->acpi_power_button_stype))) return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -3970,7 +4039,7 @@ acpi_event_sleep_button_sleep(void *context) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, - acpi_invoke_sleep_eventhandler, &sc->acpi_sleep_button_sx))) + acpi_invoke_sleep_eventhandler, &sc->acpi_sleep_button_stype))) return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -3983,7 +4052,7 @@ acpi_event_sleep_button_wake(void *context) ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); if (ACPI_FAILURE(AcpiOsExecute(OSL_NOTIFY_HANDLER, - acpi_invoke_wake_eventhandler, &sc->acpi_sleep_button_sx))) + acpi_invoke_wake_eventhandler, &sc->acpi_sleep_button_stype))) return_VALUE (ACPI_INTERRUPT_NOT_HANDLED); return_VALUE (ACPI_INTERRUPT_HANDLED); } @@ -4179,7 +4248,8 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t { struct acpi_softc *sc; struct acpi_ioctl_hook *hp; - int error, state; + int error; + int sstate; error = 0; hp = NULL; @@ -4209,9 +4279,9 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t /* Core system ioctls. */ switch (cmd) { case ACPIIO_REQSLPSTATE: - state = *(int *)addr; - if (state != ACPI_STATE_S5) - return (acpi_ReqSleepState(sc, state)); + sstate = *(int *)addr; + if (sstate != ACPI_STATE_S5) + return (acpi_ReqSleepState(sc, acpi_sstate_to_stype(sstate))); device_printf(sc->acpi_dev, "power off via acpi ioctl not supported\n"); error = EOPNOTSUPP; break; @@ -4220,12 +4290,12 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t error = acpi_AckSleepState(sc->acpi_clone, error); break; case ACPIIO_SETSLPSTATE: /* DEPRECATED */ - state = *(int *)addr; - if (state < ACPI_STATE_S0 || state > ACPI_S_STATES_MAX) + sstate = *(int *)addr; + if (sstate < ACPI_STATE_S0 || sstate > ACPI_STATE_S5) return (EINVAL); - if (!acpi_sleep_states[state]) + if (!acpi_supported_sstates[sstate]) return (EOPNOTSUPP); - if (ACPI_FAILURE(acpi_SetSleepState(sc, state))) + if (ACPI_FAILURE(acpi_SetSleepState(sc, acpi_sstate_to_stype(sstate)))) error = ENXIO; break; default: @@ -4237,7 +4307,7 @@ acpiioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *t } static int -acpi_sname2sstate(const char *sname) +acpi_sname_to_sstate(const char *sname) { int sstate; @@ -4252,14 +4322,15 @@ acpi_sname2sstate(const char *sname) } static const char * -acpi_sstate2sname(int sstate) +acpi_sstate_to_sname(int state) { - static const char *snames[] = { "S0", "S1", "S2", "S3", "S4", "S5" }; + static const char *snames[ACPI_S_STATE_COUNT] = {"S0", "S1", "S2", "S3", + "S4", "S5"}; - if (sstate >= ACPI_STATE_S0 && sstate <= ACPI_STATE_S5) - return (snames[sstate]); - else if (sstate == ACPI_STATE_UNKNOWN) + if (state == ACPI_STATE_UNKNOWN) return ("NONE"); + if (state >= ACPI_STATE_S0 && state < ACPI_S_STATE_COUNT) + return (snames[state]); return (NULL); } @@ -4272,8 +4343,8 @@ acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); for (state = ACPI_STATE_S1; state < ACPI_S_STATE_COUNT; state++) - if (acpi_sleep_states[state]) - sbuf_printf(&sb, "%s ", acpi_sstate2sname(state)); + if (acpi_supported_sstates[state]) + sbuf_printf(&sb, "%s ", acpi_sstate_to_sname(state)); sbuf_trim(&sb); sbuf_finish(&sb); error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); @@ -4281,27 +4352,64 @@ acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) return (error); } + static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) { char sleep_state[10]; - int error, new_state, old_state; + int error; + int new_sstate, old_sstate; - old_state = *(int *)oidp->oid_arg1; - strlcpy(sleep_state, acpi_sstate2sname(old_state), sizeof(sleep_state)); + old_sstate = *(int *)oidp->oid_arg1; + strlcpy(sleep_state, acpi_sstate_to_sname(old_sstate), sizeof(sleep_state)); error = sysctl_handle_string(oidp, sleep_state, sizeof(sleep_state), req); if (error == 0 && req->newptr != NULL) { - new_state = acpi_sname2sstate(sleep_state); - if (new_state < ACPI_STATE_S1) + new_sstate = acpi_sname_to_sstate(sleep_state); + if (new_sstate < 0) return (EINVAL); - if (new_state < ACPI_S_STATE_COUNT && !acpi_sleep_states[new_state]) + if (new_sstate < ACPI_S_STATE_COUNT && + !acpi_supported_sstates[new_sstate]) return (EOPNOTSUPP); - if (new_state != old_state) - *(int *)oidp->oid_arg1 = new_state; + if (new_sstate != old_sstate) + *(int *)oidp->oid_arg1 = new_sstate; } return (error); } +static int +acpi_stype_sysctl(SYSCTL_HANDLER_ARGS) +{ + char name[10]; + int err; + int sstate; + enum power_stype new_stype, old_stype; + + old_stype = *(enum power_stype *)oidp->oid_arg1; + strlcpy(name, power_stype_to_name(old_stype), sizeof(name)); + err = sysctl_handle_string(oidp, name, sizeof(name), req); + if (err != 0 || req->newptr == NULL) + return (err); + + new_stype = power_name_to_stype(name); + if (new_stype == POWER_STYPE_UNKNOWN) { + sstate = acpi_sname_to_sstate(name); + if (sstate < 0) + return (EINVAL); + printf("warning: this sysctl expects a sleep type, but an ACPI S-state has " + "been passed to it. This functionality is deprecated; see acpi(4).\n"); + MPASS(sstate < ACPI_S_STATE_COUNT); + if (acpi_supported_sstates[sstate] == false) + return (EOPNOTSUPP); + new_stype = acpi_sstate_to_stype(sstate); + } + + if (acpi_supported_stypes[new_stype] == false) + return (EOPNOTSUPP); + if (new_stype != old_stype) + *(enum power_stype *)oidp->oid_arg1 = new_stype; + return (0); +} + /* Inform devctl(4) when we receive a Notify. */ void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, uint8_t notify) @@ -4650,7 +4758,7 @@ acpi_reset_interfaces(device_t dev) static int acpi_pm_func(u_long cmd, void *arg, enum power_stype stype) { - int error, sstate; + int error; struct acpi_softc *sc; error = 0; @@ -4661,8 +4769,7 @@ acpi_pm_func(u_long cmd, void *arg, enum power_stype stype) error = EINVAL; goto out; } - sstate = acpi_stype_to_sstate(sc, stype); - if (ACPI_FAILURE(acpi_EnterSleepState(sc, sstate))) + if (ACPI_FAILURE(acpi_EnterSleepState(sc, stype))) error = ENXIO; break; default: diff --git a/sys/dev/acpica/acpi_lid.c b/sys/dev/acpica/acpi_lid.c index 142791f7282a..fb8755d9f0fe 100644 --- a/sys/dev/acpica/acpi_lid.c +++ b/sys/dev/acpica/acpi_lid.c @@ -235,9 +235,9 @@ acpi_lid_notify_status_changed(void *arg) sc->lid_status ? "opened" : "closed"); if (sc->lid_status == 0) - EVENTHANDLER_INVOKE(acpi_sleep_event, acpi_sc->acpi_lid_switch_sx); + EVENTHANDLER_INVOKE(acpi_sleep_event, acpi_sc->acpi_lid_switch_stype); else - EVENTHANDLER_INVOKE(acpi_wakeup_event, acpi_sc->acpi_lid_switch_sx); + EVENTHANDLER_INVOKE(acpi_wakeup_event, acpi_sc->acpi_lid_switch_stype); out: ACPI_SERIAL_END(lid); diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index fac32d832598..4c789dd3e9f2 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -54,20 +54,19 @@ struct acpi_softc { struct cdev *acpi_dev_t; int acpi_enabled; - int acpi_sstate; + enum power_stype acpi_stype; int acpi_sleep_disabled; struct sysctl_ctx_list acpi_sysctl_ctx; struct sysctl_oid *acpi_sysctl_tree; - int acpi_power_button_sx; - int acpi_sleep_button_sx; - int acpi_lid_switch_sx; + enum power_stype acpi_power_button_stype; + enum power_stype acpi_sleep_button_stype; + enum power_stype acpi_lid_switch_stype; int acpi_standby_sx; - int acpi_suspend_sx; + int acpi_s4bios; int acpi_sleep_delay; - int acpi_s4bios; int acpi_do_disable; int acpi_verbose; int acpi_handle_reboot; @@ -75,7 +74,7 @@ struct acpi_softc { vm_offset_t acpi_wakeaddr; vm_paddr_t acpi_wakephys; - int acpi_next_sstate; /* Next suspend Sx state. */ + enum power_stype acpi_next_stype; /* Next suspend sleep type. */ struct apm_clone_data *acpi_clone; /* Pseudo-dev for devd(8). */ STAILQ_HEAD(,apm_clone_data) apm_cdevs; /* All apm/apmctl/acpi cdevs. */ struct callout susp_force_to; /* Force suspend if no acks. */ @@ -412,7 +411,7 @@ ACPI_STATUS acpi_EvaluateOSC(ACPI_HANDLE handle, uint8_t *uuid, uint32_t *caps_out, bool query); ACPI_STATUS acpi_OverrideInterruptLevel(UINT32 InterruptNumber); ACPI_STATUS acpi_SetIntrModel(int model); -int acpi_ReqSleepState(struct acpi_softc *sc, int state); +int acpi_ReqSleepState(struct acpi_softc *sc, enum power_stype stype); int acpi_AckSleepState(struct apm_clone_data *clone, int error); ACPI_STATUS acpi_SetSleepState(struct acpi_softc *sc, int state); int acpi_wake_set_enable(device_t dev, int enable); diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index be161cd6171b..8e5785cf0ed6 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -235,7 +235,7 @@ apmdtor(void *data) acpi_sc = clone->acpi_sc; /* We are about to lose a reference so check if suspend should occur */ - if (acpi_sc->acpi_next_sstate != 0 && + if (acpi_sc->acpi_next_stype != POWER_STYPE_AWAKE && clone->notify_status != APM_EV_ACKED) acpi_AckSleepState(clone, 0); @@ -283,10 +283,10 @@ apmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td *** 60 LINES SKIPPED *** From nobody Fri Sep 26 16:03:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYFkZ65wWz68Vvy; Fri, 26 Sep 2025 16:03: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYFkZ3bvCz3q4d; Fri, 26 Sep 2025 16:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758902630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=us434JS9qq/siD9BAYHmmpF0N8x6+dx+mxyQdhtoMzg=; b=qwmwe92Ur0BOivpC+jyvAUDPD6Pij3WbKDpkxER/8jeN5/2B+Ie1M4eV6uSGWe9HSYWq+0 alOkMuscr7HHp8zKevSrmby/ZBWOATJcFwedX+6e+AmIIzm7QSIlzvaZvduAAqR0mT3xYf kRmlUt7zXG0dJwXnp4wCzA0PGUjmiVMXREFALhYMRhhIMyg6MXZkCW7cKcNr+sItK6cHN2 dvSv5wEU4mtJsudYp/A0X82fojJ/gxhFtnohT8yJ9f1gtQ7+dORN5guoOmYkB9nbWxgFW4 knENejpKi5Mee7K1HZLwnIrICddqBbo7U6na1MD0zSNz2jxCOrovQuHpUnWcEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758902630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=us434JS9qq/siD9BAYHmmpF0N8x6+dx+mxyQdhtoMzg=; b=Dz+l0co68nAWrPyxf0fnDbYemL/gJ1pZzsyL9DJlAYSoQ0QSHFsx1olxhtuUU7+/rFOu0T slpS8RToXFW8v8QmcbBHoZSPPHx2sGu3imiQpnLeBp5e8yBRs7ygwraOx5h8UGh5/M5S46 JY3FMSWVbDIdEFMQHwAHtDAJiYNLw5W/6shNx2tHrZq/KfsbX2OWNY+o5JL5tbkr4vtp9i I3lh+49YHdA3nVjyNWsgGJNGSXbfKqHWWhBOE8TKsc1yNJdKmx0p+k7X+kcfh4d8Ew0Ipu oltW5W7tGFwjzvfEdcVsqhxt49ZKUAXOFCFNwD229gSKFdqCNCI2bIIuxzgFQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758902630; a=rsa-sha256; cv=none; b=vKUsdiiXysENrliozQRWfaRXZLD3HrkCUfa//ZB8Xjn5ELsUYmkumA/MWPeLNh/TBq3fxM G+2OQodgmDdMbbta3+d0gdnKLIoPRbWvzkBnIYC/3rWQ/VlR1wMaIHPkn2G6GomQySdFa4 vSaHFh8kvSs00XroAEP0IqbLGkmN1srgNGSrL5Qv6LPhfAKUZcX1ICQgcQKxH896XqT6cH CsMaHZYGQ6Sa0Pg4zw9HnwoaPfiNEF3/wNl36RrBpPWyyxW+kUos+1npiGZqqSjgbqtdCT 4vE0IKPLnznN4wDTZ7Ruo4FnUaY8iDBzhCaEe6NxHW25yeGUuWu7ga+/s0103Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYFkZ378mztrc; Fri, 26 Sep 2025 16:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58QG3ogw069255; Fri, 26 Sep 2025 16:03:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58QG3oPf069252; Fri, 26 Sep 2025 16:03:50 GMT (envelope-from git) Date: Fri, 26 Sep 2025 16:03:50 GMT Message-Id: <202509261603.58QG3oPf069252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 9e1e29bd5ec6 - main - acpi: Add back `hw.acpi.suspend_state` sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e1e29bd5ec61bba1bb3366ff4c069b0c8f75954 Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=9e1e29bd5ec61bba1bb3366ff4c069b0c8f75954 commit 9e1e29bd5ec61bba1bb3366ff4c069b0c8f75954 Author: Aymeric Wibo AuthorDate: 2025-09-26 15:49:28 +0000 Commit: Aymeric Wibo CommitDate: 2025-09-26 16:03:05 +0000 acpi: Add back `hw.acpi.suspend_state` sysctl When writing an ACPI S-state to it it will set kern.power.suspend to the appropriate sleep type, and when reading from it it will return the corresponding ACPI S-state to the sleep type in kern.power.suspend. This is deprecated and kern.power.suspend should be used directly instead, but add this back because zzz(1) makes use of this and we can't easily rewrite it just now. PR: 289634 Reviewed by: cy, markj Approved by: cy, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52600 Event: EuroBSDcon 2025 Devsummit --- sys/dev/acpica/acpi.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index f9003a951d45..6994f46eba10 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -195,6 +195,7 @@ static void acpi_system_eventhandler_wakeup(void *arg, static enum power_stype acpi_sstate_to_stype(int sstate); static int acpi_sname_to_sstate(const char *sname); static const char *acpi_sstate_to_sname(int sstate); +static int acpi_suspend_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_stype_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_debug_objects_sysctl(SYSCTL_HANDLER_ARGS); @@ -616,6 +617,11 @@ acpi_attach(device_t dev) &sc->acpi_lid_switch_stype, 0, acpi_stype_sysctl, "A", "Lid ACPI sleep state. Set to s2idle or s2mem if you want to suspend " "your laptop when close the lid."); + SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), + OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, 0, acpi_suspend_state_sysctl, "A", + "Current ACPI suspend state. This sysctl is deprecated; you probably " + "want to use kern.power.suspend instead."); SYSCTL_ADD_PROC(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "standby_state", CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, @@ -4352,6 +4358,32 @@ acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) return (error); } +static int +acpi_suspend_state_sysctl(SYSCTL_HANDLER_ARGS) +{ + char name[10]; + int err; + struct acpi_softc *sc = oidp->oid_arg1; + enum power_stype new_stype; + enum power_stype old_stype = power_suspend_stype; + int old_sstate = acpi_stype_to_sstate(sc, old_stype); + int new_sstate; + + strlcpy(name, acpi_sstate_to_sname(old_sstate), sizeof(name)); + err = sysctl_handle_string(oidp, name, sizeof(name), req); + if (err != 0 || req->newptr == NULL) + return (err); + + new_sstate = acpi_sname_to_sstate(name); + if (new_sstate < 0) + return (EINVAL); + new_stype = acpi_sstate_to_stype(new_sstate); + if (acpi_supported_stypes[new_stype] == false) + return (EOPNOTSUPP); + if (new_stype != old_stype) + power_suspend_stype = new_stype; + return (err); +} static int acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) From nobody Fri Sep 26 16:03:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYFkb6jMLz68WFd; Fri, 26 Sep 2025 16:03: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYFkb5hhxz3q4w; Fri, 26 Sep 2025 16:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758902631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3WYP+dmpAU6GxOplnULEfJ3BVGNDUJdPs8nRpIr2u4=; b=KO6xgSQTEg94PVeHj5tW+lIITtKm1Z3u+AxxYSiNcaEC/p/akcc1iaOkXJiBFHk2m69yOD 2I7B1JtSnrya2x+pF0hEw8II2GyWG8jhx9KRCLexxIo6Sx4fPUWyKXdJmkr4SO12PX7atA 7ELuCcvUOCUVjG/xZ//u0lO4VgJGiLh2yR2n66Ul/ptD3MXaxU0fTISH1iTrZo+uDlkVWy 1wTNNXFNYQ0GiVdK9DUoJeqdXU6QuTDCNaepYfL8lu0IHu+kZBVtOB0xK2jePdbtYMh6bQ rYoZliJJUT/hPPLqbrhwIOTrnOP3R3M9qwUdNZ62SX1j41dgl1MY4CDHaHHDcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758902631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k3WYP+dmpAU6GxOplnULEfJ3BVGNDUJdPs8nRpIr2u4=; b=I5riIVxERkTDUJx0uicpG2nGWmdsNrAovJSisn80TyK3+/M5cYNPUDZtJK+U3Bp/lEe+3O X1UplrwFdLWEvM2gWme52qNMTAhRTN+3sjv94EPBH83UUsauPgUNhqIkzHLXLYCyomfBee HhWzSIfbwOMOneiX4DzzMhwULz8QvvLedMRzpJm7EzhdXixxAidCyYhlnuiqAtskyat3Ig 9XlIQ/06qcw4AX5E6VJD9E/0Y1WzrMCEgc4ITTxRPmvlbLp0R4Ksm5Hc8mUKWs0FmPuEkM m967kFDyIumnLxpKJfO0RB4dO0I893KjbcNG+eF5n0TGLf9clfgPYHNbCGyzaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758902631; a=rsa-sha256; cv=none; b=Xdx6t02SMHAGvQVIvbpiWPDRaxX4jtJhafGKmKLaLNdet40TkPpH6DweNwWbvfTLYn93HU uMAzU2rGVk+wFBSOjN2kg/5f9QhMUY7K0iXqofM1gbLdb8SxPMDdbHeBaximl1xaH8tahi nvI1fhdVTLWyFE/r1ZMGFiZg1QwCyxedXMFtwfUa9IPK8nGicNVtOikd524o2pXWS7yD+A Ds9SBwxQyKxcLTd7BA7jWXp/xzmY5zt07APMeGD3GrBgajKZ6wcvYGGYneJYyp5DBEoPF6 BOicqrXj7Wy2W2mmv8V5VyMe28FPp+BwJTx0oW3RxYDmWBp8hdq1PiHEIcV6ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYFkb476Dztp7; Fri, 26 Sep 2025 16:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58QG3pbZ069290; Fri, 26 Sep 2025 16:03:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58QG3pq4069287; Fri, 26 Sep 2025 16:03:51 GMT (envelope-from git) Date: Fri, 26 Sep 2025 16:03:51 GMT Message-Id: <202509261603.58QG3pq4069287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 5632b0d4628d - main - sys/power: Sleep type reporting by PM backends List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5632b0d4628d768c125594a3edee21fb23940067 Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=5632b0d4628d768c125594a3edee21fb23940067 commit 5632b0d4628d768c125594a3edee21fb23940067 Author: Aymeric Wibo AuthorDate: 2025-09-26 15:50:16 +0000 Commit: Aymeric Wibo CommitDate: 2025-09-26 16:03:13 +0000 sys/power: Sleep type reporting by PM backends Allow PM backends to report supported sleep types when registering through `power_pm_register`. Expose this information through `kern.power.supported_stype` sysctl, and set defaults for `power_standby/suspend/hibernate_stype` based on this. Implement this in ACPI PM backend. Reviewed by: cy Approved by: cy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52727 Event: EuroBSDcon 2025 Devsummit --- sys/dev/acpica/acpi.c | 6 ++++-- sys/kern/subr_power.c | 46 +++++++++++++++++++++++++++++++++++++++++----- sys/sys/power.h | 3 ++- 3 files changed, 47 insertions(+), 8 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 6994f46eba10..7f9ca6e39df8 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -746,7 +746,8 @@ acpi_attach(device_t dev) goto out; /* Register ACPI again to pass the correct argument of pm_func. */ - power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc); + power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, sc, + acpi_supported_stypes); acpi_platform_osc(dev); @@ -4819,7 +4820,8 @@ acpi_pm_register(void *arg) if (!cold || resource_disabled("acpi", 0)) return; - power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL); + power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL, + acpi_supported_stypes); } SYSINIT(power, SI_SUB_KLD, SI_ORDER_ANY, acpi_pm_register, NULL); diff --git a/sys/kern/subr_power.c b/sys/kern/subr_power.c index eb5bd03f5018..f5a581e42bf3 100644 --- a/sys/kern/subr_power.c +++ b/sys/kern/subr_power.c @@ -39,13 +39,14 @@ #include #include -enum power_stype power_standby_stype = POWER_STYPE_STANDBY; -enum power_stype power_suspend_stype = POWER_STYPE_SUSPEND_TO_IDLE; -enum power_stype power_hibernate_stype = POWER_STYPE_HIBERNATE; +enum power_stype power_standby_stype = POWER_STYPE_UNKNOWN; +enum power_stype power_suspend_stype = POWER_STYPE_UNKNOWN; +enum power_stype power_hibernate_stype = POWER_STYPE_UNKNOWN; static u_int power_pm_type = POWER_PM_TYPE_NONE; static power_pm_fn_t power_pm_fn = NULL; static void *power_pm_arg = NULL; +static bool power_pm_supported[POWER_STYPE_COUNT] = {0}; static struct task power_pm_task; enum power_stype @@ -70,6 +71,26 @@ power_stype_to_name(enum power_stype stype) return (power_stype_names[stype]); } +static int +sysctl_supported_stypes(SYSCTL_HANDLER_ARGS) +{ + int error; + struct sbuf sb; + enum power_stype stype; + + sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); + for (stype = 0; stype < POWER_STYPE_COUNT; stype++) { + if (power_pm_supported[stype]) + sbuf_printf(&sb, "%s ", power_stype_to_name(stype)); + } + sbuf_trim(&sb); + sbuf_finish(&sb); + error = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + sbuf_delete(&sb); + + return (error); +} + static int power_sysctl_stype(SYSCTL_HANDLER_ARGS) { @@ -86,7 +107,8 @@ power_sysctl_stype(SYSCTL_HANDLER_ARGS) new_stype = power_name_to_stype(name); if (new_stype == POWER_STYPE_UNKNOWN) return (EINVAL); - /* TODO Check to see if the new stype is supported. */ + if (!power_pm_supported[new_stype]) + return (EOPNOTSUPP); if (new_stype != old_stype) *(enum power_stype *)oidp->oid_arg1 = new_stype; return (0); @@ -95,6 +117,9 @@ power_sysctl_stype(SYSCTL_HANDLER_ARGS) static SYSCTL_NODE(_kern, OID_AUTO, power, CTLFLAG_RW, 0, "Generic power management related sysctls"); +SYSCTL_PROC(_kern_power, OID_AUTO, supported_stype, + CTLTYPE_STRING | CTLFLAG_RD, 0, 0, sysctl_supported_stypes, "A", + "List supported sleep types"); SYSCTL_PROC(_kern_power, OID_AUTO, standby, CTLTYPE_STRING | CTLFLAG_RW, &power_standby_stype, 0, power_sysctl_stype, "A", "Sleep type to enter on standby"); @@ -114,7 +139,8 @@ power_pm_deferred_fn(void *arg, int pending) } int -power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg) +power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg, + bool pm_supported[static POWER_STYPE_COUNT]) { int error; @@ -123,6 +149,16 @@ power_pm_register(u_int pm_type, power_pm_fn_t pm_fn, void *pm_arg) power_pm_type = pm_type; power_pm_fn = pm_fn; power_pm_arg = pm_arg; + memcpy(power_pm_supported, pm_supported, + sizeof(power_pm_supported)); + if (power_pm_supported[POWER_STYPE_STANDBY]) + power_standby_stype = POWER_STYPE_STANDBY; + if (power_pm_supported[POWER_STYPE_SUSPEND_TO_MEM]) + power_suspend_stype = POWER_STYPE_SUSPEND_TO_MEM; + else if (power_pm_supported[POWER_STYPE_SUSPEND_TO_IDLE]) + power_suspend_stype = POWER_STYPE_SUSPEND_TO_IDLE; + if (power_pm_supported[POWER_STYPE_HIBERNATE]) + power_hibernate_stype = POWER_STYPE_HIBERNATE; error = 0; TASK_INIT(&power_pm_task, 0, power_pm_deferred_fn, NULL); } else { diff --git a/sys/sys/power.h b/sys/sys/power.h index 44d7fc354423..33ace400bfd2 100644 --- a/sys/sys/power.h +++ b/sys/sys/power.h @@ -91,7 +91,8 @@ extern const char *power_stype_to_name(enum power_stype _stype); typedef int (*power_pm_fn_t)(u_long _cmd, void* _arg, enum power_stype _stype); extern int power_pm_register(u_int _pm_type, power_pm_fn_t _pm_fn, - void *_pm_arg); + void *_pm_arg, + bool _pm_supported[static POWER_STYPE_COUNT]); extern u_int power_pm_get_type(void); extern void power_pm_suspend(int); From nobody Sat Sep 27 04:01:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYYfG2Y2Yz68g0R; Sat, 27 Sep 2025 04:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYYfF3gJDz3vTD; Sat, 27 Sep 2025 04:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ekoN3HluBF3g6X4/rOuDJ362vWaawjYwGkf5F2zKpk=; b=tI/Wo6qef4LoJHXYh8HqneMVhh40qk5ljL92UmK/j9IXQSIoTYwYE1FCZdp6hgFBcbk67s UisJj+PI7RN26/sRB8hCiwhg3CmA1fW2wh4hxRYgTHwRq2RMAwXJsujYnIp3w+Ri4SA0TZ 2971KBTWOy59rmDCnM4TXCZA6SimQeKsat3ukHtlAzWsK0axIZzs2MRvGVJbQrl0gwPihM aIz0ved82lSU0t60g0j4DDqmwHO451K/cPm0jrWnkZu/kIxVtiLZSHvgGc03S3oBM9uwmz CKmUjAEFr8O1/LZsXWtXumiFZP/TNO5EZDQg4ItRR77EMH5W2cuHoHAFvKNikw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ekoN3HluBF3g6X4/rOuDJ362vWaawjYwGkf5F2zKpk=; b=g72QyGm5KUpk4IT8pf7JVsHVaald4uPvY+autVf+mhGHYlbN6zrccyeYrlMozrQgte14Y2 NUzGim3MtrhtKD5StKIQs8FdB9sFMWawSIkmnMECvhgnP2y+a35T9KE9icMdY35geqC/Bh FupLSWkalavhJcwA1VIOleve2HsFIbwCUrrJLbDJqcukE0X4svehNYFYAEl7nATFoU5bq7 Y7ydd2MyyhhNhE3sK7FYkR8kDlqe4FULDiGbajIobsbLTokDzGyyPgMUzylpD3LfgigKnE LmdiU+iRoxiVwfvQkAMHv2ZrPQHlMspKjAsGtoaHDaU87Jxod0s7LTmsdOrhBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758945669; a=rsa-sha256; cv=none; b=GDcQQY8Scb8iWMdVnqYsQZJvNaJPNB8zcSwIufH1DpNaHKDXXf7tLq1/Pm3oKrZ7YzRJXl sKv8LqfyYgo2Tk8rLYgYMlWsEZGAKNzsOWAwLDgwYwwNX1mjCRSxjllbnzozaxNypstsrx fYCUHp/CYdTfUcBd8fHv+5FqMUNS02r5GeKBC7mZD2LmY+4Mcmt+9Db8yPJzWvvO1mP+A9 7nFmrLqAj1zTUfKVt2vpWRqrNLgeZ3DaQHvXTnO7yKo8Gk1yE42nAWzd55iOopGENQnA+l yf7LRT/QSQcJC+fbxoZrE8fSck6cdeUE2UB47a4BJEEooqX5DV7/JhV64EQQrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYYfF3FnHz20n; Sat, 27 Sep 2025 04:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R419ku014800; Sat, 27 Sep 2025 04:01:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R419ZI014797; Sat, 27 Sep 2025 04:01:09 GMT (envelope-from git) Date: Sat, 27 Sep 2025 04:01:09 GMT Message-Id: <202509270401.58R419ZI014797@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: 5c0e5f418d9f - main - BUF_ISLOCKED.9: drop a reference to lockstatus(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c0e5f418d9ff68a21d606d62b5fb748b7de229b Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5c0e5f418d9ff68a21d606d62b5fb748b7de229b commit 5c0e5f418d9ff68a21d606d62b5fb748b7de229b Author: Mateusz Guzik AuthorDate: 2025-09-26 20:45:42 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-27 04:00:59 +0000 BUF_ISLOCKED.9: drop a reference to lockstatus(9) It's the same as lockmgr(9), which the man page already refers to. --- share/man/man9/BUF_ISLOCKED.9 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/share/man/man9/BUF_ISLOCKED.9 b/share/man/man9/BUF_ISLOCKED.9 index 09dfc458c834..c50d79c889fd 100644 --- a/share/man/man9/BUF_ISLOCKED.9 +++ b/share/man/man9/BUF_ISLOCKED.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd January 22, 2008 +.Dd September 26, 2025 .Dt BUF_ISLOCKED 9 .Os .Sh NAME @@ -60,8 +60,7 @@ The lock is not held by anyone. .Xr buf 9 , .Xr BUF_LOCK 9 , .Xr BUF_UNLOCK 9 , -.Xr lockmgr 9 , -.Xr lockstatus 9 +.Xr lockmgr 9 .Sh AUTHORS This manual page was written by .An Attilio Rao Aq Mt attilio@FreeBSD.org . From nobody Sat Sep 27 04:01:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYYfG65rBz68g8v; Sat, 27 Sep 2025 04:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYYfG4Y9Vz3vBd; Sat, 27 Sep 2025 04:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HGaqGYTuvqxo7W6rTlDVOEAxbATKyNLinGfpSkOhhb0=; b=o/gsNF5tKbpHvcup2U+Rbu/6YjUT3Hc+nWb1atkDenBbIZyf0xDASyYfQX/JEKyKuEFqeR oZCn+Isb4gwfowSq11szBAc75jjmtepn6hFf0bu41Qtyo5dljOFhstlYP+kSb6vfsnrFA7 JSLP/INT3Lb6hB1AcRJD07EbfwWnQqlKiroSTjMYeuSTJUfCmREpvmhlbI+fnO1HjRBO0t jEbloBsJbEUGi9i46ptyQ1SPEoe4e/+unXX/IL4d8hqPhgLAsrdkjR+T9LbIGkutsskvuh Zr8Iwf8SnCpP1XxS9BCO3NZCORBJJy22CuaV1jL12PzD7xqccyU3u8OydZKnfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HGaqGYTuvqxo7W6rTlDVOEAxbATKyNLinGfpSkOhhb0=; b=KLQ2w6MTyVO164DHj69y5zP3+t+hPe79xhS5wNhrL625p8+OPIiVkPcaMIUY/d/aQp4hM6 vwt77hur7Fb0cO5nMTQZSvR2Q79/40x9NuDY/UY8iioSB6xbMfmGKt0foDr9KAMh0d+qZy BO1gQInuiVjR/Q5U5K9B1qcMZflrsTBwnpNmzjyH4i7bQyHBRmXnOPLRzXwMtIPoecs0sY OfhE8EabeKcrH0bUNKJrmGKNJyHpjwH5fjGlYc8LDdfh+q6d7aR0ruFRp//x82LyHCmf8c aoRu87S0I6Q8LXbjMGG8JAnYm14ydbZyqSSs0MGZ0v83NgSt/p/oMB6MrcrR0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758945670; a=rsa-sha256; cv=none; b=RjEDZoPFXc9PIdScORfWiznC8z6ulreXkRaBrw14QGNEGdeFD8vQnjQ8QX0meLthRCidcS 8BIKsTxMoC4CJrJpyEZOxPOdfob4YmDUfoD/QChBFFom3zy0laK/4XaYMFcpcfJ5JDSYsc CHBxRZV6kOJMyyKwhUnbbiUvA1nt2MwQyD7QoGsG6643kXPU10FxGXgdhNDsw/REVxFMjp yEqlAsUS+ZwjjX/0ZE6fKcqjjAz/B09MggdJXPSGlpaV2h/7XPC+H759JJiUXS4Tfi/RWu hidNyEGgSIVfv7chqY6Ki31cHk/KIMjh8ZxPhf1KTQB2V6770d1FITa+XGzDjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYYfG48Pcz20p; Sat, 27 Sep 2025 04:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R41Apt014832; Sat, 27 Sep 2025 04:01:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R41A7b014829; Sat, 27 Sep 2025 04:01:10 GMT (envelope-from git) Date: Sat, 27 Sep 2025 04:01:10 GMT Message-Id: <202509270401.58R41A7b014829@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: 08f06aa1b4fb - main - vfs: retire the VCALL macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08f06aa1b4fb6db0d8beb3e1c328b1c1adbec13a Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=08f06aa1b4fb6db0d8beb3e1c328b1c1adbec13a commit 08f06aa1b4fb6db0d8beb3e1c328b1c1adbec13a Author: Mateusz Guzik AuthorDate: 2025-09-27 02:01:32 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-27 04:00:59 +0000 vfs: retire the VCALL macro There is precisely one place using it and even that should probably go away. --- sys/fs/nullfs/null_vnops.c | 2 +- sys/sys/vnode.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 74c1a8f3acb6..ba29b0485326 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -306,7 +306,7 @@ null_bypass(struct vop_generic_args *ap) * with the modified argument structure. */ if (vps_p[0] != NULL && *vps_p[0] != NULL) { - error = VCALL(ap); + error = ap->a_desc->vdesc_call(ap); } else { printf("null_bypass: no map for %s\n", descp->vdesc_name); error = EINVAL; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 6ef9bbec9446..fcfb8716fc52 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -594,11 +594,6 @@ void assert_vop_unlocked(struct vnode *vp, const char *str); #endif /* INVARIANTS */ -/* - * This call works for vnodes in the kernel. - */ -#define VCALL(c) ((c)->a_desc->vdesc_call(c)) - #define DOINGASYNC(vp) \ (((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) != 0 && \ ((curthread->td_pflags & TDP_SYNCIO) == 0)) From nobody Sat Sep 27 04:01:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYYfJ1qH5z68gNk; Sat, 27 Sep 2025 04:01: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYYfH5b6Vz3tq5; Sat, 27 Sep 2025 04:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fnxsKmtbEiieu2AI7PLhbgIEg9Fiy4S4/ds6Ue9bFXQ=; b=pNlNZVkYwyXUA2ng2PBC19H58U640lZocXgEQ4tdkLzyRjwXSL3w4VTxwuhE5eJa+QC7FA tkb5FH77xN4V7+wX033A+Ce6GeRYz+GUiwpXosHskhRWOIBjArgaVh8Y2eogvNCp+0hIgP DGxsheuGzXN2ZtnzjWukGNTC4q+j61lKhoAr8gXSB0JidPHYWdVUITMPzzRpirKmVzzvFe rNnvvlbALsyCLwiRBJHzzOKTJoMgOOFJJWdrx/XYR5mjtQ6rOR9ov5II10YbFmdsGpDF+t +0gvt2U/K4VFCELRpu5GAee3vcnLjcMogoeUfI/zRvMB9EpN8P0fx6FgzJ7GQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fnxsKmtbEiieu2AI7PLhbgIEg9Fiy4S4/ds6Ue9bFXQ=; b=ILJC7lyIEqAa1lon3WOhON2+N1rAHzctxe5ceA/MQm1ZOofv40egPbfFR9PUf0Z1Em9xp3 x5am+KKbF1q6KPzAcIezKQ0QmnjjgDL/ljJ+g352Hc6jKhUm3pR/8k4Sahssn3qdVqjOo+ qYqwL0aGhowtYT4YEgGResngafxQjoHQvR8rZxC+m87LX6tL8uAzykoiKkGz79XJh0pluX /1ZKTSkRPJMgo9/4cGouqyG656OY5GlFDSSrSSqgEvMNYAurKsqHrMcC/MSaeNy3dD7uZE bxyRGvwayxuLVdEqEkFlzrkBOx7fMAPj6z1lI/DH+OzQUIeTpWtEMp4sPDzz1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758945671; a=rsa-sha256; cv=none; b=JZy1ltfDjFIdPRnX2kptSWXDEZrT5Cb/3zoQa7OrJnCwdeEiCREiJ85tcHZLBkGmoZScv6 FIXocDdGPB0eDYW9dJ/QKCwPCCwu88xA2Nx++j+O5KO/vkAf/G3rEiaLdSqOHTDspMGA1H G74OdgljFEbMsH/Qsjlb9Lhht5JJ/Yu798kp0nK/XvrTguyLwn+h/oksYMQBo9/WgZHMz5 anAsHGzDJAGo+ZScZ/W0ETPp1bI98uXhpJ289Y5N7sesJwcP6TiS2l5PeUGzS63QzKlpdO vqi0d1B5FtGIYmygH0ZK6jgJ+9RiFu01O21yOkEyRSqO2zTDuxvYTAbYwh55Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYYfH5BWbz2Jj; Sat, 27 Sep 2025 04:01:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R41BWf014868; Sat, 27 Sep 2025 04:01:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R41BlL014863; Sat, 27 Sep 2025 04:01:11 GMT (envelope-from git) Date: Sat, 27 Sep 2025 04:01:11 GMT Message-Id: <202509270401.58R41BlL014863@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: 01c8e2e33df8 - main - vfs: retire the NULLVP macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01c8e2e33df81b242d73a23de49a6b61f33c24c1 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=01c8e2e33df81b242d73a23de49a6b61f33c24c1 commit 01c8e2e33df81b242d73a23de49a6b61f33c24c1 Author: Mateusz Guzik AuthorDate: 2025-09-27 02:07:04 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-27 04:00:59 +0000 vfs: retire the NULLVP macro The kernel was already mostly using plain NULL, just whack it and be doen with the legacy. Churn generated with coccinelle: @@ @@ - NULLVP + NULL --- sys/fs/cd9660/cd9660_vfsops.c | 8 +- sys/fs/devfs/devfs_vnops.c | 2 +- sys/fs/ext2fs/ext2_vfsops.c | 4 +- sys/fs/fdescfs/fdesc_vnops.c | 6 +- sys/fs/fuse/fuse_vfsops.c | 4 +- sys/fs/msdosfs/msdosfs_vfsops.c | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 6 +- sys/fs/nfsclient/nfs_clvnops.c | 14 +- sys/fs/nullfs/null_subr.c | 6 +- sys/fs/nullfs/null_vnops.c | 8 +- sys/fs/p9fs/p9fs_vfsops.c | 10 +- sys/fs/p9fs/p9fs_vnops.c | 6 +- sys/fs/pseudofs/pseudofs_vncache.c | 2 +- sys/fs/smbfs/smbfs_vnops.c | 4 +- sys/fs/tarfs/tarfs_vfsops.c | 6 +- sys/fs/tarfs/tarfs_vnops.c | 4 +- sys/fs/tmpfs/tmpfs_vnops.c | 4 +- sys/fs/udf/udf_vfsops.c | 4 +- sys/fs/unionfs/union_subr.c | 106 ++++++------- sys/fs/unionfs/union_vfsops.c | 6 +- sys/fs/unionfs/union_vnops.c | 304 ++++++++++++++++++------------------- sys/kern/uipc_mqueue.c | 2 +- sys/kern/vfs_lookup.c | 2 +- sys/kern/vfs_mountroot.c | 2 +- sys/kern/vfs_syscalls.c | 2 +- sys/sys/vnode.h | 2 - sys/ufs/ffs/ffs_softdep.c | 2 +- sys/ufs/ffs/ffs_vfsops.c | 2 +- sys/ufs/ufs/ufs_quota.c | 38 ++--- 29 files changed, 283 insertions(+), 285 deletions(-) diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index b4db4c4f7331..ce6d03b73290 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -617,13 +617,13 @@ cd9660_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) #endif if ((error = VFS_VGET(mp, ifh.ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { - *vpp = NULLVP; + *vpp = NULL; return (error); } ip = VTOI(nvp); if (ip->inode.iso_mode == 0) { vput(nvp); - *vpp = NULLVP; + *vpp = NULL; return (ESTALE); } *vpp = nvp; @@ -704,7 +704,7 @@ cd9660_vget_internal(struct mount *mp, ino_t ino, int flags, /* Allocate a new vnode/iso_node. */ if ((error = getnewvnode("isofs", mp, &cd9660_vnodeops, &vp)) != 0) { - *vpp = NULLVP; + *vpp = NULL; return (error); } ip = malloc(sizeof(struct iso_node), M_ISOFSNODE, @@ -717,7 +717,7 @@ cd9660_vget_internal(struct mount *mp, ino_t ino, int flags, error = insmntque(vp, mp); if (error != 0) { free(ip, M_ISOFSNODE); - *vpp = NULLVP; + *vpp = NULL; return (error); } error = vfs_hash_insert(vp, ino, flags, td, vpp, cd9660_vfs_hash_cmp, diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 3a64c205186f..590e04ac9aa5 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1061,7 +1061,7 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock) mp = dvp->v_mount; dmp = VFSTODEVFS(mp); dd = dvp->v_data; - *vpp = NULLVP; + *vpp = NULL; if ((flags & ISLASTCN) && nameiop == RENAME) return (EOPNOTSUPP); diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index 9e7a03fffd71..0f3808a7c747 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -1334,14 +1334,14 @@ ext2_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) error = VFS_VGET(mp, ufhp->ufid_ino, LK_EXCLUSIVE, &nvp); if (error) { - *vpp = NULLVP; + *vpp = NULL; return (error); } ip = VTOI(nvp); if (ip->i_mode == 0 || ip->i_gen != ufhp->ufid_gen || ip->i_nlink <= 0) { vput(nvp); - *vpp = NULLVP; + *vpp = NULL; return (ESTALE); } *vpp = nvp; diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 58a22b8bdc50..3014136fcbdb 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -196,7 +196,7 @@ loop: if (error != 0) { vgone(vp); vput(vp); - *vpp = NULLVP; + *vpp = NULL; return (error); } @@ -211,7 +211,7 @@ loop: mtx_unlock(&fdesc_hashmtx); vgone(vp); vput(vp); - *vpp = NULLVP; + *vpp = NULL; return (-1); } @@ -227,7 +227,7 @@ loop: vput(vp); /* If we didn't get it, return no vnode. */ if (error) - vp2 = NULLVP; + vp2 = NULL; *vpp = vp2; return (error); } diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index 1b858a988289..b617925c4e5f 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -278,13 +278,13 @@ fuse_vfsop_fhtovp(struct mount *mp, struct fid *fhp, int flags, error = VFS_VGET(mp, ffhp->nid, LK_EXCLUSIVE, &nvp); if (error) { - *vpp = NULLVP; + *vpp = NULL; return (error); } fvdat = VTOFUD(nvp); if (fvdat->generation != ffhp->gen ) { vput(nvp); - *vpp = NULLVP; + *vpp = NULL; return (ESTALE); } *vpp = nvp; diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 4431d36c8a8e..30c63cfa8a35 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -1184,7 +1184,7 @@ msdosfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) error = deget(pmp, defhp->defid_dirclust, defhp->defid_dirofs, LK_EXCLUSIVE, &dep); if (error) { - *vpp = NULLVP; + *vpp = NULL; return (error); } *vpp = DETOV(dep); diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 4ec621de2eff..6c2e35713287 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -3981,7 +3981,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, int len, left; struct dirent *dp = NULL; u_int32_t *tl; - vnode_t newvp = NULLVP; + vnode_t newvp = NULL; struct nfsrv_descript nfsd, *nd = &nfsd; struct nameidata nami, *ndp = &nami; struct componentname *cnp = &ndp->ni_cnd; @@ -4436,7 +4436,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, } } nfhp = NULL; - if (newvp != NULLVP) { + if (newvp != NULL) { if (attr_ok) error = nfscl_loadattrcache(&newvp, &nfsva, NULL, 0, 0); @@ -4466,7 +4466,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, vput(newvp); else vrele(newvp); - newvp = NULLVP; + newvp = NULL; } } } else if (nfhp != NULL) { diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index eee571a04821..683d6099401e 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1284,7 +1284,7 @@ nfs_lookup(struct vop_lookup_args *ap) bool is_nameddir, needs_nameddir, opennamed; dattrflag = 0; - *vpp = NULLVP; + *vpp = NULL; nmp = VFSTONFS(mp); opennamed = (flags & (OPENNAMED | ISLASTCN)) == (OPENNAMED | ISLASTCN); if (opennamed && (!NFSHASNFSV4(nmp) || !NFSHASNFSV4N(nmp))) @@ -1309,7 +1309,7 @@ nfs_lookup(struct vop_lookup_args *ap) /* * If the named attribute directory is needed, acquire it now. */ - newvp = NULLVP; + newvp = NULL; if (needs_nameddir) { KASSERT(np->n_v4 == NULL, ("nfs_lookup: O_NAMEDATTR when" " n_v4 not NULL")); @@ -1322,7 +1322,7 @@ nfs_lookup(struct vop_lookup_args *ap) } dvp = newvp; np = VTONFS(dvp); - newvp = NULLVP; + newvp = NULL; } else if (opennamed && cnp->cn_namelen == 1 && *cnp->cn_nameptr == '.') { VREF(dvp); @@ -1399,7 +1399,7 @@ nfs_lookup(struct vop_lookup_args *ap) vput(newvp); else vrele(newvp); - *vpp = NULLVP; + *vpp = NULL; } else if (error == ENOENT) { if (VN_IS_DOOMED(dvp)) return (ENOENT); @@ -1450,7 +1450,7 @@ nfs_lookup(struct vop_lookup_args *ap) NFSUNLOCKMNT(nmp); #endif - newvp = NULLVP; + newvp = NULL; NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); nanouptime(&ts); error = nfsrpc_lookup(dvp, cnp->cn_nameptr, cnp->cn_namelen, @@ -1464,9 +1464,9 @@ nfs_lookup(struct vop_lookup_args *ap) } handle_error: if (error) { - if (newvp != NULLVP) { + if (newvp != NULL) { vput(newvp); - *vpp = NULLVP; + *vpp = NULL; } if (error != ENOENT) { diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index 7dcc83880bb9..053614b6910d 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -119,7 +119,7 @@ null_hashget_locked(struct mount *mp, struct vnode *lowervp) return (vp); } } - return (NULLVP); + return (NULL); } struct vnode * @@ -130,7 +130,7 @@ null_hashget(struct mount *mp, struct vnode *lowervp) hd = NULL_NHASH(lowervp); if (LIST_EMPTY(hd)) - return (NULLVP); + return (NULL); rw_rlock(&null_hash_lock); vp = null_hashget_locked(mp, lowervp); @@ -298,7 +298,7 @@ null_checkvp(struct vnode *vp, char *fil, int lno) panic("null_checkvp"); } #endif - if (a->null_lowervp == NULLVP) { + if (a->null_lowervp == NULL) { /* Should never happen */ panic("null_checkvp %p", vp); } diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index ba29b0485326..8f25a7c4ca70 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -273,9 +273,9 @@ null_bypass(struct vop_generic_args *ap) * are of our type. Check for and don't map any * that aren't. (We must always map first vp or vclean fails.) */ - if (i != 0 && (*this_vp_p == NULLVP || - (*this_vp_p)->v_op != &null_vnodeops)) { - old_vps[i] = NULLVP; + if (i != 0 && (*this_vp_p == NULL || + (*this_vp_p)->v_op != &null_vnodeops)) { + old_vps[i] = NULL; } else { old_vps[i] = *this_vp_p; *(vps_p[i]) = NULLVPTOLOWERVP(*this_vp_p); @@ -336,7 +336,7 @@ null_bypass(struct vop_generic_args *ap) * must move lock ownership from lower to * upper (reclaimed) vnode. */ - if (lvp != NULLVP) { + if (lvp != NULL) { null_copy_inotify(old_vps[i], lvp, VIRF_INOTIFY); null_copy_inotify(old_vps[i], lvp, diff --git a/sys/fs/p9fs/p9fs_vfsops.c b/sys/fs/p9fs/p9fs_vfsops.c index e0e91e7e1709..953e6eda547a 100644 --- a/sys/fs/p9fs/p9fs_vfsops.c +++ b/sys/fs/p9fs/p9fs_vfsops.c @@ -287,7 +287,7 @@ p9fs_vget_common(struct mount *mp, struct p9fs_node *np, int flags, node->flags |= P9FS_NODE_DELETED; vput(vp); - *vpp = NULLVP; + *vpp = NULL; vp = NULL; } else { *vpp = vp; @@ -308,7 +308,7 @@ p9fs_vget_common(struct mount *mp, struct p9fs_node *np, int flags, /* Allocate a new vnode. */ if ((error = getnewvnode("p9fs", mp, &p9fs_vnops, &vp)) != 0) { - *vpp = NULLVP; + *vpp = NULL; P9_DEBUG(ERROR, "%s: getnewvnode failed: %d\n", __func__, error); return (error); } @@ -397,7 +397,7 @@ out: vput(vp); } - *vpp = NULLVP; + *vpp = NULL; return (error); } @@ -525,14 +525,14 @@ p9fs_root(struct mount *mp, int lkflags, struct vnode **vpp) if (vfid == NULL && clnt->trans_status == P9FS_BEGIN_DISCONNECT) vfid = vmp->p9fs_session.mnt_fid; else { - *vpp = NULLVP; + *vpp = NULL; return (error); } } error = p9fs_vget_common(mp, np, lkflags, np, vfid, vpp, NULL); if (error != 0) { - *vpp = NULLVP; + *vpp = NULL; return (error); } np->v_node = *vpp; diff --git a/sys/fs/p9fs/p9fs_vnops.c b/sys/fs/p9fs/p9fs_vnops.c index acb73973d93b..2ed1be82b57f 100644 --- a/sys/fs/p9fs/p9fs_vnops.c +++ b/sys/fs/p9fs/p9fs_vnops.c @@ -233,7 +233,7 @@ p9fs_lookup(struct vop_lookup_args *ap) dnp = P9FS_VTON(dvp); error = 0; flags = cnp->cn_flags; - *vpp = NULLVP; + *vpp = NULL; if (dnp == NULL) return (ENOENT); @@ -329,7 +329,7 @@ p9fs_lookup(struct vop_lookup_args *ap) else vrele(vp); - *vpp = NULLVP; + *vpp = NULL; } else if (error == ENOENT) { if (VN_IS_DOOMED(dvp)) goto out; @@ -341,7 +341,7 @@ p9fs_lookup(struct vop_lookup_args *ap) } /* Reset values */ error = 0; - vp = NULLVP; + vp = NULL; tmpchr = cnp->cn_nameptr[cnp->cn_namelen]; cnp->cn_nameptr[cnp->cn_namelen] = '\0'; diff --git a/sys/fs/pseudofs/pseudofs_vncache.c b/sys/fs/pseudofs/pseudofs_vncache.c index e58aced7f81b..4fd493f8b9d3 100644 --- a/sys/fs/pseudofs/pseudofs_vncache.c +++ b/sys/fs/pseudofs/pseudofs_vncache.c @@ -202,7 +202,7 @@ alloc: error = insmntque(*vpp, mp); if (error != 0) { free(pvd, M_PFSVNCACHE); - *vpp = NULLVP; + *vpp = NULL; return (error); } vn_set_state(*vpp, VSTATE_CONSTRUCTED); diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index 63b249c93771..a97bc22b3aca 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -1121,13 +1121,13 @@ smbfs_lookup(struct vop_lookup_args *ap) vput(vp); else vrele(vp); - *vpp = NULLVP; + *vpp = NULL; } /* * entry is not in the cache or has been expired */ error = 0; - *vpp = NULLVP; + *vpp = NULL; scred = smbfs_malloc_scred(); smb_makescred(scred, td, cnp->cn_cred); fap = &fattr; diff --git a/sys/fs/tarfs/tarfs_vfsops.c b/sys/fs/tarfs/tarfs_vfsops.c index a534b18ebf34..4cc70e4d5781 100644 --- a/sys/fs/tarfs/tarfs_vfsops.c +++ b/sys/fs/tarfs/tarfs_vfsops.c @@ -1201,7 +1201,7 @@ tarfs_vget(struct mount *mp, ino_t ino, int lkflags, struct vnode **vpp) return (0); bad: - *vpp = NULLVP; + *vpp = NULL; return (error); } @@ -1220,7 +1220,7 @@ tarfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) error = VFS_VGET(mp, tfp->ino, LK_EXCLUSIVE, &nvp); if (error != 0) { - *vpp = NULLVP; + *vpp = NULL; return (error); } tnp = VP_TO_TARFS_NODE(nvp); @@ -1228,7 +1228,7 @@ tarfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) tnp->gen != tfp->gen || tnp->nlink <= 0) { vput(nvp); - *vpp = NULLVP; + *vpp = NULL; return (ESTALE); } *vpp = nvp; diff --git a/sys/fs/tarfs/tarfs_vnops.c b/sys/fs/tarfs/tarfs_vnops.c index c110107bb210..b0921909b3b4 100644 --- a/sys/fs/tarfs/tarfs_vnops.c +++ b/sys/fs/tarfs/tarfs_vnops.c @@ -231,7 +231,7 @@ tarfs_lookup(struct vop_cachedlookup_args *ap) vpp = ap->a_vpp; cnp = ap->a_cnp; - *vpp = NULLVP; + *vpp = NULL; dirnode = VP_TO_TARFS_NODE(dvp); parent = dirnode->parent; tmp = dirnode->tmp; @@ -585,7 +585,7 @@ tarfs_reclaim(struct vop_reclaim_args *ap) vfs_hash_remove(vp); TARFS_NODE_LOCK(tnp); - tnp->vnode = NULLVP; + tnp->vnode = NULL; vp->v_data = NULL; TARFS_NODE_UNLOCK(tnp); diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 0f4ea2fdc28c..312d2e717e63 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -98,7 +98,7 @@ tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) /* Caller assumes responsibility for ensuring access (VEXEC). */ dnode = VP_TO_TMPFS_DIR(dvp); - *vpp = NULLVP; + *vpp = NULL; /* We cannot be requesting the parent directory of the root node. */ MPASS(IMPLIES(dnode->tn_type == VDIR && @@ -222,7 +222,7 @@ out: * locked. */ if (error == 0) { - MPASS(*vpp != NULLVP); + MPASS(*vpp != NULL); ASSERT_VOP_LOCKED(*vpp, __func__); } else { MPASS(*vpp == NULL); diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index c5ef1f686093..c1627285a174 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -736,14 +736,14 @@ udf_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) ifhp = (struct ifid *)fhp; if ((error = VFS_VGET(mp, ifhp->ifid_ino, LK_EXCLUSIVE, &nvp)) != 0) { - *vpp = NULLVP; + *vpp = NULL; return (error); } np = VTON(nvp); fsize = le64toh(np->fentry->inf_len); if (fsize > OFF_MAX) { - *vpp = NULLVP; + *vpp = NULL; return (EIO); } diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index edcc6716b674..a14f9ca74305 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -160,7 +160,7 @@ unionfs_get_cached_vnode_locked(struct vnode *lookup, struct vnode *dvp) if (VN_IS_DOOMED(vp) || ((vp->v_iflag & VI_DOINGINACT) != 0)) { VI_UNLOCK(vp); - vp = NULLVP; + vp = NULL; } else { vrefl(vp); VI_UNLOCK(vp); @@ -169,7 +169,7 @@ unionfs_get_cached_vnode_locked(struct vnode *lookup, struct vnode *dvp) } } - return (NULLVP); + return (NULL); } @@ -182,11 +182,11 @@ unionfs_get_cached_vnode(struct vnode *uvp, struct vnode *lvp, { struct vnode *vp; - vp = NULLVP; + vp = NULL; VI_LOCK(dvp); - if (uvp != NULLVP) + if (uvp != NULL) vp = unionfs_get_cached_vnode_locked(uvp, dvp); - else if (lvp != NULLVP) + else if (lvp != NULL) vp = unionfs_get_cached_vnode_locked(lvp, dvp); VI_UNLOCK(dvp); @@ -203,22 +203,22 @@ unionfs_ins_cached_vnode(struct unionfs_node *uncp, struct unionfs_node_hashhead *hd; struct vnode *vp; - vp = NULLVP; + vp = NULL; VI_LOCK(dvp); - if (uncp->un_uppervp != NULLVP) { + if (uncp->un_uppervp != NULL) { ASSERT_VOP_ELOCKED(uncp->un_uppervp, __func__); KASSERT(uncp->un_uppervp->v_type == VDIR, ("%s: v_type != VDIR", __func__)); vp = unionfs_get_cached_vnode_locked(uncp->un_uppervp, dvp); - } else if (uncp->un_lowervp != NULLVP) { + } else if (uncp->un_lowervp != NULL) { ASSERT_VOP_ELOCKED(uncp->un_lowervp, __func__); KASSERT(uncp->un_lowervp->v_type == VDIR, ("%s: v_type != VDIR", __func__)); vp = unionfs_get_cached_vnode_locked(uncp->un_lowervp, dvp); } - if (vp == NULLVP) { - hd = unionfs_get_hashhead(dvp, (uncp->un_uppervp != NULLVP ? - uncp->un_uppervp : uncp->un_lowervp)); + if (vp == NULL) { + hd = unionfs_get_hashhead(dvp, (uncp->un_uppervp != NULL ? + uncp->un_uppervp : uncp->un_lowervp)); LIST_INSERT_HEAD(hd, uncp, un_hash); } VI_UNLOCK(dvp); @@ -233,8 +233,8 @@ static void unionfs_rem_cached_vnode(struct unionfs_node *unp, struct vnode *dvp) { KASSERT(unp != NULL, ("%s: null node", __func__)); - KASSERT(dvp != NULLVP, - ("%s: null parent vnode", __func__)); + KASSERT(dvp != NULL, + ("%s: null parent vnode", __func__)); VI_LOCK(dvp); if (unp->un_hash.le_prev != NULL) { @@ -274,13 +274,13 @@ unionfs_nodeget_cleanup(struct vnode *vp, struct unionfs_node *unp) vgone(vp); vput(vp); - if (unp->un_dvp != NULLVP) + if (unp->un_dvp != NULL) vrele(unp->un_dvp); - if (unp->un_uppervp != NULLVP) { + if (unp->un_uppervp != NULL) { vput(unp->un_uppervp); - if (unp->un_lowervp != NULLVP) + if (unp->un_lowervp != NULL) vrele(unp->un_lowervp); - } else if (unp->un_lowervp != NULLVP) + } else if (unp->un_lowervp != NULL) vput(unp->un_lowervp); if (unp->un_hashtbl != NULL) hashdestroy(unp->un_hashtbl, M_UNIONFSHASH, UNIONFSHASHMASK); @@ -313,21 +313,21 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, ump = MOUNTTOUNIONFSMOUNT(mp); lkflags = (cnp ? cnp->cn_lkflags : 0); path = (cnp ? cnp->cn_nameptr : NULL); - *vpp = NULLVP; + *vpp = NULL; - if (uppervp == NULLVP && lowervp == NULLVP) + if (uppervp == NULL && lowervp == NULL) panic("%s: upper and lower are both null", __func__); - vt = (uppervp != NULLVP ? uppervp->v_type : lowervp->v_type); + vt = (uppervp != NULL ? uppervp->v_type : lowervp->v_type); /* If it has no ISLASTCN flag, path check is skipped. */ if (cnp && !(cnp->cn_flags & ISLASTCN)) path = NULL; /* check the cache */ - if (dvp != NULLVP && vt == VDIR) { + if (dvp != NULL && vt == VDIR) { vp = unionfs_get_cached_vnode(uppervp, lowervp, dvp); - if (vp != NULLVP) { + if (vp != NULL) { *vpp = vp; if (lkflags != 0) vn_lock(*vpp, lkflags | LK_RETRY); @@ -343,11 +343,11 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, free(unp, M_UNIONFSNODE); return (error); } - if (dvp != NULLVP) + if (dvp != NULL) vref(dvp); - if (uppervp != NULLVP) + if (uppervp != NULL) vref(uppervp); - if (lowervp != NULLVP) + if (lowervp != NULL) vref(lowervp); if (vt == VDIR) { @@ -361,7 +361,7 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, unp->un_uppervp = uppervp; unp->un_lowervp = lowervp; unp->un_dvp = dvp; - if (uppervp != NULLVP) + if (uppervp != NULL) vp->v_vnlock = uppervp->v_vnlock; else vp->v_vnlock = lowervp->v_vnlock; @@ -407,7 +407,7 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, * possibility of deadlock due to some other agent on the system * attempting to lock those two specific vnodes in the opposite order. */ - if (uppervp != NULLVP) + if (uppervp != NULL) vn_lock(uppervp, LK_EXCLUSIVE | LK_RETRY); else vn_lock(lowervp, LK_EXCLUSIVE | LK_RETRY); @@ -426,16 +426,16 @@ unionfs_nodeget(struct mount *mp, struct vnode *uppervp, * blocked on our vnode lock, effectively also preventing unmount * of the underlying filesystems. */ - VNASSERT(lowervp == NULLVP || !VN_IS_DOOMED(lowervp), vp, + VNASSERT(lowervp == NULL || !VN_IS_DOOMED(lowervp), vp, ("%s: doomed lowervp %p", __func__, lowervp)); - VNASSERT(uppervp == NULLVP || !VN_IS_DOOMED(uppervp), vp, + VNASSERT(uppervp == NULL || !VN_IS_DOOMED(uppervp), vp, ("%s: doomed lowervp %p", __func__, uppervp)); vn_set_state(vp, VSTATE_CONSTRUCTED); - if (dvp != NULLVP && vt == VDIR) + if (dvp != NULL && vt == VDIR) *vpp = unionfs_ins_cached_vnode(unp, dvp); - if (*vpp != NULLVP) { + if (*vpp != NULL) { unionfs_nodeget_cleanup(vp, unp); if (lkflags != 0) vn_lock(*vpp, lkflags | LK_RETRY); @@ -484,7 +484,7 @@ unionfs_noderem(struct vnode *vp) lvp = unp->un_lowervp; uvp = unp->un_uppervp; dvp = unp->un_dvp; - unlock_lvp = (uvp == NULLVP); + unlock_lvp = (uvp == NULL); /* * Lock the lower vnode in addition to the upper vnode lock in order @@ -496,7 +496,7 @@ unionfs_noderem(struct vnode *vp) * Moreover, during unmount of a non-"below" unionfs mount, the lower * root vnode will already be locked as it is the covered vnode. */ - if (uvp != NULLVP && lvp != NULLVP && (vp->v_vflag & VV_ROOT) == 0) { + if (uvp != NULL && lvp != NULL && (vp->v_vflag & VV_ROOT) == 0) { vn_lock_pair(uvp, true, LK_EXCLUSIVE, lvp, false, LK_EXCLUSIVE); unlock_lvp = true; } @@ -508,7 +508,7 @@ unionfs_noderem(struct vnode *vp) * prevent faults in unionfs_lock(). */ VI_LOCK(vp); - unp->un_lowervp = unp->un_uppervp = NULLVP; + unp->un_lowervp = unp->un_uppervp = NULL; vp->v_vnlock = &(vp->v_lock); vp->v_data = NULL; vp->v_object = NULL; @@ -543,14 +543,14 @@ unionfs_noderem(struct vnode *vp) ("%s: write reference without upper vnode", __func__)); VOP_ADD_WRITECOUNT(uvp, -writerefs); } - if (uvp != NULLVP) + if (uvp != NULL) vput(uvp); if (unlock_lvp) vput(lvp); - else if (lvp != NULLVP) + else if (lvp != NULL) vrele(lvp); - if (dvp != NULLVP) + if (dvp != NULL) unionfs_rem_cached_vnode(unp, dvp); if (unp->un_path != NULL) { @@ -567,7 +567,7 @@ unionfs_noderem(struct vnode *vp) LIST_REMOVE(unsp, uns_list); free(unsp, M_TEMP); } - if (dvp != NULLVP) { + if (dvp != NULL) { mtx_lock(&unionfs_deferred_rele_lock); STAILQ_INSERT_TAIL(&unionfs_deferred_rele_list, unp, un_rele); mtx_unlock(&unionfs_deferred_rele_lock); @@ -793,7 +793,7 @@ unionfs_node_update(struct unionfs_node *unp, struct vnode *uvp, /* * Re-cache the unionfs vnode against the upper vnode */ - if (dvp != NULLVP && vp->v_type == VDIR) { + if (dvp != NULL && vp->v_type == VDIR) { VI_LOCK(dvp); if (unp->un_hash.le_prev != NULL) { LIST_REMOVE(unp, un_hash); @@ -841,7 +841,7 @@ unionfs_set_in_progress_flag(struct vnode *vp, unsigned int flag) if (unp == NULL) error = ENOENT; else if (flag == UNIONFS_COPY_IN_PROGRESS && - unp->un_uppervp != NULLVP) + unp->un_uppervp != NULL) error = EJUSTRETURN; else if (flag == UNIONFS_LOOKUP_IN_PROGRESS) error = ERELOOKUP; @@ -902,7 +902,7 @@ unionfs_mkshadowdir(struct vnode *dvp, struct vnode *vp, ASSERT_VOP_ELOCKED(vp, __func__); ump = MOUNTTOUNIONFSMOUNT(vp->v_mount); unp = VTOUNIONFS(vp); - if (unp->un_uppervp != NULLVP) + if (unp->un_uppervp != NULL) return (EEXIST); dunp = VTOUNIONFS(dvp); udvp = dunp->un_uppervp; @@ -914,7 +914,7 @@ unionfs_mkshadowdir(struct vnode *dvp, struct vnode *vp, return (error); lvp = unp->un_lowervp; - uvp = NULLVP; + uvp = NULL; credbk = cnp->cn_cred; /* Authority change to root */ @@ -953,7 +953,7 @@ unionfs_mkshadowdir(struct vnode *dvp, struct vnode *vp, vput(udvp); goto unionfs_mkshadowdir_relock; } - if (uvp != NULLVP) { + if (uvp != NULL) { if (udvp == uvp) vrele(uvp); else @@ -1218,7 +1218,7 @@ unionfs_mkwhiteout(struct vnode *dvp, struct vnode *vp, ASSERT_VOP_ELOCKED(vp, __func__); udvp = VTOUNIONFS(dvp)->un_uppervp; - wvp = NULLVP; + wvp = NULL; NDPREINIT(&nd); vref(udvp); VOP_UNLOCK(vp); @@ -1226,7 +1226,7 @@ unionfs_mkwhiteout(struct vnode *dvp, struct vnode *vp, pathlen, CREATE))) { goto unionfs_mkwhiteout_cleanup; } - if (wvp != NULLVP) { + if (wvp != NULL) { if (udvp == wvp) vrele(wvp); else @@ -1281,7 +1281,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, ASSERT_VOP_ELOCKED(vp, __func__); unp = VTOUNIONFS(vp); ump = MOUNTTOUNIONFSMOUNT(UNIONFSTOV(unp)->v_mount); - uvp = NULLVP; + uvp = NULL; lvp = unp->un_lowervp; cred = td->td_ucred; fmode = FFLAGS(O_WRONLY | O_CREAT | O_TRUNC | O_EXCL); @@ -1310,7 +1310,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, return (error); } - if (uvp != NULLVP) { + if (uvp != NULL) { if (uvp == udvp) vrele(uvp); else @@ -1433,23 +1433,23 @@ unionfs_copyfile(struct vnode *vp, int docopy, struct ucred *cred, ASSERT_VOP_ELOCKED(vp, __func__); unp = VTOUNIONFS(vp); lvp = unp->un_lowervp; - uvp = NULLVP; + uvp = NULL; if ((UNIONFSTOV(unp)->v_mount->mnt_flag & MNT_RDONLY)) return (EROFS); - if (unp->un_dvp == NULLVP) + if (unp->un_dvp == NULL) return (EINVAL); - if (unp->un_uppervp != NULLVP) + if (unp->un_uppervp != NULL) return (EEXIST); - udvp = NULLVP; + udvp = NULL; VI_LOCK(unp->un_dvp); dunp = VTOUNIONFS(unp->un_dvp); if (dunp != NULL) udvp = dunp->un_uppervp; VI_UNLOCK(unp->un_dvp); - if (udvp == NULLVP) + if (udvp == NULL) return (EROFS); if ((udvp->v_mount->mnt_flag & MNT_RDONLY)) return (EROFS); @@ -1646,7 +1646,7 @@ unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td) cn.cn_cred = cred; error = VOP_LOOKUP(uvp, &tvp, &cn); - if (tvp != NULLVP) + if (tvp != NULL) vput(tvp); if (error != 0 && error != ENOENT && error != EJUSTRETURN) break; diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 9342317ad08e..284b24a604f4 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -256,7 +256,7 @@ unionfs_domount(struct mount *mp) ump->um_lowervp = lowerrootvp; ump->um_uppervp = upperrootvp; } - ump->um_rootvp = NULLVP; + ump->um_rootvp = NULL; ump->um_uid = uid; ump->um_gid = gid; ump->um_udir = udir; @@ -280,7 +280,7 @@ unionfs_domount(struct mount *mp) * Get the unionfs root vnode. */ error = unionfs_nodeget(mp, ump->um_uppervp, ump->um_lowervp, - NULLVP, &(ump->um_rootvp), NULL); + NULL, &(ump->um_rootvp), NULL); if (error != 0) { vrele(upperrootvp); free(ump, M_UNIONFSMNT); @@ -558,7 +558,7 @@ unionfs_extattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, ump = MOUNTTOUNIONFSMOUNT(mp); unp = VTOUNIONFS(filename_vp); - if (unp->un_uppervp != NULLVP) { + if (unp->un_uppervp != NULL) { return (VFS_EXTATTRCTL(ump->um_uppermp, cmd, unp->un_uppervp, namespace, attrname)); } else { diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 03130f0ca949..627b2f6e9a1d 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -114,9 +114,9 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) dunp = VTOUNIONFS(dvp); udvp = dunp->un_uppervp; ldvp = dunp->un_lowervp; - vp = uvp = lvp = NULLVP; + vp = uvp = lvp = NULL; td = curthread; - *(ap->a_vpp) = NULLVP; + *(ap->a_vpp) = NULL; UNIONFS_INTERNAL_DEBUG( "unionfs_lookup: enter: nameiop=%ld, flags=%lx, path=%s\n", @@ -159,7 +159,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) * lookup dotdot */ if (cnflags & ISDOTDOT) { - if (LOOKUP != nameiop && udvp == NULLVP) { + if (LOOKUP != nameiop && udvp == NULL) { error = EROFS; goto unionfs_lookup_return; } @@ -170,7 +170,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) goto unionfs_lookup_return; } - if (udvp != NULLVP) + if (udvp != NULL) dtmpvp = udvp; else dtmpvp = ldvp; @@ -186,7 +186,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) * reference, or (if dvp was reclaimed) we'll need to drop * vp's lock and reference to return early. */ - if (vp != NULLVP) + if (vp != NULL) vput(vp); dunp = VTOUNIONFS(dvp); if (error == 0 && dunp == NULL) @@ -202,7 +202,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) if (VN_IS_DOOMED(dtmpvp)) { vput(dtmpvp); - *(ap->a_vpp) = NULLVP; + *(ap->a_vpp) = NULL; error = ENOENT; } vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); @@ -219,11 +219,11 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) * The cost of this is that we may end up performing an unnecessary * lower layer lookup if a whiteout is present in the upper layer. */ - if (ldvp != NULLVP && !(cnflags & DOWHITEOUT)) { + if (ldvp != NULL && !(cnflags & DOWHITEOUT)) { struct componentname lcn; bool is_dot; *** 1285 LINES SKIPPED *** From nobody Sat Sep 27 04:01:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYYfK3LTrz68gPl; Sat, 27 Sep 2025 04: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYYfJ6DMqz3vBj; Sat, 27 Sep 2025 04:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVhNrUGYMQUV6DO7hpsKwOvttrBVr0AcnfxrgG8b54s=; b=aofEf1TWkEN8LXSeoHe1Z3k8yelfKUf33RgZCzhCjc1ELN1z5HZoN9TkBvwoviTnsiqmD9 8wuPIQSG1BOOJ8P/+2ASq31RDBpki2KyaYXz6XGqBwJ3zJyL/3j/0lgT2Aeu18Saeq3xT8 cHyTXX3ORMCJvAdeUyvfY0ZGzVbbWgK6Kjf1bA4/4NcbAD5y4NTSujmdw9K9pzLyjbAXFY 85AttPr0XjWeCooYDpUWSZ5shOJn0ZaPXKeKdRKuPOw//5kT95o9M6NGDcbTfKWARX0qy7 ha0z7puOcavTqRjRRo6rLm4IhIqpIjGAx01HIrfLQlH5mA++wA8b3MI4+aOoXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SVhNrUGYMQUV6DO7hpsKwOvttrBVr0AcnfxrgG8b54s=; b=O8fFUuaAI9ASlnGFYr13NLxUhhN15bDKx9ZAaomarD/0mt7+nHDYLzdFQywu7js6ouzXhu mZp0G45ZL8Jcyq3qkobj7mIUp8Ksdng5Yz5Ri0B8kZL5SZGMKQ/0I8CitI0cNjXwo3Xm8X RT834nbGG54rM3Ccl+WNg3OYsjM2fcdjNhZthNl0fpF8tSAl1z/rUfwP0q/ebMPwdeDl1s 4hmKIJenZFFeoC+lfSnSYfINhK0JvXQib0ZDwQuWYlMxSFRRZfB32NS1Cs6gXl8MBZb7YY Qqa+Gwa32K0dXpIAsENE5jsHwhxMpGYluCTPMnJ2SaTN8lhCWshnqIa15jRYpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758945672; a=rsa-sha256; cv=none; b=Tbbd2MGHLstrIncpRNQYSsoi3vDEMeu0uockgBZ1+oRQKvoOAvERCqHtT8TKE8meyJhYKy VLrtJ7dPd4/yrMPhoy15pEyr9Kjj6khlNRltvP9Gc591QLgEtFKnAOMZpPeU6StCJjTI5R uCih27kDyHccUCcAF6In+tqJH8jz4gzPNp9Tf1HGIcbo5ss77GS+0Y94BOY/SzeE1kLjgY nWQ8hccrOXqsDUzCSVOeyWjyd1F+FU12VHxkLzwaEDczUYmVNd67SHooXJ5si2fIl/88QS Lwsi/Pbw3XLqHhzMqCWv3SyQabvafuz60JwMqPgunjDSXlFNwZ7sCQX4QUjnJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYYfJ5mt1z283; Sat, 27 Sep 2025 04:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R41Cgp014905; Sat, 27 Sep 2025 04:01:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R41CCx014902; Sat, 27 Sep 2025 04:01:12 GMT (envelope-from git) Date: Sat, 27 Sep 2025 04:01:12 GMT Message-Id: <202509270401.58R41CCx014902@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: 7e4c451c12ae - main - vfs: retire the VREF macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e4c451c12aeb26cc1179221b8230c491b17cf00 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7e4c451c12aeb26cc1179221b8230c491b17cf00 commit 7e4c451c12aeb26cc1179221b8230c491b17cf00 Author: Mateusz Guzik AuthorDate: 2025-09-27 02:13:29 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-27 04:00:59 +0000 vfs: retire the VREF macro It is defined as a plain use of vref. Churn generated with coccinelle: @@ expression vp; @@ - VREF(vp) + vref(vp) --- ObsoleteFiles.inc | 3 +++ share/man/man9/Makefile | 3 +-- sys/fs/cd9660/cd9660_lookup.c | 2 +- sys/fs/devfs/devfs_vnops.c | 4 ++-- sys/fs/ext2fs/ext2_lookup.c | 4 ++-- sys/fs/ext2fs/ext2_vnops.c | 4 ++-- sys/fs/fdescfs/fdesc_vnops.c | 2 +- sys/fs/msdosfs/msdosfs_lookup.c | 4 ++-- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- sys/fs/nfsclient/nfs_clvnops.c | 8 ++++---- sys/fs/nfsserver/nfs_nfsdport.c | 6 +++--- sys/fs/nfsserver/nfs_nfsdserv.c | 4 ++-- sys/fs/nfsserver/nfs_nfsdsocket.c | 12 ++++++------ sys/fs/nullfs/null_vnops.c | 4 ++-- sys/fs/pseudofs/pseudofs_vnops.c | 2 +- sys/fs/smbfs/smbfs_vnops.c | 2 +- sys/fs/tarfs/tarfs_vnops.c | 2 +- sys/fs/tmpfs/tmpfs_vnops.c | 2 +- sys/fs/udf/udf_vnops.c | 2 +- sys/kern/uipc_mqueue.c | 4 ++-- sys/kern/vfs_default.c | 6 +++--- sys/kern/vfs_lookup.c | 12 ++++++------ sys/kern/vfs_syscalls.c | 2 +- sys/sys/vnode.h | 2 -- sys/ufs/ufs/ufs_lookup.c | 4 ++-- 25 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index d3b1a0239e3f..785ab4913f8d 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250917: VREF macro removed +OLD_FILES+=usr/share/man/man9/VREF.9.gz + # 20250917: Remove a miscapitalized manual OLD_FILES+=usr/share/man/man9/vnet.9.gz OLD_FILES+=usr/share/man/man9/vimage.9.gz diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index fe764e7c4ed7..d2282b3e5a80 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2475,8 +2475,7 @@ MLINKS+=VOP_RDWR.9 VOP_READ.9 \ VOP_RDWR.9 VOP_WRITE.9 MLINKS+=VOP_REMOVE.9 VOP_RMDIR.9 MLINKS+=VNET.9 VIMAGE.9 -MLINKS+=vref.9 VREF.9 \ - vref.9 vrefl.9 +MLINKS+=vref.9 vrefl.9 MLINKS+=vrele.9 vput.9 \ vrele.9 vunref.9 MLINKS+=vslock.9 vsunlock.9 diff --git a/sys/fs/cd9660/cd9660_lookup.c b/sys/fs/cd9660/cd9660_lookup.c index 75fcdc9152cd..4d0bf73ab235 100644 --- a/sys/fs/cd9660/cd9660_lookup.c +++ b/sys/fs/cd9660/cd9660_lookup.c @@ -386,7 +386,7 @@ found: return (error); *vpp = tdp; } else if (dp->i_number == i_ino) { - VREF(vdp); /* we want ourself, ie "." */ + vref(vdp); /* we want ourself, ie "." */ /* * When we lookup "." we still can be asked to lock it * differently. diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 590e04ac9aa5..caadf257b8ad 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1080,7 +1080,7 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock) if ((flags & ISLASTCN) && nameiop != LOOKUP) return (EINVAL); *vpp = dvp; - VREF(dvp); + vref(dvp); return (0); } @@ -1170,7 +1170,7 @@ devfs_lookupx(struct vop_lookup_args *ap, int *dm_unlock) if (error) return (error); if (*vpp == dvp) { - VREF(dvp); + vref(dvp); *vpp = dvp; return (0); } diff --git a/sys/fs/ext2fs/ext2_lookup.c b/sys/fs/ext2fs/ext2_lookup.c index c80e0f99ab56..bb830d07b126 100644 --- a/sys/fs/ext2fs/ext2_lookup.c +++ b/sys/fs/ext2fs/ext2_lookup.c @@ -579,7 +579,7 @@ found: if (dd_ino != NULL) return (0); if (dp->i_number == ino) { - VREF(vdp); + vref(vdp); *vpp = vdp; return (0); } @@ -675,7 +675,7 @@ found: } *vpp = tdp; } else if (dp->i_number == ino) { - VREF(vdp); /* we want ourself, ie "." */ + vref(vdp); /* we want ourself, ie "." */ /* * When we lookup "." we still can be asked to lock it * differently. diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 00389c927087..35e7ca77c732 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -905,7 +905,7 @@ abortit: error = ext2_checkpath(ip, dp, tcnp->cn_cred); if (error) goto out; - VREF(tdvp); + vref(tdvp); error = vfs_relookup(tdvp, &tvp, tcnp, true); if (error) goto out; @@ -1031,7 +1031,7 @@ abortit: */ fcnp->cn_flags &= ~MODMASK; fcnp->cn_flags |= LOCKPARENT | LOCKLEAF; - VREF(fdvp); + vref(fdvp); error = vfs_relookup(fdvp, &fvp, fcnp, true); if (error == 0) vrele(fdvp); diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 3014136fcbdb..c1188c3819e7 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -301,7 +301,7 @@ fdesc_lookup(struct vop_lookup_args *ap) if (cnp->cn_namelen == 1 && *pname == '.') { *vpp = dvp; - VREF(dvp); + vref(dvp); return (0); } diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c index 8ab6d35a2685..58ce8eff9dbd 100644 --- a/sys/fs/msdosfs/msdosfs_lookup.c +++ b/sys/fs/msdosfs/msdosfs_lookup.c @@ -515,7 +515,7 @@ foundroot: * Save directory inode pointer in ndp->ni_dvp for dirremove(). */ if (dp->de_StartCluster == scn && isadir) { /* "." */ - VREF(vdp); + vref(vdp); *vpp = vdp; return (0); } @@ -602,7 +602,7 @@ foundroot: msdosfs_integrity_error(pmp); return (EBADF); } - VREF(vdp); /* we want ourself, ie "." */ + vref(vdp); /* we want ourself, ie "." */ *vpp = vdp; } else { if ((error = deget(pmp, cluster, blkoff, LK_EXCLUSIVE, diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 6c2e35713287..ad9404a18fc8 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -4387,7 +4387,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, attr_ok = true; if (NFSRV_CMPFH(nfhp->nfh_fh, nfhp->nfh_len, dnp->n_fhp->nfh_fh, dnp->n_fhp->nfh_len)) { - VREF(vp); + vref(vp); newvp = vp; unlocknewvp = 0; free(nfhp, M_NFSFH); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 683d6099401e..e9ae91e046e7 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1325,7 +1325,7 @@ nfs_lookup(struct vop_lookup_args *ap) newvp = NULL; } else if (opennamed && cnp->cn_namelen == 1 && *cnp->cn_nameptr == '.') { - VREF(dvp); + vref(dvp); *vpp = dvp; return (0); } @@ -1587,7 +1587,7 @@ handle_error: 0, 1); } else if (NFS_CMPFH(np, nfhp->nfh_fh, nfhp->nfh_len)) { free(nfhp, M_NFSFH); - VREF(dvp); + vref(dvp); newvp = dvp; if (attrflag) (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, @@ -2863,7 +2863,7 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) M_NEWNFSREQ, M_WAITOK); sp->s_cred = crhold(cnp->cn_cred); sp->s_dvp = dvp; - VREF(dvp); + vref(dvp); /* * Fudge together a funny name. @@ -2961,7 +2961,7 @@ nfs_lookitup(struct vnode *dvp, char *name, int len, struct ucred *cred, newvp = NFSTOV(np); } else if (NFS_CMPFH(dnp, nfhp->nfh_fh, nfhp->nfh_len)) { free(nfhp, M_NFSFH); - VREF(dvp); + vref(dvp); newvp = dvp; } else { cn.cn_nameptr = name; diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 5ba86314ead1..eb6ba285f8fe 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -675,7 +675,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, } if (islocked) NFSVOPUNLOCK(dp); - VREF(dp); + vref(dp); *retdirp = dp; if (NFSVNO_EXRDONLY(exp)) cnp->cn_flags |= RDONLY; @@ -697,7 +697,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, goto out; } dp = rootvnode; - VREF(dp); + vref(dp); } } else if ((nfsrv_enable_crossmntpt == 0 && NFSVNO_EXPORTED(exp)) || (nd->nd_flag & ND_NFSV4) == 0) { @@ -814,7 +814,7 @@ nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, if (cnp->cn_pnbuf[0] == '/') { vrele(ndp->ni_dvp); ndp->ni_dvp = ndp->ni_rootdir; - VREF(ndp->ni_dvp); + vref(ndp->ni_dvp); } ndp->ni_startdir = ndp->ni_dvp; ndp->ni_dvp = NULL; diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index a881968b03be..921ea4887af1 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -342,7 +342,7 @@ nfsrvd_getattr(struct nfsrv_descript *nd, int isdgram, (vp->v_vflag & VV_ROOT) != 0 && vp != rootvnode) { tvp = mp->mnt_vnodecovered; - VREF(tvp); + vref(tvp); at_root = 1; } else at_root = 0; @@ -1766,7 +1766,7 @@ nfsrvd_rename(struct nfsrv_descript *nd, int isdgram, /* If this is the same file handle, just VREF() the vnode. */ if (!NFSBCMP(tfh.nfsrvfh_data, &fh, NFSX_MYFH)) { - VREF(dp); + vref(dp); tdp = dp; tnes = *exp; tdirfor_ret = nfsvno_getattr(tdp, &tdirfor, nd, p, 1, diff --git a/sys/fs/nfsserver/nfs_nfsdsocket.c b/sys/fs/nfsserver/nfs_nfsdsocket.c index 636c4735a131..201f3b74b946 100644 --- a/sys/fs/nfsserver/nfs_nfsdsocket.c +++ b/sys/fs/nfsserver/nfs_nfsdsocket.c @@ -1110,7 +1110,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, if (vp != savevp) { if (savevp) vrele(savevp); - VREF(vp); + vref(vp); savevp = vp; savevpnes = vpnes; save_fsid = cur_fsid; @@ -1155,7 +1155,7 @@ nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, u_char *tag, nfsvno_testexp(nd, &savevpnes); if (nd->nd_repstat == 0) { - VREF(savevp); + vref(savevp); vrele(vp); vp = savevp; vpnes = savevpnes; @@ -1235,7 +1235,7 @@ tryagain: break; } } - VREF(vp); + vref(vp); if (nfsv4_opflag[op].modifyfs) vn_start_write(vp, &temp_mp, V_WAIT); error = (*(nfsrv4_ops1[op]))(nd, isdgram, vp, @@ -1279,8 +1279,8 @@ tryagain: if (nfsv4_opflag[op].modifyfs) vn_start_write(savevp, &temp_mp, V_WAIT); if (NFSVOPLOCK(savevp, LK_EXCLUSIVE) == 0) { - VREF(vp); - VREF(savevp); + vref(vp); + vref(savevp); error = (*(nfsrv4_ops2[op]))(nd, isdgram, savevp, vp, &savevpnes, &vpnes); } else @@ -1301,7 +1301,7 @@ tryagain: lktype = LK_SHARED; } if (NFSVOPLOCK(vp, lktype) == 0) - VREF(vp); + vref(vp); else nd->nd_repstat = NFSERR_PERM; } else { diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 8f25a7c4ca70..e9d598014a2f 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -494,7 +494,7 @@ null_lookup(struct vop_lookup_args *ap) if ((error == 0 || error == EJUSTRETURN) && lvp != NULL) { if (ldvp == lvp) { *ap->a_vpp = dvp; - VREF(dvp); + vref(dvp); vrele(lvp); } else { error = null_nodeget(mp, lvp, &vp); @@ -665,7 +665,7 @@ null_remove(struct vop_remove_args *ap) vp = ap->a_vp; if (vrefcnt(vp) > 1) { lvp = NULLVPTOLOWERVP(vp); - VREF(lvp); + vref(lvp); vreleit = 1; } else vreleit = 0; diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index 8cd092118d0e..a30b5e4f551d 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -485,7 +485,7 @@ pfs_lookup(struct vop_cachedlookup_args *va) if (namelen == 1 && pname[0] == '.') { pn = pd; *vpp = vn; - VREF(vn); + vref(vn); PFS_RETURN (0); } diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index a97bc22b3aca..e960d8d78b66 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -1174,7 +1174,7 @@ smbfs_lookup(struct vop_lookup_args *ap) if (error) goto out; if (isdot) { - VREF(dvp); + vref(dvp); *vpp = dvp; goto out; } diff --git a/sys/fs/tarfs/tarfs_vnops.c b/sys/fs/tarfs/tarfs_vnops.c index b0921909b3b4..70fd7a441d81 100644 --- a/sys/fs/tarfs/tarfs_vnops.c +++ b/sys/fs/tarfs/tarfs_vnops.c @@ -256,7 +256,7 @@ tarfs_lookup(struct vop_cachedlookup_args *ap) if (error != 0) return (error); } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { - VREF(dvp); + vref(dvp); *vpp = dvp; #ifdef TARFS_DEBUG } else if (dirnode == dirnode->tmp->root && diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 312d2e717e63..5082ee1ebdd0 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -120,7 +120,7 @@ tmpfs_lookup1(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) if (error != 0) goto out; } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { - VREF(dvp); + vref(dvp); *vpp = dvp; error = 0; } else { diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 37889241e8c3..ec61618b6e18 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -1226,7 +1226,7 @@ lookloop: if (flags & ISDOTDOT) { error = vn_vget_ino(dvp, id, lkflags, &tdp); } else if (node->hash_id == id) { - VREF(dvp); /* we want ourself, ie "." */ + vref(dvp); /* we want ourself, ie "." */ /* * When we lookup "." we still can be asked to lock it * differently. diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 568d8b56d0be..a8aec397b352 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -886,7 +886,7 @@ mqfs_lookupx(struct vop_cachedlookup_args *ap) return (EINVAL); pn = pd; *vpp = dvp; - VREF(dvp); + vref(dvp); return (0); } @@ -921,7 +921,7 @@ mqfs_lookupx(struct vop_cachedlookup_args *ap) return (error); } if (*vpp == dvp) { - VREF(dvp); + vref(dvp); *vpp = dvp; mqnode_release(pn); return (0); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 85f67731e1cc..05d1120030f3 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -708,7 +708,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) if (error) return (error); - VREF(vp); + vref(vp); locked = VOP_ISLOCKED(vp); VOP_UNLOCK(vp); NDINIT_ATVP(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE, @@ -727,10 +727,10 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) ((*dvp)->v_vflag & VV_ROOT) && ((*dvp)->v_mount->mnt_flag & MNT_UNION)) { *dvp = (*dvp)->v_mount->mnt_vnodecovered; - VREF(mvp); + vref(mvp); VOP_UNLOCK(mvp); vn_close(mvp, FREAD, cred, td); - VREF(*dvp); + vref(*dvp); vn_lock(*dvp, LK_SHARED | LK_RETRY); covered = 1; } diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 2f8b88783f3d..39c7da803de1 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -883,7 +883,7 @@ vfs_lookup_degenerate(struct nameidata *ndp, struct vnode *dp, int wantparent) } if (wantparent) { ndp->ni_dvp = dp; - VREF(dp); + vref(dp); } ndp->ni_vp = dp; cnp->cn_namelen = 0; @@ -1284,7 +1284,7 @@ dirloop: (cnp->cn_flags & NOCROSSMOUNT) != 0)) { ndp->ni_dvp = dp; ndp->ni_vp = dp; - VREF(dp); + vref(dp); goto nextname; } if ((dp->v_vflag & VV_ROOT) == 0) @@ -1295,7 +1295,7 @@ dirloop: } tdp = dp; dp = dp->v_mount->mnt_vnodecovered; - VREF(dp); + vref(dp); vput(tdp); vn_lock(dp, enforce_lkflags(dp->v_mount, cnp->cn_lkflags | @@ -1343,7 +1343,7 @@ unionlookup: (dp->v_mount->mnt_flag & MNT_UNION)) { tdp = dp; dp = dp->v_mount->mnt_vnodecovered; - VREF(dp); + vref(dp); vput(tdp); vn_lock(dp, enforce_lkflags(dp->v_mount, cnp->cn_lkflags | @@ -1615,7 +1615,7 @@ vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, } /* ASSERT(dvp == ndp->ni_startdir) */ if (refstart) - VREF(dvp); + vref(dvp); if ((cnp->cn_flags & LOCKPARENT) == 0) VOP_UNLOCK(dp); /* @@ -1653,7 +1653,7 @@ vfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, /* ASSERT(dvp == ndp->ni_startdir) */ if (refstart) - VREF(dvp); + vref(dvp); if ((cnp->cn_flags & LOCKLEAF) == 0) VOP_UNLOCK(dp); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index ec1aad59c6ee..9e1275359715 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4363,7 +4363,7 @@ unionread: struct vnode *tvp = vp; vp = vp->v_mount->mnt_vnodecovered; - VREF(vp); + vref(vp); fp->f_vnode = vp; foffset = 0; vput(tvp); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 85d263dedfb0..6d50583dc1b3 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -451,8 +451,6 @@ extern int vttoif_tab[]; #define VS_SKIP_UNMOUNT 0x0001 /* vfs_write_suspend: fail if the filesystem is being unmounted */ -#define VREF(vp) vref(vp) - #ifdef DIAGNOSTIC #define VATTR_NULL(vap) vattr_null(vap) #else diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 9221aa63184d..419ec3de8572 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -597,7 +597,7 @@ found: return (error); } if (dp->i_number == ino) { - VREF(vdp); + vref(vdp); *vpp = vdp; vput(tdp); return (0); @@ -707,7 +707,7 @@ found: *vpp = tdp; } else if (dp->i_number == ino) { - VREF(vdp); /* we want ourself, ie "." */ + vref(vdp); /* we want ourself, ie "." */ /* * When we lookup "." we still can be asked to lock it * differently. From nobody Sat Sep 27 04:01:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYYfL1G17z68g0W; Sat, 27 Sep 2025 04: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYYfL01k5z3tq8; Sat, 27 Sep 2025 04: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=1758945674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t6xhxlQwyGHIkWTlG++4/l2r3gqulSbT9bKjhpHP9OY=; b=ny2R3DW5/iz9rPFWMvFO5+35ZOdnff383MXVcouNpxvOPS5FfAW3gLOjfMm9Srwn4DnFSa NnV3dqsjXZO1YNbqtF7bfbIc8BVjlbvzya6hNbXFwOSumIvnzuYSxIfL+QjtPumJPQZ/Zy xcOOF/jwGKSgD7466TASMtQE9XVET0xF6BdG7NFe0sfrC3OCWnEp20lQMuiygWkJ/nh5J9 J7yRxRcq747KYfKZ1kOVAEnKvz1FQqLHPwMiwsijQjNaB3iZrRaekI8DPZna7j93ISevm3 zz7v3BBIOmRU5qVYwZ4QjH5EzpSpNIeUKmXhqWgaboCp2fJAZPaWvoimGZwXLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758945674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t6xhxlQwyGHIkWTlG++4/l2r3gqulSbT9bKjhpHP9OY=; b=Bucz6xIVRB4T33B42woBps+yhZNb9einp1oRTpcpxEvaNcoF+obaCjfzv9Oof+xK1JQFKB xXMNf1J2tPlI49Ah5tuuLanu+Jv+H9hOE0dQA/Lx+KIyxdOB0L0+yksjME0IfzjdOtsCR7 CyG8+IwYaXjRXIUQ+v02i59h+U45tS4EjenAqAb399g825kHftglIPLC6yV9GdxBIAGCVC BEVpEiBAZtqix9koNMyv7CR2X+tLe3u4KmcKrBwD3ZZsG4tO+Fuc4wsxEN/xiL90NFVgVp IOaiNo3OwEX4I2dwmc9mt0/XZEmKpIX35iNz8PK8thYEJSEvCvANKIadsF1wUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758945674; a=rsa-sha256; cv=none; b=hXfQuhtxB88uJBAD4PThbv2l6Nq5yAiCcaW8xPv5EJcDXM+ZfvvqaYZ9uYoiO1tjKDIaP+ E7MubeqJLWwGIB/BImMlGwrPqviELUG/FDijSVQl51jzs9tvWQz21GDl6DtT+RL2ncigT3 t8vQXXaJssVr7/fEJX67bfwyvN+b4Xl8tQ+wdqqoWytXjT1HK2es6zMZIs4lMfsHtpELAJ 0ELYRGLvYaojsMaWDRfAyONJDT2D59+6zyx7Fe7XkIrz9O7z+I0VIAJ7MOwtSA0O0zGbnr NxkpUdoh6w2Hz4EsMb/+ttqzRHDWaSSBi2umDDt3yQ/52G710RrAkJUPMFSmJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYYfK6kFXz20s; Sat, 27 Sep 2025 04:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R41Dg4014937; Sat, 27 Sep 2025 04:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R41Dna014934; Sat, 27 Sep 2025 04:01:13 GMT (envelope-from git) Date: Sat, 27 Sep 2025 04:01:13 GMT Message-Id: <202509270401.58R41Dna014934@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: 5e395c34402d - main - vfs: stop using SDT_PROBES_ENABLED in inlined ops List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e395c34402dc3fd5c786168442290a63ff54596 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5e395c34402dc3fd5c786168442290a63ff54596 commit 5e395c34402dc3fd5c786168442290a63ff54596 Author: Mateusz Guzik AuthorDate: 2025-09-26 20:23:49 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-27 04:00:59 +0000 vfs: stop using SDT_PROBES_ENABLED in inlined ops No point after hot patching was introduced. --- sys/tools/vnode_if.awk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index 74b11e6cb27d..8e39cc2da3da 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -324,6 +324,10 @@ while ((getline < srcfile) > 0) { printh("extern struct vnodeop_desc " name "_desc;"); printh(""); + printh("SDT_PROBE_DECLARE(vfs, vop, " name ", entry);\n"); + printh("SDT_PROBE_DECLARE(vfs, vop, " name ", return);\n"); + printh(""); + # Print out function prototypes. printh("int " uname "_AP(struct " name "_args *);"); printh("int " uname "_APV(const struct vop_vector *vop, struct " name "_args *);"); @@ -341,10 +345,11 @@ while ((getline < srcfile) > 0) { printh("\ta.a_" args[i] " = " args[i] ";"); if (can_inline(name)) { printh("\n#if !defined(INVARIANTS) && !defined(KTR)"); - printh("\tif (!SDT_PROBES_ENABLED())"); - printh("\t\treturn (" args[0]"->v_op->"name"(&a));"); - printh("\telse"); - printh("\t\treturn (" uname "_APV("args[0]"->v_op, &a));"); + printh("\tint rc;") + printh("\tSDT_PROBE2(vfs, vop, " name ", entry, a.a_" args[0] ", &a);"); + printh("\trc = " args[0]"->v_op->"name"(&a);"); + printh("\tSDT_PROBE3(vfs, vop, " name ", return, a.a_" args[0] ", &a, rc);"); + printh("\treturn (rc);") printh("#else"); } printh("\treturn (" uname "_APV("args[0]"->v_op, &a));"); From nobody Sat Sep 27 04:08:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYYpM1qhDz68ghZ; Sat, 27 Sep 2025 04:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYYpM0x9Bz3wnJ; Sat, 27 Sep 2025 04:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758946091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/slHvjb+qCAUD5i3qLrWdPTIjy8BIOKntey29AHoB/o=; b=WnvqzoB68Bi2D1OHl5zeTCpcbU88EypxAW94TvpoyJzWy/tHG+7ueWtS3ta017lZ7FJoCj UnmUsYbCBgDyq9xA5erUyjUugAzOXTLczFqJWQYIdg8Bu+zBxkAC02J7KzST6L2ZyKF7ad e0AAzIWFfff39+eq+R7zOjE27S+bdfS1E+ZLLNz69CBIlohS6/wTzhHFJwX11dtKCWXeOy 7VfYKx5HcMCwSgToSjoQ+R9WgV50lZedVxWoHB+yRVdAn6CwLeOAqAP8zbTaXwcdVMr3BX qd1JfB2ycOlQPzRDARLi6XSx26XTTCmfFpZdSRM6Fc7atAAYYjHjJtObR/TuJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758946091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/slHvjb+qCAUD5i3qLrWdPTIjy8BIOKntey29AHoB/o=; b=UJX1mNDPYodX9u9qCvm97QBxC9X7uwrQj0S/gyuIywNQ+0jGBHEeSgkjzWTj/mkaNICUgA fg1+HavmQA6aOdHYxf1PJgufcfZYw7aeF1mrxJTelxYv5mmzU5cXMOsvib3pzAZgNLF6qz zbH7Z7wWnSSAyT7pNDMe8aoIUCLa2A0sYGDgRkrBQ4ooCOSHVa6ctWMjMYnh5GseBdWIEr 4BINWpL6SulqMklAHyfiPRkVgtQVi306DuSQYc826cWFtfZHFSFgxdJ/+2ZzIIgkAtBDdV ZNcGTONSgiDj2O1IrX3AsJxNnYnQg2x2D8S8w7N5A0rKWjea/xfD3N5R2btQ3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758946091; a=rsa-sha256; cv=none; b=vZBnfB6l4pfuSMsKtM7TE8W6M0AnYDdXm73UM4BCbIdR6L/3AJ8bk56QdPX3viycTgU0oa u64R6QgnyEBgacS+XLVcvrfLV/1VKR24HyEUZ8BDVAPGw0t8Q8E/2+e5lJpSCdIGdcyxt1 vQVFmg6+QBh4JdoZjKdqrIlCDGMgNboJJSBU8SFNZqkSaNRYwD7xT5j/gKC6ctx6GRpzU+ h36nAC9W2wDSzD+3OR4lZ5wKJoLXaZpF15kw6r7IFmLLpdRBpBeYZ2zxQkgN6FErReqVPf fz2nc2xKy9OiAVc/z9scTc3mY5srWAqh6yci8vdw7Ezj6GtEngxLUgvcozrdPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYYpM0P5cz2hc; Sat, 27 Sep 2025 04:08:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R48Anc021892; Sat, 27 Sep 2025 04:08:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R48Aub021889; Sat, 27 Sep 2025 04:08:10 GMT (envelope-from git) Date: Sat, 27 Sep 2025 04:08:10 GMT Message-Id: <202509270408.58R48Aub021889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 523fece9d11e - main - pkgbase-stage: Use unique PKG_DBDIR List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 523fece9d11e5d084c1d20d10d05971f5354d343 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=523fece9d11e5d084c1d20d10d05971f5354d343 commit 523fece9d11e5d084c1d20d10d05971f5354d343 Author: Colin Percival AuthorDate: 2025-09-27 01:23:20 +0000 Commit: Colin Percival CommitDate: 2025-09-27 04:08:00 +0000 pkgbase-stage: Use unique PKG_DBDIR Prior to this commit, pkgbase-stage.lua used a hard-coded PKG_DBDIR "./pkgdb"; unfortunately this creates a race condition if we start building disc1.iso and dvd1.iso at the same time pkg: sqlite error while executing CREATE TABLE licenses [...] in file pkgdb.c:2330: table licenses already exists since pkg checks to see if the pkgdb is initialized and initializes it if not. Use separate pkgdb-disc1 and pkgdb-dvd directories. MFC after: 1 minute Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52755 --- release/Makefile | 6 +++--- release/scripts/pkgbase-stage.lua | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/release/Makefile b/release/Makefile index d131a36157d7..82617c1f4dd7 100644 --- a/release/Makefile +++ b/release/Makefile @@ -134,7 +134,7 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif -CLEANDIRS= dist pkgdb pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd +CLEANDIRS= dist pkgdb-dvd pkgdb-disc1 pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd beforeclean: chflags -R noschg . .include @@ -229,7 +229,7 @@ disc1: ${PKGBASE_REPO_DIR} ${.CURDIR}/scripts/pkgbase-stage.lua disc \ ${.OBJDIR}/pkgbase-repo-dir \ ${.TARGET}/usr/freebsd-packages/offline \ - "${_ALL_libcompats}" ${PKG_ABI} + "${_ALL_libcompats}" ${PKG_ABI} ${.OBJDIR}/pkgdb-disc1 cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \ ${.TARGET}/usr/freebsd-packages/repos/ mtree -c -p ${.TARGET}/usr/freebsd-packages | \ @@ -329,7 +329,7 @@ dvd: ${PKGBASE_REPO_DIR} ${.CURDIR}/scripts/pkgbase-stage.lua dvd \ ${.OBJDIR}/pkgbase-repo-dir \ ${.TARGET}/usr/freebsd-packages/offline \ - "${_ALL_libcompats}" ${PKG_ABI} + "${_ALL_libcompats}" ${PKG_ABI} ${.OBJDIR}/pkgdb-dvd cp ${.CURDIR}/scripts/FreeBSD-base-offline.conf \ ${.TARGET}/usr/freebsd-packages/repos/ mtree -c -p ${.TARGET}/usr/freebsd-packages | \ diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua index 80de4ec80d20..efc4f8af0cbf 100755 --- a/release/scripts/pkgbase-stage.lua +++ b/release/scripts/pkgbase-stage.lua @@ -89,10 +89,12 @@ local function main() local all_libcompats = assert(arg[4]) -- ABI of repository local ABI = assert(arg[5]) + -- pkgdb to use + local PKGDB = assert(arg[6]) local pkg = "pkg -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes " .. "-o ABI=" .. ABI .. " " .. - "-o INSTALL_AS_USER=1 -o PKG_DBDIR=./pkgdb -R " .. repo_dir .. " " + "-o INSTALL_AS_USER=1 -o PKG_DBDIR=" .. PKGDB .. " -R " .. repo_dir .. " " assert(os.execute(pkg .. "update")) From nobody Sat Sep 27 07:56:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYft15PTDz68yN8; Sat, 27 Sep 2025 07:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYft14qFNz3Gjb; Sat, 27 Sep 2025 07:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758959801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6d3TuKCGPW7f7lhJQeHuvppWk80RJF9C5UOWYMV0Yuw=; b=YvjvtipwBak+NQJennbbH+IekA1MkMo0Pkq2Twe5g28ryEN3ivXJI1PWNOp2x6RK2Pd3T3 DnOIL2AXcu5sPhZgR0wkC/nrlG4aBQE86eougNTRAljNaC5Bo+4HKXsYulX8KjKKHb5QTa 5OzoPQvSG1m75V2EBprkqChWaYa7t9al77mk6K4C4NGaUCqerK1EdXvrMq9u6ZflAYwhDo 8fQpbPaQTDDer5qNQ7zJttq1E/qJ0pi9ShGmtDQBoQmVALMxHKgNp7sPokQqbOMy/oLq03 zsaq9OpLVLQWsYMaTiPLNSRb2bJvNgQQgTYWc9hjX1hTABn0ldAVtWg5Dw7LQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758959801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6d3TuKCGPW7f7lhJQeHuvppWk80RJF9C5UOWYMV0Yuw=; b=sGPIEOBZvLkbzfR16UrUavnCWthEPGaU5Gar5vdPPlGdv2Kz9oIWm939VROzSZFarLO7td VVMbMu+G6J+mxsV1E7K/22hRFJbAPCLpdf9+GS01xGFJG4loIxwoC0ygcuM2dTUYUYvKSK 5uaHofLAxIYhTmrKpjeSarq6LVMd31B1Qa3fXqqYCdEcluQSZBa2JC2DiK1278QOr2b+K8 6CJSsokr4+RhX748lGYBTu1RPYn/M1bzvEsgor9ucwILqUgHv1reqGZwxXoWRpokS9zqz4 NEPteZb1gcFc/HExqoE2hJxfl2VV83Le1A+7QtsasKZFupGS5tOiougjpQwX7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758959801; a=rsa-sha256; cv=none; b=MB0Frn96p7/nunffgdHhXcRatNukrcpEVhk2MKM5KNQAMcdOE5xH2JYsNn0Z09yzxebyUH uYF51PwIo4yo7HAPhl/cJ34Rwd8k/P3zTbrzzJXv+he3Mw+GMYA4mFG7nfZNbKJsrFjWAS YK9k5h6GIFbjndO+HAwcyoLu3tw0CQBbuP/h1HDXPCYrCl/YYCPfa1bp9u3ZlgTdIg4xb5 WYoSW96ON4UeiN5u9MJ5XhI+C2H2VtxMiWbBr/OozojWx37tH3L4inI23LUGgR41jlQhgy ZhhBJP6rWOua7Pe/o8HnSVZ1YsXMlmVxcKotu/DVuDQC/1k1LJ3yswwydbyRqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYft14BpCz950; Sat, 27 Sep 2025 07:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R7ufGM053781; Sat, 27 Sep 2025 07:56:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R7ufGq053778; Sat, 27 Sep 2025 07:56:41 GMT (envelope-from git) Date: Sat, 27 Sep 2025 07:56:41 GMT Message-Id: <202509270756.58R7ufGq053778@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: ba364342aeef - main - vm_object: Remove the kmem_object alias List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba364342aeef152f3dc486ff3d2ebd4d5a8dd677 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ba364342aeef152f3dc486ff3d2ebd4d5a8dd677 commit ba364342aeef152f3dc486ff3d2ebd4d5a8dd677 Author: Mark Johnston AuthorDate: 2025-09-24 14:03:16 +0000 Commit: Mark Johnston CommitDate: 2025-09-27 07:56:08 +0000 vm_object: Remove the kmem_object alias This was retained for KPI compatibility, but I can't find anything which needs it. Just get rid of it. Reported by: rwatson Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D52708 --- sys/vm/vm_object.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 20e9fc1fcdcd..e58fae5f0090 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -235,9 +235,7 @@ extern struct mtx vm_object_list_mtx; /* lock for object list and count */ extern struct vm_object kernel_object_store; -/* kernel and kmem are aliased for backwards KPI compat. */ #define kernel_object (&kernel_object_store) -#define kmem_object (&kernel_object_store) #define VM_OBJECT_ASSERT_LOCKED(object) \ rw_assert(&(object)->lock, RA_LOCKED) From nobody Sat Sep 27 08:20:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYgPb1ZQGz690fL; Sat, 27 Sep 2025 08:20: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYgPb0vtnz3JJy; Sat, 27 Sep 2025 08:20:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758961235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1pqLVyoX8ytzZeNibbSf2EmUrUFotFuDP/DorTanYFI=; b=qw1UVStBK753a9rTsivflo9/Ld8hvdOSw4ehtva6coF30Bcw4Y/Amn5G/nkxUfheuLpoRj ZQTy4fWVfPbPTz7thv7ip6TabrXJ+kJe3U70N4m4e/5Yhgte4GB2UGsFZ0IuvKQBTYmxDP ODCqR94+9mWuYz6PGToXmAXwKlwQQIDu9MCRLB6hSIPQfS5HqyVAdUhkbP2+Q1JPiBw3t0 b5KL8DOznvVUSGNPjAjYYTTR46D/8/q4WNSvQOv7UxvpWdNOVUeW//tuLWPSjaBvqDrp4R jvyiL7cctEd4zBPF2/trrx/068/57zFw5v34tGu1AzXCUNSMELykn6j/Znh0ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758961235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1pqLVyoX8ytzZeNibbSf2EmUrUFotFuDP/DorTanYFI=; b=Uauyk0qdMDW64QO204YIGBOCanAKk9mgWzQH2oaJjlcW15is4xyEwW8V9J5pWx8tRjVG3n 25SeQmxNiKLva45npBkUEzKrqLi4yvYYLxpj5F7bIy3ef9lH/bkVl5g84xZnhZMFkJU5pa AkyW3hiJYHcLd9XqLbdKR3hy358mKJ93BMfcpxqvF1VM71sLVsuxpbeOah7odrzPSumKzN rgGtJseQFIzvBYuWMgpZpyNp68gmJSenYpqAuCQQ+jUzuCih7d1v4Yrsoaq5dAcld3KAP6 X2aLo8WK8uhWNFyl2YCleq/y41nmVRwFiaHe+o6jMSnHrqApC0FOSfEZdVDBMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758961235; a=rsa-sha256; cv=none; b=j5QF5jRgavmG5lZCiKp/fzgB5MSPgw1D5Q6FlONJUbwvFq/K4myYZ63QvtsCMz+rXRpTG0 PVL2RwQYoaFkSJHLOfoBZaauuK3vDyJX9P8BoIALNBeSGgoXpUAFukqKhIeZ6px3cAwUmj 3YNhzhZR3NkA2KBp9+HYd7goVZiH0MDAhhWn3tGKeYClSH69k57YpIGvn9D2usdmkpDcE3 YkVQ76InL987LdD52BrckGobCvvJEAyQgXjI/2/ibxvz1ZTqd9VYQ3vdrF1AvwpAjjBVsd JgHLYUm1vWKQy+uEgRbAQcJNjsMG5hKbtErpAytc++JhR4Ut5G1hnuaE/g9wmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYgPb0DYJz8yg; Sat, 27 Sep 2025 08:20:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58R8KY3R002263; Sat, 27 Sep 2025 08:20:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58R8KY02002260; Sat, 27 Sep 2025 08:20:34 GMT (envelope-from git) Date: Sat, 27 Sep 2025 08:20:34 GMT Message-Id: <202509270820.58R8KY02002260@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: ceb5792d1e2e - main - OptionalObsoleteFiles.inc: Add more ATF libraries List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ceb5792d1e2e58646dd291a2dc3877aaeb73122b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ceb5792d1e2e58646dd291a2dc3877aaeb73122b commit ceb5792d1e2e58646dd291a2dc3877aaeb73122b Author: Mark Johnston AuthorDate: 2025-09-22 14:04:30 +0000 Commit: Mark Johnston CommitDate: 2025-09-27 08:11:19 +0000 OptionalObsoleteFiles.inc: Add more ATF libraries PR: 289653 Reported by: Trond Endrestøl MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52676 --- tools/build/mk/OptionalObsoleteFiles.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index a2fb28f1a186..2ca0c3275f41 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -8203,7 +8203,11 @@ OLD_FILES+=usr/include/atf-c/tc.h OLD_FILES+=usr/include/atf-c/tp.h OLD_FILES+=usr/include/atf-c/utils.h OLD_LIBS+=usr/lib/libprivateatf-c++.so.2 +OLD_FILES+=usr/lib/libprivateatf-c++.so +OLD_FILES+=usr/lib/libprivateatf-c++.a OLD_LIBS+=usr/lib/libprivateatf-c.so.1 +OLD_FILES+=usr/lib/libprivateatf-c.so +OLD_FILES+=usr/lib/libprivateatf-c.a OLD_FILES+=usr/share/examples/kyua/kyua.conf OLD_FILES+=usr/share/examples/kyua/Kyuafile.top OLD_FILES+=usr/share/kyua/misc/context.html From nobody Sat Sep 27 14:31:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYqd02JRwz69Pj3; Sat, 27 Sep 2025 14:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYqd01PKyz3x2c; Sat, 27 Sep 2025 14:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758983460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cRblOEPitYdab5aHeN+QQJ8ViRQyf4chLihJU3r1BfU=; b=AUQJYq15MSvUfwTokV5P4VFvorO6/t0m3oiiU21qA4WfzHTGJhh6ppcIP5PzXgvkU1t+mJ RSZje6mh3J2btex/QGF9goXL5C6T7VJ6z5mtqrCFE7M3008jeTdR3+U/z7z3GuXMryhFgM KtJLcclLb70V5ATNAIFs5R2GE+L2quv4MMtHb8AikNEwDeQTALVBhIL+e5EBiAdBOWZNmD VXDEpHx3LcuDYvVh87iKbemm1Y4ULDDBj3iY8iyTD3A76xbTBIceiMPRLybDAR0nL0aMli TgflVRtMzNR8PJGD2NBurHnU+oClwt7sdwnKNzT6t+KSjjdJx0OJHQp4Vo+3FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758983460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cRblOEPitYdab5aHeN+QQJ8ViRQyf4chLihJU3r1BfU=; b=eHKpkD06DEx+ucdBTs1OmkKlfD7AS7pnt3yt69+1jH5IVuWkmpUoCtDjLA/dRDcMU8ZiET BlSMrsAB7qQ3wsVS7L27+MWLA8Usy8NlSoO/sAQYLPPeLToG9CJ8sMiOhA863r8V2VaAm0 2PwmJOV2r779s8ZaHeC7u6l0CjFkuEde6Iy88wruHINtPw9fiuh2cRKcW0CWKTX6i2fNoK OuQoOZJ0hrKqsWI0Jj+IAxLCNvfkNt6tJhcgTUKzSF4Mb9TbfzcvDyjbKrx/FKxzmYf6mS oJuaz459rbyLHvZBigLcfnFph+xoL0Tlq60XJGcYrm+o8oDMZuSP0AWdJirBdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758983460; a=rsa-sha256; cv=none; b=LF9NPahMjFv+mGcQg3FpLPjQ41i5jvRTF65qckH0Ct4XCO48U1MLwAlfRu+mvRzs6EYQfr nlECW9H542QQClaam3NQSZkFJjzjSuQX0Mk0o3KUJ5EyAZsHrsEdQ/pt7pPtEe3zZYSJgB 2M/cg0ZmJTkpWZBMr+JD+snMEOH/VwsPP9YIuzBbvg8XOB0TnpcMeAeYawtSndX9BwTgfI MY+2am/PuQ9jCroXlvRME+HbmFQ4GuwHA4gpi+5hCa8R8nVnRnl2GThsp6LvrMqlA1cXtN J6ifQngNIUXzMJtVJV9M2yJ/5qWv31eYOkN2qPIshiaZRwrql6vfnbncZAlnzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYqd00yBVzdry; Sat, 27 Sep 2025 14:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58REV03j099295; Sat, 27 Sep 2025 14:31:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58REV0as099292; Sat, 27 Sep 2025 14:31:00 GMT (envelope-from git) Date: Sat, 27 Sep 2025 14:31:00 GMT Message-Id: <202509271431.58REV0as099292@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: d9f03a43f2fe - main - ucode: use wrmsr_early_safe() for early CPU microcode update List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9f03a43f2fec917c31d48b05d751e547c8775c7 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d9f03a43f2fec917c31d48b05d751e547c8775c7 commit d9f03a43f2fec917c31d48b05d751e547c8775c7 Author: Gleb Smirnoff AuthorDate: 2025-09-27 14:30:40 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-27 14:30:40 +0000 ucode: use wrmsr_early_safe() for early CPU microcode update Use the new method for wrmsr that is able to set up fault handler even at the very early stage of kernel boot. This prevents panic with new microcode for some new AMD EPYCs, that requires certain patchlevel of microcode to be already present in the CPU. If BSP patching failed, we print the message and we don't try to patch APs. This has been tested only on AMD booted in EFI mode. Reviewed by: stas, kib Differential Revision: https://reviews.freebsd.org/D52643 --- sys/dev/cpuctl/cpuctl.c | 2 +- sys/x86/include/ucode.h | 6 ++++-- sys/x86/x86/ucode.c | 56 +++++++++++++++++++++++++++++++++++++------------ 3 files changed, 48 insertions(+), 16 deletions(-) diff --git a/sys/dev/cpuctl/cpuctl.c b/sys/dev/cpuctl/cpuctl.c index b0ab3467df69..deaabaaaa1fc 100644 --- a/sys/dev/cpuctl/cpuctl.c +++ b/sys/dev/cpuctl/cpuctl.c @@ -344,7 +344,7 @@ ucode_intel_load_rv(void *arg) d = arg; if (PCPU_GET(cpuid) == d->cpu) - d->ret = ucode_intel_load(d->ptr, true, NULL, NULL); + d->ret = ucode_intel_load(d->ptr, SAFE, NULL, NULL); } static int diff --git a/sys/x86/include/ucode.h b/sys/x86/include/ucode.h index 75b9ff3afbd0..ea7cb07669a4 100644 --- a/sys/x86/include/ucode.h +++ b/sys/x86/include/ucode.h @@ -62,12 +62,14 @@ struct ucode_intel_extsig_table { } entries[0]; }; +typedef enum { SAFE, UNSAFE, EARLY } ucode_load_how; + const void *ucode_amd_find(const char *path, uint32_t signature, uint32_t *revision, const uint8_t *fw_data, size_t fw_size, size_t *selected_sizep); -int ucode_intel_load(const void *data, bool unsafe, +int ucode_intel_load(const void *data, ucode_load_how unsafe, uint64_t *nrevp, uint64_t *orevp); -int ucode_amd_load(const void *data, bool unsafe, +int ucode_amd_load(const void *data, ucode_load_how how, uint64_t *nrevp, uint64_t *orevp); size_t ucode_load_bsp(uintptr_t free); void ucode_load_ap(int cpu); diff --git a/sys/x86/x86/ucode.c b/sys/x86/x86/ucode.c index 1973047fafd1..72133de211f8 100644 --- a/sys/x86/x86/ucode.c +++ b/sys/x86/x86/ucode.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -58,7 +59,7 @@ static const void *ucode_amd_match(const uint8_t *data, size_t *len); static struct ucode_ops { const char *vendor; - int (*load)(const void *, bool, uint64_t *, uint64_t *); + int (*load)(const void *, ucode_load_how how, uint64_t *, uint64_t *); const void *(*match)(const uint8_t *, size_t *); } loaders[] = { { @@ -83,6 +84,7 @@ enum { NO_ERROR, NO_MATCH, VERIFICATION_FAILED, + LOAD_FAILED, } ucode_error = NO_ERROR; static uint64_t ucode_nrev, ucode_orev; @@ -103,6 +105,9 @@ log_msg(void *arg __unused) case VERIFICATION_FAILED: printf("CPU microcode: microcode verification failed\n"); break; + case LOAD_FAILED: + printf("CPU microcode load failed. BIOS update advised\n"); + break; default: break; } @@ -110,7 +115,8 @@ log_msg(void *arg __unused) SYSINIT(ucode_log, SI_SUB_CPU, SI_ORDER_FIRST, log_msg, NULL); int -ucode_intel_load(const void *data, bool unsafe, uint64_t *nrevp, uint64_t *orevp) +ucode_intel_load(const void *data, ucode_load_how how, uint64_t *nrevp, + uint64_t *orevp) { uint64_t nrev, orev; uint32_t cpuid[4]; @@ -122,10 +128,23 @@ ucode_intel_load(const void *data, bool unsafe, uint64_t *nrevp, uint64_t *orevp * undocumented errata applying to some Broadwell CPUs. */ wbinvd(); - if (unsafe) + switch (how) { + case SAFE: wrmsr_safe(MSR_BIOS_UPDT_TRIG, (uint64_t)(uintptr_t)data); - else + break; + case EARLY: +#ifdef __amd64__ + wrmsr_early_safe_start(); + if (wrmsr_early_safe(MSR_BIOS_UPDT_TRIG, + (uint64_t)(uintptr_t)data) != 0) + ucode_error = LOAD_FAILED; + wrmsr_early_safe_end(); + break; +#endif + case UNSAFE: wrmsr(MSR_BIOS_UPDT_TRIG, (uint64_t)(uintptr_t)data); + break; + } wrmsr(MSR_BIOS_SIGN, 0); /* @@ -233,20 +252,31 @@ ucode_intel_match(const uint8_t *data, size_t *len) } int -ucode_amd_load(const void *data, bool unsafe, uint64_t *nrevp, uint64_t *orevp) +ucode_amd_load(const void *data, ucode_load_how how, uint64_t *nrevp, + uint64_t *orevp) { uint64_t nrev, orev; uint32_t cpuid[4]; orev = rdmsr(MSR_BIOS_SIGN); - /* - * Perform update. - */ - if (unsafe) + switch (how) { + case SAFE: wrmsr_safe(MSR_K8_UCODE_UPDATE, (uint64_t)(uintptr_t)data); - else + break; + case EARLY: +#ifdef __amd64__ + wrmsr_early_safe_start(); + if (wrmsr_early_safe(MSR_K8_UCODE_UPDATE, + (uint64_t)(uintptr_t)data) != 0) + ucode_error = LOAD_FAILED; + wrmsr_early_safe_end(); + break; +#endif + case UNSAFE: wrmsr(MSR_K8_UCODE_UPDATE, (uint64_t)(uintptr_t)data); + break; + } /* * Serialize instruction flow. @@ -327,8 +357,8 @@ ucode_load_ap(int cpu) return; #endif - if (ucode_data != NULL) - (void)ucode_loader->load(ucode_data, false, NULL, NULL); + if (ucode_data != NULL && ucode_error != LOAD_FAILED) + (void)ucode_loader->load(ucode_data, UNSAFE, NULL, NULL); } static void * @@ -415,7 +445,7 @@ ucode_load_bsp(uintptr_t free) memcpy_early(addr, match, len); match = addr; - error = ucode_loader->load(match, false, &nrev, &orev); + error = ucode_loader->load(match, EARLY, &nrev, &orev); if (error == 0) { ucode_data = early_ucode_data = match; ucode_nrev = nrev; From nobody Sat Sep 27 15:26:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYrs30lXJz68Fdg; Sat, 27 Sep 2025 15:26: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYrs309r3z4Gxd; Sat, 27 Sep 2025 15:26:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758986791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KxLm3IGIIvqIQhUOX/xiapZGabB0NgjAzi44oUotYjI=; b=sTiddbyhY0eVHWAlbHYnMsBqoXv8G52aDKZYOetv3moYknb4UmpPT4IveFWRzQveX7pIOi tqs+qK0vrPM1E/WvDKhyQhS+28SV+V3lHQZArWjF4UIsMIKjn1Bbq/e0Z6VlEQjPhVUpNx 56ynVDR42TFUdTm32kq+p/nDGqpUY9+gFIzQzx6qMGqkX1Z82pflr9MMkiTmZIDBlagkj0 LxuKC5xOiYbay93lbL/UoeZ35cjSPNk0ABKL70JyCefwscG52R6xVUxq4ObvnM6ih4G3iI 9MdiEEUqQh2R39ZCWwpklPlL9swiSrMNerwW1qNjAtcQBx+x/+Tb5MuL2SHqUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758986791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KxLm3IGIIvqIQhUOX/xiapZGabB0NgjAzi44oUotYjI=; b=ynPAp+Mrzs2bUSjmmcJ4uw3d+9VVAILMZlsQbVqoBhlk37HBNhowUxAIhvLuBXG2g2D59i n6TGW6OhWNY67xhb3Ko9YWrFfBuAm+b/NJluTrhRXSxfDD095sdmQlUbr1VPgBhiyAAfoI ApbXn8GSkTd+ahz1jq6/TicBSgxi87C1CuZeuvCWIyV4rQhOwMgQIkeDOMBEFLw7/MTVcE 4dPih3LB9swCJ3cbxFCNpKYVEr9rqoSfPyWtoGJ0l6hN56XO+b5w14+Pdrx+JHsEVCuxKB jKA/y0z3S9Denlw2TYfGGUjo2JpVwQGXoimpYwb/eGBF5Df6dAKuzk2O4EWNTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758986791; a=rsa-sha256; cv=none; b=s196ahqQgy6UEaEh/CmKrc+84TpeazDSILvDiNYm1dchzC2XODNNrOAtE/0XJVayPf3skS JSi/LcyWexkLRZEPkLDzwMLR95462y6aKur35rxVJItDqkbI9k1xQ5at5591Dgyq0tuBhR aLrtc2MFukuEBRKc8VBWeFl5PC8VQfwTi8fCx+Gvk6dnB806cri/5gB4VV3prrLT2tlRdp khWpxdr0vAPK6zVFqCENmtScRUeVo2Y4bVS47H2B465UUC43kvWaleYk14Sv5aiDpdtyQP qo7FFo7ZQIIrD1im6/IkSGBrYKcWvHjMGd+U2JQLjcRjgCRqmW141DhfP6iMdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYrs26srGzfhl; Sat, 27 Sep 2025 15:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RFQUIJ003204; Sat, 27 Sep 2025 15:26:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RFQUgB003200; Sat, 27 Sep 2025 15:26:30 GMT (envelope-from git) Date: Sat, 27 Sep 2025 15:26:30 GMT Message-Id: <202509271526.58RFQUgB003200@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: 6b164f18118d - main - mktemp.1: Document TMPDIR in ENVIRONMENT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b164f18118d0e8dbf9826d7117e0e757f7eb727 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=6b164f18118d0e8dbf9826d7117e0e757f7eb727 commit 6b164f18118d0e8dbf9826d7117e0e757f7eb727 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-09-27 15:21:13 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-09-27 15:24:43 +0000 mktemp.1: Document TMPDIR in ENVIRONMENT While here, use Ev for TMPDIR consistently. MFC after: 3 days Event: EuroBSDCon 2025 --- usr.bin/mktemp/mktemp.1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/usr.bin/mktemp/mktemp.1 b/usr.bin/mktemp/mktemp.1 index 063f25f216dc..3b8381c0586c 100644 --- a/usr.bin/mktemp/mktemp.1 +++ b/usr.bin/mktemp/mktemp.1 @@ -27,7 +27,7 @@ .\" .\" From: $OpenBSD: mktemp.1,v 1.8 1998/03/19 06:13:37 millert Exp $ .\" -.Dd August 4, 2022 +.Dd September 27, 2025 .Dt MKTEMP 1 .Os .Sh NAME @@ -185,6 +185,13 @@ but still introduces a race condition. Use of this option is not encouraged. .El +.Sh ENVIRONMENT +.Bl -tag -width TMPDIR +.It Ev TMPDIR +The directory in which to store temporary files. +Refer to +.Xr environ 7 . +.El .Sh EXIT STATUS .Ex -std .Sh EXAMPLES @@ -200,7 +207,8 @@ TMPFILE=`mktemp /tmp/${tempfoo}.XXXXXXXXXX` || exit 1 echo "program output" >> $TMPFILE .Ed .Pp -To allow the use of $TMPDIR: +To allow the use of +.Ev TMPDIR : .Bd -literal -offset indent tempfoo=`basename $0` TMPFILE=`mktemp -t ${tempfoo}` || exit 1 From nobody Sat Sep 27 17:07:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYv5h3246z68Nqf; Sat, 27 Sep 2025 17:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYv5h2G5pz3GP9; Sat, 27 Sep 2025 17:07:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758992856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ycVQAD3uofN3hmDrfK4R054bhJue7Le8oLTIzEP591w=; b=vR7kNPA8MyZ8ikgujYOj4U0YC8INUf5+7KiWazEiCRKIrhangcxuMsY/DLq3qy8+0ZehyJ uwOrigck2bZ2sbVlz+Dj2lRICBr74yzNpvD6jZtMcF+UKzTNSpc/wxzFKRvOQvFcV3blVY FdL6/bNHd/jOp8D5WDVYRlAvDyOOWiDggn8xVkTkONL9B5Jivwpw4bqAlepbysv12nI71n DhEAPLfnmW6Aa+xV/rcjCVQiOszuXNfh+RPv9KRLkMZR8Xw61SNVrNSJXmejoohnluGS0C 7xI3Sr9tnAs9+M4Y0r8rtLd42cn7dprwvpLrhUWF/1tfMwt5h/q7J2OZzEqWRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758992856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ycVQAD3uofN3hmDrfK4R054bhJue7Le8oLTIzEP591w=; b=OzaYc+20RSO001Zc4x83b7Qpf6bAFdTPiN9Ffo93WX0DUc8KT22z5JFeLuOxH5MwX+3c+U RDY7VIDGowYnhWxihUYv49xB0igf/mSHlZv+uNiPV/ROcwsYmcJqQhJZdOyr0HHZN3x5pG Wb7H+n1oUs5LvOhtmjx2svK+OY2nFnSpkWL3CdeBoISRNQ1soeasoZj/bdgBPxHQMcaqC+ 6UQiHhh4oe6QqCa8uItRzzgmlLjJIxrnArLYcyQswEWIyLU80BGxb6Do4E5MAIXrirqvwS js+53M52NYMjxyVYXNT37cYt9wPHpjfaE1ZH4f/gznjqsLmWbobxK3nZrth/JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758992856; a=rsa-sha256; cv=none; b=Dup5wl+HFbNiHCGO2RZKJJ2Lvj5TZBBc7bYV0PJVSq8PVgeeqa50S2bO5Z5JgmR78NX5YV NNoabf5EE0wtleHjFqOz0WvVcMAkWP+Yjn4ZmlJWRr0zME1KqFum2YKl3LGIUB5wwAC7ba vx5KaXWioYQL8rsl+sttjHh5XsKTI+1Q2A6yzqUTow++YDR93pAWIxtcUTQ47u0ou8uMTs RYjhnNO0GBJFuhaDZE5FWh+REuFGgUeJDZFVXsclqh+rsfrNg40qYiyaehkSKsVA0PTEt8 eATUV/o9MnccZpBRYbQjY3lJxeAcjeW5Vuk9ih2fr/1bPEMvtQhK/O9vgz39Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYv5h1sZMzjj7; Sat, 27 Sep 2025 17:07:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RH7asm090987; Sat, 27 Sep 2025 17:07:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RH7ajb090983; Sat, 27 Sep 2025 17:07:36 GMT (envelope-from git) Date: Sat, 27 Sep 2025 17:07:36 GMT Message-Id: <202509271707.58RH7ajb090983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d58339f39874 - main - tzcode: Drop libc namespace List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d58339f398748b50ff84421e9d81f8f6d94cb949 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d58339f398748b50ff84421e9d81f8f6d94cb949 commit d58339f398748b50ff84421e9d81f8f6d94cb949 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-27 17:06:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-27 17:07:15 +0000 tzcode: Drop libc namespace This hasn't been needed in years and is a maintenance headache. MFC after: 1 week Reviewed by: philip Differential Revision: https://reviews.freebsd.org/D52694 --- contrib/tzcode/asctime.c | 2 -- contrib/tzcode/difftime.c | 2 -- contrib/tzcode/localtime.c | 52 ++++++++++++++++++++++------------------------ 3 files changed, 25 insertions(+), 31 deletions(-) diff --git a/contrib/tzcode/asctime.c b/contrib/tzcode/asctime.c index 1977a2272896..491d23bf73ac 100644 --- a/contrib/tzcode/asctime.c +++ b/contrib/tzcode/asctime.c @@ -14,9 +14,7 @@ /*LINTLIBRARY*/ -#include "namespace.h" #include "private.h" -#include "un-namespace.h" #include enum { STD_ASCTIME_BUF_SIZE = 26 }; diff --git a/contrib/tzcode/difftime.c b/contrib/tzcode/difftime.c index 43af402cdc12..ff78f03c5705 100644 --- a/contrib/tzcode/difftime.c +++ b/contrib/tzcode/difftime.c @@ -7,9 +7,7 @@ /*LINTLIBRARY*/ -#include "namespace.h" #include "private.h" /* for time_t and TYPE_SIGNED */ -#include "un-namespace.h" /* Return -X as a double. Using this avoids casting to 'double'. */ static double diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index a8f97e31a4bb..c98134f7be7c 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -14,7 +14,6 @@ #define LOCALTIME_IMPLEMENTATION #ifdef __FreeBSD__ -#include "namespace.h" #include #endif /* __FreeBSD__ */ #ifdef DETECT_TZ_CHANGES @@ -31,7 +30,6 @@ int __tz_change_interval = DETECT_TZ_CHANGES_INTERVAL; #include #ifdef __FreeBSD__ #include "libc_private.h" -#include "un-namespace.h" #endif /* __FreeBSD__ */ #if HAVE_SYS_STAT_H @@ -45,8 +43,8 @@ int __tz_change_interval = DETECT_TZ_CHANGES_INTERVAL; #if defined THREAD_SAFE && THREAD_SAFE # include #ifdef __FreeBSD__ -# define pthread_mutex_lock(l) (__isthreaded ? _pthread_mutex_lock(l) : 0) -# define pthread_mutex_unlock(l) (__isthreaded ? _pthread_mutex_unlock(l) : 0) +# define pthread_mutex_lock(l) (__isthreaded ? pthread_mutex_lock(l) : 0) +# define pthread_mutex_unlock(l) (__isthreaded ? pthread_mutex_unlock(l) : 0) #endif /* __FreeBSD__ */ static pthread_mutex_t locallock = PTHREAD_MUTEX_INITIALIZER; static int lock(void) { return pthread_mutex_lock(&locallock); } @@ -525,7 +523,7 @@ tzfile_changed(const char *name, int fd) static struct stat old_sb; struct stat sb; - if (_fstat(fd, &sb) != 0) + if (fstat(fd, &sb) != 0) return -1; if (strcmp(name, old_name) != 0) { @@ -668,7 +666,7 @@ tzloadbody(char const *name, struct state *sp, char tzloadflags, } #endif } - fid = _open(name, (O_RDONLY | O_BINARY | O_CLOEXEC | O_CLOFORK + fid = open(name, (O_RDONLY | O_BINARY | O_CLOEXEC | O_CLOFORK | O_IGNORE_CTTY | O_NOCTTY)); #else /* __FreeBSD__ */ if ((tzloadflags & TZLOAD_FROMENV) && strcmp(name, TZDEFAULT) == 0) @@ -676,7 +674,7 @@ tzloadbody(char const *name, struct state *sp, char tzloadflags, relname = name; if (strncmp(relname, TZDIR "/", strlen(TZDIR) + 1) == 0) relname += strlen(TZDIR) + 1; - dd = _open(TZDIR, O_DIRECTORY | O_RDONLY); + dd = open(TZDIR, O_DIRECTORY | O_RDONLY); if ((tzloadflags & TZLOAD_FROMENV) && issetugid()) { if (dd < 0) return errno; @@ -686,18 +684,18 @@ tzloadbody(char const *name, struct state *sp, char tzloadflags, fid = -1; errno = EINVAL; } else { - fid = _openat(dd, relname, O_RDONLY | O_BINARY, AT_RESOLVE_BENEATH); + fid = openat(dd, relname, O_RDONLY | O_BINARY, AT_RESOLVE_BENEATH); } } else { if (dd < 0) { relname = name; dd = AT_FDCWD; } - fid = _openat(dd, relname, O_RDONLY | O_BINARY, 0); + fid = openat(dd, relname, O_RDONLY | O_BINARY, 0); } if (dd != AT_FDCWD && dd >= 0) { serrno = errno; - _close(dd); + close(dd); errno = serrno; } #endif /* __FreeBSD__ */ @@ -714,23 +712,23 @@ tzloadbody(char const *name, struct state *sp, char tzloadflags, switch (tzfile_changed(name, fid)) { case -1: serrno = errno; - _close(fid); + close(fid); return serrno; case 0: - _close(fid); + close(fid); return 0; case 1: break; } } #endif /* DETECT_TZ_CHANGES */ - nread = _read(fid, up->buf, sizeof up->buf); + nread = read(fid, up->buf, sizeof up->buf); if (nread < tzheadsize) { int err = nread < 0 ? errno : EINVAL; - _close(fid); + close(fid); return err; } - if (_close(fid) < 0) + if (close(fid) < 0) return errno; for (stored = 4; stored <= 8; stored *= 2) { char version = up->tzhead.tzh_version[0]; @@ -1890,7 +1888,7 @@ localtime_tzset(time_t const *timep, struct tm *tmp, bool setname) static void localtime_key_init(void) { - localtime_key_error = _pthread_key_create(&localtime_key, free); + localtime_key_error = pthread_key_create(&localtime_key, free); } #endif /* __FreeBSD__ */ struct tm * @@ -1903,16 +1901,16 @@ localtime(const time_t *timep) struct tm *p_tm = &tm; if (__isthreaded != 0) { - _pthread_once(&localtime_once, localtime_key_init); + pthread_once(&localtime_once, localtime_key_init); if (localtime_key_error != 0) { errno = localtime_key_error; return (NULL); } - if ((p_tm = _pthread_getspecific(localtime_key)) == NULL) { + if ((p_tm = pthread_getspecific(localtime_key)) == NULL) { if ((p_tm = malloc(sizeof(*p_tm))) == NULL) { return (NULL); } - if (_pthread_setspecific(localtime_key, p_tm) != 0) { + if (pthread_setspecific(localtime_key, p_tm) != 0) { free(p_tm); return (NULL); } @@ -1969,7 +1967,7 @@ gmtime_r(time_t const *restrict timep, struct tm *restrict tmp) static void gmtime_key_init(void) { - gmtime_key_error = _pthread_key_create(&gmtime_key, free); + gmtime_key_error = pthread_key_create(&gmtime_key, free); } #endif /* __FreeBSD__ */ struct tm * @@ -1982,16 +1980,16 @@ gmtime(const time_t *timep) struct tm *p_tm = &tm; if (__isthreaded != 0) { - _pthread_once(&gmtime_once, gmtime_key_init); + pthread_once(&gmtime_once, gmtime_key_init); if (gmtime_key_error != 0) { errno = gmtime_key_error; return (NULL); } - if ((p_tm = _pthread_getspecific(gmtime_key)) == NULL) { + if ((p_tm = pthread_getspecific(gmtime_key)) == NULL) { if ((p_tm = malloc(sizeof(*p_tm))) == NULL) { return (NULL); } - if (_pthread_setspecific(gmtime_key, p_tm) != 0) { + if (pthread_setspecific(gmtime_key, p_tm) != 0) { free(p_tm); return (NULL); } @@ -2017,7 +2015,7 @@ offtime_r(time_t const *restrict timep, long offset, struct tm *restrict tmp) static void offtime_key_init(void) { - offtime_key_error = _pthread_key_create(&offtime_key, free); + offtime_key_error = pthread_key_create(&offtime_key, free); } #endif /* __FreeBSD__ */ struct tm * @@ -2030,16 +2028,16 @@ offtime(time_t const *timep, long offset) struct tm *p_tm = &tm; if (__isthreaded != 0) { - _pthread_once(&offtime_once, offtime_key_init); + pthread_once(&offtime_once, offtime_key_init); if (offtime_key_error != 0) { errno = offtime_key_error; return (NULL); } - if ((p_tm = _pthread_getspecific(offtime_key)) == NULL) { + if ((p_tm = pthread_getspecific(offtime_key)) == NULL) { if ((p_tm = malloc(sizeof(*p_tm))) == NULL) { return (NULL); } - if (_pthread_setspecific(offtime_key, p_tm) != 0) { + if (pthread_setspecific(offtime_key, p_tm) != 0) { free(p_tm); return (NULL); } From nobody Sat Sep 27 17:07:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYv5j4q6Zz68NND; Sat, 27 Sep 2025 17:07: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYv5j38jzz3GPx; Sat, 27 Sep 2025 17:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758992857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lo9lz/XFc2hVEdoN6f9tEmcreYLOBGU+adDFPoYQVZk=; b=b+Qlwhrv2zt8FSs34PP4Z0Nh22ezj4lET0mB69Q+nkJnFDPNIT+x0fA5W1ma993XATeQF2 J+n4ggd2nzTGFK0lO2K1N0h4IM0xosOgR0URpRDDDKO+POv07x6YIgr/qEeFhKbaz9pwnK pMB0kpqwyfJFiYWCH28DXq911LuNPjS6C+8ERbA8zso+t6fzJ+bggPU55kxr4C+nVkrA81 v3GlISqm/ANVXu/hcSxB6WWlypUMOGKc78MY1eDZL8Pc7j2lJZtgBVdkkxr5QPFJVW1/FN +nfK8cs/V56JKlpq+kgar1rXfAJz43pwznp5bloNKI4CQGRImLxKtGaexr6ovg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758992857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lo9lz/XFc2hVEdoN6f9tEmcreYLOBGU+adDFPoYQVZk=; b=Jx1QwhiqkOOGHV09eFB06QeZq9CFdwsRmjg0LjqxrSXuAXioQNUxwh/SGxVIQG86VjGRIU Ae/yUkBTol/3QTvKHEOVxS68O6V6AQM7htIYvuNaItOx7k9IryYqcADv7AQoTb2E6Hsf7e bpdtreG84qMdggLeTheMxhgBlTVSyx6Z/cCdQTB4J5qFpt4XEzMfyVV4gM+dflvX+PZDQy guGeToZJgnVghhoEhNyJqvpcKMAfLLYcIOsC20MA27jEsBVapo8scZUrVhUAfo2QEudn86 4gXAbJtOUaqKzbyg/9LycTF5i4mRAO05uXWAklIqIS8tAI7azBiGmsyogpAvbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758992857; a=rsa-sha256; cv=none; b=i0IXsvKP3uWRbQbkiwMZ/J9km1WL4FTStf6VdIj75RchPbC6effYGNqf2SenF+BOqWwqvX Ewu1Y3k2KSr/oqWNXAL7C4DSFK9q3CEFk5NYgHX4a533T6fJe9sj00o2Ak82bcTYzMDJ34 ruCtcvZchThbse+p9TsWG1WU9zC88qvRuhXFabUkrlZV6kAvNznnAeLzODFa8OwRcOEdpf 2zLSlVSBHyuTEQWIukp40H86rGfg8pLOICwF0sff9r7SmzVphS/gWFs6WOhLygxOXImAoV 9HtR9uy2lyPr/WzbjFyIOth3wpjVOsBF1rPy1pT/hfCO6lz6moHfpzEg1UloZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYv5j2ggdzjnc; Sat, 27 Sep 2025 17:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RH7bvb091027; Sat, 27 Sep 2025 17:07:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RH7bUq091024; Sat, 27 Sep 2025 17:07:37 GMT (envelope-from git) Date: Sat, 27 Sep 2025 17:07:37 GMT Message-Id: <202509271707.58RH7bUq091024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: df8bc705eb04 - main - tzcode: Fix issues when TZ is an absolute path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df8bc705eb04aff2f718678fffb9d5d4f5d7c223 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=df8bc705eb04aff2f718678fffb9d5d4f5d7c223 commit df8bc705eb04aff2f718678fffb9d5d4f5d7c223 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-27 17:07:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-27 17:07:16 +0000 tzcode: Fix issues when TZ is an absolute path * If TZ starts with TZDIR, strip any additional slashes so relname does not end up looking like an absolute path. For instance, TZ=/usr/share/zoneinfo//UTC should result in UTC, not /UTC. * In the setugid case, we were incorrectly passing name rather than relname to fstatat(). * Modify the tz_env and tz_env_setugid test cases to exercise both of these scenarios. * Also add test cases for invalid values of TZ, which I wrote earlier but forgot to include in a5f14e4f9069. Reported by: Paul Eggert MFC after: 3 days Fixes: 967a49a21a27 ("Update tzcode to 2025b") Fixes: a5f14e4f9069 ("tzcode: Use -00 only for invalid time zones") Reviewed by: philip Differential Revision: https://reviews.freebsd.org/D52753 --- lib/libc/gen/sysconf.c | 2 +- lib/libc/tests/stdtime/Makefile | 1 + lib/libc/tests/stdtime/detect_tz_changes_test.c | 90 ++++++++++++++++++++++--- 3 files changed, 84 insertions(+), 9 deletions(-) diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 66562d0e29f0..b5b732eed05d 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -51,7 +51,7 @@ #include "un-namespace.h" #include "../stdlib/atexit.h" -#include "tzdir.h" /* from ../../../contrib/tzcode/stdtime */ +#include "tzdir.h" /* from ../../../contrib/tzcode */ #include "libc_private.h" #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ diff --git a/lib/libc/tests/stdtime/Makefile b/lib/libc/tests/stdtime/Makefile index 6b9068e1641b..590dea22da31 100644 --- a/lib/libc/tests/stdtime/Makefile +++ b/lib/libc/tests/stdtime/Makefile @@ -3,6 +3,7 @@ ATF_TESTS_C+= strptime_test ATF_TESTS_C+= detect_tz_changes_test +CFLAGS.detect_tz_changes_test+= -I${SRCTOP}/contrib/tzcode .if ${MK_DETECT_TZ_CHANGES} != "no" CFLAGS.detect_tz_changes_test+= -DDETECT_TZ_CHANGES .endif diff --git a/lib/libc/tests/stdtime/detect_tz_changes_test.c b/lib/libc/tests/stdtime/detect_tz_changes_test.c index 6648d8498cc5..fe6b04357331 100644 --- a/lib/libc/tests/stdtime/detect_tz_changes_test.c +++ b/lib/libc/tests/stdtime/detect_tz_changes_test.c @@ -20,6 +20,8 @@ #include #include +#include "tzdir.h" + #include static const struct tzcase { @@ -62,9 +64,9 @@ debug(const char *fmt, ...) static void change_tz(const char *tzn) { - static const char *zfn = "/usr/share/zoneinfo"; - static const char *tfn = "root/etc/.localtime"; - static const char *dfn = "root/etc/localtime"; + static const char *zfn = TZDIR; + static const char *tfn = "root" TZDEFAULT ".tmp"; + static const char *dfn = "root" TZDEFAULT; ssize_t clen; int zfd, sfd, dfd; @@ -96,6 +98,50 @@ test_tz(const char *expect) ATF_CHECK_STREQ(expect, buf); } +ATF_TC(tz_default); +ATF_TC_HEAD(tz_default, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test default zone"); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(tz_default, tc) +{ + /* prepare chroot with no /etc/localtime */ + ATF_REQUIRE_EQ(0, mkdir("root", 0755)); + ATF_REQUIRE_EQ(0, mkdir("root/etc", 0755)); + /* enter chroot */ + ATF_REQUIRE_EQ(0, chroot("root")); + ATF_REQUIRE_EQ(0, chdir("/")); + /* check timezone */ + unsetenv("TZ"); + test_tz("+0000 (UTC)"); +} + +ATF_TC(tz_invalid_file); +ATF_TC_HEAD(tz_invalid_file, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test invalid zone file"); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(tz_invalid_file, tc) +{ + static const char *dfn = "root/etc/localtime"; + int fd; + + /* prepare chroot with bogus /etc/localtime */ + ATF_REQUIRE_EQ(0, mkdir("root", 0755)); + ATF_REQUIRE_EQ(0, mkdir("root/etc", 0755)); + ATF_REQUIRE((fd = open(dfn, O_RDWR | O_CREAT, 0644)) >= 0); + ATF_REQUIRE_EQ(8, write(fd, "invalid\n", 8)); + ATF_REQUIRE_EQ(0, close(fd)); + /* enter chroot */ + ATF_REQUIRE_EQ(0, chroot("root")); + ATF_REQUIRE_EQ(0, chdir("/")); + /* check timezone */ + unsetenv("TZ"); + test_tz("+0000 (-00)"); +} + ATF_TC(thin_jail); ATF_TC_HEAD(thin_jail, tc) { @@ -327,10 +373,38 @@ ATF_TC_HEAD(tz_env, tc) } ATF_TC_BODY(tz_env, tc) { - const struct tzcase *tzcase; + char path[MAXPATHLEN]; + const struct tzcase *tzcase = tzcases; + int len; + /* relative path */ for (tzcase = tzcases; tzcase->tzfn != NULL; tzcase++) test_tz_env(tzcase->tzfn, tzcase->expect); + /* absolute path */ + for (tzcase = tzcases; tzcase->tzfn != NULL; tzcase++) { + len = snprintf(path, sizeof(path), "%s/%s", TZDIR, tzcase->tzfn); + ATF_REQUIRE(len > 0 && (size_t)len < sizeof(path)); + test_tz_env(path, tzcase->expect); + } + /* absolute path with additional slashes */ + for (tzcase = tzcases; tzcase->tzfn != NULL; tzcase++) { + len = snprintf(path, sizeof(path), "%s/////%s", TZDIR, tzcase->tzfn); + ATF_REQUIRE(len > 0 && (size_t)len < sizeof(path)); + test_tz_env(path, tzcase->expect); + } +} + + +ATF_TC(tz_invalid_env); +ATF_TC_HEAD(tz_invalid_env, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test invalid TZ value"); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(tz_invalid_env, tc) +{ + test_tz_env("invalid", "+0000 (-00)"); + test_tz_env(":invalid", "+0000 (-00)"); } ATF_TC(setugid); @@ -367,23 +441,23 @@ ATF_TC_HEAD(tz_env_setugid, tc) } ATF_TC_BODY(tz_env_setugid, tc) { - const struct tzcase *tzcase = tzcases; - ATF_REQUIRE_EQ(0, seteuid(UID_NOBODY)); ATF_REQUIRE(issetugid()); - for (tzcase = tzcases; tzcase->tzfn != NULL; tzcase++) - test_tz_env(tzcase->tzfn, tzcase->expect); + ATF_TC_BODY_NAME(tz_env)(tc); } ATF_TP_ADD_TCS(tp) { debugging = !getenv("__RUNNING_INSIDE_ATF_RUN") && isatty(STDERR_FILENO); + ATF_TP_ADD_TC(tp, tz_default); + ATF_TP_ADD_TC(tp, tz_invalid_file); ATF_TP_ADD_TC(tp, thin_jail); #ifdef DETECT_TZ_CHANGES ATF_TP_ADD_TC(tp, detect_tz_changes); #endif /* DETECT_TZ_CHANGES */ ATF_TP_ADD_TC(tp, tz_env); + ATF_TP_ADD_TC(tp, tz_invalid_env); ATF_TP_ADD_TC(tp, setugid); ATF_TP_ADD_TC(tp, tz_env_setugid); return (atf_no_error()); From nobody Sat Sep 27 17:13:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYvDT4B1Lz68PKX; Sat, 27 Sep 2025 17:13: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cYvDT3X3lz3HFY; Sat, 27 Sep 2025 17:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758993209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K0lLMZswlDZgCuhHP8l5Y82Bivyp2Kf59ZV0GhkPK4Y=; b=JR4DWJ0pV0mRrzX8bCZ6GzDHjmikzZZPxk7u/R9dKNAnOhXTTFXZHrvqZneoLjqjql0WgJ JwBHfmdQ3dPFKtkQzgEqjhQjw12VYsvBkAuSgqBno90tGswXX9eMrMZXyxRvUubaLGiHjV GT3vjCpYcnazEBnAhKkQ1bwbIz94nfr86WVvi2RQoxo38YYzjwWLxo4Xgc1jq3bqkWH+mT HgcyRBj9gHBxnWF6Hf/LdjHLe4pjswEAh3UToCb/3ROvCv+I7DJ+XkgiJo6J36Xjorg8Pe yywLAoolCwc/PQIOAiX5PqX3kh7eCf/C8Uc6dQkXyxcamgmjP+lz52mJ3S3QqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758993209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K0lLMZswlDZgCuhHP8l5Y82Bivyp2Kf59ZV0GhkPK4Y=; b=I705KFH2PDA9Fxi5dIffeTs3QpFjy2I8eBoADYaYu69OOcSjUoirP74KVCEg0JWRk7kiFa CuS5Aky7H9fj2pVtnSfvLlHa1zl4zlxKgFyBuLSoPO8L8xiWojP3xDg4mClIE6oE/juIqy T326cnrKMMOXTFkslLUh3DrdWe3lqlFH+L3R+egLjOLfPZGrFPHmlvv/6GPbo2gR8ezT6P JIdSuCEy9CmI+T8Wm+qhQptT6ns8TYd58vljdmdnvjVJDbyMp5fpd9cm41zcAHxVa2gpNc SiZV94vAO/zwg8yNjT5pmCUbt9dmdVsb2Xb4FkplWFL7y6YvQr9dy6oROMX6IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758993209; a=rsa-sha256; cv=none; b=APINEUUjI10uYYK9JXvdFeqbeff2wwjpyOeeGhhrOzsGcWFRc1o+x2+Q/OmsSWpX5srzaa HJHnN/ItEAUaqp8nO6IoHz7avJ7t0SN9e4POJaiL8OoBLmBgmgH1o4EPsdEyyIXJL5opck 9DznzNGGYG6To+Zon+RAeKrctbOJ9jakye5SOoG29eK99no8in/VmBubi32W4cgaUAX49B yJ+bRXBl/jIWW6kc6Fiz9qZa6lttlvWY+nBarIjkHRyx41ugLg8Cj7E1pOBgdn8sEkiSO5 Lx/lzDZ79c9Y5CSQzgDelSMm7pgY6tnbjt9WvMGFK4Xm45l6ohDc/eQiaKQ03g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cYvDT36wPzjjx; Sat, 27 Sep 2025 17:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RHDTrJ008063; Sat, 27 Sep 2025 17:13:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RHDTTL008060; Sat, 27 Sep 2025 17:13:29 GMT (envelope-from git) Date: Sat, 27 Sep 2025 17:13:29 GMT Message-Id: <202509271713.58RHDTTL008060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 2ed9833791f2 - main - thunderbolt: Import USB4 code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ed9833791f28e14843ac813f90cb030e45948dc Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=2ed9833791f28e14843ac813f90cb030e45948dc commit 2ed9833791f28e14843ac813f90cb030e45948dc Author: Aymeric Wibo AuthorDate: 2025-09-27 11:50:43 +0000 Commit: Aymeric Wibo CommitDate: 2025-09-27 17:13:13 +0000 thunderbolt: Import USB4 code Add initial USB4 code written by Scott Long and originally passed on to HPS (source: https://github.com/hselasky/usb4), minus the ICM code and with some small fixes. For context, older TB chips implemented the connection manager in firmware (ICM) instead of in the OS (HCM), but maintaining the ICM code would be a huge burden for not many chips. Mostly completed work: - Debug/trace framework. - NHI controller driver. - PCIe bridge driver. - Router and config space layer handling (just reading in this commit). Link to the email where Scott shared details about the initial USB4 work: https://lists.freebsd.org/archives/freebsd-hackers/2024-July/003411.html Glanced at by: emaste, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49450 Event: EuroBSDcon 2025 --- sys/dev/thunderbolt/hcm.c | 223 +++++++ sys/dev/thunderbolt/hcm_var.h | 47 ++ sys/dev/thunderbolt/nhi.c | 1170 ++++++++++++++++++++++++++++++++++++ sys/dev/thunderbolt/nhi_pci.c | 529 ++++++++++++++++ sys/dev/thunderbolt/nhi_reg.h | 332 ++++++++++ sys/dev/thunderbolt/nhi_var.h | 277 +++++++++ sys/dev/thunderbolt/nhi_wmi.c | 198 ++++++ sys/dev/thunderbolt/router.c | 939 +++++++++++++++++++++++++++++ sys/dev/thunderbolt/router_var.h | 242 ++++++++ sys/dev/thunderbolt/tb_acpi_pcib.c | 181 ++++++ sys/dev/thunderbolt/tb_debug.c | 334 ++++++++++ sys/dev/thunderbolt/tb_debug.h | 93 +++ sys/dev/thunderbolt/tb_dev.c | 331 ++++++++++ sys/dev/thunderbolt/tb_dev.h | 41 ++ sys/dev/thunderbolt/tb_if.m | 121 ++++ sys/dev/thunderbolt/tb_ioctl.h | 52 ++ sys/dev/thunderbolt/tb_pcib.c | 614 +++++++++++++++++++ sys/dev/thunderbolt/tb_pcib.h | 93 +++ sys/dev/thunderbolt/tb_reg.h | 52 ++ sys/dev/thunderbolt/tb_var.h | 54 ++ sys/dev/thunderbolt/tbcfg_reg.h | 363 +++++++++++ sys/modules/Makefile | 5 + sys/modules/thunderbolt/Makefile | 13 + 23 files changed, 6304 insertions(+) diff --git a/sys/dev/thunderbolt/hcm.c b/sys/dev/thunderbolt/hcm.c new file mode 100644 index 000000000000..b8f703fc3b52 --- /dev/null +++ b/sys/dev/thunderbolt/hcm.c @@ -0,0 +1,223 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022 Scott Long + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "opt_thunderbolt.h" + +/* Host Configuration Manager (HCM) for USB4 and later TB3 */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static void hcm_cfg_task(void *, int); + +int +hcm_attach(struct nhi_softc *nsc) +{ + struct hcm_softc *hcm; + + tb_debug(nsc, DBG_HCM|DBG_EXTRA, "hcm_attach called\n"); + + hcm = malloc(sizeof(struct hcm_softc), M_THUNDERBOLT, M_NOWAIT|M_ZERO); + if (hcm == NULL) { + tb_debug(nsc, DBG_HCM, "Cannot allocate hcm object\n"); + return (ENOMEM); + } + + hcm->dev = nsc->dev; + hcm->nsc = nsc; + nsc->hcm = hcm; + + hcm->taskqueue = taskqueue_create("hcm_event", M_NOWAIT, + taskqueue_thread_enqueue, &hcm->taskqueue); + if (hcm->taskqueue == NULL) + return (ENOMEM); + taskqueue_start_threads(&hcm->taskqueue, 1, PI_DISK, "tbhcm%d_tq", + device_get_unit(nsc->dev)); + TASK_INIT(&hcm->cfg_task, 0, hcm_cfg_task, hcm); + + return (0); +} + +int +hcm_detach(struct nhi_softc *nsc) +{ + struct hcm_softc *hcm; + + hcm = nsc->hcm; + if (hcm->taskqueue) + taskqueue_free(hcm->taskqueue); + + return (0); +} + +int +hcm_router_discover(struct hcm_softc *hcm) +{ + + taskqueue_enqueue(hcm->taskqueue, &hcm->cfg_task); + + return (0); +} + +static void +hcm_cfg_task(void *arg, int pending) +{ + struct hcm_softc *hcm; + struct router_softc *rsc; + struct router_cfg_cap cap; + struct tb_cfg_router *cfg; + struct tb_cfg_adapter *adp; + struct tb_cfg_cap_lane *lane; + uint32_t *buf; + uint8_t *u; + u_int error, i, offset; + + hcm = (struct hcm_softc *)arg; + + tb_debug(hcm, DBG_HCM|DBG_EXTRA, "hcm_cfg_task called\n"); + + buf = malloc(8 * 4, M_THUNDERBOLT, M_NOWAIT|M_ZERO); + if (buf == NULL) { + tb_debug(hcm, DBG_HCM, "Cannot alloc memory for discovery\n"); + return; + } + + rsc = hcm->nsc->root_rsc; + error = tb_config_router_read(rsc, 0, 5, buf); + if (error != 0) { + free(buf, M_NHI); + return; + } + + cfg = (struct tb_cfg_router *)buf; + + cap.space = TB_CFG_CS_ROUTER; + cap.adap = 0; + cap.next_cap = GET_ROUTER_CS_NEXT_CAP(cfg); + while (cap.next_cap != 0) { + error = tb_config_next_cap(rsc, &cap); + if (error != 0) + break; + + if ((cap.cap_id == TB_CFG_CAP_VSEC) && (cap.vsc_len == 0)) { + tb_debug(hcm, DBG_HCM, "Router Cap= %d, vsec= %d, " + "len= %d, next_cap= %d\n", cap.cap_id, + cap.vsc_id, cap.vsec_len, cap.next_cap); + } else if (cap.cap_id == TB_CFG_CAP_VSC) { + tb_debug(hcm, DBG_HCM, "Router cap= %d, vsc= %d, " + "len= %d, next_cap= %d\n", cap.cap_id, + cap.vsc_id, cap.vsc_len, cap.next_cap); + } else + tb_debug(hcm, DBG_HCM, "Router cap= %d, " + "next_cap= %d\n", cap.cap_id, cap.next_cap); + if (cap.next_cap > TB_CFG_CAP_OFFSET_MAX) + cap.next_cap = 0; + } + + u = (uint8_t *)buf; + error = tb_config_get_lc_uuid(rsc, u); + if (error == 0) { + tb_debug(hcm, DBG_HCM, "Router LC UUID: %02x%02x%02x%02x-" + "%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n", + u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], + u[9], u[10], u[11], u[12], u[13], u[14], u[15]); + } else + tb_printf(hcm, "Error finding LC registers: %d\n", error); + + for (i = 1; i <= rsc->max_adap; i++) { + error = tb_config_adapter_read(rsc, i, 0, 8, buf); + if (error != 0) { + tb_debug(hcm, DBG_HCM, "Adapter %d: no adapter\n", i); + continue; + } + adp = (struct tb_cfg_adapter *)buf; + tb_debug(hcm, DBG_HCM, "Adapter %d: %s, max_counters= 0x%08x," + " adapter_num= %d\n", i, + tb_get_string(GET_ADP_CS_TYPE(adp), tb_adapter_type), + GET_ADP_CS_MAX_COUNTERS(adp), GET_ADP_CS_ADP_NUM(adp)); + + if (GET_ADP_CS_TYPE(adp) != ADP_CS2_LANE) + continue; + + error = tb_config_find_adapter_cap(rsc, i, TB_CFG_CAP_LANE, + &offset); + if (error) + continue; + + error = tb_config_adapter_read(rsc, i, offset, 3, buf); + if (error) + continue; + + lane = (struct tb_cfg_cap_lane *)buf; + tb_debug(hcm, DBG_HCM, "Lane Adapter State= %s %s\n", + tb_get_string((lane->current_lws & CAP_LANE_STATE_MASK), + tb_adapter_state), (lane->targ_lwp & CAP_LANE_DISABLE) ? + "disabled" : "enabled"); + + if ((lane->current_lws & CAP_LANE_STATE_MASK) == + CAP_LANE_STATE_CL0) { + tb_route_t newr; + + newr.hi = rsc->route.hi; + newr.lo = rsc->route.lo | (i << rsc->depth * 8); + + tb_printf(hcm, "want to add router at 0x%08x%08x\n", + newr.hi, newr.lo); + error = tb_router_attach(rsc, newr); + tb_printf(rsc, "tb_router_attach returned %d\n", error); + } + } + + free(buf, M_THUNDERBOLT); +} diff --git a/sys/dev/thunderbolt/hcm_var.h b/sys/dev/thunderbolt/hcm_var.h new file mode 100644 index 000000000000..a11c8e9b6a92 --- /dev/null +++ b/sys/dev/thunderbolt/hcm_var.h @@ -0,0 +1,47 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2022 Scott Long + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _HCM_VAR_H +#define _HCM_VAR_H + +struct hcm_softc { + u_int debug; + device_t dev; + struct nhi_softc *nsc; + + struct task cfg_task; + struct taskqueue *taskqueue; +}; + +int hcm_attach(struct nhi_softc *); +int hcm_detach(struct nhi_softc *); +int hcm_router_discover(struct hcm_softc *); + +#endif /* _HCM_VAR_H */ diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c new file mode 100644 index 000000000000..205e69c16253 --- /dev/null +++ b/sys/dev/thunderbolt/nhi.c @@ -0,0 +1,1170 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2022 Scott Long + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "opt_thunderbolt.h" + +/* PCIe interface for Thunderbolt Native Host Interface (nhi) */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "tb_if.h" + +static int nhi_alloc_ring(struct nhi_softc *, int, int, int, + struct nhi_ring_pair **); +static void nhi_free_ring(struct nhi_ring_pair *); +static void nhi_free_rings(struct nhi_softc *); +static int nhi_configure_ring(struct nhi_softc *, struct nhi_ring_pair *); +static int nhi_activate_ring(struct nhi_ring_pair *); +static int nhi_deactivate_ring(struct nhi_ring_pair *); +static int nhi_alloc_ring0(struct nhi_softc *); +static void nhi_free_ring0(struct nhi_softc *); +static void nhi_fill_rx_ring(struct nhi_softc *, struct nhi_ring_pair *); +static int nhi_init(struct nhi_softc *); +static void nhi_post_init(void *); +static int nhi_tx_enqueue(struct nhi_ring_pair *, struct nhi_cmd_frame *); +static int nhi_setup_sysctl(struct nhi_softc *); + +SYSCTL_NODE(_hw, OID_AUTO, nhi, CTLFLAG_RD, 0, "NHI Driver Parameters"); + +MALLOC_DEFINE(M_NHI, "nhi", "nhi driver memory"); + +#ifndef NHI_DEBUG_LEVEL +#define NHI_DEBUG_LEVEL 0 +#endif + +/* 0 = default, 1 = force-on, 2 = force-off */ +#ifndef NHI_FORCE_HCM +#define NHI_FORCE_HCM 0 +#endif + +void +nhi_get_tunables(struct nhi_softc *sc) +{ + devclass_t dc; + device_t ufp; + char tmpstr[80], oid[80]; + u_int val; + + /* Set local defaults */ + sc->debug = NHI_DEBUG_LEVEL; + sc->max_ring_count = NHI_DEFAULT_NUM_RINGS; + sc->force_hcm = NHI_FORCE_HCM; + + /* Inherit setting from the upstream thunderbolt switch node */ + val = TB_GET_DEBUG(sc->dev, &sc->debug); + if (val != 0) { + dc = devclass_find("tbolt"); + if (dc != NULL) { + ufp = devclass_get_device(dc, device_get_unit(sc->dev)); + if (ufp != NULL) + TB_GET_DEBUG(ufp, &sc->debug); + } else { + if (TUNABLE_STR_FETCH("hw.tbolt.debug_level", oid, + 80) != 0) + tb_parse_debug(&sc->debug, oid); + } + } + + /* + * Grab global variables. Allow nhi debug flags to override + * thunderbolt debug flags, if present. + */ + bzero(oid, 80); + if (TUNABLE_STR_FETCH("hw.nhi.debug_level", oid, 80) != 0) + tb_parse_debug(&sc->debug, oid); + if (TUNABLE_INT_FETCH("hw.nhi.max_rings", &val) != 0) { + val = min(val, NHI_MAX_NUM_RINGS); + sc->max_ring_count = max(val, 1); + } + if (TUNABLE_INT_FETCH("hw.nhi.force_hcm", &val) != 0) + sc->force_hcm = val; + + /* Grab instance variables */ + bzero(oid, 80); + snprintf(tmpstr, sizeof(tmpstr), "dev.nhi.%d.debug_level", + device_get_unit(sc->dev)); + if (TUNABLE_STR_FETCH(tmpstr, oid, 80) != 0) + tb_parse_debug(&sc->debug, oid); + snprintf(tmpstr, sizeof(tmpstr), "dev.nhi.%d.max_rings", + device_get_unit(sc->dev)); + if (TUNABLE_INT_FETCH(tmpstr, &val) != 0) { + val = min(val, NHI_MAX_NUM_RINGS); + sc->max_ring_count = max(val, 1); + } + snprintf(tmpstr, sizeof(tmpstr), "dev, nhi.%d.force_hcm", + device_get_unit(sc->dev)); + if (TUNABLE_INT_FETCH(tmpstr, &val) != 0) + sc->force_hcm = val; + + return; +} + +static void +nhi_configure_caps(struct nhi_softc *sc) +{ + + if (NHI_IS_USB4(sc) || (sc->force_hcm == NHI_FORCE_HCM_ON)) + sc->caps |= NHI_CAP_HCM; + if (sc->force_hcm == NHI_FORCE_HCM_OFF) + sc->caps &= ~NHI_CAP_HCM; +} + +struct nhi_cmd_frame * +nhi_alloc_tx_frame(struct nhi_ring_pair *r) +{ + struct nhi_cmd_frame *cmd; + + mtx_lock(&r->mtx); + cmd = nhi_alloc_tx_frame_locked(r); + mtx_unlock(&r->mtx); + + return (cmd); +} + +void +nhi_free_tx_frame(struct nhi_ring_pair *r, struct nhi_cmd_frame *cmd) +{ + mtx_lock(&r->mtx); + nhi_free_tx_frame_locked(r, cmd); + mtx_unlock(&r->mtx); +} + +/* + * Push a command and data dword through the mailbox to the firmware. + * Response is either good, error, or timeout. Commands that return data + * do so by reading OUTMAILDATA. + */ +int +nhi_inmail_cmd(struct nhi_softc *sc, uint32_t cmd, uint32_t data) +{ + uint32_t val; + u_int error, timeout; + + mtx_lock(&sc->nhi_mtx); + /* + * XXX Should a defer/reschedule happen here, or is it not worth + * worrying about? + */ + if (sc->hwflags & NHI_MBOX_BUSY) { + mtx_unlock(&sc->nhi_mtx); + tb_debug(sc, DBG_MBOX, "Driver busy with mailbox\n"); + return (EBUSY); + } + sc->hwflags |= NHI_MBOX_BUSY; + + val = nhi_read_reg(sc, TBT_INMAILCMD); + tb_debug(sc, DBG_MBOX|DBG_FULL, "Reading INMAILCMD= 0x%08x\n", val); + if (val & INMAILCMD_ERROR) + tb_debug(sc, DBG_MBOX, "Error already set in INMAILCMD\n"); + if (val & INMAILCMD_OPREQ) { + mtx_unlock(&sc->nhi_mtx); + tb_debug(sc, DBG_MBOX, + "INMAILCMD request already in progress\n"); + return (EBUSY); + } + + nhi_write_reg(sc, TBT_INMAILDATA, data); + nhi_write_reg(sc, TBT_INMAILCMD, cmd | INMAILCMD_OPREQ); + + /* Poll at 1s intervals */ + timeout = NHI_MAILBOX_TIMEOUT; + while (timeout--) { + DELAY(1000000); + val = nhi_read_reg(sc, TBT_INMAILCMD); + tb_debug(sc, DBG_MBOX|DBG_EXTRA, + "Polling INMAILCMD= 0x%08x\n", val); + if ((val & INMAILCMD_OPREQ) == 0) + break; + } + sc->hwflags &= ~NHI_MBOX_BUSY; + mtx_unlock(&sc->nhi_mtx); + + error = 0; + if (val & INMAILCMD_OPREQ) { + tb_printf(sc, "Timeout waiting for mailbox\n"); + error = ETIMEDOUT; + } + if (val & INMAILCMD_ERROR) { + tb_printf(sc, "Firmware reports error in mailbox\n"); + error = EINVAL; + } + + return (error); +} + +/* + * Pull command status and data from the firmware mailbox. + */ +int +nhi_outmail_cmd(struct nhi_softc *sc, uint32_t *val) +{ + + if (val == NULL) + return (EINVAL); + *val = nhi_read_reg(sc, TBT_OUTMAILCMD); + return (0); +} + +int +nhi_attach(struct nhi_softc *sc) +{ + uint32_t val; + int error = 0; + + if ((error = nhi_setup_sysctl(sc)) != 0) + return (error); + + mtx_init(&sc->nhi_mtx, "nhimtx", "NHI Control Mutex", MTX_DEF); + + nhi_configure_caps(sc); + + /* + * Get the number of TX/RX paths. This sizes some of the register + * arrays during allocation and initialization. USB4 spec says that + * the max is 21. Alpine Ridge appears to default to 12. + */ + val = GET_HOST_CAPS_PATHS(nhi_read_reg(sc, NHI_HOST_CAPS)); + tb_debug(sc, DBG_INIT|DBG_NOISY, "Total Paths= %d\n", val); + if ((val == 0) || (val > 21) || ((NHI_IS_AR(sc) && val != 12))) { + tb_printf(sc, "WARN: unexpected number of paths: %d\n", val); + /* return (ENXIO); */ + } + sc->path_count = val; + + SLIST_INIT(&sc->ring_list); + + error = nhi_pci_configure_interrupts(sc); + if (error == 0) + error = nhi_alloc_ring0(sc); + if (error == 0) { + nhi_configure_ring(sc, sc->ring0); + nhi_activate_ring(sc->ring0); + nhi_fill_rx_ring(sc, sc->ring0); + } + + if (error == 0) + error = tbdev_add_interface(sc); + + if ((error == 0) && (NHI_USE_ICM(sc))) + tb_printf(sc, "WARN: device uses an internal connection manager\n"); + if ((error == 0) && (NHI_USE_HCM(sc))) + ; + error = hcm_attach(sc); + + if (error == 0) + error = nhi_init(sc); + + return (error); +} + +int +nhi_detach(struct nhi_softc *sc) +{ + + if (NHI_USE_HCM(sc)) + hcm_detach(sc); + + if (sc->root_rsc != NULL) + tb_router_detach(sc->root_rsc); + + tbdev_remove_interface(sc); + + nhi_pci_disable_interrupts(sc); + + nhi_free_ring0(sc); + + /* XXX Should the rings be marked as !VALID in the descriptors? */ + nhi_free_rings(sc); + + mtx_destroy(&sc->nhi_mtx); + + return (0); +} + +static void +nhi_memaddr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + bus_addr_t *addr; + + addr = arg; + if (error == 0 && nsegs == 1) { + *addr = segs[0].ds_addr; + } else + *addr = 0; +} + +static int +nhi_alloc_ring(struct nhi_softc *sc, int ringnum, int tx_depth, int rx_depth, + struct nhi_ring_pair **rp) +{ + bus_dma_template_t t; + bus_addr_t ring_busaddr; + struct nhi_ring_pair *r; + int ring_size, error; + u_int rxring_len, txring_len; + char *ring; + + if (ringnum >= sc->max_ring_count) { + tb_debug(sc, DBG_INIT, "Tried to allocate ring number %d\n", + ringnum); + return (EINVAL); + } + + /* Allocate the ring structure and the RX ring tacker together. */ + rxring_len = rx_depth * sizeof(void *); + txring_len = tx_depth * sizeof(void *); + r = malloc(sizeof(struct nhi_ring_pair) + rxring_len + txring_len, + M_NHI, M_NOWAIT|M_ZERO); + if (r == NULL) { + tb_printf(sc, "ERROR: Cannot allocate ring memory\n"); + return (ENOMEM); + } + + r->sc = sc; + TAILQ_INIT(&r->tx_head); + TAILQ_INIT(&r->rx_head); + r->ring_num = ringnum; + r->tx_ring_depth = tx_depth; + r->tx_ring_mask = tx_depth - 1; + r->rx_ring_depth = rx_depth; + r->rx_ring_mask = rx_depth - 1; + r->rx_pici_reg = NHI_RX_RING_PICI + ringnum * 16; + r->tx_pici_reg = NHI_TX_RING_PICI + ringnum * 16; + r->rx_cmd_ring = (struct nhi_cmd_frame **)((uint8_t *)r + sizeof (*r)); + r->tx_cmd_ring = (struct nhi_cmd_frame **)((uint8_t *)r->rx_cmd_ring + + rxring_len); + + snprintf(r->name, NHI_RING_NAMELEN, "nhiring%d\n", ringnum); + mtx_init(&r->mtx, r->name, "NHI Ring Lock", MTX_DEF); + tb_debug(sc, DBG_INIT | DBG_FULL, "Allocated ring context at %p, " + "mutex %p\n", r, &r->mtx); + + /* Allocate the RX and TX buffer descriptor rings */ + ring_size = sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_depth; + ring_size += sizeof(struct nhi_rx_buffer_desc) * r->rx_ring_depth; + tb_debug(sc, DBG_INIT | DBG_FULL, "Ring %d ring_size= %d\n", + ringnum, ring_size); + + bus_dma_template_init(&t, sc->parent_dmat); + t.alignment = 4; + t.maxsize = t.maxsegsize = ring_size; + t.nsegments = 1; + if ((error = bus_dma_template_tag(&t, &r->ring_dmat)) != 0) { + tb_printf(sc, "Cannot allocate ring %d DMA tag: %d\n", + ringnum, error); + return (ENOMEM); + } + if (bus_dmamem_alloc(r->ring_dmat, (void **)&ring, BUS_DMA_NOWAIT, + &r->ring_map)) { + tb_printf(sc, "Cannot allocate ring memory\n"); + return (ENOMEM); + } + bzero(ring, ring_size); + bus_dmamap_load(r->ring_dmat, r->ring_map, ring, ring_size, + nhi_memaddr_cb, &ring_busaddr, 0); + + r->ring = ring; + + r->tx_ring = (union nhi_ring_desc *)(ring); + r->tx_ring_busaddr = ring_busaddr; + ring += sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_depth; + ring_busaddr += sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_depth; + + r->rx_ring = (union nhi_ring_desc *)(ring); + r->rx_ring_busaddr = ring_busaddr; + + tb_debug(sc, DBG_INIT | DBG_EXTRA, "Ring %d: RX %p [0x%jx] " + "TX %p [0x%jx]\n", ringnum, r->tx_ring, r->tx_ring_busaddr, + r->rx_ring, r->rx_ring_busaddr); + + *rp = r; + return (0); +} + +static void +nhi_free_ring(struct nhi_ring_pair *r) +{ + + tb_debug(r->sc, DBG_INIT, "Freeing ring %d resources\n", r->ring_num); + nhi_deactivate_ring(r); + + if (r->tx_ring_busaddr != 0) { + bus_dmamap_unload(r->ring_dmat, r->ring_map); + r->tx_ring_busaddr = 0; + } + if (r->ring != NULL) { + bus_dmamem_free(r->ring_dmat, r->ring, r->ring_map); + r->ring = NULL; + } + if (r->ring_dmat != NULL) { + bus_dma_tag_destroy(r->ring_dmat); + r->ring_dmat = NULL; + } + mtx_destroy(&r->mtx); +} + +static void +nhi_free_rings(struct nhi_softc *sc) +{ + struct nhi_ring_pair *r; + + while ((r = SLIST_FIRST(&sc->ring_list)) != NULL) { + nhi_free_ring(r); + mtx_lock(&sc->nhi_mtx); + SLIST_REMOVE_HEAD(&sc->ring_list, ring_link); + mtx_unlock(&sc->nhi_mtx); + free(r, M_NHI); + } + + return; +} + +static int +nhi_configure_ring(struct nhi_softc *sc, struct nhi_ring_pair *ring) +{ + bus_addr_t busaddr; + uint32_t val; + int idx; + + idx = ring->ring_num * 16; + + /* Program the TX ring address and size */ + busaddr = ring->tx_ring_busaddr; + nhi_write_reg(sc, NHI_TX_RING_ADDR_LO + idx, busaddr & 0xffffffff); + nhi_write_reg(sc, NHI_TX_RING_ADDR_HI + idx, busaddr >> 32); + nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, ring->tx_ring_depth); + nhi_write_reg(sc, NHI_TX_RING_TABLE_TIMESTAMP + idx, 0x0); + tb_debug(sc, DBG_INIT, "TX Ring %d TX_RING_SIZE= 0x%x\n", + ring->ring_num, ring->tx_ring_depth); + + /* Program the RX ring address and size */ + busaddr = ring->rx_ring_busaddr; + val = (ring->rx_buffer_size << 16) | ring->rx_ring_depth; + nhi_write_reg(sc, NHI_RX_RING_ADDR_LO + idx, busaddr & 0xffffffff); + nhi_write_reg(sc, NHI_RX_RING_ADDR_HI + idx, busaddr >> 32); + nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, val); + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE1 + idx, 0xffffffff); + tb_debug(sc, DBG_INIT, "RX Ring %d RX_RING_SIZE= 0x%x\n", + ring->ring_num, val); + + return (0); +} + +static int +nhi_activate_ring(struct nhi_ring_pair *ring) +{ + struct nhi_softc *sc = ring->sc; + int idx; + + nhi_pci_enable_interrupt(ring); + + idx = ring->ring_num * 32; + tb_debug(sc, DBG_INIT, "Activating ring %d at idx %d\n", + ring->ring_num, idx); + nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 + idx, + TX_TABLE_RAW | TX_TABLE_VALID); + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 + idx, + RX_TABLE_RAW | RX_TABLE_VALID); + + return (0); +} + +static int +nhi_deactivate_ring(struct nhi_ring_pair *r) +{ + struct nhi_softc *sc = r->sc; + int idx; + + idx = r->ring_num * 32; + tb_debug(sc, DBG_INIT, "Deactiving ring %d at idx %d\n", + r->ring_num, idx); + nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 + idx, 0); + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 + idx, 0); + + idx = r->ring_num * 16; + tb_debug(sc, DBG_INIT, "Setting ring %d sizes to 0\n", r->ring_num); + nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, 0); + nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, 0); + + return (0); +} + +static int +nhi_alloc_ring0(struct nhi_softc *sc) +{ + bus_addr_t frames_busaddr; + bus_dma_template_t t; + struct nhi_intr_tracker *trkr; + struct nhi_ring_pair *r; + struct nhi_cmd_frame *cmd; + char *frames; + int error, size, i; + + if ((error = nhi_alloc_ring(sc, 0, NHI_RING0_TX_DEPTH, + NHI_RING0_RX_DEPTH, &r)) != 0) { + tb_printf(sc, "Error allocating control ring\n"); + return (error); + } + + r->rx_buffer_size = NHI_RING0_FRAME_SIZE;/* Control packets are small */ + + /* Allocate the RX and TX buffers that are used for Ring0 comms */ + size = r->tx_ring_depth * NHI_RING0_FRAME_SIZE; + size += r->rx_ring_depth * NHI_RING0_FRAME_SIZE; + + bus_dma_template_init(&t, sc->parent_dmat); + t.maxsize = t.maxsegsize = size; + t.nsegments = 1; + if (bus_dma_template_tag(&t, &sc->ring0_dmat)) { + tb_printf(sc, "Error allocating control ring buffer tag\n"); + return (ENOMEM); + } + + if (bus_dmamem_alloc(sc->ring0_dmat, (void **)&frames, BUS_DMA_NOWAIT, + &sc->ring0_map) != 0) { + tb_printf(sc, "Error allocating control ring memory\n"); + return (ENOMEM); + } + bzero(frames, size); + bus_dmamap_load(sc->ring0_dmat, sc->ring0_map, frames, size, + nhi_memaddr_cb, &frames_busaddr, 0); + sc->ring0_frames_busaddr = frames_busaddr; + sc->ring0_frames = frames; + + /* Allocate the driver command trackers */ + sc->ring0_cmds = malloc(sizeof(struct nhi_cmd_frame) * + (r->tx_ring_depth + r->rx_ring_depth), M_NHI, M_NOWAIT | M_ZERO); + if (sc->ring0_cmds == NULL) + return (ENOMEM); + + /* Initialize the RX frames so they can be used */ + mtx_lock(&r->mtx); + for (i = 0; i < r->rx_ring_depth; i++) { + cmd = &sc->ring0_cmds[i]; + cmd->data = (uint32_t *)(frames + NHI_RING0_FRAME_SIZE * i); + cmd->data_busaddr = frames_busaddr + NHI_RING0_FRAME_SIZE * i; + cmd->flags = CMD_MAPPED; + cmd->idx = i; + TAILQ_INSERT_TAIL(&r->rx_head, cmd, cm_link); + } + + /* Inititalize the TX frames */ + for ( ; i < r->tx_ring_depth + r->rx_ring_depth - 1; i++) { + cmd = &sc->ring0_cmds[i]; + cmd->data = (uint32_t *)(frames + NHI_RING0_FRAME_SIZE * i); + cmd->data_busaddr = frames_busaddr + NHI_RING0_FRAME_SIZE * i; + cmd->flags = CMD_MAPPED; + cmd->idx = i; + nhi_free_tx_frame_locked(r, cmd); + } + mtx_unlock(&r->mtx); + + /* Do a 1:1 mapping of rings to interrupt vectors. */ + /* XXX Should be abstracted */ + trkr = &sc->intr_trackers[0]; + trkr->ring = r; + r->tracker = trkr; + + /* XXX Should be an array */ + sc->ring0 = r; + SLIST_INSERT_HEAD(&sc->ring_list, r, ring_link); + + return (0); +} + +static void +nhi_free_ring0(struct nhi_softc *sc) +{ + if (sc->ring0_cmds != NULL) { + free(sc->ring0_cmds, M_NHI); + sc->ring0_cmds = NULL; + } + + if (sc->ring0_frames_busaddr != 0) { + bus_dmamap_unload(sc->ring0_dmat, sc->ring0_map); + sc->ring0_frames_busaddr = 0; *** 5529 LINES SKIPPED *** From nobody Sat Sep 27 20:25:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cYzTy6Grnz68fDT; Sat, 27 Sep 2025 20:25:26 +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 4cYzTy2Lxyz3Zcp; Sat, 27 Sep 2025 20:25:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 58RKPCaW071912; Sat, 27 Sep 2025 23:25:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 58RKPCaW071912 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 58RKPCvg071911; Sat, 27 Sep 2025 23:25:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 27 Sep 2025 23:25:12 +0300 From: Konstantin Belousov To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d58339f39874 - main - tzcode: Drop libc namespace Message-ID: References: <202509271707.58RH7ajb090983@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202509271707.58RH7ajb090983@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cYzTy2Lxyz3Zcp On Sat, Sep 27, 2025 at 05:07:36PM +0000, Dag-Erling Smørgrav wrote: > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d58339f398748b50ff84421e9d81f8f6d94cb949 > > commit d58339f398748b50ff84421e9d81f8f6d94cb949 > Author: Dag-Erling Smørgrav > AuthorDate: 2025-09-27 17:06:58 +0000 > Commit: Dag-Erling Smørgrav > CommitDate: 2025-09-27 17:07:15 +0000 > > tzcode: Drop libc namespace > > This hasn't been needed in years and is a maintenance headache. It does change the behavior. Now a user-provided open/fstat/pthread_* functions can interpose the system functions, making tz code doing something that was not intended. In other words, namespacing guaranteed that tzcode was not affected by the app playing with libc namespace. From nobody Sat Sep 27 22:06:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ1k36rNGz68mnv; Sat, 27 Sep 2025 22:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ1k35zKHz3s21; Sat, 27 Sep 2025 22:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759010763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=odxQWpg7y6AOK+pSLcIJGjIY26VHKxw1iQcJm8tXeKo=; b=PhKIPwdVR98jkxYRQ2ts7HLs5vVezXWHKFKnRY7zqyIdqFf++zE2cjWSOWCwHMWxywSp9z bkmkgeRe9DcpyP5wukZUyzXAHo04T3DleibsuAMGCgvUEF/AEQIoyCiEIEH4DQGGZukWec KL4jSsd1zVQ97+kFppY02xBM8n+opER4Zu9dgCI1erNGpUmgfY1QbqR2KQLpUsieXshEdD Sc79c2BqNqOzk37D3NjTaO5FTtuk1gmWXQ4OzDbF9XrPX163gfyzSfaKyOh4Nt8jDCf4ty g8EzX02Jw1YPWTAEWVM0s/CBcdGsarZsz0ArnoEyJnWWKKWks5fp/8iQ95c9+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759010763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=odxQWpg7y6AOK+pSLcIJGjIY26VHKxw1iQcJm8tXeKo=; b=kwA7Ke0aWRUdZSsiRHH43t9YlQpUCfCvLIKlP0bTsbl2ofLxY7dPMFQdMpU6mubWNeGWJM a33HZmRIwSv2BEwEpofuxWQcySW+v4NE0X37x3ps2YlZFZKLF9/6i3HPsKDzNKmqz+BZjD F1h6vZJsxoKcaP3ohjLC4ssdhnBz8uXAWWKuD9vX2QN/Pe8qh56SGkGWbEkVYAuNmEfw6K 8FtqSsnCD7XWzJpB2OQKfb/0EPCSFBZDQPpidKuuq6Gj04EAoCLlaoUI1UaU/7exZh54Yn 1tttPr0jusoR7oPq0XRGk5qQYr59/vQ/6XKT0BfxU/E9K0VhYQlJZxfyoTCEBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759010763; a=rsa-sha256; cv=none; b=H8RQlnqwzUvhri4QA7RRJLZVRkje+kOaxz7vPqKyTN4a0FMM46cNvKctVgFvtFvyJPJjEY 5yiiYbc1QcfrXTWwRn2FkMrIh5t2YahWQjAKZaMdHtjYYAlDhuMJHt1W1zwlwDdE7LheH5 C6Wm8HhNVlPovRFnv6zEnunin3jpa5gc3UKB1GHqbzLpzK1zFrOToKKj+VStYwRkuFpJVp /gY6xAO6DPg2aE0tIWzkEx+2r7I/yjna2s6sNGjdfS/eSe1sGryBNEBv8+JQbwQJrz1hIU wkNMaQa/OuNX0MpC7k1BFmSnCAb/Osfu4DyX8syk21uIrxCazdEB02n8WxpHag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ1k358MJzsVr; Sat, 27 Sep 2025 22:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58RM63we050010; Sat, 27 Sep 2025 22:06:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58RM63Gi050007; Sat, 27 Sep 2025 22:06:03 GMT (envelope-from git) Date: Sat, 27 Sep 2025 22:06:03 GMT Message-Id: <202509272206.58RM63Gi050007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jes=C3=BAs?= Daniel Colmenares Oviedo Subject: git: 68691160f41b - main - nuageinit: Ignore non-existent groups List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dtxdf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68691160f41bf6ce9ab70ddeeb7eeec2a7bff245 Auto-Submitted: auto-generated The branch main has been updated by dtxdf: URL: https://cgit.FreeBSD.org/src/commit/?id=68691160f41bf6ce9ab70ddeeb7eeec2a7bff245 commit 68691160f41bf6ce9ab70ddeeb7eeec2a7bff245 Author: Jesús Daniel Colmenares Oviedo AuthorDate: 2025-09-27 22:03:09 +0000 Commit: Jesús Daniel Colmenares Oviedo CommitDate: 2025-09-27 22:05:03 +0000 nuageinit: Ignore non-existent groups In cloud-init, when a group specified in the 'users.{index}.groups' parameter does not exist, it is ignored, but the user is created anyway. In the case of nuageinit, it exits with an exception, since pw(8) expects each group to exist. Reviewed by: bapt@ Approved by: bapt@ Differential Revision: https://reviews.freebsd.org/D52718 --- libexec/nuageinit/nuage.lua | 61 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index ef3cfd994fe1..3eeb2ea0b44c 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -139,6 +139,58 @@ local function splitlist(list) return ret end +local function splitlines(s) + local ret = {} + + for line in string.gmatch(s, "[^\n]+") do + ret[#ret + 1] = line + end + + return ret +end + +local function getgroups() + local ret = {} + + local root = os.getenv("NUAGE_FAKE_ROOTDIR") + local cmd = "pw " + if root then + cmd = cmd .. "-R " .. root .. " " + end + + local f = io.popen(cmd .. "groupshow -a 2> /dev/null | cut -d: -f1") + local groups = f:read("*a") + f:close() + + return splitlines(groups) +end + +local function checkgroup(group) + local groups = getgroups() + + for _, group2chk in ipairs(groups) do + if group == group2chk then + return true + end + end + + return false +end + +local function purge_group(groups) + local ret = {} + + for _, group in ipairs(groups) do + if checkgroup(group) then + ret[#ret + 1] = group + else + warnmsg("ignoring non-existent group '" .. group .. "'") + end + end + + return ret +end + local function adduser(pwd) if (type(pwd) ~= "table") then warnmsg("Argument should be a table") @@ -164,7 +216,14 @@ local function adduser(pwd) local extraargs = "" if pwd.groups then local list = splitlist(pwd.groups) - extraargs = " -G " .. table.concat(list, ",") + -- pw complains if the group does not exist, so if the user + -- specifies one that cannot be found, nuageinit will generate + -- an exception and exit, unlike cloud-init, which only issues + -- a warning but creates the user anyway. + list = purge_group(list) + if #list > 0 then + extraargs = " -G " .. table.concat(list, ",") + end end -- pw will automatically create a group named after the username -- do not add a -g option in this case From nobody Sun Sep 28 02:00:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ6wf54jWz694pj; Sun, 28 Sep 2025 02:00: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ6wf4cj3z3Mtx; Sun, 28 Sep 2025 02:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759024834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DoumUzp9kVBPuWxXuWAJj/e+dlbYTJ8UQ4CCVQGkzoE=; b=nsjv3JQ/SUD9JbCEuEEZseDcdCa2JyUJssjM8/ydNnM21q2ReZ5oqORBJYODILsiZvwCzu lL+zhyCYI4uAF2Ze33zJ399OimNydMdzqZBpUwg/GjINAO0589llQbSKRB7/J9IbhcCXOG e8ceyOAyMtSapu9CqwXz4tee05wAUvZqAAUsgdr9ExxhKyFuuG3kzVPReZEUoRxmOBFfaP yfUOTIpvrYqhcnehXwmS7OrmDdTM6gMvDCJ//sVQmJvCKlSDZYNWy7DRuV7+OfMvrQYbcy l3e2H5/7KsdGTq8E8k5yIAG3tZHaLIDFCvpIs0Ub6PzjREQXmRvxIlk+nLE5gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759024834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DoumUzp9kVBPuWxXuWAJj/e+dlbYTJ8UQ4CCVQGkzoE=; b=wifXIvEeEild7qYD7cZFEkI9Bwna3lBkCyzkUwKu1BIsEtwo4F1Oz3867ykajCgPtlxaw3 vAGiwj7j7NM/1d1XKL4AkcygXWQ9bKeyTFhVOemW8DAr+Y6GP7n8STohuq5qSlNwf0z/qN VRXGUEeTn3mrLLFnnaVhy2LN5SVjQ7GvgwECgAnJyzd3N54kdzimMJGg85HH5DETJRprG2 hh9G+4N78wdIQUj0cS1EbqKTqfljp5I+NZn73JM5XLlceoL/HYTB5Uwwq2csQydPxeZG2f dJ5fomHHx85+Ux9MgapfhR6zn6GLszJgflrnaQ9f0ioIAehHrsLOzG2T0oKq5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759024834; a=rsa-sha256; cv=none; b=T7aei0w+o0Hs7e9a7z4w0YZY2KYEb0R1gsXMBf8+aUXv/ze8OCpcf3nmr+rBC8l8WN6uYV 2Ff4gag6RjiCl1KkeK7oRehXF52c2GFZNKEgtMwyAt5F3W3zBGltNry+mqmhKusXovxPvq qCGN5Ip1XUsXe8NRDVckb+HVJQTE+k+KI6oHVWvc1P6PItBVNBam5mPyzXmU4QbYLbjJrD Qc8NaBwvj6jT+AMlo7TmItMhMSs3i0CaX3IkUxFy18plRtJkYL/oSA+wQ54l9huxCc1+kA f08KvIcQaiOV/1F1Wkvo52L7Oww0HzyjIjcf8tRqbiRN9yNM34j8EM/ZBRovXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ6wf4BjFzyx5; Sun, 28 Sep 2025 02:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S20YhR090258; Sun, 28 Sep 2025 02:00:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S20Ya1090255; Sun, 28 Sep 2025 02:00:34 GMT (envelope-from git) Date: Sun, 28 Sep 2025 02:00:34 GMT Message-Id: <202509280200.58S20Ya1090255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: fc726c4ec463 - main - packages: Add efi-tools to set-minimal List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc726c4ec4636d44e9c964092dba6df07cac8b20 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=fc726c4ec4636d44e9c964092dba6df07cac8b20 commit fc726c4ec4636d44e9c964092dba6df07cac8b20 Author: Lexi Winter AuthorDate: 2025-09-28 01:46:42 +0000 Commit: Lexi Winter CommitDate: 2025-09-28 02:00:15 +0000 packages: Add efi-tools to set-minimal This is required to manage the firmware on amd64 and aarch64 systems. MFC after: 3 days Reviewed by: imp, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52742 --- release/packages/ucl/efi-tools-all.ucl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/packages/ucl/efi-tools-all.ucl b/release/packages/ucl/efi-tools-all.ucl index 52c966d7cda1..d6dc71dc616c 100644 --- a/release/packages/ucl/efi-tools-all.ucl +++ b/release/packages/ucl/efi-tools-all.ucl @@ -35,3 +35,7 @@ the UEFI firmware from a running system: * efitable(8) can dump UEFI tables. EOD + +annotations { + set = minimal +} From nobody Sun Sep 28 02:00:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ6wh00SKz694S5; Sun, 28 Sep 2025 02:00: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ6wg59RQz3N38; Sun, 28 Sep 2025 02:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759024835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rm79fQaZ5V9B7eR4QNDH4tbCCi7h1TovAY0QvdUBGUk=; b=v/mqJwokJhSqdH1AD0V/YApibRjEutFDcIEJy3N+Sm0srJKOg4HqlxIRhh0x+DNbZtslTz d0wQB1DLpOkVkaGOLTTEIU3Xpw6OV4tIbIVXg0DRNCBtYpNhag9d+0eDqruYMxfCnd+yGD vXZWM0t5fF6bKDk74Y+KZt8fTCo+mnlxa7xO+dbQiFeewE+LLMFROwIRrpmJ2f2HfuMWiv 0JOqqfClZiYEpm5U79PhtV0yfblc8QSU9J+rLliMaDs2R1DIe2+KhmmTDz6h0scBPwGBG1 bIN7dVCnS2wKLqGRkiUFWA0eOavc+GjuASkeDgWauyjO80Ty369vh8AQZ7DDRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759024835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rm79fQaZ5V9B7eR4QNDH4tbCCi7h1TovAY0QvdUBGUk=; b=XyAMiPNnD4OXYVty5/x/O/piglBgLbcg6ER2jc0qGM7+VSTpsdCkr89w1I+gEciieFb1PY 4g/ATsuI0LSlf0Zngi/JtMe7ETa1T7DZIuoRAT+pz7AUAAqiBqQAIvZxvjg577Y5ECcmNT e9Db+Gdo1n5TvswIr74kavkavUJCtkgpmTVQVIUG1OqDyoMFpShWr7d+LqUHS8q7HmEzk+ jFX5V9n6Vrz7H8CAzD8aU7WP0mtWnLdl7EsTqH9nof8XqAMt/FeH5hS6aYv1/8Z7ZSoX9G 8mKi90nZd5vnuq6ZTqM17x++KKvCZQ/SGGJDhCgn5tEKSob0wZNy6TNSzsQpUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759024835; a=rsa-sha256; cv=none; b=gevEiK4PEAubW5pAyYHvFaI/hAARgC2WPJBSovZQ2fg0bs+1W7/XldGPl6hO/pHZ63vKC4 z8W9L6c+isQ1VtnWNLoDna1ZhViuetIJAl61nLA2P6owUtHvRr5rhqCcasnwJtSRxFTu1j eFWRaOF85ACQfs6P8DQkYur3wn9QaAHQo68EvQPGJr8jyegYxpe0rcIecdWHqDcoLf+eSf Z5LzDBpQTsERV5mu4ku+qqhsN8cx+oo4bEZCfleiMnTufvFGml/7Bkm4uu/k27PlTgyttw Vm5Nnx0o65JTgEwwN26xSTuWquNJQhk3RAO0RknFj8lYEsVH61NF2svnGKWH5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ6wg4lLsz109X; Sun, 28 Sep 2025 02:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S20Zw1090292; Sun, 28 Sep 2025 02:00:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S20ZOR090289; Sun, 28 Sep 2025 02:00:35 GMT (envelope-from git) Date: Sun, 28 Sep 2025 02:00:35 GMT Message-Id: <202509280200.58S20ZOR090289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 29a4fe3dbd84 - main - packages: Add kernel-man to minimal-jail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29a4fe3dbd8493d0066c5424bfe0e890d4703f34 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=29a4fe3dbd8493d0066c5424bfe0e890d4703f34 commit 29a4fe3dbd8493d0066c5424bfe0e890d4703f34 Author: Lexi Winter AuthorDate: 2025-09-28 01:49:08 +0000 Commit: Lexi Winter CommitDate: 2025-09-28 02:00:16 +0000 packages: Add kernel-man to minimal-jail These manpages are broadly applicable to all systems, even jails, since they describe kernel facilities which are available in jails. MFC after: 3 days Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52743 --- release/packages/ucl/kernel-man.ucl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/packages/ucl/kernel-man.ucl b/release/packages/ucl/kernel-man.ucl index 90257693b97b..4f56bd12cd92 100644 --- a/release/packages/ucl/kernel-man.ucl +++ b/release/packages/ucl/kernel-man.ucl @@ -24,5 +24,5 @@ developer manual pages (section 9). EOD annotations { - set = "minimal" + set = "minimal,minimal-jail" } From nobody Sun Sep 28 03:44:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZ9Dy5FDbz69CWt; Sun, 28 Sep 2025 03:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZ9Dy4kHFz3fdq; Sun, 28 Sep 2025 03:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=78VDbasvUMNjOCqnXd5285uSzuBoCIteS3KNKAYpyAw=; b=VRr8ODbWNi61YVIPMZnk7tVRcnSflMVB4ihyiSGDnNCAW5XF99sQMXZAdSAwO1KUpK9nJ+ veLbjUtVbysOSvewc2By38NG/7J6ceAYd3ntXNptnwT8OqqV0mvAqXwbFN0k/nlSqqbGZb iRDuWDWIEs6m1WHh2f5/PdkNmA7uYSxixvscaYpJ7mCSJz4556/m7+OJ9zU0zDybkZGQZj m1UQjcL65RcmDRGWhtUqi1MNPNagOZhZydwnv9E0IwyxJz/zg6IuTnGF3kw1Bew+5UPHUN Ju//cNKQ9NYiywcL7IPGcQE5J4q1MouAeHRQ4Yo2YsVCpLlu+7HtdDU1pQCOvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759031090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=78VDbasvUMNjOCqnXd5285uSzuBoCIteS3KNKAYpyAw=; b=BfMndda3eqsV3W9JKjh8GYG13h1VCywNpERxuSTTmr0ckJnY4IdoyvInwLCu90aQgysqNs 4CDlOS1FiWP8uLdZ7/9YfaA87kwD+ThHiNrRnws2TwQ6d/F83UxoGsoA66L1PMC5xMoQN8 jiFr6O32kFgaP7FR0pcLBd2j6zYSD0/1Pcx/PHK7FY7zAsd1lhD6GUDpNGyusgzPylzFp+ SnqHG5ohDlsx7skZ7HJdzHaieM0wP331cNNF6K4CC3CzBBJ73ZqnSpqGwmmjNXMQO9/Eaa rmu0Ofglzp2OTJ9+cHWBQ1lVH7ApqJxIQ6nGr4DcAeQS61s2afLhkiANSttnmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759031090; a=rsa-sha256; cv=none; b=qCMvu0uCXX/K+QoA2j0uLRWDZW4NWNRcaIrfDkJWAvbf2+HdpyESwTV/ynxPfjlHTcnM8E 1DxkiHiUYJDVmGndfl+aN5AoX/whLknvUCspkWb4NYcvwmIW6JOWkWOpsaEkifW4J3J+5m L0WNrR/nGImnykzNLUnvA5km151fLH2vgbYVnA82Jj3opreYBPv5uBRbYZS+LKsCmMfnv6 MFt7Mq6zbLK3zngkM/yPQu5YyM1CndDPiQAd/tb8CLYLaQsuzoukhurWZGnNtvcExAJGCG 0xYxSIVJahU1FjkwSxfaPm2EFAsnR0vUq596NMNPHAPpoZs1p26Tm6nnXv+keQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZ9Dy42FTz13Mb; Sun, 28 Sep 2025 03:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S3io9a087104; Sun, 28 Sep 2025 03:44:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S3ioWP087101; Sun, 28 Sep 2025 03:44:50 GMT (envelope-from git) Date: Sun, 28 Sep 2025 03:44:50 GMT Message-Id: <202509280344.58S3ioWP087101@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 52eb7e394a7e - main - mrsas.4: Cleaning List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52eb7e394a7e28e9b08e2096c4a085a384cc1dd0 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=52eb7e394a7e28e9b08e2096c4a085a384cc1dd0 commit 52eb7e394a7e28e9b08e2096c4a085a384cc1dd0 Author: Alexander Ziaee AuthorDate: 2025-09-28 03:41:33 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-28 03:42:30 +0000 mrsas.4: Cleaning + Rewrite SYNOPSIS for consistency + Rewrite HARDWARE for HW Relnotes, and add some stragglers + Correct mdoc grammar, making sysctls aproposable and linking xrefs + Clean up TODO, cannonicalize to CAVEATS, a standard section + Editorial pass, tag SPDX MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52125 --- share/man/man4/mrsas.4 | 199 ++++++++++++++++++++++--------------------------- 1 file changed, 91 insertions(+), 108 deletions(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 36e9a7b5c7e7..5f7a0e6e45ea 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2014 LSI Corp .\" All rights reserved. .\" Author: Kashyap Desai @@ -32,43 +35,42 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd February 4, 2021 +.Dd August 22, 2025 .Dt MRSAS 4 .Os .Sh NAME .Nm mrsas -.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA RAID controller driver" +.Nd Broadcom/LSI MegaRAID 6/12Gb/s SAS+SATA RAID controller driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent .Cd "device pci" .Cd "device mrsas" -.Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -mrsas_load="YES" -.Ed +.Cd mrsas_load="YES" +.Pp +In +.Xr sysctl.conf 5 : +.Cd dev.mrsas.X.disable_ocr +.Cd dev.mrsas.X.fw_outstanding +.Cd dev.mrsas.X.mrsas_fw_fault_check_delay +.Cd dev.mrsas.X.mrsas_io_timeout +.Cd hw.mrsas.X.debug_level .Sh DESCRIPTION The .Nm -driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express -SAS/SATA RAID controllers. -See the -.Nm HARDWARE -section for the supported devices list. -A disk (virtual disk/physical disk) attached to the +driver will detect Broadcom/LSI's 6Gb/s and 12Gb/s +PCI Express SAS/SATA/NVMe RAID controllers. +A disk +.Pq virtual disk/physical disk +attached to the .Nm driver will be visible to the user through .Xr camcontrol 8 as .Pa /dev/da? device nodes. -A simple management interface is also provided on a per-controller basis via the +A simple management interface is also provided per-controller via the .Pa /dev/mrsas? device node. .Pp @@ -77,8 +79,7 @@ The name is derived from the phrase "MegaRAID SAS HBA", which is substantially different than the old "MegaRAID" Driver .Xr mfi 4 -which does not connect targets -to the +which does not connect targets to the .Xr cam 4 layer and thus requires a new driver which attaches targets to the .Xr cam 4 @@ -91,8 +92,8 @@ but both the .Xr mfi 4 and .Nm -drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of -controllers. +drivers can detect and manage the +Broadcom/LSI MegaRAID SAS 2208/2308/3008/3108 series of controllers. .Pp The .Xr device.hints 5 @@ -103,7 +104,7 @@ By default, the .Xr mfi 4 driver will detect these controllers. See the -.Nm PRIORITY +.Sx PRIORITY section to know more about driver priority for MR-Fusion devices. .Pp .Nm @@ -124,46 +125,32 @@ rather then JBOD virtual mode. .Sh HARDWARE The .Nm -driver supports the following hardware: -.Pp -[ Thunderbolt 6Gb/s MR controller ] -.Bl -bullet -compact -.It -LSI MegaRAID SAS 9265 -.It -LSI MegaRAID SAS 9266 -.It -LSI MegaRAID SAS 9267 -.It -LSI MegaRAID SAS 9270 -.It -LSI MegaRAID SAS 9271 -.It -LSI MegaRAID SAS 9272 -.It -LSI MegaRAID SAS 9285 -.It -LSI MegaRAID SAS 9286 -.It -DELL PERC H810 -.It -DELL PERC H710/P -.El +driver supports the following LSI/Broadcom SATA/SAS RAID controllers: .Pp -[ Invader/Fury 12Gb/s MR controller ] -.Bl -bullet -compact -.It -LSI MegaRAID SAS 9380 -.It -LSI MegaRAID SAS 9361 -.It -LSI MegaRAID SAS 9341 -.It -DELL PERC H830 -.It -DELL PERC H730/P -.It -DELL PERC H330 +.Bl -column -compact "LSI MegaRAID SAS 9380" "Invader/Fury" "12Gb/s" +.It Controller Ta Chip Ta Speed +.It Broadcom SAS3916 Ta Aero Ta 12Gb/s +.It Broadcom SAS3908 Ta Aero Ta 12Gb/s +.It LSI MegaRAID SAS 9380 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9361 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9341 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9286 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9285 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9272 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9271 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9270 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9267 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9266 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9265 Ta Thunderbolt Ta 6Gb/s +.It LSI SAS 3108 Ta Ta 12Gb/s +.It LSI SAS 3008 Ta Ta 12Gb/s +.It LSI SAS 2308 Ta Ta 6Gb/s +.It LSI SAS 2208 Ta Ta 6Gb/s +.It DELL PERC H830 Ta Invader/Fury Ta 12Gb/s +.It DELL PERC H810 Ta Thunderbolt Ta 6Gb/s +.It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s +.It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s +.It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s .El .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific @@ -171,9 +158,8 @@ To disable Online Controller Reset(OCR) for a specific driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.disable_ocr=1 -.Ed +.Pp +.Dl Va dev.mrsas.X.disable_ocr=1 .Pp where X is the adapter number. .Pp @@ -181,9 +167,8 @@ To change the I/O timeout value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.mrsas_io_timeout=NNNNNN -.Ed +.Pp +.Dl Va dev.mrsas.X.mrsas_io_timeout=NNNNNN .Pp where NNNNNN is the timeout value in milli-seconds. .Pp @@ -191,9 +176,8 @@ To change the firmware fault check timer value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.mrsas_fw_fault_check_delay=NN -.Ed +.Pp +.Dl Va dev.mrsas.X.mrsas_fw_fault_check_delay=NN .Pp where NN is the fault check delay value in seconds. .Pp @@ -248,7 +232,8 @@ or subsystem for selection of MR-Fusion cards. With the above design in place, the .Xr mfi 4 -driver will attach to a MR-Fusion card given that it has a higher priority than +driver will attach to a MR-Fusion card +given that it has a higher priority than .Nm . .Pp Using @@ -267,45 +252,48 @@ At boot time, the .Xr mfi 4 driver will get priority to detect MR-Fusion controllers by default. Before -changing this default driver selection policy, LSI advises users to understand -how the driver selection policy works. +changing this default driver selection policy, +LSI advises users to understand how the driver selection policy works. LSI's policy is to provide priority to the .Xr mfi 4 -driver to detect MR-Fusion cards, but allow for the ability to choose the +driver to detect MR-Fusion cards, +but allow for the ability to choose the .Nm driver to detect MR-Fusion cards. .Pp -LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the -older +LSI recommends setting +.Va hw.mfi.mrsas_enable="0" +for customers who are using the older .Xr mfi 4 driver and do not want to switch to .Nm . -For those customers who are using a MR-Fusion controller for the first time, LSI -recommends using the +For those using a MR-Fusion controller for the first time, +LSI recommends using the .Nm -driver and setting hw.mfi.mrsas_enable="1". +driver and setting +.Va hw.mfi.mrsas_enable="1". .Pp -Changing the default behavior is well tested under most conditions, but -unexpected behavior may pop up if more complex and unrealistic operations are -executed by switching between the +Changing the default behavior is well tested under most conditions, +but unexpected behavior may pop up +if more complex and unrealistic operations are executed +by switching between the .Xr mfi 4 and .Nm drivers for MR-Fusion. Switching drivers is designed to happen only one time. -Although multiple -switching is possible, it is not recommended. +Although multiple switching is possible, it is not recommended. The user should decide from -.Nm Start of Day +.Sy boot which driver they want to use for the MR-Fusion card. .Pp The user may see different device names when switching from .Xr mfi 4 to .Nm . -This behavior is -.Nm Functions As Designed +This behavior +.Sy works as intended and the user needs to change the .Xr fstab 5 entry manually if they are doing any experiments with @@ -314,7 +302,7 @@ and .Nm interoperability. .Sh FILES -.Bl -tag -width ".Pa /dev/mrsas?" -compact +.Bl -tag -width "/dev/mrsas?" -compact .It Pa /dev/da? array/logical disk interface .It Pa /dev/mrsas? @@ -337,7 +325,8 @@ driver first appeared in is the old .Fx driver which started with support for Gen-1 Controllers and -was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F). +was extended to support up to MR-Fusion +.Pq Device ID = 0x005B, 0x005D, 0x005F . .Ed .Bd -ragged .Cd "mrsas Driver:" @@ -348,12 +337,12 @@ The SAS+SATA RAID controller with device id 0x005b is referred to as the Thunderbolt controller throughout this man page. .Ed .Bd -ragged -.Nm cam aware HBA drivers: +.Sy cam aware HBA drivers: .Fx has a .Xr cam 4 -layer which attaches storage devices and provides a common access mechanism to -storage controllers and attached devices. +layer which attaches storage devices and provides a +common access mechanism to storage controllers and attached devices. The .Nm driver is @@ -368,13 +357,13 @@ driver does not understand the .Xr cam 4 layer and it directly associates storage disks to the block layer. .Pp -.Nm Thunderbolt Controller: +.Sy Thunderbolt Controller: This is the 6Gb/s MegaRAID HBA card which has device id 0x005B. .Pp -.Nm Invader Controller: +.Sy Invader Controller: This is 12Gb/s MegaRAID HBA card which has device id 0x005D. .Pp -.Nm Fury Controller: +.Sy Fury Controller: This is the 12Gb/s MegaRAID HBA card which has device id 0x005F. .Ed .Sh AUTHORS @@ -382,12 +371,7 @@ The .Nm driver and this manual page were written by .An Kashyap Desai Aq Mt Kashyap.Desai@lsi.com . -.Sh TODO -The driver does not support alias for device name (it is required when the user -switches between two drivers and does not want to edit -.Pa /etc/fstab -manually). -.Pp +.Sh CAVEATS The .Nm driver exposes devices as @@ -398,8 +382,7 @@ exposes devices as .Pa /dev/mfid? . .Pp .Nm -does not support the Linux Emulator interface. -.Pp -.Nm -will not work with -.Xr mfiutil 8 . +does not support the Linux Emulator Interface, +.Xr mfiutil 8 , +or device name aliases for switching drivers without editing +.Xr fstab 5 . From nobody Sun Sep 28 09:05:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZJMQ4PcCz68M0C; Sun, 28 Sep 2025 09:05: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZJMQ3WC7z3Db1; Sun, 28 Sep 2025 09:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dObtUn8ntzWVezhnSXKWNBlioLROM8XSK0EhUxCVnX4=; b=b0EFTZz345dLNW8lr9ktbbAxMoMhFCKShBlss+tflTCGoiF/96G/lNbWQAWYDMF0VL4sef Uo3ppvToo7RomqhrNTFBbmwytw9DSWZMPNDF0ZiJDiCw1TmFZUfznPfW99WJ/pOlaR46xh W3rghZNOJ/1A3G8XET18suSxs8fCaqwgFnhFxa9jStZcAE3ucgR7S/PtWHcPxEDrvZAkjI 2uISG7olpPThegmMo0BhpTRSzLoFUT1KMX+ThDRtwt+2X9YnacXmviVGdtMdnJST5PvZ7a +R2xkjJZsTqfiDImDYfhMZqUjxbC9h7YSpgbyuVPMMmbw+5lEZQAsDEe8k9czQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dObtUn8ntzWVezhnSXKWNBlioLROM8XSK0EhUxCVnX4=; b=uI6fSxKxHET3DZQZf25C69h9F6MzWuy+e3SegjB7d2En5g9tq0565bIx+HajP3ICAy0NJJ T7F2BR9sMT2/C53ujEKfxVC6Dp+vQgbmKN0o/h/Et+HW5v+Or3dKx7e1Swnu3xa/ASIUxG ROwk898wz0FAsDA/KFtpR5DMYj2K6h/kdLd+xGaM7L97eld+Dq1AS5SeMcFk0xHytQaMTg YrSRehtP4yY2VZ6mfeCXY6cBHGp0BgbOh5lUHfJmqF2e9vU5COUiBSwzHE6f7SSwEPQURj 6ueH3ug0eVRHKzqOsK/VRdRXDhDxy/GAazOk20ifrPLrTnGxUj2lfus+Qjtl/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759050354; a=rsa-sha256; cv=none; b=FfP29EAcpLIbURUfTRbaFheNQnc3mKz6Wm39y8S4O+myjh/UnkEeZipIJ3eVoIBc8/uPm9 4AxreXhPFzYtchCVEH2e6YX7L7yhWL1k5C0e5PesWq6gyoQr/QGNHq9STVp3mveFmvg0we WM6v69gSjVFHVAiO++xskpn7BpunYAN3faeusqeo9XzCUO+ngsB/d1MueFptesKA2fkFDF TLX6cCWKCU/K2I5F4jHscShQVmooWdBWQNBWDaYrv+s+IdTy+teRfGKWuo62P2q6v5HPyt 06572duxDLamG4NbsWYfa6wS4EG09TYi10NK9vGo2XFhgxN7SkgD7AbO6L4gMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZJMQ2rk7z1CFq; Sun, 28 Sep 2025 09:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S95s2V086718; Sun, 28 Sep 2025 09:05:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S95ssp086715; Sun, 28 Sep 2025 09:05:54 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:05:54 GMT Message-Id: <202509280905.58S95ssp086715@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: f2575d56c8c9 - main - vtnet: improve control of transmit offloading List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2575d56c8c9a8acad4a61a3586546dff4febce1 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f2575d56c8c9a8acad4a61a3586546dff4febce1 commit f2575d56c8c9a8acad4a61a3586546dff4febce1 Author: Michael Tuexen AuthorDate: 2025-09-28 09:01:18 +0000 Commit: Michael Tuexen CommitDate: 2025-09-28 09:01:18 +0000 vtnet: improve control of transmit offloading Keep the hwassist flags for transmit checksum offload and transmit segment offload in sync with the enabled capabilities. Reported by: Timo Völker Reviewed by: Timo Völker MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52765 --- sys/dev/virtio/network/if_vtnet.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index a4bb57adc609..634ba0de2d55 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -1345,14 +1345,22 @@ vtnet_ioctl_ifcap(struct vtnet_softc *sc, struct ifreq *ifr) VTNET_CORE_LOCK_ASSERT(sc); - if (mask & IFCAP_TXCSUM) + if (mask & IFCAP_TXCSUM) { if_togglecapenable(ifp, IFCAP_TXCSUM); - if (mask & IFCAP_TXCSUM_IPV6) + if_togglehwassist(ifp, VTNET_CSUM_OFFLOAD); + } + if (mask & IFCAP_TXCSUM_IPV6) { if_togglecapenable(ifp, IFCAP_TXCSUM_IPV6); - if (mask & IFCAP_TSO4) + if_togglehwassist(ifp, VTNET_CSUM_OFFLOAD_IPV6); + } + if (mask & IFCAP_TSO4) { if_togglecapenable(ifp, IFCAP_TSO4); - if (mask & IFCAP_TSO6) + if_togglehwassist(ifp, IFCAP_TSO4); + } + if (mask & IFCAP_TSO6) { if_togglecapenable(ifp, IFCAP_TSO6); + if_togglehwassist(ifp, IFCAP_TSO6); + } if (mask & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6 | IFCAP_LRO)) { /* From nobody Sun Sep 28 09:14:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZJYR0m24z68MBJ; Sun, 28 Sep 2025 09:14: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZJYQ6hRFz3FtN; Sun, 28 Sep 2025 09:14:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KzfiUaWorrE19mBkvAnsJLbskeGVm5P3JXn7ZHqkMc4=; b=xfUxu4oMkNeXHDWxizVfDT1GawH/vBU2MW/mRpH32xRmS7gF2WrWEPkafXotPKBh9Eb46+ KbdjGpZ0+iFvOo842bNAsyYaqy3VTnc/vwoZTsVCrOrMtIgXoiuGM5lXiAb+FHJIBZ1Lav KrRlqICv/s699Sujy55WhkacYO3d6LXT/Umjo7CS+4LfEqicQsyE4d9MEe84RffpdvDV8h XNzJKFO1XWeq8eEEMeukusl1dzTBNh0haOsuJ/7YeMI/Mt8SlukIy81TtwfouV+Nx3JMkQ 9ojwB7kj8UVpIecxA3vkRLZOgyPBVJocXuYhBf1L9n79i1KIMdWpWtvSJcDqxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759050875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KzfiUaWorrE19mBkvAnsJLbskeGVm5P3JXn7ZHqkMc4=; b=hHPTEGoeDt+3/McA8nRq1oxVPR+RiJJf1po2a2HnOpVKNehIuPMbGqjR8Th/GO4jKl3l8H BcPhX6h9Pv14sqJLokRfuEdkTamqAEErUeCD7yqqW7KmP8JzV6BGT9zclfYsIzThKhRHy3 p8fTBu74w1xIas0S7dLLujI8cuXLq6VzcY5memsjzMEhnAMy/YPYz/dK1ksFJnThUdQfmr 2dRJrUGsNzjd7fgxMWknLmY6tP9N9P07NOrsoltYu5w+A1iPEyc5W5ia++hp+d87Ua82cl vTlsihcX6GHEg1I4WdKMkii/CLeEQUwEp7L5lNYII3bMa8EiqByOfhTWUvfUEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759050875; a=rsa-sha256; cv=none; b=kdDjdqcXNtv1PXjM8mnXL1d0MZR7hhTIKWL8p0ZeL4X/LoCSUWgKafqLHw3QCVzKIh8Twg bFvJL4d6HeEuTjo2cjOL3WEdnkJh06LqyCt43mfJafX+HrAcrQoup2MtcIR6JRmiFqzvVs sNHuunkXAWNvD9+ivVMV4bP8ii6kBeRanyxqSnJOxoXsaRtSAm960l+Epw5OFo4gx+pBHH grJKqA228e+P3hpwYy1RVO0GSDrFKxAolMd4mzf0fEp+iIukadu4/jN+75Bz/1xa1yK+gg khRH2wZS2w6BS+92LHKMXCkQ9f/YikWl3bRyYn8wd9nnH8IITgbv3ASO2FAXfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZJYQ60qSz1BqR; Sun, 28 Sep 2025 09:14:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9EYXp006097; Sun, 28 Sep 2025 09:14:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9EYgc006094; Sun, 28 Sep 2025 09:14:34 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:14:34 GMT Message-Id: <202509280914.58S9EYgc006094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 2872ced18742 - main - rc.d: Fix ftpd flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2872ced18742aaf9480c9a43059cba7e24dd7e59 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2872ced18742aaf9480c9a43059cba7e24dd7e59 commit 2872ced18742aaf9480c9a43059cba7e24dd7e59 Author: Jose Luis Duran AuthorDate: 2025-09-28 09:12:41 +0000 Commit: Jose Luis Duran CommitDate: 2025-09-28 09:12:41 +0000 rc.d: Fix ftpd flags After f99f0ee14e3a ("rc.d: add a service jails config to all base system services"), the FTP service ignores the flags configured in ftpd_flags: # sysrc ftpd_flags=-B ftpd_flags: -> -B # service ftpd enable ftpd enabled in /etc/rc.conf # service ftpd start Starting ftpd. # pgrep -fl ftpd 1234 /usr/libexec/ftpd -D Notice the absence of the "-B" flag. PR: 285600 Reviewed by: 0mp, emaste Approved by: emaste (mentor) Fixes: f99f0ee14e3a ("rc.d: add a service jails config to all base system services") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52745 --- libexec/rc/rc.d/ftpd | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/ftpd b/libexec/rc/rc.d/ftpd index e25a561a520a..5a4fd49e36f1 100755 --- a/libexec/rc/rc.d/ftpd +++ b/libexec/rc/rc.d/ftpd @@ -12,12 +12,11 @@ name="ftpd" desc="Internet File Transfer Protocol daemon" rcvar="ftpd_enable" command="/usr/libexec/${name}" +command_args="-D" pidfile="/var/run/${name}.pid" : ${ftpd_svcj_options:="net_basic"} load_rc_config $name -flags="-D ${flags} ${rc_flags}" - run_rc_command "$1" From nobody Sun Sep 28 09:29:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZJtX2bPcz68Ndb; Sun, 28 Sep 2025 09:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZJtX1rTTz3HPP; Sun, 28 Sep 2025 09: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=1759051764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CDDV0aDLS0z0BX3iegEeRnNFZ497/QEIzj0IrT3QfeI=; b=dQ/MjtZLaicqqrAf/bBrTKaZeEdnyO5hi+/z3bRH44y59a3Rn2vx7ZrugRWKoH4QFSawnX bQYdiEEAi2X0RNDE4fvbqbHXSONmLzQL72EqMbACt/00tau0hMgm4t78y1ejLz96ecKVhV HetF0RJHqA2YR2Y5bPWUmosb9yVrZckP//91m/o87f3MAXoqU1mWhSxNDv7OUz5dNtAn5y GEg6Vnw3Ky0a0c4/Ka7OMhwVoF50XW8yepPP13QbfPvbtmU3Gg7njb7a9ZeL9jEdC56/e2 27ikRvh2B6F5I9/jQwIQj6ykESf3ku5EpmgcX9OHbSH4BOyiDRY8UvyHr5wXbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759051764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CDDV0aDLS0z0BX3iegEeRnNFZ497/QEIzj0IrT3QfeI=; b=m1EM4+/sflXP7fA45n/DVUKdtFqfVzWeC5aTThqQgIy5Y1syaHXgl3elo1Fe+yJlyYiCyF u2ezCoTBE9lhLXWX5xF92FUn13M6t3ZZubrBXantU3Euwhdnj13NYZf8r4grVPTw4IZT4I 0oFOhkGrdPT42Xw/S9BFafSfK2BHDZhZqBPSGLaBrs+BVEfm1pqvftLkBmuMs9OUl6Nl7T 41Ygi0EyJefaIFqMHWPQWOiJa7NQR9nbaxHXazMXjPJrQFY05FTyiZKvjQ3PnCf+QsBcu8 +FXiweO0g/2eU2KX86edhDBB1K3+oq6Azt6RYrxWjsSj8tLaYnaC5D43cnxuXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759051764; a=rsa-sha256; cv=none; b=oL0LjP2pQ0UVnMSPR8wnL6xssuOSgj8uptld4YpBPgnH/nCOp0rGGvmobjl/EZWunHSuD7 uhTst3+RQYZKSjxF2LPhASPhUQF14qSiEgYD5NLTsMDR1aJ3GeeiIViK1LWGG7UAxXqrKM dVKwkwB7tjE4r7rnNp32q5pD+uihs0wQWK4fE99fpcD6KwrlmvHwscpdOfF0cdxnvynsKy MRmngZzJ33ybefa345EvtETJBXn6j36UvAK/Qz8/Z3RdTxb27QJRtiKvgu6p4lMCMgIvii ZLQEWgnw89Wjf1dFFM/hsj+5CJ9TKKy1sRJXJo+TuUNqVd4E7dDgIXZHwU4mZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZJtX1Fnvz1CMj; Sun, 28 Sep 2025 09:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9TOMM026359; Sun, 28 Sep 2025 09:29:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9TOLf026356; Sun, 28 Sep 2025 09:29:24 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:29:24 GMT Message-Id: <202509280929.58S9TOLf026356@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: f34e1c76adc5 - main - sysctl.9: Fix grammar in *TUN descriptions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f34e1c76adc5efd9b603cf6b2d5827f7db8c2ed8 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=f34e1c76adc5efd9b603cf6b2d5827f7db8c2ed8 commit f34e1c76adc5efd9b603cf6b2d5827f7db8c2ed8 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2025-09-28 08:05:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2025-09-28 09:27:08 +0000 sysctl.9: Fix grammar in *TUN descriptions Reported by: bcr Reviewed by: bcr MFC after: 3 days Event: EuroBSDCon 2025 Fixes: 5eb1caa8c845 Updated SYSCTL manual pages Differential Revision: https://reviews.freebsd.org/D52768 --- share/man/man9/sysctl.9 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index 92c8532c8ed2..31031e64f713 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 1, 2020 +.Dd September 28, 2025 .Dt SYSCTL 9 .Os .Sh NAME @@ -863,14 +863,14 @@ flags to be set indicating the read and write disposition of the sysctl: .It Dv CTLFLAG_RD This is a read-only sysctl. .It Dv CTLFLAG_RDTUN -This is a read-only sysctl and tunable which is tried fetched once +This is a read-only sysctl and tunable which is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_WR This is a writable sysctl. .It Dv CTLFLAG_RW This sysctl is readable and writable. .It Dv CTLFLAG_RWTUN -This is a readable and writeable sysctl and tunable which is tried +This is a readable and writeable sysctl and tunable which is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_NOFETCH @@ -907,7 +907,7 @@ This sysctl can be written to by processes in When iterating the sysctl name space, do not list this sysctl. .It Dv CTLFLAG_TUN Advisory flag that a system tunable also exists for this variable. -The initial sysctl value is tried fetched once from the system +The initial sysctl value is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_DYN Dynamically created OIDs automatically get this flag set. From nobody Sun Sep 28 09:58:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZKXY51c3z68QTC; Sun, 28 Sep 2025 09:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZKXY4qmqz3Ncd; Sun, 28 Sep 2025 09:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759053533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xocJkjAnPiBZ3oRIh/i/7y2MnA/qrF7haxIcSXk3mAU=; b=Qkv+V4mkimlRcmOgARt9yKgYj+vMLKu3f+7orZPyTYOfZzmViGQdyqPorqorF4SRhDZvSt Cpk8Mjm/W8zyU9AuKHvw8GnLxmC02jZdQzMByM4B6lPzAZLaf0eobGXtD5EzlTYxzXt4r8 J5/Ejc2S8lgq+99YNuO7ceevzpm+Uu44nki/4qDxm4y3wOsRYHsIquZaZlRcDC9N63cp7u E2FYIDOPQNC6yCLzwa8T9wMtPfRalF8IrlPo+Tj0ClPhHFxljDTlRG3kl2H8yYGHyn79v9 bWJSnWPWyrYgiSJQrk2oeZoPNUdI2hHaAGno2G3DWiNsCBUAxc/L8jwDeUF1Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759053533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xocJkjAnPiBZ3oRIh/i/7y2MnA/qrF7haxIcSXk3mAU=; b=kLormMdILcwVy4XsyBp8m62P/qTscICRY0AlCFYch3OWvJuo/bBCUlQ1nTsM5jFczVsrth STFKRqU26gZm/Mct6ZSD3Foql7skyONX+Tno87SlBdj/PCJh9o4Q5Yx88VDOTSg/sV8ToN SCWDZqNp3JF4e5AGv8QdIVXbgFba3HesEhmKlL7diXmj0zZCubG/U9Qb97HYUKrZRRftVn swjvg9VEVXWLKZn2tGKGxa9Ui+Rkf6IlJaoHX3kLVSAfM8BS5oPOhlSNvR+rj4Ppk+MMoK H+pf0//oxfv7tEHgKeeCvc0b5ggiVTl5Jr11PHUKPX1OdIF+oZ7KBQBJRiWQHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759053533; a=rsa-sha256; cv=none; b=M00tzStP7BdJeHGOE1tPqvBtX0VtO4/v+BXIbcP2jqUjqZuj4mQMXxo8P1cpr/nhpAfss4 L/P0+8KyloOOmirCiYhq7qZsQ81vY7W1JlwFpttgH5FyjCV2mSO1cmvzeSz8w51TEyaBVW fp88Ibdv8BATFIYb423vCPVdYSPKXYxcTJwglTuc8gsR3IXVke5ukw69m3sfvEdSyCQGmA 6k/MqpvD2/L7qCcqj3yiVzvPzLQpJtog6h5+ILj5SMXoRgHXtOMBF5gyu48TBnA3ROcTmo DpJjSZvQkgOYr59XXV0Jd6fIkoZadsMMlsfgDu/bQAIE0yrDlnAIkoXmJtqD0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZKXY480CzRn; Sun, 28 Sep 2025 09:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9wruE083345; Sun, 28 Sep 2025 09:58:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9wrww083342; Sun, 28 Sep 2025 09:58:53 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:58:53 GMT Message-Id: <202509280958.58S9wrww083342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9cab9fde5eda - main - virtual_oss: Port to base List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cab9fde5edad9b409dd2317a2aec7815e6d6bed Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9cab9fde5edad9b409dd2317a2aec7815e6d6bed commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed Author: Christos Margiolis AuthorDate: 2025-09-28 09:56:52 +0000 Commit: Christos Margiolis CommitDate: 2025-09-28 09:56:52 +0000 virtual_oss: Port to base This patch diverges quite a bit from the current upstream [1] in a few ways: 1. virtual_oss(8), virtual_bt_speaker(8) and virtual_oss_cmd(8) are actually separate programs. 2. Backends (lib/virtual_oss) are built as separate shared libraries and we dlopen() them in virtual_oss(8) and virtual_bt_speaker(8) on demand. 3. virtual_equalizer(8) and the sndio and bluetooth backends are built as ports, because they depend on third-party libraries. 4. Use newer libav API in bluetooth backend (see HAVE_LIBAV ifdefs) to address compiler errors. [1] https://github.com/freebsd/virtual_oss Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D52308 --- etc/mtree/BSD.lib32.dist | 2 + etc/mtree/BSD.usr.dist | 2 + lib/Makefile | 4 +- lib/virtual_oss/Makefile | 9 + lib/virtual_oss/Makefile.inc | 3 + lib/virtual_oss/bt/Makefile | 19 + lib/virtual_oss/bt/avdtp.c | 720 ++++++ lib/virtual_oss/bt/avdtp_signal.h | 139 ++ lib/virtual_oss/bt/bt.c | 1061 ++++++++ lib/virtual_oss/bt/bt.h | 116 + lib/virtual_oss/bt/cosdata-gen/Makefile | 12 + lib/virtual_oss/bt/cosdata-gen/cosdata.c | 177 ++ lib/virtual_oss/bt/sbc_coeffs.h | 69 + lib/virtual_oss/bt/sbc_encode.c | 701 ++++++ lib/virtual_oss/bt/sbc_encode.h | 82 + lib/virtual_oss/null/Makefile | 10 + lib/virtual_oss/null/null.c | 102 + lib/virtual_oss/oss/Makefile | 10 + lib/virtual_oss/oss/oss.c | 197 ++ lib/virtual_oss/sndio/Makefile | 12 + lib/virtual_oss/sndio/sndio.c | 203 ++ libexec/rc/rc.d/Makefile | 1 + libexec/rc/rc.d/virtual_oss | 119 + usr.sbin/Makefile | 1 + usr.sbin/virtual_oss/Makefile | 8 + usr.sbin/virtual_oss/Makefile.inc | 1 + usr.sbin/virtual_oss/virtual_bt_speaker/Makefile | 11 + .../virtual_oss/virtual_bt_speaker/bt_speaker.c | 542 ++++ .../virtual_bt_speaker/virtual_bt_speaker.8 | 71 + usr.sbin/virtual_oss/virtual_equalizer/Makefile | 11 + usr.sbin/virtual_oss/virtual_equalizer/equalizer.c | 431 ++++ .../virtual_equalizer/virtual_equalizer.8 | 127 + usr.sbin/virtual_oss/virtual_oss/Makefile | 24 + usr.sbin/virtual_oss/virtual_oss/audio_delay.c | 238 ++ usr.sbin/virtual_oss/virtual_oss/backend.h | 53 + usr.sbin/virtual_oss/virtual_oss/compressor.c | 76 + usr.sbin/virtual_oss/virtual_oss/ctl.c | 615 +++++ usr.sbin/virtual_oss/virtual_oss/eq.c | 226 ++ usr.sbin/virtual_oss/virtual_oss/format.c | 429 ++++ usr.sbin/virtual_oss/virtual_oss/httpd.c | 844 +++++++ usr.sbin/virtual_oss/virtual_oss/int.h | 327 +++ usr.sbin/virtual_oss/virtual_oss/main.c | 2625 ++++++++++++++++++++ usr.sbin/virtual_oss/virtual_oss/mul.c | 175 ++ usr.sbin/virtual_oss/virtual_oss/ring.c | 213 ++ usr.sbin/virtual_oss/virtual_oss/utils.h | 31 + usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 | 355 +++ usr.sbin/virtual_oss/virtual_oss/virtual_oss.c | 914 +++++++ usr.sbin/virtual_oss/virtual_oss/virtual_oss.h | 206 ++ usr.sbin/virtual_oss/virtual_oss_cmd/Makefile | 8 + usr.sbin/virtual_oss/virtual_oss_cmd/command.c | 113 + .../virtual_oss/virtual_oss_cmd/virtual_oss_cmd.8 | 103 + 51 files changed, 12547 insertions(+), 1 deletion(-) diff --git a/etc/mtree/BSD.lib32.dist b/etc/mtree/BSD.lib32.dist index a736a7d58b66..6520b7b95116 100644 --- a/etc/mtree/BSD.lib32.dist +++ b/etc/mtree/BSD.lib32.dist @@ -21,5 +21,7 @@ .. pkgconfig .. + virtual_oss + .. .. .. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 19da845e962f..1945c26ebc5f 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -103,6 +103,8 @@ .. ossl-modules .. + virtual_oss + .. .. libdata ldscripts diff --git a/lib/Makefile b/lib/Makefile index 2b7cf2fdcb7d..bf38a489911d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -115,7 +115,8 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libz \ libzstd \ ncurses \ - nss_tacplus + nss_tacplus \ + virtual_oss # Inter-library dependencies. When the makefile for a library contains LDADD # libraries, those libraries should be listed as build order dependencies here. @@ -157,6 +158,7 @@ SUBDIR_DEPEND_liblzma= libthr SUBDIR_DEPEND_libpcap= ofed .endif SUBDIR_DEPEND_nss_tacplus= libtacplus +SUBDIR_DEPEND_virtual_oss= libsamplerate # NB: keep these sorted by MK_* knobs diff --git a/lib/virtual_oss/Makefile b/lib/virtual_oss/Makefile new file mode 100644 index 000000000000..dc83edd4b980 --- /dev/null +++ b/lib/virtual_oss/Makefile @@ -0,0 +1,9 @@ +.include + +SHLIBDIR?= ${LIBDIR}/virtual_oss + +SUBDIR+= null \ + oss + +.include "Makefile.inc" +.include diff --git a/lib/virtual_oss/Makefile.inc b/lib/virtual_oss/Makefile.inc new file mode 100644 index 000000000000..45c8e0b1fdfc --- /dev/null +++ b/lib/virtual_oss/Makefile.inc @@ -0,0 +1,3 @@ +.include "../Makefile.inc" + +LDFLAGS+= -L${.OBJDIR:H:H}/libsamplerate diff --git a/lib/virtual_oss/bt/Makefile b/lib/virtual_oss/bt/Makefile new file mode 100644 index 000000000000..15413b7a1f1e --- /dev/null +++ b/lib/virtual_oss/bt/Makefile @@ -0,0 +1,19 @@ +SHLIB_NAME= voss_bt.so +SHLIBDIR= ${LIBDIR}/virtual_oss + +SRCS= bt.c \ + avdtp.c \ + sbc_encode.c + +CFLAGS+= -I${SRCTOP}/usr.sbin/virtual_oss/virtual_oss \ + -I${SRCTOP}/contrib/libsamplerate +LDFLAGS+= -lbluetooth -lsdp +LIBADD= samplerate + +.if defined(HAVE_LIBAV) +CFLAGS+= -I${LOCALBASE:U/usr/local}/include -DHAVE_LIBAV +LDFLAGS+= -L${LOCALBASE:U/usr/local}/lib \ + -lavdevice -lavutil -lavcodec -lavformat +.endif + +.include diff --git a/lib/virtual_oss/bt/avdtp.c b/lib/virtual_oss/bt/avdtp.c new file mode 100644 index 000000000000..82ed0fb942b6 --- /dev/null +++ b/lib/virtual_oss/bt/avdtp.c @@ -0,0 +1,720 @@ +/* $NetBSD$ */ + +/*- + * Copyright (c) 2015-2016 Nathanial Sloss + * Copyright (c) 2016-2019 Hans Petter Selasky + * Copyright (c) 2019 Google LLC, written by Richard Kralovic + * + * This software is dedicated to the memory of - + * Baron James Anlezark (Barry) - 1 Jan 1949 - 13 May 2012. + * + * Barry was a man who loved his music. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 "avdtp_signal.h" +#include "bt.h" + +#define DPRINTF(...) printf("backend_bt: " __VA_ARGS__) + +struct avdtpGetPacketInfo { + uint8_t buffer_data[512]; + uint16_t buffer_len; + uint8_t trans; + uint8_t signalID; +}; + +static int avdtpAutoConfig(struct bt_config *); + +/* Return received message type if success, < 0 if failure. */ +static int +avdtpGetPacket(int fd, struct avdtpGetPacketInfo *info) +{ + uint8_t *pos = info->buffer_data; + uint8_t *end = info->buffer_data + sizeof(info->buffer_data); + uint8_t message_type; + int len; + + memset(info, 0, sizeof(*info)); + + /* Handle fragmented packets */ + for (int remaining = 1; remaining > 0; --remaining) { + len = read(fd, pos, end - pos); + + if (len < AVDTP_LEN_SUCCESS) + return (-1); + if (len == (int)(end - pos)) + return (-1); /* buffer too small */ + + uint8_t trans = (pos[0] & TRANSACTIONLABEL) >> TRANSACTIONLABEL_S; + uint8_t packet_type = (pos[0] & PACKETTYPE) >> PACKETTYPE_S; + uint8_t current_message_type = (info->buffer_data[0] & MESSAGETYPE); + uint8_t shift; + if (pos == info->buffer_data) { + info->trans = trans; + message_type = current_message_type; + if (packet_type == singlePacket) { + info->signalID = (pos[1] & SIGNALID_MASK); + shift = 2; + } else { + if (packet_type != startPacket) + return (-1); + remaining = pos[1]; + info->signalID = (pos[2] & SIGNALID_MASK); + shift = 3; + } + } else { + if (info->trans != trans || + message_type != current_message_type || + (remaining == 1 && packet_type != endPacket) || + (remaining > 1 && packet_type != continuePacket)) { + return (-1); + } + shift = 1; + } + memmove(pos, pos + shift, len); + pos += len; + } + info->buffer_len = pos - info->buffer_data; + return (message_type); +} + +/* Returns 0 on success, < 0 on failure. */ +static int +avdtpSendPacket(int fd, uint8_t command, uint8_t trans, uint8_t type, + uint8_t * data0, int datasize0, uint8_t * data1, + int datasize1) +{ + struct iovec iov[3]; + uint8_t header[2]; + int retval; + + /* fill out command header */ + header[0] = (trans << 4) | (type & 3); + if (command != 0) + header[1] = command & 0x3f; + else + header[1] = 3; + + iov[0].iov_base = header; + iov[0].iov_len = 2; + iov[1].iov_base = data0; + iov[1].iov_len = datasize0; + iov[2].iov_base = data1; + iov[2].iov_len = datasize1; + + retval = writev(fd, iov, 3); + if (retval != (2 + datasize0 + datasize1)) + return (-EINVAL); + else + return (0); +} + +/* Returns 0 on success, < 0 on failure. */ +static int +avdtpSendSyncCommand(int fd, struct avdtpGetPacketInfo *info, + uint8_t command, uint8_t type, uint8_t * data0, + int datasize0, uint8_t * data1, int datasize1) +{ + static uint8_t transLabel; + uint8_t trans; + int retval; + + alarm(8); /* set timeout */ + + trans = (transLabel++) & 0xF; + + retval = avdtpSendPacket(fd, command, trans, type, + data0, datasize0, data1, datasize1); + if (retval) + goto done; +retry: + switch (avdtpGetPacket(fd, info)) { + case RESPONSEACCEPT: + if (info->trans != trans) + goto retry; + retval = 0; + break; + case RESPONSEREJECT: + if (info->trans != trans) + goto retry; + retval = -EINVAL; + break; + case COMMAND: + retval = avdtpSendReject(fd, info->trans, info->signalID); + if (retval == 0) + goto retry; + break; + default: + retval = -ENXIO; + break; + } +done: + alarm(0); /* clear timeout */ + + return (retval); +} + +/* + * Variant for acceptor role: We support any frequency, blocks, bands, and + * allocation. Returns 0 on success, < 0 on failure. + */ +static int +avdtpSendCapabilitiesResponseSBCForACP(int fd, int trans) +{ + uint8_t data[10]; + + data[0] = mediaTransport; + data[1] = 0; + data[2] = mediaCodec; + data[3] = 0x6; + data[4] = mediaTypeAudio; + data[5] = SBC_CODEC_ID; + data[6] = + (1 << (3 - MODE_STEREO)) | + (1 << (3 - MODE_JOINT)) | + (1 << (3 - MODE_DUAL)) | + (1 << (3 - MODE_MONO)) | + (1 << (7 - FREQ_44_1K)) | + (1 << (7 - FREQ_48K)) | + (1 << (7 - FREQ_32K)) | + (1 << (7 - FREQ_16K)); + data[7] = + (1 << (7 - BLOCKS_4)) | + (1 << (7 - BLOCKS_8)) | + (1 << (7 - BLOCKS_12)) | + (1 << (7 - BLOCKS_16)) | + (1 << (3 - BANDS_4)) | + (1 << (3 - BANDS_8)) | (1 << ALLOC_LOUDNESS) | (1 << ALLOC_SNR); + data[8] = MIN_BITPOOL; + data[9] = DEFAULT_MAXBPOOL; + + return (avdtpSendPacket(fd, AVDTP_GET_CAPABILITIES, trans, + RESPONSEACCEPT, data, sizeof(data), NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpSendAccept(int fd, uint8_t trans, uint8_t myCommand) +{ + return (avdtpSendPacket(fd, myCommand, trans, RESPONSEACCEPT, + NULL, 0, NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpSendReject(int fd, uint8_t trans, uint8_t myCommand) +{ + uint8_t value = 0; + + return (avdtpSendPacket(fd, myCommand, trans, RESPONSEREJECT, + &value, 1, NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpSendDiscResponseAudio(int fd, uint8_t trans, + uint8_t mySep, uint8_t is_sink) +{ + uint8_t data[2]; + + data[0] = mySep << 2; + data[1] = mediaTypeAudio << 4 | (is_sink ? (1 << 3) : 0); + + return (avdtpSendPacket(fd, AVDTP_DISCOVER, trans, RESPONSEACCEPT, + data, 2, NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpDiscoverAndConfig(struct bt_config *cfg, bool isSink) +{ + struct avdtpGetPacketInfo info; + uint16_t offset; + uint8_t chmode = cfg->chmode; + uint8_t aacMode1 = cfg->aacMode1; + uint8_t aacMode2 = cfg->aacMode2; + int retval; + + retval = avdtpSendSyncCommand(cfg->hc, &info, AVDTP_DISCOVER, 0, + NULL, 0, NULL, 0); + if (retval) + return (retval); + + retval = -EBUSY; + for (offset = 0; offset + 2 <= info.buffer_len; offset += 2) { + cfg->sep = info.buffer_data[offset] >> 2; + cfg->media_Type = info.buffer_data[offset + 1] >> 4; + cfg->chmode = chmode; + cfg->aacMode1 = aacMode1; + cfg->aacMode2 = aacMode2; + if (info.buffer_data[offset] & DISCOVER_SEP_IN_USE) + continue; + if (info.buffer_data[offset + 1] & DISCOVER_IS_SINK) { + if (!isSink) + continue; + } else { + if (isSink) + continue; + } + /* try to configure SBC */ + retval = avdtpAutoConfig(cfg); + if (retval == 0) + return (0); + } + return (retval); +} + +/* Returns 0 on success, < 0 on failure. */ +static int +avdtpGetCapabilities(int fd, uint8_t sep, struct avdtpGetPacketInfo *info) +{ + uint8_t address = (sep << 2); + + return (avdtpSendSyncCommand(fd, info, + AVDTP_GET_CAPABILITIES, 0, &address, 1, + NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpSetConfiguration(int fd, uint8_t sep, uint8_t * data, int datasize) +{ + struct avdtpGetPacketInfo info; + uint8_t configAddresses[2]; + + configAddresses[0] = sep << 2; + configAddresses[1] = INTSEP << 2; + + return (avdtpSendSyncCommand(fd, &info, AVDTP_SET_CONFIGURATION, 0, + configAddresses, 2, data, datasize)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpOpen(int fd, uint8_t sep) +{ + struct avdtpGetPacketInfo info; + uint8_t address = sep << 2; + + return (avdtpSendSyncCommand(fd, &info, AVDTP_OPEN, 0, + &address, 1, NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpStart(int fd, uint8_t sep) +{ + struct avdtpGetPacketInfo info; + uint8_t address = sep << 2; + + return (avdtpSendSyncCommand(fd, &info, AVDTP_START, 0, + &address, 1, NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpClose(int fd, uint8_t sep) +{ + struct avdtpGetPacketInfo info; + uint8_t address = sep << 2; + + return (avdtpSendSyncCommand(fd, &info, AVDTP_CLOSE, 0, + &address, 1, NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpSuspend(int fd, uint8_t sep) +{ + struct avdtpGetPacketInfo info; + uint8_t address = sep << 2; + + return (avdtpSendSyncCommand(fd, &info, AVDTP_SUSPEND, 0, + &address, 1, NULL, 0)); +} + +/* Returns 0 on success, < 0 on failure. */ +int +avdtpAbort(int fd, uint8_t sep) +{ + struct avdtpGetPacketInfo info; + uint8_t address = sep << 2; + + return (avdtpSendSyncCommand(fd, &info, AVDTP_ABORT, 0, + &address, 1, NULL, 0)); +} + +static int +avdtpAutoConfig(struct bt_config *cfg) +{ + struct avdtpGetPacketInfo info; + uint8_t freqmode; + uint8_t blk_len_sb_alloc; + uint8_t availFreqMode = 0; + uint8_t availConfig = 0; + uint8_t supBitpoolMin = 0; + uint8_t supBitpoolMax = 0; + uint8_t aacMode1 = 0; + uint8_t aacMode2 = 0; +#ifdef HAVE_LIBAV + uint8_t aacBitrate3 = 0; + uint8_t aacBitrate4 = 0; + uint8_t aacBitrate5 = 0; +#endif + int retval; + int i; + + retval = avdtpGetCapabilities(cfg->hc, cfg->sep, &info); + if (retval) { + DPRINTF("Cannot get capabilities\n"); + return (retval); + } +retry: + for (i = 0; (i + 1) < info.buffer_len;) { +#if 0 + DPRINTF("0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", + info.buffer_data[i + 0], + info.buffer_data[i + 1], + info.buffer_data[i + 2], + info.buffer_data[i + 3], + info.buffer_data[i + 4], info.buffer_data[i + 5]); +#endif + if (i + 2 + info.buffer_data[i + 1] > info.buffer_len) + break; + switch (info.buffer_data[i]) { + case mediaTransport: + break; + case mediaCodec: + if (info.buffer_data[i + 1] < 2) + break; + /* check codec */ + switch (info.buffer_data[i + 3]) { + case 0: /* SBC */ + if (info.buffer_data[i + 1] < 6) + break; + availFreqMode = info.buffer_data[i + 4]; + availConfig = info.buffer_data[i + 5]; + supBitpoolMin = info.buffer_data[i + 6]; + supBitpoolMax = info.buffer_data[i + 7]; + break; + case 2: /* MPEG2/4 AAC */ + if (info.buffer_data[i + 1] < 8) + break; + aacMode1 = info.buffer_data[i + 5]; + aacMode2 = info.buffer_data[i + 6]; +#ifdef HAVE_LIBAV + aacBitrate3 = info.buffer_data[i + 7]; + aacBitrate4 = info.buffer_data[i + 8]; + aacBitrate5 = info.buffer_data[i + 9]; +#endif + break; + default: + break; + } + } + /* jump to next information element */ + i += 2 + info.buffer_data[i + 1]; + } + aacMode1 &= cfg->aacMode1; + aacMode2 &= cfg->aacMode2; + + /* Try AAC first */ + if (aacMode1 == cfg->aacMode1 && aacMode2 == cfg->aacMode2) { +#ifdef HAVE_LIBAV + uint8_t config[12] = { mediaTransport, 0x0, mediaCodec, + 0x8, 0x0, 0x02, 0x80, aacMode1, aacMode2, aacBitrate3, + aacBitrate4, aacBitrate5 + }; + + if (avdtpSetConfiguration + (cfg->hc, cfg->sep, config, sizeof(config)) == 0) { + cfg->codec = CODEC_AAC; + return (0); + } +#endif + } + /* Try SBC second */ + if (cfg->freq == FREQ_UNDEFINED) + goto auto_config_failed; + + freqmode = (1 << (3 - cfg->freq + 4)) | (1 << (3 - cfg->chmode)); + + if ((availFreqMode & freqmode) != freqmode) { + DPRINTF("No frequency and mode match\n"); + goto auto_config_failed; + } + for (i = 0; i != 4; i++) { + blk_len_sb_alloc = (1 << (i + 4)) | + (1 << (1 - cfg->bands + 2)) | (1 << cfg->allocm); + + if ((availConfig & blk_len_sb_alloc) == blk_len_sb_alloc) + break; + } + if (i == 4) { + DPRINTF("No bands available\n"); + goto auto_config_failed; + } + cfg->blocks = (3 - i); + + if (cfg->allocm == ALLOC_SNR) + supBitpoolMax &= ~1; + + if (cfg->chmode == MODE_DUAL || cfg->chmode == MODE_MONO) + supBitpoolMax /= 2; + + if (cfg->bands == BANDS_4) + supBitpoolMax /= 2; + + if (supBitpoolMax > cfg->bitpool) + supBitpoolMax = cfg->bitpool; + else + cfg->bitpool = supBitpoolMax; + + do { + uint8_t config[10] = { mediaTransport, 0x0, mediaCodec, 0x6, + 0x0, 0x0, freqmode, blk_len_sb_alloc, supBitpoolMin, + supBitpoolMax + }; + + if (avdtpSetConfiguration + (cfg->hc, cfg->sep, config, sizeof(config)) == 0) { + cfg->codec = CODEC_SBC; + return (0); + } + } while (0); + +auto_config_failed: + if (cfg->chmode == MODE_STEREO) { + cfg->chmode = MODE_MONO; + cfg->aacMode2 ^= 0x0C; + goto retry; + } + return (-EINVAL); +} + +void +avdtpACPFree(struct bt_config *cfg) +{ + if (cfg->handle.sbc_enc) { + free(cfg->handle.sbc_enc); + cfg->handle.sbc_enc = NULL; + } +} + +/* Returns 0 on success, < 0 on failure. */ +static int +avdtpParseSBCConfig(uint8_t * data, struct bt_config *cfg) +{ + if (data[0] & (1 << (7 - FREQ_48K))) { + cfg->freq = FREQ_48K; + } else if (data[0] & (1 << (7 - FREQ_44_1K))) { + cfg->freq = FREQ_44_1K; + } else if (data[0] & (1 << (7 - FREQ_32K))) { + cfg->freq = FREQ_32K; + } else if (data[0] & (1 << (7 - FREQ_16K))) { + cfg->freq = FREQ_16K; + } else { + return -EINVAL; + } + + if (data[0] & (1 << (3 - MODE_STEREO))) { + cfg->chmode = MODE_STEREO; + } else if (data[0] & (1 << (3 - MODE_JOINT))) { + cfg->chmode = MODE_JOINT; + } else if (data[0] & (1 << (3 - MODE_DUAL))) { + cfg->chmode = MODE_DUAL; + } else if (data[0] & (1 << (3 - MODE_MONO))) { + cfg->chmode = MODE_MONO; + } else { + return -EINVAL; + } + + if (data[1] & (1 << (7 - BLOCKS_16))) { + cfg->blocks = BLOCKS_16; + } else if (data[1] & (1 << (7 - BLOCKS_12))) { + cfg->blocks = BLOCKS_12; + } else if (data[1] & (1 << (7 - BLOCKS_8))) { + cfg->blocks = BLOCKS_8; + } else if (data[1] & (1 << (7 - BLOCKS_4))) { + cfg->blocks = BLOCKS_4; + } else { + return -EINVAL; + } + + if (data[1] & (1 << (3 - BANDS_8))) { + cfg->bands = BANDS_8; + } else if (data[1] & (1 << (3 - BANDS_4))) { + cfg->bands = BANDS_4; + } else { + return -EINVAL; + } + + if (data[1] & (1 << ALLOC_LOUDNESS)) { + cfg->allocm = ALLOC_LOUDNESS; + } else if (data[1] & (1 << ALLOC_SNR)) { + cfg->allocm = ALLOC_SNR; + } else { + return -EINVAL; + } + cfg->bitpool = data[3]; + return 0; +} + +int +avdtpACPHandlePacket(struct bt_config *cfg) +{ + struct avdtpGetPacketInfo info; + int retval; + + if (avdtpGetPacket(cfg->hc, &info) != COMMAND) + return (-ENXIO); + + switch (info.signalID) { + case AVDTP_DISCOVER: + retval = + avdtpSendDiscResponseAudio(cfg->hc, info.trans, ACPSEP, 1); + if (!retval) + retval = AVDTP_DISCOVER; + break; + case AVDTP_GET_CAPABILITIES: + retval = + avdtpSendCapabilitiesResponseSBCForACP(cfg->hc, info.trans); + if (!retval) + retval = AVDTP_GET_CAPABILITIES; + break; + case AVDTP_SET_CONFIGURATION: + if (cfg->acceptor_state != acpInitial) + goto err; + cfg->sep = info.buffer_data[1] >> 2; + int is_configured = 0; + for (int i = 2; (i + 1) < info.buffer_len;) { + if (i + 2 + info.buffer_data[i + 1] > info.buffer_len) + break; + switch (info.buffer_data[i]) { + case mediaTransport: + break; + case mediaCodec: + if (info.buffer_data[i + 1] < 2) + break; + /* check codec */ + switch (info.buffer_data[i + 3]) { + case 0: /* SBC */ + if (info.buffer_data[i + 1] < 6) + break; + retval = + avdtpParseSBCConfig(info.buffer_data + i + 4, cfg); + if (retval) + return retval; + is_configured = 1; + break; + case 2: /* MPEG2/4 AAC */ + /* TODO: Add support */ + default: + break; + } + } + /* jump to next information element */ + i += 2 + info.buffer_data[i + 1]; + } + if (!is_configured) + goto err; + + retval = + avdtpSendAccept(cfg->hc, info.trans, AVDTP_SET_CONFIGURATION); + if (retval) + return (retval); + + /* TODO: Handle other codecs */ + if (cfg->handle.sbc_enc == NULL) { + cfg->handle.sbc_enc = malloc(sizeof(*cfg->handle.sbc_enc)); + if (cfg->handle.sbc_enc == NULL) + return (-ENOMEM); + } + memset(cfg->handle.sbc_enc, 0, sizeof(*cfg->handle.sbc_enc)); + + retval = AVDTP_SET_CONFIGURATION; + cfg->acceptor_state = acpConfigurationSet; + break; + case AVDTP_OPEN: + if (cfg->acceptor_state != acpConfigurationSet) + goto err; + retval = avdtpSendAccept(cfg->hc, info.trans, info.signalID); + if (retval) + return (retval); + retval = info.signalID; + cfg->acceptor_state = acpStreamOpened; + break; + case AVDTP_START: + if (cfg->acceptor_state != acpStreamOpened && + cfg->acceptor_state != acpStreamSuspended) { + goto err; + } + retval = avdtpSendAccept(cfg->hc, info.trans, info.signalID); + if (retval) + return retval; + retval = info.signalID; + cfg->acceptor_state = acpStreamStarted; + break; + case AVDTP_CLOSE: + if (cfg->acceptor_state != acpStreamOpened && + cfg->acceptor_state != acpStreamStarted && + cfg->acceptor_state != acpStreamSuspended) { + goto err; + } + retval = avdtpSendAccept(cfg->hc, info.trans, info.signalID); + if (retval) + return (retval); + retval = info.signalID; + cfg->acceptor_state = acpStreamClosed; + break; + case AVDTP_SUSPEND: + if (cfg->acceptor_state != acpStreamOpened && + cfg->acceptor_state != acpStreamStarted) { + goto err; + } + retval = avdtpSendAccept(cfg->hc, info.trans, info.signalID); + if (retval) + return (retval); + retval = info.signalID; + cfg->acceptor_state = acpStreamSuspended; + break; + case AVDTP_GET_CONFIGURATION: + case AVDTP_RECONFIGURE: + case AVDTP_ABORT: + /* TODO: Implement this. */ + default: +err: + avdtpSendReject(cfg->hc, info.trans, info.signalID); + return (-ENXIO); + } + return (retval); +} diff --git a/lib/virtual_oss/bt/avdtp_signal.h b/lib/virtual_oss/bt/avdtp_signal.h new file mode 100644 index 000000000000..a46cc6dd9dcf --- /dev/null +++ b/lib/virtual_oss/bt/avdtp_signal.h @@ -0,0 +1,139 @@ +/* $NetBSD$ */ + +/*- + * Copyright (c) 2015 Nathanial Sloss + * + * This software is dedicated to the memory of - + * Baron James Anlezark (Barry) - 1 Jan 1949 - 13 May 2012. + * + * Barry was a man who loved his music. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 _AVDTP_SIGNAL_H_ +#define _AVDTP_SIGNAL_H_ + +#include +#include + +/* Our endpoint. */ +#define INTSEP 8 +#define ACPSEP 8 + +/* AVDTP signals. */ + +#define AVDTP_DISCOVER 0x01 +#define AVDTP_GET_CAPABILITIES 0x02 +#define AVDTP_SET_CONFIGURATION 0x03 +#define AVDTP_GET_CONFIGURATION 0x04 +#define AVDTP_RECONFIGURE 0x05 +#define AVDTP_OPEN 0x06 +#define AVDTP_START 0x07 +#define AVDTP_CLOSE 0x08 +#define AVDTP_SUSPEND 0x09 +#define AVDTP_ABORT 0x0a +#define AVDTP_SECUURITY_CONTROL 0x0b + +/* Signal Command & Response Header Masks. */ + +#define TRANSACTIONLABEL 0xf0 +#define TRANSACTIONLABEL_S 4 +#define SIGNALID_MASK 0x3f +#define PACKETTYPE 0x0c +#define PACKETTYPE_S 0x02 +#define MESSAGETYPE 0x03 +#define SIGNALIDENTIFIER 0x3f +#define DISCOVER_SEP_IN_USE 0x02 +#define DISCOVER_IS_SINK 0x08 + +/* Packet Types */ +#define singlePacket 0x0 +#define startPacket 0x1 +#define continuePacket 0x2 +#define endPacket 0x3 + *** 11983 LINES SKIPPED *** From nobody Sun Sep 28 09:58:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZKXZ5X4Rz68Qbj; Sun, 28 Sep 2025 09:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZKXZ4c6Wz3NMy; Sun, 28 Sep 2025 09:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759053534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Picg5N3mFglNY07nPlDG8vLXKo3PtWbYrWvMNj7IqsE=; b=YTHU5JfhB4en8qfxM+eY6KdkfkNW9nWZ/+AbHzpx+7YGCiHRZ2eE3ZQ5uMuKQa3f4ZcTgm y0Yu5KCwh80eqfToW3IjeLKU4ixm+RPf5q5OOhQly9t9muWlsyftCynVLhMoYG3ISLoZ/h D94a2TrMXMVArwGyLhkMNQr8YPnjO53yxaNNcFH2tcfpKR8e4J1i/9cdToMgYQF84/9ZGn yuaOoykngPg92mHqoBiNhLcr9X8hACZM1Ul9hx+V0p2IrpSx4djfPaFGlGAR4edA6+bT83 sD6eyaLyDwh/NIEZH/R7HBau7eFNYDFkhDlxzfeIAxKEXtz9wpimPnnIX25xRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759053534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Picg5N3mFglNY07nPlDG8vLXKo3PtWbYrWvMNj7IqsE=; b=mt2VB9Fdn7ULNgdKzJthuGq4Zl8jyI1caCvRVeVounv9qJzKW7mSxrS+sd1LSgzSOC6dAv +9V4iJiUjBnSxU1GBF/yxs6O2Oa6bx+vXP/iBlGXt54xeM9QnCgelipXnwz6y3iiwU0hBA LOq4CXm4qS7KFBHGS/sBeaYHjBfeJQfs5GiGwtO23qQBEn+GGDCPEhOi7WUG+tvJ8NuvYW 9tdPZKnY/ntSYPXLcduwjWMoAezQNLfUQs1LEzEJXRfyGklIys+okv/BJx1egusOUpfWBv pzxQKA9eFiaV6IDf+U2HH2RfFwJa0VFr1Hdx62GJtcSW9r87t1NbGhpuWxoJWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759053534; a=rsa-sha256; cv=none; b=g98QmByTHBTdzmJ5YskaWhFBAz2LWOJIKM8IXZjNrqrGmu9vQ/9ow+QfQ1kbONCfBRBgAc orUrW1AhAlIs7WDaK6oYZIrMhPjhG/05foZ5lIznexyXnK60ncE4bG8qD31BBUMGzOHNp6 Gcgimy9TsGE2akyuDUu24IUSwefkcRuMnB6ALlrjQ1RN6Bgzga9CUVu4epdVUXbhqQYOIi s0msdsu85ID5tnkefcp1qG6uwFcnheglqqCDIMVP+xiOgLQ57tvgF9bV6V33s+dW8PpGTB 2saBrYmcLgQS+HgUAQmJOu8LJOeYBHTstM05xZ9WXXKeaPRB8v2sMfbVtjkEmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZKXZ4C8LzRp; Sun, 28 Sep 2025 09:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9wsuO083379; Sun, 28 Sep 2025 09:58:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9wsQ2083376; Sun, 28 Sep 2025 09:58:54 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:58:54 GMT Message-Id: <202509280958.58S9wsQ2083376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: c457acb4ee82 - main - RELNOTES: virtual_oss in base List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c457acb4ee821cf015930a94f52c3870786468a7 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c457acb4ee821cf015930a94f52c3870786468a7 commit c457acb4ee821cf015930a94f52c3870786468a7 Author: Christos Margiolis AuthorDate: 2025-09-28 09:57:03 +0000 Commit: Christos Margiolis CommitDate: 2025-09-28 09:58:34 +0000 RELNOTES: virtual_oss in base Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D52583 --- RELNOTES | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/RELNOTES b/RELNOTES index a04f0bc26f62..9960fdcaf00f 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,23 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +9cab9fde5eda: + virtual_oss is imported to base. The audio/virtual_oss port will stop + being built from FreeBSD 15.0 onwards. + + Regarding user-facing changes, the only practical difference is the + installation process. Everything is provided by the base system, except + for the following optional components, which can be installed from + ports: + + * sndio backend support: audio/virtual_oss_sndio + * bluetooth backend support: audio/virtual_oss_bluetooth + * virtual_equalizer(8): audio/virtual_oss_equalizer + + Apart from that, virtual_oss should work as expected. Users of + virtual_oss can uninstall audio/virtual_oss and instead use the base + system version from now on. + 929f5966a9fd, b9b0e105c357, 5105e1ebecc7, cb3eac927b5d, ce9c325a2e92, 18a870751b03, 89c82750da1a, 0c13e9c3c464, 10eecc467f32, 619feb9dd00e, 7d2cfb27d62f, e26259f48afe, a245dc5d68c7, 9a726ef24134, 383e7290c0b5, c791ea80b5f7, 543b875a8ee4, 40a5abfc3f66, 73ed0c7992fd, 04764f21855a, 624b7beed5ac, 7b68893ffa9b, 6c4771c73470, dd0ec030f8fd, fb1ccc04adfe, b98d0566b2bd, ca9ccf0ce9ad, 6b28571cb6ba, 98d46e05ab08, 2a454b05f2c1, 110111a6cca1, 5f8493bbf479, e447c252d0ec, 4680e7fcc70a, 188138106b9f, 4cb1baa7d85c, 805498e49ae4, f58febc4cefa, ae07a5805b19, 0559f30a882d, cbb6e747af98, 0d1496f0f1e7, 60f970b85e44, 0b9a631e0724, ee3960cba106: Replaced Heimdal 1.5.2 with MIT KRB5 (1.21.3, 1.22.0, 1.22.1). Heimdal 1.5.2 can still be built using the WITHOUT_MITKRB5 flag. From nobody Sun Sep 28 09:58:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZKXc3K6Vz68QL6; Sun, 28 Sep 2025 09:58: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZKXb75Ggz3Nk7; Sun, 28 Sep 2025 09:58:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759053536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ml5JTcA3JdF1ijhac4t+nz6xJtkzTj3/QQXFx+SFGIw=; b=BXH6dXSTDFqSrUJ1O7mlOYPIk7J1TdJyDq+7AYVfBZmr6QiudHOG1KYGOh4HVJo5MfH1xy ZjbYIBqo2vlO7vePjhRANQPsiIonmoDLMelSi6E0d+addqR2nwBXs4MnCkCgIl0a0+SwAR +UGuM+52F2QjB4pVVg7scW9+x+oitAgxPUOgsff/2esoTmewbJg0GVzDgl5UEd1mbvkXEn 1QNjP8+u3a9t+xpx3ks/5vZyO2LdVX7aaJZO7vH1olBEVRryeBtkrQ6rEBPOqxa3D04tUG 4sfTFC9ca6ea7WonSU4Pb3c0ySjPdoElObRT7xAPHRO1Lj6fCXjju2e/zN52Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759053536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ml5JTcA3JdF1ijhac4t+nz6xJtkzTj3/QQXFx+SFGIw=; b=NUBKT9U/xo8yrON7UCOed2ryMVFs5L4oDnCzZCyH8RA9JPtvfUfRxwXhy1S3nNz/EkD/K/ 7Gv3c+yHglfFhxIbAoRTW3StfEb7Tm+ym/X2tLhlP2BKkyjfclJhVMalHqTrVUNSkzrA20 97cZ4TbmoNWkYl3Bf/fSWa76t7KKrA34GwP+oGzhG5Mq8ls9qtHqybp11OJkevF/YwV78J 7t0+mVSfLH3YJudmeDAuECeSKBhxpDBiKjm/9/6LMTyYmtJW9Qyh/dzMgVztwlhUjKHoZX sH9fApOAaC/xQSNDPv7AMPYPU3oc3ssYoWPosDXA4ry4Hyq8wxMEdrodD589Yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759053536; a=rsa-sha256; cv=none; b=iy0/unrD7dALZ2IId4EarQyfRIV4I/6nuk3Q1IyWe4AEivUWiOlVyY2ZpaIHIjDfwvAMYU q+cC3l6bWsfgYrdSAFCjwV5EIUIDgx1bT+mS6MHDorNQePf2ijD38b2Qg86LOudQUkZOB4 L21KH6QPSyXlb1SiAD8x9PklBPXyfZkvor9RJjcpOUqZ031XYt9IPEBojQQ3VfSQKCGXt2 fKagOCBhZzcRwXszCH3D2R2G7zabsnlcQ3uKN6HSIlacMbb57pnKi0TWWR8NvKy2uwQUjo W6rlK91iZtmAtgJIZcinZaUWRTI1AJxQoaWBnwJeCAv/+RqeNnWE/IlyB3VQIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZKXb57j4zRq; Sun, 28 Sep 2025 09:58:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58S9wt2i083414; Sun, 28 Sep 2025 09:58:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58S9wt0X083411; Sun, 28 Sep 2025 09:58:55 GMT (envelope-from git) Date: Sun, 28 Sep 2025 09:58:55 GMT Message-Id: <202509280958.58S9wt0X083411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 5c8835e5c0ce - main - mixer(8): Update virtual_oss path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c8835e5c0ce34ee50eba92bb5f4de36139ae7ea Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5c8835e5c0ce34ee50eba92bb5f4de36139ae7ea commit 5c8835e5c0ce34ee50eba92bb5f4de36139ae7ea Author: Christos Margiolis AuthorDate: 2025-09-28 09:57:23 +0000 Commit: Christos Margiolis CommitDate: 2025-09-28 09:58:35 +0000 mixer(8): Update virtual_oss path virtual_oss is part of base as of 9cab9fde5eda ("virtual_oss: Port to base"). Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52322 --- usr.sbin/mixer/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 70a35f71b25f..15e0eae69952 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -393,7 +393,7 @@ set_dunit(struct mixer *m, int dunit, char *vctl) warn("fork"); break; case 0: - rc = execl("/usr/local/sbin/virtual_oss_cmd", + rc = execl("/usr/sbin/virtual_oss_cmd", "virtual_oss_cmd", dev, opt, buf, NULL); if (rc < 0) warn("virtual_oss_cmd"); From nobody Sun Sep 28 11:12:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZM9z5rGNz68W5d; Sun, 28 Sep 2025 11:12: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZM9z5Bxzz3VC1; Sun, 28 Sep 2025 11:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759057975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFkHAsfUd8rJXydX3VahkyffK9I5jO4BMJ7817h+3+o=; b=j9W25SJPnekRyi7gv33XZL0MkOnsDneYudWFes/WnsecbcECw3cFUpYEWKNBUagdtyKCn+ H4JIoS9lFAgxa8e2eczx08Q0bydkqHoVeaY25mIO1+1s4CSuAUiMNJER3ycJ/7ChNXFqQv lC8XfDAayBkevTUDoLTMrKiWx0uHSrpIveyiebvufvyPnxK+6p3+D12GFzHFREEZwmWV0d eTKjoiU2NUpu1vjS8Betj90+MXgAqzOhU7/bXwJRxwnC0z5jSvW6JldSEHaP3ek+yXoQlH lAaiZy1UXmrZoVbiiNRRyUr6Ko6coe+yBGoHhAvMgKiNA0fBRDeNB8dnb6Ecbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759057975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BFkHAsfUd8rJXydX3VahkyffK9I5jO4BMJ7817h+3+o=; b=fpV0UHlukDeWzKYftIuVuumATKfWLl7edFHO7/Yi7yiMp8Jw9NC2tI2f+vcGPVCZrgHYeS B3QiW/54KJg90/2YMbj3uIveKcGSMVLQ6mPO2tX+KrhrxaW6fE9v6k2IleHB4FNWmPuZQp d4VMcsKRpVkvE8hWtMbGxzCfSiJYMxwVQj9GwybnayXQf5zgtxPHEdMKS1siQqVhwhAifM /xT7DPgparZQ+M/c1vjbvJaYu+POsngHd6Bkv7RnqHO0cV23TfCVAgTgcvGuiCS3cWaLxE +1nwW0k7r/kQRk/XTl/YcO/Qh7EdskcOg095gPAXivlvV6tuqS2bwD4BW+Fgtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759057975; a=rsa-sha256; cv=none; b=CEswuMh7y+yqL7i7XozJ8GQd4J43ZH64Pf+irW3TiN7JQa1L/0kgZYK+BEExMQftCmbBKo DkSge14vTnLA2mGnMNXLahl5lzg6lP1/306VwnSmxF46MmQ/Pv6DOzcHIPPHrxy9u5AvlM LDzg0fmCUH8iJM5dWvhuZAAYV7GV4rAP+N7eKSkStEOqS2gCRtcSLlrHTlepmhTO4kdQDr p1yusHvicvgS+VGIV11WHVc60reoY3BRsJsTH9d47LJRVknIdyg/KWcpmRgsVVTEhfRnZc u1xa0P/VhqVcagXf1o7pwrXrMsKeF33MK1LmQxExptFTWVAFNp6sxPszvQfsFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZM9z4bWJz2hX; Sun, 28 Sep 2025 11:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SBCt6O031227; Sun, 28 Sep 2025 11:12:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SBCtaj031224; Sun, 28 Sep 2025 11:12:55 GMT (envelope-from git) Date: Sun, 28 Sep 2025 11:12:55 GMT Message-Id: <202509281112.58SBCtaj031224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 202b59c35ead - main - tzcode: Really fix issues when TZ is an absolute path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 202b59c35ead5bd2b71331169bdeb4845cb655c1 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=202b59c35ead5bd2b71331169bdeb4845cb655c1 commit 202b59c35ead5bd2b71331169bdeb4845cb655c1 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-28 11:11:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-28 11:12:44 +0000 tzcode: Really fix issues when TZ is an absolute path This was accidentally left out of the previous commit. Fixes: df8bc705eb04 ("tzcode: Fix issues when TZ is an absolute path") --- contrib/tzcode/localtime.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index c98134f7be7c..8638ac9ba2cd 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -672,13 +672,16 @@ tzloadbody(char const *name, struct state *sp, char tzloadflags, if ((tzloadflags & TZLOAD_FROMENV) && strcmp(name, TZDEFAULT) == 0) tzloadflags &= ~TZLOAD_FROMENV; relname = name; - if (strncmp(relname, TZDIR "/", strlen(TZDIR) + 1) == 0) + if (strncmp(relname, TZDIR "/", strlen(TZDIR) + 1) == 0) { relname += strlen(TZDIR) + 1; + while (*relname == '/') + relname++; + } dd = open(TZDIR, O_DIRECTORY | O_RDONLY); if ((tzloadflags & TZLOAD_FROMENV) && issetugid()) { if (dd < 0) return errno; - if (fstatat(dd, name, &sb, AT_RESOLVE_BENEATH) < 0) { + if (fstatat(dd, relname, &sb, AT_RESOLVE_BENEATH) < 0) { fid = -1; } else if (!S_ISREG(sb.st_mode)) { fid = -1; From nobody Sun Sep 28 11:17:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZMHH6fj4z68Wr2; Sun, 28 Sep 2025 11:17:31 +0000 (UTC) (envelope-from des@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZMHH60Kxz3Vv2; Sun, 28 Sep 2025 11:17:31 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759058251; 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=9zw0LiomytCRLV8oMiLxnIbEdF3fW4TTsgYvvB9Xd8A=; b=MDtdlyGoJa7bMrwUFLIeRLS/d8GsMZjPZKD3D3xTwnsPfQX7xCzH48nUpWgt5As5NRM3Pl 9TpVduSYkFibIUqyajLYAwnLmHjBCZA2MkMoiUWbsJiUf6t4knYyrtkZON8YhKhoeKtcjs KsuYFHZusa4enqZ34TaXUz3ekvh20UaGar8ADCoa5TJRXj6z4hJ/EG0QCYaaaJbipWZo09 S5XrP74fjgQlz7jLVk6lxWVLZu5/oTxUYuGgsQs3hfGB8MginRBa2aq1aDVcOO8yClU8Qn MbI9Ar/0Zchol4GW7lMKrvFM0+gXzBCJ/odkggz3ym0RVZcrMn+Lf7TKIxzSrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759058251; 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=9zw0LiomytCRLV8oMiLxnIbEdF3fW4TTsgYvvB9Xd8A=; b=F8k7woI7vJIYKpR6eVGqhFjDtcSYoCipkUrcs9DJa4u5Oy3XVaglwQl9dfbc+jb/xzZCEL juP6j4tlYZD9xaI5UeEX7m3Hnkql90M2qzGufjGB9Q2wbpHJ2tbOb+48advnzSUPSZahTq WTav/H1h83Op1uclKI1wvKJMISpAvTC2RVMeMeEsfhk/ACiqnnNGZuud7DpMNY6yukEfyL y+982GuRdrVNMwnXaR6fv9eQArs8TwXN1yYYq93tQ12edZV8lXRGGhsrpeLKWfR3RBUjPv rjCUPLE3Ls97iejT3YstKHGRaO0o89PZdpXKNoHDmCpsz7qK96jt0aBfiAtq3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759058251; a=rsa-sha256; cv=none; b=OC7V5QsZr3p8HIw8UQnDjwkB73ZDtoTQOf3s/8hXLJ2euHEsmMBkmJcnckDHMoPc0pNbF3 69vsOOVUET/q2PLgAjND0ouSwAIAwtAyzjCKuFg122VyCESwug4B//4/fgvAeNBAAShgQt dzZZuUnc8HhkuOHApoP/HNgy5shLYcEFxxtOGqfcT5wYq5ivroxHSJ62ei24fFZ99ZGhrp mQZchAYr94lhh0CIRTktwDAQVTqqHVh42nKHeYAOsXJDbkxor15zlwrXHdKHHw/Po1iBXy l3YP6WYdHRsO2O7Ho00CoM7TIGnMuOhlelAAilkS8St86zz1+yWhEz2gGFYx/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (88-177-82-251.subs.proxad.net [88.177.82.251]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cZMHH4YYLzmGk; Sun, 28 Sep 2025 11:17:31 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id A43E988375; Sun, 28 Sep 2025 13:17:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d58339f39874 - main - tzcode: Drop libc namespace In-Reply-To: (Konstantin Belousov's message of "Sat, 27 Sep 2025 23:25:12 +0300") References: <202509271707.58RH7ajb090983@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sun, 28 Sep 2025 13:17:29 +0200 Message-ID: <86frc6bzcm.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Konstantin Belousov writes: > It does change the behavior. Now a user-provided open/fstat/pthread_* > functions can interpose the system functions, making tz code doing someth= ing > that was not intended. > > In other words, namespacing guaranteed that tzcode was not affected by > the app playing with libc namespace. That is a side effect of namespace.h but not its original purpose, which was to allow libc to call pthread functions, which would be stubbed out when libc_r was not loaded. This is no longer needed, and namespace.h has bitrotted and is missing a bunch of syscalls and functions (including nearly every *at() system call, with the sole exception of openat()). If we really want to do what you suggest, there are better ways (like what macOS does). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sun Sep 28 14:02:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZQxf1Gggz68l1B; Sun, 28 Sep 2025 14:02: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZQxf0T2yz3krl; Sun, 28 Sep 2025 14:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759068150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jVQIR16fKVg7GzrvJRJwIUlceR3JGmxhGbwCTgyDpRg=; b=cNU0tFGEM3YG8nSnHj7MZGhKy2EAD0PK/cTxhIsQS//XF1ouzmSI92Q65dT3parTMOysFl eK9Q0ia289gQV2xJ/olE7PbbOi+AbEWKvDWCbNoqT9JGhQ+61PZTv+QeWmZgiKNK5HILdU i97tkrk4TErL0MkmyQQUpmTDwEfJ0IW+yNw7wyzXSaveUUrG/ca+tQt4bG2bm6NaW4Epzb IiXE5IH2lXD+jhxwKZ4XdfcXD4HZuyqd7psq+ze2LKPeh4INn5k1isib3Vbb1fqeqKK01H sIfARHRhVnFh5OCGdP0NboTN86IZ4FXPYydtwR+T53Ld6d/TFwP+kAYB+snYpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759068150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jVQIR16fKVg7GzrvJRJwIUlceR3JGmxhGbwCTgyDpRg=; b=Y+DdQylczxtXENSrSJIxQnrxQUlw4QTW8CBinM8ebCsJDQUNr6KjxJn6iq8vTSe2G5+8U1 OubUJy3IjkU7mMarQwtecWkNDr/jfZlI2OFm82MR8DiW3hs6bvuv8OvhhZ4hc//qfJN7Iu B6yymE33TArbkrvy1gsI4yQqsCoQpu8K+3uUrTuq2DjT40b5a6xy5/LIAOGJEYThLWemAa l6Qjm0UR67h/4HMsrzIUND8pwl2Nyr+Hozz3I2c+z6sdWMijGSYss/iQzmec8GO+VELSFA aHSfGqkgiuQCya1hgkjnKxaw9Y6HYb90dkTv5SzSttUly9CeWY9Gt90jqyThEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759068150; a=rsa-sha256; cv=none; b=nu7HA7SFAT4crlFHXm5LyXPnJ5faBa9v2XtO+PQ8kGurYQoHOewwQ3RmMmk8wQr24STOTi wpLIz9PUOfcgH5OmLHVmjwbvj6zF4didpehivxSjY3dx/HzIm9/AUyUG0w3xfZw72oGmMd j+tvJGkprLhWorvgDt8g06YialHSo+TIhs9XugLM0sajDsvnt7RwbXxzUStQ2ZW+btRM8u 2wXCiOl1sQt6M6H9iiv3T71nMUl7gNKLg6OVb8hyV+030xZjtq/jDZxkR1qJTX+T/XnW7j 1z9TVqFLTTjw6G/d526pVKWLPz/F20bUev/7ChqCkD83d9f1abATVv5kAV2Wcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZQxd6yWwz6Yj; Sun, 28 Sep 2025 14:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SE2TLM050587; Sun, 28 Sep 2025 14:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SE2TBJ050584; Sun, 28 Sep 2025 14:02:29 GMT (envelope-from git) Date: Sun, 28 Sep 2025 14:02:29 GMT Message-Id: <202509281402.58SE2TBJ050584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: c1d5fc4e0cfc - main - mac_do.4: Mention "from" part's GID can also match supplementary groups List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1d5fc4e0cfc63d23379457ac0b51c59c60b27c7 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c1d5fc4e0cfc63d23379457ac0b51c59c60b27c7 commit c1d5fc4e0cfc63d23379457ac0b51c59c60b27c7 Author: Olivier Certner AuthorDate: 2025-09-28 13:55:20 +0000 Commit: Olivier Certner CommitDate: 2025-09-28 14:01:55 +0000 mac_do.4: Mention "from" part's GID can also match supplementary groups MFC after: 3 days Event: EuroBSDCon 2025 Sponsored by: The FreeBSD Foundation --- share/man/man4/mac_do.4 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 index 4dcb54c89673..39bfafd95474 100644 --- a/share/man/man4/mac_do.4 +++ b/share/man/man4/mac_do.4 @@ -94,8 +94,10 @@ i.e., one of the literal strings or .Ql gid . .Li Aq id -must be the numerical ID of a user or group, and is matched with the current -process real ID of the corresponding type. +must be the numerical ID of a user or group and is matched against the current +process real ID of the corresponding type, and on type +.Ql gid +additionally against the supplementary groups. .Ss Rule's Ao to Ac Part The second part of a rule, .Li Aq to , @@ -377,8 +379,8 @@ Same as the first example, but lifting any constraints on groups, allowing the process to become part of any groups it sees fit. .El .Pp -Here are several examples of single rules matching processes having a real group -ID of 10001: +Here are several examples of single rules matching processes having 10001 as +their real group IDs or in their supplementary groups: .Bl -tag -width indent .It Li gid=10001>uid=0 Makes 10001 a more powerful From nobody Sun Sep 28 14:55:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZS6P0vJPz68pqs; Sun, 28 Sep 2025 14:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZS6P0KYVz3nCW; Sun, 28 Sep 2025 14:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759071309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J81RFfIYOlwTZS3Fa2wkAxRCFoF+HjTfkrUD3qsEn8E=; b=i24uQffoV2xBeDhRW/90z034cj+mRtnMfv6JOZmTkGFlNxbHd8HdgjSzFuHZo4xcuqBSt/ paCNdiOiXKgzTcOQCs+gCVTsI9JI+RqVklM1w9ahdg1lpjHBCpPcO+wvHzc8iMC7FXO4HU 90COjhzhRZLPengoPwXoo5ngyjmYf3fvshAPkx6ye/P+fdvGqJ0f/k/JJEPZP+4hdfshzC Ea2wg5mIQYjCeYYWehJKhMkGquLO4Kvb4hDp+CMjux12skzogHHduwJ6c+WC/EeRdDP3DB u2LqgwrHNHa9ZaoJMgHH7qdUSwD8QZwaDU36AMI+k3lqJOtVzwKbqGuNc9UBBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759071309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J81RFfIYOlwTZS3Fa2wkAxRCFoF+HjTfkrUD3qsEn8E=; b=QwHGRDex1N+FwQYZD+ZQhQThwuOlwYwIDRwfuZKzoI2vVBgB2jDbu1CBCF0hk8UAMji8ol EpiFVlvkzTxqZr7+8eLDXIvELNc6GSgcp1rn7V5x0qFV5sePsaH0FhOCTpPNBylfB0b+zu TVKWGHhTQ4Q2AT9AWOC8qdn7h5h/6DE3i21ly7m74MEV3lg1rYzWcmBjIqZtXL+hpcp4pf jfZW6r8y4zg5masT/krnm4GKB8dXGv2IyOjT6Zpe8rPSt22N0/8Kz7MAphL83cSfBcTDGd 8V8YE14OTVHIciToIJzhbojQlfKibdon3dgakRqkwnSBoFCxkLX94aAcUAunCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759071309; a=rsa-sha256; cv=none; b=aTCBVgabvyGKlOMfF0hTqEhTPG+aHfEPC3umAgx/6XwN8dKGw+B8O7Kk2DVp1pi5Qb3HvV LhlgMqLbrGTAOUjTuYoHzeTovCJhVahx5ZnLgdRRakp5IPyVj7TB1Kl5F77Uq1+ndzlyKj FxWe6PU582SW7s09arZRkSxtaP1jKMPppwMO6aQmWBGMiak7acUevsUQYvviv1sxgzPTRv afDJF6pJyGG7HqIGSjUBfoXP479BhhSOzL7zyW2gWSnyro9yN/52xFki4R8djm58JHNDtM F54MuMInk031ZFS5EYXhZ1LzQj37Ieu3svv7/MdEnpKwN3Mt71oZwhWEcR15MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZS6N71ykz8YW; Sun, 28 Sep 2025 14:55:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SEt8Sj045143; Sun, 28 Sep 2025 14:55:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SEt8EN045140; Sun, 28 Sep 2025 14:55:08 GMT (envelope-from git) Date: Sun, 28 Sep 2025 14:55:08 GMT Message-Id: <202509281455.58SEt8EN045140@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: aab45f2aeec8 - main - tests/netlink: fix flaky netlink_sockets:sizes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aab45f2aeec803d37514b574010cb5e7cfba8249 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=aab45f2aeec803d37514b574010cb5e7cfba8249 commit aab45f2aeec803d37514b574010cb5e7cfba8249 Author: Gleb Smirnoff AuthorDate: 2025-09-28 14:49:31 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-28 14:49:31 +0000 tests/netlink: fix flaky netlink_sockets:sizes The problem is that fullsocket() creates a socket that has both send and receive buffers full and as we process messages from the receive buffer we allow the kernel to continue processing of the send buffer and a new message may arrive while the test expects that no new messages arrive. Fix that by creating a socket that has several messages in the receive buffer, but don't have any in the send buffer. --- tests/sys/netlink/netlink_socket.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/sys/netlink/netlink_socket.c b/tests/sys/netlink/netlink_socket.c index 3c2c5f857591..cee864bb9bab 100644 --- a/tests/sys/netlink/netlink_socket.c +++ b/tests/sys/netlink/netlink_socket.c @@ -211,9 +211,22 @@ ATF_TC_BODY(sizes, tc) .msg_controllen = sizeof(cbuf), }; ssize_t ss; - int fd, size, rsize; + int fd, size, msize, rsize; - fd = fullsocket(); + /* + * Create a socket with NMSGS messages in the receive buffer. + */ +#define NMSGS 5 + ATF_REQUIRE((fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE)) != -1); + ATF_REQUIRE(send(fd, &hdr, sizeof(hdr), 0) == sizeof(hdr)); + ATF_REQUIRE(recv(fd, buf, sizeof(hdr), MSG_WAITALL | MSG_PEEK) == + sizeof(hdr)); + ATF_REQUIRE(ioctl(fd, FIONREAD, &msize) != -1); + for (u_int i = 0; i < NMSGS; i++) + ATF_REQUIRE(send(fd, &hdr, sizeof(hdr), 0) == sizeof(hdr)); + do { + ATF_REQUIRE(ioctl(fd, FIONREAD, &rsize) != -1); + } while (rsize < msize * (NMSGS + 1)); /* * Set NETLINK_MSG_INFO, so that later cmsg_check will check that any @@ -264,6 +277,7 @@ ATF_TC_BODY(sizes, tc) .iov_len = sizeof(buf) < rsize ? sizeof(buf) : rsize, }; ss = recvmsg(fd, &msg, 0); + ATF_REQUIRE(ss > hdr.nlmsg_len); ATF_REQUIRE(ss > NLMSG_LARGE * 9 || ss == rsize); cmsg_check(&msg); } From nobody Sun Sep 28 14:55:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZS6Q37Plz68pkh; Sun, 28 Sep 2025 14:55: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZS6Q1Tdrz3nNt; Sun, 28 Sep 2025 14:55:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759071310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/7zVM168DuDlOLzycOu5NfmC9wuLWbspLVwrlqOQHjk=; b=qVThbNl7jxcY3Dx0BSwTjD/Y7rlRtsje/6SUKJR9PZNcmK9JaprXY+gtX1D1S4uYIg61o2 cNIeIhSgCPquS22nrvj/b4FxClbDVB5qEVftp86hYy/vZ0+9uURWp3Pr8KH2flZKbaTURT XCcdyM7nJQuiVykQeIeX5YggoXlBpfb4PJQZIYFs6DpIpVQhmwVcFkgaHmUqefThqPWcqq LoJ2zqXAOULhQ8HDMTnx0eAWPHkExfGAhXvOvRDGihE6b9frvXex/VDpNOvegxUcrIpJ16 CDSJl3v6pPjOTmv8PcFGsTfWdqZ5IE7fuwBsRKBW4ja7AV8A1YWbi/nkMgoWrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759071310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/7zVM168DuDlOLzycOu5NfmC9wuLWbspLVwrlqOQHjk=; b=LOPAksLk3YriTUouH97iFvMtwZVPksHQkkKkrnNYsvrQE96UMzCeVn22g2z3qn+4ASk0IY jZp0MHaISxqtTE3qEsN8noMw7mQIS6eTGM+XdD+cbfzU+JWA2nBH8dybHxJwV2cbOCVqS2 wAswr2rdB6yC9hs+Y81O3O2vnHTQF4/XtTyMlTCL+/ZCB6Y1RdOr3aqeTSwt73NvWM9m8d EMXWoVTw6D3nOJWcheDy5F665ojBdqq/t3/JaXwEEOxBK+0nD7r2s7KvfAZ72p2SKihGMm ksdDAbNwQd2oVlUXeqF+hIC88OE1iKAvx6Bb3xxuTuVe5Tfbxx6kS1LX7m35TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759071310; a=rsa-sha256; cv=none; b=BN16O63MvSdN752RZbt6Omm0JlmbnBhl/VnROTOrQLHNmGpzfC/bvkG//5KOzKxHwdj4vJ yv2vwMzrRdHz1ECdEgvhLzzzAJC05WMtCn1jVhRsdwdmw34lNC47vrWoowcgWVz/WOD8xe UE3U0pm6BLVWUCRymIkgBxi/4fNIxRFe9NZ2jvhTlYtIUHW3CksjLgAq/kWFIQVUjkYXJh YSqhr4w3gX/XFhIp4eBpu4J5ROW8hf9E8we5V7CzBCB0V/z52paGnOhuOAnJdsAAYyIEYP n7mdRo6NpIgdjxqAJO/Td5mIfZ+GYK8w1yddrQULisn8qFpPk76BekADPKNAUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZS6Q0tGgz8WW; Sun, 28 Sep 2025 14:55:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SEtA1Y045175; Sun, 28 Sep 2025 14:55:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SEtA9w045172; Sun, 28 Sep 2025 14:55:10 GMT (envelope-from git) Date: Sun, 28 Sep 2025 14:55:10 GMT Message-Id: <202509281455.58SEtA9w045172@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: 81df9522c8b7 - main - newsyslog: provide -I option to specify default signal List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81df9522c8b720016db671c9476fa449bd94e6da Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=81df9522c8b720016db671c9476fa449bd94e6da commit 81df9522c8b720016db671c9476fa449bd94e6da Author: Gleb Smirnoff AuthorDate: 2025-09-28 14:54:33 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-28 14:54:33 +0000 newsyslog: provide -I option to specify default signal Useful when used with syslog-ng, which uses SIGUSR1. Instead of adding signal number to every new entry, just set it via command line option. Reviewed by: bcr, delphij Differential Revision: https://reviews.freebsd.org/D52701 --- usr.sbin/newsyslog/newsyslog.8 | 9 +++++++-- usr.sbin/newsyslog/newsyslog.c | 13 +++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/usr.sbin/newsyslog/newsyslog.8 b/usr.sbin/newsyslog/newsyslog.8 index 7429e3b8eb01..aa89ef4b779a 100644 --- a/usr.sbin/newsyslog/newsyslog.8 +++ b/usr.sbin/newsyslog/newsyslog.8 @@ -14,7 +14,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd September 1, 2025 +.Dd September 22, 2025 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -26,6 +26,7 @@ .Op Fl a Ar directory .Op Fl d Ar directory .Op Fl f Ar config_file +.Op Fl I Ar signal .Op Fl S Ar pidfile .Op Fl t Ar timefmt .Op Oo Fl R Ar tagname Oc Ar @@ -132,7 +133,7 @@ Remove the restriction that must be running as root. Of course, .Nm -will not be able to send a HUP signal to +will not be able to send a signal to .Xr syslogd 8 so this option should only be used in debugging. .It Fl s @@ -247,6 +248,10 @@ Skipping the signal step will also mean that will return faster, since .Nm normally waits a few seconds after any signal that is sent. +.It Fl I Ar signal +Specify signal to send for entries that do not have signal configured. +This option accepts either a signal number or a name as argument. +The default value is HUP. .It Fl S Ar pidfile Use .Ar pidfile diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index e24e2db1155d..90b9c8d716a5 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -241,6 +241,7 @@ static int norotate = 0; /* Don't rotate */ static int nosignal; /* Do not send any signals */ static int enforcepid = 0; /* If PID file does not exist or empty, do nothing */ static int force = 0; /* Force the trim no matter what */ +static int defsignal = SIGHUP; /* -I Signal to send by default */ static int rotatereq = 0; /* -R = Always rotate the file(s) as given */ /* on the command (this also requires */ /* that a list of files *are* given on */ @@ -455,7 +456,7 @@ init_entry(const char *fname, struct conf_entry *src_entry) tempwork->permissions = 0; tempwork->flags = 0; tempwork->compress = COMPRESS_NONE; - tempwork->sig = SIGHUP; + tempwork->sig = defsignal; tempwork->def_cfg = 0; } @@ -700,7 +701,7 @@ parse_args(int argc, char **argv) hostname_shortlen = strcspn(hostname, "."); /* Parse command line options. */ - while ((ch = getopt(argc, argv, "a:d:f:nrst:vCD:FNPR:S:")) != -1) + while ((ch = getopt(argc, argv, "a:d:f:nrst:vCD:FI:NPR:S:")) != -1) switch (ch) { case 'a': archtodir++; @@ -748,6 +749,10 @@ parse_args(int argc, char **argv) case 'F': force++; break; + case 'I': + if (str2sig(optarg, &defsignal) != 0) + usage(); + break; case 'N': norotate++; break; @@ -846,7 +851,7 @@ usage(void) fprintf(stderr, "usage: newsyslog [-CFNPnrsv] [-a directory] [-d directory] [-f config_file]\n" - " [-S pidfile] [-t timefmt] [[-R tagname] file ...]\n"); + " [-I signal] [-S pidfile] [-t timefmt] [[-R tagname] file ...]\n"); exit(1); } @@ -1481,7 +1486,7 @@ no_trimat: *parse = '\0'; } - working->sig = SIGHUP; + working->sig = defsignal; if (q && *q) { got_sig: if (str2sig(q, &working->sig) != 0) { From nobody Sun Sep 28 14:55:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZS6R6D9Cz68pqw; Sun, 28 Sep 2025 14:55: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZS6R3vZFz3nPH; Sun, 28 Sep 2025 14:55:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759071311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2t6c+ZHwPceSJDTQDTQ7Ou46u5yeqC+nrVcoR3cEryA=; b=WdQKRtBlPs5QWIFDxgIEVMJSN2f29NrUnDpZORZDnw5EkBmUGsP8m8E3s1/Hke0Bjw28JD DMYODmnhuWZSkLFUsIjEBO6GoAWeiA/4EUyR0s3SohKctT7XX9bbHR6+lPSxFBASP/tTYe WMVX8g44kI8oK0ymCADfzRNLqlZnNUEqsrw93NTwOnGa8In5NAVz6RLIltc7EIv8uhBipv ++LB2maDa6Fgk3RTZ0k0pZsZkfhiO9jczV88Rfefs/ko9/gOjoM1FUq5jS8hqfT6tfrfAJ /hi2D1mjT75V9q+jLa/aRDzLvBI0LaLOZhEESPOcSgHDzIEH+bGP1vPPBvfAlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759071311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2t6c+ZHwPceSJDTQDTQ7Ou46u5yeqC+nrVcoR3cEryA=; b=pdebBEBADi4W8tpA1jx+f90GjFYRqM50uDTOiyc8kEXrQAzxy+VUMV+ivcCsrI9uKUBch9 sOrb51PHu6ts0GXa5ov0EZIfsthKbuTYofLzkXeYb53DSjVJfyqq6nqkxalNshnA0hZWvI 4j+SSvp8BL8mKBVxLqYmyXCe53fDQLEdHzgfisnItSEku40HRLr9HeyT1uExKtMgVN4Q0K S5EjJkAddCGuExzaiIh5UgdCqGylA6LOLpMu4cWNxoBWKqIGXfrjDBTIhUp71WM1HTaTv2 +MsDo0HwKyfs/h7GTEhkPYCP72Ohuql8nPq2U9zCGV/nN4Bv3fRARV1KUS3Prg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759071311; a=rsa-sha256; cv=none; b=kpqzSAec9u41IZ+Vb4cQC2zCHgundL44zQPnmCb1XvMDS83W/3MYc+c4vAS5f9sxhIBodC zHptNEG5IZPVMZTwFvHUxtfS5LtEKPJotMhUEwbZWQDwRmAarQM8Q5lcsmHWgeo4shF1rG Ds/AF/nlbj0gEqXdWFsKHUwYbl1OZcu0urhtmlsLN8q2LijHfp6Aohvpp0IooY+0xWU1TD ytH8omP7ONvV6FKetfIlelOlrvlMHHOmAlh9pBFVHiVv96/whcokzqXY9VgGu0RvT5c5lQ 5YNh8nSHCH6Pdwo5INJUj1Dq8xxHkGTmFrHwHhsZisdmdGPBIDVeB3SHF8skAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZS6R1qtdz8wB; Sun, 28 Sep 2025 14:55:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SEtB0h045207; Sun, 28 Sep 2025 14:55:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SEtB3P045204; Sun, 28 Sep 2025 14:55:11 GMT (envelope-from git) Date: Sun, 28 Sep 2025 14:55:11 GMT Message-Id: <202509281455.58SEtB3P045204@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: bbec2c9a6d9a - main - newsyslog: fix one hour rotation with frequent execution List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbec2c9a6d9a9b8f6c6edbdd2386dfdcd1c81422 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=bbec2c9a6d9a9b8f6c6edbdd2386dfdcd1c81422 commit bbec2c9a6d9a9b8f6c6edbdd2386dfdcd1c81422 Author: Gleb Smirnoff AuthorDate: 2025-09-28 14:54:53 +0000 Commit: Gleb Smirnoff CommitDate: 2025-09-28 14:54:53 +0000 newsyslog: fix one hour rotation with frequent execution If a newsyslog.conf(5) has an entry that is configured to be rotated every hour, and crontab(8) is set to execute newsyslog several times per hour, the logic of age_old_log() is broken and it would rotate the entry too often. AFAIU, the extra 1800 seconds were added to allow some leeway for the previous newsyslog invocation, that could have been too slow and the timestamp on the old file is newer than actual time of the previous newsyslog invocation. But 30 minutes of leeway is way to much. Reduce this down to 3 minutes, which would be a compromise between a potential need to run newsyslogd every 5 minutes and a situation when newsyslog takes a significant time to rotate the logs. Provide a test case for that. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D52700 --- usr.sbin/newsyslog/newsyslog.c | 2 +- usr.sbin/newsyslog/tests/legacy_test.sh | 53 ++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 90b9c8d716a5..084aeb36b052 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -2615,7 +2615,7 @@ age_old_log(const char *file) mtime = sb.st_mtime; } - return ((int)(ptimeget_secs(timenow) - mtime + 1800) / 3600); + return ((int)(ptimeget_secs(timenow) - mtime + 180) / 3600); } /* Skip Over Blanks */ diff --git a/usr.sbin/newsyslog/tests/legacy_test.sh b/usr.sbin/newsyslog/tests/legacy_test.sh index c8c18a754977..ea0b0c6fc726 100644 --- a/usr.sbin/newsyslog/tests/legacy_test.sh +++ b/usr.sbin/newsyslog/tests/legacy_test.sh @@ -417,6 +417,51 @@ tests_time_rotate() { tmpdir_clean } +tests_interval_rotate() { + local hours ext h + + hours="$1" + ext="$2" + + tmpdir_create + + begin "create file" -newdir + run_newsyslog -C + ckfe ${LOGFNAME} + end + + # old file doesn't exist - forced rotation + begin "rotate interval 0" + run_newsyslog + ckfe ${LOGFNAME} + chkfcnt 1 ${dir}${LOGFNAME}.* + end + + # emulate newsyslog runs every 5 minutes + begin "rotate interval less than ${hours} hours" + m=0 + while [ $(expr ${m} / 60 ) -lt ${hours} ]; do + touch -t $(date -v -${m}M +%Y%m%d%H%M) ${LOGFNAME}.0 + run_newsyslog + ckfe ${LOGFNAME} + chkfcnt 1 ${dir}${LOGFNAME}.* + if [ $OK != 1 ]; then + break; + fi + m=$(expr ${m} + 5) + done + end + + begin "rotate interval ${hours} hours" + touch -t $(date -v -${hours}H +%Y%m%d%H%M) ${LOGFNAME}.0 + run_newsyslog + ckfe ${LOGFNAME} + chkfcnt 2 ${dir}${LOGFNAME}.* + end + + tmpdir_clean +} + tests_rfc5424() { local dir ext name_postfix newsyslog_args @@ -526,7 +571,7 @@ tests_normal_rotate_recompress() { tmpdir_clean } -echo 1..185 +echo 1..193 mkdir -p ${TMPDIR} cd ${TMPDIR} @@ -638,4 +683,10 @@ tests_p_flag_rotate ".gz" echo "$LOGFPATH 640 3 * @T00 NCZ" > newsyslog.conf tests_normal_rotate_recompress +# Interval based rotation +echo "$LOGFPATH 640 3 * 1 NC" > newsyslog.conf +tests_interval_rotate 1 +echo "$LOGFPATH 640 3 * 2 NC" > newsyslog.conf +tests_interval_rotate 2 + rm -rf "${TMPDIR}" From nobody Sun Sep 28 15:00:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZSDb6wrnz68q16; Sun, 28 Sep 2025 15:00: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZSDb6RpPz3qSs; Sun, 28 Sep 2025 15:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759071631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQwzQTJoaNhkGKnhJATWzY0wAk4iagAFxt1crgjRqvI=; b=qJwug8CWEhPACnCymkk0pIwHyhCrczNdGQHNQJN9T1yK0u5Tw/gNznHHX5ykLFJVAzMDvv hvVPR7Q2nycat4FeeQq3A43e+vbwao5WZhXK+FB+6mznt8IaxiyoZIL0su0tf9VmYgUna4 vlFEsVj7eTmxvhljzW+j+X7nhxtUzvGVliXIxsR18qyGRi1IMYdyiSjBi8cbfPTuwbuHdc hlXzGPFV9h27mbgwTeHKVrDj1BinGMA9ehoXHsJoA5ujnwNDN0yoC3n/EouDWjcl2a54Vv ekOrYD9hBAihxa94Ibeo6WivyVWL0bgMwBAqDvJJuxqpSCbJUzqJ4Xe7ylKSxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759071631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DQwzQTJoaNhkGKnhJATWzY0wAk4iagAFxt1crgjRqvI=; b=ZKUEF3Jvhogg9JPp4aqleuRr3+bbkM0ibvtp0OKEhpxygQ4i1tIOJXlxKzD/fMre5vu2a2 b98V5UUuaoejBO5nWLx7fsL46AiGWLfQb7fpSxQMLi7Go3MVMHMO74yqkxABMEd5BRtlst Bc2nyY2l5SuMoMSpRDXDvo+RVWRo+OQs9pSyRaL8RYy4ggsfQZe1yJqTbE3nPG0+uiSokc Fo+mQ/MmKQivFu57pY/0NdZ0Bu5rnTmb0bzriRxsyINMC8kc7GxubUOzsHxZOcHwfc50bz lZUtpO36SMyGOPtkJMswGASJIOV0nC5f1WfpXTRqpkl3LrT7DC6qr9NWx3YHOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759071631; a=rsa-sha256; cv=none; b=Dv6MErJWZiZ9ZrA2btEvTL0lLOyRDjiHWan8dAT9tr2eY6lbA2EEug8pypr3w0mdvtiXtT 7POug6XXWu5BLpS4Akj1kdSwiQrUMRg78pCxr+FF9nH6/Z+uPwZF2ILn7Gu9tIT6+wWBZz 1fZYT3js4TQk6MO24kvtKWPTzE/+iUm6PVPzi2YCL4tNyDltByL1qU+cbN5hhfIc0WEUWV 2sJgHKJ7klflLTaSiLYEOo6d3Km1kvpwFxhyqsDg8Th4P9z3fC0NYilnXjNh33z80DFDlO 5Wfr47leEJyeUpCdXA99mEPKiBeZXOh22nhPeyDDpVH1vqdZRExo/uoCM1iezg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZSDb5sVQz888; Sun, 28 Sep 2025 15:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SF0Vsx056610; Sun, 28 Sep 2025 15:00:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SF0VAW056607; Sun, 28 Sep 2025 15:00:31 GMT (envelope-from git) Date: Sun, 28 Sep 2025 15:00:31 GMT Message-Id: <202509281500.58SF0VAW056607@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: 70730cd21c9f - main - rpc_generic.c: Fix a rpcbind core dump when rpcinfo is done List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70730cd21c9f2b0a80ff07e4491c0fe30f2d87c5 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=70730cd21c9f2b0a80ff07e4491c0fe30f2d87c5 commit 70730cd21c9f2b0a80ff07e4491c0fe30f2d87c5 Author: Rick Macklem AuthorDate: 2025-09-28 14:56:17 +0000 Commit: Rick Macklem CommitDate: 2025-09-28 14:57:34 +0000 rpc_generic.c: Fix a rpcbind core dump when rpcinfo is done Commit c5d671b added netlink support to server side rpcbind. However it did not add a case for AF_NETLINK to __rpc_taddr2uaddr_af(). (Reported as PR#289625.) As such, without this patch the r_addr field of the netlink rbllist is NULL, which causes a crash in svc_sendreply() for a Dump query (what rpcinfo does). PR: 289625 Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52651 Fixes: c5d671b711c3 ("libc/rpc: add userland side RPC server over netlink(4)") --- lib/libc/rpc/rpc_generic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libc/rpc/rpc_generic.c b/lib/libc/rpc/rpc_generic.c index 0e563f6a5996..8019f2d8f236 100644 --- a/lib/libc/rpc/rpc_generic.c +++ b/lib/libc/rpc/rpc_generic.c @@ -610,6 +610,10 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf) return NULL; break; #endif + case AF_NETLINK: + if (asprintf(&ret, "%s", (char *)nbuf->buf) < 0) + return NULL; + break; case AF_LOCAL: sun = nbuf->buf; if (asprintf(&ret, "%.*s", (int)(sun->sun_len - From nobody Sun Sep 28 15:40:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZT784yGFz68sPG; Sun, 28 Sep 2025 15:40: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZT783RYsz3t3T; Sun, 28 Sep 2025 15:40:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759074052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sz378LK5KhFwaVlFLTULQVVH2xoEhXibUsicZbului8=; b=yymIJxVBRuYKW+fM0UeIPYnPeMiWclsWU/uOZcz6mkeWG6zCyoVdsEKMRcI9Vr3+BRBUGE 5+lI7aQpzyLr3mA1a1zqizrPvfGDqsTUNK03R3MBh+nvFcZRF7MUg4C5C9iNE+gIURr/Pd NiqO+HQarX0i90ShXm3ZnlrjrPorlKV/TkpDNELKG4sWU+hPcgwXSR6PNcjbb51D6bkpvi q493QzygOmj5oKQ92RhnpPWpXWgakBg+NIbScKDwx+yCZmcMh8aaDJ+SksXL06pr3FlcEq pKIGD4TufeJeQrz52UUVy0VFpRYJqiATws1W8vDvwXvtm/TOGZyu4rMyY/n9Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759074052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sz378LK5KhFwaVlFLTULQVVH2xoEhXibUsicZbului8=; b=uXGEJdfo6+KnzsF2mmNlbc9ENqp9kSotMC263wkAX6lrJFKxzZcVlv3HDEFKtH5ZfidTxc VwaQoTv3MYp5QuHgLORHEfAAiycf0vEJGCdykEv3L3kEtk1JIpJvHlN2CfZpj1DiV2/Mq6 /p4UDD5zrJYneLDfPlEyXwB2Fh2iCTsvDG5BOO5BrM/bUkjUWQ5JXGSjK+vlahUp/H9sV9 1PknbTkc2sWGyTc88kMGdy2sQK3tkFVQPYZ/NuSb46z48inBZNQVchKVT2ArbrV2ED228v ovWSeJhSFaKDm5LfIf/H3QfKi6OI0peOptUblhlCOnYzBIXhJQ/PN0vw2+HxaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759074052; a=rsa-sha256; cv=none; b=f3in7PdlEN56cPacSUA0LsCr2hLh2dxIosB7DrR+RDHpfV9faBnDImWZMt+c64Gvf9rvNJ QuH2Zmhi0owf3DIsdm0K+KrHULHH4pYEfit/hdEno09UYDzWr4A8ftfxK6OzLOZcUxSn1N oBcs+41hn7KG3jETeC44mdHhK19+CNmx14smUl/KfwBQHRyVMvGSBLrdexfvoIPatlNDfe CvN2fN06DcHqN6kWurcnm28ZLive58+OXUJ6v/9boiETYd8ay4yOXcIFStjoxMVxM0RAaf 2bLoWrUcDIFVUPmRqeaz/S6PP8KbByC6bA8mYdFWI4l3LGvA1A7tJJGb00PHaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZT782p85z9fm; Sun, 28 Sep 2025 15:40:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SFeqN1031073; Sun, 28 Sep 2025 15:40:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SFeqaa031070; Sun, 28 Sep 2025 15:40:52 GMT (envelope-from git) Date: Sun, 28 Sep 2025 15:40:52 GMT Message-Id: <202509281540.58SFeqaa031070@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 86a7787e324b - main - virtual_bt_speaker(8): Fix aarch64 build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86a7787e324b1524abfc434982bae9bf87ad7390 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=86a7787e324b1524abfc434982bae9bf87ad7390 commit 86a7787e324b1524abfc434982bae9bf87ad7390 Author: Christos Margiolis AuthorDate: 2025-09-28 15:36:50 +0000 Commit: Christos Margiolis CommitDate: 2025-09-28 15:39:44 +0000 virtual_bt_speaker(8): Fix aarch64 build Reported by: fuz, otis Fixes: 9cab9fde5eda ("virtual_oss: Port to base") Sponsored by: The FreeBSD Foundation --- usr.sbin/virtual_oss/virtual_bt_speaker/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/virtual_oss/virtual_bt_speaker/Makefile b/usr.sbin/virtual_oss/virtual_bt_speaker/Makefile index 5e4553e7a298..0f5fb2b4eb99 100644 --- a/usr.sbin/virtual_oss/virtual_bt_speaker/Makefile +++ b/usr.sbin/virtual_oss/virtual_bt_speaker/Makefile @@ -6,6 +6,6 @@ SRCS= bt_speaker.c CFLAGS+= -I${SRCTOP}/usr.sbin/virtual_oss/virtual_oss \ -I${SRCTOP}/lib/virtual_oss/bt -LDFLAGS+= -L${LIBDIR} -lm -lbluetooth -lsdp +LDFLAGS+= -lm -lbluetooth -lsdp .include From nobody Sun Sep 28 16:11:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZTp35m6Vz68vbY; Sun, 28 Sep 2025 16:11:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZTp33SBcz3wQV; Sun, 28 Sep 2025 16:11:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759075867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BMrtuEHen/Vj3giY3rMorBlgUeTicShF5kW/hSVyuYE=; b=HUuAB1pSxs0OkVNFk1PT1VvX3bf0LLvdE2YGAhHkd0cUzDHvXhIfQiPI0bKeKZXvVeyovY LpdQpewMAaKgDi3AroaTnK+NG+c+C4mTTpzVAP+NpCRJQ5ar/oW7pTHqfxgcon9REWRCoe FmkXFUKz3dh7tyvP5gNOPBfD9gLR0t+3vFjKvOPI4mFnV5iUk7Hl4/ulab0ssDSg2OMIRT aPtkaB+B5r1YE4aIK0qLACFf/nHQzPEDMPWm2MXPXFpmW7MGThXZe6YhUWZpk9tEK1rYYs LFXzI6yXUcK02LKP0pfCYgrdkb4jrHHMiCH6SravemWl/cegsR16NW7PgmxJMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759075867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BMrtuEHen/Vj3giY3rMorBlgUeTicShF5kW/hSVyuYE=; b=c0dsvTZ2AYtqA5ryA3kTVyr1KfHN1taC7eOyZv1ayuu9I5B9wEeDqXyraiRBXvuxqcbunO v0L8xcyRkZ3nPLHiTDC0TGYN/NZrOGh0gU9ky8OhPfGOYEBwLx+e8NLAUNuONJT2tunKQm BWu+TpHTAxrv1lkRhM0cBLBT0stcmJl4bPRFftlBxirkYmcQD/ExoHQ8/XN3ynRPLfB+rN xuOxIUA/bRaNp4RM5NS5HCq2HrPjq+6Q2jxftV3EFco/a2+FyWvcyxRr34LEYlYi59tuVM InXUeweRmCC6uJtM0Nh8CHZU33GO4sXyq1eK0ZQUrSqk0H5+nFyPy1byooc0Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759075867; a=rsa-sha256; cv=none; b=a8MWXjXGvlm27ONFdKMpH5b3iPsbdRnh2s/9PInIJHr7r4+ziCHWmoKjHFqSRB3glAjjJS BFlt4mbWny6uy+Av8ymnZkKY6kUhQhHCQ+drTjcI8lmFrPjQ+5oTfiDOaThREDdy4WVKvC FG7ozh+WvCbm9b4uNYTW/IgHav04YrsN4uPRKahBJy5JulQ/eyFVMHGjx9GgwuD3k/Ggw8 I72HYepE7TKA1WzK3ZfbJE7RtJCTfeuMJdjw8D2pU4zRL/IDoMY5lIrlkK90C/6PVafS4N Lsfp3dxBo/HFsD6sMxe0v/Pa4c5S4lNw6GpRgrPtEoGgq/3qKVP2DjVSeTqvnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZTp33145zBP0; Sun, 28 Sep 2025 16:11:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SGB7PS090435; Sun, 28 Sep 2025 16:11:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SGB7ZI090432; Sun, 28 Sep 2025 16:11:07 GMT (envelope-from git) Date: Sun, 28 Sep 2025 16:11:07 GMT Message-Id: <202509281611.58SGB7ZI090432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 7e5ab1857817 - main - Revert "acpi_powerres: `acpi_pwr_get_state` and getting initial D-state for device" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e5ab1857817e7be85f012d41239711ef66ebdf6 Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=7e5ab1857817e7be85f012d41239711ef66ebdf6 commit 7e5ab1857817e7be85f012d41239711ef66ebdf6 Author: Aymeric Wibo AuthorDate: 2025-09-28 16:06:53 +0000 Commit: Aymeric Wibo CommitDate: 2025-09-28 16:07:27 +0000 Revert "acpi_powerres: `acpi_pwr_get_state` and getting initial D-state for device" Setting ACPI D-states is generally broken on FreeBSD and this change surfaced an issue. So reverting for the time being whilst I write a proper fix for this. This reverts commit 02a8fadd2c4dc4b78d6d93d9d8b70e9348a6de6d. Reported by: glebius, phk Tested by: glebius Sponsored by: The FreeBSD Foundation --- sys/dev/acpica/acpi_powerres.c | 164 ++--------------------------------------- sys/dev/acpica/acpivar.h | 1 - 2 files changed, 5 insertions(+), 160 deletions(-) diff --git a/sys/dev/acpica/acpi_powerres.c b/sys/dev/acpica/acpi_powerres.c index 0a8b67a5fa84..0baa5c595470 100644 --- a/sys/dev/acpica/acpi_powerres.c +++ b/sys/dev/acpica/acpi_powerres.c @@ -117,8 +117,6 @@ static struct acpi_powerresource *acpi_pwr_find_resource(ACPI_HANDLE res); static struct acpi_powerconsumer *acpi_pwr_find_consumer(ACPI_HANDLE consumer); -static ACPI_STATUS acpi_pwr_infer_state(struct acpi_powerconsumer *pc); -static ACPI_STATUS acpi_pwr_get_state_locked(ACPI_HANDLE consumer, int *state); /* * Register a power resource. @@ -346,9 +344,8 @@ acpi_pwr_register_consumer(ACPI_HANDLE consumer) return_ACPI_STATUS (status); } - /* Find its initial state. */ - if (ACPI_FAILURE(acpi_pwr_get_state_locked(consumer, &pc->ac_state))) - pc->ac_state = ACPI_STATE_UNKNOWN; + /* XXX we should try to find its current state */ + pc->ac_state = ACPI_STATE_UNKNOWN; ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "registered power consumer %s\n", acpi_name(consumer))); @@ -392,137 +389,7 @@ acpi_pwr_deregister_consumer(ACPI_HANDLE consumer) } /* - * The _PSC control method isn't required if it's possible to infer the D-state - * from the _PRx control methods. (See 7.3.6.) - * We can infer that a given D-state has been achieved when all the dependencies - * are in the ON state. - */ -static ACPI_STATUS -acpi_pwr_infer_state(struct acpi_powerconsumer *pc) -{ - ACPI_HANDLE *res; - uint32_t on; - bool all_on = false; - - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - ACPI_SERIAL_ASSERT(powerres); - - /* It is important we go from the hottest to the coldest state. */ - for ( - pc->ac_state = ACPI_STATE_D0; - pc->ac_state <= ACPI_STATE_D3_HOT && !all_on; - pc->ac_state++ - ) { - MPASS(pc->ac_state <= sizeof(pc->ac_prx) / sizeof(*pc->ac_prx)); - - if (!pc->ac_prx[pc->ac_state].prx_has) - continue; - - all_on = true; - - for (size_t i = 0; i < pc->ac_prx[pc->ac_state].prx_count; i++) { - res = pc->ac_prx[pc->ac_state].prx_deps[i]; - /* If failure, better to assume D-state is hotter than colder. */ - if (ACPI_FAILURE(acpi_GetInteger(res, "_STA", &on))) - continue; - if (on == 0) { - all_on = false; - break; - } - } - } - - MPASS(pc->ac_state != ACPI_STATE_D0); - - /* - * If none of the power resources required for the shallower D-states are - * on, then we can assume it is unpowered (i.e. D3cold). A device is not - * required to support D3cold however; in that case, _PR3 is not explicitly - * provided. Those devices should default to D3hot instead. - * - * See comments of first row of table 7.1 in ACPI spec. - */ - if (!all_on) - pc->ac_state = pc->ac_prx[ACPI_STATE_D3_HOT].prx_has ? - ACPI_STATE_D3_COLD : ACPI_STATE_D3_HOT; - else - pc->ac_state--; - - return_ACPI_STATUS (AE_OK); -} - -static ACPI_STATUS -acpi_pwr_get_state_locked(ACPI_HANDLE consumer, int *state) -{ - struct acpi_powerconsumer *pc; - ACPI_HANDLE method_handle; - ACPI_STATUS status; - ACPI_BUFFER result; - ACPI_OBJECT *object = NULL; - - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - ACPI_SERIAL_ASSERT(powerres); - - if (consumer == NULL) - return_ACPI_STATUS (AE_NOT_FOUND); - - if ((pc = acpi_pwr_find_consumer(consumer)) == NULL) { - if (ACPI_FAILURE(status = acpi_pwr_register_consumer(consumer))) - goto out; - if ((pc = acpi_pwr_find_consumer(consumer)) == NULL) - panic("acpi added power consumer but can't find it"); - } - - status = AcpiGetHandle(consumer, "_PSC", &method_handle); - if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "no _PSC object - %s\n", - AcpiFormatException(status))); - status = acpi_pwr_infer_state(pc); - if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "couldn't infer D-state - %s\n", - AcpiFormatException(status))); - pc->ac_state = ACPI_STATE_UNKNOWN; - } - goto out; - } - - result.Pointer = NULL; - result.Length = ACPI_ALLOCATE_BUFFER; - status = AcpiEvaluateObjectTyped(method_handle, NULL, NULL, &result, ACPI_TYPE_INTEGER); - if (ACPI_FAILURE(status) || result.Pointer == NULL) { - ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "failed to get state with _PSC - %s\n", - AcpiFormatException(status))); - pc->ac_state = ACPI_STATE_UNKNOWN; - goto out; - } - - object = (ACPI_OBJECT *)result.Pointer; - pc->ac_state = ACPI_STATE_D0 + object->Integer.Value; - status = AE_OK; - -out: - if (object != NULL) - AcpiOsFree(object); - *state = pc->ac_state; - return_ACPI_STATUS (status); -} - -/* - * Get a power consumer's D-state. - */ -ACPI_STATUS -acpi_pwr_get_state(ACPI_HANDLE consumer, int *state) -{ - ACPI_STATUS res; - - ACPI_SERIAL_BEGIN(powerres); - res = acpi_pwr_get_state_locked(consumer, state); - ACPI_SERIAL_END(powerres); - return (res); -} - -/* - * Set a power consumer to a particular D-state. + * Set a power consumer to a particular power state. */ ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state) @@ -533,7 +400,6 @@ acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state) ACPI_OBJECT *reslist_object; ACPI_STATUS status; char *method_name, *reslist_name = NULL; - int new_state; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -735,28 +601,8 @@ acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state) } } - /* - * Make sure the transition succeeded. If getting new state failed, - * just assume the new state is what we wanted. This was the behaviour - * before we were checking D-states. - */ - if (ACPI_FAILURE(acpi_pwr_get_state_locked(consumer, &new_state))) { - printf("%s: failed to get new D-state\n", __func__); - pc->ac_state = state; - } else { - if (new_state != state) - printf("%s: new power state %s is not the one requested %s\n", - __func__, acpi_d_state_to_str(new_state), - acpi_d_state_to_str(state)); - pc->ac_state = new_state; - } - - /* - * We consider the transition successful even if the state we got doesn't - * reflect what we set it to. This is because we weren't previously - * checking the new state at all, so there might exist buggy platforms on - * which suspend would otherwise succeed if we failed here. - */ + /* Transition was successful */ + pc->ac_state = state; status = AE_OK; out: diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 4c789dd3e9f2..71d8e46ab310 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -490,7 +490,6 @@ EVENTHANDLER_DECLARE(acpi_video_event, acpi_event_handler_t); /* Device power control. */ ACPI_STATUS acpi_pwr_wake_enable(ACPI_HANDLE consumer, int enable); -ACPI_STATUS acpi_pwr_get_state(ACPI_HANDLE consumer, int *state); ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state); acpi_pwr_for_sleep_t acpi_device_pwr_for_sleep; int acpi_set_powerstate(device_t child, int state); From nobody Sun Sep 28 17:25:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZWS727xHz6910h; Sun, 28 Sep 2025 17:25: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZWS71L8Zz42JL; Sun, 28 Sep 2025 17:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759080343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X9knVI46udT0cqDZNHuanoLvFa+wi8E4sczcGq+LMKM=; b=YAqQX1yIqvcFwTN3/H8hggGB0UNNBX1bx4b61xu+big5YcI64ljb3XdK7555b0x5H4z+p3 o1XtUOg/lxaY+JZCJnkPxIpIIxhd/g+d7ayVNIwaxiHPN+2fNBnuJ7rweSE8EaYLX3JrjH 4fG/hyZUox6TpVkMp+sxibyLmcE1UWNvuxIfhrbfsf79Ew/TW7+YzrvV+TCnkDLcOKVKwS bBBECE4i+h7jIYEFYyYB3J2FQ6luvLmrVrfY651V97CVv8mS2Z3jrHGXGEnY1S7Rbk12P4 WQrO6XK/8u7ao8gIDimAPaYNjhZ5QDXGfn57xR2oa52R6j3J23X0loMWLQpEBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759080343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X9knVI46udT0cqDZNHuanoLvFa+wi8E4sczcGq+LMKM=; b=ZYPVA2bjQh09uoxvGBMv6O35Y66ADb55WYpViVsfkdU1lO2kySWSdQqKUKtn2HHHZhGF48 wzl1kFliAN2IwBPhJ4RkiPYlAEnSyrSYaiitLuKpH+7Ym8ppnfqHLMkrSj+kk9tYIM5cFD oKTFTv/kuQOGp8qgXPDVyZ7Q3GW/kvVOP5N2xZOb1cAfwEOEqumkQi9er1nyPTR8+j54Gr Ty1/lzIfKQVB59Ayq1GpiuT2G67dpXTjSF7Dv96f9q1RiKo41DjhBgAHtXfzte1W8EsXXl XBfnXBmbSxc2NMNdJCxrR738JjWwLnokxQ0tvvPBb6ciPCEqLwrxKIheScZ2xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759080343; a=rsa-sha256; cv=none; b=Nb+38ZrUUXyX5GpzV+RwpWk3UWssQfYUlyoOYI0ufRlRLPvAC1oQtEc6EOvFgq9/IzpNy8 ihf2sA4eskTdfDRiKjaIM3GMJivzIkLkkCaNH9AytNm9kbEPo7rgTqcxod1T9xwJNqcWQx zrftTQuYY1vlsGBzrnqP63kzjyB6TSMbMw9opzOQ3MXe/JLaG3ZtReXYyrCaX8erOZNBBc WzYmmEPYBZVkunxVPsT0UPK5g8lGju5/+3LJxUSZgApfapCGjq0T6fFLJtUYde1jJ6rLRY 4yLk8HVv0DW6s/XQWoPv87nD213JwXjZSjbLgGXuJD7N7QJ0EjxoN80fgduybg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZWS70sC7zTJ5; Sun, 28 Sep 2025 17:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SHPhga027366; Sun, 28 Sep 2025 17:25:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SHPhPb027363; Sun, 28 Sep 2025 17:25:43 GMT (envelope-from git) Date: Sun, 28 Sep 2025 17:25:43 GMT Message-Id: <202509281725.58SHPhPb027363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: 938ae26ffda8 - main - pf: Always skip outbound filtering for inbound af-to rules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 938ae26ffda81fd42c235eaa3223dae51331e4eb Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=938ae26ffda81fd42c235eaa3223dae51331e4eb commit 938ae26ffda81fd42c235eaa3223dae51331e4eb Author: Kajetan Staszkiewicz AuthorDate: 2025-09-07 13:59:00 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2025-09-28 17:23:01 +0000 pf: Always skip outbound filtering for inbound af-to rules The af-to rules on inbound direction create a single state spanning both the inbound and the outbound interface. Calling pf_test() for the outbound direction in pf_route() makes the packet pass through state search, match the existing state, never evaluate the ruleset, and increase state counters. Check that the state comes from an af-to rule in inbound direction, and if yes, skip outbound testing. Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D52446 --- sys/netpfil/pf/pf.c | 4 ++-- tests/sys/netpfil/pf/nat64.sh | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index ec6960180413..f50599627255 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9221,7 +9221,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, } } - if (r->rt == PF_DUPTO) + if (r->rt == PF_DUPTO || (pd->af != pd->naf && s->direction == PF_IN)) skip_test = true; if (pd->dir == PF_IN && !skip_test) { @@ -9538,7 +9538,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, } } - if (r->rt == PF_DUPTO) + if (r->rt == PF_DUPTO || (pd->af != pd->naf && s->direction == PF_IN)) skip_test = true; if (pd->dir == PF_IN && !skip_test) { diff --git a/tests/sys/netpfil/pf/nat64.sh b/tests/sys/netpfil/pf/nat64.sh index d930e2ee5763..d873d34a51d5 100644 --- a/tests/sys/netpfil/pf/nat64.sh +++ b/tests/sys/netpfil/pf/nat64.sh @@ -214,11 +214,11 @@ tcp_in_if_bound_body() fi # Interfaces of the state are reversed when doing inbound NAT64! - # FIXME: Packets counters seem wrong! + # FIXME: Packets from both directions are counted only on the inbound direction! states=$(mktemp) || exit 1 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states for state_regexp in \ - "${epair_link}a tcp 192.0.2.1:[0-9]+ \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:1234 \(64:ff9b::c000:202\[1234\]\) .* 9:9 pkts.* rule 3 .* origif: ${epair}b" \ + "${epair_link}a tcp 192.0.2.1:[0-9]+ \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:1234 \(64:ff9b::c000:202\[1234\]\) .* 9:0 pkts.* rule 3 .* origif: ${epair}b" \ ; do grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'" done @@ -296,11 +296,11 @@ tcp_in_floating_body() fi # Interfaces of the state are reversed when doing inbound NAT64! - # FIXME: Packets counters seem wrong! + # FIXME: Packets from both directions are counted only on the inbound direction! states=$(mktemp) || exit 1 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states for state_regexp in \ - "all tcp 192.0.2.1:[0-9]+ \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:1234 \(64:ff9b::c000:202\[1234\]\).* 9:9 pkts.* rule 3 .* origif: ${epair}b" \ + "all tcp 192.0.2.1:[0-9]+ \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:1234 \(64:ff9b::c000:202\[1234\]\).* 9:0 pkts.* rule 3 .* origif: ${epair}b" \ ; do grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'" done @@ -1045,8 +1045,10 @@ route_to_body() states=$(mktemp) || exit 1 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states + # Interfaces of the state are reversed when doing inbound NAT64! + # FIXME: Packets from both directions are counted only on the inbound direction! for state_regexp in \ - "${epair_link}a ipv6-icmp 192.0.2.1:.* \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:8 \(64:ff9b::c000:202\[[0-9]+\]\).*6:6 pkts.*route-to: 192.0.2.2@${epair_link}a origif: ${epair}b" \ + "${epair_link}a ipv6-icmp 192.0.2.1:.* \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:8 \(64:ff9b::c000:202\[[0-9]+\]\).* 6:0 pkts.*route-to: 192.0.2.2@${epair_link}a origif: ${epair}b" \ ; do grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'" done From nobody Sun Sep 28 17:25:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZWS82RfTz690lT; Sun, 28 Sep 2025 17:25: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZWS829vTz42gP; Sun, 28 Sep 2025 17:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759080344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=207kDHpM6EOP5VsAUpDhnbiMJJWOrw4fQXcuhMXW518=; b=nsQlg8f9jvZBoXt7M5h4qXA0wVB1sPfEpDIltQliXF66QRQH7lEZ2nwyD/RjPcfbFDS0H0 cLFbZFlUHKCzf0Y3AHBNVHxAZjH1+Nr7cN451Axki5BJ1GV0l5wlR6kQ9OW6sLLqiznTWP 9PfGbw9sB8tuDg1YqL7I+ULY7OuN1XQf5mKuli61kw3JlRhEChuBEmI1ulLMfFF9FpE0mh INA+OalEUYbV8B2fukmEW4qAA0gS5oycKw4f1TvkRqwSnmkBer/TGlSzhe01ZWdCXK+G8E JlLePrvlID3DaUZAU+cJ4lDv3BGWkBUd4ey/CzVGq26TPmOH5Rfl1yNuSfBSuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759080344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=207kDHpM6EOP5VsAUpDhnbiMJJWOrw4fQXcuhMXW518=; b=lExVqT3fap/W0v2b3UHtaSOjmNGR2QXPojyXonbliETM/GrakuVrzxaMCX2w5bIrziiCx8 vLP/ngbi1tzHpgr5GXn8+NSOWk1WVauQc6uqvnZ5anmV0mThuu2dq7b1R9rsmgVEV4J5d8 Ur1Ew4ykBG1f/+ylN1BbNmK2dzXJG7LisnGfq6VRrpjaZFOhZnyEfiOsGziSyWbj/tem8+ OuhYiYO+Qhg48074qhGUq98VJ5Y34Zbv0blLcapptpHWF/NVKIMkRSqRA5hvrVnBrES1qk lRWfgncUGl9qrjAjReEtGBkEfb5BmDU8lYgj9uJh6b4dQzrAWDiTtEQgIOM0aQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759080344; a=rsa-sha256; cv=none; b=wucXD4n+1IX9Nazi3awkMYK6XqH+ntSgwOduxyIxGIiFzJYJVLfEot9BqmWlp2lUPK7wc8 9IYUQJCdy9oP9t80U7cjfJ8y0j7qelWzYdjHcz7e5MDNVP2c8QvwU/iGV46NScc0BW9Qke W9wYrw9SaxF0iord1MhVLbBym2O3craiDM2fgrqaNfN4KoXIUfQkJYWtKZBS/KePKr2U1a KSDaaK4Ey8+yMwaHP4gwUbM/yxYft48CmYcoh7zLaPoxWP7JoUED90jZoaVWJwS0HMOt1p WxCWwDOVjIHm4mStrArH4kgFO6zrveuQtf0bxMcVGUaiQIONQLpcR2qdj+Vc/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZWS81k37zDLW; Sun, 28 Sep 2025 17:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SHPinx027399; Sun, 28 Sep 2025 17:25:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SHPiKL027396; Sun, 28 Sep 2025 17:25:44 GMT (envelope-from git) Date: Sun, 28 Sep 2025 17:25:44 GMT Message-Id: <202509281725.58SHPiKL027396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: 6353f5d9a5c6 - main - pf: Fix rule and state counters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6353f5d9a5c6f194bb014b8785a57f5314e8c652 Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=6353f5d9a5c6f194bb014b8785a57f5314e8c652 commit 6353f5d9a5c6f194bb014b8785a57f5314e8c652 Author: Kajetan Staszkiewicz AuthorDate: 2025-09-03 18:27:11 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2025-09-28 17:23:02 +0000 pf: Fix rule and state counters Increasing counters on "match" rules causes the 1st packet making a connection to be double-counted, but only for rule counters, not rules' tables, because those are not increased at all during rule parsing. Remove "match" rule counter handling during rule parsing, do it only in pf_counters_inc(). NAT can be performed either by "nat" rules in the NAT ruleset or by "match" rules. Rules before the NAT rule, and the NAT rule itself match on pre-NAT addresses, and later rules match on post-NAT addresses. When increasing counters go over rules in the same order as a packet would and use source and destination addresses for updating table counters from appropriate state key, taking into consideration on which rule NAT happens. Use AF from state key, so that table counters can be properly updated for af-to rules. Synchronize match rule updating behaviour to that of OpenBSD: if rules match, but state is not created, don't update counters. Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D52447 --- sys/net/pfvar.h | 7 +- sys/netpfil/pf/pf.c | 339 +++++++++------- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/counters.sh | 817 +++++++++++++++++++++++++++++++++++++++ tests/sys/netpfil/pf/nat64.sh | 26 +- tests/sys/netpfil/pf/utils.subr | 3 + 6 files changed, 1039 insertions(+), 154 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index c6a3448584ac..8aefe514946e 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1166,7 +1166,6 @@ struct pf_test_ctx { int rewrite; u_short reason; struct pf_src_node *sns[PF_SN_MAX]; - struct pf_krule_slist rules; struct pf_krule *nr; struct pf_krule *tr; struct pf_krule **rm; @@ -2724,8 +2723,10 @@ int pf_osfp_match(struct pf_osfp_enlist *, pf_osfp_t); #ifdef _KERNEL void pf_print_host(struct pf_addr *, u_int16_t, sa_family_t); -enum pf_test_status pf_step_into_anchor(struct pf_test_ctx *, struct pf_krule *); -enum pf_test_status pf_match_rule(struct pf_test_ctx *, struct pf_kruleset *); +enum pf_test_status pf_step_into_anchor(struct pf_test_ctx *, struct pf_krule *, + struct pf_krule_slist *match_rules); +enum pf_test_status pf_match_rule(struct pf_test_ctx *, struct pf_kruleset *, + struct pf_krule_slist *); void pf_step_into_keth_anchor(struct pf_keth_anchor_stackframe *, int *, struct pf_keth_ruleset **, struct pf_keth_rule **, struct pf_keth_rule **, diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f50599627255..9f250476cb75 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -344,10 +344,12 @@ static int pf_test_eth_rule(int, struct pfi_kkif *, struct mbuf **); static int pf_test_rule(struct pf_krule **, struct pf_kstate **, struct pf_pdesc *, struct pf_krule **, - struct pf_kruleset **, u_short *, struct inpcb *); + struct pf_kruleset **, u_short *, struct inpcb *, + struct pf_krule_slist *); static int pf_create_state(struct pf_krule *, struct pf_test_ctx *, - struct pf_kstate **, u_int16_t, u_int16_t); + struct pf_kstate **, u_int16_t, u_int16_t, + struct pf_krule_slist *match_rules); static int pf_state_key_addr_setup(struct pf_pdesc *, struct pf_state_key_cmp *, int); static int pf_tcp_track_full(struct pf_kstate *, @@ -393,7 +395,7 @@ static bool pf_src_connlimit(struct pf_kstate *); static int pf_match_rcvif(struct mbuf *, struct pf_krule *); static void pf_counters_inc(int, struct pf_pdesc *, struct pf_kstate *, struct pf_krule *, - struct pf_krule *); + struct pf_krule *, struct pf_krule_slist *); static void pf_log_matches(struct pf_pdesc *, struct pf_krule *, struct pf_krule *, struct pf_kruleset *, struct pf_krule_slist *); @@ -489,26 +491,30 @@ BOUND_IFACE(struct pf_kstate *st, struct pf_pdesc *pd) counter_u64_add(s->anchor->states_cur, 1); \ counter_u64_add(s->anchor->states_tot, 1); \ } \ - if (s->nat_rule != NULL) { \ - counter_u64_add(s->nat_rule->states_cur, 1);\ - counter_u64_add(s->nat_rule->states_tot, 1);\ + if (s->nat_rule != NULL && s->nat_rule != s->rule) { \ + counter_u64_add(s->nat_rule->states_cur, 1); \ + counter_u64_add(s->nat_rule->states_tot, 1); \ } \ SLIST_FOREACH(mrm, &s->match_rules, entry) { \ - counter_u64_add(mrm->r->states_cur, 1); \ - counter_u64_add(mrm->r->states_tot, 1); \ + if (s->nat_rule != mrm->r) { \ + counter_u64_add(mrm->r->states_cur, 1); \ + counter_u64_add(mrm->r->states_tot, 1); \ + } \ } \ } while (0) #define STATE_DEC_COUNTERS(s) \ do { \ struct pf_krule_item *mrm; \ - if (s->nat_rule != NULL) \ - counter_u64_add(s->nat_rule->states_cur, -1);\ - if (s->anchor != NULL) \ - counter_u64_add(s->anchor->states_cur, -1); \ counter_u64_add(s->rule->states_cur, -1); \ + if (s->anchor != NULL) \ + counter_u64_add(s->anchor->states_cur, -1); \ + if (s->nat_rule != NULL && s->nat_rule != s->rule) \ + counter_u64_add(s->nat_rule->states_cur, -1); \ SLIST_FOREACH(mrm, &s->match_rules, entry) \ - counter_u64_add(mrm->r->states_cur, -1); \ + if (s->nat_rule != mrm->r) { \ + counter_u64_add(mrm->r->states_cur, -1);\ + } \ } while (0) MALLOC_DEFINE(M_PFHASH, "pf_hash", "pf(4) hash header structures"); @@ -2869,20 +2875,24 @@ pf_alloc_state(int flags) return (uma_zalloc(V_pf_state_z, flags | M_ZERO)); } +static __inline void +pf_free_match_rules(struct pf_krule_slist *match_rules) { + struct pf_krule_item *ri; + + while ((ri = SLIST_FIRST(match_rules))) { + SLIST_REMOVE_HEAD(match_rules, entry); + free(ri, M_PF_RULE_ITEM); + } +} + void pf_free_state(struct pf_kstate *cur) { - struct pf_krule_item *ri; - KASSERT(cur->refs == 0, ("%s: %p has refs", __func__, cur)); KASSERT(cur->timeout == PFTM_UNLINKED, ("%s: timeout %u", __func__, cur->timeout)); - while ((ri = SLIST_FIRST(&cur->match_rules))) { - SLIST_REMOVE_HEAD(&cur->match_rules, entry); - free(ri, M_PF_RULE_ITEM); - } - + pf_free_match_rules(&(cur->match_rules)); pf_normalize_tcp_cleanup(cur); uma_zfree(V_pf_state_z, cur); pf_counter_u64_add(&V_pf_status.fcounters[FCNT_STATE_REMOVALS], 1); @@ -4740,7 +4750,8 @@ pf_tag_packet(struct pf_pdesc *pd, int tag) } while (0) enum pf_test_status -pf_step_into_anchor(struct pf_test_ctx *ctx, struct pf_krule *r) +pf_step_into_anchor(struct pf_test_ctx *ctx, struct pf_krule *r, + struct pf_krule_slist *match_rules) { enum pf_test_status rv; @@ -4758,7 +4769,7 @@ pf_step_into_anchor(struct pf_test_ctx *ctx, struct pf_krule *r) struct pf_kanchor *child; rv = PF_TEST_OK; RB_FOREACH(child, pf_kanchor_node, &r->anchor->children) { - rv = pf_match_rule(ctx, &child->ruleset); + rv = pf_match_rule(ctx, &child->ruleset, match_rules); if ((rv == PF_TEST_QUICK) || (rv == PF_TEST_FAIL)) { /* * we either hit a rule with quick action @@ -4769,7 +4780,7 @@ pf_step_into_anchor(struct pf_test_ctx *ctx, struct pf_krule *r) } } } else { - rv = pf_match_rule(ctx, &r->anchor->ruleset); + rv = pf_match_rule(ctx, &r->anchor->ruleset, match_rules); /* * Unless errors occured, stop iff any rule matched * within quick anchors. @@ -5618,9 +5629,10 @@ pf_rule_apply_nat(struct pf_test_ctx *ctx, struct pf_krule *r) } enum pf_test_status -pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) +pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset, + struct pf_krule_slist *match_rules) { - struct pf_krule_item *ri; + struct pf_krule_item *ri, *rt; struct pf_krule *r; struct pf_krule *save_a; struct pf_kruleset *save_aruleset; @@ -5777,11 +5789,14 @@ pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) return (PF_TEST_FAIL); } ri->r = r; - SLIST_INSERT_HEAD(&ctx->rules, ri, entry); - pf_counter_u64_critical_enter(); - pf_counter_u64_add_protected(&r->packets[pd->dir == PF_OUT], 1); - pf_counter_u64_add_protected(&r->bytes[pd->dir == PF_OUT], pd->tot_len); - pf_counter_u64_critical_exit(); + + if (SLIST_EMPTY(match_rules)) { + SLIST_INSERT_HEAD(match_rules, ri, entry); + } else { + SLIST_INSERT_AFTER(rt, ri, entry); + } + rt = ri; + pf_rule_to_actions(r, &pd->act); if (r->log) PFLOG_PACKET(r->action, PFRES_MATCH, r, @@ -5805,7 +5820,7 @@ pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) ctx->arsm = ctx->aruleset; } if (pd->act.log & PF_LOG_MATCHES) - pf_log_matches(pd, r, ctx->a, ruleset, &ctx->rules); + pf_log_matches(pd, r, ctx->a, ruleset, match_rules); if (r->quick) { ctx->test_status = PF_TEST_QUICK; break; @@ -5822,7 +5837,7 @@ pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) * Note: we don't need to restore if we are not going * to continue with ruleset evaluation. */ - if (pf_step_into_anchor(ctx, r) != PF_TEST_OK) { + if (pf_step_into_anchor(ctx, r, match_rules) != PF_TEST_OK) { break; } ctx->a = save_a; @@ -5838,11 +5853,11 @@ pf_match_rule(struct pf_test_ctx *ctx, struct pf_kruleset *ruleset) static int pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pf_pdesc *pd, struct pf_krule **am, - struct pf_kruleset **rsm, u_short *reason, struct inpcb *inp) + struct pf_kruleset **rsm, u_short *reason, struct inpcb *inp, + struct pf_krule_slist *match_rules) { struct pf_krule *r = NULL; struct pf_kruleset *ruleset = NULL; - struct pf_krule_item *ri; struct pf_test_ctx ctx; u_short transerror; int action = PF_PASS; @@ -5859,7 +5874,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, ctx.rsm = rsm; ctx.th = &pd->hdr.tcp; ctx.reason = *reason; - SLIST_INIT(&ctx.rules); pf_addrcpy(&pd->nsaddr, pd->src, pd->af); pf_addrcpy(&pd->ndaddr, pd->dst, pd->af); @@ -5952,7 +5966,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, } ruleset = &pf_main_ruleset; - rv = pf_match_rule(&ctx, ruleset); + rv = pf_match_rule(&ctx, ruleset, match_rules); if (rv == PF_TEST_FAIL) { /* * Reason has been set in pf_match_rule() already. @@ -5988,7 +6002,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, PFLOG_PACKET(r->action, ctx.reason, r, ctx.a, ruleset, pd, 1, NULL); } if (pd->act.log & PF_LOG_MATCHES) - pf_log_matches(pd, r, ctx.a, ruleset, &ctx.rules); + pf_log_matches(pd, r, ctx.a, ruleset, match_rules); if (pd->virtual_proto != PF_VPROTO_FRAGMENT && (r->action == PF_DROP) && ((r->rule_flag & PFRULE_RETURNRST) || @@ -6033,7 +6047,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, (pd->flags & PFDESC_TCP_NORM)))) { bool nat64; - action = pf_create_state(r, &ctx, sm, bproto_sum, bip_sum); + action = pf_create_state(r, &ctx, sm, bproto_sum, bip_sum, + match_rules); ctx.sk = ctx.nk = NULL; if (action != PF_PASS) { pf_udp_mapping_release(ctx.udp_mapping); @@ -6079,11 +6094,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, action = PF_AFRT; } } else { - while ((ri = SLIST_FIRST(&ctx.rules))) { - SLIST_REMOVE_HEAD(&ctx.rules, entry); - free(ri, M_PF_RULE_ITEM); - } - uma_zfree(V_pf_state_key_z, ctx.sk); uma_zfree(V_pf_state_key_z, ctx.nk); ctx.sk = ctx.nk = NULL; @@ -6111,11 +6121,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, return (action); cleanup: - while ((ri = SLIST_FIRST(&ctx.rules))) { - SLIST_REMOVE_HEAD(&ctx.rules, entry); - free(ri, M_PF_RULE_ITEM); - } - uma_zfree(V_pf_state_key_z, ctx.sk); uma_zfree(V_pf_state_key_z, ctx.nk); pf_udp_mapping_release(ctx.udp_mapping); @@ -6126,7 +6131,8 @@ cleanup: static int pf_create_state(struct pf_krule *r, struct pf_test_ctx *ctx, - struct pf_kstate **sm, u_int16_t bproto_sum, u_int16_t bip_sum) + struct pf_kstate **sm, u_int16_t bproto_sum, u_int16_t bip_sum, + struct pf_krule_slist *match_rules) { struct pf_pdesc *pd = ctx->pd; struct pf_kstate *s = NULL; @@ -6140,7 +6146,6 @@ pf_create_state(struct pf_krule *r, struct pf_test_ctx *ctx, struct tcphdr *th = &pd->hdr.tcp; u_int16_t mss = V_tcp_mssdflt; u_short sn_reason; - struct pf_krule_item *ri; /* check maximums */ if (r->max_states && @@ -6192,7 +6197,7 @@ pf_create_state(struct pf_krule *r, struct pf_test_ctx *ctx, s->rule = r; s->nat_rule = ctx->nr; s->anchor = ctx->a; - memcpy(&s->match_rules, &ctx->rules, sizeof(s->match_rules)); + s->match_rules = *match_rules; memcpy(&s->act, &pd->act, sizeof(struct pf_rule_actions)); if (pd->act.allow_opts) @@ -6356,11 +6361,6 @@ pf_create_state(struct pf_krule *r, struct pf_test_ctx *ctx, return (PF_PASS); csfailed: - while ((ri = SLIST_FIRST(&ctx->rules))) { - SLIST_REMOVE_HEAD(&ctx->rules, entry); - free(ri, M_PF_RULE_ITEM); - } - uma_zfree(V_pf_state_key_z, ctx->sk); uma_zfree(V_pf_state_key_z, ctx->nk); @@ -7518,6 +7518,7 @@ static void pf_sctp_multihome_delayed(struct pf_pdesc *pd, struct pfi_kkif *kif, struct pf_kstate *s, int action) { + struct pf_krule_slist match_rules; struct pf_sctp_multihome_job *j, *tmp; struct pf_sctp_source *i; int ret; @@ -7565,8 +7566,14 @@ again: if (s->rule->rule_flag & PFRULE_ALLOW_RELATED) { j->pd.related_rule = s->rule; } + SLIST_INIT(&match_rules); ret = pf_test_rule(&r, &sm, - &j->pd, &ra, &rs, &reason, NULL); + &j->pd, &ra, &rs, &reason, NULL, &match_rules); + /* + * Nothing to do about match rules, the processed + * packet has already increased the counters. + */ + pf_free_match_rules(&match_rules); PF_RULES_RUNLOCK(); SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->pd.m, ret); if (ret != PF_DROP && sm != NULL) { @@ -10685,108 +10692,149 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, return (0); } +static __inline void +pf_rule_counters_inc(struct pf_pdesc *pd, struct pf_krule *r, int dir_out, + int op_pass, sa_family_t af, struct pf_addr *src_host, + struct pf_addr *dst_host) +{ + pf_counter_u64_add_protected(&(r->packets[dir_out]), 1); + pf_counter_u64_add_protected(&(r->bytes[dir_out]), pd->tot_len); + pf_update_timestamp(r); + + if (r->src.addr.type == PF_ADDR_TABLE) + pfr_update_stats(r->src.addr.p.tbl, src_host, af, + pd->tot_len, dir_out, op_pass, r->src.neg); + if (r->dst.addr.type == PF_ADDR_TABLE) + pfr_update_stats(r->dst.addr.p.tbl, dst_host, af, + pd->tot_len, dir_out, op_pass, r->dst.neg); +} + static void -pf_counters_inc(int action, struct pf_pdesc *pd, - struct pf_kstate *s, struct pf_krule *r, struct pf_krule *a) +pf_counters_inc(int action, struct pf_pdesc *pd, struct pf_kstate *s, + struct pf_krule *r, struct pf_krule *a, struct pf_krule_slist *match_rules) { - struct pf_krule *tr; - int dir = pd->dir; - int dirndx; + struct pf_krule_slist *mr = match_rules; + struct pf_krule_item *ri; + struct pf_krule *nr = NULL; + struct pf_addr *src_host = pd->src; + struct pf_addr *dst_host = pd->dst; + struct pf_state_key *key; + int dir_out = (pd->dir == PF_OUT); + int op_pass = (r->action == PF_PASS); + sa_family_t af = pd->af; + int s_dir_in, s_dir_out, s_dir_rev; pf_counter_u64_critical_enter(); + pf_counter_u64_add_protected( - &pd->kif->pfik_bytes[pd->af == AF_INET6][dir == PF_OUT][action != PF_PASS], + &pd->kif->pfik_bytes[pd->af == AF_INET6][dir_out][action != PF_PASS], pd->tot_len); pf_counter_u64_add_protected( - &pd->kif->pfik_packets[pd->af == AF_INET6][dir == PF_OUT][action != PF_PASS], + &pd->kif->pfik_packets[pd->af == AF_INET6][dir_out][action != PF_PASS], 1); - if (action == PF_PASS || action == PF_AFRT || r->action == PF_DROP) { - dirndx = (dir == PF_OUT); - pf_counter_u64_add_protected(&r->packets[dirndx], 1); - pf_counter_u64_add_protected(&r->bytes[dirndx], pd->tot_len); - pf_update_timestamp(r); + /* If the rule has failed to apply, don't increase its counters */ + if (!(action == PF_PASS || action == PF_AFRT || r->action == PF_DROP)) { + pf_counter_u64_critical_exit(); + return; + } - if (a != NULL) { - pf_counter_u64_add_protected(&a->packets[dirndx], 1); - pf_counter_u64_add_protected(&a->bytes[dirndx], pd->tot_len); + if (s != NULL) { + PF_STATE_LOCK_ASSERT(s); + mr = &(s->match_rules); + + /* + * For af-to on the inbound direction we can determine + * the direction only by checking direction of AF translation, + * since the state is always "in" and so is packet's direction. + */ + if (pd->af != pd->naf && s->direction == PF_IN) { + dir_out = (pd->naf == s->rule->naf); + s_dir_in = 1; + s_dir_out = 0; + s_dir_rev = (pd->naf != s->rule->naf); + } + else { + dir_out = (pd->dir == PF_OUT); + s_dir_in = (s->direction == PF_IN); + s_dir_out = (s->direction == PF_OUT); + s_dir_rev = (pd->dir != s->direction); } - if (s != NULL) { - struct pf_krule_item *ri; - if (s->nat_rule != NULL) { - pf_counter_u64_add_protected(&s->nat_rule->packets[dirndx], + s->packets[s_dir_rev]++; + s->bytes[s_dir_rev] += pd->tot_len; + + /* + * Source nodes are accessed unlocked here. But since we are + * operating with stateful tracking and the state is locked, + * those SNs could not have been freed. + */ + for (pf_sn_types_t sn_type=0; sn_typesns[sn_type] != NULL) { + counter_u64_add( + s->sns[sn_type]->packets[dir_out], 1); - pf_counter_u64_add_protected(&s->nat_rule->bytes[dirndx], + counter_u64_add( + s->sns[sn_type]->bytes[dir_out], pd->tot_len); } - /* - * Source nodes are accessed unlocked here. - * But since we are operating with stateful tracking - * and the state is locked, those SNs could not have - * been freed. - */ - for (pf_sn_types_t sn_type=0; sn_typesns[sn_type] != NULL) { - counter_u64_add( - s->sns[sn_type]->packets[dirndx], - 1); - counter_u64_add( - s->sns[sn_type]->bytes[dirndx], - pd->tot_len); - } - } - dirndx = (dir == s->direction) ? 0 : 1; - s->packets[dirndx]++; - s->bytes[dirndx] += pd->tot_len; - - SLIST_FOREACH(ri, &s->match_rules, entry) { - pf_counter_u64_add_protected(&ri->r->packets[dirndx], 1); - pf_counter_u64_add_protected(&ri->r->bytes[dirndx], pd->tot_len); + } - if (ri->r->src.addr.type == PF_ADDR_TABLE) - pfr_update_stats(ri->r->src.addr.p.tbl, - (s == NULL) ? pd->src : - &s->key[(s->direction == PF_IN)]-> - addr[(s->direction == PF_OUT)], - pd->af, pd->tot_len, dir == PF_OUT, - r->action == PF_PASS, ri->r->src.neg); - if (ri->r->dst.addr.type == PF_ADDR_TABLE) - pfr_update_stats(ri->r->dst.addr.p.tbl, - (s == NULL) ? pd->dst : - &s->key[(s->direction == PF_IN)]-> - addr[(s->direction == PF_IN)], - pd->af, pd->tot_len, dir == PF_OUT, - r->action == PF_PASS, ri->r->dst.neg); + /* Start with pre-NAT addresses */ + key = s->key[(s->direction == PF_OUT)]; + src_host = &(key->addr[s_dir_out]); + dst_host = &(key->addr[s_dir_in]); + af = key->af; + if (s->nat_rule) { + /* Old-style NAT rules */ + if (s->nat_rule->action == PF_NAT || + s->nat_rule->action == PF_RDR || + s->nat_rule->action == PF_BINAT) { + nr = s->nat_rule; + pf_rule_counters_inc(pd, s->nat_rule, dir_out, + op_pass, af, src_host, dst_host); + /* Use post-NAT addresses from now on */ + key = s->key[s_dir_in]; + src_host = &(key->addr[s_dir_out]); + dst_host = &(key->addr[s_dir_in]); + af = key->af; } } + } - tr = r; - if (s != NULL && s->nat_rule != NULL && - r == &V_pf_default_rule) - tr = s->nat_rule; - - if (tr->src.addr.type == PF_ADDR_TABLE) - pfr_update_stats(tr->src.addr.p.tbl, - (s == NULL) ? pd->src : - &s->key[(s->direction == PF_IN)]-> - addr[(s->direction == PF_OUT)], - pd->af, pd->tot_len, dir == PF_OUT, - r->action == PF_PASS, tr->src.neg); - if (tr->dst.addr.type == PF_ADDR_TABLE) - pfr_update_stats(tr->dst.addr.p.tbl, - (s == NULL) ? pd->dst : - &s->key[(s->direction == PF_IN)]-> - addr[(s->direction == PF_IN)], - pd->af, pd->tot_len, dir == PF_OUT, - r->action == PF_PASS, tr->dst.neg); + SLIST_FOREACH(ri, mr, entry) { + pf_rule_counters_inc(pd, ri->r, dir_out, op_pass, af, + src_host, dst_host); + if (s && s->nat_rule == ri->r) { + /* Use post-NAT addresses after a match NAT rule */ + key = s->key[s_dir_in]; + src_host = &(key->addr[s_dir_out]); + dst_host = &(key->addr[s_dir_in]); + af = key->af; + } + } + + if (s == NULL) { + pf_free_match_rules(mr); } + + if (a != NULL) { + pf_rule_counters_inc(pd, a, dir_out, op_pass, af, + src_host, dst_host); + } + + if (r != nr) { + pf_rule_counters_inc(pd, r, dir_out, op_pass, af, + src_host, dst_host); + } + pf_counter_u64_critical_exit(); } + static void pf_log_matches(struct pf_pdesc *pd, struct pf_krule *rm, struct pf_krule *am, struct pf_kruleset *ruleset, - struct pf_krule_slist *matchrules) + struct pf_krule_slist *match_rules) { struct pf_krule_item *ri; @@ -10794,7 +10842,7 @@ pf_log_matches(struct pf_pdesc *pd, struct pf_krule *rm, if (rm->log & PF_LOG_MATCHES) return; - SLIST_FOREACH(ri, matchrules, entry) + SLIST_FOREACH(ri, match_rules, entry) if (ri->r->log & PF_LOG_MATCHES) PFLOG_PACKET(rm->action, PFRES_MATCH, rm, am, ruleset, pd, 1, ri->r); @@ -10811,6 +10859,8 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 struct pf_krule *a = NULL, *r = &V_pf_default_rule; struct pf_kstate *s = NULL; struct pf_kruleset *ruleset = NULL; + struct pf_krule_item *ri; + struct pf_krule_slist match_rules; struct pf_pdesc pd; int use_2nd_queue = 0; uint16_t tag; @@ -10847,6 +10897,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 } pf_init_pdesc(&pd, *m0); + SLIST_INIT(&match_rules); if (pd.pf_mtag != NULL && (pd.pf_mtag->flags & PF_MTAG_FLAG_ROUTE_TO)) { pd.pf_mtag->flags &= ~PF_MTAG_FLAG_ROUTE_TO; @@ -10943,7 +10994,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 action = PF_DROP; else action = pf_test_rule(&r, &s, &pd, &a, - &ruleset, &reason, inp); + &ruleset, &reason, inp, &match_rules); if (action != PF_PASS) REASON_SET(&reason, PFRES_FRAG); break; @@ -11001,7 +11052,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 break; } else { action = pf_test_rule(&r, &s, &pd, - &a, &ruleset, &reason, inp); + &a, &ruleset, &reason, inp, &match_rules); } } break; @@ -11022,7 +11073,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 a = s->anchor; } else if (s == NULL) { action = pf_test_rule(&r, &s, - &pd, &a, &ruleset, &reason, inp); + &pd, &a, &ruleset, &reason, inp, &match_rules); } break; @@ -11050,7 +11101,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 a = s->anchor; } else if (s == NULL) action = pf_test_rule(&r, &s, &pd, - &a, &ruleset, &reason, inp); + &a, &ruleset, &reason, inp, &match_rules); break; } @@ -11059,8 +11110,11 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 done: PF_RULES_RUNLOCK(); - if (pd.m == NULL) + /* if packet sits in reassembly queue, return without error */ + if (pd.m == NULL) { + pf_free_match_rules(&match_rules); goto eat_pkt; + } if (s) memcpy(&pd.act, &s->act, sizeof(s->act)); @@ -11157,6 +11211,8 @@ done: (dir == PF_IN) ? PF_DIVERT_MTAG_DIR_IN : PF_DIVERT_MTAG_DIR_OUT; + pf_counters_inc(action, &pd, s, r, a, &match_rules); + if (s) PF_STATE_UNLOCK(s); @@ -11198,7 +11254,6 @@ done: if (pd.act.log) { struct pf_krule *lr; - struct pf_krule_item *ri; if (s != NULL && s->nat_rule != NULL && s->nat_rule->log & PF_LOG_ALL) @@ -11217,7 +11272,7 @@ done: } } - pf_counters_inc(action, &pd, s, r, a); + pf_counters_inc(action, &pd, s, r, a, &match_rules); switch (action) { case PF_SYNPROXY_DROP: diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 7ddeb5369f47..99500fc90806 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -5,6 +5,7 @@ TESTS_SUBDIRS+= ioctl ATF_TESTS_SH+= altq \ anchor \ + counters \ debug \ divert-to \ dup \ diff --git a/tests/sys/netpfil/pf/counters.sh b/tests/sys/netpfil/pf/counters.sh new file mode 100644 index 000000000000..a0119b4710c1 --- /dev/null +++ b/tests/sys/netpfil/pf/counters.sh @@ -0,0 +1,817 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 Kajetan Staszkiewicz +# +# 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)/utils.subr + +get_counters() +{ + echo " === rules ===" + rules=$(mktemp) || exit + (jexec router pfctl -qvvsn ; jexec router pfctl -qvvsr) | normalize_pfctl_s > $rules + cat $rules + + echo " === tables ===" + tables=$(mktemp) || exit 1 + jexec router pfctl -qvvsT > $tables + cat $tables + + echo " === states ===" + states=$(mktemp) || exit 1 + jexec router pfctl -qvvss | normalize_pfctl_s > $states + cat $states + + echo " === nodes ===" + nodes=$(mktemp) || exit 1 + jexec router pfctl -qvvsS | normalize_pfctl_s > $nodes + cat $nodes +} + +atf_test_case "match_pass_state" "cleanup" +match_pass_state_head() +{ + atf_set descr 'Counters on match and pass rules' + atf_set require.user root +} + +match_pass_state_body() +{ + setup_router_server_ipv6 + + # Thest counters for a statefull firewall. Expose the behaviour of + # increasing table counters if a table is used multiple times. + # The table "tbl_in" is used both in match and pass rule. It's counters + # are incremented twice. The tables "tbl_out_match" and "tbl_out_pass" + # are used only once and have their countes increased only once. + # Test source node counters for this simple scenario too. + pft_set_rules router \ + "set state-policy if-bound" \ + "table { ${net_tester_host_tester} }" \ + "table { ${net_server_host_server} }" \ + "table { ${net_server_host_server} }" \ + "block" \ + "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "match in on ${epair_tester}b inet6 proto tcp from scrub (random-id)" \ + "pass in on ${epair_tester}b inet6 proto tcp from keep state (max-src-states 3 source-track rule)" \ + "match out on ${epair_server}a inet6 proto tcp to scrub (random-id)" \ + "pass out on ${epair_server}a inet6 proto tcp to keep state" + + # Use a real TCP connection so that it will be properly closed, guaranteeing the amount of packets. + atf_check -s exit:0 -o match:"This is a test" -x \ + "echo 'This is a test' | nc -w3 ${net_server_host_server} echo" + # Let FINs pass through. + sleep 1 + get_counters + + for rule_regexp in \ + "@3 match in on ${epair_tester}b .* Packets: 10 Bytes: 766 States: 1 " \ + "@4 pass in on ${epair_tester}b .* Packets: 10 Bytes: 766 States: 1 " \ + "@5 match out on ${epair_server}a .* Packets: 10 Bytes: 766 States: 1 " \ + "@6 pass out on ${epair_server}a .* Packets: 10 Bytes: 766 States: 1 " \ + ; do + grep -qE "${rule_regexp}" $rules || atf_fail "Rule regexp not found for '${rule_regexp}'" + done + + table_counters_single="Evaluations: NoMatch: 0 Match: 1 In/Block: Packets: 0 Bytes: 0 In/Pass: Packets: 4 Bytes: 311 In/XPass: Packets: 0 Bytes: 0 Out/Block: Packets: 0 Bytes: 0 Out/Pass: Packets: 6 Bytes: 455 Out/XPass: Packets: 0 Bytes: 0" + table_counters_double="Evaluations: NoMatch: 0 Match: 2 In/Block: Packets: 0 Bytes: 0 In/Pass: Packets: 12 Bytes: 910 In/XPass: Packets: 0 Bytes: 0 Out/Block: Packets: 0 Bytes: 0 Out/Pass: Packets: 8 Bytes: 622 Out/XPass: Packets: 0 Bytes: 0" + for table_test in \ + "tbl_in___${table_counters_double}" \ + "tbl_out_match___${table_counters_single}" \ + "tbl_out_pass___${table_counters_single}" \ + ; do + table_name=${table_test%%___*} + table_regexp=${table_test##*___} + table=$(mktemp) || exit 1 + cat $tables | grep -A10 $table_name | tr '\n' ' ' | awk '{gsub("[\\[\\]]", " ", $0); gsub("[[:blank:]]+"," ",$0); print $0}' > ${table} + grep -qE "${table_regexp}" ${table} || atf_fail "Bad counters for table ${table_name}" + done; + + for state_regexp in \ + "${epair_tester}b tcp ${net_server_host_server}.* <- ${net_tester_host_tester}.* 6:4 pkts, 455:311 bytes, rule 4," \ + "${epair_server}a tcp ${net_server_host_tester}.* -> ${net_server_host_server}.* 6:4 pkts, 455:311 bytes, rule 6," \ + ; do + grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'" + done + + for node_regexp in \ + "${net_tester_host_tester} -> :: .* 10 pkts, 766 bytes, filter rule 4, limit source-track"\ + ; do + grep -qE "${node_regexp}" $nodes || atf_fail "Source node not found for '${node_regexp}'" + done +} + +match_pass_state_cleanup() +{ + pft_cleanup +} + +atf_test_case "match_pass_no_state" "cleanup" +match_pass_no_state_head() +{ + atf_set descr 'Counters on match and pass rules without keep state' + atf_set require.user root +} + +match_pass_no_state_body() +{ + setup_router_server_ipv6 + + # Test counters for a stateless firewall. + # The table "tbl_in" is used both in match and pass rule in the inbound + # direction. The "In/Pass" counter is incremented twice. The table + # "tbl_inout" matches the same host on inbound and outbound direction. + # It will also be incremented twice. The tables "tbl_out_match" and + # "tbl_out_pass" will have their counters increased only once. + pft_set_rules router \ + "table { ${net_tester_host_tester} }" \ + "table { ${net_tester_host_tester} }" \ + "table { ${net_server_host_server} }" \ + "table { ${net_server_host_server} }" \ + "block" \ + "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "match in on ${epair_tester}b inet6 proto tcp from " \ + "match in on ${epair_tester}b inet6 proto tcp from " \ + "pass in on ${epair_tester}b inet6 proto tcp from no state" \ + "pass out on ${epair_tester}b inet6 proto tcp to no state" \ + "match in on ${epair_server}a inet6 proto tcp from " \ + "pass in on ${epair_server}a inet6 proto tcp from no state" \ + "match out on ${epair_server}a inet6 proto tcp from no state" \ + "pass out on ${epair_server}a inet6 proto tcp to no state" + + # Use a real TCP connection so that it will be properly closed, guaranteeing the amount of packets. + atf_check -s exit:0 -o match:"This is a test" -x \ + "echo 'This is a test' | nc -w3 ${net_server_host_server} echo" + sleep 1 + get_counters + + for rule_regexp in \ + "@3 match in on ${epair_tester}b .* Packets: 6 Bytes: 455 " \ + "@4 match in on ${epair_tester}b .* Packets: 6 Bytes: 455 " \ + "@5 pass in on ${epair_tester}b .* Packets: 6 Bytes: 455 " \ + "@6 pass out on ${epair_tester}b .* Packets: 4 Bytes: 311 " \ + "@7 match in on ${epair_server}a .* Packets: 4 Bytes: 311 " \ + "@8 pass in on ${epair_server}a .* Packets: 4 Bytes: 311 " \ + "@10 pass out on ${epair_server}a .* Packets: 6 Bytes: 455 " \ + ; do + grep -qE "${rule_regexp}" $rules || atf_fail "Rule regexp not found for '${rule_regexp}'" + done + + for table_test in \ + "tbl_in___Evaluations: NoMatch: 0 Match: 16 In/Block: Packets: 0 Bytes: 0 In/Pass: Packets: 12 Bytes: 910 In/XPass: Packets: 0 Bytes: 0 Out/Block: Packets: 0 Bytes: 0 Out/Pass: Packets: 4 Bytes: 311 Out/XPass: Packets: 0 Bytes: 0" \ + "tbl_out_match___Evaluations: NoMatch: 0 Match: 4 In/Block: Packets: 0 Bytes: 0 In/Pass: Packets: 4 Bytes: 311 In/XPass: Packets: 0 Bytes: 0 Out/Block: Packets: 0 Bytes: 0 Out/Pass: Packets: 0 Bytes: 0 Out/XPass: Packets: 0 Bytes: 0" \ + "tbl_out_pass___Evaluations: NoMatch: 0 Match: 10 In/Block: Packets: 0 Bytes: 0 In/Pass: Packets: 4 Bytes: 311 In/XPass: Packets: 0 Bytes: 0 Out/Block: Packets: 0 Bytes: 0 Out/Pass: Packets: 6 Bytes: 455 Out/XPass: Packets: 0 Bytes: 0" \ + "tbl_inout___Evaluations: NoMatch: 0 Match: 12 In/Block: Packets: 0 Bytes: 0 In/Pass: Packets: 6 Bytes: 455 In/XPass: Packets: 0 Bytes: 0 Out/Block: Packets: 0 Bytes: 0 Out/Pass: Packets: 6 Bytes: 455 Out/XPass: Packets: 0 Bytes: 0" \ + ; do + table_name=${table_test%%___*} + table_regexp=${table_test##*___} + table=$(mktemp) || exit 1 + cat $tables | grep -A10 $table_name | tr '\n' ' ' | awk '{gsub("[\\[\\]]", " ", $0); gsub("[[:blank:]]+"," ",$0); print $0}' > ${table} + grep -qE "${table_regexp}" ${table} || atf_fail "Bad counters for table ${table_name}" + done; +} + +match_pass_no_state_cleanup() +{ + pft_cleanup +} + +atf_test_case "match_block" "cleanup" +match_block_head() +{ + atf_set descr 'Counters on match and block rules' + atf_set require.user root +} + +match_block_body() +{ + setup_router_server_ipv6 + + # Stateful firewall with a blocking rule. The rule will have its + # counters increased because it matches and applies correctly. + # The "match" rule before the "pass" rule will have its counters + # increased for blocked traffic too. + pft_set_rules router \ + "set state-policy if-bound" \ + "table { ${net_server_host_server} }" \ + "table { ${net_server_host_server} }" \ + "block" \ + "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "match in on ${epair_tester}b inet6 proto tcp to scrub (random-id)" \ + "block in on ${epair_tester}b inet6 proto tcp to " \ + "pass out on ${epair_server}a inet6 proto tcp keep state" + + # Wait 3 seconds, that will cause 2 SYNs to be sent out. + echo 'This is a test' | nc -w3 ${net_server_host_server} echo + sleep 1 + get_counters + + for rule_regexp in \ + "@3 match in on ${epair_tester}b .* Packets: 2 Bytes: 160 States: 0 " \ + "@4 block drop in on ${epair_tester}b .* Packets: 2 Bytes: 160 States: 0 " \ + ; do + grep -qE "${rule_regexp}" $rules || atf_fail "Rule regexp not found for '${rule_regexp}'" + done + + # OpenBSD has (In|Out)/Match. We don't (yet) have it in FreeBSD + # so we follow the action of the "pass" rule ("block" for this test) + # in "match" rules. + for table_test in \ + "tbl_in_match___Evaluations: NoMatch: 0 Match: 2 In/Block: Packets: 2 Bytes: 160 In/Pass: Packets: 0 Bytes: 0 In/XPass: Packets: 0 Bytes: 0 Out/Block: Packets: 0 Bytes: 0 Out/Pass: Packets: 0 Bytes: 0 Out/XPass: Packets: 0 Bytes: 0" \ + "tbl_in_block___Evaluations: NoMatch: 0 Match: 2 In/Block: Packets: 2 Bytes: 160 In/Pass: Packets: 0 Bytes: 0 In/XPass: Packets: 0 Bytes: 0 Out/Block: Packets: 0 Bytes: 0 Out/Pass: Packets: 0 Bytes: 0 Out/XPass: Packets: 0 Bytes: 0" \ + ; do + table_name=${table_test%%___*} + table_regexp=${table_test##*___} + table=$(mktemp) || exit 1 + cat $tables | grep -A10 $table_name | tr '\n' ' ' | awk '{gsub("[\\[\\]]", " ", $0); gsub("[[:blank:]]+"," ",$0); print $0}' > ${table} + grep -qE "${table_regexp}" ${table} || atf_fail "Bad counters for table ${table_name}" + done; +} + +match_block_cleanup() +{ + pft_cleanup +} *** 693 LINES SKIPPED *** From nobody Sun Sep 28 17:25:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZWS94qHsz6915P; Sun, 28 Sep 2025 17:25: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZWS93G5zz42Jb; Sun, 28 Sep 2025 17:25:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759080345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/QnEqRRlhnl0uJ2GQ4JX1NAIjw34Xcc6FG2MvWenWxk=; b=k9PtotFmiDXRzd9CshknJ8ZLKqI9jUXpx2YeMw8P+PH9juqV1orawJN0JMWfWnhU7IgYY+ ZtsRYW4V/LqCXGZkGLzxPg0b5cmggHM06OCTto7yrjpEv/T4ZDJn0PXWK8CywzPuc8FgKP M7fUCH00jQ5hgZ/ywFUhNy0wZ92IP2mrLq3bkFJ2jMlk45hUaN33X3Xa+Ao/jZqRijaRqB X2Nam3Oy9Nx9AP/MQ2k2u8SSClrrbe3kYrwvB/P7g0+XtIdEgF0e3nxROjULjwBmZNCO8H uFIqZ8zNmImx1TjgM/90JaklLQiowLFD49lQVW7FtNzgc+jeM/y/MrKtmCTN4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759080345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/QnEqRRlhnl0uJ2GQ4JX1NAIjw34Xcc6FG2MvWenWxk=; b=DeM4v60OgOhTv/l+4CBBAp/kEm/mw6iMMnFnAJ+JG0MA0z296zM0xsm5oib9x13jWO8IJH QG+hydzfecObw4/jveUP26R1fumwYuKq94mfQSSWi7EaGKQ45TWy9taIkhy/OnOCL+aI7F aTS9igED7nVdlzAKicFBQ8vkMs8vKovkpFZCOzYdZldbxo0vcQchkIBQsaI3OYMtn2za21 KGXLZChWmK5xrwtyqejheGxvwzJLIk3QdyuNvLfWJaM3FwXObH/tWrYownmFwI1/dQenm3 Me01AANRH3Z33Budz2Jmsg1vWEoHWjUmOyGF4wAKlSVOXKHp8wEy5MFoJTAcpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759080345; a=rsa-sha256; cv=none; b=nif7YrQIAbBLF8YdJuVRC6e6kgrJnr4ENpqeMhQTLTfv+vg1BCv0WpQ8fbs/2VIvjW1QpQ 91zNbGk1UrkBZUjIJB+b1O1l53p8nUm/L+eTFiv7xqdk4gpuj79SWBJccGwPrBMxF4bpmJ 46gRDrGU6EsbYJaGHLDJrfnsZUnROT12MS2vgOI9fu+Yc5uJIcNjq5SVjfqLh5r4KNzIWC lo+qq+iyxoNQQ/e1BKL0yatKmTXI62oVsbUhBSEMQVXI+vDY3kDn0j4YHKs40MC54NekOH tTGih/ROdWQF5MCHKhwpJw2cQrfe86Qk5hmQxevNm7sM1+dPyhyh30cZsulJ4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZWS92qhBzDXW; Sun, 28 Sep 2025 17:25:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SHPjo1027432; Sun, 28 Sep 2025 17:25:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SHPj2B027429; Sun, 28 Sep 2025 17:25:45 GMT (envelope-from git) Date: Sun, 28 Sep 2025 17:25:45 GMT Message-Id: <202509281725.58SHPj2B027429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: 7cd3854f827f - main - pf: Fix interface counters for af-to rules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7cd3854f827faaad1ecf414d20bdf6802cfa60f8 Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=7cd3854f827faaad1ecf414d20bdf6802cfa60f8 commit 7cd3854f827faaad1ecf414d20bdf6802cfa60f8 Author: Kajetan Staszkiewicz AuthorDate: 2025-09-08 17:53:48 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2025-09-28 17:23:02 +0000 pf: Fix interface counters for af-to rules An inbound af-to rule creates a state bypassing outbound pf_test(). In such case increase counters of the outbound interface directly in pf_route() for post-af-to address family. For outbound af-to rules ensure that post-af-to address family is used to increase interface counters. Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D52448 --- sys/netpfil/pf/pf.c | 151 +++++++++++++++++++++++++-------------- tests/sys/netpfil/pf/counters.sh | 18 ++++- 2 files changed, 115 insertions(+), 54 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9f250476cb75..2c6d62078e6a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9231,25 +9231,38 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, if (r->rt == PF_DUPTO || (pd->af != pd->naf && s->direction == PF_IN)) skip_test = true; - if (pd->dir == PF_IN && !skip_test) { - if (pf_test(AF_INET, PF_OUT, PFIL_FWD, ifp, &m0, inp, - &pd->act) != PF_PASS) { - action = PF_DROP; - SDT_PROBE1(pf, ip, route_to, drop, __LINE__); - goto bad; - } else if (m0 == NULL) { - action = PF_DROP; - SDT_PROBE1(pf, ip, route_to, drop, __LINE__); - goto done; - } - if (m0->m_len < sizeof(struct ip)) { - DPFPRINTF(PF_DEBUG_URGENT, - "%s: m0->m_len < sizeof(struct ip)", __func__); - SDT_PROBE1(pf, ip, route_to, drop, __LINE__); - action = PF_DROP; - goto bad; + if (pd->dir == PF_IN) { + if (skip_test) { + struct pfi_kkif *out_kif = (struct pfi_kkif *)ifp->if_pf_kif; + MPASS(s != NULL); + pf_counter_u64_critical_enter(); + pf_counter_u64_add_protected( + &out_kif->pfik_bytes[pd->naf == AF_INET6][1] + [action != PF_PASS && action != PF_AFRT], pd->tot_len); + pf_counter_u64_add_protected( + &out_kif->pfik_packets[pd->naf == AF_INET6][1] + [action != PF_PASS && action != PF_AFRT], 1); + pf_counter_u64_critical_exit(); + } else { + if (pf_test(AF_INET, PF_OUT, PFIL_FWD, ifp, &m0, inp, + &pd->act) != PF_PASS) { + action = PF_DROP; + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); + goto bad; + } else if (m0 == NULL) { + action = PF_DROP; + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); + goto done; + } + if (m0->m_len < sizeof(struct ip)) { + DPFPRINTF(PF_DEBUG_URGENT, + "%s: m0->m_len < sizeof(struct ip)", __func__); + SDT_PROBE1(pf, ip, route_to, drop, __LINE__); + action = PF_DROP; + goto bad; + } + ip = mtod(m0, struct ip *); } - ip = mtod(m0, struct ip *); } if (ifp->if_flags & IFF_LOOPBACK) @@ -9548,26 +9561,39 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, if (r->rt == PF_DUPTO || (pd->af != pd->naf && s->direction == PF_IN)) skip_test = true; - if (pd->dir == PF_IN && !skip_test) { - if (pf_test(AF_INET6, PF_OUT, PFIL_FWD | PF_PFIL_NOREFRAGMENT, - ifp, &m0, inp, &pd->act) != PF_PASS) { - action = PF_DROP; - SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); - goto bad; - } else if (m0 == NULL) { - action = PF_DROP; - SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); - goto done; - } - if (m0->m_len < sizeof(struct ip6_hdr)) { - DPFPRINTF(PF_DEBUG_URGENT, - "%s: m0->m_len < sizeof(struct ip6_hdr)", - __func__); - action = PF_DROP; - SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); - goto bad; + if (pd->dir == PF_IN) { + if (skip_test) { + struct pfi_kkif *out_kif = (struct pfi_kkif *)ifp->if_pf_kif; + MPASS(s != NULL); + pf_counter_u64_critical_enter(); + pf_counter_u64_add_protected( + &out_kif->pfik_bytes[pd->naf == AF_INET6][1] + [action != PF_PASS && action != PF_AFRT], pd->tot_len); + pf_counter_u64_add_protected( + &out_kif->pfik_packets[pd->naf == AF_INET6][1] + [action != PF_PASS && action != PF_AFRT], 1); + pf_counter_u64_critical_exit(); + } else { + if (pf_test(AF_INET6, PF_OUT, PFIL_FWD | PF_PFIL_NOREFRAGMENT, + ifp, &m0, inp, &pd->act) != PF_PASS) { + action = PF_DROP; + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); + goto bad; + } else if (m0 == NULL) { + action = PF_DROP; + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); + goto done; + } + if (m0->m_len < sizeof(struct ip6_hdr)) { + DPFPRINTF(PF_DEBUG_URGENT, + "%s: m0->m_len < sizeof(struct ip6_hdr)", + __func__); + action = PF_DROP; + SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); + goto bad; + } + ip6 = mtod(m0, struct ip6_hdr *); } - ip6 = mtod(m0, struct ip6_hdr *); } if (ifp->if_flags & IFF_LOOPBACK) @@ -10720,21 +10746,32 @@ pf_counters_inc(int action, struct pf_pdesc *pd, struct pf_kstate *s, struct pf_addr *dst_host = pd->dst; struct pf_state_key *key; int dir_out = (pd->dir == PF_OUT); - int op_pass = (r->action == PF_PASS); - sa_family_t af = pd->af; + int op_r_pass = (r->action == PF_PASS); + int op_pass = (action == PF_PASS || action == PF_AFRT); int s_dir_in, s_dir_out, s_dir_rev; + sa_family_t af = pd->af; pf_counter_u64_critical_enter(); + /* + * Set AF for interface counters, it will be later overwritten for + * rule and state counters with value from proper state key. + */ + if (action == PF_AFRT) { + MPASS(s != NULL); + if (s->direction == PF_OUT && dir_out) + af = pd->naf; + } + pf_counter_u64_add_protected( - &pd->kif->pfik_bytes[pd->af == AF_INET6][dir_out][action != PF_PASS], + &pd->kif->pfik_bytes[af == AF_INET6][dir_out][!op_pass], pd->tot_len); pf_counter_u64_add_protected( - &pd->kif->pfik_packets[pd->af == AF_INET6][dir_out][action != PF_PASS], + &pd->kif->pfik_packets[af == AF_INET6][dir_out][!op_pass], 1); /* If the rule has failed to apply, don't increase its counters */ - if (!(action == PF_PASS || action == PF_AFRT || r->action == PF_DROP)) { + if (!(op_pass || r->action == PF_DROP)) { pf_counter_u64_critical_exit(); return; } @@ -10745,22 +10782,32 @@ pf_counters_inc(int action, struct pf_pdesc *pd, struct pf_kstate *s, /* * For af-to on the inbound direction we can determine - * the direction only by checking direction of AF translation, - * since the state is always "in" and so is packet's direction. + * the direction of passing packet only by checking direction + * of AF translation. The af-to in "in" direction covers both + * the inbound and the outbound side of state tracking, + * so pd->dir is always PF_IN. We set dir_out and s_dir_rev + * in a way to count packets as if the state was outbound, + * because pfctl -ss shows the state with "->", as if it was + * oubound. */ - if (pd->af != pd->naf && s->direction == PF_IN) { + if (action == PF_AFRT && s->direction == PF_IN) { dir_out = (pd->naf == s->rule->naf); s_dir_in = 1; s_dir_out = 0; - s_dir_rev = (pd->naf != s->rule->naf); - } - else { + s_dir_rev = (pd->naf == s->rule->af); + } else { dir_out = (pd->dir == PF_OUT); s_dir_in = (s->direction == PF_IN); s_dir_out = (s->direction == PF_OUT); s_dir_rev = (pd->dir != s->direction); } + /* pd->tot_len is a problematic with af-to rules. Sure, we can + * agree that it's the post-af-to packet length that was + * forwarded through a state, but what about tables which match + * on pre-af-to addresses? We don't have access the the original + * packet length anymore. + */ s->packets[s_dir_rev]++; s->bytes[s_dir_rev] += pd->tot_len; @@ -10792,7 +10839,7 @@ pf_counters_inc(int action, struct pf_pdesc *pd, struct pf_kstate *s, s->nat_rule->action == PF_BINAT) { nr = s->nat_rule; pf_rule_counters_inc(pd, s->nat_rule, dir_out, - op_pass, af, src_host, dst_host); + op_r_pass, af, src_host, dst_host); /* Use post-NAT addresses from now on */ key = s->key[s_dir_in]; src_host = &(key->addr[s_dir_out]); @@ -10803,7 +10850,7 @@ pf_counters_inc(int action, struct pf_pdesc *pd, struct pf_kstate *s, } SLIST_FOREACH(ri, mr, entry) { - pf_rule_counters_inc(pd, ri->r, dir_out, op_pass, af, + pf_rule_counters_inc(pd, ri->r, dir_out, op_r_pass, af, src_host, dst_host); if (s && s->nat_rule == ri->r) { /* Use post-NAT addresses after a match NAT rule */ @@ -10819,12 +10866,12 @@ pf_counters_inc(int action, struct pf_pdesc *pd, struct pf_kstate *s, } if (a != NULL) { - pf_rule_counters_inc(pd, a, dir_out, op_pass, af, + pf_rule_counters_inc(pd, a, dir_out, op_r_pass, af, src_host, dst_host); } if (r != nr) { - pf_rule_counters_inc(pd, r, dir_out, op_pass, af, + pf_rule_counters_inc(pd, r, dir_out, op_r_pass, af, src_host, dst_host); } diff --git a/tests/sys/netpfil/pf/counters.sh b/tests/sys/netpfil/pf/counters.sh index a0119b4710c1..20d7dc3c6d89 100644 --- a/tests/sys/netpfil/pf/counters.sh +++ b/tests/sys/netpfil/pf/counters.sh @@ -684,7 +684,7 @@ nat64_in_body() "table { 64:ff9b::${net_server1_4_host_server} }" \ "table { ${net_tester_6_host_tester} }" \ "table { 64:ff9b::${net_server1_4_host_server} }" \ - "block" \ + "block log" \ "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ "match in on ${epair_tester}b inet6 proto tcp from to scrub (random-id)" \ "pass in on ${epair_tester}b inet6 proto tcp from to \ @@ -726,6 +726,13 @@ nat64_in_body() ; do grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'" done + + echo " === interfaces === " + echo " === tester === " + jexec router pfctl -qvvsI -i ${epair_tester}b + echo " === server === " + jexec router pfctl -qvvsI -i ${epair_server1}a + echo " === " } nat64_in_cleanup() @@ -753,7 +760,7 @@ nat64_out_body() "table { 64:ff9b::${net_server1_4_host_server} }" \ "table { ${net_tester_6_host_tester} }" \ "table { 64:ff9b::${net_server1_4_host_server} }" \ - "block" \ + "block log " \ "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ "pass in on ${epair_tester}b inet6 proto tcp keep state" \ "match out on ${epair_server1}a inet6 proto tcp from to scrub (random-id)" \ @@ -794,6 +801,13 @@ nat64_out_body() ; do grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'" done + + echo " === interfaces === " + echo " === tester === " + jexec router pfctl -qvvsI -i ${epair_tester}b + echo " === server === " + jexec router pfctl -qvvsI -i ${epair_server1}a + echo " === " } nat64_out_cleanup() From nobody Sun Sep 28 20:06:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZb291017z68C0P; Sun, 28 Sep 2025 20:06: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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZb286khTz4P8Q; Sun, 28 Sep 2025 20:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759090017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l7v688oflN4OIyDI1L2DY3h3c5JhMId88m9b/NMyG2k=; b=uZqNaCLWvJBfu0qTiZ//bg/bvc0m0T2FhN+XG/zYlrhFq9+z7ffrDo+gVblywTxo3r46xI W+QKHOU4xgIWMa41ZRW/vYXyuQe9/k292wvHJ0BeWtQkJODbvyaGBhSgQwu7HvtpSSxqi9 uZFqmNtEnHadAe2vu8jn2Eabtx+H/R2YA9UumuLSq26tEWIfvWuvPIG6/4KjX7R+x/hgg6 YE1WdzxOrOrI7rVJoiGtdQXKCMRVl9s/S+f4hrCGRDFk+KqiHHK+dkFTIo6DL0KFxUDgH0 yTmrcLAo07KxJCgQWIhA0lBw+N8wiV/JjJXFuVTa4QBru4sYYfV1r2D9pv69AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759090016; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l7v688oflN4OIyDI1L2DY3h3c5JhMId88m9b/NMyG2k=; b=Ojh7JXgPGYNJ2ZUKTNhDw7FFaEDxmayK7UUL3/nuIMDDalnJjlXvXb5/Fnvj4ywcOeqHhC UzLtafcgJCsARIu8N7zfG38t7QDK34ZWt7CBWEdKZJ7v3aY6pvhKTVuf2bxj8CvaMJDt72 6C50PX+GSj56oxkN8WuqE8VoRMJ8IUIG/Z9UMCdK5N7kxDhB54XGqkkSvDrU3HTn9WefMa kdJcddn5jm+Re0g31I8ejDnoYpxAMjhJ48VeJQZVcGmzDgn/iC++jysGbWEtwi5/zpP2gO 8FUbud533r8WwgrmzlkQMcsEyUaTBG5bmbzx3EcopE842/wUb5h1QM4oDfcCUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759090016; a=rsa-sha256; cv=none; b=hJmHRNO8g0eYh4kGAKL8AjbtHPVSLqm0Pc/r07hJXib3vI7Cmhuux/SY3WGCXFpfd8zcAH PQLUQWZX5qqOS/UZJcvwLByMojLTTYj/HWQNQmNW0a1G60WwDkGiNmMPtTgYbSxiImrfKe 9pRG70oABhIn6OGpORpFvE/7O7P8+BcA/UFjQUNRUyj04UWObqFd5rMvUIRSl68XA5YFzc UbvlHQB0vIdEgnP1rFtvQAhQXHU2cJpCbXRU4CqCGAOoZpGRbd2FkJ1mJXQw7Zerdo9xaX ERrkjbKiuvZBztTX7X4f7xcYRqmz6Q2TPFwjaocTXWtPti+W2hHetbANP6BDXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZb286Cm2zbWp; Sun, 28 Sep 2025 20:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58SK6uVG027230; Sun, 28 Sep 2025 20:06:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58SK6upA027227; Sun, 28 Sep 2025 20:06:56 GMT (envelope-from git) Date: Sun, 28 Sep 2025 20:06:56 GMT Message-Id: <202509282006.58SK6upA027227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladlen Popolitov Subject: git: 008d04b297c7 - main - vladlen@ joins comitters-doc and calendar.freebsd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vladlen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 008d04b297c700ed386a4e846c1834ade7255043 Auto-Submitted: auto-generated The branch main has been updated by vladlen: URL: https://cgit.FreeBSD.org/src/commit/?id=008d04b297c700ed386a4e846c1834ade7255043 commit 008d04b297c700ed386a4e846c1834ade7255043 Author: Vladlen Popolitov AuthorDate: 2025-09-28 09:34:09 +0000 Commit: Vladlen Popolitov CommitDate: 2025-09-28 19:44:33 +0000 vladlen@ joins comitters-doc and calendar.freebsd Reviewed by: maxim (mentor) Approved by: maxim (mentor) Differential Revision: https://reviews.freebsd.org/D52769 --- share/misc/committers-doc.dot | 2 ++ usr.bin/calendar/calendars/calendar.freebsd | 1 + 2 files changed, 3 insertions(+) diff --git a/share/misc/committers-doc.dot b/share/misc/committers-doc.dot index ba4c229bc658..8c9fe4cf9991 100644 --- a/share/misc/committers-doc.dot +++ b/share/misc/committers-doc.dot @@ -106,6 +106,7 @@ rene [label="Rene Ladan\nrene@FreeBSD.org\n2008/11/03"] ryusuke [label="Ryusuke Suzuki\nryusuke@FreeBSD.org\n2009/12/21"] salvadore [label="Lorenzo Salvadore\nsalvadore@FreeBSD.org\n2023/03/20"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/03/25"] +vladlen [label="Vladlen Popolitov\nvladlen@FreeBSD.org\n2025/09/09"] ygy [label="Guangyuan Yang\nygy@FreeBSD.org\n2017/09/18"] ziaee [label="Alexander Ziaee\nziaee@FreeBSD.org\n2024/12/30"] @@ -208,6 +209,7 @@ marck -> pluknet marck -> taras maxim -> taras +maxim -> vladlen mheinen -> jkois diff --git a/usr.bin/calendar/calendars/calendar.freebsd b/usr.bin/calendar/calendars/calendar.freebsd index 1ca63b371f65..a664f5d1145c 100644 --- a/usr.bin/calendar/calendars/calendar.freebsd +++ b/usr.bin/calendar/calendars/calendar.freebsd @@ -146,6 +146,7 @@ 03/29 Dave Cottlehuber born in Christchurch, New Zealand, 1973 03/29 Thierry Thomas born in Luxeuil les Bains, France, 1961 03/30 Po-Chuan Hsieh born in Taipei, Taiwan, Republic of China, 1978 +03/31 Vladlen Popolitov born in Lipetsk region, USSR, 1969 04/01 Matthew Jacob born in San Francisco, California, United States, 1958 04/01 Alexander V. Chernikov born in Moscow, Russian Federation, 1984 04/01 Bill Fenner born in Bellefonte, Pennsylvania, United States, 1971