From nobody Sun Sep 24 00:28:22 2023 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 4RtRgq1n5mz4vTYG for ; Sun, 24 Sep 2023 00:28:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-21.consmr.mail.gq1.yahoo.com (sonic317-21.consmr.mail.gq1.yahoo.com [98.137.66.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 4RtRgp2pf7z4L2Z for ; Sun, 24 Sep 2023 00:28:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=CIrDBiXt; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695515316; bh=JkHpUvd1TLBFL3QVPUjokWLk0nQZWHrMoqj7I5pBcGQ=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=CIrDBiXt+Bssgt/Nn/jpcpTR1KiCQ+NONss7bNYR9NrQaCV9bCUa3UILYC+uzcw/aIcjrn24l0VHI8u1t0ReXL7YuNHhqwFHMQh8e6lUZ6x9dItAtv6eEJjZjbOxx2bPhtdB4W1vjFNaYcNky6p2uZldtuo4xabkmRObdS5nZcdRt24Vhy3O6K5ZYr7iMgpZ7992yshg+pKqC4GMjqyFdO3DHqtg2H2SXW9TtsmAtU7kyMptoyB8PxIJAI88jmgABAtaqvAcSezzfeellNU/GoNG35WovdbyBDl7nNu8bpWQC2MU/+BHn0n+0A5fVbI6tTprq0CnLJJ22O3s0b1+xQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695515316; bh=4vlVsVcLAABXAfugmZ29gF1zFYjqTMLi5oS6HM3/Pb0=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=lZZf5eFD6MkYn+VNJ84GIsidde8k0lOcizEod1OejfbwpCIYWEkooovWNgbrUj3X7cV82HP5Ta3VhsijdfNpYqMqT5u0F8LxVDwlW79BE0/T+CM5Wotd6xihKGM7/FCqsxjosrShHH/Ji9dO8sNRypgGjLQaH1bMtrdqdo4S2fcbHdko0eJisij0BUjZuDJRVIU9gO9xUOsUJmXmgFJT6cAen0JUW83yNE6/JpGfPnRNJtSkdWbyfoe1h8qDahbEFTr2gMAqSL7NJCj0pYytOi7MnqglViPka93v7JgX6xG4ew9530Hdd5aoTzssLNx3/55PtQnPuSwu3h8gdugVtA== X-YMail-OSG: 9DOxSUMVM1kBMe4Ktxd_Kz9zYjdR2w.nI6VWNEwJHwVpuX0TDkZjMt.WLTDXRYQ MS8CEetgj0zLfXLMmHrhZ40iG_sH_Mz31TNuxRhQhlPRJ99dIl5Ov1teqUBxe1GcXmH1ix2EtlUa O7UsuSY6RcgC1xvj4ksG8gH0F_fTq2c9SvgoiwjnuNxti2AguaOJ1K8ACKJaPp.aNtaptRuK4DUM smdrECDzEyfD74WWWuFMt2rZNCz0tD3JEAa3VtqE63TUQiIM6w0NMMGJQEr.rHZpUN0Rn8QoBJn0 kOC9GSg16BiMwKtoeKGpF4jpUXAUVAXgNzQKo17lnqX4hqLSsJ_RRa7hWKnO4SnnVz12sPuoKeIc 1HLPwaClgCpl.HzYxgUT_yuWq0d3uxRNOMRGrszJEFdBmq_sFiO7406gHryuLohR6XQmhlQkmq.q soaw9_zTfWxow88aBi0p28mLhWMYFGzssoSNbHCCoELKimIEOwf8Z8HgyNSbsEkZW5q6VTG6p3vO mBD6yM4a98.6trvIes0WTEfGJl5gudXeWCUTuFExRvrPDtZS530sB6pe_ZLCMV4h539q8EVJKIGq NgPxSogLUeCdlnv_oUMD5bQsCZytTk1_rVYPBc9SVrFhRivS42o56sx1gv0wIW.hKV.ON7mBs8s_ EtBpY8r7RnNi7.fjBmQxI2RVr6wVVDLhE3IG0o6ztPMY9ypuesy7Xaw57XwHyfiNBWmpuaIMNdNL i5rT3_v26.PsEc4sRDI4xjCFtcE2l6vj6eeuBONCnET0rAcB2UU4EN9HOQgZJfC6qseby3MHtSMR UabPu8eBxWadItemuqDn4rzE6UfsmJYgBZjtuDuTYBkDbAnINDrOO9dFGQip624bHnuMmyxmLVSH Fuaw1LAgRNoTATwL78XweGmkwaUI8USRoPjjIB__kEu2TDD2v9M8Mbd_rZ2rgeiDfZrM2iXHygC7 BXUALPFt3A.1kWi1HhwQNidX3ETBbLiMt902YCpQ5JumNDZvAOOJTt8nUDIRu59bppinlaq1tgur C44iOF5AgFXlKj8pwxwfClNN1Fmg32ALguqz0TJ0DSrNmuhHzZzrOlwOpqNnI_46gR9MLiHBj_3h pwp76JsWnKbtZhUP4Iya5rqBU9rhImKlABTncLb6b8MXSHKclGz70zXkz3c6KEyDGQ8TGIqUeVT4 bXlMG7CObIppFl4htr0Rnxjtp9cw1eqQkU4qHJsiIDzEK.TWKEJmLqhxu7PXUqR6hPx_JUncnLhS WQ20A0WDVGge7EOvrb6YDL2Mc3dSMexACfWL8E3mKUc15etgpzDj0umW6ovXSCQJcHKpVixJyEOD fn9lLMCakFh_gvEGBulOHJMWjPw9CRu2AIQojjNrW3oTK666.bCWODMu9kqnQpdlscZoUn9WKbpo EoTNcqjzcipsiB_aSov431W56uUb.UftrBsYl6Dlzc4QK.yac1Ss7IJz8uczofmwiWfR_cFwuT9_ 2n6kGYJO2RJS7lBQQ6JxxrwHN85JoPAe02gvJR9DX5CxmsHAMD64kLT62MSNLgMiYQSwhnn9Zudn X4mzJ9c5b12bQC0piUHqIyJGoPBjNt_sIoATPlNcCz6grwTjSWvfY7kcVTWIJbP6LMTmoHStje4E z6QeezE5OS1sBFA04zbTyUSh4rUxBHTa8gvj5BVlPPtHNH4zd7_XM_UlP9Vsh0I_1UtgqTZScqVq tuNAIk3KNrlddano_sNAXnu6pcbMf9uJeJT3IHML4LRWAL4xZd_7LcE0hTYvJ0RL5f5wwiZBHu37 oQSgdXlMA_79o1r30YmPS.ziIApwbzX3pRBnki0sHnsQwTQBO5Q1WrCZ49cgJbqib6MikCPN0bUo 3B9MfjQ7b4r80t1yZ8V75UiumY9YRYbkuizgkNuRgxu0GFLdYpQJZ7MHrKXB860wNQ5C9w6DhrzS _uQjL.N9M5BtcDyo2uFOhk4hYd2JXkyL07zFzaLxyHmzeYmcW7lxX3S4NsKBbT.22MV.u8awsDeu _VjlDjaNujqGvsV1NpbFws7cG_zWX4pDCtI7y_QYP2T9GTgRrdAW4B.wrbU369oCAgKndUIamzTh uiykfXvxutEiDv6BgFoRkF58si.3cEME36qOiaOLt7BWOiZHeCYD6Yp7oYcq0jY0uq13y36mkXoz ilsBJxJcbKrqzP9Di8XKabWscsocPvDLbEU7Gecen_IRlRt3LwbpEn3BwXbS5.58o9rZ6sDKwQAF Ptj5uvZ94s2.CcKMt_LOjYQ5IGt1zD7l5xcF4VTn3UyYLKT6_OMEyT90jkNOcu.SZuCrQm5rpeCn JV96jOog- X-Sonic-MF: X-Sonic-ID: 5ed3b9b5-07e4-454e-810d-7a7787c3a75e Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Sun, 24 Sep 2023 00:28:36 +0000 Received: by hermes--production-gq1-77657878bb-9nwx5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 277da1c44dc511c791316911bcff872c; Sun, 24 Sep 2023 00:28:33 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: f9df60975087 - main - Add support for host32 for DIRDEPS_BUILD From: Mark Millard In-Reply-To: <8033.1695509469@kaos.jnpr.net> Date: Sat, 23 Sep 2023 17:28:22 -0700 Cc: Mike Karels , stevek@juniper.net, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <79F167D9-DF7A-4714-92EE-3B9FBB7BF912.ref@yahoo.com> <79F167D9-DF7A-4714-92EE-3B9FBB7BF912@yahoo.com> <2401.1695508551@kaos.jnpr.net> <8033.1695509469@kaos.jnpr.net> To: "Simon J. Gerraty" X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(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]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.147:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.147:from]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RtRgp2pf7z4L2Z On Sep 23, 2023, at 15:51, Simon J. Gerraty wrote: > Simon J. Gerraty wrote: >>> Looks like this broke lib32 builds via it ending up using >>> the default: >>>=20 >>> -target armv7-unknown-freebsd >>>=20 >>> instead of the correct: >>>=20 >>> -target armv7-unknown-freebsd15.0-gnueabihf >>=20 >> Sorry. >>=20 >> That would be easier to fix/control if a separate variable >> is used to hold just the -target flag=20 >>=20 >> That way bsd.compat.mk could reset that varaible if needed with no = harm >> done. >>=20 >=20 > Does the following look like it would DTRT for you? > Not sure about COMPILER_TYPE vs COMPAT_COMPILER_TYPE I reported strictly based on noticing the official FreeBSD Jenkins activity having build failures. My environment is currently based on a commit that is a day or two before your change, so I'd need to progress in order to be able to test anything that fixed the operation. I expect that Mike Karels would be a better one to comment on any alternate structuring for having the build environment always be explicit for its aarch64 -m32 use, at least based on preexisting familiarity with where and how things are used. Last I tried, gcc12 based builds did not work/finish for aarch64, even though amd64 was working at the time. It seemed that the status was not a surprise to folks. Correctly covering gcc12 use for this issue may well still end up with a broken/incomplete aarch64+LIB32 build via gcc12 --for other reasons. (E-mail has a tendency to not preserve leading whitespace.) > diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk > index = 0c387bcb020c67ea6eda8fc1f4956eebf098e2a2..1e82df42391c4cec341ad368cb477fe4= a14c84b8 100644 > --- a/share/mk/bsd.compat.mk > +++ b/share/mk/bsd.compat.mk > @@ -26,16 +26,18 @@ COMPAT_COMPILER_TYPE=3D${COMPILER_TYPE} >=20 > # ------------------------------------------------------------------- > # 32 bit world > +LIB32CPUFLAGS=3D ${LIB32CPUFLAGS.${COMPAT_COMPILER_TYPE}:U} > +LIB32CPUFLAGS.clang=3D -target ${CROSS_TARGET.clang} > .if ${COMPAT_ARCH} =3D=3D "amd64" > HAS_COMPAT+=3D 32 > .if empty(LIB32CPUTYPE) > -LIB32CPUFLAGS=3D -march=3Di686 -mmmx -msse -msse2 > +LIB32CPUFLAGS+=3D -march=3Di686 -mmmx -msse -msse2 > .else > -LIB32CPUFLAGS=3D -march=3D${LIB32CPUTYPE} > +LIB32CPUFLAGS+=3D -march=3D${LIB32CPUTYPE} > .endif > .if ${COMPAT_COMPILER_TYPE} =3D=3D gcc > .else > -LIB32CPUFLAGS+=3D -target x86_64-unknown-freebsd${OS_REVISION} > +CROSS_TARGET.clang=3D x86_64-unknown-freebsd${OS_REVISION} > .endif > LIB32CPUFLAGS+=3D -m32 > LIB32_MACHINE=3D i386 > @@ -47,15 +49,15 @@ LIB32WMAKEFLAGS=3D \ > .elif ${COMPAT_ARCH} =3D=3D "powerpc64" > HAS_COMPAT+=3D 32 > .if empty(LIB32CPUTYPE) > -LIB32CPUFLAGS=3D -mcpu=3Dpowerpc > +LIB32CPUFLAGS+=3D -mcpu=3Dpowerpc > .else > -LIB32CPUFLAGS=3D -mcpu=3D${LIB32CPUTYPE} > +LIB32CPUFLAGS+=3D -mcpu=3D${LIB32CPUTYPE} > .endif >=20 > .if ${COMPAT_COMPILER_TYPE} =3D=3D "gcc" > LIB32CPUFLAGS+=3D -m32 > .else > -LIB32CPUFLAGS+=3D -target powerpc-unknown-freebsd${OS_REVISION} > +CROSS_TARGET.clang=3D powerpc-unknown-freebsd${OS_REVISION} > .endif >=20 > LIB32_MACHINE=3D powerpc > @@ -66,15 +68,15 @@ LIB32WMAKEFLAGS=3D \ > .elif ${COMPAT_ARCH} =3D=3D "aarch64" > HAS_COMPAT+=3D 32 > .if empty(LIB32CPUTYPE) > -LIB32CPUFLAGS=3D -march=3Darmv7 > +LIB32CPUFLAGS+=3D -march=3Darmv7 > .else > -LIB32CPUFLAGS=3D -mcpu=3D${LIB32CPUTYPE} > +LIB32CPUFLAGS+=3D -mcpu=3D${LIB32CPUTYPE} > .endif >=20 > LIB32CPUFLAGS+=3D -m32 > .if ${COMPAT_COMPILER_TYPE} =3D=3D "gcc" > .else > -LIB32CPUFLAGS+=3D -target = armv7-unknown-freebsd${OS_REVISION}-gnueabihf > +CROSS_TARGET.clang=3D armv7-unknown-freebsd${OS_REVISION}-gnueabihf > .endif >=20 > LIB32_MACHINE=3D arm > diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk > index = eb21380f051c4ec8434301ed16c881d07a83dddf..dae540261f7961937db9101da32acc8d= fca20e8f 100644 > --- a/share/mk/local.sys.mk > +++ b/share/mk/local.sys.mk > @@ -97,7 +97,9 @@ META_DEPS+=3D ${META_NOPHONY} >=20 > .if ${MACHINE:Nhost*:Ncommon} !=3D "" && ${MACHINE} !=3D = ${HOST_MACHINE} > # cross-building > -CROSS_TARGET_FLAGS?=3D -target = ${MACHINE_ARCH}-unknown-freebsd${FREEBSD_REVISION} > +CROSS_TARGET.clang?=3D = ${MACHINE_ARCH}-unknown-freebsd${FREEBSD_REVISION} > +CROSS_TARGET_FLAGS.clang?=3D -target ${CROSS_TARGET.clang} > +CROSS_TARGET_FLAGS?=3D ${CROSS_TARGET_FLAGS.${COMPILER_TYPE}} > CFLAGS+=3D ${CROSS_TARGET_FLAGS} > ACFLAGS+=3D ${CROSS_TARGET_FLAGS} > .endif I see that you have since disabled the new share/mk/local.sys.mk code unless ${MK_DIRDEPS_BUILD} =3D=3D "yes" --thus giving time for considering alternatives. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Sun Sep 24 00:37:00 2023 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 4RtRsp5MN4z4vVMt for ; Sun, 24 Sep 2023 00:37:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-21.consmr.mail.gq1.yahoo.com (sonic317-21.consmr.mail.gq1.yahoo.com [98.137.66.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 4RtRsn5X8Yz4LTX for ; Sun, 24 Sep 2023 00:37:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=A90nByDv; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695515836; bh=ZkNAA239wCUHUEz6PXLsm4tCSb7RlgtnUqcRd7Z5kTM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=A90nByDvUSiIiaDGd+WIEfWLvlDwobUZGPlFzqZgnBuROiRTJLry0bkhXSEMlPHpyaGD7oWdFpbgJpLx9wF+4VOKPY4G+4qbPSuEVVEQc2CyavFntQqF0l5JlXOXv/c6hgFf5FbwxuiI29/WewkZypvRA+KWFCzfTNPkqijEKqpaNyEFhx7fn7aDdNHRgj8UEwn9JsX5FZz+Vk/Guga+OVDe1m24Bb0p0HBMs6WDTXlLFse27fgWkzQ5pm7HgGdr3/Q23AUM9LWEDxt5ag+k5uYzDV10hYWbCwx6D8MMXpAdkx6Pyygm+i6xY6mK2Lx8tT5Y+jeIVE1FjUBruU4eHQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1695515836; bh=3p6W1SNFkNhf7ke9CIg9XJxBr3nMkTtC/KMol4azGeM=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=CqsI5S5FZlDvcnZOdwcfubKI42arfmyraPuy1HZGgRMJbNHS3l1HFjWnJ/9LzdPYunfG0ih+AkcrmipWiZHOoTsiLK3AK/tlcQjnwvp59Tvxet0we4TztdidaeiV/lSwQhvj0v6tVujhYk+JTJtwRBivB1/NzhcEMv3+uDhjVKdxcIBnlCH9jHGPTIYHj7nfThvhnVPi6xQONU/oSWwIOgGT0kjYIHYwk0exeIrbvB8ObboXPXsmzDfvkvTXO88QLAfojsB+vLb+SxhqVQk9oKzDgs3OVcoLmH5F91TJGCD6xbI/u848b7XSAGDFOrw8uU19PYYRFEZCFnxfVlFsoQ== X-YMail-OSG: OGOveaYVM1nM52FXaexKPnMA51L8eCmm.rZ6JkiljO6A_xave9tM6ClyAr.Oz0q gUuH3uF8kXQm4qWTIWCGX2uxIeV5rIVzJ14sy3UXXzP8SrVAWcxtLla00krRQL8iUgYNX3g35AcP vsIfKvwDn9NTGLx9U9Zm.sG31m1q3UsErqt0wr49cVh1X8QiAEImffz0gDOGbarGlCihEaehslIR y7dtun.VbOcHAwLFPA35Abc4DvXiAWvLvATyDyBGs5TdCOXoPplhlNk_UWkR.ECiMXdSPnB6R6hx sItLA0NHqRi7cSTPPVeLWw7_tCZs3ARSwYYQP3jTE91zHs.Ptug97Yjos4kewwTsXxtKxRJ6LN6u NfzHE4EmMW0bOxbStwi9e_wBFuc9rnNWsf0DDzDlrPbRWu0XZJWPwifeWrwdX2WfDsApyY2cnY2o sGmlbeSF5EW_6jJOVvoIdMFXuQFzy7PHQGBrCJKlbT7ng0w3Yx1r.PuljsKpSmycWrWFxrD1xTP. mPtVtB.jxYe8S7TGOH4dge0.5RNRWX2CvacONqHVCAZuhWRNyztwYsv1mzuw0rC8SmelHzii6.zn eodQRKZcVgG.GP9ox0TfA1UqohgPsuhGXq1AKOkrCg1jDWgR9lW.d2AfXVARECvLC5Un7pzeXVT2 0KUcV1HmbtKwfbQssdUYV0sLuu.8ZtA0BB3tLOM0MeoIAPFekQZeeplxFzq3A2FGx1Nr6Epqv2FW P6LOG8d3CMY5apJk7Rp45mLL7P8hN0ak79NYrxcSqtSZOxQV6dLYqEN5Z8B5mz3PRudnpP.KyMdy hEuEcrt06yJOOI35yUDbvN2y8AHy7NARyfsfVIn_VJgkINPT4xxkdCOP6gaYBlEu1E6.tj2UAf3p .n1J4zsRwWUPb5sTHj9RH8sU.g.euZRnMIARYialSIfbktf8Q3Iw1Szl1Ov1w3bjKK65KORSwHP0 2NqwUxO4NMT0TpHZrfQAvmT3gOwpFw_sI1GYPvS.HTo_YIc4EYLoPCX4P4AsLpf0YA.sQCL0BlDV vMvsyI.6sQRGRi01xEy.FYJJw0kC9Sxy5xx8tHE9waYX_XAka0pB3hEL_OAOORw8I2vTfYMXfR3l mzMHF2OD9r6BS_R99r_tiV6066wkyLq5H7DvzPw3vkhpL1MXiTsHvFyvwldiOysBaCOCL7.19NGo nm3Np2tgthNRk2IAm.JNe2SSWqdZBjYzLSpBTAnF1S_ETkqVibdSqXa2tcdQ0tcov_7xV5Ak0QRX JjVgz5bOfhaRjdZ0I.ozUDKxm89VYOiiHj71tSV_.z_riD8C_w9.m5n_85vcWyhy.id.nHHkmv0f 6VlkvabWFSxaXpKonOww8gkmt06Da89_r96qLV5r2ud0ry8rTyYKbTyQ1YmU2QDWIKMx5OvQscph GUgnvKf1MHhHVLuEJU_S58AE8H1Kk1JZpy8y.RqAq9mkIQuM.Z9UhRBd.Vqr45EbwY8peX1JfBux QfD.p1YKTY4HMBx56V4A3FiNXRan4qyfo8Nhc99HXKa6w2PAcZhCkRENj42t5VGEmd8yhu8BvHf9 oOoveLp6coNrqSufTU9D2SU7KlE7ouX8KMnHrquVf5uKxGEhi7HJ5el11r47jCcnSuXvM1juLfif tS5L4efl7_Tcg2ISwebUB.vltI_m7k1hT.FCI3bIJ2i8DLaK.29ym1TRZKXTTSRlihoh2_ANttJV .LgCQe0k78SbVGZfhcVZmdo0zMLP5f4ELatmOvlTc7KJz7y43lTt7qHiZ9FR5JZ2E2VOgsK9LfBu GPqyUEuxkgqEGOVu9sWx8sD4jxdEPkE6FmvwTc9DiWeC58Ya4kj.Qgj3k0Cq7olV5xVqWE0dsIFu DsRvRZRUH9B7usOL7eP0vuST98x1j6xznXIp5IUgIHsPwnrlC9ROmKlHZgz1In6NGGLB7zCSFSp1 Z4Is.vSpxWGxp2b.cbaZ2sPan0gCLlN9QSCeOuw7QJ9kPDVP.x24EypfZfMPwNe8GPyCOc1ZE4ZF X3S2kKbimRQd86qa8td8QF6z3DJmCNIvVmXyeuwfnhVI8bNWz7KdsGHKqUlzUHp9BtQY2N3TSyDE 27xTEjr9vDCY5ScAIiadxDLD2I79XV26XesYMPHTQX3M_bBsVGdreS9egp16DXnYwfYf9Eobuzro qwoOfWMMeYa5v3UZMabz__Sd0vIeBKAjHqFTlArSyta70JFluL6fQaXD07Nlzx2e3phVOQKLW_vt UInhELx6UDMCgIvgT_4xopzfyc2vriFw6_icSw.abmgTT_AvGA_vR07sLqArdNJ5eH9EX2TSP1Nk dBOQL5w-- X-Sonic-MF: X-Sonic-ID: 30361d10-fb55-447c-ba98-b6bbe772c4d4 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Sun, 24 Sep 2023 00:37:16 +0000 Received: by hermes--production-gq1-77657878bb-67x6k (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 714178ee5a8c027717f977132852f3b4; Sun, 24 Sep 2023 00:37:11 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: f9df60975087 - main - Add support for host32 for DIRDEPS_BUILD From: Mark Millard In-Reply-To: Date: Sat, 23 Sep 2023 17:37:00 -0700 Cc: Mike Karels , stevek@juniper.net, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <053CA2AC-B5D6-4F2C-B89E-53BE8D4FA67B@yahoo.com> References: <79F167D9-DF7A-4714-92EE-3B9FBB7BF912.ref@yahoo.com> <79F167D9-DF7A-4714-92EE-3B9FBB7BF912@yahoo.com> <2401.1695508551@kaos.jnpr.net> <8033.1695509469@kaos.jnpr.net> To: "Simon J. Gerraty" X-Mailer: Apple Mail (2.3731.700.6) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(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]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.147:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.147:from]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RtRsn5X8Yz4LTX On Sep 23, 2023, at 17:28, Mark Millard wrote: > On Sep 23, 2023, at 15:51, Simon J. Gerraty wrote: >=20 >> Simon J. Gerraty wrote: >>>> Looks like this broke lib32 builds via it ending up using >>>> the default: >>>>=20 >>>> -target armv7-unknown-freebsd >>>>=20 >>>> instead of the correct: >>>>=20 >>>> -target armv7-unknown-freebsd15.0-gnueabihf In case it was not clear: in the Jenkins build logs,=20 there were commands of the structure: cc -march=3Darmv7 -m32 -target armv7-unknown-freebsd15.0-gnueabihf . . . = -target armv7-unknown-freebsd . . . (So: both styles of target listed in the same command, the incorrect one listed later.) >>> Sorry. >>>=20 >>> That would be easier to fix/control if a separate variable >>> is used to hold just the -target flag=20 >>>=20 >>> That way bsd.compat.mk could reset that varaible if needed with no = harm >>> done. >>>=20 >>=20 >> Does the following look like it would DTRT for you? >> Not sure about COMPILER_TYPE vs COMPAT_COMPILER_TYPE >=20 > I reported strictly based on noticing the official FreeBSD > Jenkins activity having build failures. My environment is > currently based on a commit that is a day or two before > your change, so I'd need to progress in order to be able > to test anything that fixed the operation. >=20 > I expect that Mike Karels would be a better one to comment > on any alternate structuring for having the build environment > always be explicit for its aarch64 -m32 use, at least based > on preexisting familiarity with where and how things are used. >=20 > Last I tried, gcc12 based builds did not work/finish for > aarch64, even though amd64 was working at the time. It seemed > that the status was not a surprise to folks. Correctly > covering gcc12 use for this issue may well still end up with > a broken/incomplete aarch64+LIB32 build via gcc12 --for other > reasons. >=20 > (E-mail has a tendency to not preserve leading whitespace.) >=20 >> diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk >> index = 0c387bcb020c67ea6eda8fc1f4956eebf098e2a2..1e82df42391c4cec341ad368cb477fe4= a14c84b8 100644 >> --- a/share/mk/bsd.compat.mk >> +++ b/share/mk/bsd.compat.mk >> @@ -26,16 +26,18 @@ COMPAT_COMPILER_TYPE=3D${COMPILER_TYPE} >>=20 >> # ------------------------------------------------------------------- >> # 32 bit world >> +LIB32CPUFLAGS=3D ${LIB32CPUFLAGS.${COMPAT_COMPILER_TYPE}:U} >> +LIB32CPUFLAGS.clang=3D -target ${CROSS_TARGET.clang} >> .if ${COMPAT_ARCH} =3D=3D "amd64" >> HAS_COMPAT+=3D 32 >> .if empty(LIB32CPUTYPE) >> -LIB32CPUFLAGS=3D -march=3Di686 -mmmx -msse -msse2 >> +LIB32CPUFLAGS+=3D -march=3Di686 -mmmx -msse -msse2 >> .else >> -LIB32CPUFLAGS=3D -march=3D${LIB32CPUTYPE} >> +LIB32CPUFLAGS+=3D -march=3D${LIB32CPUTYPE} >> .endif >> .if ${COMPAT_COMPILER_TYPE} =3D=3D gcc >> .else >> -LIB32CPUFLAGS+=3D -target x86_64-unknown-freebsd${OS_REVISION} >> +CROSS_TARGET.clang=3D x86_64-unknown-freebsd${OS_REVISION} >> .endif >> LIB32CPUFLAGS+=3D -m32 >> LIB32_MACHINE=3D i386 >> @@ -47,15 +49,15 @@ LIB32WMAKEFLAGS=3D \ >> .elif ${COMPAT_ARCH} =3D=3D "powerpc64" >> HAS_COMPAT+=3D 32 >> .if empty(LIB32CPUTYPE) >> -LIB32CPUFLAGS=3D -mcpu=3Dpowerpc >> +LIB32CPUFLAGS+=3D -mcpu=3Dpowerpc >> .else >> -LIB32CPUFLAGS=3D -mcpu=3D${LIB32CPUTYPE} >> +LIB32CPUFLAGS+=3D -mcpu=3D${LIB32CPUTYPE} >> .endif >>=20 >> .if ${COMPAT_COMPILER_TYPE} =3D=3D "gcc" >> LIB32CPUFLAGS+=3D -m32 >> .else >> -LIB32CPUFLAGS+=3D -target powerpc-unknown-freebsd${OS_REVISION} >> +CROSS_TARGET.clang=3D powerpc-unknown-freebsd${OS_REVISION} >> .endif >>=20 >> LIB32_MACHINE=3D powerpc >> @@ -66,15 +68,15 @@ LIB32WMAKEFLAGS=3D \ >> .elif ${COMPAT_ARCH} =3D=3D "aarch64" >> HAS_COMPAT+=3D 32 >> .if empty(LIB32CPUTYPE) >> -LIB32CPUFLAGS=3D -march=3Darmv7 >> +LIB32CPUFLAGS+=3D -march=3Darmv7 >> .else >> -LIB32CPUFLAGS=3D -mcpu=3D${LIB32CPUTYPE} >> +LIB32CPUFLAGS+=3D -mcpu=3D${LIB32CPUTYPE} >> .endif >>=20 >> LIB32CPUFLAGS+=3D -m32 >> .if ${COMPAT_COMPILER_TYPE} =3D=3D "gcc" >> .else >> -LIB32CPUFLAGS+=3D -target = armv7-unknown-freebsd${OS_REVISION}-gnueabihf >> +CROSS_TARGET.clang=3D armv7-unknown-freebsd${OS_REVISION}-gnueabihf >> .endif >>=20 >> LIB32_MACHINE=3D arm >> diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk >> index = eb21380f051c4ec8434301ed16c881d07a83dddf..dae540261f7961937db9101da32acc8d= fca20e8f 100644 >> --- a/share/mk/local.sys.mk >> +++ b/share/mk/local.sys.mk >> @@ -97,7 +97,9 @@ META_DEPS+=3D ${META_NOPHONY} >>=20 >> .if ${MACHINE:Nhost*:Ncommon} !=3D "" && ${MACHINE} !=3D = ${HOST_MACHINE} >> # cross-building >> -CROSS_TARGET_FLAGS?=3D -target = ${MACHINE_ARCH}-unknown-freebsd${FREEBSD_REVISION} >> +CROSS_TARGET.clang?=3D = ${MACHINE_ARCH}-unknown-freebsd${FREEBSD_REVISION} >> +CROSS_TARGET_FLAGS.clang?=3D -target ${CROSS_TARGET.clang} >> +CROSS_TARGET_FLAGS?=3D ${CROSS_TARGET_FLAGS.${COMPILER_TYPE}} >> CFLAGS+=3D ${CROSS_TARGET_FLAGS} >> ACFLAGS+=3D ${CROSS_TARGET_FLAGS} >> .endif >=20 > I see that you have since disabled the new share/mk/local.sys.mk > code unless ${MK_DIRDEPS_BUILD} =3D=3D "yes" --thus giving time > for considering alternatives. >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Sun Sep 24 01:46:06 2023 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 4RtTPj65qXz4vZNy for ; Sun, 24 Sep 2023 01:46:33 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RtTPj49zYz4T5y for ; Sun, 24 Sep 2023 01:46:33 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108162.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38NAQxcZ012028; Sat, 23 Sep 2023 18:46:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=to : cc : subject : in-reply-to : references : from : mime-version : content-type : content-id : date : message-id; s=PPS1017; bh=wA5P1I1vMZOTu1A/mwO3PI5lY9CsFocNDPhkzeIcipM=; b=nGdINSKsQKZU49jrEoznbSrN9p9NFFQye/64tWGMJWdX1sTFZMjYB4Sec5jmGYsmNW5m T5X0W5gncTptxShA8jW7WYipmu7VPd+pboOdmKjG/Sg13bLjVbxRVtEIvS+FNOiL0d4f 0Q/9Ynl5IzC4PL2W/9koOW1ixBBlRB7T9UNNFTqRvMvjih0mxs1UvwLHKkogG750LBGA iiSzGeYgzVCZRLIig4frFhP3c/5ot/EKaJEVNxb6WC+z5LyvEqpba61AZymFWfHOzEWH YqoerHeb2NDFkRtmu6etZ9jUN9wbwzlLmw72xOD7O9iwB3eE6a51EoTOoH3w6okfyxpH iA== Received: from dm4pr02cu002.outbound.protection.outlook.com (mail-centralusazlp17013039.outbound.protection.outlook.com [40.93.13.39]) by mx0b-00273201.pphosted.com (PPS) with ESMTPS id 3t9x98hc6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Sep 2023 18:46:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VPvn+N11vXRZVsubrigV6kqop7TzojYqqnXIDvs43gJ3K/nuGPHCU58+WJFRZ3SGLgl8a0KnPiecM7S3vSDxMezJOt3yomYj2c1XuPR/kWJzsacpJzKFcxWgf/Hs3uywS3yIGIF1Syc7vWUjp6OjOMVoFvfKB37hEwd1ubbyPXDkTjt3F/PLzUa+x/PUql3BbuJ5C0bqtwGzjazjRhVDv5ECJJexxvPxkybTsi8JawAqHRyfkTzE+dUJrVRbRO77dT6usVdNxtfvm+tm0xctgLEBWA2fUMEV+de6QaIrKwkQ5yOf5Dq/naz92KHGRb52CKAAHJpi8k8sq6vURGQNlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wA5P1I1vMZOTu1A/mwO3PI5lY9CsFocNDPhkzeIcipM=; b=WwmOWGW+kkEsFwu5Gp4kLvJ0LmzRYgRuU6QJyMWVax8TbpePRhByrKi2c3YR7MSMVSTBUaoFXuvJ1WIYVwSUTMc/LsgcamduqWbzyW1Kjin7oSpVv43IsSVStoF2lsZEKnUydiVCFaPL90Gx9Qf4zqhhnOkBpVRXfv9T4qXuzBn/rkHLOS2N5mV/U6zixCSKESDDyoxOdMyJqBWHjW6Pha0VRiMZqc3ozroV3+QREd42xXWRsnZn1wfORquKfsxDFDwrUY5L3dF4R1funJZF8LGZvSKfenHKof9jLwOtVaBD8vZqS8Yx3nt+xQPszDPW2c3eRdm33a695WhsEXG8wA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.242.15) smtp.rcpttodomain=yahoo.com smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wA5P1I1vMZOTu1A/mwO3PI5lY9CsFocNDPhkzeIcipM=; b=QDIFRaSWMbDurs23I2+0KkXyUU2ZdEUTcWInZyK+HDcS97s/dI8nZ958yoxZMja2ZS4s0hqmmJuaM/3tXP2U6J4uxuRAs/qDcdH2MJ8/ZMXbedX+FE0X/csC6lNVYbW6AHidssHHx2WD36+GXnNg1LppXvwedhdedJ3HIqtSkfA= Received: from MW4PR03CA0117.namprd03.prod.outlook.com (2603:10b6:303:b7::32) by MW4PR05MB8778.namprd05.prod.outlook.com (2603:10b6:303:12d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.19; Sun, 24 Sep 2023 01:46:30 +0000 Received: from MW2NAM12FT070.eop-nam12.prod.protection.outlook.com (2603:10b6:303:b7:cafe::f4) by MW4PR03CA0117.outlook.office365.com (2603:10b6:303:b7::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Sun, 24 Sep 2023 01:46:30 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.242.15) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.242.15 as permitted sender) Received: from p-exchfe-eqx-02.jnpr.net (66.129.242.15) by MW2NAM12FT070.mail.protection.outlook.com (10.13.180.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.14 via Frontend Transport; Sun, 24 Sep 2023 01:46:28 +0000 Received: from p-exchbe-eqx-02.jnpr.net (10.104.9.15) by p-exchfe-eqx-02.jnpr.net (10.104.9.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Sat, 23 Sep 2023 20:46:27 -0500 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchbe-eqx-02.jnpr.net (10.104.9.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Sat, 23 Sep 2023 20:46:27 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30 via Frontend Transport; Sat, 23 Sep 2023 20:46:27 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 38O1kQsc029628; Sat, 23 Sep 2023 18:46:26 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 9999C5CEDE; Sat, 23 Sep 2023 18:46:06 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 980C85CDBD; Sat, 23 Sep 2023 18:46:06 -0700 (PDT) To: Mark Millard CC: Mike Karels , , , Subject: Re: git: f9df60975087 - main - Add support for host32 for DIRDEPS_BUILD In-Reply-To: References: <79F167D9-DF7A-4714-92EE-3B9FBB7BF912.ref@yahoo.com> <79F167D9-DF7A-4714-92EE-3B9FBB7BF912@yahoo.com> <2401.1695508551@kaos.jnpr.net> <8033.1695509469@kaos.jnpr.net> Comments: In-reply-to: Mark Millard message dated "Sat, 23 Sep 2023 17:28:22 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.2 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <46449.1695519966.1@kaos.jnpr.net> Date: Sat, 23 Sep 2023 18:46:06 -0700 Message-ID: <47227.1695519966@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW2NAM12FT070:EE_|MW4PR05MB8778:EE_ X-MS-Office365-Filtering-Correlation-Id: 22f33055-389a-4763-ed96-08dbbca011e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8O6TR1Gn4/MMiC//CKZv62VFjllRpE6n1cWR9hgc77mfEA+ULyNKPCVidN7ArsvfFVMLSOmSgPECAyPuHF351zO0M9gK4zF/sSF070OLjAz2ptlXwR4/Q6dAm0nl/Dm0/S3pYE6sL4AarowbL/TwwpPaJE4JH100o3a/aEAakwVbF63CCglAniqriexMQYNwwYj5Tf9VkzZ+NAmOfK4baqVyMdk34t17RKKhRzCrtZ6r4Hfk29ODrBnxGu72IXkOGGp1AcNe9bNuQNvv0DvKuiBmKmdlZlkdd2AA/v+XEow3IX1a2ikCrCXNveYWRpf5jYVlnKkIDBIBpokmnOOYsJc/NwIXeAcsDbeX0EBWgZHb9g0w8JlyOUlrQrbV+be7ps1ByqNhz2v597jAp0HLYxTRvFYzlM5pWfBs8rVc9ry9H0lnEybYrix+cWDCMKefV0mnBHObvGrzDLbzRXM3rd/0b2b7gSE55X/WKQVLwlRSgSDy2l5GTOlPXTFYJrXIJ8nCdFBkPA0xa9W+Wj/f70hoXHt1ZiZjTn0XqrpckK/4V0Gqgd7hBIRKCWhBbvbB4Cx4l8o3F+KE/1EiCIy/jKN0zCYqW5V94auFsyIFaR1UILu0/cxMGAzW1XErB6c7LmapE0cYdc3WGMrp/gGtZBz9ta6aeOnAatqfyKLdZLhdlFI+jOiKI3qY+vsFoucIKZQlR6rl6Mi8mRapJkUG3JuXy0zGhjrFBF0//Z/ikNIH7oF9NalLyVL7Wu/NUmy4mXA3Krau7C7YJyE/BFfnV88hziiAwvBSlQQ0zL7kTLzUX4nfHU9De1KfLvqqVSZg X-Forefront-Antispam-Report: CIP:66.129.242.15;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-02.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(136003)(346002)(376002)(396003)(39860400002)(230922051799003)(451199024)(186009)(1800799009)(82310400011)(36840700001)(40470700004)(46966006)(5660300002)(7696005)(83380400001)(40480700001)(82740400003)(55016003)(356005)(86362001)(81166007)(36860700001)(2906002)(8936002)(107886003)(9686003)(7126003)(336012)(47076005)(478600001)(41300700001)(6266002)(316002)(4326008)(8676002)(54906003)(70206006)(6916009)(70586007)(26005)(40460700003)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2023 01:46:28.3724 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22f33055-389a-4763-ed96-08dbbca011e6 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.242.15];Helo=[p-exchfe-eqx-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT070.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR05MB8778 X-Proofpoint-GUID: lwawFlf0TG9TK12YdqNsFQ21l2x9e1Gy X-Proofpoint-ORIG-GUID: lwawFlf0TG9TK12YdqNsFQ21l2x9e1Gy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-23_21,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 malwarescore=0 spamscore=0 impostorscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 bulkscore=0 mlxlogscore=855 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309240012 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US] X-Rspamd-Queue-Id: 4RtTPj49zYz4T5y Mark Millard wrote: > > Does the following look like it would DTRT for you? > > Not sure about COMPILER_TYPE vs COMPAT_COMPILER_TYPE > > I reported strictly based on noticing the official FreeBSD > Jenkins activity having build failures. My environment is Thanks. > I expect that Mike Karels would be a better one to comment > on any alternate structuring for having the build environment > always be explicit for its aarch64 -m32 use, at least based > on preexisting familiarity with where and how things are used. > > Last I tried, gcc12 based builds did not work/finish for > aarch64, even though amd64 was working at the time. It seemed > that the status was not a surprise to folks. Correctly > covering gcc12 use for this issue may well still end up with > a broken/incomplete aarch64+LIB32 build via gcc12 --for other > reasons. > I see that you have since disabled the new share/mk/local.sys.mk > code unless ${MK_DIRDEPS_BUILD} == "yes" --thus giving time > for considering alternatives. Yes, the block was moved from *sys.dirdeps*.mk which only applies to DIRDEPS_BUILD, so seemed like a safe option for now. As I mentioned I think using a separate variable for the arg to -target flag is probably the best bet - allows that to be controlled independently. From nobody Sun Sep 24 03:04:06 2023 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 4RtW7C0PP7z4vg0Y; Sun, 24 Sep 2023 03:04:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RtW7B6vnTz4cpc; Sun, 24 Sep 2023 03:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695524647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vxVMNlXswh/slzBzvG1EfJAovVXuqCXXoAl9l6+dKZ8=; b=lIbDXC4nWBhFcWUF2c69/d5b6jmTca8WdMGfDSuU6pkRiiGb+yoiIQmdvUiaSbKsGmxaV5 kyiCml7g6rAWC8XVTtb3p18dMFKc/U3e8zrsdlZQtICS/qXwSvxmE5+Y5uPqpPI2VYpeRi hgqnRp2WA8t2AdHfkSDWquz9HUzmupookAKkvocdbS9D3kGmTImin8uHf9A3RcZGChk++9 zNps9gaKjhTjuxQNz3wDwXSlwpr9P3z7AovXb9JoGBOmW7kMuLdH0bNTwzd99EkYOxpime n+0uIJwmOCcWlT4m+YHkOBiGFR22rDDtZkWDm6cjUe/Yvx246ryZ2Mdybg2JgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695524647; a=rsa-sha256; cv=none; b=QZGBcxEgD+axyL3RcsuIYoswelBVm+/3Io4DdsLPrTsrSWb06XSsW4CBwHuVjIOC/NiRfj fCjDtci7MD+Idj4w8TvGPohJvcPNkJZjr9+pGTB3791nF3wEcQHH3usq/g3zZFONbRlkon 4OGKczOVAcCnFs55nGHRFCtb18iMrQvYJHSbXx+L/Vb/DEzUBIsof3WRRjS7ToS/BwMh47 FsIOdYepaEh+X7qCvcUYdfzHPATaOY6U/qYcKzBHA2BgSNwnPmAEOfkBI12tlMbGI9qIfM IoXWMbocJlaNAKUO4/EWFeIddH89PEohbHau/YTEmwGwdhRGxz2R6Zv4Y/SzJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695524647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vxVMNlXswh/slzBzvG1EfJAovVXuqCXXoAl9l6+dKZ8=; b=mdQXOdJzCrf/qRGyeOEswWId0DPppvYoTEJRfsSuK9MrLoBIaXmiOSKXspDhxlftwgF6nU tpOPZhXxEoxihfNr28mY/aXxW2cWNkyTvukysSUm0uepFgz3O4CgVj5SPalqguuM9zXa7V NdaX3XvEU35J9SSk7IkHvop/yRhaWnTZDt38yjjEBopxWMnMHEt5pG0oIRomB5aoi2E+w5 r8Wq5PK1XEPAWco3byz6WmGtc1uFZ31juIqowI6wlKoQ+nsz4XzD9cdYdtDekCuGQkNCdV Jv0upffJpZIB/K5rxus1qnw8SV29IV1Mg2KDxsUIe48UB1sw6hVFz9Nb8vHwuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtW7B5yv3zVbF; Sun, 24 Sep 2023 03:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38O346dM067566; Sun, 24 Sep 2023 03:04:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38O3463q067563; Sun, 24 Sep 2023 03:04:06 GMT (envelope-from git) Date: Sun, 24 Sep 2023 03:04:06 GMT Message-Id: <202309240304.38O3463q067563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 855e0457396c - main - ports(7): Update the default setting of MASTER_SITE_INDEX 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 855e0457396c7addb1df6fc1d14200cc8de286c0 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=855e0457396c7addb1df6fc1d14200cc8de286c0 commit 855e0457396c7addb1df6fc1d14200cc8de286c0 Author: Li-Wen Hsu AuthorDate: 2023-09-24 02:58:33 +0000 Commit: Li-Wen Hsu CommitDate: 2023-09-24 02:59:34 +0000 ports(7): Update the default setting of MASTER_SITE_INDEX MFC after: 3 days --- share/man/man7/ports.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index 7dc729bd112a..911135a8b631 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -23,7 +23,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 June 1, 2023 +.Dd September 24, 2023 .Dt PORTS 7 .Os .Sh NAME @@ -504,7 +504,7 @@ cluster (for .Cm fetchindex target). Defaults to -.Pa https://www.FreeBSD.org/ports/ . +.Pa https://download.FreeBSD.org/ports/index/ . .It Va FETCHINDEX Command to get .Pa INDEX From nobody Sun Sep 24 03:18:42 2023 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 4RtWS22Cp4z4vh6k; Sun, 24 Sep 2023 03:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RtWS21jrrz4fDQ; Sun, 24 Sep 2023 03:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695525522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OeKR9A0FhmYI2HuuQAlgAWoA99DHSUquFIScMQLHs6I=; b=isJ2kZGNwLDsELc5qg7hUwWR32DuxcHJ9DJ7iKsIX/0HiM66rnPRjcCRyKnvb2XbsyUYPx 1lk0QzUuo4AXyh08jT6Y7212dNAv1SxlV9DNxBtptpvnLLCHPT80qrp5zRSlMEhh/GAivZ gMdfe7jG2E1EHj/zRJcZsYbz5OqFMFN3Lbo+CwkrsWjjQEDnPc5r09qJ/3WJY3Y5M/N2sl hnpJFHtywxzmaaKcON8dS1vKKhEKNxtj+3qQ/oZHhGXxxEErb4kezZ4qdUEUwyYOIBqUxz SYU/elBpAbhplrkvuoZmZtpfJKaNxTvnpH0SK3D+aIkC2sXrjCOQpkXPOiNuMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695525522; a=rsa-sha256; cv=none; b=djEgVeVKJbseYAWwuggZ8r5RS0YZlXO7dwFclsDqe7eFppbGEgz+xAmjLAr55S5VZXbUy7 QGMYI+oT/DbeGJ4nA9MFcCRddGcHJWKqXsHsXiKsaUfcDJjGpqU8pX1jRGKVuAkSExhprG 1nC9g0LtVW+tZletGvWzgUXUns1L2weMNM5PiOxZDPZi0bhH3Nst7O/5Qewu1ElFvzJQB6 SbXBz5dK0QwyR76oyThWgbUDrY6CTejJW/oaXIm5oSeIUVAi/t5GjsvuYgtk6/fz3F+hFj NXZLw+D3JaN4q0xBhgU23L/Rcqm6BmxCkXit/LdyNY4F1GA5feprT4TnnNsRyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695525522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OeKR9A0FhmYI2HuuQAlgAWoA99DHSUquFIScMQLHs6I=; b=bhMUPi9GPP3VKcwX3PhuKB6V1Vof2Ruq9zrLVAUQZD9Gs93rPkIlT8Sl1GPiI+kyiM4l9N T1nJ+RVnmYwPPTp8vl+pk2trVeevg+ZIwBU9qS48LcU6XARuemvErAFfaFISknMzRTqYQx TtLVU15mlLWFYcg+TtVxikH6IJhMu4glrOholFbWCDz2jicy3M97UeLDDi5v9zIogN/18c X5ZF2ALx3TILWcIbnso8vFO3hRV10eNS/ugSagFJiTJl/5b6Mr4ruW936J28kwbA5w7EMf hishWMlBME588u2qBEfIkRTSLqcMiBtFSPFSc7OGrkn4nCSNl+KS5g+50DYraA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RtWS20mSyzWdS; Sun, 24 Sep 2023 03:18:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38O3IgIK084762; Sun, 24 Sep 2023 03:18:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38O3IgY8084759; Sun, 24 Sep 2023 03:18:42 GMT (envelope-from git) Date: Sun, 24 Sep 2023 03:18:42 GMT Message-Id: <202309240318.38O3IgY8084759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 2373e704aa1a - main - Untie strchrnul() from gdb. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2373e704aa1a5dcb7609badfdb0be4ceb4966d74 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=2373e704aa1a5dcb7609badfdb0be4ceb4966d74 commit 2373e704aa1a5dcb7609badfdb0be4ceb4966d74 Author: Alexander Motin AuthorDate: 2023-09-24 03:17:29 +0000 Commit: Alexander Motin CommitDate: 2023-09-24 03:18:20 +0000 Untie strchrnul() from gdb. MFC after: 10 days --- sys/conf/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 2d429c11f523..4e72eac77e68 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4037,7 +4037,7 @@ libkern/strcasecmp.c standard libkern/strcasestr.c standard libkern/strcat.c standard libkern/strchr.c standard -libkern/strchrnul.c optional gdb +libkern/strchrnul.c standard libkern/strcpy.c standard libkern/strcspn.c standard libkern/strdup.c standard From nobody Sun Sep 24 13:21:41 2023 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 4Rtmqn3g57z4tyP4; Sun, 24 Sep 2023 13:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rtmqn38h0z4YDS; Sun, 24 Sep 2023 13:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCTB6GFbTgqSFy6oBeseJ89Dn+N7ifDCrCEpp6GUAa4=; b=BM9WMwZdPzmdG0maLpUW8CBM3NnnCMoiHr1bLzpNqh6py2PmGpPkpZ7zziwqnhuphqf/g6 tFBcr6Jl7gd2dgBZzecoMqOWh4JWJf/Pgub3QtXH9c+9nn1+EXTc+Ah+jwq+I6M9zJPRaj jdEbcZpOyq6Ek4iErWPSRB5h4E+ZoRPgNZqTZFUU4n4aH+/Fk94/q9FORuDcx2iTs1pFLu esZTcQOBtEuJuHlAYVgFHqne7kZrq/ADTJEnQQFYwvOjS7nRtD+wG19Td1DdSjTEg/QvHR AfYQV6eNwZ5qV/4nH/At1Nh9nX2iWrNgyrA8/s6+TeUJl8UM/e5dOhOMTHSm1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695561701; a=rsa-sha256; cv=none; b=VXwzO1dzTD9ePJRAS/sxCQHnklksp6FbnmgAmCbgtBfBnjdk3Hw+Gh0KfXo6Oqx4s4SDor BQx05c6CuVru91RV5OdQKmnBqCCWh0j9ot7dqEOFCmJ4zwsq/6I88WMjz++rVM1eDf7pY+ om1MjYFZW8H/9bLXDVJX/fhqi8lci9GZLfmhsGGcbRfnBX6S4bMXMjF9F7SH8GdF4iZlo4 YIwLqM+ClKJGIzJL0PrTuZXdktwOUUpvILnw/jA78DiF+jRGrzjqOVWQ00wKYlX8zdtNnh 1ktCCGM2j483JbfO8gqzUPt7f9vz+F1+mUuliQc7ibzzSpNuHqzgUezifCFXBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695561701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RCTB6GFbTgqSFy6oBeseJ89Dn+N7ifDCrCEpp6GUAa4=; b=H2wDD0L6YS4j8EFDOuSEIPC4ZIP6KjrECX9wFCpitQag3bQNSKHqNn09uHYoYZIviN0B7b b17gistgr/fSvuKLx7MyuswnMHnFPZZySS/Z1CTUL4DL/fQrNxHZPhnYXQvfdKk/DUsfe2 mjpEnU9Sp2rfb3iEly3LZQxjlO1PssvEAo68XILeY3ONgO96Bbc6aqIn3gffpLk07itEH9 HiyJBSH0mNzUpNwXjZfHYBYj9T2PMeN2+PpwMtt/T5ith75FhXWhKLrK1buYKrC0VhYVEE 4vWQzpxbYpoGHFGQIQhjnKaxzCuz6UAZ3bCTSLlJOWXy+VJWb6y7Z60n4zXy/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rtmqn2DKvznSV; Sun, 24 Sep 2023 13:21:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38ODLfIJ090509; Sun, 24 Sep 2023 13:21:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38ODLf43090506; Sun, 24 Sep 2023 13:21:41 GMT (envelope-from git) Date: Sun, 24 Sep 2023 13:21:41 GMT Message-Id: <202309241321.38ODLf43090506@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: da8324a9258f - main - nvme: Fix locking protocol violation to fix suspend / resume 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: da8324a9258f1791cd10423103c1746646e33104 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=da8324a9258f1791cd10423103c1746646e33104 commit da8324a9258f1791cd10423103c1746646e33104 Author: Warner Losh AuthorDate: 2023-09-24 12:57:07 +0000 Commit: Warner Losh CommitDate: 2023-09-24 13:17:18 +0000 nvme: Fix locking protocol violation to fix suspend / resume Currently, when we suspend, we need to tear down all the qpairs. We call nvme_admin_qpair_abort_aers with the admin qpair lock held, but the tracker it will call for the pending AER also locks it (recursively) hitting an assert. This routine is called without the qpair lock held when we destroy the device entirely in a number of places. Add an assert to this effect and drop the qpair lock before calling it. nvme_admin_qpair_abort_aers then locks the qpair lock to traverse the list, dropping it around calls to nvme_qpair_complete_tracker, and restarting the list scan after picking it back up. Note: If interrupts are still running, there's a tiny window for these AERs: If one fires just an instant after we manually complete it, then we'll be fine: we set the state of the queue to 'waiting' and we ignore interrupts while 'waiting'. We know we'll destroy all the queue state with these pending interrupts before looking at them again and we know all the TRs will have been completed or rescheduled. So either way we're covered. Also, tidy up the failure case as well: failing a queue is a superset of disabling it, so no need to call disable first. This solves solves some locking issues with recursion since we don't need to recurse.. Set the qpair state of failed queues to RECOVERY_FAILED and stop scheduling the watchdog. Assert we're not failed when we're enabling a qpair, since failure currently is one-way. Make failure a little less verbose. Next, kill the pre/post reset stuff. It's completely bogus since we disable the qparis, we don't need to also hold the lock through the reset: disabling will cause the ISR to return early. This keeps us from recursing on the recovery lock when resuming. We only need the recovery lock to avoid a specific race between the timer and the ISR. Finally, kill NVME_RESET_2X. It'S been a major release since we put it in and nobody has used it as far as I can tell. And it was a motivator for the pre/post uglification. These are all interrelated, so need to be done at the same time. Sponsored by: Netflix Reviewed by: jhb Tested by: jhb (made sure suspend / resume worked) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D41866 --- sys/dev/nvme/nvme_ctrlr.c | 49 +++++-------------------------------------- sys/dev/nvme/nvme_private.h | 1 + sys/dev/nvme/nvme_qpair.c | 51 ++++++++++++++++++++++++++++++++------------- 3 files changed, 42 insertions(+), 59 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index c4a750901743..30a5ee81b2a4 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -217,12 +217,15 @@ nvme_ctrlr_fail(struct nvme_controller *ctrlr) { int i; + /* + * No need to disable queues before failing them. Failing is a superet + * of disabling (though pedantically we'd abort the AERs silently with + * a different error, though when we fail, that hardly matters). + */ ctrlr->is_failed = true; - nvme_admin_qpair_disable(&ctrlr->adminq); nvme_qpair_fail(&ctrlr->adminq); if (ctrlr->ioq != NULL) { for (i = 0; i < ctrlr->num_io_queues; i++) { - nvme_io_qpair_disable(&ctrlr->ioq[i]); nvme_qpair_fail(&ctrlr->ioq[i]); } } @@ -416,34 +419,6 @@ nvme_ctrlr_disable_qpairs(struct nvme_controller *ctrlr) } } -static void -nvme_pre_reset(struct nvme_controller *ctrlr) -{ - /* - * Make sure that all the ISRs are done before proceeding with the reset - * (and also keep any stray interrupts that happen during this process - * from racing this process). For startup, this is a nop, since the - * hardware is in a good state. But for recovery, where we randomly - * reset the hardware, this ensure that we're not racing the ISRs. - */ - mtx_lock(&ctrlr->adminq.recovery); - for (int i = 0; i < ctrlr->num_io_queues; i++) { - mtx_lock(&ctrlr->ioq[i].recovery); - } -} - -static void -nvme_post_reset(struct nvme_controller *ctrlr) -{ - /* - * Reset complete, unblock ISRs - */ - mtx_unlock(&ctrlr->adminq.recovery); - for (int i = 0; i < ctrlr->num_io_queues; i++) { - mtx_unlock(&ctrlr->ioq[i].recovery); - } -} - static int nvme_ctrlr_hw_reset(struct nvme_controller *ctrlr) { @@ -1236,9 +1211,7 @@ nvme_ctrlr_reset_task(void *arg, int pending) int status; nvme_ctrlr_devctl_log(ctrlr, "RESET", "resetting controller"); - nvme_pre_reset(ctrlr); status = nvme_ctrlr_hw_reset(ctrlr); - nvme_post_reset(ctrlr); if (status == 0) nvme_ctrlr_start(ctrlr, true); else @@ -1725,19 +1698,8 @@ nvme_ctrlr_resume(struct nvme_controller *ctrlr) if (ctrlr->is_failed) return (0); - nvme_pre_reset(ctrlr); if (nvme_ctrlr_hw_reset(ctrlr) != 0) goto fail; -#ifdef NVME_2X_RESET - /* - * Prior to FreeBSD 13.1, FreeBSD's nvme driver reset the hardware twice - * to get it into a known good state. However, the hardware's state is - * good and we don't need to do this for proper functioning. - */ - if (nvme_ctrlr_hw_reset(ctrlr) != 0) - goto fail; -#endif - nvme_post_reset(ctrlr); /* * Now that we've reset the hardware, we can restart the controller. Any @@ -1754,7 +1716,6 @@ fail: * the controller. However, we have to return success for the resume * itself, due to questionable APIs. */ - nvme_post_reset(ctrlr); nvme_printf(ctrlr, "Failed to reset on resume, failing.\n"); nvme_ctrlr_fail(ctrlr); (void)atomic_cmpset_32(&ctrlr->is_resetting, 1, 0); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index a6239f30f3bf..496bd8229e0a 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -150,6 +150,7 @@ struct nvme_tracker { enum nvme_recovery { RECOVERY_NONE = 0, /* Normal operations */ RECOVERY_WAITING, /* waiting for the reset to complete */ + RECOVERY_FAILED, /* We have failed, no more I/O */ }; struct nvme_qpair { struct nvme_controller *ctrlr; diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 4e37aa0e1020..9806096de81d 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -945,22 +945,38 @@ nvme_admin_qpair_abort_aers(struct nvme_qpair *qpair) { struct nvme_tracker *tr; + /* + * nvme_complete_tracker must be called without the qpair lock held. It + * takes the lock to adjust outstanding_tr list, so make sure we don't + * have it yet (since this is a general purpose routine). We take the + * lock to make the list traverse safe, but have to drop the lock to + * complete any AER. We restart the list scan when we do this to make + * this safe. There's interlock with the ISR so we know this tracker + * won't be completed twice. + */ + mtx_assert(&qpair->lock, MA_NOTOWNED); + + mtx_lock(&qpair->lock); tr = TAILQ_FIRST(&qpair->outstanding_tr); while (tr != NULL) { if (tr->req->cmd.opc == NVME_OPC_ASYNC_EVENT_REQUEST) { + mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_SQ_DELETION, 0, ERROR_PRINT_NONE); + mtx_lock(&qpair->lock); tr = TAILQ_FIRST(&qpair->outstanding_tr); } else { tr = TAILQ_NEXT(tr, tailq); } } + mtx_unlock(&qpair->lock); } void nvme_admin_qpair_destroy(struct nvme_qpair *qpair) { + mtx_assert(&qpair->lock, MA_NOTOWNED); nvme_admin_qpair_abort_aers(qpair); nvme_qpair_destroy(qpair); @@ -1011,17 +1027,6 @@ nvme_qpair_timeout(void *arg) mtx_assert(&qpair->recovery, MA_OWNED); - /* - * If the controller has failed, give up. We're never going to change - * state from a failed controller: no further transactions are possible. - * We go ahead and let the timeout expire in many cases for simplicity. - */ - if (qpair->ctrlr->is_failed) { - nvme_printf(ctrlr, "Controller failed, giving up\n"); - qpair->timer_armed = false; - return; - } - switch (qpair->recovery_state) { case RECOVERY_NONE: /* @@ -1108,6 +1113,11 @@ nvme_qpair_timeout(void *arg) nvme_printf(ctrlr, "Waiting for reset to complete\n"); idle = false; /* We want to keep polling */ break; + case RECOVERY_FAILED: + KASSERT(qpair->ctrlr->is_failed, + ("Recovery state failed w/o failed controller\n")); + idle = true; /* nothing to monitor */ + break; } /* @@ -1297,6 +1307,8 @@ nvme_qpair_enable(struct nvme_qpair *qpair) mtx_assert(&qpair->recovery, MA_OWNED); if (mtx_initialized(&qpair->lock)) mtx_assert(&qpair->lock, MA_OWNED); + KASSERT(qpair->recovery_state != RECOVERY_FAILED, + ("Enabling a failed qpair\n")); qpair->recovery_state = RECOVERY_NONE; } @@ -1421,12 +1433,13 @@ void nvme_admin_qpair_disable(struct nvme_qpair *qpair) { mtx_lock(&qpair->recovery); - mtx_lock(&qpair->lock); + mtx_lock(&qpair->lock); nvme_qpair_disable(qpair); + mtx_unlock(&qpair->lock); + nvme_admin_qpair_abort_aers(qpair); - mtx_unlock(&qpair->lock); mtx_unlock(&qpair->recovery); } @@ -1451,18 +1464,27 @@ nvme_qpair_fail(struct nvme_qpair *qpair) if (!mtx_initialized(&qpair->lock)) return; + mtx_lock(&qpair->recovery); + qpair->recovery_state = RECOVERY_FAILED; + mtx_unlock(&qpair->recovery); + mtx_lock(&qpair->lock); + if (!STAILQ_EMPTY(&qpair->queued_req)) { + nvme_printf(qpair->ctrlr, "failing queued i/o\n"); + } while (!STAILQ_EMPTY(&qpair->queued_req)) { req = STAILQ_FIRST(&qpair->queued_req); STAILQ_REMOVE_HEAD(&qpair->queued_req, stailq); - nvme_printf(qpair->ctrlr, "failing queued i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_request(qpair, req, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); mtx_lock(&qpair->lock); } + if (!TAILQ_EMPTY(&qpair->outstanding_tr)) { + nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); + } /* Manually abort each outstanding I/O. */ while (!TAILQ_EMPTY(&qpair->outstanding_tr)) { tr = TAILQ_FIRST(&qpair->outstanding_tr); @@ -1470,7 +1492,6 @@ nvme_qpair_fail(struct nvme_qpair *qpair) * Do not remove the tracker. The abort_tracker path will * do that for us. */ - nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); mtx_unlock(&qpair->lock); nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, DO_NOT_RETRY, ERROR_PRINT_ALL); From nobody Sun Sep 24 17:35:07 2023 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 4RttSC6fGGz4vDfg; Sun, 24 Sep 2023 17:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RttSC641Xz3YJ4; Sun, 24 Sep 2023 17:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695576907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xO1nkZ3JPHbEA13mW2ql2vpyqQ+r1y3YT9dBBbJ2ty0=; b=o7U02tlf2avPlMvkGRGYQmh9HBVTR1oiCC6bx0jtBe8HGQXZ3Ns3QOw5xFR8TvFjaQUSjn O+GVgWwAvKuW6ZCNvgvaO+Na2yYkAnwAxGu5GMCnRuXzQhGs9IyNJ+DFrjoIAWbYVOHRtD lmymI9folSe8gox1biJYhZU2HdElflhznKQFwUQGth57f0wJnJSNVNjzm6iZkU6WutaesR WMBYOi6usAq+bJ71ozehIHMvvYJvjTcTuhmrhzdYbumARDJDkZEF2pkO+bJf7/O5zCa/3c SJSf6OvdkiNzrd12y5Of/xuVq9RhBhmeUA3orWg+XMTI+NEuwA7NLHQd4vhFCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695576907; a=rsa-sha256; cv=none; b=UriSVStz4MRNxdfN7nVKZ5EtjLTEoEj1EHwNTs1O5vljaCyEKxOEVkIUXsQ/T9jVOOY8qC t4S8Yq107U0Bircru5TeJFfAhMAZQoxakEYUgY+09SS7bTMPAaAuiuxHiJpA8xLzJsDMXt Nb9DMXsp96dppnGhnH0Tj9wi7fpYStjVZfJG7/dwRW5z1NiuII8rqoEqeZEje10pADO7mv MzqXC1tj80W2PXP3NvUAfgi/71zg0sP5Mh5epgoxrz8+icmsJ3snQpAXN7uuB//uT2vGYB fKzQm2M9qnyOwbVkZicdOxiDikSaLcr8UH7hhz9vDxSLjYUQdopJ5UXP1uSWYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695576907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xO1nkZ3JPHbEA13mW2ql2vpyqQ+r1y3YT9dBBbJ2ty0=; b=Ilvrpxvp1amH74p3SH8P8VTaM6y69AZFmGxV2Yh9P9tKrjY05Xj70CxgsWqtej8L+8K6DG pfnxf4BWrczEem66u+rWHjphA8gQVgyLhAZ4U0BN9QzZmyjDoCgDlQil3jjqd1wfLV1rRB ZSoX4+unIJEg7CVpNgjx45lXq/3jKDJEPRIYaXHxNi5QZ10pe5EAICYSk9BGf4KmBqvKIK ZKzwnzht1EBMN2dwItcVBYy+OmrMONx1YVZCS/V11Dn9rsRsp62RXOiTQG3xj9ajT8Ugbm NoT6120WIgSRC+Xr4PsjM6cYjiSVGyT9g79LP/AK7KWLHl+alCmfrXn4v35xsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RttSC57RLzwfF; Sun, 24 Sep 2023 17:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OHZ7CX011739; Sun, 24 Sep 2023 17:35:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OHZ7rr011736; Sun, 24 Sep 2023 17:35:07 GMT (envelope-from git) Date: Sun, 24 Sep 2023 17:35:07 GMT Message-Id: <202309241735.38OHZ7rr011736@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: 0a5d2802b41f - main - vge: correct pause_frames sysctl description 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0a5d2802b41fd216d9a345f749af1a6ccbe9f382 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0a5d2802b41fd216d9a345f749af1a6ccbe9f382 commit 0a5d2802b41fd216d9a345f749af1a6ccbe9f382 Author: Priit Trees AuthorDate: 2023-07-28 21:41:22 +0000 Commit: Ed Maste CommitDate: 2023-09-24 17:34:36 +0000 vge: correct pause_frames sysctl description Reviewed by: emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/806 --- sys/dev/vge/if_vge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c index 04c1c764cdd5..fcc47598454e 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -2564,7 +2564,7 @@ vge_sysctl_node(struct vge_softc *sc) VGE_SYSCTL_STAT_ADD32(ctx, child, "crcerrs", &stats->rx_crcerrs, "CRC errors"); VGE_SYSCTL_STAT_ADD32(ctx, child, "pause_frames", - &stats->rx_pause_frames, "CRC errors"); + &stats->rx_pause_frames, "Pause frames"); VGE_SYSCTL_STAT_ADD32(ctx, child, "align_errs", &stats->rx_alignerrs, "Alignment errors"); VGE_SYSCTL_STAT_ADD32(ctx, child, "nobufs", From nobody Sun Sep 24 22:24:42 2023 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 4Rv0tS42whz4tZHF; Sun, 24 Sep 2023 22:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rv0tS3rYlz3BxQ; Sun, 24 Sep 2023 22:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695594288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BaEjROLpqF9u5ukj0v6PeAvf9aiK6JpBpTOTN+waN5Y=; b=lEyhC//iG1314cdGZEgD1v28lGbpil977MDpL/Hl7RbyJrloIZ1zrw3vDfyTZdU1JR6OMA 9c9mtShX8g0HMRCeb0v7sSDB1lCJb/HaTKavjHlSwpzydX+zX4ApckhY9/ruptOXmqcrRb yzwiNHeLnMKN/hQHWRGanr2vRe50lm4mEKoYDYlWqrRxM+LpCsCYJDesaMabqbiE6eWZkX nqT0OPLR6423onAGDxgE5Q3B4REmK1mtWQsn7utl060inYeztZKOzW0TrdXhPp0VGkZ0Md A7OwCJmyYzkrOlnVIXJnlJCWgKTGUliITN8WMIzV0IxnjJ3lYkTUAFhiV1sTow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695594288; a=rsa-sha256; cv=none; b=GFp6VLshnDrj5DAMfuBtU920jZAoCC46ocHH1IjtvhczSOWD8FeYzRZpbWcPKQgmgezxle HKfnejoNzzEJ4W8UAi6ME4ZbNoWYOh1CjLeZTU5w3qlsab6wv1mbsTP7em986vt6o3pqbW i4803qh3qyHopkwlqqzOkKf97vaISwQIfz1nb0VsLJT+JhSaZbwNCgFyI7JlC0U/uP1e3J uVdHULJECHgUbbP8Q7IQvXkNdppqWeN/4CHfWkZGYAdkf0/OGZZ0zXL5RzonDer/NaqjIM v7h2+gPBb9bKTLEhhCr1/MP0sttO52N3JKDRCspiuON/NsPD5VrG+wduowDV7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695594288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BaEjROLpqF9u5ukj0v6PeAvf9aiK6JpBpTOTN+waN5Y=; b=XEnGcVPg0JS4OJzB13cxkLPQtKyEU927jF7BDpwJUQzIc0qcLqpYepqbCzwEdUwBEHPUVV AV4qsDEmXfN3rntnXO5lKWcyQFqP7pcR8NiAstplsIqu3LDfZ1OtYe5K8yzxFq+ms0C6HZ 5HzouZxg1UmZn04X7YISvo6XwsTz/3LkTGojlwr/F9qoH8ORqf4yC8I5FKOtcGGuBMSDbA BU8S0Ld69JspKn0rxxFvWlKVrNIgObwWa9BaTYhP2TRKWFDLK4n95YfwX2Ufz9FVVjjiPo nzv/Nt4wNJQG60Aa4UpeF2BkBm8DKeS7MpoEZxDyxiL5qnyBFtUn74K2GEyN1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv0tS2pQ1z14Dg; Sun, 24 Sep 2023 22:24:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OMOmDW096923; Sun, 24 Sep 2023 22:24:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OMOgV3096908; Sun, 24 Sep 2023 22:24:42 GMT (envelope-from git) Date: Sun, 24 Sep 2023 22:24:42 GMT Message-Id: <202309242224.38OMOgV3096908@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: abcdc1b9aed7 - main - zfs: merge openzfs/zfs@2e2a46e0a 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: abcdc1b9aed7e0b7b07b47ae14c960c9cefe882f Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=abcdc1b9aed7e0b7b07b47ae14c960c9cefe882f commit abcdc1b9aed7e0b7b07b47ae14c960c9cefe882f Merge: 0a5d2802b41f 2e2a46e0a597 Author: Martin Matuska AuthorDate: 2023-09-24 21:32:11 +0000 Commit: Martin Matuska CommitDate: 2023-09-24 21:58:34 +0000 zfs: merge openzfs/zfs@2e2a46e0a Notable upstream pull request merges: #15243 b53077a9e Add zfs_prepare_disk script for disk firmware install #15298 2e2a46e0a Invoke zdb by guid to avoid import errors #15301 e5d70f467 ZIL: Avoid dbuf_read() in ztest_get_data() Obtained from: OpenZFS OpenZFS commit: 2e2a46e0a597b3ee606ea7dc5bc527459077322f cddl/lib/libzfs/Makefile | 2 +- cddl/usr.libexec/Makefile | 1 + cddl/usr.libexec/zfs_prepare_disk/Makefile | 20 +++ sys/contrib/openzfs/cmd/zed/agents/zfs_mod.c | 43 ++++- sys/contrib/openzfs/cmd/zpool/zpool_iter.c | 33 +--- sys/contrib/openzfs/cmd/zpool/zpool_util.h | 4 + sys/contrib/openzfs/cmd/zpool/zpool_vdev.c | 43 ++++- sys/contrib/openzfs/cmd/ztest.c | 24 +-- sys/contrib/openzfs/config/Rules.am | 1 + sys/contrib/openzfs/config/kernel-fsync-bdev.m4 | 36 ++++ .../openzfs/config/kernel-generic_fillattr.m4 | 39 ++++- sys/contrib/openzfs/config/kernel-inode-times.m4 | 43 +++++ sys/contrib/openzfs/config/kernel.m4 | 2 + .../contrib/debian/openzfs-zfsutils.install | 2 + sys/contrib/openzfs/include/libzfs.h | 9 + .../include/os/linux/kernel/linux/vfs_compat.h | 6 + .../include/os/linux/zfs/sys/zfs_vnops_os.h | 5 + sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 11 ++ sys/contrib/openzfs/lib/libzfs/libzfs.abi | 4 + sys/contrib/openzfs/lib/libzfs/libzfs_util.c | 193 +++++++++++++++++++++ sys/contrib/openzfs/man/Makefile.am | 1 + sys/contrib/openzfs/man/man8/.gitignore | 1 + sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in | 70 ++++++++ .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 2 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 21 ++- .../openzfs/module/os/linux/zfs/zfs_znode.c | 18 +- .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 11 +- .../openzfs/module/os/linux/zfs/zpl_inode.c | 6 +- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 7 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 6 + sys/contrib/openzfs/scripts/Makefile.am | 2 + sys/contrib/openzfs/scripts/zfs_prepare_disk | 17 ++ ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 1 + sys/modules/zfs/zfs_config.h | 19 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 35 files changed, 629 insertions(+), 76 deletions(-) diff --cc cddl/lib/libzfs/Makefile index 6f8965e4c14a,000000000000..ee57c30cc6ca mode 100644,000000..100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@@ -1,107 -1,0 +1,107 @@@ + +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare +.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib + +PACKAGE= zfs +LIB= zfs +LIBADD= \ + avl \ + bsdxml \ + crypto \ + geom \ + m \ + md \ + nvpair \ + pthread \ + rt \ + umem \ + util \ + uutil \ + z \ + zfs_core \ + zutil + +INCS= libzfs.h +USER_C = \ + libzfs_changelist.c \ + libzfs_config.c \ + libzfs_crypto.c \ + libzfs_dataset.c \ + libzfs_diff.c \ + libzfs_import.c \ + libzfs_iter.c \ + libzfs_mount.c \ + libzfs_pool.c \ + libzfs_sendrecv.c \ + libzfs_status.c \ + libzfs_util.c + +# FreeBSD +USER_C += \ + libzfs_compat.c \ + libzfs_zmount.c + +# libshare +USER_C += \ + libshare.c \ + nfs.c \ + os/freebsd/nfs.c \ + os/freebsd/smb.c + +KERNEL_C = \ + cityhash.c \ + zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ + zpool_prop.c \ + zprop_common.c + + +ARCH_C = +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ARCH_C += zfs_fletcher_intel.c \ + zfs_fletcher_sse.c +CFLAGS += -DHAVE_SSE2 +.endif +.if ${MACHINE_ARCH} == "amd64" +ARCH_C += zfs_fletcher_avx512.c +CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F +.endif +.if ${MACHINE_CPUARCH} == "aarch64" +ARCH_C += zfs_fletcher_aarch64_neon.c +.endif + +SRCS= $(USER_C) $(KERNEL_C) $(ARCH_C) + +WARNS?= 2 +SHLIB_MAJOR= 4 +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare +CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h +CFLAGS+= -DSYSCONFDIR=\"/etc\" +CFLAGS+= -DPKGDATADIR=\"/usr/share/zfs\" - ++CFLAGS+= -DZFSEXECDIR=\"${LIBEXECDIR}/zfs\" + +.include diff --cc cddl/usr.libexec/Makefile index 692f16d33717,000000000000..9eb4872b69d5 mode 100644,000000..100644 --- a/cddl/usr.libexec/Makefile +++ b/cddl/usr.libexec/Makefile @@@ -1,9 -1,0 +1,10 @@@ + +.include + +SUBDIR.${MK_ZFS}+= \ ++ zfs_prepare_disk \ + zpool_influxdb + +SUBDIR_PARALLEL= + +.include diff --cc cddl/usr.libexec/zfs_prepare_disk/Makefile index 000000000000,000000000000..e75484c6dc59 new file mode 100644 --- /dev/null +++ b/cddl/usr.libexec/zfs_prepare_disk/Makefile @@@ -1,0 -1,0 +1,20 @@@ ++ ++ZFSTOP= ${SRCTOP}/sys/contrib/openzfs ++ ++.PATH: ${ZFSTOP}/scripts ++ ++PACKAGE= zfs ++SCRIPTS= zfs_prepare_disk ++SCRIPTSDIR= ${LIBEXECDIR}/zfs ++ ++.PATH: ${ZFSTOP}/man/man8 ++MAN= zfs_prepare_disk.8 ++ ++CLEANFILES+= zfs_prepare_disk.8 ++ ++zfs_prepare_disk.8: zfs_prepare_disk.8.in ++ sed ${MAN_SUB} ${.ALLSRC} >${.TARGET} ++ ++MAN_SUB+= -e 's|@zfsexecdir@|${LIBEXECDIR}/zfs|g' ++ ++.include diff --cc sys/contrib/openzfs/config/kernel-fsync-bdev.m4 index 000000000000,c47e236f705f..c47e236f705f mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/kernel-fsync-bdev.m4 +++ b/sys/contrib/openzfs/config/kernel-fsync-bdev.m4 diff --cc sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in index 000000000000,2a741531e415..2a741531e415 mode 000000,100644..100644 --- a/sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in +++ b/sys/contrib/openzfs/man/man8/zfs_prepare_disk.8.in diff --cc sys/contrib/openzfs/scripts/zfs_prepare_disk index 000000000000,02aa9f8a7728..02aa9f8a7728 mode 000000,100755..100755 --- a/sys/contrib/openzfs/scripts/zfs_prepare_disk +++ b/sys/contrib/openzfs/scripts/zfs_prepare_disk diff --cc sys/modules/zfs/zfs_config.h index f0c1dd4726a8,000000000000..1accbe621d17 mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1134 -1,0 +1,1149 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + ++/* fsync_bdev() is declared in include/blkdev.h */ ++/* #undef HAVE_FSYNC_BDEV */ ++ +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + ++/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ ++/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ ++ +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + ++/* inode_get_ctime() exists in linux/fs.h */ ++/* #undef HAVE_INODE_GET_CTIME */ ++ +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + ++/* inode_set_ctime_to_ts() exists in linux/fs.h */ ++/* #undef HAVE_INODE_SET_CTIME_TO_TS */ ++ +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ *** 407 LINES SKIPPED *** From nobody Sun Sep 24 22:40:29 2023 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 4Rv1DZ1dSWz4tbGf; Sun, 24 Sep 2023 22:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rv1DZ14vTz3DhN; Sun, 24 Sep 2023 22:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695595230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9XTnVIdgg4RhAAHPyg7Txq50gPdwN4P98R2jTMdap0=; b=PYAk2TqpioXEIFBSHvXpsC0ZpJJpnF38zmCO4STU88/G0AcfHzmWzsM9m3/slP7FZnTABF a9yafUIous/SBs1TAyKrA8o/klFn6l4Y9t3g+m9l8XoYmAT+akbxUapccRPh9hZHIOa71g C6DLt0THRyhtth8dEYndtvHZCmupe/uFhSSrByOq1mStN9AxvXRLjV20vAuU3xXgNihgbE RZidhRBjIh1FG/ZPramMLtVfZPS0GDBVLAYHCcCGd21sBcqEZuf/bjTO9nNhtLzH/Aeds6 +7KNUW6AYtOZuSE0wijQ89mPZSeCw3927hXzYs5s22gkKPfHmco2mpQXUbGwCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695595230; a=rsa-sha256; cv=none; b=kopvX7nr1KmqxTz3/+VMUaxLuM2YwZGDxHxlVnutQ0yZ8axLzf0lCqtBQ1OwX3bzuAdL4K U49qvtsse4+jn3UBs78W9CsJffsgcLIgqHZE8FXet7noVx4lu4TDpfF9QAESMS1c9LoSPG nyi2SyUP8fSUl0ozQxvVYkukcDPIqIdRHCPGSbXuGUvFAfuDHTv8B+c2Su+Tglx0jfZHUa Nkfp1ofSXlxbNtbIsL2hNXaj/NycslyHzEVygjSH+v/xqwy4HylW2a/7EcF92ECAbLofM0 TKEw7O7ZX9JJZTyjC/3Fe7JRht4czZCFMWZRyTNVWmd2bpLme7G8C3XQA5UX2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695595230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9XTnVIdgg4RhAAHPyg7Txq50gPdwN4P98R2jTMdap0=; b=FOWYpxdTFm52K70U74WEKxyob2LCkQU491D193jJBan6v6cgCdACjkiQj7Xrj9uOu455Uv +2m8+Yeau7hpgMI+UZa3CVS5WaIgXgHyJ3WvNHhWkI5yZocBMCXF/r7EAoP2qDXdGF3Nbz yzdGtv/A4xTRKYx5ckGS+6PMyBE6DGUz6HqiUuAofgVAdsNtiTqiqXWyGYIfnkftd27yJC OHlBWx+o93N8GCby0fJRtrw6WE+l/CjBc+Gn2qr1vbKP1nxu85MCeoTOARJSMVslUCdmus xmnAfNDv8tWEwVPfMVc4xpGZa0vZw76ioz4BgYLTZEnVDgHXVZQWmoczhSw22Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv1DZ08ZCz150B; Sun, 24 Sep 2023 22:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38OMeTcZ022272; Sun, 24 Sep 2023 22:40:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38OMeTR4022269; Sun, 24 Sep 2023 22:40:29 GMT (envelope-from git) Date: Sun, 24 Sep 2023 22:40:29 GMT Message-Id: <202309242240.38OMeTR4022269@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: 5e29272bf57e - main - syscalls.master: Fix SAL annotation for getdirentires basep argument 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 5e29272bf57e24a16f3a17f037f9a5e7cf25ed90 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5e29272bf57e24a16f3a17f037f9a5e7cf25ed90 commit 5e29272bf57e24a16f3a17f037f9a5e7cf25ed90 Author: Haoyu Gu AuthorDate: 2023-09-24 22:34:43 +0000 Commit: Ed Maste CommitDate: 2023-09-24 22:37:58 +0000 syscalls.master: Fix SAL annotation for getdirentires basep argument getdirentires last argument "off_t *basep" is an optional output argument. It returns the value only when the passed-in value(pointer) is non-NULL. This is a part of the research work at RCSLab, University of Waterloo. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41969 --- sys/kern/syscalls.master | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 69a669844629..f7c235ced26c 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -999,7 +999,7 @@ int fd, _Out_writes_bytes_(count) char *buf, u_int count, - _Out_ long *basep + _Out_opt_ long *basep ); } 157 AUE_STATFS COMPAT4 { @@ -1185,7 +1185,7 @@ int fd, _Out_writes_bytes_(count) char *buf, u_int count, - _Out_ long *basep + _Out_opt_ long *basep ); } 197 AUE_MMAP COMPAT6|CAPENABLED { @@ -3097,7 +3097,7 @@ int fd, _Out_writes_bytes_(count) char *buf, size_t count, - _Out_ off_t *basep + _Out_opt_ off_t *basep ); } 555 AUE_STATFS STD { From nobody Mon Sep 25 00:13:58 2023 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 4Rv3JR0v7sz4thv9; Mon, 25 Sep 2023 00:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rv3JQ66hwz3JlK; Mon, 25 Sep 2023 00:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695600838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t6SxypLw9UxuTu0/p6UVXJ7JsrBpB9o62PRi9mi28ZY=; b=xzAKKYZJ/rR65jfqe7YI6eTOpTxjdhfq6rZI98/SQcgchHMAbOVjOotvvqPLeADApvk5lS 43Rx1YG+rSht1LMqm2Y7NWDj+hd/piCHoA0s6MALUtxuNshlx3rxY13A+G/o6v46bBB0p2 AVK+95DEDOUF7mUiuy1xUWfGldDE0663hXzyRx/7uTC7Awjg2/l+yL8Q+co8rGIxDxoBGn J19pO4WEKBhN4gl2y4nGxxCI6e0dygchnNhPaDMZMqdjUV8zusuFe7MFQexpyzIub+wd21 Ixt2CLsmv3R4XvRG8p47gZJhZ78qOiALtshgyZMPlQxU24na/gO9M9axCPCHJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695600838; a=rsa-sha256; cv=none; b=k0a/HDFg1JZKpvdizVUwf1K84711f8uBSLmTczm8U4XnW7Rnu3t2hHSnHtqfe7+oK1ntOJ OZmLwL1ZxImyXOsnAJWOdUnEbeZSPRb5S+y8ND270FoDIE7obOwYXnjfKbcVtKi8BcTJbh AyShmgXedX8Di0lN3kwkfxchEeNm3V4wuiek1uez6oM+taPhyB56W39z5OtjvhPnG/BQCB nhoMYF99th4jn5Bsaqe4+uQk79avuFWqaItnRrX66m2hN6GG52Of2LQrMaVvlYudr4j0nq 7n9TxKVYPb03p7Ec46a2S9Ylv7xNXax+zJGKt1vGO/o5bmNWzEa4tKwm/hqCGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695600838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t6SxypLw9UxuTu0/p6UVXJ7JsrBpB9o62PRi9mi28ZY=; b=y3+aKZD8OlrVy6P4oHqQnJPIGKoBjc0yOss9Ar4SsLdew8Uzbqn7vrhS9eNf5YXFAprvL4 oNSMzpIYvbSnmhhPWk1TE4zkwwPhIRlfxW8MPAInotU2BUKBPzaTUjEG5Aj+RVooHxGFRf vYGhmViJs4+uRNSURzQGOHapHjnFkI88oc8FxpIKjzPiKhPUWK8JmW0A8RpYk6dGUaIOpm qHEvufvk3Vv6fNi26M9G+oeRYoFsQUQXUZiwJzFAy1xIQhHK71Rff6x4Hu4FiwV9nb9DKa O47ga636XB1guWU4EYRyfslVk4iEDEHqzzTzpYCMdjdsLoYvWH/ys3vbk2gi7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rv3JQ5B3hz170Y; Mon, 25 Sep 2023 00:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38P0DwoL078789; Mon, 25 Sep 2023 00:13:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38P0Dw4U078786; Mon, 25 Sep 2023 00:13:58 GMT (envelope-from git) Date: Mon, 25 Sep 2023 00:13:58 GMT Message-Id: <202309250013.38P0Dw4U078786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: a2440348eed7 - main - jail: avoid a clash with /etc/jail.conf.d between rc and jail(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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2440348eed75bb7682579af0905b652747fd016 Auto-Submitted: auto-generated The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=a2440348eed75bb7682579af0905b652747fd016 commit a2440348eed75bb7682579af0905b652747fd016 Author: Jamie Gritton AuthorDate: 2023-09-25 00:03:09 +0000 Commit: Jamie Gritton CommitDate: 2023-09-25 00:03:09 +0000 jail: avoid a clash with /etc/jail.conf.d between rc and jail(8) Since 13.1, /etc/rc.d/jail has looked for a per-jail config file in /etc/jail.conf.d. For RELENG 14, the ".include" directive was added to jail(8), with a sample line in the jail.conf(5) man page that includes "/etc/jail.conf.d/*.conf". These two use cases don't work together. When the jail.conf.d files are included from a master jail.conf, the files in jail.conf.d are likely to hold only partial configurations, and shouldn't be directly loaded by rc.d/jail. But there are existing configurations that depend on the current rc.d behavior. While users could be advised not to include from /etc/jail.conf.d, it's the natural choice even if not mentioned in jail.conf.5. The workaround is for rc.d/jail to continue to load the individual files, but only when /etc/jail.conf doesn't include from that directory (via a simple grep test), This allows the current use while not breaking the previous use. Reported by: antranigv at freebsd.am Differential Revision: https://reviews.freebsd.org/D41962 --- libexec/rc/rc.d/jail | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/jail b/libexec/rc/rc.d/jail index f8995c7e3b00..f12dae280bb0 100755 --- a/libexec/rc/rc.d/jail +++ b/libexec/rc/rc.d/jail @@ -126,7 +126,9 @@ parse_options() if [ -r "$_jconf" ]; then _conf="$_jconf" return 0 - elif [ -r "$_jconfdir" ]; then + elif [ -r "$_jconfdir" ] && ! egrep -q \ + '^\s*\.include\s*["'\'']?/etc/jail.conf.d/' "$jail_conf" \ + 2>/dev/null; then _conf="$_jconfdir" return 0 elif [ -r "$jail_conf" ]; then From nobody Mon Sep 25 09:26:46 2023 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 4RvHZH1ysrz4vHc5; Mon, 25 Sep 2023 09:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvHZH1Gkfz4dch; Mon, 25 Sep 2023 09:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695634007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9afAVKgm7O9hwg4+TBDFivDay6+OB0gVxKs/H070VbE=; b=MfiyqaW2xi+rJcrTRq6LJCbkNAYj4GnTDKcI4r/6qdxlNw6Nzcr9idAui17dhLykIp9Jop UIXldoAovdC/emqh5d2AwsKEIurvA/gz3VStbl0zBQrRlWXsvA/PsrrElppizraz1LXXoT lUjoCQSKLpjf5PLewCCMNKmlQYuvMZ0JB2SgKfY6njUn7kJ17jd6M/UuWO4gx566YCuE57 CPv74dYUR48NCgVYQpbUsMP15UgdjKA6dNykAwIbSe4KFq6ctNXOfbQiWEyPoH5znst+x5 ZeBCWCiuIz7FyqKCgoIbKurQ9CgtJDEvVkaBh2b3LWeJtNTDYKeg+0FGKzoi2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695634007; a=rsa-sha256; cv=none; b=Rmgsqs/S2+NYSGHjkmF18Gwg7qDmuwjs893lattIb43Q95wvby10ICdtCVTcqEoDznA7Fu sXtGEiBcV97leUJhFlcLDhHvv1fEQp401mjRZ+X0gqWBaPVb/xUIeY5DgIDNP341+r5Xx4 PY8buUDtY4Pp3aSxVgmL2xHPKmOxxbZTBsdb4SCdNnqobXF9X+lO5oes+oIAglaaebvjiL hYyB6zDgNNQtLsp+wrhNKNuvjUEIbwOEBSZa8bM5xT/Np94faod8CR1lZpeK42iCDHEApo MyJpMvxXz1Qrz1TeXZWRWvymANaV+FiltoyFXzVbnRJ3P3rqm90XUG6jPQoPWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695634007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9afAVKgm7O9hwg4+TBDFivDay6+OB0gVxKs/H070VbE=; b=DR5abqOUqRH500esx0SG4726PmCvcnsCjllUKyiCOyvUJVmItMot9tQLBM/9vRCfxg3cr9 eeQtYVByK++NHBHtZFMkjbO3hzAmn7NSvITaQFY8Bm2zC2+mjsHLUtNnc5ChSxP4/d5ECO bSY1C3/AtSlwX7yjUHr5/37koUOW2mtQxgbhVAosjvniedh+lp06gKVCnyT2cpDNn9yfLo ySNz4wXenxf4UdOpg5a0aYvE/OTg7ILn4ETuPvqH6EJ24EqiScFqkiNKbdSwFjrOvVeOm8 I+bzIeOVf1psrL+NbH6FGoV0gBlTIF/QLMxJ3HDCC7xPsLCQptW6vuFFufKQ7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvHZH0Cf1z1MbT; Mon, 25 Sep 2023 09:26:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38P9QkOI093098; Mon, 25 Sep 2023 09:26:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38P9QklR093095; Mon, 25 Sep 2023 09:26:46 GMT (envelope-from git) Date: Mon, 25 Sep 2023 09:26:46 GMT Message-Id: <202309250926.38P9QklR093095@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 0a16d3d14db6 - main - linux(4): Update syscalls.master to 6.5 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a16d3d14db67c89ee08f954c670ec4f447a7ab5 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=0a16d3d14db67c89ee08f954c670ec4f447a7ab5 commit 0a16d3d14db67c89ee08f954c670ec4f447a7ab5 Author: Dmitry Chagin AuthorDate: 2023-09-25 09:24:58 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-25 09:24:58 +0000 linux(4): Update syscalls.master to 6.5 MFC after: 1 week --- sys/amd64/linux/linux_dummy_machdep.c | 2 ++ sys/amd64/linux/syscalls.master | 53 ++++++++++++++++++++++++++++++++-- sys/amd64/linux32/syscalls.master | 54 ++++++++++++++++++++++++++++++++--- sys/arm64/linux/syscalls.master | 53 ++++++++++++++++++++++++++++++++-- sys/compat/linux/linux_dummy.c | 35 ++++++++++++++++++----- sys/i386/linux/syscalls.master | 54 ++++++++++++++++++++++++++++++++--- 6 files changed, 231 insertions(+), 20 deletions(-) diff --git a/sys/amd64/linux/linux_dummy_machdep.c b/sys/amd64/linux/linux_dummy_machdep.c index 4737386cb7f7..759586d9f1fc 100644 --- a/sys/amd64/linux/linux_dummy_machdep.c +++ b/sys/amd64/linux/linux_dummy_machdep.c @@ -66,3 +66,5 @@ DUMMY(readahead); DUMMY(restart_syscall); /* Linux 3.15: */ DUMMY(kexec_file_load); +/* Linux 6.6: */ +DUMMY(map_shadow_stack); diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master index 88caaa49367b..437066d1655b 100644 --- a/sys/amd64/linux/syscalls.master +++ b/sys/amd64/linux/syscalls.master @@ -2059,7 +2059,7 @@ uint32_t sig ); } -; Linux 5.0: +; Linux 5.1: 335-423 AUE_NULL UNIMPL nosys 424 AUE_NULL STD { int linux_pidfd_send_signal( @@ -2078,6 +2078,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2096,6 +2097,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2105,6 +2107,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2112,12 +2115,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2126,9 +2131,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2( l_int epfd, @@ -2139,9 +2146,51 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } +453 AUE_NULL STD { + int linux_map_shadow_stack(void); + } ; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys +454 AUE_NULL UNIMPL nosys ; vim: syntax=off diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master index 679eda14202a..32ed678fe0c6 100644 --- a/sys/amd64/linux32/syscalls.master +++ b/sys/amd64/linux32/syscalls.master @@ -2281,6 +2281,7 @@ uint32_t sig ); } +; Linux 5.1: 387-392 AUE_NULL UNIMPL nosys 393 AUE_NULL STD { int linux_semget( @@ -2353,7 +2354,6 @@ struct l_msqid_ds *buf ); } -; Linux 5.0: 403 AUE_NULL STD { int linux_clock_gettime64( clockid_t which, @@ -2506,6 +2506,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2524,6 +2525,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2533,6 +2535,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2540,12 +2543,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2554,9 +2559,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2_64( l_int epfd, @@ -2567,9 +2574,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/arm64/linux/syscalls.master b/sys/arm64/linux/syscalls.master index daaeeef1acc2..9ba548359c46 100644 --- a/sys/arm64/linux/syscalls.master +++ b/sys/arm64/linux/syscalls.master @@ -1736,6 +1736,7 @@ 294 AUE_NULL STD { int linux_kexec_file_load(void); } +; Linux 5.1: 295-423 AUE_NULL UNIMPL unimpl_md_syscall 424 AUE_NULL STD { int linux_pidfd_send_signal( @@ -1754,6 +1755,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -1772,6 +1774,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -1781,6 +1784,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -1788,12 +1792,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -1802,9 +1808,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2( l_int epfd, @@ -1815,9 +1823,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index 4fdab6daab48..35d6debe0da9 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -123,21 +123,42 @@ DUMMY(pwritev2); DUMMY(pkey_mprotect); DUMMY(pkey_alloc); DUMMY(pkey_free); +/* Linux 4.18: */ +DUMMY(io_pgetevents); +/* Linux 5.1: */ +DUMMY(pidfd_send_signal); +DUMMY(io_uring_setup); +DUMMY(io_uring_enter); +DUMMY(io_uring_register); +/* Linux 5.2: */ DUMMY(open_tree); DUMMY(move_mount); DUMMY(fsopen); DUMMY(fsconfig); DUMMY(fsmount); DUMMY(fspick); +/* Linux 5.3: */ DUMMY(pidfd_open); +/* Linux 5.6: */ DUMMY(openat2); DUMMY(pidfd_getfd); +/* Linux 5.10: */ DUMMY(process_madvise); +/* Linux 5.12: */ DUMMY(mount_setattr); -/* Linux 4.18: */ -DUMMY(io_pgetevents); -/* Linux 5.0: */ -DUMMY(pidfd_send_signal); -DUMMY(io_uring_setup); -DUMMY(io_uring_enter); -DUMMY(io_uring_register); +/* Linux 5.13: */ +DUMMY(landlock_create_ruleset); +DUMMY(landlock_add_rule); +DUMMY(landlock_restrict_self); +/* Linux 5.14: */ +DUMMY(memfd_secret); +DUMMY(quotactl_fd); +/* Linux 5.15: */ +DUMMY(process_mrelease); +/* Linux 5.16: */ +DUMMY(futex_waitv); +DUMMY(set_mempolicy_home_node); +/* Linux 6.5: */ +DUMMY(cachestat); +/* Linux 6.6: */ +DUMMY(fchmodat2); diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 6144deeb31ab..3f37cc2fc485 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -2293,6 +2293,7 @@ uint32_t sig ); } +; Linux 5.1: 387-392 AUE_NULL UNIMPL nosys 393 AUE_NULL STD { int linux_semget( @@ -2365,7 +2366,6 @@ struct l_msqid_ds *buf ); } -; Linux 5.0: 403 AUE_NULL STD { int linux_clock_gettime64( clockid_t which, @@ -2518,6 +2518,7 @@ 427 AUE_NULL STD { int linux_io_uring_register(void); } +; Linux 5.2: 428 AUE_NULL STD { int linux_open_tree(void); } @@ -2536,6 +2537,7 @@ 433 AUE_NULL STD { int linux_fspick(void); } +; Linux 5.3: 434 AUE_NULL STD { int linux_pidfd_open(void); } @@ -2545,6 +2547,7 @@ l_size_t usize ); } +; Linux 5.9: 436 AUE_CLOSERANGE STD { int linux_close_range( l_uint first, @@ -2552,12 +2555,14 @@ l_uint flags ); } +; Linux 5.6: 437 AUE_NULL STD { int linux_openat2(void); } 438 AUE_NULL STD { int linux_pidfd_getfd(void); } +; Linux 5.8: 439 AUE_NULL STD { int linux_faccessat2( l_int dfd, @@ -2566,9 +2571,11 @@ l_int flags ); } +; Linux 5.10: 440 AUE_NULL STD { int linux_process_madvise(void); } +; Linux 5.11: 441 AUE_NULL STD { int linux_epoll_pwait2_64( l_int epfd, @@ -2579,9 +2586,48 @@ l_size_t sigsetsize ); } +; Linux 5.12: 442 AUE_NULL STD { int linux_mount_setattr(void); } -; please, keep this line at the end. -443 AUE_NULL UNIMPL nosys -; vim: syntax=off +; Linux 5.14: +443 AUE_NULL STD { + int linux_quotactl_fd(void); + } +; Linux 5.13: +444 AUE_NULL STD { + int linux_landlock_create_ruleset(void); + } +445 AUE_NULL STD { + int linux_landlock_add_rule(void); + } +446 AUE_NULL STD { + int linux_landlock_restrict_self(void); + } +; Linux 5.14: +447 AUE_NULL STD { + int linux_memfd_secret(void); + } +; Linux 5.15: +448 AUE_NULL STD { + int linux_process_mrelease(void); + } +; Linux 5.16: +449 AUE_NULL STD { + int linux_futex_waitv(void); + } +; Linux 5.17: +450 AUE_NULL STD { + int linux_set_mempolicy_home_node(void); + } +; Linux 6.5: +451 AUE_NULL STD { + int linux_cachestat(void); + } +; Linux 6.6: +452 AUE_NULL STD { + int linux_fchmodat2(void); + } + ; please, keep this line at the end. +453 AUE_NULL UNIMPL nosys + ; vim: syntax=off From nobody Mon Sep 25 09:26:48 2023 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 4RvHZJ2gsGz4vHkn; Mon, 25 Sep 2023 09:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvHZJ1ykcz4f72; Mon, 25 Sep 2023 09:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695634008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSqDVQnj0VlJrQnAv4Rcz+jTpcXh9Q7s7pnCAnU4X4M=; b=aIJ3QimVdHpVkywUa9liUGR+7gGbxdev9MECnt3QmsEY+erC3nGmSdGUNCgjmIfGeuWI21 dPTsyYEvXgwBXzyIanPRSJkkJquEexX2sIhbxw0AuyNGJB2FVNCyArkLPe9di1riNWrKJz GCNBDxDf9vt41Lt1OR1Ls2Whozk+GpST4MNWq8zyk/L94e/laXiMn2wH3e1gf5AVjSIgi8 KNwtRcMppSfc7bR4IxdIRTN9u4YuK6LiYSJdnsR7+Sk5Lr2qEr+7eYaFm522ky0HQT5RQX Mvo6iCFgibyk1b0uUjNCTRdrGlKoo1GaMb65fPdmJ384/7sBguY/1IO3AKnSjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695634008; a=rsa-sha256; cv=none; b=XTEZf1vwY0hHNmcpvR1UnQksP790a/Doz/a5IgRLPAiebsofkrPw/3WQNVMR7AWJz8ujru pSxihqqjzcPxsAYdAzTW2Tv+nt2KjqWD4vtoivm/PlTH16qtinJVahfCvlIoOTDn6olVJf tLCcA3xnAYapb4q69UbhN40HA70FfsbqxA8kCXBn80Rt0lltT2psfUZsWZX24LuphB/ZGu poLp8W1ppLOeqvGUNpOZXJXEw8QxqWKOdf1pLVUJ5yGKeKqah/Nx4H+J94+J9vRKT5AzyI xsZD//gIuit6bC+aTnjRCiAoaELGWGHvAdAOIMIvhSDGmA4nGVCMfYLJLcLOAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695634008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSqDVQnj0VlJrQnAv4Rcz+jTpcXh9Q7s7pnCAnU4X4M=; b=Fz/3Mk8yCJg/sqqF9AYByxtHpMb1BtEY3Gzl5kRYEoz1RVyTJbnaiAmSF+3SeAYXaG1Rgp eeenycFURDqP2izBLcV+Rw0khbjqvkAD1pK3wjr7RMSL01PnJcmv6rpXJ2iuSIcoOjSUK0 DXY8cJxIcZEJzS17EVJp0NrohoDVQsbddmUIYZXT4BnLLnZEdaeOvVr0tJmlF0jRXTF88r 9nYnPJuXxtckm4VzZd9jiJ3IbMIq2PgC5j7QnOsp+cuvpNNOuQLS3FRygPnuVV65sgYB1K yBdx6Vl1ypG1avYQrAfIXIBL4ZSWNzr8Wx8ov5KHNyFPif1vysUJwlPzwuI9zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvHZJ0nNXz1N1m; Mon, 25 Sep 2023 09:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38P9QmAl093131; Mon, 25 Sep 2023 09:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38P9QmG3093128; Mon, 25 Sep 2023 09:26:48 GMT (envelope-from git) Date: Mon, 25 Sep 2023 09:26:48 GMT Message-Id: <202309250926.38P9QmG3093128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 28035f675b85 - main - linux(4): Regen 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28035f675b8590a24fddb418083788609ef75cc8 Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=28035f675b8590a24fddb418083788609ef75cc8 commit 28035f675b8590a24fddb418083788609ef75cc8 Author: Dmitry Chagin AuthorDate: 2023-09-25 09:26:34 +0000 Commit: Dmitry Chagin CommitDate: 2023-09-25 09:26:34 +0000 linux(4): Regen MFC after: 1 week --- sys/amd64/linux/linux_proto.h | 55 +++++++++++++++ sys/amd64/linux/linux_syscall.h | 13 +++- sys/amd64/linux/linux_syscalls.c | 13 +++- sys/amd64/linux/linux_sysent.c | 13 +++- sys/amd64/linux/linux_systrace_args.c | 110 ++++++++++++++++++++++++++++++ sys/amd64/linux32/linux32_proto.h | 50 ++++++++++++++ sys/amd64/linux32/linux32_syscall.h | 12 +++- sys/amd64/linux32/linux32_syscalls.c | 12 +++- sys/amd64/linux32/linux32_sysent.c | 12 +++- sys/amd64/linux32/linux32_systrace_args.c | 100 +++++++++++++++++++++++++++ sys/arm64/linux/linux_proto.h | 50 ++++++++++++++ sys/arm64/linux/linux_syscall.h | 12 +++- sys/arm64/linux/linux_syscalls.c | 12 +++- sys/arm64/linux/linux_sysent.c | 12 +++- sys/arm64/linux/linux_systrace_args.c | 100 +++++++++++++++++++++++++++ sys/i386/linux/linux_proto.h | 50 ++++++++++++++ sys/i386/linux/linux_syscall.h | 12 +++- sys/i386/linux/linux_syscalls.c | 12 +++- sys/i386/linux/linux_sysent.c | 12 +++- sys/i386/linux/linux_systrace_args.c | 100 +++++++++++++++++++++++++++ 20 files changed, 750 insertions(+), 12 deletions(-) diff --git a/sys/amd64/linux/linux_proto.h b/sys/amd64/linux/linux_proto.h index 2a9dbf6fbe12..0759ce282499 100644 --- a/sys/amd64/linux/linux_proto.h +++ b/sys/amd64/linux/linux_proto.h @@ -1405,6 +1405,39 @@ struct linux_epoll_pwait2_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; +struct linux_map_shadow_stack_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_write(struct thread *, struct linux_write_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1705,6 +1738,17 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); +int linux_map_shadow_stack(struct thread *, struct linux_map_shadow_stack_args *); #define LINUX_SYS_AUE_linux_write AUE_NULL #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_newstat AUE_STAT @@ -2004,6 +2048,17 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL +#define LINUX_SYS_AUE_linux_map_shadow_stack AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/amd64/linux/linux_syscall.h b/sys/amd64/linux/linux_syscall.h index 4755c673ab0f..efd3413f91ce 100644 --- a/sys/amd64/linux/linux_syscall.h +++ b/sys/amd64/linux/linux_syscall.h @@ -343,4 +343,15 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_linux_map_shadow_stack 453 +#define LINUX_SYS_MAXSYSCALL 455 diff --git a/sys/amd64/linux/linux_syscalls.c b/sys/amd64/linux/linux_syscalls.c index 201daec24f67..6851612ec749 100644 --- a/sys/amd64/linux/linux_syscalls.c +++ b/sys/amd64/linux/linux_syscalls.c @@ -449,5 +449,16 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "linux_map_shadow_stack", /* 453 = linux_map_shadow_stack */ + "#454", /* 454 = nosys */ }; diff --git a/sys/amd64/linux/linux_sysent.c b/sys/amd64/linux/linux_sysent.c index 694a22060125..ecb4ebb85b3a 100644 --- a/sys/amd64/linux/linux_sysent.c +++ b/sys/amd64/linux/linux_sysent.c @@ -459,5 +459,16 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_map_shadow_stack, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 453 = linux_map_shadow_stack */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 454 = nosys */ }; diff --git a/sys/amd64/linux/linux_systrace_args.c b/sys/amd64/linux/linux_systrace_args.c index 9d53132063fa..2b0cf1df7e40 100644 --- a/sys/amd64/linux/linux_systrace_args.c +++ b/sys/amd64/linux/linux_systrace_args.c @@ -2751,6 +2751,61 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } + /* linux_map_shadow_stack */ + case 453: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -7181,6 +7236,39 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; + /* linux_map_shadow_stack */ + case 453: + break; default: break; }; @@ -8681,6 +8769,28 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: + /* linux_map_shadow_stack */ + case 453: default: break; }; diff --git a/sys/amd64/linux32/linux32_proto.h b/sys/amd64/linux32/linux32_proto.h index 8767199f2342..ae52fb81c560 100644 --- a/sys/amd64/linux32/linux32_proto.h +++ b/sys/amd64/linux32/linux32_proto.h @@ -1706,6 +1706,36 @@ struct linux_epoll_pwait2_64_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); @@ -2071,6 +2101,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX32_SYS_AUE_linux_exit AUE_EXIT #define LINUX32_SYS_AUE_linux_fork AUE_FORK #define LINUX32_SYS_AUE_linux_write AUE_NULL @@ -2435,6 +2475,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX32_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX32_SYS_AUE_linux_epoll_pwait2_64 AUE_NULL #define LINUX32_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX32_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX32_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX32_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX32_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX32_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX32_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX32_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX32_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/amd64/linux32/linux32_syscall.h b/sys/amd64/linux32/linux32_syscall.h index e24080e3c2e7..b6d74578cdfd 100644 --- a/sys/amd64/linux32/linux32_syscall.h +++ b/sys/amd64/linux32/linux32_syscall.h @@ -403,4 +403,14 @@ #define LINUX32_SYS_linux_process_madvise 440 #define LINUX32_SYS_linux_epoll_pwait2_64 441 #define LINUX32_SYS_linux_mount_setattr 442 -#define LINUX32_SYS_MAXSYSCALL 444 +#define LINUX32_SYS_linux_quotactl_fd 443 +#define LINUX32_SYS_linux_landlock_create_ruleset 444 +#define LINUX32_SYS_linux_landlock_add_rule 445 +#define LINUX32_SYS_linux_landlock_restrict_self 446 +#define LINUX32_SYS_linux_memfd_secret 447 +#define LINUX32_SYS_linux_process_mrelease 448 +#define LINUX32_SYS_linux_futex_waitv 449 +#define LINUX32_SYS_linux_set_mempolicy_home_node 450 +#define LINUX32_SYS_linux_cachestat 451 +#define LINUX32_SYS_linux_fchmodat2 452 +#define LINUX32_SYS_MAXSYSCALL 454 diff --git a/sys/amd64/linux32/linux32_syscalls.c b/sys/amd64/linux32/linux32_syscalls.c index cdeda60a1577..3f1e0425e224 100644 --- a/sys/amd64/linux32/linux32_syscalls.c +++ b/sys/amd64/linux32/linux32_syscalls.c @@ -449,5 +449,15 @@ const char *linux32_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2_64", /* 441 = linux_epoll_pwait2_64 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_sysent.c b/sys/amd64/linux32/linux32_sysent.c index a3570b9bfe5b..c1656a124026 100644 --- a/sys/amd64/linux32/linux32_sysent.c +++ b/sys/amd64/linux32/linux32_sysent.c @@ -460,5 +460,15 @@ struct sysent linux32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_64_args), .sy_call = (sy_call_t *)linux_epoll_pwait2_64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2_64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/amd64/linux32/linux32_systrace_args.c b/sys/amd64/linux32/linux32_systrace_args.c index de00b970027b..29940f4ed8a3 100644 --- a/sys/amd64/linux32/linux32_systrace_args.c +++ b/sys/amd64/linux32/linux32_systrace_args.c @@ -3265,6 +3265,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -8560,6 +8610,36 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; default: break; }; @@ -10347,6 +10427,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: default: break; }; diff --git a/sys/arm64/linux/linux_proto.h b/sys/arm64/linux/linux_proto.h index f24b7f25669d..d002ad5a824f 100644 --- a/sys/arm64/linux/linux_proto.h +++ b/sys/arm64/linux/linux_proto.h @@ -1215,6 +1215,36 @@ struct linux_epoll_pwait2_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_setxattr(struct thread *, struct linux_setxattr_args *); int linux_lsetxattr(struct thread *, struct linux_lsetxattr_args *); @@ -1466,6 +1496,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2(struct thread *, struct linux_epoll_pwait2_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX_SYS_AUE_linux_setxattr AUE_NULL #define LINUX_SYS_AUE_linux_lsetxattr AUE_NULL #define LINUX_SYS_AUE_linux_fsetxattr AUE_NULL @@ -1716,6 +1756,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/arm64/linux/linux_syscall.h b/sys/arm64/linux/linux_syscall.h index f331bec5dc4f..c45f3ded47a2 100644 --- a/sys/arm64/linux/linux_syscall.h +++ b/sys/arm64/linux/linux_syscall.h @@ -291,4 +291,14 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_MAXSYSCALL 454 diff --git a/sys/arm64/linux/linux_syscalls.c b/sys/arm64/linux/linux_syscalls.c index 8bf57f971c54..81fed4cc0227 100644 --- a/sys/arm64/linux/linux_syscalls.c +++ b/sys/arm64/linux/linux_syscalls.c @@ -449,5 +449,15 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2", /* 441 = linux_epoll_pwait2 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/arm64/linux/linux_sysent.c b/sys/arm64/linux/linux_sysent.c index 3bc2e2ad96d9..c0b495482040 100644 --- a/sys/arm64/linux/linux_sysent.c +++ b/sys/arm64/linux/linux_sysent.c @@ -459,5 +459,15 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_args), .sy_call = (sy_call_t *)linux_epoll_pwait2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/arm64/linux/linux_systrace_args.c b/sys/arm64/linux/linux_systrace_args.c index 60daffbb420f..ff58a287ee88 100644 --- a/sys/arm64/linux/linux_systrace_args.c +++ b/sys/arm64/linux/linux_systrace_args.c @@ -2373,6 +2373,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { + *n_args = 0; + break; + } + /* linux_landlock_create_ruleset */ + case 444: { + *n_args = 0; + break; + } + /* linux_landlock_add_rule */ + case 445: { + *n_args = 0; + break; + } + /* linux_landlock_restrict_self */ + case 446: { + *n_args = 0; + break; + } + /* linux_memfd_secret */ + case 447: { + *n_args = 0; + break; + } + /* linux_process_mrelease */ + case 448: { + *n_args = 0; + break; + } + /* linux_futex_waitv */ + case 449: { + *n_args = 0; + break; + } + /* linux_set_mempolicy_home_node */ + case 450: { + *n_args = 0; + break; + } + /* linux_cachestat */ + case 451: { + *n_args = 0; + break; + } + /* linux_fchmodat2 */ + case 452: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -6256,6 +6306,36 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) /* linux_mount_setattr */ case 442: break; + /* linux_quotactl_fd */ + case 443: + break; + /* linux_landlock_create_ruleset */ + case 444: + break; + /* linux_landlock_add_rule */ + case 445: + break; + /* linux_landlock_restrict_self */ + case 446: + break; + /* linux_memfd_secret */ + case 447: + break; + /* linux_process_mrelease */ + case 448: + break; + /* linux_futex_waitv */ + case 449: + break; + /* linux_set_mempolicy_home_node */ + case 450: + break; + /* linux_cachestat */ + case 451: + break; + /* linux_fchmodat2 */ + case 452: + break; default: break; }; @@ -7541,6 +7621,26 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; /* linux_mount_setattr */ case 442: + /* linux_quotactl_fd */ + case 443: + /* linux_landlock_create_ruleset */ + case 444: + /* linux_landlock_add_rule */ + case 445: + /* linux_landlock_restrict_self */ + case 446: + /* linux_memfd_secret */ + case 447: + /* linux_process_mrelease */ + case 448: + /* linux_futex_waitv */ + case 449: + /* linux_set_mempolicy_home_node */ + case 450: + /* linux_cachestat */ + case 451: + /* linux_fchmodat2 */ + case 452: default: break; }; diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h index 5baec9364d5b..6cbab6b1e8d8 100644 --- a/sys/i386/linux/linux_proto.h +++ b/sys/i386/linux/linux_proto.h @@ -1700,6 +1700,36 @@ struct linux_epoll_pwait2_64_args { struct linux_mount_setattr_args { syscallarg_t dummy; }; +struct linux_quotactl_fd_args { + syscallarg_t dummy; +}; +struct linux_landlock_create_ruleset_args { + syscallarg_t dummy; +}; +struct linux_landlock_add_rule_args { + syscallarg_t dummy; +}; +struct linux_landlock_restrict_self_args { + syscallarg_t dummy; +}; +struct linux_memfd_secret_args { + syscallarg_t dummy; +}; +struct linux_process_mrelease_args { + syscallarg_t dummy; +}; +struct linux_futex_waitv_args { + syscallarg_t dummy; +}; +struct linux_set_mempolicy_home_node_args { + syscallarg_t dummy; +}; +struct linux_cachestat_args { + syscallarg_t dummy; +}; +struct linux_fchmodat2_args { + syscallarg_t dummy; +}; #define nosys linux_nosys int linux_exit(struct thread *, struct linux_exit_args *); int linux_fork(struct thread *, struct linux_fork_args *); @@ -2067,6 +2097,16 @@ int linux_faccessat2(struct thread *, struct linux_faccessat2_args *); int linux_process_madvise(struct thread *, struct linux_process_madvise_args *); int linux_epoll_pwait2_64(struct thread *, struct linux_epoll_pwait2_64_args *); int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); +int linux_quotactl_fd(struct thread *, struct linux_quotactl_fd_args *); +int linux_landlock_create_ruleset(struct thread *, struct linux_landlock_create_ruleset_args *); +int linux_landlock_add_rule(struct thread *, struct linux_landlock_add_rule_args *); +int linux_landlock_restrict_self(struct thread *, struct linux_landlock_restrict_self_args *); +int linux_memfd_secret(struct thread *, struct linux_memfd_secret_args *); +int linux_process_mrelease(struct thread *, struct linux_process_mrelease_args *); +int linux_futex_waitv(struct thread *, struct linux_futex_waitv_args *); +int linux_set_mempolicy_home_node(struct thread *, struct linux_set_mempolicy_home_node_args *); +int linux_cachestat(struct thread *, struct linux_cachestat_args *); +int linux_fchmodat2(struct thread *, struct linux_fchmodat2_args *); #define LINUX_SYS_AUE_linux_exit AUE_EXIT #define LINUX_SYS_AUE_linux_fork AUE_FORK #define LINUX_SYS_AUE_linux_write AUE_NULL @@ -2433,6 +2473,16 @@ int linux_mount_setattr(struct thread *, struct linux_mount_setattr_args *); #define LINUX_SYS_AUE_linux_process_madvise AUE_NULL #define LINUX_SYS_AUE_linux_epoll_pwait2_64 AUE_NULL #define LINUX_SYS_AUE_linux_mount_setattr AUE_NULL +#define LINUX_SYS_AUE_linux_quotactl_fd AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_create_ruleset AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_add_rule AUE_NULL +#define LINUX_SYS_AUE_linux_landlock_restrict_self AUE_NULL +#define LINUX_SYS_AUE_linux_memfd_secret AUE_NULL +#define LINUX_SYS_AUE_linux_process_mrelease AUE_NULL +#define LINUX_SYS_AUE_linux_futex_waitv AUE_NULL +#define LINUX_SYS_AUE_linux_set_mempolicy_home_node AUE_NULL +#define LINUX_SYS_AUE_linux_cachestat AUE_NULL +#define LINUX_SYS_AUE_linux_fchmodat2 AUE_NULL #undef PAD_ #undef PADL_ diff --git a/sys/i386/linux/linux_syscall.h b/sys/i386/linux/linux_syscall.h index 96aa0fbc1815..19b1714fb5d9 100644 --- a/sys/i386/linux/linux_syscall.h +++ b/sys/i386/linux/linux_syscall.h @@ -409,4 +409,14 @@ #define LINUX_SYS_linux_process_madvise 440 #define LINUX_SYS_linux_epoll_pwait2_64 441 #define LINUX_SYS_linux_mount_setattr 442 -#define LINUX_SYS_MAXSYSCALL 444 +#define LINUX_SYS_linux_quotactl_fd 443 +#define LINUX_SYS_linux_landlock_create_ruleset 444 +#define LINUX_SYS_linux_landlock_add_rule 445 +#define LINUX_SYS_linux_landlock_restrict_self 446 +#define LINUX_SYS_linux_memfd_secret 447 +#define LINUX_SYS_linux_process_mrelease 448 +#define LINUX_SYS_linux_futex_waitv 449 +#define LINUX_SYS_linux_set_mempolicy_home_node 450 +#define LINUX_SYS_linux_cachestat 451 +#define LINUX_SYS_linux_fchmodat2 452 +#define LINUX_SYS_MAXSYSCALL 454 diff --git a/sys/i386/linux/linux_syscalls.c b/sys/i386/linux/linux_syscalls.c index ebb3fafca78d..112e6505bd00 100644 --- a/sys/i386/linux/linux_syscalls.c +++ b/sys/i386/linux/linux_syscalls.c @@ -449,5 +449,15 @@ const char *linux_syscallnames[] = { "linux_process_madvise", /* 440 = linux_process_madvise */ "linux_epoll_pwait2_64", /* 441 = linux_epoll_pwait2_64 */ "linux_mount_setattr", /* 442 = linux_mount_setattr */ - "#443", /* 443 = nosys */ + "linux_quotactl_fd", /* 443 = linux_quotactl_fd */ + "linux_landlock_create_ruleset", /* 444 = linux_landlock_create_ruleset */ + "linux_landlock_add_rule", /* 445 = linux_landlock_add_rule */ + "linux_landlock_restrict_self", /* 446 = linux_landlock_restrict_self */ + "linux_memfd_secret", /* 447 = linux_memfd_secret */ + "linux_process_mrelease", /* 448 = linux_process_mrelease */ + "linux_futex_waitv", /* 449 = linux_futex_waitv */ + "linux_set_mempolicy_home_node", /* 450 = linux_set_mempolicy_home_node */ + "linux_cachestat", /* 451 = linux_cachestat */ + "linux_fchmodat2", /* 452 = linux_fchmodat2 */ + "#453", /* 453 = nosys */ }; diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c index c293f2173e8c..5aa7f4921774 100644 --- a/sys/i386/linux/linux_sysent.c +++ b/sys/i386/linux/linux_sysent.c @@ -459,5 +459,15 @@ struct sysent linux_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_madvise, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 440 = linux_process_madvise */ { .sy_narg = AS(linux_epoll_pwait2_64_args), .sy_call = (sy_call_t *)linux_epoll_pwait2_64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 441 = linux_epoll_pwait2_64 */ { .sy_narg = 0, .sy_call = (sy_call_t *)linux_mount_setattr, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 442 = linux_mount_setattr */ - { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 443 = nosys */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_quotactl_fd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 443 = linux_quotactl_fd */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_create_ruleset, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 444 = linux_landlock_create_ruleset */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_add_rule, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 445 = linux_landlock_add_rule */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_landlock_restrict_self, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 446 = linux_landlock_restrict_self */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_memfd_secret, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 447 = linux_memfd_secret */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_process_mrelease, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 448 = linux_process_mrelease */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_futex_waitv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 449 = linux_futex_waitv */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_set_mempolicy_home_node, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 450 = linux_set_mempolicy_home_node */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_cachestat, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 451 = linux_cachestat */ + { .sy_narg = 0, .sy_call = (sy_call_t *)linux_fchmodat2, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 452 = linux_fchmodat2 */ + { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 453 = nosys */ }; diff --git a/sys/i386/linux/linux_systrace_args.c b/sys/i386/linux/linux_systrace_args.c index 0bd681c68b6c..76781af18124 100644 --- a/sys/i386/linux/linux_systrace_args.c +++ b/sys/i386/linux/linux_systrace_args.c @@ -3296,6 +3296,56 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 0; break; } + /* linux_quotactl_fd */ + case 443: { *** 115 LINES SKIPPED *** From nobody Mon Sep 25 10:12:27 2023 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 4RvJZz2hT0z4vLQp; Mon, 25 Sep 2023 10:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvJZz2H6wz3DtM; Mon, 25 Sep 2023 10:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4cEa9m88mGntfacrZ02R0tXBX4kSamtNU0FWgTxOoA=; b=yat4x0olGGhVugZrYU6bhz/N+0R8yeLRIYR999NUuu04bNHlcnFMaU9fO5Vm09Q+HiiSS0 brhz6p4jL5WrVbd+lXgPUuGIe5887tT100UL8HAu2I+VX5UAOTuQW8Q0EkSb5dbyqlT466 +N71vv3AwTiAsLQblWT7T/wyCjkC/HFAtKy5gnm3O+3Cn0Q2/PBmkQAR97kfQU7MmRW4d3 cVunMaM6YhbL07Vm44jVTLiBURz9okU+Zds6pxIB6gY1B/zGBZM3rJxLuFfm2O3wofPe6Y jQvyG9umVtcG0ASyG1bScfpGR3kBjo6tjIa9P9LXGcFdqBGQ5Mp8O8V67tuR3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695636747; a=rsa-sha256; cv=none; b=Vlrau5twSWIpmCN4qRbH75Ahmsx3YLnsImeI8orYFFlGtMOFXZZZrd9sb2/V7DEbBqDVQU BSc1a3p5xU4sPM+r+E96tRZVVKVCSRM9hKAfIMb+Nb9R9v3uNgf4KdcYd+pjVbaCNtXUFZ avqGhkB7cEVlsTVbU0jYeLH4rRLtY3CwD5pcNYQZgrTcLun5HkRalsq//BLPoOOoCucTfr hIlgW0cC8OBnr5M1zWVehwxrBMbYwxxUuIycOShDwCPylFGJTRLGUqDcU4c5YbDca7lwMv Ri5mjXwL/cM70muXCdMiDE2D+SqepDUT0QJGvGsss0q3uiztk0jV3DQJCm3A3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j4cEa9m88mGntfacrZ02R0tXBX4kSamtNU0FWgTxOoA=; b=JBzTxHEIc5EwZhRj73EkYQncRE8RXAj91PmIeDo+aiso9Q0sXwpLLXnmb42rtM0EDW+AwH Le/u5hVuGObfyI7e9hFQ37X1k2SJWUQKTHuDp7dWuMCKr8tLuGsleG56DpOK/Dx9E6TzOj wdAU5F80V5adJ6kU2nNhGss4WgXLjInRxFBSKGoj32RwQsRTf9E7s4eCdhMZFlADl1abPW /FZs2F7PTQ6HEJutEqrXWp7D464JUrGmJBSG69IPEyIoxjZ+9Lz68YaVh1ebNnW1uV0lWW FHZYEepQceah/vLSPLX+Nr5r89+7Ly4VH+eVqbHUmGYHlFtdJePnIFBbDf5FJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJZz1LCfz1PCY; Mon, 25 Sep 2023 10:12:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PACRpe075475; Mon, 25 Sep 2023 10:12:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PACRbW075472; Mon, 25 Sep 2023 10:12:27 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:12:27 GMT Message-Id: <202309251012.38PACRbW075472@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: 21a722d9593e - main - rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 21a722d9593eb477f4ccdad011a2b4df0727fc62 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=21a722d9593eb477f4ccdad011a2b4df0727fc62 commit 21a722d9593eb477f4ccdad011a2b4df0727fc62 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:46 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-25 10:10:46 +0000 rtsock: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.route.netisr_maxqlen` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 --- sys/net/rtsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 1a83fc2d8abe..019b9e80291c 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -241,7 +241,7 @@ sysctl_route_netisr_maxqlen(SYSCTL_HANDLER_ARGS) return (netisr_setqlimit(&rtsock_nh, qlimit)); } SYSCTL_PROC(_net_route, OID_AUTO, netisr_maxqlen, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, 0, 0, sysctl_route_netisr_maxqlen, "I", "maximum routing socket dispatch queue length"); From nobody Mon Sep 25 10:12:28 2023 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 4RvJb04w66z4vLK4; Mon, 25 Sep 2023 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvJb03VyKz3DgF; Mon, 25 Sep 2023 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R7GGgZAceh3h78VfwDmgh4Om8al8+XaeM+lXLvzvuww=; b=PNKzAWS6a4576uw6vB2tzd3Qtgnc8tLt7fCx8K6ph63vgd5ufujw22y14Nn00iIIalXyfl WSYWARG8x2YR/EdrdyT2XKV4/DSLn8LsGuw1eFfidPuPMm4rAnXh2OHRA0sMCp1mOYDo2D 5b1TigueLiaGx0oZjOwTFE375fX2TVLbirbkIBNT/slBa3q+z/dQHzgiZ1bGopvLM/QVZu nZQ0JPDXtJE7Goc6+jJmuYlnKYbQrhJ31aCKQIx/JvQs34imSoeHMxspgrgtzZhhWm6Rxd AUBz8sKrkDEJoeLRFxaIm017UujXN1D+zq7co7osyNlNjM6vsgcFDeX82Mub5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695636748; a=rsa-sha256; cv=none; b=DNipF7Bpq2qIFiK+sWQBZiefEZXSN3WSfsfEI6l5rOnKWlYnozxbkYXbMYceElVF2MLLMK 8sbkbpk1dHvFdc8M6R4sTRooVX/VZiav/TW3jabj0qn6JUUSUavjDaPUQshQ2kI+2rMKVN QEmRYX+jXSj6MwHbXjPJXGFxpPmThHu61nZShSnxpoDcyjcmnGDdi08DAR1o1klLa2DrZx UKQdOrfSJ4GKwrtbMVMTetehBPyt+7+cJdjVPOC/mpz4vulNk/mVtuMcssGw1XDc7ohCI1 arfjLcoVl5/HrYXdQZtFT7ssWvOmpUVQ4HTtqmGDi/W2CVMEh2jzxDuiFSGtVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R7GGgZAceh3h78VfwDmgh4Om8al8+XaeM+lXLvzvuww=; b=VdnJy64qe243Ngwdz1mUE+3deZUmEXYIUd1mRa+L+XShASw0CcCH3zHaOdkyE6uERLhw8P hp859I7BauVNjmIqbBkDF9ObXDuvBCYl4qIeXEzojOw+GtQeqqAjJlYac0lft4gjPZeJRX tdLFAvKJunDNuKpP7Y5E99L/eonsj8pkrHyUDe7fNBB61dYSx6reK17LYJiVV/iDjM+wL0 nmNhc50ddCMI2JvAqo5UH3C55ehLt9w/d6isXiGY7x3HIDWhvw1guWTxMILCFkKb+wmzPT FK2Oisus+x2IXW0xVQS1G5WI3bXUuaZiFEjLM+dp/ExVV+wtn+L/EhIRGKu6FQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJb02TZMz1PZR; Mon, 25 Sep 2023 10:12:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PACSWs075530; Mon, 25 Sep 2023 10:12:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PACS5k075527; Mon, 25 Sep 2023 10:12:28 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:12:28 GMT Message-Id: <202309251012.38PACS5k075527@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: 03dac3e37993 - main - netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 03dac3e37993801dab4418087bfedacce0526e66 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=03dac3e37993801dab4418087bfedacce0526e66 commit 03dac3e37993801dab4418087bfedacce0526e66 Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-25 10:10:47 +0000 netinet6: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet6.ip6.auto_linklocal 2. net.inet6.ip6.accept_rtadv 3. net.inet6.ip6.no_radr No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 --- sys/netinet6/in6_proto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 1d67577f8055..6e7ffedc3dcd 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -278,10 +278,10 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat, ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_accept_rtadv), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_accept_rtadv), 0, "Default value of per-interface flag for accepting ICMPv6 RA messages"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_NO_RADR, no_radr, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_no_radr), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_no_radr), 0, "Default value of per-interface flag to control whether routers " "sending ICMPv6 RA messages on that interface are added into the " "default router list"); @@ -334,7 +334,7 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_V6ONLY, v6only, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_v6only), 0, "Restrict AF_INET6 sockets to IPv6 addresses only"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_AUTO_LINKLOCAL, auto_linklocal, - CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0, + CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_auto_linklocal), 0, "Default value of per-interface flag for automatically adding an IPv6 " "link-local address to interfaces when attached"); SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, From nobody Mon Sep 25 10:12:29 2023 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 4RvJb16grkz4vLSt; Mon, 25 Sep 2023 10:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvJb14Y3wz3DwN; Mon, 25 Sep 2023 10:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G5714zCqHW8dvt3Ftsl2zlSmBM5pXLULWht2JQMz8cQ=; b=O8a+yWApxuaYE8dV6j5NRg9riS+pS2QScfc9CPnCrzk31thWDqN2rUwigY/jqQpOh0AG2N FXK2pA+75nWGcPK5ch2iA+mpCRut9424XvomvlAf0WaE3xN2ndwUo0tf2pe1c3+Ini44uS B8umiGQte/pSa3A3F8/aOhrxznYDtTMWDQDG8171H66yk4tsWPzwXZ/FuymBpXf9G0RZZ+ iUlPVQSzjlplapFYCKjxyCn1aA3U0eiYxtseUk1qgAdWkXxOa724/H1HauCmY82o+cbnpd DS5z926w816MOifR0xDkhkt1usy1L+5gDxxrCxXuiMh6b7fLv6OOPWNIXqM04A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695636749; a=rsa-sha256; cv=none; b=tt0CgE9PhwGeXEJx6LOMa3iTGRCnHCPu4oDr1ZC3cwril8Qo9WkjCGY++W87FjpTA4Q32b CipQv3//8z6ql6IMp7JCDh78aD7v8hJCAN70bDP4g27mXguVenDZPS0zvdYftNLp0v3gMr eok1sIQZMwIdwzDKbYnd6KeHuxhSbha8YYG0CQuz1qemWrHf+ZcAGzK3W9/D35Vff6Uo+q Tm7wB1X6m9bo7V/QW9MZDRjQqXgLeEHCVfNF6xp2owyKW4pUa7a9yW5aY3pzm3h9ESr3ml pZYOU7STt6ESKSv6rIJGu9aCe0g9fsxa4NZWTMkGK1lM96Htss19zJOrCgbcEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695636749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G5714zCqHW8dvt3Ftsl2zlSmBM5pXLULWht2JQMz8cQ=; b=i6KlzehCB32Qk4GKyJSP1SmUfrshd+IeCbA1SkenL6wHSTmRMPzsH4XIrL30Vi9Hbhuv77 15VwcT+mbcxs8DwEBnp/+mcvwVoDLwLm7HEUdTDtP69ODwDNsI+T1OM7nozaGS9cn6s0tQ GEnGJhGcHRRn2Sf2QD9tsqJuk/xfM8LVB9di3ieKH59yu+es7kEIFW1YcHSnF0UZ/UmdHh 48pyLjpOkpAS/q6bqRzy+debiY0LjkPFONJ4dpyU3/JKv5T/B5k9jeDzj+KDyKpYaRJBtS 5KyEfWy1F0uH1uXzMnXM4/rB63Jkpdow1H5pucHJm5gwOKi6/iLfsQwqh6esvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvJb13X34z1PCZ; Mon, 25 Sep 2023 10:12:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PACT1u075588; Mon, 25 Sep 2023 10:12:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PACTt9075585; Mon, 25 Sep 2023 10:12:29 GMT (envelope-from git) Date: Mon, 25 Sep 2023 10:12:29 GMT Message-Id: <202309251012.38PACTt9075585@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: 49197c391b3d - main - ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 49197c391b3d49a33bcd08471bf64d533cd10f9d Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=49197c391b3d49a33bcd08471bf64d533cd10f9d commit 49197c391b3d49a33bcd08471bf64d533cd10f9d Author: Zhenlei Huang AuthorDate: 2023-09-25 10:10:47 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-25 10:10:47 +0000 ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.ip.fw.enable 2. net.inet6.ip6.fw.enable 3. net.link.ether.ipfw No functional change intended. Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41928 --- sys/netpfil/ipfw/ip_fw_pfil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_pfil.c b/sys/netpfil/ipfw/ip_fw_pfil.c index 1cfff1870d7f..4dae28aa0544 100644 --- a/sys/netpfil/ipfw/ip_fw_pfil.c +++ b/sys/netpfil/ipfw/ip_fw_pfil.c @@ -91,20 +91,20 @@ SYSBEGIN(f1) SYSCTL_DECL(_net_inet_ip_fw); SYSCTL_PROC(_net_inet_ip_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw_enable), 0, ipfw_chg_hook, "I", "Enable ipfw"); #ifdef INET6 SYSCTL_DECL(_net_inet6_ip6_fw); SYSCTL_PROC(_net_inet6_ip6_fw, OID_AUTO, enable, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fw6_enable), 0, ipfw_chg_hook, "I", "Enable ipfw+6"); #endif /* INET6 */ SYSCTL_DECL(_net_link_ether); SYSCTL_PROC(_net_link_ether, OID_AUTO, ipfw, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_SECURE3 | + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_SECURE3 | CTLFLAG_NEEDGIANT, &VNET_NAME(fwlink_enable), 0, ipfw_chg_hook, "I", "Pass ether pkts through firewall"); From nobody Mon Sep 25 13:43:29 2023 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 4RvPGl4Qgqz4rLqB; Mon, 25 Sep 2023 13:43:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvPGl2jXMz4MS6; Mon, 25 Sep 2023 13:43:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5031ccf004cso10381318e87.2; Mon, 25 Sep 2023 06:43:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695649421; x=1696254221; 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=3fpAlsm4iMHAaBlKs4ai3EuHArQJx/Nu9myacLXOSCM=; b=Rs7JV8pbLiAvv3zDrp716ZNElwDwxEAzWkqvqA7NDn8l0smg0k0cuV6Cm8xaCvkuEz NsAh24GkgpUMh59hre2fxmwbMrlDFLcLwoXSkvX3J0xi9KtsZWcWoWelwzRZ9uXDB+HI eAtYvEDYWX6Nx6nfyJPsQKGJw0d75X7HVelchiGjDnA5jhlhf8G8aPrGp9mClwY/qatg MPHTFEupdzni7zefj5Rr8I9gHAX2+D9nxnpzAshTJOj+qemkLXeLNpaHQlEohAl96dGM gWTA42KwicSCNSeL2un/mE6xwx6rBcbjLV8cG9W35ysBhkIU2pY5LLyyhJikbS7xUnqI JFdg== X-Gm-Message-State: AOJu0Yx/8MXP/skhridqjq39IU/3L073+EsQW/OaFOarJI4/e+VLTHFX lf3zYZs7exY/5v4ODpjE2l0YPtPbrdBYsn5O5PxVAoQHujN8UA== X-Google-Smtp-Source: AGHT+IHNzLwl8KlrGi8JUtG4eYE61KmA6EMpz/dO8xmbjom4SzMDPZTbNaJAvy9jhugr0podJhAaVBQ6cjcYbWmTkT8= X-Received: by 2002:ac2:515c:0:b0:501:c1d4:cf68 with SMTP id q28-20020ac2515c000000b00501c1d4cf68mr6168266lfd.15.1695649420829; Mon, 25 Sep 2023 06:43:40 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202309250926.38P9QklR093095@gitrepo.freebsd.org> In-Reply-To: <202309250926.38P9QklR093095@gitrepo.freebsd.org> From: Ed Maste Date: Mon, 25 Sep 2023 09:43:29 -0400 Message-ID: Subject: Re: git: 0a16d3d14db6 - main - linux(4): Update syscalls.master to 6.5 To: Dmitry Chagin 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-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4RvPGl2jXMz4MS6 On Mon, 25 Sept 2023 at 05:26, Dmitry Chagin wrote: > > The branch main has been updated by dchagin: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0a16d3d14db67c89ee08f954c670ec4f447a7ab5 > > commit 0a16d3d14db67c89ee08f954c670ec4f447a7ab5 > Author: Dmitry Chagin > AuthorDate: 2023-09-25 09:24:58 +0000 > Commit: Dmitry Chagin > CommitDate: 2023-09-25 09:24:58 +0000 > > linux(4): Update syscalls.master to 6.5 I guess this should be 6.6? From nobody Mon Sep 25 13:56:44 2023 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 4RvPYx0wQrz4rMPD; Mon, 25 Sep 2023 13:56:53 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_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 4RvPYw3X2gz4Qtb; Mon, 25 Sep 2023 13:56:52 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.2/8.16.1) with ESMTP id 38PDuiqO058878; Mon, 25 Sep 2023 16:56:44 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.2/8.16.1/Submit) id 38PDuiSi058877; Mon, 25 Sep 2023 16:56:44 +0300 (MSK) (envelope-from dchagin) Date: Mon, 25 Sep 2023 16:56:44 +0300 From: Dmitry Chagin To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0a16d3d14db6 - main - linux(4): Update syscalls.master to 6.5 Message-ID: References: <202309250926.38P9QklR093095@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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Queue-Id: 4RvPYw3X2gz4Qtb On Mon, Sep 25, 2023 at 09:43:29AM -0400, Ed Maste wrote: > On Mon, 25 Sept 2023 at 05:26, Dmitry Chagin wrote: > > > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=0a16d3d14db67c89ee08f954c670ec4f447a7ab5 > > > > commit 0a16d3d14db67c89ee08f954c670ec4f447a7ab5 > > Author: Dmitry Chagin > > AuthorDate: 2023-09-25 09:24:58 +0000 > > Commit: Dmitry Chagin > > CommitDate: 2023-09-25 09:24:58 +0000 > > > > linux(4): Update syscalls.master to 6.5 > > I guess this should be 6.6? 6.6 is not released, so I didn't mention unexistent revision From nobody Mon Sep 25 14:19:52 2023 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 4RvQ4S4X0gz4rP41; Mon, 25 Sep 2023 14:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQ4S42YXz4Rk0; Mon, 25 Sep 2023 14:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695651592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ueHdk98jqkfrFWK1VnFz4Sa08NZEv/3vNx6F/zFFoaM=; b=ehwj8ynSA5IfvTHk3aG9An15eFkP6TaX8VtFI3mR9UL5AsSl0YsifEYxAwsWvsczrIKy4N slf492d+b8uAPhY1NL8ctNVKFs7pt93pp7Fd/+0/UkyS1z/kVWzQd34k5gEWPxJgs9r7I8 sRV6SP9FTWwborMn4L7sVnot9KaMEYVWPEUB5MxHs3mZqWEK82GcsKFzX8DZTbGFhMueV1 qtAL7tHAf2d3rg5CFKu7QZkn1rl0SCJeyShmPNfiP1fOSkgZYhBOgBqSjYA9Rtaijh+a1l eR5or+lwhEwbkmCDzW/IpvNRXst8CXVhQu2h99hfpOcLVhti5e/JZFeJ/0W/4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695651592; a=rsa-sha256; cv=none; b=FE2hkxUzTyGHWK52xWa9PfCqIKZ5eVdv4xeMlhPRdqIL/uwipscn0DXBkukSsEF0IG56Dl hvTxr+jvAhtPPUFBLaEyE+yMp9ukYHkHGgfAX5HPHUdWRLq5yON4j+q5yc+SMBvTHrA3h9 WvkkL3+YXs0WE7EJx3oa0CObfyNlLMIy33DbEXXOrbRYxJdyBkwx6wdz1a1aeUXrooR3ip f5uTR7ylh/WZPlJiEMDTBolrgBjNqDjEVimdy6oHwTrIYTx/DYYEpZrYw7YRCx20UgW1eb bXSRTtG164iWdh9omHTcwz0ckawKvdeFTClKYJERroJwUytyVhYtneTn/y2FbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695651592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ueHdk98jqkfrFWK1VnFz4Sa08NZEv/3vNx6F/zFFoaM=; b=ynCOzsnfOo9DlkQGMRAwY4nFQMoSybFW/jHwArVlB7RYSCc3rH1ESnYBR3DzsUsOjMzrYB 0RFu+hDzGV0KphcA6N4u/OskF9eqNQdyEHI61yoQZ4xrUgcSTOdRuC/Q+gwr8gmbmJhJdR x0ZWW0bO1MUnqM9v7Wq6goZoS8mDg7XryU/R7d4eninKefnkFpPq3kXkdv0OGIFyFfVr/4 Kr2wYjrbswt8L1KkSAlThh1yy3touOPHsW4tENLjx5pDlxnwhnVLU4i8398zKVbAvYcHqp 5OCrs6w2K7U6xevow+etu+5uMTcjUbBV5WAFcLMX/vHXtlMKZRleNvJ6qfYVzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQ4S3484z2TG; Mon, 25 Sep 2023 14:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEJq2f078579; Mon, 25 Sep 2023 14:19:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEJqf7078576; Mon, 25 Sep 2023 14:19:52 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:19:52 GMT Message-Id: <202309251419.38PEJqf7078576@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: 82ddab0e8f9d - main - arm: Don't advertise the virtual timer on arm 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 82ddab0e8f9d5d0e4e8fdd2a7a17cd87e464f55b Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=82ddab0e8f9d5d0e4e8fdd2a7a17cd87e464f55b commit 82ddab0e8f9d5d0e4e8fdd2a7a17cd87e464f55b Author: Andrew Turner AuthorDate: 2023-09-25 08:10:11 +0000 Commit: Andrew Turner CommitDate: 2023-09-25 14:19:33 +0000 arm: Don't advertise the virtual timer on arm It may not be usable on all SoCs. Sponsored by: Arm Ltd --- sys/arm/arm/generic_timer.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/arm/arm/generic_timer.c b/sys/arm/arm/generic_timer.c index 998259c5c90f..e3298ae0fb14 100644 --- a/sys/arm/arm/generic_timer.c +++ b/sys/arm/arm/generic_timer.c @@ -617,7 +617,10 @@ arm_tmr_attach(device_t dev) phandle_t node; pcell_t clock; #endif - int error, user_phys; +#ifdef __aarch64__ + int user_phys; +#endif + int error; int i, first_timer, last_timer; sc = device_get_softc(dev); @@ -693,6 +696,7 @@ arm_tmr_attach(device_t dev) last_timer = GT_PHYS_NONSECURE; } +#ifdef __aarch64__ /* * The virtual timer is always available on arm and arm64, tell * userspace to use it. @@ -702,6 +706,13 @@ arm_tmr_attach(device_t dev) if (TUNABLE_INT_FETCH("hw.userspace_allow_phys_counter", &user_phys) && user_phys != 0) sc->physical_user = sc->physical_sys; +#else + /* + * The virtual timer depends on setting cntvoff from the hypervisor + * privilege level/el2, however this is only set on arm64. + */ + sc->physical_user = true; +#endif arm_tmr_sc = sc; From nobody Mon Sep 25 14:58:08 2023 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 4RvQwc5P5wz4rRYF; Mon, 25 Sep 2023 14:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwc4p4Mz4VmS; Mon, 25 Sep 2023 14:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N3msuGUSjwzof20MNF71mgy82eiS8xMLd/chNp0luc4=; b=riictry4b+hVGKIgTqFE5asbFRcx/YgrPwo7EuJDaSOdPPYlo9SSUm11vPG5l7u9swqaum nYHmo+JYO+nSQoc7SzXIUu0sG+pNB/bLCYrTHhD8ZGx9yX+ttAYHWh+SuQwY8zqvk2u7lo 4TeRHBgcFtufl5JcN+C1WvXjE7JLm6xSBwQ58wcgor/HpTUJtCdM8D6o4xSYxSqLPNPX8e na0BUqdYytjBpj2iBlYKrPw9jJkITpm15n1moCwnAA2OeVH+1iATESdCvWAnxgM1+AwY93 vgi67RG6RlVeKsBgy6vsbKpzGOSoL5Ybw3WggXeT6zEvFS5M6QlvR8X261V4Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653888; a=rsa-sha256; cv=none; b=mJPnD5M9DRrSCELb+F2qBUfTTu42bW5bFUUtPg5cwiUNt15QkF3ERja07gDuV5wNMd3MJZ 8CT4sgULHGK7rF2B6miDG7SaJLfsAL+glpjPfuT7X3exSbf5g2966ksq0y0uKu6G5IFNhq RA8cT9Lv7SX/4rGKW8hAUDN+5TEUEViuw3bzCHU23S//C2X3WB4r9ye3WxS5Wuuik34H+i nvILqdH/A+sum9QISowj6q4+oY7NcT4+rA9nwAMxlqLReILMEMs+y+e89K+d9yoiATG6a/ QzxlVoRqDQhoSrbDH9DRiTPVa7Lx0/yM2fFfShphddVsellSOJFFvl/PHb0Y3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N3msuGUSjwzof20MNF71mgy82eiS8xMLd/chNp0luc4=; b=oiA7uAnRkBRFDaGFFVWVr7k8o1+8aORRBthQBpW7qTYjz1KTy7vlDMcN74vJmUg2DyanBr /gg2oB6ssi9gYeAcj27r+ejKIA4mMaRgdAP3JkzcG7ByJDcQgEqI7auT8jqRTHGYk6ME72 4rauko9gtus/Ygm9fv+h7eptXFf3Gcxh5kC9ahtvhmHl5FOC6iv5BaGK7wIDYO6+/IDORE TzSDxOE+xdCgqY8smFYKxEiyKI/SeCsYgVP1EdAoujGo5xWXCyqmMg2fEajbJdCQdNWaH2 /fYX49jrcDrFR/EeiUxWC0XRLX334p8Fewq/ABNtYPYkFg+1SGjf3CO7m4+1bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwc3qttz3DZ; Mon, 25 Sep 2023 14:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEw89P044342; Mon, 25 Sep 2023 14:58:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEw8R7044339; Mon, 25 Sep 2023 14:58:08 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:08 GMT Message-Id: <202309251458.38PEw8R7044339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 97232e04ca07 - main - make_*_driver.sh: Don't include $FreeBSD$ in generated files 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97232e04ca07dffeef629c1628f1cc95f062b41a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=97232e04ca07dffeef629c1628f1cc95f062b41a commit 97232e04ca07dffeef629c1628f1cc95f062b41a Author: John Baldwin AuthorDate: 2023-09-25 14:46:09 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:46:09 +0000 make_*_driver.sh: Don't include $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41950 --- share/examples/drivers/make_device_driver.sh | 8 -------- share/examples/drivers/make_pseudo_driver.sh | 6 ------ 2 files changed, 14 deletions(-) diff --git a/share/examples/drivers/make_device_driver.sh b/share/examples/drivers/make_device_driver.sh index 3ed8d784c1c0..5b8f8efa6469 100755 --- a/share/examples/drivers/make_device_driver.sh +++ b/share/examples/drivers/make_device_driver.sh @@ -34,8 +34,6 @@ else fi UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"` -RCS_KEYWORD=FreeBSD - if [ -d ${TOP}/modules/${1} ]; then echo "There appears to already be a module called ${1}" echo -n "Should it be overwritten? [Y]" @@ -90,7 +88,6 @@ DONE ####################################################################### cat >${TOP}/i386/conf/${UPPER} <${TOP}/dev/${1}/${1}.c < -__FBSDID("\$${RCS_KEYWORD}$"); - #include #include #include /* cdevsw stuff */ @@ -956,8 +950,6 @@ fi cat >${TOP}/modules/${1}/Makefile <${TOP}/i386/conf/${UPPER} <${TOP}/dev/${1}/${1}.c < -__FBSDID("\$FreeBSD\$"); - #include #include #include /* SYSINIT stuff */ @@ -389,8 +385,6 @@ fi cat >${TOP}/modules/${1}/Makefile < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7736786b08e8 - main - Retire old diskless setup scripts 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7736786b08e8c9edb07088db3229695d0afed600 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7736786b08e8c9edb07088db3229695d0afed600 commit 7736786b08e8c9edb07088db3229695d0afed600 Author: John Baldwin AuthorDate: 2023-09-25 14:46:21 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:46:21 +0000 Retire old diskless setup scripts These scripts predate /etc/rc.diskless* and use a different scheme. A comment was added to them back in 2002 noting they were 3 years old at that point. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41951 --- ObsoleteFiles.inc | 6 + share/examples/Makefile | 8 - share/examples/diskless/ME | 52 ------ share/examples/diskless/README.BOOTP | 172 ----------------- share/examples/diskless/README.TEMPLATING | 301 ------------------------------ share/examples/diskless/clone_root | 137 -------------- 6 files changed, 6 insertions(+), 670 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index eb0394722aa9..b0b004843eeb 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,12 @@ # xargs -n1 | sort | uniq -d; # done +# 2023xxxx +OLD_FILES+=usr/share/examples/diskless/ME +OLD_FILES+=usr/share/examples/diskless/README.BOOTP +OLD_FILES+=usr/share/examples/diskless/README.TEMPLATING +OLD_FILES+=usr/share/examples/diskless/clone_root + # 20230905 OLD_FILES+=usr/share/doc/legal/realtek_rtw88_firmware.LICENCE diff --git a/share/examples/Makefile b/share/examples/Makefile index 3ee7d8c0d840..06d10a0bc149 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -11,7 +11,6 @@ LDIRS= BSD_daemon \ IPv6 \ bootforth \ csh \ - diskless \ drivers \ etc \ find_interface \ @@ -74,13 +73,6 @@ SE_BOOTFORTH= \ SE_DIRS+= csh SE_CSH= dot.cshrc -SE_DIRS+= diskless -SE_DISKLESS= \ - ME \ - README.BOOTP \ - README.TEMPLATING \ - clone_root - SE_DIRS+= drivers SE_DRIVERS= \ README \ diff --git a/share/examples/diskless/ME b/share/examples/diskless/ME deleted file mode 100644 index ff06be2c5393..000000000000 --- a/share/examples/diskless/ME +++ /dev/null @@ -1,52 +0,0 @@ -IMPORTANT NOTE: - -As of Feb. 11, 2002 (and indeed, for quite some time before that), -the /etc/rc.diskless{1,2} scripts support a slightly different -diskless boot process than the one documented in the rest of -this file (which is 3 years old). - -I am not deleting the information below because it contains some -useful background information on diskless operation, but for the -actual details you should look at /etc/rc.diskless1, /etc/rc.diskless2, -and the /usr/share/examples/diskless/clone_root script which can -be useful to set up clients and server for diskless boot. - ---- $FreeBSD$ --- ------------------------------------------------------------------------- - -When templating, /conf/ME is typically a softlink to -/conf/. When doing a diskless boot, /conf/ME is -retargeted by /etc/rc.diskless1 from pointing to the server to pointing -to the client's directory, /conf/. The retargeting -is accomplished through an MFS -o union mount. - -When templating, this softlink should be different for each machine. -When doing a diskless boot, this softlink is typically part of the / NFS -mount from the server and points to the server's conf directory, but gets -retargeted during the /etc/rc.diskless1 phase. - -System-wide configuration files must generally be targeted through /conf/ME. -For example, your /etc/rc.conf.local should become a softlink to -/conf/ME/rc.conf.local and your real rc.conf.local should go into the -appropriate /conf/ directory. This is also true of -/etc/rc.local, /etc/fstab, /etc/syslog.conf, /etc/ccd.conf, /etc/ipfw.conf, -/etc/motd, /etc/resolv.conf, and possibly even /etc/ttys ( if you want -to start an X session up on boot on certain of your machines ). - -When templating, you duplicate your / and /usr partitions on each machine's -local disk from a single master ( assuming /var and /home reside elsewhere ), -EXCEPT for the /conf/ME softlink. The /conf/ME softlink is the only thing -on / that should be different for each machine. - -There are often categories of configuration files. For example, all of your -shell machines may use one resolv.conf while all of your mail proxies may -use another. Configuration files can be categorized fairly easily through -/conf/HT. directories. You put the actual configuration file in -/conf/HT. and make a softlink from -/conf/ME//config-file to "../HT.. - - In the BOOTP workstation /conf/$IP/rc.conf.local, you must typically - turn *OFF* most of the system option defaults in /etc/rc.conf as well - as do additional custom configuration of your environment - - The /usr/src/share/examples/diskless directory contains a typical - X session / sshd based workstation configuration. The directories - involved are HT.DISKLESS/ and 192.157.86.12/. - - Essentially, the $IP/ directory ( which rc.diskless looks for in - /conf/$IP/ ) contains all the junk. The HT.DISKLESS directory exists - to hold common elements of your custom configuration so you do not have - to repeat those elements for each workstation. The example /conf - structure included here shows how to create a working sshd setup ( so - you can sshd into the diskless workstation ), retarget xdm's pid and error - files to R+W directories if /usr is mounted read-only, and retarget - syslogd and other programs. This example is not designed to run out of - the box and some modifications are required. - - >> NOTE << HT.DISKLESS/ttys contains the typical configuration required - to bring X up at boot time. Essentially, it runs xdm in the foreground - with the appropriate arguments rather then a getty on ttyv0. You must - run xdm on ttyv0 in order to prevent xdm racing with getty on a virtual - terminal. Such a race can cause your keyboard to be directed away from - the X session, essentially making the session unusable. - - Typically you should start with a clean slate by tar-copying this example - directory to /conf and then hack on it in /conf rather then in - /usr/share/examples/diskless. - - BOOTP CLIENT SETUP - - Here is a typical kernel configuration. If you have only one ethernet - interface you do not need to wire BOOTP to a specific interface name. - BOOTP requires NFS and NFS_ROOT, and our boot scripts require MFS. If - your /tmp is *not* a softlink to /var/tmp, the scripts also require NULLFS - -# BootP -# -options BOOTP # Use BOOTP to obtain IP address/hostname -options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info -options "BOOTP_NFSV3" # Use NFS v3 to NFS mount rootoptions -options BOOTP_COMPAT # Workaround for broken bootp daemons. -#options "BOOTP_WIRED_TO=de0" - -options MFS # Memory File System -options NFS # Network Filesystem -options NFS_ROOT # Nfs can be root -options NULLFS # nullfs to map /var/tmp to /tmp - - BOOTP SERVER SETUP - - The BOOTP server must be running on the same logical LAN as the - BOOTP client(s). You need to setup two things: - - (1) You need to NFS-export /, /usr, and /var. - - (2) You need to run a BOOTP server. DHCPD can do this. - - - NFS Export: - - Here is an example "/etc/exports" file. - -/ -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 -/usr -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 -/var -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 - - In order to be an NFS server, the server must run portmap, mountd, - nfsd, and rpc.statd. The standard NFS server options in /etc/rc.conf - will work ( you should put your overrides in /etc/rc.conf.local on the - server and not edit the distribution /etc/rc.conf, though ). - - BOOTP Server: - - This configuration file "/etc/dhcpd.conf" example is for - the '/usr/ports/net/isc-dhcp' dhcpd port. - - subnet 192.157.86.0 netmask 255.255.255.192 { - # range if you want to run the core dhcpd service of - # dynamic IP assignment, but it is not used with BOOTP - # workstations - range 192.157.86.32 192.157.86.62; - - # misc configuration. - # - option routers 192.157.86.2; - option domain-name-servers 192.157.86.2; - - server-name "apollo.fubar.com"; - option subnet-mask 255.255.255.192; - option domain-name-servers 192.157.86.2; - option domain-name "fubar.com"; - option broadcast-address 192.157.86.63; - option routers 192.157.86.2; - } - - host test1 { - hardware ethernet 00:a0:c9:d3:38:25; - fixed-address 192.157.86.11; - option root-path "192.157.86.2:/"; - option option-128 "192.157.86.2:/images/swap"; - } - - host test2 { - # hardware ethernet 00:e0:29:1d:16:09; - hardware ethernet 00:10:5a:a8:94:0e; - fixed-address 192.157.86.12; - option root-path "192.157.86.2:/"; - option option-128 "192.157.86.2:/images/swap"; - } - - SWAP. This example includes options to automatically BOOTP configure - NFS swap on each workstation. In order to use this capabilities you - need to NFS-export a swap directory READ+WRITE to the workstations. - - You must then create a swap directory for each workstation you wish to - assign swap to. In this example I created a dummy user 'lander' and - did an NFS export of /images/swap enforcing a UID of 'lander' for - all accesses. - - apollo:/usr/ports/net# ls -la /images/swap - total 491786 - drwxr-xr-x 2 root wheel 512 Dec 28 07:00 . - drwxr-xr-x 8 root wheel 512 Jan 20 10:54 .. - -rw-r--r-- 1 lander wheel 33554432 Dec 23 14:35 swap.192.157.86.11 - -rw-r--r-- 1 lander wheel 335544320 Jan 24 16:55 swap.192.157.86.12 - -rw-r--r-- 1 lander wheel 134217728 Jan 21 17:19 swap.192.157.86.6 - - A swap file is best created with dd: - - # create a 32MB swap file for a BOOTP workstation - dd if=/dev/zero of=swap.IPADDRESS bs=1m count=32 - - It is generally a good idea to give your workstations some swap space, - but not a requirement if they have a lot of memory. - diff --git a/share/examples/diskless/README.TEMPLATING b/share/examples/diskless/README.TEMPLATING deleted file mode 100644 index 48984e02b1da..000000000000 --- a/share/examples/diskless/README.TEMPLATING +++ /dev/null @@ -1,301 +0,0 @@ -IMPORTANT NOTE: - -As of Feb. 11, 2002 (and indeed, for quite some time before that), -the /etc/rc.diskless{1,2} scripts support a slightly different -diskless boot process than the one documented in the rest of -this file (which is 3 years old). - -I am not deleting the information below because it contains some -useful background information on diskless operation, but for the -actual details you should look at /etc/rc.diskless1, /etc/rc.diskless2, -and the /usr/share/examples/diskless/clone_root script which can -be useful to set up clients and server for diskless boot. - ---- $FreeBSD$ --- ------------------------------------------------------------------------- - - TEMPLATING machine configurations - - Matthew Dillon - dillon@backplane.com - - This document describes a general mechanism by which you can template - / and /usr. That is, to keep a 'master template' of / and /usr on a - separate machine which is then used to update the rest of your machines. - - Generally speaking, you can't simply mirror /. You might be able to - get away with mirroring /usr. There are two main problems involved with - templating: - - (1) Avoiding overwriting run-time generated files - - By default, the system maintains a number of files in the root - partition. For example, sendmail will dbm /etc/aliases into - /etc/aliases.db. vipw or chpass or other password related routines - will regenerate the password dbm's /etc/spwd.db, /etc/pwd.db, and - passwd. /etc/namedb/s might contain generated secondaries. And - so forth. - - The templating mechanism must avoid copying over such files. - - (2) Customizing machines. - - Customizing machines is actually considerably simpler. You create - a configuration hierarchy and convert the configuration files that - have to be customized into softlinks that run through a special - softlink in the configuration directory. This will work for every - configuration file except possibly /etc/master.passwd - - For example, /etc/resolv.conf would be turned into a softlink to - /conf/ME/resolv.conf, and /conf/ME itself would be a softlink to - /conf/. The actual resolv.conf configuration file - would reside in /conf/. - - If you have a lot of hosts, some configuration files may be commonly - classified. For example, all your shell machines might have the - same /etc/resolv.conf. The solution is to make - /conf//resolv.conf a softlink to a common directory, say - /conf/HT.SHELL/resolv.conf. It may sound a little messy, but this - sort of categorization actually makes the sysadmins job much, much - easier. - - The /conf/ directory hierarchy is stored on the template and - distributed to all the machines along with the rest of the root - partition. - - This type of customization is taken from my direct experience - instituting such a system at BEST. At the time, BEST had over 45 - machines managed from a single template. - - RUN-TIME GENERATED OR MODIFIED FILES IN / or /USR - - /etc/aliases.db - /etc/master.passwd - /etc/spwd.db - /etc/pwd.db - /etc/passwd - /etc/namedb/s - /root/.history - /root/.ssh/identity - /root/.ssh/identity.pub - /root/.ssh/random_seed - /root/.ssh/known_hosts - /conf/ME - /kernel* ( note 2 ) - /dev ( note 3 ) - /var ( note 4 ) - /home ( note 4 ) - /lost+found - - /usr/lost+found - /usr/home ( note 4 ) - /usr/crash ( note 5 ) - /usr/obj ( note 5 ) - /usr/ports ( note 5 ) - /usr/src ( note 5 ) - /usr/local/crack ( note 5 ) - /usr/local/lib/X11/xdm/xdm-errors ( note 6 ) - /usr/local/lib/X11/xdm/xdm-pid ( note 6 ) - /usr/local/etc/ssh_host_key ( note 6 ) - /usr/local/etc/ssh_host_key.pub ( note 6 ) - /usr/local/etc/ssh_random_seed ( note 6 ) - - /conf/ME ( note 7 ) - - note 2: You typically want to update kernels manually and *NOT* - template them as a safety measure. This also allows you to run - different kernels on different machines or. - - note 3: /dev must be updated manually. Some devices, such as tty's and - pty's, use the access and/or modify time and/or user/group - operationally and regenerating the devices on the fly would be - bad. - - note 4: /var and /home are usually separately mounted partitions and - thus would not fall under the template, but as a safety measure - the template copier refuse to copy directories named 'home'. - - note 5: These are directories that are as often created directly on - /usr as they are separately-mounted partitions. You typically - do not want to template such directories. - - note 6: Note that you can solve the problem of xdm and sshd creating - files in /usr. With xdm, edit /usr/local/lib/xdm/xdm-config - and change the errorLogFile and pidFile config lines. - - With sshd, add 'HostKey' and 'RandomSeed' directives to specify - /var/db for the location of the host key and run-time sshd - random seed: - - HostKey /var/db/ssh_host_key - RandomSeed /var/db/ssh_random_seed - - note 7: In this example, /conf/ME is the machine customizer and must - be pointed to the /conf// directory, which is - different for each machine. Thus, the /conf/ME softlink - should never be overwritten by the templating copy. - - - TYPICAL CUSTOMIZED CONFIGURATION SOFTLINKS - - The following files typically need to be turned into softlinks - to /conf/ME/: - - /etc/ccd.conf -> /conf/ME/ccd.conf - /etc/ipfw.conf ... - /etc/fstab - /etc/motd - /etc/resolv.conf - /etc/aliases - /etc/sendmail.cw - /etc/organization - /etc/named.conf - /etc/rc.conf.local - /etc/printcap - /etc/inetd.conf - /etc/login.conf - /etc/gettytab - /etc/ntp.conf - /etc/exports - /root/.k5login -> /conf/ME/root/.k5login - - And, of course, /conf/ME is usually a softlink to the appropriate - /conf//. Depending on your system configuration, - there may be other files not listed above that you have to worry about. - - In many cases, /conf/ME/filename is itself a softlink to - "../HT.xxxx/filename", where HT.xxxx is something like HT.STD ... this - added complexity actually makes it easier to manage multiple - classifications of machines. - - DELETION OF FILES - - Any file found on the template destination that does not exist in the - source and is not listed as an exception by the source should be deleted. - However, deletion can be dangerous and cpdup will ask for confirmation - by default. Once you know you aren't going to blow things up, you can - turn this feature off and update your systems automatically from cron. - - By formalizing the delete operation, you can be 100% sure that it is - possible to recreate / and /usr on any machine with only the original - template and a backup of the ( relatively few ) explicitly-excepted - files. The most common mistake a sysop makes is to make a change to a - file in / or /usr on a target machine instead of the template machine. - If the target machine is updated once a night from cron, the sysop - quickly learns not to do this ( because his changes get overwritten - overnight ). With a manual update, these sorts of mistakes can propagate - for weeks or months before they are caught. - - TEMPLATE COPYING AND SAFETY - THE CPDUP PROGRAM - - The 'cpdup' program is a program which efficiently duplicates a directory - tree. The program copies source to destination, duplicating devices, - softlinks, hardlinks, files, modification times, uid, gid, flags, perms, - and so forth. The program incorporates several major features: - - * The program refuses, absolutely, to cross partition boundaries. - i.e. if you were copying the template /usr from an NFS mount to - your /usr, and you had a mount point called /usr/home, the - template copying program would *NOT* descend into /usr/home on - the destination. - - This is a safety. - - * The program accesses a file called .cpignore in each directory - it descends into on the source to obtain a list of exceptions - for that directory -- that is, files not to copy or mess with. - - This is a templating function. - - * The program refuses to delete a directory on the destination - being replaced by a softlink or file on the source. - - This is a safety mechanism - - * The program is capable of maintaining MD5 check cache files and - doing an MD5 check between source and destination during the - scan. - - * The program is capable of deleting files/directories on the - destination that do not exist on the source, but asks for - confirmation by default. - - This is a templating and a safety mechanism. - - * The program uses a copy-to-tmp-and-rename methodology allowing - it to be used to update live filesystems. - - This is a templating mechanism. - - * The program, by default, tries to determine if a copy is required - by checking modify times, file size, perms, and other stat - elements. If the elements match, it does not bother to copy - ( unless an MD5 check is being made, in which case it must read - the destination file ). - - You typically run cpdup on the target machine. The target machine - temporarily mounts the template machine's / and /usr via NFS, read-only, - and runs cpdup to update / and /usr. If you use this methodology note - that THERE ARE SECURITY CONSIDERATIONS! See 'SECURITY CONSIDERATIONS WITH - NFS' below. - - Whatever script you use that does the NFS mounts should ensure that the - mount succeeded before continuing with the cpdup. - - You should create .cpignore files in the appropriate directories on the - template machine's / and /usr partitions so as not to overwrite active - files on the target. The most critical .cpignore files should be - protected with 'chflags schg .cpignore'. Specifically, the ones in / - and /etc, but possibly others as well. For example, the .cpignore - hierarchy for protect /root is: - - # /root/.cpignore contains - .history - - # /root/.ssh/.cpignore contains - random_seed - known_hosts - authorized_keys - identity - identity.pub - - WHEN INITIALLY CONVERTING A TARGET MACHINE TO USE TEMPLATING, ALWAYS - MAKE A FULL BACKUP OF THE TARGET MACHINE FIRST! You may accidentally - delete files on the target during the conversion due to forgetting to - enter items into appropriate .cpignore files on the source. - - SECURITY CONSIDERATIONS WITH NFS ROOT EXPORT FROM TEMPLATE MACHINE - SECURITY CONSIDERATIONS WITH NFS USR EXPORT FROM TEMPLATE MACHINE - - There are some serious security considerations that must be taken into - account when exporting / and /usr on the template machine. - - * only export read-only - - * the password file ( aka vipw ) may not contain any crypted passwords - at all. You MUST use ssh or kerberos to access the template machine. - - You can get away with giving only root a crypted password, but only - if you disallow network root logins and only allow direct root - logins on the console. - - * The machine's private ssh_host_key usually resides in /usr/local/etc. - You must move this key to /var/db. You can softlink link so no - modification of sshd_config is required. - - * The machine's private ~root/.ssh/identity file is also exposed by - the NFS export, you should move this file to /var/db as well and - put a softlink in ~root/.ssh. - - * DON'T EXPORT /var ! Either that, or don't put the private keys - in /var/db ... put them somewhere else. - - * You may want to redirect the location of the random_seed file, which - can be done by editing ~root/.ssh/sshd_config and - /usr/local/etc/sshd_config so it is not exposed either. - - -Matt - Matthew Dillon - dillon@backplane.com - diff --git a/share/examples/diskless/clone_root b/share/examples/diskless/clone_root deleted file mode 100755 index be5d2d2a9efd..000000000000 --- a/share/examples/diskless/clone_root +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/sh -# -# (C) 2001 Luigi Rizzo, Gabriele Cecchetti -# -# Revised 2001.04.16 -# -# -# clone root filesystem for diskless root stuff -# -# usage -# clone_root all to do a full copy (e.g. bin, sbin...) -# clone_root update to recreate /var (including devices) -# clone_root to copy /conf and password-related files -# -# This script assumes that you use a shared readonly root and /usr -# partition. The script creates a partial clone of the root partition, -# and puts it into ${DEST} (defaults to /diskless_root ) on the server, -# where it is read. -# -# To run a diskless install you need to do the following: -# -# create /conf/default/etc/fstab -# this will replace the standard /etc/fstab and should contain -# as a minimum the following lines -# ${SERVER}:${DEST} / nfs ro 0 0 -# ${SERVER}:/usr /usr nfs ro 0 0 -# proc /proc procfs rw 0 0 -# -# create /conf/default/etc/rc.conf -# this will replace the standard rc.conf and should contain -# the startup options for the diskless client. Most likely -# you will not need to set hostname and ifconfig_* because these -# will be already set by the startup code. You will also -# probably need to set local_startup="" so that the server's -# local startup files will not be used. -# -# create a kernel config file in /sys/i386/conf/DISKLESS with -# options MD_ROOT -# options BOOTP -# options BOOTP_NFSROOT -# options BOOTP_COMPAT -# and do a full build of the kernel. -# If you use the firewall, remember to default to open or your kernel -# will not be able to send/receive the bootp packets. -# -# On the server: -# enable NFS server and set /etc/exports as -# ${DEST} -maproot=0 -alldirs -# /usr -alldirs -# -# enable bootpd by uncommenting the bootps line in /etc/inetd.conf -# and putting at least the following entries in /etc/bootptab: -# .default:\ -# hn:ht=1:vm=rfc1048:\ -# :sm=255.255.255.0:\ -# :sa=${SERVER}:\ -# :gw=${GATEWAY}:\ -# :rp="${SERVER}:${DEST}": -# -# client1:ha=0123456789ab:tc=.default -# -# and make sure that client1 is listed in /etc/hosts - -# VARIABLES: -# some manual init is needed here. -# DEST the diskless_root dir (goes into /etc/bootptab and /etc/exports -# on the server) -DEST=/diskless_root - -# you should not touch these vars: -# SYSDIRS system directories and mountpoints -# DIRS mountpoints (empty dirs) -# PWFILES files related to passwords -# TOCOPY files and dirs to copy from root partition - -SYSDIRS="dev proc root usr var" -DIRS="cdrom home mnt" -PWFILES="master.passwd passwd spwd.db pwd.db" -TOCOPY="bin boot compat etc modules sbin stand sys" - -init_diskless_root() { - echo "Cleaning old diskless root ($DEST)" - cd / - rm -rf ${DEST} && echo "Old diskless root removed." - echo "Creating $DEST..." - mkdir -p $DEST && echo "New diskless root created." - echo "+++ Now copy original tree from / ..." - ex="" - (cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - ) - #(cd / ; find -x dev | cpio -o -H newc ) | \ - # (cd $DEST; cpio -i -H newc -d ) - echo "+++ Fixing permissions on some objects" - chmod 555 $DEST/sbin/init -} - -update_conf_and_pw() { - echo "+++ Copying files in /conf and password files" - (cd ${DEST} ; rm -rf conf ) - (cd / ; tar clf - conf ) | (cd ${DEST}; tar xvf - ) - mkdir -p ${DEST}/conf/etc # used to mount things - (cd /etc ; tar cvf - ${PWFILES} ) | (cd ${DEST}/etc ; tar xf - ) -} - -update() { - echo "+++ update: create mountpoints and device entries, kernel" - for i in ${SYSDIRS} ${DIRS} - do - rm -r -f ${DEST}/$i - mkdir -p ${DEST}/$i && chown root:wheel ${DEST}/$i && echo -n "$i " - done - echo "." - ln -s /var/tmp ${DEST}/tmp - echo "+++ Copying kernel from /sys/compile/DISKLESS" - cp /sys/compile/DISKLESS/kernel $DEST/kernel - echo "." -} - - -# Main entry point -case $1 in - all) # clean and reinstall the whole diskless_root - init_diskless_root - update - update_conf_and_pw - ;; - - update) # clean and rebuild mountpoints and device entries - update - update_conf_and_pw - ;; - - *) # copy /conf and password files - update_conf_and_pw - ;; -esac -exit 0 -### end of file ### From nobody Mon Sep 25 14:58:10 2023 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 4RvQwf6dDHz4rRYN; Mon, 25 Sep 2023 14:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwf69Gdz4WKC; Mon, 25 Sep 2023 14:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6HTQ6y/Y4K/FBU/xA6iewHAA9F5rHj/tJpnDsBpJ1Y=; b=dybj88dfJgeLMg258fuAgx3LU1PzSJ6xaOx3yP33GEAVlt34v0FCy7USsZNa5gzh38ji0b vUdfCSckgSBsyYMJl6ugurQFgRIsSINxXl9+YFgVRZ7rUgdIwMvLoCiQKyvVqMhSTAofA9 LwPj3No+mTQnH/YgqfszGFJzEAk3RW1T5vS5Js2pw5r/+FZLBlpUAq58hCTk5lEOTKtPis ZLJFBPsL0xwKoFA4A2sY/A0cC66Kv6Sb6TdraFs9T/45wL6l5SQ7qDSaxGr0HGQaJom2Q3 xVN1R1E+cHzcw5A25BOd5EzcA/gwTJXj8Dopx6wDjE2YuANWg9MoZ34rlsAjrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653890; a=rsa-sha256; cv=none; b=b0jgGtKN+2Fq4LkL+NQVbgFT0GOgsDGwyfMqKcnxfN9wmsz5jNIPGxdH9cydCOB2A0hNtD UCEKE2B05Quga42mXeeb1T01zv3Cz+wvxAY1zBWOTQ8p5OemgUtBV2iSCaRgwiB0aynhMo wXTGOrFj0pFSLK7PU5njHF3tbsucuDy9vR+gLCo2iMYHUIOTg9Al9pbO/VN334G8sVtFUW yOPQ64xMhcEItAcYPjkt0USqGfsHauDh0cCG5LoccEAVcQcfo63hAfWI3aX8mUFxOgmgr0 6mZmkKSQ2jW4JM2IrzWGvV3hFtiVhIX+ZLuQY9hRYr9Q5GFN5TVhljZMxiFZQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6HTQ6y/Y4K/FBU/xA6iewHAA9F5rHj/tJpnDsBpJ1Y=; b=WjqacHSJWHUivF3nPe08dwTDCUbm0Upl3bEN8Yz0SGI54jg6nOxgs991O1rKCL7W/7EDN7 fMLnKYfIcGqxdG0rVCovHzEaXUT4853GgRcUCJTtaSLipMpcdw/nmX+JBtUGu1vDtnZhox 6kmsqqCHvPtfcOcxV3xAbR78YuU59PLI4mur4W42Yiovn3unQjhUZXnbl2nkePvnO8VNFY AwjqIH3M5YvPKtNATkStqG/xAj5Ec2smlpZ0kFeuaRlWMODmPpQjrJHyZpMwHZdbe2xilI NIwY3i85MyzSWiJRYaDpJmb3Ic+XRBIyOo+YWLOs8uTRE5rfgWgBWTO9hPpEWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwf5GrMz3cD; Mon, 25 Sep 2023 14:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwADJ044433; Mon, 25 Sep 2023 14:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwAjR044430; Mon, 25 Sep 2023 14:58:10 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:10 GMT Message-Id: <202309251458.38PEwAjR044430@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: bd524e2ddb77 - main - videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd524e2ddb77e1c691f308359ab917414ecb8bed Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bd524e2ddb77e1c691f308359ab917414ecb8bed commit bd524e2ddb77e1c691f308359ab917414ecb8bed Author: John Baldwin AuthorDate: 2023-09-25 14:46:53 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:46:53 +0000 videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41952 --- sys/dev/videomode/devlist2h.awk | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/videomode/devlist2h.awk b/sys/dev/videomode/devlist2h.awk index 2bae373cd307..7fc75df2e8d0 100644 --- a/sys/dev/videomode/devlist2h.awk +++ b/sys/dev/videomode/devlist2h.awk @@ -39,7 +39,6 @@ NR == 1 { gsub("\\$", "", VERSION) gsub(/ $/, "", VERSION) - printf("/*\t$FreeBSD" "$\t*/\n\n") > dfile printf("/*\n") > dfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > dfile @@ -48,7 +47,6 @@ NR == 1 { printf(" *\t%s\n", VERSION) > dfile printf(" */\n") > dfile - printf("/*\t$NetBSD" "$\t*/\n\n") > hfile printf("/*\n") > hfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > hfile From nobody Mon Sep 25 14:58:11 2023 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 4RvQwh0gjmz4rRWD; Mon, 25 Sep 2023 14:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwh070bz4WTc; Mon, 25 Sep 2023 14:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MIgBzwQ6f2HNLLD1cy5YeJ03ZiV+R6nGMyN+VwIDkJY=; b=nY6GNn1VUyHA0LZZRieJlS0L44JnWnWPsH/6vS+BhGNfG8iQKU146x5T61p4sw2Xg5GbwX 8y5RWcYbMMvINMOj0Uj3oWSU7ILquoSoMCdA8XdLETRTsXcdUxa9QKrXg5gR/xt9CWRQHp M6ZE6nozCnQT+Ix43Ox2dnYIM3qt8O2wXNLy3V3XNxuB5R0N6Eg4g3z5rtNm4+tSioaua9 Z+tU+IBNyRXg4sHY9Iok0FB8c0NAP6fEkR7UYrlFoqEqTpXGDpFtnc1xwAgxZPVnFKYqpK M8t0T2WremKC4li8pZdDse7lhbiShy9i4UuJvNq+ZjUdnjuY0amBUdqlzB9jZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653892; a=rsa-sha256; cv=none; b=GNerRKUyvN6uQw8+elEaL4exrbC0yydnzaI0R7QLDs6dNLvwh1W5nO7UZtlUCydQ7X1HPK lyMMMUtZnWW7UNcGfIXGaiHAlpxCmQ8/9vew25YYtDrPzSA7Kpk66K3eYIV5dfo3YiM1ZN 3hL6moTO82CT9eUinzUad3s0Tl/jaymTr8EdDL0j+jyEHzY621aINPvnaULjTlsEtm0Zyc /xgkhRP4KLlpKp1AFkmbNqxSo6ZxJEktTZq+EKBOOAgIVmrcs6at5cQfNJSfw9A7IGSooB CwaMeozlf1Os5KDS4vTTM4Wlncs71WPPWXgT3tGNjV6WO/TJhNIlsZmkPU9vCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MIgBzwQ6f2HNLLD1cy5YeJ03ZiV+R6nGMyN+VwIDkJY=; b=UVRC46y2UU6Ux6AQiUVuHoTbrOhIpWFJJBpoLBT91/auLVsABS7XJn4xR6SArh315R/cv4 Rb+LXlrDqFK8TTvMjdsRjexYYRt35rwiyTWS089gwniUNwHLBeS0x5dWjW2DWrbrQEAN/Z iP+e4uJS0za6zjV4onVPR2VpDWDSf4V0KAWaY/5Tv+TiAOPCtQECP1mHmPIx3yaYPbVXu3 UXzPags/2XOzH0HPGMmHoUFNkiKX5TLOyxl4p2pHLk2Wp7YnFajUgz1VT1iaawMpYeYsQ7 wmXumbZ5ZwB70O2F52rlHSYLZHBureVuYfGB11znZAIavxgSOQn6ZCv2Y25frg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwg5xgxz3hL; Mon, 25 Sep 2023 14:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwBfZ044471; Mon, 25 Sep 2023 14:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwB2r044468; Mon, 25 Sep 2023 14:58:11 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:11 GMT Message-Id: <202309251458.38PEwB2r044468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: fc3cc652e500 - main - videomode: Regenerate files 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc3cc652e500bd8e33b4b77449d167f1df073acb Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fc3cc652e500bd8e33b4b77449d167f1df073acb commit fc3cc652e500bd8e33b4b77449d167f1df073acb Author: John Baldwin AuthorDate: 2023-09-25 14:49:30 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:49:30 +0000 videomode: Regenerate files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41953 --- sys/dev/videomode/ediddevs.h | 13 +++++++++++-- sys/dev/videomode/ediddevs_data.h | 3 +-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/videomode/ediddevs.h b/sys/dev/videomode/ediddevs.h index a0dc4e2b181c..872192882c3e 100644 --- a/sys/dev/videomode/ediddevs.h +++ b/sys/dev/videomode/ediddevs.h @@ -1,9 +1,8 @@ - /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: ediddevs,v 1.1 2006/05/11 01:49:53 gdamore Exp + * NetBSD: ediddevs,v 1.2 2007/03/07 18:47:13 macallan Exp */ /*- @@ -81,6 +80,16 @@ #define EDID_VENDOR_VSC "ViewSonic" #define EDID_VENDOR_ZCM "Zenith" +/* + * List of known products, grouped and sorted by vendor. + * + * EDID version 1.3 requires that monitors expose the monitor name with + * the ASCII descriptor type 0xFC, so for monitors using that block, this + * information is redundant, and there is not point in listing them here, + * unless it is desired to have a symbolic macro to detect the monitor in + * special handling code or somesuch. + */ + /* Dell - this exists for now as a sample. I don't have one of these. */ #define EDID_PRODUCT_DEL_ULTRASCAN14XE_REVA 0x139A /* Ultrascan 14XE */ #define EDID_PRODUCT_DEL_ULTRASCAN14XE_REVB 0x139B /* Ultrascan 14XE */ diff --git a/sys/dev/videomode/ediddevs_data.h b/sys/dev/videomode/ediddevs_data.h index a953bcbf9981..c798bd85809d 100644 --- a/sys/dev/videomode/ediddevs_data.h +++ b/sys/dev/videomode/ediddevs_data.h @@ -1,9 +1,8 @@ - /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: ediddevs,v 1.1 2006/05/11 01:49:53 gdamore Exp + * NetBSD: ediddevs,v 1.2 2007/03/07 18:47:13 macallan Exp */ /*- From nobody Mon Sep 25 14:58:12 2023 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 4RvQwj2zSbz4rRL0; Mon, 25 Sep 2023 14:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwj0Bzzz4WRf; Mon, 25 Sep 2023 14:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWt73nqGnhcpbbNSHjqwPyZBksxc+lguxOLLSr7JdHQ=; b=oQwwmSb5OkgpiY/LF1r8DmqS70bgAXV5tRsXxYep70s264nAM9Ydhr/OpKU29XkP83Wlr3 gdGl6c7WbZg68shaThuN+hhv4CbuIntcRYyT0yfaqc3sbY3NfeLOW3YWY8WgSpBj4U+xk1 66h1phKOerfyiyR6SkIYRD3njLBja4Uk3JRJFrlIUptcGmHg7BjTlEyRnAQdLCcvqsujah clj9xD5aqZXnOGyY1uaVT4rANV/vI67lTgmEzG+39oWK5/QtCXtukFM1BQy4OUEAqXz+a/ 9/D97Rt+ePI/g9aCVYt7f6AMKUZfWOj8a+93lsXTaEUprKiZyprrCsrHqyIp3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653893; a=rsa-sha256; cv=none; b=ukxzPuGo425t3LnE2zGnehOraTi0Ko5UYDj4u47UknMzb12p/jdULAz9huYobm/WnaBH5n AT4sDaxtAG+0ZgUQirPJUpfExmnbfnXGnZk2HlpS5YI11pa1xQpq85oBtOk5BgTy1simdF uMIEKWLoJ+wre3QsyY2aU8bN4MeGYCiYg+6rzTKbHtZiVEsh4ebTr4G0sVE1jpQ4ylB9GD f0t4mv3bLE2+ECRIEVHbIji3dZ39VtBLJQfp9DP/WhiC9q/sMzs72A5RupodRoHgQZtvRJ gznIRMOr59DikRq6NLgpy3dVmwxTHQhVLRPdlHA+mYgwniaV6nt0hIw8aFZLLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hWt73nqGnhcpbbNSHjqwPyZBksxc+lguxOLLSr7JdHQ=; b=Ti3pspU+t4w8ZJ8D3K5fUWiecHlWk8Jvqeql9gdzrXbnEY2fim8n7zlQdAqyr9Vt3oqKDx i7uObAJMPijaS+9KB5tKgdJ7h5b+6/eZXMQ+HVb/OzlBaOSTAsttG5DYZsTV3O9aJdzHqz Z/5c05BEdbpvY4cBeQ/5LHm2TMoAcJut4iuCiFCcuFGDASga6TcUmBwNSL2AJB9x4Ou2BW Ggkrka6sLHPMWAWtshi+xNJPkND3t8onPaEOT4j9fA5c3mknxfYL0eW5NnAqT+9Sc5HQFU Q4uAHunBT4DP5PddMv3NZpANrvLTvvrlFO1S/Ur07X2xt9s1lOjFl4fDrrdBaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwh6PmMz2wP; Mon, 25 Sep 2023 14:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwC3c044526; Mon, 25 Sep 2023 14:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwCTU044523; Mon, 25 Sep 2023 14:58:12 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:12 GMT Message-Id: <202309251458.38PEwCTU044523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 16837d353cdd - main - Remove a few more stray __FBSDID uses 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16837d353cdde87672d08112610e51e4121c4e50 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=16837d353cdde87672d08112610e51e4121c4e50 commit 16837d353cdde87672d08112610e51e4121c4e50 Author: John Baldwin AuthorDate: 2023-09-25 14:49:52 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:49:52 +0000 Remove a few more stray __FBSDID uses Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41954 --- lib/libc/tests/sys/cpuset_test.c | 3 --- sys/arm/mv/clk/armada38x_coreclk.c | 3 --- sys/dev/enic/enic.h | 3 --- 3 files changed, 9 deletions(-) diff --git a/lib/libc/tests/sys/cpuset_test.c b/lib/libc/tests/sys/cpuset_test.c index 52c0dc877ab8..53d6a8215bbc 100644 --- a/lib/libc/tests/sys/cpuset_test.c +++ b/lib/libc/tests/sys/cpuset_test.c @@ -25,9 +25,6 @@ * SUCH DAMAGE. */ -#include -__FBSDID("$FreeBSD"); - #include #include #include diff --git a/sys/arm/mv/clk/armada38x_coreclk.c b/sys/arm/mv/clk/armada38x_coreclk.c index 14887ce88fb3..21e630d18b06 100644 --- a/sys/arm/mv/clk/armada38x_coreclk.c +++ b/sys/arm/mv/clk/armada38x_coreclk.c @@ -24,9 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -__FBSDID("$FressBSD$"); - #include #include #include diff --git a/sys/dev/enic/enic.h b/sys/dev/enic/enic.h index a2a40334986f..6d0eb8563efd 100644 --- a/sys/dev/enic/enic.h +++ b/sys/dev/enic/enic.h @@ -3,9 +3,6 @@ * Copyright 2007 Nuova Systems, Inc. All rights reserved. */ -#include -__FBSDID("$FreeBSD: $"); - #ifndef _ENIC_H #define _ENIC_H From nobody Mon Sep 25 14:58:13 2023 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 4RvQwk310dz4rRbX; Mon, 25 Sep 2023 14:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwk1dddz4Wb1; Mon, 25 Sep 2023 14:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SLqCBoWVWuMhif6TEL+di7jf109tmgTyvejmgEkR21o=; b=EOyc0G46JDA4Lk/Qd5VBt5DoINptXrzKs9AKpuYZQML2jRwNO68CYaHPirj09UqNUNEPI6 8DPjXc719tIqOmiRzmpyR6IkPogjFYGXtULtKNCsMyh4mxCEMtl2NtJCL73LLVX+ml3QCx zg0eVo97IxpKxefieonuUMfcifRq9YclVbLAyCbEmmlJxe+ai4hiHFFcSewseGimHARHzW /T6Ns6zHP//BQI5KPupw1owV2foAdy7QIcRB2PVlGawRT4oAq1bm+rdEAiZoWPsKX/pS0I doB+cSlMgv7AhOdkb8wVsCNhJhjfH6DKc77uC9vKDH3cGuyUwJ0XyAtcv861Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653894; a=rsa-sha256; cv=none; b=xFRoq2rFWaDHCSNzH0dhBdyJqVi/+ArOxb/XJlRO2pTpWDZAzeis5S5QuABWLpkCtFTazB r49hwdQZ/W9FEBsSW9L1SwS23IW0k804fFElG6MsxgrdWNhBU6DCCebPjtc9SlYC5Bxn0K N3TzYaxbsOq/k60tzH47/hMk+N+gqfErgbEjLq89uv1PzPiPvQS1XDs6L12vetgBWJUtOh PM9bDH1ETFsp0eKJQS4LkAMOP0BzXqLxQjntvrsv2+GMDBBnkQ243WYTc9l4cYKJTi4nAG ihzNC4iskxqddM6Wpm8hifyohNDXr2UwbTCtF0v7HcOQb6Sv17nfw90D3r4fkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SLqCBoWVWuMhif6TEL+di7jf109tmgTyvejmgEkR21o=; b=kQ4owOhlVcqlCDrvlGMBZaBDfW7+EGSOsJQA+yEnmGvf23itwMo+PonRFBALAMs7uaQFsK a5oMhl8ecqxVGTve6OFZgMqM49JT3fZECmh+p0/ErX0mePKnu9SGDnvJi7OP3IbnCU85xN 5AwWL8D2S87WWSfWcwuGL3TPToTpI9/jwKR6wc+luxgmLdiAyejV0d0GZqZNjTI1lpNk1G eLMt/P9/zHVp9L3WwynC9QRdLAxBnVk6e5FziVsE7PaZ6eP9zTS9lc8WeGhbOvE/SwFS/C sQNNKBOGW+ysMOgDzjT4XdwwA1kQkfJ3WOVvcUDbtyVw47PM+qRXHJtxlnXHNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwk0bnFz3T5; Mon, 25 Sep 2023 14:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwDil044589; Mon, 25 Sep 2023 14:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwDGN044586; Mon, 25 Sep 2023 14:58:13 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:13 GMT Message-Id: <202309251458.38PEwDGN044586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 99159b076a27 - main - Update a couple of tools to not embed __FBSDID in generated files 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99159b076a278d1feb0e18ae99fd866c90443893 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=99159b076a278d1feb0e18ae99fd866c90443893 commit 99159b076a278d1feb0e18ae99fd866c90443893 Author: John Baldwin AuthorDate: 2023-09-25 14:50:11 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:50:11 +0000 Update a couple of tools to not embed __FBSDID in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41955 --- sys/dev/bnxt/convert_hsi.pl | 6 ------ tools/tools/drm/radeon/mkregtable/mkregtable.c | 5 ----- 2 files changed, 11 deletions(-) diff --git a/sys/dev/bnxt/convert_hsi.pl b/sys/dev/bnxt/convert_hsi.pl index df59aeab6cc9..19f5d2d3aea1 100755 --- a/sys/dev/bnxt/convert_hsi.pl +++ b/sys/dev/bnxt/convert_hsi.pl @@ -55,9 +55,6 @@ print OUT < -__FBSDID("\$FreeBSD\$"); - END_OF_NOTICE # Convert line endings @@ -132,9 +129,6 @@ if ($do_decode) { * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include - __FBSDID("\$FreeBSD\$"); - END_OF_NOTICE if(!open(HDR, ">", "hsi_struct_decode.h")) { diff --git a/tools/tools/drm/radeon/mkregtable/mkregtable.c b/tools/tools/drm/radeon/mkregtable/mkregtable.c index e0b94561f5cd..e39264fbcd2b 100644 --- a/tools/tools/drm/radeon/mkregtable/mkregtable.c +++ b/tools/tools/drm/radeon/mkregtable/mkregtable.c @@ -593,11 +593,6 @@ static void table_print(struct table *t) nlloop = (t->nentry + 3) / 4; c = t->nentry; - printf( - "#include \n" - "__FBSDID(\"$" "FreeBSD" "$\");\n" - "\n" - ); printf("static const unsigned %s_reg_safe_bm[%d] = {\n", t->gpu_prefix, t->nentry); for (i = 0, id = 0; i < nlloop; i++) { From nobody Mon Sep 25 14:58:15 2023 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 4RvQwl3WSZz4rRYR; Mon, 25 Sep 2023 14:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwl2bZmz4Wf2; Mon, 25 Sep 2023 14:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CiShBO3WD0qDbditzTHzbd+tcLl+fcvhmVCbz+Vl79w=; b=TnfIvpMDKtO1B/JKYNhAy8GFjb8n70gHNmh9zmHQM/26bgpFbaUao/FEOK4RY+jgagT8qf 7z9TQkeKAkaZZpCOrRB8a6cRYpUm3AzNwQRT415UeFfn8E6STPYYds/BIVU+WzB4MFkIQS ZN9DH+uNAnSJHkobktwLKOQr1XdBb58n1bBIlOWE/3NpLdJGl45kZeaX/nb760BDcVAmm6 FNIOUVD6Me5LC5AIeMNn6UMzwwCKWnsNKlT/5oYfurhKJYUzSxUoaidy1VMwWBL5pkLYrK X1xF03SvL+GrVvTit62ognbiXBzKl0HgbECeguII+V9EMBJPkc4z6clg82EJ+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653895; a=rsa-sha256; cv=none; b=soJyZkYG/8nSjAh5pRZ660ZMGM6i9ypi8oAxVfZfnp6vd+EQzz+ABRhlhk2FY9dB4nl+EE 9D+tix+cg15OKyKx9ZcgT8k+q1D4E+5tlBsz+yZ1RKUm04ncG7oUvEDaDeNKDkStOI+Az4 ORSd/MRVNqdL8gMzFonqb4KRPuHPWHInHXRkxS+IkuKHGUVDThE1aguL17llQUELeBPGO4 yxIbq4ZuLyaZvrDIgcdGlALyC29eErKOlp0v5D9hBWunEvpR/cdsyuSDv296+e7bjmJHKY 7F2G7wjUmVX5gmnrw9cU0Mb1rL0BqTdfgPs7O5iHjvcZQrXLJEFxEOKNv3/K6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CiShBO3WD0qDbditzTHzbd+tcLl+fcvhmVCbz+Vl79w=; b=c2X3TvIlyZX7Q0EAfvEp0iNakVxcDvuTtK8OCuHEOhMzr+eSvl6LSoTITHNDjanLGbR6lr LGmK8q4+ekJSHqd2eevsLnJlrixNj32mnSY+san8R66086nf6e4We4GgdUYlOifns2SEmc ueZ9sOslEYRmIR9gaHrduSCwlgLHuQuFAD5P8v6ci/dsWr8XsZYiolUUfpir/oyYdXs7W0 iNlV/2Xbl4dsXSHgz46Z+HtIlaHrzynPJ7rGN6XRAegAtI0hGH5wy5hK9VLNkiCyvYFcXf Nd0bHVDCD/qU8dKB5ZZB2dyI1gUEtbksNT6WWwVnqBZwUTq3xy5ga1jAktkGBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwl1jLNz39x; Mon, 25 Sep 2023 14:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwFJ3044640; Mon, 25 Sep 2023 14:58:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwFIi044637; Mon, 25 Sep 2023 14:58:15 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:15 GMT Message-Id: <202309251458.38PEwFIi044637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e4c68414d085 - main - lpr: Remove now unused fallback definition for __FBSDID 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4c68414d0854b5e43dfd1b2b0cfbc295702e831 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e4c68414d0854b5e43dfd1b2b0cfbc295702e831 commit e4c68414d0854b5e43dfd1b2b0cfbc295702e831 Author: John Baldwin AuthorDate: 2023-09-25 14:50:33 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:50:33 +0000 lpr: Remove now unused fallback definition for __FBSDID Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41956 --- usr.sbin/lpr/common_source/lp.cdefs.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/usr.sbin/lpr/common_source/lp.cdefs.h b/usr.sbin/lpr/common_source/lp.cdefs.h index c3ca409b6a8b..f5adf6e0ba5d 100644 --- a/usr.sbin/lpr/common_source/lp.cdefs.h +++ b/usr.sbin/lpr/common_source/lp.cdefs.h @@ -81,20 +81,6 @@ # define __unused #endif -/* - * All the lpr source files will want to reference __FBSDID() to - * handle rcs id's. - */ -#if !defined(__FBSDID) -# if defined(lint) || defined(STRIP_FBSDID) -# define __FBSDID(s) struct skip_rcsid_struct -# elif defined(__IDSTRING) /* NetBSD */ -# define __FBSDID(s) __IDSTRING(rcsid,s) -# else -# define __FBSDID(s) static const char rcsid[] __unused = s -# endif -#endif /* __FBSDID */ - /* * Some lpr include files use __BEGIN_DECLS and __END_DECLS. */ From nobody Mon Sep 25 14:58:16 2023 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 4RvQwm5SLHz4rRSB; Mon, 25 Sep 2023 14:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwm4X9yz4WYW; Mon, 25 Sep 2023 14:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgvHcnaSOp+fcHp4xEph+vecvOjk4+MHR5ae0rEMBYw=; b=Hc84lvvS38Csca0ua2Z4MoPkYAl7fVQXaCAZIEYlh/ueYCif0h3d34Z4khGcOsi3Qz2cxQ UPN0npeVrxsZZZDTMR9Wvp0FvbRzKqa8M4RyQqy2nQMDW+Es+R4tp/J55dIpnfEunXDgB3 V00sN6/PK2yJdUUEZLHonBnl6DEWvy8IC7lsTV/139dCJH4vrycGGYAmvVa9qEO6hDyVBU yoIZYM4Kxmay5eQ/zNGjLnlxEYsvPKjHIzhYySUmLpOT8Wn93A1c67NgL0tdgUBK8WZ6vE f7qfFpjEHwJmK9y0GrCRA/IAezuXGZD8FdFUlTos9REERL6+s7IXHXkEjD52EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653896; a=rsa-sha256; cv=none; b=vIeiNxqzsEXiZvu60CHZCffTwnSQklgzZZHVxBOtFZUvQDfzn8zPRfDl15sG9hbVXZ6qOc Q/eLQoGDnTBOxGZjKW9F1qH71j/o+2BXzkJwuwcRlpFJPa9fproW4Rbei1c5/VnMTFir4e seHj2ReWGoITc/gX4OlhaPxNAx26hpR3pCQCLspumwFwNHHz1MyFxZov/kQpHPCYFWa2s2 PalMS3eAoRboGw8+YaHoy9jRQMojLHRSutK3lbGQ8HiwQ1MBhpUYuo47bbZIIPA8en0apG zSEDIObQGNUfjQ/s1BfVyjyxmbllLGaiQQOAqBY3sdAoGMpz4Aq+wgpGTSLxDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgvHcnaSOp+fcHp4xEph+vecvOjk4+MHR5ae0rEMBYw=; b=yiMt17t+YP4AKvwYpdw0ew+JNOgdhgqT4jZ6HcDYayV8kCsQFLrrUqcCm0QV/9HYZQcImQ zSzlaDYda8D0sJyC57uuteGixwCbRNX3PapAIja2Eb90Tnth2LWwrZhzyNpckj52qx+Qm+ gjy+zfXe4b1GxBtVUpUQ8w49W06gNExdGnBWbWjw6UMmkylOsf/U1TYgMYun9aIiqOcu51 45qwD/EMYlXHqvjt6WsPbQpeFnIfUZRJ4hDBe5a3G7xB/cBgjJJ/HLujbWHC4aS9UBCZqt Q1XV8clCogN9/FdhSyP8jL9bYbK7xCsMHw13bc+t6jkaAB+/FoySt/iyQhLmcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwm31rLz34d; Mon, 25 Sep 2023 14:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwGbr044689; Mon, 25 Sep 2023 14:58:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwG6U044686; Mon, 25 Sep 2023 14:58:16 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:16 GMT Message-Id: <202309251458.38PEwG6U044686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: eba230afba49 - main - Purge more stray embedded $FreeBSD$ strings 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eba230afba4932f02a1ca44efc797cf7499a5cb0 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=eba230afba4932f02a1ca44efc797cf7499a5cb0 commit eba230afba4932f02a1ca44efc797cf7499a5cb0 Author: John Baldwin AuthorDate: 2023-09-25 14:54:56 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:54:56 +0000 Purge more stray embedded $FreeBSD$ strings These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957 --- lib/lib80211/lib80211_regdomain.c | 3 --- lib/libc/net/nslexer.l | 6 ------ lib/libc/powerpc/gen/syncicache.c | 5 ----- lib/libc/powerpc64/gen/syncicache.c | 5 ----- lib/msun/src/e_sqrtf.c | 4 ---- lib/msun/src/s_modf.c | 4 ---- lib/msun/src/w_cabsf.c | 5 ----- libexec/atrun/atrun.c | 5 ----- libexec/atrun/gloadavg.c | 5 ----- libexec/atrun/gloadavg.h | 3 --- libexec/comsat/comsat.c | 2 -- libexec/fingerd/fingerd.c | 2 -- libexec/getty/init.c | 2 -- libexec/getty/subr.c | 2 -- libexec/mknetid/hash.c | 5 ----- libexec/mknetid/mknetid.c | 5 ----- libexec/mknetid/parse_group.c | 2 -- libexec/rbootd/bpf.c | 2 -- libexec/rbootd/conf.c | 2 -- libexec/rbootd/parseconf.c | 2 -- libexec/rbootd/rmpproto.c | 2 -- libexec/rbootd/utils.c | 2 -- libexec/revnetgroup/hash.c | 5 ----- libexec/revnetgroup/parse_netgroup.c | 5 ----- libexec/revnetgroup/revnetgroup.c | 5 ----- libexec/rpc.rstatd/rstat_proc.c | 2 -- libexec/rpc.rstatd/rstatd.c | 5 ----- libexec/rpc.rusersd/rusers_proc.c | 5 ----- libexec/rpc.rusersd/rusersd.c | 5 ----- libexec/rpc.sprayd/sprayd.c | 5 ----- libexec/rtld-elf/rtld_malloc.c | 1 - libexec/talkd/announce.c | 2 -- libexec/talkd/print.c | 2 -- libexec/talkd/process.c | 2 -- libexec/talkd/table.c | 2 -- libexec/talkd/talkd.c | 2 -- sbin/dump/dumprmt.c | 2 -- sbin/dump/itime.c | 2 -- sbin/dump/main.c | 2 -- sbin/dump/optr.c | 2 -- sbin/dump/tape.c | 2 -- sbin/dump/traverse.c | 2 -- sbin/dump/unctime.c | 2 -- sbin/dumpfs/dumpfs.c | 2 -- sbin/ffsinfo/ffsinfo.c | 5 ----- sbin/fsck_msdosfs/boot.c | 2 -- sbin/fsck_msdosfs/check.c | 2 -- sbin/fsck_msdosfs/dir.c | 2 -- sbin/fsck_msdosfs/fat.c | 2 -- sbin/fsck_msdosfs/main.c | 2 -- sbin/fsdb/fsdb.c | 5 ----- sbin/fsdb/fsdbutil.c | 5 ----- sbin/fsirand/fsirand.c | 5 ----- sbin/growfs/debug.c | 5 ----- sbin/ifconfig/af_inet.c | 5 ----- sbin/ifconfig/af_inet6.c | 5 ----- sbin/ifconfig/af_link.c | 5 ----- sbin/ifconfig/af_nd6.c | 5 ----- sbin/ifconfig/ifbridge.c | 5 ----- sbin/ifconfig/ifclone.c | 5 ----- sbin/ifconfig/ifconfig.c | 2 -- sbin/ifconfig/ifgif.c | 5 ----- sbin/ifconfig/ifgroup.c | 5 ----- sbin/ifconfig/iflagg.c | 5 ----- sbin/ifconfig/ifvlan.c | 5 ----- sbin/ifconfig/sfp.c | 5 ----- sbin/init/init.c | 2 -- sbin/mknod/mknod.c | 2 -- sbin/mount/mount_fs.c | 2 -- sbin/mount_cd9660/mount_cd9660.c | 2 -- sbin/mount_msdosfs/mount_msdosfs.c | 5 ----- sbin/mount_nullfs/mount_nullfs.c | 2 -- sbin/mount_unionfs/mount_unionfs.c | 3 --- sbin/newfs_msdos/mkfs_msdos.c | 5 ----- sbin/newfs_msdos/newfs_msdos.c | 5 ----- sbin/nos-tun/nos-tun.c | 5 ----- sbin/restore/dirs.c | 2 -- sbin/restore/symtab.c | 2 -- sbin/restore/utilities.c | 2 -- sbin/umount/umount.c | 2 -- stand/libsa/powerpc/syncicache.c | 5 ----- sys/netpfil/ipfilter/netinet/fil.c | 1 - sys/netpfil/ipfilter/netinet/ip_auth.c | 1 - sys/netpfil/ipfilter/netinet/ip_frag.c | 1 - sys/netpfil/ipfilter/netinet/ip_nat.c | 1 - usr.bin/locate/locate/locate.c | 2 -- usr.bin/mktemp/mktemp.c | 5 ----- usr.bin/morse/morse.c | 2 -- usr.bin/nfsstat/nfsstat.c | 2 -- usr.bin/number/number.c | 2 -- usr.bin/primes/pattern.c | 2 -- usr.bin/primes/pr_tbl.c | 2 -- usr.bin/primes/primes.c | 2 -- usr.bin/printf/printf.c | 2 -- usr.bin/showmount/showmount.c | 2 -- usr.bin/tee/tee.c | 2 -- usr.bin/time/time.c | 2 -- usr.bin/truncate/truncate.c | 3 --- usr.bin/ul/ul.c | 2 -- usr.bin/uniq/uniq.c | 2 -- usr.bin/units/units.c | 5 ----- usr.bin/yes/yes.c | 2 -- usr.sbin/apmd/apmd.c | 5 ----- usr.sbin/btxld/btxld.c | 5 ----- usr.sbin/ckdist/ckdist.c | 5 ----- usr.sbin/config/main.cc | 2 -- usr.sbin/config/mkheaders.c | 2 -- usr.sbin/config/mkmakefile.cc | 2 -- usr.sbin/config/mkoptions.cc | 2 -- usr.sbin/flowctl/flowctl.c | 5 ----- usr.sbin/keyserv/crypt_server.c | 5 ----- usr.sbin/keyserv/keyserv.c | 2 -- usr.sbin/keyserv/setkey.c | 2 -- usr.sbin/mptable/mptable.c | 5 ----- usr.sbin/nfsd/nfsd.c | 2 -- usr.sbin/pciconf/cap.c | 5 ----- usr.sbin/pciconf/err.c | 5 ----- usr.sbin/pciconf/pciconf.c | 5 ----- usr.sbin/pw/bitmap.c | 5 ----- usr.sbin/pw/cpdir.c | 5 ----- usr.sbin/pw/grupd.c | 5 ----- usr.sbin/pw/psdate.c | 5 ----- usr.sbin/pw/pw.c | 5 ----- usr.sbin/pw/pw_conf.c | 5 ----- usr.sbin/pw/pw_group.c | 5 ----- usr.sbin/pw/pw_log.c | 5 ----- usr.sbin/pw/pw_nis.c | 5 ----- usr.sbin/pw/pw_user.c | 5 ----- usr.sbin/pw/pw_vpw.c | 5 ----- usr.sbin/pw/pwupd.c | 5 ----- usr.sbin/pw/rm_r.c | 5 ----- usr.sbin/rpc.lockd/test.c | 1 - usr.sbin/rpc.statd/test.c | 5 ----- usr.sbin/rpc.umntall/rpc.umntall.c | 5 ----- usr.sbin/rpc.ypupdated/update.c | 2 -- usr.sbin/spray/spray.c | 5 ----- usr.sbin/traceroute6/traceroute6.c | 2 -- usr.sbin/vidcontrol/decode.c | 5 ----- usr.sbin/vidcontrol/vidcontrol.c | 5 ----- 139 files changed, 476 deletions(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index f5ed236467f5..189d4661c78b 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -22,9 +22,6 @@ * (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 lint -static const char rcsid[] = "$FreeBSD$"; -#endif /* not lint */ #include #include diff --git a/lib/libc/net/nslexer.l b/lib/libc/net/nslexer.l index bd3c02dcacf4..ce0f18670e21 100644 --- a/lib/libc/net/nslexer.l +++ b/lib/libc/net/nslexer.l @@ -32,12 +32,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = - "$FreeBSD$"; -#endif /* LIBC_SCCS and not lint */ - #include "namespace.h" #include #define _NS_PRIVATE diff --git a/lib/libc/powerpc/gen/syncicache.c b/lib/libc/powerpc/gen/syncicache.c index 5192d1356153..6376cb0e576d 100644 --- a/lib/libc/powerpc/gen/syncicache.c +++ b/lib/libc/powerpc/gen/syncicache.c @@ -33,11 +33,6 @@ * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #if defined(_KERNEL) || defined(_STANDALONE) #include diff --git a/lib/libc/powerpc64/gen/syncicache.c b/lib/libc/powerpc64/gen/syncicache.c index d96529bc3833..7885a36bd1d1 100644 --- a/lib/libc/powerpc64/gen/syncicache.c +++ b/lib/libc/powerpc64/gen/syncicache.c @@ -33,11 +33,6 @@ * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #if defined(_KERNEL) || defined(_STANDALONE) #include diff --git a/lib/msun/src/e_sqrtf.c b/lib/msun/src/e_sqrtf.c index 1fd0cec447fb..f9e2a320f20e 100644 --- a/lib/msun/src/e_sqrtf.c +++ b/lib/msun/src/e_sqrtf.c @@ -13,10 +13,6 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/s_modf.c b/lib/msun/src/s_modf.c index ab13191b9004..ffb1702751fa 100644 --- a/lib/msun/src/s_modf.c +++ b/lib/msun/src/s_modf.c @@ -10,10 +10,6 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - /* * modf(double x, double *iptr) * return fraction part of x, and return x's integral part in *iptr. diff --git a/lib/msun/src/w_cabsf.c b/lib/msun/src/w_cabsf.c index b5065c8a5683..aedbdef217ca 100644 --- a/lib/msun/src/w_cabsf.c +++ b/lib/msun/src/w_cabsf.c @@ -5,11 +5,6 @@ * Placed into the Public Domain, 1994. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include "math_private.h" diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c index e9e49146ba7a..ee312591ccd4 100644 --- a/libexec/atrun/atrun.c +++ b/libexec/atrun/atrun.c @@ -26,11 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* System Headers */ #include diff --git a/libexec/atrun/gloadavg.c b/libexec/atrun/gloadavg.c index 86651aac3e67..e513183a391c 100644 --- a/libexec/atrun/gloadavg.c +++ b/libexec/atrun/gloadavg.c @@ -25,11 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #ifndef __FreeBSD__ #define _POSIX_SOURCE 1 diff --git a/libexec/atrun/gloadavg.h b/libexec/atrun/gloadavg.h index f0ae6b45e868..a202cf0b3700 100644 --- a/libexec/atrun/gloadavg.h +++ b/libexec/atrun/gloadavg.h @@ -26,6 +26,3 @@ */ double gloadavg(void); -#if 0 -static char atrun_h_rcsid[] = "$FreeBSD$"; -#endif diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index c9d490d2cf6e..138881db9e4a 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)comsat.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c index ff8d5046a577..dd51064a00a6 100644 --- a/libexec/fingerd/fingerd.c +++ b/libexec/fingerd/fingerd.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)fingerd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/getty/init.c b/libexec/getty/init.c index 79b9601a2be1..e09cbf2c3e94 100644 --- a/libexec/getty/init.c +++ b/libexec/getty/init.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)from: init.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c index 68682df6d5bd..2c262e0968ca 100644 --- a/libexec/getty/subr.c +++ b/libexec/getty/subr.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)from: subr.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/mknetid/hash.c b/libexec/mknetid/hash.c index d340142aad90..5375b80fbe3b 100644 --- a/libexec/mknetid/hash.c +++ b/libexec/mknetid/hash.c @@ -38,11 +38,6 @@ #include #include "hash.h" -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* * This hash function is stolen directly from the * Berkeley DB package. It already exists inside libc, but diff --git a/libexec/mknetid/mknetid.c b/libexec/mknetid/mknetid.c index 3a39b4b3e675..a5c8281ef34d 100644 --- a/libexec/mknetid/mknetid.c +++ b/libexec/mknetid/mknetid.c @@ -55,11 +55,6 @@ #include "hash.h" -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #define LINSIZ 1024 #define OPSYS "unix" diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c index e876bd9f2ff0..59ebf44eab37 100644 --- a/libexec/mknetid/parse_group.c +++ b/libexec/mknetid/parse_group.c @@ -33,8 +33,6 @@ #if 0 static const char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c index 0edcc06ccf7e..6fbe34111a67 100644 --- a/libexec/rbootd/bpf.c +++ b/libexec/rbootd/bpf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/conf.c b/libexec/rbootd/conf.c index af46f53c3c88..a48d3efdb9c1 100644 --- a/libexec/rbootd/conf.c +++ b/libexec/rbootd/conf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)conf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/parseconf.c b/libexec/rbootd/parseconf.c index 9585e87185c6..262f81fb68d7 100644 --- a/libexec/rbootd/parseconf.c +++ b/libexec/rbootd/parseconf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c index a31ec1de8abf..2603e697d8b8 100644 --- a/libexec/rbootd/rmpproto.c +++ b/libexec/rbootd/rmpproto.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/utils.c b/libexec/rbootd/utils.c index f5c2d62d30d7..36a7116a05c4 100644 --- a/libexec/rbootd/utils.c +++ b/libexec/rbootd/utils.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/revnetgroup/hash.c b/libexec/revnetgroup/hash.c index 2dd1a3f91d74..db8e95e3040c 100644 --- a/libexec/revnetgroup/hash.c +++ b/libexec/revnetgroup/hash.c @@ -32,11 +32,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/revnetgroup/parse_netgroup.c b/libexec/revnetgroup/parse_netgroup.c index a1e954164ea9..3d6a7939fa1d 100644 --- a/libexec/revnetgroup/parse_netgroup.c +++ b/libexec/revnetgroup/parse_netgroup.c @@ -32,11 +32,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* * This is a specially hacked-up version of getnetgrent.c used to parse * data from the stored hash table of netgroup info rather than from a diff --git a/libexec/revnetgroup/revnetgroup.c b/libexec/revnetgroup/revnetgroup.c index 11fba515a7ba..34ec0d9491c4 100644 --- a/libexec/revnetgroup/revnetgroup.c +++ b/libexec/revnetgroup/revnetgroup.c @@ -38,11 +38,6 @@ * Columbia University, New York City */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index 1f1bb7cf4048..cc488657c077 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -32,8 +32,6 @@ static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro"; static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c index 6a6b09b9ae0c..7cc3bac71c5d 100644 --- a/libexec/rpc.rstatd/rstatd.c +++ b/libexec/rpc.rstatd/rstatd.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c index bfb65dadb004..3bc4169a989f 100644 --- a/libexec/rpc.rusersd/rusers_proc.c +++ b/libexec/rpc.rusersd/rusers_proc.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #ifdef DEBUG #include #endif diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c index e1e77398c8ff..cf00dd8d181e 100644 --- a/libexec/rpc.rusersd/rusersd.c +++ b/libexec/rpc.rusersd/rusersd.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.sprayd/sprayd.c b/libexec/rpc.sprayd/sprayd.c index 209d74af59af..2a71a93bf4ef 100644 --- a/libexec/rpc.sprayd/sprayd.c +++ b/libexec/rpc.sprayd/sprayd.c @@ -27,11 +27,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rtld-elf/rtld_malloc.c b/libexec/rtld-elf/rtld_malloc.c index 4b5140551675..dafbc222322e 100644 --- a/libexec/rtld-elf/rtld_malloc.c +++ b/libexec/rtld-elf/rtld_malloc.c @@ -31,7 +31,6 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)malloc.c 5.11 (Berkeley) 2/23/91";*/ -static char *rcsid = "$FreeBSD$"; #endif /* LIBC_SCCS and not lint */ /* diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index 9cf326669998..b1b1acc09553 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)announce.c 8.3 (Berkeley) 4/28/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/talkd/print.c b/libexec/talkd/print.c index 4d10329dd7f8..47ccb89f20d6 100644 --- a/libexec/talkd/print.c +++ b/libexec/talkd/print.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* debug print routines */ diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c index 2bd22a1becb2..886fc038ab97 100644 --- a/libexec/talkd/process.c +++ b/libexec/talkd/process.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)process.c 8.2 (Berkeley) 11/16/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c index ed1560f86ff8..495d63b02b06 100644 --- a/libexec/talkd/table.c +++ b/libexec/talkd/table.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index eb609207b156..76d0ec5a09ad 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)talkd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index d1769faa3daf..a8b2d9c221da 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)dumprmt.c 8.3 (Berkeley) 4/28/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index cb6d55625e6d..d9121e4df05a 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 779db5fb4b43..a5b4eaa6f8ac 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 8eb163516c72..d3ca5b2a926e 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index c123f7fa9404..3a3574f6d44d 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 08e902667759..281cffcdf6f2 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/unctime.c b/sbin/dump/unctime.c index 3e03a65f1a7c..5f44c80f9358 100644 --- a/sbin/dump/unctime.c +++ b/sbin/dump/unctime.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)unctime.c 8.2 (Berkeley) 6/14/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 739f281feb7f..7d2598c190e8 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -54,8 +54,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)dumpfs.c 8.5 (Berkeley) 4/29/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/ffsinfo/ffsinfo.c b/sbin/ffsinfo/ffsinfo.c index 9d447d209ffd..539cbd1631e1 100644 --- a/sbin/ffsinfo/ffsinfo.c +++ b/sbin/ffsinfo/ffsinfo.c @@ -48,11 +48,6 @@ Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* ********************************************************** INCLUDES ***** */ #include #include diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c index 3d1657ad66f3..f91609470ad7 100644 --- a/sbin/fsck_msdosfs/boot.c +++ b/sbin/fsck_msdosfs/boot.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: boot.c,v 1.22 2020/01/11 16:29:07 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/check.c b/sbin/fsck_msdosfs/check.c index 654ceeb9c5ca..f672a2ac515c 100644 --- a/sbin/fsck_msdosfs/check.c +++ b/sbin/fsck_msdosfs/check.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: check.c,v 1.14 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #ifdef HAVE_LIBUTIL_H diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c index 02fe07880e0e..c60eaab59b12 100644 --- a/sbin/fsck_msdosfs/dir.c +++ b/sbin/fsck_msdosfs/dir.c @@ -32,8 +32,6 @@ #include #ifndef lint __RCSID("$NetBSD: dir.c,v 1.20 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/fat.c b/sbin/fsck_msdosfs/fat.c index e35e2f27d305..567bfcd428cb 100644 --- a/sbin/fsck_msdosfs/fat.c +++ b/sbin/fsck_msdosfs/fat.c @@ -30,8 +30,6 @@ #include #ifndef lint __RCSID("$NetBSD: fat.c,v 1.18 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/main.c b/sbin/fsck_msdosfs/main.c index de54cd18eae7..0713189daa2d 100644 --- a/sbin/fsck_msdosfs/main.c +++ b/sbin/fsck_msdosfs/main.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: main.c,v 1.10 1997/10/01 02:18:14 enami Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index 2d8c75cce5fe..48526ad4044b 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -30,11 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index c8a3a8a525e3..737dabba643f 100644 --- a/sbin/fsdb/fsdbutil.c +++ b/sbin/fsdb/fsdbutil.c @@ -30,11 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index cd60093e3642..2a5eb0c5136d 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -32,11 +32,6 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c index e0dfc997fcf6..456e67dbc5c2 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -41,11 +41,6 @@ * */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 83b605e8c4cb..d9499d64ed13 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index a0138e9b3de6..bc4f77f6848d 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_link.c b/sbin/ifconfig/af_link.c index 2a53daeb7d01..ab35d04a8709 100644 --- a/sbin/ifconfig/af_link.c +++ b/sbin/ifconfig/af_link.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index 7eeb86585197..73044e95740a 100644 --- a/sbin/ifconfig/af_nd6.c +++ b/sbin/ifconfig/af_nd6.c @@ -25,11 +25,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include *** 1171 LINES SKIPPED *** From nobody Mon Sep 25 14:58:17 2023 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 4RvQwn5s9Nz4rRhK; Mon, 25 Sep 2023 14:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwn58D3z4WYm; Mon, 25 Sep 2023 14:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zijFxgTkFpHmnJN45r88GzcbazkzRvvAoZ1RZDdl3I=; b=hUfvDgAoIzJPW3moEtFJ18xKhNzV2uw7wUgOs3Q9ohuYG12kbtDySR+l3/In2QDRqjklQS Ou6lYWuVDtm3YhP3nJXjBVGDdiRr53ow1SXf5tUcqatlsUCJPr5/oFMQtU3xTHFvK902kG wdha7PPlLAXs7yy6Imoqb9x6pyk9WBcNj2VO7PF6hAmvjmmTowaVnFd2B2KtMjvKCcPTkN oqh3smxDpVfy3dXicVQLaCN0YNehj2UHTxs3jxi6tTYALLYDKx2fSGzvUmLTniVp6y1JJU LGtdV1iKE7chlj0i2QiAfbV/UiqU/L7u/LQUIbXNtA/FctJoJVM15W4GWC3Ivg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653897; a=rsa-sha256; cv=none; b=cDfoq5hjzbBWae5aQUNRUwh/3NwpaqzOMHq9SU60U6XvvV6CL7TxlRAw8KXLK9pS5eZ842 P27yPK7myxoEk226X/wUOubOGTnWoUI+cm8+/Vxqnkf+01qiZpcxQW9UnPZ96tqVcLRNs6 IQH/p06CZRzM8KUxrZ8CYuL5pUNvMq4LdJbfGGEpS55VK355IJqqJKE8S5gP9tZTUmq928 QucImhKZAYh+VGD3b5/sTdCiBaI5w3uHo+NbKWauTLt1d3yy73Bcru9hMe23QERyCH820j q68UjKB4quaWS5aiTzUQbz0UzwMjD46JVgp9x/N+QJaoa7+zPf+HJz1o6JbH6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zijFxgTkFpHmnJN45r88GzcbazkzRvvAoZ1RZDdl3I=; b=LY6x0XG8SwJEYsWYLTOGBNKnfMUnpTYnJlFMX50x0Hp9sKumFOg6mBimu/TqxwB6nbWobY gj8gMhungm0t64ZOhVn1KvjszHlvxxRmD80ajh+3hhmpie1ctp+JzomwHW34osxUyU1uq9 ArlT7EgxEixf/PstScddwBKlMHjTjFOq72k7pSvhg/9gMK9ine84KpDCsigoh/blLzHDZ/ oCDa9ebP+XMZr9rwy+sS4l2qS0eZ7DIunNXna3pWGFTYkhRlvrrditM2HQekHjSB8tohTH ubkYgh+AS5e5SJ9wjM3D4+uV6k+lSSYOtIOugDrzJDkbho+4ZvqHqqdY36Pg9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwn3tR6z3lN; Mon, 25 Sep 2023 14:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwHQd044743; Mon, 25 Sep 2023 14:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwH2N044740; Mon, 25 Sep 2023 14:58:17 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:17 GMT Message-Id: <202309251458.38PEwH2N044740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 5919ab299160 - main - powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5919ab299160e6d330bfd8bacf7bd1c5ad8cabb9 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5919ab299160e6d330bfd8bacf7bd1c5ad8cabb9 commit 5919ab299160e6d330bfd8bacf7bd1c5ad8cabb9 Author: John Baldwin AuthorDate: 2023-09-25 14:55:18 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:55:18 +0000 powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41958 --- release/powerpc/generate-hfs.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/release/powerpc/generate-hfs.sh b/release/powerpc/generate-hfs.sh index 46f66d601ce3..50f77933f273 100755 --- a/release/powerpc/generate-hfs.sh +++ b/release/powerpc/generate-hfs.sh @@ -55,7 +55,6 @@ rm loader.tmp bzip2 $OUTPUT_FILE echo 'HFS boot filesystem created by generate-hfs.sh' > $OUTPUT_FILE.bz2.uu echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu -echo '$FreeBSD$' >> $OUTPUT_FILE.bz2.uu uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu rm $OUTPUT_FILE.bz2 From nobody Mon Sep 25 14:58:18 2023 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 4RvQwq2JGfz4rRWZ; Mon, 25 Sep 2023 14:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvQwq0q1qz4WSp; Mon, 25 Sep 2023 14:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oc3Rm6Y66yOT0bki5qP3xzqDTWFeok2Jt9+jBLZXpQE=; b=RlViuYlu96XkEfnTL5T58lw0Ci/hKEBizxqDC/T3w6vbUfaF9i3KCM1AaDFhcU09zP5eRH XMwm+0jVZY/B9MxnEsPmqGSLREp8Q0q15EVp77DfM63C/k1U2Uw0jP5X/yDwx07wpg3/pP g64B3q24HSub5T/+vl4wNODdLFAUzaBTBvg4l4t74Gy1VnhUqF9OnFh+iG/2OoxY9HRN6r XBWDa+TTWo2wONvphPWDgvwq/M5j6Wrpw4FFm4ZN1kcX80fOlDSGn5BLW8opd9CT4fjmRK lxFdrWMZzlExkwNnMMe6nQQ0AicsDPX5Xgbjx2CLd/oWJP9mQFzMWYoV0S8r6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695653899; a=rsa-sha256; cv=none; b=s2wCiJwEfX5GZZNOmy6pKMdhYiPiB395Q9WdhKBgm+YmcqJtgqBY/hgW4wMVQN+9S0y/1H GFcxLtpYxxPCs1xNaUL5bsI3oDLbyWHsrw1ONbYVY7K+RqFQNjyo2P5kcn1OWEeoh4JR// 0KdOd/3XOH7mJuwcuIv553fImSEEKbG9ZhhVTB75+zkFLFEijUr/G1hgI4Suye3FolrS0y 6XQ9X6cpEpA7g4SScxx9DN9epeZF9Gyl/Zsmcv3+srRYvRUuP5ul/Dd4HCGGCfS35G7CTf 7YKB9Ap9+0bmWje/pstUndy8PjxyX84xkhqQOvA6RJmgu/7ESpfgWWKSQr5pow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695653899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Oc3Rm6Y66yOT0bki5qP3xzqDTWFeok2Jt9+jBLZXpQE=; b=SC5RIjQgg1oSFUn14kOWe5oUqbsVduduRY6sDFucFQsNYA9wlNGSZYqvVoKQ9jbwnwgTYV B79cXTEGldLiXN5VSUW9AsBpg8UR8zZSkOzaY9pIJFrBnhu50K2vUwi4VSeoGCs8bfzSKv pBwjSo+xQY4Wb7wvOPDzqbjBvwPYyaccn3jr1vgBN5ok/4XM6i0AnSs1APhcNw59+7F0h9 ODXWEbcrCHL81hx9oBVuUmhHLHQlW6CXwDl56Z0mwi3k9XA2HAUksUGGg+jygbovyNHVQI WIGkheZ9WpD2LR05lrA/xz+Ewczq1GWqEbUl2tECaATE4UocbqDjFWNon/xFfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvQwp4xC3z3Db; Mon, 25 Sep 2023 14:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PEwIiE044809; Mon, 25 Sep 2023 14:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PEwIor044806; Mon, 25 Sep 2023 14:58:18 GMT (envelope-from git) Date: Mon, 25 Sep 2023 14:58:18 GMT Message-Id: <202309251458.38PEwIor044806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c4e2333cb2a5 - main - Update a few tools to not embed $FreeBSD$ in generated files 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4e2333cb2a59e44004d824a1093d9bf1d9fe273 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c4e2333cb2a59e44004d824a1093d9bf1d9fe273 commit c4e2333cb2a59e44004d824a1093d9bf1d9fe273 Author: John Baldwin AuthorDate: 2023-09-25 14:55:43 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:55:43 +0000 Update a few tools to not embed $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41959 --- tools/test/iconv/tablegen/tablegen.c | 2 -- tools/tools/drm/gen-drm_pciids | 4 ---- tools/tools/locale/tools/cldr2def.pl | 1 - 3 files changed, 7 deletions(-) diff --git a/tools/test/iconv/tablegen/tablegen.c b/tools/test/iconv/tablegen/tablegen.c index 843f8f6cb135..ecc1c7fdb44d 100644 --- a/tools/test/iconv/tablegen/tablegen.c +++ b/tools/test/iconv/tablegen/tablegen.c @@ -254,7 +254,6 @@ main (int argc, char *argv[]) if (dflag && iconvctl(cd, ICONV_SET_FALLBACKS, &fbs) != 0) err(1, NULL); if (cflag) { - printf("# $FreeBSD$\n\n"); printf("TYPE\t\tROWCOL\n"); printf("NAME\t\tUCS/%s\n", argv[0]); printf("%s", citrus_common); @@ -266,7 +265,6 @@ main (int argc, char *argv[]) if (dflag && (iconvctl(cd, ICONV_SET_FALLBACKS, &fbs) != 0)) err(1, NULL); if (cflag) { - printf("# $FreeBSD$\n\n"); printf("TYPE\t\tROWCOL\n"); printf("NAME\t\t%s/UCS\n", argv[0]); printf("%s", citrus_common); diff --git a/tools/tools/drm/gen-drm_pciids b/tools/tools/drm/gen-drm_pciids index ecb8e3aef6e4..472c75cb80dc 100755 --- a/tools/tools/drm/gen-drm_pciids +++ b/tools/tools/drm/gen-drm_pciids @@ -156,10 +156,6 @@ foreach my $vendor_define (sort keys(%linux_pciids)) { print STDERR "\nWrite FreeBSD header to stdout...\n"; print <<"EOF"; -/* - * \$FreeBSD\$ - */ - /* * Generated by $progname from: * o previous FreeBSD's drm_pciids.h diff --git a/tools/tools/locale/tools/cldr2def.pl b/tools/tools/locale/tools/cldr2def.pl index 8e48f32f263c..e59e6d3b13a1 100755 --- a/tools/tools/locale/tools/cldr2def.pl +++ b/tools/tools/locale/tools/cldr2def.pl @@ -947,7 +947,6 @@ sub make_makefile { } open(FOUT, ">$TYPE.draft/Makefile"); print FOUT < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3aaa7724d68f - main - sendmail: Drop $FreeBSD$ from .mc files 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3aaa7724d68fb001ca3c7e75950edcb617aaeb65 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3aaa7724d68fb001ca3c7e75950edcb617aaeb65 commit 3aaa7724d68fb001ca3c7e75950edcb617aaeb65 Author: John Baldwin AuthorDate: 2023-09-25 14:56:02 +0000 Commit: John Baldwin CommitDate: 2023-09-25 14:56:02 +0000 sendmail: Drop $FreeBSD$ from .mc files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41960 --- etc/sendmail/freebsd.mc | 1 - etc/sendmail/freebsd.submit.mc | 1 - etc/sendmail/freefall.mc | 1 - 3 files changed, 3 deletions(-) diff --git a/etc/sendmail/freebsd.mc b/etc/sendmail/freebsd.mc index 5fd201da3900..cf80a3133c74 100644 --- a/etc/sendmail/freebsd.mc +++ b/etc/sendmail/freebsd.mc @@ -48,7 +48,6 @@ divert(-1) # divert(0) -VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) DOMAIN(generic) diff --git a/etc/sendmail/freebsd.submit.mc b/etc/sendmail/freebsd.submit.mc index 165c5f8eadf8..e14a6bc56500 100644 --- a/etc/sendmail/freebsd.submit.mc +++ b/etc/sendmail/freebsd.submit.mc @@ -14,7 +14,6 @@ divert(-1) # divert(0)dnl -VERSIONID(`$FreeBSD$') define(`confCF_VERSION', `Submit')dnl define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet diff --git a/etc/sendmail/freefall.mc b/etc/sendmail/freefall.mc index df07fea8b673..6406ab502ae1 100644 --- a/etc/sendmail/freefall.mc +++ b/etc/sendmail/freefall.mc @@ -40,7 +40,6 @@ divert(-1) # divert(0)dnl -VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) FEATURE(nullclient, smarthost.ysv.freebsd.org) From nobody Mon Sep 25 15:45:48 2023 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 4RvRzc4j3Kz4tjRf; Mon, 25 Sep 2023 15:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvRzc45K9z4hPH; Mon, 25 Sep 2023 15:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695656748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vJixgSpV5z80rYv4H1CgLJ1g8je1aOjh7Ym7an39SM=; b=Ds+eFjribBrt6QjHKBN9tXNUMXqCAYNQNSm5CiaVtG5xC7Iij1dP1mOh3Eg77Ulik513VK a30KPYnxTXhqF3yiENGOCNywowPLUHEBpJVi9MXncQbT5KI5VLPqdyHE0RJSYRwL8gNLyf 3jUvwYjFKPFav0HKUGe2fcCTE4IpHvhCwPUR0fSrypaHQEBDuKmF4xICcOd+D/59aQFNOr zCbySKhj+covr5L9Hgwi3P4oLcVGvlYmwArGyOriSbySjNHLvxZ4nHYdVR0/17HhRA6JAf NIRWWYCirPqd+xWa/TR8hbX92lPKWwW6qu2mnI45DV8kYFxgb/OMOiHJmOr5+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695656748; a=rsa-sha256; cv=none; b=feooSjyO93ryO8yULw4Y+6a/sJYHTc2T1l5exKvAhQAxot405pExw3xZfkCIkb/NMrBBPt y74CexzdW6epsEIvjkCVtQloiSNGZd4OJ3Bc+svpTQs3b85Iw2/Ja/cyxC2agtPTDp62O9 rcGPFIehxZxM1m7j8rAldyvLHksMuYKlJ3D4pShyY1jlgOOT6T41mAuSxMUNdVsHP7tgts mSmSUCbCKm/UO1VI9FZ3nLSEWgrUPxY9kIs1o73aQQZn6LLYs8BqILvxhIZFd9z0U/VEhd z6D5LX9q2FgbNP1yoBtcuMi1vxoIdlQYXNIYLAJ341Z137qARwssfrDvmv1+Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695656748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vJixgSpV5z80rYv4H1CgLJ1g8je1aOjh7Ym7an39SM=; b=ZnxWq6pEGdWBYGcXab8o8PACq5hvMpPfkfMPOQKgAvafm/BtfwKOApwQjvb6df3Tlsx5cC 7ZMk/2ikyXs5mu4WupCrBJT2z2+0kC6uJ5c0hft0ejC7SVasR4g2M0rLFpFBzvWaNShDzE WX3plbphBwvkGmkcHQF88EHecmbsiTcKMCNoWyCN/o/KfAHzHAgDqGGPyt1DacloPmNMCa CHyboIzGFid1s5c3zsniAMb7+SQ9go9n4LwV0Iko8o76XCmexjHezb7rN0iAenHpWfd52N 2hZvrMmGqHPi5qw0mvq4J5s6fUD6e4xmj59PVR7CrlIF18Z3iP5sCnaAg9V2dA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvRzc31rqz4mN; Mon, 25 Sep 2023 15:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PFjm3A028080; Mon, 25 Sep 2023 15:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PFjmnh028077; Mon, 25 Sep 2023 15:45:48 GMT (envelope-from git) Date: Mon, 25 Sep 2023 15:45:48 GMT Message-Id: <202309251545.38PFjmnh028077@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: 6a770c04986b - main - openssl: document the update process 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 6a770c04986b01a95fbbdadc621e25cdfffbf7a9 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6a770c04986b01a95fbbdadc621e25cdfffbf7a9 commit 6a770c04986b01a95fbbdadc621e25cdfffbf7a9 Author: Pierre Pronchery AuthorDate: 2023-09-25 15:40:26 +0000 Commit: Ed Maste CommitDate: 2023-09-25 15:43:58 +0000 openssl: document the update process This is directly inspired from the equivalent document for OpenSSH. Sponsored by: The FreeBSD Foundation --- crypto/openssl/FREEBSD-upgrade | 130 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/crypto/openssl/FREEBSD-upgrade b/crypto/openssl/FREEBSD-upgrade new file mode 100644 index 000000000000..76943efdbde6 --- /dev/null +++ b/crypto/openssl/FREEBSD-upgrade @@ -0,0 +1,130 @@ + FreeBSD maintainer's guide to OpenSSL + ===================================== + + These instructions assume you have a clone of the FreeBSD git repo + main branch in src/freebsd/main, and will store vendor trees under + src/freebsd/vendor/. In addition, this assumes there is a "freebsd" + origin pointing to git(repo).freebsd.org/src.git. + +01) Switch to the vendor branch: + + $ cd src/freebsd/main + $ git worktree add ../vendor/openssl-X.Y freebsd/vendor/openssl-X.Y + $ cd ../vendor/openssl-X.Y + +02) Download the latest OpenSSL tarball and signature from the official + website (https://www.openssl.org/source/). + + $ (cd .. && fetch https://openssl.org/source/openssl-X.Y.Z.tar.gz) + $ (cd .. && fetch https://openssl.org/source/openssl-X.Y.Z.tar.gz.asc) + +03) Verify the signature: + + $ gpg --verify ../openssl-X.Y.Z.tar.gz.asc ../openssl-X.Y.Z.tar.gz + +04) Unpack the OpenSSL tarball to the parent directory: + + $ tar -x -X FREEBSD-Xlist -f ../openssl-X.Y.Z.tar.gz -C .. + +05) Copy to the vendor branch: + + $ rsync --exclude FREEBSD.* --delete -av ../openssl-X.Y.Z/* . + +06) Take care of added / deleted files: + + $ git add -A + +07) Commit: + + $ git commit -m "openssl: Vendor import of OpenSSL X.Y.Z" + +08) Tag: + + $ git tag -a -m "Tag OpenSSL X.Y.Z" vendor/openssl/X.Y.Z + + At this point the vendor branch can be pushed to the FreeBSD repo via: + + $ git push freebsd vendor/openssl-X.Y + $ git push freebsd vendor/openssl/X.Y.Z + + Note the second "git push" command is used to push the tag, which is + not pushed by default. + + It is also possible to push the branch and tag together, but use + --dry-run first to ensure that no undesired tags will be pushed: + + $ git push --dry-run --follow-tags freebsd vendor/openssl-X.Y + $ git push --follow-tags freebsd vendor/openssl-X.Y + + The update and tag could instead be pushed later, along with the merge + to main, but pushing now allows others to collaborate. + +09) Merge from the vendor branch: + + $ git subtree merge -P crypto/openssl vendor/openssl-X.Y + + A number of files have been deleted from FreeBSD's copy of OpenSSL. + If git prompts for these deleted files during the merge, choose 'd' + (leaving them deleted). + +10) Resolve conflicts. Remember to bump the version and date in + secure/lib/libcrypto/Makefile.inc and + crypto/openssl/include/openssl/opensslv.h. + +11) Diff against the vendor branch: + + $ git diff --diff-filter=M vendor/openssl/X.Y.Z HEAD:crypto/openssl + + Review the diff for any unexpected changes. + +12) Re-generate the assembly files: + + $ cd secure/lib/libcrypto + $ make cleanasm buildasm + +13) Update the appropriate makefiles to reflect changes in the vendor's + build.info files. This is especially important if source files have + been added or removed. Keep in mind that the assembly files generated + belong to sys/crypto/openssl, and will therefore affect the kernel as + well. + +14) If symbols have been added or removed, update the appropriate + Version.map to reflect these changes. + +15) Compare compilation flags, the list of files built and included, the + list of symbols generated with the corresponding port if available. + +16) Re-generate the manual files: + + $ tar xzf openssl-X.Y.Z.tar.gz + $ (cd openssl-X.Y.Z && ./Configure --prefix=/usr --openssldir=/etc/ssl && + make build_man_docs) + [...] + $ find openssl-X.Y.Z/doc/man/man1 -name '*.1' -exec cp {} secure/usr.bin/openssl/man/ \; + $ find openssl-X.Y.Z/doc/man/man3 -name '*.3' -exec cp {} secure/lib/libcrypto/man/man3/ \; + $ find openssl-X.Y.Z/doc/man/man5 -name '*.5' -exec cp {} secure/lib/libcrypto/man/man5/ \; + $ find openssl-X.Y.Z/doc/man/man7 -name '*.7' -exec cp {} secure/lib/libcrypto/man/man7/ \; + $ grep -nrF usr/local secure/lib/libcrypto/man secure/usr.bin/openssl/man + [correct the references to the prefix and OpenSSL directories] + $ git commit --amend secure/lib/libcrypto/man secure/usr.bin/openssl/man + + Review the diff and tree status for anything requiring attention. + +16) Build and install world, reboot, test. + +17) Test the legacy and fips providers as well: (here with "test" as the password) + + $ echo test | openssl rc4 -provider legacy -e -a -pbkdf2 + enter RC4 encryption password: + Verifying - enter RC4 encryption password: + U2FsdGVkX1+JvhqxLMOvlxvTi1/h + + # openssl fipsinstall -out /etc/ssl/fipsmodule.cnf -module /usr/lib/ossl-modules/fips.so + INSTALL PASSED + # vi /etc/ssl/openssl.cnf + [enable the FIPS module] + # echo test | openssl aes-256-cbc -provider fips -e -a -pbkdf2 + U2FsdGVkX19lTexiYsnMX83ZLSojBOFwv7GB0Plhgmw= + +18) Commit and hope you did not miss anything. + From nobody Mon Sep 25 16:11:30 2023 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 4RvSYG3ZkPz4tkxR; Mon, 25 Sep 2023 16:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvSYG34qyz4kBt; Mon, 25 Sep 2023 16:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695658290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eQ6ZTvGaFRVXBHdPT5OALGbebLXMFjbAWHHDmx1P4o=; b=mVTsr12UWyovIcB7vUoGTZ0nQghv72o2m0GFxFmYhB4oyIBGZf997xMlSvPOHtX++Xcmhh gpehJyX9IwdsciWigwdXeEihWcWbvs+6ooo2/i9LkYOaP1sTPYIPpkPxwzowMacj2Pz0+e rDIrgVqMhrVfOB0fwoVip6XvoYmo9ffpvRcMSNotyryglu024VPcNY/iysHhwGr2uQ1Jr/ BpTLKs1qvndA323dNxXuMjh4y7whvE+Dhqn8uh3eThk32PXptT9aKvl67zkmBKlwRsUilm Aqd6Fcg9M0DrB17KoNHRQeq9Bu/sWf5ULPt6XEANsOzUoHB9XsNWQV1qTlWQQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695658290; a=rsa-sha256; cv=none; b=InxmE1Kkevk3lrlduznmtF7/CW+JHnFqV83if5EG0j/VBmv/dAr/r9nGNh9dqgEeOxPGK+ IhG3kbtfF6uCbuSpS9x8Z0dU2tSzbLof8lphnRglQXU4gqMkROI077WRgvLBvb5Tv5Bjev 49dzlj34gjjZvTJnbhrRkEHRmR27PSJsY6diBG5G5M7kQPa4QuCTdxSd9uEumO/FYHsCK7 /nr0NzOCc/ew6RCpp7QrewHvNX9VUkbZdUZyrISrKst2+37h+YY88Rn9buy5W0eerUMyHo z4VIt1/mmthFpvy/FsOHn0sR7MTr3/tXcuXyPZrJ3MSAeZW7mq+3MJjBz3yBbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695658290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eQ6ZTvGaFRVXBHdPT5OALGbebLXMFjbAWHHDmx1P4o=; b=ngFDvP9Tc2dMGIWIKT4VyuxGRaZKArhKkt5lpYlKNMbT3XyFbWSGIaCrHZ291Y6NOcbQEB ncN5krml66ngnvjnTlkx/oLnIcv4iKoaksoiBgeO7gVPwaw+tgJJ3op/Z9yPtoRigb8BYq KnLk8Ih1wxobAW5lc0jMzEy+VoEb4KIqQAKt23XGhO6ggpZW/000mUMYajj/LEGzbfLWCw I5tPpCsaCzLX+ZYe7puLgwQU2vUmluQ5JEFt+/468BCpHTdsz5ERj5kKgnOmD8bgj/BTLk PqyzOPugy10A9SSr/yA0QxueeXs6Q8Q8tnB5JPMLCQYKAtbLvM51WHbvORELsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvSYG27zdz5ht; Mon, 25 Sep 2023 16:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PGBU26075931; Mon, 25 Sep 2023 16:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PGBUFM075928; Mon, 25 Sep 2023 16:11:30 GMT (envelope-from git) Date: Mon, 25 Sep 2023 16:11:30 GMT Message-Id: <202309251611.38PGBUFM075928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: c989957f28ef - main - printenv: Add test for printenv. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c989957f28ef5b03f594265612e3437c1e826ed4 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=c989957f28ef5b03f594265612e3437c1e826ed4 commit c989957f28ef5b03f594265612e3437c1e826ed4 Author: Wang-Yan-Hao AuthorDate: 2023-09-25 16:02:14 +0000 Commit: Alan Somers CommitDate: 2023-09-25 16:10:20 +0000 printenv: Add test for printenv. Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D41468 --- etc/mtree/BSD.tests.dist | 2 ++ usr.bin/printenv/Makefile | 7 +++- usr.bin/printenv/tests/Makefile | 6 ++++ usr.bin/printenv/tests/printenv_test.sh | 64 +++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 04dc24d772c8..f6f55276284a 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1095,6 +1095,8 @@ .. pr .. + printenv + .. printf .. procstat diff --git a/usr.bin/printenv/Makefile b/usr.bin/printenv/Makefile index 9039cea4944f..1947945f6bcf 100644 --- a/usr.bin/printenv/Makefile +++ b/usr.bin/printenv/Makefile @@ -1,5 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +.include + PROG= printenv -.include +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + +.include \ No newline at end of file diff --git a/usr.bin/printenv/tests/Makefile b/usr.bin/printenv/tests/Makefile new file mode 100644 index 000000000000..7c5599f222d3 --- /dev/null +++ b/usr.bin/printenv/tests/Makefile @@ -0,0 +1,6 @@ +PACKAGE= tests + +ATF_TESTS_SH= printenv_test +BINDIR= ${TESTSDIR} + +.include diff --git a/usr.bin/printenv/tests/printenv_test.sh b/usr.bin/printenv/tests/printenv_test.sh new file mode 100644 index 000000000000..2bf809cb0977 --- /dev/null +++ b/usr.bin/printenv/tests/printenv_test.sh @@ -0,0 +1,64 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2023 The FreeBSD Foundation +# +# This software was developed1 by Yan-Hao Wang +# under sponsorship from the FreeBSD Foundation. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE +# + +atf_test_case base +base_head() +{ + atf_set "descr" "Check that all reported variables exist with the reported values." +} +base_body() +{ + printenv | while IFS= read -r env; do + env_name=${env%%=*} + env_value=${env#*=} + expected_value=$(eval echo "\$$env_name") + atf_check_equal "${env_value}" "${expected_value}" + done +} + +atf_test_case add_delete_env +add_delete_env_head() +{ + atf_set "descr" "New changes to the environment should be reflected in printenv's output" +} +add_delete_env_body() +{ + env_name=$(date +"%Y%m%d%H%M%S") + export "env_${env_name}=value" + atf_check -o inline:"value\n" printenv "env_${env_name}" + unset "env_${env_name}" + atf_check -s exit:1 printenv "env_${env_name}" +} + +atf_init_test_cases() +{ + atf_add_test_case base + atf_add_test_case add_delete_env +} From nobody Mon Sep 25 17:45:09 2023 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 4RvVdK6NZdz4tr64; Mon, 25 Sep 2023 17:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvVdK5y0hz3Bxq; Mon, 25 Sep 2023 17:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k29o8F+q1TgOEf1EO04FZrajSsRDibdn1CwdjrZHNW8=; b=SxpayiOMDTAEu+KtNqlwFPOqJJbi82/HMIplHSghVnc/iNIx+cL09zcMf8QcX6ZYkhe0cD n9qzZ51+u+qJUrtd73aOYOpTnOIVtiX0jcHFdMaFIDVtRmvb1Ugaapset/8JtEV8E2/Fis Rv+Z1nimzZZgoUiJA+9IU9JOGcWr9MGq5JBcOiCWq/emM56NOrr4YFrpSpummUHFWHA/7R F6Z9kZLMnyvo76+dlEHBoiicRgPaKSF/OGqFnmOddrFvpw3TvTUIsjs4Hm9VBFozhw+AzC iGS4wjktAaMciQyE7CTGcbTXNQ5VYxWaPxrQjQ5r2FLqvBl81lq27qqZeO5HuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695663909; a=rsa-sha256; cv=none; b=cqrdv1jbiFq4P0zgYbznHt8GavyF9kwCItRB93iYHmyzAJ8FYsOfHhPzU0Vzajy0sGPrUy DOdZIiXFrfa0EPYcQT6mTkAPV1qOeWqbW3QoUyFKBFXQyKgHmPODy/nhvqrdtOv/x2K79n Po2IFmz1KxHZ0fW1+EZoAMV6EYEDBjLUIb62ZEV0TKtRnOi55AVr7pranNK7dunEIzOBi7 YFvjQdBkv06r0lsH6t9tOMq5s03gHSz+4KvdzTOAz2p4SC7qmAyW7eDSKkkDikovqosF8j L9t0rO5oi5I79A4TgXzjBthl/T6T7yRAOFiNVRKEQqVCaWIrv1r6mIBHaAamhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k29o8F+q1TgOEf1EO04FZrajSsRDibdn1CwdjrZHNW8=; b=F61lxjycFDunczRjrgFVAu46Zbhfgsh2ZGvE4ubOEBd2KGfvAkaCEUvI6NVSVwFxLrU0JI oJTqdszaIIiFFj0Z/XOwx8Aq3CnIisv4yOMdeshh62yqFWtizeGoyJ6bOBcS3b1K3/SGQI 9TNfxiZpcxQdJE6D8N3cLe6SD1vFl0JgPjnT7H3Bp9ZvjCkErZ3rrL3+FHok7bJcEy1bjs qAFdlDkTVNQNxsb8YvA8cilYwL6p8fhu05AmxOMAM4CdE6HlGH9w8TNB93aGeQ7+SN6ZVj RP31LxDd3qXGx6NMvY84Gr1EdizMJPsPH4h4B2MMSHuFVZVlY/28+O38BAGjLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVdK53kNz8CY; Mon, 25 Sep 2023 17:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHj9it028368; Mon, 25 Sep 2023 17:45:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHj93p028365; Mon, 25 Sep 2023 17:45:09 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:45:09 GMT Message-Id: <202309251745.38PHj93p028365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: fb3c249ed93c - main - LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb3c249ed93c834d70f8361215bc40a9e9004d3b Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fb3c249ed93c834d70f8361215bc40a9e9004d3b commit fb3c249ed93c834d70f8361215bc40a9e9004d3b Author: Bjoern A. Zeeb AuthorDate: 2023-09-24 11:55:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-25 17:41:30 +0000 LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping tid_to_mac80211_ac is an exported symbol in and likely based on iwlwifi, which leads to a symbol clash in NetBSD. Rename our local LinuxKPI copy to a better name and add a comment where to find a copy of the mapping table. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reported by: Phil Nelson (phil netbsd org) --- sys/compat/linuxkpi/common/src/linux_80211.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 09a315de9fd6..8d0bee068c6a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -113,7 +113,8 @@ const uint8_t rfc1042_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; /* IEEE 802.11-05/0257r1 */ const uint8_t bridge_tunnel_header[6] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; -const uint8_t tid_to_mac80211_ac[] = { +/* IEEE 802.11e Table 20i-UP-to-AC mappings. */ +static const uint8_t ieee80211e_up_to_ac[] = { IEEE80211_AC_BE, IEEE80211_AC_BK, IEEE80211_AC_BK, @@ -239,7 +240,7 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], IMPROVE("AP/if we support non-STA here too"); ltxq->txq.ac = IEEE80211_AC_VO; } else { - ltxq->txq.ac = tid_to_mac80211_ac[tid & 7]; + ltxq->txq.ac = ieee80211e_up_to_ac[tid & 7]; } ltxq->seen_dequeue = false; ltxq->stopped = false; @@ -3283,7 +3284,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ac = IEEE80211_AC_BE; } else { skb->priority = tid & IEEE80211_QOS_CTL_TID_MASK; - ac = tid_to_mac80211_ac[tid & 7]; + ac = ieee80211e_up_to_ac[tid & 7]; } skb_set_queue_mapping(skb, ac); From nobody Mon Sep 25 17:45:10 2023 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 4RvVdM0pbDz4tr6C; Mon, 25 Sep 2023 17:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvVdM0007z3BqL; Mon, 25 Sep 2023 17:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnbfIHmZ6kabo01Vj+PpPplG0xqHtW2mKBs4a+NYOzQ=; b=uAdTbJTEHgs2W6AqITiSRiSNzCnBRYk51aTqU2UdBLwAsixaNYMDSgl3ImYy53i9WJ6rBY JXnKEt7Bp7IDb+I+ypGn8Uk02S8rJt1OgqK9laOysSiaEZRQqdINxfu+2RfaOi4qlAODFo mqwM+obBGnwE9QCnWqjFRD2PETWi+hyyV/yXXIalVtLdC04EUbInvPrNtHiv92NoVFxCxU x6+vPWhKU1yObqObNlcAR9Pn6cnAncIWz0Prc8SGgeCo2n1oZ3mttYHJWMlbnv19Pl20l0 qG6JWvklIW8RK0zoHldQVeEsjAqyrnUIkOK+WVHy/wp8+9FATiZoXGTef9VmXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695663911; a=rsa-sha256; cv=none; b=Y9b02y1RgJJ7oQIlJId7HlV+psz5AUbZ2Dtne5Rw39JZ2mvTsz81NFD2d/2qGb6i6LPBqq U3a47FJ2+QxUZrEBH4VhG7Szwc27yAOArny4OGIqWHbYYnDaN/v6aCf/v5yvDx8H7j8k5f b1+U9jezgBeLUb3axM2qx1U6Y+B09Q+MBuRqKJC47k0pFbAbHr66mDA2PwuJ/gHS+aGYUE D94xGaUAyVu+IZSttmOQjgLv3Bp0Zk9SvBWAy/gPKo1k6UsqiCVKiu1D6eVy3PoRMEeqyW uexCS0kx6I/Cayj7bf5QgstEFduhYyBVqZgmC0bDD3oC7Xo+VPaMKFeB4IS8Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695663911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnbfIHmZ6kabo01Vj+PpPplG0xqHtW2mKBs4a+NYOzQ=; b=iV8grCyBTQe9Aj2OvZ2zF2MMXdTnp9Rq1njZYuWsTp9aLMLXVqGJZcoZFX5nOvhQdRK/m/ eFJH5DhGkjUsiB6G136QX3W6BzJgteRQoxiSOZQfl+EmAG5Ao1w5gHTpfRoOjzuZbNX6hX LaEm3BlM4mLkMg40kSQbM105e/7ox6kklb7CYkyiE90FZaLp+FqttLwlORyv6P9sH9Wp4b WRo7kVWCm1pPq09MuBxvAkB2iU6clei+O33CuvtMIK8YmdDG0HE8TzjXWhtaoTgRRQjoRr j7wtCyINCtCLyfu1CNbywQJ0bfprfjBG8qz/tYlOjBW8E2AyksLNbAfQk2KXbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVdL65tqz8JD; Mon, 25 Sep 2023 17:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHjAJm028423; Mon, 25 Sep 2023 17:45:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHjAiG028420; Mon, 25 Sep 2023 17:45:10 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:45:10 GMT Message-Id: <202309251745.38PHjAiG028420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c5e257985085 - main - LiunxKPI: 802.11: move ieee80211_chanctx_conf into lkpi private struct 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5e257985085bd987b1dddffd0455c2230df2d1d Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e257985085bd987b1dddffd0455c2230df2d1d commit c5e257985085bd987b1dddffd0455c2230df2d1d Author: Bjoern A. Zeeb AuthorDate: 2023-09-25 16:57:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-25 17:44:10 +0000 LiunxKPI: 802.11: move ieee80211_chanctx_conf into lkpi private struct Factor out ieee80211_chanctx_conf into struct lkpi_chanctx in order to keep local state as well. In first instance that is added_to_drv only. For now we stay single-chanctx only but this paves the path to make it a list. Use the new information to implement ieee80211_iter_chan_contexts_atomic(). Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 46 +++++++++++++++++++--- sys/compat/linuxkpi/common/src/linux_80211.h | 9 +++++ .../linuxkpi/common/src/linux_80211_macops.c | 8 ++++ 3 files changed, 57 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 8d0bee068c6a..de35ab844c25 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -922,6 +922,7 @@ static int lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct linuxkpi_ieee80211_channel *chan; + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; struct lkpi_hw *lhw; struct ieee80211_hw *hw; @@ -953,11 +954,13 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Add chanctx (or if exists, change it). */ if (vif->chanctx_conf != NULL) { conf = vif->chanctx_conf; + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); IMPROVE("diff changes for changed, working on live copy, rcu"); } else { /* Keep separate alloc as in Linux this is rcu managed? */ - conf = malloc(sizeof(*conf) + hw->chanctx_data_size, + lchanctx = malloc(sizeof(*lchanctx) + hw->chanctx_data_size, M_LKPI80211, M_WAITOK | M_ZERO); + conf = &lchanctx->conf; } conf->rx_chains_dynamic = 1; @@ -1022,7 +1025,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int error = 0; if (error != 0) { lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); goto out; } } @@ -1179,6 +1183,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1188,7 +1193,8 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } out: @@ -1454,6 +1460,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1463,7 +1470,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } error = EALREADY; @@ -1916,6 +1924,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Take the chan ctx down. */ if (vif->chanctx_conf != NULL) { + struct lkpi_chanctx *lchanctx; struct ieee80211_chanctx_conf *conf; conf = vif->chanctx_conf; @@ -1925,7 +1934,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* Remove chan ctx. */ lkpi_80211_mo_remove_chanctx(hw, conf); - free(conf, M_LKPI80211); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(conf); + free(lchanctx, M_LKPI80211); } error = EALREADY; @@ -3961,8 +3971,32 @@ linuxkpi_ieee80211_iterate_chan_contexts(struct ieee80211_hw *hw, void *), void *arg) { + struct lkpi_hw *lhw; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct lkpi_chanctx *lchanctx; - UNIMPLEMENTED; + KASSERT(hw != NULL && iterfunc != NULL, + ("%s: hw %p iterfunc %p arg %p\n", __func__, hw, iterfunc, arg)); + + lhw = HW_TO_LHW(hw); + + IMPROVE("lchanctx should be its own list somewhere"); + + LKPI_80211_LHW_LVIF_LOCK(lhw); + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + + vif = LVIF_TO_VIF(lvif); + if (vif->chanctx_conf == NULL) + continue; + + lchanctx = CHANCTX_CONF_TO_LCHANCTX(vif->chanctx_conf); + if (!lchanctx->added_to_drv) + continue; + + iterfunc(hw, &lchanctx->conf, arg); + } + LKPI_80211_LHW_LVIF_UNLOCK(lhw); } void diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 22a5f5a6377c..93c1e2873206 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -210,6 +210,15 @@ struct lkpi_hw { /* name it mac80211_sc? */ #define LHW_TO_HW(_lhw) (&(_lhw)->hw) #define HW_TO_LHW(_hw) container_of(_hw, struct lkpi_hw, hw) +struct lkpi_chanctx { + bool added_to_drv; /* Managed by MO */ + struct ieee80211_chanctx_conf conf __aligned(CACHE_LINE_SIZE); +}; +#define LCHANCTX_TO_CHANCTX_CONF(_lchanctx) \ + (&(_lchanctx)->conf) +#define CHANCTX_CONF_TO_LCHANCTX(_conf) \ + container_of(_conf, struct lkpi_chanctx, conf) + struct lkpi_wiphy { const struct cfg80211_ops *ops; diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index b3b53d23f62e..8f75b1bdf8b1 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -490,6 +490,7 @@ lkpi_80211_mo_add_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *chanctx_conf) { struct lkpi_hw *lhw; + struct lkpi_chanctx *lchanctx; int error; lhw = HW_TO_LHW(hw); @@ -500,6 +501,10 @@ lkpi_80211_mo_add_chanctx(struct ieee80211_hw *hw, LKPI_80211_TRACE_MO("hw %p chanctx_conf %p", hw, chanctx_conf); error = lhw->ops->add_chanctx(hw, chanctx_conf); + if (error == 0) { + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); + lchanctx->added_to_drv = true; + } out: return (error); @@ -524,6 +529,7 @@ lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *chanctx_conf) { struct lkpi_hw *lhw; + struct lkpi_chanctx *lchanctx; lhw = HW_TO_LHW(hw); if (lhw->ops->remove_chanctx == NULL) @@ -531,6 +537,8 @@ lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *hw, LKPI_80211_TRACE_MO("hw %p chanctx_conf %p", hw, chanctx_conf); lhw->ops->remove_chanctx(hw, chanctx_conf); + lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); + lchanctx->added_to_drv = false; } void From nobody Mon Sep 25 17:58:25 2023 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 4RvVwf0gTtz4trm2; Mon, 25 Sep 2023 17:58:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvVwd71Xlz3Fj2; Mon, 25 Sep 2023 17:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695664706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=quLlD6ufTVCGEHfQJDOk5BKVXmxP44WrJ4FXzUE4Do8=; b=W8m+wgIg2De3h9+xUeOqMJMKqNA6AnfNEqWUt6nVYn5pdLOAr0rNmzXjKdqgxyxEpO8xIt F3eJxA/dyah77VWkHx3ayF242nGWRsYJsI9OkS3xbB0+VBnwJD9V7QgWsAJXfi7ShaltFw fWx17pF/PHHR5Zd0Db/gUqpCu6l3/Kd8N/hYDKGcf74DuFh0Wnc68Y3Cn3tXLkgJztmryU /zQeW4Tv6z+FNzmqtanPdLakbGUhkxdfGgSOF/p2wJ7eswGEeVBcW4K+BnJiuDR9NoWCQj hfsMDwOBFLDAXDVMWcoZyG306ZAV5KTBznoOhi5GyY0Ro4EGSiIM3hiwmxVemA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695664706; a=rsa-sha256; cv=none; b=t5j+cvd/2BD3EytGF/JGd1vjPgRatLA2RI7mc37S0DCUt6gqvnb2N425EyR7xvsI8YmDXp P0KvIdEkhOQ6kR3DLlL/b729zddxfwdSyQIfxGQggumPt0fKWveVCx+47/DvJE3HKGET0W ok+qXqoWJODakJ+IS3CZGXG195UuUlN06lP8iu7lQuSNx/8tsMg27kiaG8SukAU3jyQB1O 69NNB/wgr21aNoh7hvQd0Bb6d6Rjl/EJhWiVxJHR6gUH1njQEiCVvf3BwhX4Bhthe0bOjI M7tfgUm86f5JuzgUDdJt2GkPFLSAYjxiClLSask6kTJWggt+IF5len9kLA4NtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695664706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=quLlD6ufTVCGEHfQJDOk5BKVXmxP44WrJ4FXzUE4Do8=; b=JClUApJzPlVL7yZrtFsh3wkFKyaKEILLxFhSikFkK8opzw6wTmwadbLC5lje8Eq/H1QZgG GxoC8Vu4Jx0rFtUL8kD/TFhcsz6CDIFWKmK3Z9K11fRhJDFIrTVW/AyTQRRrr35luDPTki AW+NUwtm/c3vEKdHtsNQJcNreVYF1uk20PGlEisuYBwSihn5IQjfKPN05eneVUaEfev/wG W9rSBdD8zXRjJcpntQSihD9iWD/U8K5w3zi0/bYfVXCqDgB8cEfPhp9IYVwZgAzEjw7Zzj diOmyM5f+5GQi7vJbnLNQSGBkQSq7Zu1TMJc2ESdyGW1nzvia7eG8OeY7L4VEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvVwd5lMtz8KT; Mon, 25 Sep 2023 17:58:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PHwPac045134; Mon, 25 Sep 2023 17:58:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PHwPoV045131; Mon, 25 Sep 2023 17:58:25 GMT (envelope-from git) Date: Mon, 25 Sep 2023 17:58:25 GMT Message-Id: <202309251758.38PHwPoV045131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 673d62fc359b - main - LinuxKPI: 802.11: fill regulatory_hint() with some life 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 673d62fc359b0cb7a70af42c36d2fa54fb29452a Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=673d62fc359b0cb7a70af42c36d2fa54fb29452a commit 673d62fc359b0cb7a70af42c36d2fa54fb29452a Author: Bjoern A. Zeeb AuthorDate: 2023-09-25 17:54:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-25 17:57:40 +0000 LinuxKPI: 802.11: fill regulatory_hint() with some life Start implementing regulatory_hint() using a .c file based allocation helper function so we could change structures in the future with better chances to keep compatibility. This sets wiphy->regd needed by various LinuxKPI based WiFi drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 20 ++++++++++++++++++-- sys/compat/linuxkpi/common/src/linux_80211.c | 10 ++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 56ca9a231d2d..7e57ce67cc26 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1260,6 +1260,8 @@ struct cfg80211_bss *linuxkpi_cfg80211_get_bss(struct wiphy *, const uint8_t *, size_t, enum ieee80211_bss_type, enum ieee80211_privacy); void linuxkpi_cfg80211_put_bss(struct wiphy *, struct cfg80211_bss *); void linuxkpi_cfg80211_bss_flush(struct wiphy *); +struct linuxkpi_ieee80211_regdomain * + lkpi_get_linuxkpi_ieee80211_regdomain(size_t); /* -------------------------------------------------------------------------- */ @@ -1587,8 +1589,22 @@ regulatory_set_wiphy_regd(struct wiphy *wiphy, static __inline int regulatory_hint(struct wiphy *wiphy, const uint8_t *alpha2) { - TODO(); - return (-ENXIO); + struct linuxkpi_ieee80211_regdomain *regd; + + if (wiphy->regd != NULL) + return (-EBUSY); + + regd = lkpi_get_linuxkpi_ieee80211_regdomain(0); + if (regd == NULL) + return (-ENOMEM); + + regd->alpha2[0] = alpha2[0]; + regd->alpha2[1] = alpha2[1]; + wiphy->regd = regd; + + IMPROVE("are there flags who is managing? update net8011?"); + + return (0); } static __inline const char * diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index de35ab844c25..41b13fc9269f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4028,6 +4028,16 @@ linuxkpi_ieee80211_iterate_stations_atomic(struct ieee80211_hw *hw, LKPI_80211_LHW_LVIF_UNLOCK(lhw); } +struct linuxkpi_ieee80211_regdomain * +lkpi_get_linuxkpi_ieee80211_regdomain(size_t n) +{ + struct linuxkpi_ieee80211_regdomain *regd; + + regd = kzalloc(sizeof(*regd) + n * sizeof(struct ieee80211_reg_rule), + GFP_KERNEL); + return (regd); +} + int linuxkpi_regulatory_set_wiphy_regd_sync(struct wiphy *wiphy, struct linuxkpi_ieee80211_regdomain *regd) From nobody Mon Sep 25 20:17:18 2023 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 4RvZ0t6rbdz4v1XR; Mon, 25 Sep 2023 20:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvZ0t5xQxz3Wyg; Mon, 25 Sep 2023 20:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695673038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpiutBIVoSxokZTdNeNvyq6lwVL3yJ3QmC7PmSr1LZs=; b=PIzs4KCklgzvaE0eGVLp49mxwKd7GfOSv/AFGAq57tW0rFGpUxnOkBFgWRDtrVmYOqOdyT Zlw6EwpUxOM1OgAyH9n8GsgYIylCjAQ0637ShN/wnrrMjOtRvJF5lRgcPKTdq8JqDuMTt7 d9oJTOAHVbNrL1OAoMGl4PXYA625jiZqs8uxEiQf5hV9jUrfF14iOlwnaMz8tok7hRSWZP aNHUQl+HwZuUSGwYOaWlBR//zBR7kzmzlwTG3z3Z1e8IaHUOJqO/SPachioZRz790+HuWx d6KVNYlPlEnftal6Qq+k1UFrCNE5fcaO35Nh8PGTOunjsBrDd/bXtSB6F3keow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695673038; a=rsa-sha256; cv=none; b=qMhabzqH4Ah9tG1nCB9S8K9Zxv19MftPllOkbF/oDLz347RpbXfze9fABmn3IYLWhbKlSM x2R4G0w+94iDHAcXF+x9tiTjTC1nZOSlZRAXEU1SwbRiWkJKq/WjWUf11N2jDvde5QNkli CvzkSxYH7IbZInFEOok2hECiQIaez+KEu6rGeiasg2H0vPt2DtyVooDhUuQUn2yLqGs8BO aGHx6BDbfZSBFcogX7+JEhawx6Ob6Wfre2hisSQt6n6CSzjigJCTkC2PxtQtvQuGsV8DS0 ktafZUubuP+8v5DbT1cbIgqzXa1f4g2y90mSdVH8gZ4lakqdtOZ4jvTGPr5I7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695673038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rpiutBIVoSxokZTdNeNvyq6lwVL3yJ3QmC7PmSr1LZs=; b=kE6GNzta0dt2VnCBMlCoH67XyHg9KQCDbxkWrVsKNNqG7i/HMMESQvfqO8yXCp8hy9Z7aM m5MusCD0ULL0k8cRz56LxvO3iB4RaGa9AJVk3VL+0V6D0GZyEc1FjBlNXfXjORHuz9s5gr fpQcqM2oVbKn4mwfI5snfKdRYSslZUwwOJwthCi++wH+/NUP+3EoBRfEAQkVd51k3nmya7 gFUTn4fNMPxZAcXCSmi+Qa4UtXBuAx3o2m8wXM2HTrj1xMyhyCFLkPAGu5mxtqu7YwpGm/ c36qR+Q6bU3ao7kdmfnsoaOZd/OXpmtkzBtEqyPXyvwmhEABe5JurHtGF08+XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvZ0t4t3tzCtj; Mon, 25 Sep 2023 20:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PKHIbQ078069; Mon, 25 Sep 2023 20:17:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PKHIcw078066; Mon, 25 Sep 2023 20:17:18 GMT (envelope-from git) Date: Mon, 25 Sep 2023 20:17:18 GMT Message-Id: <202309252017.38PKHIcw078066@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: 61f8df6a13a3 - main - mfc-candidates: search by committer only, not author 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 61f8df6a13a357e1d45c22a2016b87491f10de87 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=61f8df6a13a357e1d45c22a2016b87491f10de87 commit 61f8df6a13a357e1d45c22a2016b87491f10de87 Author: Ed Maste AuthorDate: 2023-09-24 13:13:15 +0000 Commit: Ed Maste CommitDate: 2023-09-25 20:11:28 +0000 mfc-candidates: search by committer only, not author When both --author and --committer are specified, `git log` requires both to match. Search only by committer, as it is typically the FreeBSD committer who will perform the MFC. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41964 --- tools/tools/git/mfc-candidates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/mfc-candidates.sh b/tools/tools/git/mfc-candidates.sh index 9e120d451beb..76ff9b4d53c6 100644 --- a/tools/tools/git/mfc-candidates.sh +++ b/tools/tools/git/mfc-candidates.sh @@ -118,7 +118,7 @@ fi authorarg= if [ -n "$author" ]; then # Match user ID in the email portion of author or committer - authorarg="--author <${author}@ --committer <${author}@" + authorarg="--committer <${author}@" fi # Commits in from_branch after branch point From nobody Mon Sep 25 22:52:16 2023 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 4RvdRh6mDnz4vBlb; Mon, 25 Sep 2023 22:52:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvdRh6Hjdz4Vp7; Mon, 25 Sep 2023 22:52:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695682336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6v3Qvj674ZPvMpYchnZwUveTxqzri0dHwKiRM5UpQBU=; b=Ya6JdK+L1RLMwNhbNZYAAzClN2IqPu7KmSmQQRS3u1GSr+k93kxnXJXos47IYAD4E3MjN5 Jnnlk/KHL2sGpZ6XcUD8yC9hIoYJdKjWzwhtbixVWoGjo5D0ow1ayC+AAYZz67Y16Vbzmm nmT0BdqTqh8OynLdGM5igw5MGsjltVDcj4JqEWObLhvUhrkCyWMn6YlM2GFx3iCwXzyO+R WDY9UsS4uHNGHCb+yh2AbPIXQCHf9VE+GFSiNRbvZGuh/Cj2SVzwwzqwJ6/EbEnVahakNO PyDOdlCsFDgvg+pHvvM0X+MQlfB99imV8rF7w256/0Ecmlfj84BafWl/yNEJcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695682336; a=rsa-sha256; cv=none; b=DXJJhIdbc9RGxmM+aqlAMcuOFfa6oO4JXQJJpYlUiKBrVgWtrGJZffOcqlL71iHm2K1Mya SMr59/uwWpZjsLwB6yqwVJfczGUo3MEDa7gqKk/5HMy7zJV3uElF6rmiIDw5qaYsR9FeTT 9PMp2zWIZ98K3PjjP1x6TKJh2Un5esMx8YfcWXk3FhNvkvdrhE7qvd20h/KmRsW3Rv/E0n TpSV4aGI0/WnmkdTENGSCoNI1zS/h5074UiQc6w7Q6/QKyFg1UBFLe0ThZjgZGMRCfhtFN gJisksjiztQZhHRlvGZ+TkaGBzyX3HFnkBk3Muh8rZ1Ne9BpLoNSjf+ajT/YJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695682336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6v3Qvj674ZPvMpYchnZwUveTxqzri0dHwKiRM5UpQBU=; b=qBGRC/HN6/tOrX6qntXmwwdjd6ZqbfqcB+/G/5p/Q8YAr5lA+ihnj7puNQ/DkPoIpCWjgN J9J7sLvPHHtBG8IAnXfUGvHbBNQujcbBpwnGKe/SepN2oLiGGOZRTjl89h2J3TwMRSyC79 BXx6/bWayD+swfnSVddWttXSXL7lrCsXHLAkwsh0Zj8Vm5Gn6Ft+UN/jmrEmgD0zUZlKwN 9bie1mUeNrxRGnnjf82M+gfFqQKvno4Q0RGQ13/ok/pjTbUxHw6UK39HVsCe+KXjsxcgUJ G4s79S4+Rjgd6XsZ2MS7VjCyE4d2lr3Znyusv3TUt7/3F28iGdmgOawEjU/AqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvdRh5M81zYGX; Mon, 25 Sep 2023 22:52:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38PMqGFu041219; Mon, 25 Sep 2023 22:52:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38PMqGn2041216; Mon, 25 Sep 2023 22:52:16 GMT (envelope-from git) Date: Mon, 25 Sep 2023 22:52:16 GMT Message-Id: <202309252252.38PMqGn2041216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: 3fb80f1476c7 - main - regcomp: use unsigned char when testing for escapes 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0 Auto-Submitted: auto-generated The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=3fb80f1476c7776f04ba7ef6d08397cef6abcfb0 commit 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0 Author: Christos Zoulas AuthorDate: 2023-08-30 20:37:24 +0000 Commit: Yuri Pankov CommitDate: 2023-09-25 22:49:14 +0000 regcomp: use unsigned char when testing for escapes - cast GETNEXT to unsigned where it is being promoted to int to prevent sign-extension (really it would have been better for PEEK*() and GETNEXT() to return unsigned char; this would have removed a ton of (uch) casts, but it is too intrusive for now). - fix an isalpha that should have been iswalpha PR: 264275, 274032 Reviewed by: kevans, eugen (previous version) Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D41947 --- lib/libc/regex/regcomp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 791755ceb14d..42fa1b99e58e 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -828,10 +828,10 @@ p_simp_re(struct parse *p, struct branchc *bc) handled = false; assert(MORE()); /* caller should have ensured this */ - c = GETNEXT(); + c = (uch)GETNEXT(); if (c == '\\') { (void)REQUIRE(MORE(), REG_EESCAPE); - cc = GETNEXT(); + cc = (uch)GETNEXT(); c = BACKSL | cc; #ifdef LIBREGEX if (p->gnuext) { @@ -992,7 +992,7 @@ p_count(struct parse *p) int ndigits = 0; while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) { - count = count*10 + (GETNEXT() - '0'); + count = count*10 + ((uch)GETNEXT() - '0'); ndigits++; } @@ -1302,7 +1302,7 @@ may_escape(struct parse *p, const wint_t ch) if ((p->pflags & PFLAG_LEGACY_ESC) != 0) return (true); - if (isalpha(ch) || ch == '\'' || ch == '`') + if (iswalpha(ch) || ch == '\'' || ch == '`') return (false); return (true); #ifdef NOTYET From nobody Tue Sep 26 04:01:59 2023 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 4RvmK33DG4z4vWtr; Tue, 26 Sep 2023 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvmK32mRqz3Wfw; Tue, 26 Sep 2023 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695700919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xmBG73wCCUxNi/Vm+gNsB6SJZ1x5QlkXeTP0FRYo+78=; b=iQelhaUTGVJir8plykS+iKHZCIssvBOexCWY6HgxAJYYFXy/vEgR8ycZk2XQVnHgxg1liP xdRFKrLBoXaQjRuJmPgcobsTppc40Yu1zsdWaAoTEw9anY06GA2A5oS9cOzoFhsGZ3Zoez dPaic/rF54zNLAJ4peGu6CAjAfpze3800FG9Z2BAldQJC0+FgnCnc5Hn/zHbzqWOkiWVso CMVbBsSxt83KGHOZhmsQG7Bfh/RBrhhLdv0U9rVnQot5iTBMHiDGDphNt2LBdZyPrfIsus +6TcB2TeDKPOs7dk8OB9GrkQVrz9Z6EDHJY6/AOZW/ADOf+4qriA1J2TMhKoMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695700919; a=rsa-sha256; cv=none; b=Rwgw8/2QWjV3YEgWZvUY4v7mLxYz31HE3u7AsfO23DaeyVo/bxnRAHmUxkrJ4eOcgzIiXp eXGO7pvo3oI9JY6E8uwVu49yDafrve8KBB3u6ABp8kU8OSaElggvpx6PtuRsu2pxPFLlFA GemcZu8dEY4qqJ4TN7JDkXR1ntfNQljzls8/Wkaj6RzCS7Y3S8tTUr6kG055j15cEqxuBz UzXK+c5bNgY+Dej461B6dMSPqR9oNcEdLjDePyL9UgbBM+jNLdgdngv7r0UNuE3GjFDE7R hr+Qq/AyBWp7AeViIQ2q2ZLYs2T1fGUr7RMSPSSwNb3RXzsEf28cvnZBT1gYuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695700919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xmBG73wCCUxNi/Vm+gNsB6SJZ1x5QlkXeTP0FRYo+78=; b=MOuJ7WntoAO2tx1pxrv+2lGI/mQ763KQGHCL+lWCwW4wjo73BtjbIDI7KxmphQphIJp1DN 9px2vnlQoFIhtr5yYZqYCZ5XouBo+9h0tLEMx442B2FkVQE3oqVDTooQVXE5jPsDPRUnmR tHaKbvjvypzX4Bb4AYqnjwXrP6tJ/oWWitznkU8uDvM7WbWmVRXvSxM0nuDepMu+esK/4J waeZHDGLOEATXqxEOi2hua1/p1QO5+12Mnf7xvMASb0iLd2viUvLwOQTsZmSRPsLgva8w0 FNY2zGPRqKRLfcyPTHN1koZRZPtf5dSzTAuCivT6LPLaszIGEpq0wqyQ55iHMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvmK31q7kzhBC; Tue, 26 Sep 2023 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38Q41xGN056340; Tue, 26 Sep 2023 04:01:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38Q41xqv056337; Tue, 26 Sep 2023 04:01:59 GMT (envelope-from git) Date: Tue, 26 Sep 2023 04:01:59 GMT Message-Id: <202309260401.38Q41xqv056337@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: 1117b3204873 - main - pf.4: Bump .Dd 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 1117b32048730fd0e44053b06163a2586bfb934e Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=1117b32048730fd0e44053b06163a2586bfb934e commit 1117b32048730fd0e44053b06163a2586bfb934e Author: Zhenlei Huang AuthorDate: 2023-09-26 04:01:01 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-26 04:01:01 +0000 pf.4: Bump .Dd Missed in c531c1d1462c (pf: Convert PF_DEFAULT_TO_DROP into a vnet loader tunable 'net.pf.default_to_drop') . MFC after: 10 days MFC with: c531c1d1462c --- share/man/man4/pf.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index 5309db10d807..c4c1d6cc8604 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 28, 2023 +.Dd September 22, 2023 .Dt PF 4 .Os .Sh NAME From nobody Tue Sep 26 04:24:13 2023 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 4Rvmpk1XWqz4vYQd; Tue, 26 Sep 2023 04:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rvmpk12d6z3Z3J; Tue, 26 Sep 2023 04:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695702254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfP8lYzZv+I90EyWXqI47fTRyJEV4YWdXT4YytqjShM=; b=rm9eAkkLCzZXXVjZBYZo6HTqW+J+xCQ0Yn9zif0CEyE7F0wJLmWH3FGNakkRI24Z0Zm2IZ 4U5x8+TCkd+QpcbbH0EgvIVW41d1QN4/NZDvQ9/ds6e8w/HHV1zorei72/ReJABtqm8jEF mS/CJ4RAN6IDaqLlg32AflHFXVHKf8bS4iQE4GM9GA4XsYQVv6IGUtG3vg0NFVL4izB3lu deHiM0ts/+A4xoU+o4b/3sjMoYzj1txjnVv3C+1tjnqRCzzgB2FTjEvsE+mv7f+UWts7H2 KkH4sZ8dGJ4NUrrfS3nydANHQPhV66Sfh6XRZ7PPEyG5fiXU471OUY6TciUDkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695702254; a=rsa-sha256; cv=none; b=wVYPnGmYV0Vz4kU6I7tHHBcixLHwehYMWDUVSzTxfD9/przvANJrpLU2RWptJENVtpEjCX 5gSQ1bf2gY+5rsBnjVCMSDEur2XGE8D8IXN3p00Of+eMg4+AjSVrvSamGiJrdvBQNv4Eoc oNpFrH3vLzvoFf8WdtTER1pVJOlynvkDAb3ulLK8QVl4raAkaocwh9cd6smThMmOIh3TKO VmTT8yY2sKIgQKrGSigZngREjzaixGuq+PEH8Ldd6UJBFeK8u7BKRXE9E/kZe+56GVTVoh MZ/RYsr6RuVVmEdgItJqFQYAMw8LCEiSFirFSjY7y7eL7Febt4ryQIDzxAosBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695702254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mfP8lYzZv+I90EyWXqI47fTRyJEV4YWdXT4YytqjShM=; b=tB0trvJkL0kpHs+nu8NenECAjmFHwsNyFcGciM8uQsot+5/iBcq0Wxi4BKzkxFqdCBTRyL MHQiaeLRpKOBl5VCNrd8vKK/4VCDcHS8rLvu35b3znBHp4E30Q7IKuMFYbKz539Ff/iKQh uS7qUpV6PlrZXqncZcXKIwx9sDyEv1CAV17HnMnuMex92rSIYTf6mgFI+keM+q9jE0pYCe 54WyWW+yUv2cSHgBnPzssXCsWN/VwJ9IiXbAcVfnjA26fWWHJS8jiFps/yH4zUJTS8innZ 0jHgMwRiYkzKrCBtgdRJwlbOeoNNxLdQ4dl9q/LXrRYOGVU40vCRAQttbhI+uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rvmpk04zwzj1V; Tue, 26 Sep 2023 04:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38Q4ODEN090895; Tue, 26 Sep 2023 04:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38Q4OD6S090892; Tue, 26 Sep 2023 04:24:13 GMT (envelope-from git) Date: Tue, 26 Sep 2023 04:24:13 GMT Message-Id: <202309260424.38Q4OD6S090892@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: 1d6021cd7268 - main - nvme: Supress noise messages 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 1d6021cd72689f54093af4ed77066a2f8abde664 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d6021cd72689f54093af4ed77066a2f8abde664 commit 1d6021cd72689f54093af4ed77066a2f8abde664 Author: Warner Losh AuthorDate: 2023-09-26 04:08:52 +0000 Commit: Warner Losh CommitDate: 2023-09-26 04:21:58 +0000 nvme: Supress noise messages When we're suspending, we get messages about waiting for the controller to reset. These are in error: we're not waiting for it to reset. We put the recovery state as part of suspending, so we should suppress these as a false positive. Also remove a stray debug that's left over from earlier versions of the recovery code that no longer makes sense. Sponsored by: Netflix --- sys/dev/nvme/nvme_qpair.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 9806096de81d..cd0057f444b8 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -1104,13 +1104,20 @@ nvme_qpair_timeout(void *arg) nvme_printf(ctrlr, "Resetting controller due to a timeout%s.\n", (csts == 0xffffffff) ? " and possible hot unplug" : (cfs ? " and fatal error status" : "")); - nvme_printf(ctrlr, "RECOVERY_WAITING\n"); qpair->recovery_state = RECOVERY_WAITING; nvme_ctrlr_reset(ctrlr); idle = false; /* We want to keep polling */ break; case RECOVERY_WAITING: - nvme_printf(ctrlr, "Waiting for reset to complete\n"); + /* + * These messages aren't interesting while we're suspended. We + * put the queues into waiting state while + * suspending. Suspending takes a while, so we'll see these + * during that time and they aren't diagnostic. At other times, + * they indicate a problem that's worth complaining about. + */ + if (!device_is_suspended(ctrlr->dev)) + nvme_printf(ctrlr, "Waiting for reset to complete\n"); idle = false; /* We want to keep polling */ break; case RECOVERY_FAILED: From nobody Tue Sep 26 05:06:00 2023 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 4Rvnkx1wHlz4vbBS; Tue, 26 Sep 2023 05:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rvnkx14dGz3cHN; Tue, 26 Sep 2023 05:06:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695704761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI/gyGIRXHGGAaBvYTEYK0JVvyDiembou557ATDMDe0=; b=UXoPA9/Fy3asNtDLRBTvlYNeWZq5sLkXKSCSuYRAJ7ELA23M8D3WuOui4MxeB4b9tFUWMo fhjXNPi+Mxbtg6hn3TR7+x8d50rWavmy1HbGHS1xzZmzAQy+TiofSPVd8GIQ9ztOnih9sc 6TQPJBAogxlAaXeieuRE2TEzpqEkQul9/TFOg1643ufdjlLdVdKAxtlecU3y/dQ+F4d1l6 0/sDt9iQ+gNw84/iR/BDezdCCGJkfbDN6NS8q4h8WhtRFdM0fv/C9HhHNphldwP2A4itnF uXgpudpnlGt95996gU4pvc74TVG0v4XM3/oI/ZSRBYo8oZCY7ew/tXXZJCuQVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695704761; a=rsa-sha256; cv=none; b=ADXU5HwNQRmFuFtthTo0kYod+SLhYiB3guTiT7OnlDHlk0MEo85h9G91Lu/sWFYmvC6xMm pj2L5jkMfask5xJtvCqZe+LavwjmAA4iN6/7HaPPs3ylJOEP1ClRsxFuggmBw8V6TM0K4r sPClNdvDZ6WjnzJ/Mxw5K4YzYVkCXaB3QoActB97++6LNB/Cxw88BXAyMzwtI5DwzilTRz p2f25wBYl/kt3jVdhagIXbSgIEgTO1c4rp5X5MuhMpZ0FD/RZ9EsLv3eIq/zRA6OWcJm/X Ojy7QW5woJ9izZy0xRzHi35G6PGd/xW0vXi/pPqszcT2lFRxA+LlYQRwD/I4Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695704761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI/gyGIRXHGGAaBvYTEYK0JVvyDiembou557ATDMDe0=; b=hdjfKHzbrsJ/gqfThWlYtvLMFjlMXnQGUcIeBEd/mRs677ZuD+M/BXLAmIhskoAhAMej8E OmiQL6DHN47pJyZd/sqcOUXoPg8OCYSb0od9oe5zVO2PxQNHdd5SM27zsv8VsuzB44AdrZ QQ2vNOp//OXxU2YPr5Gdv7nz0dC9P43KxaBxd0hwcNQPHQlq4gr+KDY4TEdk2lBsEH1Yq1 vB3rIJe0k57d2yiOWlpocsQN1fM8JDKCIHOL9P2MonB+ubMF5d7soWpuI3J2qHYto0UQRP h5sU3m65Sr4jNEK88HsGE+6yUbL+Sefaopc3XCCIVYhlQXvUiWVVJXQcoZAcJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rvnkx01VWzjjw; Tue, 26 Sep 2023 05:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38Q560X8057532; Tue, 26 Sep 2023 05:06:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38Q560jI057529; Tue, 26 Sep 2023 05:06:00 GMT (envelope-from git) Date: Tue, 26 Sep 2023 05:06:00 GMT Message-Id: <202309260506.38Q560jI057529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Greg Lehey Subject: git: 915af883221a - main - Explain the -d 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grog X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 915af883221a4982e89ef878f1def0899ccac283 Auto-Submitted: auto-generated The branch main has been updated by grog: URL: https://cgit.FreeBSD.org/src/commit/?id=915af883221a4982e89ef878f1def0899ccac283 commit 915af883221a4982e89ef878f1def0899ccac283 Author: Greg Lehey AuthorDate: 2023-09-26 05:05:16 +0000 Commit: Greg Lehey CommitDate: 2023-09-26 05:05:16 +0000 Explain the -d option. --- usr.sbin/makefs/makefs.8 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index eaa0ab2955df..18fd01adadda 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -114,7 +114,12 @@ Treat duplicate paths in an mtree manifest as warnings not error. Enable various levels of debugging, depending upon which bits are set in .Ar debug-mask . -XXX: document these +This option is intended for source debugging. +.Ar debug-mask +is a bit map defined in the header file +.Ar makefs.h . +See the source for usage, and look for defines starting with +.Ar DEBUG_ . .It Fl F Ar mtree-specfile .Em This is almost certainly not the option you are looking for. To create an image from a list of files in an mtree format manifest, From nobody Tue Sep 26 12:45:16 2023 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 4RvzxB2W97z4v6PL; Tue, 26 Sep 2023 12:45:34 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rvzx94F1Yz3X9r; Tue, 26 Sep 2023 12:45:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=none Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5031ccf004cso14146852e87.2; Tue, 26 Sep 2023 05:45:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695732329; x=1696337129; 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=AFz5w5+4rjpOB0ZgD3Lh8n9gFlRjSs8cX197G9F74g4=; b=gG4Z2xpyQQdLaRsX2Qb+862sdT3qdbZwiNMita/vxNEtvmL1M+OWzCjp56EGX6uaQf p4a+Te9RR1N12F9KykzkMs37kCUW6JUULgzQbzCe/Uewx7cS1ZBGbyoqNFdRCtBGQ5un grNkW/7sScr6waRiPe03HchFAVfs23BXx9BL0XBZ5kPDJROv49jjFBATjlf8StLvWC+Z LBe6zRZ0b5lN3K2zFVLskOovTnMkNsiBPvU3tF8iU388OfsxQpcy96ck/qLFUaV+9tn7 O3aRN7NNI7j4X3o1nM2n6kfPbMgXcOgM/EhNvnJwgJUVIC/BLN3RupuQgt8j3qXjwhFr RHtA== X-Gm-Message-State: AOJu0YzS4s8CQ14+92+4RSB49432KK76ukttip88hxo1/pxfNUTWPJVs S+k+2FicTDKMljOL8NnKMEWIq0p4yAn+LqjGySiVbSsD9PK4SqUn X-Google-Smtp-Source: AGHT+IHw0jpheuJb3YpIAXXCcsU9Xw8j+B+oaabO2kjG0ZJOBfcEjFXpEq1PkFcCLUegc9XeQDnC3/RAwhMA49/md/Q= X-Received: by 2002:ac2:57db:0:b0:4fd:8976:5fc9 with SMTP id k27-20020ac257db000000b004fd89765fc9mr7524742lfo.23.1695732329129; Tue, 26 Sep 2023 05:45:29 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202309260506.38Q560jI057529@gitrepo.freebsd.org> In-Reply-To: <202309260506.38Q560jI057529@gitrepo.freebsd.org> From: Ed Maste Date: Tue, 26 Sep 2023 08:45:16 -0400 Message-ID: Subject: Re: git: 915af883221a - main - Explain the -d option. To: src-committers Cc: 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 [-2.96 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.958]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.54:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.54:from]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCPT_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com] X-Rspamd-Queue-Id: 4Rvzx94F1Yz3X9r > The branch main has been updated by grog: > > URL: https://cgit.FreeBSD.org/src/commit/?id=915af883221a4982e89ef878f1def0899ccac283 > ... > Explain the -d option. Not picking on this commit specifically but it's a good opportunity for a reminder that we have a comprehensive set of guidelines in the committer's guide: https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message We've had some recent commits that don't follow the preferred format -- overly long lines, missing empty second line, etc. For this commit the issue is our preferred commit message subject format starts with a component. That is, for this commit the preferred commit message would be: makefs: Explain the -d option This makes it easy to find commits of interest in short logs, e.g. the five most recent commits as of now: $ git log --oneline freebsd/main | head -n 5 915af883221a Explain the -d option. 1d6021cd7268 nvme: Supress noise messages 1117b3204873 pf.4: Bump .Dd 3fb80f1476c7 regcomp: use unsigned char when testing for escapes 61f8df6a13a3 mfc-candidates: search by committer only, not author From nobody Tue Sep 26 13:29:28 2023 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 4Rw0vs08mHz4v8mL; Tue, 26 Sep 2023 13:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw0vr6hklz3dkK; Tue, 26 Sep 2023 13:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695734968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGlgX14iIr1mZ01UVTarFdfxBigDpKElbnhkAXKzqXo=; b=AL5TfKpXM6c8YC+Uocov1oHyS3+RUy2GFlEGTRLFa8tbb1jygrv19/8hnpWybtiaERe1O4 +DL7LEVHmG01HbudqMYAd1U9XDOM3lA/wcnXBrnebPMhEDpfkiUjdzgZPSf6rtmINz468c 6FZKxnqDuWMcBne1hkZhieaplKSFVKB1CWQCsicseyFyyhKDgL6vWjPLeLCU4rMAqJ4uqy a9GUnqOkEHQWS0hhMQxtsPtYtgCo7Te3A4eUM0k80MKkHtVe/nkCi3RBLk3Y68diZZYUuh atF/WZPfJVKPl7YksAZvtPQqpOd9Yc3RfOp96VaEJ+ut4nBwnVDvvMw9DLRQRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695734968; a=rsa-sha256; cv=none; b=SWvC+3J3sf/4Xbt7VF7Kf/tJeKPR2U3Zn3mGZxNkht7LX5xWfMBSLSZcmB/QD+HxiGKK48 R5VCelYydl5Xb49y1tJzkutrnkxQu3IdMXY4eE4o955UIy6bPJRhWbARDO8EXAD3yMVPm4 lOA4Tg/4ETkHcgyvGsO5Ci6LJuD+9mx2YT5rY0rHDJf4mEvRkUr6olshaKyrkwrEnYQIzO ExogQJmlxVrUSI5wneeKT+MrxBgCOcsyl+9ZM0s0y2hLQRq9d71PQWG2KDfBEp4UhBp1sO Nfim0D5HFUN5sw3E/t2fzWnEHgDUn/ddYBtvuM+UymnX/FwV9VrPjIyaCoiZFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695734968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YGlgX14iIr1mZ01UVTarFdfxBigDpKElbnhkAXKzqXo=; b=qjuyIh5QRreMC08QQ5dh+MrM3nEXQUczr8+K8Rp0NVuLxTX6z7xrV3tgqMnrqGijvv1Y4I Njdf7VIydh/OSEC3djJ3di/Ebk4qa6H8ZkPsIx78j0vKAJSgwICEybmv5xmBTuXX2GgkJZ /Nx9A6c0xxM4jiRAqwNicSbBHwjNALzKVsuWmcMyTbgGqIznFclWpVlNcOt1GVqarKW2gk qucN7MAK1h/GHWU4Dbqxf0SVWTRaG7ePiVce43W0zAvVsSdwQ6roq7cvuFKzGx2kbVp4HR ZFepLhXecojIhhnSXhjRwFyFN+kGkXyqihX0xRlYLdl2sGCf9E5ozjzX6nquBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw0vr5kW6zxsk; Tue, 26 Sep 2023 13:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QDTSJw085776; Tue, 26 Sep 2023 13:29:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QDTSMF085773; Tue, 26 Sep 2023 13:29:28 GMT (envelope-from git) Date: Tue, 26 Sep 2023 13:29:28 GMT Message-Id: <202309261329.38QDTSMF085773@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: 5b732ae8332b - main - kernel: remove unused HWPMC_MIPS_BACKTRACE 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 5b732ae8332b2bad256016569c0ead6d918bdf79 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5b732ae8332b2bad256016569c0ead6d918bdf79 commit 5b732ae8332b2bad256016569c0ead6d918bdf79 Author: Ed Maste AuthorDate: 2023-09-26 13:27:14 +0000 Commit: Ed Maste CommitDate: 2023-09-26 13:29:18 +0000 kernel: remove unused HWPMC_MIPS_BACKTRACE option MIPS was removed before FreeBSD 13. Reported by: andrew --- sys/conf/options | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/conf/options b/sys/conf/options index ae94d1b60492..840f6a9dfffc 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -890,7 +890,6 @@ DCONS_FORCE_GDB opt_dcons.h # HWPMC options HWPMC_DEBUG opt_global.h HWPMC_HOOKS -HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h # 802.11 support layer IEEE80211_DEBUG opt_wlan.h From nobody Tue Sep 26 14:09:28 2023 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 4Rw1pH0gX0z4vCX9; Tue, 26 Sep 2023 14:09:43 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw1pG2rt1z4JQf; Tue, 26 Sep 2023 14:09:42 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.167.50 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=none Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5041bb9ce51so14219003e87.1; Tue, 26 Sep 2023 07:09:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695737380; x=1696342180; h=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=2wa/HUKw6iqnaLUrn0x9mR3imcLrv394/ZYBUf0aUB0=; b=ZoI800W5MSVF/78DPG1sbhqr3a2d9i/3FT4QzPNtsT2N/k3TUghrpP8MImDKRo9bjy 2X1GaKfd3C+2d0petR02YcAJFe2MbtF7bK1IGRyu8PdgQU5ijbhRcCWMbYoXq1P5cU0u mn7axStFPKDbgBMgJUsaVgEjbT7sfKPWnfUZfz3s65WEyoYstM66KWKi3KInF3NS2dhl +wI0th2NAjwTqDJBL51i7CsXUcQk7sRpLM03TrpXmyCMmUyQ7d33r51q36xrYkxadcXe TSf9FHXGldkaffP0pMnPYKSCVypQVg1e15z14/dLR33yJkTDePmvJAhorGRqRQvd8wnH QXvA== X-Gm-Message-State: AOJu0YzMSTf6D0KEQj1hPLoEcRnekRIrJZtOKd5UUGagh+F8BoTY+RGn HwHIj7n5zzyyaNe5ZFbqUozCyTky76Y4zrxrXMcqqGAlFax35w== X-Google-Smtp-Source: AGHT+IGcRH3cCOWYDob43eXHI3YJ4pY0dJmUHDmtIowb8Jr/OpTQNNUNAbcoIAr/NzXYwdXRM485j8U3AcMkA61sA84= X-Received: by 2002:a19:6710:0:b0:503:95d:f2bd with SMTP id b16-20020a196710000000b00503095df2bdmr7751842lfc.34.1695737380269; Tue, 26 Sep 2023 07:09:40 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202309261329.38QDTSMF085773@gitrepo.freebsd.org> In-Reply-To: <202309261329.38QDTSMF085773@gitrepo.freebsd.org> From: Ed Maste Date: Tue, 26 Sep 2023 10:09:28 -0400 Message-ID: Subject: Re: git: 5b732ae8332b - main - kernel: remove unused HWPMC_MIPS_BACKTRACE option To: 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 [-2.88 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.88)[-0.883]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.50:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.50:from]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; FREEFALL_USER(0.00)[carpeddiem]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com] X-Rspamd-Queue-Id: 4Rw1pG2rt1z4JQf On Tue, 26 Sept 2023 at 09:29, Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5b732ae8332b2bad256016569c0ead6d918bdf79 > > commit 5b732ae8332b2bad256016569c0ead6d918bdf79 > Author: Ed Maste > AuthorDate: 2023-09-26 13:27:14 +0000 > Commit: Ed Maste > CommitDate: 2023-09-26 13:29:18 +0000 > > kernel: remove unused HWPMC_MIPS_BACKTRACE option > > MIPS was removed before FreeBSD 13. That should of course be "before FreeBSD 14," noted by jhibbits. From nobody Tue Sep 26 14:37:32 2023 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 4Rw2QN62BNz4vDXl; Tue, 26 Sep 2023 14:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw2QN5WXnz4PcW; Tue, 26 Sep 2023 14:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695739052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dj2/HMdM+Wvc1AUJ9kGhNkx9ArL7YJPum4kffdVOQhI=; b=nngg+MLamaVkRxi6zI8HmeI0Fkwd16rPMPXQ/RnwgO+o4Mvf5pDX77L+QmYbQjplD6G/KC mD55qGxbd/ngpIo5aKOYEyatH9m5jOKnMO4ZgmWuhN1E/hdOS2ZPMqxyZ9cztYsJzQbDU8 UyEe2lQbUxfFFbvfwO6JqrmWD1SxfJRf9lJrZ/h0u6bFUq2nHObzE7OLPvBdfvrk7BqU9o XEyZ9cppSHw4jRnqZd/rJ9J1NN//9Qxj95c79UBLbomPrEQmAbrZ9mUjy6nTZCZVFeMfFC yKSjhE6Lmi5tCET8a19FaUWyBo384AMRuFHq1oHTKg+lQAFrHeuy7wOfA07Z0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695739052; a=rsa-sha256; cv=none; b=MOb554kXMCVFoqf67trfS+SjklZkK5FunYv2qrQENZLNtlW86MjERVH1dTca5JEn265tHg /ewO95NAgtII39StRZXhw1xCV3HUWWe1kbnLS2Lj7kKS81f2ehIOU8J5S8YXw3VmZNMju+ RLW90tIwWDuwnvS46b2ayXoIPXLIFSnxKVe/iXw67P49ow+eGnuxrmNCjNAqoEY9yT6uO1 6qLPK3MfbeiddSzhh+m7YdsEw31Cbv6DzqXcK7FTRdDZqWqtoyqpKGpI/krAgIKZNG+c/3 BlM2wx0v5fpnfp0OGTPWKVdyaYQ91QyGobUDpEHlx/hWTZyuXnmRM2u0gyMt3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695739052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dj2/HMdM+Wvc1AUJ9kGhNkx9ArL7YJPum4kffdVOQhI=; b=sRRimrSjO+EwGtORuilJybga9CoALXk71hKIBUKAWfifoeWbu17GSPx1GSjU2+NX1E4CKi JFhudgfwWN6Ae+CayBvZBXMhzBMPZSmpxKEW9hugzwVrozUy6VCJu6M2M9y5y9kRFpsgzx YIea+VpBhKgQ7KYSITF+RrSTKY5/HaMM1x77wjsm2xru94Cot3S1UnQ8Fg3qhQwrT3Idbv 3C1Pf0ZHu/axsokAHnWVhJ0MFxOm3nUhE2uyZsj/ZGSnSBG+O4q9qa7k1G7m/Wt/IJgoFF iScz/a/GTJ0mif1ocCOYjBiwFjMj3QkAk3UX+Rs14Njnv7v7tduWDRtr0GC5cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw2QN4Xqnz10vj; Tue, 26 Sep 2023 14:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QEbWG1002062; Tue, 26 Sep 2023 14:37:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QEbWmw002059; Tue, 26 Sep 2023 14:37:32 GMT (envelope-from git) Date: Tue, 26 Sep 2023 14:37:32 GMT Message-Id: <202309261437.38QEbWmw002059@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: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: e6dc6a27230f836a131118326731b7c5fd417723 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e6dc6a27230f836a131118326731b7c5fd417723 commit e6dc6a27230f836a131118326731b7c5fd417723 Author: Mateusz Guzik AuthorDate: 2023-09-26 14:36:51 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-26 14:36:51 +0000 sys/conf/newvers.sh: whack sccs tag In the same spirit as removing cvs $FreeBSD$ tags. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/conf/newvers.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 73fd6857d307..18b1817ca287 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,11 +311,9 @@ fi vers_content_new=$(cat << EOF $COPYRIGHT -#define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}" -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] = VERSTR; char compiler_version[] = "${compiler_v}"; char ostype[] = "${TYPE}"; From nobody Tue Sep 26 14:51:45 2023 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 4Rw2l50kjZz4vG81 for ; Tue, 26 Sep 2023 14:52:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw2l45wJFz4QjR for ; Tue, 26 Sep 2023 14:52:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-31f71b25a99so8889124f8f.2 for ; Tue, 26 Sep 2023 07:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1695739917; x=1696344717; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wt7O+tzlCZ0EYMnnDMNW2TdkHWuI4aLkIDqOZfvb8eg=; b=fVMQLyAfanzDsPmcyiZRXcLL6+s7rUiX2jRJhehlfWwGDEaHBrEbDg8Kr86sgQ4nUW LvKBG8JqmQ3vPh6neAnREOzQWrqT7x1WGy7Ht+RuvLXmrKE7uOJvKrvrvPfiqhdEfbnP GsFSLssJ6+o6+7xmhBKeTcN1Xi/EG2HowQIyMOZ8DUH3+lFwcOk6wxerGFJqBiazhbdc mNbnh1u6nkrOznb7cirbP1aGeWqhYD2Ku0o9J9dIXOp1fUbQxUO347tKc04+6fImGYj5 MRQjimNoGaO1f6IFQLNifkKTH0mOeUZKxgr8WFCIa+h8bcxvzlVF7UFiwarHWs4LaLgZ V8nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695739917; x=1696344717; 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=wt7O+tzlCZ0EYMnnDMNW2TdkHWuI4aLkIDqOZfvb8eg=; b=OPtxztI6nWh5SoJShQyUrIoYVX4t4QNac979qUHSHMP2tBMPol0oY2V9mT1AwoTJYb zOiBbtuRgEWzO+npFivgIpqQjpABS+DSjCfqfqtvRHeUNxlBDjFoZ/K8TvDnUwSOhUKS pfANnn9jOz+yVsHkS1SySqEpJtzgQEM0TR93QEA1UCAjA7PtSdE/895hHoAXC1Giuv9+ 0Dvshf3oOeRj/pQ7tfU+ShnsnwaaRxtpfv/OFdzlLg4XqmQYSZ1hFPM3ehQTxad6t1o6 o38sfRS6DbfOihkNGELAFuHHRCF8uZ7tgzHFTm03tUzJg2ddA2EYNaNjyGpux779e4YQ bbQQ== X-Gm-Message-State: AOJu0YwPsAIZ6fcqBK7yyuKDPK+dqo5Fg4LDJ5z1haNN83enOUG3D8sC ICH3DEnWJkSl0mMq6UQVnlRQfL/Ny06wqHoy65OVk7ryigXA+2GugyM= X-Google-Smtp-Source: AGHT+IF8dbwLCVA8uMx4TsxZ2pbTI5TVCYG5GI/1iQ8esm4Vtyq/eWHsJjlnaX+aH58poQsFNueqw6seRAQOPIs3FfU= X-Received: by 2002:adf:b199:0:b0:323:2b6a:59c5 with SMTP id q25-20020adfb199000000b003232b6a59c5mr4815053wra.67.1695739917110; Tue, 26 Sep 2023 07:51:57 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> In-Reply-To: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> From: Warner Losh Date: Tue, 26 Sep 2023 08:51:45 -0600 Message-ID: Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag To: Mateusz Guzik Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000642dfa06064437b9" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Rw2l45wJFz4QjR --000000000000642dfa06064437b9 Content-Type: text/plain; charset="UTF-8" Can you put this back? It is still useful. I have automated scripts that look for this pattern to find the version of a core dump. There are no other ways that are as reliable to find this data. Some other heuristics exist, but my experience with snagging data from maybe a thousand core dumps from $WORK's network found issues in all the alternatives. It's why I didn't whack it already. Even though the text says SCCS which is prehistory for this project, it's still in use today. Warner On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: > The branch main has been updated by mjg: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=e6dc6a27230f836a131118326731b7c5fd417723 > > commit e6dc6a27230f836a131118326731b7c5fd417723 > Author: Mateusz Guzik > AuthorDate: 2023-09-26 14:36:51 +0000 > Commit: Mateusz Guzik > CommitDate: 2023-09-26 14:36:51 +0000 > > sys/conf/newvers.sh: whack sccs tag > > In the same spirit as removing cvs $FreeBSD$ tags. > > Sponsored by: Rubicon Communications, LLC ("Netgate") > --- > sys/conf/newvers.sh | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh > index 73fd6857d307..18b1817ca287 100644 > --- a/sys/conf/newvers.sh > +++ b/sys/conf/newvers.sh > @@ -311,11 +311,9 @@ fi > > vers_content_new=$(cat << EOF > $COPYRIGHT > -#define SCCSSTR "@(#)${VERINFO}" > #define VERSTR "${VERSTR}" > #define RELSTR "${RELEASE}" > > -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; > char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] = VERSTR; > char compiler_version[] = "${compiler_v}"; > char ostype[] = "${TYPE}"; > --000000000000642dfa06064437b9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Can you put this back? It is still useful. I have automat= ed scripts that look for this pattern to find the version of a core dump. T= here are no other ways that are as reliable to find this data. Some other h= euristics exist, but my experience with snagging data from maybe a thousand= core dumps from $WORK's network found issues in all the alternatives. = It's why I didn't whack it already. Even though the text says SCCS = which is prehistory for this project, it's still in use today.

Warner

On Tue, Sep 26, 2023, 8:3= 7 AM Mateusz Guzik <mjg@freebsd.org> wrote:
The branch main has b= een updated by mjg:

URL:
ht= tps://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c5fd4= 17723

commit e6dc6a27230f836a131118326731b7c5fd417723
Author:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2023-09-26 14:36:51 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-09-26 14:36:51 +0000

=C2=A0 =C2=A0 sys/conf/newvers.sh: whack sccs tag

=C2=A0 =C2=A0 In the same spirit as removing cvs $FreeBSD$ tags.

=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0Rubicon Communications, LLC ("= Netgate")
---
=C2=A0sys/conf/newvers.sh | 2 --
=C2=A01 file changed, 2 deletions(-)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 73fd6857d307..18b1817ca287 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -311,11 +311,9 @@ fi

=C2=A0vers_content_new=3D$(cat << EOF
=C2=A0$COPYRIGHT
-#define SCCSSTR "@(#)${VERINFO}"
=C2=A0#define VERSTR "${VERSTR}"
=C2=A0#define RELSTR "${RELEASE}"

-char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D SCCSSTR; =C2=A0char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D VERS= TR;
=C2=A0char compiler_version[] =3D "${compiler_v}";
=C2=A0char ostype[] =3D "${TYPE}";
--000000000000642dfa06064437b9-- From nobody Tue Sep 26 17:00:06 2023 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 4Rw5Zt3lJjz4vNg5; Tue, 26 Sep 2023 17:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw5Zt3XJwz4cYy; Tue, 26 Sep 2023 17:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695747606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nx1agb05fvvVQFQh2tSojsFwlau4DkutZPGrP/ssZ1M=; b=F+OME+bvTy4zGoGfUbHCC5f7WzhAVED2i3Pc9hqiuJ6pj293cQgYBAP3aT9WWABxUFd5i8 pgt9X7e0Gjkm4lhV7S/dAh9d9Ut4GrU30iofVLqlI/gl6Un6+NDJR0GDe5Wlfmg3iDUrfS PB4X0w5b/9dtJBWrP1FoEokByc9QsijQls3rjSaNxozQXYFFLtCW2jyPxc8rvagfIbBR5k 3iYWRTSQ3htmO8QohzUy+yKVuDB8Po/543R1UPbfoTDTqRgOm38fJRv60ev0jcktNGe4wL dNDQxfPYhF9AWnuR2ebxKcTpzJXbxQfYNM/1H+cEkk4w2KsdRw3Kv6DSAFQhRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695747606; a=rsa-sha256; cv=none; b=JnIvtsKCE5OpAk1FFconZikHapAlMI3Gq7TdPlYiPF0F+fF95sJXpVC06Zbuy3GvwRXEG5 fGN6F+fI4B7uIax9w8XXALLWR4EZ5ZNksL/AOpbqijyv0ckOQ2tRlhNuyvk7Ou2EM9HaIc cpNx8WRF+CrMFEQB6lO6RxBD1LZDSU+privG9KvzRrE1xprR7mSAhWHDKE9J5knFveapdQ RcEFGvGYlRbDXVEylIVEzIlrUZE3wileLxAxrzTEQe9oI8Va5h2anXuJV3jI/mUiriAEbw iWJi+BLKDkeNe1/FHsNLpXxEcXzEqJgKbuoT8OE/UYnkuC6g2kiPcCul5iS0Bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695747606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nx1agb05fvvVQFQh2tSojsFwlau4DkutZPGrP/ssZ1M=; b=AseLPeH0N5kGKorgG5wbn/7G3ZnZd9A1R66SsAY32TkFo7F8wxYnn5CQwfYotMI/olAWs4 zNcLuuFg4gitdNpekx+cZOJr/IsMtxIeHMfwyNGdCj6DCMWuLsGiucGytmuRPRSEX/xqKE EdFzAEJnJtvGdXxJd5SJxBNfAk8fxko+8jdHRYE48W8ALNNBAKE7NFKrdI5xP75rmBca1U Sgn/jnV+k5/CWTMhL5LYEsa5Z6Zd03DO9WAVwJcDuw5A72ZxiZeVKMtZQ7OQrNETvH/qgt NxsiDiGG2YzAhWFEC99DwIbARo4xL8K2y991bSD8y9qzgv3FohdcmL56VJl2Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw5Zt2c56z149m; Tue, 26 Sep 2023 17:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QH06b5038376; Tue, 26 Sep 2023 17:00:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QH06di038371; Tue, 26 Sep 2023 17:00:06 GMT (envelope-from git) Date: Tue, 26 Sep 2023 17:00:06 GMT Message-Id: <202309261700.38QH06di038371@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: 29a55fd09b0a - main - dtc: Sync with upstream commit 26a0fe5 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 29a55fd09b0a3cc4c888f7a630fde41694699343 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=29a55fd09b0a3cc4c888f7a630fde41694699343 commit 29a55fd09b0a3cc4c888f7a630fde41694699343 Author: Jose Luis Duran AuthorDate: 2023-09-26 16:37:52 +0000 Commit: Ed Maste CommitDate: 2023-09-26 16:59:17 +0000 dtc: Sync with upstream commit 26a0fe5 - 0206c0f ("Handle top-level /delete-node/ directives.") - d612a9e ("Remove C++11 standard constrain") - Remove extra white lines after the $FreeBSD$ tag removal Reviewed by: kevans (earlier), theraven, emaste Differential Revision: https://reviews.freebsd.org/D41482 --- usr.bin/dtc/HACKING | 1 - usr.bin/dtc/Makefile | 3 -- usr.bin/dtc/fdt.cc | 134 ++++++++++++++++++++++++++++++++++++++++----------- usr.bin/dtc/fdt.hh | 24 ++++++--- 4 files changed, 121 insertions(+), 41 deletions(-) diff --git a/usr.bin/dtc/HACKING b/usr.bin/dtc/HACKING index 9447c4f6ebf9..ef858c8885c0 100644 --- a/usr.bin/dtc/HACKING +++ b/usr.bin/dtc/HACKING @@ -1,4 +1,3 @@ - Notes for people hacking on dtc =============================== diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile index d242ed80e8b1..d7661ae164c3 100644 --- a/usr.bin/dtc/Makefile +++ b/usr.bin/dtc/Makefile @@ -1,4 +1,3 @@ - PROG_CXX=dtc SRCS= dtc.cc input_buffer.cc string.cc dtb.cc fdt.cc checking.cc MAN= dtc.1 @@ -7,8 +6,6 @@ WARNS?= 3 CXXFLAGS+= -fno-rtti -fno-exceptions -CXXSTD= c++11 - NO_SHARED?=NO .include diff --git a/usr.bin/dtc/fdt.cc b/usr.bin/dtc/fdt.cc index 5ab9ba10d2f0..f0b98cfe720c 100644 --- a/usr.bin/dtc/fdt.cc +++ b/usr.bin/dtc/fdt.cc @@ -861,7 +861,15 @@ node::node(const string &n, node_ptr node::create_special_node(const string &name, const std::vector &props) { - node_ptr n(new node(name, props)); + // Work around for the fact that we can't call make_shared on something + // with a private constructor. Instead create a subclass with a public + // constructor that is visible only in this function and construct that + // instead. + struct constructable_node : public node + { + constructable_node(const string &n, const std::vector &p) : node(n, p) {} + }; + node_ptr n{std::make_shared(name, props)}; return n; } @@ -1035,12 +1043,31 @@ node::parse(text_input_buffer &input, string &&address, define_map *defines) { - node_ptr n(new node(input, - tree, - std::move(name), - std::move(label), - std::move(address), - defines)); + // Work around for the fact that we can't call make_shared on something + // with a private constructor. Instead create a subclass with a public + // constructor that is visible only in this function and construct that + // instead. + struct constructable_node : public node + { + constructable_node(text_input_buffer &input, + device_tree &tree, + std::string &&n, + std::unordered_set &&l, + std::string &&a, + define_map*m) : node(input, + tree, + std::move(n), + std::move(l), + std::move(a), + m) + {} + }; + node_ptr n{std::make_shared(input, + tree, + std::move(name), + std::move(label), + std::move(address), + defines)}; if (!n->valid) { n = 0; @@ -1208,7 +1235,7 @@ node::write_dts(FILE *file, int indent) } void -device_tree::collect_names_recursive(node_ptr &n, node_path &path) +device_tree::collect_names_recursive(node_ptr parent, node_ptr n, node_path &path) { path.push_back(std::make_pair(n->name, n->unit_address)); for (const string &name : n->labels) @@ -1218,9 +1245,13 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) auto iter = node_names.find(name); if (iter == node_names.end()) { - node_names.insert(std::make_pair(name, n.get())); + node_names.insert(std::make_pair(name, n)); node_paths.insert(std::make_pair(name, path)); ordered_node_paths.push_back({name, path}); + if (parent) + { + node_name_parents.insert({name, parent}); + } } else { @@ -1236,7 +1267,7 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) } for (auto &c : n->child_nodes()) { - collect_names_recursive(c, path); + collect_names_recursive(n, c, path); } // Now we collect the phandles and properties that reference // other nodes. @@ -1264,7 +1295,7 @@ device_tree::collect_names_recursive(node_ptr &n, node_path &path) else { uint32_t phandle = p->begin()->get_as_uint32(); - used_phandles.insert(std::make_pair(phandle, n.get())); + used_phandles.insert(std::make_pair(phandle, n)); } } } @@ -1280,11 +1311,11 @@ device_tree::collect_names() ordered_node_paths.clear(); cross_references.clear(); fixups.clear(); - collect_names_recursive(root, p); + collect_names_recursive(nullptr, root, p); } property_ptr -device_tree::assign_phandle(node *n, uint32_t &phandle) +device_tree::assign_phandle(node_ptr n, uint32_t &phandle) { // If there is an existing phandle, use it property_ptr p = n->get_property("phandle"); @@ -1329,11 +1360,11 @@ device_tree::assign_phandle(node *n, uint32_t &phandle) } void -device_tree::assign_phandles(node_ptr &n, uint32_t &next) +device_tree::assign_phandles(node_ptr n, uint32_t &next) { if (!n->labels.empty()) { - assign_phandle(n.get(), next); + assign_phandle(n, next); } for (auto &c : n->child_nodes()) @@ -1391,14 +1422,14 @@ device_tree::resolve_cross_references(uint32_t &phandle) for (auto &i : sorted_phandles) { string target_name = i.get().val.string_data; - node *target = nullptr; + node_ptr target; string possible; // If the node name is a path, then look it up by following the path, // otherwise jump directly to the named node. if (target_name[0] == '/') { string path; - target = root.get(); + target = root; std::istringstream ss(target_name); string path_element; // Read the leading / @@ -1412,14 +1443,14 @@ device_tree::resolve_cross_references(uint32_t &phandle) string node_name, node_address; std::getline(nss, node_name, '@'); std::getline(nss, node_address, '@'); - node *next = nullptr; + node_ptr next; for (auto &c : target->child_nodes()) { if (c->name == node_name) { if (c->unit_address == node_address) { - next = c.get(); + next = c; break; } else @@ -1478,8 +1509,8 @@ device_tree::resolve_cross_references(uint32_t &phandle) bool device_tree::garbage_collect_marked_nodes() { - std::unordered_set previously_referenced_nodes; - std::unordered_set newly_referenced_nodes; + std::unordered_set previously_referenced_nodes; + std::unordered_set newly_referenced_nodes; auto mark_referenced_nodes_used = [&](node &n) { @@ -1489,7 +1520,7 @@ device_tree::garbage_collect_marked_nodes() { if (v.is_phandle()) { - node *nx = node_names[v.string_data]; + node_ptr nx = node_names[v.string_data]; if (nx == nullptr) { // Try it again, but as a path @@ -1534,8 +1565,9 @@ device_tree::garbage_collect_marked_nodes() while (!newly_referenced_nodes.empty()) { - previously_referenced_nodes = std::move(newly_referenced_nodes); - for (auto *n : previously_referenced_nodes) + previously_referenced_nodes = newly_referenced_nodes; + newly_referenced_nodes.clear(); + for (auto &n : previously_referenced_nodes) { mark_referenced_nodes_used(*n); } @@ -1617,7 +1649,38 @@ device_tree::parse_file(text_input_buffer &input, while (valid && !input.finished()) { node_ptr n; - if (input.consume('/')) + if (input.consume("/delete-node/")) + { + // Top-level /delete-node/ directives refer to references that must + // be deleted later. + input.next_token(); + auto expect = [&](auto token, const char *msg) + { + if (!input.consume(token)) + { + input.parse_error(msg); + valid = false; + } + input.next_token(); + return valid; + }; + if (expect('&', "Expected reference after top-level /delete-node/.")) + { + string ref = input.parse_node_name(); + if (ref == string()) + { + input.parse_error("Expected label name for top-level /delete-node/."); + valid = false; + } + else + { + deletions.push_back(std::move(ref)); + } + expect(';', "Missing semicolon."); + } + continue; + } + else if (input.consume('/')) { input.next_token(); n = node::parse(input, *this, string(), string_set(), string(), &defines); @@ -1732,7 +1795,7 @@ device_tree::write(int fd) strings_writer.write_to_file(fd); } -node* +node_ptr device_tree::referenced_node(property_value &v) { if (v.is_phandle()) @@ -2032,6 +2095,19 @@ device_tree::parse_dts(const string &fn, FILE *depfile) } } collect_names(); + for (auto &ref : deletions) + { + auto parent = node_name_parents[ref]; + auto node = node_names[ref]; + if (!parent) + { + fprintf(stderr, "Top-level /delete-node/ directive refers to label %s, which is not found.\n", ref.c_str()); + } + else + { + parent->delete_children_if([&](node_ptr &child) { return child == node; }); + } + } // Return value indicates whether we've dirtied the tree or not and need to // recollect names if (garbage_collect && garbage_collect_marked_nodes()) @@ -2127,7 +2203,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) { continue; } - node *n = local_fixups.get(); + node_ptr n = local_fixups; for (auto &p : i.path) { // Skip the implicit root @@ -2142,7 +2218,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) { if (c->unit_address == p.second) { - n = c.get(); + n = c; found = true; break; } @@ -2157,7 +2233,7 @@ device_tree::parse_dts(const string &fn, FILE *depfile) path += p.second; } n->add_child(node::create_special_node(path, symbols)); - n = (--n->child_end())->get(); + n = *(--(n->child_end())); } } assert(n); diff --git a/usr.bin/dtc/fdt.hh b/usr.bin/dtc/fdt.hh index 86c9ff153b80..fad9609d40bb 100644 --- a/usr.bin/dtc/fdt.hh +++ b/usr.bin/dtc/fdt.hh @@ -71,7 +71,7 @@ typedef std::shared_ptr property_ptr; /** * Owning pointer to a node. */ -typedef std::unique_ptr node_ptr; +typedef std::shared_ptr node_ptr; /** * Map from macros to property pointers. */ @@ -663,7 +663,7 @@ class node /** * Deletes any children from this node. */ - inline void delete_children_if(bool (*predicate)(node_ptr &)) + inline void delete_children_if(std::function predicate) { children.erase(std::remove_if(children.begin(), children.end(), predicate), children.end()); } @@ -761,7 +761,11 @@ class device_tree * Mapping from names to nodes. Only unambiguous names are recorded, * duplicate names are stored as (node*)-1. */ - std::unordered_map node_names; + std::unordered_map node_names; + /** + * Mapping from names to the nodes that contain them. + */ + std::unordered_map node_name_parents; /** * A map from labels to node paths. When resolving cross references, * we look up referenced nodes in this and replace the cross reference @@ -779,6 +783,10 @@ class device_tree * These should be expanded to the full path of their targets. */ std::vector cross_references; + /** + * Labels collected from top-level /delete-node/ directives. + */ + std::vector deletions; /** * The location of something requiring a fixup entry. */ @@ -827,7 +835,7 @@ class device_tree * find phandles that were provided by the user explicitly when we are * doing checking. */ - std::unordered_map used_phandles; + std::unordered_map used_phandles; /** * Paths to search for include files. This contains a set of * nul-terminated strings, which are not owned by this class and so @@ -864,19 +872,19 @@ class device_tree * used in resolving cross references. Also collects phandle * properties that have been explicitly added. */ - void collect_names_recursive(node_ptr &n, node_path &path); + void collect_names_recursive(node_ptr parent, node_ptr n, node_path &path); /** * Assign a phandle property to a single node. The next parameter * holds the phandle to be assigned, and will be incremented upon * assignment. */ - property_ptr assign_phandle(node *n, uint32_t &next); + property_ptr assign_phandle(node_ptr n, uint32_t &next); /** * Assign phandle properties to all nodes that have been referenced and * require one. This method will recursively visit the tree starting at * the node that it is passed. */ - void assign_phandles(node_ptr &n, uint32_t &next); + void assign_phandles(node_ptr n, uint32_t &next); /** * Calls the recursive version of this method on every root node. */ @@ -925,7 +933,7 @@ class device_tree * is in source form, then we have a string that we can use to index * the cross_references array and so we can just look that up. */ - node *referenced_node(property_value &v); + node_ptr referenced_node(property_value &v); /** * Writes this FDT as a DTB to the specified output. */ From nobody Tue Sep 26 17:32:19 2023 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 4Rw6J93zqKz4vRGB; Tue, 26 Sep 2023 17:32:25 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6J93T9Tz3CSt; Tue, 26 Sep 2023 17:32:25 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695749545; 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=smxkvWDf2085u1m1VJ3uB0LN6Y1Xymi33lQTAInKgf8=; b=NRHlww3AxpDVZaUcxzcHCAv4phNSs3krqN3jXapmu8ripxv3hjExyH14nLM0D50j5frlpJ NelGw3sdJ63Ktz3rQ0Ih76mRNer8CqTb2q4S+OCqN9nsp3RcwAas9E+DEkIa01uBx2BrrZ Jm9h3R2ATeRXgcDnk2DpuwTmVEopXNoUGdZmtsGA3YxUTiQSiAXC5IgIJKSerOxMLfLP1w 9G8NfK3lVATnLrQj9LR3RARSu5z4gSbFubw/rMETKi8O62DWc24975SgArMCQ8960PXEj8 t77ByVImw03zIF1DjgDGTf42Jv4552wHSg4fc0xI6PGmjMozjDhfr/hkobvCGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695749545; a=rsa-sha256; cv=none; b=aM7SfKWEzYVWeICFe/y21Z+Io3S0L1OcKypAWcmVMGdlF2A8w8KLcd3TbwugXok9+k0E4G bYCYZEWL46TKNJQ4/hDUxvG/Vqqez/hHWL4tRXDXZAyZosNWAYGFlQq8Xl7kXYtyN19vh3 SMkNrwXlf+aCKO9x99U05H1gDiqajk+biS+ZraETWPblODlfXGO883281rxHriev0jIHV1 OmdBuHd23fN8ZIGzfTkyeoUuOSrhsTu7f5vBD5dlgRbBi2pVsbpdaZ/OGZKaweomUBjO8P 7M6i11GhDsJvUFWZgHJnLqaxLGybqPf84KdeDgeDY0g2xT52dTHpSHgTr8aspA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695749545; 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=smxkvWDf2085u1m1VJ3uB0LN6Y1Xymi33lQTAInKgf8=; b=tYw5bKLs+7W02OQbubeRfcoqGgBf/DToDFwcJpnG6tyQKrWyMK0GXi15ObQXWWC6TXqyTn BAAvszYyuMlOtjj1jSm7h0EoASbMKTxmmGHK0UodzwS60e9z5DSidSX9SLi+21hB2S5z78 ZZi9mbj7o8RBBW3nj2Z/hoqSrse7BQ+eKtJ0EPHFpZ1sIYpagZrUu/XcBMmewIYSiNcoN1 Hike2vIYDc3PJMIJvr+rU+UJrMMP56HHjdmam2tn6ZZkhYuSbXfGNAiLkChBQbbtvb7iub 5ZZTf4J1JQ6bqOiX492CdAmgia+LCvPZU16LpCIvH96y8dNfMvTe4IFTpm4SGQ== Received: from [192.168.1.12] (c-98-248-120-44.hsd1.ca.comcast.net [98.248.120.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Rw6J85SG4zn8l; Tue, 26 Sep 2023 17:32:24 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.77.23091703 Date: Tue, 26 Sep 2023 10:32:19 -0700 Subject: Re: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag From: Ravi Pokala To: Warner Losh , Mateusz Guzik CC: src-committers , "" , "" Message-ID: <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> Thread-Topic: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> In-Reply-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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-version: 1.0 Content-type: multipart/alternative; boundary="B_3778569145_1222604024" > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3778569145_1222604024 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable In that case, an updated comment seems appropriate, so it=E2=80=99s not removed a= gain. =20 -Ravi (rpokala@) =20 =20 From: on behalf of Warner Losh Date: Tuesday, September 26, 2023 at 07:51 To: Mateusz Guzik Cc: src-committers , "" , "" Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag =20 Can you put this back? It is still useful. I have automated scripts that lo= ok for this pattern to find the version of a core dump. There are no other w= ays that are as reliable to find this data. Some other heuristics exist, but= my experience with snagging data from maybe a thousand core dumps from $WOR= K's network found issues in all the alternatives. It's why I didn't whack it= already. Even though the text says SCCS which is prehistory for this projec= t, it's still in use today. =20 Warner =20 On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7= c5fd417723 commit e6dc6a27230f836a131118326731b7c5fd417723 Author: Mateusz Guzik AuthorDate: 2023-09-26 14:36:51 +0000 Commit: Mateusz Guzik CommitDate: 2023-09-26 14:36:51 +0000 sys/conf/newvers.sh: whack sccs tag In the same spirit as removing cvs $FreeBSD$ tags. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/conf/newvers.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 73fd6857d307..18b1817ca287 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,11 +311,9 @@ fi vers_content_new=3D$(cat << EOF $COPYRIGHT -#define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}" -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D SCCSSTR; char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D VERSTR; char compiler_version[] =3D "${compiler_v}"; char ostype[] =3D "${TYPE}"; --B_3778569145_1222604024 Content-type: text/html; charset="UTF-8" Content-transfer-encoding: quoted-printable

In that case, an updated comment seems appropri= ate, so it=E2=80=99s not removed again.

 

=

-Ravi (= rpokala@)

 

 

From: <owner-src-committers@freebsd.org> on behalf of Warner Losh <imp@b= sdimp.com>
Date: Tuesday, September 26, 2023 at 07:51
To:= Mateusz Guzik <mjg@freebsd.org>
Cc: src-committers <= src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>= ;" <dev-commits-src-all@freebsd.org>, "<dev-commits-src-m= ain@freebsd.org>" <dev-commits-src-main@freebsd.org>
Sub= ject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag=

 

Can you put this back? It is still useful. I have automated scripts that lo= ok for this pattern to find the version of a core dump. There are no other w= ays that are as reliable to find this data. Some other heuristics exist, but= my experience with snagging data from maybe a thousand core dumps from $WOR= K's network found issues in all the alternatives. It's why I didn't whack it= already. Even though the text says SCCS which is prehistory for this projec= t, it's still in use today.

 

Warner

 

On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik <mjg@freebsd.org> wrote:

The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a= 131118326731b7c5fd417723

commit e6dc6a27230f836a131118326731b7c5f= d417723
Author:     Mateusz Guzik <mjg@FreeBSD.org><= br>AuthorDate: 2023-09-26 14:36:51 +0000
Commit:     Mateu= sz Guzik <mjg@FreeBSD.org>
CommitDate: 2023-09-26 14:36:51 +0000
    sys/conf/newvers.sh: whack sccs tag

    = In the same spirit as removing cvs $FreeBSD$ tags.

    Spon= sored by:   Rubicon Communications, LLC ("Netgate")
-= --
 sys/conf/newvers.sh | 2 --
 1 file changed, 2 deletions(= -)

diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 73= fd6857d307..18b1817ca287 100644
--- a/sys/conf/newvers.sh
+++ b/sys/co= nf/newvers.sh
@@ -311,11 +311,9 @@ fi

 vers_content_new=3D$(cat= << EOF
 $COPYRIGHT
-#define SCCSSTR "@(#)${VERINFO}&q= uot;
 #define VERSTR "${VERSTR}"
 #define RELSTR &= quot;${RELEASE}"

-char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SC= CSSTR) : 128] =3D SCCSSTR;
 char version[sizeof(VERSTR) > 256 ? siz= eof(VERSTR) : 256] =3D VERSTR;
 char compiler_version[] =3D "${comp= iler_v}";
 char ostype[] =3D "${TYPE}";

<= /blockquote>
--B_3778569145_1222604024-- From nobody Tue Sep 26 17:34:06 2023 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 4Rw6LM5wgzz4vRGY for ; Tue, 26 Sep 2023 17:34:19 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6LM4KjHz3D3c for ; Tue, 26 Sep 2023 17:34:19 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-405361bb949so100859735e9.1 for ; Tue, 26 Sep 2023 10:34:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695749658; x=1696354458; 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=p3MMkurwZUPsT35iXJhOJ5ZCgMsiUjZZRKSH44tfcVc=; b=VeDmH3mjf/L2TYg85lvb4rJ5lHBCg2oleNqFmDEFKaqKdJ7MrZldNsZlN588IdQbQ/ q6WLFgpjEP6PxuMV0I4ffaotNmsefWd0TgCbxpyaRzQOrf0d9Bn1jcGdwN5IA4WJuh4E /uwUG62RNPDy+q1xkJnB9Mk24fiQKinbkqA17Ar8mrpJCfhVYQdKXXylUdozWOn0KI01 nE+yaX1wMxloPy2o3eXic398Ys3EXRNE98neVxf2d66r9kFagk74lgCGOXY2a6rQ7pYB vaJ8dm/7+A0x9hohSQnjXwHYoYg6BPIo6yXP1+2cLpKw0CLRtzOWtWZHYRmAD6OBh8nw i70Q== X-Gm-Message-State: AOJu0YxgXB18R26MLio3RhtB/VmIYlZMcWU8vPNr3OPxUDINgnmx+qGK Sn6UxwAsLyA1osn4Zm2Is1AsDQ== X-Google-Smtp-Source: AGHT+IHxiq6OjWA+BTKe/d2h/y8ZLw6B1FCy+wm+IEoEGWR6whfjDy75HtdKz0XEeT+ySdF/Cr+qaw== X-Received: by 2002:a05:600c:2294:b0:401:c338:ab96 with SMTP id 20-20020a05600c229400b00401c338ab96mr9088151wmf.34.1695749657394; Tue, 26 Sep 2023 10:34:17 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id k12-20020a7bc40c000000b003fc04d13242sm18726390wmi.0.2023.09.26.10.34.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2023 10:34:17 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag From: Jessica Clarke In-Reply-To: <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> Date: Tue, 26 Sep 2023 18:34:06 +0100 Cc: Warner Losh , Mateusz Guzik , src-committers , "" , "" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> To: Ravi Pokala X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Rw6LM4KjHz3D3c On 26 Sep 2023, at 18:32, Ravi Pokala wrote: >=20 > In that case, an updated comment seems appropriate, so it=E2=80=99s = not removed again. https://reviews.freebsd.org/D41984 > -Ravi (rpokala@) >=20 > From: on behalf of Warner Losh = > Date: Tuesday, September 26, 2023 at 07:51 > To: Mateusz Guzik > Cc: src-committers , = "" , = "" > Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack = sccs tag >=20 > Can you put this back? It is still useful. I have automated scripts = that look for this pattern to find the version of a core dump. There are = no other ways that are as reliable to find this data. Some other = heuristics exist, but my experience with snagging data from maybe a = thousand core dumps from $WORK's network found issues in all the = alternatives. It's why I didn't whack it already. Even though the text = says SCCS which is prehistory for this project, it's still in use today. > Warner >=20 > On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: >>=20 >>=20 >> The branch main has been updated by mjg: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c5= fd417723 >>=20 >> commit e6dc6a27230f836a131118326731b7c5fd417723 >> Author: Mateusz Guzik >> AuthorDate: 2023-09-26 14:36:51 +0000 >> Commit: Mateusz Guzik >> CommitDate: 2023-09-26 14:36:51 +0000 >>=20 >> sys/conf/newvers.sh: whack sccs tag >>=20 >> In the same spirit as removing cvs $FreeBSD$ tags. >>=20 >> Sponsored by: Rubicon Communications, LLC ("Netgate") >> --- >> sys/conf/newvers.sh | 2 -- >> 1 file changed, 2 deletions(-) >>=20 >> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh >> index 73fd6857d307..18b1817ca287 100644 >> --- a/sys/conf/newvers.sh >> +++ b/sys/conf/newvers.sh >> @@ -311,11 +311,9 @@ fi >>=20 >> vers_content_new=3D$(cat << EOF >> $COPYRIGHT >> -#define SCCSSTR "@(#)${VERINFO}" >> #define VERSTR "${VERSTR}" >> #define RELSTR "${RELEASE}" >>=20 >> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D = SCCSSTR; >> char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D = VERSTR; >> char compiler_version[] =3D "${compiler_v}"; >> char ostype[] =3D "${TYPE}"; From nobody Tue Sep 26 17:41:55 2023 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 4Rw6W71Zn5z4vRtK; Tue, 26 Sep 2023 17:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6W71R3Cz3Ddc; Tue, 26 Sep 2023 17:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695750115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qlN0WtXWgZMOaio8pujkyfIhmuH3GUTI0ku6GrjrpgA=; b=BrSS3jzVH6XJsvNnFgSd0W3JqlNnDbM8x0mjGnVs6Of9ul1Y2ApyTcmDu4kZnt5/6USgeu pQjw8Q/JutBQXIRHBa9toerKp8zK5OSsIHZkGxZdrMuYBvS+6LIKguts7wSnNKMd1tFGtS 3hj7KhiM6sG4pXRi0qTA+XmYrI47BT89lA5Q+rnvSN+qDgtOaByRbUfbSdRBx4rZ5UsKcx eqEF8Jwk7oF89TZIPHrL6qduHQKXL8GVZ+v0NAlL8OgGtVxx9v2y7QfBWzabaGHqk5u9IN 5epK4q6JGBYHN8124p4Es5qFQtgmAOZZFpTVnoddzhS1iZUWyeeH8rSJgbY/+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695750115; a=rsa-sha256; cv=none; b=ewj5Q+p9tmXkYetbGrRtaJ/3iZuWNGau+7J5E9otJJYLpM3aVHOOQOuZ0F5Gca6QPs3kB4 kuGmr4GpNmNyhWFGjxWR3487lp38P8WAtSoJLEgaihmpR/vsuB+00yo9HqLm8hYdaLsZJZ bMmgEX6XKNqOeVi7QXaXnkAnIXGHKQ/bWbLe1uIX+3tJDrIdbGtrzD5xTRlXW3swO8aS61 Ew208le4itUvdotrN93QW1MhcMaB770svJrR/RKHorjFnIIz9HqmHTv2iFXFjUgeoSHrG9 6uFHNxts1dGpw/ReF2KdgCck77FmGADzmqtqKJumi0Zbs5b3DyfSwufZDmp6qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695750115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qlN0WtXWgZMOaio8pujkyfIhmuH3GUTI0ku6GrjrpgA=; b=mJDyvjA5qoiFlmMa+obDqPZLoRIWoDSSL7KtLW+TM/Sj1aJSRc/7GWqkKZgDQ/eqSjo/8T ZJx0azvNBE4UShEywNObyaiWi9kpgWrjOdd2ca7b8Q1m6Va9Vwgyw16cqBnYPbLhjKjbHj UaebM0tboestSLkVEgHZNj1+GaZvd+Fl/Bh2Kdp9/P5yDdtnylnWfBN9uaJWM2Dd/p/bn0 x21bAMYtp5Asi2a2x3tL/ZHxxijfULef/kUH+SkEo4v/ruLwcL5fBPqB6Ma5OnhEEn+KKL nIwnVrk58TUOgFUZ6kwvCCa49AjR6SflUI0uxbFZhYsNDB05NLsOjzxZxRdppA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw6W70XNlz15R9; Tue, 26 Sep 2023 17:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QHftYu016416; Tue, 26 Sep 2023 17:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QHftMX016413; Tue, 26 Sep 2023 17:41:55 GMT (envelope-from git) Date: Tue, 26 Sep 2023 17:41:55 GMT Message-Id: <202309261741.38QHftMX016413@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 902ed64fecbe - main - i386 pmap: Adapt recent amd64/arm64 superpage improvements 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 902ed64fecbe078e1cdd527b97af3958b413da11 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=902ed64fecbe078e1cdd527b97af3958b413da11 commit 902ed64fecbe078e1cdd527b97af3958b413da11 Author: Alan Cox AuthorDate: 2023-09-24 18:21:36 +0000 Commit: Alan Cox CommitDate: 2023-09-26 17:41:20 +0000 i386 pmap: Adapt recent amd64/arm64 superpage improvements Don't recompute mpte during promotion. Optimize MADV_WILLNEED on existing superpages. Standardize promotion conditions across amd64, arm64, and i386. Stop requiring the accessed bit for superpage promotion. Tidy up pmap_promote_pde() calls. Retire PMAP_INLINE. It's no longer used. Note: Some of these changes are a prerequisite to fixing a panic that arises when attempting to create a wired superpage mapping by pmap_enter(psind=1) (as opposed to promotion). Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41944 --- sys/i386/i386/pmap.c | 200 ++++++++++++++++++++++++++++++++---------------- sys/i386/include/pmap.h | 2 +- 2 files changed, 137 insertions(+), 65 deletions(-) diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 4198849b1a5a..2d19fc51dd53 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -159,16 +159,6 @@ #endif #include -#if !defined(DIAGNOSTIC) -#ifdef __GNUC_GNU_INLINE__ -#define PMAP_INLINE __attribute__((__gnu_inline__)) inline -#else -#define PMAP_INLINE extern inline -#endif -#else -#define PMAP_INLINE -#endif - #ifdef PV_STATS #define PV_STAT(x) do { x ; } while (0) #else @@ -311,13 +301,14 @@ static int pmap_pvh_wired_mappings(struct md_page *pvh, int count); static void pmap_abort_ptp(pmap_t pmap, vm_offset_t va, vm_page_t mpte); static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); -static bool pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, +static int pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot); static int pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, vm_page_t m); static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); -static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted); +static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted, + bool allpte_PG_A_set); static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); @@ -327,7 +318,8 @@ static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static void pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); #if VM_NRESERVLEVEL > 0 -static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); +static bool pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, + vm_page_t mpte); #endif static boolean_t pmap_protect_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t sva, vm_prot_t prot); @@ -993,7 +985,7 @@ __CONCAT(PMTYPE, init)(void) */ if (pseflag != 0 && KERNBASE <= i << PDRSHIFT && i << PDRSHIFT < KERNend && - pmap_insert_pt_page(kernel_pmap, mpte, true)) + pmap_insert_pt_page(kernel_pmap, mpte, true, true)) panic("pmap_init: pmap_insert_pt_page failed"); } PMAP_UNLOCK(kernel_pmap); @@ -1928,14 +1920,26 @@ pmap_add_delayed_free_list(vm_page_t m, struct spglist *free, * for mapping a distinct range of virtual addresses. The pmap's collection is * ordered by this virtual address range. * - * If "promoted" is false, then the page table page "mpte" must be zero filled. + * If "promoted" is false, then the page table page "mpte" must be zero filled; + * "mpte"'s valid field will be set to 0. + * + * If "promoted" is true and "allpte_PG_A_set" is false, then "mpte" must + * contain valid mappings with identical attributes except for PG_A; "mpte"'s + * valid field will be set to 1. + * + * If "promoted" and "allpte_PG_A_set" are both true, then "mpte" must contain + * valid mappings with identical attributes including PG_A; "mpte"'s valid + * field will be set to VM_PAGE_BITS_ALL. */ static __inline int -pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted) +pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte, bool promoted, + bool allpte_PG_A_set) { PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mpte->valid = promoted ? VM_PAGE_BITS_ALL : 0; + KASSERT(promoted || !allpte_PG_A_set, + ("a zero-filled PTP can't have PG_A set in every PTE")); + mpte->valid = promoted ? (allpte_PG_A_set ? VM_PAGE_BITS_ALL : 1) : 0; return (vm_radix_insert(&pmap->pm_root, mpte)); } @@ -2843,10 +2847,11 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) newpte ^= PG_PDE_PAT | PG_PTE_PAT; /* - * If the page table page is not leftover from an earlier promotion, - * initialize it. + * If the PTP is not leftover from an earlier promotion or it does not + * have PG_A set in every PTE, then fill it. The new PTEs will all + * have PG_A set. */ - if (vm_page_none_valid(mpte)) + if (!vm_page_all_valid(mpte)) pmap_fill_ptp(firstpte, newpte); KASSERT((*firstpte & PG_FRAME) == (newpte & PG_FRAME), @@ -2854,8 +2859,7 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) " addresses")); /* - * If the mapping has changed attributes, update the page table - * entries. + * If the mapping has changed attributes, update the PTEs. */ if ((*firstpte & PG_PTE_PROMOTE) != (newpte & PG_PTE_PROMOTE)) pmap_fill_ptp(firstpte, newpte); @@ -2985,7 +2989,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t *pdq, vm_offset_t sva, } else { mpte = pmap_remove_pt_page(pmap, sva); if (mpte != NULL) { - KASSERT(vm_page_all_valid(mpte), + KASSERT(vm_page_any_valid(mpte), ("pmap_remove_pde: pte page not promoted")); pmap->pm_stats.resident_count--; KASSERT(mpte->ref_count == NPTEPG, @@ -3469,38 +3473,56 @@ retry: * pmap_clear_ptes() and pmap_ts_referenced() only read the PDE from the kernel * pmap. */ -static void -pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) +static bool +pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, vm_page_t mpte) { pd_entry_t newpde; - pt_entry_t *firstpte, oldpte, pa, *pte; + pt_entry_t allpte_PG_A, *firstpte, oldpte, pa, *pte; #ifdef KTR vm_offset_t oldpteva; #endif - vm_page_t mpte; PMAP_LOCK_ASSERT(pmap, MA_OWNED); + if (!pg_ps_enabled) + return (false); /* * Examine the first PTE in the specified PTP. Abort if this PTE is - * either invalid, unused, or does not map the first 4KB physical page + * either invalid or does not map the first 4KB physical page * within a 2- or 4MB page. */ firstpte = pmap_pte_quick(pmap, trunc_4mpage(va)); setpde: newpde = *firstpte; - if ((newpde & ((PG_FRAME & PDRMASK) | PG_A | PG_V)) != (PG_A | PG_V)) { + if ((newpde & ((PG_FRAME & PDRMASK) | PG_V)) != PG_V) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x" " in pmap %p", va, pmap); - return; + return (false); } if ((*firstpte & PG_MANAGED) != 0 && pmap == kernel_pmap) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x" " in pmap %p", va, pmap); - return; + return (false); } + + /* + * Both here and in the below "for" loop, to allow for repromotion + * after MADV_FREE, conditionally write protect a clean PTE before + * possibly aborting the promotion due to other PTE attributes. Why? + * Suppose that MADV_FREE is applied to a part of a superpage, the + * address range [S, E). pmap_advise() will demote the superpage + * mapping, destroy the 4KB page mapping at the end of [S, E), and + * clear PG_M and PG_A in the PTEs for the rest of [S, E). Later, + * imagine that the memory in [S, E) is recycled, but the last 4KB + * page in [S, E) is not the last to be rewritten, or simply accessed. + * In other words, there is still a 4KB page in [S, E), call it P, + * that is writeable but PG_M and PG_A are clear in P's PTE. Unless + * we write protect P before aborting the promotion, if and when P is + * finally rewritten, there won't be a page fault to trigger + * repromotion. + */ if ((newpde & (PG_M | PG_RW)) == PG_RW) { /* * When PG_M is already clear, PG_RW can be cleared without @@ -3510,6 +3532,8 @@ setpde: ~PG_RW)) goto setpde; newpde &= ~PG_RW; + CTR2(KTR_PMAP, "pmap_promote_pde: protect for va %#lx" + " in pmap %p", va & ~PDRMASK, pmap); } /* @@ -3517,15 +3541,16 @@ setpde: * PTE maps an unexpected 4KB physical page or does not have identical * characteristics to the first PTE. */ - pa = (newpde & (PG_PS_FRAME | PG_A | PG_V)) + NBPDR - PAGE_SIZE; + allpte_PG_A = newpde & PG_A; + pa = (newpde & (PG_PS_FRAME | PG_V)) + NBPDR - PAGE_SIZE; for (pte = firstpte + NPTEPG - 1; pte > firstpte; pte--) { setpte: oldpte = *pte; - if ((oldpte & (PG_FRAME | PG_A | PG_V)) != pa) { + if ((oldpte & (PG_FRAME | PG_V)) != pa) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x" " in pmap %p", va, pmap); - return; + return (false); } if ((oldpte & (PG_M | PG_RW)) == PG_RW) { /* @@ -3547,28 +3572,39 @@ setpte: pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x" " in pmap %p", va, pmap); - return; + return (false); } + allpte_PG_A &= oldpte; pa -= PAGE_SIZE; } /* - * Save the page table page in its current state until the PDE - * mapping the superpage is demoted by pmap_demote_pde() or - * destroyed by pmap_remove_pde(). + * Unless all PTEs have PG_A set, clear it from the superpage mapping, + * so that promotions triggered by speculative mappings, such as + * pmap_enter_quick(), don't automatically mark the underlying pages + * as referenced. */ - mpte = PHYS_TO_VM_PAGE(*pde & PG_FRAME); + newpde &= ~PG_A | allpte_PG_A; + + /* + * Save the PTP in its current state until the PDE mapping the + * superpage is demoted by pmap_demote_pde() or destroyed by + * pmap_remove_pde(). If PG_A is not set in every PTE, then request + * that the PTP be refilled on demotion. + */ + if (mpte == NULL) + mpte = PHYS_TO_VM_PAGE(*pde & PG_FRAME); KASSERT(mpte >= vm_page_array && mpte < &vm_page_array[vm_page_array_size], ("pmap_promote_pde: page table page is out of range")); KASSERT(mpte->pindex == va >> PDRSHIFT, ("pmap_promote_pde: page table page's pindex is wrong")); - if (pmap_insert_pt_page(pmap, mpte, true)) { + if (pmap_insert_pt_page(pmap, mpte, true, allpte_PG_A != 0)) { pmap_pde_p_failures++; CTR2(KTR_PMAP, "pmap_promote_pde: failure for va %#x in pmap %p", va, pmap); - return; + return (false); } /* @@ -3596,6 +3632,7 @@ setpte: pmap_pde_promotions++; CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#x" " in pmap %p", va, pmap); + return (true); } #endif /* VM_NRESERVLEVEL > 0 */ @@ -3859,9 +3896,9 @@ unchanged: * populated, then attempt promotion. */ if ((mpte == NULL || mpte->ref_count == NPTEPG) && - pg_ps_enabled && (m->flags & PG_FICTITIOUS) == 0 && + (m->flags & PG_FICTITIOUS) == 0 && vm_reserv_level_iffullpop(m) == 0) - pmap_promote_pde(pmap, pde, va); + (void)pmap_promote_pde(pmap, pde, va, mpte); #endif rv = KERN_SUCCESS; @@ -3874,11 +3911,11 @@ out: /* * Tries to create a read- and/or execute-only 2 or 4 MB page mapping. Returns - * true if successful. Returns false if (1) a mapping already exists at the - * specified virtual address or (2) a PV entry cannot be allocated without - * reclaiming another PV entry. + * KERN_SUCCESS if the mapping was created. Otherwise, returns an error + * value. See pmap_enter_pde() for the possible error values when "no sleep", + * "no replace", and "no reclaim" are specified. */ -static bool +static int pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) { pd_entry_t newpde; @@ -3895,8 +3932,7 @@ pmap_enter_4mpage(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot) if (pmap != kernel_pmap) newpde |= PG_U; return (pmap_enter_pde(pmap, va, newpde, PMAP_ENTER_NOSLEEP | - PMAP_ENTER_NOREPLACE | PMAP_ENTER_NORECLAIM, NULL) == - KERN_SUCCESS); + PMAP_ENTER_NOREPLACE | PMAP_ENTER_NORECLAIM, NULL)); } /* @@ -3919,11 +3955,14 @@ pmap_every_pte_zero(vm_offset_t va) /* * Tries to create the specified 2 or 4 MB page mapping. Returns KERN_SUCCESS - * if the mapping was created, and either KERN_FAILURE or - * KERN_RESOURCE_SHORTAGE otherwise. Returns KERN_FAILURE if - * PMAP_ENTER_NOREPLACE was specified and a mapping already exists at the - * specified virtual address. Returns KERN_RESOURCE_SHORTAGE if - * PMAP_ENTER_NORECLAIM was specified and a PV entry allocation failed. + * if the mapping was created, and one of KERN_FAILURE, KERN_NO_SPACE, + * or KERN_RESOURCE_SHORTAGE otherwise. Returns KERN_FAILURE if + * PMAP_ENTER_NOREPLACE was specified and a 4 KB page mapping already exists + * within the 2 or 4 MB virtual address range starting at the specified virtual + * address. Returns KERN_NO_SPACE if PMAP_ENTER_NOREPLACE was specified and a + * 2 or 4 MB page mapping already exists at the specified virtual address. + * Returns KERN_RESOURCE_SHORTAGE if PMAP_ENTER_NORECLAIM was specified and a + * PV entry allocation failed. * * The parameter "m" is only used when creating a managed, writeable mapping. */ @@ -3944,12 +3983,19 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, pde = pmap_pde(pmap, va); oldpde = *pde; if ((oldpde & PG_V) != 0) { - if ((flags & PMAP_ENTER_NOREPLACE) != 0 && (pmap != - kernel_pmap || (oldpde & PG_PS) != 0 || - !pmap_every_pte_zero(va))) { - CTR2(KTR_PMAP, "pmap_enter_pde: failure for va %#lx" - " in pmap %p", va, pmap); - return (KERN_FAILURE); + if ((flags & PMAP_ENTER_NOREPLACE) != 0) { + if ((oldpde & PG_PS) != 0) { + CTR2(KTR_PMAP, + "pmap_enter_pde: no space for va %#lx" + " in pmap %p", va, pmap); + return (KERN_NO_SPACE); + } else if (pmap != kernel_pmap || + !pmap_every_pte_zero(va)) { + CTR2(KTR_PMAP, + "pmap_enter_pde: failure for va %#lx" + " in pmap %p", va, pmap); + return (KERN_FAILURE); + } } /* Break the existing mapping(s). */ SLIST_INIT(&free); @@ -3978,7 +4024,7 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t va, pd_entry_t newpde, u_int flags, * leave the kernel page table page zero filled. */ mt = PHYS_TO_VM_PAGE(*pde & PG_FRAME); - if (pmap_insert_pt_page(pmap, mt, false)) + if (pmap_insert_pt_page(pmap, mt, false, false)) panic("pmap_enter_pde: trie insert failed"); } } @@ -4035,6 +4081,7 @@ __CONCAT(PMTYPE, enter_object)(pmap_t pmap, vm_offset_t start, vm_offset_t end, vm_offset_t va; vm_page_t m, mpte; vm_pindex_t diff, psize; + int rv; VM_OBJECT_ASSERT_LOCKED(m_start->object); @@ -4047,7 +4094,8 @@ __CONCAT(PMTYPE, enter_object)(pmap_t pmap, vm_offset_t start, vm_offset_t end, va = start + ptoa(diff); if ((va & PDRMASK) == 0 && va + NBPDR <= end && m->psind == 1 && pg_ps_enabled && - pmap_enter_4mpage(pmap, va, m, prot)) + ((rv = pmap_enter_4mpage(pmap, va, m, prot)) == + KERN_SUCCESS || rv == KERN_NO_SPACE)) m = &m[NBPDR / PAGE_SIZE - 1]; else mpte = pmap_enter_quick_locked(pmap, va, m, prot, @@ -4084,12 +4132,14 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte) { pt_entry_t newpte, *pte; + pd_entry_t *pde; KASSERT(pmap != kernel_pmap || !VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); + pde = NULL; /* * In the case that a page table page is not @@ -4109,7 +4159,8 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, /* * Get the page directory entry */ - ptepa = pmap->pm_pdir[ptepindex]; + pde = &pmap->pm_pdir[ptepindex]; + ptepa = *pde; /* * If the page table page is mapped, we just increment @@ -4167,6 +4218,27 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, if (pmap != kernel_pmap) newpte |= PG_U; pte_store_zero(pte, newpte); + +#if VM_NRESERVLEVEL > 0 + /* + * If both the PTP and the reservation are fully populated, then + * attempt promotion. + */ + if ((mpte == NULL || mpte->ref_count == NPTEPG) && + (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 0) { + if (pde == NULL) + pde = pmap_pde(pmap, va); + + /* + * If promotion succeeds, then the next call to this function + * should not be given the unmapped PTP as a hint. + */ + if (pmap_promote_pde(pmap, pde, va, mpte)) + mpte = NULL; + } +#endif + sched_unpin(); return (mpte); } @@ -4836,7 +4908,7 @@ __CONCAT(PMTYPE, remove_pages)(pmap_t pmap) } mpte = pmap_remove_pt_page(pmap, pv->pv_va); if (mpte != NULL) { - KASSERT(vm_page_all_valid(mpte), + KASSERT(vm_page_any_valid(mpte), ("pmap_remove_pages: pte page not promoted")); pmap->pm_stats.resident_count--; KASSERT(mpte->ref_count == NPTEPG, diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index daa1012da96d..48125b775619 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -83,7 +83,7 @@ * 4KB (PTE) page mappings have identical settings for the following fields: */ #define PG_PTE_PROMOTE (PG_MANAGED | PG_W | PG_G | PG_PTE_PAT | \ - PG_M | PG_A | PG_NC_PCD | PG_NC_PWT | PG_U | PG_RW | PG_V) + PG_M | PG_NC_PCD | PG_NC_PWT | PG_U | PG_RW | PG_V) /* * Page Protection Exception bits From nobody Tue Sep 26 17:55:40 2023 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 4Rw6qc3FD6z4vSbX; Tue, 26 Sep 2023 17:56:12 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6qc0ZThz3FtW; Tue, 26 Sep 2023 17:56:12 +0000 (UTC) (envelope-from sjg@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108156.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38QG8KaR013283; Tue, 26 Sep 2023 10:56:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=to : cc : subject : in-reply-to : references : from : mime-version : content-type : content-id : date : message-id; s=PPS1017; bh=NftQyA9z2DqPnExPtY9iVbqYyoBKlAmIr/GIZ7VcwzA=; b=KJ93EkEps/SmqXFK715uICNHCSxVK1RSr4CEbmZ1GQUbIGj/0gaN6P6/+6U7DwpvVLE0 WcJxDH15PPdSARUMimMrMQ/+4uemPnWAfm0YPRWQCdSNxasS3zdbpPP417qXiaCIgLQ1 QC7M6eefxYiRoRVfFFX8KcKsb2viRvqsJeFlJwbRP2wJL/2Xz0nWCLhBSsln6TLD6DTM VUsGj5ThJwAkdnlq8VYZT5RWMbMFJzbdw/uuecTDoe1Jju/XGhegajurv4G4lP3IRn9n TF54O2n2BMWznUDahBB004XRv8uLU+YaBzJ0fJzPChXtxW43xBzNsDz63Qly2wK12uEE Cw== Received: from co1pr02cu001.outbound.protection.outlook.com (mail-westus2azlp17011010.outbound.protection.outlook.com [40.93.10.10]) by mx0a-00273201.pphosted.com (PPS) with ESMTPS id 3tbu941dcf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Sep 2023 10:56:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPhYJP8pcrOnvyoJUTUp79fTHwVsk+2ycVOHgpH5UFM0V7lwDHi9Ol1nNrwmqqG6NQ7SQaPpoOF2abwwXgz3uaYykcq7xJNMiHcVvM2suKdDzEtr8+YLSNqN8flrzSOvMIyaSGqsrBuvM7bQ49BOQkEDZlLoO6pAo+0PZ/2tcT1f0TOYWQSzGSWRZ+HMHgpS0yWQoYDKiTq7K0d2TLQSash5EhE2covOxApFJzQBBTfHZDp9qTiaocL+PhCDgNZlZ70LLaAu8rAodF/GMt5qPNTu5UOnWnkMBQ66HPm1SF4uaqqp8c18H5eBlHraWUC6X3A0V18JEohn/IrXQnekfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NftQyA9z2DqPnExPtY9iVbqYyoBKlAmIr/GIZ7VcwzA=; b=m315bcUbY4//I05jUz7ZMnE1pvLBXZdkAbhg/pewc37SLQjA3Hy8/cX/yrD+BhGQCQpsdTk/BbVK3ddpgk3CB1w0rTKcy6RjKIJKIMSuAuwDVeGBmCqFY9C6xidsG3gO2ULTe7oh4fEm1ft7dgGFzT69N/XSglsDAEjXr6g+382QGMmwgDxIQwXtUCS3g03maCX8EDvofAPwn+UKMgCzbLrXU3mmqUgnHc8i40vXsrXnG4WGKtq4MCqENiG99BVG7JSfEQ7QE9tWNpNKnntvQA0u1CfJIh4i/oWG9Rk+xrmMEHJXIhbOmmZi+aJm+Y0hlYRmAvo/ierNxZNZ90wL0A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.242.14) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NftQyA9z2DqPnExPtY9iVbqYyoBKlAmIr/GIZ7VcwzA=; b=bmvQEfYw1Q23JCVZPZuyZXQ+WepbhXdW552YSmypvU7OpVQoqu9Vm+daKdhOfQ6sFXyAxo12qB+9sWLjmAbYrUfIUUVqfk5Zz191FDfPgeZIZ13ynu5nsh2svt31aowjlDsHbhLKCngllru7Qcmk1SUtvDekpnHL3dU7NdHb+6w= Received: from BN0PR04CA0046.namprd04.prod.outlook.com (2603:10b6:408:e8::21) by CY8PR05MB10081.namprd05.prod.outlook.com (2603:10b6:930:7f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Tue, 26 Sep 2023 17:56:04 +0000 Received: from BN8NAM12FT103.eop-nam12.prod.protection.outlook.com (2603:10b6:408:e8:cafe::fb) by BN0PR04CA0046.outlook.office365.com (2603:10b6:408:e8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Tue, 26 Sep 2023 17:56:04 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.242.14) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.242.14 as permitted sender) Received: from p-exchfe-eqx-01.jnpr.net (66.129.242.14) by BN8NAM12FT103.mail.protection.outlook.com (10.13.183.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.19 via Frontend Transport; Tue, 26 Sep 2023 17:56:04 +0000 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchfe-eqx-01.jnpr.net (10.104.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 26 Sep 2023 12:56:04 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30 via Frontend Transport; Tue, 26 Sep 2023 12:56:04 -0500 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 38QHu3ws003998; Tue, 26 Sep 2023 10:56:03 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 3F9645D9BD; Tue, 26 Sep 2023 10:55:40 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 3F1F15D96A; Tue, 26 Sep 2023 10:55:40 -0700 (PDT) To: Warner Losh CC: Mateusz Guzik , src-committers , "" , "" , Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag In-Reply-To: References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> Comments: In-reply-to: Warner Losh message dated "Tue, 26 Sep 2023 08:51:45 -0600." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.8; GNU Emacs 28.2 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <95658.1695750940.1@kaos.jnpr.net> Date: Tue, 26 Sep 2023 10:55:40 -0700 Message-ID: <28.1695750940@kaos.jnpr.net> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM12FT103:EE_|CY8PR05MB10081:EE_ X-MS-Office365-Filtering-Correlation-Id: cc548feb-903c-45fb-d731-08dbbeb9da75 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iksG9nV0mdTEKVw7fkapV/m8exNv9S+QG1vosSk5ight/WAAcejg4aWgo+Ra/MgPw4uiKftvtyJQRgS2n8XMbeak26bbPLW073AuzEe1aC4e3N6Z/a5YxIhw+GEg+AT+NcmGDPsTgaqNrVLyHuNoS9htJzLVQnEyKWfjSlZxbaq5UFflDnj9kdFQYGP6Byej4OT/RBEPi3RMOxJeQv36UGvmg4puNU/SsdEhoPkm4j+9F8nfD47tt4DijUai50DVaBSrCcq5/56ji7l0J6liQTsxl7A09FuRnWuFhT62SOJDHZ2Is9ddrPYIOjOdmg+OMr97rDKWnnzJbLWEMC9z7FcqBSdCujpK5siDq/i5UQJ/q6Y/4uPTUrVs2dcJMavbkzhW+ZQWo9YfZ41L4Y5yf9+Vr636whd9mbGGoAx/Wri/hW24bIXYI0FMbRG6S+H2opROB7snK2hKpyixZ913p0H3GmVpJfSHK7zzdlzdmZTLlq5ow4TjEkGNNiS5JRV9Qi58qz6MR2IZ/BiK9G9L/EQB9uDlxp7co204l1boJWPAmaBp8tr0VgfXLJl99+6yCfKeWvG8Tkz8vjRckuPlj4jNBhSStWFiDqrIgLJhAjRemGMgutftUHPwkKKZUfG41nWiEUcAkwUnhYQ04LSyzYCjjWdN6p0Y+8lnk+Vcpte+y6sIRILbqQ8aEz8iE0sDmLUfHJwc2a/DImDUVTx19Z7N4PVKEQCPKucgj3GNKlu0HnRvTpe5OVCxwbCu3xSfxM1h/PI4fXrXTyxjsPW7yAajWJ1JyHr8Hs/Ab2PSRouyNmWx38kWkBUg5SEP+SeK X-Forefront-Antispam-Report: CIP:66.129.242.14;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-01.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(136003)(396003)(346002)(39860400002)(230922051799003)(1800799009)(186009)(82310400011)(451199024)(40470700004)(36840700001)(46966006)(26005)(478600001)(7126003)(107886003)(336012)(6266002)(356005)(86362001)(81166007)(82740400003)(47076005)(558084003)(5660300002)(36860700001)(55016003)(40460700003)(7696005)(9686003)(40480700001)(8676002)(4326008)(2906002)(54906003)(41300700001)(316002)(6916009)(70586007)(70206006)(8936002)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2023 17:56:04.5033 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc548feb-903c-45fb-d731-08dbbeb9da75 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.242.14];Helo=[p-exchfe-eqx-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT103.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR05MB10081 X-Proofpoint-ORIG-GUID: jIxfuUY3Y-tQu-_UAByrdXR7jlo2-lI- X-Proofpoint-GUID: jIxfuUY3Y-tQu-_UAByrdXR7jlo2-lI- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-26_13,2023-09-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 lowpriorityscore=0 spamscore=0 mlxlogscore=766 priorityscore=1501 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 malwarescore=0 impostorscore=0 clxscore=1011 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309260155 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US] X-Rspamd-Queue-Id: 4Rw6qc0ZThz3FtW Warner Losh wrote: > Can you put this back? It is still useful. I have automated scripts > that look for this pattern to find the version of a core dump. There We too depend on what(1) strings in kernel etc to automate tracking down the src that relates to core files. From nobody Tue Sep 26 17:56:45 2023 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 4Rw6rX3RHbz4vSyK for ; Tue, 26 Sep 2023 17:57:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6rX1WrWz3GBY for ; Tue, 26 Sep 2023 17:57:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9a645e54806so1140619166b.0 for ; Tue, 26 Sep 2023 10:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1695751017; x=1696355817; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cBMuheZ1kGqRliI/ewBv0uIthpnoYVT4Hmk5fkEV+DE=; b=XnNmSkb5mAqslnC9H2ELvNwx62VUquRD9QmpoVpO0cVPi8mDXj3sZAEWhE7Gxewl0x dc7TWJvU7Fm2acFuVHpEG26HnW2hGiglmDJ7XdhAGVhLwfa8/NM4uE58aWwaAZlpz42U XBh8ogIvJiO2YWtzk57xntM1msF5fn6vOrUU/6AUwWWKCyZv1DcPSySnyGFyahLc7JYy XDX5xO49Kq6a64EGX5LZ2sifHl8/pURFqCSZ9WrXP5OHsgUgcTPIJgQR0pvz0hepj/VU QxvL6PBEPyqcIKK3rsAUbW6DRpQGm2TRR4t8AfmDlKz63xP31MDGttf0qVUTXs8QZHVe n3Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695751017; x=1696355817; 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=cBMuheZ1kGqRliI/ewBv0uIthpnoYVT4Hmk5fkEV+DE=; b=mfwojwg/YOYpWAYEo2ypMISV5kn9kS/0R5o+HopdSKWD+96PVintTbM1dntMp2gI4T rz8d2YJZJA6Y4CURzGNqitdWIYRP5yo2EPs/o2QNZ/rpaUR+p3S1DSp7jbxG0Z+aolfU 2tEebecTEEFDO+HenfyBOT3urPyztFEFCPavvegPgIvl4Hz/VQ+e1Gv9DIZb0nzy9+3e K4fN7z0XI/ZcbaR6piVqsT3cQRtb+eCeqagMQJgVftyGsoHnacDshag4esSVFkrpIUFg DKfafL78z0SPtMAJHcCwIK9HYyAZ25oQWsYPdD+culfHE9b++5kQSe2BaDMWs2qtrmgV 45CQ== X-Gm-Message-State: AOJu0Yz/+jQJOv5nVrBYaD7xDuWEgrEc6K2WEEhzVYfB8CVvrQ0lu+c7 RC/uoJnW0fe09jqkglFkXctOAgZUceV1tSnVvPfHig== X-Google-Smtp-Source: AGHT+IHFc6PB2i3ds44SaiLtQpUexUKr8x8S1VOLeXWs9RodDS3g76OPV39ZwsePcC6tK38qm1/0KrORfL5gYh7uTrY= X-Received: by 2002:a17:906:5a70:b0:9a2:185b:5375 with SMTP id my48-20020a1709065a7000b009a2185b5375mr9790120ejc.18.1695751017213; Tue, 26 Sep 2023 10:56:57 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> <52507A54-AAB7-43E9-BD06-41B9C78CF296@panasas.com> In-Reply-To: From: Warner Losh Date: Tue, 26 Sep 2023 11:56:45 -0600 Message-ID: Subject: Re: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag To: Jessica Clarke Cc: Ravi Pokala , Mateusz Guzik , src-committers , "" , "" Content-Type: multipart/alternative; boundary="00000000000002461d060646cd51" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Rw6rX1WrWz3GBY --00000000000002461d060646cd51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 26, 2023 at 11:34=E2=80=AFAM Jessica Clarke wrote: > On 26 Sep 2023, at 18:32, Ravi Pokala wrote: > > > > In that case, an updated comment seems appropriate, so it=E2=80=99s not= removed > again. > > https://reviews.freebsd.org/D41984 Jessica beat me to it. I have a back out and this commit queued up. I've just updated the comment. I'm not at all happy with it yet. The details are in the commit message, but the tl;dr is that while we do write the version to the end of the dumps, savecore doesn't preserve that when writing vmcore.X, so to identify what kernel a dump is from reliably, one must use the SCCS ID tags. Trying to find other strings to get this data is not as reliable. The real fix for this issue with the vmcore.X format is to write ELF core dumps, a feature vaguely planned for 15, where we can save this data in a way that can be extracted with scripts. Warner > > > -Ravi (rpokala@) > > > > From: on behalf of Warner Losh < > imp@bsdimp.com> > > Date: Tuesday, September 26, 2023 at 07:51 > > To: Mateusz Guzik > > Cc: src-committers , "< > dev-commits-src-all@freebsd.org>" , "< > dev-commits-src-main@freebsd.org>" > > Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs > tag > > > > Can you put this back? It is still useful. I have automated scripts > that look for this pattern to find the version of a core dump. There are = no > other ways that are as reliable to find this data. Some other heuristics > exist, but my experience with snagging data from maybe a thousand core > dumps from $WORK's network found issues in all the alternatives. It's why= I > didn't whack it already. Even though the text says SCCS which is prehisto= ry > for this project, it's still in use today. > > Warner > > > > On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik wrote: > >> > >> > >> The branch main has been updated by mjg: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c= 5fd417723 > >> > >> commit e6dc6a27230f836a131118326731b7c5fd417723 > >> Author: Mateusz Guzik > >> AuthorDate: 2023-09-26 14:36:51 +0000 > >> Commit: Mateusz Guzik > >> CommitDate: 2023-09-26 14:36:51 +0000 > >> > >> sys/conf/newvers.sh: whack sccs tag > >> > >> In the same spirit as removing cvs $FreeBSD$ tags. > >> > >> Sponsored by: Rubicon Communications, LLC ("Netgate") > >> --- > >> sys/conf/newvers.sh | 2 -- > >> 1 file changed, 2 deletions(-) > >> > >> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh > >> index 73fd6857d307..18b1817ca287 100644 > >> --- a/sys/conf/newvers.sh > >> +++ b/sys/conf/newvers.sh > >> @@ -311,11 +311,9 @@ fi > >> > >> vers_content_new=3D$(cat << EOF > >> $COPYRIGHT > >> -#define SCCSSTR "@(#)${VERINFO}" > >> #define VERSTR "${VERSTR}" > >> #define RELSTR "${RELEASE}" > >> > >> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D SCCSSTR; > >> char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] =3D VERSTR; > >> char compiler_version[] =3D "${compiler_v}"; > >> char ostype[] =3D "${TYPE}"; > > --00000000000002461d060646cd51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Sep 26, 2023 at 11:34=E2=80= =AFAM Jessica Clarke <jrtc27@freeb= sd.org> wrote:
On 26 Sep 2023, at 18:32, Ravi Pokala <rpokala@freebsd.org> wrote:
>
> In that case, an updated comment seems appropriate, so it=E2=80=99s no= t removed again.

https://reviews.freebsd.org/D41984

=
Jessica beat me to it. I have a back out and this commit queued up. I&= #39;ve just
updated the comment. I'm not at all happy with it= yet.

The details are in the commit message, but t= he tl;dr is that while we do write
the version to the end of the = dumps, savecore doesn't preserve that when
writing vmcore.X, = so to identify what kernel a dump is from reliably, one
must use = the SCCS ID tags. Trying to find other strings to get this data is
not as reliable.

The real fix for this issue wit= h the vmcore.X format is to write ELF core
dumps, a feature vague= ly planned for 15, where we can save this data
in a way that can = be extracted with scripts.

Warner
=C2=A0=

>=C2=A0 -Ravi (rpokala@)
>
> From: <owner-src-committers@freebsd.org> on behalf of Warner Lo= sh <imp@bsdimp.com>
> Date: Tuesday, September 26, 2023 at 07:51
> To: Mateusz Guzik <
mjg@freebsd.org>
> Cc: src-committers <src-committers@freebsd.org>, "<dev-commits-src-al= l@freebsd.org>" <dev-commits-src-all@freebsd.org>, "&l= t;dev= -commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org= >
> Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack scc= s tag
>
>=C2=A0 Can you put this back? It is still useful. I have automated scri= pts that look for this pattern to find the version of a core dump. There ar= e no other ways that are as reliable to find this data. Some other heuristi= cs exist, but my experience with snagging data from maybe a thousand core d= umps from $WORK's network found issues in all the alternatives. It'= s why I didn't whack it already. Even though the text says SCCS which i= s prehistory for this project, it's still in use today.
>=C2=A0 Warner
>
> On Tue, Sep 26, 2023, 8:37 AM Mateusz Guzik <mjg@freebsd.org> wrote:
>>
>>
>> The branch main has been updated by mjg:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3De6dc6a27230f836a131118326731b7c5fd417= 723
>>
>> commit e6dc6a27230f836a131118326731b7c5fd417723
>> Author:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org> >> AuthorDate: 2023-09-26 14:36:51 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Mateusz Guzik <mjg@FreeBSD.org> >> CommitDate: 2023-09-26 14:36:51 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0sys/conf/newvers.sh: whack sccs tag
>>
>>=C2=A0 =C2=A0 =C2=A0In the same spirit as removing cvs $FreeBSD$ ta= gs.
>>
>>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Rubicon Communication= s, LLC ("Netgate")
>> ---
>>=C2=A0 sys/conf/newvers.sh | 2 --
>>=C2=A0 1 file changed, 2 deletions(-)
>>
>> diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
>> index 73fd6857d307..18b1817ca287 100644
>> --- a/sys/conf/newvers.sh
>> +++ b/sys/conf/newvers.sh
>> @@ -311,11 +311,9 @@ fi
>>
>>=C2=A0 vers_content_new=3D$(cat << EOF
>>=C2=A0 $COPYRIGHT
>> -#define SCCSSTR "@(#)${VERINFO}"
>>=C2=A0 #define VERSTR "${VERSTR}"
>>=C2=A0 #define RELSTR "${RELEASE}"
>>
>> -char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] =3D S= CCSSTR;
>>=C2=A0 char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256]= =3D VERSTR;
>>=C2=A0 char compiler_version[] =3D "${compiler_v}";
>>=C2=A0 char ostype[] =3D "${TYPE}";

--00000000000002461d060646cd51-- From nobody Tue Sep 26 17:58:04 2023 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 4Rw6t102NPz4vSyV for ; Tue, 26 Sep 2023 17:58:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw6t05Tgvz3GgS for ; Tue, 26 Sep 2023 17:58:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-533f193fc8dso6509442a12.2 for ; Tue, 26 Sep 2023 10:58:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1695751095; x=1696355895; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JcJqyFN0NQIndS/rP0u9MKRWAQRSLlfaEhT3SDVL/IA=; b=pB0I40pughJOkxxJCAODRhjhib8k1K8rXxG6D/NMw8mBcubTCnx4d7iGU8HOMJoDOM nFRviJiVcCKa79FQV4UMcXRUMuRh8JrJq8CTeI9oiv3rCNVMwTeIyQaseoAmJ8ZLQtFl Q6Fza3y/WBO2MTi6U29uUvwukyESYW0CukDuI2XBfHY0X+cBWoErfdb+FkYUtYplDiWE wjbW7i5x8lErfYX0tLtd0B7gpQOd7W6ULBnVzOgoHQQeqkxaOLjy7+o+52O1mpnW1CSW Iv62e/57ZnFZVi/0X2t941aIRwAt/gBsv0YkK3LxvlSji7yIGYmnLgUBJeqLGGaEO1lK 7KcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695751095; x=1696355895; 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=JcJqyFN0NQIndS/rP0u9MKRWAQRSLlfaEhT3SDVL/IA=; b=rIAaAnRj/82AFNQeMS5X1yAdI56LRyu1bmKyZ3wY64z7eRlKMquP+Lb4qtgMWxLzCl 3XD2Td4vjzgw1Z9xnIR7J86AF6Yp0/NyK82a6F6gGlxMa4qgjmC5p8rsC2mIcuL/HrJ9 MGZgGnmcWuH0S3QhbKNOsaW+D9PALjkcAgfcjUhYXdHG7QzLO33qIhZmPM/0yGNdWTM4 A1/CpR2PVu/YjkPMq0exFd0nDGOeez7APzJiXW0fQzVqIUHOJwntYbDAiRPDJ/7iVoSW zlaCLuyCGgBF7fLA4yFJIjFCZmbome9pQBYmKIz9soJFIkouoqXHha9E5pUD6FoU+l4O iU7w== X-Gm-Message-State: AOJu0YzbkCNSmsD6difelYmmeNPX+KgwoRZVgBCGXoWGWKJZUheHt8ox Y2ngzluCyluwpwKpiqCxq/UFlJ/ouBeyoL7GGmW5vg== X-Google-Smtp-Source: AGHT+IGuPeSGCjPI1echHDjn6Gq5EfeZDhhrFT9USqmLyd+zwvvnkAjPtpsxp2xXGBWQcb7GQlNudBHWjGFpcWJd6ls= X-Received: by 2002:aa7:d912:0:b0:530:9bea:ed5e with SMTP id a18-20020aa7d912000000b005309beaed5emr8597875edr.14.1695751095101; Tue, 26 Sep 2023 10:58:15 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202309261437.38QEbWmw002059@gitrepo.freebsd.org> <28.1695750940@kaos.jnpr.net> In-Reply-To: <28.1695750940@kaos.jnpr.net> From: Warner Losh Date: Tue, 26 Sep 2023 11:58:04 -0600 Message-ID: Subject: Re: git: e6dc6a27230f - main - sys/conf/newvers.sh: whack sccs tag To: "Simon J. Gerraty" Cc: Mateusz Guzik , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000a6c0d0060646d1b7" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4Rw6t05Tgvz3GgS --000000000000a6c0d0060646d1b7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 26, 2023 at 11:56=E2=80=AFAM Simon J. Gerraty = wrote: > Warner Losh wrote: > > Can you put this back? It is still useful. I have automated scripts > > that look for this pattern to find the version of a core dump. There > > We too depend on what(1) strings in kernel etc to automate tracking down > the src that relates to core files. > Please comment on https://reviews.freebsd.org/D41984 to document it. I have a backout commit queued up, and a second commit to add a comment. Please make your suggestions there. Warner --000000000000a6c0d0060646d1b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Sep 26, 2023 at 11:56=E2=80= =AFAM Simon J. Gerraty <sjg@juniper.n= et> wrote:
imp@b= sdimp.com> wrote:
> Can you put this back? It is still useful. I have automated scripts > that look for this pattern to find the version of a core dump. There
We too depend on what(1) strings in kernel etc to automate tracking down the src that relates to core files.

Ple= ase comment on=C2=A0=C2=A0ht= tps://reviews.freebsd.org/D41984 to document it.

I have a backout commit queued up, and a second commit to add a comment.=
Please make your suggestions there.

War= ner=C2=A0
--000000000000a6c0d0060646d1b7-- From nobody Tue Sep 26 18:08:39 2023 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 4Rw76L1h1Tz4vT8p for ; Tue, 26 Sep 2023 18:08:58 +0000 (UTC) (envelope-from bT.i22eqlze30=b4f0tt1smgu7=bjay8tmso6@em790814.fubar.geek.nz) Received: from e2i432.smtp2go.com (e2i432.smtp2go.com [103.2.141.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw76K6TTcz3JNt for ; Tue, 26 Sep 2023 18:08:57 +0000 (UTC) (envelope-from bT.i22eqlze30=b4f0tt1smgu7=bjay8tmso6@em790814.fubar.geek.nz) Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=smtpservice.net header.s=mgy720.a1-4.dyn header.b=OKyg0jER; dkim=pass header.d=fubar.geek.nz header.s=s790814 header.b=abtmzjUa; spf=pass (mx1.freebsd.org: domain of "bT.i22eqlze30=b4f0tt1smgu7=bjay8tmso6@em790814.fubar.geek.nz" designates 103.2.141.176 as permitted sender) smtp.mailfrom="bT.i22eqlze30=b4f0tt1smgu7=bjay8tmso6@em790814.fubar.geek.nz"; dmarc=pass (policy=none) header.from=fubar.geek.nz DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=mgy720.a1-4.dyn; x=1695752637; h=Feedback-ID: X-Smtpcorp-Track:To:Message-Id:Date:From:Subject:Reply-To:Sender: List-Unsubscribe; bh=q41EjXJ9dZ5oSbfC8M65JFafrYPkKjdge6fbG8lIAoo=; b=OKyg0jER TbgVt0iqZ2NHUlqwp4vKvy6Xf6zjk9Fu3A9hcy5qKq9pdCaymDJOAc3TWmUP+cLAIDdeWjdDYqYOZ IQRic3MjA0MlbVzOoYsksoZzOeWaeWd80V5CBTbaKSO5jBsyelt1SD8noCFpCos0pKW4YuA6uPdKn pMSZw9gNiJbNC7E+Bl0QlgTOozt4ffjD92FrJ60/McprznWd5/qzDwUM0BSEfpr4g2TjT0gU6gLQA FJHUJ+Wp1It0tUsqgpJJz6J/lhWs3E1j8UqdoVTFljqJgTwf7cnteJOFpfXh2VT5xLqKnLmAIK0IL ObpPV6GQmKgQpuGjMkpjqXxhMQ==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; i=@fubar.geek.nz; q=dns/txt; s=s790814; t=1695751737; h=from : subject : to : message-id : date; bh=q41EjXJ9dZ5oSbfC8M65JFafrYPkKjdge6fbG8lIAoo=; b=abtmzjUaSM5xX9XEtXZhxc8vIEP8FzdwqZnVUjHklY+GqQix/W4w4KOkL+i5a1uuKxS8N gnmxEwMqRzRWzrC5M7m1Y7Nsf4Z/neUBh+39om1peNdt5k6TfbzsQDS2Q46TOHWGaH6K2TD IYMvdnQUojYk8xg5VxOl+pBZhiy9ySu7w7IlVTvozTrf2+GIcEp/Wv1qtWLTXCoi4lwWRgt Y7oLqezC+IeAUlDbc/qI98ZrvseuUjgbUtRGLPMNkXiKSwBlMGBgsknCI6cKoLsDs/jluaV /3WpihA+rHMk2wcBhe56gNOwD5Wbo404r/MXowCYg+7F1FzhpKI8DAGplXbw== Received: from [10.176.58.103] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1qlCUM-TRk1Xc-VF; Tue, 26 Sep 2023 18:08:50 +0000 Received: from [10.99.243.232] (helo=morbo.fubar.geek.nz) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96-S2G) (envelope-from ) id 1qlCUM-9ERRJu-2A; Tue, 26 Sep 2023 18:08:50 +0000 Received: from smtpclient.apple (cpc91210-cmbg18-2-0-cust37.5-4.cable.virginm.net [81.102.44.38]) by morbo.fubar.geek.nz (Postfix) with ESMTPSA id 1283A3FFC2; Tue, 26 Sep 2023 18:08:50 +0000 (UTC) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: git: f1c5a2e3a625 - main - virtio_random: Pipeline fetching the data From: Andrew Turner In-Reply-To: <202309051600.385G0Bmk031832@gitrepo.freebsd.org> Date: Tue, 26 Sep 2023 19:08:39 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <8B2042EF-728E-4A8A-8878-640B3097191E@fubar.geek.nz> References: <202309051600.385G0Bmk031832@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3731.700.6) X-Smtpcorp-Track: 1q_Clu9ERRJI2j.E84wHw8sVte_H Feedback-ID: 790814m:790814amQcrys:790814sA5QavheWS X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[fubar.geek.nz,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[103.2.141.176:from]; FORGED_SENDER(0.30)[andrew@fubar.geek.nz,bT.i22eqlze30=b4f0tt1smgu7=bjay8tmso6@em790814.fubar.geek.nz]; R_DKIM_ALLOW(-0.20)[fubar.geek.nz:s=s790814]; R_SPF_ALLOW(-0.20)[+ip4:103.2.140.0/22:c]; RCVD_IN_DNSWL_LOW(-0.10)[103.2.141.176:from]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_DKIM_PERMFAIL(0.00)[smtpservice.net:s=mgy720.a1-4.dyn]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_MIXED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[andrew@fubar.geek.nz,bT.i22eqlze30=b4f0tt1smgu7=bjay8tmso6@em790814.fubar.geek.nz]; RCVD_COUNT_THREE(0.00)[3]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org]; DKIM_TRACE(0.00)[smtpservice.net:~,fubar.geek.nz:+]; ASN(0.00)[asn:23352, ipnet:103.2.140.0/22, country:US]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4Rw76K6TTcz3JNt Is there a plan to MFC this to 14? Without it I=E2=80=99m seeing 50% CPU = on a dual core arm64 Hetzner VM. Andrew > On 5 Sep 2023, at 17:00, John Baldwin wrote: >=20 > The branch main has been updated by jhb: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df1c5a2e3a625053e2b70d5b1777d849a= 4d9328f2 >=20 > commit f1c5a2e3a625053e2b70d5b1777d849a4d9328f2 > Author: John-Mark Gurney > AuthorDate: 2023-09-05 15:59:43 +0000 > Commit: John Baldwin > CommitDate: 2023-09-05 15:59:43 +0000 >=20 > virtio_random: Pipeline fetching the data >=20 > Queue an initial fetch of data during attach and after every read > rather than synchronously fetching data and polling for completion. >=20 > If data has not been returned from an previous fetch during read, > just return EAGAIN rather than blocking. >=20 > Co-authored-by: John Baldwin >=20 > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D41656 > --- > sys/dev/virtio/random/virtio_random.c | 73 = +++++++++++++++++++++-------------- > 1 file changed, 43 insertions(+), 30 deletions(-) >=20 > diff --git a/sys/dev/virtio/random/virtio_random.c = b/sys/dev/virtio/random/virtio_random.c > index c02b5c98cece..d54e2e6b70d4 100644 > --- a/sys/dev/virtio/random/virtio_random.c > +++ b/sys/dev/virtio/random/virtio_random.c > @@ -54,6 +54,8 @@ struct vtrnd_softc { > struct virtqueue *vtrnd_vq; > eventhandler_tag eh; > bool inactive; > + struct sglist *vtrnd_sg; > + uint32_t *vtrnd_value; > }; >=20 > static int vtrnd_modevent(module_t, int, void *); > @@ -67,6 +69,7 @@ static int vtrnd_negotiate_features(struct = vtrnd_softc *); > static int vtrnd_setup_features(struct vtrnd_softc *); > static int vtrnd_alloc_virtqueue(struct vtrnd_softc *); > static int vtrnd_harvest(struct vtrnd_softc *, void *, size_t *); > +static void vtrnd_enqueue(struct vtrnd_softc *sc); > static unsigned vtrnd_read(void *, unsigned); >=20 > #define VTRND_FEATURES 0 > @@ -138,12 +141,17 @@ static int > vtrnd_attach(device_t dev) > { > struct vtrnd_softc *sc, *exp; > + size_t len; > int error; >=20 > sc =3D device_get_softc(dev); > sc->vtrnd_dev =3D dev; > virtio_set_feature_desc(dev, vtrnd_feature_desc); >=20 > + len =3D sizeof(*sc->vtrnd_value) * HARVESTSIZE; > + sc->vtrnd_value =3D malloc_aligned(len, len, M_DEVBUF, = M_WAITOK); > + sc->vtrnd_sg =3D sglist_build(sc->vtrnd_value, len, M_WAITOK); > + > error =3D vtrnd_setup_features(sc); > if (error) { > device_printf(dev, "cannot setup features\n"); > @@ -174,6 +182,8 @@ vtrnd_attach(device_t dev) > sc->inactive =3D false; > random_source_register(&random_vtrnd); >=20 > + vtrnd_enqueue(sc); > + > fail: > if (error) > vtrnd_detach(dev); > @@ -185,6 +195,7 @@ static int > vtrnd_detach(device_t dev) > { > struct vtrnd_softc *sc; > + uint32_t rdlen; >=20 > sc =3D device_get_softc(dev); > KASSERT( > @@ -197,7 +208,13 @@ vtrnd_detach(device_t dev) > sc->eh =3D NULL; > } > random_source_deregister(&random_vtrnd); > + > + /* clear the queue */ > + virtqueue_poll(sc->vtrnd_vq, &rdlen); > + > atomic_store_explicit(&g_vtrnd_softc, NULL, = memory_order_release); > + sglist_free(sc->vtrnd_sg); > + zfree(sc->vtrnd_value, M_DEVBUF); > return (0); > } >=20 > @@ -251,49 +268,45 @@ vtrnd_alloc_virtqueue(struct vtrnd_softc *sc) > return (virtio_alloc_virtqueues(dev, 0, 1, &vq_info)); > } >=20 > +static void > +vtrnd_enqueue(struct vtrnd_softc *sc) > +{ > + struct virtqueue *vq; > + int error __diagused; > + > + vq =3D sc->vtrnd_vq; > + > + KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); > + > + error =3D virtqueue_enqueue(vq, sc, sc->vtrnd_sg, 0, 1); > + KASSERT(error =3D=3D 0, ("%s: virtqueue_enqueue returned error: = %d", > + __func__, error)); > + > + virtqueue_notify(vq); > +} > + > static int > vtrnd_harvest(struct vtrnd_softc *sc, void *buf, size_t *sz) > { > - struct sglist_seg segs[1]; > - struct sglist sg; > struct virtqueue *vq; > - uint32_t value[HARVESTSIZE] __aligned(sizeof(uint32_t) * = HARVESTSIZE); > + void *cookie; > uint32_t rdlen; > - int error; > - > - _Static_assert(sizeof(value) < PAGE_SIZE, "sglist assumption"); >=20 > if (sc->inactive) > return (EDEADLK); >=20 > - sglist_init(&sg, 1, segs); > - error =3D sglist_append(&sg, value, *sz); > - if (error !=3D 0) > - panic("%s: sglist_append error=3D%d", __func__, error); > - > vq =3D sc->vtrnd_vq; > - KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); > - > - error =3D virtqueue_enqueue(vq, buf, &sg, 0, 1); > - if (error !=3D 0) > - return (error); > - > - /* > - * Poll for the response, but the command is likely already > - * done when we return from the notify. > - */ > - virtqueue_notify(vq); > - virtqueue_poll(vq, &rdlen); >=20 > - if (rdlen > *sz) > - panic("%s: random device wrote %zu bytes beyond end of = provided" > - " buffer %p:%zu", __func__, (size_t)rdlen - *sz, > - (void *)value, *sz); > - else if (rdlen =3D=3D 0) > + cookie =3D virtqueue_dequeue(vq, &rdlen); > + if (cookie =3D=3D NULL) > return (EAGAIN); > + KASSERT(cookie =3D=3D sc, ("%s: cookie mismatch", __func__)); > + > *sz =3D MIN(rdlen, *sz); > - memcpy(buf, value, *sz); > - explicit_bzero(value, *sz); > + memcpy(buf, sc->vtrnd_value, *sz); > + > + vtrnd_enqueue(sc); > + > return (0); > } >=20 >=20 From nobody Tue Sep 26 19:42:22 2023 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 4Rw9B73JcHz4vZX8; Tue, 26 Sep 2023 19:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rw9B66hxGz3Qxy; Tue, 26 Sep 2023 19:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695757342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HXN59RzTRVBAhhJH4JFX+OYb+kzFXaArmtv4mUoeyUU=; b=AesQJDW4bMOjzhLL0TNnJgkVEWTmTpPZ2TF5Q0n4eawkWHY0DDX5rNhqbSOXP9QfRbe+ru iG33oG/7nAEyIbnEpM8wBH3WM1z6r9h/r49T/NBLLe8QG9wDPHS4qqAarRPkElWBUP8lXK 4MHHZUKSCTyHMma2HS3kkUIYSs0JVD9c74pDV+EUBhrNtU4rqZB5hFRW18ExgY3pqVePMJ E41TjEP53RrHs687QqPbnZlT8U0H0gSF2jVuTqRqS7fTQiBf9ajUl+XmiwN0o/C9FqI0KB cBk39km5Qw+qvu3r4tUEtt/bIneAwzyKCvsCgsx4QcKoeELTlBGzaQs09qT/wQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695757342; a=rsa-sha256; cv=none; b=xc+OD0lPEPVQ9R+LEF5GeGt31rTudYKmM/OxOH6EHUiJTMwh6FAaJYEgu82voVZhadMuTv hXw4P9GbUp3kVev0IoTT2shdIHzJcO6lO1y2PIvvgsJ5HsLfLWoJRfNK+FVQn5ECjod+fd tABU6GSi2ESnn3TCmTevPi7N4OryuQpbAFUYZlXlc9PdgA6KeGFMIDjFLqnZrOXlhL1NU0 ha2nVNVGM7zb13h1OO7fpWMV6Kj2hcgxbO+s/ehTmvuxt/74kD9s4zYLVwz75ZhkYg8dO5 T5XnSxbJ+9E1Ck19WRn/sE5fReaOVC2Km+jFikFoItYT9Yr5HmmbvO1vzvNSLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695757342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HXN59RzTRVBAhhJH4JFX+OYb+kzFXaArmtv4mUoeyUU=; b=DXqJedktFcEU/KD0YRXcXMd+97kB7ucqAIS9Kp1L2fZX6LOnwioovzpq+uRfbqfqy2YHUb 70UpI1u18ECVCvgY5P4yMlfyFPL46kTP40R5hX0KGRu0ddY/OV3Es2FyMLlKxJICYaQTCh SDtEZOq/Ddoh4wlcfN3rI3p6h/bd+giEcFixvue1r0L65+f1M5+6b2iQ/w0kK7Ddkbbraf dIRJSMwFnUTJvW0lNjgaNaeq9X0wE/3oaLb+DyecdN+oTgQs5f9wLBGWmWQVYYgqRK9SRW YhFZYJaiQf6p3vNrjfAVe+Oiv63HPZDaqBdrClZM7/ODdRkxUlxpIBiSOm2H3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rw9B65nBtz1821; Tue, 26 Sep 2023 19:42:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QJgMOF016086; Tue, 26 Sep 2023 19:42:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QJgM7i016083; Tue, 26 Sep 2023 19:42:22 GMT (envelope-from git) Date: Tue, 26 Sep 2023 19:42:22 GMT Message-Id: <202309261942.38QJgM7i016083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jens Schweikhardt Subject: git: e8a7cee67348 - main - Add paragraph about kern.mqueue sysctls and their defaults. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: schweikh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8a7cee67348aa954138f32567dac379c746e152 Auto-Submitted: auto-generated The branch main has been updated by schweikh: URL: https://cgit.FreeBSD.org/src/commit/?id=e8a7cee67348aa954138f32567dac379c746e152 commit e8a7cee67348aa954138f32567dac379c746e152 Author: Jens Schweikhardt AuthorDate: 2023-09-26 19:41:29 +0000 Commit: Jens Schweikhardt CommitDate: 2023-09-26 19:41:29 +0000 Add paragraph about kern.mqueue sysctls and their defaults. --- lib/libc/sys/mq_open.2 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/mq_open.2 b/lib/libc/sys/mq_open.2 index e5e7808c9e26..17e290e541ca 100644 --- a/lib/libc/sys/mq_open.2 +++ b/lib/libc/sys/mq_open.2 @@ -35,7 +35,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd September 28, 2019 +.Dd September 26, 2023 .Dt MQ_OPEN 2 .Os .Sh NAME @@ -226,6 +226,18 @@ Please see the .Xr mqueuefs 5 man page for instructions on loading the module or compiling the service into the kernel. +.Pp +The number of queues available, the maximum number of messages per queue +and the maximum message size are tunable +.Xr sysctl 8 +parameters. +Their defaults are as follows. +.Bl -column kern.mqueue.maxmsgsize integerxxx +.It Sy "Name Type Default" +.It "kern.mqueue.maxmq integer 100" +.It "kern.mqueue.maxmsgsize integer 16384" +.It "kern.mqueue.maxmsg integer 100" +.El .Sh RETURN VALUES Upon successful completion, the function returns a message queue descriptor; otherwise, the function returns From nobody Tue Sep 26 20:26:33 2023 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 4RwB956JsQz4vcf8; Tue, 26 Sep 2023 20:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwB955pRrz3VyN; Tue, 26 Sep 2023 20:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695759993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eNFYoeJtMvLicy0Kmv/UW6jPewgzE0eg4FwUY9Ct68=; b=q5flPH8sxhXNTWj4r9a1kUKcc2PKGJ8AaKe+7CFkNI36nYQdM5ZZN5d6ORnfcqML2w9lXG xub12VTqxl1iWRsI6+HuRuFCizr29FUg60991S1NLebao+mcdchZcwFUedwu1rjuTBiQrl bNoTUGmPu2+wzEcKcNw/tOODoHhh9goOmUMv6Xq7q/bSdt0tO5C8xI7lQc/TjDpAzrBnys QxJbhqy+EWQYRKoWRyWGMK6m9HekCjXbBt7E3YiB7iCZ4QtXAkjCO7ucAMeYC3XEDz1f3q 4b7wMztVM810V+ZQpLDfBsaEefJmVdk/6yTia3W+p3H7ExIYxKJuTaK5++IBSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695759993; a=rsa-sha256; cv=none; b=r9t2CbapA9rBLbJKwoJesNb6v481mouPFBlVF9z1GL7kB7cYw88H6uX+InsvkzIcwnTPlN 9FgoS39MSyvvgraY+u2zTDKDxtumaTB8B7x/zAvbiKIvPWTIKPD2BSKcRMHYxYjVD32Wuy ICGPWVxxdMlwZBYmKtVcRS9U61iRwYg++Wxhigbl0dBI5GbxdLY1G/22XAqt1Q8WRl0XuT r2XdFsxjVDMBS2M2NoEWgEyURT4c9jPFIPneJrIDD3i/T3OaRvMubtUmiI3r6VWHEKX3Vr /30DulG5HIbh9/6UXzqg55s9xk7WU/G1WFnTo1zbdzwudZr1wInCnFMFFfBgvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695759993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eNFYoeJtMvLicy0Kmv/UW6jPewgzE0eg4FwUY9Ct68=; b=P2TKI73jk66TM36UViY00EEx29sJ2Wl2IamByGe5KofJWkbZT3WG7ehximZpQ1d5YFz/rD FQmSte0zs90S4gFHCqI0DU9pdczQLddF+rpteevTDj1G+ICFE9C+ulQFAeEFMs4OnfhcSm dzi4b12SggWI40CivA6ty1I2voklEo/cYeGZ8wmL5mzjbU342LclD80ap58WQgUbLgULoT yRqG8Ghk10SgqLp10XHd6jkUhTfjpibgXeJdNIv64GTjek7gWjx+Gvp9qoqFd9+3atW6I4 cykIzjjdYOW4SFSbrpJL61AkKUaaz/a7oFCW9TlMEaFdKUMf9J3CbtvWYOiczg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwB954lMsz19gJ; Tue, 26 Sep 2023 20:26:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QKQXnK082952; Tue, 26 Sep 2023 20:26:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QKQXlm082949; Tue, 26 Sep 2023 20:26:33 GMT (envelope-from git) Date: Tue, 26 Sep 2023 20:26:33 GMT Message-Id: <202309262026.38QKQXlm082949@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: 1dc3abb05243 - main - libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 1dc3abb052430279e47c8922d22b30922adcf0f6 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1dc3abb052430279e47c8922d22b30922adcf0f6 commit 1dc3abb052430279e47c8922d22b30922adcf0f6 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-26 20:06:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-26 20:07:10 +0000 libc: Rewrite quick_exit() and at_quick_exit() using C11 atomics. Compiler memory barriers do not prevent the CPU from executing the code out of order. Switch to C11 atomics. This also lets us get rid of the mutex; instead, loop until the compare_exchange succeeds. While here, change the return value of at_quick_exit() on failure to the more traditional -1, matching atexit(). Sponsored by: Klara, Inc. Reviewed by: Olivier Certner, kevans, kib Differential Revision: https://reviews.freebsd.org/D41936 --- lib/libc/stdlib/quick_exit.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/lib/libc/stdlib/quick_exit.c b/lib/libc/stdlib/quick_exit.c index 05db690cb6e7..4dee7b20bd2b 100644 --- a/lib/libc/stdlib/quick_exit.c +++ b/lib/libc/stdlib/quick_exit.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011 David Chisnall + * Copyright (c) 2023 Klara, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,44 +28,35 @@ */ #include -#include + +#include #include -#include /** - * Linked list of quick exit handlers. This is simpler than the atexit() - * version, because it is not required to support C++ destructors or - * DSO-specific cleanups. + * Linked list of quick exit handlers. These will be invoked in reverse + * order of insertion when quick_exit() is called. This is simpler than + * the atexit() version, because it is not required to support C++ + * destructors or DSO-specific cleanups. */ struct quick_exit_handler { struct quick_exit_handler *next; void (*cleanup)(void); }; -/** - * Lock protecting the handlers list. - */ -static pthread_mutex_t atexit_mutex = PTHREAD_MUTEX_INITIALIZER; -/** - * Stack of cleanup handlers. These will be invoked in reverse order when - */ -static struct quick_exit_handler *handlers; +static _Atomic(struct quick_exit_handler *) handlers; int at_quick_exit(void (*func)(void)) { struct quick_exit_handler *h; - - h = malloc(sizeof(*h)); - if (NULL == h) - return (1); + if ((h = calloc(1, sizeof(*h))) == NULL) { + return (-1); + } h->cleanup = func; - pthread_mutex_lock(&atexit_mutex); - h->next = handlers; - __compiler_membar(); - handlers = h; - pthread_mutex_unlock(&atexit_mutex); + while (!atomic_compare_exchange_strong(&handlers, &h->next, h)) { + /* nothing */ ; + } return (0); } @@ -77,8 +69,8 @@ quick_exit(int status) * XXX: The C++ spec requires us to call std::terminate if there is an * exception here. */ - for (h = handlers; NULL != h; h = h->next) { - __compiler_membar(); + for (h = atomic_load_explicit(&handlers, memory_order_acquire); + h != NULL; h = h->next) { h->cleanup(); } _Exit(status); From nobody Tue Sep 26 20:26:34 2023 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 4RwB970cm2z4vcKb; Tue, 26 Sep 2023 20:26:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwB966vHQz3Vth; Tue, 26 Sep 2023 20:26:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695759995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EE+rAa3tRdqbNGAiInuXKOUBEYxB7eSHgRC0Bu5KU9Q=; b=q543Y5ln+WBX8+pp96hSGCFyj3TWla3TbkOSh67m08y4FrfIo1FEPfw82/+vtRA2FU0het 9qj4agKhQE2fRW4Ie20SzTI833byVM0d5lL5VgFLZTfAAYJQUDU6phHSKC1VTxVScCReIH uVHBUpTmzZupVCh/57m6YDC8iNaacYyCC87vPWta2+BjR89xCBI3NiujfqA9od56Hd+tQJ sLXGCQ0JE4jmgZhIpNnl4iaWNupnaASxFFdMH1MDve38alEN+CvrpE36pAjtu2VDja+8+9 s/svqS3QxYIkVkqeOowbj3Hoou9sYHGg1ZsuLCECeIvKPPXKuqiT2F5SimXiBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695759995; a=rsa-sha256; cv=none; b=UC5dncvQ/m17+ojIMzB1qz/82/3ZS6eV0KPYiF+/WED2OFwpihd3QGqO7DJd4vCXPwwUNO dX8jF2u9gn1om89DvoEMG43ij6l62CiFQhfNTWb77PCC8xemglTwVpEdtaCNR8qeGx5EMj V0fkOD2792zdJyhsb90WdJz0+5494uqoLdPBjLJKvYWi+Z5AgM5314GElqQ2tw8YChC5SK g9wHMeP6Nn06pQjDXSMCBSEjA9llQt02GmVrqKq1d1bov1Ioa9kxeNGxAnhbp6XaSmJ03t PG0mPMyHBUbMJsZ9borY+MMCsVM6340Iog2XlvcvX9mTaZZQeJC127/rSmnDbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695759995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EE+rAa3tRdqbNGAiInuXKOUBEYxB7eSHgRC0Bu5KU9Q=; b=BEEarrS9EkWO9t6lohtpIWl7vNGdPK4PUTg+xF1g8GiOZaU1Syr4Wsk6pnWXPAYuRoBQJj ak9ffJkchMUgE0d1tOWbD42Taj6X7sCxl4Y6cqOb92XJhNhX2VxvY1xYXu5MBWLq/5ls8D UgadcLZEV/103El6SXNRCD5Om66WkzSFbSlU8Yl1sdvIFJTSZcQfpquEXyNuuaOWkgfaSV tWG5cutxT4kNmbbQSEhkNmCt4IAGHHINX0469akfO6/PvZniDu3DPnW2ENoO2Nm1kjnemB 9kcf8NCMX2coIWnzofZX0XuMSxLI/dLXUfzphPYywVk8g/FTm6cNeirgEcqXqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwB965XfYz19X2; Tue, 26 Sep 2023 20:26:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QKQY15083004; Tue, 26 Sep 2023 20:26:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QKQY4A083001; Tue, 26 Sep 2023 20:26:34 GMT (envelope-from git) Date: Tue, 26 Sep 2023 20:26:34 GMT Message-Id: <202309262026.38QKQY4A083001@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: c7dd4601aeeb - main - libc: Add a rudimentary test for quick_exit(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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: c7dd4601aeebbc1bbe131cbe6747476c124b47fe Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c7dd4601aeebbc1bbe131cbe6747476c124b47fe commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe Author: Dag-Erling Smørgrav AuthorDate: 2023-09-26 20:07:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-26 20:07:10 +0000 libc: Add a rudimentary test for quick_exit(3). Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D41937 --- lib/libc/tests/stdlib/Makefile | 1 + lib/libc/tests/stdlib/quick_exit_test.c | 81 +++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index a2a6420aba41..860e530389df 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -12,6 +12,7 @@ ATF_TESTS_C+= qsort_b_test ATF_TESTS_C+= qsort_r_compat_test ATF_TESTS_C+= qsort_r_test ATF_TESTS_C+= qsort_s_test +ATF_TESTS_C+= quick_exit_test ATF_TESTS_C+= set_constraint_handler_s_test ATF_TESTS_C+= strfmon_test ATF_TESTS_C+= tsearch_test diff --git a/lib/libc/tests/stdlib/quick_exit_test.c b/lib/libc/tests/stdlib/quick_exit_test.c new file mode 100644 index 000000000000..9feed8a6fa63 --- /dev/null +++ b/lib/libc/tests/stdlib/quick_exit_test.c @@ -0,0 +1,81 @@ +/*- + * Copyright (c) 2023 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include + +#include + +static void func_a(void) +{ + if (write(STDOUT_FILENO, "a", 1) != 1) + _Exit(1); +} + +static void func_b(void) +{ + if (write(STDOUT_FILENO, "b", 1) != 1) + _Exit(1); +} + +static void func_c(void) +{ + if (write(STDOUT_FILENO, "c", 1) != 1) + _Exit(1); +} + +static void child(void) +{ + // this will be received by the parent + printf("hello, "); + fflush(stdout); + // this won't, because quick_exit() does not flush + printf("world"); + // these will be called in reverse order, producing "abc" + if (at_quick_exit(func_c) != 0 || + at_quick_exit(func_b) != 0 || + at_quick_exit(func_a) != 0) + _Exit(1); + quick_exit(0); +} + +ATF_TC_WITHOUT_HEAD(quick_exit); +ATF_TC_BODY(quick_exit, tc) +{ + char buf[100] = ""; + ssize_t len; + int p[2], wstatus = 0; + pid_t pid; + + ATF_REQUIRE(pipe(p) == 0); + pid = fork(); + if (pid == 0) { + if (dup2(p[1], STDOUT_FILENO) < 0) + _Exit(1); + (void)close(p[1]); + (void)close(p[0]); + child(); + _Exit(1); + } + ATF_REQUIRE_MSG(pid > 0, + "expect fork() to succeed"); + ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0), + "expect to collect child process"); + ATF_CHECK_EQ_MSG(0, wstatus, + "expect child to exit cleanly"); + ATF_CHECK_MSG((len = read(p[0], buf, sizeof(buf))) > 0, + "expect to receive output from child"); + ATF_CHECK_STREQ("hello, abc", buf); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, quick_exit); + return (atf_no_error()); +} From nobody Tue Sep 26 20:30:04 2023 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 4RwBFC5MXYz4vcWY; Tue, 26 Sep 2023 20:30:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwBFC4rYLz3Xrf; Tue, 26 Sep 2023 20:30:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695760207; 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=H2dB1DFOlqeetxZr439AHJuaFD8nDA5+IR//28eWd6c=; b=gbirgoOg4VZlQ+G+GST3Q29YfbbRLF4Fc4dRexbwkMUNeJxq7WGiWmXdoof8CgMN5N/Ev6 h8Q/ebGcnsfZTJgEk1oj5gNngxR+0YtkgIyR9ipXt44ER/p5Z3NUDjnFPMk5WSvPOJep+4 h+gaGRTfLivpJApRgXrUdsCmDRW+xFDT9Sp/KxSgfynd6Nr/69s3PMqmg6ZU87g3KrvMhl iC2t5xSPyqtwIpvfZJfOuVlURNi9P685PYcPXkECBgmydhy+bgFxItMYgCwiGgIfHAlEdB 4BVvNra3tdgV897zpgcN15YhwMvMNunxY3igr74FT1jTdbV0aYpD2eVh5os8iA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695760207; a=rsa-sha256; cv=none; b=JsA+O5haMe2nmt8Wv4fo4opkgJjzAhNY5/RbbyNPxpW4hJ/8WqdMEQqnmxC4ksDDxr7zMX oMFwM4Dyt2/2czQ2hcu0mYNUJHTBSg7JqB06+qRNlJbHkDEdkjELr+GM3vtOxHpDk9PQi6 UkyPf2NzUVxfKf5LcUI/d7A3LWNfbmn+r9uudKEIaB3W0KKOnFey1YCqfqJbW7A1UNkxWQ 2ESf57RNHWR1TEfXreV/JDsNlDJtLDWyyjQ1mfZ5wkNWRPR9SObZXRC78YZcKfxSEDoO34 OVj0pNMFTRCqn8EJe5b3Mpz5oYGtETg2TI9AxjBS14iB7+QjVeSgftX6goWVrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695760207; 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=H2dB1DFOlqeetxZr439AHJuaFD8nDA5+IR//28eWd6c=; b=gfc6D2reZxpRvWuWR0Y0DRUmqXz9rjvMjQLdRd4ezl4S5Bqy7ngoiBN2XlH8no7zYAzAuz fYf8m0YOBeu41JwMjB87JM83cKIMHp7wFaMegVkjqV2ip1ANTtusYkh0kuEKos5ZXxYl0M 60lEAyAhnlpicpvyWxY+T2SDkff7RujxDufCgIgZPXgDvxVbBwMaTgA1sW3nzroxAT4Bvo tkigxLbSiqOzXHTy1O4TCk29dc+6twtbCk1FK4XkOJkb2BugX5FP4byCTC87NubMmnecU2 DDFWklAsO9un4Dr6WO15on+NHojL3SchDMZyJIB1D6KaGl4kseiMZ6fJf8ZCQA== Received: from [IPV6:2601:648:8683:39a0:eccf:1992:2e64:f508] (unknown [IPv6:2601:648:8683:39a0:eccf:1992:2e64:f508]) (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 4RwBFB3TvzzqVv; Tue, 26 Sep 2023 20:30:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <6964df82-7e4a-36a6-bb83-a8985dbeb01d@FreeBSD.org> Date: Tue, 26 Sep 2023 13:30:04 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: git: f1c5a2e3a625 - main - virtio_random: Pipeline fetching the data Content-Language: en-US To: Andrew Turner Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202309051600.385G0Bmk031832@gitrepo.freebsd.org> <8B2042EF-728E-4A8A-8878-640B3097191E@fubar.geek.nz> From: John Baldwin In-Reply-To: <8B2042EF-728E-4A8A-8878-640B3097191E@fubar.geek.nz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/26/23 7:08 PM, Andrew Turner wrote: > Is there a plan to MFC this to 14? Without it I’m seeing 50% CPU on a dual core arm64 Hetzner VM. > > Andrew I can merge it sure, I've just been AFK most of last week and am still catching up a bit. >> On 5 Sep 2023, at 17:00, John Baldwin wrote: >> >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=f1c5a2e3a625053e2b70d5b1777d849a4d9328f2 >> >> commit f1c5a2e3a625053e2b70d5b1777d849a4d9328f2 >> Author: John-Mark Gurney >> AuthorDate: 2023-09-05 15:59:43 +0000 >> Commit: John Baldwin >> CommitDate: 2023-09-05 15:59:43 +0000 >> >> virtio_random: Pipeline fetching the data >> >> Queue an initial fetch of data during attach and after every read >> rather than synchronously fetching data and polling for completion. >> >> If data has not been returned from an previous fetch during read, >> just return EAGAIN rather than blocking. >> >> Co-authored-by: John Baldwin >> >> Reviewed by: markj >> Differential Revision: https://reviews.freebsd.org/D41656 >> --- >> sys/dev/virtio/random/virtio_random.c | 73 +++++++++++++++++++++-------------- >> 1 file changed, 43 insertions(+), 30 deletions(-) >> >> diff --git a/sys/dev/virtio/random/virtio_random.c b/sys/dev/virtio/random/virtio_random.c >> index c02b5c98cece..d54e2e6b70d4 100644 >> --- a/sys/dev/virtio/random/virtio_random.c >> +++ b/sys/dev/virtio/random/virtio_random.c >> @@ -54,6 +54,8 @@ struct vtrnd_softc { >> struct virtqueue *vtrnd_vq; >> eventhandler_tag eh; >> bool inactive; >> + struct sglist *vtrnd_sg; >> + uint32_t *vtrnd_value; >> }; >> >> static int vtrnd_modevent(module_t, int, void *); >> @@ -67,6 +69,7 @@ static int vtrnd_negotiate_features(struct vtrnd_softc *); >> static int vtrnd_setup_features(struct vtrnd_softc *); >> static int vtrnd_alloc_virtqueue(struct vtrnd_softc *); >> static int vtrnd_harvest(struct vtrnd_softc *, void *, size_t *); >> +static void vtrnd_enqueue(struct vtrnd_softc *sc); >> static unsigned vtrnd_read(void *, unsigned); >> >> #define VTRND_FEATURES 0 >> @@ -138,12 +141,17 @@ static int >> vtrnd_attach(device_t dev) >> { >> struct vtrnd_softc *sc, *exp; >> + size_t len; >> int error; >> >> sc = device_get_softc(dev); >> sc->vtrnd_dev = dev; >> virtio_set_feature_desc(dev, vtrnd_feature_desc); >> >> + len = sizeof(*sc->vtrnd_value) * HARVESTSIZE; >> + sc->vtrnd_value = malloc_aligned(len, len, M_DEVBUF, M_WAITOK); >> + sc->vtrnd_sg = sglist_build(sc->vtrnd_value, len, M_WAITOK); >> + >> error = vtrnd_setup_features(sc); >> if (error) { >> device_printf(dev, "cannot setup features\n"); >> @@ -174,6 +182,8 @@ vtrnd_attach(device_t dev) >> sc->inactive = false; >> random_source_register(&random_vtrnd); >> >> + vtrnd_enqueue(sc); >> + >> fail: >> if (error) >> vtrnd_detach(dev); >> @@ -185,6 +195,7 @@ static int >> vtrnd_detach(device_t dev) >> { >> struct vtrnd_softc *sc; >> + uint32_t rdlen; >> >> sc = device_get_softc(dev); >> KASSERT( >> @@ -197,7 +208,13 @@ vtrnd_detach(device_t dev) >> sc->eh = NULL; >> } >> random_source_deregister(&random_vtrnd); >> + >> + /* clear the queue */ >> + virtqueue_poll(sc->vtrnd_vq, &rdlen); >> + >> atomic_store_explicit(&g_vtrnd_softc, NULL, memory_order_release); >> + sglist_free(sc->vtrnd_sg); >> + zfree(sc->vtrnd_value, M_DEVBUF); >> return (0); >> } >> >> @@ -251,49 +268,45 @@ vtrnd_alloc_virtqueue(struct vtrnd_softc *sc) >> return (virtio_alloc_virtqueues(dev, 0, 1, &vq_info)); >> } >> >> +static void >> +vtrnd_enqueue(struct vtrnd_softc *sc) >> +{ >> + struct virtqueue *vq; >> + int error __diagused; >> + >> + vq = sc->vtrnd_vq; >> + >> + KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); >> + >> + error = virtqueue_enqueue(vq, sc, sc->vtrnd_sg, 0, 1); >> + KASSERT(error == 0, ("%s: virtqueue_enqueue returned error: %d", >> + __func__, error)); >> + >> + virtqueue_notify(vq); >> +} >> + >> static int >> vtrnd_harvest(struct vtrnd_softc *sc, void *buf, size_t *sz) >> { >> - struct sglist_seg segs[1]; >> - struct sglist sg; >> struct virtqueue *vq; >> - uint32_t value[HARVESTSIZE] __aligned(sizeof(uint32_t) * HARVESTSIZE); >> + void *cookie; >> uint32_t rdlen; >> - int error; >> - >> - _Static_assert(sizeof(value) < PAGE_SIZE, "sglist assumption"); >> >> if (sc->inactive) >> return (EDEADLK); >> >> - sglist_init(&sg, 1, segs); >> - error = sglist_append(&sg, value, *sz); >> - if (error != 0) >> - panic("%s: sglist_append error=%d", __func__, error); >> - >> vq = sc->vtrnd_vq; >> - KASSERT(virtqueue_empty(vq), ("%s: non-empty queue", __func__)); >> - >> - error = virtqueue_enqueue(vq, buf, &sg, 0, 1); >> - if (error != 0) >> - return (error); >> - >> - /* >> - * Poll for the response, but the command is likely already >> - * done when we return from the notify. >> - */ >> - virtqueue_notify(vq); >> - virtqueue_poll(vq, &rdlen); >> >> - if (rdlen > *sz) >> - panic("%s: random device wrote %zu bytes beyond end of provided" >> - " buffer %p:%zu", __func__, (size_t)rdlen - *sz, >> - (void *)value, *sz); >> - else if (rdlen == 0) >> + cookie = virtqueue_dequeue(vq, &rdlen); >> + if (cookie == NULL) >> return (EAGAIN); >> + KASSERT(cookie == sc, ("%s: cookie mismatch", __func__)); >> + >> *sz = MIN(rdlen, *sz); >> - memcpy(buf, value, *sz); >> - explicit_bzero(value, *sz); >> + memcpy(buf, sc->vtrnd_value, *sz); >> + >> + vtrnd_enqueue(sc); >> + >> return (0); >> } >> >> > -- John Baldwin From nobody Tue Sep 26 20:30:17 2023 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 4RwBFf29wnz4vchX for ; Tue, 26 Sep 2023 20:30:30 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwBFf0Jpjz3YQL for ; Tue, 26 Sep 2023 20:30:29 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-405361bba99so93756465e9.2 for ; Tue, 26 Sep 2023 13:30:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695760228; x=1696365028; 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=dcuRRZgG3zDckkQjUeveCY3vE4jpILmwyZHLLSLfZc0=; b=CFrOGo1M5cHuTNqWWSvgG2ehUPuvtciaV1AfYgf6JxfT5e5XfcE5znk9zDpY8BegTp wdKsrjmBsJzIitnoXxnmdaUQF949qKhyK369lvD+bXeENGaBCRYtuiAmr3GPggwZCNqD 6C98As7AIgnYbonMxFYeZ48eFuPjPjFhpcMVGbtHC6OVsDKhJEG+2XzIMfZ8r2IX0OGU aNBybvI5QpEkM5/sT8pZdOJADMqF1v1HmVIkngpEJ0tFXmcDRDrvgmHM7gZgG33g4qlp X9n77LVYTfc8KqVWosnU6eb6i2DGHJqJuJlE9OHywTDb/+WQivqHitvz5A9xfICS2GDG wTLA== X-Gm-Message-State: AOJu0YwCzt2qcvqVZaF6N5JJqSnPYcdbqKoK5yXmCDxn9srAtwQTQMIW keRj8ZJf9+Zyt5bdJ+CLNeiERQ== X-Google-Smtp-Source: AGHT+IFtMZp6bBX4T3ULDrJTGkUZ27n7LAGdeWdHsuk/SNzHs7o5EknZ6WaoFHspHE7HXxC3U3+j0A== X-Received: by 2002:adf:f192:0:b0:321:4de3:fd5c with SMTP id h18-20020adff192000000b003214de3fd5cmr9755629wro.51.1695760228382; Tue, 26 Sep 2023 13:30:28 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id b1-20020a5d4d81000000b003140f47224csm15417512wru.15.2023.09.26.13.30.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2023 13:30:28 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: c7dd4601aeeb - main - libc: Add a rudimentary test for quick_exit(3). From: Jessica Clarke In-Reply-To: <202309262026.38QKQY4A083001@gitrepo.freebsd.org> Date: Tue, 26 Sep 2023 21:30:17 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <3FB4642C-6B3D-4125-8E71-F99D61FF0B16@freebsd.org> References: <202309262026.38QKQY4A083001@gitrepo.freebsd.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4RwBFf0Jpjz3YQL Jess > On 26 Sep 2023, at 21:26, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > The branch main has been updated by des: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc7dd4601aeebbc1bbe131cbe6747476c= 124b47fe >=20 > commit c7dd4601aeebbc1bbe131cbe6747476c124b47fe > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2023-09-26 20:07:03 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2023-09-26 20:07:10 +0000 >=20 > libc: Add a rudimentary test for quick_exit(3). >=20 > Sponsored by: Klara, Inc. > Reviewed by: kib > Differential Revision: https://reviews.freebsd.org/D41937 > --- > lib/libc/tests/stdlib/Makefile | 1 + > lib/libc/tests/stdlib/quick_exit_test.c | 81 = +++++++++++++++++++++++++++++++++ > 2 files changed, 82 insertions(+) >=20 > diff --git a/lib/libc/tests/stdlib/Makefile = b/lib/libc/tests/stdlib/Makefile > index a2a6420aba41..860e530389df 100644 > --- a/lib/libc/tests/stdlib/Makefile > +++ b/lib/libc/tests/stdlib/Makefile > @@ -12,6 +12,7 @@ ATF_TESTS_C+=3D qsort_b_test > ATF_TESTS_C+=3D qsort_r_compat_test > ATF_TESTS_C+=3D qsort_r_test > ATF_TESTS_C+=3D qsort_s_test > +ATF_TESTS_C+=3D quick_exit_test > ATF_TESTS_C+=3D set_constraint_handler_s_test > ATF_TESTS_C+=3D strfmon_test > ATF_TESTS_C+=3D tsearch_test > diff --git a/lib/libc/tests/stdlib/quick_exit_test.c = b/lib/libc/tests/stdlib/quick_exit_test.c > new file mode 100644 > index 000000000000..9feed8a6fa63 > --- /dev/null > +++ b/lib/libc/tests/stdlib/quick_exit_test.c > @@ -0,0 +1,81 @@ > +/*- > + * Copyright (c) 2023 Klara, Inc. > + * > + * SPDX-License-Identifier: BSD-2-Clause > + */ > + > +#include > + > +#include > +#include > +#include > + > +#include > + > +static void func_a(void) > +{ > + if (write(STDOUT_FILENO, "a", 1) !=3D 1) > + _Exit(1); > +} > + > +static void func_b(void) > +{ > + if (write(STDOUT_FILENO, "b", 1) !=3D 1) > + _Exit(1); > +} > + > +static void func_c(void) > +{ > + if (write(STDOUT_FILENO, "c", 1) !=3D 1) > + _Exit(1); > +} > + > +static void child(void) > +{ > + // this will be received by the parent style(9) is to only do C-style /* */ comments. Jess From nobody Tue Sep 26 22:01:00 2023 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 4RwDG42pblz4vjRS; Tue, 26 Sep 2023 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwDG42N0fz4Cx9; Tue, 26 Sep 2023 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695765660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjSSswkXILzlYpzvJODt/EtyBPCq/ob+RLfXGjBW2k8=; b=tGAEbE+gahK6OzrQb5t12nphh65LQsMPmDXZXl70ooxK+tKnkC1FMw6w8Mp++9Sx3hcq5K N6Ri8QBwbX+pLtU4k5fCxNIJhb/Zsw9dktTtmy5DjzdX0om3UO9E3I3B+MtSEHono0t+cd vOaAX66/Adrd4RbJP6msTzNc1O+9nPevPIND4oLQCMInd39EVFJjotIJzkEQL87Kkyh70C FRCz8A4lOziuTiKKY5T1s8COBknpYb0FOxXuas/OPkSVf6BSmOPFqgIskma0D5t2k7z3dl agrpODool7N0q142Jt8z/i5fBzmSv9WKLzGE9w93YQqKty1kT5FyTNBoHjC5CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695765660; a=rsa-sha256; cv=none; b=aK5+h2A7Z+fFEm6qTmIE3/kJhyeaiGEMmQ6f1JB/Q3+OhKv+T3I/WFSOu+kZH8W44QMrTI igjE17C+rY72hIH0bcOs4E6oItxt+7jeZsrXzAJLDk4rjw/b/LxpEFqM6WqOpckytLCfX7 TF+mpxVWAwYyWxn/nktQHh9q31WCUEwyX6H8AYezn7ytAC/1/+A34X9NKTRSJbG1UH7J8y Xk+KNg/72oaxrCSV5KCzGv5xC/hjwGWElgwYJwbSEAXflLNfQ5j4y64VZyr+F71uUV+Ki/ 2yy1NHWU7O+AnL7g3RK+bxb1H4JY7bZ+ogPvuWxEgM8dFfYCHyxLGcsHO+dM0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695765660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sjSSswkXILzlYpzvJODt/EtyBPCq/ob+RLfXGjBW2k8=; b=wEv/ZJuW6AOjgBgat2Q78maSnaRYLyNVvp8nTUinaNy2bdoqWha6BaZHHP06x+xYpJhxwr UrZJJtyIhZwDQc6StPat5LEBtbRSt5VFkZuwUjsVa4Da9qB5IpyUXkWPE6Ab/xbGoi4siK DIc5sLChF2fxrVJ6FniHyMb/qnzdxublrtWVqjPE3b2CXl2WVoHLbw25BvKzJJ/53ewY8r ZHuk6MF/jM5ADFzcqA14MYQvwKwMq8LIOFEitynWRA34aPh/sTjDzwpKyaRUGKdEFRBcYj 7taKZQSFrJek/2+ELhVVUgs2eotqxH2yizQI8GJ7XnhWNoZozjM33hzXOl11gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwDG41QLXz1Cc9; Tue, 26 Sep 2023 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38QM10kD043788; Tue, 26 Sep 2023 22:01:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38QM10fK043785; Tue, 26 Sep 2023 22:01:00 GMT (envelope-from git) Date: Tue, 26 Sep 2023 22:01:00 GMT Message-Id: <202309262201.38QM10fK043785@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: d06328c37bbc - main - arch.7: fix final 12.x release as 12.4 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: d06328c37bbcf3d3d3c7601372d29237996a6f6a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d06328c37bbcf3d3d3c7601372d29237996a6f6a commit d06328c37bbcf3d3d3c7601372d29237996a6f6a Author: Ed Maste AuthorDate: 2023-09-26 13:30:06 +0000 Commit: Ed Maste CommitDate: 2023-09-26 22:00:42 +0000 arch.7: fix final 12.x release as 12.4 arm (pre-v6/v7) and sparc64 listed 12.x as the final release. 12.4 is the final 12.x release so we can fix the version number. --- share/man/man7/arch.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 14c6af612087..35a7b0246389 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -101,7 +101,7 @@ Discontinued architectures are shown in the following table. .Bl -column -offset indent "Architecture" "Initial Release" "Final Release" .It Sy Architecture Ta Sy Initial Release Ta Sy Final Release .It alpha Ta 3.2 Ta 6.4 -.It arm Ta 6.0 Ta 12.x +.It arm Ta 6.0 Ta 12.4 .It armeb Ta 8.0 Ta 11.4 .It ia64 Ta 5.0 Ta 10.4 .It mips Ta 8.0 Ta 13.x @@ -115,7 +115,7 @@ Discontinued architectures are shown in the following table. .It mips64hf Ta 12.0 Ta 13.x .It pc98 Ta 2.2 Ta 11.4 .It riscv64sf Ta 12.0 Ta 13.x -.It sparc64 Ta 5.0 Ta 12.x +.It sparc64 Ta 5.0 Ta 12.4 .El .Ss Type sizes All From nobody Wed Sep 27 11:01:50 2023 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 4RwYb24Zplz4vJHX; Wed, 27 Sep 2023 11:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwYb2472pz3g51; Wed, 27 Sep 2023 11:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sECHU9bayvH4URguCVP7dxSb+CERq5+0FXu7XplDQ6E=; b=v3CFlByVJehNXEk/tShKHoA+ltJKZilyNG89FrYSNjPkFePy/X56NgQphag7f/Y+bjMkxy GzClZc80N2bj0ZhcxgSuuIhp458xTO377i5cetBE0jnrrjG1rm9lRkpWndh2RsnNoMoIHU MZ7jUwEj9es3O6LK6cS0qJLhbX/68VBSzPwnqxhnMEj7dUitI7WgBc+HKLlrAf3IM2hoiK 24rX8LRtZC0QIE3aFIVtkhqx5lrvWV6+SBpp6ev3RWsinmb3WSmT01daYhkpy0Jxg9XLN5 DAMPg5XOEtaZw/p/9vpOU4AclzZCSC3+PdIB0WlT+zproaUtvrk6o0MALuyInA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695812510; a=rsa-sha256; cv=none; b=AH4yw5jYTYxyFYs73agwLtDeMlS3zm6LpvXaUiwNcR8v6H8hD358fVVUObJB9W30V/gW4a zfAaTFR/UGIuHACIxChplPOP/Z1G3o6S/1rbtY8FvnaFfpnLsSce2tNAp3YSyivN2YoXzD YLWmSnbZ1Mireghy9yGxrYT0gfi/9tVJeVGJPko8Tm3Lv5vxMDuww1fSayG6QxTIs+jp+q 6rWkuoZvJWeG3ehJ/ICOQWddS+rgkL7tFZc0STeNKSQyvf9PF7FVt85jmAh8lDDcC5bC+B Qkn9o+ndVdKOZg2X7XuxfrhmyT2kkxYEZr9HGN+MotjMml115BLxxWjTxDPQ1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sECHU9bayvH4URguCVP7dxSb+CERq5+0FXu7XplDQ6E=; b=IFMNw1kkXA7MDv7kN9iX52NHmwIzkPEVAsIfUcF3IF7YDamp/6tGaY6AkxFDYCiITRRB/Z Fw60JaYt6zKBtPsYKTf/gc+wHtuLeB+Lki82c1Xx189HRnBNwcXi2xSCjIX/2QNPF0JgV1 /36+87pvbzDJkf+zOVSqxZbslmQ8PCx+a6/9i2LjLe14ewdQriCZ/ioVPCG48w9YRcQ8Db bMlhTs+BtiM0t1mQRwlLEMtKCha8Y8lHecN0DnBSmGjmuoOMlPuq5epODtiwpr/MWMhlHY gjFqVvsEKkDlF5nHBvBwse9gIgheaYudph1m1DYjHjkKawRQGh3Rl39TbLwp7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwYb23DB9zcZ1; Wed, 27 Sep 2023 11:01:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RB1oER038326; Wed, 27 Sep 2023 11:01:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RB1oth038323; Wed, 27 Sep 2023 11:01:50 GMT (envelope-from git) Date: Wed, 27 Sep 2023 11:01:50 GMT Message-Id: <202309271101.38RB1oth038323@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 0ec1bbe579fa - main - stress2: Cap total 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ec1bbe579fa1b81cbb6b7dbbbea38397a56274a Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=0ec1bbe579fa1b81cbb6b7dbbbea38397a56274a commit 0ec1bbe579fa1b81cbb6b7dbbbea38397a56274a Author: Peter Holm AuthorDate: 2023-09-27 10:58:39 +0000 Commit: Peter Holm CommitDate: 2023-09-27 10:58:39 +0000 stress2: Cap total runtime --- tools/test/stress2/misc/radix.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test/stress2/misc/radix.sh b/tools/test/stress2/misc/radix.sh index fa85512c79c5..b102c09aca92 100755 --- a/tools/test/stress2/misc/radix.sh +++ b/tools/test/stress2/misc/radix.sh @@ -46,14 +46,14 @@ mycc -o radix -Wall -Wextra radix.c || exit 1 rm -f radix.c cd $odir -set -e +set -u trap "rm -f rendezvous" EXIT INT parallel=1 usermem=`sysctl hw.usermem | sed 's/.* //'` pagesize=`pagesize` start=`date +%s` while true; do - timeout 2m /tmp/radix $parallel > $log; s=$? + timeout 20m /tmp/radix $parallel > $log; s=$? [ $s -eq 124 ] && { echo "Timed out"; break; } [ $s -ne 0 ] && cat $log used=`awk '{print $4}' < $log` @@ -63,7 +63,7 @@ while true; do [ $parallel -eq 1 ] && parallel=$((usermem / pagesize / used)) parallel=$((parallel + 1)) - echo "`date +%T` parallel=$parallel" # XXX + [ $parallel -gt 10 ] && parallel=10 done cat /tmp/radix.log From nobody Wed Sep 27 11:01:51 2023 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 4RwYb36jRvz4vJBR; Wed, 27 Sep 2023 11:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwYb35zrLz3gKY; Wed, 27 Sep 2023 11:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ZTKZeICMi3Ynd1TH5SN6BK1Fq4mGAchHmeeqjANYGw=; b=b+PmvWgpKgn/M9rxF0NY/raD1IU0227i6SMynLcjYxsZBKUEsfWHPPA/NnSrWTgVvYdL0A U18yqVyCMVkN/c6qbnZimsyjamG+Ici36eUAhjx+ToNQ11N2i/m/T3nehEDpPpgJ5TzRvc 6NUn8HxSrpwmx7bkAW7D4BLmwg6vZ0ft68+BS6T+cHcyV5j9s61nwB4+QCf23C3yKXuATI VVK7NVJY2F313vZ+DGWgi3MvSp8wVdXn0SSroBzz0lm4MHASemCipyPq8JhfwvgHZIPRuP fbfBBeKOpuynEZMB4ue3+tBwkN4jHnnlabCceTpcwbFclM4GPhkr6aibpgH1Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695812511; a=rsa-sha256; cv=none; b=SyJDzVRdpINDLjAj96ZlfnJuJBuXbh8PqAwuFM5QTy92iZSa8uQdh9s9KdfEEmLD34BMB3 QzUyeqenzU3fR+O1htJEwm8No9/DvKPAQbU06rNy+RURg6whDzd8khmTpx+t3RsRv9YLBc bl8fn5G+2V472hFp2sojQu/1kiUUnzNvtnvkLIRqdk70KRm6nM3HiUhjVOFDq2egb5+zm9 2D5lbMiMs1Nv8o2kkHoDI7yiA0XeLw1JOSffloSQFs0jpKY7PPcCF1Ri0DdUNzNEVYQXOs z2R0FBSmWDqzbh9Fw05yDILEdiNeqXRKuOo87q5CTOFzCRtoeiD4dllGvEICYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ZTKZeICMi3Ynd1TH5SN6BK1Fq4mGAchHmeeqjANYGw=; b=U+iKWLOXHKSWLCqo8xOxXVWHKWsLxfGVJAModuTZ0E1YMFcxYhk1r83PLSUkdNcvVbSPun ubH9jX7lQoD+ayP9FTt/WZS2NrqiIFzNydNVDOGrwC41AqCuNVAxUajCnh5rqkka3YwSls V2LL1Yp952LDa8FHTafHgYemJ5UgfCQH681Gy5s6egjL8Q253tILs1dwu7QuaLD9S62DOF tmCgpbIekxw4JPsB2BQtavfOKuzk15dRfsd+8d6hJmSGIvuyNPQfSkokD8NFEY45aWSvVF D8RhQmMvpCWP5Q6P6jQ07xKZ6gkekoVI5bVIEU2nbxaHBd5Fh+x0hfAmWYNjPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwYb34QF9zcjK; Wed, 27 Sep 2023 11:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RB1plb038374; Wed, 27 Sep 2023 11:01:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RB1pnO038371; Wed, 27 Sep 2023 11:01:51 GMT (envelope-from git) Date: Wed, 27 Sep 2023 11:01:51 GMT Message-Id: <202309271101.38RB1pnO038371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 0f35fd33479c - main - stress2: Remove tests from the exclude list 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f35fd33479c863889bbcb2cab036687910f5fed Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=0f35fd33479c863889bbcb2cab036687910f5fed commit 0f35fd33479c863889bbcb2cab036687910f5fed Author: Peter Holm AuthorDate: 2023-09-27 11:00:01 +0000 Commit: Peter Holm CommitDate: 2023-09-27 11:00:01 +0000 stress2: Remove tests from the exclude list --- tools/test/stress2/misc/all.exclude | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 2560b22149d5..f7b1a9613670 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -51,7 +51,6 @@ pmc8.sh panic: [pmc,2749] (ri21, rc1) waiting too long for pmc to ... 20210621 rename14.sh https://people.freebsd.org/~pho/stress/log/log0433.txt 20230409 sctp2.sh panic: Queues are not empty when handling SHUTDOWN-COMPLETE 20210211 sctp3.sh panic: Queues are not empty when handling SHUTDOWN-COMPLETE 20210211 -sendfile25.sh WiP 20200611 signal.sh Timing issues. Needs fixing 20171116 snap8.sh https://people.freebsd.org/~pho/stress/log/log0123.txt 20211008 suj12.sh Waiting for fix 20230319 @@ -66,7 +65,6 @@ systrace2.sh WiP 20200227 syzkaller16.sh zonelimit issue 20210722 syzkaller28.sh panic: About to free ctl:0x... so:0x... and its in 1 20201120 syzkaller31.sh panic: Bad tailq NEXT(0xfffffe01a0899430->tqh_last) != NULL 20220420 -syzkaller55.sh panic: Counter goes negative 20220525 syzkaller59.sh Page fault 20220625 syzkaller65.sh panic: in_pcblookup_hash_locked: invalid local address 20230318 syzkaller66.sh panic: in_pcbconnect: inp is already connected 20230621 @@ -75,7 +73,6 @@ truss3.sh WiP 20200915 # Test not to run for other reasons: -fuzz.sh A know issue marcus3.sh OK, but runs for a long time statfs.sh Not very interesting vunref.sh No problems ever seen From nobody Wed Sep 27 11:01:52 2023 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 4RwYb46tXQz4vJHf; Wed, 27 Sep 2023 11:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwYb46KTTz3gF9; Wed, 27 Sep 2023 11:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1dWoruXVPfOKnsmtpW7Hv3p8+VeZsKC24TKpYPrjiP8=; b=Kca+lqxKuP1wk11CS0HomuagY103RdPb+Z7EboJJdH3vi8ULQKr7iINMi0qHHgrdmjKwQw PEw1addtfUvdQlKV4sFP9Q+cCMUIUudpfEiS0drPnYPTWm1xn8ZaS7yl0hdbnyKznk1t5W nbSc+mOlEjEPD0+xyAkVMie7pMvsuz2zO4MYHjaKMqj0ZOn2bf9x8b+s/VYvq+f4lp9Rx5 M+xmVQyEn2TzLTMx9cIU9Z2mWVN4g6N3QwY1gsv5xTm+OQgSBPD6domu/F6up9KiG9kj3o 27TH7ui1je/7k41y4hHaxCAdeWfittg+QLxPj8CPNePsD4w9gTEw4i44/NxKJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695812512; a=rsa-sha256; cv=none; b=XShjcM/oiSInKZ28rmJT6FRQNNrbaA+3GEmJepo3Gk2jf1KIwYO0Lo0/kkqQA9eaOoHzSf 7B7tRTfRArmioUTiEg7lqeggeNvjiQ3cd/qiNREP/FFNvTqu69EzgdHh7K8SO3145HkpsW AFJ1Gmh+MjlS777RNBpB1rEMJmcu91BzdhCr/p9wQwdh3q7yuaWyz02rqILXO++k6kBbQK R+SLnGf1XCfpZmfGtFXx5T8Mu2dyE5tuamMPrI+ZS1eOkrqqEtI53spQeCHUIk1ukcT4tc je70rX2hp5NW3h27jF+OEVGRa8AUWe6OvsJx9C+SD8NTBvfXHbgEyH7EJb3iGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695812512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1dWoruXVPfOKnsmtpW7Hv3p8+VeZsKC24TKpYPrjiP8=; b=QTVLSNOzt7HDguab6nvI/ZgbdVuAx/iFmqWEv17gbquibc6DyW7b47hheeW5d3A8DuhNBY mi/9XTCV04OTBeZ1oF/iE/G9xZ2Y8uo+EciLyNAqcP7FLPd3smLsF6zBq4Sj5wYV1Srn11 MtODlmde8yiqHS1sKW06E1X1b55TrZjF8PP++sxKP1qKCN7z28sqI5gN1kq8Mt9852jkfG ZyVh3ilItPjkKE4q1PwRbrq2ttm7OBU+kRx5J+R832u8gUlJ5V6z6S+LrskUqJ13qnc8AH VOUNaoEvvCnFsOYDPtQotnDPHIuR0QjY5JA12rikB3hJy5Uy2f4R1C8OtS97DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwYb45RJCzcTL; Wed, 27 Sep 2023 11:01:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RB1qM3038436; Wed, 27 Sep 2023 11:01:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RB1qat038433; Wed, 27 Sep 2023 11:01:52 GMT (envelope-from git) Date: Wed, 27 Sep 2023 11:01:52 GMT Message-Id: <202309271101.38RB1qat038433@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 2b716e00cf3b - main - stress2: Extent timeout limit to avoid false positive errors 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b716e00cf3b59acbb5242f4b0695db84d2948af Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=2b716e00cf3b59acbb5242f4b0695db84d2948af commit 2b716e00cf3b59acbb5242f4b0695db84d2948af Author: Peter Holm AuthorDate: 2023-09-27 11:01:00 +0000 Commit: Peter Holm CommitDate: 2023-09-27 11:01:00 +0000 stress2: Extent timeout limit to avoid false positive errors --- tools/test/stress2/misc/newfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/newfs.sh b/tools/test/stress2/misc/newfs.sh index 44c76f78b599..252629c04b90 100755 --- a/tools/test/stress2/misc/newfs.sh +++ b/tools/test/stress2/misc/newfs.sh @@ -78,8 +78,8 @@ for opt in -O1 -O2 -U -j; do done blocksize=$((blocksize * 2)) done - if [ $((`date '+%s'` - start)) -gt 1200 ]; then - echo "Timed out" + if [ $((`date '+%s'` - start)) -gt 1800 ]; then + echo "Timed out in $opt" s=4 break fi From nobody Wed Sep 27 12:36:55 2023 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 4Rwbhl3jzXz4vP7J; Wed, 27 Sep 2023 12:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwbhl37MDz4NwP; Wed, 27 Sep 2023 12:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8L898ye5CXTqMSHfLS/nw/e22dIQrXrdE79TjWPOt8=; b=jbuMZeeBH7LS+ACm9QH/9VCEG4+fxWpni0rjq9zVQGWHzI/CXNJkTURWHKVQNomV1nwGqv Km9Pioj+v4HPBYOUEr95KFMU19/6b3ns/vJVMKLVhUfx1SooNxD1g1uvmoScaYos26z6nI Ja4UzyIgjFaUP8WOe1gzpCE4AyrBeQkX577+aQ9UTPHhlf6dIr7ngl6//Fx2t5PX98i67p xxhmLVZyUNG64WpYeLwIc2Y1HZMpVBcA6PtHVCLAdppfxUbSW7BLdZF2S9TqLkrmsdgCjk +nLHIxTq6oihQeY2BwrubBv7MpVZhp/C5CR2NwbrdkAgnhU9vDLaRviJdVzbdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818215; a=rsa-sha256; cv=none; b=N3VprlbHleAuQGwA5CYDF+CJOsBF6reyIZubPhTJlMQU6G89sofJQn0GAciZ9OtcG+bMq3 UMf6ycdhxpQHgVfwuOtm+YT45C0p6wnLGazADYUilfjXqj9E45EHCxJn9CWoJQw+gYDtqh HcToK3fo91ICqxGM7tMAxMgJlDdrDyoZjn5bL/rM9PfImIDyBnUQXr8Fo+ujdpy73vsbXR Uj/o1hFIIjnvvXpa8nfo+mPZ61L0yo+2Jk1TBsxfltul3PN2h8QAw0LaTKlx86ZKVTzEo2 mbHBl8gaQzWuMU3KEo1Qb94eocb3zT63mjHe9FgF2+lZfxzH1BKbhuVwrtVrjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S8L898ye5CXTqMSHfLS/nw/e22dIQrXrdE79TjWPOt8=; b=IaiOG5XLakd6ryK+YJaWV2LyPbNdwaqVufnx1++JbtVsPjgpRx5sk+wPgNYI5qN+yq64/7 R35n0DTp8oicWoYhTHW2CpiCpkxgfoPboRToWkEE9y8wgH7V+Rv2JERRATMvA6XD8vaQxf GG82FYnE0mfWTiyIvtSdhuJaGunN2fjwkdzlz+g8+xXhaRwR/vls7KpOCW3yQr9qw2dpc/ Il9dnV3wdkKiG3kn2McZz/CcRrNGxN+7UEhfxNvRth4cHU1jBSFZHNaVIOlseAQagIOLTP 3cusszSu4RnxDKJCJUOvsj1KqLAeHb0v8xlwkjHF//FOM+78uz2wThDzTv8Ndg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwbhl20HBzfh9; Wed, 27 Sep 2023 12:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCatmm091602; Wed, 27 Sep 2023 12:36:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCatc5091599; Wed, 27 Sep 2023 12:36:55 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:36:55 GMT Message-Id: <202309271236.38RCatc5091599@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: 015daf5221f7 - main - hdac: Defer interrupt allocation in hdac_attach() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 015daf5221f7588b9258fe0242cee09bde39fe21 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=015daf5221f7588b9258fe0242cee09bde39fe21 commit 015daf5221f7588b9258fe0242cee09bde39fe21 Author: Mark Johnston AuthorDate: 2023-09-27 12:23:58 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:28:27 +0000 hdac: Defer interrupt allocation in hdac_attach() hdac_attach() registers an interrupt handler before allocating various driver resources which are accessed by the interrupt handler. On some platforms we observe what appear to be spurious interrupts upon a cold boot, resulting in panics. Partially work around the problem by deferring irq allocation until after other resources are allocated. I think this is not a complete solution, but is correct and sufficient to work around the problems reported in the PR. PR: 268393 Tested by: Alexander Sherikov Tested by: Oleh Hushchenkov MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41883 --- sys/dev/sound/pci/hda/hdac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 422f7f930ea5..2cf9239499af 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1270,9 +1270,6 @@ hdac_attach(device_t dev) /* Allocate resources */ result = hdac_mem_alloc(sc); - if (result != 0) - goto hdac_attach_fail; - result = hdac_irq_alloc(sc); if (result != 0) goto hdac_attach_fail; @@ -1347,6 +1344,10 @@ hdac_attach(device_t dev) hdac_corb_init(sc); hdac_rirb_init(sc); + result = hdac_irq_alloc(sc); + if (result != 0) + goto hdac_attach_fail; + /* Defer remaining of initialization until interrupts are enabled */ sc->intrhook.ich_func = hdac_attach2; sc->intrhook.ich_arg = (void *)sc; From nobody Wed Sep 27 12:36:56 2023 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 4Rwbhm56hmz4vPgM; Wed, 27 Sep 2023 12:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwbhm481Dz4P0R; Wed, 27 Sep 2023 12:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrJvq7V8DZuk1uAggTkuWb56Pmo4HJ0NNzesQ9xKvyM=; b=gJN3+rAGnQNlOM2C5ED5UjsYKW3pqkAXnk8C62XQmtaSH4+331WpF6cjLO1gY+lmBIXS9v rW7Pez75dh8vGD8ByTcCu1S7o4Z27DVOQBgr7xr2ubJBWyPIBpmONkcP3p8KgQC2u7j80U H+7CjfMTUWAgUQrcmNAaimJyk6Zsnsmku7OuaEsGVZqiDo4N/0/EZIuxHsKLCmEcw9uNYy A6DgqT8Pj8oxhjwyqrBgQSKbeRjcqXmT9FuwfyJhmgUlvJcW6Y+xBN44q9cHiLuqBiaIOQ 2Y+/plKunsiEBTAsfWN4RszEDpzb+lSMZXID6p4Di6TuHvuYSqcsDaSn+RIrZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818216; a=rsa-sha256; cv=none; b=u1oYSJdH+MgCn5/n++6KqPGHrQc9MmLxxR4Z3bQojousOmqJ7DWodO0ZBvs1GwaBNRk1xK KgMHQkJ8+hBNkZI3ZDiEMWtctMi6rSUmEaCVYubcZ2VVfFhKOfgzOpjjribCgE1gI30BK9 b1VlIVZjRYgt3AettcF7kuNxJyfIRjfB3SF+5mRH8EW5Yq4v35BSVDDz0d6UGRHG8cYsEP Hxqo9futr+lc8T9HKqXTO4F1tp38lEWvRIqbxx/IJfPfNf7v8AYV8gNR2bk0M0XTRbpdml Y8FAoVnHVoIZQCzA7EzJQcjUgGv8Kz5e6+Z5boVIZdkbnNGfVEZe+c8srpghtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrJvq7V8DZuk1uAggTkuWb56Pmo4HJ0NNzesQ9xKvyM=; b=yqnfPYaAK5qSRWwVawWglJxFwcTI12nWbjXkeHMFWL9ig9eKEcyCfhuTTK2pLZM9MzTL08 w1xfkFp+/anhUrqP+05zr1LQ5XsanlNSZ8VSelpI1Cwu2en6wNijFvHLbG5kGjthomO76H WJA1Y9n8NHsyAn57iIReP3iERo5ICewZy+Hm2i9fOOoOZE2gwaBjGjflKe5KbLlWyGMr+0 eg8KLRZTX7+z7ccUHT5U2+fi2iDhGAmtuq7SBCJeJNeVU6B3+/aLH8UnABnS6aAKzEospH YayWKpDuMo2m1uKwryZ8Qj42Lilss2JH1OVAiueJOJOSQhhigqFvmGPUOri0XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwbhm2g8tzfsf; Wed, 27 Sep 2023 12:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCaudu091647; Wed, 27 Sep 2023 12:36:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCaugi091645; Wed, 27 Sep 2023 12:36:56 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:36:56 GMT Message-Id: <202309271236.38RCaugi091645@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: 61a14ddfe012 - main - unix: Fix a lock order reveral 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 61a14ddfe012ca7b57a101725e5c654269f200ca Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=61a14ddfe012ca7b57a101725e5c654269f200ca commit 61a14ddfe012ca7b57a101725e5c654269f200ca Author: Mark Johnston AuthorDate: 2023-09-27 12:24:11 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:29:34 +0000 unix: Fix a lock order reveral Running the test suite yields: lock order reversal: 1st 0xfffff80004bc6700 unp (unp, sleep mutex) @ sys/kern/uipc_usrreq.c:390 2nd 0xffffffff81a94b30 unp_link_rwlock (unp_link_rwlock, rw) @ sys/kern/uipc_usrreq.c:2934 lock order unp -> unp_link_rwlock attempted at: 0xffffffff80bc216e at witness_checkorder+0xbbe 0xffffffff80b493a5 at _rw_wlock_cookie+0x65 0xffffffff80c0a8e2 at unp_discard+0x22 0xffffffff80c0a888 at unp_freerights+0x38 0xffffffff80c09fdd at unp_scan+0x9d 0xffffffff80c0f9a7 at uipc_sosend_dgram+0x727 0xffffffff80c00a79 at sousrsend+0x79 0xffffffff80c072d0 at kern_sendit+0x1c0 0xffffffff80c074d7 at sendit+0xb7 0xffffffff80c076f3 at sys_sendmsg+0x63 0xffffffff8104d957 at amd64_syscall+0x6b7 0xffffffff8101f9eb at fast_syscall_common+0xf8 This happens when uipc_sosend_dgram() discards a control message because the receive socket buffer is full. The overflow handling frees internalized file references in the socket buffer before freeing mbufs. It does this with socket PCBs locked, leading to the LOR. Defer handling of file references until the PCBs are unlocked. Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41884 --- sys/kern/uipc_usrreq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 291ff7cf8cae..f12693f3982a 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1332,8 +1332,10 @@ uipc_sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, } else { soroverflow_locked(so2); error = ENOBUFS; - if (f->m_next->m_type == MT_CONTROL) - unp_scan(f->m_next, unp_freerights); + if (f->m_next->m_type == MT_CONTROL) { + c = f->m_next; + f->m_next = NULL; + } } if (addr != NULL) From nobody Wed Sep 27 12:36:57 2023 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 4Rwbhn5BZ3z4vPTx; Wed, 27 Sep 2023 12:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwbhn4Dyhz4Ntc; Wed, 27 Sep 2023 12:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pN0ROWoeHjhEmRyOFgDm2IKWrg30efHDDfNvR3+WYg4=; b=AoEmqyfZbD2TO/zsUvwb1QqS7GJ0ltDhUm7vw2LA7u8+POL1vgNXpDfk8veo0xYy9mrbGs fcLU/4v6UuWbABF6ZGY7gbttDPSTuczFazLW0XIOl2fmMHaOBM6SUxd+64RYx85NpNneBB 3fcYNA+2LJqHw2LUkMaJ4CdY58ubu6LWPhGi8p91pjUqyIleQn9kC0noccZS3o2QKnYGzu v055JhRTDwGdpZugNqcwN6ph9O7E83VHOvGkDeLwDKG5fA89fCFE+z59G0/0u+FEFEQGVA cNJLLePYMnowfsMNakyeeBoB3ok2ZnrO9AVpOmqI92Pysv4cf64N3TvQQKSHLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818217; a=rsa-sha256; cv=none; b=js6zGNwj6QOdfGquDtjHI+b14ytEAwswAvwQy+tWwaIJjKtn1iY80Qqq5yBibEAUzMxVvt gJ/Uy6/qhWVn2q/msoogeSUxiJh1HikoZkXHn0UTAO2JQYagSo4yilnVv2rj8R5bKZzizA fxpFUuULXD1H1POdQEl+c3eHszDJTnKT2qQnv0p0+8gSYV7AvSmZQEZUKJtsdaSmS20Ag2 +4h8VLPKELCRIXjnCbS80pNN0WoOdfBwhrvNdmKYq8kpuxMCxnAzu5N4ivqq4cizmvy39A fj8XmBKhsQNgHAGD+v8UEDn7XUM2ueph6l0xic9UeyyP2sLNfcf7/gBm/a7QaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pN0ROWoeHjhEmRyOFgDm2IKWrg30efHDDfNvR3+WYg4=; b=LxRxEgeY9ORsfhVhZ69RpnGf1cj9rJy7cKvVyDCts60vttoWiohR/z/113hq2s4Oy+5l8Q x89V2O3mrIe7JgPCcA4ZCWCHdTwgg/Cw5ArQ8eJfVdly/QQtOOpk2kfgfJEo6m5LKQy3R6 QlPp2A7uhXKK8zlI9epdg9qXimmQD34TpxgkC/4aUtW7Zn0bdY4qwlIUoU0vA1xVaXkiZ2 kB9YiO/9j9l+Yh/eaV8ILUVx63qH9DJ54DUhNdkkFNJ2gn3s6JymtgDDE/hqg9KZiQjv6J UazzysUfgInRe4JIog0AXO0RULj1fwc0gbLjnhgtB9bJZTjDBNoB9NbYa3UxSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwbhn3Gcczfsg; Wed, 27 Sep 2023 12:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCavNR091698; Wed, 27 Sep 2023 12:36:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCavL7091695; Wed, 27 Sep 2023 12:36:57 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:36:57 GMT Message-Id: <202309271236.38RCavL7091695@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: f97a3f6a0171 - main - ObsoleteFiles.inc: Fix the latest entry's date 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f97a3f6a017103b2afaf451af055ec4131a455a9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f97a3f6a017103b2afaf451af055ec4131a455a9 commit f97a3f6a017103b2afaf451af055ec4131a455a9 Author: Mark Johnston AuthorDate: 2023-09-27 12:27:31 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:29:34 +0000 ObsoleteFiles.inc: Fix the latest entry's date Fixes: 7736786b08e8 ("Retire old diskless setup scripts") --- ObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index b0b004843eeb..0b9d6247629b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,7 +51,7 @@ # xargs -n1 | sort | uniq -d; # done -# 2023xxxx +# 20230925 OLD_FILES+=usr/share/examples/diskless/ME OLD_FILES+=usr/share/examples/diskless/README.BOOTP OLD_FILES+=usr/share/examples/diskless/README.TEMPLATING From nobody Wed Sep 27 12:36:58 2023 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 4Rwbhp665mz4vPS5; Wed, 27 Sep 2023 12:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwbhp5RLkz4NsQ; Wed, 27 Sep 2023 12:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRAcHdWvS4dUMbh2gizmlW9B3Ddc8KKnO7MVWf5cM/E=; b=JKki8hFlnVOV7i8uaRsqkuinfrP9fDkeY75l7G3PBjj7M64PszBPe5t6jkAn/qws+sC2jp C9Sqa2Mn5+COGyCbKdFSXdZsm7QtPW9e3Yj0Pu+F2bThhKdB5PcH233567LkAWD5uXrU9a 5RqGM7GEDFFKrdvZmq8r2645Q4dWAlKTGChRXTohHyYNZ3Xikdiv8p7Trp794W7FVqfB4b mEUFgD5upUkbelK9a7gPau/ouXAXScfx06LwawiJwP7+KhnT1WFT15hZwpJuXYO2d/nKQi odkNhk0swS5Dm0KB+bgDy+NUAgk/j6GKgzps11YE4j4yznOYC78Uyq9uH8nf7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818218; a=rsa-sha256; cv=none; b=dnwd+DhAXrHDwe1W5wxxzq+/p5wX8FbyUWH+CJDqnhTYwC2rpzEHeVUWnMYqD7kYJDI6k/ SflzHpEK+cMbhwd6uc+9O8OFcJYJ0Los5cME5ZlJQn/Rl+asq0ZESmMJ45EYW6Ts+78qao TP4cyt1vZx0gvr025/J72HoVscpw6w1c2A341fDz3eZeoT9JtQfG7g+glCv0BWz/eYmAAE NIPi8616CpgpZHpfCdWhDaB5m91NuPO2J/S2K1mr6xjx598GA7yjf0rC6rgCtPQxFfHe+o FzBflr0ZhDxYaMrzYtiXSTrV6jg7bJaVYmizGmUZ3EBW88BPLC3mdtHDgzuu0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRAcHdWvS4dUMbh2gizmlW9B3Ddc8KKnO7MVWf5cM/E=; b=NgEWkngePht+hdK885A+tEIFERb+yG3oeStV5xJMAVSmXWqFTLfxyEPHxAomD+AB/Qomv6 K9JLrVBleO8EQ11D4RGfd7C0CwlgtmzB2BSTWunbNvrTfXxbwzG+aciCOVYWsaQHojTnwF sNBFUyG3cf6wseAmij6/+RNbKJdDrMCFs1nZiIR4xkXTECdkjD541X/2BfXRuIzhWbedTh CEFOKs2OayVOgjcf3jN6Ck67QVNBvNv8H7KadNmeLocx3CoXl760Nn5CjM0+4yvOtpy6/R 4N8KrFzMe3Bcab0xlNPL1eMxXZIuAjVBM9J06uR0Y8hhfEljbeUHSwPF3RGuhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwbhp4WVLzfw3; Wed, 27 Sep 2023 12:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCaw6g091751; Wed, 27 Sep 2023 12:36:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCawmI091748; Wed, 27 Sep 2023 12:36:58 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:36:58 GMT Message-Id: <202309271236.38RCawmI091748@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: a3074ff2122f - main - socket tests: Avoid a buffer leak 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: a3074ff2122faf0eaba7d3f989e916b1c7f21912 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a3074ff2122faf0eaba7d3f989e916b1c7f21912 commit a3074ff2122faf0eaba7d3f989e916b1c7f21912 Author: Mark Johnston AuthorDate: 2023-09-27 12:30:50 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:30:50 +0000 socket tests: Avoid a buffer leak Reported by: Coverity Fixes: 38426b32e106 ("socket tests: Add a regression test for MSG_WAITALL") --- tests/sys/kern/socket_msg_waitall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/kern/socket_msg_waitall.c b/tests/sys/kern/socket_msg_waitall.c index e9018b47eec1..e1e10a4c7886 100644 --- a/tests/sys/kern/socket_msg_waitall.c +++ b/tests/sys/kern/socket_msg_waitall.c @@ -54,6 +54,7 @@ close_test_client(void *arg) ATF_REQUIRE(close(s) == 0); } + free(buf); return (NULL); } From nobody Wed Sep 27 12:40:58 2023 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 4RwbnQ6RrCz4vPdg; Wed, 27 Sep 2023 12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwbnQ612Qz4Qby; Wed, 27 Sep 2023 12: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=1695818458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bu2nb/x6wW6lAnt370nV1XgssgPAmOEN9KrqJMUT9Ac=; b=lyq+2yyUKH9Hx70Q+l2LSaVbOZzj4OBWwhYszM7yesvlab3B4m5+2DLIIXdVVkTDxxahAQ 36fz1dPW7/YiaVbNrFGW1AMGj30TOlWclU8k23Tez3Zcc+81FBBKbsOiNuAdi+reX8/chs Kwzdy0oibsgoQj42ZAnGW+K6evqufcXmRhX6nvxV6aFnWT4GMvwMIufLRT7VmC3MJ7qHJ4 GKbnqJJm4+PrSSRHHRzdstN2grFeW6AvYE1EsMmJS0Gl9FliWNMLztejr52fAwc8GbUe1k GWBur5jL/Cwsp9hJ5XLrhtoJX4bMF/uw+GV/VohMma7jFNNn+K7/GcydwWnEWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695818458; a=rsa-sha256; cv=none; b=A6qB9FHuFVCWxuMi3OS949Sj4VRQAn9F/b/shukafaUQNMEFxqVTGN3lpzo8cPJuow9nvZ rYqSpyfETIbe5ftqu28SQpShqlpwXuVPozlk5EDhMd9pwcLuVaH3ih/X0y0brfz37hXFJQ 81Nf6hBDneaRky8S1qTxCy45w57IRax+K8S9abj2oKNFVNeNuVOjvEwU9L00Bp5BSNSK18 4jFj2oRiZ9tlRZL0NinrMsk0aH2mb6fU695sqsQNTPahaKwSkbA7XOFKSdVIi/rK1y4F1I aI4jegYCPTTHgO61g8FEPBxty8t0zJmvDFFO7NJMEp2JjK2ofwIa4JM1436F5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695818458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bu2nb/x6wW6lAnt370nV1XgssgPAmOEN9KrqJMUT9Ac=; b=NOihGuMyq34kmdnm9jU+NsFsS4f/BBcgAEG7UpUEpama06ek5xbKwr4OlzYCZ5qTWBgdYx cka3yZTj2vc/mw57s1WpcQ2vIdoAIcy+0ONMZu+MumD0TVTXTFN8nzwufmac8tq0woJAtR XbZgssJM/nXI7P3N6RBWQtFxyuppzMAEf2s1Mg0ROv87NB7LReXMlPA9o/pvvK8EI0KgPr fTmjrE3myEru/hwaucSANb/LBlt1bir9VTdnd2Hp0xw7IXEF08T0/z3YsJ/WptyBuyueal 4RTsaQx2p82MMq8TzuNI+PAHP7XBUbOw6HI358KJN+mnJ6uIynv6ZErPlghjxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwbnQ5448zg5l; Wed, 27 Sep 2023 12:40:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCewTj001068; Wed, 27 Sep 2023 12:40:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCewW3001066; Wed, 27 Sep 2023 12:40:58 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:40:58 GMT Message-Id: <202309271240.38RCewW3001066@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: 81f36fbc98dd - main - glabel.8: Warn against using generic labels on a shared 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 81f36fbc98dd74ca923938e0329919d426811b0c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=81f36fbc98dd74ca923938e0329919d426811b0c commit 81f36fbc98dd74ca923938e0329919d426811b0c Author: Mark Johnston AuthorDate: 2022-05-26 13:48:17 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 12:39:31 +0000 glabel.8: Warn against using generic labels on a shared device Also suggest against creating a generic label on a device which already contains a filesystem. PR: 264166 Reviewed by: imp, delphij, Pau Amma MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35326 --- lib/geom/label/glabel.8 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/geom/label/glabel.8 b/lib/geom/label/glabel.8 index 5283a604e45b..a23f425bc5e1 100644 --- a/lib/geom/label/glabel.8 +++ b/lib/geom/label/glabel.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 12, 2017 +.Dd September 27, 2023 .Dt GLABEL 8 .Os .Sh NAME @@ -141,6 +141,26 @@ Generic labels created and managed solely by are created in the .Pa /dev/label/ directory. +Note that generic, automatic labels occupy some space on the device +and thus should not be added to a device already containing a file system. +In particular, +.Nm +reserves the last sector of the device to store the label information. +If the device already contains a file system, +.Nm +will overwrite the last sector, possibly damaging the file system, and the +file system may later overwrite the label sector. +Instead, create a label before initializing the file system, and initialize +that file system on the device created by +.Nm +under the +.Pa /dev/label/ +directory. +Then the file system will correctly account for the space occupied by the +generic label, +since the +.Nm +device will be one sector smaller than the device from which it was created. .Pp Note that for all label types, nested GEOM classes will cause additional device nodes to be created, with context-specific data appended to their From nobody Wed Sep 27 14:00:54 2023 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 4RwdYg241zz4vW09; Wed, 27 Sep 2023 14:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwdYg1c4Tz4cmr; Wed, 27 Sep 2023 14:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695823255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RPmZO0XAOCZmquMZ7OfXVX8zyImamMuilXBgh0rrLBM=; b=HV1egBhsFRZ/+y43SsbE/6mjNt16omTeHNICxugldyvY4SRriBa8aWal5ASPPfgMEPz6Wi hP9XTrb/q8VNQJ7z1INQvKXC+5Lo6b03p4AAqokyhfAv4qcIDA4uC8VyVuqrig6EQewB4g 32cRgFuNDBYWSFkxDvM2VMV6xAsnhVEw7APianMa/1BssLDDEbokV45rHOFM5fJn5lJphd LlZdmj73/6LOkKFQAYH0XbrELP4+AiL6kbayrBUCcWBFUwahPlCDfyK6kBcqAlPWttrfxn qvA8lRMb4a8ZTA8/EGTcQeP5wdRHxPLmShxav7OgS5fABpokzEBdhyvc7lLZAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695823255; a=rsa-sha256; cv=none; b=Kgsy/SDo9xfeP/2fa44Irbj4ERYpc7ttOERJebs5TYPL9c0PfQq+eZJt8IVJ7O/71PdsxC PMwPhnH+V9B1mniwOnO7nBILgXOeZTpzNLmnIOctQ/dW+F9vXYo0K3smaWfCsiTIQiF5xz O4QUW3t5SOBAc7U8AbKw8q5ZgV4adM4ZrMTOuKD+X6l4KSMNxCUZgk3YcvwpivH8raLPkE 0rP6b1TtWcMCVSFK3pf7yI7jSZQpvIGM60HJEn1/ki/EjLTGm+qmsxm54sU63QUbA+9j0d Ae0oJUJ7iV1R7y36HszqRNpLMkd5kLuG65hL4hBbJuNnDf51Fg3mgc7cBtKCfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695823255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RPmZO0XAOCZmquMZ7OfXVX8zyImamMuilXBgh0rrLBM=; b=CJLv7PhSbD9Qmz5CtaYn211wcbweygd1/8e8VZ1UE+znyjc4eRCdbQhaoCA1iIsFESpkL1 ctvOK1Km5iguSIHWz7ZT96eerNuDFAGK1VBI2hVlppmpTdGloRb5BaaxxpXdU2LHeqI00U bmJIUTrQ6Y7ZtOwbY8ZNHs16dv/mxXqU9QoMbXh8+tQDhFfXGawfdlIBGQ5pscFgMGSNSk NdolRC+98utnBCK2mejSSAxC0L8NzYLNZlc8ZpXMln1+D39V/inxx/pQPaynZxLynjfNIb ps9CHRjKV26KaoHhvaTvFiC9w61eEgtpTJFg8mKidIsWZqO2Xw9yPtAYBrZPRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwdYg0fv0zhgQ; Wed, 27 Sep 2023 14:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RE0s0e037016; Wed, 27 Sep 2023 14:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RE0s2R037013; Wed, 27 Sep 2023 14:00:54 GMT (envelope-from git) Date: Wed, 27 Sep 2023 14:00:54 GMT Message-Id: <202309271400.38RE0s2R037013@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: 1f31e00e19f9 - main - flua: add fbsd module 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 1f31e00e19f9e24d4c891a24973e08a027c4f71c Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c Author: Baptiste Daroussin AuthorDate: 2023-09-13 07:43:33 +0000 Commit: Baptiste Daroussin CommitDate: 2023-09-27 14:00:00 +0000 flua: add fbsd module This module is bundled into flua, it only provides for now the exec function. The point of the function is to be able to execute a program without actually executing a shell. to use it: fbsd.exec({"id", "bapt"}) Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41840 --- libexec/flua/Makefile | 2 +- libexec/flua/linit_flua.c | 2 + libexec/flua/modules/lfbsd.c | 134 +++++++++++++++++++++++++++++++++++++++++++ libexec/flua/modules/lfbsd.h | 32 +++++++++++ 4 files changed, 169 insertions(+), 1 deletion(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 6d05d9d72a52..7a58b2265a5a 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -18,7 +18,7 @@ SRCS+= lua.c # FreeBSD Extensions .PATH: ${.CURDIR}/modules SRCS+= linit_flua.c -SRCS+= lfs.c lposix.c +SRCS+= lfs.c lposix.c lfbsd.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index 671a0300783c..4d4d69920e94 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -35,6 +35,7 @@ #include "lauxlib.h" #include "lfs.h" #include "lposix.h" +#include "lfbsd.h" #include "lua_ucl.h" /* @@ -60,6 +61,7 @@ static const luaL_Reg loadedlibs[] = { {"posix.sys.stat", luaopen_posix_sys_stat}, {"posix.unistd", luaopen_posix_unistd}, {"ucl", luaopen_ucl}, + {"fbsd", luaopen_fbsd}, {NULL, NULL} }; diff --git a/libexec/flua/modules/lfbsd.c b/libexec/flua/modules/lfbsd.c new file mode 100644 index 000000000000..30cafcc7309e --- /dev/null +++ b/libexec/flua/modules/lfbsd.c @@ -0,0 +1,134 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2023 Baptiste Daroussin + * + * 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. + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include "lauxlib.h" +#include "lfbsd.h" + +extern char **environ; + +static const char** +luaL_checkarraystrings(lua_State *L, int arg) +{ + const char **ret; + lua_Integer n, i; + int t; + int abs_arg = lua_absindex(L, arg); + luaL_checktype(L, abs_arg, LUA_TTABLE); + n = lua_rawlen(L, abs_arg); + ret = lua_newuserdata(L, (n+1)*sizeof(char*)); + for (i=0; i 1 ? 2 : n, + "fbsd.exec takes exactly one argument"); + + if (pipe(stdin_pipe) < 0) { + lua_pushnil(L); + lua_pushstring(L, strerror(errno)); + lua_pushinteger(L, errno); + return (3); + } + + posix_spawn_file_actions_init(&action); + posix_spawn_file_actions_adddup2(&action, stdin_pipe[0], STDIN_FILENO); + posix_spawn_file_actions_addclose(&action, stdin_pipe[1]); + + argv = luaL_checkarraystrings(L, 1); + if (0 != (r = posix_spawnp(&pid, argv[0], &action, NULL, + (char*const*)argv, environ))) { + lua_pushnil(L); + lua_pushstring(L, strerror(r)); + lua_pushinteger(L, r); + return (3); + } + while (waitpid(pid, &pstat, 0) == -1) { + if (errno != EINTR) { + lua_pushnil(L); + lua_pushstring(L, strerror(r)); + lua_pushinteger(L, r); + return (3); + } + } + + if (WEXITSTATUS(pstat) != 0) { + lua_pushnil(L); + lua_pushstring(L, "Abnormal termination"); + lua_pushinteger(L, r); + return (3); + } + + posix_spawn_file_actions_destroy(&action); + + if (stdin_pipe[0] != -1) + close(stdin_pipe[0]); + if (stdin_pipe[1] != -1) + close(stdin_pipe[1]); + lua_pushinteger(L, pid); + return 1; +} + +#define REG_SIMPLE(n) { #n, lua_ ## n } +static const struct luaL_Reg fbsd_lib[] = { + REG_SIMPLE(exec), + { NULL, NULL }, +}; +#undef REG_SIMPLE + +int +luaopen_fbsd(lua_State *L) +{ + luaL_newlib(L, fbsd_lib); + return (1); +} diff --git a/libexec/flua/modules/lfbsd.h b/libexec/flua/modules/lfbsd.h new file mode 100644 index 000000000000..01034a3ad7cd --- /dev/null +++ b/libexec/flua/modules/lfbsd.h @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright 2023 Baptiste Daroussin + * + * 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. + */ + +#pragma once + +#include + +int luaopen_fbsd(lua_State *L); From nobody Wed Sep 27 15:04:01 2023 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 4RwfyT5HVPz4vYmW; Wed, 27 Sep 2023 15:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwfyT3byrz3GbY; Wed, 27 Sep 2023 15:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695827041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6z7peT2BYqvMqfxtCZpHItEzEIQlhlh+EBgxjEk7+E0=; b=nVhUAPd8gb1jrKuy1e+vBgVDMXcgr4bBqVIgcyRjsUDYb1fOHA84nMCabOBUEObMqk6hxl Z73rPw6+Ew3tVHg2r2N1ApNdgTv7HCxaahhdVZJalMj7qd7UkBA5AggjLngB+BYL/5WVj9 BTE1rRQ5OdbJZPTLpxPTgdespClFWnnTVv/KjiyQZpz8u8VyK6g4sblbJCHP9qBJL7C5hF Ymb9tYCRjMHVNpihAJsxFCgnPQ1m9HgoTZuSzf5ZqvaQFCrztzBEUt2Y7Ms0M/upqWCx6Z IeGa2O/8jdc1o7r2iW73wfD7QMJkG2z48s59ODYrySqosZmFtNG+YWVy9pwwTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695827041; a=rsa-sha256; cv=none; b=RWRA7GeTLFDR3FHK4yv/z+GpWely6fXt1AR7QXFTJVRwfFHUJ4RTlzpR8Ad8or0RcUN2SJ 61JPl0XkvWiMV5f6RUbplG1NePct7Tth4PJE+y8YeJ1cZnr4E0Qgi/lJDyoj7xTYrNQRBW KOuJa3oG1Pco0DYcpaWvmAk0+P+jLOe/8NeVEMxJMa02ni5UyBnseYQ+3/vhN8cqlPOLFy B2fGGqkDJVA3DCSXP3iDa7In6zFd2tR3Ii9z/7KZqIPaVsHsYalFqvcYo6XYeX7TLWyw3L N4OkD0d8+qvsbrTdfES+V3Habv8018AXmJ/12Sy7RnTXRHQ6jMpKM92MUU9vQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695827041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6z7peT2BYqvMqfxtCZpHItEzEIQlhlh+EBgxjEk7+E0=; b=ZHSjGOMPMPVxAvGedzi8cAfL0JATtOFDnkgo/QtOd0qKqG3XjQYFNmcb5kgYGr8TO60QIS TyLfS02NzirF6G34TvDE3J23TD0H5no1FXPwalazmAEtlIso3C7l13j+lDLotO0KO+HJzB EpE7lLFuS/TNYrvdwszq5iSbLfevTNkpWZHyTGPVgOg7yrNwrFCoAV5m2213fIEOOcc5v8 LMugrIY+Wc7Dlfgo53FNNZ/EAZO14U45m0qVisoLKR2m51wv7bmtlUb6W7uTGkcCkp4c/8 oDvaJEXC9GGIEcuex0vB3mFW24cXLmxnn50BiMdEutFwqcaVD5sXL4Nlg+QOyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwfyT2g10zkLq; Wed, 27 Sep 2023 15:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RF41Zk043323; Wed, 27 Sep 2023 15:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RF41Mv043320; Wed, 27 Sep 2023 15:04:01 GMT (envelope-from git) Date: Wed, 27 Sep 2023 15:04:01 GMT Message-Id: <202309271504.38RF41Mv043320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 1e3214571b78 - main - printenv: fix typo in a comment 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e3214571b78a659ccf8174e1528546d5c385a20 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=1e3214571b78a659ccf8174e1528546d5c385a20 commit 1e3214571b78a659ccf8174e1528546d5c385a20 Author: Alan Somers AuthorDate: 2023-09-27 15:02:58 +0000 Commit: Alan Somers CommitDate: 2023-09-27 15:02:58 +0000 printenv: fix typo in a comment [skip ci] Reported by: gbe MFC with: c989957f28ef5b03f594265612e3437c1e826ed4 Sponsored by: Axcient --- usr.bin/printenv/tests/printenv_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/printenv/tests/printenv_test.sh b/usr.bin/printenv/tests/printenv_test.sh index 2bf809cb0977..754ad75d3b5b 100644 --- a/usr.bin/printenv/tests/printenv_test.sh +++ b/usr.bin/printenv/tests/printenv_test.sh @@ -3,7 +3,7 @@ # # Copyright (c) 2023 The FreeBSD Foundation # -# This software was developed1 by Yan-Hao Wang +# This software was developed by Yan-Hao Wang # under sponsorship from the FreeBSD Foundation. # # Redistribution and use in source and binary forms, with or without From nobody Wed Sep 27 16:00:50 2023 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 4RwhD23xfQz4vd83; Wed, 27 Sep 2023 16:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwhD23W2Mz3LkJ; Wed, 27 Sep 2023 16:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W108wX+3g7M8f6tKmzV4p1DH2OdoLVMKQq+LygdeCAw=; b=nNGPa3/x123LkUENBzCLRp13wom/y6ftNDQy6e0ywDVJ7F3dBuHWKGQYAwUkPtcBGY3kPZ Ji+cAgk8nFUb7fB9W67Wo5WQNsWdIK5+IpCKS9r4tl8zJwyc6w93GkGoL7RQL+0HDQnsPw 3l6R3eTiWPjsslappWWWjQv0NkQyBAs9R/JdlHS9J/MWVG6ngLqOLU4QssldgWrk6Ms5lM YovrdhiDS9UCt5idIUAjn6y8sIjpZDC5y+iewQ3U6EAKHR2uwL2FF1l6FMW0Yzllo2iOOa MtQRSvLTzaLw1gfqfBzAT74v7RV6qey6K28mxpuxyNR0tmdYcE3gLvqQ9Za9XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695830450; a=rsa-sha256; cv=none; b=tNrYTXUE4OS0FgTd9ic67gSaNb72nIzqhsuLr1I1RmrIxPIQ6l6Drw3IM/vWieWqwSi8It vn5ardxSnfDrN28Bze+PghLc41khplVrPZmcsgenvdm/VTNMFFuAMoVNP0UUphXv3XPQLj ksjF7PJGo/d46Y1Tm960OlGIovltvGROTFA7tygtVu5Q1ph8RQrOc9Fv2BhGye0cmc4geu r6NseG9Fk7+sACLv1SGYEoMyaAxk4wPCk4Y0fzujeGaDEtGopJj0SYo2wSDxm9fesDHH8q TYuVnV1MMF2grIf8ijIpQQBgmcDR8I+DQUPdTdNNu3K6Qire3VCn5hQYyBc+zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W108wX+3g7M8f6tKmzV4p1DH2OdoLVMKQq+LygdeCAw=; b=nt+neqOJUfXOL8nYHFTCSaJQqu4b00U7YUeGxTzwszAbvm4TNFwTdVyL98nsStCnoyUVAB hDstQnBmf7tqEbf7pryfajBqR0BdybXuwMNiwmpHEhMVjfl4p0wdFgA5qJWhbCuf1MGX41 4OWOciKn/S0sMFeqNt3STizPgkdWL1Y4LTMwckY9O+PKlIaRiG6HcDgVB1ifSPe5YjKi6R deu3S50qmDzwc3w0xshZwtdoTh1+jC/qyQSLZ7XnMe6pM6M9CVYiQ91o7nJ0IDTaD9/gF2 Wc+oVDykADgJCNF9hGC2rFQ7DHmUPApX3buSmMBm5ibU2hqmrhQ+dg2DI9i4UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhD22YTGzlkk; Wed, 27 Sep 2023 16:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RG0ode036396; Wed, 27 Sep 2023 16:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RG0oDF036394; Wed, 27 Sep 2023 16:00:50 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:00:50 GMT Message-Id: <202309271600.38RG0oDF036394@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: b5a2bf512dbe - main - makefs/zfs: Use unsigned integers for indirect block level counts 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: b5a2bf512dbe5bc8535e28e9f584a08444965426 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b5a2bf512dbe5bc8535e28e9f584a08444965426 commit b5a2bf512dbe5bc8535e28e9f584a08444965426 Author: Mark Johnston AuthorDate: 2023-09-27 15:47:26 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 16:00:00 +0000 makefs/zfs: Use unsigned integers for indirect block level counts No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/zfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.sbin/makefs/zfs.c b/usr.sbin/makefs/zfs.c index 4d45926fb33f..db302fe1e760 100644 --- a/usr.sbin/makefs/zfs.c +++ b/usr.sbin/makefs/zfs.c @@ -673,7 +673,7 @@ dnode_cursor_init(zfs_opt_t *zfs, zfs_objset_t *os, dnode_phys_t *dnode, } static void -_dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, int levels) +_dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, unsigned int levels) { blkptr_t *bp, *pbp; void *buf; @@ -685,7 +685,7 @@ _dnode_cursor_flush(zfs_opt_t *zfs, struct dnode_cursor *c, int levels) blksz = MAXBLOCKSIZE; blkid = (c->dataoff / c->datablksz) / BLKPTR_PER_INDIR; - for (int level = 1; level <= levels; level++) { + for (unsigned int level = 1; level <= levels; level++) { buf = c->inddir[level - 1]; if (level == c->dnode->dn_nlevels - 1) { @@ -724,7 +724,7 @@ blkptr_t * dnode_cursor_next(zfs_opt_t *zfs, struct dnode_cursor *c, off_t off) { off_t blkid, l1id; - int levels; + unsigned int levels; if (c->dnode->dn_nlevels == 1) { assert(off < MAXBLOCKSIZE); @@ -753,8 +753,9 @@ dnode_cursor_next(zfs_opt_t *zfs, struct dnode_cursor *c, off_t off) void dnode_cursor_finish(zfs_opt_t *zfs, struct dnode_cursor *c) { - int levels; + unsigned int levels; + assert(c->dnode->dn_nlevels > 0); levels = c->dnode->dn_nlevels - 1; if (levels > 0) _dnode_cursor_flush(zfs, c, levels); From nobody Wed Sep 27 16:00:51 2023 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 4RwhD35T6dz4vd1L; Wed, 27 Sep 2023 16:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwhD34KlHz3Lmr; Wed, 27 Sep 2023 16:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1Ma15l8y2Hb7LVthSo3y7mUO7drDdtmr20mrFRJOzo=; b=cIWmlbyat0TtN9e2JW9XvMtgv0naHPNiJIMf/lSGLy+5R47iPOesTyub0/IKGNMl1+gpVu RK3kZc0BGwV5IuR48CEFIXSt4Ir+c2VJY7D+s2ldjfM41O2tdCKowhgvQZO2QFqGJBvqWt m0VipZfMkbOT2pRiJAHOuvg/CCm/wuKc9zOSDzH6IEftbj7L7Fzvwk6A3bRvQy6ZlJ0qC6 A9OdBwC5oJW1z7LTARyI4RK7xaHE2M+rflgTYfrcoYozRWa9lPfhfcjWEqyk0rohVNUn1v H9QJtePIF2B5FGvE66c39rxrhoLGXwLwfcSNK1OHo8f2PqTIUbLnDBkic0RkFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695830451; a=rsa-sha256; cv=none; b=IFzSskpjbBw4veI6s7YhpFJL5WKOdof6Kd+gNeZM9kxpOJVIX7hyjyyQDTFQuaQ88Kjp5b RFjY5DWO3qbc5QlSITas06TB3Qyg9pYZoFgjvL1iQ+c/n9iNGFj8PNDQrfORWCW30noi+0 PWTEzna3MycL9nFzzuvCZLidXrKP4dfS7AJCQ1Lj9qdPPZ0tr60nJm4n1qrX24Yb6YVyPq PqG9rrM52aFAVLwDScVJnT7ylxGof37bRyrLbC5WEpYOSWoJJbqV5L/a+1+JTln+cFkmw6 5tEx6mA2uzutXbs8IaycHezw1cS8jVbQM9TvSnf8+KNgLMIgCVD9Vn1bgh6esg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o1Ma15l8y2Hb7LVthSo3y7mUO7drDdtmr20mrFRJOzo=; b=qbJmVuRv9G3iwjbRmcXXUfcm0audTgbY+RKheLYZccW+FtAUYHNFLTa89MCcoc7wxWy/XG cf9TzDLvJGhLNiEtIM61iZR54VW4vhtDu8gStaCno/TXbjq4+CYDs0fUnDuylXTDsjjTrU lP6/4Y1NOXyxLE6Doem04UhFMZaCF9UZKm/tAU+2moN2/y3ksBdAeyyXRflcUBw/4XpA/v nB4lFonMw8Nmn/exLWQtjzfqFrhfUtuQhGZGrUsaOdA66UPNuRVsWRGrQ173fqchUDnkeI x5TggF/RePQnyWzb9db/NplwObjBYz/Kb4prk7QotAwNP18ejmOGuqDTNiOL7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhD33N7pzlNN; Wed, 27 Sep 2023 16:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RG0pEQ036452; Wed, 27 Sep 2023 16:00:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RG0pUO036449; Wed, 27 Sep 2023 16:00:51 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:00:51 GMT Message-Id: <202309271600.38RG0pUO036449@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: 46402fd21631 - main - makefs/zfs: Set the objset block pointer fill field correctly 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 46402fd21631b7d4686f8c341d92db6bcb190e5d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=46402fd21631b7d4686f8c341d92db6bcb190e5d commit 46402fd21631b7d4686f8c341d92db6bcb190e5d Author: Mark Johnston AuthorDate: 2023-09-27 15:56:33 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 16:00:00 +0000 makefs/zfs: Set the objset block pointer fill field correctly It is supposed to contain the number of objects allocated from the set, excluding the meta dnode. Reported by: mav MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/zfs/objset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/zfs/objset.c b/usr.sbin/makefs/zfs/objset.c index 22277c150712..3e3dcdeced4b 100644 --- a/usr.sbin/makefs/zfs/objset.c +++ b/usr.sbin/makefs/zfs/objset.c @@ -121,6 +121,7 @@ _objset_write(zfs_opt_t *zfs, zfs_objset_t *os, struct dnode_cursor *c, STAILQ_FOREACH_SAFE(chunk, &os->dnodechunks, next, tmp) { unsigned int i; + assert(chunk->nextfree > 0); assert(chunk->nextfree <= os->dnodecount); assert(chunk->nextfree <= DNODES_PER_CHUNK); @@ -149,8 +150,8 @@ _objset_write(zfs_opt_t *zfs, zfs_objset_t *os, struct dnode_cursor *c, * Write the object set itself. The saved block pointer will be copied * into the referencing DSL dataset or the uberblocks. */ - vdev_pwrite_data(zfs, DMU_OT_OBJSET, ZIO_CHECKSUM_FLETCHER_4, 0, 1, - os->phys, os->osblksz, os->osloc, &os->osbp); + vdev_pwrite_data(zfs, DMU_OT_OBJSET, ZIO_CHECKSUM_FLETCHER_4, 0, + os->dnodecount - 1, os->phys, os->osblksz, os->osloc, &os->osbp); } void From nobody Wed Sep 27 16:00:52 2023 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 4RwhD45p14z4vcb7; Wed, 27 Sep 2023 16:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwhD45MPRz3Lcn; Wed, 27 Sep 2023 16:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MEYVDR6ZsyYsNIojoUoIVNocjh/y9PXhwCr4ykUQ14=; b=UBcbjqYl26BXOIokXroneIGhojZfjXOJ/L/Wy7jfHp04JDzdUTAESflY6L4PtWiuiUbemb THU6ot6QuipkB22nLV3mCEBMNYqsKOnMODURr1ZbSvq5lNewruIb04WVmSli3wyXrSiEAB RxLBsFqORhfWlphbomqBh1KeVNPeqJVLWhms61Z1V7Bk3Cmmq1Han78+46LLZsw2f4OOe+ nlur48HB8aTWnPY3MOpeQSw0D/CU/VqtSMGBD4+U34fwZfQAux3R8GagJB1FVhicZgVyur E2fXjn3E0Sv8C6bavZCXU1qngdzVu8n0+E59pOJItBc2hQ3yIzldCP89+QQtxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695830452; a=rsa-sha256; cv=none; b=O/9Sxfcx3zkle0SI6AhMxJYY5L80YXVKg2FAkleKUnHr7M+krTPdo6lBdzrCohgN4JlzYP Ng9ZH9E87tQE5OhGUNaZxKDlQJjY5PEBxEWPyr8aLWsoaW2LN11VkqAZ/NGstzPUd+sRuf iWycdKDOqkAbu+jt66PaEJVF0vpM6qd8yBiKEnkA6T9FbvXfzVqbcav0iJQkUSKkEEADj4 eD0LU329lYwDP7hTC1UNWVPb2fRFpErQFaiBN9umyziEJ2TkCj5mhJ+e4K98aFMmgM5Wue 2908836s6KFfyAhvmuvQwPT3zhS9xV5kyDZs21ck6eZlisueurZP3fS90L+gPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695830452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MEYVDR6ZsyYsNIojoUoIVNocjh/y9PXhwCr4ykUQ14=; b=SPxmVOlEysUiyVbDRyOMsBgH+seIKPKix82AySX9Nk72P31kj83FZFqxjHL8+KpdcEJl2I Qhbr//6UmLL1hRRo9M6/ooF77d72zoNDcP3HnaAuqO6vNS+hFB+1aPBSE6JN4vdKp8iaPr cDSZVu5fr2g0BaQ/wZ1PmxUwprzSQh0i7ldduLIGQ2rDolaXXly29M11rIB5hJo/0pvOhR ny6QQdAeefXohmKGK5ywwwEFEe87GgRBIydojzRV2I7dytXOlhzcAFZ0qKMVvyUJwyCs5M rde6mtu7HKfPUqQhF/lrRLlg6IS7S0KORt02ilwmVPJV8KSu1/B7fTz6MHxDeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhD44QmFzlNR; Wed, 27 Sep 2023 16:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RG0qsH036506; Wed, 27 Sep 2023 16:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RG0qVD036503; Wed, 27 Sep 2023 16:00:52 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:00:52 GMT Message-Id: <202309271600.38RG0qVD036503@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: 87534f95dd2e - main - makefs/zfs tests: Run zdb prior to importing makefs-created pools 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 87534f95dd2ed51e01165e0072cb1c7790809a8b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=87534f95dd2ed51e01165e0072cb1c7790809a8b commit 87534f95dd2ed51e01165e0072cb1c7790809a8b Author: Mark Johnston AuthorDate: 2023-09-27 15:58:34 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 16:00:00 +0000 makefs/zfs tests: Run zdb prior to importing makefs-created pools zdb contains quite a few assertions that can help catch bugs. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 250a313481d9..e8da4cc87055 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -56,6 +56,8 @@ import_image() { atf_check -e empty -o save:$TEST_MD_DEVICE_FILE -s exit:0 \ mdconfig -a -f $TEST_IMAGE + atf_check -o ignore -e empty -s exit:0 \ + zdb -e -p /dev/$(cat $TEST_MD_DEVICE_FILE) -mmm -ddddd $ZFS_POOL_NAME atf_check zpool import -R $TEST_MOUNT_DIR $ZFS_POOL_NAME echo "$ZFS_POOL_NAME" > $TEST_ZFS_POOL_NAME } From nobody Wed Sep 27 16:15:05 2023 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 4RwhXX07Gkz4vf52; Wed, 27 Sep 2023 16:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwhXW6bQZz3PJX; Wed, 27 Sep 2023 16:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTGmQDqiEdr4C/BDMz2tr9pQdUUXi/0REEXzjomKU74=; b=hjNzUpzXzmlWt9YUavJCbj9i18BEYyGaCrXgBB468GajDGYOo8UtllRaYmpK/l5ifqbDof NOonr50rXjbTWE++5ehD8qWI13qLV/qRTLd6kpeyVWUQUk99fLRO4cjw7y8IA+5+QqfwkC GwccHBt/cKq5QrpQ1U+8pB7MH4HtU3IwqmlmfwZcUq0pWDdba9Sau1bnfZxCq9c5X6BcjS el1J53ARqKU/I8fdP7cfI1cQBW9TCMAokAD2Hl6Oq3YJKnXzwe8TUQo0yCgZJvmmeRftBH S7hZx1RLDYbb9h6wVvWypnPYCgR3hvTeRjw761inDv42HW3TsypCR1FkBI6Kbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695831307; a=rsa-sha256; cv=none; b=XnD6M59vj22zuvGujhx1tOgG8Xlbo7EREHKzRCz7Lc7+2YNzkvTOctKHVPm0NDZcG5hTtU snBGUr77cv1AQxwI6Zm2PCxlLJf8QlcdNXw8Y5bgs2f5UOo5/Q+404+hYUEEQQ/FxEJ10c QQycgSffx4WyunTOkFnCKphu8fjdW7vVjkLD9B84pqklsJg/h7hfpRjLoKiV7QG5cY3MWI +AG0bsboYcbSgyCNfcUCsTZ94ARmMtYMb5WoyOCHjlI1ESxKYpugovEPFRQCzxyp9sPR31 Pyt0COLlMwvHLL08jRsgW7/KiPcUpdWrBjNFpHhNsguxRh2eBLHlIC3oMJkQyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTGmQDqiEdr4C/BDMz2tr9pQdUUXi/0REEXzjomKU74=; b=xRNe5GqZdzr6uRg45VyUIWlfmw3qVN3e4ICuZXSqzFwfltCaf+xUpekxLMGwcMJ9xxDRCN VO8C22eWNtIHI7xowCiJzau7KBpmWeHEFjkqyi19CGsZNQ68oWnUmpAgtsOdlFNQz56at9 wJ2/2xHNd3eCHPf+4PDWC+Df+zl7lbkvQwLdlQXXrvbB+h+lHj1/5O3tKByBSU6PYvDwKi 8L2Npim8iSYXxmvuuxMKP4OZNpsl+y6l/EA5z7ZN6F84PtkgdhAZkbyd4s89lJTBgUkqei 7Kw8KU6FCS4uGDoB+rHlxNiKA1joUwzs1C1wRc/wGwOahfY7CFmIVlXhnO7osg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhXW5hFHzlsw; Wed, 27 Sep 2023 16:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGF7GW060636; Wed, 27 Sep 2023 16:15:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGF5nT060620; Wed, 27 Sep 2023 16:15:05 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:15:05 GMT Message-Id: <202309271615.38RGF5nT060620@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: 0fcececbac98 - main - nvi: import version 2.2.1 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 0fcececbac9880b092aeb56a41a16f1ec8ac1ae6 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=0fcececbac9880b092aeb56a41a16f1ec8ac1ae6 commit 0fcececbac9880b092aeb56a41a16f1ec8ac1ae6 Merge: 87534f95dd2e 16c0a3151e5f Author: Baptiste Daroussin AuthorDate: 2023-09-27 16:01:58 +0000 Commit: Baptiste Daroussin CommitDate: 2023-09-27 16:14:45 +0000 nvi: import version 2.2.1 contrib/nvi/CMakeLists.txt | 4 + contrib/nvi/INSTALL.md | 47 ++++++++++++ contrib/nvi/README | 26 ++++++- contrib/nvi/common/key.c | 95 ++++++++++++++++++++++- contrib/nvi/common/main.c | 3 +- contrib/nvi/common/options.c | 2 + contrib/nvi/common/options_f.c | 2 +- contrib/nvi/common/search.c | 11 ++- contrib/nvi/ex/ex.c | 13 +++- contrib/nvi/ex/ex_argv.c | 6 +- contrib/nvi/ex/ex_subst.c | 7 +- contrib/nvi/man/vi.1 | 4 + contrib/nvi/vi/v_paragraph.c | 11 ++- contrib/nvi/vi/v_redraw.c | 1 + usr.bin/vi/ex/version.h | 3 +- usr.bin/vi/options_def.h | 169 +++++++++++++++++++++-------------------- 16 files changed, 298 insertions(+), 106 deletions(-) diff --cc contrib/nvi/INSTALL.md index 000000000000,7b2fd35b7c60..7b2fd35b7c60 mode 000000,100644..100644 --- a/contrib/nvi/INSTALL.md +++ b/contrib/nvi/INSTALL.md diff --cc usr.bin/vi/ex/version.h index 657da969e721,000000000000..1c18911cc593 mode 100644,000000..100644 --- a/usr.bin/vi/ex/version.h +++ b/usr.bin/vi/ex/version.h @@@ -1,2 -1,0 +1,1 @@@ - - #define VI_VERSION "2.2.0 (2020-08-01)" ++#define VI_VERSION "2.2.1 (2023-09-25)" diff --cc usr.bin/vi/options_def.h index 54dd6c20c891,000000000000..cd6f5ba3eb26 mode 100644,000000..100644 --- a/usr.bin/vi/options_def.h +++ b/usr.bin/vi/options_def.h @@@ -1,84 -1,0 +1,85 @@@ - #define O_ALTWERASE 0 - #define O_AUTOINDENT 1 - #define O_AUTOPRINT 2 - #define O_AUTOWRITE 3 - #define O_BACKUP 4 - #define O_BEAUTIFY 5 - #define O_CDPATH 6 - #define O_CEDIT 7 - #define O_COLUMNS 8 - #define O_COMBINED 9 - #define O_COMMENT 10 - #define O_TMPDIR 11 - #define O_EDCOMPATIBLE 12 - #define O_ERRORBELLS 13 - #define O_ESCAPETIME 14 - #define O_EXPANDTAB 15 - #define O_EXRC 16 - #define O_EXTENDED 17 - #define O_FILEC 18 - #define O_FILEENCODING 19 - #define O_FLASH 20 - #define O_HARDTABS 21 - #define O_ICLOWER 22 - #define O_IGNORECASE 23 - #define O_INPUTENCODING 24 - #define O_KEYTIME 25 - #define O_LEFTRIGHT 26 - #define O_LINES 27 - #define O_LISP 28 - #define O_LIST 29 - #define O_LOCKFILES 30 - #define O_MAGIC 31 - #define O_MATCHCHARS 32 - #define O_MATCHTIME 33 - #define O_MESG 34 - #define O_MODELINE 35 - #define O_MSGCAT 36 - #define O_NOPRINT 37 - #define O_NUMBER 38 - #define O_OCTAL 39 - #define O_OPEN 40 - #define O_OPTIMIZE 41 - #define O_PARAGRAPHS 42 - #define O_PATH 43 - #define O_PRINT 44 - #define O_PROMPT 45 - #define O_READONLY 46 - #define O_RECDIR 47 - #define O_REDRAW 48 - #define O_REMAP 49 - #define O_REPORT 50 - #define O_RULER 51 - #define O_SCROLL 52 - #define O_SEARCHINCR 53 - #define O_SECTIONS 54 - #define O_SECURE 55 - #define O_SHELL 56 - #define O_SHELLMETA 57 - #define O_SHIFTWIDTH 58 - #define O_SHOWMATCH 59 - #define O_SHOWMODE 60 - #define O_SIDESCROLL 61 - #define O_SLOWOPEN 62 - #define O_SOURCEANY 63 - #define O_TABSTOP 64 - #define O_TAGLENGTH 65 - #define O_TAGS 66 - #define O_TERM 67 - #define O_TERSE 68 - #define O_TILDEOP 69 - #define O_TIMEOUT 70 - #define O_TTYWERASE 71 - #define O_VERBOSE 72 - #define O_W1200 73 - #define O_W300 74 - #define O_W9600 75 - #define O_WARN 76 - #define O_WINDOW 77 - #define O_WINDOWNAME 78 - #define O_WRAPLEN 79 - #define O_WRAPMARGIN 80 - #define O_WRAPSCAN 81 - #define O_WRITEANY 82 - #define O_OPTIONCOUNT 83 ++#define O_ALTNOTATION 0 ++#define O_ALTWERASE 1 ++#define O_AUTOINDENT 2 ++#define O_AUTOPRINT 3 ++#define O_AUTOWRITE 4 ++#define O_BACKUP 5 ++#define O_BEAUTIFY 6 ++#define O_CDPATH 7 ++#define O_CEDIT 8 ++#define O_COLUMNS 9 ++#define O_COMBINED 10 ++#define O_COMMENT 11 ++#define O_TMPDIR 12 ++#define O_EDCOMPATIBLE 13 ++#define O_ERRORBELLS 14 ++#define O_ESCAPETIME 15 ++#define O_EXPANDTAB 16 ++#define O_EXRC 17 ++#define O_EXTENDED 18 ++#define O_FILEC 19 ++#define O_FILEENCODING 20 ++#define O_FLASH 21 ++#define O_HARDTABS 22 ++#define O_ICLOWER 23 ++#define O_IGNORECASE 24 ++#define O_INPUTENCODING 25 ++#define O_KEYTIME 26 ++#define O_LEFTRIGHT 27 ++#define O_LINES 28 ++#define O_LISP 29 ++#define O_LIST 30 ++#define O_LOCKFILES 31 ++#define O_MAGIC 32 ++#define O_MATCHCHARS 33 ++#define O_MATCHTIME 34 ++#define O_MESG 35 ++#define O_MODELINE 36 ++#define O_MSGCAT 37 ++#define O_NOPRINT 38 ++#define O_NUMBER 39 ++#define O_OCTAL 40 ++#define O_OPEN 41 ++#define O_OPTIMIZE 42 ++#define O_PARAGRAPHS 43 ++#define O_PATH 44 ++#define O_PRINT 45 ++#define O_PROMPT 46 ++#define O_READONLY 47 ++#define O_RECDIR 48 ++#define O_REDRAW 49 ++#define O_REMAP 50 ++#define O_REPORT 51 ++#define O_RULER 52 ++#define O_SCROLL 53 ++#define O_SEARCHINCR 54 ++#define O_SECTIONS 55 ++#define O_SECURE 56 ++#define O_SHELL 57 ++#define O_SHELLMETA 58 ++#define O_SHIFTWIDTH 59 ++#define O_SHOWMATCH 60 ++#define O_SHOWMODE 61 ++#define O_SIDESCROLL 62 ++#define O_SLOWOPEN 63 ++#define O_SOURCEANY 64 ++#define O_TABSTOP 65 ++#define O_TAGLENGTH 66 ++#define O_TAGS 67 ++#define O_TERM 68 ++#define O_TERSE 69 ++#define O_TILDEOP 70 ++#define O_TIMEOUT 71 ++#define O_TTYWERASE 72 ++#define O_VERBOSE 73 ++#define O_W1200 74 ++#define O_W300 75 ++#define O_W9600 76 ++#define O_WARN 77 ++#define O_WINDOW 78 ++#define O_WINDOWNAME 79 ++#define O_WRAPLEN 80 ++#define O_WRAPMARGIN 81 ++#define O_WRAPSCAN 82 ++#define O_WRITEANY 83 ++#define O_OPTIONCOUNT 84 From nobody Wed Sep 27 16:20:16 2023 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 4RwhfT11V0z4vdp9; Wed, 27 Sep 2023 16:20:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwhfT0PhNz3PqS; Wed, 27 Sep 2023 16:20:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a3GNaoGaCjsLo6vAY4ZBjfqJ8Cngfno72OjUmZA/6Rk=; b=gJO7LDy/EYe12Wtjw0DNqWHmJrs3A/IE1bGsPu5XJAeJXfwFqfKLvcBIhgFzWoZk/HpGpy E01Hs4JjO87sDhTZbr+tkmNGij7lbfQP+bmcX8LjNdYgBeRm+mparFO2RBjaDUEeqNfPDV wgNxbnzqsDyRrtuis87zVWcM7+OBaUG5CyHxXWAfneHglmFvepUjsWS6H0d6fHaE68EV4G IK7f7zMgQ7vBHjFVRhfrVxRu0lrcFDYNnO016VKIX9TrlOHWYbsBkN53WbKeFCJScWsWza GBqJIdPZt+dYQxBD/W7CBeR4hz3q0MjZV2qXer4JS6blZ+HrVqRRXqR6ACRMsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695831617; a=rsa-sha256; cv=none; b=DFra4tyfxI6tnMw2vdLxRq6X5DjEKeB52oTTjPgRzvc7pp5zpm3LxOIN0Ii/0B8nGuJhDE OJWnjqS9MzCqxZM+Lvxsk99SEsxFSQbi6FJqYYYsywaQtT9yVWteOzAhxLitryfczRwaz7 WrxToj57tKXCOHo46Eta9zXcvQUxPRazzUOgdBYsEt5Y01uP3o31G+xaJrPaTy1dXxNlBN 5UilzZLJtiHIxqyA5lnTa+bvJgFJ+c9Sm+KQnqr11y2BRCdJuj0CLjbk3cEnQcmDOSTe26 SxsrCdSP9zXO55KoS0zk9+4V8hkM8Jh34m6zNCAguQFT5286QITD/w6B0e5OHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a3GNaoGaCjsLo6vAY4ZBjfqJ8Cngfno72OjUmZA/6Rk=; b=w45lw5nCsG+c5kGt/JLadDP5gsz6bfI4ogrAixvj5zoPQB6blKnX6cA7195ZRRvF74XiG3 2R5kSH5FwZ87qXuTS4NZviknIRknxzylSwx9u6HdX7pujjoYKawBm+uB16puR/q9XIvKn9 LUoIT+Wf5c2Xlqvy5iCGZugl/Jdm/Ejz9yhr3taXsw7dg8/hZzQpWh9NknlN9ndLLxtVWA xSt9lgG7IX8/v+VYY/vKZm5KO0Ir913M7AH67rh+Q0961rTy64n9WrdWHlO7aIf+ycFr3m drpPplY25Oz8ex+M7sOj4P8aEgn0GTFcEvggNtaoAE38OyUwYBmLPSmjaYiDQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhfS69Whzm4Z; Wed, 27 Sep 2023 16:20:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGKG07069246; Wed, 27 Sep 2023 16:20:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGKGoX069240; Wed, 27 Sep 2023 16:20:16 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:20:16 GMT Message-Id: <202309271620.38RGKGoX069240@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: 2f0b059eeafc - main - intrng: switch from MAXCPU to mp_ncpus 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 2f0b059eeafc545a4ab1835d6a5290e1e2ebb47f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2f0b059eeafc545a4ab1835d6a5290e1e2ebb47f commit 2f0b059eeafc545a4ab1835d6a5290e1e2ebb47f Author: Elliott Mitchell AuthorDate: 2023-09-26 17:06:04 +0000 Commit: Ed Maste CommitDate: 2023-09-27 16:19:37 +0000 intrng: switch from MAXCPU to mp_ncpus MAXCPU could be on the large side, while the hardware may not have many processors at all. As such only allocate counters for processors which actually exist, rather than always allocating for the maximum potentially allowed number. Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D41462 --- sys/kern/subr_intr.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 6535c42f2404..49fe20cdc890 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -175,11 +175,11 @@ intr_irq_init(void *dummy __unused) /* * - 2 counters for each I/O interrupt. - * - MAXCPU counters for each IPI counters for SMP. + * - mp_maxid + 1 counters for each IPI counters for SMP. */ nintrcnt = intr_nirq * 2; #ifdef SMP - nintrcnt += INTR_IPI_COUNT * MAXCPU; + nintrcnt += INTR_IPI_COUNT * (mp_maxid + 1); #endif intrcnt = mallocarray(nintrcnt, sizeof(u_long), M_INTRNG, @@ -312,18 +312,18 @@ intr_ipi_setup_counters(const char *name) mtx_lock(&isrc_table_lock); /* - * We should never have a problem finding MAXCPU contiguous counters, - * in practice. Interrupts will be allocated sequentially during boot, - * so the array should fill from low to high index. Once reserved, the - * IPI counters will never be released. Similarly, we will not need to - * allocate more IPIs once the system is running. + * We should never have a problem finding mp_maxid + 1 contiguous + * counters, in practice. Interrupts will be allocated sequentially + * during boot, so the array should fill from low to high index. Once + * reserved, the IPI counters will never be released. Similarly, we + * will not need to allocate more IPIs once the system is running. */ - bit_ffc_area(intrcnt_bitmap, nintrcnt, MAXCPU, &index); + bit_ffc_area(intrcnt_bitmap, nintrcnt, mp_maxid + 1, &index); if (index == -1) panic("Failed to allocate %d counters. Array exhausted?", - MAXCPU); - bit_nset(intrcnt_bitmap, index, index + MAXCPU - 1); - for (i = 0; i < MAXCPU; i++) { + mp_maxid + 1); + bit_nset(intrcnt_bitmap, index, index + mp_maxid); + for (i = 0; i < mp_maxid + 1; i++) { snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name); intrcnt_setname(str, index + i); } From nobody Wed Sep 27 16:24:28 2023 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 4RwhlK28Tgz4vfL8; Wed, 27 Sep 2023 16:24:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwhlK1XDqz3Qd0; Wed, 27 Sep 2023 16:24:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Hdev44iTjvdXgH1r9xdZsJdxKGQ6dcDqiPqtP8gtCY=; b=EKAf7T42rL/zpGjNrcLNUz/iiKQ2He+p0fThvZPyuJdTYT7DMw1I+zhKAGvllEn4DuRf0W Eg6bhHlXlpW/kmlCFDmxTj2EdWguSSijHBFLRY3pJNwcj2khREcYQVZdeHXEAih8IMe/WG NQ5cCUO6M80Ev7a7Y0sASzZ9xbxk+pkGP054ywT1gOFVg+fDwzBbWMWdn6SI/ets/H7fiN HGNOSWV6cYpatZhcc5XfFTXax/pWPcAmiyCFCT7fnV/YkI9rvsfe7jPh4bu9lppSnfZJhL 56BOGfCZTZT52QPuyL3/CpsaoL+0JJ7/6Ow4zodrTSHHxluCo+ycyYcnUbcjZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695831869; a=rsa-sha256; cv=none; b=qaM57tGDja/qL8PjrNhBYuZ2kXf9gROwDH+d0soSU1R/3ymPhGg3YMqjPXmrTW+X23zIys qh2UVB9ggrx/Vt1IH9BlJBO1aW3DMgt8JiHgcz6zqG3qylCqHcggkI7fKJ96pTu6sQjzUR dN69uPGvS//4gz9mttfYQQJy2oO3WJi2GKL+OOWbhscXx1Xs7zhAgpe0ZU0DBK6r1zrvrb Uj2oVlGQGOgXIQAdhq1Sn5CyXDCDqMz1WPoG5va3qpSwO3tu/B64mtTrOmnzIfCko2rBlj dE873AV+TSCcOX/ygYO1K3wQIc7TNMrpdw/HAKVq/WGZkFLbxC/z52Yt4JjoNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695831869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Hdev44iTjvdXgH1r9xdZsJdxKGQ6dcDqiPqtP8gtCY=; b=nfK4YBYQut/LY8Yn4VgvGHz3N8FVw6Dmyb28cA28FmyRTBetjPsRr5Oi3/UY/Zm3CFAwvx IstNYs6CdfmOX57W/H1/8nN5W5uaowViFW4uI4KcikFL0ap6wBcfB3ipadtGHB5sS/b8oF wjQu7ke8cjLKZVN7FY8Nkg7/omlozinMAL+FJh8//1TxdjgjcnO/x/D4zXuUruix7Yq8iI 2C5WJ+1Yh+VVP06IYK8JrYVQJHud5L3vzIWnIAZeKmW+oHekudLvdmKzIe/C2rPHUUj6DC M6NSf80IeN64//cemnsCh+knPVI4BmC7Nks8+5VlGYwQfLW4eQns1GTKylooWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwhlK0bHQzm7P; Wed, 27 Sep 2023 16:24:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGOS8G076705; Wed, 27 Sep 2023 16:24:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGOSFV076702; Wed, 27 Sep 2023 16:24:28 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:24:28 GMT Message-Id: <202309271624.38RGOSFV076702@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: f549e22901b3 - main - ip_mroute: Fix sysctl knobs 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f549e22901b3a391c76659bee55802b1214112fd Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f549e22901b3a391c76659bee55802b1214112fd commit f549e22901b3a391c76659bee55802b1214112fd Author: Zhenlei Huang AuthorDate: 2023-09-27 16:23:22 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-27 16:23:22 +0000 ip_mroute: Fix sysctl knobs The loader tunable `net.inet.ip.mfchashsize` does not have corresponding sysctl MIB entry. Just add it. While here, the sysctl variable `net.inet.pim.squelch_wholepkt` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. Reviewed by: kp Fixes: 443fc3176dee Introduce a number of changes to the MROUTING code MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41997 --- sys/netinet/ip_mroute.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 2444fd9686f7..cda5f160e8fb 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -172,7 +172,9 @@ VNET_DEFINE_STATIC(u_long, mfchash); ((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr) & V_mfchash) #define MFCHASHSIZE 256 -static u_long mfchashsize; /* Hash size */ +static u_long mfchashsize = MFCHASHSIZE; /* Hash size */ +SYSCTL_ULONG(_net_inet_ip, OID_AUTO, mfchashsize, CTLFLAG_RDTUN, + &mfchashsize, 0, "IPv4 Multicast Forwarding Table hash size"); VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) VNET_DEFINE_STATIC(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); @@ -226,7 +228,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_pim, PIMCTL_STATS, stats, struct pimstat, pimstat, "PIM Statistics (struct pimstat, netinet/pim_var.h)"); static u_long pim_squelch_wholepkt = 0; -SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW, +SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RWTUN, &pim_squelch_wholepkt, 0, "Disable IGMP_WHOLEPKT notifications if rendezvous point is unspecified"); @@ -2817,18 +2819,12 @@ ip_mroute_modevent(module_t mod, int type, void *unused) return (EINVAL); } - mfchashsize = MFCHASHSIZE; - if (TUNABLE_ULONG_FETCH("net.inet.ip.mfchashsize", &mfchashsize) && - !powerof2(mfchashsize)) { + if (!powerof2(mfchashsize)) { printf("WARNING: %s not a power of 2; using default\n", "net.inet.ip.mfchashsize"); mfchashsize = MFCHASHSIZE; } - pim_squelch_wholepkt = 0; - TUNABLE_ULONG_FETCH("net.inet.pim.squelch_wholepkt", - &pim_squelch_wholepkt); - pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK); ip_mcast_src = X_ip_mcast_src; From nobody Wed Sep 27 16:35:49 2023 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 4Rwj0Q1XxXz4vfyG; Wed, 27 Sep 2023 16:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwj0Q13pNz3RHx; Wed, 27 Sep 2023 16:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695832550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jps47q7VHSgo/SPkEO1cfWpzxsHcjxf4EqDRnTPxpvk=; b=gZR0irTqLFCh1omoDNYnD+sj6PZU/LdgfzlPul+18dD5A+YwcgbzV62nPLmwMNNoDHEdR0 xj2Z7flctwvRt4lZtNszem+Z0GFxg18wvoAn8A7VntTiYR5RVh05L7dM3TMQZgh1jwBiMP 0AsskpF3L5a+a5f4q83Ij/Vf8ybk5ezX7qNuN3tBBpy1rMGOjiDOGn1MS6NIlRKcG3pB5c LvPSsM2I9HAbrJa6sW4nvXLjNI9N8j8o4a4gk5N10pV2tQY/HnXVnUuXm7qnsDZzUdzZHS 8j0Y03wvuTxTUWTYXFH3Gj9mp1Udu12JaiVgSajkPG0DqfaRnX2bniJCHtFmZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695832550; a=rsa-sha256; cv=none; b=ZmtEBM/LhvfmhXbLlLKZ+vtp540IjgQb/vCNnvtD/j850psOm7Cuf/FyBm8x1JPyJqZ+Ac ctApB28G8IaMjUyn5XTyvD5JvTPX52mG7wWixaX1/bqjRM6FEZXyzsBSC3gPYCL1ECQhr5 htR6XwVWA+7+tnHQw19kpmX/iN2WRE2ORTDYueH16HyeTT2yxRzF4KJJclrz0+gskSL9rJ jxyBgjKgfDo5ri5tOYNGIjoYkajM6kAUklPLORXSwDlb2K093fjnkln5seU0oxtmfK1tpy iBPzUFrHrimGXlwLZvyvPhGXDd1TXa831Vee8Yh8p0Xr0M1rBNfdaz06ry89qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695832550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jps47q7VHSgo/SPkEO1cfWpzxsHcjxf4EqDRnTPxpvk=; b=Uyan5Yqf1/vJmY9UT/puOZyaurVwrPQqHQ/b9qi8z3tawbtQktMrEzYP2iLGNf8qFO6P9l heO25mNzQRLhSZUarbxG+dxEjPHjbentOQ+vRTCk3eVwJ6m0QRLNWrAOdVZI+ybh1ZVM52 SV/7Z2/eC7WapJUCxGC3aA2LZI9Kbl1e6Is2JWCk9Hlsku4qLqRie4Bols3YQYDo3gyoSH C6+0EarWmXUk0Sg8gJw7oVFFO9pAQFx8ctNIGyTmP2Yh1pfD6PDANftrkiHyRAMI7OADhq hDxVJlkgLC7YF7DOoChe+E2b4ISRdT7xUOFYnRj4nB7eQNF4tLMR46T5FO43qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwj0Q06SkzmWH; Wed, 27 Sep 2023 16:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGZnDt093548; Wed, 27 Sep 2023 16:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGZnsM093545; Wed, 27 Sep 2023 16:35:49 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:35:49 GMT Message-Id: <202309271635.38RGZnsM093545@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: da695970cee9 - main - UPDATING: add a note about EARLY_AP_STARTUP on x86 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: da695970cee95d0b460c451d5ff9c2cea04f1b73 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=da695970cee95d0b460c451d5ff9c2cea04f1b73 commit da695970cee95d0b460c451d5ff9c2cea04f1b73 Author: Ed Maste AuthorDate: 2023-09-27 16:34:07 +0000 Commit: Ed Maste CommitDate: 2023-09-27 16:35:17 +0000 UPDATING: add a note about EARLY_AP_STARTUP on x86 Requested by: wollman (in D41351) --- UPDATING | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPDATING b/UPDATING index 38362cb86b73..a1bcecadd357 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.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".) +20230927: + The EARLY_AP_STARTUP kernel option is mandatory on x86. The option + has been added to DEFAULTS, so it should automatically be included in + custom kernel configurations without any additional change. + 20230922: A new loader tunable net.pf.default_to_drop allows pf(4)’s default behaviour to be changed from pass to drop. Previously this required From nobody Wed Sep 27 16:40:12 2023 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 4Rwj5S3CLhz4vgQ6; Wed, 27 Sep 2023 16:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwj5S2XJBz3RqL; Wed, 27 Sep 2023 16:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695832812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shOQgMS7tcGWaj0zGIVhOT6lRnTgFPcljNcFfso09/E=; b=iKmn8TZI2d7Qni6NumaaUfUXOjGue2FOw1SMzTJJxiytga8DBekpwoMnMuOSaRFGS8LRF/ TVMumGgPGum3wkYbda7fkvAB+BFDyqTtuky1wVmU/taS/OmaO2eQdeGdYc0NHqWf+AhHYQ AU5LG8zfclWDC+0dYe8hbdTDKeLOueAddxtm+dd2b4uZIAUBSKv6MetMcUX3A0TLVgsDRU fLhssI4T7BN6O4z383dGt6ChultpYk96QGLlF55OL3Kup3yrOajO1rWJTRA4rcYY8KHysA WdDUgGKj1h0OzFg+YNp/WwgHfxAB7/ZOnWgdnPLUjJ4SIsr3E3wnu7qnJ79swg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695832812; a=rsa-sha256; cv=none; b=Apbtc27/iq0D38/05x6S2T6Anm/Oaq3AMoJXsLxk2CR0jbMSg67V+rYdlwM71mbfajPN5S KB2In3U1bW+VCZZapUJ/whqYcUdIZ/LNJxHdnPOHGr80+quygcv8bVFOeg3erjDIrNxXE2 IJ1JBJBUueU2ksIDbc07AcnwhDL9aqQIhHjFaDILULsiZvFaLt2tEtJvRI8AECrEfCqt+s QKGRFMTCdtwEMhjvoI+S5KVRIVZtj3BBSvXfMn+jm6Yw13dDhYBzp+Ioq2AlJXYjF/ej6y EbvIMZ/qHzz/1kwixRa40o/L2k+HorVOBTPFD5blWMs5Lwh/fxV0o67fAXWW8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695832812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=shOQgMS7tcGWaj0zGIVhOT6lRnTgFPcljNcFfso09/E=; b=HlwUu0VHz0bZLMfQvgN3ozqRHduhTLm/gXUWxZUxetTtWaC+czIJaA9f7rsAx6qDiIRpD/ EkPePt3ya4RpCREdHGQFVOsKAsS/7+Hda9dyAoNcez6/00mm0hNgCrT5JTsZqEeGXvextZ kx4o+DXbmVqOuovJrMFJIPe2V8AF/mJQJydQzenXaMt4SZg0+DYHllnJmlW6z3oRIBrHN1 sSHjRgcZo+ZZhTnRwTxbvLlv6nbjmZC7+NowOkNTKMabum07cJfzDzs4O5suPhZt4fJ6yb Ils2FMErq0RGYU3FeVkyZ+ug1Sgk0LB+6DsVHLT5Ar873pOTNSqVo9wok7mP3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwj5S1SVyzmXd; Wed, 27 Sep 2023 16:40:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RGeC2M099550; Wed, 27 Sep 2023 16:40:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RGeCPl099542; Wed, 27 Sep 2023 16:40:12 GMT (envelope-from git) Date: Wed, 27 Sep 2023 16:40:12 GMT Message-Id: <202309271640.38RGeCPl099542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: c362fe939f6f - main - pmcstat: fix duplicate event allocation on CPU 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c362fe939f6fe52056fb7506be9e5cbd0a5ef60b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c362fe939f6fe52056fb7506be9e5cbd0a5ef60b commit c362fe939f6fe52056fb7506be9e5cbd0a5ef60b Author: Mitchell Horne AuthorDate: 2023-09-27 16:37:46 +0000 Commit: Mitchell Horne CommitDate: 2023-09-27 16:39:56 +0000 pmcstat: fix duplicate event allocation on CPU 0 Commit b6e28991bf3a modified the allocation path for system scope PMCs so that the event was allocated early for CPU 0. The reason is so that the PMC's capabilities could be checked, to determine if pmcstat should allocate the event on every CPU, or just on one CPU in each NUMA domain. In the current scheme, there is no way to determine this information without performing the PMC allocation. This broke the established use-case of log analysis, and so 0aa150775179a was committed to fix the assertion. The result was what appeared to be functional, but in normal counter measurement pmcstat was silently allocating two counters for CPU 0. This cuts the total number of counters that can be allocated from a CPU in half. Additionally, depending on the particular hardware/event, we might not be able to allocate the same event twice on a single CPU. The simplest solution is to release the early-allocated PMC once we have obtained its capabilities, and reallocate it later on. This restores the event list logic to behave as it has for many years, and partially reverts commit b6e28991bf3a. Reported by: alc, kevans Reviewed by: jkoshy, ray MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41978 --- usr.sbin/pmcstat/pmcstat.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c index fd4be99f83c8..c36cee436e55 100644 --- a/usr.sbin/pmcstat/pmcstat.c +++ b/usr.sbin/pmcstat/pmcstat.c @@ -713,8 +713,16 @@ main(int argc, char **argv) errx(EX_SOFTWARE, "ERROR: Out of memory."); (void) strncpy(ev->ev_name, optarg, c); *(ev->ev_name + c) = '\0'; + libpmc_initialize(&npmc); + if (args.pa_flags & FLAG_HAS_SYSTEM_PMCS) { + /* + * We need to check the capabilities of the + * desired event to determine if it should be + * allocated on every CPU, or only a subset of + * them. This requires allocating a PMC now. + */ if (pmc_allocate(ev->ev_spec, ev->ev_mode, ev->ev_flags, ev->ev_cpu, &ev->ev_pmcid, ev->ev_count) < 0) @@ -726,8 +734,14 @@ main(int argc, char **argv) err(EX_OSERR, "ERROR: Cannot get pmc " "capabilities"); } - } + /* + * Release the PMC now that we have caps; we + * will reallocate shortly. + */ + pmc_release(ev->ev_pmcid); + ev->ev_pmcid = PMC_ID_INVALID; + } STAILQ_INSERT_TAIL(&args.pa_events, ev, ev_next); @@ -751,10 +765,7 @@ main(int argc, char **argv) } if (option == 's' || option == 'S') { CPU_CLR(ev->ev_cpu, &cpumask); - pmc_id_t saved_pmcid = ev->ev_pmcid; - ev->ev_pmcid = PMC_ID_INVALID; pmcstat_clone_event_descriptor(ev, &cpumask, &args); - ev->ev_pmcid = saved_pmcid; CPU_SET(ev->ev_cpu, &cpumask); } From nobody Wed Sep 27 19:23:50 2023 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 4RwmkG5qcQz4ts8h; Wed, 27 Sep 2023 19:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwmkG5FTvz4Flq; Wed, 27 Sep 2023 19:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695842630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSuzEkxLLEmgoSGP+GdLjIm+BFt5XVtei1fBphyXzKQ=; b=j86GbXso3DALbYL56GqRVmMz2COgP63+isjx5Xj30pgAN/i+GAhZgBrZDMLfZ3aVoyyeYg HcpU3ocqAcjcuU7uSX+PDtQeMg9nH+YkWz/ssDc11VhxKI3jlVQt46l7IDza67zTEX5T4Q RYlKuUi7Bf4KYEGpJXyRETiWvx/i7oMT2cs21qKmOl3P4KCBRSRF3wRmgPpzTpx64cGRFp OWYuacqmK4YlT9Sz1OaVwPTQOoH4c58ao+jSbxixCeQQaSh8+C18/R0RBo8TPKAjFe5eRI 49qL2SDAvNb8AGluevZOS0buU1WBVsRQ23PnGibJifRudM8CbK2V11Bd1jyS/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695842630; a=rsa-sha256; cv=none; b=cjXcp4MEg4ELeKb4nSKtKe+DGiPGLCl4tQPv2pY7lIOrqLh7rFmFONEVKTuYMtmljGMjoQ e90tY2999kUHHnldyU3YhJgDutERQhowygOg1QPuDkc+1GdXzuagCkXYfx7Y7pbx2luWZA wjXdJdMPGKbtX9gbEti35hHGFPAWnMCars7Tdn59Y1H2h4hW92EAVY1nd2Zqgi9oNb4Ly8 LmU4U3Mly3wAFgDUCPudF+YroXwU+Xe/TTpIxSe/9xPW63NuxNFcQ5tdOVh+i+watMFJXF eOsbh5BoKV61VVYZjTM7jOrrSuhjs4TyPGOYV3n1yyBqa06pmL2SIDrurqpAtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695842630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSuzEkxLLEmgoSGP+GdLjIm+BFt5XVtei1fBphyXzKQ=; b=KJMbnf4keUBOJ6Y/5DlsBOfiA+JJu/m/d1rayVSD08eyH1+tl3c30IQeHesenPMiyc0weY ZGViegMUz6d3v7GtU47PGS8N0lakXb2U/Wbd/mQTwuI23m3cG1h2Vz37SC0dY842ru9ZDR ofh4FYZ/zfiyoW33xuOF0LSEi/yHsctaNGOdeHV6KBbq/ZKfNd1OSdMqnz2xSBy3JTrY+D pWCkLOsELKpjL10qXdTgypJvBWAIVp2RQwvbLTPNmMQROIFFnu2oF+tnW2xrZRFJBjT5CW yho8zZapAQcBAlTugUeJpwjxqzDaShS+VyVR99Cd5IYpasPL8NQ+CVI8t3G/0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwmkG4Bx6zrvc; Wed, 27 Sep 2023 19:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RJNoGA076078; Wed, 27 Sep 2023 19:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RJNo0L076075; Wed, 27 Sep 2023 19:23:50 GMT (envelope-from git) Date: Wed, 27 Sep 2023 19:23:50 GMT Message-Id: <202309271923.38RJNo0L076075@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: f6d37c9ca13f - main - freebsd-update: handle file -> directory on upgrade 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85 commit f6d37c9ca13f8ab0ef32cf5344daecb8122d1e85 Author: Ed Maste AuthorDate: 2023-09-27 13:36:33 +0000 Commit: Ed Maste CommitDate: 2023-09-27 19:23:08 +0000 freebsd-update: handle file -> directory on upgrade Upgrading from FreeBSD 13.2 to 14.0 failed with install: ///usr/include/c++/v1/__string exists but is not a directory because __string changed from a file to a directory with an LLVM upgrade. Now, remove the existing file when the type conflicts. Note that this is only an interim fix to facilitate upgrades from 13.2 for 14.0 BETA testing. This change does not handle the directory -> file case and further work is needed. PR: 273661 Reviewed by: dim, gordon Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41893 --- usr.sbin/freebsd-update/freebsd-update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 29633b51b26c..c6432dcd6b0e 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2903,7 +2903,13 @@ install_from_index () { while read FPATH TYPE OWNER GROUP PERM FLAGS HASH LINK; do case ${TYPE} in d) - # Create a directory + # Create a directory. A file may change to a directory + # on upgrade (PR273661). If that happens, remove the + # file first. + if [ -e "${BASEDIR}/${FPATH}" ] && \ + ! [ -d "${BASEDIR}/${FPATH}" ]; then + rm -f -- "${BASEDIR}/${FPATH}" + fi install -d -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${BASEDIR}/${FPATH} ;; From nobody Wed Sep 27 23:03:36 2023 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 4Rwsbs0qZnz4v6rK; Wed, 27 Sep 2023 23:03:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwsbs0Kp0z4Z7m; Wed, 27 Sep 2023 23:03:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695855817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HqBJg9JOfpM9mGCRefJQVOmOSCBzxBIKe3m0U0X0h/Q=; b=vv4lQSrAm1cHWGrPbxWcUdwoMg3kik9UWBN+RzrA6c3wYqTM2z7laBhmwmFBI0m5bU1ZsN i6MdEWkLx4ge3ShO1J1IAnNN3ovb+fAdXltvMZ71+xAvZDZw9mv9WIQT1fnoMtW7BxgsjY x2Xb3mtqJGudAT4dm8omAdsV7jBj+FJkLJrltxwHnz9Dmhxok9/R/bFdbl/3T3MDB5DKbE 1ZdGrzbF12kYsmTqkosVCFgyLJBpMs3RjtTzc7zHHm9r+PzEJ7AJ5EbiGTawtwauhKH/9+ iMuMXtlRTlhomKoaz78UuLIvqFgzpg+odZAMVw90cFiK+lghXGBhhQTadm872g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695855817; a=rsa-sha256; cv=none; b=Ob7S8fJUgGQ1iP3Q0apPKqTXhLP+NnpsFL6bWoYVsf9xu3Xsvb/uJ7xVUJl3FRO5z+ybut d/j12NGEIs1ChEGnmnW0EhftDlJFR6p8nei7Wuk8QxTYpfB96qsnMZBy4+6XpsgM3a/Z3T X1nii+ST3uMeuL+JV+l7yf8eZEARaSZyemJ/PZUJNhSvQCiZu7uuMBtkdZNJV4RRXEBlNl pcCBS9NIMdo7TDWXjTVUGWBfeS7P9vS29ajAQ91/v8uc4awMWYSLda10cFSvtRhDMkOnPF dnPsGi6ojHgXWrewTo4lenL22lVOy1xERUtRTtbWsj/5/f7fSJcnXqL+PKX71Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695855817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HqBJg9JOfpM9mGCRefJQVOmOSCBzxBIKe3m0U0X0h/Q=; b=INYtza+7ilK2Mu/GwclbGW44LHSNhWxDhbDGZYg98D8agS+pz1hEGjP1EnB2qPYG8PPZ4v ciRienLkuf8XGOn7Ti3h6mr2LRr80NLkeBeoj+jxIjd1bleonymKODlktoi+Yxvbwb7jx2 6sothrs5Ml4qjctdZDE8ABAckoQfFUvu5Pg8/aBTFNwcUa2x3lFl3yI2go3oDIr5cuNlfD 31E+ms9zrFQf+GTPWxYwSqY94IV12B4mR2onTE65JZcFWvbZteN1mrj5+vOPEEPMNrykoB StdqMM/af6fEpyOJqUT805c+UgIywF+q7VlOFGYevWLxxwISIDw6pFjcDDmJEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwsbr6VGzzy59; Wed, 27 Sep 2023 23:03:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RN3aUG040887; Wed, 27 Sep 2023 23:03:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RN3a7m040885; Wed, 27 Sep 2023 23:03:36 GMT (envelope-from git) Date: Wed, 27 Sep 2023 23:03:36 GMT Message-Id: <202309272303.38RN3a7m040885@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: 63aa2e91342e - main - release/ec2: Remove references to portsnap 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 63aa2e91342ead0495eada5667f413f0cf8eb56a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=63aa2e91342ead0495eada5667f413f0cf8eb56a commit 63aa2e91342ead0495eada5667f413f0cf8eb56a Author: Mark Johnston AuthorDate: 2023-09-27 22:02:36 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 23:03:25 +0000 release/ec2: Remove references to portsnap We no longer install a default portsnap.conf, so the sed invocation just generates an error. Reviewed by: cperciva MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42003 --- release/tools/ec2.conf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 71f9f5c330cb..d033739adc26 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -126,11 +126,9 @@ EOF 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ ${DESTDIR}/etc/ssh/sshd_config - # Use FreeBSD Update and Portsnap mirrors hosted in AWS + # Use FreeBSD Update mirrors hosted in AWS sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ ${DESTDIR}/etc/freebsd-update.conf - sed -i '' -e 's/portsnap.FreeBSD.org/aws.portsnap.FreeBSD.org/' \ - ${DESTDIR}/etc/portsnap.conf # Use the NTP service provided by Amazon sed -i '' -e 's/^pool/#pool/' \ From nobody Wed Sep 27 23:03:37 2023 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 4Rwsbt31dNz4v6lV; Wed, 27 Sep 2023 23:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwsbt1htlz4ZBY; Wed, 27 Sep 2023 23:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695855818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuXQQGVdQ5erSn13TJF8jYLG3NJ6rpYKBBRmdj4Nmbw=; b=D47i+4cPZrOtH25cevhE6OW9Roo1/LErii6Cder0wrgP0hCu9RrMzg3tIV3ozp/JxFZC4E LTqqgwSZ5aGOI0oSlTlpw2/K2CYK5Ye4CloieO08WM+oUqeg5JeNTjtPQgWWLO/GGWSz5e HWxhkLpOwJAPyHyumHby1CzmsDAgebVyhxSkHHg9b+Ei0pcOYWOCRvrRmM5ZvqgxEjKS1z QHhZlpHJgZz+8pwh0FAnNmdszPN7Uy7f5qFYv+rHfisl7R7l4RGSXnbSZUywqTrZ90+km4 xfCDGo4UpR1Qlow1//NxEA70XFY0we2ER5THLp5SmisYYea/iUHP7wAAozYESg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695855818; a=rsa-sha256; cv=none; b=L4ggnySRsT1662gk5b28UgcdZUI+RbubRUP44G0srF7jIHAKKb/wPwfXhBmxHyAYHBSPFO HP+lxyAPuZES33anxRnfyNKbN3nKdAialqGn7PuGa4zY1Fcn0WJcFyW4EA5wkgJiAKEdQP Sa0B5VdpYhRm8hT1k/w9if91CrnJd2hx+piwQFTgfs0BOOriYYvX1UolVtiCu0OPnYCURM fyf1ZI43BNgPIcDpHvVnQ/EfM3EZEm0dPYPrJjk+YcEv+GUp3xgETVd/5Pat52Mcwu4C0Z mA5dC3+ZmFiUE/64700c2BUhYIiQSQwRVDcnmgDacg+RJmabYD4DKsTi3Eh8xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695855818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iuXQQGVdQ5erSn13TJF8jYLG3NJ6rpYKBBRmdj4Nmbw=; b=rq/Jv4lqwAQyDBdpxd0KjIM3Mc6WYRNciI8spd8zyPx/LmfpPB3yfVK8+VBC3ZJ+X4ehR+ L6sjBhy/Vl/oW09pM3Cqh0rY2wr540Nu3hBObaOx6rb3WTvvhwZiONGHN/OHs6noSql07M gVxkcYD6lhHrB7S7UpUTIkW4aKySPPf+2/rfWnOIBPg33fSUkS78KndWjXVBTbW5Wt7T3x vnSGIGBADzlxE0t6LH6WRQkH218kzkKYOmsSfVHEHbN9iCrDxvs51uGarlsE1R9dznGx0+ AwtLEPC+6NbwkwP7hkIPeCSXPaaPTieUMxB57y0WjoQj49S8pbkdo4MmHRp7LQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwsbt0dzvzxDr; Wed, 27 Sep 2023 23:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RN3bRW040930; Wed, 27 Sep 2023 23:03:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RN3bWw040927; Wed, 27 Sep 2023 23:03:37 GMT (envelope-from git) Date: Wed, 27 Sep 2023 23:03:37 GMT Message-Id: <202309272303.38RN3bWw040927@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: 60c95af88f6a - main - makefs/zfs: Remove a nonsensical comment 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d commit 60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d Author: Mark Johnston AuthorDate: 2023-09-27 22:21:37 +0000 Commit: Mark Johnston CommitDate: 2023-09-27 23:03:26 +0000 makefs/zfs: Remove a nonsensical comment When populating files, makefs needs to copy their contents into userspace in order to compute a checksum, so copy_file_range(2) is out of the question. Though, it could possibly be used when building other types of filesystems. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/zfs/fs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index a4968d5f91e8..0d85ea8eb9d8 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -551,8 +551,6 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) /* * Fill up our buffer, handling partial reads. - * - * It might be profitable to use copy_file_range(2) here. */ sofar = 0; target = MIN(size - foff, (off_t)bufsz); From nobody Wed Sep 27 23:11:10 2023 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 4RwsmZ4XDGz4v7KC; Wed, 27 Sep 2023 23:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RwsmZ3xjnz4Zmn; Wed, 27 Sep 2023 23:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695856270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t0iAcFxhl9WxOruXumGbv8DexmSq0CWSEvabm0/nXvI=; b=tdHG5wNeLNfSK1HZXGIxGOvqsKHmGf8UP47Ah1XGI09CMkgKYvbPhNENXsN0XEj8egXav9 j7PAo2coNhE7Pg5XY3EO81eIdD2INy8IOT0JqQk5utaIOfkQ6A8x98ryHE3ciSk0m4ahAQ QCPpzKCwubkjw3PxF4bvAHlD5kAvnAzaRgsbsUJylYafsbbsd+riO1eJ/urUDpKiTLsJ8t FgZqOVFMfUB/yBT+NlHeP5txhD2Iaol49UH6k9Rxi/cOwPsmhjrTQlldSUxTHDuLCajl92 XJ9X1xCjg+Giv/246PERvgxcDmepu2gxRneyv6OOZXknYqwp+cJkw7kT9S7DEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695856270; a=rsa-sha256; cv=none; b=S38mlxDwu5KSj0/1xrr/M/Hk0JKD67KdtXxSPfEu/JbfuyyZjScdPl8vkDHwdNvw2Q9GA4 NMfOFd4gT/OonyFod8SUb91+6LxQaZ2pnfdAR9/zXzmw6HGxaT1QkRFR0S7A34LIzzWe20 QkCbS1eXID8TE60Waj/k5UXN8FXvIQQnTDVPVam7M8OM6iXIxwo4CmhfyHJNw6iKx/9shz 7lhry83JwLPf5Lrb6FQ8gHrp6CbQoNkvh7HDvHXtvsgpW4cZzNCt/VqJyYkz451tDigk/2 O+1xD8jziMkxwb+Belb+wRllvXwqZ7iHPYGaWSuTFDyRounqk432IDSnjarh+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695856270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t0iAcFxhl9WxOruXumGbv8DexmSq0CWSEvabm0/nXvI=; b=v0/GCH+M/Go+EjWFBGLrTZBdiZoolk6xd/XRmIyZ3/u9fm1aYimTQhTAw82m5mMSXwNVdJ 1TC7KgW+SUbkdICjraeerQfccaYD6JSmg0lKch/RvJPdU2TTEcjlLiFQUT/gt7FyR8T0yI /XXNS85huOPboNTtMc4ffi+1sZXMZnompHWsMdA4ZvPFt/E+9T9zvEWyYe5ao5DN1J/b3d mKMM1mFyv1OZYgvLVMmCNwXhpBpaPIeok0ddMakbhEe55J6iACACe3x1/UZZ+vH56nQnQA aafNfbHT07531ptcmlL3NYn9XJVO9l5UrvTtRTVFbrqWM80ZaaEgAk4REnMagQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RwsmZ325GzxDx; Wed, 27 Sep 2023 23:11:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RNBAFB052385; Wed, 27 Sep 2023 23:11:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RNBA8R052382; Wed, 27 Sep 2023 23:11:10 GMT (envelope-from git) Date: Wed, 27 Sep 2023 23:11:10 GMT Message-Id: <202309272311.38RNBA8R052382@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: cb668587591c - main - Revert "sys/conf/newvers.sh: whack sccs tag" 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: cb668587591c4850bf7fb939a2b79e0e9aa77f7c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cb668587591c4850bf7fb939a2b79e0e9aa77f7c commit cb668587591c4850bf7fb939a2b79e0e9aa77f7c Author: Warner Losh AuthorDate: 2023-09-27 23:07:43 +0000 Commit: Warner Losh CommitDate: 2023-09-27 23:07:43 +0000 Revert "sys/conf/newvers.sh: whack sccs tag" This string is still in active use to find versions for core files before we have symbols. This is premature. This reverts commit e6dc6a27230f836a131118326731b7c5fd417723. Sponsored by: Netflix --- sys/conf/newvers.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 18b1817ca287..73fd6857d307 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,9 +311,11 @@ fi vers_content_new=$(cat << EOF $COPYRIGHT +#define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}" +char sccs[sizeof(SCCSSTR) > 128 ? sizeof(SCCSSTR) : 128] = SCCSSTR; char version[sizeof(VERSTR) > 256 ? sizeof(VERSTR) : 256] = VERSTR; char compiler_version[] = "${compiler_v}"; char ostype[] = "${TYPE}"; From nobody Wed Sep 27 23:11:11 2023 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 4Rwsmb5xMRz4v7KF; Wed, 27 Sep 2023 23:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwsmb55pgz4b4p; Wed, 27 Sep 2023 23:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695856271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zs8YC0M2KdoBQfeF8VnuL6J7ekpSJ789UQqAO2l1jvo=; b=jHrOTlW1rr0BXYlTvhS/yfEuoexAx41THVITCc103H9UtgFuld3GX6n/TiTujEIIqxNB9n tnp7kFhY7oNsxWhiviTX28eFxqpaDSyjJF0K1ioWxbcZ/1lcfJ1iiQMqHi8Hb4plZo7h7w HtTqYsjBkgJ3SESYBTLIM8/bX9Cpo4a16MQDy66I9DrDZKUhnjueza6XhbRMoOhHmYzGCh +4eh0tL4UhbuYQ6L4+qkQddLZ53Y4bN3sqGl415og4TuUqAyLluB723y6Ejw6qWuTtjf9w 9WcnZ5jNledNzbC6ot728u4vKrN33EUfd7GBM1qJg2HogvkDX14WfQouy8kSug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695856271; a=rsa-sha256; cv=none; b=jh08sOVoay/ZlA1tBjOjy2mjFv5adaVt3hqoYrBXiU+VHmB6mvHH1wh4Es3nzbgV/b3eSk I3tI66Sh/ZhZtcKSneS0e2x+K0vaLr+94lp7MQbY4+deRarMn6aYz5slMUgRzKuVStb2Tt vWo9LD749aMxl2EoYYych0qsQWrYsi0ZaTGViHaCYnYWY4D8E1dGXSCEvU+KdxaqH0QyS8 GQrbKkJOaVSrX8vkcqEseybsgJazUSBuYK8znYXxUOits04OFcnQQ3kL8OgKIg0coMp/Jl tb32Ifpr6kSpoLpe2VU6/F+vFonAVWj011FCYaFY/nRR9uMunpK4sNohCn+rXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695856271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zs8YC0M2KdoBQfeF8VnuL6J7ekpSJ789UQqAO2l1jvo=; b=rf7Wr/hBegy9dKGPrOn/bnmFOlfeU6ntKymLXRX2YoucT2zIMn99bD4AeZ95ezB6/XvvN4 sjL9hgkUzSrSFcTHLs+7A97moZtkQNwG37vCX9pL4Z3pdSQyu974sNKgY7hBB4vu4VkK8T Mwy1W2k1gKlJHBPPNESHMChMX2Cu+Bqzgvu93hjZO4Pcs6SL+MRwaOyS+EfBB8d4rxYwKG difXwTVTAqdjYDxhjStWDoKxOCsiqL8LUSouOps7RHGnB/RVtqnDs6km4NOS/8iGw6wY6/ fhhjQHeo0kmarQeC6OAvQii5MLmAn+vfGda8bPVezZMB3t8Rz+sPNUEj7eq1zw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwsmb3px2zxDy; Wed, 27 Sep 2023 23:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RNBBgb052445; Wed, 27 Sep 2023 23:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RNBBuc052442; Wed, 27 Sep 2023 23:11:11 GMT (envelope-from git) Date: Wed, 27 Sep 2023 23:11:11 GMT Message-Id: <202309272311.38RNBBuc052442@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: fc4a6768272e - main - newvers: Add comment about why we need sccs, but deprecate 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: fc4a6768272ea9e943661e0c34ff436dac872ac7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fc4a6768272ea9e943661e0c34ff436dac872ac7 commit fc4a6768272ea9e943661e0c34ff436dac872ac7 Author: Warner Losh AuthorDate: 2023-09-27 23:07:53 +0000 Commit: Warner Losh CommitDate: 2023-09-27 23:07:53 +0000 newvers: Add comment about why we need sccs, but deprecate it The SCCS ID is still the most reliable way to dig out the version information from the kernel w/o false positives. Add a comment to that effect. savecore(8) neglects to save the kerneldumpheader that would have the version information at a fixed location. savecore(8) needs to be augmented to have the right data in the right places, but until then the old-school SCCS id needs to remain. Once that's fixed, we plan to remove it. The reason it needs to be in a fixed or easily findable location is because if you have an arbitrary core and want to pull the source and build artificts that went along with that core, you don't yet have the symbols you need to read the version string. To solve the chicken / egg problem, one needs an independent way to know what to use so that automated analysis of cores can happen. The sccs id being in the kernel ensures that it is in the core image written. The what(1) utility makes extracting the version easy. Sponsored by: Netflix Reviewed by: cy, emaste Differential Revision: https://reviews.freebsd.org/D41984 --- sys/conf/newvers.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 73fd6857d307..33615a8d94f8 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -311,6 +311,14 @@ fi vers_content_new=$(cat << EOF $COPYRIGHT +/* + * The SCCS stuff is a marker that by convention identifies the kernel. While + * the convention originated with SCCS, the current use is more generic and is + * used by different organizations to identify the kernel, the crash dump, + * etc. The what(1) utility prints these markers. Better methods exist, so this + * method is deprecated and will be removed in a future version of FreeBSD. Orgs + * that use it are encouraged to migrate before then. + */ #define SCCSSTR "@(#)${VERINFO}" #define VERSTR "${VERSTR}" #define RELSTR "${RELEASE}" From nobody Thu Sep 28 05:00:14 2023 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 4Rx1WL2BP9z4vXJ2; Thu, 28 Sep 2023 05:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rx1WL1kwQz3ft4; Thu, 28 Sep 2023 05:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695877214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E8y8w/Evmb9p1SaZ/fl/9FCY3R5Z/GP6O4dtPljWKKs=; b=q8bHIXeDfN/CzGnPp8Jq7ZbCwlD1YT5S1B3wj9HyYVJj5XtPvXEirYy5MGkOSPvFlx2sm5 Ef0DF+9uyCgwZeqo9CDfICd4uwQQxmAlrBMEW5cQN4x+ClvpElQeOhYeky/TdJ58p7/5SP eieYKwDECr3NzJdKqOQUgVaWbDv7vgQecrkkuf6gXz3DQZSXO4Y2AqDL5U+Ds5l9lb1aeP i6pQmiOXBVOa/b/TimTcG5KOpLiCvA6qPwSc8RPr1qxpb7oe9YEH/FUCp1aYYm9p7I750b ETLc1sAbwCKOmn9Cbi2gEZkUCd8IjNXaPDG1cJYilLzZRisWc3kd3eZB7OVcQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695877214; a=rsa-sha256; cv=none; b=x1vJgv61Gi+1t51Lq83gbizPBmxjb6eCj6BRcZQ0KqutEjZEGQ4q3aeNuG2oiZaM6so8D8 mNvZCgyrdUSNjantUapuiolFd6SCxmG4m1Si11Tw3qAbZpunK6duaAtkPtOVJPrq+bpQFG NgS4H8VTAWtBWFO0k/UpHTRuGrx+GJvXLi6jyvsGish0Yk+MCGdImS+7WC3HSO4zOoX4m6 edeX5m7ibYwjsQgCa8EF6ZiG2pLTu6EaPvnBu10kzDLb9oaVEhoyOTLj3x5AEHZbqs/yvg 4FqIBi7eM/SlAaso9jQgRvykD6VgrvExHSlVCDI+xazQgj8FMBkW2cF7zRb6ew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695877214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E8y8w/Evmb9p1SaZ/fl/9FCY3R5Z/GP6O4dtPljWKKs=; b=gW6ajDRt72YBX6+St6ReZCYnoVjw2N1jnPg3Sxlm64u/qBhH/ImYGI5RiaXOzxzbAE8cAt COHVOLkvydNHCQWmau9ZbgQ8KWKNpakDwbjvpuxOxuqNDvqPn7Jirjquz6wkSsUAwMlaD0 k8eetmrXMY5bgKnzILtrGnDB11kRvLrOAxBBQRp7wfKwtK+Le7VwwIAz7wACx8FLDr3gO4 9tPhD/d+DNQ7602A+w7eSS40sDrfXUCnk5dIEIec4snqUqh+i9hAhI+gfIqT5+73HfCb9L 3/EQRNFimbgzvcp/pxkTvbapJ3+1tiX9Ar5ElM11CUnILOD09uvhN5+4lDRYNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rx1WL0qGnz16xG; Thu, 28 Sep 2023 05:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S50Epo030600; Thu, 28 Sep 2023 05:00:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S50EQ5030590; Thu, 28 Sep 2023 05:00:14 GMT (envelope-from git) Date: Thu, 28 Sep 2023 05:00:14 GMT Message-Id: <202309280500.38S50EQ5030590@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: 12349f38898f - main - ipfw.8: Adjust section for loader tunables 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 12349f38898f231ca803dcf526bac88cb1b5cd2b Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=12349f38898f231ca803dcf526bac88cb1b5cd2b commit 12349f38898f231ca803dcf526bac88cb1b5cd2b Author: Zhenlei Huang AuthorDate: 2023-09-28 04:58:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-28 04:58:44 +0000 ipfw.8: Adjust section for loader tunables Move the descriptions of loader tunables from section 'SYSCTL VARIABLES' to section 'LOADER TUNABLES'. See also 49197c391b3d (ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables). MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D41981 --- sbin/ipfw/ipfw.8 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 1a042ae2bbbf..e62b8d6efc95 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd April 25, 2023 +.Dd September 28, 2023 .Dt IPFW 8 .Os .Sh NAME @@ -3761,6 +3761,16 @@ or .Xr kenv 1 before ipfw module gets loaded. .Bl -tag -width indent +.It Va net.inet.ip.fw.enable : No 1 +Enables the firewall. +Setting this variable to 0 lets you run your machine without +firewall even if compiled in. +.It Va net.inet6.ip6.fw.enable : No 1 +provides the same functionality as above for the IPv6 case. +.It Va net.link.ether.ipfw : No 0 +Controls whether layer2 packets are passed to +.Nm . +Default is no. .It Va net.inet.ip.fw.default_to_accept : No 0 Defines ipfw last rule behavior. This value overrides @@ -4154,12 +4164,6 @@ Keep dynamic states on rule/set deletion. States are relinked to default rule (65535). This can be handly for ruleset reload. Turned off by default. -.It Va net.inet.ip.fw.enable : No 1 -Enables the firewall. -Setting this variable to 0 lets you run your machine without -firewall even if compiled in. -.It Va net.inet6.ip6.fw.enable : No 1 -provides the same functionality as above for the IPv6 case. .It Va net.inet.ip.fw.one_pass : No 1 When set, the packet exiting from the .Nm dummynet @@ -4176,10 +4180,6 @@ Enables verbose messages. Limits the number of messages produced by a verbose firewall. .It Va net.inet6.ip6.fw.deny_unknown_exthdrs : No 1 If enabled packets with unknown IPv6 Extension Headers will be denied. -.It Va net.link.ether.ipfw : No 0 -Controls whether layer2 packets are passed to -.Nm . -Default is no. .It Va net.link.bridge.ipfw : No 0 Controls whether bridged packets are passed to .Nm . From nobody Thu Sep 28 08:50:44 2023 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 4Rx6dJ5XKlz4vlHx; Thu, 28 Sep 2023 08:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rx6dJ4m5Mz4T42; Thu, 28 Sep 2023 08:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695891044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pNvAREPxgwVvAJC7R7jw2urx05HDgbOruLJjdrd34Ec=; b=yqCg/eNtFe5XpNKoVvq2Ee68iTLEPjkH9tmGfv569+DYHDF238UGSstKrpUxMFNtCu3Wx+ Ew4wlwiRhaJUwVzLSV6/830/qj+0OiPIAVdFEMOxKBgcCjIxGpxHU5yJDXk04yy2it8WMs p9+ARHjdeqw8W/z/yAXgFxv/ts5WWn1GDAg2U/NThAIZYdCxsKeEscKvLVdwgBp+AWlB5a W0U3MiNK3gl9SOmZ/DaTCkISy6rHbw+dDTGOOMv3UEJzmPhevyVYhVUshGpTsEWTtC16Lw gMql2e/KbMRKUCz/ztLtfVpeuSX1AUdeFdrU224so2CtPNWOLPLz28A8J7Heaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695891044; a=rsa-sha256; cv=none; b=HOilAh6MaBJnQh8gAyAFdlsIZFD39oTPrbCaf1cJ2nrQdQ4AvWF5EidQgYfnN5Sit4r1Sn qe3XYvQ8lcULJmjVlQAkQe3rd2pJAP7ZSV5ogrpspTXzkD/7KoY/2UAsumV8a5Ie9salzi g625zvWMenIDUfBzKBz5JX/IBoQcyLJuMe/5ebviSAoEqAfImSRqDGQtdHpcKNGFmo1jNF x2Z4+sxSyQbqGUlVb4o8nigh4VPra4PYN+7YupQQzj+E5PCdzGoAv4YI9j3DVJgnDJ2FQv Cj3B/aBRHmse0J1QltwVPXluNiHYwI+st6aODRhUWwIgbwhen3dWNc+dj/GZFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695891044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pNvAREPxgwVvAJC7R7jw2urx05HDgbOruLJjdrd34Ec=; b=Y5Rl/hF5sgpzb7tWPloI9CdNX2AblAAQ6weaVxplqII+HBbPi5DTmJQC47LENvnkqqT1Jk jzB5QeAuBWzbR6o3w6ap4G4s9XYg3vaaDXaJjKKDhDczALmo8ee4FLU8fjpSf1eLTIQjzE 34qw52wNzjwEf75yRsSccjGZpYG8NDe4A5mSTUea8qDBbB469ixH3Ehcx+EZqiPL+IqmBA bEYKqC6iMDWDf4zOzC/zPnUU8knREe4L57cF4K/xLdPHaR20+DrpVIzwg8Ktn3AYpaCwUF gS4rC/0vn5C3Yhvr/ktrNLGydRdek3g/JpbuqaFmfYkRpDXzUhaD5JpHcrb82g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rx6dJ3Vr8z1KC; Thu, 28 Sep 2023 08:50:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38S8oiKe014642; Thu, 28 Sep 2023 08:50:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38S8oiw7014639; Thu, 28 Sep 2023 08:50:44 GMT (envelope-from git) Date: Thu, 28 Sep 2023 08:50:44 GMT Message-Id: <202309280850.38S8oiw7014639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 6a0e7f908802 - main - bhyve: always generate ACPI tables 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a0e7f908802b86ca5d1c0b3c404b8391d0f626e Auto-Submitted: auto-generated The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=6a0e7f908802b86ca5d1c0b3c404b8391d0f626e commit 6a0e7f908802b86ca5d1c0b3c404b8391d0f626e Author: Corvin Köhne AuthorDate: 2023-09-08 06:56:41 +0000 Commit: Corvin Köhne CommitDate: 2023-09-28 08:43:04 +0000 bhyve: always generate ACPI tables Most systems don't work properly without sane ACPI tables. Therefore, we're always generating them. Reviewed by: markj MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D41778 --- usr.sbin/bhyve/bhyve.8 | 4 +--- usr.sbin/bhyve/bhyve_config.5 | 2 +- usr.sbin/bhyve/bhyverun.c | 8 ++++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 7eddeec4647a..f80dd54fc2c3 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -112,9 +112,7 @@ exit is detected. .Bl -tag -width 10n .It Fl A Generate ACPI tables. -Required for -.Fx Ns /amd64 -guests. +bhyve always generates ACPI tables so this option is obsolete. .It Fl a The guest's local APIC is configured in xAPIC mode. The xAPIC mode is the default setting so this option is redundant. diff --git a/usr.sbin/bhyve/bhyve_config.5 b/usr.sbin/bhyve/bhyve_config.5 index 6904ad096c0d..1322abd67958 100644 --- a/usr.sbin/bhyve/bhyve_config.5 +++ b/usr.sbin/bhyve/bhyve_config.5 @@ -120,7 +120,7 @@ The value must be formatted as described in .Xr expand_number 3 . .It Va memory.wired Ta bool Ta false Ta Wire guest memory. -.It Va acpi_tables Ta bool Ta false Ta +.It Va acpi_tables Ta bool Ta true Ta Generate ACPI tables. .It Va acpi_tables_in_memory Ta bool Ta true Ta .Xr bhyve 8 diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 3db796c65a28..1d4cf048b59b 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -1201,7 +1201,7 @@ static void set_defaults(void) { - set_config_bool("acpi_tables", false); + set_config_bool("acpi_tables", true); set_config_bool("acpi_tables_in_memory", true); set_config_value("memory.size", "256M"); set_config_bool("x86.strictmsr", true); @@ -1240,7 +1240,11 @@ main(int argc, char *argv[]) set_config_bool("x86.x2apic", false); break; case 'A': - set_config_bool("acpi_tables", true); + /* + * NOP. For backward compatibility. Most systems don't + * work properly without sane ACPI tables. Therefore, + * we're always generating them. + */ break; case 'D': set_config_bool("destroy_on_poweroff", true); From nobody Thu Sep 28 12:20:09 2023 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 4RxCGx6JG9z4vwW4; Thu, 28 Sep 2023 12:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxCGx5f0Wz3JDs; Thu, 28 Sep 2023 12:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695903609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1v2YyP0LhlhYgE5VDckZ5dgacPJpfVq7LHXeFQNjnk=; b=j2ND9PzgdVeXnaptDauLiHzm3XXLOEOX5Qj2Q8vH7hIT4o5/PtWk/pfORSpbuOq2GsCCm0 ZchNxoTIDDSJF+Ys7W3tfg5v99sfJB/yumIqgTWz12+O/YRr1iwwQVOxA5zzPDtbl2ezli d2kS+A+JtyOao6kyMkWiuX7cgibaA74eswp2snC68wpN7nvw+Kj1F58Seq/cM6iRB97pvo bE3y8Xh3oHk2k1zYDAmLsdmHM9OnMOxAiqL3CC8kzxxQuZeMsYiplGFB5LJnJcHLRrnemD tD5bd6krTSZPZsUiQLwJV2E0Rm2tkLNlb5KMgLkSleAn0OTTHD0dCKBFa7OkPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695903609; a=rsa-sha256; cv=none; b=OoCHfDTZacQGw2m5M0BNMzhnVx9g86Hq4XnJfC/uQXG/EZXl3oyPRNkeZqC2ZbEZ0F9Som T7DeJBejqgzBjY74/qedTsoOLhNQ75BlCnddLp+g6xIzu3+KmY37aoBtkFfxL388+3QKsQ 2UfSBduBC0Se1SUkbzmAt1Mok/ygL1xQw4lg4Q3IwNn/ubT4DlB+882o0/zcbsZL+Pp2h/ ArM6+bdSrYdLiteEPrSRkvc707BPhV1wZSEkSL1tQ9MRbaqPo8GIQNGFipWlz5cQviittJ aIsnz3M2PmSCCbVL5gmYVXrqChWbu2jckJaRTdlorHXIWE9TOGKqKOzsJqCcFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695903609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K1v2YyP0LhlhYgE5VDckZ5dgacPJpfVq7LHXeFQNjnk=; b=gfeXSL91rAN2V3riYiVh9cs5xBJxktntT2Q1ep5OZ+7JOMsN8Ut4gq3Qp7q0YjKV1/E7jO TNWSHHZeY++v+RSlQjUOqNMY/tDocNiR/FZfm8fSt8idi92gUyujLPRW1dNR96D04lHzfC ozAriYYlDe8Uy5pLZOUu2B9b+qCWBIbyZH7FPH+W/z1v+s5Eq5VO8SFdKamHbJJvOm6bbq 4qNfBAGeh5nCSzxU1iBbBHyf3pDdxwZTCybh4JJwSxdTgqqUwf3yZDKYAjYggkcpQusPY8 8O9LAFgLJd0JR3STgF8Ts0g5WvXgGb1hZX3cemdr0fhzZF/MakWjxoQUXbWBjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxCGx4jhQz6gW; Thu, 28 Sep 2023 12:20:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SCK9xn060189; Thu, 28 Sep 2023 12:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SCK9Wk060185; Thu, 28 Sep 2023 12:20:09 GMT (envelope-from git) Date: Thu, 28 Sep 2023 12:20:09 GMT Message-Id: <202309281220.38SCK9Wk060185@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: 3e609fd481c0 - main - pf: add note about changes ported from OpenBSD after 4.5 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 3e609fd481c07802fe837ed834c3710b8c19493c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3e609fd481c07802fe837ed834c3710b8c19493c commit 3e609fd481c07802fe837ed834c3710b8c19493c Author: Ed Maste AuthorDate: 2023-09-27 17:59:30 +0000 Commit: Ed Maste CommitDate: 2023-09-28 12:19:40 +0000 pf: add note about changes ported from OpenBSD after 4.5 The last comprehensive sync with OpenBSD's pf corresponds to OpenBSD 4.5, but many changes have been ported over since then. Reviewed by: kp, gbe, Kajetan Staszkiewicz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42002 --- share/man/man4/pf.4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/man/man4/pf.4 b/share/man/man4/pf.4 index c4c1d6cc8604..67d85b7b1a92 100644 --- a/share/man/man4/pf.4 +++ b/share/man/man4/pf.4 @@ -1228,6 +1228,9 @@ and then .Pp This implementation is derived from .Ox 4.5 . +A number of individual features, improvements, bug fixes and security fixes +have been ported from later versions of +.Ox . It has been heavily modified to be capable of running in multithreaded .Fx kernel and scale its performance on multiple CPUs. From nobody Thu Sep 28 14:07:36 2023 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 4RxFfx1Qqzz4tq9C; Thu, 28 Sep 2023 14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxFfx0zBHz3SM4; Thu, 28 Sep 2023 14: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=1695910057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4T9kTbjgZTDTRC0q6gUr4g4BS2p+3s6pJBPrJPPGFi4=; b=Pv2kZ6Nx/pcaUEvID5rTYqTOXPl0gA7S7JNMAT1SzLed4wzc4CtAL5Tk8pq/+VopQAPNkU oQRdFkUsOuFkWU7oBF2LWNnOryXapA8cIMjQAiC+66EzsjjV54wVTmX7tCDcpfR5eiBxga 3cqRpHg7ibSziJeNm6iUXrcUeUf8s0O/3s6LzRSLpTUUgHvXY9sQg1+CurBjtVTgzVQydD GUGuenhA4rGueiquEZbJPWyyxsVQceE9SgIvuhMu/GuqYSjiI9iSbo+6r5ISwEV6XZ/BRc HxBOWj17U37yAQxle32W4EXmBbLJOVfU3AGTKTDl1XjDJIuUH4Gsk02hsbN/OA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695910057; a=rsa-sha256; cv=none; b=PJevXEPToQkyTHFhMoyggniIEW/59YXNcDrOjn+eipTD6nilRTnm3e509gCxisd3Pb2G8b MU5GcJvDF+sNwx1Wz77IcssVYd3m/WdfnWP0uSz6FyPcTmvKLTr2uIVjjWO+IcZ0sjygTJ JBBl3J2zfAWFtWc12MTF2SqHJ1McHr57KtzpGk13smJPLYWj1kDYslQdWNlGV6rJl3eWov QjujCOXDxWOQj4d2XZG/H4pCq0Uyh84/rY9pRM9PMF6UKj5Hs4n4fbGnyUSSe/pDiFdrmv PUNwaERrNKl84ofg2RYwRP8/iOM+b/4rDMzUM3yoPAHNLyRD6ZNDCzqL/IWSig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4T9kTbjgZTDTRC0q6gUr4g4BS2p+3s6pJBPrJPPGFi4=; b=k4tLrBzes5MCmTkUdtKNUFjsqKuA2F+/KsVbvk1Frr9ZUGJOYO+guynV6jOCAHadAbf60+ MGV5SJTKH0Sq098N+UoTYNMlIPCIWdNOXX2IOuj5dzhEftEx2tOfBnMszTne1btrC61D4Q ZkQhqnSTmAqh5dmMi8v2wTjrKxIAMEXnOPx1sNe+0vwovGJ5WA6UOBH/+2bKCcncAJM/aa cRgUrgcVqFpFf6MOh2d7/vOFhACYmBN0TkxL+PmdJK5zYwGvbsh9vtSKhCULij5kuqRnOV czxGLLpROoXKhYzPrC2cutrYRpUkwDtCFC/ngDLMgqXEW3OlGPH+/EuEVdquCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxFfx029wz8yw; Thu, 28 Sep 2023 14:07:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SE7a1r039195; Thu, 28 Sep 2023 14:07:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SE7aBN039191; Thu, 28 Sep 2023 14:07:36 GMT (envelope-from git) Date: Thu, 28 Sep 2023 14:07:36 GMT Message-Id: <202309281407.38SE7aBN039191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 64c6327738fc - main - cat: add CAP_SEEK capability 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64c6327738fc24bb34b9f40ff1c223ab460ef637 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=64c6327738fc24bb34b9f40ff1c223ab460ef637 commit 64c6327738fc24bb34b9f40ff1c223ab460ef637 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:20:47 +0000 Commit: Mariusz Zaborski CommitDate: 2023-09-28 13:38:36 +0000 cat: add CAP_SEEK capability The copy_file_range might require that. Reviewed by: emaste, theraven, kib, markj Differential Revision: https://reviews.freebsd.org/D41967 --- bin/cat/cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cat/cat.c b/bin/cat/cat.c index ec14451acd0c..ce7a83d59d5a 100644 --- a/bin/cat/cat.c +++ b/bin/cat/cat.c @@ -155,7 +155,7 @@ init_casper(int argc, char *argv[]) err(EXIT_FAILURE, "unable to create Casper"); fa = fileargs_cinit(casper, argc, argv, O_RDONLY, 0, - cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL), + cap_rights_init(&rights, CAP_READ | CAP_FSTAT | CAP_FCNTL | CAP_SEEK), FA_OPEN | FA_REALPATH); if (fa == NULL) err(EXIT_FAILURE, "unable to create fileargs"); From nobody Thu Sep 28 14:07:38 2023 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 4RxFfy2lxmz4tq6p; Thu, 28 Sep 2023 14:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxFfy2DDFz3SXT; Thu, 28 Sep 2023 14:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vu3AYRSU3fKWoVvmDLCOX6Q4j3dp9Rnyh9puom8XmPM=; b=h70gXRLSqpdQuiOD7xCweEt06ruyGmCNyO9QBTT13NsS9UbTm7ZZVVJs83cp9LTTOOjlQt wjqwJMXViWl8zFEbUSoxCA/9yEHyTvtGUyxSYZx69fu2MolGNE+yxivPFSTHsHbMImA721 h6PsBf/xAVuuUu07xCun3dSoc8jzmOW5EIlg9U4CFY6YpMREn4/a1RZOQ0SwPRdeEQBq1f 1TjVwmZE7rHVrcRSk9t60CrWMf4lBJcNW8Y2PKiFw4PCKywDHOfCz0nCxBMnWiUv/ph1Lx 1YZnmeiJ8tdutnT/Jl10x1u9JLNwAsL+j3h2XnUMkf43pvLVXyTvJRIB4eoSfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695910058; a=rsa-sha256; cv=none; b=qcJVdw1BNqdyH2gKmgc25RR5G0YESC6SILG5DGkFk0/vMvbG3rp64QYcFZgwP6UmaoAw9j IHXYozwTtOlmGeqd8pu85cy1MbCkjmi97zbG3gwHoDpLeIt9Mt7cJK2KoVu3e3Br+Ku0DT Q45yz9Kg9fY/krl5/LakRV3qbe1g57ij78aRQa1EW9U6BAKDfCovOcF21RDeJhPe1038wE 8y81oerEguuy1jrG+5f+e9fKpansH0KFPIzEiWdxiDfu4Bo3rp+N30OX8FH0wK4QmgNFAT e5klNH1+JYNgqxyT8mHWxNwFlxz5K8jnaAk069YgnvJ9WrrJCscboVjSOvidbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vu3AYRSU3fKWoVvmDLCOX6Q4j3dp9Rnyh9puom8XmPM=; b=as/Uf99RUCfQXo6Y7Cu+FwMYcA9tACO8S8yXg6x1Sj6T3dg132p7SEEP3JQbf9hq7r7VNa cUGmDGI/SvzIs/W2x0VaPv1j+Pp9lNwHZSvUz2D3r1/lhrYRKiNo/v82G1y/sbY3jIJ0C/ xbSKbVJO0m/9OW/aJyXK3G7CN8oimM1uz7oNoPLyHpwspss7L1p49YwkU6g/fPLr2V0j9w 7DALpmz38xkMT9ve6yPli6Zwh6U9zu1l/idTr2Y+knlu/ZprMAu/lG7DktsEFhSjciel+h TuXCRXMOJ7iJ1pqU3udO+vmeOCsc6fISwJXKNpSPvYCb0b9dKG2fipSf2h+fFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxFfy0ymjz977; Thu, 28 Sep 2023 14:07:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SE7cQh039239; Thu, 28 Sep 2023 14:07:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SE7cW9039236; Thu, 28 Sep 2023 14:07:38 GMT (envelope-from git) Date: Thu, 28 Sep 2023 14:07:38 GMT Message-Id: <202309281407.38SE7cW9039236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 15a51d3abaef - main - copy_file_range: require CAP_SEEK capability 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15a51d3abaef27ddea66320cac7caa549738a1a6 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=15a51d3abaef27ddea66320cac7caa549738a1a6 commit 15a51d3abaef27ddea66320cac7caa549738a1a6 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:24:39 +0000 Commit: Mariusz Zaborski CommitDate: 2023-09-28 13:48:07 +0000 copy_file_range: require CAP_SEEK capability When using copy_file_range(2) with an offset parameter, the CAP_SEEK capability should be required. This requirement is similar to the behavior observed with pread(2)/pwrite(2). Reported by: theraven Reviewed by: emaste, theraven, kib, markj Approved by: secteam Differential Revision: https://reviews.freebsd.org/D41967 --- sys/kern/vfs_syscalls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 06b861a2eb73..9d85a295a6ef 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4899,7 +4899,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, len = SSIZE_MAX; /* Get the file structures for the file descriptors. */ - error = fget_read(td, infd, &cap_read_rights, &infp); + error = fget_read(td, infd, + inoffp != NULL ? &cap_pread_rights : &cap_read_rights, &infp); if (error != 0) goto out; if (infp->f_ops == &badfileops) { @@ -4910,7 +4911,8 @@ kern_copy_file_range(struct thread *td, int infd, off_t *inoffp, int outfd, error = EINVAL; goto out; } - error = fget_write(td, outfd, &cap_write_rights, &outfp); + error = fget_write(td, outfd, + outoffp != NULL ? &cap_pwrite_rights : &cap_write_rights, &outfp); if (error != 0) goto out; if (outfp->f_ops == &badfileops) { From nobody Thu Sep 28 14:07:39 2023 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 4RxFfz4T74z4tpnW; Thu, 28 Sep 2023 14:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxFfz2yrXz3SNL; Thu, 28 Sep 2023 14:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OeQ6v2RsRDKadogavUFqgXC+M3bXof0Jf7ktJTu5NGM=; b=CX08/VLqUxQvLnnCXxAtKFws7mvcWTQkgFHn+lE0sNLv8DDYD8ilv80Tjg0ISbS+rTK6Rt XKGZsrhp5jR1kQJQn3oo+YZhfu1ZDJUIaZ9GYxP4sCAazfxVMAqqEWJXSKbd8bhG4c259j 2UKRrcoKWaUoZufQ5KWxu3weOGk4oppakFYbxjL+4hc5JhbSWshZPPGcGUsd1LHNg+1RXP xqSoQNa5yHUwAB1ycrguEoVx+/FSf6nifTEsPQsePGT8EsITbB3xGboF2Mdy8l0ke/yGeK mcKVz/OQlvvmqSiZKSMGKrbQ5xEc2MeMt8syA4morOE2nBPEJtJKJTCY7O5ffg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695910059; a=rsa-sha256; cv=none; b=KKs1H9/32V57+xVXUR5K1Af3/rPZMiLF7700JJ2mR00hbAyAFostyTBsJRucC1gKD53V7T x4ruJYTBvef1EUWpqgXCZ0fIH/FRqDTW/dgPMGXLWo0bXXOm57E3EqJtc3zRVtUM+T43KB KOLI1z94SUH2/n7h6jfUEv6P40YTLm/6jvJQWID23GkA3UJEKB+l0OkXf0s2au687aKRVB 3h3vEhZPyrL058nCSwGsQ2/c1mHGe2Fa+TohosQWPJSxamIyTUPcpVMB+S5H9yrbrHw07U IJgXGzRbWo1XLbqLkXMy6EgPNWYu6QIa6rM1Mm7uqWR4CRo0kSymW9yKRRnm1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695910059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OeQ6v2RsRDKadogavUFqgXC+M3bXof0Jf7ktJTu5NGM=; b=dyn9br5JEdFpqQMJlwGX/SVHm1s062+wyl5pJFtBsAHGtAMHP79/YH0ZcRrDayUGAOANAN rp4xLJ9rNShiJS2Jkl9NQUDOQIobutZe+2yuCDcJMEd7Ij2/g+wXimT2Gj6TYQr3dRG7EY iakyjAoIs8zxEq4JEBg2qWWHtiXpUSq5UkxwvMjn8G8qLwYQDFiQNCjoDq48xjGhIux1cP BjTAzUd3U8Gz7TfLGH5NICsVjZpsE7gwL+Jo5/YgqdUFkw+GbeDnx8aBZ5XwRLJSLpsGxx ww9VfW0pnml3VIi8BfXtcd26fhHmCr8C70aXwtJvW2Qvvm+iKLNyUhg+Bt8JSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxFfz20mqz978; Thu, 28 Sep 2023 14:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SE7dbg039281; Thu, 28 Sep 2023 14:07:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SE7dAR039278; Thu, 28 Sep 2023 14:07:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 14:07:39 GMT Message-Id: <202309281407.38SE7dAR039278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 62d3f57c22ee - main - capsicum: add tests for copy_file_range 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62d3f57c22eea353dcc3c4a2f70ef72a42a8cd83 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=62d3f57c22eea353dcc3c4a2f70ef72a42a8cd83 commit 62d3f57c22eea353dcc3c4a2f70ef72a42a8cd83 Author: Mariusz Zaborski AuthorDate: 2023-09-28 13:27:27 +0000 Commit: Mariusz Zaborski CommitDate: 2023-09-28 13:48:32 +0000 capsicum: add tests for copy_file_range Reviewed by: emaste, theraven, kib, markj (all previous version) Differential Revision: https://reviews.freebsd.org/D41967 --- contrib/capsicum-test/copy_file_range.cc | 228 +++++++++++++++++++++++++++++++ contrib/capsicum-test/makefile | 2 +- tests/sys/capsicum/Makefile | 1 + 3 files changed, 230 insertions(+), 1 deletion(-) diff --git a/contrib/capsicum-test/copy_file_range.cc b/contrib/capsicum-test/copy_file_range.cc new file mode 100644 index 000000000000..b785eb7f1e97 --- /dev/null +++ b/contrib/capsicum-test/copy_file_range.cc @@ -0,0 +1,228 @@ +#include +#include + +#include + +#include "capsicum.h" +#include "capsicum-test.h" +#include "syscalls.h" + +#define TOPDIR "cap_copy_file_range" +#define INFILE "infile" +#define OUTFILE "outfile" + +/* Test that copy_file_range() checks capabilities correctly. + * When used without offset arguments, copy_file_range() should + * require only CAP_READ on the source and CAP_WRITE on the destination + * file descriptors, respectively. + * When used with offset arguments, copy_file_range() should + * additionally require CAP_SEEK. + */ +class CopyFileRangeTest : public ::testing::Test { + public: + CopyFileRangeTest() { + int rc = mkdir(TmpFile(TOPDIR), 0755); + EXPECT_OK(rc); + if (rc < 0) { + EXPECT_EQ(EEXIST, errno); + } + wd_ = open(TmpFile(TOPDIR), O_DIRECTORY); + EXPECT_OK(wd_); + CreateFile(TmpFile(TOPDIR "/" INFILE)); + CreateFile(TmpFile(TOPDIR "/" OUTFILE)); + } + ~CopyFileRangeTest() { + close(wd_); + unlink(TmpFile(TOPDIR "/" INFILE)); + unlink(TmpFile(TOPDIR "/" OUTFILE)); + rmdir(TmpFile(TOPDIR)); + } + + private: + void CreateFile(const char *filename) { + int fd = open(filename, O_CREAT|O_RDWR, 0644); + const char *contents = "lorem ipsum dolor sit amet"; + EXPECT_OK(fd); + for (int i = 0; i < 100; i++) { + EXPECT_OK(write(fd, contents, strlen(contents))); + } + close(fd); + } + + protected: + int wd_; + + int openInFile(cap_rights_t *rights) { + int fd = openat(wd_, INFILE, O_RDONLY); + EXPECT_OK(fd); + EXPECT_OK(cap_rights_limit(fd, rights)); + return fd; + } + int openOutFile(cap_rights_t *rights) { + int fd = openat(wd_, OUTFILE, O_WRONLY); + EXPECT_OK(fd); + EXPECT_OK(cap_rights_limit(fd, rights)); + return fd; + } +}; + +TEST_F(CopyFileRangeTest, WriteReadNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_WRITE); + cap_rights_init(&rights_out, CAP_READ); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadReadNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_READ); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, WriteWriteNeg) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_WRITE); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadWrite) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadSeekWrite) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ, CAP_SEEK); + cap_rights_init(&rights_out, CAP_WRITE); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadWriteSeek) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ); + cap_rights_init(&rights_out, CAP_WRITE, CAP_SEEK); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_NOTCAPABLE(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} + +TEST_F(CopyFileRangeTest, ReadSeekWriteSeek) { + cap_rights_t rights_in, rights_out; + + cap_rights_init(&rights_in, CAP_READ, CAP_SEEK); + cap_rights_init(&rights_out, CAP_WRITE, CAP_SEEK); + + int fd_in = openInFile(&rights_in); + int fd_out = openOutFile(&rights_out); + off_t off_in = 0, off_out = 0; + + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + off_in = 20; + off_out = 20; + EXPECT_OK(copy_file_range(fd_in, NULL, fd_out, &off_out, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, NULL, 8, 0)); + EXPECT_OK(copy_file_range(fd_in, &off_in, fd_out, &off_out, 8, 0)); + close(fd_in); + close(fd_out); +} diff --git a/contrib/capsicum-test/makefile b/contrib/capsicum-test/makefile index ad697f160e2e..e55393bbf131 100644 --- a/contrib/capsicum-test/makefile +++ b/contrib/capsicum-test/makefile @@ -1,5 +1,5 @@ all: capsicum-test smoketest mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS) -OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o +OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o copy_file_range.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o GTEST_DIR=gtest-1.10.0 GTEST_INCS=-I$(GTEST_DIR)/include -I$(GTEST_DIR) diff --git a/tests/sys/capsicum/Makefile b/tests/sys/capsicum/Makefile index 542c6720521c..81cb4fa1ceee 100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@ -19,6 +19,7 @@ SRCS.capsicum-test+= \ capsicum-test-main.cc \ capsicum-test.cc \ capability-fd.cc \ + copy_file_range.cc \ fexecve.cc \ procdesc.cc \ capmode.cc \ From nobody Thu Sep 28 14:58:20 2023 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 4RxGnb0hvRz4ttGM; Thu, 28 Sep 2023 14:58:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxGnZ0F2Cz3WfN; Thu, 28 Sep 2023 14:58:26 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=jKDd4zEQ; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::734 as permitted sender) smtp.mailfrom=markjdb@gmail.com; dmarc=none Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-773ac11de71so824389785a.2; Thu, 28 Sep 2023 07:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695913105; x=1696517905; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=mnGe/XnXHy6XuDMnAyeurHjpezqSvdN3t5IJdBaBIlw=; b=jKDd4zEQUBKwW6RFVpWuNbqCj+u2I4h1mEiEWh/BNgPtd4v8z8UTPkbOSQ4AJxVKzK oZunmXC0JAu2AWwiC0upv+Jq/nWV10dEH04st7WVWkJdL32BS3ehEMwoU77UheTY+ywZ eV/wQhHIcekoyWQetB5NlsFlg5pwgUKgPL0exdI0blnknnvW46UxMChxnT35dKHjB5OI kiFEu747jUJPKihJPKZGXnTOeoNgKVHChkh8x2/S0nFMRwOwgVQZtxZMQDxuyrK1PxSk jCpknmgkzAc4wwAFYAnzRLYyUU6UOdV2xVIUzO3qkXljwlEkC1eCmwvy56lY9hpFtTLV JGZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695913105; x=1696517905; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mnGe/XnXHy6XuDMnAyeurHjpezqSvdN3t5IJdBaBIlw=; b=WD7eyiwAZff4irZaepNnFvKut/kqjDuJcsH7A4JC4OoX72jSFcPUbA5VLTsXEkSXUQ bdRHm+4NbvWt4yMOaEEJYfHpf3eGlgKkvtmGdMK7DIpZ+SHTcFnpxlcYtSeYVoupVuS2 7/WaMlwJ5l/Q3dmfVmuCGnNsRJ3J+7f/eo0QqP4eJbRVfjn0Jg0F3Syptcyd/+jSZlI+ E76TlNaMRi4cMHaXPN8YrCF0RPBh8aeJUwRpiX+OAJyqBCJpMrLQclTFb5lAfIc+pi9U x7H3YtnJLLDyU7kf/KkQIYc8jqvR9rBVBh6f36/Kl5POOMpL+mwW7CNmBvgXm6X0dUYv quHw== X-Gm-Message-State: AOJu0YwT/SoTyuob7cl52TrLO+c8fsGVhsUmz24GNfL9DY/GqVBBQUK0 /Lkbi7nLjyodBabS2yHvM9FVH3zfX+M= X-Google-Smtp-Source: AGHT+IEnfsLDxhXIuxYbil8bhTeN4VPNJM+c0gsX6rv2GfPzeu4RbpGZQJDURrSImUiqK0F0sZvVVg== X-Received: by 2002:a05:620a:4489:b0:76d:5126:65d8 with SMTP id x9-20020a05620a448900b0076d512665d8mr1639488qkp.6.1695913104613; Thu, 28 Sep 2023 07:58:24 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id vu4-20020a05620a560400b00774309d3e89sm3445577qkn.7.2023.09.28.07.58.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 07:58:23 -0700 (PDT) Date: Thu, 28 Sep 2023 10:58:20 -0400 From: Mark Johnston To: Baptiste Daroussin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: References: <202309271400.38RE0s2R037013@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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.69 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.993]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::734:from]; BLOCKLISTDE_FAIL(0.00)[2607:f8b0:4864:20::734:server fail,192.0.220.237:server fail]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RxGnZ0F2Cz3WfN On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > Author: Baptiste Daroussin > AuthorDate: 2023-09-13 07:43:33 +0000 > Commit: Baptiste Daroussin > CommitDate: 2023-09-27 14:00:00 +0000 > > flua: add fbsd module > > This module is bundled into flua, it only provides for now the exec > function. The point of the function is to be able to execute a program > without actually executing a shell. > > to use it: > fbsd.exec({"id", "bapt"}) Hi Baptiste, How is this different from posix.unistd.exec in the luaposix module? Wouldn't it be better to add this to the existing posix.unistd namespace in lposix.c? exec does not seem FreeBSD-specific. I have a related question: this week I wrote some FreeBSD-specific lua modules wrapping some system calls like sysctl(2) and cap_enter(2). How do we want to organize the flua namespace for such things? Should we have a freebsd.sys namespace for system call wrappers? I would then put bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we could have freebsd.lib.procstat, for example. From nobody Thu Sep 28 15:10:33 2023 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 4RxH3Y2p4Hz4ttjn; Thu, 28 Sep 2023 15:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3Y2MYwz3XXd; Thu, 28 Sep 2023 15:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tDd5OaJBxq0udQZtL2KJDR5crnDlxpIwNpE52whURvM=; b=pAVSE3Whb/lOdK5G8/yHDEc0Hkr4tLT3iarcsB7VENRyQzeaseBsmg0amPod3J0YcOZNWr DvVkh3cLrglFqO09rrgi8aV2Z2UWhqb1fLRujt01giuwfCqb9F5YWgy6XJgJzfyM2uSdX6 rGUAXM5w1Cg99Os1EBBYnFj6pfQLcFUpSdhaj81AjxNTkQ3WjcRrl4epAGMYZqvjq7IkyN 6AbdHEaGOADkmwTfNduzkLvATLHytb8b7ZnxNq2SLVRIW9DsRVnSNp8g6h4bwRe1Hhu2XK zpkVp2cnEFC2J1+N6EHRFerlnpPTXne8dpSdGuuosXywx7UeWLV3YGT3VkMTgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913833; a=rsa-sha256; cv=none; b=VlLP+1iIYHlq9O/x4XTTukln2nyLNjzChMfaXhUIeU6tcCrihG9gVkywx+uKXHHYYsb106 5FBiMNfisGfAPSQj2XbFysMNuJwB8Q5z5ptEocYqs06oipEaot8cawbH5A1Rd3eMFJ+j0L IyKidXbTWMb91TRkwmAoV0QV+WgE6JgbtoDGknvf44V8K8Ky6UM6NORWYcK4NZSQ9k2ric lBzEtGo/dyvT2Nm1u+ifqVT7fTpQt0VGYQ9c0zTnIojyJbUuncgCMiNpHVr/v8IoyeyR/j O3e66udYmHmbXgy+ATGuebGqCFhjUfcZIFxEAv4pveHOIIT9aBr/K84kr4VJ/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tDd5OaJBxq0udQZtL2KJDR5crnDlxpIwNpE52whURvM=; b=ou6brUkTQCJBHDrW3E6XdVKUZBPL9Uui+W2qfgLentX7t1aENDxdDNM5f6IlPUD/SwX1gp oaILG9rlfuBAWiB/oLaqrGTGpkAk5v+ovNA4nDlePfH0JDyBHKg9OX8Dhdf9/FnuFeMeJO PjdVYypzMPY1yU2XDHwNLfNjsZwnZWZtaHY1EIEIFbtN5uNzNnFxTsNlKBepPW+m6JLHc6 xvih7Swky4LKHUP5g7R9/suIiOKdiuHzrblGtHJohGuSZ1EhXSEoKNruVeyJGc5nRBShWt q4SDfeWUwSuveJdhc5ZMpMMaFrtEBjiRPkcc45ZhOEVCM0k8AHWmzBt+27vQkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3Y1J15zC03; Thu, 28 Sep 2023 15:10:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAXaA047108; Thu, 28 Sep 2023 15:10:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAXVg047105; Thu, 28 Sep 2023 15:10:33 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:33 GMT Message-Id: <202309281510.38SFAXVg047105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 7974ca1cdbee - main - cr_canseejailproc(): New privilege, no direct check for UID 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7974ca1cdbee949f5e453eea112be265b425c407 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7974ca1cdbee949f5e453eea112be265b425c407 commit 7974ca1cdbee949f5e453eea112be265b425c407 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:37 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 14:42:22 +0000 cr_canseejailproc(): New privilege, no direct check for UID 0 Use priv_check_cred() with a new privilege (PRIV_SEEJAILPROC) instead of explicitly testing for UID 0 (the former has been the rule for almost 20 years). As a consequence, cr_canseejailproc() now abides by the 'security.bsd.suser_enabled' sysctl and MAC policies. Update the MAC policies Biba and LOMAC, and prison_priv_check() so that they don't deny this privilege. This preserves the existing behavior (the 'root' user is not restricted, even when jailed, unless 'security.bsd.suser_enabled' is not 0) and is consistent with what is done for the related policies/privileges (PRIV_SEEOTHERGIDS, PRIV_SEEOTHERUIDS). Reviewed by: emaste (earlier version), mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40626 --- sys/kern/kern_jail.c | 1 + sys/kern/kern_prot.c | 7 +++++-- sys/security/mac_biba/mac_biba.c | 1 + sys/security/mac_lomac/mac_lomac.c | 1 + sys/sys/priv.h | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 0c1f565638da..66bcd77ca8d2 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -3939,6 +3939,7 @@ prison_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: /* * Jail implements inter-process debugging limits already, so diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 19e0b78c6709..ed15cb566499 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1426,9 +1426,12 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, int cr_canseejailproc(struct ucred *u1, struct ucred *u2) { - if (u1->cr_uid == 0) + if (see_jail_proc || /* Policy deactivated. */ + u1->cr_prison == u2->cr_prison || /* Same jail. */ + priv_check_cred(u1, PRIV_SEEJAILPROC) == 0) /* Privileged. */ return (0); - return (!see_jail_proc && u1->cr_prison != u2->cr_prison ? ESRCH : 0); + + return (ESRCH); } /*- diff --git a/sys/security/mac_biba/mac_biba.c b/sys/security/mac_biba/mac_biba.c index 6948548503e1..5d66e2fd4b9b 100644 --- a/sys/security/mac_biba/mac_biba.c +++ b/sys/security/mac_biba/mac_biba.c @@ -1924,6 +1924,7 @@ biba_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: break; /* diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c index 05bd0da06960..aa9abf458721 100644 --- a/sys/security/mac_lomac/mac_lomac.c +++ b/sys/security/mac_lomac/mac_lomac.c @@ -1702,6 +1702,7 @@ lomac_priv_check(struct ucred *cred, int priv) */ case PRIV_SEEOTHERGIDS: case PRIV_SEEOTHERUIDS: + case PRIV_SEEJAILPROC: break; /* diff --git a/sys/sys/priv.h b/sys/sys/priv.h index 45cb5bab4275..a61de8d32fe0 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -105,6 +105,7 @@ #define PRIV_CRED_SETRESGID 58 /* setresgid. */ #define PRIV_SEEOTHERGIDS 59 /* Exempt bsd.seeothergids. */ #define PRIV_SEEOTHERUIDS 60 /* Exempt bsd.seeotheruids. */ +#define PRIV_SEEJAILPROC 61 /* Exempt from bsd.see_jail_proc. */ /* * Debugging privileges. From nobody Thu Sep 28 15:10:34 2023 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 4RxH3Z4FBHz4ttjq; Thu, 28 Sep 2023 15:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3Z3Nmpz3XQ5; Thu, 28 Sep 2023 15:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f+jGDzmbpv6mHNAlgdiIkA1JWWcwJtmr5HL4z9RAHTg=; b=uDYh/Y8rGRGBC4j6cR7qcO1/c49xgA+eez5jFUiSzdxaoB6hCTlAWJqBtKcnYMNHeLQdJ+ vEZEPS54K9qLuAOlopyg00XMu7897ed1E06eT7/UgzfYpcHyY64pLAo8n9X7XDS6Cv+oD5 w8xzunjSBy9u0Vr95rwKK+lf0FnAuQ2PqEeoHUS/PtMUi1M6qOlUuvRJ+F/Nq9Ugoycvog Gwicwk8eatlDF/tkfJ/zbMOz7E4s8kpOiRjUHvlKPbyGufCQRKny5fXC0HTPJTEu4t+0ev fqMyXj10s+EMy3MIc+4fdPTJObMurRlxwmLfg6HRq5yEKvI5nhhnN3kGbQaXiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913834; a=rsa-sha256; cv=none; b=DNCA7sfd8OQke2v6+4wCTWAjadLYYt+QwNCvtJOiZC5ZmW8K3drUnrLFxvZIMhgVM/PRkY Yw9kI+xQ5wzrunNXcMAWr+qQKGu41PSenE2W+/8ENGZg7zMpreEpfZzrkcIIFjHZRhiRdS O7HEXNRIehpml48XitRX1xTal/Pw9uWg2sts1qQtVsuvbC79MJU8cl5crAd6kVNYyodMgW 0B+ZowZi9y2n/y5i74ze7urYr/YcFA+8u5tmo8qXKhtapwLmZH9gpxQo11XsJvLVSf7z9s U47MDlND7+wI1korLTrSkVsCohosbQZpDqeMsgpF4fFzRtfBkZLhzLiPr5uupQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f+jGDzmbpv6mHNAlgdiIkA1JWWcwJtmr5HL4z9RAHTg=; b=rjadCt6dHFuLw2uYNPZ7jwz6Y/Wda7GhhmosAB6s828ZlP2mwXqudwVB7lwvV1Fpz7XD// /lsGnNXr9mIewTGOBdVGyJLVzZTAk32VeWvBz+FHVJVjz2lLVHpAdraDi+S9Vy2Z+rL/oR Mv7vX/YYdLvTMXe/SWh6pKfXjA7mItbB8wwZO2BwmyI09f88KhH6FAxhsjzcvWPmdx0nYP EfE5HFjZch5q8148llRC3k8gnL/DQDP+VGgTMWoBCT19s3s9mro+VkCDXZ4Bp+nYkDNSl+ zxqBjHWPNRDVC7wug+BJ0wW1gA8eiY3+/Zc28bATGL16vYYd8JfYLgRZYpKZZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3Z26BKzBJd; Thu, 28 Sep 2023 15:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAYoc047160; Thu, 28 Sep 2023 15:10:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAYbn047157; Thu, 28 Sep 2023 15:10:34 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:34 GMT Message-Id: <202309281510.38SFAYbn047157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: e4a7b4f99cfd - main - New cr_bsd_visible(): Whether BSD policies deny seeing subjects/objects 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4a7b4f99cfd4931468c0866da4ae8b49cf5badb Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e4a7b4f99cfd4931468c0866da4ae8b49cf5badb commit e4a7b4f99cfd4931468c0866da4ae8b49cf5badb Author: Olivier Certner AuthorDate: 2023-08-17 23:54:38 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 14:57:43 +0000 New cr_bsd_visible(): Whether BSD policies deny seeing subjects/objects This is a new helper function that leverages existing code: It calls successively cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() (as long as the previous didn't deny access). Will be used in a subsequent commit. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40627 --- sys/kern/kern_prot.c | 19 +++++++++++++++++++ sys/sys/proc.h | 1 + 2 files changed, 20 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index ed15cb566499..1e6073b554e4 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1434,6 +1434,25 @@ cr_canseejailproc(struct ucred *u1, struct ucred *u2) return (ESRCH); } +/* + * Helper for cr_cansee*() functions to abide by system-wide security.bsd.see_* + * policies. Determines if u1 "can see" u2 according to these policies. + * Returns: 0 for permitted, ESRCH otherwise + */ +int +cr_bsd_visible(struct ucred *u1, struct ucred *u2) +{ + int error; + + if ((error = cr_canseeotheruids(u1, u2))) + return (error); + if ((error = cr_canseeothergids(u1, u2))) + return (error); + if ((error = cr_canseejailproc(u1, u2))) + return (error); + return (0); +} + /*- * Determine if u1 "can see" the subject specified by u2. * Returns: 0 for permitted, an errno value otherwise diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 3102cae7add0..8609bbd124ad 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1163,6 +1163,7 @@ void ast_sched(struct thread *td, int tda); void ast_unsched_locked(struct thread *td, int tda); struct thread *choosethread(void); +int cr_bsd_visible(struct ucred *u1, struct ucred *u2); int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); int cr_canseeothergids(struct ucred *u1, struct ucred *u2); From nobody Thu Sep 28 15:10:35 2023 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 4RxH3b50nlz4tttm; Thu, 28 Sep 2023 15:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3b45swz3XWQ; Thu, 28 Sep 2023 15:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BniWYCjjhmPmlI2rfajkXezcRIyyqGeQkeNXx8sUoF0=; b=lNX0R0frnWZmVGQtNRXtxNo0DiHCYX7tPzr2Og+D1MCqUEaECb32KkJnDgZ9ZcbE5IniEW HX8ADP6aKmWmY3Ex5vGHMkxd0buCBB2CaihulOMvdVGcMIL6MMwYPsnDbQQbXGMWzjhcvb sKtZM+RrFP8k987QtgYQLYdkWkSokhK4+aVUCUbqU4kJeQ/1rnXRWMNhpnZntuSwwHObv0 RjDY+PDLeEjm8KUsms/F6X6+HyWspz4jXL/n2W+aMXYZPSQ7LXvGqjw0ArYz5ma/s7gv3R QWdZUIrmlcW/Yo7OPXwReTYD4QQQtcu8Z35gztGALNCabfoqlyqsRBGhi00zCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913835; a=rsa-sha256; cv=none; b=Yb9mAuRC3pTiW7lGZdjEQtWwfLpwojQ6MGo/nfa35EEWH7pUGb78uoi+1MT/cqP9sLn9tU Uz7s4y20wKwMfwyDAusFpXrSnZBvw4j/TGk4GOP34Bkdm9IUlhdNqEQVC0P5M1XPv+O1uY iqoYKY1DLaU6HiQPyPAbJYpfxAcaf9N67hjwNYu/T7e/l0iUv05zZXx7FyHp/8cmeKPUia ZIrHsUuAewzkmaB17ZSpTI/XSYRkxsRtj2y4wtp/Jt3RTsEZol/rD380s7PNhTbOTgZCpG 8Ge78bReSMqUdvYdxCeLU3v72X0v/YGZ72seuIU0Cbb0hU4BZahNHEbNMjMsdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BniWYCjjhmPmlI2rfajkXezcRIyyqGeQkeNXx8sUoF0=; b=egXbSr6UDrnnjF7jABi5p7nepYykqgPyiOCH2EYciWdc2bTtR0Lz8h8ddDubSrMrKYWsRV EFWtLK5e+eLnCnf6cAFGQnK/BmKr1w+qsLRotVbdQ2I25MHYscpHycHINqvBJY/q3bIkmm NQaus04wIuUS+sdMX+G45v/xvEBHdY5eQTbyPP8QvfH2nKoF7EBuQcFJ9r25LWnQ5Gd61Y fR2Iohxwnoc1Vwk3LXDUA+4ikGRyxEeMJRIUps1rzeQN1tBKUAqUK+htGWLwhi3mezGgth pp3lpwMuoOvFiDIzGt0FzATaZrhVevS/xN/xTz/twKQaH/bEuQg0TqZxyMhMcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3b355fzBpj; Thu, 28 Sep 2023 15:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAZ9t047202; Thu, 28 Sep 2023 15:10:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAZNF047199; Thu, 28 Sep 2023 15:10:35 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:35 GMT Message-Id: <202309281510.38SFAZNF047199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 5817169bc4a0 - main - Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5817169bc4a06a35aa5ef7f5ed18f6cb35037e18 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5817169bc4a06a35aa5ef7f5ed18f6cb35037e18 commit 5817169bc4a06a35aa5ef7f5ed18f6cb35037e18 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:38 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 14:59:08 +0000 Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() As implemented, this security policy would only prevent seeing processes in sub-jails, but would not prevent sending signals to, changing priority of or debugging processes in these, enabling attacks where unprivileged users could tamper with random processes in sub-jails in particular circumstances (conflated UIDs) despite the policy being enforced. PR: 272092 Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40628 --- sys/kern/kern_prot.c | 25 +++++++------------------ sys/netinet/in_prot.c | 4 +--- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 1e6073b554e4..648c067dc528 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1471,11 +1471,7 @@ cr_cansee(struct ucred *u1, struct ucred *u2) if ((error = mac_cred_check_visible(u1, u2))) return (error); #endif - if ((error = cr_canseeotheruids(u1, u2))) - return (error); - if ((error = cr_canseeothergids(u1, u2))) - return (error); - if ((error = cr_canseejailproc(u1, u2))) + if ((error = cr_bsd_visible(u1, u2))) return (error); return (0); } @@ -1536,9 +1532,7 @@ cr_cansignal(struct ucred *cred, struct proc *proc, int signum) if ((error = mac_proc_check_signal(cred, proc, signum))) return (error); #endif - if ((error = cr_canseeotheruids(cred, proc->p_ucred))) - return (error); - if ((error = cr_canseeothergids(cred, proc->p_ucred))) + if ((error = cr_bsd_visible(cred, proc->p_ucred))) return (error); /* @@ -1653,10 +1647,9 @@ p_cansched(struct thread *td, struct proc *p) if ((error = mac_proc_check_sched(td->td_ucred, p))) return (error); #endif - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) - return (error); - if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); + if (td->td_ucred->cr_ruid != p->p_ucred->cr_ruid && td->td_ucred->cr_uid != p->p_ucred->cr_ruid) { error = priv_check(td, PRIV_SCHED_DIFFCRED); @@ -1723,9 +1716,7 @@ p_candebug(struct thread *td, struct proc *p) if ((error = mac_proc_check_debug(td->td_ucred, p))) return (error); #endif - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) - return (error); - if ((error = cr_canseeothergids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); /* @@ -1815,9 +1806,7 @@ cr_canseesocket(struct ucred *cred, struct socket *so) if (error) return (error); #endif - if (cr_canseeotheruids(cred, so->so_cred)) - return (ENOENT); - if (cr_canseeothergids(cred, so->so_cred)) + if (cr_bsd_visible(cred, so->so_cred)) return (ENOENT); return (0); @@ -1847,7 +1836,7 @@ p_canwait(struct thread *td, struct proc *p) #endif #if 0 /* XXXMAC: This could have odd effects on some shells. */ - if ((error = cr_canseeotheruids(td->td_ucred, p->p_ucred))) + if ((error = cr_bsd_visible(td->td_ucred, p->p_ucred))) return (error); #endif diff --git a/sys/netinet/in_prot.c b/sys/netinet/in_prot.c index 222e39c6bcd2..204f4f60456e 100644 --- a/sys/netinet/in_prot.c +++ b/sys/netinet/in_prot.c @@ -67,9 +67,7 @@ cr_canseeinpcb(struct ucred *cred, struct inpcb *inp) if (error) return (error); #endif - if (cr_canseeotheruids(cred, inp->inp_cred)) - return (ENOENT); - if (cr_canseeothergids(cred, inp->inp_cred)) + if (cr_bsd_visible(cred, inp->inp_cred)) return (ENOENT); return (0); From nobody Thu Sep 28 15:10:36 2023 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 4RxH3c5ZGdz4tv1L; Thu, 28 Sep 2023 15:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3c50FWz3XhH; Thu, 28 Sep 2023 15:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ufTOl4pZ/X0MAr96KClR8k77SnKsFPAJ8oENLAHYghY=; b=PvIzHNSrIFJIaMDEUXya0hGyDXOzff+5yecBhFkH51iLqdFLupIPycSwx01ADqLIbDKaFT pFyfxZYPqK4IgL6R0ixG/mjP+B0zsfaXWetFuiIlowVJO7b6s1opaPKXJ2RN4ehCJIqiod MHH4Es5BltMpEW2DPL6oXeQDuyaZNoJQHWUH4wTB2ibphwY/bpowEjxjqC9PsKx0Tkl+eg IOPlhGSLdJhrca/R3ToIkpxDb28U8T12MjTLzU+KN35I69So2jaiMycCBM1cPV5HU8aCT1 i7j2ML6yuN3tOn6dqG82E370Q9QVvGg94Vw63uSsnrZiVPD7oHa7XmHNuQ0KYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913836; a=rsa-sha256; cv=none; b=pHMjdi08U1WdoCHxyIx+pHyrBRskI0Iw/dUYD0wrSdPrHUbLxo5WIEYa+B85AacTUgmhAa d9PAktgXZpkn/SkSou78/o11Nwi75J/WlekH1nGsS71r6770rj/9HOR1QOkr/tbiwp1SxB LoqY+woB9+f5ANWpHe3y19jNL2jWm5WCQ+sgqateb4Co1aZl5FnrLb39Uw9SbCvohZiA2q yGCnXakLRzWLRKUSTIs/m+iJcLf3NiwYuKD0IAh4/SJAbKNUxB5Uw+phMDuChvkuh/ELuS Z+xeeANqZRyKxT1lLy3uPs/EW8A5ZIQx2hgYNlOdOgjmrpM/LcsRAaBKRGb+Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ufTOl4pZ/X0MAr96KClR8k77SnKsFPAJ8oENLAHYghY=; b=hQpMTH0nF0gKBHQz5lhBPFXLaw5k2Qm7y9m3HsX7G73cAbG2G6TKdAdQ9wr+N/arhr0jyP jjMB1bD3k6S3VLvLVrkzmlP0BhAroy/8srdACcxCkaCxmNOOnFGb6+4zXH0BEhKTe76ZXb nMomaqtp8+Ovtb5HkkS91BItGQVKy/gXvzDKv/e7p8QHldW35vIPSKx1oSEheMXpPshBkp cAKEdcBFr8DDpLuKM5nNTC+kRqzpQFrvjqD/96IGcNaOpbZeGWkHWjPrNE4sWOCO1OwEzy hy7K6OcujOLJNMcW9+IjzCXbz6nCy97/dy9KfxBhFf73qcxR6NBBEE0WIU393Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3c3pDQzBjk; Thu, 28 Sep 2023 15:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAarr047251; Thu, 28 Sep 2023 15:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAaV7047248; Thu, 28 Sep 2023 15:10:36 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:36 GMT Message-Id: <202309281510.38SFAaV7047248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 91e9d669b475 - main - Make cr_bsd_visible()'s sub-functions internal 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91e9d669b475d1900e8dc01a49ad90a621c4a068 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=91e9d669b475d1900e8dc01a49ad90a621c4a068 commit 91e9d669b475d1900e8dc01a49ad90a621c4a068 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:39 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 Make cr_bsd_visible()'s sub-functions internal cr_canseeotheruids(), cr_canseeothergids() and cr_canseejailproc() should not be used directly now. cr_bsd_visible() has to be called instead. Reviewed by: mhorne Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40629 --- sys/kern/kern_prot.c | 10 +++++++--- sys/sys/proc.h | 3 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 648c067dc528..04aaebf0de63 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -91,6 +91,10 @@ static void crfree_final(struct ucred *cr); static void crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups); +static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); +static int cr_canseeothergids(struct ucred *u1, struct ucred *u2); +static int cr_canseejailproc(struct ucred *u1, struct ucred *u2); + #ifndef _SYS_SYSPROTO_H_ struct getpid_args { int dummy; @@ -1351,7 +1355,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_uids, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseeotheruids(struct ucred *u1, struct ucred *u2) { @@ -1381,7 +1385,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { int i, match; @@ -1423,7 +1427,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_jail_proc, CTLFLAG_RW, * References: *u1 and *u2 must not change during the call * u1 may equal u2, in which case only one reference is required */ -int +static int cr_canseejailproc(struct ucred *u1, struct ucred *u2) { if (see_jail_proc || /* Policy deactivated. */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 8609bbd124ad..0b91b2a1a0b5 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1166,9 +1166,6 @@ struct thread *choosethread(void); int cr_bsd_visible(struct ucred *u1, struct ucred *u2); int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); -int cr_canseeothergids(struct ucred *u1, struct ucred *u2); -int cr_canseeotheruids(struct ucred *u1, struct ucred *u2); -int cr_canseejailproc(struct ucred *u1, struct ucred *u2); int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); int enterpgrp(struct proc *p, pid_t pgid, struct pgrp *pgrp, struct session *sess); From nobody Thu Sep 28 15:10:37 2023 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 4RxH3f1bXMz4ttm8; Thu, 28 Sep 2023 15:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3d6TDgz3Xcd; Thu, 28 Sep 2023 15:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Et4345SL0WFd9b3A8jvoBonKTiUDszWTgkcVIFkMzTc=; b=moUY3dnoZjVwGLihHNViaEKEai0Pai5Ny86AMu8F/Rk7eCMEn7LH+myFxkTm/Ri2+wR2n5 lTATzLHcc1AcR09MEJTks1kAdWA61HPrx2DNbOwkiRImyX1ib1r5v2gp48KEiDMN6dCY7X BQm0JaiAvhaWJ6GV6TLs/ftBAIeZpsd68XELMcw3YLUNeGukDHpvNvdw4BB48s1j6gK59g rq1VpLGjzSTMzQHG9LmaW29yxQHH9hfq0X6B6s/AESx8fBI3BObsI/cC/QPkJ1IyStqQB0 C/KOCKb4OjU6YYdEjnL0BFNpZaqQkf6U+k/rKcJQJJMPn/ygtJViwgl8UmN6Uw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913837; a=rsa-sha256; cv=none; b=Q0l8XMoxXSd877Eame4YNVsx5BiPFNRCoMXwC1gwhLBkwRzrMLgOXmU1epUy6kXSSKt2sd v0Y14iqV+2KjPTi+AI5P2DpR4ZMDxS4qbonL8aiMg+WfM0NPs55SOU7r1ZfSf3eMo5kaks IVM3Iq5mJ3ttrk2COpdSdWOX3Km4tDpTJ4BoOvKJ56LgN0lLLu47zb6W3Bg+2XKf1slln7 shQ4eB71Ai3TIgQ5j1YT3e5dD/I4wo1lIre/CelaLXDZmu7ujMTT4006HakOjGdg3mMQOE C5nbS0OrwYI/qDf9s7ZIWxda6xGyFywSv3+dtwCcLGkser9dgenAlwPAq4ZFnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Et4345SL0WFd9b3A8jvoBonKTiUDszWTgkcVIFkMzTc=; b=Up3w5Q1W78oq8ATYgNGRv9tZOMZLMMWXqvyeAntIGklB6Qz3UMeqgLgvvfWcBKEegzxVua GzxlefUPwSpSOsY0yUDjDHlwjnrkHOnnrxmxeJC+68WhjxW63c+khNeKVTUHwZsRgt2XEK bx5dI8+uMVm+yyjrrVljL1hKtSJC+Ilb47x2AvByemD4Ox3k6fXR6IFEnFQPrAaCyRQtdD sL8Ga2PSz2cKWzo/h1NTWni4O+SYW5uAE6Fkh2j4Lqj/UR6w4/SfeZL0OWd/I1opU5NyQm xT2DIcoMtVMGO8OevbrkPZhoulPG6kVumwXl1vVVoPXS3XEVOnJwPCIHmol4Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3d5VyZzBJg; Thu, 28 Sep 2023 15:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAbeF047299; Thu, 28 Sep 2023 15:10:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAbGf047296; Thu, 28 Sep 2023 15:10:37 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:37 GMT Message-Id: <202309281510.38SFAbGf047296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: c59ab75c04fa - main - cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c59ab75c04fa32bc6d292596ff5e4593a05a6b1b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c59ab75c04fa32bc6d292596ff5e4593a05a6b1b commit c59ab75c04fa32bc6d292596ff5e4593a05a6b1b Author: Olivier Certner AuthorDate: 2023-08-17 23:54:39 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_canseeotheruids(), cr_canseeothergids(): Man pages: Impacts of rename When these functions were renamed 7 years ago, their man pages were not. Rename the latter in accordance and fix the names inside them. Fix references to them as well. Add the old man pages to the list of obsolete files. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40630 --- ObsoleteFiles.inc | 4 ++++ share/man/man9/Makefile | 4 ++-- share/man/man9/cr_cansee.9 | 8 ++++---- share/man/man9/{cr_seeothergids.9 => cr_canseeothergids.9} | 8 ++++---- share/man/man9/{cr_seeotheruids.9 => cr_canseeotheruids.9} | 8 ++++---- share/man/man9/p_candebug.9 | 8 ++++---- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 0b9d6247629b..64003b2c976f 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20230927: Man pages renamed to match the actual functions +OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz +OLD_FILES+=usr/share/man/man9/cr_seeotheruids.9.gz + # 20230925 OLD_FILES+=usr/share/examples/diskless/ME OLD_FILES+=usr/share/examples/diskless/README.BOOTP diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 07a107b4bd7d..a989f4105d5c 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,9 +69,9 @@ MAN= accept_filter.9 \ counter.9 \ cpuset.9 \ cr_cansee.9 \ + cr_canseeothergids.9 \ + cr_canseeotheruids.9 \ critical_enter.9 \ - cr_seeothergids.9 \ - cr_seeotheruids.9 \ crypto.9 \ crypto_buffer.9 \ crypto_driver.9 \ diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index 8e058eb4e3e5..4824a231170b 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -50,9 +50,9 @@ variables and .Va security.bsd.see_other_uids , as per the description in -.Xr cr_seeothergids 9 +.Xr cr_canseeothergids 9 and -.Xr cr_seeotheruids 9 +.Xr cr_canseeotheruids 9 respectively. .Sh RETURN VALUES This function returns zero if the object with credential @@ -84,7 +84,7 @@ does not belong to the same jail as The MAC subsystem denied visibility. .El .Sh SEE ALSO -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , .Xr mac 9 , .Xr p_cansee 9 diff --git a/share/man/man9/cr_seeothergids.9 b/share/man/man9/cr_canseeothergids.9 similarity index 94% rename from share/man/man9/cr_seeothergids.9 rename to share/man/man9/cr_canseeothergids.9 index bd8eb5d2e9d9..79269533ae5c 100644 --- a/share/man/man9/cr_seeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -26,14 +26,14 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 11, 2003 -.Dt CR_SEEOTHERGIDS 9 +.Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME -.Nm cr_seeothergids +.Nm cr_canseeothergids .Nd determine visibility of objects given their group memberships .Sh SYNOPSIS .Ft int -.Fn cr_seeothergids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION This function determines the visibility of objects in the kernel based on the group IDs in the credentials @@ -76,5 +76,5 @@ or .Er ESRCH otherwise. .Sh SEE ALSO -.Xr cr_seeotheruids 9 , +.Xr cr_canseeotheruids 9 , .Xr p_candebug 9 diff --git a/share/man/man9/cr_seeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 similarity index 94% rename from share/man/man9/cr_seeotheruids.9 rename to share/man/man9/cr_canseeotheruids.9 index 2cefd0f9dc8e..80acc2d7a6ca 100644 --- a/share/man/man9/cr_seeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -26,14 +26,14 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 11, 2003 -.Dt CR_SEEOTHERUIDS 9 +.Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME -.Nm cr_seeotheruids +.Nm cr_canseeotheruids .Nd determine visibility of objects given their user credentials .Sh SYNOPSIS .Ft int -.Fn cr_seeotheruids "struct ucred *u1" "struct ucred *u2" +.Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION This function determines the visibility of objects in the kernel based on the real user IDs in the credentials @@ -76,5 +76,5 @@ or .Er ESRCH otherwise. .Sh SEE ALSO -.Xr cr_seeothergids 9 , +.Xr cr_canseeothergids 9 , .Xr p_candebug 9 diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index ffa4fedb6172..e80d313de55c 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -113,9 +113,9 @@ Process is not visible to thread .Fa td as determined by -.Xr cr_seeotheruids 9 +.Xr cr_canseeotheruids 9 or -.Xr cr_seeothergids 9 . +.Xr cr_canseeothergids 9 . .It Bq Er ESRCH Thread .Fa td @@ -129,8 +129,8 @@ The MAC subsystem denied debuggability. .Sh SEE ALSO .Xr jail 2 , .Xr sysctl 8 , -.Xr cr_seeothergids 9 , -.Xr cr_seeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseeotheruids 9 , .Xr mac 9 , .Xr p_cansee 9 , .Xr prison_check 9 From nobody Thu Sep 28 15:10:38 2023 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 4RxH3g0SK5z4ttk1; Thu, 28 Sep 2023 15:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3f7117z3XwS; Thu, 28 Sep 2023 15:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLK+ZXRLZ9HmlcYyO1rhIabORERBJIAaXJcVER4eE84=; b=xt/+2s9u2BhIssqNrNst7IP99sTeW3RPp0Eiv3db5cFXipk4/MutQyeiA9rnhtmpbbbP3y PuaoVcVLn9WY9xjb2kGpU/0DEuY9hS9wrfZzzUmnJn5fgsxOw+e4NmbyjTAGgFWSVSPC61 X3aOgC8qElQgZ0qnXck1UdWE7XScE36aOS2Qah/VHc+EtuFHCRzXuXnrR6RqElKZzS62Fy MnwWzAAijGOUNn6EUranV070hbAmZnh4wO0WNiy8O9s+awBdlHRyXGy9PQvQHNJhSRZThI kIcuBbGEUPloVPEAZyO5d/PK9LxyNnmRYsCIWQE8APBqnteugtWEisMpmQlwCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913839; a=rsa-sha256; cv=none; b=ldPFxoGo4yfCUOushGzCwyt+VhgmlEGEdQq1N+Zmcx/kRDFWFibWdZjbHObLoHIs1LxWpT 8dB+LpDc5+j98Q4sZFgTSuY77o4WGSukV7DUT8te9NfJIBV82Ija/XHaOR5PkjCfONTHGX 93NK4cA7gdS/upYk1a8xMUWrEd+2h9X6CHcYZX3J8mjXWK/kMH++vpQ7NyjJx7TygZKoco KdbDvKDtQ84ccqaKJDzpt2KqH0eSI4urJUNxum5BVVU5oGldwAdhsPrS6hHskzzkviTZyi NAGJkKlcmsdKWKpkHAdVbgAh1hWqbw2Me706k4PZdjRGbnNirA96NDAucDKppw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KLK+ZXRLZ9HmlcYyO1rhIabORERBJIAaXJcVER4eE84=; b=GN4mXk86/vGfqRi1Kb8LsND4C4dLgglVyzoSqxLlpZsNrlKQKnAeMONIYHsCuG0b4InTDL 9fSrZdWAOfC4TRbRnD9WyHEpgmBpBUmqmYakYa0VabChYxpJAyTCZWvVTGC98stKQgm219 vIOef0qt8EWilarg0FY8LS0uOrcV9RgmVRxORd/1aHze0gcCcesnib5GTOQb/Sr3+QcbcR L3k3vDEeSY7M+3FiL2Kwdsbr19S6oNZyy/BSDoX6uFX/Z49z96MHzSwz0NE7SoFiEOrpN6 uZwJ4mBxKT82QfS6GHlFq9u7QLoFW2lVXWigkH5xDnDeDLPHsLHyfJOFlMgDgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3f65DXzBJh; Thu, 28 Sep 2023 15:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAcnX047339; Thu, 28 Sep 2023 15:10:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAcvq047336; Thu, 28 Sep 2023 15:10:38 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:38 GMT Message-Id: <202309281510.38SFAcvq047336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 29d863bb7ffc - main - cr_canseejailproc(9): New man page 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29d863bb7ffc692998f21fa3e7a91afa1151cf1c Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=29d863bb7ffc692998f21fa3e7a91afa1151cf1c commit 29d863bb7ffc692998f21fa3e7a91afa1151cf1c Author: Olivier Certner AuthorDate: 2023-08-17 23:54:40 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_canseejailproc(9): New man page Reviewed by: pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40631 --- share/man/man9/Makefile | 1 + share/man/man9/cr_canseejailproc.9 | 81 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index a989f4105d5c..a33c42018dbf 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,6 +69,7 @@ MAN= accept_filter.9 \ counter.9 \ cpuset.9 \ cr_cansee.9 \ + cr_canseejailproc.9 \ cr_canseeothergids.9 \ cr_canseeotheruids.9 \ critical_enter.9 \ diff --git a/share/man/man9/cr_canseejailproc.9 b/share/man/man9/cr_canseejailproc.9 new file mode 100644 index 000000000000..775c76722b05 --- /dev/null +++ b/share/man/man9/cr_canseejailproc.9 @@ -0,0 +1,81 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd August 18, 2023 +.Dt CR_CANSEEJAILPROC 9 +.Os +.Sh NAME +.Nm cr_canseejailproc +.Nd determine if subjects may see entities in sub-jails +.Sh SYNOPSIS +.Ft int +.Fn cr_canseejailproc "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials +.Fa u1 +is denied seeing a subject or object associated to credentials +.Fa u2 +by a policy that requires both credentials to be associated to the same jail. +This is a restriction to the baseline jail policy that a subject can see +subjects or objects in its own jail or any sub-jail of it. +.Pp +This policy is active if and only if the +.Xr sysctl 8 +variable +.Va security.bsd.see_jail_proc +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Sh RETURN VALUES +The +.Fn cr_canseejailproc +function returns 0 if the policy is disabled, both credentials are associated to +the same jail, or if +.Fa u1 +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . +.Sh SEE ALSO +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 +.Sh AUTHORS +This manual page was written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Thu Sep 28 15:10:39 2023 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 4RxH3h1f9Mz4ttxP; Thu, 28 Sep 2023 15:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3h1Db2z3Xx5; Thu, 28 Sep 2023 15:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R6z1+0WVu30IM4dsoF7ReTVjJIs6mmYg9J8KQB8wgJ0=; b=u1ZCMh+BAUnSEmbYc5CEDHLZsRWKkHlgs/uNnibFGjwva+xPwc75/gHIOPhVaenWe3XWne VOsm/w/nFLpk5tSnmqH4lIkECxKX3s7phIuq2br0mQIqwkrSJldUUASVu/SBvlibcdS4eb MB67d/S7KjcHTJz/YVTQOaTRMxLSVbLJILcXgAMyh5Tv6cBLY4nPYtXcfcRC8jW0aQ+t7z WV4eG31dZEBxvPHwxGKXpTmN7Fzjry0arfppLmpVcXbmxAzCqhRyGaGMLd+XoT1tna30tl yyQnx5U0PaW91i8tGA1NP7maxviRrpZ3aZgp58KvjkfjoVJ8/iy0x1hhfF25tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913840; a=rsa-sha256; cv=none; b=QF7IitgpFPXts7tnVutVE55v1T2FcHTRmh7CrVTSZSfXUwlwO6UB1fU7q81oBg5JmIFKTm gr2d46lquhqegQt8huX5T0sxFjbkt9ehlCudW/blperSXle5Qsr8mH/+JEhMILq08M+x20 HfER8paKBrFjPHcokoHH6BNjFQG8zAXiWIxE8MlFC3vnllQ748QAd8HhJ0eNXBoWpVdK8B +vlBTnj+A0chQCnS0msSw5ccSQJZoMz5Dm0jAHWMYbYUzsH5gpssYD3FO98qojoGDcuEcu euY1+a4NCaMcv2OziJGvG7uboleBcanTSyOz4Fxh72l7REN1y5qeGeDG1QSjiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R6z1+0WVu30IM4dsoF7ReTVjJIs6mmYg9J8KQB8wgJ0=; b=Sisz15Koi1xMj6fnWYDMqd14wcxUykl0oUxkifQsEOaT47k3/na2gmxIVW/AJBtlPfVOMK /U+zjikyDZzxwCSSu07DH2RdyvasixsKkFKSVoDLktGxzMquT83jcGFyvxU3MDUFx/nXcz 5P6nxBOGoT36NhQRVJy5EV72ihEr1NMOpk507MsE5soVm6w16TqI9TvCXxf4JD4csrL63H bMzF+npK6eDdQ/cSFdDxvpOIXgBIwPBcVt1cbgyTV2Obs5uEkCx/Wna8Ib6A9av9WMG86K klrxdK84BfaG5AvP6camIVNIVIy4Z2Exz606hRG37HXwQneMWXb8QOOadvka7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3h07pfzC1K; Thu, 28 Sep 2023 15:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAd2E047378; Thu, 28 Sep 2023 15:10:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAden047375; Thu, 28 Sep 2023 15:10:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:39 GMT Message-Id: <202309281510.38SFAden047375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 0d6bf73c4f20 - main - cr_bsd_visible(9): New man page 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f commit 0d6bf73c4f20e6ed719c29c1b382d24bb0a81a2f Author: Olivier Certner AuthorDate: 2023-08-17 23:54:40 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_bsd_visible(9): New man page Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40632 --- share/man/man9/Makefile | 1 + share/man/man9/cr_bsd_visible.9 | 117 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index a33c42018dbf..f07a886277e0 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -68,6 +68,7 @@ MAN= accept_filter.9 \ copy.9 \ counter.9 \ cpuset.9 \ + cr_bsd_visible.9 \ cr_cansee.9 \ cr_canseejailproc.9 \ cr_canseeothergids.9 \ diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 new file mode 100644 index 000000000000..bd676e6f5705 --- /dev/null +++ b/share/man/man9/cr_bsd_visible.9 @@ -0,0 +1,117 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Olivier Certner +.\" +.\" 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 DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd August 18, 2023 +.Dt CR_BSD_VISIBLE 9 +.Os +.Sh NAME +.Nm cr_bsd_visible +.Nd determine if subjects may see entities according to BSD security policies +.Sh SYNOPSIS +.In sys/proc.h +.Ft int +.Fn cr_bsd_visible "struct ucred *u1" "struct ucred *u2" +.Sh DESCRIPTION +This function determines if a subject with credentials +.Fa u1 +is denied seeing an object or subject associated to credentials +.Fa u2 +by the following policies and associated +.Xr sysctl 8 +knobs: +.Bl -tag -width indent +.It Va security.bsd.seeotheruids +If set to 0, subjects cannot see other subjects or objects if they are not +associated with the same real user ID. +The corresponding internal function is +.Xr cr_canseeotheruids 9 . +.It Va security.bsd.seeothergids +If set to 0, subjects cannot see other subjects or objects if they are not both +a member of at least one common group. +The corresponding internal function is +.Xr cr_canseeothergids 9 . +.It Va security.bsd.see_jail_proc +If set to 0, subjects cannot see other subjects or objects that are not +associated with the same jail as they are. +The corresponding internal function is +.Xr cr_canseejailproc 9 . +.El +.Pp +As usual, the superuser (effective user ID 0) is exempt from any of these +policies provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . +.Pp +This function is intended to be used as a helper to implement +.Xr cr_cansee 9 +and similar functions. +.Sh RETURN VALUES +This function returns zero if a subject with credentials +.Fa u1 +may see a subject or object with credentials +.Fa u2 +by the active above-mentioned policies, or +.Er ESRCH +otherwise. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +do not have the same real user ID. +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not members of any common group +.Po +as determined by +.Xr groupmember 9 +.Pc . +.It Bq Er ESRCH +Credentials +.Fa u1 +and +.Fa u2 +are not in the same jail. +.El +.Sh SEE ALSO +.Xr cr_canseeotheruids 9 , +.Xr cr_canseeothergids 9 , +.Xr cr_canseejailproc 9 , +.Xr priv_check_cred 9 , +.Xr cr_cansee 9 +.Sh AUTHORS +This function and its manual page were written by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Thu Sep 28 15:10:41 2023 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 4RxH3j2MGNz4ttk9; Thu, 28 Sep 2023 15:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3j1t15z3Xxj; Thu, 28 Sep 2023 15:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WGohu+CO03Mc360r9SpRZXd4pZj8qrTwIoi8cN79cMs=; b=tvCOFovxHx4kvprwPUgI5fjfNSPPfMlFcvOC/N9HUaNkG35t4d97wUn2CdLgKkw95HpqME fW8dI8MaKtLo3f7x4a7fw0NUj5VgQW8uDRbGmF6B+sDf0cTt633YaaiSZ/HvfHk5wDC+sR 8FoRxa44UrUdUz+41xtWaD2LJtyF8if8mcFsNI5noo318qDVa9zAXYSraLbeZYnacQsxxE MCjzBb2G3yFcWAlR+1ifq9NSEU/vav3bR/BZM9oi5uTjn0RFMD/2mDIIvYS/HTJX46vwhk huJTXQW7kEFSv3ABxXy8Wt1MvlcfUbf2pEgu7VxdAN+Fx8T41xamPU4G14KWLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913841; a=rsa-sha256; cv=none; b=dvMfinoTaeqOGiety+rEovwr+Srx6YdmFesE6uF0OiB3FshAdgri/d5JhMM+c/DWX9Xahw 5jnSKKgxUehPsigFhUYWYZPvnr1so9R2PK6U7xH7ZFUhfcCKv1JnSUH3u8vCr0yzorEeXt GeDPFUmUzg+Jlawp4WTdOwk8G7+tdKPzli4hV+nAKJjS2GsElDjK4I9qJseIebYo8smPJK 6HAgvnRYjVsHgE/u16REdDFhE4zMWmRrf1ivf1hZTb77AOb6GP0aK6o3OUSOCBvrHWtEkH 26LOqU9+F6so7W+vLMTt2bgfI7I3CG7hamYbHZiCtPdU0176vRzuudxvsDjCLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WGohu+CO03Mc360r9SpRZXd4pZj8qrTwIoi8cN79cMs=; b=vbhhO3XciN7Y03WBERlUJkpxEw5JCLUom7ZsNbgN5mz580TapAkESVNuzztEELX6pPj5Fd OJSL5ZbKMPqqkRmVaC+m4MGwu96M4303A0m2ZQjVPgxl9iqU8g9731D3N3jWlvWHheG/0S GHp8EFPbDthI9x6cVo5RmRvBBKGKNUeNRkwMyLiJeKRWc5eJ6uapK355vWYODxa6e554yn P4HTLMuYLjSBNDTJt+52EqiKGeYOPHcidGHw2soMUOsJy+aPSxmwv9jxZJMZr57Y3vOrPK PKV2VUObjHR8VYzOfGeOvOsgSpgoMmsDWre0DS7rqsAUQxgE/Mbmdb3mCtyRoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3j0whjzC1L; Thu, 28 Sep 2023 15:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAfHj047430; Thu, 28 Sep 2023 15:10:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAfAi047427; Thu, 28 Sep 2023 15:10:41 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:41 GMT Message-Id: <202309281510.38SFAfAi047427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 3fe9ea4d2d04 - main - cr_canseeothergids(9): Revamp, mark as internal 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e commit 3fe9ea4d2d04d48a249b2e6161d416bb4d5b364e Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_canseeothergids(9): Revamp, mark as internal Significantly clarify. Replace references to cr_canseeotheruids(9) by ones to cr_bsd_visible(9). Reviewed by: pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40633 --- share/man/man9/cr_canseeothergids.9 | 77 +++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/share/man/man9/cr_canseeothergids.9 b/share/man/man9/cr_canseeothergids.9 index 79269533ae5c..f0c1e5c4e726 100644 --- a/share/man/man9/cr_canseeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,56 +26,58 @@ .\" (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 November 11, 2003 +.Dd August 18, 2023 .Dt CR_CANSEEOTHERGIDS 9 .Os .Sh NAME .Nm cr_canseeothergids -.Nd determine visibility of objects given their group memberships +.Nd determine if subjects may see entities in a disjoint group set .Sh SYNOPSIS .Ft int .Fn cr_canseeothergids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the group IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have at least one group in common. +For this determination, the effective and supplementary group IDs are used, but +not the real group IDs, as per +.Xr groupmember 9 . .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_gids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their group membership. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if at least one of -.Fa u1 Ns 's -group IDs is present in -.Fa u2 Ns 's -group set. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_gids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_gids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeothergids +function returns 0 if the policy is disabled, the credentials share at least one +common group, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_canseeotheruids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr groupmember 9 , +.Xr priv_check_cred 9 From nobody Thu Sep 28 15:10:42 2023 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 4RxH3k3Rkwz4ttqD; Thu, 28 Sep 2023 15:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3k2pplz3YGh; Thu, 28 Sep 2023 15:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wng7FCZlRhx257FHklYMjtuZGTzHVoUk8yu8L5kIRzA=; b=O6qOsiQiVp3kwk3Bt3vzwOxNMgHnrsv91gWqJ9a0kHWak/Blvz7lswEo5eV3puRTQlZmp5 O09G6RRf7seLZW9Sg2XuEQxvF+NlbBJQHBe/rO5E0l3scmZT3+IwF4b4uyaegkUK6yR//L bBQHYrcPY4fqeTOuqF1tLRdlxu+LarsqGIHLheURL1t5O5yfnKvo4QBUU+P7HiwF5dzPGl DRcirY50oF5zd4e+hKA3T20rJK/IM+QxIkjGqVZHx9MlMh0MMwZlgbyktuNXJEwL/nrfS1 QW2clUlj2cua/ic6x726+l0biu+EZ2iMGreZORAubFjGSmoEzPtypIjvk1Dz5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913842; a=rsa-sha256; cv=none; b=Y6T6ydg+dcLMYxj3tJOQLg6L0vsjz6QwbYZ9MUCFZIvM81AkpagbJBcimlz9qD8LBNEra0 8PpqDRrrs4vPxRkBhcGiBDuC87fqYTRmooVmdwPQwlr4H5GYAwEGQHtpEauRV3NOkdER5F XDbLb3+6uxcWOxxGIK0gbsudcDKRwpiAvyyEahTXMlmN+uqMBeXEno0n2VKWPipWLvYZci QjlFOirjZNdIUcTo6WOvhGTV3EA6HHHHJurnJD9HWyDYj+7Ftk9hCONOevcLsfQearN0DU qpASIN8wHj5wf5Ny4zeD31rQEwUDwFQN/VFl5QV/W6wXaNMLp4ZgttjUyh3tuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wng7FCZlRhx257FHklYMjtuZGTzHVoUk8yu8L5kIRzA=; b=D4G36GYCvgY7Ps3Dg4+0sTLXzDyTssJII2nY2twjchX4mUT1aA2Q1MHhoWaayYtASjWfoL H2T3MASuNT5zcHkvJsvSJF+BuQhcUPSg4aePLEF+P859DVY8pxilibFlhMhpj8eA/BNhBu SVuMScl17GC1ftwh4RBZsE11knaFrCMX2EJJeB2S6ON6EUfedqLSoaNgYg/27iGVZbr4eo ZWzDJgn/OkPj5cvnW2EwFBkRLhKuALE6fRO7NydSzXNGW1C4jHnrlQPDDn+/p07vGqBIyf r2ZzjVEXdDpmgmAOaOCSpiVFtrztQ5oslATNXYdKTaJayajOPDrBs/+ZY5J8sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3k1XDbzBqY; Thu, 28 Sep 2023 15:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAgrA047478; Thu, 28 Sep 2023 15:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAgFF047475; Thu, 28 Sep 2023 15:10:42 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:42 GMT Message-Id: <202309281510.38SFAgFF047475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 75a45ca3b340 - main - groupmember(9): Detail which groups are considered, simplify 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75a45ca3b34062fe793ae326ad9da614a1a06df1 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=75a45ca3b34062fe793ae326ad9da614a1a06df1 commit 75a45ca3b34062fe793ae326ad9da614a1a06df1 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:41 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 groupmember(9): Detail which groups are considered, simplify Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40634 --- share/man/man9/groupmember.9 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index d447bf64c482..3a516622efce 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. +.\" Copyright (C) 2023 Olivier Certner .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -24,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 9, 2001 +.Dd August 18, 2023 .Dt GROUPMEMBER 9 .Os .Sh NAME .Nm groupmember -.Nd checks group set for a group ID +.Nd checks if credentials mandate some group membership .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h @@ -38,21 +39,26 @@ .Sh DESCRIPTION The .Fn groupmember -function checks to see if the given -.Fa gid -is in the group set of the credentials. +function checks if credentials +.Fa cred +indicate that the associated subject or object is a member of the group +designated by the group ID +.Fa gid . .Pp -Its arguments are: -.Bl -tag -width ".Fa cred" -.It Fa gid -The group ID to check for. -.It Fa cred -The credentials to search for the group in. -.El +Considered groups in +.Fa cred +are the effective and supplementary groups. +The real group is not taken into account. .Sh RETURN VALUES If the .Fa gid -is found, 1 is returned; otherwise, 0 is returned. +is found, 1 is returned, otherwise 0. +.Sh SEE ALSO +.Xr getgroups 2 +.Xr setgroups 2 .Sh AUTHORS -This manual page was written by -.An Chad David Aq Mt davidc@acns.ab.ca . +This manual page was initially written by +.An -nosplit +.An Chad David Aq Mt davidc@acns.ab.ca +and was revised by +.An Olivier Certner Aq Mt olce.freebsd@certner.fr . From nobody Thu Sep 28 15:10:43 2023 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 4RxH3l5fs1z4ttkF; Thu, 28 Sep 2023 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3l3v1Sz3YKF; Thu, 28 Sep 2023 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LXkHCIcDyyIxr4Mjk5cxllfhV+WkghdbD+ZwT5xWkiY=; b=rweKlfuhJjJSXj4fZ5TJvEjM5oSWYFhUJTOL1YLXsTE5uH1VTUkHndmhkMxEIberOhwjtP 62cOOkprGTLvD53u2IWl/s6CVzVDTf77MWmwDID/wdMHJRI9XZs2qqstlc/4Oo0OkCzJx8 vjnERl4xtyid+KwsAdhH7NhNkVOEYOIK5tgXbGnXX+Zpy+cNyhiMwDFt7FuEtJw8UnpzwM P6THkKY6Zzp1TivkR+/wwM6PC6sUnMB+KAWMUOfOo3tIHh0V5B53Wj0kNlK/GLwlHW2yby U402XpCslkhQ9Ky7F3ZDZlXgvj2ssvaXVCfdxUKwyxYjbn+JtB+atxhCYxIOag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913843; a=rsa-sha256; cv=none; b=NZ9lkQQBtMpFoM9TkcwPHfJOd0ASCEfH3i/WIz4gHQAxTOTA9J0uVqVycnRSKYXZrn3cGQ aHLoSRrZ//6smlu1wfaW0hXF0tceExI5PBmeSfDplB+D919u94ajEPiSLGoDO+rt62s7IC +HMy0bkB6vbJkBqZZX/ft0BO+6YoekVpG8DnSxSVmy37pBJYzjbeC6JVFOIOdqE4sKtxFY 2ZZhY3EDg5TsdMqv9PIDqzRT8dXKFUbR4SbwmvT/md9MPjtPEpf9X9P4XeC8QoKrRp9hEh LrnRFM8GhamiOAmJQbYce+pYRujLSqDtLAXLapAXkb+B2ripl7/9k8FzUHwz1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LXkHCIcDyyIxr4Mjk5cxllfhV+WkghdbD+ZwT5xWkiY=; b=QLiCMdu3VaQIZZdA8+U/Vuk7dhyUXAeFFu7XpQlW1L8EGJvE9itrOawMo1qVDAT4ZTauNs 14bC4cQIvJgtY9aQPYlahzzvZUKFvRNRBWZHjV7S4VIaMPFoZkk4M/CKv+UMjPowe5cxn3 VwWAZ/kOO4ZBRk2VkGIEstS6qzWuRwfBrkA0sIuKZv5niPTkEfbrp1oNQxNNXhdzcsyMls GOAjLUljud5SlauqFvHfgWCZUZsc1OKyS93w4/StZbiQAvGMvEm8pCnA57k+YVLizEVjtv /faIGPU1geXIQ4t4lzcee8S6WJAX8qMfx8j8hm6r+c5YqVh5c4ZBbSlmffS8DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3l2kt2zBjr; Thu, 28 Sep 2023 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAh3m047520; Thu, 28 Sep 2023 15:10:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAhCw047517; Thu, 28 Sep 2023 15:10:43 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:43 GMT Message-Id: <202309281510.38SFAhCw047517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 4ddd253b38df - main - cr_canseeotheruids(9): Revamp, mark as internal 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ddd253b38dff8725555355cc1b5238b1bbfd380 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4ddd253b38dff8725555355cc1b5238b1bbfd380 commit 4ddd253b38dff8725555355cc1b5238b1bbfd380 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:42 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:45 +0000 cr_canseeotheruids(9): Revamp, mark as internal Significantly clarify. Replace references to cr_canseeothergids(9) by ones to cr_bsd_visible(9). Reviewed by: bcr, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40635 --- share/man/man9/cr_canseeotheruids.9 | 73 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/share/man/man9/cr_canseeotheruids.9 b/share/man/man9/cr_canseeotheruids.9 index 80acc2d7a6ca..230c5ea59b78 100644 --- a/share/man/man9/cr_canseeotheruids.9 +++ b/share/man/man9/cr_canseeotheruids.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,56 +26,54 @@ .\" (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 November 11, 2003 +.Dd August 18, 2023 .Dt CR_CANSEEOTHERUIDS 9 .Os .Sh NAME .Nm cr_canseeotheruids -.Nd determine visibility of objects given their user credentials +.Nd determine if subjects may see entities with differing user ID .Sh SYNOPSIS .Ft int .Fn cr_canseeotheruids "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs in the credentials +.Bf -emphasis +This function is internal. +Its functionality is integrated into the function +.Xr cr_bsd_visible 9 , +which should be called instead. +.Ef +.Pp +This function checks if a subject associated to credentials .Fa u1 -and +is denied seeing a subject or object associated to credentials .Fa u2 -associated with them. +by a policy that requires both credentials to have the same real user ID. .Pp -The visibility of objects is influenced by the +This policy is active if and only if the .Xr sysctl 8 variable -.Va security.bsd.see_other_uids . -If this variable is non-zero then all objects in the kernel -are visible to each other irrespective of their user IDs. -If this variable is zero then the object with credentials -.Fa u2 -is visible to the object with credentials -.Fa u1 -if either -.Fa u1 -is the super-user credential, or if -.Fa u1 -and -.Fa u2 -have the same real user ID. -.Sh SYSCTL VARIABLES -.Bl -tag -width indent -.It Va security.bsd.see_other_uids -Must be non-zero if objects with unprivileged credentials are to be -able to see each other. -.El +.Va security.bsd.see_other_uids +is set to zero. +.Pp +As usual, the superuser (effective user ID 0) is exempt from this policy +provided that the +.Xr sysctl 8 +variable +.Va security.bsd.suser_enabled +is non-zero and no active MAC policy explicitly denies the exemption +.Po +see +.Xr priv_check_cred 9 +.Pc . .Sh RETURN VALUES -This function returns zero if the object with credential +The +.Fn cr_canseeotheruids +function returns 0 if the policy is disabled, both credentials have the same +real user ID, or if .Fa u1 -can -.Dq see -the object with credential -.Fa u2 , -or -.Er ESRCH -otherwise. +has privilege exempting it from the policy. +Otherwise, it returns +.Er ESRCH . .Sh SEE ALSO -.Xr cr_canseeothergids 9 , -.Xr p_candebug 9 +.Xr cr_bsd_visible 9 , +.Xr priv_check_cred 9 From nobody Thu Sep 28 15:10:44 2023 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 4RxH3m5BzQz4tts4; Thu, 28 Sep 2023 15:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3m4Rp3z3YBF; Thu, 28 Sep 2023 15:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nMbqgc9PkQuFVmCO1f7k89B+9QWg1ExSNPo5jm8AOyo=; b=SkvsEodDaGbXFpr0ZQ+WLbMhSuomAgW7dSv5D2u5HDR8T7TfJzoxRFzI0rA0BCCpMWsSjM lASgHdfr9cZPeHLI2bXS8yviXp89KSdOpb2xPrqh8czOsXggNfyF4n0VaRN8o69eq9E48w 9+yeKuy7N0TV8xFIplUV67Hhc2tlzNRjzE/7d3nir3gIKg4lq0Ep//3v16KKmS9z2Kjw8D 4TiemHIFo8kvBj8pfbHS8yJd3C7H/m5DavexhYTlgrrug24rvaQUc3jmmKSL7qTdiurSQZ 67w7U6ZY8TkmhuJYaMINXH5DWvrDrWEEemv38EeLBj6tf5v6LwFVRjeFU7fJxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913844; a=rsa-sha256; cv=none; b=kyDswCrH5jvkN12qkbHJHJ8jfPVkSAkLwOeyB3fLrPXaE0CeNjcABzb/Sfn2Enzqfji4tl pLS716mBA/wS6lvrSBLAYQqpm1weeL1prZ+f1Ws3c4fQA68Jw4Szpg3jxVG5tCpL1gD88n v4BQgUgrw/JGG60wRC+src4m9q84+gw0i20dAR8sBXxvVKfhg2AA9YIjtjh1gbSY/F6Byo KW2jBOVuQkUzsyWn17m8g3Sa0YnWbRKLwCcEVoZo7CViVjOiqGz1j524fn4OgNeFig2caA ivcdCFyDKz3+7hHYemCSASgbPPZzdVWwfdVVZQiBlfaJHuNNS4iBNS2gAGRdgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nMbqgc9PkQuFVmCO1f7k89B+9QWg1ExSNPo5jm8AOyo=; b=p62nObPz6aL8uWS2vnYfbhuNmfs2K8Ark9n5CIGpTI3rw5DQttCb7axrUMqY98Dh5kM1I7 /Nn4NTQ97RvhjHISPKNzTVZ8NnaPEKzJvdFKQEN3384CZ/RCrc9Q7IkAWTTSzzaVfQL076 mMRHkNLnbAT3EVqPc85Q0cUFu6RvZSaCuYjoVuORWJwFpUrsoeDd92x6q/2r++Cj1K4rkn UizzfCXXxHgEHvz7Pbq02Qmlf0wtErkSRymS8Ygt4GiS6NmAZiXYRSOjhQwV/Shc6+axLw 91cZG+hBs8ADRVKFDYeN6kOsqpS1cpcM/FY7yVgQNTszdf/Xqlo8pMEONtRz1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3m3Y4PzC4m; Thu, 28 Sep 2023 15:10:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAiiC047559; Thu, 28 Sep 2023 15:10:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAi5E047556; Thu, 28 Sep 2023 15:10:44 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:44 GMT Message-Id: <202309281510.38SFAi5E047556@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 82f9bc9ea8ed - main - cr_cansee(9): cr_bsd_visible() impacts, simplifications 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82f9bc9ea8ed660c61050ad1d92f1a64108c7004 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=82f9bc9ea8ed660c61050ad1d92f1a64108c7004 commit 82f9bc9ea8ed660c61050ad1d92f1a64108c7004 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:42 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 cr_cansee(9): cr_bsd_visible() impacts, simplifications Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9). Defer to cr_bsd_visible() for controlling sysctl(8) variables. Reviewed by: bcr, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40636 --- share/man/man9/cr_cansee.9 | 61 ++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/share/man/man9/cr_cansee.9 b/share/man/man9/cr_cansee.9 index 4824a231170b..d5cdfdd6f8e5 100644 --- a/share/man/man9/cr_cansee.9 +++ b/share/man/man9/cr_cansee.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2006 Ceri Davies +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -23,43 +24,39 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt CR_CANSEE 9 .Os .Sh NAME .Nm cr_cansee .Nd "determine visibility of objects given their user credentials" .Sh SYNOPSIS -.In sys/param.h -.In sys/systm.h -.In sys/ucred.h +.In sys/proc.h .Ft int .Fn cr_cansee "struct ucred *u1" "struct ucred *u2" .Sh DESCRIPTION -This function determines the visibility of objects in the -kernel based on the real user IDs and group IDs in the credentials +This function determines if a subject with credential .Fa u1 -and -.Fa u2 -associated with them. +can see a subject or object associated to credential +.Fa u2 . .Pp -The visibility of objects is influenced by the +Specific types of subjects may need to submit to additional or different +restrictions. +As an example, for processes, see +.Xr p_cansee 9 , +which calls this function. +.Pp +The implementation relies on +.Xr cr_bsd_visible 9 +and consequently the .Xr sysctl 8 -variables -.Va security.bsd.see_other_gids -and -.Va security.bsd.see_other_uids , -as per the description in -.Xr cr_canseeothergids 9 -and -.Xr cr_canseeotheruids 9 -respectively. +variables referenced in its manual page influence the result. .Sh RETURN VALUES -This function returns zero if the object with credential +This function returns zero if the subject with credential .Fa u1 can .Dq see -the object with credential +the subject or object with credential .Fa u2 , or .Er ESRCH @@ -67,24 +64,20 @@ otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -The object with credential -.Fa u1 -cannot -.Dq see -the object with credential -.Fa u2 . -.It Bq Er ESRCH -The object with credential +The subject with credential .Fa u1 -has been jailed and the object with credential +has been jailed and the subject or object with credential .Fa u2 -does not belong to the same jail as -.Fa u1 . +does not belong to the same jail or one of its sub-jails, as determined by +.Xr prison_check 9 . .It Bq Er ESRCH The MAC subsystem denied visibility. +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .El .Sh SEE ALSO -.Xr cr_canseeothergids 9 , -.Xr cr_canseeotheruids 9 , +.Xr prison_check 9 , .Xr mac 9 , +.Xr cr_bsd_visible 9 , .Xr p_cansee 9 From nobody Thu Sep 28 15:10:45 2023 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 4RxH3n6PjSz4ttvm; Thu, 28 Sep 2023 15:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3n5p76z3Y41; Thu, 28 Sep 2023 15:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtfE3527S7k9dnQ5t7JWD6+mffgJWcNnuNWzlL1Nbes=; b=Qbf4JSaSvdoITe/PEwHRbau2MRXq+pWoME0zBUzuCTY3Ww4osHJD4GcecjM2fg1mM8tZi5 hszoWavuYtDy4Zs3FqgBzRCaGmniEvewAUqhXV0eyAcjPWTKzjrpF5EVhhoG3Ks95M3mZI kmH7S3Tf1sDBMyTaBaBGKMF2GP5sBtUKtUgLK2oIN8kgFnBUrpwMInXfVxFuBbl67v31jW Kf23x8pIUl18WF3LU3Zmheb8sBbcsYm+dLKgHCGIpZLUh9iuiM0vDZBTktQZa0DqhsY2IF CqfPUPiZxHE5PEHyKhkae8mQ9o5DIsNPC3sNe8oIIej6e1oCutWs+Yo0BbksNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913845; a=rsa-sha256; cv=none; b=T2VMzeamH2wegs2kYQQRD5mIIXvOPUtK+MJg9OTOjQiNRgkNnVu4EY+ZCVmNCptcy4i66s wrxCngdYrgHoKkobm3LJ3217SlsTPZDihQeuZWqv51gajPKMQ5FEOiaL4NsL2h2WIoVwRD kdin69/L27YNED5rAPQICNqxQkf2w4kIVYOaP5k9JZibpQPzL5hUf0rljKCiE4mJ9jByuZ SFR15m6lBMNm9cbEJNkfcjyeBa1GuPHksrN7GB4j3kkbDddKDgPw24OA2gLtOSwcz0W3I8 18J1LF18UgiGWwZUqFvivUZwfSyy5qioei2G9xWMI8ZkRNZIChRiNqxryoH79g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wtfE3527S7k9dnQ5t7JWD6+mffgJWcNnuNWzlL1Nbes=; b=vyl5GogEC6f0jEezG6hj4qflvugAkMSKQuFpyj4AFqk7pvi56L87Xc/7vtOCAlLh674aum DZ9bWXlw+Viu7kPH22/ieCAbR8WFRr1utwMrBi5ZpeS+zSuhOxPoeP5TPtnvwC/2z4lZxq Q33EEZs7XZAcN1DJjIWhTOPUipu6dXLNrnVlQwjCEN6jk/Hyp8W761BV6UH4ON2TpIgz+I vhpl0h6/D3+mUi+SYaAZ0T1rAIXPxCLzMSUW48QlYKzm6/j7PdF6N3SFqAMLFBm3+g34Xj OAnpr/F9jCljSnmORppMCvaCmWr5aW60ijglwzI4uuotBrnzGZ0NWZxwdcdo3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3n4Ws8zBjx; Thu, 28 Sep 2023 15:10:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAj2W047605; Thu, 28 Sep 2023 15:10:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAja9047602; Thu, 28 Sep 2023 15:10:45 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:45 GMT Message-Id: <202309281510.38SFAja9047602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 2ede38aff5d4 - main - p_cansee(9): Bring up-to-date, misc fixes 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ede38aff5d4c91a17ab6d093f2e8cce24b5418b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2ede38aff5d4c91a17ab6d093f2e8cce24b5418b commit 2ede38aff5d4c91a17ab6d093f2e8cce24b5418b Author: Olivier Certner AuthorDate: 2023-08-17 23:54:43 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 p_cansee(9): Bring up-to-date, misc fixes Essentially defer to cr_cansee(9), except for the specifics. Be more specific on the return codes. Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40637 --- share/man/man9/p_cansee.9 | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/share/man/man9/p_cansee.9 b/share/man/man9/p_cansee.9 index 84287dac951b..9fdce460dfea 100644 --- a/share/man/man9/p_cansee.9 +++ b/share/man/man9/p_cansee.9 @@ -24,19 +24,18 @@ .\" (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 November 19, 2006 +.Dd August 18, 2023 .Dt P_CANSEE 9 .Os .Sh NAME .Nm p_cansee .Nd determine visibility of a process .Sh SYNOPSIS -.In sys/param.h .In sys/proc.h .Ft int .Fn p_cansee "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p is visible to the thread .Fa td , @@ -45,13 +44,14 @@ where the notion of may be read as .Dq "awareness of existence" . .Pp -The function is implemented using -.Xr cr_cansee 9 , -and the dependencies on -.Xr sysctl 8 -variables documented in the -.Xr cr_cansee 9 -manual page apply. +This function explicitly allows a thread to always see its own process, +even with pending credentials changes +.Po +see +.Xr ucred 9 +.Pc . +Otherwise, it simply defers to +.Xr cr_cansee 9 . .Sh RETURN VALUES The .Fn p_cansee @@ -62,30 +62,18 @@ if the process denoted by .Fa p is visible by thread .Fa td , -or a non-zero error return value otherwise. +or ESRCH otherwise. .Sh ERRORS .Bl -tag -width Er .It Bq Er ESRCH -Process -.Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_cansee 9 . -.It Bq Er ESRCH Thread .Fa td -has been jailed and process +is not part of process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied visibility. +and cannot see it as determined by +.Xr cr_cansee 9 . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , +.Xr ucred 9 , .Xr cr_cansee 9 , -.Xr mac 9 , -.Xr p_candebug 9 , -.Xr prison_check 9 +.Xr p_candebug 9 From nobody Thu Sep 28 15:10:46 2023 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 4RxH3p6jpRz4tts8; Thu, 28 Sep 2023 15:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3p6DhJz3YBv; Thu, 28 Sep 2023 15:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i+ak0VARHmp/UrMMk7rOnk5I9iZl23+DQkWhUtqR2jA=; b=P9RlXTD8c5Leg2SIMrZ3auxSfzSg+8D3g5VaSvMIXMAOCqI63xIVAd6thT2xLSmr5u/zzc 2xzgBSeEDerUlx3IMiSPAZixiymPpG5bqMtjMuxJd3pjikvZCYBfTCHbpNUExkSfNuEUzg Mbt1nUBKUE8HTI7rvBTgC3CrH5lXKywMSAAtTSoqLmwbhG2rpeM+dhK9DRzyt23mCaLqRb 2zctMz1rphWOHCLXhEwUyNWdeLeWSf3Hq/lQIyss9MmPt08XcLpbk2dvdKAWEE3sTQPecb F0CQIekNK0KlDxSHh3U6Pgq1Wh9K9jFwK/ilYo4bMQKcSwL1jocHDHstZfmjtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913846; a=rsa-sha256; cv=none; b=cYZ6tVXL8DkK+XWOYAqplrbkTfzSgWMsgpk9rPUZ55tMtTMQP6DXfSuesfeoqby57INF7V vZrMd276IHWr3f0Vbb0dJ9Lspy1FOApPeJmzpEoaWU48HK0/YhqENU9uDDBflRwpDUtfpL 50El+aOkvfBRxkAlnLZ3UbUWg+mt6E7edVNH7CcuudhnNeEhUU10AHEy9Fj1q6fX4xflYn ab69QV7vkMJh+D1kC8zkPCyY13/PxSCWl24oq08oV53qn306GGjKGtk3bbKDIfINXp8OzG rJRhJb/zqfIcWywCWCVcZmYoREgfwVDwFKNl35ms5d7B3GuVOJE/JURF+/8nNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i+ak0VARHmp/UrMMk7rOnk5I9iZl23+DQkWhUtqR2jA=; b=J+49b0RkSEJbT46j1N7vTIVqlrIOUMgoUCIFy+SFnCTKT07BK3F8lYIPXDOT7O0peihm52 2Pijnnert50lSbvx36FR8V/ECYpRO0D1MvGqTl6dqC3XwKc6Q2N/qB5ozVnr41T8p4C1UP KB4Xi4K1+t9poRqxNnxG3WXjsUTK1qcYqlx9Aj/GXLQAyw6Tt5vJzbB46rmY0/GeoHHzh1 APXbNc3W/UQwAIRTsg0peglG3X0E4TGmB+TFealID7o0WLWfOM/IN7vLavDW6FAyzozlAd SXwe5lvwJKUhQoF7UDqdqF2o3gwvA5HlImNctVZNj6dOWij7OJSSbyrFHfmXlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3p5KSyzBqf; Thu, 28 Sep 2023 15:10:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAkfc047647; Thu, 28 Sep 2023 15:10:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAk9B047644; Thu, 28 Sep 2023 15:10:46 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:46 GMT Message-Id: <202309281510.38SFAk9B047644@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: eb94f24fab4b - main - p_candebug(9): cr_bsd_visible() impacts, misc fixes 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb94f24fab4b44f13ca045370d9fcf12ca8835f2 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=eb94f24fab4b44f13ca045370d9fcf12ca8835f2 commit eb94f24fab4b44f13ca045370d9fcf12ca8835f2 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:43 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 p_candebug(9): cr_bsd_visible() impacts, misc fixes Mention cr_bsd_visible(9). Remove references to cr_canseeothergids(9) and cr_canseeotheruids(9), as well as indirect references not immediately useful. Fix description of credentials checks to match reality. Re-order errors to match code's check order. Reviewed by: bcr, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40638 --- share/man/man9/p_candebug.9 | 103 ++++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 47 deletions(-) diff --git a/share/man/man9/p_candebug.9 b/share/man/man9/p_candebug.9 index e80d313de55c..c824db974154 100644 --- a/share/man/man9/p_candebug.9 +++ b/share/man/man9/p_candebug.9 @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Joseph Koshy +.\" Copyright (c) 2023 Olivier Certner .\" .\" All rights reserved. .\" @@ -25,7 +26,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 November 19, 2006 +.Dd August 18, 2023 .Dt P_CANDEBUG 9 .Os .Sh NAME @@ -37,24 +38,27 @@ .Ft int .Fn p_candebug "struct thread *td" "struct proc *p" .Sh DESCRIPTION -This function can be used to determine if a given process +This function determines if a given process .Fa p -is debuggable by the thread +is debuggable by some thread .Fa td . -.Sh SYSCTL VARIABLES +.Pp The following .Xr sysctl 8 variables directly influence the behaviour of .Fn p_candebug : .Bl -tag -width indent +.It Va security.bsd.unprivileged_proc_debug +Must be set to a non-zero value to allow unprivileged processes +access to the kernel's debug facilities. .It Va kern.securelevel Debugging of the init process is not allowed if this variable is .Li 1 or greater. -.It Va security.bsd.unprivileged_proc_debug -Must be set to a non-zero value to allow unprivileged processes -access to the kernel's debug facilities. .El +.Pp +Other such variables indirectly influence it; see +.Xr cr_bsd_visible 9 . .Sh RETURN VALUES The .Fn p_candebug @@ -68,35 +72,45 @@ is debuggable by thread or a non-zero error return value otherwise. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EACCESS -The MAC subsystem denied debuggability. -.It Bq Er EAGAIN -Process -.Fa p -is in the process of being -.Fn exec Ns 'ed. .It Bq Er EPERM +An unprivileged process attempted to debug another process but the system is +configured to deny it +.Po +see +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_proc_debug +above +.Pc . +.It Bq Er ESRCH Thread .Fa td -lacks super-user credentials and process -.Fa p -is executing a set-user-ID or set-group-ID executable. +has been jailed and the process to debug does not belong to the same jail or one +of its sub-jails, as determined by +.Xr prison_check 9 . +.It Bq Er ESRCH +.Xr cr_bsd_visible 9 +denied visibility according to the BSD security policies in force. .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process +lacks superuser credentials and its (effective) group set is not a superset of +process .Fa p Ns 's -group set is not a subset of -.Fa td Ns 's -effective group set. +whole group set +.Pq "including real, effective and saved group IDs" . .It Bq Er EPERM Thread .Fa td -lacks super-user credentials and process -.Fa p Ns 's -user IDs do not match thread -.Fa td Ns 's -effective user ID. +lacks superuser credentials and its (effective) user ID does not match all user +IDs of process +.Fa p . +.It Bq Er EPERM +Thread +.Fa td +lacks superuser credentials and process +.Fa p +is executing a set-user-ID or set-group-ID executable. .It Bq Er EPERM Process .Fa p @@ -107,30 +121,25 @@ and the variable .Va kern.securelevel is greater than zero. -.It Bq Er ESRCH +.It Bq Er EBUSY Process .Fa p -is not visible to thread -.Fa td -as determined by -.Xr cr_canseeotheruids 9 -or -.Xr cr_canseeothergids 9 . -.It Bq Er ESRCH -Thread -.Fa td -has been jailed and process +is in the process of being +.Fn exec Ns 'ed. +.It Bq Er EPERM +Process .Fa p -does not belong to the same jail as -.Fa td . -.It Bq Er ESRCH -The MAC subsystem denied debuggability. +denied debuggability +.Po +see +.Xr procctl 2 , +command +.Dv PROC_TRACE_CTL +.Pc . .El .Sh SEE ALSO -.Xr jail 2 , -.Xr sysctl 8 , -.Xr cr_canseeothergids 9 , -.Xr cr_canseeotheruids 9 , +.Xr prison_check 9 , .Xr mac 9 , -.Xr p_cansee 9 , -.Xr prison_check 9 +.Xr cr_bsd_visible 9 , +.Xr procctl 2 , +.Xr p_cansee 9 From nobody Thu Sep 28 15:10:47 2023 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 4RxH3r2C0Lz4tts9; Thu, 28 Sep 2023 15:10:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3r00jpz3YQ8; Thu, 28 Sep 2023 15:10:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=COlhE/v1yalMdSCmj8/ZYl6nI7qndhCjifhjIWf4dTI=; b=FZwl6J/lcAF2Sy3NJSqISqZqJAF5L3OVT9De2Vz5f3yarFHC7oAVmg4FpWZo/s2zeHBsQZ tIACCW3LTlnGwu6++stwxj1dsQmths96ORr+qyJ/3wcjbprAV6miEeQ13tOJQ+xqhn3D0J LlNnXRzkFR9ySkR+SKc9uO+mp1YKcpNQ2o445uwBELbZZ9yH3TCF6WFIPWFljNotkU8sst 6LHEAQlgsN62HX3vaTT/egOAtk2+aBuG5gcIUXztMSUriv7tf1XEGx2RWzKNMvuZm6AoYQ 9t+kahb6X+rZjVlshE9/Z1++tr9kLnYRwrGCEh887Q/MiB9Rw7OvgxH9cIBVrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913848; a=rsa-sha256; cv=none; b=QdedqQcJ/XLza1mcVO+VIhecoXkiYpyV2XgOIr0nHXQSX1mBsZZ9dVQ21ZO94HWNQZklS+ wbKnkIvkZBHEIMGH6PSS8AWM6ia2kzavR2xV80RBv/NRw4Asa7eTlXCQ21/BO65So1XGng w6tl3p2YfE/UmdCPr3zff1imUkwzqA8V72ECgkX/Tl6GNe4/YZZfFpALBz34Ulf7km33Yj iGQorJCjWhJ2Z4LzHEZnyFL9sdd/i9eXjCLjTB/BXknI/Bb3SAMur8Sjjvw7Ogr4ODIDOn gx1MyPILUKVIvS+PfksSAcVoEBu3Kw8COUhrM4UB58pCJsqc67dnF4F1E30RSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=COlhE/v1yalMdSCmj8/ZYl6nI7qndhCjifhjIWf4dTI=; b=x6u/QB3pf+dxE/sIqsw2Iou/bVqtmzwyx++Q9d8hH/BLUMK5Yljmgg7FXkEI98VC5eR3Yq vjyYSDUsmYMY9N7vjzWRebkQQdcb2xMlQ3P8Mubk1QFN7PoZxA7qswKSti/Lnwfz93JyGx 6UVAMHOls3kBlw0WmvTSvUi4zVbXEAoud6c530tQ8LrqXBKaPKn8SQoXyr20KraD5zRmPe fs5UxvXKtxp0gN16QoAwNKRdBMLGw5B0DkZVU1bWfd8TDQS8KaVxc1NwihM75FqXcCV4xZ 5ASf+pU2I0Z8zrKJd9agx9lRbpc8YbSLePZ9XlR9U1ENCuX1X1PMUL+KhEqjuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3q6CfrzC6M; Thu, 28 Sep 2023 15:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAlp7047692; Thu, 28 Sep 2023 15:10:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAlAn047689; Thu, 28 Sep 2023 15:10:47 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:47 GMT Message-Id: <202309281510.38SFAlAn047689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: e9fdd494537c - main - prison_check(9): Bring up-to-date with hierarchical 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9fdd494537ca45b14e0917e8bb1595b6460f3a3 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e9fdd494537ca45b14e0917e8bb1595b6460f3a3 commit e9fdd494537ca45b14e0917e8bb1595b6460f3a3 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:44 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 prison_check(9): Bring up-to-date with hierarchical jails Reviewed by: bcr, emaste, pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40639 --- share/man/man9/prison_check.9 | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/share/man/man9/prison_check.9 b/share/man/man9/prison_check.9 index b3bdcf6b4571..7f174e3ceb2e 100644 --- a/share/man/man9/prison_check.9 +++ b/share/man/man9/prison_check.9 @@ -25,22 +25,23 @@ .\" (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 December 11, 2003 +.Dd August 18, 2023 .Dt PRISON_CHECK 9 .Os .Sh NAME .Nm prison_check -.Nd determine if two credentials belong to the same jail +.Nd determine if subjects may see entities according to jail restrictions .Sh SYNOPSIS .In sys/jail.h .Ft int .Fn prison_check "struct ucred *cred1" "struct ucred *cred2" .Sh DESCRIPTION -This function can be used to determine if the two credentials +This function determines if a subject with credentials .Fa cred1 -and +is denied access to subjects or objects with credentials .Fa cred2 -belong to the same jail. +according to the policy that a subject can see subjects or objects in its own +jail or any sub-jail of it. .Sh RETURN VALUES The .Fn prison_check @@ -48,12 +49,9 @@ function returns .Er ESRCH if -.Fa cred1 -has been jailed, and -.Fa cred1 -and .Fa cred2 -do not belong to the same jail. +is not in the same jail or a sub-jail of that of +.Fa cred1 . In all other cases, .Fn prison_check returns zero. From nobody Thu Sep 28 15:10:48 2023 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 4RxH3s3bCYz4ttxt; Thu, 28 Sep 2023 15:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3s2sPHz3YQQ; Thu, 28 Sep 2023 15:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xoeaAgMO5FpiD7mNHi8KRvf75XyPl4xuLwPx1JXy7Ms=; b=S/8QIGzDTDZaBq/t9PdwvGMr7PmyGNA3gGjFjks5c+I07scozh3+BejSi44ewJBldh8H+t 9as7oUfd4H+RmTEBKtNnZWR/6aWaWhkSDXNFMAaaOdKRN1GPD7zR0SpSsP75t5BLESBFLW WC9om4ZkSpGCdfwYw5feE1FGoFRItsuf76geB1LN59YYdZAV/XNQ+LNhAwM+CXHYqYqCKM H/3cco5ApLhVcSU2ZdhWTp6A7OBMjHCUhKLCRtndzp3psPEJSMkRmrzUKN3wnc8wGiJdqZ r1pdsshtRL8yCeQC8pa121/2cT0Od2E2AdQZcxipBZmfTPGfYCZsWscQmaRIog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913849; a=rsa-sha256; cv=none; b=gmaOfcTv0NLr6aLGxusxfbHJv+srVCgGKBHByRNrGrabg2VQvRTw6ll6/pnZU/V4pozujO YG37cX2iv9EC7NSbxPsixaysCihdJwAe8x82Aj9ee6Z0uNKjQos2h8/R5fTzZwYkJH3VK+ pCesw1qGbziovSgceFFK3Evgj0VvKKyvKwW8iZkEIRIuHSWRRF/TiDe8q9E1HLe4ywMYKG W6+fbWvEA9Zf9+gcfX5pSrr2biyiIbTuslmAWLZtcKbcUvQ/Iknz0BGOxPDjfdjcjpla2V qthRav8V7qpPRF9JOSCpz5syJrmXoEgBytGpdv9FPi7tHVInjD6iaGtFVFFN6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xoeaAgMO5FpiD7mNHi8KRvf75XyPl4xuLwPx1JXy7Ms=; b=gr/AygbL09k5ZR7WXgyKMiU3lsQladlCOx8Ax//O+xf3pgvJ+rnC2WXqT6a9A/EwPiltj8 8AXL170mdiG0POIz6mSraXMSKFjqn2Phb9q1sxus/LzsH9QK5EsdKx7Jx18+OQoikuZoVR OXrrZHZa72lYJPzw6SzSNRxYGaCC82Tw8gJF5cpTFm54aqWsuWkrp1onrfslcteRHjF4CA jFl/LArwNIsV0ZYZNsHYwN2A4LxF1GxBm6xoneE3fEGqj8FOSGlXDGPbu/bZDOBNJlXjPx REsFDLb/6M3NrV+Pa4Ht3Zk47iSgbQem1BGOWZ9dUDcluReKZPt3w7FN95SbXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3s1dVbzBXd; Thu, 28 Sep 2023 15:10:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAmo3047755; Thu, 28 Sep 2023 15:10:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAm0q047752; Thu, 28 Sep 2023 15:10:48 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:48 GMT Message-Id: <202309281510.38SFAm0q047752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: b725f232f3b0 - main - groupmember(): Extract the supplementary group search in a separate function 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b725f232f3b09b4bcbc426854fe1545234c66965 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b725f232f3b09b4bcbc426854fe1545234c66965 commit b725f232f3b09b4bcbc426854fe1545234c66965 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:44 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 groupmember(): Extract the supplementary group search in a separate function This is in preparation for the introduction of the new realgroupmember() function, which does the same search into supplementary groups as groupmember(). Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40640 --- sys/kern/kern_prot.c | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 04aaebf0de63..cbaeb1a50814 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1277,36 +1277,43 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) } /* - * Check if gid is a member of the group set. + * Returns whether gid designates a supplementary group in cred. */ -int -groupmember(gid_t gid, struct ucred *cred) +static int +supplementary_group_member(gid_t gid, struct ucred *cred) { - int l; - int h; - int m; - - if (cred->cr_groups[0] == gid) - return(1); + int l, h, m; /* - * If gid was not our primary group, perform a binary search - * of the supplemental groups. This is possible because we - * sort the groups in crsetgroups(). + * Perform a binary search of the supplemental groups. This is possible + * because we sort the groups in crsetgroups(). */ l = 1; h = cred->cr_ngroups; + while (l < h) { - m = l + ((h - l) / 2); + m = l + (h - l) / 2; if (cred->cr_groups[m] < gid) - l = m + 1; + l = m + 1; else - h = m; + h = m; } - if ((l < cred->cr_ngroups) && (cred->cr_groups[l] == gid)) + + return (l < cred->cr_ngroups && cred->cr_groups[l] == gid); +} + +/* + * Check if gid is a member of the (effective) group set (i.e., effective and + * supplementary groups). + */ +int +groupmember(gid_t gid, struct ucred *cred) +{ + + if (cred->cr_groups[0] == gid) return (1); - return (0); + return (supplementary_group_member(gid, cred)); } /* From nobody Thu Sep 28 15:10:50 2023 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 4RxH3t3jRxz4tv1x; Thu, 28 Sep 2023 15:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3t2YgWz3YcD; Thu, 28 Sep 2023 15:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA+A5ClCaqMbd435ulrTxeYBPqAikLumD6iFCsfPnEs=; b=vullueJjRZb8KXjRAbc4dp8Qh5qUo3hnYHfgBnGAqjDBwfxOiXBVmCAtgN9UpH3aOan4T4 N4Y+CI6wZIivopWDPmj2CuPUGow2ZnmaiyRq3CDBQ9haawhALcbH+xOdWjyrozj0PnD51M kMyQMIpIzSl3FNQl0rBE683LGWDnTjNbAKjYf32bhLu6sJ3u5fpEgDBbJomVa1NI03sfqk hwksV6K0jewKFf5i14pSG+HSi5dfpDc7fTUK1miKMv5blHcP0AfHkd1W6KRx2ghAT8dMzf 6RbfUWEqObQsWbwoejwYhC9PUkjNycAXlWlNkhfefeeb0n4uxN0uzD+RFpF8/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913850; a=rsa-sha256; cv=none; b=cNFJeltPIZ4ueeEDWnQQDt8FpNKmQrAH7x+uDijqRMdzLnsM3Ix0UobM0y5pITD518/mGo 38n/zBG5xWXl+qSja5hmyihCHkGnC2wv4ipMbhvMcdfjtLrDZ1+7nv3XSw5ZcQbNIGyu1m XRq/eLAljMEX/Z08PRVd2bhLnJZwQQ8aWAGH+8eR+Jg5YRlGAN8Ts4MAyNinRmhUp0zdFf T78h9fRG2A1nDZtUqMYuxMqujxJWIt0+j7B/O474gaE0qstso8MN6NFJ7Ykmdy4TVGcA5+ wlzpdiGJqGhSoDY93XolVYt/WQLnlR5Jm+sqXOlJjP9M2wuomMRrkowMzfEpzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA+A5ClCaqMbd435ulrTxeYBPqAikLumD6iFCsfPnEs=; b=WiVW11z+dztmlifPyeev4jSa1gVNy2tgsdSch2DgqHw66A4ovGHL7c5ze5NqoCfTr0Ve9y ZSnliMbB3THYeN2GsZomC6hYZgPtovjAtJwM/Wfu8/RuSyJq/W5+6/79vk369UaAen9yMR zm+WClfWUvSoLuOIuT/Sx3xbIOoRrJpgAMrNDY32dPlN1azovKxdsPo6b1zi48FkNgR/oZ oiDa9+Mw0QWe4Vl/iRs9j11i295JecXiLp7AFTihLNLPIQnXDrOVuXgxFTslmn2zI6qXW4 ZaM5jhwt0taUXI5wqP2OMSZwU34hIyd+U5Ip2jEiIe4hL8Or1z5o2IbGpKMzCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3t17pVzC6P; Thu, 28 Sep 2023 15:10:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAob8047788; Thu, 28 Sep 2023 15:10:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAoEA047785; Thu, 28 Sep 2023 15:10:50 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:50 GMT Message-Id: <202309281510.38SFAoEA047785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 2a2bfa6ad92e - main - New realgroupmember() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559 commit 2a2bfa6ad92e9c82dcc55733ad2fd58fd2ea7559 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 New realgroupmember() Like groupmember(), but taking into account the real group instead of the effective group. Leverages the new supplementary_group_member() function. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40641 --- sys/kern/kern_prot.c | 13 +++++++++++++ sys/sys/ucred.h | 1 + 2 files changed, 14 insertions(+) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index cbaeb1a50814..b62a5e9ee20b 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1316,6 +1316,19 @@ groupmember(gid_t gid, struct ucred *cred) return (supplementary_group_member(gid, cred)); } +/* + * Check if gid is a member of the real group set (i.e., real and supplementary + * groups). + */ +int +realgroupmember(gid_t gid, struct ucred *cred) +{ + if (gid == cred->cr_rgid) + return (1); + + return (supplementary_group_member(gid, cred)); +} + /* * Test the active securelevel against a given level. securelevel_gt() * implements (securelevel > level). securelevel_ge() implements diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index eb92776c158a..633bf436fcd4 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -159,6 +159,7 @@ void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); int groupmember(gid_t gid, struct ucred *cred); +int realgroupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Thu Sep 28 15:10:51 2023 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 4RxH3v3Xwlz4tty0; Thu, 28 Sep 2023 15:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3v329Jz3YjW; Thu, 28 Sep 2023 15:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k29SYkhbCTDDk/huSLbQsy6pYKT3innbxm+icDtnrNU=; b=nLDJJt3ID7rZ9Q0ZhtczynZySLKNNaMoT+eqK5W83Tx0n8suDeeI0ATr4RWldGTy0XRf0N WhsP8n9Rh3D9Rt9x5n2Rmjc7izwqcjvGr3aHMr2/XKKI3dS+WCK3ACqcfh3TxWDRhCZZHO uGJKEWgoLOjhDfPj5vFhImFvDo9H85EJUkpISeYZkRPsXZ8bWQmZ7NkmXqItEp/+OPLYwg bwFaUnxbeKMB5iYUBcnkC8KqPTrmzF6vJ7BGAP+D5G1oDOmpKQ/y7Hr2zido3rI7OKCd0u 5ZkVrZuGA7Koz4/5D65o3HuSmyTOll7mPOi9gzgS/yQkKYxk3xJpvgoPZcyW+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913851; a=rsa-sha256; cv=none; b=Rv0rH1mwL810zEX2VQqjRnZSL/y1Bx8LfcNa+YJ+Kd/yI1/2hZHo22PHpQ4YYY+kSHJlhq JghwCtUsow1Nn1CjLHLBskKulkgC0ehlC+kv/4sDtyTpTytz/j98zhkap3ZOMZX0HChUKO yz4WnS39nYthEQ/AoSxh6pDtZHeOvEyvs4vl8EGaotTRBG5wCaoasSRqLfgYWEr+P8kWOI +kE1+vedczXVXHWzTci6xywER8dZtprIq3Ux4p+cFAkbAbcxaHZXiPi4uJOXxTTxoibSNr M6JTZU07GQPLELgScnDPbj6kXJM+PppMDrnhsakI9mlFtRI5tB0NWvnO+QT8Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k29SYkhbCTDDk/huSLbQsy6pYKT3innbxm+icDtnrNU=; b=lJOobfB5+UoNErT8BAX6HwUa7vx8DQFJm8FewPPucE7za484QEHd3D3EvPJXcW//blTvtC Yw+PFWkaboAVp+EUoBzquiDzX+5bbZExatGNWQGPg8De/c68A/eWGwBy2HO7cx35b9zajv 9+1g9wi4nh1uVxuz6D1T2imfDzFwuX54CcV/LyAZS9pIjsKcDD9IVV3we0SOHEOTWGEGxO rLZTOes8XXLdbUhlDeWqyofVSPrn9uHSVBdYcDUshKjogncBebtJdboyNPt/gtkfMj9E1l z6HDCNekeDn7FkiSZ6vDnYVi/w4eukzUq8PZsIxIfT+mH3a9j/sWnQJ9AdcOfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3v25lxzBk0; Thu, 28 Sep 2023 15:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFApj1047841; Thu, 28 Sep 2023 15:10:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAp4u047838; Thu, 28 Sep 2023 15:10:51 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:51 GMT Message-Id: <202309281510.38SFAp4u047838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 91658080f1a5 - main - cr_canseeothergids(): Use real instead of effective group membership 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91658080f1a598ddda03943a783c9a941199f7d2 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=91658080f1a598ddda03943a783c9a941199f7d2 commit 91658080f1a598ddda03943a783c9a941199f7d2 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:45 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 cr_canseeothergids(): Use real instead of effective group membership Using the effective group and not the real one when testing membership has the consequence that unprivileged processes cannot see setuid commands they launch until these have relinquished their privileges. This is also in contradiction with how the similar cr_canseeotheruids() works, i.e., by taking into account real user IDs. Fix this by substituting groupmember() with realgroupmember(). While here, simplify the code. PR: 272093 Reviewed by: mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40642 --- sys/kern/kern_prot.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index b62a5e9ee20b..0f15771fb00d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1408,21 +1408,18 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_other_gids, CTLFLAG_RW, static int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { - int i, match; - if (!see_other_gids) { - match = 0; - for (i = 0; i < u1->cr_ngroups; i++) { - if (groupmember(u1->cr_groups[i], u2)) - match = 1; - if (match) - break; - } - if (!match) { - if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) - return (ESRCH); - } + if (realgroupmember(u1->cr_rgid, u2)) + return (0); + + for (int i = 1; i < u1->cr_ngroups; i++) + if (realgroupmember(u1->cr_groups[i], u2)) + return (0); + + if (priv_check_cred(u1, PRIV_SEEOTHERGIDS) != 0) + return (ESRCH); } + return (0); } From nobody Thu Sep 28 15:10:52 2023 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 4RxH3x11Ybz4tty5; Thu, 28 Sep 2023 15:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3w4GxFz3Yls; Thu, 28 Sep 2023 15:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHU+jE8PD49z8rIvlQoz6hAWS4/vNJA8zQVIzOcdAyg=; b=BtMSQ7Q0ebfoY16i+M5pVDKTlZ7oiGUVCeS/r6upZ15U0EJoUslDqovj/QrycRVQVr58/P Ffr4LPGOp4n9qCaSgA5GuhJyj8ItKZvM+0dxw7n6h4oGAxsF81uKckHjlDZe1n4z0fp5NN yNk+zUXt61PjenhKp2vy3UznhZlFnPkXFIQ5IYR5dH3gTS1eIE5lJvOmhI72Kd8XUhgoxj 9XYawQIesgcavNs8fu8PcgWD8UerGFSKpg8hBokWNDNdSl3lu2HtzqUQV5nS7aBTPGpm0w mMQqBe3mRozXwjWcVHSGwFBtFURp4SUyaY3Z68YhLzE5uDjX0aoIbTfEuDM/vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913852; a=rsa-sha256; cv=none; b=oFBZgo89fL4K18+tLMChErlaTa19o9jnSFUxvmwev1PPePObPi6LD3d5lgWtcozz3FJH0N n7+S/ikRfz2+CFUmcGrbrnG59NA8iChv7tw0yVb0N2G7LkC2WhuCALvF2E52i2Y9vSy/17 z1aAsAE6FjEpeTIGz1lWAYx4WTpd+vG6ldP/hUb1VEOg/EIoo0jS0AL0luchGLlsDAYkWF cid0/Pi8dIgi+nqE06z3hV0dYuoXlEi9/j8JNPOZ6yYdOmGw9v+Cvy4oyzbahZZ4e/OREu cbhV3XfzTv+AWa+hDhGV5TFRyapr0M1VHhr3U3VfGj15Iln/exBKt8mNvWwIUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KHU+jE8PD49z8rIvlQoz6hAWS4/vNJA8zQVIzOcdAyg=; b=Be8ZoEJ1Ff02OV8AbbxO2rX8RV9+g+1sMPc5oxN6mOkvl+51iaYvYwDzi2toV9fTw6jqRM iYgssKe2sz6R+30MmpUcdYW64e18wfxypir0x5IphzRBi6qptdDXFUMqJ8/TVtoimR4Qoi aPpYPkTZty12vvfBGJGAETvHIcxZ4Mr4F1Y+QrIbxLdoKFCAGE0rMalzuQ38vsqGF34Jko 54uLjCVsp/R+93v/jmOlcqddoqXGlPSI66ndy4Tde6NkbWCORp2LAohFsi8DttFLHZ2/zc gOZyvynMI1RnC9Y3/xaXLt6Cg7PbyXs+KCx5lNHxMnY7zlIm1MCjulcVrdK2NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3w3KXxzBk1; Thu, 28 Sep 2023 15:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAqkM047889; Thu, 28 Sep 2023 15:10:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAqTQ047886; Thu, 28 Sep 2023 15:10:52 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:52 GMT Message-Id: <202309281510.38SFAqTQ047886@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 5d9f38405a10 - main - realgroupmember(9): Link to groupmember(9), document the function 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d9f38405a10fdcd9fc108c940dcf2642e9f1833 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5d9f38405a10fdcd9fc108c940dcf2642e9f1833 commit 5d9f38405a10fdcd9fc108c940dcf2642e9f1833 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:46 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 realgroupmember(9): Link to groupmember(9), document the function Reviewed by: bcr (older version), mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40643 --- share/man/man9/Makefile | 1 + share/man/man9/groupmember.9 | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index f07a886277e0..1e38eaf8adae 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1157,6 +1157,7 @@ MLINKS+=g_provider.9 g_destroy_provider.9 \ g_provider.9 g_error_provider.9 \ g_provider.9 g_new_providerf.9 MLINKS+=gone_in.9 gone_in_dev.9 +MLINKS+=groupmember.9 realgroupmember.9 MLINKS+=hash.9 hash32.9 \ hash.9 hash32_buf.9 \ hash.9 hash32_str.9 \ diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index 3a516622efce..ae7ccd477955 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -36,6 +36,8 @@ .In sys/ucred.h .Ft int .Fn groupmember "gid_t gid" "struct ucred *cred" +.Ft int +.Fn realgroupmember "gid_t gid" "struct ucred *cred" .Sh DESCRIPTION The .Fn groupmember @@ -49,6 +51,11 @@ Considered groups in .Fa cred are the effective and supplementary groups. The real group is not taken into account. +.Pp +Function +.Fn realgroupmember +works the same except that it considers instead the real and supplementary +groups, and not the effective one. .Sh RETURN VALUES If the .Fa gid From nobody Thu Sep 28 15:10:53 2023 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 4RxH3x71jVz4tv44; Thu, 28 Sep 2023 15:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3x5QRTz3YkQ; Thu, 28 Sep 2023 15:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J/fetu3wzsHMIWGEgWqek6rB5hy+iBBFpHBV1lah9kE=; b=sNNBhJlZWwTdj9jz92YBK42xqsHHZalkrJ8CHp84eg+UVieXw2bYQLE8hMkB0QEWUvqmiJ gFczVb0BJMVUCDrslZUoI1qnpvy4KXdJFIeCUZRzXPbLIqIpfW7iCilDlPuNrFDz9edFbJ MWvETVkXWJaztsSD7RnvcMpQl887PDkGkpULCfOqLTpDW2LZ7RW5d9h+zjLQ+G/deWopJv H1yyO03VAwn/tEwO/2/ni9nnlMUVKlaHEkohFrrVCk+3Iix6GPgiRehzaaoHgnGGeDdvcs xCDrlTvsCU/PlOIUcgldjWswqwNAyMOVBMWZ6pDFGdQJo1WFRZIcgAYDQ5Sw2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913853; a=rsa-sha256; cv=none; b=dy2/rh2q9Mhlkr3nc6o+XO1ri65gjxnSIdSzO8XqLbwrWWh0IR+uMKtwRb64n8AI3cuAPi zx1CMG6NkPXYjf84P5xjWr5TL3gu/rvt/38bQmcrSyQlV1LxVmDyhvN8AedosJ8xLY1SIL mRcMFCYdnedH4FTvoG2q5ujrEiOkS7DqxgYf/TqnPkvbF/4CIBOnZcOtSZMNO3VGcZYYq9 iGgo53U+usnvYbdGoqPdtjru1O6Aj62TZuHyTRC5nPiodnx6rTGwr8YEUyOv2AFCwuwcWc o5do1yaszQ5j0PDnDGZho+FRWSYRiDC8U/7nHUtRFDBi4Et3YqjaTI5gfyqIOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J/fetu3wzsHMIWGEgWqek6rB5hy+iBBFpHBV1lah9kE=; b=RJs8fgIjIXx6FbLozgBU0hLnp8OZ5D8Mi7RDuPiYBEU2W6ThLXJsB+sE7TOgKdhI84+upI qiwQI+qvw3A5v5K9Fb+gP0sYoNQIx1ZC2Kft8Fq3TuOPtmxgjoM345FplB3HFPbWgyRFpg cPc8s8jDsIevAZoSIyiAFtsac59xham9eatiCZFgGA3mPX+5FO7PWu+7dP8QeiRi5+isuj YTmQm4oMmfLAekJyBemg55wfPIjOhAL/PBsR2r8zCZj8yqSj8+V6cK6irAoQGCmFzkgPlq PHd2tJb7AWjePGvnEjR5Cmh1MbX9TBw8lSC2wB8XmSWh7YgvCrKE1FiZHTlOVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3x4WMYzBXg; Thu, 28 Sep 2023 15:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAruD047935; Thu, 28 Sep 2023 15:10:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFArFg047932; Thu, 28 Sep 2023 15:10:53 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:53 GMT Message-Id: <202309281510.38SFArFg047932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 0452dd841336 - main - cr_canseeothergids(): Policy change's manual pages impact 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0452dd841336cea7cd979b13ef12b6ea5e992eff Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0452dd841336cea7cd979b13ef12b6ea5e992eff commit 0452dd841336cea7cd979b13ef12b6ea5e992eff Author: Olivier Certner AuthorDate: 2023-08-17 23:54:46 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 cr_canseeothergids(): Policy change's manual pages impact See previous commit that made cr_canseeothergids() use the new realgroupmember() function, taking into account real group IDs instead of effective ones. PR: 272093 Reviewed by: pauamma_gundo.com, mhorne MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40644 --- share/man/man9/cr_bsd_visible.9 | 2 +- share/man/man9/cr_canseeothergids.9 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/share/man/man9/cr_bsd_visible.9 b/share/man/man9/cr_bsd_visible.9 index bd676e6f5705..f2d42f3835dc 100644 --- a/share/man/man9/cr_bsd_visible.9 +++ b/share/man/man9/cr_bsd_visible.9 @@ -97,7 +97,7 @@ and are not members of any common group .Po as determined by -.Xr groupmember 9 +.Xr realgroupmember 9 .Pc . .It Bq Er ESRCH Credentials diff --git a/share/man/man9/cr_canseeothergids.9 b/share/man/man9/cr_canseeothergids.9 index f0c1e5c4e726..109d41a8545d 100644 --- a/share/man/man9/cr_canseeothergids.9 +++ b/share/man/man9/cr_canseeothergids.9 @@ -48,9 +48,9 @@ This function checks if a subject associated to credentials is denied seeing a subject or object associated to credentials .Fa u2 by a policy that requires both credentials to have at least one group in common. -For this determination, the effective and supplementary group IDs are used, but -not the real group IDs, as per -.Xr groupmember 9 . +For this determination, the real and supplementary group IDs are used, but +not the effective group IDs, as per +.Xr realgroupmember 9 . .Pp This policy is active if and only if the .Xr sysctl 8 @@ -79,5 +79,5 @@ Otherwise, it returns .Er ESRCH . .Sh SEE ALSO .Xr cr_bsd_visible 9 , -.Xr groupmember 9 , +.Xr realgroupmember 9 , .Xr priv_check_cred 9 From nobody Thu Sep 28 15:10:54 2023 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 4RxH3y726jz4tv7j; Thu, 28 Sep 2023 15:10:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH3y6J44z3Ykn; Thu, 28 Sep 2023 15:10:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QV/2cfSfKqZ/4MgoLOxlchgs8wScGS+69xfn+GNgSiI=; b=kpDVtc8FgEMVZHaz/b+6/F+5QeWc0vSS6sD0qQOIAg4xO2H6EseIMdkYbQSERFTzGsIHMY u1TttR20wzlICfjqEniep5KjTntqDX6gf5j8AZqOWa4HEfnR3+j708zfqGL8yQYLP6Z8OP k0DTA5OT/D8fwlzOEP1KmXPfxBTvmrsqU6D+6cK7dgzbc1fE4bz40Owo6HfYbDT/FywVGU qNUNR5jOW3bFJQtVRsOLiEre8yPPi+QThZor/wpHwoUZkMDDwU7MdvEsv9EHygZ92zQYqi WQzscYbbSMHYhekXLiFk1M9GAXOM5Yvaz2UB7sGfOezGiwX0lzubD+bVTrk35g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913854; a=rsa-sha256; cv=none; b=l1kW3D3uzIHLLOLWJMMq4gCgFhbackMOJuj0BA0HsV/sy2UAC5TPY5CxMP9eP+B8VGn315 hfevRnItTNEmzqFZcfysGxsaSzqPUqFmR+l6xRDjrnSE4fTsPMoTaYGt42wqSg2gWwNApg OrblmIyFH4mXuxcdegecxw0og/rBK6cQxykpsxqKsCpRfbMw+YeEEmH2Zsu+wpXOdKWmvT ywdSOs/L7pOhphE220nc30BKLbBLaGnPClE69IZwWDhFGSu9G7O0YGiYKxQHWr5JWEyiAw 2k/ZYB7j/qLR0RZyn6buUr0LO/0cf92duEIL0hNjw+sg8nf6miOItGzdV4OGZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QV/2cfSfKqZ/4MgoLOxlchgs8wScGS+69xfn+GNgSiI=; b=qy9lWQ6acVTMNxb4h5uFzdBl95XpvR297wQG90m1TarhiorjPfPJdVNpi2yJcHk126x3rd dMWNpq43Q+Y/L8DsCYkCKYMC4jmJFOfExIBa+mJMK1lvDydfRd0yqwXbMJNj48YF5EtUqS +nHThKv/Bwyb6xvJraIU22325Kd4ABhxWQYZtp+WDKO8eCl41MnEdVSr+VZLAa883wM31A K/SH2kUN0IZLQSL5N2efXDRRKg4gH7ObovPLNO52YvlpED/Y5e89KV0VWWYE0yuyEy3PWb Sw59nhf6quYSopjVCGxXwdppf6YERCxfbxlBd9zPHn7c23E/W6+CTiM+lwOIzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3y5P0xzC4p; Thu, 28 Sep 2023 15:10:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAsLj047995; Thu, 28 Sep 2023 15:10:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAsnI047992; Thu, 28 Sep 2023 15:10:54 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:54 GMT Message-Id: <202309281510.38SFAsnI047992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: ffd3ef8ee025 - main - groupmember(), realgroupmember(): Return a bool instead of an int 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6 commit ffd3ef8ee0253ffaf214cf711251d112f6a2bcf6 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:47 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 groupmember(), realgroupmember(): Return a bool instead of an int Requested by: mhorne Reviewed by: mhorne MFC after: 2 weeks MFC to: stable/14 releng/14.0 Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40958 --- sys/kern/kern_prot.c | 12 ++++++------ sys/sys/ucred.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0f15771fb00d..00eb2fccdeef 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1279,7 +1279,7 @@ sys___setugid(struct thread *td, struct __setugid_args *uap) /* * Returns whether gid designates a supplementary group in cred. */ -static int +static bool supplementary_group_member(gid_t gid, struct ucred *cred) { int l, h, m; @@ -1306,12 +1306,12 @@ supplementary_group_member(gid_t gid, struct ucred *cred) * Check if gid is a member of the (effective) group set (i.e., effective and * supplementary groups). */ -int +bool groupmember(gid_t gid, struct ucred *cred) { - if (cred->cr_groups[0] == gid) - return (1); + if (gid == cred->cr_groups[0]) + return (true); return (supplementary_group_member(gid, cred)); } @@ -1320,11 +1320,11 @@ groupmember(gid_t gid, struct ucred *cred) * Check if gid is a member of the real group set (i.e., real and supplementary * groups). */ -int +bool realgroupmember(gid_t gid, struct ucred *cred) { if (gid == cred->cr_rgid) - return (1); + return (true); return (supplementary_group_member(gid, cred)); } diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 633bf436fcd4..7c9e46e47774 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -158,8 +158,8 @@ void crcowfree(struct thread *td); void cru2x(struct ucred *cr, struct xucred *xcr); void cru2xt(struct thread *td, struct xucred *xcr); void crsetgroups(struct ucred *cr, int n, gid_t *groups); -int groupmember(gid_t gid, struct ucred *cred); -int realgroupmember(gid_t gid, struct ucred *cred); +bool groupmember(gid_t gid, struct ucred *cred); +bool realgroupmember(gid_t gid, struct ucred *cred); #endif /* _KERNEL */ #endif /* !_SYS_UCRED_H_ */ From nobody Thu Sep 28 15:10:55 2023 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 4RxH401HVFz4tv4B; Thu, 28 Sep 2023 15:10:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH400Y7vz3Yn1; Thu, 28 Sep 2023 15:10:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKWEQEQel/8otS5ol7J7/CtjF8xLNn1vss1Bie791ao=; b=JLiGNxkv4cVv6VCL+i+8a96Bk77wdXc7wn5vouI0hwKpM6WXf8W0zOiv3oYBH+iyq8eY5e 3zaGFSR5jajTk4XB9wRBu58dBv6IAyap5bD7KjrB6l2H3lrs2LklFwOeHILlflNG8B7Q4S LDqVQieTEqzWQm0a/f8P1lLKDBtqKZy9OoPDmA3Y2k/NNPZDz3sMTiRC3GM3NUF/ateG7l JC0ZeFCO470FMT7N5hh+NmAIZP6hjD4so2zP8G5V+XFVap8sk0vD89AuH0JHuK2otw3DZ3 WDx2Sk23cDnC6mCHKFalwQEeUjBluHrcTKYTcOg7WmYCpnd4RRbRM6dYOG4/NA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913856; a=rsa-sha256; cv=none; b=wq52I7UrF0jTCrO4J+3zWKCIDRPQP6R1OzhQgZqRQU0gcp8IZn4ufOI3FRh/CdLG/4weDD N7wfg9ym+/B3tTXN1/DNsfOWEdaV8bxo6MGDkB/Y0PVklYVKpQwknPeqYHBvGZwG3iKeTY h10rvW4P5zXLdGVw386pfqg6p+dgDzX6hDrwbweLAmN9vVuE+WomZoQaMaUwnU8C57SGJ5 e2q6mxc7iyi0zAIstqHDmEA53kOAGrDB1tLPCN7ONsDFyLcvV0E9cHQGHz6G9eXxe61D2R m9KbW+vfj3EQPFVU6+TFh1xXdPB9NDF4fV52fSpUtShmbJVe73K9WGhYDKLpHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKWEQEQel/8otS5ol7J7/CtjF8xLNn1vss1Bie791ao=; b=dL0p/OdEr6AeS5lXt0HC/JvbYpD+3ohwlZqcqzCCrjuy5PDTCOU4UVtY9a0SoN+YAPtBV6 RnLP/fDonGLyhdaMKES/TDOZHUVhs80VKt57i6DesPoUzXfzy8P+Uu7d+o5eESEX06toi7 +WLQVDojR0XpQ5nhLvJTEQ70+UEkqIEnz8RXGjpcbdO8jsdQkpl/YZcqt19UmDUpkir0mI ODvwErKUsGD73WwPnfrF+zjRXlqFlzHN64DPiS4ffEYs/VttmuoFRNhC8MNaH53mspF1Go psVJ7IrdL6W7ZmBIsrFwtczcBGl1BsKutBF9HU1QC2XrbKOYibpLwNUM/VqWnw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH3z6mZczC6T; Thu, 28 Sep 2023 15:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAttx048044; Thu, 28 Sep 2023 15:10:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAtiv048041; Thu, 28 Sep 2023 15:10:55 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:55 GMT Message-Id: <202309281510.38SFAtiv048041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 845b7c80887a - main - groupmember(9), realgroupmember(9): Impact of signature change 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 845b7c80887ac84c82ee776836ef86d68ea71c94 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=845b7c80887ac84c82ee776836ef86d68ea71c94 commit 845b7c80887ac84c82ee776836ef86d68ea71c94 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:47 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:46 +0000 groupmember(9), realgroupmember(9): Impact of signature change Reviewed by: mhorne MFC after: 2 weeks MFC to: stable/14 releng/14.0 Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40959 --- share/man/man9/groupmember.9 | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/share/man/man9/groupmember.9 b/share/man/man9/groupmember.9 index ae7ccd477955..b7865a35fdc9 100644 --- a/share/man/man9/groupmember.9 +++ b/share/man/man9/groupmember.9 @@ -34,9 +34,9 @@ .Sh SYNOPSIS .In sys/param.h .In sys/ucred.h -.Ft int +.Ft bool .Fn groupmember "gid_t gid" "struct ucred *cred" -.Ft int +.Ft bool .Fn realgroupmember "gid_t gid" "struct ucred *cred" .Sh DESCRIPTION The @@ -57,9 +57,17 @@ Function works the same except that it considers instead the real and supplementary groups, and not the effective one. .Sh RETURN VALUES -If the -.Fa gid -is found, 1 is returned, otherwise 0. +The +.Fn groupmember +and +.Fn realgroupmember +functions return +.Dv true +if the given credentials indicate membership of the group +.Fa gid , +or +.Dv false +otherwise. .Sh SEE ALSO .Xr getgroups 2 .Xr setgroups 2 From nobody Thu Sep 28 15:10:56 2023 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 4RxH4121HQz4ttyB; Thu, 28 Sep 2023 15:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH411bvwz3YnW; Thu, 28 Sep 2023 15:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/hnLBI1wpCQGtyoDJ9pG4tYNDbYUMukDrSnUb14qF2s=; b=w3U95koe4NVEObdQ/xHMY9MIXxvEchmKHZ8uJXKT1NFDtHNvhZkjF9cSVoXl1aEEwTTv5k QVAYPMC/NMuFUmxEPEgv6GCRtx/TJMR8a90wYZge2z7BUCk+SfwmaF+iHMJD+BWp6EKq// zGkVwl88pt7D9A0OfzIo1ULcdDP3dyUbdXnkvIRM1os8E83Ylf+OXTjUW5/b8au5kfzkxH 22h551cGI4FDBcFkkRMdNd7UgfGtGWjeescH9KT0SW+W8aWU0tynouIi5xwuGOebgMXLPF 4leiObQ/vUqtbv+umfck3llDP5HE3wnE0C9dcFsPp+sa7Y7lhPOrR7rxp0jZlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913857; a=rsa-sha256; cv=none; b=Jvz1b955TZFvJwYEkBRLoWS6PqWX1FtWVe4Ka603zSlZwewGdhUGh3d4GTFO5yAVrnyEGf uV7KKctH2wclM9gN/nz7NDaq9utaJz9Mcw6OqTnhV1DUee/PGVzRK06ZzhuZfvGdOEGf/P kU2KZuambKi+tMMDFEZJskmvGei+q9nPW2MGrdMiu12RbayW7+8rERJomtSLt2vMn28Aec JvQbqYqqp/6x014nCm+gn6pjRcgd+C7UHQNx7We1kSe5DBA51FMm2mnhp5h5UDjrGdQ3Tn s7ZZrCjkqdOTAfjocitynQuJHYoeCIQkn3B0pQTklFjNhzCBesNnwmj6VZSqSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/hnLBI1wpCQGtyoDJ9pG4tYNDbYUMukDrSnUb14qF2s=; b=h870c6EUJ750qEedvMRWq/jMMcFgGLb7C4xelAKOlp6w9Kydh+IvPOk7n56V1pJQWhhqbu ni7iEg65knIMNLrpK46Xrpbvh9LTBa3ojqrzwJSlbSswUhW5r5xXNax7GdHmiPViKPXFtz PdcgCewpkbaPqw3jNfxE3GI43hsEtaOmhrbrzzzeXrhXGBXslg+AF8Gmh1JBNTy/22tyV6 HSF/qEZzvMqiMnMT+JVcCoICTOrsk3FqKjN0/yTYHWuJP3nbJCjuUvhtryYuWQz4fUHc/9 +Nru8gt9Yn/zYa19I1FkS9V0tZdfqTnui+ZBH3+ev1d7r+mgWTnNR/v6ORKcBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH410hfhzC6V; Thu, 28 Sep 2023 15:10:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAv8J048095; Thu, 28 Sep 2023 15:10:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAusR048092; Thu, 28 Sep 2023 15:10:56 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:56 GMT Message-Id: <202309281510.38SFAusR048092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 61b6e00bee1d - main - security(7): security.bsd.see*: Be more accurate 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61b6e00bee1d39e9c688e728fbf3a4efcdb61e66 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=61b6e00bee1d39e9c688e728fbf3a4efcdb61e66 commit 61b6e00bee1d39e9c688e728fbf3a4efcdb61e66 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:48 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:47 +0000 security(7): security.bsd.see*: Be more accurate Reviewed by: mhorne, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41108 --- share/man/man7/security.7 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index 63b984ff66dd..6d6742fca0bb 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 30, 2023 +.Dd August 18, 2023 .Dt SECURITY 7 .Os .Sh NAME @@ -959,16 +959,18 @@ Backwards compatibility shims for the interim sysctls under will not be added. .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.see_other_uids -Controls visibility of processes owned by different uid. +Controls visibility and reachability of subjects (e.g., processes) and objects +(e.g., sockets) owned by a different uid. The knob directly affects the .Dv kern.proc sysctls filtering of data, which results in restricted output from utilities like .Xr ps 1 . .It Dv security.bsd.see_other_gids -Same, for processes owned by different gid. +Same, for subjects and objects owned by a different gid. .It Dv security.bsd.see_jail_proc -Same, for processes belonging to a jail. +Same, for subjects and objects belonging to a different jail, including +sub-jails. .It Dv security.bsd.conservative_signals When enabled, unprivileged users are only allowed to send job control and usual termination signals like From nobody Thu Sep 28 15:10:58 2023 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 4RxH4251wRz4tv81; Thu, 28 Sep 2023 15:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH422Pc2z3Z6k; Thu, 28 Sep 2023 15:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyaRaWRV44bWRtzVaswd7rPLc0ZybKiT42gfsIcWQcY=; b=dpbbEoHplttvJrryRfcF5cuze+XBvJbFbaNkmQg5FoCKP5Jijh3SPCsaaN9YFdTH1RObpy sCkAkMJVRnBAH+oyuuUVNL8Lbfa4V+dv+KOIIAabl5a23Pfc1Jjvj7DPGOminDI1wOYp4M afHpVikVVft8zxhZzvf+sfEP1negtctag1BB1uH7QhvlGQpwAwREYNZxpO0f8bjMKOCUjw BQ17mC3htn+On5ScE8PincvhHy1bgxwOWBcH9munBu7qvoTC+UMkAFaYm9Ihti8ewjmdLk DI2+dBnekZNiBBXFpzvTEDCUSz8AcfYt4UCygJH+rOR3kAE+q2bQy2kOkY3bCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913858; a=rsa-sha256; cv=none; b=qE5NLY2HA2jgnexVKAbmlGS+bsUGMpZYM+5F/OhYHEg00fp//Nz2XGzgq/f/6+0rpi1DqV 8RJhjHuuqtrtrr4G5T5pF8OBj+wXG0BJy+PY+W7+vkaZOe2s3puMtFN3uvOdTFaDiyWRxa s9T0kvcMIakpRrFst3p0JkJfQ7lWPuXARlvfI9f1c0Bqfs9S8NLHRud1XmfkmpOXOZuXnn i6s6VVFg9yifrArkNRdRsR/7CHTnN58qPfT/dOK5I9JNnCHtQbFEzCEMjF9ekznhqAlpo8 wHHtb1yNK1fP5wpZ+caNL44B6YXtCpcujNCvuJ4FIkuOCNrAOp78f4nMyvycLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cyaRaWRV44bWRtzVaswd7rPLc0ZybKiT42gfsIcWQcY=; b=efFD9AW8pmM84knZxgTbu6lGw9OcOn4FHHHAkmZVkjNWPv4gtslF3dhm5RaVbxoXfHSV+o oZGQ59n/6uwy2rlROoPqpjgE2xAE3OdZWTzD5b+Vatpc6BvB+pOHwTXEz+gPdT+SM6oGDu FJm/d1KnL4WYJ6ehMAx7qRjJb1WRzBytnFEK+m1ssVVleVcmBGdZG8eg8yokFuayz4hgt2 YDgHPacNh+pOESv0HhArFqIYqIAK5vsnuKZSZFPZGMTBM6v7mirb670QIKyoMz5S78vdfZ HKIzuD2/UFc3VizfFDD7y1liPODKIkGfZc1CUSMhlo515S9aXxA0C7VKbA3FOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH421ClZzBXj; Thu, 28 Sep 2023 15:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAw9U048140; Thu, 28 Sep 2023 15:10:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAwYd048137; Thu, 28 Sep 2023 15:10:58 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:58 GMT Message-Id: <202309281510.38SFAwYd048137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: d952820105d6 - main - ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d952820105d6a2ad87ddf3bdc6c5fc5215d13b87 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d952820105d6a2ad87ddf3bdc6c5fc5215d13b87 commit d952820105d6a2ad87ddf3bdc6c5fc5215d13b87 Author: Olivier Certner AuthorDate: 2023-08-17 23:54:48 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:47 +0000 ptrace(2): Disabling: Describe influence of security.bsd.see_jail_proc Reviewed by: mhorne, emaste, pauamma_gundo.com MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41109 --- lib/libc/sys/ptrace.2 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index d7d244b1d84a..ae1770315aa5 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -1,7 +1,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd December 15, 2022 +.Dd August 18, 2023 .Dt PTRACE 2 .Os .Sh NAME @@ -149,31 +149,37 @@ its scope. The following controls are provided for this: .Bl -tag -width security.bsd.unprivileged_proc_debug .It Dv security.bsd.allow_ptrace -Setting this sysctl to zero value makes +Setting this sysctl to zero makes .Nm return .Er ENOSYS always as if the syscall is not implemented by the kernel. .It Dv security.bsd.unprivileged_proc_debug -Setting this sysctl to zero disallows use of +Setting this sysctl to zero disallows the use of .Fn ptrace by unprivileged processes. .It Dv security.bsd.see_other_uids -Setting this sysctl to zero value disallows +Setting this sysctl to zero prevents .Fn ptrace -requests from targeting processes with the real user identifier different -from the real user identifier of the caller. -The requests return -.Er ESRCH -if policy is not met. +requests from targeting processes with a real user identifier different +from the caller's. +These requests will fail with error +.Er ESRCH . .It Dv security.bsd.see_other_gids -Setting this sysctl to zero value disallows +Setting this sysctl to zero disallows .Fn ptrace -requests from process belonging to a group that is not also one of -the group of the target process. -The requests return -.Er ESRCH -if policy is not met. +requests from processes that have no groups in common with the target process, +considering their sets of real and supplementary groups. +These requests will fail with error +.Er ESRCH . +.It Dv security.bsd.see_jail_proc +Setting this sysctl to zero disallows +.Fn ptrace +requests from processes belonging to a different jail than that of the target +process, even if the requesting process' jail is an ancestor of the target +process'. +These requests will fail with error +.Er ESRCH . .It Dv securelevel and init The .Xr init 1 From nobody Thu Sep 28 15:10:59 2023 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 4RxH434L33z4ttn2; Thu, 28 Sep 2023 15:10:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxH433vfpz3Z8f; Thu, 28 Sep 2023 15:10:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TiVQAO2N/dHmk85oa4A+uVcWDzfgDr/gsamY7W2olLg=; b=UuoGW6hW5Coss7uWVuIWGOVLD57kvpjjTUY0i/8FVa1oaczGxtjOiCNQpHEIQk22O29xHr 7F+9XZzTkvxwPl07lc0ZxC7W04mLYSzgPqcWxA0ojm5YOaYVE97n1dupgsw1a48cYV0Jel KYO25/SLyQ2pYeEfMMKHqFvHxOS8FgyJFQlsYKt6f2xxssa4LDwJcrWF3jh3t7OtgnLS1S O/lV7dbO3BlmI4TIYYKuMuUl9iBrqa9SDwpO/jqLFiHemIQ7V9jAdvNji94oxILvW5jbis fMIpRR80dk+2MmYaPoicik06JG4GHHlqRy0hoNazuzZKfAy2V74IXuUQ6xiCMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695913859; a=rsa-sha256; cv=none; b=ZPEZfYVtXc3CCR5zx37uxEpAuyH4ogIMge0YnJJXUpYqamBV3Suo6SkBATXiFZJ1d/OSHA 88DqXkskT7W11RDU6jl/lTR290otSmMzP1Jx5qdDSMnNFhltozN0pPdqAqUvNaMapJ/UNy J1auW+JL7IvQmzYyKhtn2HXdjaiqUicT27OqZL3XSK9OG1LhUFMOxI+8dyCW53/GKIqusL ij40Bz/2MH6bnIPyVTIMm98kCocwiWi/VdSOcXh7PNpbGWShuZ0VVnL/wTgwy859ynNey2 LL5oFrvcp6fO8T+J4ak5qOBleN7KaM+r0yZtUkChMPoJcnrRhYeW8tTEOHrCUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695913859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TiVQAO2N/dHmk85oa4A+uVcWDzfgDr/gsamY7W2olLg=; b=sJYxLjsJ2XeEm/d2joWQ52hyGzVBeCo+MUE1aGnwiNE1Kb6YmSEOnlXEQCwpQeDo96wM7d rDXzhKAizfxiRp3s0yiLArYbbbnxyQjnJtThdfeILFz2FxcDrW23QxYROv6iAU0bOuZ1bA Ikfqf1oHq0sfLXBV3WdXgJoPwDuF7f2+XvP0gaIZccD0a1lRr8uA7i7xrQe64euvdXEJ4L ByCcLbVPOHsynARyAX2lh46p1ZVdnLwjEpAaGIAx5A0wgqMVVz1i4lNFKJsYzsZ4u54Blz HpG1WkEKL9hcRKBLtAdol+Ol3/NAJzFcsGUq+0FlqR6suJoosXTL0gYD9er8ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxH432npNzC0k; Thu, 28 Sep 2023 15:10:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFAxMh048193; Thu, 28 Sep 2023 15:10:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFAxHI048190; Thu, 28 Sep 2023 15:10:59 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:10:59 GMT Message-Id: <202309281510.38SFAxHI048190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 8d7a48d367ff - main - sysctl(8): Mention more security.bsd knobs; Refer to security(7) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d7a48d367ffde2a29419ef943c4099984e3af4d Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8d7a48d367ffde2a29419ef943c4099984e3af4d commit 8d7a48d367ffde2a29419ef943c4099984e3af4d Author: Olivier Certner AuthorDate: 2023-08-17 23:54:49 +0000 Commit: Mitchell Horne CommitDate: 2023-09-28 15:05:47 +0000 sysctl(8): Mention more security.bsd knobs; Refer to security(7) Reviewed by: mhorne, pauamma_gundo.com, emaste MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D41113 --- sbin/sysctl/sysctl.8 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 3e995e40131b..ed768510eb6c 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -27,7 +27,7 @@ .\" .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" -.Dd December 24, 2022 +.Dd August 18, 2023 .Dt SYSCTL 8 .Os .Sh NAME @@ -194,7 +194,9 @@ for more information on which tunables are available and how to set them. .Pp The string and integer information is summarized below. For a detailed description of these variables see -.Xr sysctl 3 . +.Xr sysctl 3 +and +.Xr security 7 . .Pp The changeable column indicates whether a process with appropriate privilege can change the value. @@ -231,6 +233,8 @@ String and integer values can be set using .It "kern.logsigexit integer yes" .It "security.bsd.suser_enabled integer yes" .It "security.bsd.see_other_uids integer yes" +.It "security.bsd.see_other_gids integer yes" +.It "security.bsd.see_jail_proc integer yes" .It "security.bsd.unprivileged_proc_debug integer yes" .It "security.bsd.unprivileged_read_msgbuf integer yes" .It "vm.loadavg struct no" @@ -320,6 +324,7 @@ option has been deprecated and is silently ignored. .Xr sysctl 3 , .Xr loader.conf 5 , .Xr sysctl.conf 5 , +.Xr security 7, .Xr loader 8 .Sh HISTORY A From nobody Thu Sep 28 15:27:52 2023 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 4RxHRb47B5z4twWK; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHRb3cGKz4GbV; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695914875; 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=U3Q87xzEMRnnEx6CuYhStx8qLLCWsPy/u6TGYQp1sR8=; b=t/F6sNucg0U1Dk4pp8b2OULdoxRF8EQwmLoU0LmIil05XAzBRZ6sF0Pbl3wVj+F203f85c NrikOtppNS9oBJrvewpfmZsMBE/7BdmR3eBwPqVbqOeN3SEMS1DXAOxiWzDCO5ZNJisYWI ooO8hi7V6I35mBMPzX26V7M0ZX8LnGbdnZF7OvdOACf7bnP1Plw55W8wtuhbLBC88GoqKh jXhP0BYhcpwNuaNP7GFDcnXqoo7gLBp6VEQt9bn+090K4IY88tyimnwqba+1a2ZKxquh3W D3nacAwkJzMZbeNVIg/h0V0zGRjFwbh2JiSeaiFys8y92f/0zt0Ogmo0cqyluA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695914875; a=rsa-sha256; cv=none; b=G4n1eZQd7+M+ojVvB3jFf2ZUZZBX5P05FtJY0I8n6SKJc8VCqLIyvka1Szr1IRZwX/Mabg EeELKzNBe5y8wzJAATApQF4tY0kJDTGowDkGUmnlkul+x+OwtJGve9gCwXTJO5J4j2w249 oIFuiuUUVY9f3ej/MogeH86lsZQjt1SY+jonZqxajTuu3uA8Ol9vaZtIQbx0E+V2/lBjd1 fciCS3Uvig7KycnwiIQwi66vI0UKliCMJwYlyrKf8bbLiUZfa8MmUkQsaBo62DLqY7EpRD VD4eP2xL+tlcedSzP8rHrbqLeliIL0NaaEHXNqa6As/6qsbiKE8woJIT/ZQg0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695914875; 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=U3Q87xzEMRnnEx6CuYhStx8qLLCWsPy/u6TGYQp1sR8=; b=mFvrx8Thi5+b34i9SoIoUGO0XU0mxUtgEgENwTKGJYZjxW1BKauGdeQAYO+mibIWFdk8F4 b1v2F705hiSUSszP+Q0HAUJ4jEjrleFc5fdid9ob10fOXoz4rruNyf4elQQvC94PXvntWV elXvN+tzcdNMVCGZdygFOxTA/7lyPzNObXRYLiRTWYyNtbefF+o0R31eKeMe7BDlzo7APB +44VO8Ay1fnc8zH7M6Dp9rMStd/hW1Feb7mM0K7H5/WSwbg3z4XuhWxybZE52fcEAKx5gt Nc//Ngiv5JR0gDAlMWSd3fnkaoOPv1OTDB1YfvY2WYxGD/X7XV1fDwHx+XRfTA== Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::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 4RxHRb1wZdz9JP; Thu, 28 Sep 2023 15:27:55 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 1663C16F94; Thu, 28 Sep 2023 17:27:52 +0200 (CEST) Date: Thu, 28 Sep 2023 17:27:52 +0200 From: Baptiste Daroussin To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: References: <202309271400.38RE0s2R037013@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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Sep 28, 2023 at 10:58:20AM -0400, Mark Johnston wrote: > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > > Author: Baptiste Daroussin > > AuthorDate: 2023-09-13 07:43:33 +0000 > > Commit: Baptiste Daroussin > > CommitDate: 2023-09-27 14:00:00 +0000 > > > > flua: add fbsd module > > > > This module is bundled into flua, it only provides for now the exec > > function. The point of the function is to be able to execute a program > > without actually executing a shell. > > > > to use it: > > fbsd.exec({"id", "bapt"}) > > Hi Baptiste, > > How is this different from posix.unistd.exec in the luaposix module? > Wouldn't it be better to add this to the existing posix.unistd namespace > in lposix.c? exec does not seem FreeBSD-specific. This is more like os.execure without the invocation of /bin/sh! > > I have a related question: this week I wrote some FreeBSD-specific lua > modules wrapping some system calls like sysctl(2) and cap_enter(2). How > do we want to organize the flua namespace for such things? Should we > have a freebsd.sys namespace for system call wrappers? I would then put > bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we > could have freebsd.lib.procstat, for example. I am fine with a module named freebsd.lib.* I plan to add kenv, rcctl, procctl so, (I scratched sysctl and cap_enter has you have them ;) ) Bapt From nobody Thu Sep 28 15:41:23 2023 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 4RxHlD42Hcz4tx9n; Thu, 28 Sep 2023 15:41:28 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHlD10kbz4HPk; Thu, 28 Sep 2023 15:41:28 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-418201cb9e9so43319641cf.0; Thu, 28 Sep 2023 08:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695915686; x=1696520486; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=5NJu7QAEHXpBxHR4KmywSCXWI6vI2Yvzw2k9/SuFdDs=; b=b4n8iELel/nPaLoWdTLPAIUXzf4LxyAybygJZizW0AUsuDHcfbWM5hEYEpdZFSJjCr d02HFA2qru6ovqN7TgthNbIWft8LNTAz/Hs5jRf03UpZ0CuEakGgYxCfZSnEbt/UmQVo a1boJ0p6mxMQlzN5AX6KsqNUrmZNE5EkRhNedqxBWY3TptlWMPJfVGQzX6e1I3T3ankd OF93RJwaJ0JCteEizphOPRpsthvT40SaH7mtHul/5jBg+fQsjApqp+att8V9FB48aRID nWPWuVF26eJfO8nyrl2zs4+B1typhfEyGwNiwjxP+K7+TMJCTh6lxSkAODRunN0X7pwu OEOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695915686; x=1696520486; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5NJu7QAEHXpBxHR4KmywSCXWI6vI2Yvzw2k9/SuFdDs=; b=vulO/P8tWxqYXN0/LKTx4vi78Sjlfo3Qvn3nM/ud/eoNCmrGSObkCUFqShfJZ0ASL8 lMkex5uBMV0MQ/6/T/6Bx5QY74G3grtq6+bdGf6AH1auJqvcmMQDK7bvuIqCfjF8doqv XY/R+yQ6xzkluCYY2pPUKJrEXUrmYKaB22MWr3kUK7BPcfejv0I5OxFYTkT7Y3BxtPli Fgwk6hOXx8kAHty30kHnHPKd5Nm7zsEKhqgQt6p9tw0xqpB/d9mQlHgl+vEubO0CNXX9 B66sAYdahon9Hoe9EZm7Fne9WnY82t2yymCRv5Q6esGuxKmIrT2PmAbJJGBJB1QKabe0 MZjA== X-Gm-Message-State: AOJu0YwZvtqwywGg47yLfOu5nDRvkpYY2YUT73qc37IzL3XCtHiWb0TD eNT104Mjh+BgizhWvuwc7Kfhwv6ayj4= X-Google-Smtp-Source: AGHT+IE94gPM0kuP86UxPiPzYPYAE0XffdVyBtW/76Q39dVwprtUxcw7WZYogYLnqC9Y6VTJpfLK7g== X-Received: by 2002:a05:622a:1109:b0:417:a514:72cd with SMTP id e9-20020a05622a110900b00417a51472cdmr1922705qty.19.1695915686496; Thu, 28 Sep 2023 08:41:26 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id y17-20020ac87091000000b00419732075b4sm274775qto.84.2023.09.28.08.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 08:41:25 -0700 (PDT) Date: Thu, 28 Sep 2023 11:41:23 -0400 From: Mark Johnston To: Baptiste Daroussin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: References: <202309271400.38RE0s2R037013@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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4RxHlD10kbz4HPk On Thu, Sep 28, 2023 at 05:27:52PM +0200, Baptiste Daroussin wrote: > On Thu, Sep 28, 2023 at 10:58:20AM -0400, Mark Johnston wrote: > > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > > > The branch main has been updated by bapt: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > Author: Baptiste Daroussin > > > AuthorDate: 2023-09-13 07:43:33 +0000 > > > Commit: Baptiste Daroussin > > > CommitDate: 2023-09-27 14:00:00 +0000 > > > > > > flua: add fbsd module > > > > > > This module is bundled into flua, it only provides for now the exec > > > function. The point of the function is to be able to execute a program > > > without actually executing a shell. > > > > > > to use it: > > > fbsd.exec({"id", "bapt"}) > > > > Hi Baptiste, > > > > How is this different from posix.unistd.exec in the luaposix module? > > Wouldn't it be better to add this to the existing posix.unistd namespace > > in lposix.c? exec does not seem FreeBSD-specific. > > This is more like os.execure without the invocation of /bin/sh! Right, different from os.execute, but almost identical to posix.unistd.exec: https://luaposix.github.io/luaposix/modules/posix.unistd.html#exec We have a subset of luaposix already, in libexec/flua/modules/lposix.c. So my question is, how about we extend that to provide "exec"? "exec" is not FreeBSD-specific at all. I am happy to write the patch. > > I have a related question: this week I wrote some FreeBSD-specific lua > > modules wrapping some system calls like sysctl(2) and cap_enter(2). How > > do we want to organize the flua namespace for such things? Should we > > have a freebsd.sys namespace for system call wrappers? I would then put > > bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we > > could have freebsd.lib.procstat, for example. > > > I am fine with a module named freebsd.lib.* I plan to add kenv, rcctl, > procctl so, (I scratched sysctl and cap_enter has you have them ;) ) So my proposal is, raw system call wrappers should live under freebsd.sys.*; some higher-level interfaces can be built on top, hopefully written in lua as much as possible. Also, if we start adding more FreeBSD modules, I suspect it will be useful to maintain these modules of the tree. I have some plain lua (not flua) programs for which I wrote FreeBSD modules, and they could be useful to others. It'd also be useful to target multiple lua versions, at least 5.1 as well so that luajit can be used. But that's a topic for later. From nobody Thu Sep 28 15:45:14 2023 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 4RxHqd2dqWz4txWF; Thu, 28 Sep 2023 15:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHqd22ftz4Hrh; Thu, 28 Sep 2023 15:45:17 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695915917; 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=aGp/2b/OKuMAWV+FUyUGCRyJeosvKHmDkkOEfmQ/ghM=; b=PFcuBybS4D6DoHAj0FgBZHukpyd0OkDUilBjL5mPJP+/+7yQl5MFAzuqfy2cFXn4M5mzQL +aWdUpkNQTnelB7HqcH3s4vlk6ku25OV6nV382eaZhEmcq/wAOkvkZZU3mDkDbVAn4L+ym Q73Xf2egYyEnj8OPVJakf0fOWWcV2J71zHKh0T5SpKV0zgFZlGpZnuB0DNKhnPG7ED8IDi mtm2SM9G6pLHsuyXt48QQVa+N/VKbVY4GX0GPCUeUxxOYkWBxJtshQSa4UF4rjMEXzaNPA fUTSA4OGYuIIA5EyJLRTWzKdKRw4nUfu365AmOPlZuMWQzl9+3ozjzwzddYV6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695915917; a=rsa-sha256; cv=none; b=gjKJ+EwMD/5DUTUYQ6lWQp1Z0GQ74RRRF5LKguSr7IuQm0czx6o6IGkL1BG4GH9k0JcQDZ YY71URxS6D12ciJLgJxLDbf7wpc3GkXAEo4U+x5g47RVNjAMN5JI+EDudwGrwZ6TFerox6 82JzRkF1lT8rzZsQvjBbZ7OG/XOCcjrQnFF08s4TAtCFEokmlup04TO1NI0OtzIb2iDGbO HGjVLw5nK37w1GuvYgt8jA7nfvB8qBczlCWT56wLE4h7wjYWB0N2xbHDiTDTeSMU85vJfs OCAa/4PP0Oum62LYsoMOEX8u/3Ed3jCp53yVjfXrs3DZNKRWo6PphvEjpdv3xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695915917; 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=aGp/2b/OKuMAWV+FUyUGCRyJeosvKHmDkkOEfmQ/ghM=; b=fr5pO+MKUhA4q8978cH4o0WyOP82AuxzYZrKS58jD0vGqhZqLg3tNRRkLeMLpEPe6aD0ee Etisj5dgKFwcoZxuerWJ/If4bWIqMSNw3XY97b7V+NI3A2NQqWGFLM/PjnuAEvkYs49u9L +a3scJxukiAzv7tSL/IX+S+MSVQWyeAwrI4+Vp7hmE/jtp09qmDGge9eHRxLFzsTcEAtfg kmcjTqbNDAY3iqVccnhYwKml+bmSin08vjHspJr6ley6WnMNVqCTXo1yn6Dc7kzJ0PD3wD sXuXjKkwplDz611abB7hqfffgnzKBN2UQ9f4JEikd4IG+OpGB67M/oDj9JwS2g== Received: from [10.9.4.95] (unknown [209.182.120.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) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RxHqc4yQYzB9J; Thu, 28 Sep 2023 15:45:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Thu, 28 Sep 2023 10:45:14 -0500 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Content-Language: en-US To: Mark Johnston , Baptiste Daroussin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202309271400.38RE0s2R037013@gitrepo.freebsd.org> From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/28/23 09:58, Mark Johnston wrote: > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: >> The branch main has been updated by bapt: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c >> >> commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c >> Author: Baptiste Daroussin >> AuthorDate: 2023-09-13 07:43:33 +0000 >> Commit: Baptiste Daroussin >> CommitDate: 2023-09-27 14:00:00 +0000 >> >> flua: add fbsd module >> >> This module is bundled into flua, it only provides for now the exec >> function. The point of the function is to be able to execute a program >> without actually executing a shell. >> >> to use it: >> fbsd.exec({"id", "bapt"}) > > Hi Baptiste, > > How is this different from posix.unistd.exec in the luaposix module? > Wouldn't it be better to add this to the existing posix.unistd namespace > in lposix.c? exec does not seem FreeBSD-specific. > fwiw, posix.unistd is expected to match some subset of the actual lposix module: https://github.com/luaposix/luaposix -- we could add something there, but I'd prefer to see it go upstream first before we adopt it, in general, if it's one of these subsets-of-a-module that we implement. Thanks, Kyle Evans From nobody Thu Sep 28 15:52:20 2023 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 4RxHzm38sDz4ty9B; Thu, 28 Sep 2023 15:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzm2khbz4JsX; Thu, 28 Sep 2023 15:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=me8xWwILW21I9F0T/QRmVre8Ri0mT0eBNAZ5Dw2CdaQ=; b=fhgj0wHxpxyHdbeJdyStrIRp3kKcJiXtoKJK7vXmux9QsBECmJB80onIxBJxLT/xepSfNA CnukhTVke5IsW6BYi6/A9IO+MsgVu9cxAzyfcDKKd6XMVLlgdfdWm3OAcnQ+odm6QKJt8c QEZD4pJr8kRAmm1s7JnXHnw+Q/GhM5FSvpgdaLp+5AwfJm+TgnLPU8TMWajzCKNyUarXfL hpsXCZdcNBZlNpZo94kf4OyExfJE9/IPIafiqkeG/wG9qhZWRLZEzsIR/98T+Yam9tzgH9 IPGlV2z+u4a6VxaIkalxV4XKwi2RHL5SId5Kat1/razxQYV8q48nGOQPGng/rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916340; a=rsa-sha256; cv=none; b=SaHHryBHovHR4aBPCbUeQTgH0XNq5RMQQ9uiNHaNSl88O4GtqehRDGCcf1It0XGMcDJKtR P0TWb4SS89XI4sLQxFU00fY875MRWTaoi3YPsKkYTPD2UrN5ojXumxn62afbfRI5s2R+c9 dUsXKH8m1M31lZhAaM78AMtcE1RMajWyam/8bNh3zFxIjWSMH13gBNMONW6iQOXNqpRHDS y5J9L0EaRYxJ3X9p6Kbk6aoDRyLD0nhGxHY1ElVEk+fsmdCXFenR1oDM0nOspZAiE8Oijk +X3KXPfYxytFWqInj51jjmr8s2BssM2TZi710UUb9k+DH8vImrQKZvx16y8lzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=me8xWwILW21I9F0T/QRmVre8Ri0mT0eBNAZ5Dw2CdaQ=; b=pxBDMpNbL67ajmtl/vZE3KfrTLb0fv8yUQtEfxPo2VvEFWpVhLFcU3CnSdr/sr/9XKXN8g InU7a/P/PQNXsKSQsnmS31oh/E6VvDhi0ET5Phidegdfek7wpz4KhpMkELCrlYeSvgGxkb 4IZqB9s5cemXU2gQvOJGzy/W5607wQ0sawfQ8Lc0rUk/YL4pjBw42L2K5jFVj/fHfn625B pCFDWFaBnyS9laJUn/sLKjoKxHsfvzkOj2x/z8Y9+DJHcc+eZQHDw+i73fys0Pt6YDqUAQ /i3+kqMqXNPvKasIqlYnw3ZTcxI2oUZHcpkJMznjf8opoo9lY7mKnuu/SfOXvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzm1nj8zCqQ; Thu, 28 Sep 2023 15:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqKI1021422; Thu, 28 Sep 2023 15:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqKI9021419; Thu, 28 Sep 2023 15:52:20 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:20 GMT Message-Id: <202309281552.38SFqKI9021419@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: 518bd54167a8 - main - syslogd: Fix fd type, add enum for filed types 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 518bd54167a8990d1233f216d9ecd0db68f7bf81 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=518bd54167a8990d1233f216d9ecd0db68f7bf81 commit 518bd54167a8990d1233f216d9ecd0db68f7bf81 Author: Mark Johnston AuthorDate: 2023-09-01 02:48:18 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Fix fd type, add enum for filed types Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41357 --- usr.sbin/syslogd/syslogd.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index de3d7c106f8a..701b062802b0 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -247,6 +247,17 @@ struct prop_filter { size_t pflt_strlen; }; +enum f_type { + F_UNUSED, /* unused entry */ + F_FILE, /* regular file */ + F_TTY, /* terminal */ + F_CONSOLE, /* console terminal */ + F_FORW, /* remote machine */ + F_USERS, /* list of users */ + F_WALL, /* everyone logged on */ + F_PIPE, /* pipe to program */ +}; + /* * This structure represents the files that will have log * copies printed. @@ -256,8 +267,8 @@ struct prop_filter { struct filed { STAILQ_ENTRY(filed) next; /* next in linked list */ - short f_type; /* entry type, see below */ - short f_file; /* file descriptor */ + enum f_type f_type; + int f_file; /* file descriptor */ time_t f_time; /* time this was last written */ char *f_host; /* host from which to recd. */ u_char f_pmask[LOG_NFACILITIES+1]; /* priority mask */ @@ -351,16 +362,6 @@ static int repeatinterval[] = { 30, 120, 600 }; /* # of secs before flush */ (f)->f_repeatcount = MAXREPEAT; \ } while (0) -/* values for f_type */ -#define F_UNUSED 0 /* unused entry */ -#define F_FILE 1 /* regular file */ -#define F_TTY 2 /* terminal */ -#define F_CONSOLE 3 /* console terminal */ -#define F_FORW 4 /* remote machine */ -#define F_USERS 5 /* list of users */ -#define F_WALL 6 /* everyone logged on */ -#define F_PIPE 7 /* pipe to program */ - static const char *TypeNames[] = { "UNUSED", "FILE", "TTY", "CONSOLE", "FORW", "USERS", "WALL", "PIPE" @@ -472,7 +473,6 @@ close_filed(struct filed *f) f->fu_forw_addr = NULL; } /* FALLTHROUGH */ - case F_FILE: case F_TTY: case F_CONSOLE: @@ -481,6 +481,8 @@ close_filed(struct filed *f) case F_PIPE: f->fu_pipe_pid = 0; break; + default: + break; } (void)close(f->f_file); f->f_file = -1; @@ -1978,6 +1980,8 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) iovlist_append(il, "\r\n"); wallmsg(f, il->iov, il->iovcnt); break; + default: + break; } } @@ -2616,6 +2620,8 @@ init(int signo) deadq_enter(f->fu_pipe_pid, f->fu_pipe_pname); close_filed(f); break; + default: + break; } } while(!STAILQ_EMPTY(&fhead)) { @@ -2713,6 +2719,8 @@ init(int signo) for (i = 0; i < MAXUNAMES && *f->fu_uname[i]; i++) printf("%s, ", f->fu_uname[i]); break; + default: + break; } if (f->f_program) printf(" (%s)", f->f_program); From nobody Thu Sep 28 15:52:21 2023 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 4RxHzn4vQJz4tyLY; Thu, 28 Sep 2023 15:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzn4KYkz4K8P; Thu, 28 Sep 2023 15:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzSD69flA1nyZjmyKjLQDWIVTnFY6cD7BkdVSJsBPy8=; b=cdCQtVGQ3w3dzP/WPrPrzfOeWTnffq0Kqi5knGyjkYv9H+3KKR93Av1aXH9bnHh3h1h07u A3NwnvO3KYevM2fZln5/4P7CZgZttV7NAF8kTl2Z+TFahvdw+jVatKd9r7JSlMC6hnaFN0 GL0SvBzf4diDryEf7R0RawW9qba3eTi0G++KoNmgQ64MhClbUy1txCEYDjkFljV0V5jbtx nLahAnFHWczvNCVzu1S8ZkKb4S54tmgMXvSOqWijsdLS/nSFBWmn7AQZtuQ3FjlJ8tPqJm XDKBJXiTQq5OAF6bMllpb0WcJ7IJQblsdB18pjDEcu//yylw8VmB/thchGHYiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916341; a=rsa-sha256; cv=none; b=yFDJeq3/3y4rIIWVNfWPEFmwPkpjGNTn5tN31NAmIN9/Kyw+H6ZKouBAmzx8+3m8z1bVPQ OY2rDZjRy5lv1LmerjLINOsTINrXwoe3dsWyfnFEOUEWFwDbEv3YI80bQrEIYga1ANIrIp xmnutLFrg8YUR4x3rDUp1WzM0mbeXyCOEAKn+Z6bs+Z6xi0Er8h0+PqLFfjP0z2ppJDjhB gz+yg/0ljRGxleTj8+G8wJMBQAQU2Au2oL26gq2Di9bpgrT+J/zPnWZSN4Kjt+NmY9M3bU FaFDlaRfkbYbVpnEA8Jh+rCEEPw4ceIfx0FXWHEf0aAt8oevNeOnFbtGaaS3Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzSD69flA1nyZjmyKjLQDWIVTnFY6cD7BkdVSJsBPy8=; b=NtONC6xsi0DhejMB4NcL8L15OpOjTGy0l6G/AuBE4fVZilbaEKXcbIrZnX6WNRxIBc+ys3 pxreVrO7n8jIyJARVOseMfX8EED4CD0jS4Vn948+iHCf88G1uH3SgIyJlJx3dcHEFPBhYO q/gHEPYGfGdCTUwndm39RgUU8PRokUYogvNsvhzc0ckcn06jJkmSgtbTFjcV+N874t56Lt v2WHlWmymtWMuNuHMlYjZE+5QSDLXzrVX56qeY1ZJsARH1YPDxtEqkC/UitSqRXlqxA2NF vCswdMF3ZJtTvy9EufbMg9y0sBiCtFP6t1QFQZP1eL+0xrlQWsgBTyL8+kThww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzn2pw9zDHy; Thu, 28 Sep 2023 15:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqLrJ021472; Thu, 28 Sep 2023 15:52:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqLca021469; Thu, 28 Sep 2023 15:52:21 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:21 GMT Message-Id: <202309281552.38SFqLca021469@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: 931d05fc088b - main - syslogd: Read configuration outside of init loop 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 931d05fc088bb83a9d0b1aacbf09590b22422351 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=931d05fc088bb83a9d0b1aacbf09590b22422351 commit 931d05fc088bb83a9d0b1aacbf09590b22422351 Author: Jake Freeland AuthorDate: 2023-09-01 02:48:53 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Read configuration outside of init loop Move all configuration-file code outside of the initialization loop and into its own set of functions. Create a readconfigfile() to open the config and call parseconfigfile() to parse it. The init() function no longer returns if there was a failure to open the configuration file. Initialization will be finished, using the backup logging rules: *.ERR to /dev/console and *.PANIC to all logged in users. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41358 --- usr.sbin/syslogd/syslogd.c | 49 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 701b062802b0..bf00f4ae4cef 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2403,7 +2403,7 @@ configfiles(const struct dirent *dp) } static void -readconfigfile(FILE *cf, int allow_includes) +parseconfigfile(FILE *cf, bool allow_includes) { FILE *cf2; struct filed *f; @@ -2464,7 +2464,7 @@ readconfigfile(FILE *cf, int allow_includes) if (cf2 == NULL) continue; dprintf("reading %s\n", file); - readconfigfile(cf2, 0); + parseconfigfile(cf2, false); fclose(cf2); } free(ent); @@ -2540,6 +2540,28 @@ readconfigfile(FILE *cf, int allow_includes) } } +static void +readconfigfile(const char *path) +{ + FILE *cf; + struct filed *f; + + if ((cf = fopen(path, "r")) != NULL) { + parseconfigfile(cf, true); + (void)fclose(cf); + } else { + dprintf("cannot open %s\n", ConfFile); + f = cfline("*.ERR\t/dev/console", "*", "*", "*"); + if (f != NULL) + addfile(f); + free(f); + f = cfline("*.PANIC\t*", "*", "*", "*"); + if (f != NULL) + addfile(f); + free(f); + } +} + static void sighandler(int signo) { @@ -2555,7 +2577,6 @@ static void init(int signo) { int i; - FILE *cf; struct filed *f; char *p; char oldLocalHostName[MAXHOSTNAMELEN]; @@ -2646,27 +2667,7 @@ init(int signo) free(f); } - /* open the configuration file */ - if ((cf = fopen(ConfFile, "r")) == NULL) { - dprintf("cannot open %s\n", ConfFile); - f = cfline("*.ERR\t/dev/console", "*", "*", "*"); - if (f != NULL) - addfile(f); - free(f); - f = cfline("*.PANIC\t*", "*", "*", "*"); - if (f != NULL) - addfile(f); - free(f); - Initialized = 1; - - return; - } - - readconfigfile(cf, 1); - - /* close the configuration file */ - (void)fclose(cf); - + readconfigfile(ConfFile); Initialized = 1; if (Debug) { From nobody Thu Sep 28 15:52:22 2023 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 4RxHzq3P97z4ty9G; Thu, 28 Sep 2023 15:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzp59zYz4KFV; Thu, 28 Sep 2023 15:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WP/DpYXbVXI10LpROMWKh5oNCAluHtQtueo+1u9LW90=; b=q2tTpbGCqmyHi4E9S1IVBDP1Xiz+aT8HgbCSC67+KPF4iyUjV9eT8DUAL/k8g/GxYY6lFB 4hXVXu0hBZLXy1m4FpkR9jTcR872iZrOnf0Z617qedz93xSDYoU982x6Bh9fccHygQgnj8 BgtaZbtm7ruf1NtscqoF4PS0jmuQy4C3v4ZsV6ZY78TYqDPPsXCmM8fLlq8gjYzvztNWcK ZRGdvtV989GVDjnZKdrzQYSMJWbeogfupvfUsS91x7TGxX5dhOtMHb/Gs+3InNTR0sw+7n X4r9LParF1xTGsJEpbqY/p1uR50L/P7EOC9vSI370guL4YiIR0jS6HkmYZPZDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916342; a=rsa-sha256; cv=none; b=qctr7+OOQ8lEFikfJvqapafwQzO9s74Jo7ESB1E3nG4a8nTRbjBPrq3Nmkvo0w7GOrQ7OG ZzFAatPBMmX9S90HdH6PtTLz1dW3K5+lOt2TdhG/YQf2TW4nxspiKMIU8T201VQhMDRdGj c64LkQdd3/VwbdVe0xraHkTAMNnxglik48RbHGc+D/q6REnbKTbuSiIwe9PhZoS6crYqnZ X6dtIm85NqDXYeowYGVxkubyxJIBoiNGllP85sqJEla510guUu9prrN7zxlFQJlqQYJLql c7g8HJd8rwBhY2+mtHO0O5zGzxHSULLjM/hPOzYgQ33eWNPB6fptAwJWwRPe+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WP/DpYXbVXI10LpROMWKh5oNCAluHtQtueo+1u9LW90=; b=nZPTbk9bgRYJYfw5Fa+Xgytj9/693XQ1HJmTAF2XqGxDOkm3sQeBaudOya4HANq9yYTIOX ZlrbHx/d2HWYp/l+scRijlApsOBK2nu/02NXB5wamsb1vQIVw+3aI2DrxwXgr1rdfdJ80w k+JVAZ8+hdrbmt8bU4GgqVJbMgEHLWgHxPKIDZkbm38dUSvBiABj9Ny4st1IfHoWoBj9AH hi1BpzGnKoGk1jfH8b8zBD9Bi3sAkbYkzsPr740wN/ebl4+8Ol6HvmW7gSjMeO22wr7iHm wgsKYpvVPb95FHH9XohsaPjW2FI2aStL924R7GjeIIEcfKMvB9tdmio1k1bUdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzp3wt6zD65; Thu, 28 Sep 2023 15:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqMah021523; Thu, 28 Sep 2023 15:52:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqMf8021520; Thu, 28 Sep 2023 15:52:22 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:22 GMT Message-Id: <202309281552.38SFqMf8021520@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: 2d69e4c37332 - main - syslogd: Remove addfile() and free up some memory 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 2d69e4c37332c396582ac93ead289d5212ce5c23 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2d69e4c37332c396582ac93ead289d5212ce5c23 commit 2d69e4c37332c396582ac93ead289d5212ce5c23 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:00 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Remove addfile() and free up some memory cfline() already allocates a filed structure on the heap, so we can avoid redundant memory allocations by skipping a second calloc() inside addfile(). addfile() can be removed altogether since a simple STAILQ_INSERT_TAIL() will add the filed to the global filed list. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41359 --- usr.sbin/syslogd/syslogd.c | 43 ++++++++----------------------------------- 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index bf00f4ae4cef..3e4dc25603b0 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -412,11 +412,9 @@ static volatile sig_atomic_t MarkSet, WantDie, WantInitialize, WantReapchild; struct iovlist; static int allowaddr(char *); -static int addfile(struct filed *); static int addpeer(struct peer *); static int addsock(struct addrinfo *, struct socklist *); -static struct filed *cfline(const char *, const char *, const char *, - const char *); +static void cfline(const char *, const char *, const char *, const char *); static const char *cvthname(struct sockaddr *); static void deadq_enter(pid_t, const char *); static int deadq_remove(struct deadq_entry *); @@ -488,20 +486,6 @@ close_filed(struct filed *f) f->f_file = -1; } -static int -addfile(struct filed *f0) -{ - struct filed *f; - - f = calloc(1, sizeof(*f)); - if (f == NULL) - err(1, "malloc failed"); - *f = *f0; - STAILQ_INSERT_TAIL(&fhead, f, next); - - return (0); -} - static int addpeer(struct peer *pe0) { @@ -2406,7 +2390,6 @@ static void parseconfigfile(FILE *cf, bool allow_includes) { FILE *cf2; - struct filed *f; struct dirent **ent; char cline[LINE_MAX]; char host[MAXHOSTNAMELEN]; @@ -2533,10 +2516,7 @@ parseconfigfile(FILE *cf, bool allow_includes) } for (i = strlen(cline) - 1; i >= 0 && isspace(cline[i]); i--) cline[i] = '\0'; - f = cfline(cline, prog, host, pfilter); - if (f != NULL) - addfile(f); - free(f); + cfline(cline, prog, host, pfilter); } } @@ -2544,21 +2524,14 @@ static void readconfigfile(const char *path) { FILE *cf; - struct filed *f; if ((cf = fopen(path, "r")) != NULL) { parseconfigfile(cf, true); (void)fclose(cf); } else { dprintf("cannot open %s\n", ConfFile); - f = cfline("*.ERR\t/dev/console", "*", "*", "*"); - if (f != NULL) - addfile(f); - free(f); - f = cfline("*.PANIC\t*", "*", "*", "*"); - if (f != NULL) - addfile(f); - free(f); + cfline("*.ERR\t/dev/console", "*", "*", "*"); + cfline("*.PANIC\t*", "*", "*", "*"); } } @@ -2903,7 +2876,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* * Crack a configuration file line */ -static struct filed * +static void cfline(const char *line, const char *prog, const char *host, const char *pfilter) { @@ -3041,7 +3014,7 @@ cfline(const char *line, const char *prog, const char *host, "unknown priority name \"%s\"", buf); logerror(ebuf); free(f); - return (NULL); + return; } } if (!pri_cmp) @@ -3072,7 +3045,7 @@ cfline(const char *line, const char *prog, const char *host, buf); logerror(ebuf); free(f); - return (NULL); + return; } f->f_pmask[i >> 3] = pri; f->f_pcmp[i >> 3] = pri_cmp; @@ -3190,7 +3163,7 @@ cfline(const char *line, const char *prog, const char *host, f->f_type = F_USERS; break; } - return (f); + STAILQ_INSERT_TAIL(&fhead, f, next); } From nobody Thu Sep 28 15:52:23 2023 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 4RxHzr1SMHz4tyLk; Thu, 28 Sep 2023 15:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzq6f5gz4Jqm; Thu, 28 Sep 2023 15:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jw7KvOlx1VSa0coKcBybYAWZxx9XOl1OLK1ZosOgp8A=; b=kjxR+blxmVhdnD8NSjYcxUB65Rgv9hBr6ZnhMPF1u1TW0QjwBbolLgW2yG/p2Bp5DqyjWc Sd1wHObiLytXs4L/oTxadc4csfOV2VdTG84xLr7t4w8k1ABCa2HnlOcGwLOPg08Kf+xAni oZmxNuTD/yolVsaKc94esHTzxgRiGvyJOeYl2XFisndNGbL48KTyHrOgnbY1kCSMVvzPPT e94ZOKrA9CIiGAZsFxiapBAgw+pyPb0aq91JZpo1QAagSbf9ujcVbniS61207ptA/uIeaU NxgT9Tcldfks/bxzVn557ub/XqjR8Pwx7WXV1Xmc/XTW3vW5r5LC4qVoaqWKoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916343; a=rsa-sha256; cv=none; b=Z4IY7/pFMami49IlUE5j1qgAVUBxkO4GY+BXL119RJ3saRWnHPk87Hk2tJbrjt/A6oZsXS /aarbAwgcLyt03HbV1GqKJE2zINEbfUWpwTHtSSiqYkAs55OEpPsx7jTAxdpaaXPhjxhb+ W0EJhCHXxFp8PetfrIMwUvhHKN3L1eaBhDl1uOhSAu+qvaykbiU0rFRDORCkEbjncgtImO ni3Yc/PtJzG3yod2VHBwMEx8ije6I9Rm2nOJBSHjPXU0ePJElYxBg+s6+gVv1+Ex8Ql0LW elQwagWqByy74wvFYS/NzuFZhYTJIXsbPRiistNC+kTmnz5lyhHxSTEowt7PwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jw7KvOlx1VSa0coKcBybYAWZxx9XOl1OLK1ZosOgp8A=; b=xzfqzlVPGCgc5L87ZvP17sHkSbzYdFLipHuXZjYtFCX+Y7MaoNXhhbJ7gVqB4gJQnR+L6v k0cWik64/pBZB4K1Yrg4F17ZsIWJCzUgBoOQ3kRpBXqCkJX9VoYrx5CFiwjuR8IHlNR6MU YtqVp0VIw54bL/nhsPEiWOXCiT0g3MecBaUrl5kLUD8eB2rmrnJpv2RLDo7JAJy+uRHEAG xHfelIJhSleMzxixIvLP+HMko0/DYc+UPJASPcYyEdlqljI4rHc9vYctl1yh10/fDJJxbQ oFbLW18jq+Y4sEhAamtKyZ+mhESS1tEADBy5vBE2M5z46MZdxS46/Voh4NpD9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzq5BSkzDJ2; Thu, 28 Sep 2023 15:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqNLc021571; Thu, 28 Sep 2023 15:52:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqNEI021568; Thu, 28 Sep 2023 15:52:23 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:23 GMT Message-Id: <202309281552.38SFqNEI021568@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: 8113e030f96f - main - syslogd: Move fhead under filed struct declaration 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 8113e030f96fb29a6ea03d55377cb97725c20576 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8113e030f96fb29a6ea03d55377cb97725c20576 commit 8113e030f96fb29a6ea03d55377cb97725c20576 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:07 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Move fhead under filed struct declaration Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41360 --- usr.sbin/syslogd/syslogd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 3e4dc25603b0..0f0a3cac1417 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -307,6 +307,10 @@ struct filed { #define FFLAG_SYNC 0x01 #define FFLAG_NEEDSYNC 0x02 }; +static STAILQ_HEAD(, filed) fhead = + STAILQ_HEAD_INITIALIZER(fhead); /* Log files that we write to */ +static struct filed consfile; /* Console */ + /* * Queue of about-to-be dead processes we should watch out for. @@ -367,10 +371,6 @@ static const char *TypeNames[] = { "FORW", "USERS", "WALL", "PIPE" }; -static STAILQ_HEAD(, filed) fhead = - STAILQ_HEAD_INITIALIZER(fhead); /* Log files that we write to */ -static struct filed consfile; /* Console */ - static int Debug; /* debug flag */ static int Foreground = 0; /* Run in foreground, instead of daemonizing */ static int resolve = 1; /* resolve hostname */ From nobody Thu Sep 28 15:52:24 2023 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 4RxHzs28Shz4tyJZ; Thu, 28 Sep 2023 15:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzs07mJz4K9D; Thu, 28 Sep 2023 15:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJqxrK3YWzrxT0MMww6hqfQcIRatvNUuJ7zZdzTnASI=; b=GEFCbD742Nr5Yty55+qZTE/TUj/i7NOcDgjgdotS9rbvQlC1dkuQsENimnKlfaRBo5tfpC 5L0dIi+bNR04LnLgHMPF6ddeYkNQDpO4rSVSLivJcibKy/5eUaIWC0SvJx/wMGsja6O5s9 ywbMWTjy7FxKEXBV6008G9naIrsZVzsOBssMUj942j+0cUlQoKNKDgX6GSuIH0fmL8I12Q bUWIj3CMkNIdiwOyldeZi15SyDGFT6n/zx7jZl5H6LKnHsOz7b3UGRq3W7YYUjGi8R8v+B ni+21kPfp3QeRdPCzqO+5imWDL2YgYmVCsyDK5UVFPbI7mCMKnmUmhaSavHCSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916345; a=rsa-sha256; cv=none; b=JChd1+MFeoRc3ZZv2iemOLT4GIYOkDeLsI6tGRx9jlAc/l3oj4NxG2Quv6ivq0zbE8a/Vl Z5ZN07Je9XEWVt+NTt3IC8Er9doLbXJE46Tb5LDolJstAn/SyCAsjXUDQ1rvVnG0iwwvl1 tJv0k3DQThkrVBrmsJiOGRGXP82Hj1s6HDApexrCIxYEo2fGRLzgupLD1vOt5mc53FOahs bhBfgaJ+ZTIQ9bADWq0cqB1OrIj8JPcI4R1fbjvwIpRgvuND+LyTXWyK/nX434Rpoj96Xs oROnBjPhtlLwWWZkuJ2A8p0yiS8rqVe7MoheFRbQwiySvdWMsR4qmemQHfz8pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJqxrK3YWzrxT0MMww6hqfQcIRatvNUuJ7zZdzTnASI=; b=T9x33+jaoWk7iYVdpcurQjgoaZjqwo0MufyIDVzRm3ns3lZ2SAG5W8PLLeBA9BqtQBo8Qu qgPZp9rg9qB0XJPRQWD0M4GZ3oucn68IimvjYFEXYJV8kQFS52uw22IGNZIeWUkviqjuJ2 N/rp9ZybV1txSg52UnoWj/U9s6WYTXMQTXSyL4WnrMX4ep872abefovdNEzigN0ngjmyjC CJpnNYI9QfgovrBZguSs+CIZhrlAXts0TW1Wh69trqfoBKcjnN+z4oPh2Vq8UpBfmjWNpe n1N0A7BeYvysN6M8jkWnPB/weLdPSU+xvZXQCBGENwW5sseRwDCSQ0hrGpA+/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzr5l52zCqR; Thu, 28 Sep 2023 15:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqOkT021626; Thu, 28 Sep 2023 15:52:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqOrt021623; Thu, 28 Sep 2023 15:52:24 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:24 GMT Message-Id: <202309281552.38SFqOrt021623@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: 3f8b49dd1af1 - main - syslogd: Replace int with bool, where applicable 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 3f8b49dd1af1cff852d57c44096b24091a2930f8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3f8b49dd1af1cff852d57c44096b24091a2930f8 commit 3f8b49dd1af1cff852d57c44096b24091a2930f8 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:14 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Replace int with bool, where applicable Many of syslogd's global configuration options are declared as integers but are treated as booleans. Declare those options as booleans instead. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41362 --- usr.sbin/syslogd/syslogd.c | 59 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 0f0a3cac1417..c8420298f117 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -371,15 +371,15 @@ static const char *TypeNames[] = { "FORW", "USERS", "WALL", "PIPE" }; -static int Debug; /* debug flag */ -static int Foreground = 0; /* Run in foreground, instead of daemonizing */ -static int resolve = 1; /* resolve hostname */ +static bool Debug; /* debug flag */ +static bool Foreground = false; /* Run in foreground, instead of daemonizing */ +static bool resolve = true; /* resolve hostname */ static char LocalHostName[MAXHOSTNAMELEN]; /* our hostname */ static const char *LocalDomain; /* our local domain name */ -static int Initialized; /* set when we have initialized ourselves */ +static bool Initialized; /* set when we have initialized ourselves */ static int MarkInterval = 20 * 60; /* interval between marks in seconds */ static int MarkSeq; /* mark sequence number */ -static int NoBind; /* don't bind() as suggested by RFC 3164 */ +static bool NoBind; /* don't bind() as suggested by RFC 3164 */ static int SecureMode; /* when true, receive only unix domain socks */ static int MaxForwardLen = 1024; /* max length of forwared message */ #ifdef INET6 @@ -395,14 +395,14 @@ static int logflags = O_WRONLY|O_APPEND; /* flags used to open log files */ static char bootfile[MAXPATHLEN]; /* booted kernel file */ -static int RemoteAddDate; /* Always set the date on remote messages */ -static int RemoteHostname; /* Log remote hostname from the message */ +static bool RemoteAddDate; /* Always set the date on remote messages */ +static bool RemoteHostname; /* Log remote hostname from the message */ -static int UniquePriority; /* Only log specified priority? */ +static bool UniquePriority; /* Only log specified priority? */ static int LogFacPri; /* Put facility and priority in log message: */ /* 0=no, 1=numeric, 2=names */ -static int KeepKernFac; /* Keep remotely logged kernel facility */ -static int needdofsync = 0; /* Are any file(s) waiting to be fsynced? */ +static bool KeepKernFac; /* Keep remotely logged kernel facility */ +static bool needdofsync = false; /* Are any file(s) waiting to be fsynced? */ static struct pidfh *pfh; static int sigpipe[2]; /* Pipe to catch a signal during select(). */ static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ @@ -526,7 +526,8 @@ addsock(struct addrinfo *ai, struct socklist *sl0) int main(int argc, char *argv[]) { - int ch, i, s, fdsrmax = 0, bflag = 0, pflag = 0, Sflag = 0; + int ch, i, s, fdsrmax = 0; + bool bflag = false, pflag = false, Sflag = false; fd_set *fdsr = NULL; struct timeval tv, *tvp; struct peer *pe; @@ -554,14 +555,14 @@ main(int argc, char *argv[]) mask_C1 = 0; break; case 'A': - send_to_all++; + send_to_all = true; break; case 'a': /* allow specific network addresses only */ if (allowaddr(optarg) == -1) usage(); break; case 'b': - bflag = 1; + bflag = true; p = strchr(optarg, ']'); if (p != NULL) p = strchr(p + 1, ':'); @@ -593,19 +594,19 @@ main(int argc, char *argv[]) logflags |= O_CREAT; break; case 'd': /* debug */ - Debug++; + Debug = true; break; case 'f': /* configuration file */ ConfFile = optarg; break; case 'F': /* run in foreground instead of daemon */ - Foreground++; + Foreground = true; break; case 'H': - RemoteHostname = 1; + RemoteHostname = true; break; case 'k': /* keep remote kern fac */ - KeepKernFac = 1; + KeepKernFac = true; break; case 'l': case 'p': @@ -619,10 +620,10 @@ main(int argc, char *argv[]) mode = DEFFILEMODE; else if (ch == 'p') { mode = DEFFILEMODE; - pflag = 1; + pflag = true; } else { mode = S_IRUSR | S_IWUSR; - Sflag = 1; + Sflag = true; } if (optarg[0] == '/') name = optarg; @@ -660,12 +661,12 @@ main(int argc, char *argv[]) MarkInterval = atoi(optarg) * 60; break; case 'N': - NoBind = 1; + NoBind = true; if (!SecureMode) SecureMode = 1; break; case 'n': - resolve = 0; + resolve = false; break; case 'O': if (strcmp(optarg, "bsd") == 0 || @@ -678,7 +679,7 @@ main(int argc, char *argv[]) usage(); break; case 'o': - use_bootfile = 1; + use_bootfile = true; break; case 'P': /* path for alt. PID */ PidFile = optarg; @@ -687,10 +688,10 @@ main(int argc, char *argv[]) SecureMode++; break; case 'T': - RemoteAddDate = 1; + RemoteAddDate = true; break; case 'u': /* only log specified priority */ - UniquePriority++; + UniquePriority = true; break; case 'v': /* log facility and priority */ LogFacPri++; @@ -793,7 +794,7 @@ main(int argc, char *argv[]) errx(1, "calloc fd_set"); for (;;) { - if (Initialized == 0) + if (!Initialized) init(0); else if (WantInitialize) init(WantInitialize); @@ -818,7 +819,7 @@ main(int argc, char *argv[]) switch (i) { case 0: dofsync(); - needdofsync = 0; + needdofsync = false; if (tvp) { tvp = NULL; if (ppid != 1) @@ -1917,7 +1918,7 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) } } else if ((flags & SYNC_FILE) && (f->f_flags & FFLAG_SYNC)) { f->f_flags |= FFLAG_NEEDSYNC; - needdofsync = 1; + needdofsync = true; } break; @@ -2597,7 +2598,7 @@ init(int signo) /* * Close all open log files. */ - Initialized = 0; + Initialized = false; STAILQ_FOREACH(f, &fhead, next) { /* flush any pending output */ if (f->f_prevcount) @@ -2641,7 +2642,7 @@ init(int signo) } readconfigfile(ConfFile); - Initialized = 1; + Initialized = true; if (Debug) { int port; From nobody Thu Sep 28 15:52:25 2023 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 4RxHzt10N3z4txsn; Thu, 28 Sep 2023 15:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzt0SFbz4K9c; Thu, 28 Sep 2023 15:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fuWb5g0HiJpN5KnC3HqKNlLVQvSI6EeKzG9rzdDOKo0=; b=bkogasuItkOICtk9Qgk10y6TZhf0Ivm5oGm8ZL0Jx6xC1fYq493QDuuvHq/djukoG4FJwZ WFC4Or7W2nhFW3qw2FeJ5iPidTF25tGl6+SRlZM+valE6vJxVqU1nKPva4rkx0MboUMeDE GWwbD1fkhqm5m05N84mr9bu0iQLt71DDGChUWI/UP44uW2C2p8cJ59xEcUGUaJu1XGRgBB jTyInNsNAATzEfk4lkKGQMzoGKXOTf0wVf6X1fSGYWdU1htnPFHgSIjXEy2taVaCvtWw/1 5GPjnHGGHXSUdLoURRQFvK5eCeO99OIf3q/vd3hD5usFz0NkKHCS/kge0NtfOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916346; a=rsa-sha256; cv=none; b=q7C4pHSVXjdAKtnLJ1Ix4SNZDyVNjejIO7kLqkNsrKlEXOs4rArH1kH5tzQRn8/AjPoLiW BBGWCZ3keJr2h8luyB1eOlXJR/IS919RYgx2WA1ZIIbgpiJB9ScovSKj3B39lyoIxeM04X /2OojwuMHStQvo/VET9HqjzYR5J2n6G75WrZ3UoTKK3PEhxv/Hxaxdxve8Ls/iHk1v8eZA ynvNeegXaOKxRWbi0HRhn4ks/i1se2P/KXUNNIsys7I1Js2uvu+k0A9vxtwgR7v49M5GNH nUTeF7iCsu8pohJyv+5UG51moAiTAZ4OPNalBsY9gqUBDkl4H7zc54kw+bmvbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fuWb5g0HiJpN5KnC3HqKNlLVQvSI6EeKzG9rzdDOKo0=; b=indQsSJZzoMcuSgHTnmpDPvKM2yeTZzq8mja9XW4R39EPiRfMF/AxecHCAYZb0Q/VaIzG/ 9bCAMopWB/Bn2Cn7YXFuLZ7hAB3vEBrcOmdYSQPyRUQnptQ/yIrG1nL9GItLJKa5c7NZGD NsJGn3mudpIc0NXHxnXVOTTo1zpXvAL6rF1i68hX+uFVZTetBK9oMsPZAOgN8YFNbgr4mH oEmuiRqylMfcVXdLS/MyxfRcP13OvqOiYbVFgEYSZC5dCOR5z41EX9dzT1OqHHze3A2UAO GEylDffAmldEI8mkLKjt3Zvr4LaKyVjLT3g3HA+psbtr+q8ualyW46PCL+UREA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzs6fcZzD66; Thu, 28 Sep 2023 15:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqPQN021675; Thu, 28 Sep 2023 15:52:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqPKB021672; Thu, 28 Sep 2023 15:52:25 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:25 GMT Message-Id: <202309281552.38SFqPKB021672@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: f804f2365081 - main - syslogd: Centralize operations into a kevent loop 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f804f23650815dd3a96b3ab2b24152d25c7364c3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f804f23650815dd3a96b3ab2b24152d25c7364c3 commit f804f23650815dd3a96b3ab2b24152d25c7364c3 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:29 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Centralize operations into a kevent loop Use kqueue(2) for socket I/O and signal notification. Previously, select(2) and traditional signal handlers were being used. This change centralizes all of the async notification delivery into a single loop so future Capsicum sandboxing will be easier. It also simplifies the code by removing boiler-plate cruft that comes with the older interfaces. Reviewed by: Slawa Olhovchenkov, markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41363 --- usr.sbin/syslogd/syslogd.c | 226 +++++++++++++++++---------------------------- 1 file changed, 86 insertions(+), 140 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c8420298f117..21e2d48b0c37 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -104,6 +104,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #define RCVBUF_MINSIZE (80 * 1024) /* minimum size of dgram rcv buffer */ #include +#include #include #include #include @@ -371,6 +372,16 @@ static const char *TypeNames[] = { "FORW", "USERS", "WALL", "PIPE" }; +static const int sigcatch[] = { + SIGHUP, + SIGINT, + SIGQUIT, + SIGPIPE, + SIGALRM, + SIGTERM, + SIGCHLD, +}; + static bool Debug; /* debug flag */ static bool Foreground = false; /* Run in foreground, instead of daemonizing */ static bool resolve = true; /* resolve hostname */ @@ -402,13 +413,10 @@ static bool UniquePriority; /* Only log specified priority? */ static int LogFacPri; /* Put facility and priority in log message: */ /* 0=no, 1=numeric, 2=names */ static bool KeepKernFac; /* Keep remotely logged kernel facility */ -static bool needdofsync = false; /* Are any file(s) waiting to be fsynced? */ +static bool needdofsync = true; /* Are any file(s) waiting to be fsynced? */ static struct pidfh *pfh; -static int sigpipe[2]; /* Pipe to catch a signal during select(). */ static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ -static volatile sig_atomic_t MarkSet, WantDie, WantInitialize, WantReapchild; - struct iovlist; static int allowaddr(char *); @@ -421,9 +429,7 @@ static int deadq_remove(struct deadq_entry *); static int deadq_removebypid(pid_t); static int decode(const char *, const CODE *); static void die(int) __dead2; -static void dodie(int); static void dofsync(void); -static void domark(int); static void fprintlog_first(struct filed *, const char *, const char *, const char *, const char *, const char *, const char *, int); static void fprintlog_write(struct filed *, struct iovlist *, int); @@ -437,8 +443,6 @@ static void markit(void); static int socksetup(struct peer *); static int socklist_recv_file(struct socklist *); static int socklist_recv_sock(struct socklist *); -static int socklist_recv_signal(struct socklist *); -static void sighandler(int); static int skip_message(const char *, const char *, int); static int evaluate_prop_filter(const struct prop_filter *filter, const char *value); @@ -526,14 +530,14 @@ addsock(struct addrinfo *ai, struct socklist *sl0) int main(int argc, char *argv[]) { - int ch, i, s, fdsrmax = 0; - bool bflag = false, pflag = false, Sflag = false; - fd_set *fdsr = NULL; - struct timeval tv, *tvp; - struct peer *pe; + sigset_t sigset = { }; + struct kevent ev; struct socklist *sl; - pid_t ppid = 1, spid; + struct peer *pe; + pid_t ppid = -1, spid; + int ch, kq, s; char *p; + bool bflag = false, pflag = false, Sflag = false; if (madvise(NULL, 0, MADV_PROTECT) != 0) dprintf("madvise() failed: %s\n", strerror(errno)); @@ -705,17 +709,6 @@ main(int argc, char *argv[]) if (RFC3164OutputFormat && MaxForwardLen > 1024) errx(1, "RFC 3164 messages may not exceed 1024 bytes"); - /* Pipe to catch a signal during select(). */ - s = pipe2(sigpipe, O_CLOEXEC); - if (s < 0) { - err(1, "cannot open a pipe for signals"); - } else { - addsock(NULL, &(struct socklist){ - .sl_socket = sigpipe[0], - .sl_recv = socklist_recv_signal - }); - } - /* Listen by default: /dev/klog. */ s = open(_PATH_KLOG, O_RDONLY | O_NONBLOCK | O_CLOEXEC, 0); if (s < 0) { @@ -767,108 +760,82 @@ main(int argc, char *argv[]) (void)strlcpy(consfile.fu_fname, ctty + sizeof _PATH_DEV - 1, sizeof(consfile.fu_fname)); (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); - (void)signal(SIGTERM, dodie); - (void)signal(SIGINT, Debug ? dodie : SIG_IGN); - (void)signal(SIGQUIT, Debug ? dodie : SIG_IGN); - (void)signal(SIGHUP, sighandler); - (void)signal(SIGCHLD, sighandler); - (void)signal(SIGALRM, domark); - (void)signal(SIGPIPE, SIG_IGN); /* We'll catch EPIPE instead. */ + + kq = kqueue(); + if (kq == -1) { + warn("failed to initialize kqueue"); + pidfile_remove(pfh); + exit(1); + } + STAILQ_FOREACH(sl, &shead, next) { + EV_SET(&ev, sl->sl_socket, EVFILT_READ, EV_ADD, 0, 0, sl); + if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) { + warn("failed to add kevent to kqueue"); + pidfile_remove(pfh); + exit(1); + } + } + for (size_t i = 0; i < nitems(sigcatch); ++i) { + EV_SET(&ev, sigcatch[i], EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); + if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) { + warn("failed to add kevent to kqueue"); + pidfile_remove(pfh); + exit(1); + } + (void)sigaddset(&sigset, sigcatch[i]); + } + if (sigprocmask(SIG_BLOCK, &sigset, NULL) != 0) { + warn("failed to apply signal mask"); + pidfile_remove(pfh); + exit(1); + } (void)alarm(TIMERINTVL); /* tuck my process id away */ pidfile_write(pfh); dprintf("off & running....\n"); - - tvp = &tv; - tv.tv_sec = tv.tv_usec = 0; - - STAILQ_FOREACH(sl, &shead, next) { - if (sl->sl_socket > fdsrmax) - fdsrmax = sl->sl_socket; - } - fdsr = (fd_set *)calloc(howmany(fdsrmax+1, NFDBITS), - sizeof(*fdsr)); - if (fdsr == NULL) - errx(1, "calloc fd_set"); - + init(false); for (;;) { - if (!Initialized) - init(0); - else if (WantInitialize) - init(WantInitialize); - if (WantReapchild) - reapchild(WantReapchild); - if (MarkSet) - markit(); - if (WantDie) { - free(fdsr); - die(WantDie); - } - - bzero(fdsr, howmany(fdsrmax+1, NFDBITS) * - sizeof(*fdsr)); - - STAILQ_FOREACH(sl, &shead, next) { - if (sl->sl_socket != -1 && sl->sl_recv != NULL) - FD_SET(sl->sl_socket, fdsr); - } - i = select(fdsrmax + 1, fdsr, NULL, NULL, - needdofsync ? &tv : tvp); - switch (i) { - case 0: + if (needdofsync) { dofsync(); - needdofsync = false; - if (tvp) { - tvp = NULL; - if (ppid != 1) - kill(ppid, SIGALRM); + if (ppid != -1) { + kill(ppid, SIGALRM); + ppid = -1; } - continue; - case -1: + } + if (kevent(kq, NULL, 0, &ev, 1, NULL) == -1) { if (errno != EINTR) - logerror("select"); + logerror("kevent"); continue; } - STAILQ_FOREACH(sl, &shead, next) { - if (FD_ISSET(sl->sl_socket, fdsr)) - (*sl->sl_recv)(sl); - } - } - free(fdsr); -} - -static int -socklist_recv_signal(struct socklist *sl __unused) -{ - ssize_t len; - int i, nsig, signo; - - if (ioctl(sigpipe[0], FIONREAD, &i) != 0) { - logerror("ioctl(FIONREAD)"); - err(1, "signal pipe read failed"); - } - nsig = i / sizeof(signo); - dprintf("# of received signals = %d\n", nsig); - for (i = 0; i < nsig; i++) { - len = read(sigpipe[0], &signo, sizeof(signo)); - if (len != sizeof(signo)) { - logerror("signal pipe read failed"); - err(1, "signal pipe read failed"); - } - dprintf("Received signal: %d from fd=%d\n", signo, - sigpipe[0]); - switch (signo) { - case SIGHUP: - WantInitialize = 1; + switch (ev.filter) { + case EVFILT_READ: + sl = ev.udata; + if (sl->sl_socket != -1 && sl->sl_recv != NULL) + sl->sl_recv(sl); break; - case SIGCHLD: - WantReapchild = 1; + case EVFILT_SIGNAL: + switch (ev.ident) { + case SIGHUP: + init(true); + break; + case SIGINT: + case SIGQUIT: + case SIGTERM: + if (ev.ident == SIGTERM || Debug) + die(ev.ident); + break; + case SIGALRM: + markit(); + break; + case SIGCHLD: + reapchild(ev.ident); + break; + } break; } } - return (0); } static int @@ -1758,6 +1725,7 @@ dofsync(void) (void)fsync(f->f_file); } } + needdofsync = false; } /* @@ -2259,7 +2227,6 @@ reapchild(int signo __unused) } } } - WantReapchild = 0; } /* @@ -2298,20 +2265,6 @@ cvthname(struct sockaddr *f) return (hname); } -static void -dodie(int signo) -{ - - WantDie = signo; -} - -static void -domark(int signo __unused) -{ - - MarkSet = 1; -} - /* * Print syslogd errors some place. */ @@ -2536,14 +2489,6 @@ readconfigfile(const char *path) } } -static void -sighandler(int signo) -{ - - /* Send an wake-up signal to the select() loop. */ - write(sigpipe[1], &signo, sizeof(signo)); -} - /* * INIT -- Initialize syslogd from configuration table */ @@ -2558,7 +2503,6 @@ init(int signo) char bootfileMsg[MAXLINE + 1]; dprintf("init\n"); - WantInitialize = 0; /* * Load hostname (may have changed). @@ -3245,7 +3189,6 @@ markit(void) dq->dq_timeout--; } } - MarkSet = 0; (void)alarm(TIMERINTVL); } @@ -3621,6 +3564,7 @@ validate(struct sockaddr *sa, const char *hname) static int p_open(const char *prog, pid_t *rpid) { + sigset_t sigset = { }; int pfd[2], nulldesc; pid_t pid; char *argv[4]; /* sh -c cmd NULL */ @@ -3650,10 +3594,12 @@ p_open(const char *prog, pid_t *rpid) alarm(0); - /* Restore signals marked as SIG_IGN. */ - (void)signal(SIGINT, SIG_DFL); - (void)signal(SIGQUIT, SIG_DFL); - (void)signal(SIGPIPE, SIG_DFL); + for (size_t i = 0; i < nitems(sigcatch); ++i) + (void)sigaddset(&sigset, sigcatch[i]); + if (sigprocmask(SIG_UNBLOCK, &sigset, NULL) != 0) { + logerror("sigprocmask"); + exit(1); + } dup2(pfd[0], STDIN_FILENO); dup2(nulldesc, STDOUT_FILENO); From nobody Thu Sep 28 15:52:26 2023 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 4RxHzv2G49z4tyNQ; Thu, 28 Sep 2023 15:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzv1br5z4KJl; Thu, 28 Sep 2023 15:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cdmP0TlG0MvzRQUrpMZVBPtX22woAVrMjek0jPH1Qy0=; b=HwI8FKPQoSYHu/1q4YZ44iGsE3o4NLIq6ErMC36/f1fv3wkGegvntokthIYnh8bvxyXyeJ TbuuRq6CmVi+58uhsamM/KJtiVuJM8zgqw63QSxrj0IBoHh4URQruzQozIrk4OeycEHJuX 6oyFX/+Ic86PZX0Kab9VOQKQRn7/2L41WELxc63XKfnhQ6UjAwS4InUJEwFKkCKfQVh6kr 2uRU3CMDcQiJNOy//z6GS0NUxPJhkqfXPvLIcW0PZKqRZuBfPNszsusmqXJNSRXAC/odkw KgN5KUgMK27hPh43fZB2m2qUNqu/2JyYvAavZUWBAIKScHLDMMSXJ473hHdXQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916347; a=rsa-sha256; cv=none; b=AjKeuXPmXlfZJivRLX3utHSi4be5vNUTHSLcabsAPKhzV12cScCrcZTnS3NrGW4uBciAF3 sJaqDdHVxwyDUXVCsS7/vdVwaBspK/VY/sZjVpNvwcUoJfr4FGO4hr+mqm8p/wK8KK+6NY wqHM+bYCM4bKVt++DIAAQQ8Qk+OGH2KOGXtBJwkeT5X6KGBMPSoLnNVKtWxMRl3+xNTvtR e9kM1pU1Ms1lN2c2WEa9+jMlr5J/I9Wd9CiS1jlbc2ZIrOdHF939BgQ+XfeMq8b6BOrqpE CjQcMH898s5D+rKfQZ5mlzsGXaHHaCOWwc1/DDpbJsSJewYU38aMONCG4xY2wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cdmP0TlG0MvzRQUrpMZVBPtX22woAVrMjek0jPH1Qy0=; b=mxhYRock57Q1RmuNrbtGiwaStxiWsgdHZqG4NabIaiwkrZwdKneE3xtZyNhD3kYHG1/mIC GkWcv5QOqoULshwF7g/GXvkP5XwqA5FW9OvGxNxnaP0S2w0g0dUesbFhly5JwM2CGP1FHN vtN2YLOfae8EQZOkvkwksfDm0iBNvjYEns0Y+1ci/w3D52kAn9gdgS5xeyNYmQ2rIF3dcY Qp8cPyZsBH+xRHhM4zydQliAnR+xktoy/u5tvP9Ps45Z/vSoRnXNJP+KpoPuscItJmKfth aY68iOAz1Q770PhGEwwg0EBLOKiXtTCRRALVjIkY7E4Y5gWdRr7BRWCpEEsTSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzv0H5YzDL3; Thu, 28 Sep 2023 15:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqQph021723; Thu, 28 Sep 2023 15:52:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqQGS021720; Thu, 28 Sep 2023 15:52:26 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:26 GMT Message-Id: <202309281552.38SFqQGS021720@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: 1bb61348e69e - main - syslogd: Use boolean reload parameter for init() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 1bb61348e69e6facc1fbac49d82236218028eeb8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1bb61348e69e6facc1fbac49d82236218028eeb8 commit 1bb61348e69e6facc1fbac49d82236218028eeb8 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:36 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Use boolean reload parameter for init() Replace init()'s integer "signo" parameter with boolean "reload" for clarity. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41416 --- usr.sbin/syslogd/syslogd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 21e2d48b0c37..b61a10c20aca 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -434,7 +434,7 @@ static void fprintlog_first(struct filed *, const char *, const char *, const char *, const char *, const char *, const char *, int); static void fprintlog_write(struct filed *, struct iovlist *, int); static void fprintlog_successive(struct filed *, int); -static void init(int); +static void init(bool); static void logerror(const char *); static void logmsg(int, const struct logtime *, const char *, const char *, const char *, const char *, const char *, const char *, int); @@ -2493,7 +2493,7 @@ readconfigfile(const char *path) * INIT -- Initialize syslogd from configuration table */ static void -init(int signo) +init(bool reload) { int i; struct filed *f; @@ -2507,7 +2507,7 @@ init(int signo) /* * Load hostname (may have changed). */ - if (signo != 0) + if (reload) (void)strlcpy(oldLocalHostName, LocalHostName, sizeof(oldLocalHostName)); if (gethostname(LocalHostName, sizeof(LocalHostName))) @@ -2651,9 +2651,9 @@ init(int signo) NULL, NULL, "restart", 0); dprintf("syslogd: restarted\n"); /* - * Log a change in hostname, but only on a restart. + * Log a change in hostname, but only on reload. */ - if (signo != 0 && strcmp(oldLocalHostName, LocalHostName) != 0) { + if (reload && strcmp(oldLocalHostName, LocalHostName) != 0) { (void)snprintf(hostMsg, sizeof(hostMsg), "hostname changed, \"%s\" to \"%s\"", oldLocalHostName, LocalHostName); @@ -2663,9 +2663,9 @@ init(int signo) } /* * Log the kernel boot file if we aren't going to use it as - * the prefix, and if this is *not* a restart. + * the prefix, and if this is *not* a reload. */ - if (signo == 0 && !use_bootfile) { + if (!reload && !use_bootfile) { (void)snprintf(bootfileMsg, sizeof(bootfileMsg), "kernel boot file is %s", bootfile); logmsg(LOG_KERN | LOG_INFO, NULL, LocalHostName, "syslogd", From nobody Thu Sep 28 15:52:28 2023 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 4RxHzw2kF8z4tyCm; Thu, 28 Sep 2023 15:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzw2Lc5z4KH8; Thu, 28 Sep 2023 15:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/CStJWQACuVDSyuD1dpKTiRglEL0S6Bd/gSeJ2qeZc=; b=ikhKlImCDev5/iYPaqgeRC+QQkikBvA+jWZttY2fvk+Vs7x6K1DTmhyZSdLMehct0kYbbE edvpNz7E6kNHIVkIybz8p0oOcM3S1s0IBa8TbNaBEf5UlQDDbHIJW9t0ShTdj015beQ7Zi aWmsvWDBEjH3QAf5i9AMBeVtKFxB/8dQMAoFegFWY8hl9gpJiwp9CsiwB1Tq+Xz/nl8cmd 1yWptIEJVg179ZDIfVyod4Zr7JEkSOGKLL8XGeZLtaWDkBvBhmKYqfHMrxRPmK3hWEs2xG 8t0e0nb4javS3B0zXUi2kJHLmlCIETgcimZdjDJyYDv0EAFM4/mYJP6BcrJR/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916348; a=rsa-sha256; cv=none; b=TIF3u7v6dtEnMMYqv47oPWkK6sC/wDf5qxGe5xUrHXYyaJTFL129Sg+EYk+eref/Aumvds FjhiqiK6HBqQK2Dd32EezfW4iwEWU6/O7RFmZaStWZGBK58gO3p2OdEwMLAGFOCEFneS9Y 48AQSBDBS7p58XVi7vDjLU2qg/PDyb0Q8196JqPdcS1iNacOFkIE2bdWBHVl8pIZYRX/8B R5Tj3+aHSj3N+qzsbi+zaZFtt665hQT0EHxTr5d4mdhUYDIHpcYTlERTSaEMJCFlJ4Ka+B WpPoIr5oABJL9djqbvLM0yQ//qQcd6bs9eWDDTiuFZE070A+VVq+jEEErynqRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/CStJWQACuVDSyuD1dpKTiRglEL0S6Bd/gSeJ2qeZc=; b=Wdjdue1PQ3VY30CwItY30wKxjAPuq4WElptdoFwrzueckqOCTsk4gxLfkaMTC6Mrg4nnVi yhIlvZlyhHj3aPwxZY58GtlZFZvTsN2eduhOjR3CS6kRBHN+MhSuGG/YtFi6g0IHcHTu/o B5i8+zKHTndBn6ALgtdbZhqLIigWELWr5/JS8TpkKCnvcnzx1P2SK1itOK8NBpPTTdNwOU jzH5dIqds5RzdEHgEv6aPPR1g34JLPZNv9UO0033DWrClXjvGMewAezc1c7GPnsB2dOKYF ymbU4e1wIaxVNJ2+5k1UvuPxNxh2f/NrpYl9R4nB9S9WZHYMM84Di5zT1rZp9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzw1JzwzCTg; Thu, 28 Sep 2023 15:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqSYr021771; Thu, 28 Sep 2023 15:52:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqS61021768; Thu, 28 Sep 2023 15:52:28 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:28 GMT Message-Id: <202309281552.38SFqS61021768@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: f30b063ee667 - main - syslogd: Only use peerlist during flag parsing 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f30b063ee6678d8192a075bf907773b8b54d4354 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f30b063ee6678d8192a075bf907773b8b54d4354 commit f30b063ee6678d8192a075bf907773b8b54d4354 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:45 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:52 +0000 syslogd: Only use peerlist during flag parsing Add logging sockets directly to the socklist, unless parsing flags. The peerlist is still needed to temporarily hold socket information until the configuration flags have been parsed. It is tempting to remove the entire peerlist, but addsock() can not determine if syslogd is in secure mode unless the flags have been parsed. Also, call pidfile_open() right after flag parsing so we can terminate if another syslogd instance is already running. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41364 --- usr.sbin/syslogd/syslogd.c | 421 ++++++++++++++++++++++----------------------- 1 file changed, 201 insertions(+), 220 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index b61a10c20aca..c03acf301fd8 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -176,7 +176,8 @@ static const char include_ext[] = ".conf"; (((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 ) #endif /* - * List of peers and sockets for binding. + * List of peers and sockets that can't be bound until + * flags have been parsed. */ struct peer { const char *pe_name; @@ -186,13 +187,16 @@ struct peer { }; static STAILQ_HEAD(, peer) pqueue = STAILQ_HEAD_INITIALIZER(pqueue); +/* + * Sockets used for logging; monitored by kevent(). + */ struct socklist { struct addrinfo sl_ai; #define sl_sa sl_ai.ai_addr #define sl_salen sl_ai.ai_addrlen #define sl_family sl_ai.ai_family int sl_socket; - struct peer *sl_peer; + const char *sl_name; int (*sl_recv)(struct socklist *); STAILQ_ENTRY(socklist) next; }; @@ -419,9 +423,9 @@ static bool RFC3164OutputFormat = true; /* Use legacy format by default. */ struct iovlist; -static int allowaddr(char *); -static int addpeer(struct peer *); -static int addsock(struct addrinfo *, struct socklist *); +static bool allowaddr(char *); +static void addpeer(const char *, const char *, mode_t); +static void addsock(const char *, const char *, mode_t); static void cfline(const char *, const char *, const char *, const char *); static const char *cvthname(struct sockaddr *); static void deadq_enter(pid_t, const char *); @@ -440,7 +444,7 @@ static void logmsg(int, const struct logtime *, const char *, const char *, const char *, const char *, const char *, const char *, int); static void log_deadchild(pid_t, int, const char *); static void markit(void); -static int socksetup(struct peer *); +static struct socklist *socksetup(struct addrinfo *, const char *, mode_t); static int socklist_recv_file(struct socklist *); static int socklist_recv_sock(struct socklist *); static int skip_message(const char *, const char *, int); @@ -490,41 +494,91 @@ close_filed(struct filed *f) f->f_file = -1; } -static int -addpeer(struct peer *pe0) +static void +addpeer(const char *name, const char *serv, mode_t mode) { - struct peer *pe; - - pe = calloc(1, sizeof(*pe)); + struct peer *pe = calloc(1, sizeof(*pe)); if (pe == NULL) err(1, "malloc failed"); - *pe = *pe0; + pe->pe_name = name; + pe->pe_serv = serv; + pe->pe_mode = mode; STAILQ_INSERT_TAIL(&pqueue, pe, next); - - return (0); } -static int -addsock(struct addrinfo *ai, struct socklist *sl0) +static void +addsock(const char *name, const char *serv, mode_t mode) { + struct addrinfo hints = { }, *res, *res0; struct socklist *sl; + int error; + char *cp, *msgbuf; - /* Copy *ai->ai_addr to the tail of struct socklist if any. */ - sl = calloc(1, sizeof(*sl) + ((ai != NULL) ? ai->ai_addrlen : 0)); + /* + * We have to handle this case for backwards compatibility: + * If there are two (or more) colons but no '[' and ']', + * assume this is an inet6 address without a service. + */ + if (name != NULL) { +#ifdef INET6 + if (name[0] == '[' && + (cp = strchr(name + 1, ']')) != NULL) { + name = &name[1]; + *cp = '\0'; + if (cp[1] == ':' && cp[2] != '\0') + serv = cp + 2; + } else { +#endif + cp = strchr(name, ':'); + if (cp != NULL && strchr(cp + 1, ':') == NULL) { + *cp = '\0'; + if (cp[1] != '\0') + serv = cp + 1; + if (cp == name) + name = NULL; + } +#ifdef INET6 + } +#endif + } + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_DGRAM; + hints.ai_flags = AI_PASSIVE; + if (name != NULL) + dprintf("Trying peer: %s\n", name); + if (serv == NULL) + serv = "syslog"; + error = getaddrinfo(name, serv, &hints, &res0); + if (error) { + asprintf(&msgbuf, "getaddrinfo failed for %s%s: %s", + name == NULL ? "" : name, serv, + gai_strerror(error)); + errno = 0; + if (msgbuf == NULL) + logerror(gai_strerror(error)); + else + logerror(msgbuf); + free(msgbuf); + die(0); + } + for (res = res0; res != NULL; res = res->ai_next) { + sl = socksetup(res, name, mode); + if (sl == NULL) + continue; + STAILQ_INSERT_TAIL(&shead, sl, next); + } + freeaddrinfo(res0); +} + +static void +addfile(int fd) +{ + struct socklist *sl = calloc(1, sizeof(*sl)); if (sl == NULL) err(1, "malloc failed"); - *sl = *sl0; - if (ai != NULL) { - memcpy(&sl->sl_ai, ai, sizeof(*ai)); - if (ai->ai_addrlen > 0) { - memcpy((sl + 1), ai->ai_addr, ai->ai_addrlen); - sl->sl_sa = (struct sockaddr *)(sl + 1); - } else - sl->sl_sa = NULL; - } + sl->sl_socket = fd; + sl->sl_recv = socklist_recv_file; STAILQ_INSERT_TAIL(&shead, sl, next); - - return (0); } int @@ -533,7 +587,6 @@ main(int argc, char *argv[]) sigset_t sigset = { }; struct kevent ev; struct socklist *sl; - struct peer *pe; pid_t ppid = -1, spid; int ch, kq, s; char *p; @@ -562,7 +615,7 @@ main(int argc, char *argv[]) send_to_all = true; break; case 'a': /* allow specific network addresses only */ - if (allowaddr(optarg) == -1) + if (!allowaddr(optarg)) usage(); break; case 'b': @@ -577,18 +630,12 @@ main(int argc, char *argv[]) } if (p == NULL) { /* A hostname or filename only. */ - addpeer(&(struct peer){ - .pe_name = optarg, - .pe_serv = "syslog" - }); + addpeer(optarg, "syslog", 0); } else { /* The case of "name:service". */ *p++ = '\0'; - addpeer(&(struct peer){ - .pe_serv = p, - .pe_name = (strlen(optarg) == 0) ? - NULL : optarg, - }); + addpeer(strlen(optarg) == 0 ? NULL : optarg, + p, 0); } break; case 'c': @@ -649,10 +696,7 @@ main(int argc, char *argv[]) } else errx(1, "invalid filename %s, exiting", optarg); - addpeer(&(struct peer){ - .pe_name = name, - .pe_mode = mode - }); + addpeer(name, NULL, mode); break; } case 'M': /* max length of forwarded message */ @@ -709,42 +753,39 @@ main(int argc, char *argv[]) if (RFC3164OutputFormat && MaxForwardLen > 1024) errx(1, "RFC 3164 messages may not exceed 1024 bytes"); + pfh = pidfile_open(PidFile, 0600, &spid); + if (pfh == NULL) { + if (errno == EEXIST) + errx(1, "syslogd already running, pid: %d", spid); + warn("cannot open pid file"); + } + + /* + * Now that flags have been parsed, we know if we're in + * secure mode. Add peers to the socklist, if allowed. + */ + while (!STAILQ_EMPTY(&pqueue)) { + struct peer *pe = STAILQ_FIRST(&pqueue); + STAILQ_REMOVE_HEAD(&pqueue, next); + addsock(pe->pe_name, pe->pe_serv, pe->pe_mode); + free(pe); + } /* Listen by default: /dev/klog. */ s = open(_PATH_KLOG, O_RDONLY | O_NONBLOCK | O_CLOEXEC, 0); if (s < 0) { dprintf("can't open %s (%d)\n", _PATH_KLOG, errno); } else { - addsock(NULL, &(struct socklist){ - .sl_socket = s, - .sl_recv = socklist_recv_file, - }); + addfile(s); } /* Listen by default: *:514 if no -b flag. */ if (bflag == 0) - addpeer(&(struct peer){ - .pe_serv = "syslog" - }); + addsock(NULL, "syslog", 0); /* Listen by default: /var/run/log if no -p flag. */ if (pflag == 0) - addpeer(&(struct peer){ - .pe_name = _PATH_LOG, - .pe_mode = DEFFILEMODE, - }); + addsock(_PATH_LOG, NULL, DEFFILEMODE); /* Listen by default: /var/run/logpriv if no -S flag. */ if (Sflag == 0) - addpeer(&(struct peer){ - .pe_name = _PATH_LOG_PRIV, - .pe_mode = S_IRUSR | S_IWUSR, - }); - STAILQ_FOREACH(pe, &pqueue, next) - socksetup(pe); - - pfh = pidfile_open(PidFile, 0600, &spid); - if (pfh == NULL) { - if (errno == EEXIST) - errx(1, "syslogd already running, pid: %d", spid); - warn("cannot open pid file"); - } + addsock(_PATH_LOG_PRIV, NULL, S_IRUSR | S_IWUSR); if ((!Foreground) && (!Debug)) { ppid = waitdaemon(30); @@ -2312,7 +2353,7 @@ die(int signo) } STAILQ_FOREACH(sl, &shead, next) { if (sl->sl_sa != NULL && sl->sl_family == AF_LOCAL) - unlink(sl->sl_peer->pe_name); + unlink(sl->sl_name); } pidfile_remove(pfh); @@ -3272,9 +3313,9 @@ timedout(int sig __unused) * * netaddr/maskbits[:{servicename|portnumber|*}] * - * Returns -1 on error, 0 if the argument was valid. + * Returns false on error, true if the argument was valid. */ -static int +static bool #if defined(INET) || defined(INET6) allowaddr(char *s) #else @@ -3442,13 +3483,13 @@ allowaddr(char *s __unused) printf("port = %d\n", ap->port); } - return (0); + return (true); err: if (res != NULL) freeaddrinfo(res); free(ap); #endif - return (-1); + return (false); } /* @@ -3710,167 +3751,107 @@ log_deadchild(pid_t pid, int status, const char *name) logerror(buf); } -static int -socksetup(struct peer *pe) +static struct socklist * +socksetup(struct addrinfo *ai, const char *name, mode_t mode) { - struct addrinfo hints, *res, *res0; - int error; - char *cp; + struct socklist *sl; int (*sl_recv)(struct socklist *); - /* - * We have to handle this case for backwards compatibility: - * If there are two (or more) colons but no '[' and ']', - * assume this is an inet6 address without a service. - */ - if (pe->pe_name != NULL) { -#ifdef INET6 - if (pe->pe_name[0] == '[' && - (cp = strchr(pe->pe_name + 1, ']')) != NULL) { - pe->pe_name = &pe->pe_name[1]; - *cp = '\0'; - if (cp[1] == ':' && cp[2] != '\0') - pe->pe_serv = cp + 2; - } else { -#endif - cp = strchr(pe->pe_name, ':'); - if (cp != NULL && strchr(cp + 1, ':') == NULL) { - *cp = '\0'; - if (cp[1] != '\0') - pe->pe_serv = cp + 1; - if (cp == pe->pe_name) - pe->pe_name = NULL; - } -#ifdef INET6 - } -#endif - } - hints = (struct addrinfo){ - .ai_family = AF_UNSPEC, - .ai_socktype = SOCK_DGRAM, - .ai_flags = AI_PASSIVE - }; - if (pe->pe_name != NULL) - dprintf("Trying peer: %s\n", pe->pe_name); - if (pe->pe_serv == NULL) - pe->pe_serv = "syslog"; - error = getaddrinfo(pe->pe_name, pe->pe_serv, &hints, &res0); - if (error) { - char *msgbuf; + int s, optval = 1; - asprintf(&msgbuf, "getaddrinfo failed for %s%s: %s", - pe->pe_name == NULL ? "" : pe->pe_name, pe->pe_serv, - gai_strerror(error)); - errno = 0; - if (msgbuf == NULL) - logerror(gai_strerror(error)); - else - logerror(msgbuf); - free(msgbuf); - die(0); + if (ai->ai_family != AF_LOCAL && SecureMode > 1) { + /* Only AF_LOCAL in secure mode. */ + return (NULL); } - for (res = res0; res != NULL; res = res->ai_next) { - int s; - - if (res->ai_family != AF_LOCAL && - SecureMode > 1) { - /* Only AF_LOCAL in secure mode. */ - continue; - } - if (family != AF_UNSPEC && - res->ai_family != AF_LOCAL && res->ai_family != family) - continue; + if (family != AF_UNSPEC && ai->ai_family != AF_LOCAL && + ai->ai_family != family) + return (NULL); - s = socket(res->ai_family, res->ai_socktype, - res->ai_protocol); - if (s < 0) { - logerror("socket"); - error++; - continue; - } + s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); + if (s < 0) { + logerror("socket"); + return (NULL); + } #ifdef INET6 - if (res->ai_family == AF_INET6) { - if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, - &(int){1}, sizeof(int)) < 0) { - logerror("setsockopt(IPV6_V6ONLY)"); - close(s); - error++; - continue; - } - } -#endif - if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, - &(int){1}, sizeof(int)) < 0) { - logerror("setsockopt(SO_REUSEADDR)"); + if (ai->ai_family == AF_INET6) { + if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &optval, + sizeof(int)) < 0) { + logerror("setsockopt(IPV6_V6ONLY)"); close(s); - error++; - continue; + return (NULL); } + } +#endif + if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &optval, + sizeof(int)) < 0) { + logerror("setsockopt(SO_REUSEADDR)"); + close(s); + return (NULL); + } - /* - * Bind INET and UNIX-domain sockets. - * - * A UNIX-domain socket is always bound to a pathname - * regardless of -N flag. - * - * For INET sockets, RFC 3164 recommends that client - * side message should come from the privileged syslogd port. - * - * If the system administrator chooses not to obey - * this, we can skip the bind() step so that the - * system will choose a port for us. - */ - if (res->ai_family == AF_LOCAL) - unlink(pe->pe_name); - if (res->ai_family == AF_LOCAL || - NoBind == 0 || pe->pe_name != NULL) { - if (bind(s, res->ai_addr, res->ai_addrlen) < 0) { - logerror("bind"); - close(s); - error++; - continue; - } - if (res->ai_family == AF_LOCAL || - SecureMode == 0) - increase_rcvbuf(s); - } - if (res->ai_family == AF_LOCAL && - chmod(pe->pe_name, pe->pe_mode) < 0) { - dprintf("chmod %s: %s\n", pe->pe_name, - strerror(errno)); + /* + * Bind INET and UNIX-domain sockets. + * + * A UNIX-domain socket is always bound to a pathname + * regardless of -N flag. + * + * For INET sockets, RFC 3164 recommends that client + * side message should come from the privileged syslogd port. + * + * If the system administrator chooses not to obey + * this, we can skip the bind() step so that the + * system will choose a port for us. + */ + if (ai->ai_family == AF_LOCAL) + unlink(name); + if (ai->ai_family == AF_LOCAL || NoBind == 0 || name != NULL) { + if (bind(s, ai->ai_addr, ai->ai_addrlen) < 0) { + logerror("bind"); close(s); - error++; - continue; - } - dprintf("new socket fd is %d\n", s); - if (res->ai_socktype != SOCK_DGRAM) { - listen(s, 5); + return (NULL); } - sl_recv = socklist_recv_sock; + if (ai->ai_family == AF_LOCAL || SecureMode == 0) + increase_rcvbuf(s); + } + if (ai->ai_family == AF_LOCAL && chmod(name, mode) < 0) { + dprintf("chmod %s: %s\n", name, strerror(errno)); + close(s); + return (NULL); + } + dprintf("new socket fd is %d\n", s); + if (ai->ai_socktype != SOCK_DGRAM) { + listen(s, 5); + } + sl_recv = socklist_recv_sock; #if defined(INET) || defined(INET6) - if (SecureMode && (res->ai_family == AF_INET || - res->ai_family == AF_INET6)) { - dprintf("shutdown\n"); - /* Forbid communication in secure mode. */ - if (shutdown(s, SHUT_RD) < 0 && - errno != ENOTCONN) { - logerror("shutdown"); - if (!Debug) - die(0); - } - sl_recv = NULL; - } else + if (SecureMode && (ai->ai_family == AF_INET || + ai->ai_family == AF_INET6)) { + dprintf("shutdown\n"); + /* Forbid communication in secure mode. */ + if (shutdown(s, SHUT_RD) < 0 && errno != ENOTCONN) { + logerror("shutdown"); + if (!Debug) + die(0); + } + sl_recv = NULL; + } else #endif - dprintf("listening on socket\n"); - dprintf("sending on socket\n"); - addsock(res, &(struct socklist){ - .sl_socket = s, - .sl_peer = pe, - .sl_recv = sl_recv - }); + dprintf("listening on socket\n"); + dprintf("sending on socket\n"); + /* Copy *ai->ai_addr to the tail of struct socklist if any. */ + sl = calloc(1, sizeof(*sl) + ai->ai_addrlen); + if (sl == NULL) + err(1, "malloc failed"); + sl->sl_socket = s; + sl->sl_name = name; + sl->sl_recv = sl_recv; + (void)memcpy(&sl->sl_ai, ai, sizeof(*ai)); + if (ai->ai_addrlen > 0) { + (void)memcpy((sl + 1), ai->ai_addr, ai->ai_addrlen); + sl->sl_sa = (struct sockaddr *)(sl + 1); + } else { + sl->sl_sa = NULL; } - freeaddrinfo(res0); - - return(error); + return (sl); } static void From nobody Thu Sep 28 15:52:29 2023 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 4RxHzx6NNVz4tyNb; Thu, 28 Sep 2023 15:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzx2m2sz4KKg; Thu, 28 Sep 2023 15:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8VnVPiYKa15UewwDN9lVhfGC3U4CUOJBccFiBC4Q6xg=; b=WnPgjwQJwd/PzYTpYIxHZaocrIKoFUw0JL23fbCsvdZ+2L/EH/lWXQDEe/xJTenqm+PUI1 pSdEECKKglcUKvEpwQIiNWzfpzWuojXhJ+s1kreczs1AYhkqpuGIm27ftecOG/HJl5kO3t GUxHDlaK+iLLqbUCtOcg9Rhi4A7YBsBx1wTUhhpU3KaeBhMAuERkexhtH85tJLg27TyUXo /vONb7BEYLcpZZRiLV5S7zTYQSvYfAD7L/o/cUc8pVtAwvo3oZfXqm4Kd3kkVfOeV32DYK PFLr0DnYX/sBbVZJwNUAnXJV+SMVrrOk7NZWD+ivUjHm3LgsUQ4CwIjsKu6HKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916349; a=rsa-sha256; cv=none; b=s7M1S54e674xdGgvoiAu5Gu9sS9B4DfjS3YEvv35TFD8BlSALcaal7rVOIZPttwWIhadxR 37InO0lshMGAeF849eEQjuVc8Pq+zbHFqe31a38sRxbPabUh7+B1ml+JiIBClvE1cRuJTO A9Lqy9X5Fo8iEUAn2xTmp3IyrMhx1/cx3YBBYteJuDJZxOA10mAhQbD9vzeZH+zAh0DCki W52poPvw88T1UNXveBNtZXty0C/labwzHLMBppuLRHz7QCaMug/CuHvGEQkDvOUFZz3YZ5 na8oDbKOjoS9R6YTtROg34DAoOJmxqiZjCiJFy/1wPrFuJHw549S6LtPiXH0pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8VnVPiYKa15UewwDN9lVhfGC3U4CUOJBccFiBC4Q6xg=; b=ai+IzKpv/nyd1MLg1c3rGo+8bGOw3vGW9RHCcYvKgdNbgeHEvF+h1AqhXCgsjnxgwUnIKt Ax9OqEETnkX2ATS1SjT2O/rtIc0Yld7HsoCe13QFTcDM/jzNXfNw5pIVpjtMbAuq3om/YX QHI5N6CG0JQi68IZjHmagxdrKahrdh7sFq7hYItQeXsKEU63JpYAvK0+pNVIU+QHR4GdRW S5kmsFPzroxGyzNG70sApRQuDUAePXJ7/ZOPgUcU909Ps2o+lsWX5ovuC8HB+h+VWbJGjK l6f/tJGEpYqqePNrc85tHJ+ZPfOhuIAH9J8TzMqrl3TqgetodU3NCB20irKFNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzx1t4zzD8t; Thu, 28 Sep 2023 15:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqTrs021815; Thu, 28 Sep 2023 15:52:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqTn2021812; Thu, 28 Sep 2023 15:52:29 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:29 GMT Message-Id: <202309281552.38SFqTn2021812@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: b772f1ce14a0 - main - syslogd: Clean up allowedpeer structure 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: b772f1ce14a0b3de6c3e9aa72e8b83696c782a3d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b772f1ce14a0b3de6c3e9aa72e8b83696c782a3d commit b772f1ce14a0b3de6c3e9aa72e8b83696c782a3d Author: Jake Freeland AuthorDate: 2023-09-01 02:49:53 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Clean up allowedpeer structure * Use boolean values in validate() and struct allowedpeer. * Remove useless peer count loop. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41365 --- usr.sbin/syslogd/syslogd.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c03acf301fd8..02c125f36f91 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -175,6 +175,7 @@ static const char include_ext[] = ".conf"; (((d)->s6_addr32[2] ^ (a)->s6_addr32[2]) & (m)->s6_addr32[2]) == 0 && \ (((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 ) #endif + /* * List of peers and sockets that can't be bound until * flags have been parsed. @@ -337,11 +338,10 @@ static TAILQ_HEAD(, deadq_entry) deadq_head = #define DQ_TIMO_INIT 2 /* - * Struct to hold records of network addresses that are allowed to log - * to us. + * Network addresses that are allowed to log to us. */ struct allowedpeer { - int isnumeric; + bool isnumeric; u_short port; union { struct { @@ -357,7 +357,6 @@ struct allowedpeer { }; static STAILQ_HEAD(, allowedpeer) aphead = STAILQ_HEAD_INITIALIZER(aphead); - /* * Intervals at which we flush out "message repeated" messages, * in seconds after previous message is logged. After each flush, @@ -458,7 +457,7 @@ static int p_open(const char *, pid_t *); static void reapchild(int); static const char *ttymsg_check(struct iovec *, int, char *, int); static void usage(void); -static int validate(struct sockaddr *, const char *); +static bool validate(struct sockaddr *, const char *); static void unmapped(struct sockaddr *); static void wallmsg(struct filed *, struct iovec *, const int iovlen); static int waitdaemon(int); @@ -3391,7 +3390,7 @@ allowaddr(char *s __unused) .ai_flags = AI_PASSIVE | AI_NUMERICHOST }; if (getaddrinfo(s, NULL, &hints, &res) == 0) { - ap->isnumeric = 1; + ap->isnumeric = true; memcpy(&ap->a_addr, res->ai_addr, res->ai_addrlen); ap->a_mask = (struct sockaddr_storage){ .ss_family = res->ai_family, @@ -3452,7 +3451,7 @@ allowaddr(char *s __unused) freeaddrinfo(res); } else { /* arg `s' is domain name */ - ap->isnumeric = 0; + ap->isnumeric = false; ap->a_name = s; if (cp1) *cp1 = '/'; @@ -3495,7 +3494,7 @@ err: /* * Validate that the remote peer has permission to log to us. */ -static int +static bool validate(struct sockaddr *sa, const char *hname) { int i; @@ -3509,15 +3508,10 @@ validate(struct sockaddr *sa, const char *hname) #endif struct addrinfo hints, *res; u_short sport; - int num = 0; - STAILQ_FOREACH(ap, &aphead, next) { - num++; - } - dprintf("# of validation rule: %d\n", num); - if (num == 0) - /* traditional behaviour, allow everything */ - return (1); + /* traditional behaviour, allow everything */ + if (STAILQ_EMPTY(&aphead)) + return (true); (void)strlcpy(name, hname, sizeof(name)); hints = (struct addrinfo){ @@ -3533,7 +3527,7 @@ validate(struct sockaddr *sa, const char *hname) } if (getnameinfo(sa, sa->sa_len, ip, sizeof(ip), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) != 0) - return (0); /* for safety, should not occur */ + return (false); /* for safety, should not occur */ dprintf("validate: dgram from IP %s, port %s, name %s;\n", ip, port, name); sport = atoi(port); @@ -3593,9 +3587,9 @@ validate(struct sockaddr *sa, const char *hname) } } dprintf("accepted in rule %d.\n", i); - return (1); /* hooray! */ + return (true); /* hooray! */ } - return (0); + return (false); } /* From nobody Thu Sep 28 15:52:30 2023 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 4RxHzy5qcwz4tyCr; Thu, 28 Sep 2023 15:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzy41Y9z4KMw; Thu, 28 Sep 2023 15:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W1FeezCVLCPz87SfU5+GZ+p9WlKyiZ6VXd4h+8+sw58=; b=BjoSoRjkR+tV1Gu0i2OSRERHZYSkQImHAGQFax3EJPqc270HctU56DZ6YV9wg+M6Ea7d+D 3mGywVGmQyP9B/6Y0cL13msYzhOX0oPIiroEmrs2lvBWmCdJRqezdSGzgI9tiQ2j+IOuth SerR9MxBKmHcQp5w4AG82ZPyd7lu8s2daguBeUTq76COflthLXCftgx5XPFh/6Eo1/Gz/l w1pJh8QNWJ8pETlS2IeVqE6rAlhycr3ux2XrYCmu8npsScuefD2P8L8t+I5OjsWjkhe9Eq WKfX3k06WZMUYm1p5i42EU4mAAPV3OCnKqsLiLGOarBSPh4UhnNivtYX+hAMeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916350; a=rsa-sha256; cv=none; b=K6yTFDkgeLZmZEkqUIji1TiYwaT6utBcu/hdL9NSl/9MyvoXfl8E5BYKLB8lznmsEl/h65 /Dy7t9l4KAuKwWVDuThFlk2hXxDwU/ElGiFsHDdBCaCIKrnsq6ehBqdtGyPsA2IA3DQWrV YiZtLN2dsDnbWRxgne08qBZP9sLcJu+Ip79l2DzuoqrvgXJRgryFudpowQ30NDvWI5XzDz NZq4xMNIYostDk5J4wFR8IGX3W2Bm7f+A+aT80pjBArOD3svaf5QYBoD/ZCqZ/P37ODhKR 7+n3sVfpommYnT/5me7sv04d449mFpvswjsF6DpiUR6jook5tvAaSn5IMQRlCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W1FeezCVLCPz87SfU5+GZ+p9WlKyiZ6VXd4h+8+sw58=; b=XYLORqWQKUtt2vLT9XCUeA+bzGG3b+x4S9sbajSCKp/7kI/ly+5epLHALqKMnMsRYhQ4WS f6IRr42NqFWB/mTE72zMN3B4NHebq3FqsHl1m/PtKYFj6EMkHDVSW3r5otQtWvhBIVL9+L NvmXDdXEQXtGig7SI6LdBSLGvipTcOAH8Tdk6gieosuhpqgidWNgueY3GYfJDmToq+qzh9 HfQn4pZ5B3q7svb/fCCMeNiIInLlpE+XV2NgXYTzcfgBbH5r5+/4S6cc1Gb5Rch1Kjj0+L YJSJN1JDl2ddGP+lGpHRiGIcUAKpRGfGUwqk89Ce0D/l1Q40YhQaDHB03hVXUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzy2t6HzCNc; Thu, 28 Sep 2023 15:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqUSg021857; Thu, 28 Sep 2023 15:52:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqUvn021854; Thu, 28 Sep 2023 15:52:30 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:30 GMT Message-Id: <202309281552.38SFqUvn021854@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: fcc1e1777d42 - main - syslogd: Simplify property filters 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: fcc1e1777d42d99d5505aa7273d73cb98c9c4ca4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fcc1e1777d42d99d5505aa7273d73cb98c9c4ca4 commit fcc1e1777d42d99d5505aa7273d73cb98c9c4ca4 Author: Jake Freeland AuthorDate: 2023-09-01 02:49:58 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Simplify property filters * Use enums for property filter properties and comparisons. * Rename property and comparison values. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41366 --- usr.sbin/syslogd/syslogd.c | 101 +++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 50 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 02c125f36f91..d1027773494f 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -222,34 +222,35 @@ struct logtime { #define RFC3164_DATELEN 15 #define RFC3164_DATEFMT "%b %e %H:%M:%S" +enum filt_proptype { + FILT_PROP_NOOP, + FILT_PROP_MSG, + FILT_PROP_HOSTNAME, + FILT_PROP_PROGNAME, +}; + +enum filt_cmptype { + FILT_CMP_CONTAINS, + FILT_CMP_EQUAL, + FILT_CMP_STARTS, + FILT_CMP_REGEX, +}; + /* * This structure holds a property-based filter */ - struct prop_filter { - uint8_t prop_type; -#define PROP_TYPE_NOOP 0 -#define PROP_TYPE_MSG 1 -#define PROP_TYPE_HOSTNAME 2 -#define PROP_TYPE_PROGNAME 3 - - uint8_t cmp_type; -#define PROP_CMP_CONTAINS 1 -#define PROP_CMP_EQUAL 2 -#define PROP_CMP_STARTS 3 -#define PROP_CMP_REGEX 4 - - uint16_t cmp_flags; -#define PROP_FLAG_EXCLUDE (1 << 0) -#define PROP_FLAG_ICASE (1 << 1) - + enum filt_proptype prop_type; + enum filt_cmptype cmp_type; + uint8_t cmp_flags; +#define FILT_FLAG_EXCLUDE (1 << 0) +#define FILT_FLAG_ICASE (1 << 1) union { char *p_strval; regex_t *p_re; } pflt_uniptr; #define pflt_strval pflt_uniptr.p_strval #define pflt_re pflt_uniptr.p_re - size_t pflt_strlen; }; @@ -1519,13 +1520,13 @@ static int evaluate_prop_filter(const struct prop_filter *filter, const char *value) { const char *s = NULL; - const int exclude = ((filter->cmp_flags & PROP_FLAG_EXCLUDE) > 0); + const int exclude = ((filter->cmp_flags & FILT_FLAG_EXCLUDE) > 0); size_t valuelen; if (value == NULL) return (-1); - if (filter->cmp_type == PROP_CMP_REGEX) { + if (filter->cmp_type == FILT_CMP_REGEX) { if (regexec(filter->pflt_re, value, 0, NULL, 0) == 0) return (exclude); else @@ -1535,31 +1536,31 @@ evaluate_prop_filter(const struct prop_filter *filter, const char *value) valuelen = strlen(value); /* a shortcut for equal with different length is always false */ - if (filter->cmp_type == PROP_CMP_EQUAL && + if (filter->cmp_type == FILT_CMP_EQUAL && valuelen != filter->pflt_strlen) return (!exclude); - if (filter->cmp_flags & PROP_FLAG_ICASE) + if (filter->cmp_flags & FILT_FLAG_ICASE) s = strcasestr(value, filter->pflt_strval); else s = strstr(value, filter->pflt_strval); /* - * PROP_CMP_CONTAINS true if s - * PROP_CMP_STARTS true if s && s == value - * PROP_CMP_EQUAL true if s && s == value && + * FILT_CMP_CONTAINS true if s + * FILT_CMP_STARTS true if s && s == value + * FILT_CMP_EQUAL true if s && s == value && * valuelen == filter->pflt_strlen * (and length match is checked * already) */ switch (filter->cmp_type) { - case PROP_CMP_STARTS: - case PROP_CMP_EQUAL: + case FILT_CMP_STARTS: + case FILT_CMP_EQUAL: if (s != value) return (!exclude); /* FALLTHROUGH */ - case PROP_CMP_CONTAINS: + case FILT_CMP_CONTAINS: if (s) return (exclude); else @@ -1685,19 +1686,19 @@ logmsg(int pri, const struct logtime *timestamp, const char *hostname, /* skip messages if a property does not match filter */ if (f->f_prop_filter != NULL && - f->f_prop_filter->prop_type != PROP_TYPE_NOOP) { + f->f_prop_filter->prop_type != FILT_PROP_NOOP) { switch (f->f_prop_filter->prop_type) { - case PROP_TYPE_MSG: + case FILT_PROP_MSG: if (evaluate_prop_filter(f->f_prop_filter, msg)) continue; break; - case PROP_TYPE_HOSTNAME: + case FILT_PROP_HOSTNAME: if (evaluate_prop_filter(f->f_prop_filter, hostname)) continue; break; - case PROP_TYPE_PROGNAME: + case FILT_PROP_PROGNAME: if (evaluate_prop_filter(f->f_prop_filter, app_name == NULL ? "" : app_name)) continue; @@ -2610,13 +2611,13 @@ init(bool reload) free(f->f_host); if (f->f_prop_filter) { switch (f->f_prop_filter->cmp_type) { - case PROP_CMP_REGEX: + case FILT_CMP_REGEX: regfree(f->f_prop_filter->pflt_re); free(f->f_prop_filter->pflt_re); break; - case PROP_CMP_CONTAINS: - case PROP_CMP_EQUAL: - case PROP_CMP_STARTS: + case FILT_CMP_CONTAINS: + case FILT_CMP_EQUAL: + case FILT_CMP_STARTS: free(f->f_prop_filter->pflt_strval); break; } @@ -2752,13 +2753,13 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* fill in prop_type */ if (strcasecmp(argv[0], "msg") == 0) - pfilter->prop_type = PROP_TYPE_MSG; + pfilter->prop_type = FILT_PROP_MSG; else if(strcasecmp(argv[0], "hostname") == 0) - pfilter->prop_type = PROP_TYPE_HOSTNAME; + pfilter->prop_type = FILT_PROP_HOSTNAME; else if(strcasecmp(argv[0], "source") == 0) - pfilter->prop_type = PROP_TYPE_HOSTNAME; + pfilter->prop_type = FILT_PROP_HOSTNAME; else if(strcasecmp(argv[0], "programname") == 0) - pfilter->prop_type = PROP_TYPE_PROGNAME; + pfilter->prop_type = FILT_PROP_PROGNAME; else { logerror("unknown property"); return (-1); @@ -2766,25 +2767,25 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* full in cmp_flags (i.e. !contains, icase_regex, etc.) */ if (*argv[1] == '!') { - pfilter->cmp_flags |= PROP_FLAG_EXCLUDE; + pfilter->cmp_flags |= FILT_FLAG_EXCLUDE; argv[1]++; } if (strncasecmp(argv[1], "icase_", (sizeof("icase_") - 1)) == 0) { - pfilter->cmp_flags |= PROP_FLAG_ICASE; + pfilter->cmp_flags |= FILT_FLAG_ICASE; argv[1] += sizeof("icase_") - 1; } /* fill in cmp_type */ if (strcasecmp(argv[1], "contains") == 0) - pfilter->cmp_type = PROP_CMP_CONTAINS; + pfilter->cmp_type = FILT_CMP_CONTAINS; else if (strcasecmp(argv[1], "isequal") == 0) - pfilter->cmp_type = PROP_CMP_EQUAL; + pfilter->cmp_type = FILT_CMP_EQUAL; else if (strcasecmp(argv[1], "startswith") == 0) - pfilter->cmp_type = PROP_CMP_STARTS; + pfilter->cmp_type = FILT_CMP_STARTS; else if (strcasecmp(argv[1], "regex") == 0) - pfilter->cmp_type = PROP_CMP_REGEX; + pfilter->cmp_type = FILT_CMP_REGEX; else if (strcasecmp(argv[1], "ereregex") == 0) { - pfilter->cmp_type = PROP_CMP_REGEX; + pfilter->cmp_type = FILT_CMP_REGEX; re_flags |= REG_EXTENDED; } else { logerror("unknown cmp function"); @@ -2835,14 +2836,14 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) return (-1); } - if (pfilter->cmp_type == PROP_CMP_REGEX) { + if (pfilter->cmp_type == FILT_CMP_REGEX) { pfilter->pflt_re = calloc(1, sizeof(*pfilter->pflt_re)); if (pfilter->pflt_re == NULL) { logerror("RE calloc() error"); free(pfilter->pflt_re); return (-1); } - if (pfilter->cmp_flags & PROP_FLAG_ICASE) + if (pfilter->cmp_flags & FILT_FLAG_ICASE) re_flags |= REG_ICASE; if (regcomp(pfilter->pflt_re, filter, re_flags) != 0) { logerror("RE compilation error"); @@ -2922,7 +2923,7 @@ cfline(const char *line, const char *prog, const char *host, exit(1); } if (*pfilter == '*') - f->f_prop_filter->prop_type = PROP_TYPE_NOOP; + f->f_prop_filter->prop_type = FILT_PROP_NOOP; else { pfilter_dup = strdup(pfilter); if (pfilter_dup == NULL) { From nobody Thu Sep 28 15:52:31 2023 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 4RxHzz5jRkz4tyQl; Thu, 28 Sep 2023 15:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxHzz4nvDz4KNV; Thu, 28 Sep 2023 15:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GXOhWIiMgFhyH2QGFj7XiWIrXiLIyv0Faq8G7088A6o=; b=GWh5D3y5EY1AfBMvsQtlwsbzzMtBGxNwAntU3NlpjY95SD8BBtN9iunELbyVJL8jaRI03T 24bGlhW5TXBln9MCkJxlDdXjYATez5LIPPR62os2C/ufW2sje2w1Ick8/XdEAW8iNnhWci W1rrxuF6WVif5JdBZ0FsfiPHKbO829+vBfNuO1NON1fOEs5E5rcNMiEBb/WpdEQ1bYNK3U PK0on5/Qh/2u69F/sZx6Vh+tinmiysVZ8aSW45TBt4cXqsrmZQJwiu5QIcG/cC/uyL5MQq ZGiLxnIFvw8wIZFcBuWXH2KwwZz1tynrsq/EmamP6T9V+ax36pNgdkofX33U2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916351; a=rsa-sha256; cv=none; b=TKKhWpdmaXkzyHwaWBjh6TmrChH0rHvRJjQAtnYOu9n2MCR1Bj1dQUWvznb76SO8CCnFQl JMXfXVfMcBggOuUYQeX8EJ4giEzYdDHSY3f7jiY0kdE+jIJNSG7S37hW82ILq6dfyGv67l h+Qj8jJhLip7Q0bjm8Ge5/iOABZbEiUzNlz6SipTMgSHgujYtYSAUsePdN+82wPG23wJ8g bbrAXWqrVaus98E2C8cRpUfkRpNrIZ6DrpVt7y84w24XNfAk+SejQFLnAe5w53J4qETOgB lmSmH9olQWWcTJVS/GsVvbm+/OiBTN5R2oQ0sGufWALCz7Syp+/VIK5RFOKfyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GXOhWIiMgFhyH2QGFj7XiWIrXiLIyv0Faq8G7088A6o=; b=GIKwmst0p1CPzgmGhirJvHFc8W5uLNQjV2LkF0OHCokuch2AvnoDTBS0ZcGCQgJ9aJEyWF TRQpS8w4vhdm3s64qIerpMkCOri5+yrT+MsMoAmQvvDsjRzV78rt0KQReqHY4qbZJWX+RP Ki1eTwudEkGhM5hAPis7CzfMcufBJo/zv65f3RnptnhvbwicBIndvpwYLjY2Qap4PpB+57 GWiRpm4vfXAYdwLQmot6I+inOAK+kWdWtcbFY50yugLymiw8ZA8W37CN5PGr38rpVQN90m R+t+0fpmSLlDiC8LEwaeZXtnaUqnNXTLqCZdeT5g+wEj//uviziPPcjdlpPrYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxHzz3tnMzDL5; Thu, 28 Sep 2023 15:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqVOu021899; Thu, 28 Sep 2023 15:52:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqVeW021896; Thu, 28 Sep 2023 15:52:31 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:31 GMT Message-Id: <202309281552.38SFqVeW021896@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: 929568b9d527 - main - syslogd: Style fixes 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 929568b9d52739679965e81b7d2f19b2d209479e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=929568b9d52739679965e81b7d2f19b2d209479e commit 929568b9d52739679965e81b7d2f19b2d209479e Author: Jake Freeland AuthorDate: 2023-09-01 02:50:03 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Style fixes Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41367 --- usr.sbin/syslogd/syslogd.c | 52 ++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index d1027773494f..22ba9deaa5d8 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -133,6 +133,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include +#include #include #include #include @@ -142,7 +143,6 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include -#include #include "pathnames.h" #include "ttymsg.h" @@ -372,8 +372,14 @@ static int repeatinterval[] = { 30, 120, 600 }; /* # of secs before flush */ } while (0) static const char *TypeNames[] = { - "UNUSED", "FILE", "TTY", "CONSOLE", - "FORW", "USERS", "WALL", "PIPE" + "UNUSED", + "FILE", + "TTY", + "CONSOLE", + "FORW", + "USERS", + "WALL", + "PIPE", }; static const int sigcatch[] = { @@ -1480,7 +1486,7 @@ skip_message(const char *name, const char *spec, int checkcase) /* Behaviour on explicit match */ if (spec == NULL) - return 0; + return (0); switch (*spec) { case '-': exclude = 1; @@ -1503,12 +1509,12 @@ skip_message(const char *name, const char *spec, int checkcase) if (prev == ',' && (next == '\0' || next == ',')) /* Explicit match: skip iff the spec is an exclusive one. */ - return exclude; + return (exclude); } /* No explicit match for this name: skip the message iff the spec is an inclusive one. */ - return !exclude; + return (!exclude); } /* @@ -1760,8 +1766,8 @@ dofsync(void) struct filed *f; STAILQ_FOREACH(f, &fhead, next) { - if ((f->f_type == F_FILE) && - (f->f_flags & FFLAG_NEEDSYNC)) { + if (f->f_type == F_FILE && + (f->f_flags & FFLAG_NEEDSYNC) != 0) { f->f_flags &= ~FFLAG_NEEDSYNC; (void)fsync(f->f_file); } @@ -2243,7 +2249,7 @@ ttymsg_check(struct iovec *iov, int iovcnt, char *line, int tmout) if ((sb.st_mode & S_IWGRP) == 0) /* Messages disabled. */ return (NULL); - return ttymsg(iov, iovcnt, line, tmout); + return (ttymsg(iov, iovcnt, line, tmout)); } static void @@ -2398,7 +2404,7 @@ parseconfigfile(FILE *cf, bool allow_includes) /* * Foreach line in the conf table, open that file. */ - include_len = sizeof(include_str) -1; + include_len = sizeof(include_str) - 1; (void)strlcpy(host, "*", sizeof(host)); (void)strlcpy(prog, "*", sizeof(prog)); (void)strlcpy(pfilter, "*", sizeof(pfilter)); @@ -2410,7 +2416,7 @@ parseconfigfile(FILE *cf, bool allow_includes) */ for (p = cline; isspace(*p); ++p) continue; - if (*p == 0) + if (*p == '\0') continue; if (allow_includes && strncmp(p, include_str, include_len) == 0 && @@ -2457,7 +2463,7 @@ parseconfigfile(FILE *cf, bool allow_includes) host[0] = *p++; while (isspace(*p)) p++; - if ((!*p) || (*p == '*')) { + if (*p == '\0' || *p == '*') { (void)strlcpy(host, "*", sizeof(host)); continue; } @@ -2474,8 +2480,9 @@ parseconfigfile(FILE *cf, bool allow_includes) } if (*p == '!') { p++; - while (isspace(*p)) p++; - if ((!*p) || (*p == '*')) { + while (isspace(*p)) + p++; + if (*p == '\0' || *p == '*') { (void)strlcpy(prog, "*", sizeof(prog)); continue; } @@ -2484,14 +2491,14 @@ parseconfigfile(FILE *cf, bool allow_includes) break; prog[i] = p[i]; } - prog[i] = 0; + prog[i] = '\0'; continue; } if (*p == ':') { p++; while (isspace(*p)) p++; - if ((!*p) || (*p == '*')) { + if (*p == '\0' || *p == '*') { (void)strlcpy(pfilter, "*", sizeof(pfilter)); continue; } @@ -2754,11 +2761,11 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* fill in prop_type */ if (strcasecmp(argv[0], "msg") == 0) pfilter->prop_type = FILT_PROP_MSG; - else if(strcasecmp(argv[0], "hostname") == 0) + else if (strcasecmp(argv[0], "hostname") == 0) pfilter->prop_type = FILT_PROP_HOSTNAME; - else if(strcasecmp(argv[0], "source") == 0) + else if (strcasecmp(argv[0], "source") == 0) pfilter->prop_type = FILT_PROP_HOSTNAME; - else if(strcasecmp(argv[0], "programname") == 0) + else if (strcasecmp(argv[0], "programname") == 0) pfilter->prop_type = FILT_PROP_PROGNAME; else { logerror("unknown property"); @@ -2868,10 +2875,11 @@ cfline(const char *line, const char *prog, const char *host, { struct filed *f; struct addrinfo hints, *res; - int error, i, pri, syncfile; + int error, i, pri; const char *p, *q; char *bp, *pfilter_dup; char buf[LINE_MAX], ebuf[100]; + bool syncfile; dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, host, pfilter); @@ -3048,10 +3056,10 @@ cfline(const char *line, const char *prog, const char *host, p++; if (*p == '-') { - syncfile = 0; + syncfile = false; p++; } else - syncfile = 1; + syncfile = true; switch (*p) { case '@': From nobody Thu Sep 28 15:52:32 2023 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 4RxJ006WpGz4tyQn; Thu, 28 Sep 2023 15:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0063Zbz4Kks; Thu, 28 Sep 2023 15:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Nng9Zi6Ccq7rfXY4VgrThQSiT2KonyjrvYmW1mXYOg=; b=RjTn/JkSpjbfgW51EOKqLVWcJ78leYI01JObAYBpgd2uXm8eI6a16MHbkm0Bb3Uy1fPxag ToD8jFDQaovJpvPglDmJAuxWced5f9Gs46u8Q/Nsq4kqC+5S8br1ghxriUOQdIjhtkI1sx DUxSrRa5tlIgJ54PFaNqFOBxIihZQRlrCUOTuPPTzQE7xU9bDeiTgaATXW5qhbZQvNPMnR QZSRlAfq/pcxK/R3lhQfa0OqPo6pc/3k2uK1v9BzCQUHlxVzlmvZXW/jBd9GIu2BSLgWis rFBXjHbXRxLLCfe9SQeI6Hz6YaA2mU+fFgCsaMJklWn0yVB/TD63q+XkTVUchA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916352; a=rsa-sha256; cv=none; b=Hjs/rsvh6a2fKvqsPLoV1VoE9x+Xp7kvD9KsTvPhpUkElR6r5pBmdE6blsAdpiqQEGiYQw FsymzBtESQJF8JcUoO0u6tpAPEZDNt1kvJt/EykXGKTtlrlIj7gBKPpb7r/sFNWm0lVYBJ MKdopSjybYUZ5enEJgMdYcIlLyVEihYwFklIXdrpk+1ayq/6EU2U+ZB4TfWFuZtLbiBBJ3 gX0pSXU9lDcBaJsXkMP+W9Ll4Sryf5go8hLahxU5qETQDl0FEg6izRS4hRWaZ0kTHiCUqR yvJqjbckCvWLYj2ORzfF/ncf8uVBCyroFnrxkTkEKqbnFB4nLJ/8hdVZhTgoNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Nng9Zi6Ccq7rfXY4VgrThQSiT2KonyjrvYmW1mXYOg=; b=F82+VRcwqbg9L4vzuNX5IyRw4ehMosz5oBXOGWCqP6IcmI76M0MpBVUGwPGZ8IRbdAtj5s /KsZMLQyD1fusKengaDG+LElkGfl8c7Bo3l45T3fkSNOdKsaT8Z2pzUBeUWZ8Qqrg7Wpoz PTcn++uXUpFoq7oSzFTi+WgiIJiUfOqJFX2ZlocHoWS5/Lvve6ggpG6Wg8OKuyK3am/kvi fJ+0ggfD+M9iK4SLpj0chWWEglKufwanztEIWvOfi/UP7qaZHrfUy2sEGYJ8rg2jnPPCpy LTvKBta4ByMpqi6W3O1YJT1Sb9MVwjUJ3aPiEM07dl3pCctzwvfp2WXREmzxJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ004y4QzCNf; Thu, 28 Sep 2023 15:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqWV2021941; Thu, 28 Sep 2023 15:52:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqWG1021938; Thu, 28 Sep 2023 15:52:32 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:32 GMT Message-Id: <202309281552.38SFqWG1021938@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: 599db1e026c7 - main - syslogd: Simplify filed structure 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 599db1e026c7bd375cd9cead34994a88fdea1761 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=599db1e026c7bd375cd9cead34994a88fdea1761 commit 599db1e026c7bd375cd9cead34994a88fdea1761 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:08 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Simplify filed structure Rearrange fields and add some comments. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41368 --- usr.sbin/syslogd/syslogd.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 22ba9deaa5d8..9498b900ed9b 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -271,52 +271,56 @@ enum f_type { * We require f_file to be valid if f_type is F_FILE, F_CONSOLE, F_TTY * or if f_type is F_PIPE and f_pid > 0. */ - struct filed { - STAILQ_ENTRY(filed) next; /* next in linked list */ enum f_type f_type; - int f_file; /* file descriptor */ - time_t f_time; /* time this was last written */ - char *f_host; /* host from which to recd. */ + + /* Used for filtering. */ + char *f_host; /* host from which to recd. */ + char *f_program; /* program this applies to */ + struct prop_filter *f_prop_filter; /* property-based filter */ u_char f_pmask[LOG_NFACILITIES+1]; /* priority mask */ u_char f_pcmp[LOG_NFACILITIES+1]; /* compare priority */ #define PRI_LT 0x1 #define PRI_EQ 0x2 #define PRI_GT 0x4 - char *f_program; /* program this applies to */ - struct prop_filter *f_prop_filter; /* property-based filter */ + + /* Logging destinations. */ + int f_file; /* file descriptor */ + int f_flags; /* file-specific flags */ +#define FFLAG_SYNC 0x01 +#define FFLAG_NEEDSYNC 0x02 union { - char f_uname[MAXUNAMES][MAXLOGNAME]; + char f_uname[MAXUNAMES][MAXLOGNAME]; /* F_WALL, F_USERS */ + char f_fname[MAXPATHLEN]; /* F_FILE, F_CONSOLE, F_TTY */ struct { char f_hname[MAXHOSTNAMELEN]; struct addrinfo *f_addr; - - } f_forw; /* forwarding address */ - char f_fname[MAXPATHLEN]; + } f_forw; /* F_FORW */ struct { char f_pname[MAXPATHLEN]; pid_t f_pid; - } f_pipe; + } f_pipe; /* F_PIPE */ } f_un; #define fu_uname f_un.f_uname +#define fu_fname f_un.f_fname #define fu_forw_hname f_un.f_forw.f_hname #define fu_forw_addr f_un.f_forw.f_addr -#define fu_fname f_un.f_fname #define fu_pipe_pname f_un.f_pipe.f_pname #define fu_pipe_pid f_un.f_pipe.f_pid + + /* Book-keeping. */ char f_prevline[MAXSVLINE]; /* last message logged */ + time_t f_time; /* time this was last written */ struct logtime f_lasttime; /* time of last occurrence */ int f_prevpri; /* pri of f_prevline */ size_t f_prevlen; /* length of f_prevline */ int f_prevcount; /* repetition cnt of prevline */ u_int f_repeatcount; /* number of "repeated" msgs */ - int f_flags; /* file-specific flags */ -#define FFLAG_SYNC 0x01 -#define FFLAG_NEEDSYNC 0x02 + STAILQ_ENTRY(filed) next; /* next in linked list */ }; static STAILQ_HEAD(, filed) fhead = STAILQ_HEAD_INITIALIZER(fhead); /* Log files that we write to */ -static struct filed consfile; /* Console */ +static struct filed consfile; /* Console */ /* From nobody Thu Sep 28 15:52:33 2023 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 4RxJ020XPwz4ty9l; Thu, 28 Sep 2023 15:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ016sSHz4KcS; Thu, 28 Sep 2023 15:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vhs3pWPOGGH72/gVPsXQGPjtyrPlzoccNSysCdipefo=; b=CSka65XQggF5zdIBKwygikWI5ppA98KjujkpZsbGjwn9fSNXxDhi5s3z//7b2x0OYWAiSY sn2KUzisY6qfceoCBNRMVficonP1Jp2eJmELfwlULC5c0hRCMrc3LFQhVp3m2Cy6Mhr0Sy WuGtFS9cwQD8b8l6G/Fva7qMPmCBU2FWwbfOAxE65BCF02vo54w+nz/Lj8Y7gyFM9h7s8N Ykx8O2pXIToBcYh7DCESK7V89TXXgu4M8p2tI2qHjBrbcW9fw/cnXYv88wXaiJstgWL9Ty RkctQwwh9EQFmzguYwz8+JUF+L6pgkbXPyl0u5HuMn59uu82qxbSfvKPwhFUOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916354; a=rsa-sha256; cv=none; b=fQpFEGvMLgxe6c0Q+++sZ32Y5WpoT0gsr+AxLOFp6yn4w9TAVhzSkuQNmLbmj41awnjM4O upuQEOIdhfUR1Vc91CgBA3Niutx7Mo5sFI44mgyWGYtz3R0oq7PKkhIzaD9OuM83G6Znzz AvFG7WZmji5Pm2IPTaTz8hnm1+/2qUHCn7ysi94oC1KfGnQS0WYlM4TOAdDsSEbI0QuDJd /GCMIoGnRxjjrifm6N/7SJ3wgFDxaQEXJT0YIrreIoe0OY+5wm+5xm+tzQQWeh+BFPi4/f NwgQtQATy9nKfgNrFcK8xD7S53hL9FJu+TXf7LrlpttkOB7BzkVrbNttBdFQMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vhs3pWPOGGH72/gVPsXQGPjtyrPlzoccNSysCdipefo=; b=yebru0GF2JIySAXxS6GoDrSzRTHiqLU0OL99APCRS8LRxSSrl69zxfatT5AuQUaPEnoSsJ IuOb/vJpCf8CYruKMjQSD/n/+9XfR+d7MpmO59tgokVAOOhXINrMt6YVe00ee6V+MPgWeO +zq2ZvRZKYpzekwNnSpn27lJolcH0SiCui5hPBcwheTdUY6WS/QVWhMc3IMX5A+ptvUEQX JAGSLQUxj6De2jeSNzvjnXkOSQq2SGRO4gZt4X2mvqX+8tEZFJqHZiKvCtDpmsHhe0JJ5n vVKz3hD4BlFHLCdgjxWi1nVap2inGozoLOViWatK1FB+azOOGNVuuNniVrobqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ015jtwzD8w; Thu, 28 Sep 2023 15:52:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqXDh021983; Thu, 28 Sep 2023 15:52:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqXnV021980; Thu, 28 Sep 2023 15:52:33 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:33 GMT Message-Id: <202309281552.38SFqXnV021980@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: 95381c0139d6 - main - syslogd: Use process descriptors 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 95381c0139d639c78c922956621cae152471a09b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=95381c0139d639c78c922956621cae152471a09b commit 95381c0139d639c78c922956621cae152471a09b Author: Jake Freeland AuthorDate: 2023-09-01 02:50:14 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Use process descriptors Prepare for program Capsicumization by storing process descriptors instead of pids. Signal delivery is not permitted in capability mode, so we can use pdkill(2) to terminate child processes. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41369 --- usr.sbin/syslogd/syslogd.c | 109 ++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 9498b900ed9b..fff45372fda8 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -107,6 +107,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include +#include #include #include #include @@ -298,7 +299,7 @@ struct filed { } f_forw; /* F_FORW */ struct { char f_pname[MAXPATHLEN]; - pid_t f_pid; + int f_procdesc; } f_pipe; /* F_PIPE */ } f_un; #define fu_uname f_un.f_uname @@ -306,7 +307,7 @@ struct filed { #define fu_forw_hname f_un.f_forw.f_hname #define fu_forw_addr f_un.f_forw.f_addr #define fu_pipe_pname f_un.f_pipe.f_pname -#define fu_pipe_pid f_un.f_pipe.f_pid +#define fu_pipe_pd f_un.f_pipe.f_procdesc /* Book-keeping. */ char f_prevline[MAXSVLINE]; /* last message logged */ @@ -327,7 +328,7 @@ static struct filed consfile; /* Console */ * Queue of about-to-be dead processes we should watch out for. */ struct deadq_entry { - pid_t dq_pid; + int dq_procdesc; int dq_timeout; TAILQ_ENTRY(deadq_entry) dq_entries; }; @@ -438,9 +439,9 @@ static void addpeer(const char *, const char *, mode_t); static void addsock(const char *, const char *, mode_t); static void cfline(const char *, const char *, const char *, const char *); static const char *cvthname(struct sockaddr *); -static void deadq_enter(pid_t, const char *); -static int deadq_remove(struct deadq_entry *); -static int deadq_removebypid(pid_t); +static void deadq_enter(int); +static void deadq_remove(struct deadq_entry *); +static bool deadq_removebypid(pid_t); static int decode(const char *, const CODE *); static void die(int) __dead2; static void dofsync(void); @@ -495,7 +496,10 @@ close_filed(struct filed *f) f->f_type = F_UNUSED; break; case F_PIPE: - f->fu_pipe_pid = 0; + if (f->fu_pipe_pd >= 0) { + deadq_enter(f->fu_pipe_pd); + f->fu_pipe_pd = -1; + } break; default: break; @@ -1944,20 +1948,16 @@ fprintlog_write(struct filed *f, struct iovlist *il, int flags) case F_PIPE: dprintf(" %s\n", f->fu_pipe_pname); iovlist_append(il, "\n"); - if (f->fu_pipe_pid == 0) { + if (f->fu_pipe_pd == -1) { if ((f->f_file = p_open(f->fu_pipe_pname, - &f->fu_pipe_pid)) < 0) { + &f->fu_pipe_pd)) < 0) { logerror(f->fu_pipe_pname); break; } } if (writev(f->f_file, il->iov, il->iovcnt) < 0) { - int e = errno; - - deadq_enter(f->fu_pipe_pid, f->fu_pipe_pname); - close_filed(f); - errno = e; logerror(f->fu_pipe_pname); + close_filed(f); } break; @@ -2260,7 +2260,7 @@ static void reapchild(int signo __unused) { int status; - pid_t pid; + pid_t pid, pipe_pid; struct filed *f; while ((pid = wait3(&status, WNOHANG, (struct rusage *)NULL)) > 0) { @@ -2270,8 +2270,16 @@ reapchild(int signo __unused) /* Now, look in list of active processes. */ STAILQ_FOREACH(f, &fhead, next) { - if (f->f_type == F_PIPE && - f->fu_pipe_pid == pid) { + if (f->f_type == F_PIPE) { + if (pdgetpid(f->fu_pipe_pd, &pipe_pid) == -1) { + dprintf("Failed to query PID: %s\n", + strerror(errno)); + continue; + } + if (pipe_pid != pid) + continue; + /* Do not enter into deadq. */ + f->fu_pipe_pd = -1; close_filed(f); log_deadchild(pid, status, f->fu_pipe_pname); break; @@ -2352,7 +2360,8 @@ die(int signo) /* flush any pending output */ if (f->f_prevcount) fprintlog_successive(f, 0); - if (f->f_type == F_PIPE && f->fu_pipe_pid > 0) + /* close our end of the pipe */ + if (f->f_type == F_PIPE) close_filed(f); } if (signo) { @@ -2608,7 +2617,6 @@ init(bool reload) close_filed(f); break; case F_PIPE: - deadq_enter(f->fu_pipe_pid, f->fu_pipe_pname); close_filed(f); break; default: @@ -3135,7 +3143,7 @@ cfline(const char *line, const char *prog, const char *host, break; case '|': - f->fu_pipe_pid = 0; + f->fu_pipe_pd = -1; (void)strlcpy(f->fu_pipe_pname, p + 1, sizeof(f->fu_pipe_pname)); f->f_type = F_PIPE; @@ -3220,7 +3228,7 @@ markit(void) switch (dq->dq_timeout) { case 0: /* Already signalled once, try harder now. */ - if (kill(dq->dq_pid, SIGKILL) != 0) + if (pdkill(dq->dq_procdesc, SIGKILL) != 0) (void)deadq_remove(dq); break; @@ -3233,7 +3241,7 @@ markit(void) * didn't even really exist, in case we simply * drop it from the dead queue). */ - if (kill(dq->dq_pid, SIGTERM) != 0) + if (pdkill(dq->dq_procdesc, SIGTERM) != 0) (void)deadq_remove(dq); else dq->dq_timeout--; @@ -3610,10 +3618,10 @@ validate(struct sockaddr *sa, const char *hname) * opposed to a FILE *. */ static int -p_open(const char *prog, pid_t *rpid) +p_open(const char *prog, int *rpd) { sigset_t sigset = { }; - int pfd[2], nulldesc; + int nulldesc, pfd[2], pd; pid_t pid; char *argv[4]; /* sh -c cmd NULL */ char errmsg[200]; @@ -3624,7 +3632,7 @@ p_open(const char *prog, pid_t *rpid) /* we are royally screwed anyway */ return (-1); - switch ((pid = fork())) { + switch ((pid = pdfork(&pd, PD_CLOEXEC))) { case -1: close(nulldesc); return (-1); @@ -3676,63 +3684,54 @@ p_open(const char *prog, pid_t *rpid) (int)pid); logerror(errmsg); } - *rpid = pid; + *rpd = pd; return (pfd[1]); } static void -deadq_enter(pid_t pid, const char *name) +deadq_enter(int pd) { struct deadq_entry *dq; - int status; - if (pid == 0) + if (pd == -1) return; - /* - * Be paranoid, if we can't signal the process, don't enter it - * into the dead queue (perhaps it's already dead). If possible, - * we try to fetch and log the child's status. - */ - if (kill(pid, 0) != 0) { - if (waitpid(pid, &status, WNOHANG) > 0) - log_deadchild(pid, status, name); - return; - } dq = malloc(sizeof(*dq)); if (dq == NULL) { logerror("malloc"); exit(1); } - *dq = (struct deadq_entry){ - .dq_pid = pid, - .dq_timeout = DQ_TIMO_INIT - }; + + dq->dq_procdesc = pd; + dq->dq_timeout = DQ_TIMO_INIT; TAILQ_INSERT_TAIL(&deadq_head, dq, dq_entries); } -static int +static void deadq_remove(struct deadq_entry *dq) { - if (dq != NULL) { - TAILQ_REMOVE(&deadq_head, dq, dq_entries); - free(dq); - return (1); - } - - return (0); + TAILQ_REMOVE(&deadq_head, dq, dq_entries); + close(dq->dq_procdesc); + free(dq); } -static int +static bool deadq_removebypid(pid_t pid) { struct deadq_entry *dq; + pid_t dq_pid; TAILQ_FOREACH(dq, &deadq_head, dq_entries) { - if (dq->dq_pid == pid) - break; + if (pdgetpid(dq->dq_procdesc, &dq_pid) == -1) { + dprintf("Failed to query PID: %s\n", strerror(errno)); + continue; + } + if (dq_pid == pid) { + deadq_remove(dq); + return (true); + } } - return (deadq_remove(dq)); + return (false); } static void From nobody Thu Sep 28 15:52:34 2023 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 4RxJ032RzGz4tyQx; Thu, 28 Sep 2023 15:52:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ030lkPz4KgC; Thu, 28 Sep 2023 15:52:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gx66RsGiBI+lLnIrrgGjvWw8O3jpF78eaBTd6FohqGQ=; b=lUsU/XVEprW9Qz2bxSGBVc5WgFJhYhN6TWFsv8qWvMaqMmKCTBhgLyVqY3z3kvzhYyMz7h S2Rr3WO1SamW+phSpRAjhaF6ynaYYrBqg8bwzwprg8Tjkl8W044gOz0DF3RROu0clrEo3c jASo1o1PT4afahRr48WI3e09B1Ehou53FR0PqtcNNO5+IHCkroyV/wPfjllhOylI2rDBMy ry7wF4d4VbFHaOv1+PfHqZZ1M1yDCWUUwz6itqjmoRslMUfUuwFTBISiADW9+vwnNnNxLy N1GEF+fAL56TCWIwj7muoqJvPYn0u9bvMapEmSsHOSOCRNMqdNAVIJBgxO0QLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916355; a=rsa-sha256; cv=none; b=qfZf45autHad1ol6DH2DYf1GRrae5cGyjO99kLBkrfBbqKJsVdTirKF09X/agDgKPhm8yY q2sNE1QhIMyugpZJmY0Lyo/fauY8w0ggOAQtUl13M32ORDQfzFzFSCFdFNu0MIpZulUEb1 jA1i5uT8Iwbtkvf49A+D9G3D4r5PPJhI8gZggTOJh0cAibQVNmtAMc27QaFTXD8VC74L9e x2jUqg7VzceLOYCXVOWnqoTGcr7Zet0QSNFyaYbuZ5bGr3ExVGUcqmmxDe5I2/5XguALR1 6POLx8iSvZkEncusZJ0YWRrinoJddHnf6K6WmvjH77X+OkLFsjQZEXsBxKe1lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gx66RsGiBI+lLnIrrgGjvWw8O3jpF78eaBTd6FohqGQ=; b=Z+xEdNVCsyBs8Ge5gfL0lAy3HkXjHIThvu7oWZd8fwvVWpnQda6SBRstBXVwBERPAWFxql y1DZBC2pI3anGIYlO4MKRjZNn8gf9GlgGVYXQXsG5x6Xdh9tzjWD48rHzTIrA06idKlclz BMd2ylQW4wz0XcjpAmfHFaMWi+QFPzCiWFXus5TgPQM11kYnQ9MTQBIZU801X0RBzcZC6A jLDE9paVhFo+dHE8b7tF0cMD8QzpUrWh4rThH42q3N+7DFjA5AAlCgYShtKW5LOhM6qrEs tnaenjMIx2i9Rod2U7AKA8lpoYmt4LWwU9ZBgUQVxSKvAXMeTfEAhqkc+8QQbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ026zJnzD68; Thu, 28 Sep 2023 15:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqYBI022028; Thu, 28 Sep 2023 15:52:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqYHt022025; Thu, 28 Sep 2023 15:52:34 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:34 GMT Message-Id: <202309281552.38SFqYHt022025@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: fe233250d6fd - main - syslogd: Do not reap child processes 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: fe233250d6fd0d4b915c89244f2b1f79cb45284e Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fe233250d6fd0d4b915c89244f2b1f79cb45284e commit fe233250d6fd0d4b915c89244f2b1f79cb45284e Author: Jake Freeland AuthorDate: 2023-09-01 02:50:19 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Do not reap child processes Use the SA_NOCLDWAIT sigaction() flag to disable the creation of zombie processes. This leaves no reason to wait() on children, so remove the reaping routine. Previously, deadq entries were removed in reapchild(). Move deadq removal into markit() after SIGKILL is sent. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41415 --- usr.sbin/syslogd/syslogd.c | 101 +++++---------------------------------------- 1 file changed, 11 insertions(+), 90 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index fff45372fda8..c20928d48495 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -441,7 +441,6 @@ static void cfline(const char *, const char *, const char *, const char *); static const char *cvthname(struct sockaddr *); static void deadq_enter(int); static void deadq_remove(struct deadq_entry *); -static bool deadq_removebypid(pid_t); static int decode(const char *, const CODE *); static void die(int) __dead2; static void dofsync(void); @@ -453,7 +452,6 @@ static void init(bool); static void logerror(const char *); static void logmsg(int, const struct logtime *, const char *, const char *, const char *, const char *, const char *, const char *, int); -static void log_deadchild(pid_t, int, const char *); static void markit(void); static struct socklist *socksetup(struct addrinfo *, const char *, mode_t); static int socklist_recv_file(struct socklist *); @@ -466,7 +464,6 @@ static int prop_filter_compile(struct prop_filter *pfilter, static void parsemsg(const char *, char *); static void printsys(char *); static int p_open(const char *, pid_t *); -static void reapchild(int); static const char *ttymsg_check(struct iovec *, int, char *, int); static void usage(void); static bool validate(struct sockaddr *, const char *); @@ -598,6 +595,7 @@ addfile(int fd) int main(int argc, char *argv[]) { + struct sigaction act = { }; sigset_t sigset = { }; struct kevent ev; struct socklist *sl; @@ -846,6 +844,14 @@ main(int argc, char *argv[]) } (void)alarm(TIMERINTVL); + /* Do not create zombie processes. */ + act.sa_flags = SA_NOCLDWAIT; + if (sigaction(SIGCHLD, &act, NULL) == -1) { + warn("failed to apply signal handler"); + pidfile_remove(pfh); + exit(1); + } + /* tuck my process id away */ pidfile_write(pfh); @@ -884,9 +890,6 @@ main(int argc, char *argv[]) case SIGALRM: markit(); break; - case SIGCHLD: - reapchild(ev.ident); - break; } break; } @@ -2256,38 +2259,6 @@ ttymsg_check(struct iovec *iov, int iovcnt, char *line, int tmout) return (ttymsg(iov, iovcnt, line, tmout)); } -static void -reapchild(int signo __unused) -{ - int status; - pid_t pid, pipe_pid; - struct filed *f; - - while ((pid = wait3(&status, WNOHANG, (struct rusage *)NULL)) > 0) { - /* First, look if it's a process from the dead queue. */ - if (deadq_removebypid(pid)) - continue; - - /* Now, look in list of active processes. */ - STAILQ_FOREACH(f, &fhead, next) { - if (f->f_type == F_PIPE) { - if (pdgetpid(f->fu_pipe_pd, &pipe_pid) == -1) { - dprintf("Failed to query PID: %s\n", - strerror(errno)); - continue; - } - if (pipe_pid != pid) - continue; - /* Do not enter into deadq. */ - f->fu_pipe_pd = -1; - close_filed(f); - log_deadchild(pid, status, f->fu_pipe_pname); - break; - } - } - } -} - /* * Return a printable representation of a host address. */ @@ -3228,19 +3199,11 @@ markit(void) switch (dq->dq_timeout) { case 0: /* Already signalled once, try harder now. */ - if (pdkill(dq->dq_procdesc, SIGKILL) != 0) - (void)deadq_remove(dq); + (void)pdkill(dq->dq_procdesc, SIGKILL); + (void)deadq_remove(dq); break; case 1: - /* - * Timed out on dead queue, send terminate - * signal. Note that we leave the removal - * from the dead queue to reapchild(), which - * will also log the event (unless the process - * didn't even really exist, in case we simply - * drop it from the dead queue). - */ if (pdkill(dq->dq_procdesc, SIGTERM) != 0) (void)deadq_remove(dq); else @@ -3715,48 +3678,6 @@ deadq_remove(struct deadq_entry *dq) free(dq); } -static bool -deadq_removebypid(pid_t pid) -{ - struct deadq_entry *dq; - pid_t dq_pid; - - TAILQ_FOREACH(dq, &deadq_head, dq_entries) { - if (pdgetpid(dq->dq_procdesc, &dq_pid) == -1) { - dprintf("Failed to query PID: %s\n", strerror(errno)); - continue; - } - if (dq_pid == pid) { - deadq_remove(dq); - return (true); - } - } - return (false); -} - -static void -log_deadchild(pid_t pid, int status, const char *name) -{ - int code; - char buf[256]; - const char *reason; - - errno = 0; /* Keep strerror() stuff out of logerror messages. */ - if (WIFSIGNALED(status)) { - reason = "due to signal"; - code = WTERMSIG(status); - } else { - reason = "with status"; - code = WEXITSTATUS(status); - if (code == 0) - return; - } - (void)snprintf(buf, sizeof buf, - "Logging subprocess %d (%s) exited %s %d.", - pid, name, reason, code); - logerror(buf); -} - static struct socklist * socksetup(struct addrinfo *ai, const char *name, mode_t mode) { From nobody Thu Sep 28 15:52:36 2023 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 4RxJ042077z4tyD5; Thu, 28 Sep 2023 15:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ041Skdz4Km3; Thu, 28 Sep 2023 15:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpaNHhMesP1diCQH6KFx+T5rklksPu7I3a8phQtpa7o=; b=DsLXqFxZ8QyK5mpa1uOVKoNQx31AgVGVBZoEgNqT5mPUDtmSu+D57KtPla75FympJnx6av ROl1VA+/FvuvjN7BrfmTRPGz7kKoWW+g09QteqiulKrqHQZ7903o7yYe7ZcfH0HV+vyV1W MMokiY2t8sN5x5m0Uoeit/6vTR5tV0sjCvlj1h4zZd3MI//Dq6DWf4+Tj8nTPCHX6S8N/H VXrk14IZE6IT5rjKqqAeG35nRBzuBIncksTjXb+/3QErRD6PFeyOki6AFS2H5pDi0DJzkV PjGfr1H4iuIk7C1fiR2egbFmYO7Oq81nbFHFHWcKUUdB4ByqP2RKneVLiMeV6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916356; a=rsa-sha256; cv=none; b=eF3Uz16Nyk9kpoU5vowh9mWgXYFUoxm1vXUHIvxt12J71RFUf4XuJOJMOItF7zaXbJWi5Z ViLlZ849+Itxhc0dYfgYL1XIUyWrtYqUNHRV7X5OOft3uljMduJsi4nWZyqLaDd/t2T3xK /3CuaLhiPfXzzIJaKjG+K7kSgHBUsWujsGdUyqChNO7R3jSCA6ry86EShvAtwc0Oi9PRtX LyCP925f84mOZpmz2EklDvGVSKsBprs43/TWS6QYV2TqNCSxrAAmiV8CUjtCSbueV6F1Zk o9TP2gp8knomdPIOlSIsY6meyrkEFyi/TDl97+6cbwAtVUqSoRjFv6Dz8Q5ODw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UpaNHhMesP1diCQH6KFx+T5rklksPu7I3a8phQtpa7o=; b=NKxqeXwKOEBmzOXsTAnPVp6ugDFuO3bGdmJ8E/wfGKZxmWjbE1Mvl9D4snrLs9001lNjCA oLh2eTAu4PFGr3X6cKUXVN0xSyAbWK7sp0pRyqhIn7OgMdPcq0lE2NX1OgHLa+Mo1cQVgt brTSXzPXSyJ1toP5I2MAjZPwXjRwrEo5u/hP6RJmmq6Q1vzs+52D/7quGXmYN7ggHYG/5P RqTPJvyhHAOUEkFTzcXMppEtB94SOtgCFxj0xzSEzNpkkjM4AiUhziq+qY1ntcEUcP2Fdv OeRt3iVwUvHBHwgg4aW23YF3WnKtFSrcKivpOII+9DAOQyN1/EMrrJSIX31UMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ040ZwxzDL7; Thu, 28 Sep 2023 15:52:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqaRG022075; Thu, 28 Sep 2023 15:52:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqaxk022072; Thu, 28 Sep 2023 15:52:36 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:36 GMT Message-Id: <202309281552.38SFqaxk022072@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: bbde787c6668 - main - syslogd: Merge loops 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: bbde787c6668803e2c4e999ef699d545b26160a6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bbde787c6668803e2c4e999ef699d545b26160a6 commit bbde787c6668803e2c4e999ef699d545b26160a6 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:26 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Merge loops Merge the two loops that traverse the global filed queue. Both loops' actions are not dependent on the other, so combining them is safe. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41370 --- usr.sbin/syslogd/syslogd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c20928d48495..a37f3a9482bf 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2575,7 +2575,10 @@ init(bool reload) * Close all open log files. */ Initialized = false; - STAILQ_FOREACH(f, &fhead, next) { + while (!STAILQ_EMPTY(&fhead)) { + f = STAILQ_FIRST(&fhead); + STAILQ_REMOVE_HEAD(&fhead, next); + /* flush any pending output */ if (f->f_prevcount) fprintlog_successive(f, 0); @@ -2593,10 +2596,7 @@ init(bool reload) default: break; } - } - while(!STAILQ_EMPTY(&fhead)) { - f = STAILQ_FIRST(&fhead); - STAILQ_REMOVE_HEAD(&fhead, next); + free(f->f_program); free(f->f_host); if (f->f_prop_filter) { From nobody Thu Sep 28 15:52:37 2023 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 4RxJ053hpHz4tyR1; Thu, 28 Sep 2023 15:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ052mxCz4KvY; Thu, 28 Sep 2023 15:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aiG+BVyiKG/kLspx18ZbFEdmiUjI7IKOrNR1CQglw44=; b=xQC3fdL3eKEOKkOQrwCeLArZvVFNt9KyJtwRlHBwmTZRSZO/ZConTH5JAnp13cQdae+DSV SSl++XwcYetejvWF29h66KvEZr7JdYIeOKiI7MA7MJtsta0maomLXCtTHec9HJ/vf7xjMH 3PkuwUlU1SplvWWR77mS6gzrIebvE1QqmG/2+KbTlWa0wmqBUvcq5yNQteVRS6UBSp7ilu CragBMOMslaiZQXLooXhfSa2AWU7VimZEpgtuANG57wCswTrIMIOIYuKGEV/unSqapIs7/ 3PHtuMHBuyxg0CN/kf2H/auB7kgAWpoUmBNiOpGyPT5hltbKw/ttwLTpWelqyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916357; a=rsa-sha256; cv=none; b=STu2T0nfj/QzWS1vAVyW8Hwlw8WPnjVOGNwU7b1HQuOllSNGZUveV2DD3sEluhXFZIO95J 2RWht/NETLWZitcqp8ViHzJVi0ielRM8Avvvq7+IGUK+YDwet2MlIftJ05fTa0aYilt9Gv fqS/xIS4Z1Sv8i0K3b0fqA7dDWryqoLGpoKioaoFsaozRnAZ7SipoyH71TTj974EYfrU51 RX980PjQANZs1xbRDKFcDdHKXOfB3XCxikdIqTm/Dmyf9qM+4OneWYIV34J1tZQKhn7mmU GhSVaGtd2qfm6F1SxpDh+4Bu7PcfpYODeq3WtmcJzkrEkAMJg4xPdJ7kNxfkkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aiG+BVyiKG/kLspx18ZbFEdmiUjI7IKOrNR1CQglw44=; b=wKxEHBZu9Qdty6fWD1bYH6DgII4dHsHJQfahlqJFEOC4FbePGqN6P3X8S7U3fvAH+ZdVj+ rXCt726Fc1svtHymUagzkfYt0vYUrseFOktSYh9+6TVx4lUXFu9GFeS04B1PaEQYU4qUym hIKTHPEcvm7LivuxpRYT8vITLk/Bm8LaShCJem13mgWawU5USIOkD7IWPcYtvwuxOzeQyi jCC+v345ta+VKg/CrmDKNsTW+oUX7kU7jgsBSICd0jPeWOVjxgkhhxiiCCMQqETPgYlX12 9zENuTKCds5QsWS8EZUk2LRZCbs0oDrGXsp9MBuKuPc6seznafdygu8J9A7y+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ051rB1zDL8; Thu, 28 Sep 2023 15:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqbLK022123; Thu, 28 Sep 2023 15:52:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqb94022120; Thu, 28 Sep 2023 15:52:37 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:37 GMT Message-Id: <202309281552.38SFqb94022120@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: cd90f3afb72a - main - syslogd: Do not print bad 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: cd90f3afb72a31415996fffd46026a74d64124ea Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd90f3afb72a31415996fffd46026a74d64124ea commit cd90f3afb72a31415996fffd46026a74d64124ea Author: Jake Freeland AuthorDate: 2023-09-01 02:50:35 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Do not print bad data If errno is zero, then buf is never filled and we're printing uninitialized data. Print the msg buffer instead to mitigate this. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41371 --- usr.sbin/syslogd/syslogd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index a37f3a9482bf..c63683efead6 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2314,7 +2314,7 @@ logerror(const char *msg) msg = buf; } errno = 0; - dprintf("%s\n", buf); + dprintf("%s\n", msg); logmsg(LOG_SYSLOG|LOG_ERR, NULL, LocalHostName, "syslogd", NULL, NULL, NULL, msg, 0); recursed--; From nobody Thu Sep 28 15:52:38 2023 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 4RxJ064bjkz4tyR3; Thu, 28 Sep 2023 15:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ063m37z4KsT; Thu, 28 Sep 2023 15:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A+ZiwWlyJ5mZ2tavvX3vLrKWTA/Ax6swOwogTwfP/1g=; b=NCaEiXNiYNV4P0NfkJFqWgR7HjNs/CqRNHBVSpLH+Urog/iBB5zwtNRWT2kossMbH0xC0t 9gnOy1yn0kRlicLuYL1hGjME+Ik56cBog18tzY7jleZ+jwKhPVOx0UvtJUoXEqrAahguA7 Sbg65qrN67w/JJ0mIVJzZuxEoDQk7mOR8zbnAecoCEzD3OFNHByDgZvpzsNzxzUNnCxq7A P6RVNhApjGsLv+KElTr8gEjND7z43jrk81wWvbsY/jVwvB3rN12dEL81I9OON9KVNOgFaB fTA7C4x6Miz1Ki+y2ceLTpFHQnN4BNYJGRXyCWXDiv8FmtQgKkY3wrSFYcc1cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916358; a=rsa-sha256; cv=none; b=raa9vK/jQhQp0rgV2GDSO8MZ8fsHpEBOuaNiTIRAWUI4wqIn/jy8afg2TwdjT1tY0el4nW zzU+WiLReKTV07SA0+SIWUF+Ax5JP/GnV7UKcwgsSmbz/OLVyPRdQEwY+TquzDlKflZtHa v+Hfiw1NF03ou7N2cSIpuTHQne3+FdWB0uKtKveTFCq64v0Pd8moTjLMQeeo+XGFi6RwI7 VVFnA1LC5ebzFKdXsDaFxIGzgTiVt0Lk7pAPBdM3mvztWNPNsK5C21gzgF0t+RJV8wAZbh 1Q2xTGcXp8o2wcLT5KNjeJYcYgr98c6QhTPmN0VSM/tEIPJQmVvC+u5tg0VTRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A+ZiwWlyJ5mZ2tavvX3vLrKWTA/Ax6swOwogTwfP/1g=; b=FYiHh7qkw5ctKtUU/gxPrseHtXM5oAnK7UPg1ZOyDGSBc//kdvsssXuuMTMr4UpciK2vg/ yxRILZ+0Tsy6p7ZJ9hB5gnUzNcpdFa9r/4OqDsnqmDH02GIQF4jm733IUcis+swhG7ZS0b 6sWrI1sDYXiBBwQbtmhRVY6lFhTiuVeQgnYDTIq8TN/T7FLC/6ABaSEg2RP7ZMtU/xHPUC QV6uVwNmblW05V5hlXIOag+p24YFBToOJ92ViuwKOKWDNEvtOVsqiBKKFuVkJRPIkTeREn EJBj4we+Q1AFo2/+5z8+EVyFROMJARURA8Twp/6xikpKhSM9N3o9Pf3raOkMqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ062smKzDL9; Thu, 28 Sep 2023 15:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqcrA022168; Thu, 28 Sep 2023 15:52:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqcEA022165; Thu, 28 Sep 2023 15:52:38 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:38 GMT Message-Id: <202309281552.38SFqcEA022165@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: 688ecad8e197 - main - syslogd: Move prop_filter allocation into function 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 688ecad8e197b1e1337de5160c56e4137276974b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=688ecad8e197b1e1337de5160c56e4137276974b commit 688ecad8e197b1e1337de5160c56e4137276974b Author: Jake Freeland AuthorDate: 2023-09-01 02:50:39 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Move prop_filter allocation into function Clean up the cfline() function by moving the prop_filter memory allocation into the prop_filter_compile() function. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41373 --- usr.sbin/syslogd/syslogd.c | 72 ++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index c63683efead6..40c233f02d7f 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -459,8 +459,7 @@ static int socklist_recv_sock(struct socklist *); static int skip_message(const char *, const char *, int); static int evaluate_prop_filter(const struct prop_filter *filter, const char *value); -static int prop_filter_compile(struct prop_filter *pfilter, - char *filterstr); +static struct prop_filter *prop_filter_compile(const char *); static void parsemsg(const char *, char *); static void printsys(char *); static int p_open(const char *, pid_t *); @@ -2707,17 +2706,31 @@ init(bool reload) /* * Compile property-based filter. - * Returns 0 on success, -1 otherwise. */ -static int -prop_filter_compile(struct prop_filter *pfilter, char *filter) +static struct prop_filter * +prop_filter_compile(const char *cfilter) { - char *filter_endpos, *p; + struct prop_filter *pfilter; + char *filter, *filter_endpos, *filter_begpos, *p; char **ap, *argv[2] = {NULL, NULL}; int re_flags = REG_NOSUB; int escaped; - bzero(pfilter, sizeof(struct prop_filter)); + pfilter = calloc(1, sizeof(*pfilter)); + if (pfilter == NULL) { + logerror("pfilter calloc"); + exit(1); + } + if (*cfilter == '*') { + pfilter->prop_type = FILT_PROP_NOOP; + return (pfilter); + } + filter = strdup(cfilter); + if (filter == NULL) { + logerror("strdup"); + exit(1); + } + filter_begpos = filter; /* * Here's some filter examples mentioned in syslog.conf(5) @@ -2738,7 +2751,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) if (argv[0] == NULL || argv[1] == NULL) { logerror("filter parse error"); - return (-1); + goto error; } /* fill in prop_type */ @@ -2752,7 +2765,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) pfilter->prop_type = FILT_PROP_PROGNAME; else { logerror("unknown property"); - return (-1); + goto error; } /* full in cmp_flags (i.e. !contains, icase_regex, etc.) */ @@ -2779,7 +2792,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) re_flags |= REG_EXTENDED; } else { logerror("unknown cmp function"); - return (-1); + goto error; } /* @@ -2791,7 +2804,7 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) filter += strspn(filter, ", \t\n"); if (*filter != '"' || strlen(filter) < 3) { logerror("property value parse error"); - return (-1); + goto error; } filter++; @@ -2823,30 +2836,33 @@ prop_filter_compile(struct prop_filter *pfilter, char *filter) /* We should not have anything but whitespace left after closing '"' */ if (*p != '\0' && strspn(p, " \t\n") != strlen(p)) { logerror("property value parse error"); - return (-1); + goto error; } if (pfilter->cmp_type == FILT_CMP_REGEX) { pfilter->pflt_re = calloc(1, sizeof(*pfilter->pflt_re)); if (pfilter->pflt_re == NULL) { logerror("RE calloc() error"); - free(pfilter->pflt_re); - return (-1); + goto error; } if (pfilter->cmp_flags & FILT_FLAG_ICASE) re_flags |= REG_ICASE; if (regcomp(pfilter->pflt_re, filter, re_flags) != 0) { logerror("RE compilation error"); - free(pfilter->pflt_re); - return (-1); + goto error; } } else { pfilter->pflt_strval = strdup(filter); pfilter->pflt_strlen = strlen(filter); } - return (0); - + free(filter_begpos); + return (pfilter); +error: + free(filter_begpos); + free(pfilter->pflt_re); + free(pfilter); + return (NULL); } /* @@ -2860,8 +2876,7 @@ cfline(const char *line, const char *prog, const char *host, struct addrinfo hints, *res; int error, i, pri; const char *p, *q; - char *bp, *pfilter_dup; - char buf[LINE_MAX], ebuf[100]; + char *bp, buf[LINE_MAX], ebuf[100]; bool syncfile; dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, @@ -2908,24 +2923,11 @@ cfline(const char *line, const char *prog, const char *host, } if (pfilter) { - f->f_prop_filter = calloc(1, sizeof(*(f->f_prop_filter))); + f->f_prop_filter = prop_filter_compile(pfilter); if (f->f_prop_filter == NULL) { - logerror("pfilter calloc"); + logerror("filter compile error"); exit(1); } - if (*pfilter == '*') - f->f_prop_filter->prop_type = FILT_PROP_NOOP; - else { - pfilter_dup = strdup(pfilter); - if (pfilter_dup == NULL) { - logerror("strdup"); - exit(1); - } - if (prop_filter_compile(f->f_prop_filter, pfilter_dup)) { - logerror("filter compile error"); - exit(1); - } - } } /* scan through the list of selectors */ From nobody Thu Sep 28 15:52:39 2023 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 4RxJ076j4rz4tyKH; Thu, 28 Sep 2023 15:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ074gDVz4LGy; Thu, 28 Sep 2023 15:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iaBoYLpHqpHO0NkD0yQtZcWOYS08mWfuTBtJOJO8ErE=; b=atXCdqiKTfhWOrP9LFVzczpVJyQY7SajI2stLBHME6JKdJtrGECE+2yFTiZveVzZAqHYhj Up/ighIrAE9VR744K7zRLp8Te/c01n50B8Vvb0C2cFcbMdrRZeC1up0zIfDO8obCz+ZLNX Tx/gLhISPd7Zsbr06X6A3Ik7tdoWzSOMKvnoel2+SG6heH6sOeD+i6PojVriPPhyCLZwpb PZgYxdHz9yTQwbtLvG8NSos8qPnVuGPg1eRmoAjtIxFb9Uvza/EM5mlEUaX+HcVoYTMAA8 maAUosqJmB5IT5B+GBbxWPhQrViVF/GJKx7jSwcuCjT/QWysudkx+khvUWn69Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916359; a=rsa-sha256; cv=none; b=aQlaZYV12ZgrLg2K8qdJQCql54sloJRWl2utFduMDMiyGrDq8Q33XuK8jqIjUF28Pj7Mes 26jRiE89YYU3ZthmYMLunCq9TFFtA0Nnsy6FPSmX9mbRr7nDedQdsmZAdBcQzIMqcLnz82 WTh0KhK1MKo59TBbyBs9QF7533v3bS3woCpF+MS7J1cRL4yfQ2gEoSYNe22dk1hyYufX+7 5RVcR7Px51Ax33H843IwUKS6A4mFoKf6a3Q4+LDmTPmid8g1Ed96ahXKnYj8jwR92N6XU3 xB2PgRPmxhBPp2eQ8hMGZSQYfgL8H68WwOPa74h7pS0Lgx6c8lmcXsm2baZpGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iaBoYLpHqpHO0NkD0yQtZcWOYS08mWfuTBtJOJO8ErE=; b=Cr8J6KFeCsFx5yGt0/ZnWS1JfIPy+RY6tUMejMDr7jPCubq+J1HwCUmvyoWRxLKYyuqiZZ G8OT3TlYYrUw0/TdPKg9xYtGV1/5sz46Mgyz4GzoSOmwVfLPLx6sDd3pSTmLkmJ9TYTpNP 77+KIK3Ynuis9cYXJPz9jd8zmhONoUgZPRoQzmPKAWZQv+lfgVCo9I+mAoN/A9Z8cTEzCZ 1gJLLraiHW2dIDIuzD44vOXruNXD1xKhZUAEoVB9MMhfw8jsQMVsD0i2cYtoeRKJKQHAU9 wDRV15qKZeVUJd+fepMLQ0fO4wKlk2Xzm7iiSt1loTPHadqIdIWmBiKxFJUvsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ073fqSzD69; Thu, 28 Sep 2023 15:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqdLR022219; Thu, 28 Sep 2023 15:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqdOL022216; Thu, 28 Sep 2023 15:52:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:39 GMT Message-Id: <202309281552.38SFqdOL022216@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: f4b4a10abb26 - main - syslogd: Move selector parsing into its own function 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f4b4a10abb2688f0fef9a0cf15117b10a7f2d398 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f4b4a10abb2688f0fef9a0cf15117b10a7f2d398 commit f4b4a10abb2688f0fef9a0cf15117b10a7f2d398 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:45 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Move selector parsing into its own function Clean up the cfline() function by moving selector parsing into its own function. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41374 --- usr.sbin/syslogd/syslogd.c | 210 ++++++++++++++++++++++----------------------- 1 file changed, 104 insertions(+), 106 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 40c233f02d7f..6c07d60b484f 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2865,6 +2865,107 @@ error: return (NULL); } +static const char * +parse_selector(const char *p, struct filed *f) +{ + int i, pri; + int pri_done = 0, pri_cmp = 0, pri_invert = 0; + char *bp, buf[LINE_MAX], ebuf[100]; + const char *q; + + /* find the end of this facility name list */ + for (q = p; *q && *q != '\t' && *q != ' ' && *q++ != '.';) + continue; + + /* get the priority comparison */ + if (*q == '!') { + pri_invert = 1; + q++; + } + while (!pri_done) { + switch (*q) { + case '<': + pri_cmp |= PRI_LT; + q++; + break; + case '=': + pri_cmp |= PRI_EQ; + q++; + break; + case '>': + pri_cmp |= PRI_GT; + q++; + break; + default: + pri_done++; + break; + } + } + + /* collect priority name */ + for (bp = buf; *q != '\0' && !strchr("\t,; ", *q); ) + *bp++ = *q++; + *bp = '\0'; + + /* skip cruft */ + while (strchr(",;", *q)) + q++; + + /* decode priority name */ + if (*buf == '*') { + pri = LOG_PRIMASK; + pri_cmp = PRI_LT | PRI_EQ | PRI_GT; + } else { + /* Ignore trailing spaces. */ + for (i = strlen(buf) - 1; i >= 0 && buf[i] == ' '; i--) + buf[i] = '\0'; + + pri = decode(buf, prioritynames); + if (pri < 0) { + errno = 0; + (void)snprintf(ebuf, sizeof ebuf, + "unknown priority name \"%s\"", buf); + logerror(ebuf); + free(f); + return (NULL); + } + } + if (!pri_cmp) + pri_cmp = UniquePriority ? PRI_EQ : (PRI_EQ | PRI_GT); + if (pri_invert) + pri_cmp ^= PRI_LT | PRI_EQ | PRI_GT; + + /* scan facilities */ + while (*p != '\0' && !strchr("\t.; ", *p)) { + for (bp = buf; *p != '\0' && !strchr("\t,;. ", *p); ) + *bp++ = *p++; + *bp = '\0'; + + if (*buf == '*') { + for (i = 0; i < LOG_NFACILITIES; i++) { + f->f_pmask[i] = pri; + f->f_pcmp[i] = pri_cmp; + } + } else { + i = decode(buf, facilitynames); + if (i < 0) { + errno = 0; + (void)snprintf(ebuf, sizeof ebuf, + "unknown facility name \"%s\"", + buf); + logerror(ebuf); + free(f); + return (NULL); + } + f->f_pmask[i >> 3] = pri; + f->f_pcmp[i >> 3] = pri_cmp; + } + while (*p == ',' || *p == ' ') + p++; + } + return (q); +} + /* * Crack a configuration file line */ @@ -2874,9 +2975,8 @@ cfline(const char *line, const char *prog, const char *host, { struct filed *f; struct addrinfo hints, *res; - int error, i, pri; + int error, i; const char *p, *q; - char *bp, buf[LINE_MAX], ebuf[100]; bool syncfile; dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, @@ -2931,110 +3031,8 @@ cfline(const char *line, const char *prog, const char *host, } /* scan through the list of selectors */ - for (p = line; *p && *p != '\t' && *p != ' ';) { - int pri_done; - int pri_cmp; - int pri_invert; - - /* find the end of this facility name list */ - for (q = p; *q && *q != '\t' && *q != ' ' && *q++ != '.'; ) - continue; - - /* get the priority comparison */ - pri_cmp = 0; - pri_done = 0; - pri_invert = 0; - if (*q == '!') { - pri_invert = 1; - q++; - } - while (!pri_done) { - switch (*q) { - case '<': - pri_cmp |= PRI_LT; - q++; - break; - case '=': - pri_cmp |= PRI_EQ; - q++; - break; - case '>': - pri_cmp |= PRI_GT; - q++; - break; - default: - pri_done++; - break; - } - } - - /* collect priority name */ - for (bp = buf; *q && !strchr("\t,; ", *q); ) - *bp++ = *q++; - *bp = '\0'; - - /* skip cruft */ - while (strchr(",;", *q)) - q++; - - /* decode priority name */ - if (*buf == '*') { - pri = LOG_PRIMASK; - pri_cmp = PRI_LT | PRI_EQ | PRI_GT; - } else { - /* Ignore trailing spaces. */ - for (i = strlen(buf) - 1; i >= 0 && buf[i] == ' '; i--) - buf[i] = '\0'; - - pri = decode(buf, prioritynames); - if (pri < 0) { - errno = 0; - (void)snprintf(ebuf, sizeof ebuf, - "unknown priority name \"%s\"", buf); - logerror(ebuf); - free(f); - return; - } - } - if (!pri_cmp) - pri_cmp = (UniquePriority) - ? (PRI_EQ) - : (PRI_EQ | PRI_GT) - ; - if (pri_invert) - pri_cmp ^= PRI_LT | PRI_EQ | PRI_GT; - - /* scan facilities */ - while (*p && !strchr("\t.; ", *p)) { - for (bp = buf; *p && !strchr("\t,;. ", *p); ) - *bp++ = *p++; - *bp = '\0'; - - if (*buf == '*') { - for (i = 0; i < LOG_NFACILITIES; i++) { - f->f_pmask[i] = pri; - f->f_pcmp[i] = pri_cmp; - } - } else { - i = decode(buf, facilitynames); - if (i < 0) { - errno = 0; - (void)snprintf(ebuf, sizeof ebuf, - "unknown facility name \"%s\"", - buf); - logerror(ebuf); - free(f); - return; - } - f->f_pmask[i >> 3] = pri; - f->f_pcmp[i >> 3] = pri_cmp; - } - while (*p == ',' || *p == ' ') - p++; - } - - p = q; - } + for (p = line; *p != '\0' && *p != '\t' && *p != ' ';) + p = parse_selector(p, f); /* skip to action part */ while (*p == '\t' || *p == ' ') From nobody Thu Sep 28 15:52:40 2023 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 4RxJ085vqSz4tyKP; Thu, 28 Sep 2023 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ085KHXz4LHP; Thu, 28 Sep 2023 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LstUF1dmLcaZ0E8sTDmZ/96tdEnLLA292yFBmmJ+Dlw=; b=DHauTtd3aRM/iQxtwZAIgpN+FgulZnLkLBcATufE7FOxJ5eCT3l1XAlPpJeGi357W1gr6p ZyljK+z1IZogI0vhLvrNO7aMK3bcm+RF5dfdSnFslHp2dFmbppu136FoVE2UNkOSeNGFD3 c452R8jJpb7wjuAFOeJSoChPKylEsoZfXIVtfWie9ZvUJYziQLvR4/Irk6E6ydkf1H9u6P SAOH9iHmCSiZebikGZQ3nRGldnnsegZf/QGjj7WKO1QWswP0Tz00/nl8jhmBR8yAY9gmM4 9dtOZIvy1dPhzVJ1M29O9x612ymrcyGT6u0fFdbuZtR8trIJ0vhp6KMKYTc6+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916360; a=rsa-sha256; cv=none; b=bHi2IsEEUt7LT3mNmPKd51nFxpr69K4ja/MgU3lqEH2L0OSPZFTxF5s5u67M5BVSkqyyyO runzB1On8WAoLLVav/yrg9ydk+zZ8/as7eqnP4GU8saMPhACOLMbC3LXY7XYt9FMcOsDE0 2uGD+GEpr4EQMu2uf1J32P6eZiOXKDxdYIMYcLvNnKtQauAoXPQ6SrpC2Y7Fz9nVWnwhn9 ySJQYlEU5FD9D4hT+dbKdHDK1V0PaEhQI1A5b848bnz63MODLMq8IiT9c9/KmG4w+Vd6uB 5AhxKzUNCp9YmnWng9cuxpgOT7oZu056e/W6cXCyopqnfcQ+KJk4zuthpGGl3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LstUF1dmLcaZ0E8sTDmZ/96tdEnLLA292yFBmmJ+Dlw=; b=JfOrLA0hpHkpdQJRPKOGX6XKfr/GJktJp2G3Bc0rVtzXUQYk34q7S8QmjVYzHl0eHj+vY/ CjbqwjzckvVV2+bIMmX6MzdvESW00o71P+PIooT+3qRHTcp0i2uR7IXnuNbryIlq0f477M qkiAh6xOtJCEF5KkxZ/p00ZIvWl1dv0pSONRDQGPSgJM/sVEG67hp2CXsbO+11mXwSLEoc 6UiLp58jzrONvgoh36ehBC2NiGNqh7A2CHv8X8alkG5DZc2WyutCMHjsECaTjnr7HKrkKy Ibsos5HFBAPhZoN7Rfs6I2QqwMtxsqdQcKhlqo2xxeLfjZwvL85J94TvaFnnHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ084PNBzCTk; Thu, 28 Sep 2023 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqeUo022271; Thu, 28 Sep 2023 15:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqeNX022268; Thu, 28 Sep 2023 15:52:40 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:40 GMT Message-Id: <202309281552.38SFqeNX022268@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: 8f49f83ef5f3 - main - syslogd: Move action parsing into its own function 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 8f49f83ef5f3059621365adc958eab560776a9f0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8f49f83ef5f3059621365adc958eab560776a9f0 commit 8f49f83ef5f3059621365adc958eab560776a9f0 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:49 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Move action parsing into its own function Clean up the cfline() function by moving action parsing into its own function. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41375 --- usr.sbin/syslogd/syslogd.c | 141 ++++++++++++++++++++++++--------------------- 1 file changed, 74 insertions(+), 67 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 6c07d60b484f..5965eb2b0252 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2966,78 +2966,14 @@ parse_selector(const char *p, struct filed *f) return (q); } -/* - * Crack a configuration file line - */ static void -cfline(const char *line, const char *prog, const char *host, - const char *pfilter) +parse_action(const char *p, struct filed *f) { - struct filed *f; struct addrinfo hints, *res; int error, i; - const char *p, *q; + const char *q; bool syncfile; - dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, - host, pfilter); - - f = calloc(1, sizeof(*f)); - if (f == NULL) { - logerror("malloc"); - exit(1); - } - errno = 0; /* keep strerror() stuff out of logerror messages */ - - for (i = 0; i <= LOG_NFACILITIES; i++) - f->f_pmask[i] = INTERNAL_NOPRI; - - /* save hostname if any */ - if (host && *host == '*') - host = NULL; - if (host) { - int hl; - - f->f_host = strdup(host); - if (f->f_host == NULL) { - logerror("strdup"); - exit(1); - } - hl = strlen(f->f_host); - if (hl > 0 && f->f_host[hl-1] == '.') - f->f_host[--hl] = '\0'; - /* RFC 5424 prefers logging FQDNs. */ - if (RFC3164OutputFormat) - trimdomain(f->f_host, hl); - } - - /* save program name if any */ - if (prog && *prog == '*') - prog = NULL; - if (prog) { - f->f_program = strdup(prog); - if (f->f_program == NULL) { - logerror("strdup"); - exit(1); - } - } - - if (pfilter) { - f->f_prop_filter = prop_filter_compile(pfilter); - if (f->f_prop_filter == NULL) { - logerror("filter compile error"); - exit(1); - } - } - - /* scan through the list of selectors */ - for (p = line; *p != '\0' && *p != '\t' && *p != ' ';) - p = parse_selector(p, f); - - /* skip to action part */ - while (*p == '\t' || *p == ' ') - p++; - if (*p == '-') { syncfile = false; p++; @@ -3140,9 +3076,80 @@ cfline(const char *line, const char *prog, const char *host, f->f_type = F_USERS; break; } - STAILQ_INSERT_TAIL(&fhead, f, next); } +/* + * Crack a configuration file line + */ +static void +cfline(const char *line, const char *prog, const char *host, + const char *pfilter) +{ + struct filed *f; + const char *p; + + dprintf("cfline(\"%s\", f, \"%s\", \"%s\", \"%s\")\n", line, prog, + host, pfilter); + + f = calloc(1, sizeof(*f)); + if (f == NULL) { + logerror("malloc"); + exit(1); + } + errno = 0; /* keep strerror() stuff out of logerror messages */ + + for (int i = 0; i <= LOG_NFACILITIES; i++) + f->f_pmask[i] = INTERNAL_NOPRI; + + /* save hostname if any */ + if (host && *host == '*') + host = NULL; + if (host) { + int hl; + + f->f_host = strdup(host); + if (f->f_host == NULL) { + logerror("strdup"); + exit(1); + } + hl = strlen(f->f_host); + if (hl > 0 && f->f_host[hl-1] == '.') + f->f_host[--hl] = '\0'; + /* RFC 5424 prefers logging FQDNs. */ + if (RFC3164OutputFormat) + trimdomain(f->f_host, hl); + } + + /* save program name if any */ + if (prog && *prog == '*') + prog = NULL; + if (prog) { + f->f_program = strdup(prog); + if (f->f_program == NULL) { + logerror("strdup"); + exit(1); + } + } + + if (pfilter) { + f->f_prop_filter = prop_filter_compile(pfilter); + if (f->f_prop_filter == NULL) { + logerror("filter compile error"); + exit(1); + } + } + + /* scan through the list of selectors */ + for (p = line; *p != '\0' && *p != '\t' && *p != ' ';) + p = parse_selector(p, f); + + /* skip to action part */ + while (*p == '\t' || *p == ' ') + p++; + parse_action(p, f); + + STAILQ_INSERT_TAIL(&fhead, f, next); +} /* * Decode a symbolic name to a numeric value From nobody Thu Sep 28 15:52:41 2023 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 4RxJ096tMZz4txtZ; Thu, 28 Sep 2023 15:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ096M99z4LMt; Thu, 28 Sep 2023 15:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJy90gNDtkSRNx+P+4cKEka5tZko8UOCWPjc5KqsbG4=; b=kwEpNYzqCoYXZiCxwRKrJESHMnhEAxSuUBqGMbQc9r0P4e/xHRSMYg6L33N9xvC/mjwFRR aX+6LsDjfAfN6qFXglPWsl+C1V9vKZTwhFgJKWYt203j+SxtNIJ0kPFo+x77JwtnVFJpmz 8s6Hq2aEs8S/A/k+QaP1nyXuechJOe9L1wxygdAqkHixoo+yZmDWNoLjfv4867Kv5tqj3E c6PBCePae2M4SCzdTMYqP+8sNA/ySZWhCDBDVrecp+5QEZr1YDdHO2ZHzO5BTLpxMlTeaV Uxeit4hi3utEu5j3b6VSAdMMo6wCE0y9WzYqHlp/GBClto+8xmzNLat8MuLQ4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916361; a=rsa-sha256; cv=none; b=m/Pr/0eGq4VYWxSo2J6B/B48UOZCMFyUwRCwRN8sZxlqbjbhl/YkCuhRP+o9JOwooKyLAN RDXwpbN2/L/k5HF9PMA8zk3ZLvNHWnQbEmyPdcD0mLTIp2ZpS3I/aiobvnmAToZir1v2Qs N0bd3+jUDze0YVY5k1v635H+AsoUUDHa09O2AA2fecmKLJ6+aiFeuPq+EJ7Z6eVt/KNUol pOAG8AFYiglEsbUiioWokXAC4vKX4V95OT2o4szNwAxZpQ3ilXpsrjXLhr8wbB6ZTrO/D8 jMugm0vSOot+A137l+Jp7dDjHn4Oi8SYQcP+RmGCOmkW+DIhg2ux9MBqTJe67A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJy90gNDtkSRNx+P+4cKEka5tZko8UOCWPjc5KqsbG4=; b=NjnhqFK8dYbfnXuXlJlJ+9MHVLG4E8V3zdYnNLCAneLmv6aG10XtrvQAgOAtk+uZMfvwHj 8//UQVv+N90xbeqAjrs14eqgg4OVg1Z/etd5IFNqT85MEHfJOFLMOVmP0t+oojll/iey3N LHGGc3ZfLzjueXTaoDuQvm+DFxHHUo6jVm9psUtM8iR5YjDtDwutQfbCq8f14wG2jG1peS fn1Ri1gCU+UM2T4+IbwBDfpTyFlvJInizP8gM45JBoOHbdoVkT4UhziE9j04K8J/V2cXWa uYF2I74GoM/mZXG5YD7lAa5UrbIptdFQcP1nhdQ1iNkfVYt49tAK2sehDPXIPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0957YFzDLB; Thu, 28 Sep 2023 15:52:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqfFr022318; Thu, 28 Sep 2023 15:52:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqfDr022315; Thu, 28 Sep 2023 15:52:41 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:41 GMT Message-Id: <202309281552.38SFqfDr022315@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: 09080d8ec52b - main - syslogd: Fix sizeof() styling 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 09080d8ec52bb37ccb1c6bd99fe6360b68225092 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=09080d8ec52bb37ccb1c6bd99fe6360b68225092 commit 09080d8ec52bb37ccb1c6bd99fe6360b68225092 Author: Jake Freeland AuthorDate: 2023-09-01 02:50:55 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Fix sizeof() styling Use parentheses when applying sizeof() per style(9). Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41376 --- usr.sbin/syslogd/syslogd.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 5965eb2b0252..659b71385087 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -809,7 +809,7 @@ main(int argc, char *argv[]) setlinebuf(stdout); consfile.f_type = F_CONSOLE; - (void)strlcpy(consfile.fu_fname, ctty + sizeof _PATH_DEV - 1, + (void)strlcpy(consfile.fu_fname, ctty + sizeof(_PATH_DEV) - 1, sizeof(consfile.fu_fname)); (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); @@ -2923,7 +2923,7 @@ parse_selector(const char *p, struct filed *f) pri = decode(buf, prioritynames); if (pri < 0) { errno = 0; - (void)snprintf(ebuf, sizeof ebuf, + (void)snprintf(ebuf, sizeof(ebuf), "unknown priority name \"%s\"", buf); logerror(ebuf); free(f); @@ -2950,7 +2950,7 @@ parse_selector(const char *p, struct filed *f) i = decode(buf, facilitynames); if (i < 0) { errno = 0; - (void)snprintf(ebuf, sizeof ebuf, + (void)snprintf(ebuf, sizeof(ebuf), "unknown facility name \"%s\"", buf); logerror(ebuf); @@ -3461,11 +3461,11 @@ allowaddr(char *s __unused) printf("numeric, "); getnameinfo(sstosa(&ap->a_addr), (sstosa(&ap->a_addr))->sa_len, - ip, sizeof ip, NULL, 0, NI_NUMERICHOST); + ip, sizeof(ip), NULL, 0, NI_NUMERICHOST); printf("addr = %s, ", ip); getnameinfo(sstosa(&ap->a_mask), (sstosa(&ap->a_mask))->sa_len, - ip, sizeof ip, NULL, 0, NI_NUMERICHOST); + ip, sizeof(ip), NULL, 0, NI_NUMERICHOST); printf("mask = %s; ", ip); } else { printf("domainname = %s; ", ap->a_name); @@ -3513,8 +3513,8 @@ validate(struct sockaddr *sa, const char *hname) if (getaddrinfo(name, NULL, &hints, &res) == 0) freeaddrinfo(res); else if (strchr(name, '.') == NULL) { - strlcat(name, ".", sizeof name); - strlcat(name, LocalDomain, sizeof name); + strlcat(name, ".", sizeof(name)); + strlcat(name, LocalDomain, sizeof(name)); } if (getnameinfo(sa, sa->sa_len, ip, sizeof(ip), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) != 0) @@ -3648,7 +3648,7 @@ p_open(const char *prog, int *rpd) */ if (fcntl(pfd[1], F_SETFL, O_NONBLOCK) == -1) { /* This is bad. */ - (void)snprintf(errmsg, sizeof errmsg, + (void)snprintf(errmsg, sizeof(errmsg), "Warning: cannot change pipe to PID %d to " "non-blocking behaviour.", (int)pid); From nobody Thu Sep 28 15:52:42 2023 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 4RxJ0C0gKxz4tyRB; Thu, 28 Sep 2023 15:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0C0Bsqz4LJd; Thu, 28 Sep 2023 15:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QDgjUIMAeloC6Nhn8AC5tAmaDn//SlTOIPSlN4lOVtQ=; b=GZeHQeS2jqZuQL3EKzDW1g3rGUZV5EcR/+aZ5uUfrutNw8yNwz7naZqUiG14c8Zqe7zMg5 RYxHPtBD/5S5zYORszXKFm+YUjH2C195Ef7ziUz5oC4pPB980DJUEO3FCI03kylrud15Am wonZiiJNOhkt+FLFCpsVsNgbUTvs1dwyAnL7huFgtvNMB44VD3PrUC+GZxQwH5KQIjc1Rs qkrujB7tjUF/Idj/wNpSNUrcGEMim9Fy7DPDIvhSG0cnDEIY1gw4k398td6+6dtczXWhN5 uM4YYCbO4I+XzRUiCf9W8s4awPAB1JcZesQjMMDuPqIuZFvUa0BQL36MJempqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916363; a=rsa-sha256; cv=none; b=JZdNQo9nfnTg5KvK/mXy9HFmihT+6pvjHfPOqq079z6VEpR+kIyIGjRaYq2IdUk17ooQtm sa0Uk3yHUGzxHDc70Do/Su7oSuRosKRaRCTxOdUjmibKKEnrLss2MOS1D2SxjqQd052KHC 37mG0CpzHz7ASGTltV290Pt1tRXrpc7MU/ERKQzMSYkeiRy+hed69gQbR6bRHa40+7S30E uckGOFqNnpMnbHJvQB7IyxLKdpuu3YQZKVr0Mk+wDp0peOq/pRD6pCLS4GMajKl22jSC/S WCWNqLLZ6Y5oFAgWP40XLRpPJYSrIJRNufqWjAFvnRcCWJK0+w3cQGFWvL1AYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QDgjUIMAeloC6Nhn8AC5tAmaDn//SlTOIPSlN4lOVtQ=; b=C/Lkzv4/a6nESjSKv3fmDNzKILC22ohVx9Xnee6x9lhWsdszhU0P/QlmoODw0h0A/KQyc3 1/KiJUBMQozHXktJcnB/5cGoLK/LHuJjrV/+K+9/53cfi2bdOJ8pxbGZUpEbsXFWgK9nhD U6WYVyLghk33lIJq+rxP7NM4EsosDo+rwEOccqFSSfcjzZXelGt7dCy+piZY5Dpcm5TpNB FMU6nkOqvGNulrytEnkYHQpRaFVx5ef+hb7h779t5HKPLmtNqW45uXTpnH22SXB17OF2uI kczqRcAFVJJniT9WN/EwNIZ7B63NMeKGJMEfO3Pm+UC24YjiHJppNSHOxFk2NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0B6M8kzD8y; Thu, 28 Sep 2023 15:52:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqgrL022360; Thu, 28 Sep 2023 15:52:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqgF3022357; Thu, 28 Sep 2023 15:52:42 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:42 GMT Message-Id: <202309281552.38SFqgF3022357@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: 3854dd52a3d3 - main - syslogd: Add closelogfiles() function 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 3854dd52a3d3ff4a7a298fba10c96c8988fb814d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3854dd52a3d3ff4a7a298fba10c96c8988fb814d commit 3854dd52a3d3ff4a7a298fba10c96c8988fb814d Author: Jake Freeland AuthorDate: 2023-09-01 02:51:00 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: Add closelogfiles() function The closelogfiles() function completely disassembles the global filed list by freeing all filed components and removing them from the list. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41388 --- usr.sbin/syslogd/syslogd.c | 96 ++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 659b71385087..d317afa73844 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -2520,6 +2520,54 @@ readconfigfile(const char *path) } } +/* + * Close all open log files. + */ +static void +closelogfiles(void) +{ + struct filed *f; + + while (!STAILQ_EMPTY(&fhead)) { + f = STAILQ_FIRST(&fhead); + STAILQ_REMOVE_HEAD(&fhead, next); + + /* flush any pending output */ + if (f->f_prevcount) + fprintlog_successive(f, 0); + + switch (f->f_type) { + case F_FILE: + case F_FORW: + case F_CONSOLE: + case F_TTY: + case F_PIPE: + close_filed(f); + break; + default: + break; + } + + free(f->f_program); + free(f->f_host); + if (f->f_prop_filter) { + switch (f->f_prop_filter->cmp_type) { + case FILT_CMP_REGEX: + regfree(f->f_prop_filter->pflt_re); + free(f->f_prop_filter->pflt_re); + break; + case FILT_CMP_CONTAINS: + case FILT_CMP_EQUAL: + case FILT_CMP_STARTS: + free(f->f_prop_filter->pflt_strval); + break; + } + free(f->f_prop_filter); + } + free(f); + } +} + /* * INIT -- Initialize syslogd from configuration table */ @@ -2527,7 +2575,6 @@ static void init(bool reload) { int i; - struct filed *f; char *p; char oldLocalHostName[MAXHOSTNAMELEN]; char hostMsg[2*MAXHOSTNAMELEN+40]; @@ -2570,56 +2617,15 @@ init(bool reload) unsetenv("TZ"); } - /* - * Close all open log files. - */ Initialized = false; - while (!STAILQ_EMPTY(&fhead)) { - f = STAILQ_FIRST(&fhead); - STAILQ_REMOVE_HEAD(&fhead, next); - - /* flush any pending output */ - if (f->f_prevcount) - fprintlog_successive(f, 0); - - switch (f->f_type) { - case F_FILE: - case F_FORW: - case F_CONSOLE: - case F_TTY: - close_filed(f); - break; - case F_PIPE: - close_filed(f); - break; - default: - break; - } - - free(f->f_program); - free(f->f_host); - if (f->f_prop_filter) { - switch (f->f_prop_filter->cmp_type) { - case FILT_CMP_REGEX: - regfree(f->f_prop_filter->pflt_re); - free(f->f_prop_filter->pflt_re); - break; - case FILT_CMP_CONTAINS: - case FILT_CMP_EQUAL: - case FILT_CMP_STARTS: - free(f->f_prop_filter->pflt_strval); - break; - } - free(f->f_prop_filter); - } - free(f); - } - + closelogfiles(); readconfigfile(ConfFile); Initialized = true; if (Debug) { + struct filed *f; int port; + STAILQ_FOREACH(f, &fhead, next) { for (i = 0; i <= LOG_NFACILITIES; i++) if (f->f_pmask[i] == INTERNAL_NOPRI) From nobody Thu Sep 28 15:52:43 2023 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 4RxJ0D2yCTz4tyWp; Thu, 28 Sep 2023 15:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0D1228z4LLg; Thu, 28 Sep 2023 15:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2p2MZepxBQtEecnqY9gGt836faRkL429Nas+a1aCiQ=; b=Qps3tFOUVq6qNfmaNAm+nJmfgGw5S8qvgsyG2GOEOf4aPoffipAI0u+F5lZ5wFtEJwgbQm 8BZBe+G/shT2iao8IDbnWoLmSwGhtyX+6InhPIe4J0yKU+BN+Y8kvtXP7OIEOL/ur1A6AL ksAEmoOm9SE1OAueQVPYh9c2wiivV0ErnK1aIyZGQfG4te3JxSm6GvT9NKOsPwlWCP9bqO mJfP542ZsOAbvG1SlLViJtQhTagSC7mdG6VmsiB+AEOvS8urWJqrHvO3+bQGdyTxlan22l 3qcvadZjDdBvDDifEnGGInWjDR6MHSPR40p0iGCkyN+hX/6LfdSUwc6aUBQ3/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916364; a=rsa-sha256; cv=none; b=OeklR43J+h2+jp5aPHa0gL0+ocLdXu0s+jnocz3ksWPS3GSXa0nLRgLeZnvfs2O7boegU+ vz9jIdp6iUjSO3PwVORI+Qr3XJwN8pP7Inv310VhuFN9u5Fb5HQL2VXC6INyRkR8yeiYf4 Hll1A37pW3O3RzL9rk2sBWFinfdvBCYb48ek/guRqo1CwenDwyBA7CjKxMK6RDZlsjJ3ry XQzsf5zy05hAHtiNgNa3c0oYVrfkBLx5yIpc0OmgG9tLfW2T7bnPGi3OB3kERgWQHAHx9H bvs4LrjZMHxZGv75poAeglt5SatS8Ao3t96fLbEzN+xi5QwUkhh092BHVKQWSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2p2MZepxBQtEecnqY9gGt836faRkL429Nas+a1aCiQ=; b=LYflaOM5gbIKb8fS/pyPt4pVEteZkJLcSU1rHAo6giIPtgb6UbdM3re6/mf5sfzKvsPqZJ RplcZyJurvoRXgkpJ6jAdAboYd3ukgipEWDREUNZgTkzA6QVW128NuUCmy6C0SNODTlZVa RBVLTpBuK9ugM1Ugw3RuMQ2QJZK0jnekwejcEgUyVwEFlKSI6FiEYjCylLclTLcI8LOJSA 2CcXmDShDMfWzAyHJ3YiUzryq2y1yu3NzHdUg9WyQYG5JZ7MQ6scxEi3omSpHpuBH6hKNQ ozRCE55xGqlfKaChJ7HhuAjYXjVOf8rS8JPladWsz0gTxRF0ybtek5MGd/p51w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0D06gCzDJ8; Thu, 28 Sep 2023 15:52:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqh7r022399; Thu, 28 Sep 2023 15:52:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqhZF022396; Thu, 28 Sep 2023 15:52:43 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:43 GMT Message-Id: <202309281552.38SFqhZF022396@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: 5b44c24f8524 - main - syslogd: unlink() -> unlinkat() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 5b44c24f8524558b4e4c4c24dc465e9f4eed5ae9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5b44c24f8524558b4e4c4c24dc465e9f4eed5ae9 commit 5b44c24f8524558b4e4c4c24dc465e9f4eed5ae9 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:06 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:53 +0000 syslogd: unlink() -> unlinkat() Save basename and dirname for use in unlinkat() when removing UNIX sockets from fs. Reviewed by: markj, emaste MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41379 --- usr.sbin/syslogd/syslogd.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index d317afa73844..5ccea8ce424b 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -130,6 +130,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include +#include #include #include #include @@ -198,7 +199,8 @@ struct socklist { #define sl_salen sl_ai.ai_addrlen #define sl_family sl_ai.ai_family int sl_socket; - const char *sl_name; + char *sl_name; + int sl_dirfd; int (*sl_recv)(struct socklist *); STAILQ_ENTRY(socklist) next; }; @@ -2341,8 +2343,12 @@ die(int signo) logerror(buf); } STAILQ_FOREACH(sl, &shead, next) { - if (sl->sl_sa != NULL && sl->sl_family == AF_LOCAL) - unlink(sl->sl_name); + if (sl->sl_sa != NULL && sl->sl_family == AF_LOCAL) { + if (unlinkat(sl->sl_dirfd, sl->sl_name, 0) == -1) { + dprintf("Failed to unlink %s: %s", sl->sl_name, + strerror(errno)); + } + } } pidfile_remove(pfh); @@ -3782,7 +3788,16 @@ socksetup(struct addrinfo *ai, const char *name, mode_t mode) if (sl == NULL) err(1, "malloc failed"); sl->sl_socket = s; - sl->sl_name = name; + if (ai->ai_family == AF_LOCAL) { + char *name2 = strdup(name); + if (name2 == NULL) + err(1, "strdup failed"); + sl->sl_name = strdup(basename(name2)); + sl->sl_dirfd = open(dirname(name2), O_DIRECTORY); + if (sl->sl_name == NULL || sl->sl_dirfd == -1) + err(1, "failed to save dir info for %s", name); + free(name2); + } sl->sl_recv = sl_recv; (void)memcpy(&sl->sl_ai, ai, sizeof(*ai)); if (ai->ai_addrlen > 0) { From nobody Thu Sep 28 15:52:45 2023 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 4RxJ0F3pCVz4tyTQ; Thu, 28 Sep 2023 15:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0F23q0z4LVQ; Thu, 28 Sep 2023 15:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5nPGGzR1okCfIpeJvPGZzV3+QEmdhW9QFkeDwuWYIY=; b=Gjyg/djthN8pd2i2J6h4R9P++Dn7J1VQkh0HVWvpMtjIbY/ZWBHA9V/wPRV2sxGs2Pu4fV vCWdUnf7OvWEsN9nch/Ypkv9dVajNlfFaDgzZv0PhLORLs97TiVQytGZo0a+d0E3LpOD/M bRXZkyodnVIhcNnZqjPAXHD2DoRjwkWg1ilwtGEfGC3HZQDxjkaJL29mfq9mmlWt/mSwE5 6cHSHeLa3/6pMiyGtCLhUl8BC0xUUkruZ8WERVYDVLhiQfyMK4Xf0rm+TKMzCUA8AjKE90 2RmNp/vU5P1bS8i/QTh3PICnKuPboqCg+CCq+qdhAbOU+iaDyOLIgZBItZ30Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916365; a=rsa-sha256; cv=none; b=kYZXxxXKji23+kTa8z2WHLLdP1W7io+n2qDnO0pdtPIv7yLR98BIhAIht2WmUSbOPNe/7l VU1jI1mOTMxZfj7d9Llv0D41+npdGjyr20zkWHAnoZJCnv/K7dLiT2MLVfPQPJkfI9P39g YMioiIfPB/A38Wd5c2W1s1L+HrWyp7jRx0wQVggyhMbpwzdJ/SL6I8DTiLpYDksGa9TgiI rxJIfkBKyoDeoLlwUG5YrnVa3D1eZPJ7UGd981dbZ+pDAPMzKhYhrxdm9ZRdC//ZPHqC+O zIjetzzM0iFoM4n25+jQk4EiUeUXKUUAQntGGBP6MmdOQELujdWml4WLh25M0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s5nPGGzR1okCfIpeJvPGZzV3+QEmdhW9QFkeDwuWYIY=; b=b5anzByTL/ETjHTzLUoihZV5AtfCvbgnKcR+N/ezjDd1cdQmjP89T94dpLIBHXslvr8EB6 9qRIhgInw2ycRsEeewe18cVaQvV4gGEWtNxNv/xW4+ONlvoSizlffJjrtqraOHJGNZW7v9 TXST/azzd79QBmTq18uw8aGNCFXsUu7SwFyoI37CEWzZnhHYxyF27LiFYX5HbsVdyrUr6f elEgxFNE8M4n4WnIycbREdxzvb3zvbdcwTaJwG93jISGC7IP3xynM9tHaYQ0GCvyA04RWi wGgPzXndrm3JKj6RdYgLEfhguoiaAZCp1UHdf7gRDznJ9DI6w36N+m/LsVynlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0F19mNzCTm; Thu, 28 Sep 2023 15:52:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqjif022448; Thu, 28 Sep 2023 15:52:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqjBL022445; Thu, 28 Sep 2023 15:52:45 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:45 GMT Message-Id: <202309281552.38SFqjBL022445@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: c3175a6e1c5a - main - syslogd: Do not open console 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: c3175a6e1c5a4b6337368ea140e3a3837b327ef2 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c3175a6e1c5a4b6337368ea140e3a3837b327ef2 commit c3175a6e1c5a4b6337368ea140e3a3837b327ef2 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:12 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Do not open console descriptor Setup consfile filed for logging while Initialized is false, but do not bother opening the console. Close console/tty descriptors after parsing, as well. The ttymsg() function will re-open these descriptors for us. Also, remove references to the ctty global variable since it will always be _PATH_CONSOLE. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41380 --- usr.sbin/syslogd/syslogd.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 5ccea8ce424b..9f4c21cab026 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -154,7 +154,6 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; static const char *ConfFile = _PATH_LOGCONF; static const char *PidFile = _PATH_LOGPID; -static const char ctty[] = _PATH_CONSOLE; static const char include_str[] = "include"; static const char include_ext[] = ".conf"; @@ -800,6 +799,12 @@ main(int argc, char *argv[]) if (Sflag == 0) addsock(_PATH_LOG_PRIV, NULL, S_IRUSR | S_IWUSR); + consfile.f_type = F_CONSOLE; + consfile.f_file = -1; + (void)strlcpy(consfile.fu_fname, _PATH_CONSOLE + sizeof(_PATH_DEV) - 1, + sizeof(consfile.fu_fname)); + (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); + if ((!Foreground) && (!Debug)) { ppid = waitdaemon(30); if (ppid < 0) { @@ -810,11 +815,6 @@ main(int argc, char *argv[]) } else if (Debug) setlinebuf(stdout); - consfile.f_type = F_CONSOLE; - (void)strlcpy(consfile.fu_fname, ctty + sizeof(_PATH_DEV) - 1, - sizeof(consfile.fu_fname)); - (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); - kq = kqueue(); if (kq == -1) { warn("failed to initialize kqueue"); @@ -1651,20 +1651,9 @@ logmsg(int pri, const struct logtime *timestamp, const char *hostname, /* log the message to the particular outputs */ if (!Initialized) { - f = &consfile; - /* - * Open in non-blocking mode to avoid hangs during open - * and close(waiting for the port to drain). - */ - f->f_file = open(ctty, O_WRONLY | O_NONBLOCK, 0); - - if (f->f_file >= 0) { - f->f_lasttime = *timestamp; - fprintlog_first(f, hostname, app_name, procid, msgid, - structured_data, msg, flags); - close(f->f_file); - f->f_file = -1; - } + consfile.f_lasttime = *timestamp; + fprintlog_first(&consfile, hostname, app_name, procid, + msgid, structured_data, msg, flags); return; } @@ -3049,12 +3038,15 @@ parse_action(const char *p, struct filed *f) if (syncfile) f->f_flags |= FFLAG_SYNC; if (isatty(f->f_file)) { - if (strcmp(p, ctty) == 0) + if (strcmp(p, _PATH_CONSOLE) == 0) f->f_type = F_CONSOLE; else f->f_type = F_TTY; (void)strlcpy(f->fu_fname, p + sizeof(_PATH_DEV) - 1, sizeof(f->fu_fname)); + /* This will be reopened by ttymsg(). */ + close(f->f_file); + f->f_file = -1; } else { (void)strlcpy(f->fu_fname, p, sizeof(f->fu_fname)); f->f_type = F_FILE; From nobody Thu Sep 28 15:52:46 2023 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 4RxJ0G4DC6z4tyWw; Thu, 28 Sep 2023 15:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0G3QrJz4Lgf; Thu, 28 Sep 2023 15:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=usrmWjhLd+PqRUrijKB9Uot7by5eIeWEBULkdEv/Kkk=; b=AkSCAKmez5hOp2pPmvbl/TycdrzoQ+irPjwPwpL9i1jinybcbpMem5xDYF462tkkIpU2aA HiHHoXBmWpyDo35yadnWSKCiancf7V9JVWHZjMjNfZpFTjJPfb0y0GjfUyA8lf3mdN8rH2 7Pj8K0/TTq7VTq9Uhykt/+UaUCkfSuAkltNO1VgUcdMuRwZfOq2o6JgIIxDunPKDiyykIa 8M4y9+dB6YYCJxJT8L65rHscoXcp/lfuHBjCP69t2aHXovVC9JLExX9x+4txrdEduPoOhH fg63npV0CWzehy7yuIXdE9oX7N4X/W3m7MVPIO/wFFcnyo7UJ8IeKy8a3oKCCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916366; a=rsa-sha256; cv=none; b=ri3pgBCksWd5Otjki/VFbNMyRuM/T0LgBc98PytSKKhcP4tUl7hrWonQMKY9d9898nR8rB MqXH3C7XSaTEGr00hew9LHxoptpqrlc8Fo07NhcnniePFlZK2dX4vnaUx4f2LH02V8AZ7j LFDyusKOiL4GSLHDHhkU0tl72NHG7iu3WC2E69pEylyZEEb6rsyWeQmtYFSVCzR8VoQTo5 dhkg4WGUBPaa7vyDe96HE3MtAkoGbMLPpDj2AamTfYnVIl1ir6e2x5ethNdZSmVyYPbA/n 78OVm2043utAYzk3U/2cBnby22Oi+XZc1WM5AYzaXNg/LREiiwd1yxWGooBm9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=usrmWjhLd+PqRUrijKB9Uot7by5eIeWEBULkdEv/Kkk=; b=iKTEWTyB53ERCi7skSOBUi1Sr5q21DS1d88h/8LgXUYLfnSqSCgdmF3m1ty6X4YE96AdZg 1rWeLs2tmbTSmx179pEjkJwgEdeUaaS3scU1L5PafnpbwgdGttqfG6Zw2kwFUlMLeyPXOy NIbIsktJIfSqDHO5rXcJuj74ZmjvRJNEKV5qWBN3v7Na3gI6IBH4jjQOynqpkkznKvBCNv bcZxe7gQTNaYs68c4OdJT/pW2UuV4gZrPpKAG6aENlmnFMLg3OT0UfjJCuBoILL5Fy/b7N 8xkBGM7zf0L5VRbAgsd9Tc1himVq9X6YcuI2zzo0NUOdYo8AjdCZajqVQSJ6gA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0G2BqczCy1; Thu, 28 Sep 2023 15:52:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqk5m022490; Thu, 28 Sep 2023 15:52:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqkQe022487; Thu, 28 Sep 2023 15:52:46 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:46 GMT Message-Id: <202309281552.38SFqkQe022487@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: 7428ebfe7e25 - main - syslogd: Pre-open null file 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 7428ebfe7e25d56e2a5853d36d2c34c54a2f4db3 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7428ebfe7e25d56e2a5853d36d2c34c54a2f4db3 commit 7428ebfe7e25d56e2a5853d36d2c34c54a2f4db3 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:17 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Pre-open null file descriptor Open _PATH_DEVNULL before entering capability mode. Access to /dev/null is needed for dup2() when piping commands. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41381 --- usr.sbin/syslogd/syslogd.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 9f4c21cab026..2ff39d8c3676 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -398,6 +398,7 @@ static const int sigcatch[] = { SIGCHLD, }; +static int nulldesc; /* /dev/null descriptor */ static bool Debug; /* debug flag */ static bool Foreground = false; /* Run in foreground, instead of daemonizing */ static bool resolve = true; /* resolve hostname */ @@ -803,6 +804,14 @@ main(int argc, char *argv[]) consfile.f_file = -1; (void)strlcpy(consfile.fu_fname, _PATH_CONSOLE + sizeof(_PATH_DEV) - 1, sizeof(consfile.fu_fname)); + + nulldesc = open(_PATH_DEVNULL, O_RDWR); + if (nulldesc == -1) { + warn("cannot open %s", _PATH_DEVNULL); + pidfile_remove(pfh); + exit(1); + } + (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); if ((!Foreground) && (!Debug)) { @@ -3235,7 +3244,6 @@ markit(void) static int waitdaemon(int maxwait) { - int fd; int status; pid_t pid, childpid; @@ -3266,13 +3274,9 @@ waitdaemon(int maxwait) return (-1); (void)chdir("/"); - if ((fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { - (void)dup2(fd, STDIN_FILENO); - (void)dup2(fd, STDOUT_FILENO); - (void)dup2(fd, STDERR_FILENO); - if (fd > STDERR_FILENO) - (void)close(fd); - } + (void)dup2(nulldesc, STDIN_FILENO); + (void)dup2(nulldesc, STDOUT_FILENO); + (void)dup2(nulldesc, STDERR_FILENO); return (getppid()); } @@ -3595,20 +3599,16 @@ static int p_open(const char *prog, int *rpd) { sigset_t sigset = { }; - int nulldesc, pfd[2], pd; + int pfd[2], pd; pid_t pid; char *argv[4]; /* sh -c cmd NULL */ char errmsg[200]; if (pipe(pfd) == -1) return (-1); - if ((nulldesc = open(_PATH_DEVNULL, O_RDWR)) == -1) - /* we are royally screwed anyway */ - return (-1); switch ((pid = pdfork(&pd, PD_CLOEXEC))) { case -1: - close(nulldesc); return (-1); case 0: @@ -3639,7 +3639,6 @@ p_open(const char *prog, int *rpd) (void)execvp(_PATH_BSHELL, argv); _exit(255); } - close(nulldesc); close(pfd[0]); /* * Avoid blocking on a hung pipe. With O_NONBLOCK, we are From nobody Thu Sep 28 15:52:47 2023 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 4RxJ0H4xJ5z4tyF9; Thu, 28 Sep 2023 15:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0H3xRdz4LPf; Thu, 28 Sep 2023 15:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EQWmUsoss9uS1ZxShm7ADGNm8hNDLoAUz+WGoGQM3WM=; b=Vch+GwE9IiALTCkz+6OJH31cNuw97Q8KmSwTmjY26jhwgAkP9e7EkHANJAPDpk6oV/GRgX 2rBm73O81RDz4zg/I/fmlKRhlKICSAvnMcy1jpwHwakurvPKTXC+F5knxwoHImWWyVN878 sL1ylzFW+sOVCj8TUjVCPu+tkf29i8Fvxbb0ptE2LSofRoDJ/lwC2z00btCi8YMRmrkuCA Mjk6RcD8TStaPLqt4sLJiuk67DzSvqTx4fIDnHquXYbAFHmtvwJpbf9yDX69bb8+0+x2dQ DWK9pExC6wMG/bxFwoCaaknZG7h0uRW79Zptkp6X0Lkyg/d581LEwvep9k0Q/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916367; a=rsa-sha256; cv=none; b=uMXmuj30AZB1LCtyO+e/xcIz5uNZWKMIonY1Tp29jsNFwAGwwtd5dYhJJeJlhPAwFL6c1o BZupRV3EsfQpkXCLjgnt/1rlRpQRhJAp+slpJFlXtWMA1iEmC68MK5I5rszJyEblTGsY5F xqphOldO4gp6MCNUfMgnJfXsO8vD1tyPUWE/xXKEQOsDQ/V/JLPbLAdTStAoJtbo1uz6k3 24PMIps7YegNz39pCC/4WfJgOdYwlISO/fasOeEC2aeRXyBmEkBj5orPrD0tA/T3zgUO4s KFK0Q4MwAWd8PuP6XD//OvRyCJ/lFQaIB+Hp9yvoJc6vWQyN0a+1VvCvm5Gfig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EQWmUsoss9uS1ZxShm7ADGNm8hNDLoAUz+WGoGQM3WM=; b=rOSP3toenT0ZTC9mP3G2Pts6uASEfegAm/kV1Hj5xFWEt4qpYOEY42yvjyDLUS0kIaCjw0 A7imfZgYSCBYlwcer/FOfzkTrDcXHvTeiNO49VYmff40NaI8npDCgn4+TyyKdGrDwYYETv rluhnag+rVpj5eL2H/GDoH7Y7utzslxIFsQVSc1setCH81opD4is+CyV7TaP92S+/rkrun +RdmojEezTZB8Xm0VVornX9wYHoQPoOTiXvnVlPQ2sSi4eiSnxai7HbA0bPg4RNfgZiR9D uqHvquK5BJhsoG9YpcoSI1I0m8yCjDAWcjBz3CIv9nCdsvcKdgi4k9FZ5EcGSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0H32F3zDLC; Thu, 28 Sep 2023 15:52:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqlQR022537; Thu, 28 Sep 2023 15:52:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqlOW022534; Thu, 28 Sep 2023 15:52:47 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:47 GMT Message-Id: <202309281552.38SFqlOW022534@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: 4ac6582472a2 - main - syslogd: Ignore signals in sigcatch[] 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 4ac6582472a2f4be06217cfbfd7a9d049f2cd6d6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4ac6582472a2f4be06217cfbfd7a9d049f2cd6d6 commit 4ac6582472a2f4be06217cfbfd7a9d049f2cd6d6 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:22 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Ignore signals in sigcatch[] Instead of blocking signals in sigcatch[], just ignore them. This frees up some space on the proc's sigqueue. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41433 --- usr.sbin/syslogd/syslogd.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 2ff39d8c3676..3f9633ca8c35 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -597,7 +597,6 @@ int main(int argc, char *argv[]) { struct sigaction act = { }; - sigset_t sigset = { }; struct kevent ev; struct socklist *sl; pid_t ppid = -1, spid; @@ -838,6 +837,14 @@ main(int argc, char *argv[]) exit(1); } } + + /* + * Syslogd will not reap its children via wait(). + * When SIGCHLD is ignored, zombie processes are + * not created. A child's PID will be recycled + * upon its exit. + */ + act.sa_handler = SIG_IGN; for (size_t i = 0; i < nitems(sigcatch); ++i) { EV_SET(&ev, sigcatch[i], EVFILT_SIGNAL, EV_ADD, 0, 0, NULL); if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) { @@ -845,23 +852,14 @@ main(int argc, char *argv[]) pidfile_remove(pfh); exit(1); } - (void)sigaddset(&sigset, sigcatch[i]); - } - if (sigprocmask(SIG_BLOCK, &sigset, NULL) != 0) { - warn("failed to apply signal mask"); - pidfile_remove(pfh); - exit(1); + if (sigaction(sigcatch[i], &act, NULL) == -1) { + warn("failed to apply signal handler"); + pidfile_remove(pfh); + exit(1); + } } (void)alarm(TIMERINTVL); - /* Do not create zombie processes. */ - act.sa_flags = SA_NOCLDWAIT; - if (sigaction(SIGCHLD, &act, NULL) == -1) { - warn("failed to apply signal handler"); - pidfile_remove(pfh); - exit(1); - } - /* tuck my process id away */ pidfile_write(pfh); @@ -3598,7 +3596,7 @@ validate(struct sockaddr *sa, const char *hname) static int p_open(const char *prog, int *rpd) { - sigset_t sigset = { }; + struct sigaction act = { }; int pfd[2], pd; pid_t pid; char *argv[4]; /* sh -c cmd NULL */ @@ -3623,12 +3621,12 @@ p_open(const char *prog, int *rpd) } alarm(0); - - for (size_t i = 0; i < nitems(sigcatch); ++i) - (void)sigaddset(&sigset, sigcatch[i]); - if (sigprocmask(SIG_UNBLOCK, &sigset, NULL) != 0) { - logerror("sigprocmask"); - exit(1); + act.sa_handler = SIG_DFL; + for (size_t i = 0; i < nitems(sigcatch); ++i) { + if (sigaction(sigcatch[i], &act, NULL) == -1) { + logerror("sigaction"); + exit(1); + } } dup2(pfd[0], STDIN_FILENO); From nobody Thu Sep 28 15:52:48 2023 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 4RxJ0J5kTrz4txtw; Thu, 28 Sep 2023 15:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0J59RKz4LjY; Thu, 28 Sep 2023 15:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XmEKu5FiD9EuoBaZd4HYdgU9ckMvE3Gab6rewi4+q4=; b=Ko1Br65Lyilse3m/ItIXos3q/Wni9wXijxg2Ar0HCwdfIZE3iPtlg4YdbkvbV9ep90bbYC eIqGfvG+uXixz5ajQIHWejBLp5Ywz+Lvlrqgx6DqlHulSAXnDUBgFq6LpJY9ql5Srn9VQ9 uB8vgSZ6KQVnIsX1hEBURtlMCCHBj0xEVintOjbcEz24t1Gr2mqFuHfOmtu56V5pJFLwaH KrbhPaTWVxy8ihdb0xgN+95QCfK1TBXsC4U785NypBsacjQTuyw7ZX+NjipjPmnJYSDaJy VUvz6llB8SzNslzDA2RBXpYXpN2eaQxO+AsirW1h+uDHtVTgw+jalDXahdeJcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916368; a=rsa-sha256; cv=none; b=qmi1Qjr18kvmHYUbNi78QgYXxber+3bvMF2XqtFqVFhxRXfWeBRSm81Dob9KPk+AbMVZ9I 9uG7eY18yd/X2jGDefsYNY9IQKegNkJfGb5W4PmXJK2V7WEAZvce2S6yHJxRD+6Gcd07MA L+IXofDKgJm0h3mvRDFQ96h5V8BjG/Nfl48+D3xOBbTwrB0wFDvp2R3VJlTwyE556HT/Ho 0arPNFbOrH4dpwEDIYLREIfd3XRdP/nYq+rm17PuuN86D+ILk9dEW9aEPUIJt6OE8rcdp5 YDoaVcZo3eWWYuKCPXkaO37ci7iGTcT9RoQXxPZWoMlCYBZ6EqnfolRvd9Az5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0XmEKu5FiD9EuoBaZd4HYdgU9ckMvE3Gab6rewi4+q4=; b=tItNp2fijsjenwYiCMdtLVrz/E6K0qZdvD9gU+BvGtlmcjhBD8xebOwfGO5Tjm2SFqN6+u Fv0A0PGNurv8PDWylGPK4HOlag9BU4cXs7GM3Vcz4SGoYW8acM+4bHTk5mMmjVVkzM4+ry HCz07EXBL1eK6aj7B39+/UzPa6OuUM76V5cC7yvi8M7QBo+2Qn8lYWYKRlYDGJY/xMEYrk b2w1KprT5T6xmLWQLWJvXTkq2CNf9y+P91Gj9LhMAsyNINUxhPaugYj/pbuAtyHDWemsO1 6hZUyS+tAkCz8HO4jeV/zTRkjla9yx/ti+YZcBCQEC6qAv6CFYaW2k2nSDnaPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0J3rQ6zCqV; Thu, 28 Sep 2023 15:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqmVm022589; Thu, 28 Sep 2023 15:52:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqm8b022587; Thu, 28 Sep 2023 15:52:48 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:48 GMT Message-Id: <202309281552.38SFqm8b022587@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: 8536447a07fa - main - syslogd: Use pipe to communicate with daemon 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 8536447a07fa29073f93af70808db58c760aa6f9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8536447a07fa29073f93af70808db58c760aa6f9 commit 8536447a07fa29073f93af70808db58c760aa6f9 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:28 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Use pipe to communicate with daemon Previously, syslogd's daemon process would signal that it had finished initialization using SIGALRM. In capability mode, signal delivery is not allowed, so use a pipe to indicate that it is ready to accept messages. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41459 --- usr.sbin/syslogd/syslogd.c | 100 ++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 56 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 3f9633ca8c35..8d2f3c3edf14 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -135,6 +135,7 @@ static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #include #include #include +#include #include #include #include @@ -471,7 +472,6 @@ static bool validate(struct sockaddr *, const char *); static void unmapped(struct sockaddr *); static void wallmsg(struct filed *, struct iovec *, const int iovlen); static int waitdaemon(int); -static void timedout(int); static void increase_rcvbuf(int); static void @@ -599,8 +599,8 @@ main(int argc, char *argv[]) struct sigaction act = { }; struct kevent ev; struct socklist *sl; - pid_t ppid = -1, spid; - int ch, kq, s; + pid_t spid; + int ch, kq, ppipe_w = -1, s; char *p; bool bflag = false, pflag = false, Sflag = false; @@ -813,14 +813,9 @@ main(int argc, char *argv[]) (void)strlcpy(bootfile, getbootfile(), sizeof(bootfile)); - if ((!Foreground) && (!Debug)) { - ppid = waitdaemon(30); - if (ppid < 0) { - warn("could not become daemon"); - pidfile_remove(pfh); - exit(1); - } - } else if (Debug) + if (!Foreground && !Debug) + ppipe_w = waitdaemon(30); + else if (Debug) setlinebuf(stdout); kq = kqueue(); @@ -868,9 +863,14 @@ main(int argc, char *argv[]) for (;;) { if (needdofsync) { dofsync(); - if (ppid != -1) { - kill(ppid, SIGALRM); - ppid = -1; + if (ppipe_w != -1) { + /* + * Close our end of the pipe so our + * parent knows that we have finished + * initialization. + */ + (void)close(ppipe_w); + ppipe_w = -1; } } if (kevent(kq, NULL, 0, &ev, 1, NULL) == -1) { @@ -3237,64 +3237,52 @@ markit(void) /* * fork off and become a daemon, but wait for the child to come online * before returning to the parent, or we get disk thrashing at boot etc. - * Set a timer so we don't hang forever if it wedges. */ static int waitdaemon(int maxwait) { - int status; - pid_t pid, childpid; + struct pollfd pollfd; + int events, pipefd[2], status; + pid_t pid; - switch (childpid = fork()) { - case -1: - return (-1); - case 0: - break; - default: - signal(SIGALRM, timedout); - alarm(maxwait); - while ((pid = wait3(&status, 0, NULL)) != -1) { + if (pipe(pipefd) == -1) { + warn("failed to daemonize, pipe"); + die(0); + } + pid = fork(); + if (pid == -1) { + warn("failed to daemonize, fork"); + die(0); + } else if (pid > 0) { + close(pipefd[1]); + pollfd.fd = pipefd[0]; + pollfd.events = POLLHUP; + events = poll(&pollfd, 1, maxwait * 1000); + if (events == -1) + err(1, "failed to daemonize, poll"); + else if (events == 0) + errx(1, "timed out waiting for child"); + if (waitpid(pid, &status, WNOHANG) > 0) { if (WIFEXITED(status)) errx(1, "child pid %d exited with return code %d", - pid, WEXITSTATUS(status)); + pid, WEXITSTATUS(status)); if (WIFSIGNALED(status)) errx(1, "child pid %d exited on signal %d%s", - pid, WTERMSIG(status), - WCOREDUMP(status) ? " (core dumped)" : - ""); - if (pid == childpid) /* it's gone... */ - break; + pid, WTERMSIG(status), + WCOREDUMP(status) ? " (core dumped)" : ""); } exit(0); } - - if (setsid() == -1) - return (-1); - + close(pipefd[0]); + if (setsid() == -1) { + warn("failed to daemonize, setsid"); + die(0); + } (void)chdir("/"); (void)dup2(nulldesc, STDIN_FILENO); (void)dup2(nulldesc, STDOUT_FILENO); (void)dup2(nulldesc, STDERR_FILENO); - return (getppid()); -} - -/* - * We get a SIGALRM from the child when it's running and finished doing it's - * fsync()'s or O_SYNC writes for all the boot messages. - * - * We also get a signal from the kernel if the timer expires, so check to - * see what happened. - */ -static void -timedout(int sig __unused) -{ - int left; - left = alarm(0); - signal(SIGALRM, SIG_DFL); - if (left == 0) - errx(1, "timed out waiting for child"); - else - _exit(0); + return (pipefd[1]); } /* From nobody Thu Sep 28 15:52:49 2023 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 4RxJ0L19nFz4tyX8; Thu, 28 Sep 2023 15:52:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJ0K5lMYz4Lhj; Thu, 28 Sep 2023 15:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mO3eviVT0VufjxjbqS0cJHiF54RsqtTWcaV0dQaHhp4=; b=ive3wi52OKTVKTb3oG8rgVmZVyuXWE0ypmdGJXAwyin8cQJ2Wczsz6bcX3Gdz66h10uQI3 lsnXK8DUk/RFJLpmQsaTorDCs5kNC9TUd/1mpRXT7rxOWxSJjPjrSu5eW3GkTL37uwBIHs cjOPyKzQSCMvVrxPaOiH1nykfURYOIJGPyeK9bC062X3hMt1uM0ubGrUSxCzVA7ldmICwO bo7+St7EwT3LXbaBu9hmwYVd7RfQvnyviuRMeW11VPCXe7+bbUxdApZEtT7MdrOogxWhZ9 seQCDiC1qg86U/PupGcOxKzWeC5txJrWp8irutCoUY+IwtGTYR8EhNatADuEjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695916369; a=rsa-sha256; cv=none; b=fDYbe2l1ethcKb6Ylcczr1wGwiHC0FMhhiqFEvBNtsE3LHFUCcImX9NNGdoghBoXtcIP6T nVExHtq6/WCBiQElLiHBagO5MYkFya02bBhFvhSjEKuX3kx6GvyuJb/bn+5/psRFaNkErZ cYq7woGE4IqSj5Wj4NlSC0lLkKW0DWPYqra6j6iVGjvo25fqY2rtvVIisiosC/JRLFFL1r SUyKN6l+nE/wEh4c5TzNNUc/6KOJaawe5zerp04hFMfjPf8DS/oKoa71KCaOfWTfGc0lPJ 3C6QI9hBOfvG9JKoyinl2iFML0pIeJjZallDZth4C6CJ/fUpBHOHjcgHvNg5Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695916369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mO3eviVT0VufjxjbqS0cJHiF54RsqtTWcaV0dQaHhp4=; b=fi64AHGN+hgRgTATtjoHz8lM1vqpElQuxonRmIQE2xCdYj6f/r7/7xbJmbRlccl0DA7iYp tL+S0eAy79n0ghneW3H1ctoOYEPznZGNfBQO7VZ5LhANSU5fcKB2SdhXmGMCu0Xwk4rY52 a4RhFNbLQgvgogQ2Rd6wL56eWi/zO/Y01KscX3R66NOSnLljfWYALLQKd/1FJjUI/1mbxe +68WsSIRPdWNudjRrnK0TGHV/LWi3gs9ZJjxniefJ4aUB7Rxr9xbObUgz37UF36yWMDFHI H8PiaIkjm5JbzbfNy2eJ2v7Yrst6O+tfU/8/7e4P5xc74s7cN30Od9O7Nc8sHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxJ0K4rqkzDLD; Thu, 28 Sep 2023 15:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SFqnjV022643; Thu, 28 Sep 2023 15:52:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SFqn9a022640; Thu, 28 Sep 2023 15:52:49 GMT (envelope-from git) Date: Thu, 28 Sep 2023 15:52:49 GMT Message-Id: <202309281552.38SFqn9a022640@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: 94cae4cb339a - main - syslogd: Do not add shutdown sockets to the kqueue 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 94cae4cb339a839b9f9a1b35226de06271017b25 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=94cae4cb339a839b9f9a1b35226de06271017b25 commit 94cae4cb339a839b9f9a1b35226de06271017b25 Author: Jake Freeland AuthorDate: 2023-09-01 02:51:33 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 15:51:54 +0000 syslogd: Do not add shutdown sockets to the kqueue If syslogd is in secure mode, all INET sockets are shutdown. Do not add these to the kqueue because we can't read from them. Also, remove the listen() call when setting up sockets. Syslogd exclusively uses SOCK_DGRAM sockets, so calling listen() is useless. Reviewed by: markj MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41526 --- usr.sbin/syslogd/syslogd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 8d2f3c3edf14..7db5bab11008 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -825,6 +825,8 @@ main(int argc, char *argv[]) exit(1); } STAILQ_FOREACH(sl, &shead, next) { + if (sl->sl_recv == NULL) + continue; EV_SET(&ev, sl->sl_socket, EVFILT_READ, EV_ADD, 0, 0, sl); if (kevent(kq, &ev, 1, NULL, 0, NULL) == -1) { warn("failed to add kevent to kqueue"); @@ -3741,9 +3743,6 @@ socksetup(struct addrinfo *ai, const char *name, mode_t mode) return (NULL); } dprintf("new socket fd is %d\n", s); - if (ai->ai_socktype != SOCK_DGRAM) { - listen(s, 5); - } sl_recv = socklist_recv_sock; #if defined(INET) || defined(INET6) if (SecureMode && (ai->ai_family == AF_INET || From nobody Thu Sep 28 16:10:38 2023 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 4RxJNy0FPcz4v0W1; Thu, 28 Sep 2023 16:10:42 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxJNx6y0Hz4VLM; Thu, 28 Sep 2023 16:10:41 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695917442; 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=J7X5Lp5RGK8Ywx4lyeUchZghp7CviSSRjo10kbv9/+A=; b=Qi61RcRjlDCaihfFOgSDSaEOhqf6zW/3Dg3lkSUvB11JjBKtE/qRQTG4GMZT1cxkeqj9im 0S96T4iz3WTqw2K4/kyWzphkZlH/rFVWt2RZbsBSSsjjIXXr347stiaOitNTCmAnixrKCR IyKg7KniHmgE+eUgp735rgUoczKk0G6Id/0hz4cjjLOMD9F7R11bajfoIGu/xciVHtusy1 7Oi7qU0gz6iwTWFyaOmiTq6/8IFH6PL02YojwvtPRRr8mJVZbSRNwZoBJ0v1BkCn+9SAys w06YcCUx1POJTu8UQvE/OIhLIUnyCMBvXA2txwM/fvljjwGvZxCnkRFi9RdHWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695917442; a=rsa-sha256; cv=none; b=N1apoNQIadyIdNh8v7O1/dMiiruNUpwhCOOjRd3/x1bTP/LHRU386bdj5Cnl/Ex8wOsfBh VNXQSXx66W1opyRxiwfHwGebda3ST9NDgChA+ZamXHXQ92kVfYGn8JObg4EMrwmJoqEy/d UORk0dvMpKukonm8b9relXO5PoO4wfgirOh6m9KJ4HXKewPOiEpP2Na569Gew8JOaHupd0 d2ctPLY2yJdviLmab3b45j46lj5C7lvfbMT2yCYWK6kbguFdVC4JqIOQnH2jFfOt2ziadJ 8brkO8mKSCYO6LwkUVEJaGDAyMwQeCV6VCYUKvo7+3U3kw6bYrlFrzR0g4KVww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695917442; 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=J7X5Lp5RGK8Ywx4lyeUchZghp7CviSSRjo10kbv9/+A=; b=TnNwrmR33fWWqVhB8d9yBQI/Lnn8Q+PMj/QwwQwGcwb6yhzWq5u7r55Z7rLyHo7P2LG33o RRID/xL2K3AUiDrVnqBSg/68cSHzDJqIJQCiR7j+yyQqPh8LHdvqTfk91Ku5vZ9ODzcoLe LqMWPDxqqafoC8qiGrVSNU2Wd49eBKoSHLeiKbs9mXic1h+peYnGKZ0i46xrCk8WFK8QH5 JKpsxOL77WwCC6cyQns0vJQ/giLfKsABzACcUygF3HhnGWlON+tkG7Q568UZl7llPNQRqp IWnAIfjUAQqZC0ynKMrBmj5YeFJg2Q+dvunodsuVviAQQ5ChmtfAoUpYdTdI3w== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.3 with cipher TLS_AES_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 4RxJNx5MQrzB3w; Thu, 28 Sep 2023 16:10:41 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id D6CB11711E; Thu, 28 Sep 2023 18:10:38 +0200 (CEST) Date: Thu, 28 Sep 2023 18:10:38 +0200 From: Baptiste Daroussin To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1f31e00e19f9 - main - flua: add fbsd module Message-ID: <6enez4khdaqrwbkm4zointeoyt6p4tyf5vd3gwkattahmsehst@nbpu4vwnqkas> References: <202309271400.38RE0s2R037013@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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Sep 28, 2023 at 11:41:23AM -0400, Mark Johnston wrote: > On Thu, Sep 28, 2023 at 05:27:52PM +0200, Baptiste Daroussin wrote: > > On Thu, Sep 28, 2023 at 10:58:20AM -0400, Mark Johnston wrote: > > > On Wed, Sep 27, 2023 at 02:00:54PM +0000, Baptiste Daroussin wrote: > > > > The branch main has been updated by bapt: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > > > > > commit 1f31e00e19f9e24d4c891a24973e08a027c4f71c > > > > Author: Baptiste Daroussin > > > > AuthorDate: 2023-09-13 07:43:33 +0000 > > > > Commit: Baptiste Daroussin > > > > CommitDate: 2023-09-27 14:00:00 +0000 > > > > > > > > flua: add fbsd module > > > > > > > > This module is bundled into flua, it only provides for now the exec > > > > function. The point of the function is to be able to execute a program > > > > without actually executing a shell. > > > > > > > > to use it: > > > > fbsd.exec({"id", "bapt"}) > > > > > > Hi Baptiste, > > > > > > How is this different from posix.unistd.exec in the luaposix module? > > > Wouldn't it be better to add this to the existing posix.unistd namespace > > > in lposix.c? exec does not seem FreeBSD-specific. > > > > This is more like os.execure without the invocation of /bin/sh! > > Right, different from os.execute, but almost identical to > posix.unistd.exec: https://luaposix.github.io/luaposix/modules/posix.unistd.html#exec not indentical this fbsd.exec will fork/exec while posix.unistd.exec, will just exec. yes if add to lposix.c fork() and exec() then we can replace fbsd.exec by a pure lua version calling unistd.fork() and unistd.exec() is that is what you meant by almost identical. > > We have a subset of luaposix already, in libexec/flua/modules/lposix.c. > So my question is, how about we extend that to provide "exec"? "exec" > is not FreeBSD-specific at all. I am happy to write the patch. I am fine if we extend lposix with fork and exec and remove my fbsd.exec. I am happy to work on it as well. > > > > I have a related question: this week I wrote some FreeBSD-specific lua > > > modules wrapping some system calls like sysctl(2) and cap_enter(2). How > > > do we want to organize the flua namespace for such things? Should we > > > have a freebsd.sys namespace for system call wrappers? I would then put > > > bindings for FreeBSD libraries under freebsd.* or freebsd.lib.*, so we > > > could have freebsd.lib.procstat, for example. > > > > > > I am fine with a module named freebsd.lib.* I plan to add kenv, rcctl, > > procctl so, (I scratched sysctl and cap_enter has you have them ;) ) > > So my proposal is, raw system call wrappers should live under > freebsd.sys.*; some higher-level interfaces can be built on top, > hopefully written in lua as much as possible. I do like this proposal and it is better with that my ugly fbsd.* :) > > Also, if we start adding more FreeBSD modules, I suspect it will be > useful to maintain these modules of the tree. I have some plain lua > (not flua) programs for which I wrote FreeBSD modules, and they could be > useful to others. It'd also be useful to target multiple lua versions, > at least 5.1 as well so that luajit can be used. But that's a topic for > later. Best regards, Bapt From nobody Thu Sep 28 16:37:58 2023 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 4RxK0R1H7pz4v2Qv; Thu, 28 Sep 2023 16:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxK0R0qB8z4YFZ; Thu, 28 Sep 2023 16:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695919079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LVVgHa7dK8CI3Ne5u3tCqO4MgfBzcTP5PVBgnO7yOZ0=; b=NE/5eq5I5dY1FKEb710ttKfsI2cT/x18CRoiMopIiiZVl8TIBLXNUoQKHFQopu7+zgW3Ol vtJprB25YpbSoOaCYMPU5mk2CCLpxekNy0nsM7whjp0wu293KNSAo+ljup5HWYrlS/bhgP p+5r3/1e+j1LoCt/+ZTy5O4G6yoitEVKdkvacpnchEemm2dInst32W+bSu9PiTztT8cIq6 RMesjxTop02ghs8QgwaKSDST4z1WGCyi7L3GfT5VCtIn7rsYJzd0BRBuynjU5bdfwgVQC9 W5wO2jl9ABTLPQwNsOn0aVL86we63W05p69Hbp+Afomzo/6RH9lzsGRvfx7G7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695919079; a=rsa-sha256; cv=none; b=eJkCK+jhzSqUBshvWiRcM+c/TvsK5tsGMIPsepEH7isF4z0FxYjxhpSulQcpTKHti5le/Z NuLguWHIG+2gykplg24O5ty1cfUASb+90sIeMRLltsJegdXP1d6/YbI5V224Z0kMiTEI0Z BtsPKcpLskMlGCaykqCbxl1/uuO7NJo+K0N+BmMwLi7J+auVg9jHnD1CJ1FcPvyc8Zo78s upHm22ZDXSKd/5eXrq3EVqyDLNJt4WwhSDAI1ennZ+i8QgooYY+3XF2j/0k8qQGWYq+2Fo NwMgWxfRpXTXE7dNhp5VQID6yI+y9h4ldHC8fulCay0ie1qRwO1cIsMCg/y55Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695919079; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LVVgHa7dK8CI3Ne5u3tCqO4MgfBzcTP5PVBgnO7yOZ0=; b=VDAV4fXx7cXMdYCSVMU06AMJ/OA53ubgV8gzA124ZD3bCCM9K3lvDmDIw4cdRQHtxA+3rF 4JH5nvRHn8ppA+/EiEiNJlt4SitGPDec2sRtvp6G41y4c8tfZigHAyaz58kYjkPq6hi81U HV/5d7ews8U2GiQbBT6q7+/V/tiu0A1F34Vre0b1wUVoqs49S+bnAhE4MJWkcGUgBvSa0X n5cUydWz2kqLrg5iMCPTz+VBe79EYmToZcdAJNBmln9sCLrmhMvtEtnUY/m0n5U2B9sEf2 1DT7iFn6CROn31NV1DVBLel/6nV9mcKcDjbgnxR8AO4aUpFFqXxnyZEpCkuiUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxK0Q6zvLzVWs; Thu, 28 Sep 2023 16:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SGbwKw089961; Thu, 28 Sep 2023 16:37:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SGbwUi089958; Thu, 28 Sep 2023 16:37:58 GMT (envelope-from git) Date: Thu, 28 Sep 2023 16:37:58 GMT Message-Id: <202309281637.38SGbwUi089958@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: d7399551b028 - main - split: Further option parsing improvements. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: d7399551b02861b910b15c7b7a78a2835644aa45 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d7399551b02861b910b15c7b7a78a2835644aa45 commit d7399551b02861b910b15c7b7a78a2835644aa45 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-28 16:29:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-28 16:30:15 +0000 split: Further option parsing improvements. * Whenever possible, use strtonum() to parse numeric arguments. * Improve usefulness and consistency of error messages. * While here, fix some type and style issues. Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42010 --- usr.bin/split/split.c | 84 ++++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index af1ed69c9482..ba98d82b25c4 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -63,7 +63,7 @@ static const char sccsid[] = "@(#)split.c 8.2 (Berkeley) 4/16/94"; #define DEFLINE 1000 /* Default num lines per file. */ static off_t bytecnt; /* Byte count to split on. */ -static off_t chunks = 0; /* Chunks count to split into. */ +static long chunks; /* Chunks count to split into. */ static bool clobber = true; /* Whether to overwrite existing output files. */ static long numlines; /* Line count to split on. */ static int file_open; /* If a file open. */ @@ -73,7 +73,7 @@ static regex_t rgx; static int pflag; static bool dflag; static long sufflen = 2; /* File name suffix length. */ -static int autosfx = 1; /* Whether to auto-extend the suffix length. */ +static bool autosfx = true; /* Whether to auto-extend the suffix length. */ static void newfile(void); static void split1(void); @@ -84,8 +84,8 @@ static void usage(void) __dead2; int main(int argc, char **argv) { - const char *p; - char *ep; + char errbuf[64]; + const char *p, *errstr; int ch, error; setlocale(LC_ALL, ""); @@ -106,20 +106,22 @@ main(int argc, char **argv) while (numlines >= 0 && *p >= '0' && *p <= '9') numlines = numlines * 10 + *p++ - '0'; if (numlines <= 0 || *p != '\0') - errx(EX_USAGE, "%c%s: illegal line count", ch, - optarg ? optarg : ""); + errx(EX_USAGE, "%c%s: line count is invalid", + ch, optarg ? optarg : ""); break; case 'a': /* Suffix length */ - if ((sufflen = strtol(optarg, &ep, 10)) <= 0 || *ep) - errx(EX_USAGE, - "%s: illegal suffix length", optarg); - autosfx = 0; + sufflen = strtonum(optarg, 0, INT_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: suffix length is %s", + optarg, errstr); + } + autosfx = false; break; case 'b': /* Byte count. */ - errno = 0; - error = expand_number(optarg, &bytecnt); - if (error == -1) - errx(EX_USAGE, "%s: offset too large", optarg); + if (expand_number(optarg, &bytecnt) != 0) { + errx(EX_USAGE, "%s: byte count is invalid", + optarg); + } break; case 'c': /* Continue, don't overwrite output files. */ clobber = false; @@ -130,22 +132,27 @@ main(int argc, char **argv) case 'l': /* Line count. */ if (numlines != 0) usage(); - if ((numlines = strtol(optarg, &ep, 10)) <= 0 || *ep) - errx(EX_USAGE, - "%s: illegal line count", optarg); + numlines = strtonum(optarg, 1, LONG_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: line count is %s", + optarg, errstr); + } break; case 'n': /* Chunks. */ - if (!isdigit((unsigned char)optarg[0]) || - (chunks = (size_t)strtoul(optarg, &ep, 10)) == 0 || - *ep != '\0') { - errx(EX_USAGE, "%s: illegal number of chunks", - optarg); + chunks = strtonum(optarg, 1, LONG_MAX, &errstr); + if (errstr != NULL) { + errx(EX_USAGE, "%s: number of chunks is %s", + optarg, errstr); } break; case 'p': /* pattern matching. */ - if (regcomp(&rgx, optarg, REG_EXTENDED|REG_NOSUB) != 0) - errx(EX_USAGE, "%s: illegal regexp", optarg); + error = regcomp(&rgx, optarg, REG_EXTENDED|REG_NOSUB); + if (error != 0) { + regerror(error, &rgx, errbuf, sizeof(errbuf)); + errx(EX_USAGE, "%s: regex is invalid: %s", + optarg, errbuf); + } pflag = 1; break; default: @@ -163,9 +170,10 @@ main(int argc, char **argv) --argc; } if (argc > 0) { /* File name prefix. */ - if (strlcpy(fname, *argv, sizeof(fname)) >= sizeof(fname)) - errx(EX_USAGE, "file name prefix is too long: %s", + if (strlcpy(fname, *argv, sizeof(fname)) >= sizeof(fname)) { + errx(EX_USAGE, "%s: file name prefix is too long", *argv); + } ++argv; --argc; } @@ -182,16 +190,16 @@ main(int argc, char **argv) else if (bytecnt != 0 || chunks != 0) usage(); - if (bytecnt && chunks) + if (bytecnt != 0 && chunks != 0) usage(); if (ifd == -1) /* Stdin by default. */ ifd = 0; - if (bytecnt) { + if (bytecnt != 0) { split1(); exit (0); - } else if (chunks) { + } else if (chunks != 0) { split3(); exit (0); } @@ -225,7 +233,7 @@ split1(void) /* NOTREACHED */ default: if (!file_open) { - if (!chunks || (nfiles < chunks)) { + if (chunks == 0 || nfiles < chunks) { newfile(); nfiles++; } @@ -236,24 +244,24 @@ split1(void) err(EX_IOERR, "write"); len -= dist; for (C = bfr + dist; len >= bytecnt; - len -= bytecnt, C += bytecnt) { - if (!chunks || (nfiles < chunks)) { - newfile(); + len -= bytecnt, C += bytecnt) { + if (chunks == 0 || nfiles < chunks) { + newfile(); nfiles++; } - if (write(ofd, - C, bytecnt) != bytecnt) + if (write(ofd, C, bytecnt) != bytecnt) err(EX_IOERR, "write"); } if (len != 0) { - if (!chunks || (nfiles < chunks)) { - newfile(); + if (chunks == 0 || nfiles < chunks) { + newfile(); nfiles++; } if (write(ofd, C, len) != len) err(EX_IOERR, "write"); - } else + } else { file_open = 0; + } bcnt = len; } else { bcnt += len; From nobody Thu Sep 28 16:38:00 2023 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 4RxK0S45Nzz4v21j; Thu, 28 Sep 2023 16:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxK0S3Sqzz4YJL; Thu, 28 Sep 2023 16:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695919080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wv66meaZj1K618mz053ZWH1Ku2cfCdLlUUj5cPXOjFw=; b=FrRYMDMNQh2tY1mk+WQGWqg5OACvayBcwIIz59KquC0r1wPYjDioHI5Zt23LGs1cWSTT4M zry534j/hGq0jctKW9BXYY9o9MQ7iU31CNc/q1Re8jBZkfzlJQ0VlmUBm7ra1afYFzh8q0 OwHwRR56U3HkajJT4yvLe/Phqx0iZj9SlHMw1O5G0bjIMr5Tp6xe40oWS1/SPoPQXtMIEZ dZFRtVtusjFovWJFM8aIneo7YmAj5XDg7cip94byh/16XROyAW4e7czZnrXIsb9+X8mIUu Q/gku1T/F60f7W4RZORztJtjL7g26Crtlqv34NDS5zD4WrOm4Wdc/D8wNqONzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695919080; a=rsa-sha256; cv=none; b=GRfZQjCUkhBWABri9jsy3MEB56rRRk4CmYJFYlAbIpmyKmNU7f3pr/qd86k2Xa7bORRb8L appnW5UF4v9zUhfpQA8Gfl5ZHaLcM1S4RtFJvxYCe4crLJTNJNsDJI4P5vfauESzxPEYUR qhtLT+IKb/kXy6JGhUs2+nVXQm23+LPHanmbPuC3yAO53g1DfsZCTAA0meGxDjWgY8QW8s ytbHLf8So1klBfWGPHZf80fxHmYKwXwbiqrvTcxF6Nz5qOA1MCklOAzE1tygmPEnPUGGVs 3jk6JxMlVRdMYEBdsYXuLsZKPH/2RdAj0uAnVFP3VsnWRGR9jN81JXj1kbSp8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695919080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wv66meaZj1K618mz053ZWH1Ku2cfCdLlUUj5cPXOjFw=; b=yag7M8g6lQC3f3+/9jDb3ym0j12TWyApUTAdbJJdOg/WUEXwuW6pvKD+TAvWybbM58G5Dz wcSQ5ttZDqZUSFwT+HbyI1QRNVqjPIDqAu2ZcP9euJ1A0WHscxCeSY0PNJTa9ecF/ntzYM wiz1IdWuWp3VbmYb4cH6HGn3TSzXO8lLNs29bUxQs6DZZO+lH/RFibNdJCYo7RVSBLaawJ 3D3a3JyQsmSv7lP4w6E5Akuv37J2yn+fvs0SLy9WnJ3jQ4qqY+SvTPkdah+LEEvJzt6+DH yHEVQNldVDCIAOT2xF826H2dA93Dp+YIuc9YFOkoDnkjSKLG2iLZ9oWXcQHDxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxK0S17VdzVWt; Thu, 28 Sep 2023 16:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SGc00n090012; Thu, 28 Sep 2023 16:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SGc02g090009; Thu, 28 Sep 2023 16:38:00 GMT (envelope-from git) Date: Thu, 28 Sep 2023 16:38:00 GMT Message-Id: <202309281638.38SGc02g090009@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: d9d69a6f6fc1 - main - split: Improve GNU compatibility. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: d9d69a6f6fc1f8d80df9ce6493e8ab9388781615 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d9d69a6f6fc1f8d80df9ce6493e8ab9388781615 commit d9d69a6f6fc1f8d80df9ce6493e8ab9388781615 Author: Dag-Erling Smørgrav AuthorDate: 2023-09-28 16:30:00 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-28 16:30:16 +0000 split: Improve GNU compatibility. * Like GNU split, turn autoextend back on if given -a0. * Add a test case that verifies that -a turns autoextend off. * Add a test case that verifies that -a0 turns autoextend back on. Sponsored by: Klara, Inc. Reviewed by: christos, kevans Differential Revision: https://reviews.freebsd.org/D42011 --- usr.bin/split/split.c | 7 ++++++- usr.bin/split/tests/split_test.sh | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index ba98d82b25c4..e246a0d4adfc 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -115,7 +115,12 @@ main(int argc, char **argv) errx(EX_USAGE, "%s: suffix length is %s", optarg, errstr); } - autosfx = false; + if (sufflen == 0) { + sufflen = 2; + autosfx = true; + } else { + autosfx = false; + } break; case 'b': /* Byte count. */ if (expand_number(optarg, &bytecnt) != 0) { diff --git a/usr.bin/split/tests/split_test.sh b/usr.bin/split/tests/split_test.sh index c9b87c01618c..48065719055a 100755 --- a/usr.bin/split/tests/split_test.sh +++ b/usr.bin/split/tests/split_test.sh @@ -209,6 +209,23 @@ autoextend_body() atf_check -o inline:"$((26*25+1))\n" cat xzaaa } +atf_test_case noautoextend +noautoextend_body() +{ + seq $((26*26)) >input + atf_check split -a2 -l1 input + atf_check -o inline:"$((26*26))\n" cat xzz +} + +atf_test_case reautoextend +reautoextend_body() +{ + seq $((26*25+1)) >input + atf_check split -a2 -a0 -l1 input + atf_check -o inline:"$((26*25))\n" cat xyz + atf_check -o inline:"$((26*25+1))\n" cat xzaaa +} + atf_test_case continue continue_body() { @@ -249,6 +266,8 @@ atf_init_test_cases() atf_add_test_case larger_suffix_length atf_add_test_case pattern atf_add_test_case autoextend + atf_add_test_case noautoextend + atf_add_test_case reautoextend atf_add_test_case continue atf_add_test_case undocumented_kludge atf_add_test_case duplicate_linecount From nobody Thu Sep 28 19:48:04 2023 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 4RxPD24PgLz4vVs5 for ; Thu, 28 Sep 2023 19:48:18 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxPD12cmsz4pgB for ; Thu, 28 Sep 2023 19:48:17 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-405361bb9cdso136139485e9.0 for ; Thu, 28 Sep 2023 12:48:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695930495; x=1696535295; 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=93M3xtaxos/M905ELTCRSBo4xS4zERsiBo4dPRFFHjA=; b=lLuDMsYUL1+sXz7zPcK11smQTGfdtdZP2CHQJMTa23C8NPFyMbbPkPdzrpWjbhEAcV G3uzaeMpW/WE5i4qJY0MuEWFbK044udm4n8tJn/NNTM6NQvnqR4RAvyAuPMlO8MMCF1V WFOYS3hX1sH4utqW0Mu42oO7Cyotvxo9OqrQEWWfufStZVmJV4fgzrAywZ/uu5PQK3YW ENJsLUFpOsteJ1Sbw2jfZ2AjqrmXlVOkO7SvLb5fQJ5S42dhscGQvh0rgHRy7cloocAl d6ebQTat4eTRgVggeVgnqP6kGfICSfrM5y2PhjERMmQnzj/SfuN4qpKKCAYJLJGEqPIs hHGA== X-Gm-Message-State: AOJu0Yw4qMjny1EFz80qZ83YwOmoHt1DYdDLTUg4u9593SlPAKuxU+Jg Hy8cGF5s4WC9l5gQwm2+ZGrDFA== X-Google-Smtp-Source: AGHT+IHZJ2C+4x3WNoOs4VfaftSN23yZ08nuG6ZSpgfMMlk+hH4gJxuMRxalagkfoaaQfIjBy2P+nQ== X-Received: by 2002:a7b:c397:0:b0:401:b53e:6c40 with SMTP id s23-20020a7bc397000000b00401b53e6c40mr2135499wmj.10.1695930495190; Thu, 28 Sep 2023 12:48:15 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id q20-20020a1cf314000000b004064ac107c8sm3111386wmq.0.2023.09.28.12.48.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2023 12:48:14 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 29a55fd09b0a - main - dtc: Sync with upstream commit 26a0fe5 From: Jessica Clarke In-Reply-To: <202309261700.38QH06di038371@gitrepo.freebsd.org> Date: Thu, 28 Sep 2023 20:48:04 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202309261700.38QH06di038371@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.47 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.969]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.44:from]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.44:from]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RxPD12cmsz4pgB On 26 Sep 2023, at 18:00, Ed Maste wrote: >=20 > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D29a55fd09b0a3cc4c888f7a630fde416= 94699343 >=20 > commit 29a55fd09b0a3cc4c888f7a630fde41694699343 > Author: Jose Luis Duran > AuthorDate: 2023-09-26 16:37:52 +0000 > Commit: Ed Maste > CommitDate: 2023-09-26 16:59:17 +0000 >=20 > dtc: Sync with upstream commit 26a0fe5 >=20 > - 0206c0f ("Handle top-level /delete-node/ directives.") > - d612a9e ("Remove C++11 standard constrain") > - Remove extra white lines after the $FreeBSD$ tag removal >=20 > Reviewed by: kevans (earlier), theraven, emaste > Differential Revision: https://reviews.freebsd.org/D41482 > --- > usr.bin/dtc/HACKING | 1 - > usr.bin/dtc/Makefile | 3 -- > usr.bin/dtc/fdt.cc | 134 = ++++++++++++++++++++++++++++++++++++++++----------- > usr.bin/dtc/fdt.hh | 24 ++++++--- > 4 files changed, 121 insertions(+), 41 deletions(-) >=20 > diff --git a/usr.bin/dtc/HACKING b/usr.bin/dtc/HACKING > index 9447c4f6ebf9..ef858c8885c0 100644 > --- a/usr.bin/dtc/HACKING > +++ b/usr.bin/dtc/HACKING > @@ -1,4 +1,3 @@ > - > Notes for people hacking on dtc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >=20 > diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile > index d242ed80e8b1..d7661ae164c3 100644 > --- a/usr.bin/dtc/Makefile > +++ b/usr.bin/dtc/Makefile > @@ -1,4 +1,3 @@ > - > PROG_CXX=3Ddtc > SRCS=3D dtc.cc input_buffer.cc string.cc dtb.cc fdt.cc checking.cc > MAN=3D dtc.1 > @@ -7,8 +6,6 @@ WARNS?=3D 3 >=20 > CXXFLAGS+=3D -fno-rtti -fno-exceptions >=20 > -CXXSTD=3D c++11 This broke building FreeBSD on macOS, as it defaults to C++98 not C++11, despite using modern Clang. Unlike CSTD there is no CXXSTD default in bsd.sys.mk. Please reinstate this until we have a better way to deal with CXXSTD. (See = https://github.com/freebsd/freebsd-src/actions/runs/6341785142/job/1722617= 0311) Jess From nobody Thu Sep 28 19:56:02 2023 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 4RxPPD50xdz4vWD2 for ; Thu, 28 Sep 2023 19:56:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxPPD01vcz4qh0 for ; Thu, 28 Sep 2023 19:56:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.50 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-405361bba99so132071425e9.2 for ; Thu, 28 Sep 2023 12:56:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695930974; x=1696535774; 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=i9Aq+EKlEuQiB/3BS2w4VBcUtstb7+cXpPK7fHK7sig=; b=eG+Cjw0Q9hPYapixmqj1dnx5AsTA2aXX3w3Pw0TWEdpm0ukTM1uWjbnU8Ln3L99Cs6 U13NX+nh4HRRrHPJ/ks2kx7UU6yRTd24/FFJCcQgxgtcI8m/Vy6yJO9stcj3r/ZIv7kt IpxFBNuktPUJEHBl91p9BH70ufKJ6V5Nsj4Ehp60pX03h1CV6fzdMUXU5taHpzevoqWF yeUjjEtU49o1Mw+uvJjXJBhV0a7ihigtOqo01COOe3LmJ0+HarmTrrSJ/M5sGUutXY3a ldIftH3FP/ZRaEifUCzvBQpQ4KdgmbvD7SRjq+cSMYz+fpjFWgipkQPzPipkSvr0QZjR 1sZw== X-Gm-Message-State: AOJu0YwhylIBAGKJflMUx8HikTiD4lAtQnddAlsR2ZqsLZv9fci6fPn7 hNs16IKF2b4h7+P4Z8ZWt9b5sendN086J7AiEQg= X-Google-Smtp-Source: AGHT+IHUMCHljLtMoQvO3JZAT/LkWzHFsAEJgxVt0GMT3p33+KfhMVXFjGXd+tU74K9QQgVUuoiXEw== X-Received: by 2002:a5d:46c2:0:b0:31f:fdd8:7d56 with SMTP id g2-20020a5d46c2000000b0031ffdd87d56mr2031221wrs.12.1695930974469; Thu, 28 Sep 2023 12:56:14 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id y6-20020a5d4706000000b003253523d767sm297868wrq.109.2023.09.28.12.56.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Sep 2023 12:56:14 -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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 29a55fd09b0a - main - dtc: Sync with upstream commit 26a0fe5 From: Jessica Clarke In-Reply-To: Date: Thu, 28 Sep 2023 20:56:02 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202309261700.38QH06di038371@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.48 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.977]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.50:from]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.50:from]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RxPPD01vcz4qh0 On 28 Sep 2023, at 20:48, Jessica Clarke wrote: >=20 > On 26 Sep 2023, at 18:00, Ed Maste wrote: >>=20 >> The branch main has been updated by emaste: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D29a55fd09b0a3cc4c888f7a630fde416= 94699343 >>=20 >> commit 29a55fd09b0a3cc4c888f7a630fde41694699343 >> Author: Jose Luis Duran >> AuthorDate: 2023-09-26 16:37:52 +0000 >> Commit: Ed Maste >> CommitDate: 2023-09-26 16:59:17 +0000 >>=20 >> dtc: Sync with upstream commit 26a0fe5 >>=20 >> - 0206c0f ("Handle top-level /delete-node/ directives.") >> - d612a9e ("Remove C++11 standard constrain") >> - Remove extra white lines after the $FreeBSD$ tag removal >>=20 >> Reviewed by: kevans (earlier), theraven, emaste >> Differential Revision: https://reviews.freebsd.org/D41482 >> --- >> usr.bin/dtc/HACKING | 1 - >> usr.bin/dtc/Makefile | 3 -- >> usr.bin/dtc/fdt.cc | 134 = ++++++++++++++++++++++++++++++++++++++++----------- >> usr.bin/dtc/fdt.hh | 24 ++++++--- >> 4 files changed, 121 insertions(+), 41 deletions(-) >>=20 >> diff --git a/usr.bin/dtc/HACKING b/usr.bin/dtc/HACKING >> index 9447c4f6ebf9..ef858c8885c0 100644 >> --- a/usr.bin/dtc/HACKING >> +++ b/usr.bin/dtc/HACKING >> @@ -1,4 +1,3 @@ >> - >> Notes for people hacking on dtc >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D >>=20 >> diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile >> index d242ed80e8b1..d7661ae164c3 100644 >> --- a/usr.bin/dtc/Makefile >> +++ b/usr.bin/dtc/Makefile >> @@ -1,4 +1,3 @@ >> - >> PROG_CXX=3Ddtc >> SRCS=3D dtc.cc input_buffer.cc string.cc dtb.cc fdt.cc checking.cc >> MAN=3D dtc.1 >> @@ -7,8 +6,6 @@ WARNS?=3D 3 >>=20 >> CXXFLAGS+=3D -fno-rtti -fno-exceptions >>=20 >> -CXXSTD=3D c++11 >=20 > This broke building FreeBSD on macOS, as it defaults to C++98 not > C++11, despite using modern Clang. Unlike CSTD there is no CXXSTD > default in bsd.sys.mk. Please reinstate this until we have a better = way > to deal with CXXSTD. >=20 > (See = https://github.com/freebsd/freebsd-src/actions/runs/6341785142/job/1722617= 0311) In fact dtc now requires C++14 due to using auto in lambdas, and upstream=E2=80=99s build systems explicitly use C++17. Jess From nobody Thu Sep 28 20:39:39 2023 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 4RxQMH6BW2z4vZ8q; Thu, 28 Sep 2023 20:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQMH5hhbz4tZH; Thu, 28 Sep 2023 20:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Rivfbj1Uf7ux919zwIxTiAYtJgk7/uCGyZzDhTOJKA=; b=rYjIBy0N9W3RBj7ra3LdiSFA7HsJLo5ePBV6uziquAY8e7oRuXupuHQAcpIInDOcl62SOd lCfy5lLxAf+HEoSbSNzG47veEIhD7wbWBsX/hzJF24UocQ94EvVGKDZK+AoHlVPqzfHXHn ++rn5hTEBXbgE92JnmWkmb5xlYygIvpJvf0u/c7GiOjttUBgGA2IrsVixiLS/yncFwf7eY YSRPxbyiKhFvC0ph3jl83mzcblkAtrUqzd0Es061V4mCh/aSbC74vzytqPkHJW3FqtX2Uc 3TaiCsQW7SeePJztZpPRDmQkzD5lRTMoy5rU1vclaUvRYvB9fJK/GIMQRUvIuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695933579; a=rsa-sha256; cv=none; b=Hyv4RB9KQhIQVvgTwRj/+D5+5TVDVj6lhSgI+jtPDG7P+YqBPQMYT5tmAxzSQa5o6TPEW/ EpojLuaMp5HE+p1fgpB2uos3jCoGrodkhiOtoZ5J9/Ttp8Il8Xsbc3YDnPp61eNH3D8bcE Y7YlMMVucj75XMmR2Nz4zkkZ5ck01gd/q+TTltbsUXtaQqy/gVWpTKXUDPXW75f8utWKhh vA5MDjv3M5KB2q5nqKEGDMokGTnpQJQZ+IGstmzG/Bax7rNBG2h8AbkX1g0xRxNpmSZJzM VDsv9fFX6dRFhr79rgbZPcbW/8Sk7vqV0E3DMBY2J/jtyi/7bhvR8Zo7HXe9tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+Rivfbj1Uf7ux919zwIxTiAYtJgk7/uCGyZzDhTOJKA=; b=azhRP1m4rbtRbuJi4ZjOKczJL2EzZQrrH9WKoc0g9abSNjpPAAXjIqEzeSGBbYcnlQ4xdu HHcTQNFavE1Pi5ZWW4FyyosAmILsEi41jMaP/h7d51RLRydSt0M/AILcAhrU1Z0zJxJpzQ 08ouSSkEaEjq82Zr7fy2i161Zw260hHGdShkU/dRpjg8712HVaK+PCo4+Rh8BA+jAccBA6 TbP+zy6Gn4xi5xRBe1OGTfOkh7y/cMDjsVzDYLjGlhYziLPw40OL/LNkV8xN2GlsNO9GXD s7khTbJ0e8kP3H1Lw+rNwmGPrFufkPdwGkx4iQ0FQde1GidI/+bl2+SZ3XqvDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxQMH4mTMzc3j; Thu, 28 Sep 2023 20:39:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SKddAU089603; Thu, 28 Sep 2023 20:39:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SKdd0O089600; Thu, 28 Sep 2023 20:39:39 GMT (envelope-from git) Date: Thu, 28 Sep 2023 20:39:39 GMT Message-Id: <202309282039.38SKdd0O089600@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: ef20cd33d328 - main - makefs/zfs: Ensure that the last block of a file has the right size 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ef20cd33d3287ebead0d30f2e177fc57a97dc2d5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ef20cd33d3287ebead0d30f2e177fc57a97dc2d5 commit ef20cd33d3287ebead0d30f2e177fc57a97dc2d5 Author: Mark Johnston AuthorDate: 2023-09-28 20:16:17 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 20:16:17 +0000 makefs/zfs: Ensure that the last block of a file has the right size When copying a file's contents into the pool, a loop copies blocks of the maximum size (128KB), allocating space from the vdev for each block. The space allocator rounds up to the nearest block size, but for files larger than the maximum size, this can result in the last block having a smaller logical size than the rest of the blocks belonging to that dnode. This violates some ZFS invariants when appending to that file. Modify fs_populate_file() to use the same block size for the final block. Reported by: cperciva MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/zfs/fs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/usr.sbin/makefs/zfs/fs.c b/usr.sbin/makefs/zfs/fs.c index 0d85ea8eb9d8..b0a4c639f256 100644 --- a/usr.sbin/makefs/zfs/fs.c +++ b/usr.sbin/makefs/zfs/fs.c @@ -515,7 +515,7 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) uint64_t dnid; ssize_t n; size_t bufsz; - off_t size, target; + off_t nbytes, reqbytes, size; int fd; assert(cur->type == S_IFREG); @@ -546,29 +546,30 @@ fs_populate_file(fsnode *cur, struct fs_populate_arg *arg) bufsz = sizeof(zfs->filebuf); size = cur->inode->st.st_size; c = dnode_cursor_init(zfs, arg->fs->os, dnode, size, 0); - for (off_t foff = 0; foff < size; foff += target) { + for (off_t foff = 0; foff < size; foff += nbytes) { off_t loc, sofar; /* * Fill up our buffer, handling partial reads. */ sofar = 0; - target = MIN(size - foff, (off_t)bufsz); + nbytes = MIN(size - foff, (off_t)bufsz); do { - n = read(fd, buf + sofar, target); + n = read(fd, buf + sofar, nbytes); if (n < 0) err(1, "reading from '%s'", cur->name); if (n == 0) errx(1, "unexpected EOF reading '%s'", cur->name); sofar += n; - } while (sofar < target); + } while (sofar < nbytes); - if (target < (off_t)bufsz) - memset(buf + target, 0, bufsz - target); + if (nbytes < (off_t)bufsz) + memset(buf + nbytes, 0, bufsz - nbytes); - loc = objset_space_alloc(zfs, arg->fs->os, &target); - vdev_pwrite_dnode_indir(zfs, dnode, 0, 1, buf, target, loc, + reqbytes = foff == 0 ? nbytes : MAXBLOCKSIZE; + loc = objset_space_alloc(zfs, arg->fs->os, &reqbytes); + vdev_pwrite_dnode_indir(zfs, dnode, 0, 1, buf, reqbytes, loc, dnode_cursor_next(zfs, c, foff)); } eclose(fd); From nobody Thu Sep 28 20:39:40 2023 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 4RxQMK0sczz4vZBn; Thu, 28 Sep 2023 20:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQMJ6zMKz4tS2; Thu, 28 Sep 2023 20:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wURPJ8p70V/ckbFNC9/RoManyw2avE3Q4XvVarBc0V4=; b=kjmb/ibNmSfEtBSYl2ldI6ERdDP8RCLCyTSebJXBQfnzJpzAxNtI8E9CuGpBJ5MyqgoBXI zUSZrdH/uAXmgz9MEh+NrJreMgaWbKZfVGiZVz7vVN5Y1De52T7evoVQcRdjMNVRoalDeD /uHu7s56gL8vTNDIpzzRoL9MaKRdnDkvl2AXCwWRPwNERELrJ28IMO0lSjD82sXy2m/5yq XKuTi6om4BrIvGLllH11O/Hi6JbIej5cl4Zqmh9hCCH5RC/HPgSyTNfM0Vk/JXqRb7szeA Jt+a9GWjEw1HXGdov5yEl/H73Ew1G6hnoibMkEQHf3R4H+2Q8Bv0Ob2MY+5Uwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695933581; a=rsa-sha256; cv=none; b=egRh+thIA+kENE+gfFPTpa2W7hMLB5r86NxNCyvyNSMk9OxReTiCvh9AyWh/ynPUrmMJYU NiYayjs3LbK2aTTEWfr82vF5eYvM6rnyatD+DPQUHBrtjr6CyoxSuFf+014mztxL7PHFjD pvQg5FOW5rSNmCitGnCs9XGOkiyek5WmCQvfrnsnL4PUVy8SAo//fE6suhejQs1Ryu/6ej zWsiCBGkZFtMk5xx6YOqzgi4bOgOIZLLWtNDD4nzKubYjjUbCiGAWZHo285dkq1x+QrAyC s7y4t0auV54wwPpikoOQAXbV4BbWEp/WqJbdJeQaU8fsT+fYdzbkth1ymJYuNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695933581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wURPJ8p70V/ckbFNC9/RoManyw2avE3Q4XvVarBc0V4=; b=qLvqYOUXY4GUBtoNPZH7YxqrycpcoEiNkcNmiass64YB1GiBwKsgs4WoH7GovkIQlFa8nx Bs75AfKiX66PRLucRD//TUUWwLC8MDgj2JJZO/UPvFpv9uWUUZQNvGVcS7Z0oEj8jcLBFW VQHY/Ul2iJ6DNFdkeOiTuNJvoV4K49Z4OiP5l0ccZdCmHXiLp+wmBsV4Uaimu/XOYn205r hz2uJqjKnpzih9l4NvC/Oyfa1gpy92xrH9rWqKq7tojMxxbWx4mC8l65e0bR/hyUc3YTo5 sUHqw6Wkd4wgfyaUsZGgZWZ+hJ9uyg+WjLSm3tgvqwg9VQFrr4/XKmM3dyxpgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxQMJ60llzcRT; Thu, 28 Sep 2023 20:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SKdehi089670; Thu, 28 Sep 2023 20:39:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SKdeWx089667; Thu, 28 Sep 2023 20:39:40 GMT (envelope-from git) Date: Thu, 28 Sep 2023 20:39:40 GMT Message-Id: <202309282039.38SKdeWx089667@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: b6da7f2fd127 - main - makefs/zfs tests: Add a test case which appends to a file after import 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: b6da7f2fd127f447aa20843666b98d3a1d07b8c9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b6da7f2fd127f447aa20843666b98d3a1d07b8c9 commit b6da7f2fd127f447aa20843666b98d3a1d07b8c9 Author: Mark Johnston AuthorDate: 2023-09-28 20:25:06 +0000 Commit: Mark Johnston CommitDate: 2023-09-28 20:36:12 +0000 makefs/zfs tests: Add a test case which appends to a file after import MFC after: 1 week Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index e8da4cc87055..9173600dc555 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -191,6 +191,40 @@ empty_fs_cleanup() common_cleanup } +atf_test_case file_extend cleanup +file_extend_body() +{ + local i start + + create_test_dirs + + # Create a file slightly longer than the maximum block size. + start=132 + dd if=/dev/random of=${TEST_INPUTS_DIR}/foo bs=1k count=$start + md5 -q ${TEST_INPUTS_DIR}/foo > foo.md5 + + atf_check $MAKEFS -s 10g -o rootpath=/ -o poolname=$ZFS_POOL_NAME \ + $TEST_IMAGE $TEST_INPUTS_DIR + + import_image + + check_image_contents + + i=0 + while [ $i -lt 1000 ]; do + dd if=/dev/random of=${TEST_MOUNT_DIR}/foo bs=1k count=1 \ + seek=$(($i + $start)) conv=notrunc + # Make sure that the first $start blocks are unmodified. + dd if=${TEST_MOUNT_DIR}/foo bs=1k count=$start of=foo.copy + atf_check -o file:foo.md5 md5 -q foo.copy + i=$(($i + 1)) + done +} +file_extend_cleanup() +{ + common_cleanup +} + atf_test_case file_sizes cleanup file_sizes_body() { @@ -699,6 +733,7 @@ atf_init_test_cases() atf_add_test_case dataset_removal atf_add_test_case empty_dir atf_add_test_case empty_fs + atf_add_test_case file_extend atf_add_test_case file_sizes atf_add_test_case hard_links atf_add_test_case indirect_dnode_array From nobody Thu Sep 28 20:50:16 2023 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 4RxQbY4CTvz4vZcX for ; Thu, 28 Sep 2023 20:50:17 +0000 (UTC) (envelope-from 0100018add8e783c-89229ef1-c46b-4cc1-a67e-26739d4c0ae6-000000@amazonses.com) Received: from a8-176.smtp-out.amazonses.com (a8-176.smtp-out.amazonses.com [54.240.8.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQbY1ngrz4vms for ; Thu, 28 Sep 2023 20:50:17 +0000 (UTC) (envelope-from 0100018add8e783c-89229ef1-c46b-4cc1-a67e-26739d4c0ae6-000000@amazonses.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1695934216; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=Y4tgPcWNEBQUacTrPqk0l86OZ0EXuKCn8sQ888+3/ls=; b=bVj6YyYNzPbO6EZfnY1f5hUg1Yz9olGnL3TmdGVzOeuEFHW1KhjnjP3KggSOKZPU LEPPlu4p7d0tkUbwQZrM6Z3ykdTm4q5BRYGIHz9oIzg1uArYB5scoZjh3nQ+PS2krW6 lqy9QgGf1BvcDpYL5P64tHDIIemg2p/a0pqaVurU= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1695934216; h=Message-ID:Date:MIME-Version:Subject:To:References:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=Y4tgPcWNEBQUacTrPqk0l86OZ0EXuKCn8sQ888+3/ls=; b=DxiIwPXP7QUBD5gJU0Il0Y7Flf1TjM30aftayNnwa4HrqxDFEtXero+FjCSQ6QST lRhbHluKoT01hE6HMTsOoqaen5sQPUNNPM+BpzRnPlO+GrS7nRpKLY3TK3EnY6r5k3f Meu08MPuFDjQBEKXxO6ykE1j2prhEtPmRwDZtkeo= Message-ID: <0100018add8e783c-89229ef1-c46b-4cc1-a67e-26739d4c0ae6-000000@email.amazonses.com> Date: Thu, 28 Sep 2023 20:50:16 +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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: git: ef20cd33d328 - main - makefs/zfs: Ensure that the last block of a file has the right size Content-Language: en-US To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202309282039.38SKdd0O089600@gitrepo.freebsd.org> From: Colin Percival In-Reply-To: <202309282039.38SKdd0O089600@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-SES-Outgoing: 2023.09.28-54.240.8.176 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:14618, ipnet:54.240.8.0/21, country:US] X-Rspamd-Queue-Id: 4RxQbY1ngrz4vms On 9/28/23 13:39, Mark Johnston wrote: > makefs/zfs: Ensure that the last block of a file has the right size Thank you! > MFC after: 1 week Can we make this 5 days instead? I'd like to have this land in time for 14.0-RC1. -- Colin Percival FreeBSD Deputy Release Engineer & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From nobody Thu Sep 28 20:56:23 2023 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 4RxQkh5SVxz4vb5J; Thu, 28 Sep 2023 20:56:28 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQkg5DXGz3CHk; Thu, 28 Sep 2023 20:56:27 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="N/eda9yh"; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::830 as permitted sender) smtp.mailfrom=markjdb@gmail.com; dmarc=none Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-4194d89a6dfso37898431cf.0; Thu, 28 Sep 2023 13:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695934586; x=1696539386; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=AWxXZOyxRY/XtE+vLgwXkWIfLnY5ZKNN0rMzReOOvuo=; b=N/eda9yhinaOMXP8VyGaWZB04VKJWxn1NkSEZtzNNhubNS/KtEF60XNrPkYRwcg0wk E4zP2HjHpneZOy0Iy754zF58EByPm+w+E1xhoVVl9zwDre2/2TfYykmTwCLK+Rm5kRC3 u5Etd2PbGqNR8N3pFHqNoEICMESRLvMYE6DSKdEENOfin56zNMvPj9fM8hE4UU6fQupQ i5wHFJGpPWQNOF+prGkbwBXOuDg34qZUPv37B/gfiaYgmzwt4qe1WfcQEGGuK8aHvyKW pB88lEY8TUewlbJyUz4HEtVRq2BInUx4cxwuIctarQXERqsWqWbRlbg6tNgCsOlM4l3L ib2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695934586; x=1696539386; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AWxXZOyxRY/XtE+vLgwXkWIfLnY5ZKNN0rMzReOOvuo=; b=mu+2vKW72PDiudQKNM2xBqns6B5TUrhEmxCebjX7UiSYrwgeoYySqJ4UCdMIeKRoqF FGRsfH0wnFiUuhpw+A3wOQqYLxXILDnphU7UrkSaVhmf5bxDS0TazuZgc1uG6rwLZzC5 n4Uf+rEWb81uxpwgVBACaU4jaT0zIXJ2YSkiI9qMfMVyl4OmNdS9M5Jy3XH10+Q2c/9o XOvgmDQdQO/SfpwMVx6c+F05uInbMqapOyhxOCBSxLBhX5Cq9OL4BK26H1k0eCaWte5B DpaKFI67lxcQcWJgigYF5SgkSbW43Hq/M7HdciIFplI5uzs7azHvxbcjPz7X+Rr8rlsL 1dbw== X-Gm-Message-State: AOJu0YxMrQzzZgKZXGQEsJIYd2Y3BTrZGJK7EcAPbRHaF0rbs1P8e81D 7Xb9mVBuZhn6Pos99UUHO9HQiXtLL4o= X-Google-Smtp-Source: AGHT+IFFPnP2fZ2QpR+U/85Q3/yKbbRXJ3i8VQO4n6yQu4rcnc4C5+9YGH9Ig1pNR2jzp8mc2NgXdA== X-Received: by 2002:ac8:5ad1:0:b0:412:2b1b:2d53 with SMTP id d17-20020ac85ad1000000b004122b1b2d53mr2821083qtd.8.1695934586559; Thu, 28 Sep 2023 13:56:26 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id ex14-20020a05622a518e00b0041815bcea29sm3572075qtb.19.2023.09.28.13.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 13:56:25 -0700 (PDT) Date: Thu, 28 Sep 2023 16:56:23 -0400 From: Mark Johnston To: Colin Percival Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ef20cd33d328 - main - makefs/zfs: Ensure that the last block of a file has the right size Message-ID: References: <202309282039.38SKdd0O089600@gitrepo.freebsd.org> <0100018add8e784e-64b5c7d1-7e4b-4381-8e27-504295179ec1-000000@email.amazonses.com> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0100018add8e784e-64b5c7d1-7e4b-4381-8e27-504295179ec1-000000@email.amazonses.com> X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.67 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.973]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::830:from]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RxQkg5DXGz3CHk On Thu, Sep 28, 2023 at 08:50:16PM +0000, Colin Percival wrote: > On 9/28/23 13:39, Mark Johnston wrote: > > makefs/zfs: Ensure that the last block of a file has the right size > > Thank you! > > > MFC after: 1 week > Can we make this 5 days instead? I'd like to have this land in time for > 14.0-RC1. Sure, that's fine with me. From nobody Thu Sep 28 21:02:43 2023 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 4RxQsv6jVlz4vbfh; Thu, 28 Sep 2023 21:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxQsv68L2z3DJh; Thu, 28 Sep 2023 21:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695934963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cpc2pRAfVIVTwTED0Hd41iS6/6endcle7IKMOHmnt8k=; b=XXQpGUpJ+ISwFqatWdPSfTXZG2vtxpodTt2+YkyRveNNJf2E2uc24qOzgGczG3ekTDMRv7 SvktIWmYYILaEN8rGWxYO0Q1KZT0kWF53mkRH2RKSPMTz7Yc0g7D2ergRyM12nxRlWTV2J 9qmXkNfJ4SDVroGQ62ErIi5HwykTyALgps/QS3SB+IGIeojV8BNKclAI4UZIUrvwXp7jgR fQ9eCn5MqED5NOdWFydPTT9UotaHcMweJzFrIz44pk2oNlQckaJk26vKOqgulow4PZA7rV tSVpYOBeSRi6qaFOu3xNmWcftpwkdTFEeWkvg+0uMYSMEokh6f0IlTr+s1OaiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695934963; a=rsa-sha256; cv=none; b=UAFl5KC1NppWTu6c5YXO9KLuPIv6CKFHrYut6SEz2Yd5ranUxMFsSCg0bYg6REKroWxp2c 59GwA5k5YmBdinkFMzTV7c3ZHgs021azAyoVSp57bt3nkmeaj3MmzbsFxmMgRBjQtDpIkG NUv4QfXKNMpRIYp4XVKv7CN3ZEmAmcs3e6upEvw5GjWcsW2sc0/nLBgFd6C84UKUqgL35d nQr8EZwd8KxO3JvBOIBKKTIaM3RE+ORF0Y6I0q4dwxudJDmtUeEloAswhCGnTiDGxO65nL 7tnnLDz3F5Z3XhyJdgXprgu8+hLMDLZzV/ddnWAFu5xU9FTBCUo91zOHT7+Yxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695934963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cpc2pRAfVIVTwTED0Hd41iS6/6endcle7IKMOHmnt8k=; b=APRcp3wWR/yfElpfwZM3wAGeGQWehTHr3kiu2qAIM1+S0D8TqZU7fygFWgZjiT3gnAfmYF NyrFttY7Rg3v4EYrEbOJh95Mi7HrQIRoymaNzUuG9mJhOe+lBnRb1MIH4xyPloKhILUPiN TPmSeaOI2yxBQ+LIEjM8i00z4y5CJJQYutN1r5iHsFnIt6SgLYPX2b5IBLU0x7jqMbLIfM 6Z4MFc9xwLw8Fpm3wPXdSfhVIZ+d187fqvcxogA7qvcFeDa+z0a4wpvQphstXZe8OpfoPf sOmO+x2q1MeviwFKxANzyZzTDHlvL8ALXaPsLa3FV4mYfxgfJyMTU4AjJxLUxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxQsv5947zd4s; Thu, 28 Sep 2023 21:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SL2hO4038940; Thu, 28 Sep 2023 21:02:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SL2hqZ038937; Thu, 28 Sep 2023 21:02:43 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:02:43 GMT Message-Id: <202309282102.38SL2hqZ038937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: b45ab4b000b4 - main - Move the adding of CFLAGS_LAST to bsd.sys.mk 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b45ab4b000b46d301a0d95b856590067e3d67eb5 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b45ab4b000b46d301a0d95b856590067e3d67eb5 commit b45ab4b000b46d301a0d95b856590067e3d67eb5 Author: Simon J. Gerraty AuthorDate: 2023-09-28 21:01:56 +0000 Commit: Simon J. Gerraty CommitDate: 2023-09-28 21:01:56 +0000 Move the adding of CFLAGS_LAST to bsd.sys.mk The point of CFLAGS_LAST is to be the last thing in CFLAGS so add it last. For DIRDEPS_BUILD this can best be done via local.dirdeps-build.mk which is guaranteed to be the last makefile read, but that does nothing for non-DIRDEPS_BUILD bsd.sys.mk is close enough to the end. Reviewed by: obrien Differential Revision: https://reviews.freebsd.org/D42001 --- share/mk/bsd.sys.mk | 5 +++++ share/mk/local.autodep.mk | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 2b1a3e103b89..4cbe01404876 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -501,3 +501,8 @@ ${_tgt}: ${META_DEPS} .endif .endfor .endif + +# we are generally the last makefile read +CFLAGS+= ${CFLAGS_LAST} +CXXFLAGS+= ${CXXFLAGS_LAST} +LDFLAGS+= ${LDFLAGS_LAST} diff --git a/share/mk/local.autodep.mk b/share/mk/local.autodep.mk index d3772aa2b819..bc5bfd3e75db 100644 --- a/share/mk/local.autodep.mk +++ b/share/mk/local.autodep.mk @@ -11,10 +11,6 @@ NOSSPPICO?= .nossppico PIEO?= .pieo OBJ_EXTENSIONS+= ${NOSSPPICO} ${PIEO} -CFLAGS+= ${CFLAGS_LAST} -CXXFLAGS+= ${CXXFLAGS_LAST} -LDFLAGS+= ${LDFLAGS_LAST} - CLEANFILES+= .depend # handy for debugging From nobody Thu Sep 28 21:18:37 2023 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 4RxRDG12MLz4vcRq; Thu, 28 Sep 2023 21:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxRDG0WJBz3Gcy; Thu, 28 Sep 2023 21:18:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tuw7ZJCNjYJRaYEPM1kJ5SqPkizWzmQoADi73t1hoEM=; b=CC5+RRuwOzFOESKaSR1bYc8y0H9gDTyN/xSDYWzURrZrwQkD3BjAnIeHxF2nkAxUbjPhiG bQgRgIyIwZx4a/9hIovaDYGGRnxU/zd28wWBTZarQp73XYZ5jCsiLnoZWr//tb+DQWNZuB MxXQJ3jk+C0OzC5GG8Idx+B9GeTKnM9vbmasb3hId89g0jnxLraC+jaPon5FbIyld9FlHs MS3P8lJuzwJNjg5A/2RNpAX17rrFvflN2kzHoWTjDQUCGpyIM5q8p9LJ2K8d/cxhrc+fSd Lti3TGLbh0bUDStHweuSn5BdOzuF6DzIpAO1r1JcsOTH0pPMpnC6vO0Zk3BEPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695935918; a=rsa-sha256; cv=none; b=doBtdZHCGp5gSOTrNufg8atzvRSyQCiEN1XvMD28ySJdQZQsPxLA/GUFZfNf1/Hd0LvtAF YYYHb3ieXR9JpP4c/dvs7y4w9y1YccBKAwDQIbhftXctjxXaKwz7Ck4U5dUw/J0GLmB15e a+I3dAwqUvDJbVU4w5bePlXT/iegf76ABiAO/FOmO4YxjwaZZ/EQOFcbRSRbG5PQWbRbzF iwTVbljRAQHnYfIOz6ctl3ShQZ2XR639ZyaVpBesBphWmoHzSd80dCeQZafXreY1rmAW5H NbRjPtEhscYZaVDKkIbuq7UYRCxj2oiuS6O7OC57aUag1JUqnSDMnvNSBv5+0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695935918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tuw7ZJCNjYJRaYEPM1kJ5SqPkizWzmQoADi73t1hoEM=; b=Yi6Z666iVUohOrnNsrBNo3KxOE9sDL8MpyIlb3fbwYoR0mSWrO1kR07KyeR4jONB47QWEY Gu/zRhYlUHdiAKxsgftvUyK796lgDLVfIsIeoPwlI8xbiH5YrQnXpgtfn5UrYrMOA9XeGv K7benCu6fX8NhOtIC72q/mFY0ANwbMBfQH6x2ecb67+iaUs0xRb6dUAgo5f/01l87i2ZqW Oft4lv1Raa/Hkg9vMTUwPPjdr5gKTjHN7U3Mx4TAyjFZv6YdMQpGat0Q6aMZIYFG63tHiZ OZcQhvHpD5twzulBv/AhWrJZBO8qBh2kwAFHvJRM0A4YIvxD4pMtsI6gIISUGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxRDF6jP5zdgG; Thu, 28 Sep 2023 21:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLIbHl056935; Thu, 28 Sep 2023 21:18:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLIbFA056932; Thu, 28 Sep 2023 21:18:37 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:18:37 GMT Message-Id: <202309282118.38SLIbFA056932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d33a4ae8ba53 - main - x86: Properly align interrupt vectors for MSI 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d33a4ae8ba5343f555842e6e32321f9cd64dfd09 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d33a4ae8ba5343f555842e6e32321f9cd64dfd09 commit d33a4ae8ba5343f555842e6e32321f9cd64dfd09 Author: John Hay AuthorDate: 2023-09-28 21:08:08 +0000 Commit: John Baldwin CommitDate: 2023-09-28 21:08:08 +0000 x86: Properly align interrupt vectors for MSI MSI (not MSI-X) interrupt vectors must be allocated in groups that are powers of 2, and the block of IDT vectors must be aligned to the size of the request. The code in native_apic_alloc_vectors() does an alignment check in the loop: if ((vector & (align - 1)) != 0) continue; first = vector; But it adds APIC_IO_INTS to the value it returns: return (first + APIC_IO_INTS); The problem is that APIC_IO_INTS is not a multiple of 32. It is 48: As a result, a request for 32 vectors (the max supported by MSI), was not always aligned. To fix, check the alignment of 'vector + APIC_IO_INTS' in the loop. PR: 274074 Reviewed by: jhb --- sys/x86/x86/local_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 17b0223f834b..b382368cc626 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -1582,7 +1582,7 @@ apic_alloc_vectors(u_int apic_id, u_int *irqs, u_int count, u_int align) /* Start a new run if run == 0 and vector is aligned. */ if (run == 0) { - if ((vector & (align - 1)) != 0) + if (((vector + APIC_IO_INTS) & (align - 1)) != 0) continue; first = vector; } From nobody Thu Sep 28 21:20:01 2023 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 4RxRFs6FLSz4vcQT; Thu, 28 Sep 2023 21:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxRFs5kgTz3H6w; Thu, 28 Sep 2023 21:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695936001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX3Jxk6l/2ruwfAI/DggtXiY7HcgqwKErXgpNePtZdM=; b=rqUICqh0k6YEXgr+cTarW53ghGmJqHGe/ppdHHpgKFMHkCOwwUbM1tXSM/1jZHD+l7BcQE TS07evB6kO2KopV2HKsOsIR3P2ww21ZawXHrM9r0psvfFpwSdqYz4YMONfmgcEGPAloKW7 BfgRhCgAHRoNurwLmWmzcjYTpQ5HFMkVNUiZucJC3yvZC08Io2/dQzais51Xm5XAK2EQOR LzI8MOIrK6UyPKo0tbSlpeQeOsmz2/N3ak3gc2Y7gOXhDKT/dG216IMvvIk1LILEavZ0yM EOK241wB41mzT0js6uNu1cVSCjpmlBST/njmgKcrHQtPogPCUM/utFEVxX6oIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695936001; a=rsa-sha256; cv=none; b=S367WyRBedEHWjdSl5aMhxQHa8xZCwiPtUgnIUqyqobpbrsLxR1/BXX11hlEVzMqXYXh6C 9GL9ZgMJv6D0ekdGIyZiOg4O0YzUu2xy3G+MqWLUFxaCkUZzgC+J0GjCMGKFxd4Zj4vEL8 EMBnvYm9PhjePgyoJSgXJrmj1nycy6vX0TQNMX4jex/jatz3Z5gHQhKjeHBas/+jMCtJHH Ji7Xzzsq7xWBDK3CY2VF/Or1pkdwZ8TpWQ+WH2470W3oyU0CQtril8VZSyM/GEkbtWX5H4 8DjJHGyvBHRgcDgGagNRKhEqNQqmDvaQua1xM2V1K7MpcO5nrZZpqfLpww2STg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695936001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WX3Jxk6l/2ruwfAI/DggtXiY7HcgqwKErXgpNePtZdM=; b=oxG4wT/rUxpGn/6NAJCUOtBBsSA/wmcTEOdznmHoVOgGF9jPsWqFq7BUb42m6XWOBnho5G m8XqW5//FaRoR3Ws3pkI/IQazs33ZBoOrLMO2ooDm+IEZ5VJN7XtRBTsvPeSyVY8f5p+Ku xzivmQpXwN6cttyRSS6DLO42iURMn7KP38Vd8s6ZwDA0lYHGaecqxbA8gARxhBmwy54Gqa 9jlCW6V3IyASLxQtD8Pyy0OWcnTf/MEK3cNdvSp2vhQAwNYoakT4wHnNGdN5HTM/WtyYPK JhW5Lok+dWJgR0ZwrPskqE8OgMluI856x7x9syqEvbYu0LBO1FDPo5GhtQ2dFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxRFs4pMZzdDV; Thu, 28 Sep 2023 21:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLK12v059144; Thu, 28 Sep 2023 21:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLK1bw059139; Thu, 28 Sep 2023 21:20:01 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:20:01 GMT Message-Id: <202309282120.38SLK1bw059139@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 0f87915f4338 - main - Remove unnecessary -isystem for host 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0f87915f4338cbe2bb73999a85fb8b91a7936ac7 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0f87915f4338cbe2bb73999a85fb8b91a7936ac7 commit 0f87915f4338cbe2bb73999a85fb8b91a7936ac7 Author: Simon J. Gerraty AuthorDate: 2023-09-28 21:19:11 +0000 Commit: Simon J. Gerraty CommitDate: 2023-09-28 21:19:25 +0000 Remove unnecessary -isystem for host Turns out we do not need -isystem/usr/include and it can interfere with newer toolchains. Reviewed by: stevek --- share/mk/src.init.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/share/mk/src.init.mk b/share/mk/src.init.mk index 580f9c9c8e09..e35d615d0e1a 100644 --- a/share/mk/src.init.mk +++ b/share/mk/src.init.mk @@ -32,10 +32,6 @@ LIBADD+= egacy .endif .endif -.if ${MK_STAGING} == "yes" -ISYSTEM= /usr/include -CFLAGS+= -I${STAGE_INCLUDEDIR} -.endif .endif .endif # !target(____) From nobody Thu Sep 28 21:43:18 2023 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 4RxRmk4w4kz4vdst; Thu, 28 Sep 2023 21:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxRmk4K4yz3JwN; Thu, 28 Sep 2023 21:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695937398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lg8bUBkoh1rDTZIeLD4JEMwgiVcScG8t9Nc+lbpbS40=; b=JO8dGumzyUYBj9gxJ+AJPa/UnD01G6TL7mENO1fFBttlNQDW+9BQA6K+3r4C9JvMG5A2rb G/CNsPmWuXe4jL8NtoDhF3y/jMSJVOIeieRS4MBKFtyiD0ro7+dur4TKh3LOBjqKoVvTes VRR9MgnQGChXJob/s6HnvJKxz3fYRY4Abavoy/7Cw7GdUILULdaBbr0pFxbHD7d05ksOIH jPCCJP9dpg3JXioMttglhQmP6RIyZ6yP/PpnQIspKnJ4TKSvOiNLudFvWZxs1+8qPAktz2 JFh5soM3501rgQ7lzOq1CMEGHI8AjbuSbzbQobaYl6La13HyQ6Vsna+6VDah2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695937398; a=rsa-sha256; cv=none; b=uLluvvlJLGsexJO41OMd36iov5dMKFe3uRTtKaisMmL2fmzD47+nl4+MIT8gUCafFwdpow Qhw2C0eifjgcuJRGepERZfCOu4rjmu3kkf2KmJAS6lA85EirwnyZnpMExmy0Y49/5etc8h odo5xPedGS1VyrtlmeoxjOAOmIHB7zds1MTFGnyM9GvkkEHfdzIgkkbksgbwimJncyA9i4 7Jgk1GReWyYNXQFAQ5nU+Oc1dLjlcYsJ0mQfD52zEsYRxnVY5KYLxbZb2kro+yJw8aPulZ 8ucQAVrec0FA+1LPQo+o3vD7AQMvpVPouL3qI080ejO6fTacNSUpLZYy5EtIBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695937398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lg8bUBkoh1rDTZIeLD4JEMwgiVcScG8t9Nc+lbpbS40=; b=W0JK1Ko1mMbbkTallAvBKrAIxjwfy6FEboIXqqO9PV2YZCP0VUo1meJhlN86MnvMF0jSwX F0cS4B4/ScIljKt6S6g6hP+CvQ6ugX0Tgu3iL2v5VxR+g/1Ya+qGigaxZTq1PaR3BtRu/2 995kvZfOpq5/CQv2rHHpZ6fjqjfUsueoaHwLA/953iSVJTun+Nbgb79fpbzvPoF+vFHKO1 bF85I2pXC+z5nmghUFR3oqry0nXqKGcQfW9JmwP6skv0AHBky5LJB4rEop70aiRgxlxxuf 1OK4rtg81emYKmZJXEXwQUSM0cm5WDFBiVcB9ii5EW4Ik9qKWlTM8/KfyTx1Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxRmk3MmnzfHc; Thu, 28 Sep 2023 21:43:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SLhIZe005739; Thu, 28 Sep 2023 21:43:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SLhIZa005736; Thu, 28 Sep 2023 21:43:18 GMT (envelope-from git) Date: Thu, 28 Sep 2023 21:43:18 GMT Message-Id: <202309282143.38SLhIZa005736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 992ec09f3783 - main - bsd-family-tree: add macOS 14 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 992ec09f37837a3f7d131bc70a66d6e41b814e9b Auto-Submitted: auto-generated The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=992ec09f37837a3f7d131bc70a66d6e41b814e9b commit 992ec09f37837a3f7d131bc70a66d6e41b814e9b Author: Sergey A. Osokin AuthorDate: 2023-09-28 21:42:08 +0000 Commit: Sergey A. Osokin CommitDate: 2023-09-28 21:42:08 +0000 bsd-family-tree: add macOS 14 MFC after: 3 days --- share/misc/bsd-family-tree | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 0910f577bdbd..1a99910e1297 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -446,6 +446,8 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 7.3 | | FreeBSD | | | | | 13.2 | | | | + | macOS | | | + | 14 | | | | | | | | FreeBSD 14 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -872,6 +874,7 @@ FreeBSD 12.4 2022-12-05 [FBD] DragonFly 6.4 2022-12-30 [DFB] OpenBSD 7.3 2023-04-10 [OBD] FreeBSD 13.2 2023-04-11 [FBD] +macOS 14 2023-09-26 [APL] Bibliography ------------------------ From nobody Thu Sep 28 22:18:50 2023 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 4RxSYk3WVZz4vggY; Thu, 28 Sep 2023 22:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSYk2yMgz3Mlm; Thu, 28 Sep 2023 22:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btKEhuAjL39mnkDGyJxZ/LHuKBUM/rSk6WhrU1IoH34=; b=OHq6yA8VIV3WhXHbe0we3lwB7e7L4Jlr27tA79/e5btmpu2FdL6iE4xOG5FZgjUIxpm90G C/kdNQgIajSC/+QGAQEoFWr+zLTy+2WDVpIiPiHwP97vbF/zLthPFjmVlj69IHJ0y1NrVN HG/b9T7ANFYYRebJPetS9FL0Z+5Md9S/fTv3ApBah5F0aZFJ77JkYWnkA+CrKyc5CE34Ht qBJm0/y7HHLTS/PNA1+QzHXYZBYLsgmTPFvkMx9b7vtwzcrf6sIi6NazYSeZ6ppr0WP/I+ xGZ7hkDnk0sY+Bb4L6bgR0bi/bjUfnR6btS3/Xeub76A6c8roWR5d5nnckpjVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939530; a=rsa-sha256; cv=none; b=b6svqQ0BJOc6JPi1+4dV+ljI/AMhmsFIKi1R12uGVvRXNDWtENer7OHbOdKYIA3gU6cfIy +6gW+KxPHNoBL9/e2Q2GhIgrBIXP7SPZQAVnvZjNr3KqoOHoDq9BHERGwpTQjxLTs9uqsb iGA3t0ziExbV4wXeUBg0aJGZaLhikmL9bMGt3qR8w2OEtXExeBuYkZKi0hHK894scksfWY fUKF0C7oy5M8BCr4ZUm4m5kStn7XlkLw/bXpCO+rpfcy7N4fUmJB2FY19EHsBs6xEDDROp kS44bgML3J3lt5Pot2x4pZgzvrusq2u4rEegcgSkV1Wq9+ADtSA5efIHWkVBfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btKEhuAjL39mnkDGyJxZ/LHuKBUM/rSk6WhrU1IoH34=; b=Oy2iKxZJzk84HXgEZ9qKczqy4W4wpW10PNBtqjbPHyWbO6VZaOWtugiihtaKyYaDcijSUI RKf8rpoIUufzgSrl55EalaMWIVTw2BEBA33qJ9BW6k7KBgrtnD55v/Up8JzQA9ljlCaPKz 6JoUkrYc3Y7WfVcjyozWwSXID40UPEFFKcBI2vbYZiD2adl/5M4vKCXOOsA1qeVZ/K0/TL IvviLfePhEO0D7KI9dVqDEIgSxkct+OUQaJl99FDAQCMn74s2mILPba77PBvUA+yPHUBRf 4XXd8swgdSFNS2WnIj7YX7TcUzCSx32E77rv7EvwmWqkWP6WaAZ/nhK2w4TSpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYk20zwzfDm; Thu, 28 Sep 2023 22:18:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIoAX056758; Thu, 28 Sep 2023 22:18:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIo8U056755; Thu, 28 Sep 2023 22:18:50 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:50 GMT Message-Id: <202309282218.38SMIo8U056755@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: fcbeeb5ff456 - main - release/Makefile.vm: Garbage collect unused 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: fcbeeb5ff456b2f21d19d4fc6221774b512e30b7 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fcbeeb5ff456b2f21d19d4fc6221774b512e30b7 commit fcbeeb5ff456b2f21d19d4fc6221774b512e30b7 Author: Colin Percival AuthorDate: 2023-09-09 00:49:35 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 release/Makefile.vm: Garbage collect unused bits The cw*-package targets were introduced in February 2015 as part of adding support for building GCE images; but GCE support was reworked in June 2015 and the cw*-package targets were in fact never used. Remove them. The *_DISK variables were introduced in February 2015 as part of adding the cloudware-install target; this was removed in May 2016 as the cloudware images are published via the respective cloud systems and not published as disk images via the FreeBSD FTP site. As such, the *_DISK variables are not unused; remove them. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41789 --- release/Makefile.vm | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index ad09f3ff6602..befa9625fefb 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -26,35 +26,27 @@ CLOUDWARE?= BASIC-CI \ AZURE_FORMAT= vhdf AZURE_FSLIST= ufs zfs AZURE_DESC= Microsoft Azure platform image -AZURE_DISK= ${OSRELEASE}.${AZURE_FORMAT} BASIC-CI_FORMAT= raw BASIC-CI_FSLIST= ufs BASIC-CI_DESC= Image for CI -BASIC-CI_DISK= ${OSRELEASE}.${BASIC-CI_FORMAT} EC2_FORMAT= raw EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image -EC2_DISK= ${OSRELEASE}.${EC2_FORMAT} GCE_FORMAT= raw GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image -GCE_DISK= disk.${GCE_FORMAT} OCI_FORMAT= qcow2 OCI_FSLIST= ufs OCI_DESC= Oracle Cloud Infrastructure image -OCI_DISK= ${OSRELEASE}.${OCI_FORMAT} OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -OPENSTACK_DISK= ${OSRELEASE}.${OPENSTACK_FORMAT} VAGRANT-VIRTUALBOX_FORMAT= vmdk VAGRANT-VIRTUALBOX_FSLIST= ufs VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VIRTUALBOX_DISK= ${OSRELEASE}.vbox.${VAGRANT_FORMAT} VAGRANT-VMWARE_FORMAT= vmdk VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare -VAGRANT-VMWARE_DISK= ${OSRELEASE}.vmware.${VAGRANT_FORMAT} .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) @@ -90,9 +82,7 @@ CLOUDTARGETS+= cw-${_CW:tl}-${_FS} CLEANDIRS+= cw-${_CW:tl}-${_FS} CLEANFILES+= ${_CW:tl}.${_FS}.img \ ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} \ - ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw \ - cw${_CW:tl}-package -CLOUDPACKAGE+= cw${_CW:tl}-package + ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT}.raw ${_CW:tu}${_FS:tu}IMAGE= ${_CW:tl}.${_FS}.${${_CW:tu}_FORMAT} cw-${_CW:tl}-${_FS}: emulator-portinstall @@ -114,17 +104,6 @@ CLEANFILES+= ${_CW:tl}.${${_CW:tu}_FORMAT} ${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} cw-${_CW:tl}: cw-${_CW:tl}-${VMFS} ln -f ${${_CW:tu}${VMFS:tu}IMAGE} ${${_CW:tu}IMAGE} - -cw${_CW:tl}-package: - @# Special target to handle packaging cloud images in the formats - @# specific to each hosting provider. -.if exists(${.CURDIR}/tools/${_CW:tl}-package.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/tools/${_CW:tl}-package.sh \ - -D ${DESTDIR} -I ${${_CW}_DISK} -S ${WORLDDIR} -.endif - touch ${.TARGET} - . endfor .endif From nobody Thu Sep 28 22:18:51 2023 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 4RxSYl4w6Qz4vgqF; Thu, 28 Sep 2023 22:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSYl43Mnz3NGF; Thu, 28 Sep 2023 22:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5M2TLD7ZtNFFyip88kuTivhkNK5IvkkE1Ddb9dj+Bh4=; b=ZnRByh21DI+510DZ45+YAz1wJBOcR9iX6I8NMDXVd3lXwUkDoQo+mH5wVbu4SG0sZH2ENp WbzJbnzOFsY2yjZCmDDCe9iFLLo+dhHfZ9tkioL7EGzpu/4qZwK5mnOC/E+XVUSSRbSoe/ rDYPwwvBEBylnFcKtNPO3RIBBttRwhPni8GemiV5CO+anR6vr2f7DLnDnhaZVITvDahI8D Nswr7rzQDnaeFE43ezPhG7Dgr0NVEhq6YheVOJBmkjdq4eQV/+EzJAfMs1vfOFyR8u2WXt XPT/DW+8JlNpTjl0jPZFoOP59F6ozNNqVIQYdLxY/HmmC2O8mQaCG+zYoSNZGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939531; a=rsa-sha256; cv=none; b=nymI0X56QS6oi3xr/wU8shwHGrq50fU0BE1eEG16DmtjFGrnG2/Q2SNfQgs6xZJemCsGJP jPgo1M6Lbvmj3hiJ5uJcwicgZI3GqBGa7gZyGetE8MgbL0PiV9VvZb4AqBo7HN2JZyJ8NN QzhqyKPgMjT3pqc/8FY0CBk8oiYv/5D5/UyQbz4PGau7WR7CxfdVkfEl2InZbNf4YC6u9V 2Wd1qNQFfSkAty/2R6g9rBOyR4JKI9DNtXvgan4TMXvS3IUvaf2zIOPgukrSiJF+GFzEJx FejPjyBNQlriaMC+xv0Q/wIjzJUfPFVxg5OzvOj0lW67oFjie+24kdEaVtTiKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5M2TLD7ZtNFFyip88kuTivhkNK5IvkkE1Ddb9dj+Bh4=; b=MKAOjEUO47HO7i7VbeMNlpzQzOFNsq7wZnFnXHv3VIb/6g65xBeQdblYKUt8fgCP3cIvrz MVkLxw7tt7vkW2Nh/7KmqcnytUZ82aku5fh8GN8CEUYnfHMxDrliqClymS5VzfVsMQm6UY apudoQqhw6SMIaa722QOiG9RkuXPDP5M4ypEAn1AbDS1IwedVo7pzpHqHrITj5dtUVQYpP ynNSbNZNU1r+p+ziPC1p5l69ZSGKOR6FIT8KdDF2qNBpRYlVYwE528O5kI/XseDeyZTwiC Pxcr/6SlhsoGWoiR3+g5/POVoTcDCSpOYdKNfhjHxeZPsyOPT0oO44MPaeLBkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYl305dzfwG; Thu, 28 Sep 2023 22:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIpRl056803; Thu, 28 Sep 2023 22:18:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIp8H056800; Thu, 28 Sep 2023 22:18:51 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:51 GMT Message-Id: <202309282218.38SMIp8H056800@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: e6eeac9b7179 - main - release/Makefile.vm: Add support for CW flavours 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: e6eeac9b71795252b12a6b94e7a06633a9ff6e4e Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e6eeac9b71795252b12a6b94e7a06633a9ff6e4e commit e6eeac9b71795252b12a6b94e7a06633a9ff6e4e Author: Colin Percival AuthorDate: 2023-09-09 00:51:08 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 release/Makefile.vm: Add support for CW flavours There are two "Vagrant" images right now: "Vagrant Image for VirtualBox" and "Vagrant Image for VMWare". Rather than listing these separately in a CLOUDWARE list, place "VAGRANT" into a CLOUDWARE_TYPES list and then use a VAGRANT_FLAVOURS variable to identify the two versions. Add make logic to allow defaults (in this case, image format and filesystem) to be specified once for VAGRANT and inherited by both flavours. This will make future work to add flavoured EC2 images simpler. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41790 --- release/Makefile.vm | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index befa9625fefb..bb719da68ead 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -17,12 +17,11 @@ VMDK_DESC= VMWare, VirtualBox disk image QCOW2_DESC= Qemu, KVM disk image RAW_DESC= Unformatted raw disk image -CLOUDWARE?= BASIC-CI \ +CLOUDWARE_TYPES?= BASIC-CI \ EC2 \ GCE \ OCI \ - VAGRANT-VIRTUALBOX \ - VAGRANT-VMWARE + VAGRANT AZURE_FORMAT= vhdf AZURE_FSLIST= ufs zfs AZURE_DESC= Microsoft Azure platform image @@ -41,13 +40,26 @@ OCI_DESC= Oracle Cloud Infrastructure image OPENSTACK_FORMAT=qcow2 OPENSTACK_FSLIST= ufs OPENSTACK_DESC= OpenStack platform image -VAGRANT-VIRTUALBOX_FORMAT= vmdk -VAGRANT-VIRTUALBOX_FSLIST= ufs +VAGRANT_FORMAT= vmdk +VAGRANT_FSLIST= ufs +VAGRANT_FLAVOURS= VIRTUALBOX VMWARE VAGRANT-VIRTUALBOX_DESC= Vagrant Image for VirtualBox -VAGRANT-VMWARE_FORMAT= vmdk -VAGRANT-VMWARE_FSLIST= ufs VAGRANT-VMWARE_DESC= Vagrant Image for VMWare +.for _CWT in ${CLOUDWARE_TYPES} +. if defined(${_CWT}_FLAVOURS) +. for _CWF in ${${_CWT}_FLAVOURS} +CLOUDWARE_GEN+= ${_CWT}-${_CWF} +${_CWT}-${_CWF}_FORMAT?= ${${_CWT}_FORMAT} +${_CWT}-${_CWF}_FSLIST?= ${${_CWT}_FSLIST} +${_CWT}-${_CWF}_DESC?= ${${_CWT}_DESC} +. endfor +. else +CLOUDWARE_GEN+= ${_CWT} +. endif +.endfor +CLOUDWARE?= ${CLOUDWARE_GEN} + .for _V in TYPE BRANCH REVISION . if !defined(${_V}) || empty(${_V}) ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../sys/conf/newvers.sh); echo $$${_V} From nobody Thu Sep 28 22:18:52 2023 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 4RxSYm5jhSz4vgqM; Thu, 28 Sep 2023 22:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSYm4ttvz3NGt; Thu, 28 Sep 2023 22:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWVUTamcjIuIIsixddQIyvMqOB3A716TX4BJ++7FoRE=; b=IJFSpyT9uS6Qs9rJ31JMHxb/UJQWZCkh05y2Q3U4+58BhKFveuvP+U8PfP7YZ7JtHA80dU fDUVoVsldDEMtCz0878iZW51CRTmowXC2onbxMLO3xI0ap5feW7TyRMCPDpM45NNBamvsa 1g/pNkKWbNZ9om+yYMIKadiYxV4JUPP1et4WsEOiYSzSnEh0qywSDdQC4FELcAkA2uDWZ5 Pj75G6LhZK79CdsdM4eAU38PEI5EXV76demQRpYMV18m5gGGH9jZLFmNM/ImntR9XhwfwV 3hfRQuOJG6eZ1+kCyIHhlHxmJ+6VwSHc0S4ClR0KxqYo2kv04xZgMwEwlSM0xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939532; a=rsa-sha256; cv=none; b=PXrSFlG7EdAc5HkbfMeAfYDD/KCSIPV7MT6YWhTopD657vuZAjrenRWNg2cs86xhqsZHh2 GmDz3GMnv6i7o2m1Lzviu1zf33CoAfi+11X9PFSF402ptp0XhfWaLw0mEAjnwDnevWFyyq cqETr4Oh2emMAk0qGkwX/UHWZHdTxUss1S8n50SbQJdiEEANZNn9A7zj90njtlntenrU2U YeYFCc8f7/Y7GYUtu1E+lmP2iGpUliT8gJWhEYlKRV9jz6JO9PVQxdIvH6eL+4izCBGM2j qB+eBj7BLuYdNdhEFsBuKoc8CEQhds/+hF5rAs/5Olc8DClD7rUqx1pDqi/RZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rWVUTamcjIuIIsixddQIyvMqOB3A716TX4BJ++7FoRE=; b=oU5HBhU3oGylMu8Lf0CjU6bD66fru30eAPLjwZAtRjKER9zGGfZfcD5PwcnF/CNQZ5lE1/ ysFCrMBEnuIT1U3egogLvBwfaboXqlCL2RQVUUWVpu5RZM/q1DzKpZp4+NtL3I6iV9z+7c QBB+BLFEbSgpzoOYpRbeEedbGTeprC/tUtHOEf866QFHle8x7Xd9Zu5BIYjRa9AsN/Bne3 kMAaJBMcxhKleq540hJ1L+R5eaXMCPtuWeetOtE15JZAIpjgjtd5pu2R8BS1NmXg+Vwp2O tQw81OZalnpyrmfphO15iscb7EGu1tponaGQE450/8r8/RerKTMerXIfsymikg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYm40J5zfwH; Thu, 28 Sep 2023 22:18:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIqO4056848; Thu, 28 Sep 2023 22:18:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIqGH056845; Thu, 28 Sep 2023 22:18:52 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:52 GMT Message-Id: <202309282218.38SMIqGH056845@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: 7494fb6b7d80 - main - EC2: Flavour existing AMIs as "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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 7494fb6b7d809257d4eb9eff06ce226143f27add Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=7494fb6b7d809257d4eb9eff06ce226143f27add commit 7494fb6b7d809257d4eb9eff06ce226143f27add Author: Colin Percival AuthorDate: 2023-09-09 00:51:57 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 EC2: Flavour existing AMIs as "base" Using the recently-added "cloudware flavours" mechanism, turn the existing EC2 AMIs into a new "base" flavour. The only user-visible change is that AMI names now include the word "base". releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41791 --- release/Makefile.ec2 | 16 +++++++++------- release/Makefile.vm | 1 + release/tools/{ec2.conf => ec2-base.conf} | 0 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index b3f32d0e3efb..c674c967ff57 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -51,11 +51,12 @@ cw-ec2-portinstall: @touch ${.TARGET} .for _FS in ${EC2_FSLIST} +.for _FL in ${EC2_FLAVOURS:tl} .if defined(SSMPREFIX) && !empty(SSMPREFIX) -SSMOPTS_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/base/${_FS}/${REVISION}/${BRANCH} +SSMOPTS_${_FL}_${_FS}= --ssm-name ${SSMPREFIX}/${TARGET_ARCH:S/aarch64/arm64/}/${_FL}/${_FS}/${REVISION}/${BRANCH} .endif -EC2AMILIST+= ec2ami-${_FS} -ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL} +EC2AMILIST+= ec2ami-${_FL}-${_FS} +ec2ami-${_FL}-${_FS}: cw-ec2-${_FL}-${_FS} ${CW_EC2_PORTINSTALL} .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE}) @echo "--------------------------------------------------------------" @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation" @@ -75,14 +76,15 @@ ec2ami-${_FS}: cw-ec2-${_FS} ${CW_EC2_PORTINSTALL} @false .endif /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ - ${EC2ARCH} ${SSMOPTS_${_FS}} ${BOOTMODEOPT} --sriov --ena \ - ${.OBJDIR}/${EC2${_FS:tu}IMAGE} \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FS:tu}" \ + ${EC2ARCH} ${SSMOPTS_${_FL}_${_FS}} ${BOOTMODEOPT} --sriov --ena \ + ${.OBJDIR}/${EC2-${_FL:tu}${_FS:tu}IMAGE} \ + "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX} ${AMIBOOTMETHOD} ${_FL} ${_FS:tu}" \ "${TYPE}/${TARGET} ${GITBRANCH}@${GITREV}" \ ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} .endfor +.endfor -ec2ami: ec2ami-${VMFS} +ec2ami: ec2ami-base-${VMFS} ec2amis: ${EC2AMILIST} diff --git a/release/Makefile.vm b/release/Makefile.vm index bb719da68ead..679ac74f438c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -31,6 +31,7 @@ BASIC-CI_DESC= Image for CI EC2_FORMAT= raw EC2_FSLIST= ufs zfs EC2_DESC= Amazon EC2 image +EC2_FLAVOURS= BASE GCE_FORMAT= raw GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image diff --git a/release/tools/ec2.conf b/release/tools/ec2-base.conf similarity index 100% rename from release/tools/ec2.conf rename to release/tools/ec2-base.conf From nobody Thu Sep 28 22:18:53 2023 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 4RxSYp0zyzz4vgn2; Thu, 28 Sep 2023 22:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSYn5zmWz3N0b; Thu, 28 Sep 2023 22:18:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IuEQA+WDXuGyTpNIj0jvDRKfNERPphFQXYyNUZgZ7K0=; b=epU2JgV0SFjJRjMaCh8cdFXzyJTSU+4z12P3xOg1SznmKkV02K5i+uWHtGq1vGmElWD2/b m+EVh2UWvx4LN9g4kvS43ssJSiOk6X9JL8Pi5d553ntNunjmdnANzUWuTD0cE/mz09kL0d bZpVNg2i5qVTTHK5cISUETRimVWCHooUu87RreLiYWSbeTe0hfwfkgxRIY9+OAIqF8cTR4 ocG90dC9RN2qW1AZoWOx5rw799oDbsCK7l3L0PX5JaEDwEiaaXLlaVp9reXPJ7zKItjsw/ nTMBSbsqaOIPB+TgGhMFkPjnc+x/1gJMyWu3rSK8drzB9J8k/8kRC9Je55+Uzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939533; a=rsa-sha256; cv=none; b=eeLWMmihW0jUZlJ39VdIb0WKfQQVsFHYwalfUxPN5vmpnKCE35QZJkjmbDNgRqgDRxS8AX LynpUd83tEakwaq7VNo7A27BOrhoCYPRCkLmt3As1sXKSqJUa1AdbY8cAzFu4yGktZH3G7 72ZhKH6IVOuHNcJtq259/jhjjtH0nO2jlvCbwuRA10p+3n9/gQmpOYqzTOStQYEeZpVTqF r1IJoSjB0ZmI1FSzi8XBgfNmnRcjPIW7N4hhYo5GlP+lKDNfYs9zvn3txFLAezhv3nEdtg 3Dz2o3XkmVOi2WHeuwjmbzj2ZrIGwNzkg/t1pbMcFR7vpSdXZW0oJNNkKp81eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IuEQA+WDXuGyTpNIj0jvDRKfNERPphFQXYyNUZgZ7K0=; b=nE0+4wMq1xnnWd7ZGXT0Ik5zX6uccgHevDmTlxr+iTTVUmX6sD/ojHm+jK3a6mA7jDwJCD Jp81jsCPGIlM1IZCj8R/EEu4Rk5qa4TFZxE8GvLiE7i1nu5bnTvyUOWzV19QtDVcxA91y5 XQrRe1MjKPX1DZQ5E5lHV0vcJJWzCR279VeN+WrbAnXyOra+ycJXciEneuHKEgVi2eTMqb hoCyhPyL+xD/fJn4/tyDPqUbSvf2uY0Iai12fRrTcddIiroGmqW8z2xPBr34pLFhH8Ki2j scg4yrDcRzc/CHI9lPIagauSli10s7aGV+cm6rMWM700ymn0NhDQYTw2HYmSWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYn51dCzg05; Thu, 28 Sep 2023 22:18:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIrgd056897; Thu, 28 Sep 2023 22:18:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIr6T056894; Thu, 28 Sep 2023 22:18:53 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:53 GMT Message-Id: <202309282218.38SMIr6T056894@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: fada6e2389fb - main - EC2: Split off reusable configuration 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: fada6e2389fb62ff621a98fab7319e426da58b0b Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fada6e2389fb62ff621a98fab7319e426da58b0b commit fada6e2389fb62ff621a98fab7319e426da58b0b Author: Colin Percival AuthorDate: 2023-09-09 00:54:11 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 EC2: Split off reusable configuration bits Split ec2-base.conf into ec2-base.conf and a reusable ec2.conf, similar to how Vagrant flavours share a common vagrant.conf. releng/14.0 candidate. Discussed with: gjb MFC after: 5 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41792 --- release/tools/ec2-base.conf | 161 ++++++-------------------------------------- release/tools/ec2.conf | 111 ++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 142 deletions(-) diff --git a/release/tools/ec2-base.conf b/release/tools/ec2-base.conf index d033739adc26..f4c46fe285cd 100644 --- a/release/tools/ec2-base.conf +++ b/release/tools/ec2-base.conf @@ -1,78 +1,36 @@ #!/bin/sh -# -# -# Packages to install into the image we're creating. This is a deliberately -# minimalist set, providing only the packages necessary to bootstrap further -# package installation as specified via EC2 user-data. -export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ - firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client \ - ebsnvme-id" - -# Include the amazon-ssm-agent package in amd64 images, since some users want -# to be able to use it on systems which are not connected to the Internet. -# (It is not enabled by default, however.) This package does not exist for -# aarch64, so we have to be selective about when we install it. -if [ "${TARGET_ARCH}" = "amd64" ]; then - export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} amazon-ssm-agent" -fi - -# Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd dev_aws_disk ec2_ephemeral_swap" +. ${WORLDDIR}/release/tools/ec2.conf -# Build with a 4.9 GB partition; the growfs rc.d script will expand -# the partition to fill the root disk after the EC2 instance is launched. -# Note that if this is set to G, we will end up with an GB disk -# image since VMSIZE is the size of the filesystem partition, not the disk -# which it resides within. -export VMSIZE=5000m +# Packages to install into the image we're creating. In addition to packages +# present on all EC2 AMIs, we install: +# * ec2-scripts, which provides a range of EC2ification startup scripts, +# * firstboot-freebsd-update, to install security updates at first boot, +# * firstboot-pkgs, to install packages at first boot, and +# * isc-dhcp44-client, used for IPv6 network setup. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ec2-scripts \ + firstboot-freebsd-update firstboot-pkgs isc-dhcp44-client" -# No swap space; the ec2_ephemeralswap rc.d script will allocate swap -# space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances -# and the C4 compute-optimized instances don't have ephemeral disks. But -# it would be silly to bloat the image and increase costs for every instance -# just for those two families, especially since instances ranging in size -# from 1 GB of RAM to 60 GB of RAM would need different sizes of swap space -# anyway.) -export NOSWAP=YES +# Services to enable in rc.conf(5). +export VM_RC_LIST="${VM_RC_LIST} ec2_configinit ec2_ephemeral_swap \ + ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs \ + growfs sshd" vm_extra_pre_umount() { - # The firstboot_pkgs rc.d script will download the repository - # catalogue and install or update pkg when the instance first - # launches, so these files would just be replaced anyway; removing - # them from the image allows it to boot faster. - mount -t devfs devfs ${DESTDIR}/dev - chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg delete -f -y pkg - umount ${DESTDIR}/dev - rm ${DESTDIR}/var/db/pkg/repo-*.sqlite - - # The size of the EC2 root disk can be configured at instance launch - # time; expand our filesystem to fill the disk. - echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf - - # EC2 instances use DHCP to get their network configuration. IPv6 - # requires accept_rtadv. - echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf - - # Unless the system has been configured via EC2 user-data, the user - # will need to SSH in to do anything. - echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf - # The AWS CLI tools are generally useful, and small enough that they # will download quickly; but users will often override this setting # via EC2 user-data. echo 'firstboot_pkgs_list="devel/py-awscli"' >> ${DESTDIR}/etc/rc.conf + # EC2 instances use DHCP to get their network configuration. IPv6 + # requires accept_rtadv. + echo 'ifconfig_DEFAULT="SYNCDHCP accept_rtadv"' >> ${DESTDIR}/etc/rc.conf + # Enable IPv6 on all interfaces, and spawn DHCPv6 via rtsold echo 'ipv6_activate_all_interfaces="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_enable="YES"' >> ${DESTDIR}/etc/rc.conf echo 'rtsold_flags="-M /usr/local/libexec/rtsold-M -a"' >> ${DESTDIR}/etc/rc.conf - # Turn off IPv6 Duplicate Address Detection; the EC2 networking - # configuration makes it unnecessary. - echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf - # Provide a script which rtsold can use to launch DHCPv6 mkdir -p ${DESTDIR}/usr/local/libexec cat > ${DESTDIR}/usr/local/libexec/rtsold-M <<'EOF' @@ -82,94 +40,13 @@ vm_extra_pre_umount() { EOF chmod 755 ${DESTDIR}/usr/local/libexec/rtsold-M - # The EC2 console is output-only, so while printing a backtrace can - # be useful, there's no point dropping into a debugger or waiting - # for a keypress. - echo 'debug.trace_on_panic=1' >> ${DESTDIR}/boot/loader.conf - echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/boot/loader.conf - echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/boot/loader.conf - - # The console is not interactive, so we might as well boot quickly. - echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf - echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf - - # Tell gptboot not to wait 3 seconds for a keypress which won't - # arrive either. - printf -- "-n\n" > ${DESTDIR}/boot.config - - # The emulated keyboard attached to EC2 instances is inaccessible to - # users, and there is no mouse attached at all; disable to keyboard - # and the keyboard controller (to which the mouse would attach, if - # one existed) in order to save time in device probing. - echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf - echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf - - # EC2 has two consoles: An emulated serial port ("system log"), - # which has been present since 2006; and a VGA console ("instance - # screenshot") which was introduced in 2016. - echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf - - # Some older EC2 hardware used a version of Xen with a bug in its - # emulated serial port. It is not clear if EC2 still has any such - # nodes, but apply the workaround just in case. - echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf - - # Load the kernel module for the Amazon "Elastic Network Adapter" - echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf - - # Use the "nda" driver for accessing NVMe disks rather than the - # historical "nvd" driver. - echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf - - # Disable KbdInteractiveAuthentication according to EC2 requirements. - sed -i '' -e \ - 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ - ${DESTDIR}/etc/ssh/sshd_config - - # Use FreeBSD Update mirrors hosted in AWS - sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ - ${DESTDIR}/etc/freebsd-update.conf - - # Use the NTP service provided by Amazon - sed -i '' -e 's/^pool/#pool/' \ - -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ - ${DESTDIR}/etc/ntp.conf - - # Provide a map for accessing Elastic File System mounts - cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF' -#!/bin/sh - -if [ $# -eq 0 ]; then - # No way to know which EFS filesystems exist and are - # accessible to this EC2 instance. - exit 0 -fi - -# Provide instructions on how to mount the requested filesystem. -FS=$1 -REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//'` -echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" -EOF - chmod 755 ${DESTDIR}/etc/autofs/special_efs - - # The first time the AMI boots, the installed "first boot" scripts - # should be allowed to run: - # * ec2_configinit (download and process EC2 user-data) - # * ec2_fetchkey (arrange for SSH using the EC2-provided public key) - # * growfs (expand the filesystem to fill the provided disk) - # * firstboot_freebsd_update (install critical updates) - # * firstboot_pkgs (install packages) - touch ${DESTDIR}/firstboot - # Any EC2 ephemeral disks seen when the system first boots will # be "new" disks; there is no "previous boot" when they might have # been seen and used already. touch ${DESTDIR}/var/db/ec2_ephemeral_diskseen - if ! [ -z "${QEMUSTATIC}" ]; then - rm -f ${DESTDIR}/${EMULATOR} - fi - rm -f ${DESTDIR}/etc/resolv.conf + # Configuration common to all EC2 AMIs + ec2_common return 0 } diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf new file mode 100644 index 000000000000..a233bf5981c1 --- /dev/null +++ b/release/tools/ec2.conf @@ -0,0 +1,111 @@ +#!/bin/sh + +# Packages which should be installed onto all EC2 AMIs: +# * ebsnvme-id, which is very minimal and provides important EBS-specific +# functionality, +# * amazon-ssm-agent (not enabled by default, but some users need to use +# it on systems not connected to the internet). +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} ebsnvme-id amazon-ssm-agent" + +# Services which should be enabled by default in rc.conf(5). +export VM_RC_LIST="dev_aws_disk ntpd" + +# Build with a 4.9 GB partition; the growfs rc.d script will expand +# the partition to fill the root disk after the EC2 instance is launched. +# Note that if this is set to G, we will end up with an GB disk +# image since VMSIZE is the size of the filesystem partition, not the disk +# which it resides within. +export VMSIZE=5000m + +# No swap space; it doesn't make sense to provision any as part of the disk +# image when we could be launching onto a system with anywhere between 0.5 +# and 4096 GB of RAM. +export NOSWAP=YES + +ec2_common() { + # Delete the pkg package and the repo database; they will likely be + # long out of date before the EC2 instance is launched. + mount -t devfs devfs ${DESTDIR}/dev + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg delete -f -y pkg + umount ${DESTDIR}/dev + rm ${DESTDIR}/var/db/pkg/repo-*.sqlite + + # Turn off IPv6 Duplicate Address Detection; the EC2 networking + # configuration makes it unnecessary. + echo 'net.inet6.ip6.dad_count=0' >> ${DESTDIR}/etc/sysctl.conf + + # Booting quickly is more important than giving users a chance to + # access the boot loader via the serial port. + echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + + # Tell gptboot not to wait 3 seconds for a keypress which will + # never arrive. + printf -- "-n\n" > ${DESTDIR}/boot.config + + # The emulated keyboard attached to EC2 instances is inaccessible to + # users, and there is no mouse attached at all; disable to keyboard + # and the keyboard controller (to which the mouse would attach, if + # one existed) in order to save time in device probing. + echo 'hint.atkbd.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + echo 'hint.atkbdc.0.disabled=1' >> ${DESTDIR}/boot/loader.conf + + # EC2 has two consoles: An emulated serial port ("system log"), + # which has been present since 2006; and a VGA console ("instance + # screenshot") which was introduced in 2016. + echo 'boot_multicons="YES"' >> ${DESTDIR}/boot/loader.conf + + # Some older EC2 hardware used a version of Xen with a bug in its + # emulated serial port. It is not clear if EC2 still has any such + # nodes, but apply the workaround just in case. + echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf + + # Load the kernel module for the Amazon "Elastic Network Adapter" + echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf + + # Use the "nda" driver for accessing NVMe disks rather than the + # historical "nvd" driver. + echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf + + # Disable KbdInteractiveAuthentication according to EC2 requirements. + sed -i '' -e \ + 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ + ${DESTDIR}/etc/ssh/sshd_config + + # Use FreeBSD Update mirrors hosted in AWS + sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ + ${DESTDIR}/etc/freebsd-update.conf + + # Use the NTP service provided by Amazon + sed -i '' -e 's/^pool/#pool/' \ + -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ + ${DESTDIR}/etc/ntp.conf + + # Provide a map for accessing Elastic File System mounts + cat > ${DESTDIR}/etc/autofs/special_efs <<'EOF' +#!/bin/sh + +if [ $# -eq 0 ]; then + # No way to know which EFS filesystems exist and are + # accessible to this EC2 instance. + exit 0 +fi + +# Provide instructions on how to mount the requested filesystem. +FS=$1 +REGION=`fetch -qo- http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//'` +echo "-nfsv4,minorversion=1,oneopenown ${FS}.efs.${REGION}.amazonaws.com:/" +EOF + chmod 755 ${DESTDIR}/etc/autofs/special_efs + + # The first time the AMI boots, run "first boot" scripts. + touch ${DESTDIR}/firstboot + + if ! [ -z "${QEMUSTATIC}" ]; then + rm -f ${DESTDIR}/${EMULATOR} + fi + rm -f ${DESTDIR}/etc/resolv.conf + + return 0 +} From nobody Thu Sep 28 22:18:54 2023 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 4RxSYq2yLGz4vggp; Thu, 28 Sep 2023 22:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxSYp6XYZz3N0x; Thu, 28 Sep 2023 22:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZkdCXcA1hbQ3rMruF3Gd/mnTz1ZdN1xYM3qK8zA3s0=; b=aj5wCyJzw6kuXwQBi6TBoDsNHNJl4bAqPpOTF89WjWCNfYXMbRWBWU1s9UNjGIzo2hxf7t aIIC7lKoR7794ZueAjRAfeMxSf1sHkFIyWb5rXxD7WDawajSJTKOONBT2SN+hoD3yFX/li ic5utSE1n887OnIm6a4cLUR/rD1BcZ+29WEFmM3Z7uqnTLpEjwkBm6bhKAxaQ8EzfftWqk EVkQ5LsIORLsk8RxpNLdDoT5X/CRXutTYv+MfR5ubv0itVml67n8UGwhv3kXsDNAbeuw+d pIr+dydS0vZXIvisfTu51YIdNU0lkouOmR2rG49s/MxFvyZtm46HAObrl8vyXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695939534; a=rsa-sha256; cv=none; b=u0e35fmWztT6HW0ySPDILn3cFUw922sZJU0gYEfepQnR8MSS9kg0xBwYMn7vQX2aBzkBOb fDeJprbyVPp39AkK76CRQpoPodrZRNvbF0an5mec17y9Mtgs8qozmjAgCiyjxxgtV51AfR tkq3FVMr6D3eo6OZaKZsnuM06vwsGBMlzgt22AOUxRZtC3TFjdz6b9xF9IGqhf4YEFN8Uk RgVCKIxEyQL4rPInjoGvxrDaLtgaH1mvsdqLob4G+v8UL+dq4g3IPB7/A/cak0vqFhjX67 xNuclgvErd/xsGIUzYELlt/NFEv7+XizDCOCSOIOmBjjsQNUEDTI2RoC1kowCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695939534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tZkdCXcA1hbQ3rMruF3Gd/mnTz1ZdN1xYM3qK8zA3s0=; b=UDlgZn3CnhfBILMkAUoxGOkUEDtmQId2TnC1GDaaq3r6GX1GpeFEKkixUD/IpL4h3gnCt/ hUN87TJfPH+Zy3Ho0hzcsxQXuH8Kx/Y/Sk7ITFDOA/LaTcf8PMhxr4HFje1Ydo3qQY847S b5TrGu0ld3OI0+W09D/aSHY24a9Jr+FHEI4muOFp/rmn2R2ROe4ApgzyS4Gf0oUiTaS8cq Qkvb1OOq9O+uyB3HSJH+KZeUwiJVkYq25MlIxXZq0yP6xC99QMD+6UciofA88V/2oumEPB Y0OW43a1UULb0MLZLThyT/kL39pTMtO2luDpHxo6cRuSac6XerQHfgbSzecF3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxSYp5dfxzfDn; Thu, 28 Sep 2023 22:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38SMIsJD056940; Thu, 28 Sep 2023 22:18:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38SMIsEO056937; Thu, 28 Sep 2023 22:18:54 GMT (envelope-from git) Date: Thu, 28 Sep 2023 22:18:54 GMT Message-Id: <202309282218.38SMIsEO056937@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: 1f4ce7a39f0f - main - EC2: Add experimental cloud-init 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 1f4ce7a39f0f4b0621ff55d228014ccddb366d37 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1f4ce7a39f0f4b0621ff55d228014ccddb366d37 commit 1f4ce7a39f0f4b0621ff55d228014ccddb366d37 Author: Colin Percival AuthorDate: 2023-09-09 00:55:16 +0000 Commit: Colin Percival CommitDate: 2023-09-28 22:18:46 +0000 EC2: Add experimental cloud-init images Known issues: 1. The ec2-user user is created with a homedir of /usr/home/ec2-user instead of /home/ec2-user; this appears to be a bug in cloud-init's FreeBSD support. 2. Cloud-init configures IPv4 networking but not IPv6 networking. releng/14.0 candidate. Discussed with: gjb Reviewed by: imp MFC after: 5 days Relnotes: yes Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D41793 --- release/Makefile.vm | 5 +++-- release/tools/ec2-cloud-init.conf | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index 679ac74f438c..1a58a548b9f4 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -30,8 +30,9 @@ BASIC-CI_FSLIST= ufs BASIC-CI_DESC= Image for CI EC2_FORMAT= raw EC2_FSLIST= ufs zfs -EC2_DESC= Amazon EC2 image -EC2_FLAVOURS= BASE +EC2_FLAVOURS= BASE CLOUD-INIT +EC2-BASE_DESC= Amazon EC2 image +EC2-CLOUD-INIT_DESC= Amazon EC2 Cloud-Init image GCE_FORMAT= raw GCE_FSLIST= ufs zfs GCE_DESC= Google Compute Engine image diff --git a/release/tools/ec2-cloud-init.conf b/release/tools/ec2-cloud-init.conf new file mode 100644 index 000000000000..2dd4df390fa3 --- /dev/null +++ b/release/tools/ec2-cloud-init.conf @@ -0,0 +1,31 @@ +#!/bin/sh + +. ${WORLDDIR}/release/tools/ec2.conf + +# Packages to install into the image we're creating. In addition to packages +# present on all EC2 AMIs, we install cloud-init. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} net/cloud-init" + +# Services to enable in rc.conf(5). +export VM_RC_LIST="${VM_RC_LIST} cloudinit sshd" + +vm_extra_pre_umount() { + # Configuration common to all EC2 AMIs + ec2_common + + # Configure cloud-init + cat <<-'EOF' > ${DESTDIR}/usr/local/etc/cloud/cloud.cfg.d/98_ec2.cfg + disable_root: true + system_info: + distro: freebsd + default_user: + name: ec2-user + lock_passwd: True + groups: [wheel] + shell: /bin/sh + # Currently broken, cloud-init hard-codes to /usr/home/* + homedir: /home/ec2-user + EOF + + return 0 +} From nobody Fri Sep 29 00:05:10 2023 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 4RxVwQ5SmLz4vp7q; Fri, 29 Sep 2023 00:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxVwQ4bcPz3YgX; Fri, 29 Sep 2023 00:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695945910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2N1YDvM0zYahXUGt+MpM/ZvJuOjx0eAEQqDWI3C2v+E=; b=URomtB61u1MRrjwP6t7/NfKFYULt1HVaGv/v1ujl1G55Cfxc+dKUzzRcL0TOaDC7Vniwo/ s8V1f526qLugBdNcXki8C+KoaF5WY3ZInaOwqcwCm4UiUpOpFFsyH8dIWE+6lZuk8O0GXk DvAbgozS2lupqZGWsgGv8TfixNLIgsDbUe5bWh50Ru5D35ewWiepUjVtqPuJ4eb9/bUjTt WQKutCbgLti9e41Je3s7CDSf7M4FXwIpI0YzhzrCTC3gydXjwno4hb2I0DkYx5YuWjL8hV 7K/ELeQiKKcLc6EGhx1VeiDK4yfuqx3nFBE5JzOJYTt+lkf0dRjuyqQN84fN6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695945910; a=rsa-sha256; cv=none; b=OUH0wsASAaD4Xw/eu91B9zbKdoRwmaPb/c1xWEa8JCF7uREcC4JkC+McX1YSskc2AjIQsm NgM9x9bbJ+aTJLpIn5IgYGjKysZgLkLzV2MI4zlavGmq1pEtWtuegtItNd43kVxvpHh14T 5hr6otQ1W/ALozrVzkOhYW4zoQqS27OtIgNlpLBKm2i9OIfrT3NnRwaPwpqSU8AlGxawjf VfMiUR4gnxJBZaoabM2zhf3I4nmTixlPxKYXejLBvECdA03BZP1AgZLtyBnBET61vmAq3M dh//O4cynrDm7aDrecgbCwLvRh5EoAwxhLl3U2K1FkytVfbkoPC1W3O5eETj5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695945910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2N1YDvM0zYahXUGt+MpM/ZvJuOjx0eAEQqDWI3C2v+E=; b=N7dZ83/+hOP98rTdP+T/bf+1q5PON//3gsEnGfhb/Ic74cbfN0npW/w+4NHJID1IM++0WY 9La4lktceTMktk0kptd+mZ/IWBv6dmq2PJvgQtDF46Tnh+4oq4g9Vx4zru8EbP43P2BnkW fIZDZ0+3QkL3K4bkebIPefYUPixhONIQAskC0UPMytPx/Vn5lFnOFk18O6FjWDXyYSwue0 JBQTHz5xqYkSndMxBbOJ4WQ+VymvLMQCgwtu8vkr0nabpwk9LpmJ/huZWweifcFx9ho9gq GolagssUTp4bxzUdwwvvHIpT9kR4t+19VQxs85MWuY7HD8oG5NZsl1FWQoTEBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxVwQ3fBgzj2T; Fri, 29 Sep 2023 00:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38T05AuO038926; Fri, 29 Sep 2023 00:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38T05AJN038923; Fri, 29 Sep 2023 00:05:10 GMT (envelope-from git) Date: Fri, 29 Sep 2023 00:05:10 GMT Message-Id: <202309290005.38T05AJN038923@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: ba883e7a5ac4 - main - ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e commit ba883e7a5ac43b27a373f2b1b0044fd2eb769d4e Author: Zhenlei Huang AuthorDate: 2023-09-29 00:01:43 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-29 00:01:44 +0000 ipfilter: Add sysctl flag CTLFLAG_TUN to loader tunable The sysctl variable `net.inet.ipf.large_nat` is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly. No functional change intended. Reviewed by: cy (for #network) Fixes: a805ffbcbce8 ipfilter: Make LARGE_NAT a tunable MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42005 --- sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 35daad4715bf..69be4abb2485 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -134,7 +134,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_running), 0, "IPF is running"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); -SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RD, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); #define CDEV_MAJOR 79 #include From nobody Fri Sep 29 05:52:06 2023 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 4Rxfck32xlz4w8Vm; Fri, 29 Sep 2023 05:52:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rxfck2Nk2z4Tp4; Fri, 29 Sep 2023 05:52:06 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695966726; 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=rpL2OgDM0fFY0zzwiGdJJzt26G1+xNBwgFdYqklwLpI=; b=d6CB7bAumkq7dj/PQRwCajzJ9iX0pDVJCXjIvNxeYGpn7oWB5n4WgdLN0CW8VT2xQl31RL ogSCC7XoOdrqogMMeO/pC/plznk3tIKytxaT6LZBa/sefTmjeceyerMAo7JpxRtFOhbqt9 IAK7nv4dzeVx8m6EKlYrhdCaSu90PZxhO6tAfHiSsu6m6ZRdEg+qSZh0R2vG/gySyrd329 ySP6/kwkQ9fmOWteC7Uw1f4dg6co5sjDNJSSAUavi0ah04NXcbj6zNbd9RsvCKlhjX24qC H04ZiS4M1m05B0Kki8yOPmE6Tc1KcVDEcDc8exSVnn+pYzEmyR3jqbIeyafsNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695966726; a=rsa-sha256; cv=none; b=wuStinZcMC+nPkNRdOTGL0WJbqkCtUWTt3LMJQ31atu46P6Zk9kydJL8I20fMSRJrQsiEX n6CcVCUhatu2rwEZ1F0th7BodT13yacQxPcaNvIdA4aijuC4L4wZM9dRlMPGQGn6DTJGri TvajfvDvsAA83g6mae9hdSbfKojI+OpmTWPMOfRikJoB8peLE5aH3jQ7CDtTOWLRaXg5im iaBCZfzfRcfVBMlEB/BHiHcC7Vjal6eV8scXtpHHfPYlYSPvMxlq2NBbJQ0lzF2f01r7zF kh/UA6Zm6taLWd+UWGd4upBGjUYEn+XP3C5SWJObaA9cyZVpE8ajoE3FbcmlJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695966726; 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=rpL2OgDM0fFY0zzwiGdJJzt26G1+xNBwgFdYqklwLpI=; b=l5lT9TCzEdCohp1OAt9WivaQ1rP3wx3Hk/t4un9/bxlJmSKo5vnStwlDbhRKxe1c1t/zyC 785N442fWr3f7mRxPsiDvz/FA1TuET46wYjwxOXy37BEm9FPI1VrqBzXzI4GrsBKSvkByS U4ApM4OtRD6NK/lJtPs75hzNteuGRjqkQZrQicBxXp2p3EGlVO44zK31vk6U9Qj9F1XqiI cO6yaRpuZ5o/Mby9zqoLPx7HAZpMEEDrdHz4m4c3TitfteVJykvvVpz/KIVYtxOQTuMf6R TXamyv5Pnh7kCvxHchnsGHTEVojI6ni4clodRKc8ZcH3kt9NICUT8XPCjbDwfA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 20D351DDF1; Fri, 29 Sep 2023 05:52:06 +0000 (UTC) Date: Fri, 29 Sep 2023 05:52:06 +0000 From: Alexey Dokuchaev To: Colin Percival Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7494fb6b7d80 - main - EC2: Flavour existing AMIs as "base" Message-ID: References: <202309282218.38SMIqGH056845@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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202309282218.38SMIqGH056845@gitrepo.freebsd.org> On Thu, Sep 28, 2023 at 10:18:52PM +0000, Colin Percival wrote: > commit 7494fb6b7d809257d4eb9eff06ce226143f27add > > EC2: Flavour existing AMIs as "base" I think it should be "flavor" since FreeBSD prefers American spelling. > @@ -31,6 +31,7 @@ BASIC-CI_DESC= Image for CI > EC2_FORMAT= raw > EC2_FSLIST= ufs zfs > EC2_DESC= Amazon EC2 image > +EC2_FLAVOURS= BASE Since other nearby values (format, filesystems) are lowercase, perhaps it makes sense to say EC2_FLAVORS=base and :tu it when needed in the code to keep declarations consistent and tidy. > GCE_FORMAT= raw > GCE_FSLIST= ufs zfs ./danfe From nobody Fri Sep 29 13:27:04 2023 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 4Rxrjh6xn8z4tvM2; Fri, 29 Sep 2023 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rxrjh6Ctkz3Zh2; Fri, 29 Sep 2023 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695994024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kmDiVACZ2QvK9RdbdWYRfVxV9pfocQkic1tmh+8T4h8=; b=si3PW9G6sLKvDVdGofPFqwLzN/K9PQoX59DA96czPBuETsGYWAdOTSKXqeXP6UZSv+uNPC Bndb4aZKVrQ+VKWpJ27BHe/vdtUFCKlnpVBcIiB9gohucwRTu6ohVdbFKGe0NwIDYzSDHn E4+ceIIYfO11hXguwNrHWZzf9a9P/4bDih1JnE6uMvhj+ELcc1dtQ53/8CxTvt1WRO5RmK u6ayi4HN4tgBP11/pF8pVEEH070g5wWezPcR8zMJCZmILWfusa9gOytPUw2Eovt6MsqGhe Ywx5xp07MbIZHkxbb8cLWtFWjytToZRALJhA0SWHHkzChS2f/jfconLJN0RXIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695994024; a=rsa-sha256; cv=none; b=JE4J4tAKpjEOzYRZttHRCW7WhKsIx0RCMUvinSdhDFp544RNC7R0T+w7g9Q0HgwjvKGlIm EFgbxEjTDz1RLt1qVj0Uyp2HYiOG/dYlHPDFjyFHZ+e8QbY/Lwj32COQaIMVUPljyB5nn9 aFgPGD7Kkfj6hSgkeq1LApurTcN3bsB8MB+T7Y1LmpTVxD7206pbQTxweUQDSLyp04W8UF mTBwxQmF9LdEKddX0bpTtG16eO/Gmm1USkH5+XA91h3z2O16/dRxBA6pTNdn46Vn63hMPA wob8kauJ4ZDcv2dO7VbVEMLS9jFBZkJb+XEoLxDqfwlV7e7yVtyMIm8hC9LbTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695994024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kmDiVACZ2QvK9RdbdWYRfVxV9pfocQkic1tmh+8T4h8=; b=O232n0mRlgKFvoScSTIrk97TUUvgjvtmgMIwXHsj63xMDVPYgc8EeKiH+sVds66F9KAM5y M6CodiRukQ94q4Iw440eO+gTFccsH4wNMLdOCXMFuQQUPX/Op8SenLcMgJHaeHo6HbYaLx K2pp83J9n7SjMyX1Y0Yg+2NEhh2qzIjJ95Y9h5bQT/W0/fmuYoVI1Z8YkiziapEk9ULKNQ /o7/0AypOGX7MeJ8zRpjs2p9aqw3CmBfGyayFWViXZ9Vnf2S2a5DkcGTJ3rKHiW3WCT+qb Nb8J8Tq4yEw/wE+p0wV25C+awNto5npthDyvsBOygz+c4xWgKAPbAYMcibmHyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rxrjh59gtz15PK; Fri, 29 Sep 2023 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TDR4GA067180; Fri, 29 Sep 2023 13:27:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TDR4I3067177; Fri, 29 Sep 2023 13:27:04 GMT (envelope-from git) Date: Fri, 29 Sep 2023 13:27:04 GMT Message-Id: <202309291327.38TDR4I3067177@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: f147cf0ee2b2 - main - dtc: Ensure it is built in C++17 mode 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f147cf0ee2b2642c0a133a71c8a5dc018518d923 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f147cf0ee2b2642c0a133a71c8a5dc018518d923 commit f147cf0ee2b2642c0a133a71c8a5dc018518d923 Author: Jose Luis Duran AuthorDate: 2023-09-29 13:24:32 +0000 Commit: Ed Maste CommitDate: 2023-09-29 13:26:51 +0000 dtc: Ensure it is built in C++17 mode Explicitly specify the C++ standard to be used in the Makefile. This prevents macOS cross-builds from using the default gnu++98 and fail. This syncs dtc with upstream commit 39a58cfaab7d55c7975ebf905d859ba91a369fa0. Reviewed by: emaste Fixes: 29a55fd09b0a ("dtc: Sync with upstream commit 26a0fe5") Differential Revision: https://reviews.freebsd.org/D42006 --- usr.bin/dtc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile index d7661ae164c3..9b1aff13511f 100644 --- a/usr.bin/dtc/Makefile +++ b/usr.bin/dtc/Makefile @@ -6,6 +6,8 @@ WARNS?= 3 CXXFLAGS+= -fno-rtti -fno-exceptions +CXXSTD= c++17 + NO_SHARED?=NO .include From nobody Fri Sep 29 16:23:35 2023 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 4Rxwdd6jPrz4v6vg for ; Fri, 29 Sep 2023 16:23:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rxwdd3zFrz4VnS for ; Fri, 29 Sep 2023 16:23:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-406618d0992so4540695e9.0 for ; Fri, 29 Sep 2023 09:23:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696004628; x=1696609428; 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=+4Q3QiVoLSQLWEyk1uBORwL+oEY6Lr0Fvt2Ghbr0PBE=; b=hYaPmzityd6Gv9uRD4Wto4PM5J40/wYr17hqunQ5eMlLtq8pYWIrbuaGhCzkRKc4lj 1wQmHUVWWhX0frn2b1/0hmJOrXjEIrrlwhp1eo1dABMwy7fRjvqEm5QwxYqzcDDWWhfu WLvfKH5IEUQ4RFiuxfKRY/Clo9etBYZ2OPLck4WMZYDwMhMZk95ehVz3cS/C1pbYKQxh VtP41kCqB7/U05Atb40TwMgB33iplViiCNfRJ+bHZ3k0209AK6kfUnJZ/N7YgfHtgK5n 21VoF7xztdXtPpFVhRWtV57iiXZ7FdC/w/R8KvtXga1jtHikNAVsf7a/tL2CmkZgDyMX /PKg== X-Gm-Message-State: AOJu0YwfZLyXwn1WnzdQJMMGrUQ4tmCNZU+Wgqa/PTm5hro8avQ/KMoC P0HSMau08PYlq88lUSUl8hfVwQ== X-Google-Smtp-Source: AGHT+IEqRphEEEZGzM8/VmSF+kahV8bs4FZyi/hUzK7/R2ZGEk68FGrSIjsdJK/lwpMW4n8WObrxXg== X-Received: by 2002:a7b:c84d:0:b0:405:4c3a:796f with SMTP id c13-20020a7bc84d000000b004054c3a796fmr4535523wml.2.1696004626968; Fri, 29 Sep 2023 09:23:46 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id y20-20020a7bcd94000000b004030e8ff964sm1735744wmj.34.2023.09.29.09.23.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Sep 2023 09:23:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: f147cf0ee2b2 - main - dtc: Ensure it is built in C++17 mode From: Jessica Clarke In-Reply-To: <202309291327.38TDR4I3067177@gitrepo.freebsd.org> Date: Fri, 29 Sep 2023 17:23:35 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Jose Luis Duran Content-Transfer-Encoding: quoted-printable Message-Id: References: <202309291327.38TDR4I3067177@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4Rxwdd3zFrz4VnS On 29 Sep 2023, at 14:27, Ed Maste wrote: >=20 > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df147cf0ee2b2642c0a133a71c8a5dc01= 8518d923 >=20 > commit f147cf0ee2b2642c0a133a71c8a5dc018518d923 > Author: Jose Luis Duran > AuthorDate: 2023-09-29 13:24:32 +0000 > Commit: Ed Maste > CommitDate: 2023-09-29 13:26:51 +0000 >=20 > dtc: Ensure it is built in C++17 mode >=20 > Explicitly specify the C++ standard to be used in the Makefile. > This prevents macOS cross-builds from using the default gnu++98 and > fail. This syncs dtc with upstream commit > 39a58cfaab7d55c7975ebf905d859ba91a369fa0. Thank you. Jess > Reviewed by: emaste > Fixes: 29a55fd09b0a ("dtc: Sync with upstream commit 26a0fe5") > Differential Revision: https://reviews.freebsd.org/D42006 > --- > usr.bin/dtc/Makefile | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/usr.bin/dtc/Makefile b/usr.bin/dtc/Makefile > index d7661ae164c3..9b1aff13511f 100644 > --- a/usr.bin/dtc/Makefile > +++ b/usr.bin/dtc/Makefile > @@ -6,6 +6,8 @@ WARNS?=3D 3 >=20 > CXXFLAGS+=3D -fno-rtti -fno-exceptions >=20 > +CXXSTD=3D c++17 > + > NO_SHARED?=3DNO >=20 > .include From nobody Fri Sep 29 18:43:14 2023 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 4RxzkV3fDjz4vWPt; Fri, 29 Sep 2023 18:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RxzkV37fwz3GB7; Fri, 29 Sep 2023 18:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696012994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bOohBTjKe/eoV+qm6C91KFZMiNWikhVEKySna1kFSzE=; b=pEdF7Eikx2ojzFhDU+HnzvOSe9fdOvbkeZxxhX7QwMhLLOeabKTmZAlC1Ciqq+S3SJipzS DwxqOjH47Uwc9oiU8ZNY+xwlz5IiY/z6xagdEPvZT+ilnfiJikT0rTMBi+2whhphPFDdyH lzTpEmMztzPp/Zim93ReCEqzWbGm+TU1aPW9M6E0x5h8tFfqtltQW7i4dhLg245lBullFj LqFvepUA7eG4atqe6h1i/Ww/KoT/XwbvGSVMKCIH6nZxtFZdC3g+Sh3kjHfXpChcqzec8n FLtydSonk/fVA1xLB9aF5jEl5klTyAXNAH6LfzC8DJyQyl2bBECRZxGhzIqIJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696012994; a=rsa-sha256; cv=none; b=K3XzLSLrA++ty9sTP6+wJGewT4Hn/+O/A45yg1lWoyRZqEmnFis0J40T97H6F9WWi0Dsql s7pGStLPa6taXPTT05/U9sIprqUyS6FyzoRIziRPBFDhcLYVrHtHd9XUkbwiJhnAOtnB22 m98Lfy8n/yzTvf0o2YeNox4EZc0wfBICZT+T2QJaYOXVtr/BLS0NPpIDs3pFpsVNXAEFwK SI9zD7dnIX6jfoGy5p4buhm7FGNT7dSH+c7tMc0nmwT2LUGIVYfgnBu0tlf2o9WJC6GZZb ZS90wgvR/w++v6GUt5xxFzvwna3m0qDIvNJcVRJZfGMnVdNBM+NK7DNb4kB70w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696012994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bOohBTjKe/eoV+qm6C91KFZMiNWikhVEKySna1kFSzE=; b=qJN+RoSf29HeOSBZzkUji7o77LKAI6dRNPinGg4T3EnF09dEx+tX78t3HRDfEgyRZNw1n3 u1oCJVh3Af9hxES9KjSRzMWcbkYCAGUAV07Lf1v+/BQJ+0vWN4KU2ONNU+awlZOeGjQWU4 BTGN4Vusi0kcSEP8fl/hwN39rjljdZUJo+mUwk0FYx4y5AczzvgShBKjbeE5eqvElS9apV pYDmASzvNkVWz+CHDOKvTMzPBCNLn5cNr/x3W5gBljs/1o5Cf7/cFpVhJwDBgcglHTWGKp /aVXCmUzSHCAMmZk0+bwn4SKvp+nYQ0PZOev72lGx4lgolvjCyw+Pdcs8icwQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RxzkV2Bz0z18N; Fri, 29 Sep 2023 18:43:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TIhEDc000752; Fri, 29 Sep 2023 18:43:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TIhE8o000749; Fri, 29 Sep 2023 18:43:14 GMT (envelope-from git) Date: Fri, 29 Sep 2023 18:43:14 GMT Message-Id: <202309291843.38TIhE8o000749@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: e2d3168d1207 - main - ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3 commit e2d3168d1207561df2e1cf0a2a8d13c198e5f8d3 Author: Dimitry Andric AuthorDate: 2023-09-29 18:41:52 +0000 Commit: Dimitry Andric CommitDate: 2023-09-29 18:41:52 +0000 ObsoleteFiles: remove duplicated and incorrect libclang_rt powerpc64le entries PR: 273776 MFC after: 3 days --- ObsoleteFiles.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 64003b2c976f..ff7e4e497fad 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -458,8 +458,6 @@ OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-i386.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64le.a -OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-powerpc64lele.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-riscv64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.profile-x86_64.a OLD_FILES+=usr/lib/clang/15.0.7/lib/freebsd/libclang_rt.safestack-aarch64.a From nobody Fri Sep 29 22:10:51 2023 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 4Ry4L417Vlz4tl1H; Fri, 29 Sep 2023 22:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ry4L40gKPz3ZTd; Fri, 29 Sep 2023 22:10:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696025452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h7M0K3UMbWXx/ZvSwnuN4fYlT87CGUxKDjnsVdZ8PQ8=; b=KX0r+kaOPU+MJ38p0QJvIYZ2do1iA2rt1hxPec7hb7dcxIOgu/+/ibyBUs2bHki0rPXY1I 16kDg04Tp7RiQa0iz8AiJLG0EcOVeHelyf7lBKkSEinwrnT4H88HFJXSXUqqj9rBBVqj5t uvRECM8aoL1p9qBhKnBliM5i+eyCw1gy7AhyQjH30JnUy/3QF278LNtftGB89Z03gAubfm w/EOOA32JjZFgydu6Qp0ChelPkP5WNVrVeBAKxxflnuWehLIbxjNGW9opi9hTZw1wJBS+8 n8Gt+FmIPWno9jE+102RNGuRL76nLlFE0QVfMkbAEwvCNqlgjo9cPxTVWKdWTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696025452; a=rsa-sha256; cv=none; b=cOSCjHkpEQeZ919xYj3Sq3CIu9OYAvCGk9+tZDxfGDE3fkuT+FLZduOE98myc13C6KK1os FmZFM+k5j8Z56XN7/K26axt6ksMVMsJhXgcNgCP5XVFQEZU3zzmTsXYCkx+ehTDTHPMQze zDN3PGr/sn7YA3ezLaY9TzFmeBSaMuiUOMpUgxtijRKff34QEEEY0/YEkSp8rZj9kdNpQP p2MN3zI/NaVsbjt25oUsIBM/3ERv8Czw/eZsu/971s8Yu12G4i7vlB3he56FSR8anVN8Y0 DFFJhygB29fXysSWPd5QQicAw2kPXFjtlDW0dXBKwrs94pwm+8/2n0wyu/K4wQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696025452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h7M0K3UMbWXx/ZvSwnuN4fYlT87CGUxKDjnsVdZ8PQ8=; b=L5mjJa5b8OCahWCbuswymbwNDjt5X0+VawNvTaDg+0eK2Wm/rdWuKgggu3SUItl7AoZDpr PAZ+1IkAo9shGOesu3u9QSVnqDH9fWtelohku8/9XwZOJBztrXrQVU1ORIvTFNXC6adkNo EDNmnxHCm+aViQVjC0RQHTuFt8pCKeYI0bFyYY12xQHU9vEfxmHw5x6dDx6WRjHg2LJOYx kYa99lR997PABaDsFZeT24NpBgHDEhmxcyBd7npaHaBVSjdMpntqa3bIAeA2ouWDJZ0ZQe lsQT2AkJpVokZVsC5ApaeKmAO6w1E7sh+cySUwoV6fzS7QRgvoYHNrRuMEGUrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry4L36rfsz6bF; Fri, 29 Sep 2023 22:10:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TMApsg044876; Fri, 29 Sep 2023 22:10:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TMApnC044873; Fri, 29 Sep 2023 22:10:51 GMT (envelope-from git) Date: Fri, 29 Sep 2023 22:10:51 GMT Message-Id: <202309292210.38TMApnC044873@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: aefda9c92da6 - main - pf: ensure 'off' is always set before use 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: aefda9c92da6571d405e1b27c5c68333ad8bbc57 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=aefda9c92da6571d405e1b27c5c68333ad8bbc57 commit aefda9c92da6571d405e1b27c5c68333ad8bbc57 Author: Kristof Provost AuthorDate: 2023-09-28 07:04:32 +0000 Commit: Kristof Provost CommitDate: 2023-09-29 22:10:32 +0000 pf: ensure 'off' is always set before use If we bail out early from pf_test(6)() we still need to clean up/finish SCTP multihome work, which requires the 'off' value to be set. Set it early enough. MFC after: 3 days Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index df4bd47c35d5..baa34b16f487 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7698,6 +7698,9 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, pd.af = AF_INET; pd.act.rtableid = -1; + h = mtod(m, struct ip *); + off = h->ip_hl << 2; + if (__predict_false(ip_divert_ptr != NULL) && ((ipfwtag = m_tag_locate(m, MTAG_IPFW_RULE, 0, NULL)) != NULL)) { struct ipfw_rule_ref *rr = (struct ipfw_rule_ref *)(ipfwtag+1); @@ -8249,6 +8252,9 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.af = AF_INET6; pd.act.rtableid = -1; + h = mtod(m, struct ip6_hdr *); + off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); + /* We do IP header normalization and packet reassembly here */ if (pf_normalize_ip6(m0, kif, &reason, &pd) != PF_PASS) { action = PF_DROP; @@ -8256,6 +8262,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } m = *m0; /* pf_normalize messes with m0 */ h = mtod(m, struct ip6_hdr *); + off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); /* * we do not support jumbogram. if we keep going, zero ip6_plen @@ -8272,7 +8279,6 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.tos = IPV6_DSCP(h); pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); - off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); pd.proto = h->ip6_nxt; do { switch (pd.proto) { From nobody Fri Sep 29 22:10:53 2023 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 4Ry4L539Kkz4tlNL; Fri, 29 Sep 2023 22:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ry4L52Tnsz3Zwg; Fri, 29 Sep 2023 22:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696025453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4TXnFXnhDfMKD2rts8Tt3GuXBukVL6NlReyCnRIBb0=; b=swnfoaFoDUvnBVvEH9HgqhGqaK4HEQAtaVVnUpQ2qd/uMH8v2TuJFVor1tPY7IkxphNz0i BQZad/velnhXgiy1PmiR+5EZqsICiu2+CR1/pjnapNq6PBrWBkGvF3tFJQlC4RKKrEqgXm Sv+U2jLpLuRAj1tBAwSfLDAQQbWucU1ytbcVOCH+hP5mLNnYeCl2vpdk+NnyuGhsXefnZE GGZ+DDMK26b59uGix2u3qorfk8+xHlWupkpYoFreOO1BnnfAXXmDURstmI5AJUTRSsEHJP LpTCTpDQoeyBqbwY4d3OSoJdfQvivGEnCk73LPMmMfnwh3eP1oDRU1STA5w7lQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696025453; a=rsa-sha256; cv=none; b=pbJQybTA/9/I3JYnbLPze1CHE8/QPW5IybXviX8SjvqTxC2zlY5nCa5kIO0nRyMT3dRbnK ofA1NPrR0eI833+iVWPmFy0m/LJudHv0pnSI6+YPMC3HlU4Z3cZYpmkvWej3Xd21yBydsZ A5Yj0Iou8jogiKJZuMTg07885vpMZUkBgHxfT8jWMpDRaDeXUhPXTxiA1ELcnTPOdpQzb4 OmrzV471v15spgrmvmy6pdWQCJFXQaS5TPBGp5GMVy6aEyAE2BEUnFCleWhveaTzwBX7Hx QZ/UfExwQR0XZ+/iIDa/NEAkpxZ7/nHhqM/4g2qjJXvC4yG8Ox76Px7IFIbBtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696025453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+4TXnFXnhDfMKD2rts8Tt3GuXBukVL6NlReyCnRIBb0=; b=yhxpJJUPfonmBvcaxXiwUz5UpPa8QHgPGdaL2d23grhfOQbqyriUHanW/MSbOF+0f0asvi OBmE/gISh1gkzeA/UTeMAm9Dvp4kL6Mkekt3Uzb53eeno6bfeM4TxATwnMjvjufoUDGNc6 DpHd/77U3J9f1gfK8Zizt4klx1bpvnzHnX7Ver5gVY5KEuZKmjoiGdd7crF8dCrJNYxbdZ /IGdul4kSuwlanqhWQZ4vIZjFgxQv/qbNU80u7EaV6pyrVh+tLscJdlUc5j1ZnPbxJNLyw OiOHRFqJcCX0UyB7nfQ7bCx7q0/C/sghjrbtGnSLqacXGLBVFCwY6JlqR8wOWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry4L50vcbz6Pd; Fri, 29 Sep 2023 22:10:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TMArWc044945; Fri, 29 Sep 2023 22:10:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TMArqS044940; Fri, 29 Sep 2023 22:10:53 GMT (envelope-from git) Date: Fri, 29 Sep 2023 22:10:53 GMT Message-Id: <202309292210.38TMArqS044940@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: 480f62ccd8d9 - main - pf: only create sctp multihome states if we pass the packet 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 480f62ccd8d998e4db9dc13c354a60f8f5e32a33 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=480f62ccd8d998e4db9dc13c354a60f8f5e32a33 commit 480f62ccd8d998e4db9dc13c354a60f8f5e32a33 Author: Kristof Provost AuthorDate: 2023-09-29 07:23:43 +0000 Commit: Kristof Provost CommitDate: 2023-09-29 22:10:32 +0000 pf: only create sctp multihome states if we pass the packet If we've decided to drop the packet we shouldn't create additional states based off it. MFC after: 3 days Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index baa34b16f487..3e1c8d32add9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -310,7 +310,7 @@ static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); static void pf_sctp_multihome_delayed(struct pf_pdesc *, int, - struct pfi_kkif *, struct pf_kstate *); + struct pfi_kkif *, struct pf_kstate *, int); static int pf_test_state_sctp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -5921,10 +5921,10 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, static void pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, - struct pf_kstate *s) + struct pf_kstate *s, int action) { struct pf_sctp_multihome_job *j, *tmp; - int action __unused; + int ret __unused;; struct pf_kstate *sm = NULL; struct pf_krule *ra = NULL; struct pf_krule *r = &V_pf_default_rule; @@ -5933,11 +5933,14 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, PF_RULES_RLOCK_TRACKER; TAILQ_FOREACH_SAFE(j, &pd->sctp_multihome_jobs, next, tmp) { + if (s == NULL || action != PF_PASS) + goto free; + switch (j->op) { case SCTP_ADD_IP_ADDRESS: { j->pd.sctp_flags |= PFDESC_SCTP_ADD_IP; PF_RULES_RLOCK(); - action = pf_test_rule(&r, &sm, kif, + ret = pf_test_rule(&r, &sm, kif, j->m, off, &j->pd, &ra, &rs, NULL); PF_RULES_RUNLOCK(); SDT_PROBE4(pf, sctp, multihome, test, kif, r, j->m, action); @@ -5986,6 +5989,7 @@ pf_sctp_multihome_delayed(struct pf_pdesc *pd, int off, struct pfi_kkif *kif, } } +free: free(j, M_PFTEMP); } } @@ -8154,7 +8158,7 @@ done: PF_STATE_UNLOCK(s); out: - pf_sctp_multihome_delayed(&pd, off, kif, s); + pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } @@ -8711,7 +8715,7 @@ done: out: SDT_PROBE4(pf, ip, test6, done, action, reason, r, s); - pf_sctp_multihome_delayed(&pd, off, kif, s); + pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } From nobody Fri Sep 29 23:20:12 2023 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 4Ry5t43dKgz4tqWB; Fri, 29 Sep 2023 23:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ry5t42JG5z4DZ6; Fri, 29 Sep 2023 23:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696029612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ARER+lUIoSkkRIGJgVkqljvH+2ItIhFaesAnRvxCpL0=; b=kfqHQ1yrK74B9dpdhmDbMGUMl3NteDEZgVOBl7YPngMxz/+0uVeQb0/FGeBbG5xEqijq4S xlXBB3sz2yJ7K4TUq6Wv61xGcP4QV87AWZBj5zVYIUr5dZFVUOnG6EenQSZSM+WaaR7LG6 v/s0xvm93496GGIuPcM9GPi9r5xG0/B1vxZwWncEnQtbwk8/HIUW3ngZEyNkg0wGR1Lrps hSDrGJ36bRlLVWrYm5PIDtpDqORtxwf7BUDABSn0zms0R+hcTbmR5zwhv22+Ad7jImAU7p wZ10a8emATOjG8MlzvV+/lul+SI0eUvFSNWnTQ5K8vsXjoc2yQGuNv6MEC/2BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696029612; a=rsa-sha256; cv=none; b=sghCrkBs6rM05KXf7c2qJeEHL8/9VNuqVJcwMWEGqtbc+kqJk8T4IpSCB2h1P88Nh6WrR6 nwe94G0KSBlIfklGR5NEvH2prwSztjeewYRlv8TDfNe01RGHM3gAAz0rrq+OmPZB6va3q7 IlUOSp8TB7UQrgzMnYll7n6BHOL0SNzzNbtGJxHhlBZFNO50ayUhJA/sppaejHsH85nAOK SUyoiyRFYIRzTb2ZiLaQ+g8vPsMt7H3Tt0/1BsF+QujFL9Jaim4qWXioJNbKt2zK6rSQmQ oDbgfO8EmglIdz8ij1lOHdPF4Cby3HcTGjxKRFuS4/5ls/0Y1T6XJLeZ5ACR3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696029612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ARER+lUIoSkkRIGJgVkqljvH+2ItIhFaesAnRvxCpL0=; b=Veo4AjzxIpVRbAhf/iElXMxY3dcMgYmFV+UOmNpKTPhNyQglPO8WQ9fiW+IGx0KKIPWPLi QM4vrZ1SOXyrnFrl+VQYvqpbd8KDGDrVDWr00uIstdQv8wdZ5HDPCq9LQ7Bq6zKQ8dxjX9 j6AlCYFMA8DashDUzfgfR5ko7pVXnpYjfqwiKpUEk+kRyXZfOTGCod1Ee05ENQ+V1uv3no 70kvf9uTqiiPopUsrhbtF4rq6gnShbp4BfQw+TbyT0RxI3lMrWa6TRklbXVHUDkme+Htsl ES1Q422tL42q4DRQLuGRYrfB4+Y2YPwuL5yEbRWrABADjZXx68WSLJOr5vMlFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry5t41FpVz7yt; Fri, 29 Sep 2023 23:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TNKC22056840; Fri, 29 Sep 2023 23:20:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TNKCoS056835; Fri, 29 Sep 2023 23:20:12 GMT (envelope-from git) Date: Fri, 29 Sep 2023 23:20:12 GMT Message-Id: <202309292320.38TNKCoS056835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: e47381c9fc72 - main - Allow for CSTD to be set kernel module Makefiles before inclusion 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e47381c9fc72c16e063da71fb32191e402948a50 Auto-Submitted: auto-generated The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=e47381c9fc72c16e063da71fb32191e402948a50 commit e47381c9fc72c16e063da71fb32191e402948a50 Author: Stephen J. Kiernan AuthorDate: 2023-09-29 15:04:45 +0000 Commit: Stephen J. Kiernan CommitDate: 2023-09-29 23:19:58 +0000 Allow for CSTD to be set kernel module Makefiles before inclusion Use ?= when setting the default value for CSTD so it can be set by Makefiles before inclusion and not be overridden by the .mk file. Reviewed by: imp, sjg Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D42019 --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index e00e025ab91b..b508bc81b5f0 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -271,7 +271,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ .PHONY: ${PHONY_NOTMAIN} .NOTMAIN: ${PHONY_NOTMAIN} -CSTD= gnu99 +CSTD?= gnu99 .if ${CSTD} == "k&r" CFLAGS+= -traditional From nobody Fri Sep 29 23:43:32 2023 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 4Ry6P61dqLz4ts9M; Fri, 29 Sep 2023 23:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ry6P61Hy4z4H54; Fri, 29 Sep 2023 23:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696031018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=peoS3cLpzpfCpxG1NRcTjX2xKSzKl0/rL5dAQls895Y=; b=bw8aLIyMAMUdaO00jBAz0CqweTRndT48AtgSiukROj4rI1EjVMQ5NGOZyLdPP85OEreURR O/AvNvT/TZySTyPz/znc76bizYYn+QdHFLPEYWy/7gUrAHne6o8rnO8XHYA9lA2o3Gq0Ff Y4+sJ3GjO4HcEoBgbyqeTSR3vFLrGh+DD1oyFrlFl1X9hjY479wgT/msSl+QIbFnlEmUT2 ychDJnJItDjAOMByr5ME1zFu2FSEuQ4wj6BVmqIe9eO1jK9jrY6EZcl9g7ndV/xhmlVLcX BaGUrIMYyJF7xgC15nVi5VPJtlrY+a99iEDlF1wMBWyoxNTt5xbRneT5qFDhNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696031018; a=rsa-sha256; cv=none; b=NDtLPa7NS/rc0Bg3C+o+SPw1Tho6YVW1e6LwhWILEXHDL3QI5pkjLCOAkQnk7XGcBKQeWa 0z7v/OrhiHTsv7Ai1SG8m+a2fbh599tK4ihIYKDZLerULF3lJy7DHCi3AjavVx7/s7dp94 7Gv8zl1HgbbIkDswZe8Pstff4Br4iEr7EdrH6iJlg11yEhb4LBO4G6JCedlcaYUjnlAs9V IhQxlrZGYmop7jxdmnoEJgldhfo9sPowH25DJPgRq4EygNEI5klpF8ARsF7YpGSK9PV1UY UC6wfMziwLdvExyEItytiwaeOTsoO9oC3LQsx4XdQCknHCoyLTFf5g6zptpewQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696031018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=peoS3cLpzpfCpxG1NRcTjX2xKSzKl0/rL5dAQls895Y=; b=JpLFfhW4itXLwRfU9h7XVkuhmTCOCpANf0YKYUndfFbv8hshe0xmXWbwoLekXkYNylTlDQ fHMOx9Oo5Z2nx1Zn8H91l6VpqpzgHrIWWeQ6d3cNxh3qAd0Zc3pLNxYmV13WrjRDLgINVb ysYxOU0ke2jAnHG+VDSmMKM3cgXIELBfxvP+xx8/UrboMTB52/Bh/jI1nXdENlB26eN9i2 +BuFM4ml+LreIqiGWzyiCODPHVGaivHzJlakP+NGXL4m6MddqdBhSx2EQGbKugwQepCpYh Q71J0K98IkBT+Zq5p0cqtDJgNF3KqEtd3v03gdyGdQa2NzyiuqTI4HrlU4N+VA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ry6P60LLVz94q; Fri, 29 Sep 2023 23:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38TNhcg5001089; Fri, 29 Sep 2023 23:43:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38TNhWFT001077; Fri, 29 Sep 2023 23:43:32 GMT (envelope-from git) Date: Fri, 29 Sep 2023 23:43:32 GMT Message-Id: <202309292343.38TNhWFT001077@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: f7a5903de272 - main - zfs: merge openzfs/zfs@e13538856 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: f7a5903de272db58b2b9164c1219fc2d5b757654 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f7a5903de272db58b2b9164c1219fc2d5b757654 commit f7a5903de272db58b2b9164c1219fc2d5b757654 Merge: e47381c9fc72 e13538856479 Author: Martin Matuska AuthorDate: 2023-09-29 23:21:44 +0000 Commit: Martin Matuska CommitDate: 2023-09-29 23:41:51 +0000 zfs: merge openzfs/zfs@e13538856 Notable upstream pull request merges: #15308 5551dcd76 Don't allocate from new metaslabs #15312 ba769ea35 Fix ENOSPC for extended quota #15321 e13538856 Restrict short block cloning requests #15324 f9c39dc86 Tweak rebuild in-flight hard limit Obtained from: OpenZFS OpenZFS commit: e13538856479ff79ca6642e53dddf8a593deb2c9 sys/contrib/openzfs/module/zfs/dsl_dir.c | 22 ++++++++-------------- sys/contrib/openzfs/module/zfs/metaslab.c | 9 +++++++++ sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 4 ++-- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 13 +++++++++++++ .../openzfs/tests/test-runner/bin/zts-report.py.in | 4 ++-- ...ock_cloning_copyfilerange_fallback_same_txg.ksh | 5 ++--- .../cli_root/zpool_trim/zpool_trim_partial.ksh | 2 +- .../zpool_trim/zpool_trim_verify_trimmed.ksh | 2 +- .../tests/functional/no_space/enospc_rm.ksh | 12 +++++++++++- .../tests/functional/trim/autotrim_config.ksh | 2 +- .../tests/functional/trim/autotrim_integrity.ksh | 2 +- .../functional/trim/autotrim_trim_integrity.ksh | 2 +- .../tests/functional/trim/trim_config.ksh | 2 +- .../tests/functional/trim/trim_integrity.ksh | 2 +- sys/modules/zfs/zfs_config.h | 4 ++-- sys/modules/zfs/zfs_gitrev.h | 2 +- 16 files changed, 57 insertions(+), 32 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index 1accbe621d17,000000000000..b77a32e4754c mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1149 -1,0 +1,1149 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* file_operations_extend takes .copy_file_range() and .clone_file_range() */ +/* #undef HAVE_VFS_FILE_OPERATIONS_EXTEND */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + +/* fops->iterate() is available */ +/* #undef HAVE_VFS_ITERATE */ + +/* fops->iterate_shared() is available */ +/* #undef HAVE_VFS_ITERATE_SHARED */ + +/* fops->readdir() is available */ +/* #undef HAVE_VFS_READDIR */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + *** 218 LINES SKIPPED *** From nobody Sat Sep 30 08:22:58 2023 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 4RyKwM08RLz4vmyV; Sat, 30 Sep 2023 08:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RyKwL5FKyz3HGh; Sat, 30 Sep 2023 08:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696062178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqREi3NgrgEMgVqebzuvilEFipwAe1J09DQAQm1oeYA=; b=ymvR/cSYI9xgMDDwSGfirnJBvlLyYsZoKMxWb3M7sYF1xyiVPeHj+n2WloT3GKD3zKZXlT v3KmvBDUqRySBsDehquU796zplGCZjUOn1/95D7j7M2H/s5NQFE/lNmpO1Rfue5uwmfO85 Kp/x+oEhwqNUp5agp5lQo1RadCgfjTEVDDqw3EI6wW8sZdH8Es08MzWY0tnjjvChiMRqR1 Ve6FtZghBXgWmu1xGByNDBoXawpQtqO73AUAUTM7KawgiVNOiIFegtOc4S3YiGycHPu2Vu Qb/p03eVF5mBLMWOFIl6q/dcNxzc0RUnnEsmRloxzTxfISN7G/MslDCZjc6z8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696062178; a=rsa-sha256; cv=none; b=lb3sjwrX+ZSRKZALQ9dB0zw4RAqxcxtakyhUsOVpJX28VEGHza7QwL0tlnuObKXQzYuXUL fid8GQXVIBjnBb570zuY+3g1axihXoBksbnb1koWh7shq1l0vvTVJk/yZPOiNLLuZKprWC j7MmgHRnATnlrrfa+++l+ghE6HsN9vPwcWbtrkOerxli05zJBDViS1TraNT4wL82NfGpGH fle0N4HsjSOl5DBslW79ENIHULlz3vdO8OVlrxESqI0PbxG8ZJgt/Ge3tUtbCOzoEgO9Xd bJk/ja56Q/IIPbnzk3kZnMCG48IrbQKfY0PXVQWjlHEDM/SWftfZ6lHREnYbfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696062178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqREi3NgrgEMgVqebzuvilEFipwAe1J09DQAQm1oeYA=; b=g7eA6eAqYc8C9wDOSO1/xo7jVhKVyVGcBd4LpgC1mN8nDA9dclfnlnZpeSsyBvM96sSo9X QV04WYPbGrb80UDhCf2tbRC9YcZG/DfN+dP6Tuf9AqEiLx60ddYcfm2CsHHYqx7oGG7ddH +4oTVYs6wYkk+101LWpYCkQ+wh6bFpjFD/yuCjdXjhsQbqdHE3Y63fRZbn4l1+h+/Z/c1u ArkDcMAZne01nbgG2OrXjUQdD2hlGIr5kIdcWvMJC8iaC44qy2EZW8P3LPFxGl1qaUTyZ+ b6zYpQkyw4dHWKW4ybYRd7mTR0wdvBqJu3BNmgHcVTe+2jhQIovteI9IF14Gmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyKwL44tzzgM8; Sat, 30 Sep 2023 08:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38U8MwDV097212; Sat, 30 Sep 2023 08:22:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38U8Mw77097210; Sat, 30 Sep 2023 08:22:58 GMT (envelope-from git) Date: Sat, 30 Sep 2023 08:22:58 GMT Message-Id: <202309300822.38U8Mw77097210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 16e688b2a403 - main - LinuxKPI: 802.11: fix problem removing sta 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16e688b2a403a3dbc05de3b9f8a3132838613790 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=16e688b2a403a3dbc05de3b9f8a3132838613790 commit 16e688b2a403a3dbc05de3b9f8a3132838613790 Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 07:59:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-30 08:19:19 +0000 LinuxKPI: 802.11: fix problem removing sta Move the call to lkpi_disassoc() before the state change to IEEE80211_STA_NOTEXIST which will remove the sta (from firmware). Based on a comment it seems that originally we had to do it the other way round. iwlwifi(4) has a check and will silently not remove the sta from the firmware when vif->cfg.assoc is still set (see iwl_mvm_sta_del()). This leads to the LinuxKPI 802.11 code thinking the sta is gone as downward state changes by the mac80211 op (*sta_state)() may not fail. Once we try to assoc with a newly added station later, iwlwifi firmware will run into an assert having two ap_sta set on the same vif. We can observe that problem in iwlwifi(4) having __le32 sta_id = 1 instead of sta_id = 0 in iwl_mvm_sta_cfg_cmd{} on the HCMD. This should fix one of the most seen problems with iwlwifi(4), e.g., when running service netif restart wlan0 or service wpa_supplicant restart wlan0. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 37 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 41b13fc9269f..229c73732ee4 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1426,6 +1426,15 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + /* + * We need to do this now, before sta changes to IEEE80211_STA_NOTEXIST + * as otherwise drivers (iwlwifi at least) will silently not remove + * the sta from the firmware and when we will add a new one trigger + * a fw assert. + */ + lkpi_disassoc(sta, vif, lhw); + /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " @@ -1435,15 +1444,8 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i IMPROVE("do we need to undo the chan ctx?"); goto out; } -#if 0 - lsta->added_to_drv = false; /* mo manages. */ -#endif - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* We need to do this now, can only do after sta is IEEE80211_STA_NOTEXIST. */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); bss_changed = 0; @@ -1887,6 +1889,13 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + /* + * One would expect this to happen when going off AUTHORIZED. + * See comment there; removes the sta from fw. + */ + lkpi_disassoc(sta, vif, lhw); + /* Adjust sta and change state (from NONE) to NOTEXIST. */ KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " @@ -1896,18 +1905,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int IMPROVE("do we need to undo the chan ctx?"); goto out; } -#if 0 - lsta->added_to_drv = false; /* mo manages. */ -#endif - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Update bss info (bss_info_changed) (assoc, aid, ..). */ - /* - * One would expect this to happen when going off AUTHORIZED. - * See comment there; removes the sta from fw. - */ - lkpi_disassoc(sta, vif, lhw); + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ IMPROVE("Any bss_info changes to announce?"); bss_changed = 0; From nobody Sat Sep 30 15:28:41 2023 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 4RyWMZ0fWrz4vTQL; Sat, 30 Sep 2023 15:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RyWMZ06RMz4Q9L; Sat, 30 Sep 2023 15:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696087722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8N6x86FrkbJfuLJjXo4U4pV2groWwzy7+cClV97PmAo=; b=eyOST6QXJUd424bXgXTodyudXqyJkxpM7KhUIJl2EKIweNLWweV6/1jmaGlgDwHlNRs8AG eGQJ8ZaifN4PfzC94m0f9ngDQD38Omr05VS/NZWPf4I9h3aDNjrJQtr8I0mTX2nUFJbc/M cmSlhtwHVlNxyy0/5LtkNvzJnBeNgiRdjvXI5EptB5VcMSGRPF4oop3N0NugDfJ5pk41Nj w2Sqnv1t4C2bdNuoKT9900mZwvRFjxmcHRds5PFQQpBHzCbGr/xANqPvlh/xFJBpGk5ypH DFgZUraXVb7lpQWPmHo+DS1Ta+TVT2vFfzyf76VvTYJqYQJzWFH+K9DUfaxCmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696087722; a=rsa-sha256; cv=none; b=IByu5/IjLjry9V9PesR5kE7Jk1M7gLie/ggxHzfgTR/v8YLF4Ek+z9SD78JH/B4iUnvqKG a8xgdv8u7nZVE502dhculFpGcvF1m5ruS9Qyn8WpSN97fCmaLGWUpeDMKlBSLQngSWkbOO xYbQEromtADXyDNi6dS5le2ywTNnle6Ekd41TGu7toKD1GPfZ4gvSsUtlhOmIpUxqJPapN oEseGAtOBg/56J/cfcT3A/cxs7WeNWaqhCIJLRiJymJyDsf4nuDTRN864MuUA5y7IMqC8h pUhDLUlKal2SaqRGqD/P6blOJ4FvLdoHKyjRkrUf2qYGgXFmeRdz8Ir2RVbwJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696087722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8N6x86FrkbJfuLJjXo4U4pV2groWwzy7+cClV97PmAo=; b=jb4iNBTuwza9ISGCz3MqR4oMxg7nDrmiEyn0tWWZDJaA2Tw0IkmaczESHItsj3LKUOMj6W 3eu71YyjRsueZTT9DiHxKV+TKk7r2DoCGitlY5qPauK93NnMARrSJdbreS+MQmB7yoxDI4 1ar7yCdsh7vOGIxvuRujedp4Fcg1mrt/kGDEsqstULQnWMqvixd4PcRXJYcHyoFi+GA/WD QP/+4W8wHeur5/TXIchbsCQQ3xT3aIeom6FbCKaq0+cfsUQ4KrlF2VCOqhObLbesdMhhGr O5FHHaBknxj9xmKhm7oZGW70VztrBGTKObA+CLMKJCnCV+ptoHsMJMSM60VsjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RyWMY6GP0zsl6; Sat, 30 Sep 2023 15:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38UFSfRJ095045; Sat, 30 Sep 2023 15:28:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38UFSfLw095042; Sat, 30 Sep 2023 15:28:41 GMT (envelope-from git) Date: Sat, 30 Sep 2023 15:28:41 GMT Message-Id: <202309301528.38UFSfLw095042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: dbf7691999ab - main - LinuxKPI: 802.11: improve lkpi_ic_vap_delete() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dbf7691999abe501e0ebc0fe4d8d9e97718d3890 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dbf7691999abe501e0ebc0fe4d8d9e97718d3890 commit dbf7691999abe501e0ebc0fe4d8d9e97718d3890 Author: Bjoern A. Zeeb AuthorDate: 2023-09-30 15:20:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-09-30 15:27:05 +0000 LinuxKPI: 802.11: improve lkpi_ic_vap_delete() Changing the order of cleanup in lkpi_ic_vap_delete() will avoid firmware crashes or a direct panic as observed as ieee80211_vap_detach() will do most cleanup for us and get us into the correct state. The solution is not fully developed yet and one may not be able to create a new vap (lkpi_ic_vap_create may fail with error 17) afterwards. It is supposed to be a step towards more stability for now. Sponsored by: The FreeBSD Foundation MFC after: 3 days PR: 269842 --- sys/compat/linuxkpi/common/src/linux_80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 229c73732ee4..7565f491606b 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2473,10 +2473,14 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) LKPI_80211_LHW_LVIF_LOCK(lhw); TAILQ_REMOVE(&lhw->lvif_head, lvif, lvif_entry); LKPI_80211_LHW_LVIF_UNLOCK(lhw); - lkpi_80211_mo_remove_interface(hw, vif); ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); + + IMPROVE("clear up other bits in this state"); + + lkpi_80211_mo_remove_interface(hw, vif); + mtx_destroy(&lvif->mtx); free(lvif, M_80211_VAP); }